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

31 commits

Author SHA1 Message Date
shreyas-mastra
8d4abc4f88
chore(deps): Vanta 2026-11-12 — raise undici to 8.12.4 / 7.30.2 (#30205) 2026-11-12 07:20:12 -08:00
Dane - AI (Mastra)
c22107fce3
chore(deps): update dependency @ai-sdk/provider-utils@>=3.0.0 <3.0.38 to v3.0.45 (#29844) 2026-11-10 20:07:34 -08:00
Dane - AI (Mastra)
4bd4b7f48e
chore(deps): update better-auth monorepo to v1.7.18 (#29714)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-09 12:39:24 +01:00
Dane - AI (Mastra)
bfe3af4ae1
chore(deps): update better-auth monorepo to v1.7.15 (#29497) 2026-11-04 17:36:58 -08:00
Dane - AI (Mastra)
9ce7e350ea
chore(deps): lock file maintenance (#29341)
Co-authored-by: wardpeet <ward@coding-tech.com>
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-04 15:03:55 +01:00
shreyas-mastra
655b19993f
chore(security): Vanta 2026-10-30 - zod ^4.6.7, @hono/node-server 2.1.5 (direct bumps) (#28983)
## Vanta 2026-10-30 security fixes (consolidated)

Direct dependency bumps and lockfile updates only. **No
overrides/resolutions added or raised.** The earlier override-based
edits on this branch were reverted; those findings are deferred below.

| Package | From → To | Advisory | Where |
|---|---|---|---|
| zod | ^3.25.76 → ^4.6.7 | zod <4.6.6 (High; no fixed 3.x) |
`client-sdks/react` (dev), `deployers/cloudflare` (dev),
`server-adapters/nestjs` (dev), `packages/editor` (dev),
`packages/playground-ui` (dep), `packages/playground`,
`workflows/_test-utils`, `examples/{durable-agents,inngest}`,
`explorations/longmemeval`,
`observability/_examples/otel-bridge/agent-hub`, e2e fixtures/templates
(`experiment-worker/fixtures/*`, `deployers/template/cloudflare`,
`no-bundling/template`, agent-builder `minimal-mastra-project`) + root
`pnpm-lock.yaml` |
| @hono/node-server | 1.19.x / 2.1.1 → 2.1.5 | CVE-2026-118663 /
GHSA-rmxm-3fg6-px4f (Medium) | direct deps: `examples/agent-builder`,
`otel-bridge/hono-multi/service-{one,two,mastra}`,
`templates/template-customer-refund-agent/client-demo-ui`,
`templates/template-kyc-customer-onboarding`,
`templates/template-security-incident-triage` |

Peer ranges (`^3.25.0 || ^4.0.0`) are unchanged, so consumers are
unaffected. Changeset: patch for `@mastra/playground-ui` (runtime zod
dep).

Supersedes the zod parts of #28075 (that PR also raises a pnpm override
and rewrites the `zod-v3` compat aliases to v4, so it is left as-is for
maintainers).

### Deferred (needs override, upstream release, or is intentional)
- zod v3 compat aliases (`zod-v3` in `packages/core`,
`packages/schema-compat`, `e2e-tests/type-check/template`;
`e2e-tests/client-js/zod-v3`): intentional zod 3 test coverage; no fixed
3.x release. Needs a decision to drop/dismiss.
- zod 3.25.76 transitive via `@arcadeai/arcadejs`, `@mcp-ui/client`,
firecrawl, `agent-browser`, `zod-to-json-schema`, MCP SDK paths:
upstream pins; override-only.
- @hono/node-server 1.19.x transitive via `@modelcontextprotocol/sdk`
(root, `examples/agent`, `packages/mcp/integration-tests`), and npm
lockfiles of `scripts/gh-issue-triage` (existing override, left alone)
and the two templates: override-only.
- graphql-scalars, raw-body, jose (templates/scripts): override-only.
- @azure/msal-node <7.1.0: 6.0.1 via `@azure/identity@4.14.0` (fixed in
4.14.1, blocked by the 1-day `minimumReleaseAge`; lockfile refresh
tomorrow), 5.6.0 via `@microsoft/teams.apps` (no fixed release).
- @opentelemetry/core <2.8.0: via `@google-cloud/pubsub@5` (fix needs
pubsub 6 major).
- @ai-sdk/provider-utils 2.2.8 / ai 4.x: pinned vendored AI SDK v4 line;
no fixed release in that major.
- extract-zip, deepmerge: no patched version.


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

## ELI5

This PR updates Zod and `@hono/node-server` versions in selected
packages, examples, and templates to address security advisories. It
also updates playground form code to work with Zod 4.

## Changes

- Updates selected `zod` dependencies to `^4.6.7`.
- Updates selected `@hono/node-server` dependencies to `2.1.5`.
- Updates the playground form’s IP address and record validators for Zod
4.
- Maps a specific Zod validation error to the message `Required`.
- Adds a patch changeset for `@mastra/playground-ui`.

## Validation

Test results are not provided in the supplied change summary.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: shreyas-mastra <327047572+shreyas-mastra@users.noreply.github.com>
2026-10-30 15:30:35 -04:00
Dane - AI (Mastra)
f6cd11f348
chore(deps): lock file maintenance (#28672)
This PR contains the following updates:

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

---

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

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

---

### Configuration

📅 **Schedule**: (UTC)

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

🚦 **Automerge**: Enabled.

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

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

---

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

---

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

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

---------

Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-29 10:02:15 +00:00
Dane - AI (Mastra)
07c1bf2362
chore(deps): update dependency @ai-sdk/provider-utils@>=3.0.0 <3.0.38 to v3.0.42 (#28773) 2026-10-28 18:08:16 -07:00
Dane - AI (Mastra)
f2ad3844f3
chore(deps): update opentelemetry (#28581)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-28 16:48:54 -07:00
Dane - AI (Mastra)
29747ebd1d
chore(deps): update better-auth monorepo to v1.7.13 (#28538)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
|
[@better-auth/drizzle-adapter@<1.7.7](https://www.better-auth.com/docs/adapters/drizzle)
([source](https://redirect.github.com/better-auth/better-auth/tree/HEAD/packages/drizzle-adapter))
| pnpm-workspace.overrides | patch | [`1.7.7` →
`1.7.13`](https://renovatebot.com/diffs/npm/@better-auth%2fdrizzle-adapter@<1.7.7/1.7.7/1.7.13)
| `1.7.14` |
| [better-auth](https://better-auth.com)
([source](https://redirect.github.com/better-auth/better-auth/tree/HEAD/packages/better-auth))
| pnpm-workspace.overrides | patch | [`^1.7.7` →
`^1.7.13`](https://renovatebot.com/diffs/npm/better-auth/1.7.7/1.7.13) |
`1.7.14` |
| [better-auth](https://better-auth.com)
([source](https://redirect.github.com/better-auth/better-auth/tree/HEAD/packages/better-auth))
| dependencies | patch | [`^1.7.12` →
`^1.7.13`](https://renovatebot.com/diffs/npm/better-auth/1.7.12/1.7.13)
| `1.7.14` |

---

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

---

### Release Notes

<details>
<summary>better-auth/better-auth
(@&#8203;better-auth/drizzle-adapter@<1.7.7)</summary>

###
[`v1.7.13`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#1713)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.12...v1.7.13)

###
[`v1.7.12`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#1712)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.11...v1.7.12)

###
[`v1.7.11`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#1711)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.10...v1.7.11)

###
[`v1.7.10`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#1710)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.9...v1.7.10)

###
[`v1.7.9`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#179)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.8...v1.7.9)

###
[`v1.7.8`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#178)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.7...v1.7.8)

##### Patch Changes

-
[#&#8203;11512](https://redirect.github.com/better-auth/better-auth/pull/11512)
[`4175b34`](4175b34a8f)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Align
the installed `@better-auth/utils` version with `better-call` while
accepting `^0.4.2 || ^0.5.0` across official package peers.

-
[#&#8203;11731](https://redirect.github.com/better-auth/better-auth/pull/11731)
[`0cfe07d`](0cfe07dccd)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Drizzle schemas that store dates in string columns now work:
`timestamp({ mode: "string" })`, MySQL `datetime({ mode: "string" })`,
and SQLite `text()`, including on Cloudflare D1. Before, the adapter
passed a JavaScript `Date` to those columns. Drivers such as
postgres-js, better-sqlite3 and D1 rejected it, so email sign-up, social
sign-in and session refresh failed. Filtering on those columns, for
example when listing sessions, failed the same way. Better Auth now
writes these dates as UTC text and reads a value without a time zone as
UTC.

If your server's time zone is not UTC and you use node-postgres or
mysql2 with a string column that has no time zone, existing rows were
written in the server's local time. They now read back shifted by the
server's UTC offset, so sessions and verification codes created before
the upgrade can expire early or late. Schemas generated by the CLI use
date columns and are unaffected.

</details>

<details>
<summary>better-auth/better-auth (better-auth)</summary>

###
[`v1.7.13`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#1713)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.12...v1.7.13)

##### Patch Changes

-
[#&#8203;11985](https://redirect.github.com/better-auth/better-auth/pull/11985)
[`9cb95fe`](9cb95fe3d0)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Type
declarations no longer list type-only exports as values, so importing
one as a value now fails type checking instead of failing at runtime.

- Updated dependencies
\[[`2712441`](2712441e35),
[`1cf4b2c`](1cf4b2c8f5)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.13
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.13
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.13
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.13
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.13
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.13
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.13

###
[`v1.7.12`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#1712)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.11...v1.7.12)

##### Patch Changes

-
[#&#8203;11925](https://redirect.github.com/better-auth/better-auth/pull/11925)
[`fb48619`](fb48619083)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - The JWT
plugin now verifies JWTs and session cookie-cache JWTs with the
algorithm of the stored key instead of the one named in the token
header, and logs a warning when it signs or verifies a JWT without an
issuer or audience.

-
[#&#8203;11924](https://redirect.github.com/better-auth/better-auth/pull/11924)
[`681aa5c`](681aa5c443)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! -
`auth.api.getSession()` now keeps the original database error as
`error.cause` when the session lookup fails, so server code can tell a
transient failure from a bug.

-
[#&#8203;11930](https://redirect.github.com/better-auth/better-auth/pull/11930)
[`b18e3b8`](b18e3b8fdf)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - OAuth
callbacks completed through the OAuth proxy now run the same checks as
the standard OAuth callback, including issuer and ID token nonce
validation.

- Updated dependencies
\[[`681aa5c`](681aa5c443),
[`4bc78ba`](4bc78baa83),
[`876608d`](876608da86),
[`083a743`](083a74329b),
[`492134a`](492134aeba)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.12
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.12
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.12
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.12
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.12
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.12
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.12

###
[`v1.7.11`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#1711)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.10...v1.7.11)

##### Patch Changes

-
[#&#8203;10719](https://redirect.github.com/better-auth/better-auth/pull/10719)
[`bd65db0`](bd65db02c1)
Thanks [@&#8203;rendermani](https://redirect.github.com/rendermani)! -
Recognize PostgreSQL `int8` as a valid number type in migration diffs.
Kysely's introspector reports `pg_type.typname`, so Better Auth's own
`bigint` columns (such as the database-backed rate limiter's
`lastRequest`) came back as `int8` and were reported as a type mismatch
on every run.

-
[#&#8203;11521](https://redirect.github.com/better-auth/better-auth/pull/11521)
[`37a75c9`](37a75c95d1)
Thanks [@&#8203;aryan1306](https://redirect.github.com/aryan1306)! - Fix
database-backed rate limiting returning an excessively large
`X-Retry-After` header instead of the remaining seconds in the
rate-limit window.

- Updated dependencies
\[[`ce96569`](ce965696d1),
[`2f6ca3f`](2f6ca3f370),
[`dfd8dd2`](dfd8dd287a)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.11
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.11
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.11
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.11
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.11
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.11
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.11

###
[`v1.7.10`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#1710)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.9...v1.7.10)

##### Patch Changes

-
[#&#8203;11393](https://redirect.github.com/better-auth/better-auth/pull/11393)
[`eebd47a`](eebd47a0e7)
Thanks [@&#8203;breken-ai](https://redirect.github.com/breken-ai)! - If
you use the `lastLoginMethod` plugin with `oneTap`, signing in through
Google One Tap now records `"google"`, the same value as signing in with
the Google button. Before, a One Tap sign-in recorded nothing: the
`better-auth.last_used_login_method` cookie kept its previous value or
stayed unset, and so did `user.lastLoginMethod` with `storeInDatabase`.

If your `customResolveMethod` includes a `/one-tap/callback` →
`"google"` workaround, remove that mapping; keep the resolver if it
handles other routes.

-
[#&#8203;11821](https://redirect.github.com/better-auth/better-auth/pull/11821)
[`09d07e6`](09d07e6fea)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- The Google One Tap prompt (`authClient.oneTap()` without `button`) no
longer calls `getSkippedReason()`, which Google's FedCM migration guide
says to remove. Before, it called it under any `promptOptions.fedCM`
setting.

A skipped prompt now ends the flow and calls `onPromptNotification`
right away instead of retrying. Google doesn't report why a prompt was
skipped, and a prompt the user closed stays hidden for Google's cooldown
period, so the retries could not bring it back. Dismissed prompts still
retry as before.

Google Identity Services still logs its FedCM migration warning, because
it does so whenever `prompt()` receives a listener. The plugin needs the
listener to track dismissals and skips, so the warning is expected and
safe to ignore.

-
[#&#8203;11819](https://redirect.github.com/better-auth/better-auth/pull/11819)
[`eaecb72`](eaecb7229e)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Google One Tap now applies your
`socialProviders.google.mapProfileToUser` and custom `getUserInfo`, the
same as the standard Google sign-in. Before, One Tap ignored both and
always stored the token's `name`, `email`, `email_verified`, and
`picture` claims.

If you configured either one, users created through One Tap now get the
fields it returns, including any extra fields such as a first name from
`given_name`. Returning users are updated from it on each One Tap
sign-in when `socialProviders.google.overrideUserInfoOnSignIn` is on,
and so are existing users that One Tap links when
`account.accountLinking.updateUserInfoOnLink` is on. Check that your
mapper suits One Tap users too.

If you set `socialProviders.google.overrideUserInfoOnSignIn`, One Tap
sign-ins now update returning users' name, image, and email from Google,
as the redirect sign-in already does.

Setups that configure none of these, including `oneTap({ clientId })`
with no Google provider, are unaffected.

-
[#&#8203;11820](https://redirect.github.com/better-auth/better-auth/pull/11820)
[`88c9a37`](88c9a37856)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- If you set `autoSelect` or `cancelOnTapOutside` on `oneTapClient()`,
the One Tap prompt and the Sign in with Google button now use them.
Before, only values passed to `authClient.oneTap()` took effect, so with
`autoSelect: true` on the plugin, returning users still had to pick an
account. Values passed to `oneTap()` still override the plugin's. Apps
that set these options only on `oneTap()`, or not at all, are
unaffected.

-
[#&#8203;11696](https://redirect.github.com/better-auth/better-auth/pull/11696)
[`0cf1f7c`](0cf1f7c6bc)
Thanks [@&#8203;drewsephski](https://redirect.github.com/drewsephski)! -
You can now import the One Tap plugin from
`better-auth/plugins/one-tap`, as you can for other plugins. Previously
this import failed with a "not exported" error. Imports from
`better-auth/plugins` and `better-auth/client/plugins` are unchanged.

-
[#&#8203;11822](https://redirect.github.com/better-auth/better-auth/pull/11822)
[`414e845`](414e845f12)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- You can now import the Captcha and OpenAPI plugins from
`better-auth/plugins/captcha` and `better-auth/plugins/open-api`, as you
can for other plugins. Previously these imports failed with a "not
exported" error. Imports from `better-auth/plugins` are unchanged.

If your TypeScript config uses `"moduleResolution": "node"` (or
`node10`), `better-auth/plugins/multi-session` and `better-auth/test`
now resolve their types. Previously TypeScript reported that it could
not find their declarations. Projects using `bundler`, `node16`, or
`nodenext` resolution are unaffected.

- Updated dependencies
\[[`fedd055`](fedd05586c),
[`bbd0a19`](bbd0a19c30),
[`99cdfe7`](99cdfe7c2e)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.10
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.10
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.10
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.10
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.10
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.10
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.10

###
[`v1.7.9`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#179)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.8...v1.7.9)

##### Patch Changes

-
[#&#8203;11766](https://redirect.github.com/better-auth/better-auth/pull/11766)
[`6edaa61`](6edaa61e62)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - An
`onAPIError.onError` handler that throws or rejects no longer fails the
request or causes an unhandled promise rejection. The error is logged
and the original error response is returned. Async handlers now finish
before the response is sent.

- Updated dependencies \[]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.9
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.9
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.9
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.9
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.9
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.9
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.9

###
[`v1.7.8`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#178)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.7...v1.7.8)

##### Patch Changes

-
[#&#8203;11512](https://redirect.github.com/better-auth/better-auth/pull/11512)
[`4175b34`](4175b34a8f)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Align
the installed `@better-auth/utils` version with `better-call` while
accepting `^0.4.2 || ^0.5.0` across official package peers.

-
[#&#8203;11565](https://redirect.github.com/better-auth/better-auth/pull/11565)
[`b1cfc1e`](b1cfc1ec1e)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Omit
non-returned custom fields from inferred output schema types.

-
[#&#8203;11540](https://redirect.github.com/better-auth/better-auth/pull/11540)
[`678c555`](678c555beb)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Align
cookie security attributes with RFC 6265bis.

-
[#&#8203;10591](https://redirect.github.com/better-auth/better-auth/pull/10591)
[`193efff`](193efff3d2)
Thanks [@&#8203;kdelay](https://redirect.github.com/kdelay)! - Expired
or revoked sessions now clear stale cookies when using `customSession`.

-
[#&#8203;11625](https://redirect.github.com/better-auth/better-auth/pull/11625)
[`369176e`](369176e7f6)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Fixed single-use checks for apps that set
`advanced.database.generateId: "uuid"`. Default id generation is
unaffected, and no migration is needed.

- On SQLite and MySQL, SAML sign-in, DPoP-bound requests checked against
the database replay store, `private_key_jwt` client authentication, and
magic link or email OTP sign-ins that adopt an unverified account failed
with a `NOT NULL` error on the `id` column. They now work. SIWE sign-in
ignored the `email` field and used the wallet-derived address; it now
uses the supplied email when no other account has it.
- On Postgres and MongoDB, a reused SAML assertion, DPoP proof, or
client assertion was accepted. Each one is now accepted only once.

With `generateId: "serial"`, behavior is unchanged: these checks need
string ids, and Better Auth now logs a warning the first time one of
these flows runs.

-
[#&#8203;11391](https://redirect.github.com/better-auth/better-auth/pull/11391)
[`352d04c`](352d04c8eb)
Thanks [@&#8203;breken-ai](https://redirect.github.com/breken-ai)! - Fix
`customSession` treating session lookup failures as signed-out users.
Server-side `getSession` now throws an API error, and HTTP clients
receive an error response.

-
[#&#8203;11750](https://redirect.github.com/better-auth/better-auth/pull/11750)
[`e9d9921`](e9d9921217)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Generic OAuth providers configured with `discoveryUrl` now recover
without a restart when discovery fails at startup. Since 1.7.3, a
provider whose discovery request failed at boot (for example, because
the identity provider was still starting) was skipped, and every sign-in
returned `PROVIDER_NOT_FOUND` until the app restarted. Better Auth now
retries discovery on the next sign-in, callback, or account-linking
request for that provider, and the provider works as soon as discovery
succeeds. While discovery keeps failing, sign-in and account linking
still return `PROVIDER_NOT_FOUND` and callbacks redirect with
`error=oauth_provider_not_found`, and each request may wait up to 10
seconds for the retry.

-
[#&#8203;11549](https://redirect.github.com/better-auth/better-auth/pull/11549)
[`1bd5c37`](1bd5c37884)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Fix
`lastLoginMethod` failing sign-in when `cookieName` or `maxAge` is
explicitly `undefined`.

-
[#&#8203;11174](https://redirect.github.com/better-auth/better-auth/pull/11174)
[`766cfb3`](766cfb3f42)
Thanks [@&#8203;Bekacru](https://redirect.github.com/Bekacru)! - Stop
double-decoding `callbackURL`, `newUserCallbackURL` and
`errorCallbackURL` on magic link verify so percent-encoded characters in
callback query params are preserved.

-
[#&#8203;11505](https://redirect.github.com/better-auth/better-auth/pull/11505)
[`c46992f`](c46992f6ce)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! -
Preserve the referenced model and field keys when generating Kysely
migrations, so custom table names that match another model key produce
the intended foreign keys.

-
[#&#8203;11718](https://redirect.github.com/better-auth/better-auth/pull/11718)
[`1d95ebf`](1d95ebf3fe)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Fix
missing device sessions and failed automatic session switching after
cache eviction when `storeSessionInDatabase` is enabled and
`preserveSessionInDatabase` is disabled. Automatic switching now follows
the order of held sessions, and large lists or sessions whose users no
longer exist no longer cause valid sessions to disappear.

-
[#&#8203;10266](https://redirect.github.com/better-auth/better-auth/pull/10266)
[`c68b2cd`](c68b2cd8a5)
Thanks [@&#8203;shiminshen](https://redirect.github.com/shiminshen)! -
Projects that enable `exactOptionalPropertyTypes` can use the
`oauthProvider()` and `mcp()` plugins again. Since 1.7.0, adding either
plugin to `betterAuth()` failed to type-check with a TS2322 error.

-
[#&#8203;11637](https://redirect.github.com/better-auth/better-auth/pull/11637)
[`2627237`](2627237fae)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Projects using the organization plugin with `skipLibCheck: false` no
longer get `TS2536: Type '"role"' cannot be used to index type ...` from
`crud-members.d.mts`. The `role` returned by `getActiveMemberRole` is
now typed as the organization's role names directly. Projects with
`skipLibCheck: true` (the default in most templates) were unaffected.

-
[#&#8203;10866](https://redirect.github.com/better-auth/better-auth/pull/10866)
[`3d1f008`](3d1f008ae3)
Thanks [@&#8203;heliohm](https://redirect.github.com/heliohm)! - The
organization plugin no longer pulls every zod locale into server
bundles.

-
[#&#8203;11626](https://redirect.github.com/better-auth/better-auth/pull/11626)
[`67743ed`](67743ed6e8)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Password resets and password changes no longer keep the new password
when revoking the user's sessions fails. With
`revokeSessionsOnPasswordReset` or `revokeOtherSessions`, database
sessions are revoked and the password is saved in one transaction when
transactions are enabled for the adapter, so a failure leaves the old
password and sessions in place. Sessions in secondary storage are still
removed after commit, on a best-effort basis. This covers
`/reset-password`, the email OTP and phone number reset endpoints, and
`/change-password`. `onPasswordReset` now runs after sessions are
revoked, so a throwing callback no longer leaves them active, and a
callback that lists the user's sessions no longer sees the revoked ones.

-
[#&#8203;10698](https://redirect.github.com/better-auth/better-auth/pull/10698)
[`f0ce580`](f0ce580fbd)
Thanks
[@&#8203;jashkarangiya](https://redirect.github.com/jashkarangiya)! - If
you set the phone number plugin's `verifyOTP` option,
`/phone-number/reset-password` now checks the code with it, as
`/phone-number/verify` already does. Before, password reset always
compared the code with the one Better Auth generated, so apps that
verify codes through a provider such as Twilio Verify could not reset
passwords. If your `sendPasswordResetOTP` sends the code Better Auth
generates, make sure `verifyOTP` accepts that code. Apps that don't set
`verifyOTP` are unaffected.

-
[#&#8203;11646](https://redirect.github.com/better-auth/better-auth/pull/11646)
[`07a0938`](07a09389ef)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- A failed password reset no longer spends the reset link or OTP.
`/reset-password`, `/email-otp/reset-password` and
`/phone-number/reset-password` now check the token or code without
consuming it, validate and hash the new password, then consume it in the
same transaction as the session revocation and password write. A
rejected password, such as one refused by `haveIBeenPwned`, always
leaves the link or OTP usable. A later failure, such as a failed session
revocation or password write, also leaves it usable when the adapter's
transactions are enabled and verification values are stored in the
database (the default without secondary storage, or
`verification.storeInDatabase: true`). Wrong codes still count against
the OTP attempt limit.

-
[#&#8203;11643](https://redirect.github.com/better-auth/better-auth/pull/11643)
[`92dfcea`](92dfceaa14)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- A sign-up that fails after its session is created no longer leaves
that session in secondary storage. With `storeSessionInDatabase` enabled
and `preserveSessionInDatabase` off, the secondary-storage copy is
written only after the sign-up commits, and listing a user's sessions
now reads the database, so a session whose cached copy failed to write
is still listed and revoked. With other secondary-storage settings,
sign-up, passkey registration and SSO sign-in with `resolveUser` keep
the session write inside their transaction, so a storage failure rolls
back the new user, passkey or account instead of keeping them without a
session. A session revoked by a `session.create.after` database hook
also stays revoked.

-
[#&#8203;11488](https://redirect.github.com/better-auth/better-auth/pull/11488)
[`e15625f`](e15625ff38)
Thanks [@&#8203;Bekacru](https://redirect.github.com/Bekacru)! -
SvelteKit 3 projects can now install Better Auth without
`--legacy-peer-deps`. The `@sveltejs/kit` peer range now includes
`^3.0.0`; SvelteKit 2 projects are unaffected.

- Updated dependencies
\[[`4175b34`](4175b34a8f),
[`435645e`](435645e5eb),
[`369176e`](369176e7f6),
[`0cfe07d`](0cfe07dccd),
[`9904b29`](9904b29ece),
[`e78f15a`](e78f15aa31),
[`60525e0`](60525e08fd),
[`8133265`](813326536c),
[`ea85d13`](ea85d133d6),
[`916ef5c`](916ef5c530),
[`1d95ebf`](1d95ebf3fe),
[`6214610`](62146108c7),
[`67743ed`](67743ed6e8),
[`c46d2a6`](c46d2a6ac4),
[`92dfcea`](92dfceaa14),
[`a9f455d`](a9f455d586),
[`9725f1b`](9725f1b361)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.8
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.8
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.8
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.8
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.8
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.8
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.8

</details>

---

### Configuration

📅 **Schedule**: (UTC)

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

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

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

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

---

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

---

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODYuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5Mi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-28 19:24:36 +00:00
Dane - AI (Mastra)
4f60903242
chore(deps): lock file maintenance (#27013) 2026-10-21 09:25:38 +02:00
shreyas-mastra
f3cf77305f
security: Vanta remediation (2026-10-20) (#27828) 2026-10-20 08:39:07 -07:00
shreyas-mastra
fa409d430b
security: Vanta remediation pass 2026-10-14/15/19 (zod 4.6.7, @ai-sdk/provider-utils, @copilotkit template) (#27023) 2026-10-19 11:32:32 -07:00
shreyas-mastra
7aec8b0d95
security: Vanta remediation pass 2026-10-12 (better-auth, MCP SDK) (#26773)
## Summary
Vanta remediation for 2026-10-12. Target list is today's live export (77
findings, 44 unique IDs). Platform findings are handled in
mastra-ai/platform#3317.

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

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

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

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

Do not merge unless reviewed. No CI weakened.


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

## ELI5

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

## Changes

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

Test results and review findings were not provided.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-13 07:41:26 -07:00
shreyas-mastra
ea7ca755a4
security: Vanta remediation pass 2026-10-07 (MCP SDK, sharp, hono) (#26260) 2026-10-07 09:29:07 -07:00
shreyas-mastra
4358322b7b
chore(deps): override upstream-blocked vulnerable transitive deps (#25853) 2026-10-02 18:03:50 -07:00
shreyas-mastra
7b777d38d9
security: Vanta zero pass 2026-09-23 (grpc/compression/provider-utils floors) (#24848) 2026-09-23 13:58:39 -07:00
shreyas-mastra
a2c9876f0d
security: Vanta direct-dependency bumps (no overrides) (#24308) 2026-09-17 12:24:05 -07:00
Abhi Aiyer
af2a951469
fix: secure remaining example and Fastify dependencies (#22587)
Co-authored-by: Mastra Code (openai/gpt-5.6-sol) <noreply@mastra.ai>
2026-08-31 14:23:21 +02:00
Dane - AI (Mastra)
1aad6198fd
chore(deps): lock file maintenance (#19903) 2026-07-22 17:05:00 +02:00
Dane - AI (Mastra)
2592c7226a
chore(deps): lock file maintenance (#19457)
This PR contains the following updates:

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

🔧 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](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNjMuNSIsInVwZGF0ZWRJblZlciI6IjQzLjI2My41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->
2026-07-17 20:28:50 +02:00
Lennart
3356bf3dd0
chore(docs): AX improvements (#19631) 2026-07-17 14:29:48 +02:00
Dane - AI (Mastra)
2e858270c6
chore(deps): lock file maintenance (#19080)
Co-authored-by: wardpeet <ward@coding-tech.com>
2026-07-13 23:54:17 +02:00
Abhi Aiyer
401e29d34b
fix(ci): unbreak renovate PRs — cap cookie override and fix standalone package installs (#19249)
Co-authored-by: Mastra Code (anthropic/claude-fable-5) <noreply@mastra.ai>
Co-authored-by: wardpeet <ward@coding-tech.com>
2026-07-13 14:05:42 +02:00
Roamin
fb8aea3842
fix: multi-tenant Composio tool auth for Agent Builder (#19144)
Co-authored-by: Mastra Code (anthropic/claude-opus-4-8) <noreply@mastra.ai>
2026-07-10 21:51:53 +02:00
Marvin Frachet
e8eee50879
feat: Signals, live Entity-Learning data with entity filter, layout polish, and entity-aware navigation (#18699)
https://github.com/user-attachments/assets/dee31cb1-68ba-4a89-bd56-41fe9c6515f8



## Summary

Makes the Studio **Signals** page a live feature backed by the platform
Entity-Learning API instead of hardcoded mock data. You can pick any
entity reported by the platform (agents, tools, workflows, and more) and
inspect that entity's signals, their clusters, traces, and the cluster
scatter plot — all fetched live.

## What changed

**Live data + entity filter**
- Added an entity-type / entity filter bar at the top of the Signals
page, mirroring the traces filter, so you can choose any supported
entity on the server.
- The overview loads each available signal's real clusters (topics) by
entity id and organization id; the details page renders live topics,
topic examples, and points directly with no mock/mapping layer.
- The cluster scatter plot and sidebar swatches derive their colors from
the same per-cluster source, so the chart and list stay in sync.

**Gating change**
- The Signals UI is now gated on the platform observability endpoint
being configured, replacing the removed `MASTRA_SIGNALS_UI` flag.
Studio's served HTML now exposes `MASTRA_ORGANIZATION_ID`,
`MASTRA_PLATFORM_PROJECT_ID`, and
`MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT` to the browser. Set
`MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT` to enable Signals; leave it
unset to hide it.

**Layout & navigation polish**
- Pinned the entity filter as a top bar with centered
empty/loading/error states using the shared `EmptyState` component.
- Added a 4-cell skeleton grid while a signal's clusters load, reserving
badge height to avoid layout shift.
- Clicking a cluster card opens its topic by default via a `topicId`
query param threaded through the route adapters.
- The Signals breadcrumb preserves the selected `entityType` /
`entityId` query params when navigating back to the overview.

## Test plan

- `pnpm --filter ./packages/playground-ui typecheck` — clean
- `pnpm --filter ./packages/playground typecheck` — clean
- `pnpm --filter ./packages/playground-ui test` — 546 tests pass
(Signals overview, details, hooks, and entity-learning service suites
included)
- `pnpm --filter ./packages/playground test` — 1429 pass / 2 skipped,
including the Signals route-adapter suite (7 tests) covering
entity-aware navigation, topicId passthrough, and breadcrumb query-param
preservation
- Tests use the package-standard approach: real `@mastra/client-js` +
React Query driven through MSW handlers and typed fixtures, no `vi.mock`
of local hooks/services.

Draft for review.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
The Signals page used to show pretend data. Now it pulls real
“entity-learning” signals from your platform (plus charts and examples),
and it only turns on when the platform observability endpoint is
configured.

## Summary
- Reworked the Signals UI to load live Entity-Learning data (entities,
topics/clusters, topic examples, points, and scatter plot) instead of
hardcoded mock data.
- Added an agent (entity) filter and updated the overview to render
topic-based cluster cards with loading/empty/error states.
- Refactored the details view to be topic-driven: live topic
examples/trace list, point-based chart/scatter rendering, shared
cluster-color logic, a 4-cell cluster loading skeleton, and default
opening via `topicId`.
- Updated navigation and breadcrumbs so `entityType`/`entityId` and
`topicId` query parameters are preserved when moving between overview,
details, and back links.
- Changed UI gating by removing the `MASTRA_SIGNALS_UI` flag and
enabling the Signals route when `MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT`
is configured; the browser now receives `MASTRA_ORGANIZATION_ID`,
`MASTRA_PLATFORM_PROJECT_ID`, and
`MASTRA_PLATFORM_OBSERVABILITY_ENDPOINT`.
- Added the Entity-Learning integration layer (typed service), React
Query hooks, and expanded test coverage for the new live flows and
routing behaviors.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Mastra Code (anthropic/claude-opus-4-8) <noreply@mastra.ai>
2026-07-02 11:15:31 +02:00
Ward Peeters
213feb87bf
fix(core,schema-compat): resolve TS2589 type instantiation depth errors in workflows (#18608)
Co-authored-by: Mastra Code (alibaba-token-plan/glm-5.2)
Co-authored-by: Mastra Code (alibaba-token-plan/glm-5.2) <noreply@mastra.ai>
2026-06-29 13:07:27 +02:00
YujohnNattrass
3515d9eba2
feat(playground): tool provider integrations UI (connections + picker + auto-pin) (#17223)
Draft for review. Stacked on top of `yj/v1-tool-provider-backend` (the
v1 ToolProvider backend extraction, which IS off `main`).

## Stack

```
origin/main
└── yj/v1-tool-provider-backend   (1 commit — backend extraction, #TBD)
    └── yj/playground-tool-provider-integrations-v2   (this PR, 5 commits)
```

## Commits (this PR)

1. `c0392cb92b` — feat(playground): MVP tool provider connections page +
builder integration
2. `08e6084965` — feat(tool-providers): PATCH endpoint to rename
connection labels
3. `823ffd32cb` — feat(playground): inline connection picker for
integration tools
4. `791d3a8e9a` — chore(tool-provider): document Composio SDK pin and
add debug logs
5. `e1f68596d6` — feat(playground): auto-pin freshly authorized
connection after OAuth

## What's in here

- `/integrations` page — list/create/disconnect tool provider
connections.
- Agent Builder tools picker — integration tool cards with inline
Connect button + `IntegrationConnectionPicker` beneath checked cards.
- Inline label editing via new `PATCH
/tool-providers/:providerId/connections/:connectionId`.
- Admin-only `authorId` display on connections (gated by
`tool-providers:admin`).
- Auto-pin: a freshly authorized connection gets pinned to the form
(from picker "Connect new", or from card "Connect" when the tool is
already checked).
- Composio SDK pinned to `^0.6.5` with a notes doc explaining why
(`.notes/composio-sdk-pinned-0.6.5.md`).

## Verification

- `pnpm --filter ./packages/playground typecheck` — 14 pre-existing
`DataList.RowWrapper` errors unrelated to this diff
(datasets/experiments/workspace pages); 0 errors in touched files.
- `pnpm --filter ./packages/playground build` — clean
- Focused tests: `tools.test.tsx` 13/18 pass (5 pre-existing
PointerEvent JSDOM flakes in filter-checkbox tests unrelated to this
PR), `integration-connection-picker.test.tsx` 11/11 pass.

## Notes for reviewer

- Base is `yj/v1-tool-provider-backend` so the review diff is just the 5
frontend commits. The backend branch is the v1 ToolProvider extraction
(#16934 carved out).
- Not for merge yet. Once approved, both branches land via separate PRs
into `main` (backend first).


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

This PR adds a simple UI so people building AI agents can connect
external services (like Gmail) from the Agent Builder and a new
Integrations page; when you authorize a connection in a popup it becomes
available and—if relevant—gets automatically pinned into the agent’s
settings.

## Overview

Frontend-only MVP wiring for tool-provider integrations: a new
/integrations page, integration tools shown in the Agent Builder picker
with inline connect/rename/disconnect flows, OAuth popup + polling, and
auto-pin behavior for newly authorized connections. Admins can view
grouped connections by author; non-admins see only their own connections
in the picker. The v1 ToolProvider backend branch must land first—this
PR is draft and not for merge yet.

## Key Features

- Integrations page (/integrations): select provider/toolkit, connect
via OAuth (optional label), list and disconnect connections; admin view
groups connections by author.
- Agent Builder picker: integration tool cards, toolkit filter pane with
per-toolkit connection controls, connection-name badges on cards, inline
rename (PATCH), manage dialog for multi-connection drill-down and
disconnect.
- Auto-pin: newly authorized connections are automatically pinned into
the agent form when relevant tools/toolkits are selected; connecting
from a checked tool pins the connection and may auto-check the tool.
- Picker scoping & admin UX: picker scoped to caller authorId so editors
see only their own connections; users with tool-providers:admin
permission see grouped/owned/shared views.
- Form/schema & persistence: toolProviders added to form schema with
cross-field validation; save flow includes toolProviders when present;
mappers support form↔stored round-trips.

## Technical Summary

- New pages/components: IntegrationsPage and supporting components
(ProviderToolkitSelector, ExistingConnectionsPanel,
ManageConnectionDialog/List/Form, ManageConnectionForm,
ManageConnectionList, TwoPanePickerSkeleton, ToolkitFilterPane,
ToolkitConnectionControl, ToolGrid, ToolCard, FilterableList, etc.).
- Hooks & client flows: useAllProviderTools, useAllConnections,
useExistingConnections, useAuthorize (OAuth popup + polling),
useDisconnectConnection, useUpdateConnection, useIsToolProviderAdmin,
useProviderToolkitGroups, useToolkitSelection, useToolSelection,
useDebouncedConnectionRename, and related re-exports.
- Schemas & mappers: toolProvidersFormSchema, validateToolProviders,
buildToolProvidersForSave, extractFormToolProviders;
AgentBuilderEditFormSchema extended with optional toolProviders and
superRefine validation; routeToolInputToFormKeys and
useSetAgentToolsTool updated to carry toolProvidersFragment.
- Types & SDK: AgentTool gains 'integration' type and integration fields
(providerId, toolkit, hasConnection, connectionLabels); client route
type PostToolProvidersProviderIdAuthorize_Body.connectionId made
optional; Composio SDK pinned to ^0.6.5; debug logs added for provider
resolution.
- UI/UX adjustments: AgentSelectableCard footer slot; picker/tabs/layout
tweaks and new two-pane picker skeleton for consistent loading UX.
- Tests & fixtures: many new/updated Vitest + RTL tests and MSW
fixtures/handlers for providers/toolkits/tools/connections; jsdom
PointerEvent→MouseEvent shims in tests; some hook tests skipped pending
harness adjustments; focused typecheck/build clean for touched files.

## Verification & Notes

- Focused typecheck/build for modified files is clean; tests
added/updated to exercise integration flows (not all existing tests
fully unskipped; some pre-existing JSDOM flakes noted).
- Base backend branch yj/v1-tool-provider-backend must land before
merging.
- This PR is draft and not-for-merge yet.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: YJ <yj@example.com>
Co-authored-by: Mastra Code (anthropic/claude-opus-4-7) <noreply@mastra.ai>
Co-authored-by: mfrachet <marvin@mastra.ai>
2026-06-10 14:03:31 +02:00
Tyler Barnes
b3e9781a93
fix(client-js): keep client tools for signal continuations (#17593)
This fixes subscribed client-tool continuations when an agent calls
browser client tools across multiple rounds.

Before, the first signal run stored client tools under the initial run
id. When the server started a continuation with a new run id, the
browser could lose access to those client tools and stop at `finish:
tool-calls`.

```ts
run-initial -> client tool result -> run-continuation -> finish: tool-calls // browser has no clientTools
```

Now the client keeps the thread-scoped runtime options available before
sending the continuation result, so follow-up continuation runs can keep
executing client tools.

```ts
run-initial -> client tool result -> run-continuation -> client tool result -> ...
```

I also added a regression test for multiple subscribed client-tool
continuation rounds and documented that Agent Builder local testing
needs `pnpm build:cli` before restarting with `pnpm mastra dev`.


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

When a browser-based AI agent continued a conversation, it could lose
access to its special toolbox and stop working. This PR keeps the
toolbox available across continuation rounds so the agent can keep using
the tools in subsequent runs.

## Changes Overview

### Core Fix: Preserve Client Tools Across Continuations
- client-sdks/client-js/src/resources/agent.ts
- When a subscribed thread finishes with `tool-calls`, build a single
`continuationStreamOptions` from the active runtime options (including
processed `clientTools`, `requestContext`, and `memory` when `threadId`
exists).
- Persist that `continuationStreamOptions` into signal-runtime state via
`agent.setSignalRuntimeOptions` before sending approvals, and reuse the
same object when calling `agent.sendToolApproval`.
- On `sendToolApproval` failure, delete only the matching latest
thread-scoped runtime options (reference-aware cleanup) while still
removing run-scoped options in `finally`. This prevents losing client
tools across continuation run IDs.

### Test Coverage
- client-sdks/client-js/src/resources/agent.test.ts
- Added a Vitest regression test that simulates two subscribed
continuation cycles across separate run IDs and asserts:
- client tool `execute` is called for each continuation with the correct
per-run args,
    - `sendToolApproval` is invoked for each continuation,
    - emitted `tool-result` stream contains both tool-call IDs.

### Documentation
- examples/agent-builder/AGENTS.md
- Added local dev instructions: rebuild the CLI with `pnpm build:cli`
from the repo root before restarting the example with `pnpm mastra dev`
so local changes to the CLI are picked up.

### Release Notes
- .changeset/tiny-pianos-wave.md
- Bumps `@mastra/client-js` patch and documents the fix keeping client
tools available across subscribed continuation runs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-04 16:00:01 -07:00
Marvin Frachet
bea9a679f8
feat(playground,editor): Agent Builder shortcut, sidebar polish, and request-context defaults (#17109)
## What this PR ships

This branch makes the Agent Builder reachable, well-integrated with
Studio, and aware of the current user — so a fresh builder agent can
immediately participate in request-context features without setup.

It bundles several related improvements:

1. **Agent Builder shortcut in the Studio sidebar** so users can jump to
the builder from anywhere in Studio.
2. **Agent Builder sidebar logo links back to `/agents`**, matching
Studio's navigation expectations.
3. **`@mastra/editor` lets consumers override the `createBuilderAgent`
constructor args** so embedders can customize how the builder agent is
constructed.
4. **Agent Builder sidebar chrome aligned with Studio** (visual + layout
parity).
5. **Changeset added** for the editor override capability.
6. **Builder chat passes the current user in its stream request
context** so agent runs receive the authenticated user.
7. **Builder-created agents are born with a default
`requestContextSchema`** describing a single `user` variable matching
the `CurrentUser` shape, so downstream features (instruction
interpolation, request-context presets, autocomplete) can read `user`
from any builder agent without any UI step at creation time.

Together, this means: a user can reach the builder from Studio, create
an agent in one click, and immediately use `user` in the agent's
instructions / request-context flows — no manual schema authoring
required.

## Test plan

- `pnpm --filter ./packages/playground typecheck` passes
- New and existing vitest suites for the agent-builder starter and
constants pass (8 tests across 2 files)
- Manual: open Studio, click the new Agent Builder sidebar entry, create
a new agent from the starter, then fetch the stored agent and confirm
`requestContextSchema` contains a `user` object with the expected fields

## Notes

- The default `requestContextSchema` only affects newly created builder
agents. Existing agents and subsequent builder saves are not modified.
- No new UI surface is introduced for the request-context default — it's
a fixed schema applied at create time.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
This PR makes the Agent Builder tool easier to find in Mastra Studio by
adding a shortcut in the sidebar, and ensures agents created there
automatically know who's using them so they can work with personalized
features right away.

---

## Overview

This PR enhances the Agent Builder's integration with Mastra Studio by
making it discoverable via a sidebar shortcut, improving navigation
consistency, enabling constructor-level customization, and ensuring
builder-created agents come pre-configured with user-context awareness.

## Key Changes

### UI & Navigation Integration
- Added an "Agent Builder" sidebar shortcut that conditionally appears
based on user authentication and builder access permissions via new
`useAgentBuilderSidebarVisibility` hook
- Agent Builder sidebar logo now links to `/agents` to match Studio
navigation patterns
- Aligned Agent Builder sidebar layout and chrome (header/trigger UI)
with Studio design conventions
- Removed header controls from agents page that are now redundant with
the sidebar navigation

### Agent Builder Constructor Enhancements
- `createBuilderAgent()` in `@mastra/editor` now accepts an optional
partial constructor argument, allowing embedders to override agent
defaults (e.g., `model`, `instructions`) while preserving canonical
`id`, `name`, and `description`
- Agent constructor now explicitly includes the `workspace` binding
- Published changeset documenting the new override capability

### Request Context & User Awareness
- `StreamChatProvider` now reads the current authenticated user via
`useCurrentUser()` and injects it into the request context before
sending messages to agents, enabling agents to access caller identity
- Newly created builder agents automatically receive a
`DEFAULT_BUILDER_REQUEST_CONTEXT_SCHEMA` that defines a top-level `user`
object matching the `CurrentUser` shape (`id`, `email`, `name`,
`avatarUrl`, `roles`, `permissions`), with `id` as the only required
field
- Schema application is automatic at creation time with no new UI
required; existing agents and subsequent saves remain unaffected

### Build & Workspace Integration
- Updated `tsup.config.ts` to bundle the `src/ee/workspace` directory
into `dist/ee/workspace` on successful build
- Added comprehensive skill authoring documentation defining playbooks
and quality standards for eight agent archetypes: generic-assistant,
coding-agent, content-writer-agent, customer-support-agent,
ops-automation-agent, research-agent, spreadsheet-agent, and a universal
agent-prompt-quality-bar skill

### Auth & Permissions
- Tightened example auth role mapping: member role in WorkOS RBAC now
maps to empty permissions array instead of full access (`'*'`)

### Testing
- Added comprehensive sidebar visibility tests via `AppSidebar` Vitest
suite covering auth states, RBAC conditions, and permission checks
- Added `DEFAULT_BUILDER_REQUEST_CONTEXT_SCHEMA` validation tests
- Updated `StreamChatProvider` tests to properly seed React Query cache
for `useCurrentUser` hook and register MSW handlers for auth endpoints
- Updated agent-builder-starter tests to verify `requestContextSchema`
is included in agent creation payload
- Removed `AgentChatPanel` test file and simplified the component export
to eliminate wrapper re-export

## Technical Details

**Accessibility Control**: The Agent Builder sidebar link visibility is
gated by auth capabilities and fine-grained permissions
(`stored-agents:*` or `stored-agents:read`), mirroring root-layout
access checks.

**Schema Design**: The `DEFAULT_BUILDER_REQUEST_CONTEXT_SCHEMA` uses a
JSON Schema-like structure ensuring newly created agents have a
consistent, documented interface for accessing authenticated user
information at runtime.

**Build Configuration**: Workspace skills are now bundled with the
editor package, making them available for builder runtime operations
like skill discovery, reading, and quality validation.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/mastra-ai/mastra/pull/17109?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

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

---------

Co-authored-by: Mastra Code (anthropic/claude-opus-4-7) <noreply@mastra.ai>
2026-05-27 11:33:48 +02:00
Marvin Frachet
271d8917e4
feat(client-js,playground): port magnificent-marquess frontend stack (#17105)
## What

Ports the scoped frontend stack from `yj/magnificent-marquess` onto
`rain-purpose` as one reviewable PR, while preserving the newer
client-tools-on-signals (#16540) and Agent Builder view/edit pages
(#17104) work that already landed on `rain-purpose`. Also brings over
`examples/agent-builder/` for end-to-end smoke testing.

## Scope

**`@mastra/client-js`**
- New `ToolProvider` resource + unit tests
- `getModelPolicy` accessor on the root client
- Regenerated route types

**`@internal/playground`**
- **Auth**: `route-permissions` module, `RoutePermissionGuard`, login
layout, `ImpersonationBanner`, `RoleImpersonationProvider`, expanded
user-menu
- **Agent Builder routing**: agents / skills / infrastructure / favorite
/ library + create/edit/view all wired in `App.tsx`,
`AgentBuilderRootLayout`, `RoutePermissionGuard` around the app outlet,
`RoleImpersonationProvider` wrapping `PostHogProvider`,
`StudioIndexRedirect` replacing the `/agents` home redirect
- **Agents**: composer/model-switcher updates, browser-thumbnail/panel
`hideSidebar` plumbing, channels/CMS sidebar tweaks, new
`useUpdateSkill` MSW test
- **LLM**: models/providers/provider-logo updates
- **Misc**: `useRestoreFocus` hook, `studio-index-redirect`, nav-items
entries, tsconfig path tweak, e2e auth login-flow + kitchen-sink fixture
updates

**`examples/agent-builder`**
- New example app for smoke testing the Agent Builder routes locally

## Preserved from rain-purpose (explicitly NOT overwritten)

- `client-sdks/client-js/src/resources/agent.{ts,test.ts}`
- `client-sdks/react/src/agent/hooks.ts`, `package.json`,
`vitest.config.ts`, `hooks.test.ts`
- `packages/playground/src/services/mastra-runtime-provider.tsx`
-
`packages/playground/src/pages/agent-builder/agents/__tests__/{view,edit}.test.tsx`
- `packages/playground/src/domains/builder.ts` (yj #17072 deletion
skipped)

## Test plan

- `pnpm --filter ./client-sdks/client-js test`: **491/491 passing**
- New playground MSW + login-page tests: **13/13 passing**
- `pnpm --filter ./packages/playground exec tsc -p tsconfig.app.json
--noEmit`: same 46 pre-existing errors as `rain-purpose` HEAD; **zero
new errors introduced**
- Smoke test locally with `examples/agent-builder` to validate the new
routes, route-permission guard, and role-impersonation banner


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

This PR brings a sophisticated frontend system from another branch into
the main codebase, adding support for role-based access controls,
authentication, and an improved Agent Builder interface. It's like
moving a fully furnished house into a new location while keeping all the
original furniture that was already there.

---

## Overview

Ports the `yj/magnificent-marquess` frontend stack onto `rain-purpose`,
integrating route-based permission controls, role impersonation,
enhanced authentication flows, and Agent Builder routing while
preserving existing `client-tools-on-signals` and Agent Builder
view/edit functionality. Includes a new `examples/agent-builder` app for
local smoke testing.

## `@mastra/client-js`

- **ToolProvider resource**: New resource type with unit tests
- **getModelPolicy accessor**: Added to root client for admin model
policy access
- **Route types**: Regenerated for new endpoints

## `@internal/playground`

### Authentication & Permissions
- **route-permissions module**: Centralized registry mapping Studio
routes to required permissions with utilities for permission resolution
and access determination
- **RoutePermissionGuard**: New component gating route access based on
user permissions, with deterministic redirects to `/agents` for viewers
without `tools:read`
- **Role impersonation**: `RoleImpersonationProvider`,
`useRoleImpersonation` hook, and `ImpersonationBanner` component
enabling admins to preview the app as different roles
- **LoginLayout component**: Shared visual shell for auth pages
- **Login flow tests**: E2E tests for unauthenticated redirects with
credential submission and auth-disabled routes; parity tests for
login/signup UI across auth capability modes

### Agent Builder Routing
- **Route wiring**: Integrated
agents/skills/infrastructure/favorite/library routes with
create/edit/view flows in `App.tsx` and `AgentBuilderRootLayout`
- **Layout guards**: Wrapped app outlet with `RoutePermissionGuard` and
`PostHogProvider` with `RoleImpersonationProvider`
- **Home redirect**: Replaced `/agents` redirect with
`StudioIndexRedirect` for permission-aware home routing

### Agent Builder & Agents UI
- **Model policy integration**: Composer and model-switcher components
now respect admin model policies, showing "locked by admin" chips and
stale-model warnings
- **Browser sidebar control**: Added `hideSidebar` prop plumbing through
`AgentChatPanelChat` → `BrowserThumbnailSlot` → `BrowserThumbnail`
- **Skill editing**: `SkillEditDialog` refactored to support
view/edit/create modes with optional chat-driven field population,
file-tree editing for admins, and update mutations
- **CMS sidebar feature-gating**: Sections now filtered by builder
feature toggles
- **Browser view refactoring**: `BrowserViewPanel` simplified to use
`useRestoreFocus` hook and modal-only behavior
- **Workspace selector**: Now conditionally rendered only when workspace
options are available

### LLM & Providers
- **Model/provider filtering**: Updated to incorporate builder admin
policies via `useBuilderFilteredModels`/`useBuilderFilteredProviders`
- **Provider logo styling**: Added optional `style` prop for custom CSS
properties

### Hooks & Utilities
- **useRestoreFocus**: New hook capturing and restoring focus when modal
opens/closes
- **useCanCreateAgent**: Moved to `agent-builder` domain for Agent
Builder context
- **useUpdateSkill**: MSW tests added for sparse PATCH request
validation
- **useStoredAgents**: Added model-policy error handling and cache
invalidation for builder-settings

### Navigation & Layout
- **Nav items refactoring**: Removed per-item permission fields;
permission checks now centralized via `route-permissions`
- **User menu expansion**: Added role-preview section with
role-switching controls and visual active states
- **ImpersonationBanner**: Displayed in both AppSidebar and
AgentBuilderSidebar when impersonation is active
- **useDefaultVisibility hook**: New utility for visibility state
management
- **Auth capabilities**: Added `availableRoles` field to
`AuthenticatedCapabilities` for admin role-switching

### Configuration & Dev
- **Dev script update**: `dev` script now runs Vite with
`MASTRA_AUTO_DETECT_URL=true`
- **Playwright auth tests**: Updated viewer-role E2E test to wait for
deterministic redirects
- **TypeScript**: Added kitchen-sink `MastraEditor` builder
configuration with tools and avatar-upload features
- **CSS**: Added `@keyframes shimmer-text` animation for text shimmer
effects

## examples/agent-builder

New example app for local Agent Builder smoke testing with:
- **Mastra setup**: Configured with LibSQL storage, WorkOS
authentication, RBAC provider with role-to-permissions mapping, Slack
provider, and Stagehand browser support
- **Agents**: `weatherAgent` with OpenAI `gpt-4o-mini` model
- **Tools**: `weatherInfo`, `weatherTool`, `diceRoll`, `coinFlip`,
`randomQuote` with Zod schemas
- **Workflows**: `greetWorkflow` demonstrating step composition and Zod
validation
- **Workspace**: E2B sandbox with Git environment variable support
- **Configuration**: Role-based builder with feature toggles, browser
workspace via Stagehand, Composio tool provider, Swagger API docs, and
observability with cloud exporters
- **Dev setup**: pnpm-based with local workspace links to `@mastra/*`
packages, MSW mocking, and `mastra:dev`/`mastra:build` commands

## Testing

- **client-js tests**: 491/491 passing
- **Playground tests**: 13/13 passing (new MSW + login-page tests)
- **TypeScript**: 46 pre-existing errors, zero new errors
- **Manual testing**: Examples/agent-builder smoke tests for routes,
guards, and impersonation banner

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/mastra-ai/mastra/pull/17105?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

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

---------

Co-authored-by: Mastra Code (anthropic/claude-opus-4-7) <noreply@mastra.ai>
2026-05-27 02:24:04 +02:00