(starts after a few seconds, white screens stays a bit)
https://github.com/user-attachments/assets/27f91819-b4ad-41b5-b743-6de6e5690099
## Description
Adds `@mastra/json-render`, a new integration that lets Mastra agents
compose [json-render](https://json-render.dev) interfaces from a
component catalog you define. json-render owns the spec format, the
prompt and the rendering. Mastra handles streaming, memory and
validation.
The catalog lists the components and actions the model may use. It has
no React in it, so the server (prompt, validation) and the client
(rendering) share the same file:
```ts
// src/catalog.ts
import { defineCatalog } from '@json-render/core';
import { schema } from '@json-render/react/schema';
import { z } from 'zod';
export const catalog = defineCatalog(schema, {
components: {
Stack: { description: 'Lays out its children vertically', props: z.object({ gap: z.number().optional() }) },
Card: { description: 'A card with a title', props: z.object({ title: z.string() }) },
Text: { description: 'A line of text', props: z.object({ text: z.string() }) },
Button: { description: 'A button that runs an action on press', props: z.object({ label: z.string() }) },
},
actions: {
ask: {
description: 'Send a follow-up prompt to the agent',
params: z.object({ prompt: z.string() }),
},
},
});
```
The Zod schemas describe each component's props in the prompt, and the
processor validates every spec against them before saving it. The agent
gets its instructions from the catalog and runs the processor on both
sides:
```ts
// src/mastra/agents/ui-agent.ts
import { Agent } from '@mastra/core/agent';
import { JsonRenderProcessor } from '@mastra/json-render';
import { Memory } from '@mastra/memory';
import { catalog } from '../../catalog';
const ui = new JsonRenderProcessor({ catalog });
const agent = new Agent({
id: 'ui-agent',
name: 'UI Agent',
model: 'openai/gpt-6.1-sol',
instructions: catalog.prompt({
mode: 'inline',
editModes: ['patch'],
system: 'You are a travel assistant. Prefer showing an interface over describing it.',
customRules: ['Wrap everything in a Stack root.'],
}),
inputProcessors: [ui],
outputProcessors: [ui],
maxProcessorRetries: 2,
memory: new Memory(),
});
```
`system` holds the agent's own instructions and replaces json-render's
default intro at the top of the prompt. `customRules` adds rules at the
end. The catalog's component list and output format go in between.
**What it does**
- **Streams interfaces.** The model writes spec blocks in json-render's
inline format. The processor turns them into `data-spec` parts, so the
interface streams to the client while the reply's text keeps only the
prose. The client renders them with `useJsonRenderMessage()` from
`@json-render/react`.
- **Saves interfaces in memory.** The `data-spec` parts are stored with
the message, so interfaces render again after a reload.
- **Edits interfaces in later turns.** Mastra drops data parts when it
builds the prompt, so on its own the model would forget the interface it
wrote. Before each model call, the processor replays the latest
interface into the reply that wrote it, in the prompt only, without
changing the stored thread. The model can then edit that interface with
a few patches.
- **Keeps what the user set.** The client sends the interface's state,
such as ticked checkboxes or selected filters, under the
`JSON_RENDER_STATE` request context key. The model sees it, and edits
keep it.
- **Validates specs.** Each spec is checked against the catalog,
including props inside repeated elements and duplicate repeat keys. An
invalid spec goes back to the model to fix before it's saved.
Tools can show their own interface by writing `data-spec` parts, and
later turns can edit those too.
**Docs:** adds a new page under Agentic UI
(`integrations/agentic-ui/json-render`).
**Studio:** unchanged. Studio keeps showing only the prose of these
replies. `examples/agent` adds a `gen-ui-agent` with its own catalog to
try the processor.
**Known limitation:** in json-render `0.22`, `buildSpecFromParts()`
changes the parts it applies, so rebuilding from the same parts repeats
list items. The processor works around this on the server. On the
client, apps should pass `useJsonRenderMessage()` a copy of the parts.
The docs page covers this.
## Related issue(s)
<!-- TODO: link issue -->
## Type of change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update
## Test plan
- `integrations/json-render`: 32 tests pass. They run a real `Agent`
with `Memory` and a mocked model. They cover streaming, reload from
memory, edits, replay into the prompt, user state, tool-written
interfaces, validation retries, patches that cannot be applied, repeated
elements, duplicate keys, and JSON Patch examples in other code blocks
staying as prose. A React test drives `useChat` and json-render's
`Renderer` through MSW.
- `tsc`, oxlint, prettier and the package builds pass.
- The docs page passes `pnpm check`. Its code examples typecheck against
the real packages.
- Tested by hand in a Vite + React example app with Playwright: weather
interface from a tool result, streamed itinerary with Stop mid-stream,
dashboard filters followed by "which filters did I pick?" (answered in
plain text, no new interface), follow-up action buttons, a large
composed board, an edit that keeps ticked items, editing a tool-written
interface, and reloading a long thread.
## Checklist
- [ ] I have linked the related issue(s) in the description above
- [x] I have made corresponding changes to the documentation (if
applicable)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have addressed all Coderabbit comments on this PR
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
**ELI5:** This PR adds a package that lets an AI agent send small
interface layouts, such as cards and metrics, to a web app. The app
draws them as real UI. The package also checks each layout against a
list of allowed parts, so the model can fix mistakes.
## Summary
This PR adds `@mastra/json-render`. The package connects json-render
interfaces with Mastra agents.
The package provides:
- `JsonRenderProcessor`, which works as an agent input and output
processor.
- `JSON_RENDER_STATE`, a key for sending interface state to the agent.
- Support for streamed `data-spec` message parts.
- Saved interfaces that render again after a page reload.
- Edits to saved interfaces. The processor replays prior interfaces by
message order.
- Validation of each assistant interface against the catalog. The
processor retries the model when the interface fails validation.
Studio rendering is not part of this PR. A later commit removed it. The
README no longer documents the Studio catalog setup or its component
limits.
## Changes by area
**Package (`integrations/json-render`)**
- Adds the package manifest, with ESM and CommonJS entry points.
- Sets the peer dependencies: `@json-render/core` `^0.22.0`,
`@mastra/core` `>=1.83.0-0 <2.0.0-0`, and Zod `>=3.25.0 || >=4.0.0`.
- Adds the build, lint, and test setup: `tsconfig.json`,
`tsconfig.build.json`, `tsdown.config.ts`, `turbo.json`,
`vitest.config.ts`, and `lint-staged.config.js`.
- Re-exports `JSON_RENDER_STATE`, `JsonRenderProcessor`, and the
`JsonRenderProcessorOptions` type from `src/index.ts`.
- Adds `src/processor.ts`, which:
- Converts ` ```spec ` blocks and eligible JSON Patch lines into
`data-spec` parts.
- Keeps prose in the text stream.
- Accepts patches outside a spec fence only for `/root`, `/elements`,
and `/state`.
- Rebuilds the latest spec from saved parts and adds it to the prompt.
- Aborts with a retry at output-step completion when the spec has
validation errors, unknown components, invalid props, duplicate repeat
keys, or an unappliable patch.
**Tests**
- `src/processor.test.ts` covers stream splitting, validation and retry,
patch edits, state handling, and conversation context.
- `src/react-chat.test.tsx` is a jsdom suite. It covers rendering from a
streamed response, rendering from saved messages, and sending state with
an action.
- `src/__tests__/test-utils.ts` adds shared catalog, spec, model, and
agent helpers.
**Documentation**
- `README.md` covers installation, processor setup, rendering
`data-spec` parts, sending `JSON_RENDER_STATE`, and calling
`buildSpecFromParts()`.
- `.changeset/json-render-processor.md` adds a minor changeset.
- `CHANGELOG.md` adds a heading for `@mastra/json-render`.
**Example agent (`examples/agent`)**
- Adds `gen-ui-catalog.ts`, which defines `genUICatalog` with eight
components: `Stack`, `Grid`, `Card`, `Heading`, `Text`, `Badge`,
`Metric`, and `Notice`. The catalog has no actions.
- Adds `gen-ui-agent.ts`, which defines `genUIAgent`. The agent uses the
catalog in inline mode with patch edits, the `openai/gpt-5.4-mini`
model, the JSON-render processors, two retries, and memory.
- Registers `genUIAgent` in `src/mastra/index.ts`.
- Adds the `@json-render/core` and `@json-render/react` dependencies at
`^0.22.0`, and `@mastra/json-render` at `latest`. Adds a pnpm override
that links `@mastra/json-render` to `../../integrations/json-render`.
- Updates `README.md` to require `pnpm setup` from the repository root
before installing dependencies.
## Validation
The author reports these results. They are not verified in this summary.
- 41 of 41 json-render tests pass.
- 59 of 59 playground-ui `message-row` tests pass.
- TypeScript and oxlint report no errors.
The author reports one open CI check: "New packages exist on npm." This
check needs an npm admin to reserve the `@mastra/json-render` name.
Completed CI results for the current head are not available.
## Scope
The diff has 22 changed files, with 1658 lines added and 3 removed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
> [!NOTE]
> This PR body was truncated due to platform limits.
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [@hono/node-server](https://redirect.github.com/honojs/node-server) |
devDependencies | patch | [`2.1.6` →
`2.1.7`](https://renovatebot.com/diffs/npm/@hono%2fnode-server/2.1.6/2.1.7)
|
| [@hono/node-server](https://redirect.github.com/honojs/node-server) |
dependencies | patch | [`2.1.6` →
`2.1.7`](https://renovatebot.com/diffs/npm/@hono%2fnode-server/2.1.6/2.1.7)
|
| [@hono/node-server@>=2.0.0
<2.1.3](https://redirect.github.com/honojs/node-server) |
pnpm-workspace.overrides | patch | [`2.1.3` →
`2.1.6`](https://renovatebot.com/diffs/npm/@hono%2fnode-server/2.1.3/2.1.6)
|
|
[basic-ftp@<6.2.1](https://redirect.github.com/patrickjuchli/basic-ftp)
| pnpm-workspace.overrides | patch | [`6.2.1` →
`6.2.4`](https://renovatebot.com/diffs/npm/basic-ftp/6.2.1/6.2.4) |
| [hono](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) | devDependencies |
patch | [`4.13.16` →
`4.13.17`](https://renovatebot.com/diffs/npm/hono/4.13.16/4.13.17) |
| [hono](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) | dependencies |
patch | [`4.13.16` →
`4.13.17`](https://renovatebot.com/diffs/npm/hono/4.13.16/4.13.17) |
| [hono](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) | dependencies |
patch | [`4.13.11` →
`4.13.16`](https://renovatebot.com/diffs/npm/hono/4.13.11/4.13.16) |
| [hono](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) | devDependencies |
patch | [`4.13.11` →
`4.13.16`](https://renovatebot.com/diffs/npm/hono/4.13.11/4.13.16) |
| [hono](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) | dependencies |
patch | [`^4.13.11` →
`^4.13.16`](https://renovatebot.com/diffs/npm/hono/4.13.11/4.13.16) |
| [hono@<4.13.11](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) |
pnpm-workspace.overrides | patch | [`4.13.11` →
`4.13.16`](https://renovatebot.com/diffs/npm/hono/4.13.11/4.13.16) |
| [hono@<4.13.13](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) |
pnpm-workspace.overrides | patch | [`4.13.13` →
`4.13.16`](https://renovatebot.com/diffs/npm/hono/4.13.13/4.13.16) |
| [hono@<4.13.8](https://hono.dev)
([source](https://redirect.github.com/honojs/hono)) |
pnpm-workspace.overrides | patch | [`4.13.11` →
`4.13.16`](https://renovatebot.com/diffs/npm/hono/4.13.11/4.13.16) |
---
> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/9505) for more information.
---
### @​hono/node-server: Backslash in the request path is parsed as
a path separator, bypassing path-based access control at a reverse proxy
[CVE-2026-126210](https://nvd.nist.gov/vuln/detail/CVE-2026-126210) /
[GHSA-jpvv-r467-5p4w](https://redirect.github.com/advisories/GHSA-jpvv-r467-5p4w)
<details>
<summary>More information</summary>
#### Details
##### Summary
`@hono/node-server` passes the raw request-target to the WHATWG URL
parser, which treats a backslash in the path as `/` and then resolves
`..` segments. A request for `/admin\secret` or
`/public\..\admin/secret` reaches the application as `/admin/secret`. A
reverse proxy that follows RFC 3986 forwards the backslash unchanged and
applies its path-based rules to the original path, so the request
reaches a route the proxy is meant to block.
##### Details
A raw backslash is not allowed in a request-target (RFC 3986, RFC 9112
Section 3.2.1), and RFC 9112 Section 3.2 says a recipient should reject
such a request rather than correct it. Proxies such as nginx on Linux,
HAProxy and Envoy keep the backslash as an ordinary character, so they
and the application see different paths.
The fix responds with `400 Bad Request` to a request whose path contains
a raw backslash, for HTTP/1.1, HTTP/2, absolute-form request-targets and
WebSocket upgrades. A percent-encoded backslash and a backslash in the
query string are still accepted.
##### Impact
An unauthenticated client can reach a route that a reverse proxy, load
balancer or WAF in front of the application blocks by path.
This affects applications served by `@hono/node-server` behind a front
component that makes path-based decisions and forwards a backslash
unchanged. Access control inside the Hono application, such as
middleware on `/admin/*`, runs on the rewritten path and is not
affected.
#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
#### References
-
[https://github.com/honojs/node-server/security/advisories/GHSA-jpvv-r467-5p4w](https://redirect.github.com/honojs/node-server/security/advisories/GHSA-jpvv-r467-5p4w)
-
[3868998a80)
-
[fb97395ec3)
-
[https://github.com/honojs/node-server](https://redirect.github.com/honojs/node-server)
-
[https://github.com/honojs/node-server/releases/tag/v1.19.18](https://redirect.github.com/honojs/node-server/releases/tag/v1.19.18)
-
[https://github.com/honojs/node-server/releases/tag/v2.1.6](https://redirect.github.com/honojs/node-server/releases/tag/v2.1.6)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-jpvv-r467-5p4w) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### @​hono/node-server: Unhandled `ECONNRESET` on the socket
during an asynchronous WebSocket upgrade crashes the process
[CVE-2026-126343](https://nvd.nist.gov/vuln/detail/CVE-2026-126343) /
[GHSA-qv5m-9pm6-hqp3](https://redirect.github.com/advisories/GHSA-qv5m-9pm6-hqp3)
<details>
<summary>More information</summary>
#### Details
##### Summary
While `@hono/node-server` waits for the Hono application to handle a
WebSocket upgrade request, the socket has no error listener. If the
client resets the TCP connection during that time, the resulting
`ECONNRESET` is emitted as an unhandled `'error'` event and the process
terminates.
##### Details
The upgrade handler awaits the application before attaching any listener
to the socket. When middleware on the upgrade path does asynchronous
work, such as an authentication lookup, a connection reset in that
window has no handler. If a global `uncaughtException` handler swallows
the error, the pending upgrade is never released and its entry is
retained for the lifetime of the process.
The fix attaches error and close listeners to the socket before calling
the application, releases the pending upgrade when the socket closes,
and skips the handshake on a destroyed socket.
##### Impact
An unauthenticated client can terminate the server process with a single
connection by sending a WebSocket upgrade request and resetting the
connection before the application has responded. Where the crash is
suppressed, repeated requests grow the heap.
This affects applications that enable WebSocket support in
`@hono/node-server` and run asynchronous middleware or handlers on the
upgrade path.
#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
#### References
-
[https://github.com/honojs/node-server/security/advisories/GHSA-qv5m-9pm6-hqp3](https://redirect.github.com/honojs/node-server/security/advisories/GHSA-qv5m-9pm6-hqp3)
-
[61cc0267e6)
-
[https://github.com/honojs/node-server](https://redirect.github.com/honojs/node-server)
-
[https://github.com/honojs/node-server/releases/tag/v2.1.6](https://redirect.github.com/honojs/node-server/releases/tag/v2.1.6)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-qv5m-9pm6-hqp3) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### basic-ftp: Uncaught TypeError in MLSD directory-listing parser via
__proto__ fact name causes DoS in Client.list()
[CVE-2026-126345](https://nvd.nist.gov/vuln/detail/CVE-2026-126345) /
[GHSA-5pm8-86m8-9m6r](https://redirect.github.com/advisories/GHSA-5pm8-86m8-9m6r)
<details>
<summary>More information</summary>
#### Details
##### Summary
basic-ftp's MLSD directory-listing parser (src/parseListMLSD.ts) looks
up fact-handler functions in a plain object literal keyed directly by
fact names taken from the FTP server's response, with no validation. A
directory-listing line containing the fact name "__proto__" resolves
this lookup to Object.prototype (inherited, non-own, non-function)
instead of undefined, so the "not a function" guard is bypassed and the
code throws `TypeError: factHandler is not a function`.
This TypeError is not an FTPError, so it is not caught by
Client.list()'s retry logic and propagates as a rejected promise out of
list() and every API built on top of it (list, downloadToDir,
uploadFromDir, clearWorkingDir, removeDir). Any FTP server the client
connects to — or any on-path attacker on a plaintext (non-TLS) FTP
session — can crash the calling application by returning one crafted
line in a directory listing. If the application does not wrap every one
of these calls in try/catch, the rejection is unhandled and crashes the
Node.js process (default behavior since Node 15).
##### Details
File: src/parseListMLSD.ts
```
const factHandlersByName: {[key: string]: FactHandler} = {
"size": parseSize,
"sizd": parseSize,
"unique": (value, info) => { info.uniqueID = value },
"modify": (value, info) => { ... },
"type": (value, info) => { ... },
"unix.mode": (value, info) => { ... },
...
}
export function parseLine(line: string): FileInfo | undefined {
const [ packedFacts, name ] = splitStringOnce(line, " ")
...
const facts = packedFacts.split(";")
for (const fact of facts) {
const [ factName, factValue ] = splitStringOnce(fact, "=")
if (!factValue) { continue }
const factHandler = factHandlersByName[factName.toLowerCase()] // <-- unsafe lookup
if (!factHandler) { continue }
const result = factHandler(factValue, info) // <-- throws here
...
}
return info
}
```
factHandlersByName is a plain `{}` object literal, so it inherits from
Object.prototype. Property access does not distinguish own keys from
inherited ones. When factName.toLowerCase() === "__proto__", the bracket
lookup factHandlersByName["__proto__"] returns Object.prototype itself —
a truthy, non-undefined value — so the `if (!factHandler) continue`
guard does not fire. The code then tries to call Object.prototype as a
function: `factHandler(factValue, info)`, which throws `TypeError:
factHandler is not a function`.
This line runs inside parseList() (src/parseList.ts), called
synchronously from a `.map()` over every line of the listing, which in
turn is called from Client._requestListWithCommand() -> Client.list()
(src/Client.ts). list()'s only error handling is:
```
catch (err) {
const shouldTryNext = err instanceof FTPError
if (!shouldTryNext) { throw err }
lastError = err
}
```
A plain TypeError is not an FTPError, so it is immediately rethrown
instead of being retried or suppressed, and the Promise returned by
list() rejects with it.
Affected call paths (all eventually call Client.list()):
- Client.list()
- Client.downloadToDir() / _downloadFromWorkingDir()
- Client.clearWorkingDir()
- Client.removeDir()
Only "__proto__" triggers the crash this way; other reserved
Object.prototype property names tested ("constructor", "toString",
"hasOwnProperty", "valueOf", "__defineGetter__") happen to resolve to
actual functions on Object.prototype, so they are called without
throwing (silently ineffective, not a crash). This confirms the root
cause is the use of an unguarded object literal as a dictionary keyed by
untrusted server input, rather than something specific to one property.
##### Proof of concept
Prerequisites: Node.js, a clone/checkout of basic-ftp, `npm install`
then `npm run buildOnly` (or `npx tsc`) to produce dist/.
Step 1 — Minimal reproduction of the parser bug alone:
node -e '
const { parseList } = require("./dist/parseList");
parseList("__proto__=x;type=file;size=10; evil.txt");
'
Expected result:
Uncaught TypeError: factHandler is not a function
at parseLine (.../dist/parseListMLSD.js:...)
Step 2 — End-to-end reproduction through the public Client API, proving
a real FTP server can trigger this over the wire with no client
modification:
Save as poc.js in the repo root and run `node poc.js`:
const net = require("net")
const { Client } = require("./dist/index")
const server = net.createServer(socket => {
socket.write("220 fake ftp ready\r\n")
socket.on("data", data => {
const cmd = data.toString().trim()
if (cmd.startsWith("USER")) socket.write("230 ok\r\n")
else if (cmd.startsWith("OPTS") || cmd.startsWith("TYPE") ||
cmd.startsWith("STRU") || cmd.startsWith("PBSZ") ||
cmd.startsWith("PROT")) socket.write("200 ok\r\n")
else if (cmd.startsWith("FEAT")) socket.write("211-Features\r\n MLST
type;size;\r\n211 End\r\n")
else if (cmd.startsWith("EPSV")) {
const dataServer = net.createServer(dsock => {
// The malicious line: fact name "__proto__"
dsock.end("__proto__=pwn;type=file;size=4; evil.txt\r\n")
})
dataServer.listen(0, "127.0.0.1", () => {
const p = dataServer.address().port
socket.write(`229 Entering Extended Passive Mode (|||${p}|)\r\n`)
})
}
else if (cmd.startsWith("MLSD") || cmd.startsWith("LIST")) {
socket.write("150 Here comes the listing\r\n")
setTimeout(() => socket.write("226 Listing complete\r\n"), 50)
}
else socket.write("200 ok\r\n")
})
})
server.listen(2121, "127.0.0.1", async () => {
const client = new Client()
try {
await client.access({ host: "127.0.0.1", port: 2121, user: "a",
password: "b" })
const files = await client.list()
console.log("list() returned normally (unexpected):", files)
} catch (err) {
console.log("client.list() threw:", err.constructor.name, "-",
err.message)
} finally {
client.close()
server.close()
process.exit(0)
}
})
Expected output:
client.list() threw: TypeError - factHandler is not a function
Configuration notes:
- No TLS, auth bypass, or special server config needed — this is a plain
FTP (PASV/EPSV
text) session using the server's FEAT response to turn on MLSD, which is
the common
path for any modern FTP server.
- The same crash can be delivered via a LIST-fallback MLSD-shaped line
too, since
parseList() auto-detects the format from the last listing line.
- In a real application without a try/catch around
list()/downloadToDir()/
clearWorkingDir()/removeDir(), this rejection is unhandled and
terminates the
Node.js process by default (Node >=15 unhandledRejection behavior is
"throw").
##### Impact
Type: Denial of Service (CWE-248: Uncaught Exception, enabled by
CWE-1321-style unguarded dictionary lookup on an object literal).
Who is impacted: Any application using basic-ftp's Client.list(),
downloadToDir(), uploadFromDir() (via ensureDir/clearWorkingDir paths),
clearWorkingDir(), or removeDir() against a server that is malicious,
compromised, or reachable by an on-path attacker on a non-TLS FTP
session. No authentication to the target server is required beyond
whatever credentials the application already uses, and no user
interaction is required — a single crafted directory-listing line is
sufficient.
Confidentiality: None. Integrity: None. Availability: High — unhandled
rejection crashes the Node.js process by default, taking down the whole
application/service, not just the FTP operation.
#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
#### References
-
[https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5pm8-86m8-9m6r](https://redirect.github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5pm8-86m8-9m6r)
-
[a22664a45d)
-
[https://github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.4](https://redirect.github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.4)
-
[https://github.com/advisories/GHSA-5pm8-86m8-9m6r](https://redirect.github.com/advisories/GHSA-5pm8-86m8-9m6r)
This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-5pm8-86m8-9m6r)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### basic-ftp: Uncaught exception crashes the Node.js process when a
password (or resumed-download path) contains CR/LF
[CVE-2026-126346](https://nvd.nist.gov/vuln/detail/CVE-2026-126346) /
[GHSA-r4jh-29pc-gfqr](https://redirect.github.com/advisories/GHSA-r4jh-29pc-gfqr)
<details>
<summary>More information</summary>
#### Details
##### Summary
Client.login() calls FTPContext.send() from inside the control-socket
data event handler. send() throws on CR, LF or NUL, and nothing catches
the throw. A password containing \r\n therefore raises an uncaught
exception and terminates the whole Node.js process. It does not reject
the returned promise. Any application that passes untrusted input as the
FTP password can be crashed remotely with one request. The same pattern
exists in the REST/RETR path of downloadTo() when the remote path
contains control characters.
##### Details
The CRLF guard (FTPContext.send, src/FtpContext.ts ~L233) correctly
refuses to send commands containing \r, \n or \0:
```ts
send(command: string) {
if (/[\r\n\0]/.test(command)) {
throw new Error(`Invalid command: Contains control characters. (${command})`);
}
```
That works when send() is called from handle(), because it runs inside a
Promise executor and the throw becomes a rejection. But in two places
send() runs inside a response handler, which is called synchronously
from the socket’s data event:
Client.login() (src/Client.ts ~L246-248): after the server answers 331
to USER, the handler calls this.ftp.send("PASS " + password). The USER
command was already sent and is valid, so the password is only checked
at this point. The call chain is socket.on("data") →
_onControlSocketData → _passToHandler → responseHandler → send() →
throw. No try/catch exists anywhere in that chain, so it becomes an
uncaughtException.
downloadTo() (src/transfer.ts ~L368-370): when startAt > 0, the initial
command is REST n, which contains no user-controlled text. When the
server answers 350, the handler calls config.ftp.send("RETR " +
config.remotePath). This remotePath was never checked before. A path
with a control character throws in the data handler in the same way.
(Found by code reading, not reproduced.)
Because the exception happens during data event dispatch, it can’t be
handled with try/catch or .catch() around client.access() or
downloadTo(). The application only survives if it has a global
process.on("uncaughtException") handler.
##### Proof of concept
Tested on Node.js v22.22.0 against basic-ftp 6.2.2 (built from source).
It uses a minimal mock FTP server on localhost:
```js
const net = require("net")
const ftp = require("basic-ftp")
const srv = net.createServer(s => {
s.write("220 hi\r\n")
s.on("data", d => {
const c = d.toString()
if (c.startsWith("USER")) s.write("331 pw\r\n")
else if (c.startsWith("PASS")) s.write("230 ok\r\n")
else s.write("200 ok\r\n")
})
})
srv.listen(0, async () => {
const c = new ftp.Client(2000)
try {
await c.access({
host: "127.0.0.1",
port: srv.address().port,
user: "bob",
password: "x\r\nDELE important" // attacker-controlled value
})
} catch (e) {
console.log("rejected:", e.message) // never reached
}
console.log("handled gracefully") // never reached
process.exit(0)
})
```
Result: the process terminates with an uncaught exception and neither
catch nor the final console.log runs:
```
Error: Invalid command: Contains control characters. (PASS x
DELE important)
at FTPContext.send (dist/FtpContext.js:189:19)
at Object.responseHandler (dist/Client.js:186:26)
at FTPContext._passToHandler (dist/FtpContext.js:322:24)
at FTPContext._onControlSocketData (dist/FtpContext.js:312:18)
at Socket.<anonymous> (dist/FtpContext.js:133:44)
```
The server in the PoC is benign. Any normal FTP server that replies 331
to USER triggers the same crash.
##### Impact
Denial of service (uncaught exception, process termination), CWE-248.
It affects applications that pass untrusted or user-influenced values as
the FTP password, or as the remote path of a resumed download. Examples
are web apps or services that let users enter their own FTP credentials,
or file-transfer or backup tools driven by user-supplied paths. One
request crashes the whole Node.js process and every other client it
serves. It needs no authentication to the FTP server and no special
server behaviour. The attacker only needs control over the string.
Confidentiality and integrity are not affected, and the CRLF guard still
blocks command injection.
Suggested fix:
In FTPContext._passToHandler(), wrap the handler call in a try/catch
that rejects the task and calls closeWithError(err).
Validate password in login(), and remotePath in _downloadToStream(),
before any I/O and reject early.
#### Severity
- CVSS Score: 5.9 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
#### References
-
[https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-r4jh-29pc-gfqr](https://redirect.github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-r4jh-29pc-gfqr)
-
[0495b906bd)
-
[https://github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.3](https://redirect.github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.3)
-
[https://github.com/advisories/GHSA-r4jh-29pc-gfqr](https://redirect.github.com/advisories/GHSA-r4jh-29pc-gfqr)
This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-r4jh-29pc-gfqr)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### basic-ftp: Uncaught exception crashes the Node.js process when a
password (or resumed-download path) contains CR/LF
[CVE-2026-126346](https://nvd.nist.gov/vuln/detail/CVE-2026-126346) /
[GHSA-r4jh-29pc-gfqr](https://redirect.github.com/advisories/GHSA-r4jh-29pc-gfqr)
<details>
<summary>More information</summary>
#### Details
##### Summary
Client.login() calls FTPContext.send() from inside the control-socket
data event handler. send() throws on CR, LF or NUL, and nothing catches
the throw. A password containing \r\n therefore raises an uncaught
exception and terminates the whole Node.js process. It does not reject
the returned promise. Any application that passes untrusted input as the
FTP password can be crashed remotely with one request. The same pattern
exists in the REST/RETR path of downloadTo() when the remote path
contains control characters.
##### Details
The CRLF guard (FTPContext.send, src/FtpContext.ts ~L233) correctly
refuses to send commands containing \r, \n or \0:
```ts
send(command: string) {
if (/[\r\n\0]/.test(command)) {
throw new Error(`Invalid command: Contains control characters. (${command})`);
}
```
That works when send() is called from handle(), because it runs inside a
Promise executor and the throw becomes a rejection. But in two places
send() runs inside a response handler, which is called synchronously
from the socket’s data event:
Client.login() (src/Client.ts ~L246-248): after the server answers 331
to USER, the handler calls this.ftp.send("PASS " + password). The USER
command was already sent and is valid, so the password is only checked
at this point. The call chain is socket.on("data") →
_onControlSocketData → _passToHandler → responseHandler → send() →
throw. No try/catch exists anywhere in that chain, so it becomes an
uncaughtException.
downloadTo() (src/transfer.ts ~L368-370): when startAt > 0, the initial
command is REST n, which contains no user-controlled text. When the
server answers 350, the handler calls config.ftp.send("RETR " +
config.remotePath). This remotePath was never checked before. A path
with a control character throws in the data handler in the same way.
(Found by code reading, not reproduced.)
Because the exception happens during data event dispatch, it can’t be
handled with try/catch or .catch() around client.access() or
downloadTo(). The application only survives if it has a global
process.on("uncaughtException") handler.
##### Proof of concept
Tested on Node.js v22.22.0 against basic-ftp 6.2.2 (built from source).
It uses a minimal mock FTP server on localhost:
```js
const net = require("net")
const ftp = require("basic-ftp")
const srv = net.createServer(s => {
s.write("220 hi\r\n")
s.on("data", d => {
const c = d.toString()
if (c.startsWith("USER")) s.write("331 pw\r\n")
else if (c.startsWith("PASS")) s.write("230 ok\r\n")
else s.write("200 ok\r\n")
})
})
srv.listen(0, async () => {
const c = new ftp.Client(2000)
try {
await c.access({
host: "127.0.0.1",
port: srv.address().port,
user: "bob",
password: "x\r\nDELE important" // attacker-controlled value
})
} catch (e) {
console.log("rejected:", e.message) // never reached
}
console.log("handled gracefully") // never reached
process.exit(0)
})
```
Result: the process terminates with an uncaught exception and neither
catch nor the final console.log runs:
```
Error: Invalid command: Contains control characters. (PASS x
DELE important)
at FTPContext.send (dist/FtpContext.js:189:19)
at Object.responseHandler (dist/Client.js:186:26)
at FTPContext._passToHandler (dist/FtpContext.js:322:24)
at FTPContext._onControlSocketData (dist/FtpContext.js:312:18)
at Socket.<anonymous> (dist/FtpContext.js:133:44)
```
The server in the PoC is benign. Any normal FTP server that replies 331
to USER triggers the same crash.
##### Impact
Denial of service (uncaught exception, process termination), CWE-248.
It affects applications that pass untrusted or user-influenced values as
the FTP password, or as the remote path of a resumed download. Examples
are web apps or services that let users enter their own FTP credentials,
or file-transfer or backup tools driven by user-supplied paths. One
request crashes the whole Node.js process and every other client it
serves. It needs no authentication to the FTP server and no special
server behaviour. The attacker only needs control over the string.
Confidentiality and integrity are not affected, and the CRLF guard still
blocks command injection.
Suggested fix:
In FTPContext._passToHandler(), wrap the handler call in a try/catch
that rejects the task and calls closeWithError(err).
Validate password in login(), and remotePath in _downloadToStream(),
before any I/O and reject early.
#### Severity
- CVSS Score: 5.9 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
#### References
-
[https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-r4jh-29pc-gfqr](https://redirect.github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-r4jh-29pc-gfqr)
-
[0495b906bd)
-
[https://github.com/patrickjuchli/basic-ftp](https://redirect.github.com/patrickjuchli/basic-ftp)
-
[https://github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.3](https://redirect.github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.3)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-r4jh-29pc-gfqr) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### basic-ftp: Uncaught TypeError in MLSD directory-listing parser via
__proto__ fact name causes DoS in Client.list()
[CVE-2026-126345](https://nvd.nist.gov/vuln/detail/CVE-2026-126345) /
[GHSA-5pm8-86m8-9m6r](https://redirect.github.com/advisories/GHSA-5pm8-86m8-9m6r)
<details>
<summary>More information</summary>
#### Details
##### Summary
basic-ftp's MLSD directory-listing parser (src/parseListMLSD.ts) looks
up fact-handler functions in a plain object literal keyed directly by
fact names taken from the FTP server's response, with no validation. A
directory-listing line containing the fact name "__proto__" resolves
this lookup to Object.prototype (inherited, non-own, non-function)
instead of undefined, so the "not a function" guard is bypassed and the
code throws `TypeError: factHandler is not a function`.
This TypeError is not an FTPError, so it is not caught by
Client.list()'s retry logic and propagates as a rejected promise out of
list() and every API built on top of it (list, downloadToDir,
uploadFromDir, clearWorkingDir, removeDir). Any FTP server the client
connects to — or any on-path attacker on a plaintext (non-TLS) FTP
session — can crash the calling application by returning one crafted
line in a directory listing. If the application does not wrap every one
of these calls in try/catch, the rejection is unhandled and crashes the
Node.js process (default behavior since Node 15).
##### Details
File: src/parseListMLSD.ts
```
const factHandlersByName: {[key: string]: FactHandler} = {
"size": parseSize,
"sizd": parseSize,
"unique": (value, info) => { info.uniqueID = value },
"modify": (value, info) => { ... },
"type": (value, info) => { ... },
"unix.mode": (value, info) => { ... },
...
}
export function parseLine(line: string): FileInfo | undefined {
const [ packedFacts, name ] = splitStringOnce(line, " ")
...
const facts = packedFacts.split(";")
for (const fact of facts) {
const [ factName, factValue ] = splitStringOnce(fact, "=")
if (!factValue) { continue }
const factHandler = factHandlersByName[factName.toLowerCase()] // <-- unsafe lookup
if (!factHandler) { continue }
const result = factHandler(factValue, info) // <-- throws here
...
}
return info
}
```
factHandlersByName is a plain `{}` object literal, so it inherits from
Object.prototype. Property access does not distinguish own keys from
inherited ones. When factName.toLowerCase() === "__proto__", the bracket
lookup factHandlersByName["__proto__"] returns Object.prototype itself —
a truthy, non-undefined value — so the `if (!factHandler) continue`
guard does not fire. The code then tries to call Object.prototype as a
function: `factHandler(factValue, info)`, which throws `TypeError:
factHandler is not a function`.
This line runs inside parseList() (src/parseList.ts), called
synchronously from a `.map()` over every line of the listing, which in
turn is called from Client._requestListWithCommand() -> Client.list()
(src/Client.ts). list()'s only error handling is:
```
catch (err) {
const shouldTryNext = err instanceof FTPError
if (!shouldTryNext) { throw err }
lastError = err
}
```
A plain TypeError is not an FTPError, so it is immediately rethrown
instead of being retried or suppressed, and the Promise returned by
list() rejects with it.
Affected call paths (all eventually call Client.list()):
- Client.list()
- Client.downloadToDir() / _downloadFromWorkingDir()
- Client.clearWorkingDir()
- Client.removeDir()
Only "__proto__" triggers the crash this way; other reserved
Object.prototype property names tested ("constructor", "toString",
"hasOwnProperty", "valueOf", "__defineGetter__") happen to resolve to
actual functions on Object.prototype, so they are called without
throwing (silently ineffective, not a crash). This confirms the root
cause is the use of an unguarded object literal as a dictionary keyed by
untrusted server input, rather than something specific to one property.
##### Proof of concept
Prerequisites: Node.js, a clone/checkout of basic-ftp, `npm install`
then `npm run buildOnly` (or `npx tsc`) to produce dist/.
Step 1 — Minimal reproduction of the parser bug alone:
node -e '
const { parseList } = require("./dist/parseList");
parseList("__proto__=x;type=file;size=10; evil.txt");
'
Expected result:
Uncaught TypeError: factHandler is not a function
at parseLine (.../dist/parseListMLSD.js:...)
Step 2 — End-to-end reproduction through the public Client API, proving
a real FTP server can trigger this over the wire with no client
modification:
Save as poc.js in the repo root and run `node poc.js`:
const net = require("net")
const { Client } = require("./dist/index")
const server = net.createServer(socket => {
socket.write("220 fake ftp ready\r\n")
socket.on("data", data => {
const cmd = data.toString().trim()
if (cmd.startsWith("USER")) socket.write("230 ok\r\n")
else if (cmd.startsWith("OPTS") || cmd.startsWith("TYPE") ||
cmd.startsWith("STRU") || cmd.startsWith("PBSZ") ||
cmd.startsWith("PROT")) socket.write("200 ok\r\n")
else if (cmd.startsWith("FEAT")) socket.write("211-Features\r\n MLST
type;size;\r\n211 End\r\n")
else if (cmd.startsWith("EPSV")) {
const dataServer = net.createServer(dsock => {
// The malicious line: fact name "__proto__"
dsock.end("__proto__=pwn;type=file;size=4; evil.txt\r\n")
})
dataServer.listen(0, "127.0.0.1", () => {
const p = dataServer.address().port
socket.write(`229 Entering Extended Passive Mode (|||${p}|)\r\n`)
})
}
else if (cmd.startsWith("MLSD") || cmd.startsWith("LIST")) {
socket.write("150 Here comes the listing\r\n")
setTimeout(() => socket.write("226 Listing complete\r\n"), 50)
}
else socket.write("200 ok\r\n")
})
})
server.listen(2121, "127.0.0.1", async () => {
const client = new Client()
try {
await client.access({ host: "127.0.0.1", port: 2121, user: "a",
password: "b" })
const files = await client.list()
console.log("list() returned normally (unexpected):", files)
} catch (err) {
console.log("client.list() threw:", err.constructor.name, "-",
err.message)
} finally {
client.close()
server.close()
process.exit(0)
}
})
Expected output:
client.list() threw: TypeError - factHandler is not a function
Configuration notes:
- No TLS, auth bypass, or special server config needed — this is a plain
FTP (PASV/EPSV
text) session using the server's FEAT response to turn on MLSD, which is
the common
path for any modern FTP server.
- The same crash can be delivered via a LIST-fallback MLSD-shaped line
too, since
parseList() auto-detects the format from the last listing line.
- In a real application without a try/catch around
list()/downloadToDir()/
clearWorkingDir()/removeDir(), this rejection is unhandled and
terminates the
Node.js process by default (Node >=15 unhandledRejection behavior is
"throw").
##### Impact
Type: Denial of Service (CWE-248: Uncaught Exception, enabled by
CWE-1321-style unguarded dictionary lookup on an object literal).
Who is impacted: Any application using basic-ftp's Client.list(),
downloadToDir(), uploadFromDir() (via ensureDir/clearWorkingDir paths),
clearWorkingDir(), or removeDir() against a server that is malicious,
compromised, or reachable by an on-path attacker on a non-TLS FTP
session. No authentication to the target server is required beyond
whatever credentials the application already uses, and no user
interaction is required — a single crafted directory-listing line is
sufficient.
Confidentiality: None. Integrity: None. Availability: High — unhandled
rejection crashes the Node.js process by default, taking down the whole
application/service, not just the FTP operation.
#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
#### References
-
[https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5pm8-86m8-9m6r](https://redirect.github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5pm8-86m8-9m6r)
-
[a22664a45d)
-
[https://github.com/patrickjuchli/basic-ftp](https://redirect.github.com/patrickjuchli/basic-ftp)
-
[https://github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.4](https://redirect.github.com/patrickjuchli/basic-ftp/releases/tag/v6.2.4)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-5pm8-86m8-9m6r) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### Hono: `css` helper does not escape a closing tag split between the
template and an interpolated value, allowing HTML injection
[CVE-2026-126359](https://nvd.nist.gov/vuln/detail/CVE-2026-126359) /
[GHSA-3gg2-335m-rxc6](https://redirect.github.com/advisories/GHSA-3gg2-335m-rxc6)
<details>
<summary>More information</summary>
#### Details
##### Summary
The `css` helper in `hono/css` escapes a `/` that follows `<` inside an
interpolated value so that a value cannot close the `<style>` element.
The check only looks inside each value. When the text before a value
ends with `<`, whether that is the template itself or an earlier
interpolated value, and the next value starts with `/`, the `/` is not
escaped and the combined output contains an unescaped closing tag.
##### Details
Interpolated string values are escaped one at a time before they are
joined with the surrounding template text. The rule that neutralizes
`</` therefore cannot see a `<` that belongs to the template. A template
such as a `content` declaration that opens with a literal `<` and
interpolates a string right after it produces a raw `</style>` when that
string starts with `/style>`. During server-side rendering the `<Style
/>` element is closed early and the rest of the value is interpreted as
HTML.
This issue arises only when `<` is the last character before an
interpolation in a `css` template, either written in the template or
supplied by a preceding value, and the interpolated value is controlled
by a client.
##### Impact
A client that controls such a value can inject HTML, including script,
into the page rendered on the server.
This may lead to:
- Execution of attacker-controlled script in the browser of a user who
views the page
- Exposure of information available to that page
This issue affects applications that interpolate untrusted strings into
a `css` template immediately after a `<`, including two adjacent
interpolations such as `${prefix}${name}` where both are untrusted.
Other uses of the `css` helper are not affected.
##### Workarounds
Do not interpolate untrusted values into `css` templates, or make sure
the text before an interpolated value does not end with `<`.
#### Severity
- CVSS Score: 3.4 / 10 (Low)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N`
#### References
-
[https://github.com/honojs/hono/security/advisories/GHSA-3gg2-335m-rxc6](https://redirect.github.com/honojs/hono/security/advisories/GHSA-3gg2-335m-rxc6)
-
[15bbd96ad1)
-
[https://github.com/honojs/hono](https://redirect.github.com/honojs/hono)
-
[https://github.com/honojs/hono/releases/tag/v4.13.16](https://redirect.github.com/honojs/hono/releases/tag/v4.13.16)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-3gg2-335m-rxc6) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### Hono: `csrf()` does not check requests sent by hyperlink auditing
(`text/ping`)
[CVE-2026-126355](https://nvd.nist.gov/vuln/detail/CVE-2026-126355) /
[GHSA-46wx-v44x-9hh2](https://redirect.github.com/advisories/GHSA-46wx-v44x-9hh2)
<details>
<summary>More information</summary>
#### Details
##### Summary
`csrf()` validates a request only when its `Content-Type` is one of the
three types an HTML form can send. Chromium's hyperlink auditing (`<a
ping>`) sends a cross-origin POST with the user's cookies and the
content type `text/ping`, which is not in that list. The middleware does
not look at `Origin` or `Sec-Fetch-Site` for such a request, so it is
passed to the handler.
##### Details
The middleware skips the origin check when the content type is not one
that a form submission produces. The assumption was that any other
content type requires a CORS preflight and therefore cannot be sent
cross-origin with credentials. Hyperlink auditing is an exception:
Chrome and Edge send the ping as a credentialed POST without a
preflight, with a fixed body and `Content-Type: text/ping`.
A page on another origin can therefore trigger a POST to any URL of the
application. The `csrf()` options for `origin` and `secFetchSite` do not
change the outcome, because neither header is evaluated for the request.
The request body is fixed, so only actions whose effect does not depend
on the body can be triggered. Firefox does not send pings by default. As
with any CSRF, the user's cookie must be sent with the request, which
with the default `SameSite=Lax` means a same-site origin or a cookie set
with `SameSite=None`.
##### Impact
A user who visits a malicious page in Chrome or Edge while logged in to
an application protected by `csrf()` can be made to send a
state-changing request to that application, such as logging out,
deleting a resource, or toggling a setting that is selected by the path
or query string.
This issue affects applications that rely on `csrf()` as their CSRF
protection and expose state-changing endpoints whose effect does not
depend on the request body.
##### Workarounds
Reject requests with a `Content-Type` of `text/ping` in a middleware
registered before `csrf()`, or set session cookies with
`SameSite=Strict`.
#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N`
#### References
-
[https://github.com/honojs/hono/security/advisories/GHSA-46wx-v44x-9hh2](https://redirect.github.com/honojs/hono/security/advisories/GHSA-46wx-v44x-9hh2)
-
[bf16471913)
-
[https://github.com/honojs/hono](https://redirect.github.com/honojs/hono)
-
[https://github.com/honojs/hono/releases/tag/v4.13.16](https://redirect.github.com/honojs/hono/releases/tag/v4.13.16)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-46wx-v44x-9hh2) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### Hono: `validator('form')` skips validation for `multipart/form-data`
requests with extra parameters
[CVE-2026-126356](https://nvd.nist.gov/vuln/detail/CVE-2026-126356) /
[GHSA-4h7h-rv7c-7m2v](https://redirect.github.com/advisories/GHSA-4h7h-rv7c-7m2v)
<details>
<summary>More information</summary>
#### Details
##### Summary
`validator('form')` only recognizes a `multipart/form-data`
`Content-Type` that carries nothing but a single `boundary` parameter. A
request with another legal parameter, such as `charset`, or with extra
whitespace after the `;` is not recognized as a form. The validation
callback then receives an empty object, while `c.req.parseBody()` still
parses the body as a form.
##### Details
The check that decides whether a request body is a form was written as a
strict pattern over the whole `Content-Type` value. Any parameter list
that does not look exactly like `; boundary=...` fails the check. When
it fails, the middleware does not read the body and passes an empty
object to the validation callback. If the callback accepts an empty
object, the request proceeds to the handler, which can still read all
submitted fields through `c.req.parseBody()` or `c.req.formData()`.
`application/x-www-form-urlencoded` is not affected. Only the
`multipart/form-data` branch has the strict pattern.
This issue arises when an application relies on `validator('form')` to
reject or restrict fields and the validation callback does not fail on
an empty object.
##### Impact
An unauthenticated client can send form fields that the `form` validator
never sees, by adding a legal parameter to the `Content-Type` header.
This may lead to:
- Allow-list or required-field checks in the validator being skipped
- Fields the application intended to reject reaching the handler
This issue affects applications that use `validator('form')` with
`multipart/form-data` requests and whose validation callback accepts an
empty object.
##### Workarounds
Reject an empty object in the `validator('form')` callback, or validate
the result of `await c.req.parseBody()` in the handler.
#### Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
#### References
-
[https://github.com/honojs/hono/security/advisories/GHSA-4h7h-rv7c-7m2v](https://redirect.github.com/honojs/hono/security/advisories/GHSA-4h7h-rv7c-7m2v)
-
[d88fab3724)
-
[https://github.com/honojs/hono](https://redirect.github.com/honojs/hono)
-
[https://github.com/honojs/hono/releases/tag/v4.13.16](https://redirect.github.com/honojs/hono/releases/tag/v4.13.16)
This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-4h7h-rv7c-7m2v) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>
---
### Hono: `mount()` and `app.mount()` can forward a path that bypasses
middleware scoped inside the mount prefix
[CVE-2026-126357](https://nvd.nist.gov/vuln/detail/CVE-2026-126357) /
[GHSA-4m76-xfj5-7975](https://redirect.github.com/advisories/GHSA-4m76-xfj5-7975)
<details>
<summary>More information</summary>
#### Details
##### Summary
`mount()` and `app.mount()` remove the mount prefix from the request
path and forward the rest to the mounted application. Two mistakes in
that step let a crafted request reach a route of the mounted application
that the outer application protects with path-scoped middleware, such as
an authentication check on `/app/admin/*`. The outer application routes
on the original path, so the middleware does not run.
##### Details
1. **Dynamic prefix** (all affected versions): for a mount such as
`/api/:tenant/*`, the prefix was removed by the length of the route
pattern, not of the matched prefix. A request with a longer or shorter
first segment is cut in the middle, so `/api/a/xxxxx/admin/secret`
reaches the mounted application as `/admin/secret`.
2. **Re-normalization** (since 4.12.21): the forwarded path was built
from the decoded request path and assigned to `url.pathname`, which
turns a decoded backslash into `/` and collapses `..`.
`/app/public%5C..%5Cadmin/secret` reaches the mounted application as
`/admin/secret`.
The fix removes the prefix segment by segment from the raw pathname,
using the matched parameter values for its length. Route patterns that
cannot be handled safely now throw: duplicate parameter names and a
wildcard inside the last segment such as `/assets*`. A trailing slash in
an `app.mount()` prefix no longer removes an extra segment.
##### Impact
An unauthenticated client can reach a route of a mounted application
that the outer application protects with path-scoped middleware.
This affects applications that use `mount()` or `app.mount()` and rely
on middleware registered on a sub-path inside the mount prefi
> [!IMPORTANT]
> ✂ PR body was truncated to here.
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Dependency updates
Refs SEC-256, SEC-261, SEC-262, SEC-263
**2026-11-09:** merged `origin/main` into this branch with a merge
commit (no rebase, no force-push). `main` already raised `better-auth`
to `^1.7.18` (with its own changeset), so this branch now takes main's
version and floors. The old 1.7.16 changeset is removed, and no
`better-auth` change is left in this PR.
| Package | Where | From → To | Advisory |
|---|---|---|---|
| chat | `template-genui-data-explorer`,
`template-customer-refund-agent` lockfiles (via `@mastra/core`) | 4.41.1
/ 4.39.0 → 4.44.0 | AIKIDO-2026-571219 (2026-11-09) |
| `@hono/node-server` | `template-customer-refund-agent/client-demo-ui`
direct pin | 2.1.5 → 2.1.6 (matches the template's existing 2.1.6
override) | GHSA-jpvv-r467-5p4w and related (2026-11-09) |
| next | GenUI template, memory integration tests | 16.4.2/16.4.4 →
16.4.5 | Next.js advisories through 16.4.4 |
| fastify | otel-bridge agent-hub | 5.12.6 → 5.12.8 | AIKIDO through
5.12.7 |
| shell-quote / proxy-addr / image-size / `@hono/node-server` | MongoDB
Bedrock template lockfiles | refreshed (1.12.0 / 2.0.8 / 2.0.4 / 2.1.6)
| CVE-2026-102422, CVE-2026-90711, CVE-2025-71329/71330, CVE-2026-118663
|
| @opentelemetry/auto-instrumentations-node | MongoDB Bedrock template |
^0.60.0 → ^0.75.0 | CVE-2026-44902 |
Empty changeset (`vanta-2026-11-09-template-chat-4-44.md`), because this
PR now changes only templates, examples, and integration tests. No
published package changes. All versions used were published more than a
day ago. No overrides were removed or lowered.
Deferred (major-only or no fixed release): extract-zip@2.0.1 (no fix),
deepmerge 4.3.1 (no fix), picomatch 4.0.7 (no fix), zod 3.25.76 (fix in
4.x), `@ai-sdk/provider-utils` 2.2.8/3.0.x (fix in 4.0.20+, AI SDK v4/v5
compat lines), ai 4.3.19/5.0.210 (fix in 5.0.52 / 6.0.170),
`@azure/msal-node@5.6.0` (7.1.0), minimatch 9/10 (11.0.1), glob
10.5.0/13.0.6 (14.0.2; 13.0.7 is not listed as patched), openai 6.49.0
(7.5.0), `@bufbuild/protobuf@1.10.1` (2.12.1), got 15.1.0 (16.0.0),
`@apidevtools/json-schema-ref-parser@11.9.3` (15.5.1), undici 6.29.1
(7.30.1), nanoid 3.3.20 (5.1.16).
<!-- CURSOR_AGENT_PR_BODY_END -->
<div><a
href="https://cursor.com/agents/bc-e7dae54a-e16d-5b3a-ae5d-99ce740a451f?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/background-agent?bcId=bc-e7dae54a-e16d-5b3a-ae5d-99ce740a451f&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR updates several third-party packages to newer versions. The
updates include authentication fixes and security-related dependency
updates.
## Changes
- Updated `better-auth` to `1.7.16` in the workspace, authentication
package, and agent example. Added a patch changeset for
`@mastra/auth-better-auth` describing session and verification fixes.
- Updated `next` to `16.4.5` in the memory integration tests and GenUI
data explorer template.
- Updated `fastify` to `5.12.8` in the OpenTelemetry bridge example.
- Updated OpenTelemetry instrumentation and `zod` in the MongoDB Bedrock
agent template. Added scoped `@ai-sdk/provider-utils` overrides and a
`compression` override.
- Updated the related pnpm and npm lockfiles.
## Validation
Build and test results: not available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: shreyas-mastra <shreyas-mastra@users.noreply.github.com>
The observability MCP app used to draw a single widget picked from a few
hard-coded ones, which made it pretty limited on real data. It now draws
a whole dashboard (rows of KPIs, time series, tables and scores), using
the dashboard's default date preset and filters. Each widget loads and
fails on its own.
The model doesn't write the stored dashboard format directly. It writes
a simpler shape where each widget, read and column type is a key, and
each number holds the read it comes from, so nothing points at a query,
series or column by id and a dashboard can't reference something it
lacks. `toObservabilityDashboard` gathers the reads into shared queries,
fills in series keys, totals and default sort, assigns missing widget
ids, and checks the result against `dashboardDefinitionSchema`. A widget
without a `span` fills the row.
```ts
{
span: 6,
timeseries: {
chart: 'stackedBar',
format: 'count',
series: [
{
label: 'Runs',
color: 'green',
value: { metricTimeSeries: { name: ['mastra_agent_duration_ms'], aggregation: 'count' } },
},
],
},
}
```
The schema names the metrics Mastra records so the model doesn't guess
names that read as zero. `createObservabilityDashboardInputSchema({
metricNames })` narrows them to the project's own metrics. The example
server refreshes that list before each run and also exposes a discovery
tool for label keys and values.
```ts
import {
observabilityDashboardInputSchema,
observabilityDashboardOutputSchema,
toObservabilityDashboard,
} from '@mastra/mcp-apps-components';
createTool({
id: 'showObservabilityDashboard',
inputSchema: observabilityDashboardInputSchema,
outputSchema: observabilityDashboardOutputSchema,
execute: async input => toObservabilityDashboard(input),
});
```
Every widget on Studio's metrics dashboard round-trips through the new
shape. On three prompts, gpt-5.5 and gpt-5-mini render every dashboard.
gpt-5.4-mini still struggles with tables.
`@mastra/core` and `zod` are now peer dependencies. To test, run `pnpm
--filter @mastra/mcp-apps-components test`, or run `examples/agent` and
ask the observability agent for a dashboard in Studio.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR changes the observability app from showing one widget to showing
a full dashboard. Each widget can load or show an error on its own, so
one failing widget does not block the others.
## Summary
- Add schemas for model-authored dashboards with KPI, time-series,
table, and score widgets. Convert validated input into a stored
dashboard, sharing matching reads and filling in missing widget IDs and
spans.
- Update the app to render dashboard rows and apply the dashboard’s date
preset and default filters. Show widget-level errors independently.
- Add an example dashboard tool and observability discovery tool.
Support metric-name validation against a project’s catalog.
- Update documentation, exports, pin context, and peer dependencies.
Rename the app resource to `observabilityDashboardApp`.
- Add tests for dashboard schemas, conversion, rendering, widget
failures, date ranges, filters, and pinning.
**Diff:** 18 files changed; 1,938 lines added and 304 removed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Adds `observabilityWidgetApp`, an MCP app that draws one observability
dashboard widget (KPIs, time series…) right in the conversation. It
renders with playground-ui's `StatelessWidget`, so the chart looks and
behaves like the one on the Metrics dashboard.
The app runs sandboxed in the host's iframe and can't reach the Mastra
server, so it reads its data through an app-only `queryObservability`
tool taking `{ action, args }`, where `action` is a `MastraClient`
observability method. That tool lives in the server registering the app,
not in the package, so each deployment chooses its own endpoint and
credentials (local server or a hosted platform):
```ts
import { observabilityWidgetApp, QUERY_OBSERVABILITY_TOOL } from '@mastra/mcp-apps-components';
new MCPServer({
id: 'observability-mcp-server',
appResources: { 'ui://mastra/observability-widget': observabilityWidgetApp },
tools: {
showObservabilityWidget, // model-visible, returns { widget, datePreset }
[QUERY_OBSERVABILITY_TOOL]: queryObservability, // app-only, returns { data }
},
});
```
The app follows the host's light/dark theme. playground-ui exports
`emptyAnswer` so hosts can skip requests whose filters can never match
without calling the server. `examples/agent` gets a full reference
setup: an observability MCP server with preset widgets (overview,
agentRuns, tokenUsage, latency), a read-only `queryObservability` tool
and an observability agent.
Test plan: jsdom tests drive the app through a real MCP server and
`AppBridge`. They cover rendering the server's answer over the preset
window, a failed read, an invalid widget and the light theme. Another
test checks that the built resource is one self-contained HTML page. I
also checked it end to end in Studio against `examples/agent`: the agent
picks the right widget for the question, the chart shows live data and
the tool rejects unknown actions.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR lets a chat show one observability dashboard widget and fetch
its data through a tool provided by the host. Hosts can also let users
pin and unpin widgets, while keeping control of which widgets stay
pinned.
## Summary
- Adds `observabilityWidgetApp`, which renders a dashboard widget in a
sandboxed iframe. The app reads metrics through the server’s app-only
`queryObservability` tool and follows the host theme.
- Adds host integration for widget pinning. `observabilityWidgetPins`
provides pinned IDs to the matching app and forwards valid pin and unpin
updates to host callbacks.
- Extends `McpAppViewer` and the chat tool result flow to pass host
context and receive structured model-context updates.
- Exports `emptyAnswer` from playground-ui’s dashboard domain so callers
can represent requests that need no data.
- Adds an `examples/agent` setup with an observability MCP server, read
tool, agent, and preset widgets.
- Adds tests and documentation for widget rendering, data reads, host
context, and pinning.
**Change size:** 35 files changed; 1,501 lines added and 12 removed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
`@mastra/mcp-apps-components` had grown its own layer on top of the [MCP
Apps spec](https://github.com/modelcontextprotocol/ext-apps). The
dashboard app read its data through a generic tool that ran the
observability routes in-process, which required a Mastra instance and
`@mastra/server`. Widget pinning depended on custom host-context keys,
which only Studio understood, wired in through an `McpAppHostProvider`
in `@mastra/playground-ui`. Every new app would have had to learn this
layer, and none of it is part of the spec.
This PR restarts the package on the spec alone, with a small app that
uses every path an app needs:
- **`greetingApp`** (package root) is a React app built into one
self-contained HTML page. It reads its tool's arguments from
`ui/notifications/tool-input` and gets its data by calling an app-only
server tool (`visibility: ['app']`) with `callServerTool`. A button
posts a reply to the conversation with `ui/message`. That's everything
it does.
- **The host writes both tools as regular Mastra tools**: the one the
model calls to open the app, and the app-only one that returns the data.
Data access and auth stay on the server, so the iframe needs no network
access and can't see a token. The package has no peer dependencies
anymore.
- **Removed:** the dashboard app (`./dashboard-renderer`,
`./observability-tools`), widget pinning, the `./host` entry, and
`McpAppHostProvider` together with the `onModelContext` and
`hostContext` props of `McpAppViewer`. MCP Apps in Studio work as they
did before the provider was added.
- `examples/agent` replaces the dashboard agent with a greeting agent.
Its `getGreeting` tool calls a real remote API on the server side. The
README, the MCP docs page and the changeset are updated.
Before:
```ts
import { dashboardRendererApp } from '@mastra/mcp-apps-components/dashboard-renderer';
import { observabilityAppTools } from '@mastra/mcp-apps-components/observability-tools';
new MCPServer({
appResources: { 'ui://mastra/dashboard': dashboardRendererApp() },
tools: { showDashboard, ...observabilityAppTools },
});
```
After:
```ts
import { greetingApp } from '@mastra/mcp-apps-components';
new MCPServer({
appResources: { 'ui://mastra/greeting': greetingApp },
tools: { showGreeting, getGreeting }, // getGreeting: mcp._meta.ui.visibility = ['app']
});
```
The package is still in alpha, so the dashboard changesets that were
never released are dropped instead of being reverted.
## Test plan
- `@mastra/mcp-apps-components`: build, typecheck, lint, tests.
- A real `MCPServer` serves the built page over Streamable HTTP. The
test checks that the page is a single self-contained document.
- The app is rendered against a real `AppBridge` relaying to that
server. The tests check that the app greets the name from the tool input
with the server's answer, posts the reply message, and shows the tool's
error.
- `@mastra/playground-ui`: typecheck and the `mcps`/`chat` tests (699
passing).
- Manual check in Studio (`examples/agent`): "Greet Ada" opens the app,
the app shows the greeting it got from `getGreeting`, and **Say hi
back** posts "Ada says hi back!" to the chat, which the agent answers.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR replaces the package’s dashboard app with a small greeting app.
The app gets a name, asks the server for a greeting, and lets the user
send a reply.
## Summary
- Export `greetingApp` and `McpAppResource` from the package root. The
app reads the opening tool’s input, calls an app-only server tool, and
can send a message to the conversation.
- Remove the dashboard renderer, its data and pinning tools, the host
entry point, and the package’s custom app runtime. The package now has a
single root export and no peer dependencies.
- Replace the example dashboard agent and server with a greeting agent
and MCP server. Update the README, MCP documentation, and changesets.
- Remove Playground’s MCP App host provider and the `hostContext` and
`onModelContext` viewer props. The viewer still supports model-context
updates through `onUpdateModelContext`.
## Validation
The supplied PR objectives report package build, typecheck, lint, and
test checks, plus Playground typecheck and `mcps`/`chat` tests with 699
passing. They also report a manual Studio check. These results are not
independently verified here. Current-head check results: not available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
The dashboard MCP App used to need 11 route-specific tools
(`observabilityAppTools`) registered next to it, and their route list
was defined in the UI package. If you forgot them, the iframe loaded and
every widget failed with a generic error after a few retries.
This replaces them with a single app-only tool, `dashboardDataTool`,
which ships from the same entry point as the app:
```ts
import { dashboardDataTool, dashboardRendererApp } from '@mastra/mcp-apps-components/dashboard-renderer';
new MCPServer({
// ...
appResources: { 'ui://mastra/dashboard': dashboardRendererApp() },
tools: { showDashboard, dashboardDataTool },
});
```
Inside the iframe, each `MastraClient` read (for example
`getMetricAggregate`) becomes a call to that tool with a named
operation. The tool only answers the operations in
`DASHBOARD_DATA_OPERATIONS`, and it runs the matching observability
route in-process with `invokeRoute()` as the signed-in caller, so the
route's own validation, auth, RBAC and FGA checks still apply. Hosts
that want to answer reads themselves can use the exported contract
(`DASHBOARD_DATA_TOOL_NAME`, `DASHBOARD_DATA_OPERATIONS`,
`DASHBOARD_DATA_REQUESTS`, and the input and output schemas).
Widget errors are clearer now too. A missing tool answers 404 with how
to register it, and tool errors answer 400 with the route's message
instead of a serialized `MastraError`. `MastraClient` no longer retries
either one.
The `/observability-tools` entry point is removed, which breaks
compatibility for the alpha (the minor changeset shows the
before/after). This replaces #29449. #29456 will need a rebase onto
this, since `observability-fetch.ts` is gone.
Tested with the package's typecheck, lint and build, and 42 tests,
including integration tests that run a real Mastra server with auth/RBAC
over MCP HTTP, through `AppBridge` and `MastraClient` (allowed read,
403, missing tool, validation errors, no retries).
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
The dashboard needs data to show charts and scores. This change gives it
one tool to request that data, while the server applies its existing
checks.
## Summary
- Replaces 11 observability tools with `dashboardDataTool`, which hosts
register alongside `dashboardRendererApp`.
- Defines 11 supported operations and exports the tool name, operation
list, request map, and input and output schemas from
`@mastra/mcp-apps-components/dashboard-renderer`.
- Runs supported requests through `invokeRoute()` with the caller’s
request context, so route validation and access checks apply. The tool
is visible to the app, not the model.
- Adds a fetch adapter that sends dashboard reads through the host’s MCP
connection. It identifies missing tools by JSON-RPC invalid-params code
`-32602`, returns registration guidance, and maps tool errors to HTTP
responses.
- Updates Studio to return JSON-RPC invalid-params errors for
unavailable or model-only tools.
- Removes the `@mastra/mcp-apps-components/observability-tools` package
entry point, breaking alpha compatibility.
## Validation
The PR objectives report that package typecheck, lint, build, and 42
tests passed. These results were not independently verified.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
The dashboard agent in `examples/agent` connects to its own MCP server
over HTTP, but the URL was hardcoded to `localhost:4111`. If something
else already holds 4111 (another example, another worktree), `mastra
dev` moves to 4112+, the client hits the wrong server and gets a 404,
and the agent ends up with no `showObservabilityDashboard` tool, so
Studio never renders the dashboard MCP app.
Before:
```ts
const MASTRA_SERVER_URL = process.env.MASTRA_BASE_URL ?? 'http://localhost:4111';
```
After (`mastra dev` passes the port it bound as `PORT`):
```ts
const MASTRA_SERVER_URL = process.env.MASTRA_BASE_URL ?? `http://localhost:${process.env.PORT ?? 4111}`;
```
Tested by running `pnpm mastra dev` while 4111 was taken. The server
fell back to 4112, the agent picked up the dashboard tool, and the chart
rendered in Studio chat.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
The dashboard agent needs to connect to the same server that `mastra
dev` starts. It now uses the server’s selected port, so the agent can
find the dashboard tool even when port 4111 is already in use.
## Changes
- `MASTRA_SERVER_URL` uses `MASTRA_BASE_URL` when set.
- Otherwise, it uses `PORT`, with port 4111 as the fallback.
- Updated the comment to explain that `mastra dev` passes its selected
port through `PORT`.
## Testing
The supplied context reports a manual check with port 4111 occupied. No
automated tests were added.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
This adds `@mastra/mcp-apps-components`, a package of prebuilt MCP Apps
you can serve from any `MCPServer`, plus the server and client changes
they need to read data safely as the signed-in user. Each app has its
own entry point (no root barrel). The first one is a dashboard renderer:
a tool returns a dashboard definition and the host renders it as live
observability charts.
```ts
import { MCPServer } from '@mastra/mcp';
import { dashboardRendererApp } from '@mastra/mcp-apps-components/dashboard-renderer';
import { observabilityAppTools } from '@mastra/mcp-apps-components/observability-tools';
new MCPServer({
id: 'dashboard-mcp-server',
name: 'Dashboard MCP Server',
version: '1.0.0',
appResources: { 'ui://mastra/dashboard': dashboardRendererApp() },
tools: { showObservabilityDashboard, ...observabilityAppTools },
});
```
## How it works
**The app.** A single self-contained HTML page, inlined into the
package's JS so it survives deployer bundling (Vercel, Netlify,
Cloudflare) with no file reads at runtime. Its iframe never reaches the
network: it reads data with `callServerTool` over the host's existing
MCP connection, so no CSP or `baseUrl` setup is needed. It follows the
host's light/dark theme. Drilldowns continue the conversation when the
host supports `ui/message`; on hosts that also support
`ui/update-model-context`, the app passes the exact filters as
structured context and posts a short prompt, otherwise it spells the
filters out in the message.
**Typed observability tools.** `observabilityAppTools` is 11 app-only
tools, one per read-only observability route the dashboard uses
(trace/span/metric/score aggregates, breakdowns, time series,
percentiles, and score listing). Each takes the route's own input schema
and runs the route in-process through the new `invokeRoute()`.
**`invokeRoute()` (`@mastra/server/server-adapter`).** Runs a JSON
server route in-process as the caller, with the same validation, RBAC
permission and FGA checks its HTTP endpoint applies on every adapter,
and returns `{ status, body }`. It does not re-authenticate: when auth
is configured, the request context must carry the user Mastra server
auth resolved, or the call gets a 401. Non-JSON routes throw, and
HTTP-only handler params (`request`, `registeredTools`, `taskStore`,
`routePrefix`) are not supplied.
**Caller identity in MCP tools.** MCP tools served over HTTP now see the
caller Mastra server auth resolved (user, permissions, roles, resource,
organization) in their `requestContext`, on Hono, Express, Fastify, Koa,
Elysia and NestJS. The server attaches it to the MCP request under a
symbol key, so it can only come from the server, never from
client-supplied auth claims.
**Hiding app-only tools.** `MCPClient.listTools()`/`listToolsets()` hide
tools marked `_meta.ui.visibility: ['app']` from agents.
**Studio host.** Studio advertises the host capabilities it handles
(tool calls, messages, model context), passes its theme, routes app tool
calls to the requested tool in the MCP tool playground, and refuses app
calls to model-only tools. App model context is added to the next user
message only, as a clearly delimited block of untrusted app data, never
as system instructions.
## Try it
`examples/agent` has a `dashboard-agent`. In Studio, try "Show me agent
runs over the last 7 days as a line chart".
## Docs
- New reference page for `invokeRoute()`.
- New "Use prebuilt Mastra apps" section in the MCP connections guide.
## Testing
- `invokeRoute` unit tests (auth, permission, validation, handler
errors, non-JSON routes).
- Shared MCP transport suite case, run on every adapter, checking tools
see the server-resolved user and permissions and unauthenticated calls
get 401.
- `observability-tools` tests through a real Hono server with auth and
RBAC: MCP calls, Studio relay, permission denial, invalid input, and a
bundled-consumer test for the inlined HTML.
- Playground and playground-ui tests for the app viewer and model
context handling.
- Manual Studio run: dashboard renders live data and drilldown sends the
context block with the next message.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR adds ready-made MCP apps, including a dashboard that shows
observability data. It also lets Studio display these apps and pass
their context to chat as untrusted user content.
## What changed
- Added `@mastra/mcp-apps-components` with a dashboard renderer and
app-only observability tools. The tools invoke server routes in-process
and use the routes’ validation and authorization checks.
- Added `invokeRoute()` for in-process execution of eligible JSON
routes.
- Updated MCP server adapters to pass trusted, server-resolved caller
identity to MCP tools. MCP client discovery filters app-only tools from
agent-facing listings.
- Updated Studio and the playground to render MCP apps, relay app tool
calls, provide host capabilities, restrict tool calls and links, and
attach app context to the next chat message.
- Added a dashboard agent example and documentation for MCP Apps and
`invokeRoute()`.
## Validation
The author reports tests for route invocation, observability tools, MCP
transports across all six adapters, and playground app and chat
behavior. The author also reports a manual Studio check. These results
were not independently verified.
The author reports that the npm reservation for
`@mastra/mcp-apps-components` remained open and required an npm
organization admin before merge.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Adds opt-in Editor ownership for static model fallback lists on
code-defined agents.
```ts
new Agent({
id: 'support-agent',
model: [
{ id: 'primary', model: 'openai/gpt-5.4-mini' },
{ id: 'fallback', model: 'anthropic/claude-sonnet-4-5' },
],
editor: { model: true },
})
```
Studio can reorder models, change provider/model selections, and enable
or disable entries. These changes follow the configured Editor
persistence workflow:
- Database-backed Editor storage creates versioned drafts that can be
published.
- Code-backed Editor storage saves overrides to the filesystem or
through the configured pull-request workflow.
Persisted entries include their order, provider, model ID, enabled
state, and `maxRetries`. Immutable model IDs reconnect stored values to
code-defined entries while preserving non-serializable code
configuration.
Function-valued model configurations remain code-owned and read-only in
Studio.
This also adds storage support, model-list persistence through the
existing server mutation routes, generated client types, regression
coverage, documentation, and a changeset.
Closes#27089.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This lets teams edit and save an agent’s model fallback list in Studio
without changing code. The feature is opt-in, so existing agents keep
their current behavior by default.
## Summary
- Added `editor: { model: true }` support for code-defined agents.
- Added persistent `modelList` storage with entry IDs, provider, model
ID, enabled state, and `maxRetries`.
- Applied stored overrides by matching immutable entry IDs while
preserving code-owned configuration.
- Persisted reorder and update actions through Editor drafts and
publishing workflows.
- Added filesystem, LibSQL, server route, export, versioning, and client
cache support.
- Kept function-valued model configurations code-owned and read-only in
Studio.
- Updated ownership logic, API schemas, client behavior, and
documentation.
- Added regression coverage for runtime overrides, persistence, exports,
ownership, draft activation, storage compatibility, and query
invalidation.
- Added changesets for the affected packages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
## Vanta 2026-10-30 security fixes (consolidated)
Direct dependency bumps and lockfile updates only. **No
overrides/resolutions added or raised.** The earlier override-based
edits on this branch were reverted; those findings are deferred below.
| Package | From → To | Advisory | Where |
|---|---|---|---|
| zod | ^3.25.76 → ^4.6.7 | zod <4.6.6 (High; no fixed 3.x) |
`client-sdks/react` (dev), `deployers/cloudflare` (dev),
`server-adapters/nestjs` (dev), `packages/editor` (dev),
`packages/playground-ui` (dep), `packages/playground`,
`workflows/_test-utils`, `examples/{durable-agents,inngest}`,
`explorations/longmemeval`,
`observability/_examples/otel-bridge/agent-hub`, e2e fixtures/templates
(`experiment-worker/fixtures/*`, `deployers/template/cloudflare`,
`no-bundling/template`, agent-builder `minimal-mastra-project`) + root
`pnpm-lock.yaml` |
| @hono/node-server | 1.19.x / 2.1.1 → 2.1.5 | CVE-2026-118663 /
GHSA-rmxm-3fg6-px4f (Medium) | direct deps: `examples/agent-builder`,
`otel-bridge/hono-multi/service-{one,two,mastra}`,
`templates/template-customer-refund-agent/client-demo-ui`,
`templates/template-kyc-customer-onboarding`,
`templates/template-security-incident-triage` |
Peer ranges (`^3.25.0 || ^4.0.0`) are unchanged, so consumers are
unaffected. Changeset: patch for `@mastra/playground-ui` (runtime zod
dep).
Supersedes the zod parts of #28075 (that PR also raises a pnpm override
and rewrites the `zod-v3` compat aliases to v4, so it is left as-is for
maintainers).
### Deferred (needs override, upstream release, or is intentional)
- zod v3 compat aliases (`zod-v3` in `packages/core`,
`packages/schema-compat`, `e2e-tests/type-check/template`;
`e2e-tests/client-js/zod-v3`): intentional zod 3 test coverage; no fixed
3.x release. Needs a decision to drop/dismiss.
- zod 3.25.76 transitive via `@arcadeai/arcadejs`, `@mcp-ui/client`,
firecrawl, `agent-browser`, `zod-to-json-schema`, MCP SDK paths:
upstream pins; override-only.
- @hono/node-server 1.19.x transitive via `@modelcontextprotocol/sdk`
(root, `examples/agent`, `packages/mcp/integration-tests`), and npm
lockfiles of `scripts/gh-issue-triage` (existing override, left alone)
and the two templates: override-only.
- graphql-scalars, raw-body, jose (templates/scripts): override-only.
- @azure/msal-node <7.1.0: 6.0.1 via `@azure/identity@4.14.0` (fixed in
4.14.1, blocked by the 1-day `minimumReleaseAge`; lockfile refresh
tomorrow), 5.6.0 via `@microsoft/teams.apps` (no fixed release).
- @opentelemetry/core <2.8.0: via `@google-cloud/pubsub@5` (fix needs
pubsub 6 major).
- @ai-sdk/provider-utils 2.2.8 / ai 4.x: pinned vendored AI SDK v4 line;
no fixed release in that major.
- extract-zip, deepmerge: no patched version.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR updates Zod and `@hono/node-server` versions in selected
packages, examples, and templates to address security advisories. It
also updates playground form code to work with Zod 4.
## Changes
- Updates selected `zod` dependencies to `^4.6.7`.
- Updates selected `@hono/node-server` dependencies to `2.1.5`.
- Updates the playground form’s IP address and record validators for Zod
4.
- Maps a specific Zod validation error to the message `Required`.
- Adds a patch changeset for `@mastra/playground-ui`.
## Validation
Test results are not provided in the supplied change summary.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: shreyas-mastra <327047572+shreyas-mastra@users.noreply.github.com>
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>
The span details panel in Studio traces used to show raw input and
output first, so you had to dig through JSON to understand what a span
actually did. This reworks it so each span tells you up front.
Each nested span now opens with a one-sentence summary naming who did
what, e.g. "gpt-5-mini called weatherInfo, then wrote the answer",
"Observational Memory loaded 2 earlier messages from memory into the
conversation" or "Moderation left the system prompt and the conversation
unchanged", tinted by outcome. Memory, workspace, skill and processor
spans show exactly which messages they added or removed right inside
that summary (including processors that edit the system prompt directly,
which we now diff). Model spans list the tool calls they made in the
summary, each opening on its input and result with the same rows as the
chat. The root span skips the summary unless the run failed or was
stopped, since its input and output already say it all.
Every span now reads in the same order: changes, input, output, then
error, tools, metadata and attributes. Metadata and attributes are
folded by default as raw JSON. JSON views are no longer clipped behind
an Expand button and instead open with top-level values folded; outputs
with nothing to preview (like a step that only called tools) go straight
to JSON. Section actions (Preview, JSON, copy) appear on hover or focus.
Also adds `examples/agent/src/seed-history-traces.ts`, which clones
recorded traces across the last 60 days with realistic volume and some
failures, to populate the trace explorer and metrics locally.
Tested with Vitest + MSW (traces and chat suites pass), typecheck and
lint, and manually against real traces in Studio.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
The trace details panel now explains what each part of a run did, what
changed, and which tools were called. A new script can add sample trace
history from the past 60 days to local data.
## What changed
- Added outcome summaries for model, tool, agent, processor, and
streamed-output spans. Root spans show a summary only when a run fails
or stops.
- Added processor change details, including message mutations and
system-prompt changes. Processor facts, such as phase and tripwire
information, appear as labeled values.
- Separated model tool calls from the tools offered to the model. Tool
calls show their inputs and results in a read-only view.
- Updated span panels to show sections in this order: changes, input,
output, error, tools, metadata, and attributes. Metadata and attributes
open as folded JSON. JSON views fold top-level values.
- Added `examples/agent/src/seed-history-traces.ts` to clone trace data
with new IDs and shifted timestamps, then seed spans, metrics, scores,
and logs into DuckDB. The script defaults to 900 runs over 60 days and
adds a higher failure rate during a simulated incident window.
- Added and updated tests for outcome summaries, processor changes,
payload rendering, and tool-call display.
- Updated the Storybook build script to build `@mastra/ai-sdk` before
building Storybook.
## Validation
The PR objectives report passing Vitest and MSW trace and chat suites,
typecheck, lint, and manual checks against real Studio traces. These
results are author-reported; no test execution results were supplied.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
## Update 2026-10-26 afternoon (Vanta pass)
Added commit `f6e4b670` on top of the 16:20 ET main merge:
- **esbuild 0.18.20 → 0.25.12** (GHSA-67mh-4wv8-2f99) and **bundle-name
3.0.0 → 4.1.1** (AIKIDO-2026-886499): the 12:43 ET merge of main dropped
the two `pnpm-workspace.yaml` entries this PR added on 10-23
(`'@esbuild-kit/core-utils>esbuild': 0.25.12` and
`'default-browser@4.0.0>bundle-name': 4.1.1`), so both old versions were
back in `pnpm-lock.yaml`. This commit puts them back exactly as before.
No other overrides changed.
- Added the empty changeset
`.changeset/vanta-2026-10-26-afternoon-overrides.md`.
- `pnpm install --frozen-lockfile --lockfile-only` passes.
After this, `osv-scanner` on all 34 lockfiles finds only the documented
leftovers: zod 3.25.76, ai 4.3.19 / `@ai-sdk/provider-utils` 2.2.8 (the
v4 line), extract-zip 2.0.1 (no patch), `@opentelemetry/core` 1.30.1,
and `@azure/msal-node` 5.6.0 / 6.0.1.
---
## Update 2026-10-26 (Vanta pass)
Merged `origin/main` (no conflicts) and added commits `9b169f0f` and
`94e183ff`:
| Package | From → To | Finding | Where | How |
|---|---|---|---|---|
| body-parser | 2.3.0 → 2.4.0 | CVE-2026-111181 / GHSA-27r3-jxmh-p828
(High) | root `pnpm-lock.yaml`, `examples/agent`, refund and genui
templates (npm) | Raised the root floor `body-parser@<2.3.0: 2.3.0` →
`<2.4.0: 2.4.0`. Added a floor in `examples/agent`. `npm update` in the
templates. `patches/body-parser@2.3.0.patch` renamed to `@2.4.0` (same
one-line raw-body interop; it applies cleanly). |
| body-parser | 1.20.6 → 1.20.9 | same advisory, 1.x line | all 10
`e2e-tests/*` lockfiles (verdaccio → express 4) | New floor
`body-parser@<1.20.9: 1.20.9`. The `patches/body-parser@1.20.6.patch`
files are renamed to `@1.20.9` (they apply cleanly). |
| fast-uri | 3.1.8 → 3.1.9 | CVE-2026-110095/-110180/-110306/-110725 |
root, e2e-tests ×10, `examples/agent`, otel-bridge `agent-hub`,
`acp-validator`, `gh-issue-triage`, refund and genui templates | Raised
the existing floors/pins from 3.1.8 to 3.1.9 |
| fast-uri | 4.2.1 → 4.2.3 | GHSA-333x-w4r6-6crp, GHSA-w74x-v6f9-j3xg,
GHSA-wjr9-j795-jxcr, GHSA-xhq7-xmqj-769h | otel-bridge `agent-hub` |
Raised the existing floor `fast-uri@>=4.0.0 <4.1.5: 4.2.1` → `<4.2.3:
4.2.3` |
| multer | 2.4.0 → 2.5.0 | CVE-2026-113872 / GHSA-q7qp-rjg7-q26m (High)
| root | Floor `multer@<2.3.0: 2.4.0` → `multer@<2.5.0: 2.5.0` |
| serialize-javascript | 7.1.2 → 7.1.4 | CVE-2026-115897 /
GHSA-m5mm-p8h7-m29v | root | Floor `<7.0.5: ^7.0.5` → `<7.1.3: ^7.1.3` |
| zod | 4.3.6 / 4.4.3 / 4.5.4 → 4.6.7 | CVE-2023-54404 /
GHSA-mrhx-c7xc-m3w5 (High) | exact pins in
`templates/template-kyc-customer-onboarding`,
`templates/template-security-incident-triage`,
`packages/mcp/integration-tests/{v2,published-v1}`,
`e2e-tests/commonjs/template` | Direct pin bump (same major) |
| fastify | `^5.12.5` → `^5.12.6` | CVE-2026-107832 | devDependency
specifiers in `server-adapters/fastify` and `workflows/inngest` (the
lock already had 5.12.6) | Specifier bump |
- Every new version is older than 24h: body-parser 2.4.0 and 1.20.9
(10-22), multer 2.5.0 (10-22), serialize-javascript 7.1.4 (10-23),
fast-uri 3.1.9 (10-19), fast-uri 4.2.3 (10-19), qs 6.16.1 (10-14, pulled
in by body-parser 2.4.0), zod 4.6.7 (10-12).
- No overrides or floors were removed; the existing ones were only
raised.
- `pnpm install --frozen-lockfile --lockfile-only` passes at the root
and in the nested e2e/example workspaces.
- Added the empty changesets
`.changeset/vanta-2026-10-26-security-floors.md` and
`.changeset/vanta-2026-10-26-fast-uri-4.md`.
- **Not changed:**
- zod 3.25.76: the fix exists only on zod 4, and the zod-v3 support and
compat tests intentionally stay on 3.
- `@azure/msal-node` 5.6.0: the fix is 7.1.0, but `@azure/identity` 4.14
pins `^6` and `@microsoft/teams.apps` 2.1.1 pins `^5.6.0`, so this would
be a two-major runtime jump.
- extract-zip 2.0.1: no patched release (the advisory lists `>=2.0.2`,
which has not been published).
- `@opentelemetry/core` 1.x: needs pubsub 6 / spanner 9, which are
majors.
- ai v4 / provider-utils: the v4 line is vendored on purpose.
---
Refs mastra-ai/platform#2931
Vanta remediation, 2026-10-23 (follow-up to #28138, which has merged).
| Package | From → To | Finding | Where | How |
|---|---|---|---|---|
| storybook, @storybook/react-vite (+ react, builder-vite, csf-plugin,
react-dom-shim) | 9.1.20 → 9.1.21 | CVE-2026-114125 (Critical),
CVE-2026-114126 (High) | `client-sdks/react` devDependencies | Direct
bump `^9.1.20` → `^9.1.21` |
| esbuild | 0.18.20 → 0.25.12 | GHSA-67mh-4wv8-2f99 | better-auth →
drizzle-kit 0.31.10 → @esbuild-kit/esm-loader → @esbuild-kit/core-utils
(pins `~0.18.20`) | Override `'@esbuild-kit/core-utils>esbuild':
0.25.12` |
| bundle-name | 3.0.0 → 4.1.1 | AIKIDO-2026-886499 | @mastra/deepeval →
deepeval → open@9 → default-browser@4 (pins `^3`) | Override
`'default-browser@4.0.0>bundle-name': 4.1.1` |
### Why there is a `trustPolicyExclude` for storybook 9.1.21
`client-sdks/react` stays on the storybook 9 line; we are not doing the
storybook 10 major here. The only patched 9.x release is 9.1.21. It was
published on 2026-10-12 without the trusted-publisher evidence that
earlier 9.1.x releases had, so `trustPolicy: no-downgrade` fails with
`ERR_PNPM_TRUST_DOWNGRADE`. The exclude covers exactly the six packages
pnpm rejects, each pinned to `@9.1.21`: `@storybook/react-vite`,
`storybook`, `@storybook/react`, `@storybook/builder-vite`,
`@storybook/csf-plugin` and `@storybook/react-dom-shim`. No other
versions or packages are excluded. The packages come from the official
storybook monorepo release, 9.1.21 on the v9 line.
### Notes
- Every new version is older than 24h, so it satisfies
`minimumReleaseAge: 1440`. storybook 9.1.21 is 11 days old, esbuild
0.25.12 is from Nov 2025 and bundle-name 4.1.1 is from 2026-09-25.
- The esbuild override is dev-only: drizzle-kit is a CLI pulled in by
better-auth. I checked that `@esbuild-kit/core-utils` `transform()`
works against esbuild 0.25.12.
- bundle-name 4.x keeps the same `bundleName()` API. It is used only by
`open`'s macOS default-browser lookup.
- `pnpm build-storybook` in `client-sdks/react` fails on main too. The
error is a Babel 8 `loadPartialConfig` error, which happens with 9.1.20
as well, so it is not caused by this PR.
- I ran `pnpm install --frozen-lockfile` and it passes. The changeset is
empty because no published package changes.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR updates dependency versions and rules that keep older,
reported-vulnerable versions out of the project. It also updates
Storybook and records the changes in changesets.
## Summary
- Raises security-related dependency versions or minimums across the
root project, examples, templates, packages, and e2e workspaces. The
updates include `body-parser`, `fast-uri`, `multer`,
`serialize-javascript`, `zod`, and Fastify.
- Renames `body-parser` patch files and updates workspace references to
match the new versions.
- Updates Storybook packages in `client-sdks/react` from 9.1.20 to
9.1.21. Adds an `esbuild` override and updates the `bundle-name`
override.
- Adds changesets for the dependency updates. No tests were added.
## Validation
The author reports that frozen-lockfile installs pass at the root and in
nested e2e and example workspaces. The author also reports that `pnpm
build-storybook` fails on `main` as well as this branch, with a Babel 8
`loadPartialConfig` error.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
Auto-refresh in the traces explorer reloaded page 0 every 10 s. That
reset the keyset cursor chain, so pages you'd scrolled to were dropped
on every tick.
When the server reports the `deltaPolling` capability, the explorer now
polls `queryTraces({ mode: 'delta' })` and merges new or updated traces
into the list it already has. Loaded pages and scroll position survive
refreshes, and the infinite query only paginates. Without the
capability, nothing changes.
In `@mastra/react` this adds `useTraceQueryLatest`, which you render
next to `useTraceQuery` with the same `query` and `limit`:
```tsx
const { enabled: live } = useTraceQueryDeltaPollingAvailable();
const list = useTraceQuery({ query, limit });
useTraceQueryLatest({ query, limit, enabled: live, refetchInterval: 10_000 });
```
It bootstraps a cursor, drains `hasMore` in one poll, re-bootstraps on
409, and stops polling on 4xx/501. Merges keep the server's keyset order
and upsert by `traceId`. A trace that sorts past the last loaded row is
left to pagination while more pages remain. The cursor key leaves out
`orderBy`, so re-sorting keeps the cursor. `mergeTraceQueryDelta` and
`traceQueryKey` are exported too.
In the playground, delta polls need the exact same time range on every
poll. So a rolling window reaches 24 h ahead, and re-anchors when
filters or dates change. A tab left open past that horizon with no
filter change stops picking up new traces until a refresh.
Known gap: the cursor bootstrap runs in parallel with the first page, so
a trace that completes in the few milliseconds between the two can be
missed until a manual refresh. Bootstrapping before the first page would
close it; happy to do that here or in a follow-up.
## Related issue(s)
None yet.
## Type of change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update
## Checklist
- [ ] I have linked the related issue(s) in the description above
- [ ] I have made corresponding changes to the documentation (if
applicable)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have addressed all Coderabbit comments on this PR
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
The traces list can now show new or changed traces without reloading
everything. It keeps loaded pages, pagination, and scroll position.
## What changed
- Added delta polling to `@mastra/react`.
- Added `useTraceQueryLatest`, `useTraceQueryDeltaPollingAvailable`,
`traceQueryKey`, and `mergeTraceQueryDelta`.
- Added cursor bootstrapping, batch draining, 409 recovery, retry
handling, and permanent-error handling.
- Updated the playground traces explorer to use delta polling when
supported.
- Preserved full-list refresh behavior when delta polling is
unavailable.
- Added stable time anchors for rolling and fixed trace filters.
- Set delta polling to 30 seconds.
- Re-sorted updated traces when their sort value changes.
- Added tests for capabilities, merging, polling, pagination, filtering,
sorting, and fallback behavior.
- Added a trace-seeding example and updated test fixtures.
## Known limitations
- A trace can be missed if it completes between cursor bootstrapping and
the first page request. A manual refresh is required.
- Rolling delta polling can stop finding new traces after the 24-hour
horizon. Refresh the tab to reset the window.
## Validation
Tests were added, but no test command or result was provided.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Fixes#27278
## Summary
This closes out MCP Events support
([SEP-3415](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/3415),
a draft extension) in `@mastra/mcp`. It adds no runtime code. It proves
the client and server work together, gives users a runnable example, and
adds a guide.
- **Interop tests** (`packages/mcp/src/__tests__/events-interop/`): a
real `MCPClient` against a real `MCPServer` over stdio and Streamable
HTTP, running the same scenarios on both transports:
- discovery;
- push routing across two concurrent subscriptions;
- poll from the emit buffer;
- poll from a `poll()` source;
- argument, unknown-event and forced-mode errors (asserting the wrapped
`cause.id`);
- cursor resume for all three sources (no missed or duplicate
occurrences);
- `reconnectServer()` during a push subscription;
- a server without events, which rejects with `MCP_EVENTS_NOT_SUPPORTED`
and receives no `events/*` request. Over stdio this is proven by
recording stdin, with a positive control. Over HTTP it is proven by
recording request bodies. Neither needs a source change.
Occurrences are always caused after the subscription is established (by
a tool call or a direct emit), never by a timer.
- **Webhook interop tests** (`webhook-interop.test.ts`): a real client
against a real server over authenticated Streamable HTTP, with a local
receiver that mounts `mcp.events.handleWebhook()`. The URL policy is
relaxed in the test fixture only. Covered:
- mode selection (webhook preferred when configured, push otherwise);
- routing and `match` filtering for two subscriptions sharing one URL;
- cursor resume after the unsubscribe lands, and a resubscribe while
it's in flight;
- refresh before expiry, with `deliveryStatus`;
- forced-mode, missing-config and unauthenticated errors;
- same-argument subscriptions sharing one server subscription: both
receive, cancelling one leaves the other receiving, and only the last
cancel unsubscribes;
- fallback to `push` with `MCP_EVENTS_WEBHOOK_UNAVAILABLE` over stdio
and unauthenticated HTTP when no mode is forced. Forced `webhook` still
rejects.
- **Example** (`examples/mcp-events/`): a stdio server emits
`ticket.created` from a tool. The client subscribes with `{ project:
'web' }`, opens tickets, and runs a triage agent once per matching
occurrence.
- **Guide** (`/docs/guides/mcp-events`, sidebar entry under Guides):
covers concepts, `emit()` vs. `poll` sources, subscribing, cursor
resume, error handling, webhook delivery, starting agent and workflow
runs per occurrence, and limits. The Events sections of the `MCPClient`
and `MCPServer` reference pages link to it.
- The guide links to `MCPEventsSignalProvider` at
`/reference/tools/mcp-client#events-in-agents-and-workflows-experimental`.
That anchor is added by #27330.
- Until #27330 merges (it merges before this PR), `pnpm build` warns
about it as a broken anchor. The build still passes.
No changeset: nothing published changes.
## Stack
Merge order: #27320 → #27326, #27324 → #27330 → #27333 → this PR.
- #27320: shared events wire contract
- #27326: client (`mcp.events.list` / `subscribe`, poll + push)
- #27324: server (`defineEvent`, `server.events.emit`, poll + push)
- #27333: webhook delivery (server and client)
- #27330: agent signals provider
This PR targets `daniel/27278-events-webhook` (#27333).
## Run the interop suite
`test:client` only globs `./src/client` and `test:server` only
`./src/server`, so neither runs this suite. Run it directly:
```bash
cd packages/mcp && pnpm vitest run --project unit:packages/mcp src/__tests__/events-interop
```
## Test plan
- `cd packages/mcp && pnpm vitest run --project unit:packages/mcp
src/__tests__/events-interop`: 34/34 passed (24 poll/push on both
transports, 10 webhook), 3 runs in a row. This suite isn't covered by
`test:client`, which only globs `./src/client`.
- Mutation checks:
- making `match` always true fails the push and buffer-poll tests;
- dropping the resume cursor fails all 6 resume cases.
- Webhook: making `match` always true fails the routing test. Dropping
the resume cursor fails the resume test. Dropping the short TTL/refresh
margin times out the refresh test.
- `pnpm --filter ./packages/mcp test:client`: 472 passed; `test:server`:
198 passed
- `pnpm --filter ./packages/mcp build:lib`, `npx tsc --noEmit -p
packages/mcp`, a typecheck of the test files, and oxlint + eslint on the
interop directory: all clean.
- Example: `pnpm install --ignore-workspace && pnpm typecheck` is clean.
A smoke run with a fake key reached the model call after listing,
subscribing and receiving.
- Docs: `format:check`, `lint:remark` and Vale on the guide are clean.
`pnpm build` succeeds; its only broken-anchor warnings are the existing
agent-controller ones and the #27330 anchor above. `pnpm validate` fails
only on stale `new` sidebar tags that were already there.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR shows that MCP Events work between clients and servers. It adds
tests, a runnable ticket example, and documentation for using the
feature.
## What changed
- Added interop tests for stdio and Streamable HTTP.
- Covered discovery, push and poll delivery, filtering, cursors,
reconnection, errors, and unsupported servers.
- Added authenticated webhook tests for routing, filtering, cursor
resume, refresh, shared subscriptions, and fallback behavior.
- Added an `mcp-events` example that connects ticket events to an agent.
- Added an MCP Events guide covering subscriptions, delivery modes,
authorization, cursors, buffering, limits, and agent or workflow runs.
- Linked the guide from the MCP client and server references.
- Added guidance for cursor persistence, buffer overflow, and `match`
versus `authorize`.
- Added an empty changeset because the PR does not require a package
release.
- Added no runtime implementation changes.
## Validation
- The author reports that the interop suite passed 34/34 tests in three
runs.
- The author reports clean package tests, type checks, linting, example
checks, and documentation checks.
- `pnpm validate` reportedly still fails on pre-existing stale `new`
sidebar tags.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
## 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 -->
Prepare the LiveKit 0.5.0 release with opt-in call recording and Studio
playback. `dispatchVoiceSession()` and `liveKitConnectionRoute()` can
create a fresh room with LiveKit auto egress before dispatching the
agent. The recording route resolves an authorized trace to a short-lived
playback URL, and Studio exposes it through **Review Audio**.
```ts
await dispatchVoiceSession({
roomName: `call-${crypto.randomUUID()}`,
metadata: { agentId: 'support' },
recording, // Server-side LiveKit output settings.
});
```
Recording review requires an explicit `authorize({ traceId, context })`
callback. Only `true` permits trace lookup and playback URL resolution;
missing policies fail at registration. Recording room conflicts return
HTTP 409. The example and documentation cover S3 configuration, scoped
permissions, consent, and recording lifecycle implications. Browser
recording creation and playback in the unauthenticated example require
an explicit local-demo opt-in and are disabled in production.
The browser-safe `@mastra/livekit/client` entry point provides
`getLiveKitRecording(client, traceId)`, preserving the client's
authentication and request configuration. Studio uses the supported
React hook subpaths from main.
The integration also adds common per-turn metrics, speech-flush
boundaries, and an `onSpeechComplete` hook. `onTurnComplete` retains its
generation-only behavior. Custom reply-generator consumers must handle
flush boundaries, and `MastraLLM` integrations should use
`mastraLLMNode`. Playback completion describes server delivery, not
proof that the listener heard the audio.
The VAD opt-out is fixed. LiveKit Agents 1.7.1 is the supported minimum
and migration target, with matching plugin peer ranges and upgrade
instructions. The planned stable release remains **0.5.0**.
### Validation
- All 280 LiveKit tests across 22 files passed.
- All 18 Studio voice and recording-review tests passed.
- A local synthetic probe passed 96 example route-policy cases covering
room creation, dispatch, unrecorded tokens, storage access, and denied
playback.
- LiveKit, React SDK, shared Studio UI, and production Studio builds
passed.
- LiveKit, Studio, and voice-agent example typechecks passed; focused
lint and documentation checks passed.
- Production bundle inspection confirmed that the recording client adds
no LiveKit server or worker modules to the browser bundle.
- Changeset planning retains the 0.5.0 release target.
The core working-memory configuration fix and its regression tests are
in #26090 for separate review.
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 -->
## Summary
Replaces the Studio workspace page (file browser grid + Skills tab +
separate skill detail page) with a single `WorkspaceTreeView` component
from `@mastra/playground-ui`.
**`WorkspaceTreeView` (playground-ui)**
- Lazily loaded folder tree (DS `Tree`) with nested folder creation,
delete, read-only paths, mount badges (provider icon, read-only lock,
error alert), and auto-expansion to the active file.
- Combined file + skill search (BM25/vector picked by the server).
- File viewer: Markdown (YAML frontmatter shown as a code block),
highlighted code, images, videos; overridable via `renderPreview`.
- Controlled `activeFilePath` / `onActiveFileChange`; optional
`addSkill` opens the skills.sh browser (dialog moved from playground).
- Error notices by cause (401/403/404/501), empty state with "New
folder" / "Add skill".
**Workspace page (playground)**
- One tree view instead of tabs; workspace selector moved to the header.
- Old skill URLs redirect to the skill's `SKILL.md` in the viewer.
- Page-level notices: `workspace.init()` required, and skills installed
in `.agents/skills` but not discovered.
- Update-all / remove skill wired through the tree.
- Removed the now-unused FileBrowser, SkillsTable, SkillDetail, search
panels and their hooks.
**Shared fixes**
- `PanelGroup` no longer animates from provisional sizes on first
render.
- `Tree.FolderContent` uses the fill animation so lazily loaded folders
don't jump.
## Known gaps vs main
- No tree sorting; `?path=` param not handled; large Markdown files with
many code blocks still block the main thread while Shiki highlights
(same as main).
## Test plan
- [x] `pnpm --filter ./packages/playground-ui` vitest: workspace, Tree,
resize (84 tests)
- [x] `pnpm --filter ./packages/playground` vitest: workspace domain +
page
- [x] typecheck + eslint clean in both packages
- [x] Manual in Studio against `examples/agent`: browse, open nested
file via URL, search, create/delete folder, install a skill from
skills.sh, notices (via intercepted responses), mobile/tablet/desktop
## Screenshots (Studio on :4111, `examples/agent`)
**Skill opened from URL** — parents auto-expanded, frontmatter shown as
YAML, "1 Skill" count

**Tree search** (files + skills)

**Filesystem-only workspace**

**Add skill dialog** (skills.sh, installed badge)

<details><summary>Tablet / mobile</summary>


</details>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
The workspace page now shows files and skills in one place. People can
browse folders, search for files and skills, and preview files without
switching between separate pages.
## What changed
- Replaced the workspace file browser and Skills tab with
`WorkspaceTreeView` from `@mastra/playground-ui`.
- Added lazy folder loading, nested folder creation and deletion,
read-only indicators, mount badges, combined file and skill search, and
Markdown, code, image, and video previews.
- Moved workspace selection to the page header. Added notices for
workspace initialization and installed skills that were not discovered.
- Redirected old skill URLs to the skill’s `SKILL.md` in the file
viewer.
- Gated write actions, deletion, and search on resolved permissions and
workspace read-only status.
- Added skills.sh registry methods to the client SDK for searching,
browsing, previewing, installing, removing, and updating skills.
- Removed the replaced file browser, search, skills-table, and
skill-detail UI and related hooks.
- Updated initial `PanelGroup` sizing and lazy folder-content animation.
- Added sample skills to the agent example workspace.
## Validation
The author reports 84 `playground-ui` tests and `playground`
workspace-domain and page tests. The author also reports typecheck and
ESLint checks for both packages, plus manual checks in `examples/agent`
on mobile, tablet, and desktop.
## Known gaps
- The tree does not support sorting.
- The page does not handle the `?path=` parameter.
- Large Markdown files with many code blocks can block the main thread
during Shiki highlighting.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
## Summary
- **System prompts as markdown:** in trace previews (`AGENT_RUN`,
`MODEL_STEP`, `MODEL_INFERENCE`, `MODEL_GENERATION` inputs), system
messages showed raw markdown (`#`, `**`, `-`). They now go through the
markdown renderer like other roles. The common indentation is removed
first, so indented prompts don't turn into code blocks.
- **Collapsible payload boxes:** every span Input/Output box, in both
Preview and JSON, collapses past 220px with a bottom fade. An
Expand/Collapse button sits in the section header. The fixed
`max-h-[30vh]` inner scroll on JSON blocks is removed.
- **Shared `CollapsibleBox` + `useCollapsibleBox`** (new DS component):
the box measures its content, clips it and fades the bottom. The hook
holds the state, so each consumer places its own expand button. `Plan`
(submit_plan card) and span payload sections both use it.
## Test plan
- [x] Tests for `CollapsibleBox` (fits, overflows, external toggle,
custom height), `Plan` and span payloads pass
- [x] Storybook story `Elements/CollapsibleBox` renders with the clipped
fade and the Expand button
- [x] `pnpm --filter ./packages/playground-ui typecheck` and lint
- [ ] Manual: open a trace of an agent with markdown instructions. In
Input › Preview, headings, bold and lists are formatted, and long boxes
collapse and expand in both Preview and JSON
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
The Playground now shows system prompts with readable Markdown
formatting. Long trace payloads start in a compact view, with a control
to expand or collapse them.
## Changes
- Dedent message text and render it as Markdown in trace previews.
- Add shared `CollapsibleBox` and `useCollapsibleBox` APIs. Use them for
span payloads and the `Plan` component.
- Collapse span input and output at 220px. Show a bottom fade and an
Expand/Collapse button when content is clipped or expanded.
- Remove the 30vh scroll limit from JSON payloads.
- Add tests for Markdown message rendering and collapsible content.
## Validation
The PR objectives report passing tests for `CollapsibleBox`, `Plan`, and
span payloads, the `Elements/CollapsibleBox` Storybook story, typecheck,
and lint. Manual verification is unchecked.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
The memory-evals approach table and linked example steer stored-dataset
runs toward an inline task, even though registered agents already get a
fresh thread per item and retry by default. Add the registered-agent
option and align the example README and script comments with that
behavior. Keep the inline-task example for explicitly selecting each
item’s thread and resource.
Addresses the [CodeRabbit finding on
#25092](https://github.com/mastra-ai/mastra/pull/25092#discussion_r4102227205),
which merged before the review fix was applied, and the [follow-up
example
finding](https://github.com/mastra-ai/mastra/pull/25105#discussion_r4103680933).
Checked the executor and existing memory tests for thread and retry
behavior, and verified the link to the memory-enabled targets section.
Focused formatting, Remark, and `git diff --check` pass.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
This update helps readers choose how memory works when they evaluate
agents with stored datasets. Registered agents use a new thread for each
item by default, while an inline task lets readers choose each item’s
thread.
## Summary
- Replaced the overview of memory-evaluation patterns with a link to
runnable examples and an approach table.
- Added a table entry for registered agents in stored-dataset
experiments, with a link to the memory-enabled targets documentation.
- Clarified that an inline task supports explicit thread selection for
each dataset item.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
https://github.com/user-attachments/assets/2a9dc6b6-b8c3-4dd7-b79b-b8de48dec4ff
## Summary
Before the first message, the agent chat page now reads as a landing
rather than an empty chat:
- **Greeting**: agent avatar (initial) above "What can **<agent name>**
do for you today?", with the name as the only high-contrast part.
- **Composer centered** under the greeting, and the **suggested prompts
as a plain list** below it (ghost buttons, no cards). Prompt cap bumped
3 → 6; the chef example agent ships 6.
- **Threads panel hidden** on `/new` when the agent has no threads yet;
it appears after the first message.
- **Landing-shaped skeleton** while the agent loads, so `/new` resolves
in place instead of jumping from a docked-chat skeleton.
- **Model picker skeleton** in the composer while providers load, so the
action row no longer collapses/flashes.
- **View transition** when leaving the landing after the first send: the
composer glides to the dock. Only fires for a send (chat running);
history loads on refresh / thread switch snap as before. Respects
`prefers-reduced-motion`.
## Test plan
- [x] `pnpm --filter ./packages/playground test` — new MSW coverage for
landing (panel hidden, greeting, skeleton gating), model-picker
skeleton, prompt stagger; typecheck + lint clean
- [x] Manually verified on `examples/agent` (chef agent) at 390 / 820 /
1440 px, reduced-motion, and the first-send transition
- [ ] Reviewer: refresh an existing thread and switch threads — composer
must not slide
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
The `/new` page now gives users a clearer starting point before their
first message. It shows an agent greeting, a message box, and suggested
questions, with the threads panel adjusted to the agent’s available
conversations.
## Changes
- Redesigned the empty-thread landing with a centered composer and up to
six suggested prompts in a vertical list.
- Updated threads panel behavior for agents with and without memory. For
agents with memory, the panel collapses on a threadless landing and
reopens when a thread exists.
- Added a landing-page loading skeleton and a composer skeleton while
model providers load.
- Added a first-send view transition and greeting and prompt animations.
Reduced-motion preferences disable these animations.
- Added and updated tests for landing states, suggested prompts, and the
loading model picker.
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>
## Summary
- Scrub **all** nested `pnpm-lock.yaml` files that still pinned
`proxy-addr@2.0.7` (e2e + examples), via nested `pnpm-workspace.yaml` /
`package.json` overrides + lock regenerate.
- Floor **`@fastify/proxy-addr@<=5.1.0 → 5.1.1`** (AIKIDO-2026-296561 /
CVE-2026-92395) in root + nested otel-bridge examples.
- Expand Vanta/Aikido floors (overrides allowed): `fast-uri` 3.1.8 /
4.2.1, `ip-address` 10.7.2, `compression` 1.8.2, `@fastify/busboy`
3.2.2, `@fastify/forwarded` 3.0.2, `systeminformation` 5.33.13,
`tinypool` 2.1.2, `axios` 1.20.0, `better-auth` ^1.6.26, `jose`
≥4.14→6.2.12, `ajv` 8.20.0, `hono` <4.13.8→4.13.8, `zod` 4.x→4.6.5.
## Dependabot expectation after merge
| Alert | Expectation |
|---|---|
| `extract-zip@2.0.1` (High ×2) | **Remain open** — no patched release
(`<=2.0.1`). Pulled by `@puppeteer/browsers`. Residual; dismiss with “no
patched release / transitive via puppeteer” or replace puppeteer browser
fetch path later. |
| `@ai-sdk/provider-utils` <3.0.28 (Low ×4) | **3.x/4.x/5.x lines
already floored**. Residual on **`2.2.8`** in `packages/_vendored/ai_v4`
+ AI SDK v4 consumers — bumping to 3.x breaks AI SDK v4 contract. Keep /
dismiss as risk-accepted until vendored AI SDK v4 is retired. |
## Residuals (mastra Aikido / intentional)
- **`zod@3.25.76`** — AIKIDO fixes are 4.x-only; zod-v3 e2e + AI SDK v4
peers still need 3.x.
- **`raw-body@2.5.3` / `3.0.2`** — only fix is 4.0.0 (major); leave
until Express/body-parser adopt it.
- **`undici@6.28.1` / `7.29.1`** — some AIKIDO IDs only fixed on newer
majors; same-major already at current floors.
- **`yargs@17.7.3`** — fix is 18.1.0 (major).
- **`extract-zip@2.0.1`**, **`@ai-sdk/provider-utils@2.2.8`** — see
Dependabot table.
## Test plan
- [x] `pnpm install --frozen-lockfile` at repo root
- [x] No `proxy-addr@2.0.7` in any lockfile on branch
- [x] Root lock has `@fastify/proxy-addr@5.1.1`
- [ ] Required CI green on this PR (do not merge)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
This PR tells the project to use safer versions of several third-party
packages. It also updates nested dependency locks so security scans no
longer find the affected vulnerable versions.
## Summary
- Added or updated pnpm overrides across the root project, e2e
workspaces, examples, and OTEL bridge examples.
- Removed references to `proxy-addr@2.0.7` from affected nested
lockfiles.
- Raised dependency floors for:
- `@fastify/proxy-addr`
- `fast-uri`
- `ip-address`
- `compression`
- `@fastify/busboy`
- `@fastify/forwarded`
- `systeminformation`
- `tinypool`
- `axios`
- `better-auth`
- `jose`
- `ajv`
- `hono`
- `zod`
- Updated `minimumReleaseAgeExclude` entries for selected patched
package versions.
- Added workspace overrides for related transitive dependencies,
including `qs`, `brace-expansion`, `nanoid`, `js-yaml`, `adm-zip`, and
`image-size`.
- Updated OTEL bridge build permissions for `esbuild` and `protobufjs`.
- Residual findings remain for dependencies such as `extract-zip@2.0.1`
and `@ai-sdk/provider-utils@2.2.8` because of compatibility or patch
availability constraints.
- Test results and CI completion status are not established by the
supplied change summaries.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->