2025-04-08 11:18:16 +01:00
|
|
|
|
|
|
|
|
|
2025-04-09 10:39:47 +01:00
|
|
|
|
2025-06-03 15:00:52 +03:00
|
|
|
|
2025-06-02 21:11:01 +03:00
|
|
|
|
2026-08-08 21:47:55 -04:00
|
|
|
|
2026-02-05 10:42:43 -08:00
|
|
|
|
2025-04-09 10:39:47 +01:00
|
|
|
|
2025-06-03 11:11:17 +03:00
|
|
|
|
2025-04-08 11:18:16 +01:00
|
|
|
|
2025-11-05 23:35:01 -06:00
|
|
|
|
2025-08-18 00:44:08 -07:00
|
|
|
|
2025-10-14 17:08:20 +02:00
|
|
|
|
2024-08-22 16:17:59 +01:00
|
|
|
|
2025-10-14 17:08:20 +02:00
|
|
|
|
2024-08-22 16:17:59 +01:00
|
|
|
|
2025-10-14 17:08:20 +02:00
|
|
|
|
2024-08-22 16:17:59 +01:00
|
|
|
|
2025-10-14 17:08:20 +02:00
|
|
|
|
2024-08-22 16:17:59 +01:00
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
2024-08-22 16:17:59 +01:00
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
2024-08-22 16:17:59 +01:00
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
2024-08-22 16:17:59 +01:00
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
2024-08-22 16:17:59 +01:00
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
2024-11-21 10:16:04 -08:00
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
2024-11-21 10:16:04 -08:00
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
2025-11-10 17:08:53 -05:00
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
2024-11-21 10:16:04 -08:00
|
|
|
|
2025-10-14 17:08:20 +02:00
|
|
|
|
2024-11-06 11:18:48 +01:00
|
|
|
|
2025-10-14 17:08:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-21 04:08:10 -07:00
|
|
|
|
2024-09-05 12:31:55 -07:00
|
|
|
|
2026-09-15 15:40:58 +08:00
|
|
|
|
2024-09-05 12:31:55 -07:00
|
|
|
|
2025-10-14 17:08:20 +02:00
|
|
|
|
2024-09-05 12:31:55 -07:00
|
|
|
|
2026-06-15 10:22:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-07-22 10:51:19 +01:00
|
|
|
|
2026-06-15 10:22:24 +02:00
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
|
|
|
|
|
2026-06-15 10:22:24 +02:00
|
|
|
|
2026-07-22 10:51:19 +01:00
|
|
|
|
2026-06-15 10:22:24 +02:00
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
2026-06-15 10:22:24 +02:00
|
|
|
|
2026-07-22 10:51:19 +01:00
|
|
|
|
2026-06-15 10:22:24 +02:00
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
2026-07-22 10:51:19 +01:00
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
2026-07-22 10:51:19 +01:00
|
|
|
|
|
|
|
|
|
2026-06-15 10:22:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-10-14 17:08:20 +02:00
|
|
|
|
2024-09-05 12:31:55 -07:00
|
|
|
|
2025-10-14 17:08:20 +02:00
|
|
|
|
2024-09-05 12:31:55 -07:00
|
|
|
|
2026-02-19 13:45:33 +01:00
|
|
|
|
2025-06-16 18:18:10 -04:00
|
|
|
|
docs: reorganize getting started documentation (#20620)
## Summary
- reorganize the Get Started flow around creating, developing, and
structuring a Mastra project
- expand the Develop guide with Studio, AI-assisted development, project
structure, and file-based agents
- move Manual Install into Guides and Build with AI into Reference
- update links, sidebars, feature versioning, and direct redirects for
moved or removed pages
## Scope
This is a content-only change. It does not modify documentation
components, theme code, validation scripts, or tests.
Redirects were regenerated and audited for duplicate sources,
self-redirects, cycles, and redirect chains.
## Testing
- `pnpm validate`
- `pnpm lint:remark`
- Vale on every changed documentation file
- `pnpm build`
- `pnpm test:navigation`
- `pnpm test:smoke`
- `pnpm test:og`
The full local `pnpm lint:prose` command still reports four pre-existing
findings in unrelated files; the PR-scoped CI docs lint passes.
---------
Co-authored-by: Lennart <lekoarts@gmail.com>
2026-08-04 11:04:30 +01:00
|
|
|
|
2025-10-14 12:05:24 +01:00
|
|
|
|
2024-11-28 14:12:59 +01:00
|
|
|
|
|
|
|
|
|
2026-10-20 17:38:31 +02:00
|
|
|
|
2024-11-28 14:12:59 +01:00
|
|
|
|
2026-10-20 17:38:31 +02:00
|
|
|
|
2024-11-28 14:12:59 +01:00
|
|
|
|
2024-11-24 11:32:22 +01:00
|
|
|
|
2024-09-05 12:31:55 -07:00
|
|
|
|
2026-08-08 21:47:55 -04:00
|
|
|
|
2024-09-05 12:31:55 -07:00
|
|
|
|
2026-04-28 21:05:15 +05:30
|
|
|
|
2025-08-28 22:40:31 -04:00
|
|
|
|
feat: auth core, server RBAC, and adapter permission enforcement (#13163)
## Summary
PR 1 of 3 from the `auth-rbac-cms` branch split. This PR adds all
backend plumbing for auth/RBAC. PRs 2 (auth providers) and 3 (playground
UI) depend on this and can land in parallel once this merges.
- **New `@mastra/core/auth` export** — interfaces for RBAC, sessions,
SSO, credentials, ACL, and user management, plus default implementations
(static RBAC provider, cookie/memory session providers, built-in roles)
- **Server auth handlers** — login, signup, logout, session management,
and SSO flows with Zod-validated schemas
- **Route-level permission enforcement** — `requiresPermission` on route
configs with convention-based derivation from path/method (e.g. `GET
/agents/:id` → `agents:read`)
- **Server adapter RBAC middleware** (Hono, Express, Fastify, Koa) —
resolves user permissions via RBAC provider, cookie auth fallthrough for
session-based auth
- **Authorization policy fix** — `isProtectedPath` now uses
`isProtectedCustomRoute` instead of `!isCustomRoutePublic`, fixing a bug
where studio UI couldn't load in production
- **Deployer updates** — `MASTRA_PACKAGES_FILE` env var injection,
dynamic CORS origin when auth configured
- **Client SDK** — `getFullUrl` helper, `AuthCapabilities` type export
### Key behavioral changes
| Change | Risk | Mitigation |
|---|---|---|
| `SimpleAuth<TUser>` → `SimpleAuth<TUser extends EEUser>` | Medium —
requires `id` + `email` fields | Intentional; compile-time catch |
| `isProtectedPath` logic change | Medium — authorization policy | New
tests cover this; required for studio login in prod |
| Cookie fallthrough in Hono auth middleware | Low | Falls back to 401
if no user found |
| No RBAC → authenticated users get full access | Low — intentional |
Auth-only mode preserved |
| CORS dynamic origin when auth configured | Low | Only activates with
auth config; user can override |
### Deviation from plan
`deployers/cloud/package.json` — the plan called for adding
`@mastra/auth-cloud` dependency, but that package is created in PR 2.
Omitted here to avoid workspace resolution failure; PR 2 will add it.
### Fixed pre-existing test bug
All 4 adapter RBAC tests had a failing test ("should derive permissions
from route path/method when not explicitly set") that registered an API
handler at `/agents/test` with no prefix. That's a frontend/SPA path —
real API handlers are always under `/api/*`. Fixed the test to use
`prefix: '/api'` so the route is at `/api/agents/test`, matching how
routes are actually registered. Verified the bug exists on
`auth-rbac-cms` with clean install + build.
## Test plan
- [x] `pnpm build:packages` — 35/35 tasks pass
- [x] Core auth tests (cookie.test.ts) — 16/16 pass
- [x] Server tests (permissions, helpers, system) — 177/177 pass
- [x] Hono RBAC tests — 21/21 pass
- [x] Express RBAC tests — 15/15 pass
- [x] Fastify RBAC tests — 15/15 pass
- [x] Koa RBAC tests — 15/15 pass
- [x] Client SDK tests (base.test.ts) — 5/5 pass
- [ ] Verify no auth configured → all existing behavior identical (no
403s, no auth prompts)
- [ ] Verify pre-commit hooks pass (eslint + prettier)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Enterprise auth: SSO and credentials sign-in/sign-up, login/logout,
cookie and in-memory sessions, auth capabilities and current-user
endpoints.
* RBAC: default roles, static RBAC provider, route-level permission
enforcement and middleware across adapters.
* Client: full-URL helper; system responses include isDev.
* Deploy/build: bundling emits package metadata; deployers set runtime
packages file and adjust CORS when auth is enabled.
* **Bug Fixes**
* Studio UI loads correctly in production.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Shane Thomas <shane@codekarate.com>
Co-authored-by: Mastra Code (anthropic/claude-opus-4-6) <noreply@mastra.ai>
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-03-03 13:49:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-08-27 17:35:15 +02:00
|
|
|
|
|
|
|
|
|
feat: auth core, server RBAC, and adapter permission enforcement (#13163)
## Summary
PR 1 of 3 from the `auth-rbac-cms` branch split. This PR adds all
backend plumbing for auth/RBAC. PRs 2 (auth providers) and 3 (playground
UI) depend on this and can land in parallel once this merges.
- **New `@mastra/core/auth` export** — interfaces for RBAC, sessions,
SSO, credentials, ACL, and user management, plus default implementations
(static RBAC provider, cookie/memory session providers, built-in roles)
- **Server auth handlers** — login, signup, logout, session management,
and SSO flows with Zod-validated schemas
- **Route-level permission enforcement** — `requiresPermission` on route
configs with convention-based derivation from path/method (e.g. `GET
/agents/:id` → `agents:read`)
- **Server adapter RBAC middleware** (Hono, Express, Fastify, Koa) —
resolves user permissions via RBAC provider, cookie auth fallthrough for
session-based auth
- **Authorization policy fix** — `isProtectedPath` now uses
`isProtectedCustomRoute` instead of `!isCustomRoutePublic`, fixing a bug
where studio UI couldn't load in production
- **Deployer updates** — `MASTRA_PACKAGES_FILE` env var injection,
dynamic CORS origin when auth configured
- **Client SDK** — `getFullUrl` helper, `AuthCapabilities` type export
### Key behavioral changes
| Change | Risk | Mitigation |
|---|---|---|
| `SimpleAuth<TUser>` → `SimpleAuth<TUser extends EEUser>` | Medium —
requires `id` + `email` fields | Intentional; compile-time catch |
| `isProtectedPath` logic change | Medium — authorization policy | New
tests cover this; required for studio login in prod |
| Cookie fallthrough in Hono auth middleware | Low | Falls back to 401
if no user found |
| No RBAC → authenticated users get full access | Low — intentional |
Auth-only mode preserved |
| CORS dynamic origin when auth configured | Low | Only activates with
auth config; user can override |
### Deviation from plan
`deployers/cloud/package.json` — the plan called for adding
`@mastra/auth-cloud` dependency, but that package is created in PR 2.
Omitted here to avoid workspace resolution failure; PR 2 will add it.
### Fixed pre-existing test bug
All 4 adapter RBAC tests had a failing test ("should derive permissions
from route path/method when not explicitly set") that registered an API
handler at `/agents/test` with no prefix. That's a frontend/SPA path —
real API handlers are always under `/api/*`. Fixed the test to use
`prefix: '/api'` so the route is at `/api/agents/test`, matching how
routes are actually registered. Verified the bug exists on
`auth-rbac-cms` with clean install + build.
## Test plan
- [x] `pnpm build:packages` — 35/35 tasks pass
- [x] Core auth tests (cookie.test.ts) — 16/16 pass
- [x] Server tests (permissions, helpers, system) — 177/177 pass
- [x] Hono RBAC tests — 21/21 pass
- [x] Express RBAC tests — 15/15 pass
- [x] Fastify RBAC tests — 15/15 pass
- [x] Koa RBAC tests — 15/15 pass
- [x] Client SDK tests (base.test.ts) — 5/5 pass
- [ ] Verify no auth configured → all existing behavior identical (no
403s, no auth prompts)
- [ ] Verify pre-commit hooks pass (eslint + prettier)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Enterprise auth: SSO and credentials sign-in/sign-up, login/logout,
cookie and in-memory sessions, auth capabilities and current-user
endpoints.
* RBAC: default roles, static RBAC provider, route-level permission
enforcement and middleware across adapters.
* Client: full-URL helper; system responses include isDev.
* Deploy/build: bundling emits package metadata; deployers set runtime
packages file and adjust CORS when auth is enabled.
* **Bug Fixes**
* Studio UI loads correctly in production.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Shane Thomas <shane@codekarate.com>
Co-authored-by: Mastra Code (anthropic/claude-opus-4-6) <noreply@mastra.ai>
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-03-03 13:49:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-28 22:40:31 -04:00
|
|
|
|
|
|
|
|
|
2026-02-19 13:45:33 +01:00
|
|
|
|