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

254 commits

Author SHA1 Message Date
dane-ai-mastra[bot]
d60ba71be0 chore: version - exit prerelease mode 2026-11-12 21:12:29 +00:00
dane-ai-mastra[bot]
5c87442ed7
chore: version packages (alpha) (#30203)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases

> The changelog information of each package has been omitted from this
message, as the content exceeds the size limit.

## @mastra/auth-auth0@1.3.0-alpha.0


## @mastra/auth-clerk@1.4.0-alpha.0


## @mastra/auth-okta@0.3.0-alpha.0


## @mastra/auth-supabase@1.2.0-alpha.0


## @mastra/client-js@1.60.0-alpha.13


## @mastra/auth@1.2.0-alpha.0


## @mastra/core@1.83.0-alpha.13


## @mastra/playground-ui@69.0.0-alpha.15


## @mastra/rag@2.8.0-alpha.3


## @mastra/server@1.83.0-alpha.13


## @mastra/server-adapters-test-suite@0.3.0-alpha.5


## @mastra/auth-better-auth@1.1.11-alpha.2


## @mastra/auth-cloud@1.2.9-alpha.0


## @mastra/auth-neon@0.3.6-alpha.1


## @mastra/auth-workos@1.6.9-alpha.0


## @mastra/discord@1.3.4-alpha.0


## @mastra/react@1.15.0-alpha.13


## @mastra/deployer-cloud@1.83.0-alpha.13


## @mastra/deployer-cloudflare@1.2.42-alpha.3


## @mastra/deployer-netlify@1.2.42-alpha.1


## @mastra/deployer-sandbox@0.3.27-alpha.1


## @mastra/deployer-vercel@1.2.42-alpha.1


## @mastra/longmemeval@1.1.42-alpha.13


## @mastra/opencode@0.1.42-alpha.13


## @mastra/factory@0.28.0-alpha.15


## create-factory@0.4.3-alpha.15


## @mastra/code-sdk@1.19.0-alpha.15


## mastracode@0.50.0-alpha.14


## @mastra/agent-builder@1.2.1-alpha.5


## mastra@1.39.0-alpha.15


## @mastra/connect@1.4.0-alpha.6


## @mastra/deployer@1.83.0-alpha.13


## @mastra/editor@0.17.1-alpha.7


## @mastra/mcp@2.9.0-alpha.5


## @mastra/mcp-docs-server@1.3.13-alpha.17


## @mastra/memory@1.41.1-alpha.5


## @mastra/schema-compat@1.4.0-alpha.2


## @mastra/elysia@0.1.23-alpha.13


## @mastra/express@1.5.27-alpha.13


## @mastra/fastify@1.5.27-alpha.13


## @mastra/hono@1.7.25-alpha.13


## @mastra/koa@1.7.27-alpha.13


## @mastra/nestjs@0.3.0-alpha.13


## @mastra/next@0.2.41-alpha.13


## @mastra/tanstack-start@0.2.41-alpha.13


## @mastra/voice-google-gemini-live@0.14.19-alpha.2


## @mastra/voice-openai-realtime@0.14.9-alpha.3


## @mastra/voice-xai-realtime@0.2.18-alpha.2


## @mastra/inngest@1.11.2-alpha.9


## @mastra/temporal@0.6.0-alpha.13


## create-mastra@1.39.0-alpha.15


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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-12 12:07:03 -08:00
Daniel Lew
27705673f2
feat(server): OAuth discovery and audience checks for the built-in MCP endpoint (#29930)
## Description

Lets MCP clients such as Claude Code sign in to the built-in `/api/mcp`
endpoint with OAuth instead of a pasted token. The endpoint tells
clients where to sign in (RFC 9728 protected-resource metadata) and can
reject tokens issued for a different API (audience check).

```ts
new Mastra({
  server: {
    auth: new MastraJwtAuth({
      jwksUri: 'https://auth.example.com/.well-known/jwks.json',
      issuer: 'https://auth.example.com/',
    }),
    mcp: { oauth: { resource: 'https://my-app.example.com/api/mcp' } },
  },
});
```

### Behavior changes

**OAuth discovery for `/api/mcp`** (`@mastra/server`, every server
adapter including NestJS)
- When `server.auth` is set and the built-in MCP server is on, a `401`
from `/api/mcp` carries `WWW-Authenticate: Bearer
resource_metadata="…"`. `error="invalid_token"` is added only when a
token was sent (RFC 6750 §3).
- Metadata is served publicly at
`/.well-known/oauth-protected-resource/api/mcp` and
`/.well-known/oauth-protected-resource`, with `Cache-Control: no-store`.
- The document lists `resource`, `authorization_servers`, optional
`scopes_supported`, and `bearer_methods_supported: ['header']`. Without
`oauth.resource`, `resource` is derived from the request origin.
- The challenge, metadata routes and audience check apply only to
`/api/mcp`. Other routes are unaffected.

**Audience check** (`server.mcp.oauth.resource`)
- When set, the token audience must include this exact value, or the
request gets 401.
- An invalid value (non-URL, or a non-loopback `http://` URL) turns
discovery off and logs an error, but the audience check still runs
against it. Requests fail closed until the value is fixed.
- A provider that can't check audience (no `verifyAudience`, for example
`SimpleAuth` API keys) is accepted by default. The server logs a startup
warning on adapters built on `MastraServer`, not on NestJS.
- `requireAudience: true` (opt-in, only valid together with `resource`)
rejects those requests on `/api/mcp` with 401 `invalid_token`. Inside
`CompositeAuth`, only requests accepted by such providers are rejected.
Without `resource`, nothing changes.

**Config and provider hooks** (`@mastra/core`)
- New `server.mcp.oauth` config: `resource`, `requireAudience`,
`authorizationServers`, `scopesSupported`.
- Two new optional auth-provider methods:
  - `getOAuthMetadata()` advertises the provider's authorization server.
  - `verifyAudience()` checks the token audience.
- `CompositeAuth` combines the authorization servers of its providers.
It checks the audience with the provider that accepted the token, and
rejects when that provider can't be determined. The new
`getAuthenticatedProvider(user)` returns that provider.

**Providers**
| Provider | Advertises its authorization server | Checks audience
against `oauth.resource` |
|---|---|---|
| `MastraJwtAuth` | Yes, its `issuer` | Yes |
| Auth0 | Yes, the tenant | Yes |
| Clerk | Yes, the Frontend API | No |
| Okta | Yes, the issuer | No: Okta already enforces its own `audience`
(`OKTA_AUDIENCE`) |
| Supabase | Yes, `<url>/auth/v1` (requires Supabase's OAuth 2.1 server)
| No |

`MastraJwtAuth` gains `jwksUri` and `issuer` options
(`JWT_AUTH_JWKS_URI`, `JWT_AUTH_ISSUER`), so it can verify tokens signed
by an identity provider. JWKS keys are restricted to their key type, so
HMAC tokens forged with the public key are rejected.

**JWT subject as user id** (`@mastra/auth`, Auth0, Clerk)
- When a token has no `id` claim, the user's `id` is now set to `sub`.
Existing `id` claims are kept.
- Standard OIDC access tokens only carry `sub`. Before this change, RBAC
never loaded roles for these users, so every protected route returned
`403 Missing required permission`.
- Unless `mapUserToResourceId` is set, this also scopes data for these
users:
- **Owned records** (stored agents, skills, workspaces and other owned
records): each user sees their own records plus public ones. Admin
permissions keep the full list.
- **Tool-provider connections:** per-author connections move from the
shared `default` owner to the user's `sub`. Existing connections need
reconnecting, or set `mapUserToResourceId: () => 'default'` to keep the
old shared behavior.
  - **Feedback:** recorded with `sub` as the user id.
- The changeset describes all of these effects.

**Test suite** (`@mastra/server-adapters-test-suite`)
- New `createBuiltinMCPOAuthTestSuite`.
- The package now has `@mastra/auth` and `jose` as peer dependencies.

Stacked on #29929.

## Test plan

- `packages/server`: `src/server/mcp/oauth.test.ts` and
`oauth-without-mcp.test.ts`. They cover metadata, the challenge format,
resource validation, failing closed on an invalid `resource`, and
discovery working without `@mastra/mcp` installed.
- `packages/auth` `jwt.test.ts`:
  - JWKS and issuer validation
  - string and array `aud`
- an algorithm-confusion token that is HS256-signed with the real RSA
public key PEM and must be rejected
  - `sub` used as `id`
- `packages/core` `composite-auth.test.ts`: per-provider audience
delegation, rejection when the authenticating provider is unknown, and
`getAuthenticatedProvider`.
- `auth/auth0`, `auth/clerk`, `auth/okta`, `auth/supabase` unit tests.
- `createBuiltinMCPOAuthTestSuite` on Hono, Express, Fastify, Koa and
Elysia, plus the NestJS equivalent. It checks:
  - the challenge, and fetching the advertised metadata URL
  - audience accept and reject, including for an invalid `resource`
  - `requireAudience`:
    - `SimpleAuth` + `resource`: 200 by default, 401 in strict mode
    - a JWT with a matching audience: 200 in strict mode
    - a mixed `CompositeAuth`: only the API key is rejected
  - RBAC with a token that carries only `sub`
- that a `sub`-only user can't list another user's private stored agent
- `tsc --noEmit` and `oxlint` on the touched packages, plus docs `pnpm
check` and Vale.
- Manual run end to end with Claude Code against a local identity
provider: discovery, client registration, PKCE login, and two users with
different roles.

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-12 10:10:31 -08:00
arctic-char
c0d3bfdc43
feat: pass the authenticated user to DynamicArgument callbacks (#28612)
Dynamic agent config callbacks now get the authenticated end user as an
optional `user` argument, so you can personalize an agent without
digging auth keys out of `requestContext` yourself. It works in any
`DynamicArgument` callback: instructions, model, tools, memory,
workspace, processors, scorers, and so on.

```ts
import { Agent } from '@mastra/core/agent';

const supportAgent = new Agent({
  id: 'support-agent',
  instructions: ({ user }) =>
    user ? `You are helping ${user.name ?? user.id}.` : 'You are a helpful assistant.',
  model: ({ user }) => (user?.role === 'admin' ? 'openai/gpt-5' : 'openai/gpt-5-mini'),
  tools: ({ user }) => (user ? { accountTool, ...(user.role === 'admin' ? { adminTool } : {}) } : {}),
  memory: ({ user }) => (user ? userMemory : undefined),
});
```

`user` always has the same `MastraUser` shape, no matter which auth
provider you use, and it's `undefined` for unauthenticated requests:

```ts
import type { MastraUser } from '@mastra/core/types';

// { id: string; name?: string; email?: string; avatarUrl?: string; role?: string }
```

The server auth middleware builds it through a new overridable
`toMastraUser()` on `MastraAuthProvider`. The default handles common
shapes (`id`/`sub`/`userId`, `name`, `email`, `avatarUrl`/`picture`,
`role`), and JWT, Cloud, Supabase, Neon and Better Auth ship overrides
for their user objects. Custom providers can map their own shape:

```ts
import { MastraAuthProvider } from '@mastra/core/server';
import type { MastraUser } from '@mastra/core/types';

class MyAuth extends MastraAuthProvider<MyUser> {
  async authenticateToken(token: string) { /* ... */ }
  async authorizeUser(user: MyUser) { return true; }

  toMastraUser(user: MyUser): MastraUser {
    return { id: user.accountId, name: user.profile.displayName, role: user.permissions.primaryRole };
  }
}
```

Inline auth configs can pass `toMastraUser` too. If the provider user
has no role and an RBAC provider is configured, the primary RBAC role
fills it in, so `user.role` also works with WorkOS, Okta, Google and
Neon. The raw provider user is still available when you need
provider-specific fields, and the new context key is reserved, so
clients can't spoof it through the request body:

```ts
instructions: ({ requestContext }) => {
  const rawUser = requestContext.get('mastra__user'); // provider-specific object, unchanged
  // ...
},
```

Dynamic `vectorStore` resolvers on RAG tools get `user` as well:

```ts
createVectorQueryTool({
  indexName: 'docs',
  model: embedder,
  vectorStore: ({ user }) => (user ? tenantStores.get(user.id)! : sharedStore),
});
```

Inside core, every place that invoked a `DynamicArgument` callback
inline now goes through a single `resolveDynamicArgument` helper, which
reads the user from `requestContext` at call time. This is non-breaking:
callbacks get an extra optional field, providers get a method with a
working default. Requests served through an `MCPServer` don't get `user`
yet, since MCP builds its own request context; that's documented.

Tested with unit tests for the helper, normalization and each provider
override, middleware tests (inline config, provider role, RBAC role,
CompositeAuth ordering, unauthenticated), regression tests for the
migrated call sites, and an end-to-end test where an agent behind a fake
auth provider gets personalized instructions. Core, server, rag and the
touched auth packages typecheck clean, and their suites pass.



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

## ELI5
When a signed-in user makes a request, configuration callbacks can now
use a standard set of details about that user. When a workflow resumes,
it uses the new request’s user details instead of restoring them from
the earlier run.

## Summary
- Added optional `user` data to `DynamicArgument` callbacks and RAG
vector-store resolvers. Callbacks can also use `getRequestUser()` to
read the normalized user from request context.
- Added the `MastraUser` type and `toMastraUser()` normalization hooks
for auth providers and inline auth configs. The server stores the
normalized user in a reserved request-context key and uses the primary
RBAC role when the user has no role.
- Updated core dynamic configuration paths to use the shared resolver.
Added user support to agent scopes and migrated A2A memory resolution.
- Added `withoutLiveRequestKeys()` to remove live authentication and
authorization data from saved context during workflow resume, restart,
and time travel. Saved non-authentication context, such as tenant data,
remains available.
- Added documentation and changesets. Raised relevant `@mastra/core`
peer dependency minimums to 1.81.0. MCPServer requests do not receive
the normalized `user`.

## Validation
The author reports passing typechecks and test suites across core,
server, RAG, and several auth packages. The author also reports three
failing Inngest tests and earlier failures in evented workflow and
scheduler tests, which reportedly fail the same way on comparison
sources. These results are author-reported and have not been
independently verified.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-12 10:55:12 -05:00
dane-ai-mastra[bot]
779d2875b1
chore: version packages (alpha) (#29912)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases

> The changelog information of each package has been omitted from this
message, as the content exceeds the size limit.

## @mastra/auth-studio@1.4.0-alpha.1


## @mastra/factory@0.28.0-alpha.5


## @mastra/mcp-apps-components@0.1.0-alpha.5


## @mastra/playground-ui@69.0.0-alpha.6


## @mastra/client-js@1.60.0-alpha.5


## @mastra/react@1.15.0-alpha.5


## @mastra/deployer-cloud@1.83.0-alpha.5


## @mastra/longmemeval@1.1.42-alpha.5


## @mastra/opencode@0.1.42-alpha.5


## create-factory@0.4.3-alpha.5


## @mastra/code-sdk@1.19.0-alpha.5


## mastracode@0.50.0-alpha.5


## @mastra/agent-builder@1.2.1-alpha.2


## mastra@1.39.0-alpha.5


## @mastra/core@1.83.0-alpha.5


## @mastra/deployer@1.83.0-alpha.5


## @mastra/editor@0.17.1-alpha.3


## @mastra/mcp@2.9.0-alpha.2


## @mastra/mcp-docs-server@1.3.13-alpha.8


## @mastra/memory@1.41.1-alpha.2


## @mastra/rag@2.7.3-alpha.1


## @mastra/server@1.83.0-alpha.5


## @mastra/elysia@0.1.23-alpha.5


## @mastra/express@1.5.27-alpha.5


## @mastra/fastify@1.5.27-alpha.5


## @mastra/hono@1.7.25-alpha.5


## @mastra/koa@1.7.27-alpha.5


## @mastra/nestjs@0.3.0-alpha.5


## @mastra/next@0.2.41-alpha.5


## @mastra/server-adapters-test-suite@0.3.0-alpha.2


## @mastra/tanstack-start@0.2.41-alpha.5


## @mastra/libsql@1.30.0-alpha.2


## @mastra/turso@0.1.21-alpha.2


## @mastra/inngest@1.11.2-alpha.3


## @mastra/temporal@0.6.0-alpha.5


## create-mastra@1.39.0-alpha.5


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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-10 10:50:08 -08:00
Max Katz
b3801a79d3
feat(factory): default new factories to the Mastra Gateway (#29183)
New factories can run on the Mastra Gateway in one click instead of
bringing provider keys. Factory already signs users in with their Mastra
account, so **Connect Mastra Gateway** creates a gateway key on the
user's Mastra organization (as that user) and stores it with the
Factory's model credentials. Every `mastra/...` model then runs on the
organization's Mastra credits, and new setups start on Claude Opus 5.5.

The gateway option says what it bills and how much is left. At $0,
Factory says so where you pick the model, in Settings and on a failed
run, with **Add credits** opening the organization's add-credits page on
Mastra in a new tab (the same page the CLI uses). The balance is read
again when you come back to Factory.

## Before / After

Dark mode, local Factory signed in through local Platform. Before is
`main`.

**Choosing a provider**

| Before | After |
| --- | --- |
| <img
src="https://github.com/user-attachments/assets/9ba10a45-e43b-48c6-87ab-2093cc7bbd87"
width="420"> | <img
src="https://github.com/user-attachments/assets/51510a44-6023-4c75-ab81-42fceeb7c5de"
width="420"><br>Onboarding |
| <img
src="https://github.com/user-attachments/assets/2f5ebaab-990c-4ac6-8db2-af64bbc74c4e"
width="420"> | <img
src="https://github.com/user-attachments/assets/8696d2fd-b1f2-4b07-83bf-496de71cc538"
width="420"><br>New factory palette |
| <img
src="https://github.com/user-attachments/assets/c2493dd8-16b6-49be-8bcf-ee0b1a5974ee"
width="420"> | <img
src="https://github.com/user-attachments/assets/61b3447e-a5eb-4ca5-b928-50252c516019"
width="420"><br>Settings › Models › Add provider |
| <img
src="https://github.com/user-attachments/assets/022cb25b-de82-4834-abaf-ec76ca07b5d6"
width="420"> | <img
src="https://github.com/user-attachments/assets/a924bee2-1d76-4719-9e2c-90c86a6bd2e7"
width="420"><br>Settings, connected |

**After connecting, and at $0** (the $0 balance is stubbed locally)

| With credits | No credits left |
| --- | --- |
| <img
src="https://github.com/user-attachments/assets/a60e9bd2-bc0e-4db2-a252-b2c3fe084314"
width="420"><br>Starts on Claude Opus 5.5 | <img
src="https://github.com/user-attachments/assets/d3bce67b-3e8a-401f-80c6-63a4e7ac4d14"
width="420"><br>Add credits opens Mastra in a new tab, Continue stays
enabled |
| <img
src="https://github.com/user-attachments/assets/9f3d0b6d-1c16-4476-ac7b-fa113e0f3238"
width="420"><br>The option at $0, before connecting | <img
src="https://github.com/user-attachments/assets/f402c60d-db14-4247-9370-1ac439cdce03"
width="420"><br>Settings |
| <img
src="https://github.com/user-attachments/assets/4b58590b-80d9-427c-999e-b11576231efe"
width="420"><br>New factory palette | <img
src="https://github.com/user-attachments/assets/c60c0556-e7a6-451e-bc54-83c46646c776"
width="420"><br>A run at $0 (from Damien's stubbed run) |

## What changed

- `POST /web/config/providers/mastra/connect` creates the key on Mastra
as the signed-in user (new `MastraAuthStudio.fetchAsRequestUser`), only
when their Mastra session is on the Factory's organization, and stores
it as the scope's `mastra-gateway` credential (org-wide for admins, or
personal). Keys are labeled `Factory · Shared` or `Factory · <email>`.
`GET .../mastra/credits` reads the balance the way the dashboard does.
- Model resolution uses the tenant's own gateway key for `mastra/...`
models (the server key still works as before), web search included. The
catalog lists the gateway's models once a scope has a key.
- UI: the gateway is listed first under Recommended in onboarding, the
new factory palette and Settings, with its billing line; one-row "No
gateway credits left" warning; a gateway-specific run error for the
gateway's 402. Members who aren't Mastra admins are told to ask an
admin.

No Platform changes.

## Scope

- Adding credits happens on Mastra, not inside Factory. A shared credits
component for both is a separate piece of work.
- Factory gets its key from Gateway project provisioning
(`/v1/gateway/projects/provision`), the same v1 project key the CLI
creates, because organization (v2) keys aren't released yet. Each
connect creates a small `Factory · …` project on Mastra, and removing
the gateway in Factory doesn't revoke its key there.
- Not covered: orgs that bring their own provider keys to the gateway
(no credits needed) still see the $0 warning.
- Not verified: a model run through the hosted gateway with a key
Factory created (a local Platform key isn't valid there). Everything up
to the model call was run against local Platform.

## Testing

1. Sign in to Factory with a Mastra account. On a fresh org,
`/onboarding` › company account › Model shows Mastra Gateway with the
balance; **Connect Mastra Gateway** goes to the model picker on Claude
Opus 5.5.
2. Mastra shows a new `Factory · Shared` key; Settings › Models shows
Mastra Gateway · Key saved and `mastra/...` models in the pickers.
3. With $0, the model step, Settings and the new factory palette show
"No gateway credits left"; **Add credits** opens
`projects.mastra.ai/add-credits/<org>` in a new tab, and the warning
clears after adding credits and coming back.
4. A run on a gateway model at $0 shows "Out of Mastra Gateway credits"
with Add credits, Continue and Change model.

Fixes PLTFRM-2941



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

## ELI5

Factory users can connect Mastra Gateway and use their organization’s
Mastra credits to run models. Factory shows the available balance and
provides guidance when credits run out.

## What changed

- Added Mastra Gateway connection options to onboarding, Factory
creation, and provider settings.
- Set Claude Opus 5.5 as the preferred model for new Gateway setups.
- Added credit balance details, zero-credit warnings, an Add credits
action, and guidance for members who cannot add credits.
- Added Gateway-specific run errors and recovery options for exhausted
credits.
- Added Factory routes to create user- or organization-scoped Gateway
credentials and read credit balances. Removing a credential in Factory
does not revoke the Mastra key.
- Updated model routing so `mastra/...` models use a tenant’s stored
Gateway key when available, with the server key as fallback.
- Updated Gateway routing to skip custom-provider lookup when a model
uses Mastra Gateway.
- Added `MastraAuthStudio.fetchAsRequestUser` and Factory route support
for Platform requests made as the signed-in user.

## Validation

The PR description reports tests with a stubbed API and route tests. It
does not report verification against a live Mastra Platform or Stripe.
CI and build results are not available.

## Scope

44 files changed: 1,377 lines added and 59 removed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Damien Schneider <damien.schneider01@gmail.com>
2026-11-10 20:19:40 +04:00
dane-ai-mastra[bot]
6deb16047f
chore: version packages (alpha) (#29719)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases

> The changelog information of each package has been omitted from this
message, as the content exceeds the size limit.

## @mastra/slack@1.9.0-alpha.0


## @mastra/factory@0.28.0-alpha.3


## @mastra/code-sdk@1.19.0-alpha.3


## mastracode@0.50.0-alpha.3


## @mastra/observability@1.24.0-alpha.2


## @mastra/core@1.83.0-alpha.3


## @mastra/mcp-apps-components@0.1.0-alpha.3


## @mastra/playground-ui@69.0.0-alpha.4


## @mastra/server@1.83.0-alpha.3


## @mastra/server-adapters-test-suite@0.3.0-alpha.1


## @mastra/platform-workspace@1.13.0-alpha.0


## @mastra/auth-better-auth@1.1.11-alpha.1


## @mastra/client-js@1.60.0-alpha.3


## @mastra/react@1.15.0-alpha.3


## @mastra/deployer-cloud@1.83.0-alpha.3


## @mastra/longmemeval@1.1.42-alpha.3


## @mastra/opencode@0.1.42-alpha.3


## create-factory@0.4.3-alpha.3


## @mastra/arize@1.3.30-alpha.2


## @mastra/arthur@0.4.30-alpha.2


## @mastra/braintrust@1.3.27-alpha.2


## @mastra/datadog@1.4.22-alpha.2


## @mastra/deepeval@0.1.24-alpha.2


## @mastra/laminar@1.3.32-alpha.2


## @mastra/langfuse@1.6.6-alpha.2


## @mastra/langsmith@1.4.3-alpha.2


## @mastra/otel-bridge@1.5.22-alpha.2


## @mastra/otel-exporter@1.5.2-alpha.2


## @mastra/posthog@1.4.7-alpha.2


## @mastra/sentry@1.2.32-alpha.2


## @mastra/agent-builder@1.2.1-alpha.1


## mastra@1.39.0-alpha.3


## @mastra/connect@1.3.2-alpha.2


## @mastra/deployer@1.83.0-alpha.3


## @mastra/editor@0.17.1-alpha.2


## @mastra/fastembed@1.3.7-alpha.0


## @mastra/mcp-docs-server@1.3.13-alpha.6


## @mastra/memory@1.41.1-alpha.1


## @mastra/elysia@0.1.23-alpha.3


## @mastra/express@1.5.27-alpha.3


## @mastra/fastify@1.5.27-alpha.3


## @mastra/hono@1.7.25-alpha.3


## @mastra/koa@1.7.27-alpha.3


## @mastra/nestjs@0.3.0-alpha.3


## @mastra/next@0.2.41-alpha.3


## @mastra/tanstack-start@0.2.41-alpha.3


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


## @mastra/pg@1.36.0-alpha.2


## @mastra/inngest@1.11.2-alpha.2


## @mastra/temporal@0.6.0-alpha.3


## create-mastra@1.39.0-alpha.3


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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-10 10:33:29 +01:00
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[bot]
f21e0742ce chore: version packages 2026-11-07 04:18:11 +00:00
mastra-platform[bot]
4045b99c0b
fix(auth-neon): support hosted Neon Auth and document integration (#29633)
## Summary
- Correct Neon Auth session, JWT, and credential flows for hosted Neon
projects; make Studio sign-in, sign-up, and sign-out functional.
- Resolve Neon organization membership roles for Mastra RBAC, with local
HTTP integration coverage and optional live-project testing.
- Add an auth integration guide and update the Neon reference
documentation.

Original contribution by Rishi Raj Jain; his commit authorship is
preserved.

## Test plan
- `pnpm --filter @mastra/auth-neon test` (17 passed)
- `pnpm --filter @mastra/auth-neon build`
- `pnpm --filter @mastra/auth-neon exec tsc --noEmit`
- `pnpm --filter @mastra/auth-neon lint`
- `pnpm --dir docs validate`
- `pnpm exec remark --no-stdout --frail --quiet
src/content/en/integrations/auth/neon.mdx
src/content/en/reference/auth/neon.mdx` (from docs/)

Live Neon project testing requires Neon credentials and was not rerun
here.

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

## ELI5

This change helps Mastra sign users in to hosted Neon Auth and keep
their sessions working. It also lets Neon organization membership affect
access and adds guides for setting up the integration.

## Summary

- Updated `@mastra/auth-neon` to support hosted Neon Auth endpoints, JWT
verification, session cookies, sign-in, sign-up, and sign-out.
- Added organization membership role lookup for RBAC, with a
configurable `getUserRoles` override.
- Added local integration tests and optional tests against a live Neon
project.
- Added a Neon integration guide and updated the Neon reference
documentation.
- Changed 14 files, with 1,331 lines added and 1,081 lines removed.

## Checks

Results for tests, build, typecheck, lint, and documentation checks on
the current head: not available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Rishi Raj Jain <jain71000@gmail.com>
Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-06 13:20:33 -08:00
Damien Schneider
cb2b399294
perf(factory-ui): load each page's data and code alongside the sign-in check (#29434)
## Description

Opening a Factory page used to run its waits one after another. First
`/auth/me`, then `/web/factory/projects`, then the page's code, then the
page's own requests: the sidebar's sessions, boards, work items and
decisions, and the board's intake settings and connection status. All of
those only need the Factory id from the URL, or the Factory list.

Now React Router loaders (`src/ui/routeLoaders.ts`) start them. When a
route is entered, its loader starts the queries its element reads and
returns without waiting. It uses the same `queryOptions` as the hook
that reads the data, so the component finds the request already in
flight. The router runs every matched route's loader at once.

- **Under `RootGuards`** (a pathless route): the Factory list.
`RootGuards` still renders in the first frame, and `AuthGuard` sends
`/auth/me` itself. It refetches on every mount to watch the session, so
prefetching the check could fetch it twice.
- **`FactoryLayout`:** session runs, once the list shows the Factory has
a linked repository. That's the same `hasLinkedRepository` rule the
layout uses.
- **`AppLayout`, outside Settings:** the sidebar's features, boards,
sessions, work items, decisions and active runs. Settings uses the same
`isSettingsPath` rule as the sidebar.
- **Work, Review and custom boards:** intake config, intake bindings,
and the GitHub, GitLab, Linear, Jira and incident.io statuses, once the
Factory has a linked repository.
- **Lazy pages:** their code. Rules also starts its decisions for the
current `?group=`, and the new-session routes start the composer's
project, default model and providers.

Some requests stay with the components that read them, so the router
never copies a component's logic. These are the ones keyed by another
response or by state a component resolves:
- the board's issue and PR lists, recent activity and label routes;
- the composer's model list;
- the chat permissions;
- each Settings section's data;
- the feed stream.

Loaders run only when their route is entered. By the next navigation the
components are mounted and fetch for themselves in the same render.
Gating, layouts and screens are unchanged. Without the new `services`
argument, as in most tests, `createAppRoutes()` declares no loaders.

React best practices: shared query options guard a missing id with
`skipToken`, not `enabled` and `id!` (`prefetchQuery` ignores
`enabled`). There are no `as` casts, and loaders return nothing instead
of `null`. `main.tsx` builds one `ApiConfig` for both the router and
`ApiConfigProvider`, which now takes it as `config`. The API client
reads the global `fetch` per request instead of capturing it when the
client is created.

**`@mastra/auth-studio`:** concurrent verifications of the same session
cookie now share one call to the platform's `/auth/me`. With the startup
requests leaving together, each used to verify the cookie on its own.
With an expired session, each also tried to refresh it with the same
refresh token, so every request but the first failed. The merge is keyed
by the cookie, so only requests carrying the identical cookie share an
answer. Each request still gets its own renewed `Set-Cookie`. This is
tested against a real HTTP server that refuses a reused refresh token.

**Access:** prefetching changes when the browser asks, not what it may
receive. Every prefetched Factory endpoint goes through the auth gate
(401 when signed out). It resolves the caller's organization and looks
the Factory up within it (`projects.get({ orgId, id })`), returning 404
otherwise. The sessions list also filters private sessions by viewer.
Nothing renders before both checks pass.

I measured in Chromium against the built app, from when the startup
script finishes running. `/auth/me` starts at the same time as on
`main`. The Factory list starts during the startup script instead of 640
ms after it. The sidebar's requests start with it instead of after both
checks. The routes manifest is unchanged, and the startup bundle grows
by 0.8 KB gzipped.

`AppStartup.msw.test.tsx` drives the real routes, query client and
loaders with a repository-linked Factory. It covers Work, Review, a
custom board, Rules, new and draft sessions, Settings, a Factory without
a repository, and a link without a Factory. On each it checks three
things: nothing starts after `/auth/me` answers except the requests
listed above, nothing is sent twice, and every prefetched query is read
by the page. It also checks that a visitor who signs in from another tab
never sees "Unable to load your factories". I broke the loaders seven
ways and each one made it fail. It passed 20 runs out of 20.

The full MSW suite passes except 5 tests that fail on `main` too
(`BoardPageProviderFacts`, `SessionsSectionGroups`, `KnowledgePage`).
factory-ui unit tests (585) and the `auth-studio` suite (140) pass.

## Related issue(s)

No issue. Follow-up to https://github.com/mastra-ai/mastra/pull/29322.

## Type of change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [x] Performance improvement
- [ ] 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

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01VhgyDUZnNc7MLonrGJtR33

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

## ELI5

The app starts loading page code and data while it checks whether the
user is signed in. This can reduce the wait before a page is ready.
Concurrent requests that use the same session cookie can share one
sign-in check, while each request still gets its own renewed cookie.

## What changed

- Added route loaders that start page preloads and data queries on route
entry without waiting for them to finish. Loaders do not revalidate;
page components continue to manage their data.
- Added shared query-option builders so loaders and page hooks use the
same query definitions.
- Added prefetching for Factory data, sidebar data, board intake
settings and connection status, composer data, and Rules decisions.
Loaders skip requests when required IDs or repository information are
missing. Sidebar prefetching is skipped on Settings paths.
- Kept `/auth/me` out of the loaders because `AuthGuard` checks it on
mount.
- Updated API configuration so the app shares one config between the
router and API provider.
- Encoded Factory IDs in the board catalog URL.
- Coalesced concurrent session checks for the same credential. Added
tests for concurrent verification and cookie renewal.
- Added changeset notes for the Factory startup loading changes and the
auth-studio session-check fix.

## Validation

The PR description reports 20 successful runs of
`AppStartup.msw.test.tsx`, 585 passing factory-ui unit tests, and 140
passing auth-studio tests. It also reports five failures in the full MSW
suite, which the author says also occur on `main`.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-05 16:46:42 +01:00
dane-ai-mastra[bot]
675caf0613
chore: version packages (alpha) (#29336)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases

> The changelog information of each package has been omitted from this
message, as the content exceeds the size limit.

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


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


## @mastra/factory@0.28.0-alpha.0


## @mastra/code-sdk@1.19.0-alpha.0


## mastra@1.39.0-alpha.0


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


## @mastra/mcp@2.9.0-alpha.0


## @mastra/mcp-apps-components@0.1.0-alpha.0


## @mastra/playground-ui@69.0.0-alpha.0


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


## @mastra/nestjs@0.3.0-alpha.0


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


## @mastra/duckdb@1.19.0-alpha.0


## @mastra/libsql@1.30.0-alpha.0


## @mastra/pg@1.36.0-alpha.0


## @mastra/temporal@0.6.0-alpha.0


## @mastra/auth-better-auth@1.1.11-alpha.0


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


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


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


## @mastra/deployer-sandbox@0.3.27-alpha.0


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


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


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


## create-factory@0.4.3-alpha.0


## mastracode@0.49.1-alpha.0


## @mastra/arize@1.3.30-alpha.0


## @mastra/arthur@0.4.30-alpha.0


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


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


## @mastra/deepeval@0.1.24-alpha.0


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


## @mastra/langfuse@1.6.6-alpha.0


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


## @mastra/observability@1.23.2-alpha.0


## @mastra/otel-bridge@1.5.22-alpha.0


## @mastra/otel-exporter@1.5.2-alpha.0


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


## @mastra/sentry@1.2.32-alpha.0


## @mastra/agent-builder@1.2.1-alpha.0


## @mastra/connect@1.3.2-alpha.0


## create-mastra@1.39.0-alpha.0


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


## @mastra/editor@0.17.1-alpha.0


## @mastra/mcp-docs-server@1.3.13-alpha.0


## @mastra/memory@1.41.1-alpha.0


## @mastra/rag@2.7.3-alpha.0


## @mastra/redis-streams@0.8.1-alpha.0


## @mastra/elysia@0.1.23-alpha.0


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


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


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


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


## @mastra/next@0.2.41-alpha.0


## @mastra/tanstack-start@0.2.41-alpha.0


## @mastra/spanner@1.11.2-alpha.0


## @mastra/turso@0.1.21-alpha.0


## @mastra/inngest@1.11.2-alpha.0


## @mastra/gcs@0.3.6-alpha.0


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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-04 14:40:27 -08:00
shreyas-mastra
b6dd5da728
chore(deps): bump @google-cloud/spanner, better-auth and follow-redirects (#29052) 2026-11-04 07:59:04 -08:00
dane-ai-mastra[bot]
77076a1012 chore: version - exit prerelease mode 2026-10-30 23:02:25 +00:00
dane-ai-mastra[bot]
4f12792ed1
chore: version packages (alpha) (#28722)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-29 08:37:01 -07:00
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[bot]
6a191d46dc chore: version - exit prerelease mode 2026-10-28 13:15:52 +00:00
dane-ai-mastra[bot]
2c646b53d0
chore: version packages (alpha) (#28399)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases

> The changelog information of each package has been omitted from this
message, as the content exceeds the size limit.

## @mastra/factory@0.25.0-alpha.5


## @mastra/langsmith@1.4.0-alpha.2


## @mastra/connect@1.2.0-alpha.2


## @mastra/core@1.80.0-alpha.4


## @mastra/playground-ui@66.0.0-alpha.4


## @mastra/acp@0.4.4-alpha.0


## @mastra/claude@0.3.4-alpha.0


## @mastra/cursor@0.3.4-alpha.0


## @mastra/openai@1.1.4-alpha.0


## @mastra/auth-auth0@1.2.6-alpha.0


## @mastra/auth-better-auth@1.1.9-alpha.0


## @mastra/auth-clerk@1.3.2-alpha.0


## @mastra/auth-cloud@1.2.8-alpha.0


## @mastra/auth-firebase@1.1.5-alpha.0


## @mastra/auth-google@0.1.7-alpha.0


## @mastra/auth-neon@0.3.5-alpha.0


## @mastra/auth-okta@0.2.6-alpha.0


## @mastra/auth-studio@1.3.11-alpha.1


## @mastra/auth-supabase@1.1.6-alpha.0


## @mastra/auth-workos@1.6.8-alpha.0


## @mastra/agent-browser@0.5.5-alpha.0


## @mastra/browser-viewer@0.2.6-alpha.0


## @mastra/browser-firecrawl@0.2.5-alpha.1


## @mastra/stagehand@0.3.7-alpha.1


## @mastra/discord@1.3.2-alpha.0


## @mastra/slack@1.8.0-alpha.1


## @mastra/teams@0.1.3-alpha.0


## @mastra/telegram@0.2.4-alpha.0


## @mastra/client-js@1.57.0-alpha.4


## @mastra/react@1.13.0-alpha.4


## @mastra/isolated-vm@0.1.4-alpha.0


## @mastra/quickjs@0.1.5-alpha.0


## @mastra/deployer-cloud@1.80.0-alpha.4


## @mastra/deployer-cloudflare@1.2.39-alpha.1


## @mastra/deployer-netlify@1.2.39-alpha.1


## @mastra/deployer-sandbox@0.3.24-alpha.1


## @mastra/deployer-vercel@1.2.39-alpha.1


## @mastra/voyageai@0.4.3-alpha.0


## @mastra/longmemeval@1.1.39-alpha.4


## @mastra/livekit@0.5.2-alpha.0


## @mastra/opencode@0.1.39-alpha.4


## @mastra/parallel@0.1.4-alpha.0


## create-factory@0.3.1-alpha.4


## @mastra/code-sdk@1.15.1-alpha.5


## mastracode@0.48.1-alpha.4


## @mastra/arize@1.3.27-alpha.2


## @mastra/arthur@0.4.27-alpha.2


## @mastra/braintrust@1.3.24-alpha.2


## @mastra/datadog@1.4.19-alpha.2


## @mastra/deepeval@0.1.21-alpha.2


## @mastra/laminar@1.3.29-alpha.2


## @mastra/langfuse@1.6.3-alpha.2


## @mastra/observability@1.21.1-alpha.2


## @mastra/otel-bridge@1.5.19-alpha.2


## @mastra/otel-exporter@1.4.10-alpha.2


## @mastra/posthog@1.4.4-alpha.2


## @mastra/sentry@1.2.29-alpha.2


## @mastra/agent-builder@1.1.31-alpha.2


## @mastra/auth@1.1.5-alpha.0


## mastra@1.36.0-alpha.4


## @mastra/codemod@1.1.8-alpha.0


## create-mastra@1.36.0-alpha.4


## @mastra/deployer@1.80.0-alpha.4


## @mastra/editor@0.16.5-alpha.2


## @mastra/evals@1.10.9-alpha.0


## @mastra/fastembed@1.3.5-alpha.2


## @mastra/loggers@1.3.10-alpha.1


## @mastra/mcp@2.6.0-alpha.1


## @mastra/mcp-docs-server@1.3.10-alpha.7


## @mastra/mcp-registry-registry@1.1.7-alpha.0


## @mastra/memory@1.39.1-alpha.2


## @mastra/rag@2.7.1-alpha.0


## @mastra/schema-compat@1.3.17-alpha.0


## @mastra/server@1.80.0-alpha.4


## @mastra/google-cloud-pubsub@1.1.5-alpha.1


## @mastra/redis-streams@0.6.5-alpha.1


## @mastra/valkey-streams@0.5.7-alpha.1


## @mastra/elysia@0.1.20-alpha.4


## @mastra/express@1.5.24-alpha.4


## @mastra/fastify@1.5.24-alpha.4


## @mastra/hono@1.7.22-alpha.4


## @mastra/koa@1.7.24-alpha.4


## @mastra/nestjs@0.2.39-alpha.4


## @mastra/next@0.2.38-alpha.4


## @mastra/server-adapters-test-suite@0.1.4-alpha.2


## @mastra/tanstack-start@0.2.38-alpha.4


## @mastra/astra@1.1.3-alpha.0


## @mastra/azure-ai-search@0.1.2-alpha.1


## @mastra/chroma@1.1.5-alpha.0


## @mastra/clickhouse@1.27.0-alpha.1


## @mastra/cloudflare@1.7.6-alpha.0


## @mastra/cloudflare-d1@1.4.5-alpha.1


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


## @mastra/couchbase@1.1.4-alpha.1


## @mastra/dsql@1.5.5-alpha.0


## @mastra/duckdb@1.16.0-alpha.1


## @mastra/dynamodb@1.4.5-alpha.1


## @mastra/elasticsearch@1.4.6-alpha.1


## @mastra/lance@1.5.2-alpha.1


## @mastra/libsql@1.27.1-alpha.0


## @mastra/mongodb@1.24.1-alpha.1


## @mastra/mssql@1.10.6-alpha.0


## @mastra/mysql@0.14.1-alpha.0


## @mastra/opensearch@1.1.4-alpha.1


## @mastra/oracledb@0.5.5-alpha.0


## @mastra/pg@1.33.0-alpha.2


## @mastra/pinecone@1.1.3-alpha.0


## @mastra/qdrant@1.1.6-alpha.0


## @mastra/redis@1.4.12-alpha.1


## @mastra/s3vectors@1.1.5-alpha.0


## @mastra/spanner@1.10.1-alpha.1


## @mastra/turbopuffer@1.2.3-alpha.0


## @mastra/turso@0.1.18-alpha.0


## @mastra/upstash@1.5.5-alpha.1


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


## @mastra/vectorize@1.1.4-alpha.0


## @mastra/weaviate@0.1.4-alpha.0


## @mastra/voice-aws-nova-sonic@0.2.6-alpha.0


## @mastra/voice-azure@0.12.3-alpha.0


## @mastra/voice-cloudflare@0.13.4-alpha.0


## @mastra/voice-deepgram@0.13.3-alpha.0


## @mastra/voice-elevenlabs@0.13.3-alpha.0


## @mastra/voice-gladia@0.13.3-alpha.0


## @mastra/voice-google@0.14.4-alpha.0


## @mastra/voice-google-gemini-live@0.14.18-alpha.0


## @mastra/voice-inworld@0.4.6-alpha.0


## @mastra/voice-mistral@0.1.3-alpha.0


## @mastra/voice-modelslab@0.2.3-alpha.0


## @mastra/voice-murf@0.13.3-alpha.0


## @mastra/voice-openai@0.13.4-alpha.0


## @mastra/voice-openai-realtime@0.14.8-alpha.0


## @mastra/voice-playai@0.13.3-alpha.0


## @mastra/voice-sarvam@1.1.4-alpha.0


## @mastra/voice-speechify@0.14.3-alpha.0


## @mastra/voice-xai-realtime@0.2.17-alpha.0


## @mastra/inngest@1.10.8-alpha.3


## @mastra/temporal@0.4.18-alpha.4


## @mastra/agentcore@0.5.3-alpha.0


## @mastra/agentfs@0.2.3-alpha.0


## @mastra/apple-container@0.5.2-alpha.0


## @mastra/archil@0.3.2-alpha.0


## @mastra/azure@0.3.3-alpha.1


## @mastra/blaxel@0.10.2-alpha.0


## @mastra/cloudflare-sandbox@0.5.4-alpha.0


## @mastra/daytona@0.11.4-alpha.0


## @mastra/docker@0.12.1-alpha.0


## @mastra/e2b@0.15.1-alpha.1


## @mastra/e2b-desktop@0.1.10-alpha.1


## @mastra/files-sdk@0.3.3-alpha.0


## @mastra/gcs@0.3.5-alpha.1


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


## @mastra/mesa@0.3.3-alpha.0


## @mastra/modal@0.7.3-alpha.0


## @mastra/platform-workspace@1.10.0-alpha.1


## @mastra/railway@0.10.2-alpha.1


## @mastra/s3@0.6.5-alpha.1


## @mastra/sprites@0.1.2-alpha.0


## @mastra/vercel@1.6.2-alpha.0


## @internal/playground@1.36.0-alpha.4

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-26 13:49:15 -07:00
Ward Peeters
ce5d4731ee
chore(deps): update dependencies across the monorepo (#28417)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-26 16:59:30 +01:00
dane-ai-mastra[bot]
dacb190944
chore: version packages (alpha) (#28009)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-23 13:57:18 +02:00
shreyas-mastra
2ac8cf1435
fix(auth-studio): issue host-only Studio session cookie (#28168) 2026-10-22 13:32:45 -04:00
Dane - AI (Mastra)
40a522c142
chore(deps): update build tools (#27997) 2026-10-22 14:33:21 +02:00
Damien Schneider
e5c433b792
refactor(lint): prefer explicit reduce accumulator types (#27984)
Enable `typescript/prefer-reduce-type-parameter` across the repository,
including tests, and move 31 accumulator assertions across 24 files into
explicit `reduce<T>` arguments. For example, `items.reduce(callback, {}
as Record<string, string>)` becomes `items.reduce<Record<string,
string>>(callback, {})`. Emitted JavaScript ASTs match for every
migrated file, and 66 reducer return/accumulator type snapshots remain
equivalent.

Adds monorepo coverage that executes exports from multiple optimized
dependencies through the built HTTP server. CI lint/formatting, all 14
affected package typechecks, 235 focused tests, and the 55-task
publish-root build pass. All 81 monorepo E2E cases passed across the
full run and a 19-case targeted retry; retries disabled telemetry and
used writable package-manager caches after DNS/cache failures and a
shutdown timeout. No production changes were needed for that test setup.

This maintenance PR intentionally includes no changeset and requests no
package releases. The Changesets status check may therefore fail. The
follow-up commit removes only release metadata; source code and tests
are unchanged from the validated revision.


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

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

## ELI5

This PR updates TypeScript code to state reducer result types more
clearly. It keeps the same runtime behavior and adds a test for
optimized dependencies in the monorepo build.

## Summary

- Enabled `typescript/prefer-reduce-type-parameter` for TypeScript
files, including tests.
- Replaced 31 reducer accumulator assertions across 24 files with
explicit `reduce<T>` type parameters.
- Added monorepo E2E coverage for `lodash` and `date-fns` imports
through the built HTTP server.
- Removed release changesets because this maintenance change does not
require package releases.
- Reported validation includes linting, formatting, 14 package
typechecks, 235 focused tests, the publish-root build, and all 81
monorepo E2E cases.
- Reported JavaScript ASTs and 66 reducer type snapshots remain
equivalent.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-22 12:10:17 +02:00
Damien Schneider
fbd27197d7
refactor(lint): simplify literal strings and const assertions (#27982)
Enable `no-useless-concat` and `typescript/prefer-as-const` in the
shared Oxlint config. Simplify 15 string concatenations and use const
assertions for four readonly SDK specification versions. Existing
package filters stay as configured.

String contents and expression evaluation order are preserved, and the
SDK fields keep their readonly `v1`–`v4` literal types. A documented
exception keeps NUL-delimited fixture records separate so the next
record’s leading digit cannot become an octal escape.

261 focused tests pass. A fresh scan clears both rules across 14,747
files, and emitted-JavaScript and declaration comparisons preserve
values and public field types. [CI lint and formatting
pass](https://github.com/mastra-ai/mastra/actions/runs/39583377036/job/119166317139)
for `93eb6e19d5`. The full core typecheck also passes after refreshing
workspace dependency declarations.

This maintenance PR intentionally includes no changeset and requests no
package releases. The Changesets status check may therefore fail. The
follow-up commit removes only release metadata; source code and tests
are unchanged from the validated revision.


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

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

## ELI5

This PR enables two lint rules and updates existing code to follow them.
It keeps the same runtime behavior, string values, and SDK version
types.

## Changes

- Enables `no-useless-concat` and `typescript/prefer-as-const` in
`oxlint.config.ts`.
- Simplifies 15 unnecessary string concatenations.
- Adds const assertions for the readonly SDK specification versions `v1`
through `v4`.
- Documents the intentional NUL-delimited fixture concatenation in
`mastracode/factory/src/routes/fs.test.ts`.
- Preserves public APIs, emitted values, evaluation order, and literal
types.

## Validation

- 261 focused tests pass.
- A fresh scan clears both lint rules across 14,747 files.
- Emitted JavaScript and declaration comparisons preserve values and
public field types.
- Core typecheck passes after refreshing workspace dependency
declarations.
- CI lint and formatting checks pass.

No changeset or package release is included because this is a
maintenance change.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-21 19:10:56 +02:00
dane-ai-mastra[bot]
4c22623ea3 chore: version - exit prerelease mode 2026-10-21 11:26:39 +00:00
Max Katz
9a423dae48
refactor(lint): replace ESLint with type-aware oxlint (#27476) 2026-10-18 10:38:35 -07:00
dane-ai-mastra[bot]
a15924e709 chore: version packages 2026-10-16 04:04:12 +00:00
dane-ai-mastra[bot]
f88217d19b chore: version - exit prerelease mode 2026-10-14 05:19:31 +00:00
dane-ai-mastra[bot]
e45f83981a chore: version packages 2026-10-13 16:05:23 +00: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
dane-ai-mastra[bot]
81299c921d chore: version - exit prerelease mode 2026-10-11 16:59:51 +00:00
dane-ai-mastra[bot]
1a363be7df chore: version packages 2026-10-09 04:08:19 +00:00
Ryan Hansen
9a511a4ff5
fix(auth-studio): keep Studio/Factory sessions alive for the full session length (#26447)
## Problem

Users of deployed Studios and Factories (e.g. Shipyard) get signed out
roughly once a day, even while active. Reported as FACT-382: an idle
Factory tab that, on the next click, landed on the login screen.

Verified against Shipyard (prod) on 2026-10-08:

- The `wos-session` cookie on `*.mastra.cloud` expires exactly **24h
after sign-in**. `MastraAuthStudio` hardcoded `Max-Age=86400`. Our
WorkOS config allows a 14-day max session with a 5-day inactivity
timeout.
- Nothing ever extended that cookie. 19 Factory requests over ~9
minutes, past the 5-minute access-token expiry, returned **zero
`Set-Cookie`**.
- The shared API *does* renew the session on `/auth/me` and returns a
new cookie. `MastraAuthStudio` discarded it, and it was scoped to
`mastra.ai`, which browsers on `*.mastra.cloud` reject anyway.
- Even a forwarded cookie wouldn't reach the browser on most paths:
- Platform-deployed Studios wrap the provider in `CompositeAuth`, which
didn't pass provider headers through.
- Factory authenticates every request in its own auth gate, which
doesn't implement session refresh.
- 122 of Factory's 161 routes are declared `requiresAuth: false` and
authenticate in the handler via `ensureFactoryAuthUser`. The framework
skips user middleware on those routes (`skipIfFrameworkPublic`, #20989),
so the gate never runs there either.

## Changes

- **`@mastra/auth-studio`**
- The session lifetime is configurable via `sessionMaxAgeSeconds` or
`MASTRA_SESSION_MAX_AGE`, default **14 days**. It applies to the cookie
`Max-Age` and every `Session.expiresAt`. It's configurable rather than a
constant because deployed Studios pin framework versions and Platform
needs to control the value.
  - When `/auth/me` returns a renewed cookie, the provider:
- re-issues it with the deployment's own cookie attributes (domain,
Secure, Max-Age)
    - invalidates the 30s verification-cache entry for the old cookie
- remembers the renewed cookie (not the used-up one) for organization
calls such as `ensureOrganization`
- exposes it through a new optional
`consumePendingResponseHeaders(request)` hook
- `getCurrentUser` passes the request through, so renewals on that path
are captured too.
- **`@mastra/server`**
- The auth middleware merges pending provider headers into the response,
including after its own refresh-and-retry, where it reads them from the
retry request.
- The public `GET /auth/me` route forwards them too, since the
middleware skips public routes.
- **`CompositeAuth`** (`@mastra/core`) delegates
`consumePendingResponseHeaders` to inner providers and merges the
results.
- **`@mastra/factory`**: both the auth gate and `ensureFactoryAuthUser`
forward pending headers, so gated and `requiresAuth: false` routes both
renew the cookie.

All forwarding is optional-chained and wrapped in try/catch, so any mix
of package versions is safe, and a failure to forward headers can never
turn into a 401.

## Testing

### Unit
Every new behavior has a regression test that fails without its change.

| Package | Result | New coverage |
|---|---|---|
| auth-studio | 125/125 | domain rewrite (`Domain=mastra.ai` →
`.mastra.cloud`); max-age option, env var, invalid-env fallback; cache
invalidation on rotation; renewed cookie used for org calls;
`getCurrentUser` exposes the renewal |
| server auth helpers | 95/95 | headers stashed against the raw Request
are emitted via the adapted request; renewal during the post-refresh
retry is forwarded; a throwing hook doesn't break auth |
| server auth handlers | 27/27 | `GET /auth/me` forwards pending
headers; a throwing hook still returns the user |
| `CompositeAuth` | 8/8 | delegation and merging; a throwing inner
provider is ignored |
| Factory auth | 56/56 | gate forwarding; `ensureFactoryAuthUser`
forwarding on an ungated route; a throwing hook still returns 200 |

A harness against the real `@mastra/deployer` Hono server with the
snapshot Factory auth confirmed the `requiresAuth: false` gap, and that
the `ensureFactoryAuthUser` change closes it.

### Staging (snapshot `0.0.0-fix-set-cookie-20261008222303`)

Factory deployed to staging Platform with this PR's snapshot.

- **Sign-in:** the cookie's Expires was ~14 days out (was 24h on
Shipyard).
- **After the 5-minute access-token expiry:**

  ```
  GET /web/factory/projects → 200
set-cookie: wos-session=…; HttpOnly; SameSite=Lax; Path=/;
Max-Age=1209600; Secure; Domain=.mastra.cloud
  ```

| Route (after access-token expiry) | Previous snapshot (gate only) |
This PR |
|---|---|---|
| `/web/factory/projects` (most-polled) | ❌ | ✅ |
| `/web/gitlab/issues`, `/web/gitlab/subscriptions` | ❌ | ✅ |
| `/web/audit/portal-link`, `/web/custom-jira`, `/web/custom/status` | ✅
| ✅ |
| `/api/agents`, `/api/workflows` | ✅ | ✅ |

Not renewed, and not needed:
- `/` is the SPA shell. It loads without auth, and the API calls it
makes do the renewing.
- Two GitLab routes returned 502 because the test Factory has no GitLab
connection.

## Follow-ups

- A Platform PR to set `MASTRA_SESSION_MAX_AGE` on Studio/Factory
deploys, so Platform controls the value.
- The Factory gate should return 503 instead of a sign-out on
verification errors or timeouts.


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

Studio and Factory users could be signed out even when they were still
using the service. This change lets Studio sessions last longer and
sends renewed login cookies back to the browser so users can stay signed
in.

## Summary

- Set the default Studio session lifetime to 14 days. Configure it with
`sessionMaxAgeSeconds` or `MASTRA_SESSION_MAX_AGE`.
- When `/auth/me` renews a `wos-session` cookie, reissue it with the
deployment’s cookie attributes and invalidate the old cookie’s
verification-cache entry.
- Add `consumePendingResponseHeaders` to expose renewed cookies. Forward
pending headers through server auth middleware, `CompositeAuth`, Factory
auth paths, and the public `GET /auth/me` route.
- Ignore errors from the optional header-forwarding hook so they do not
block authentication.
- Add tests for session lifetime configuration, cookie rotation, cache
invalidation, and header forwarding.

## Validation

The supplied PR summary reports passing tests: auth-studio 125/125,
server auth helpers 95/95, server auth handlers 27/27, `CompositeAuth`
8/8, and Factory auth 56/56. It also reports a staging Factory probe and
a harness using the real `@mastra/deployer` Hono server. 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>
2026-10-08 17:16:21 -07:00
dane-ai-mastra[bot]
b10b70fd77 chore: version - exit prerelease mode 2026-10-07 08:40:03 +00:00
dane-ai-mastra[bot]
8cacbf7267 chore: version packages 2026-10-03 04:12:02 +00:00
shreyas-mastra
022cae93cb
fix(auth): remove node-forge (okta SDK -> fetch, firebase-admin 14) (#25829)
node-forge 1.4.0 is the newest release and is affected by CVE-2026-85393
(RSA PKCS#1 v1.5 signature forgery). There is no patched version, so the
only fix is to stop depending on it. This clears 3 open Vanta findings
(2 on the mastra-ai/mastra asset, 1 from Aikido).

It came in four ways:

- Root and `docs` package.json listed `node-forge` directly. These were
old Dependabot floors from #11359 and #14754. Nothing imports it, so
they're removed.
- `firebase-admin` 13 depended on it. v14 doesn't, but v14 also removed
the namespaced `admin.*` API, so `@mastra/auth-firebase` now uses
`firebase-admin/app` and `firebase-admin/auth`. It requires Node >= 22,
which the package already does.
- `@okta/okta-sdk-nodejs` -> `node-jose` -> `node-forge`. The latest
Okta SDK still has this chain. `MastraRBACOkta` only used the SDK for
`userApi.listUserGroups`, so it now calls `GET /api/v1/users/:id/groups`
with `fetch` and the same `SSWS` token header that
`MastraAuthOkta.getUser` already uses. It follows `Link: rel="next"`
pagination, but only to the configured org's origin, so the token never
goes anywhere else.

After this PR, `node-forge`, `node-jose` and `@okta/okta-sdk-nodejs` are
gone from `pnpm-lock.yaml`.

Testing: auth-okta and auth-firebase unit tests pass locally (I added
tests for pagination, the cross-origin guard, error retry and the ADC
fallback), and both packages build and typecheck.


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

## ELI5

This change removes packages that pull in `node-forge`, which the PR
reports has no patched release for the cited security issue. It keeps
Firebase authentication working with the newer Firebase Admin package
and fetches Okta groups directly from Okta.

## Changes

- Upgraded `firebase-admin` to `^14.5.0` and switched
`@mastra/auth-firebase` to modular Firebase Admin APIs. The provider
uses application-default credentials when no service account is
configured.
- Removed `@okta/okta-sdk-nodejs` from `@mastra/auth-okta`.
`MastraRBACOkta` now fetches group pages from Okta’s REST API and
follows pagination links only when they match the configured
organization’s origin.
- Removed direct `node-forge` dependencies from the root and docs
manifests. The supplied dependency search found no references to
`node-forge`, `node-jose`, or `@okta/okta-sdk-nodejs` in the lockfile.
- Added changesets for `@mastra/auth-firebase` and `@mastra/auth-okta`.

## Tests

The PR objectives report that auth-okta and auth-firebase unit tests
passed locally, and that both packages built and typechecked. These
results were not independently verified here.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-02 14:19:49 -04:00
dane-ai-mastra[bot]
8b35a6c1d6 chore: version - exit prerelease mode 2026-10-01 08:22:20 +00:00
dane-ai-mastra[bot]
de967f00ab chore: version packages 2026-10-01 04:06:35 +00:00
arctic-char
7b3ddfad10
fix(auth-studio): fall back to .mastra-project.json for organizationId (#25583)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-09-30 10:01:38 -07:00
dane-ai-mastra[bot]
5306a14346 chore: version - exit prerelease mode 2026-09-29 23:50:38 +00:00
dane-ai-mastra[bot]
81817c032a chore: version packages 2026-09-28 04:06:31 +00:00
mastra-platform[bot]
285828ec03
fix(auth-workos): keep single-membership organization for cookie sessions (#25264)
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-09-27 15:00:11 -07:00
dane-ai-mastra[bot]
6721bffd7e chore: version - exit prerelease mode 2026-09-24 23:17:52 +00:00
mastra-platform[bot]
666f01ddc0
fix(auth-google): keep Google SSO sessions valid for cookieMaxAge (#25043)
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-09-24 15:30:22 -07:00
dane-ai-mastra[bot]
a436d6c513 chore: version - exit prerelease mode 2026-09-23 09:15:38 +00:00
dane-ai-mastra[bot]
b6df015ee8 chore: version packages 2026-09-22 16:05:21 +00:00
Ward Peeters
ac05f2d7fc
refactor(auth): adopt Web Crypto without async API breaks (#24583) 2026-09-22 15:57:49 +02:00
dane-ai-mastra[bot]
429d7b9f93 chore: version - exit prerelease mode 2026-09-22 10:43:03 +00:00
dane-ai-mastra[bot]
a0f543a216 chore: version packages 2026-09-17 04:05:56 +00:00
mastra-platform[bot]
0aa22af31c
Restrict Clerk Studio login to a single organization (#24188)
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-09-16 11:45:35 -07:00