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

15 commits

Author SHA1 Message Date
Lennart
6f5a36d8f9
chore(repo): Mention new PR policy (#27829) 2026-10-20 08:38:31 -07:00
Lennart
85fac7b637
docs: add Factory cross-links and refresh contributor guidance (#23509) 2026-09-10 07:45:21 -07:00
Ward Peeters
7ef94c70b3
docs: clarify feature request PR eligibility (#21317)
Co-authored-by: Mastra Code (openai/gpt-5.6-terra) <noreply@mastra.ai>
2026-08-12 12:47:53 +02:00
Lennart
594b5d508a
chore(repo): Note requirement of linked issue (#16397)
## Description

Add notes to various docs/bots that contributors are required to link
related issues in their PR descriptions, and that PRs without linked
issues may be closed. This is to ensure that all contributions are tied
to an existing issue and to improve the traceability of changes.

## Related Issue(s)

<!-- Link to the issue(s) this PR addresses, using hashtag notation:
Fixes #123 -->

## Type of Change

- [ ] 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
- [ ] Performance improvement
- [ ] Test update

## Checklist

- [ ] I have made corresponding changes to the documentation (if
applicable)
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have addressed all Coderabbit comments on this PR


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

## ELI5

This PR updates the project's documentation and templates to make it a
requirement that developers link the related issues when they submit
pull requests. It's like saying "when you fix something, tell us which
problem you're solving" so everyone can track why changes were made.

---

## Changes Made

### Pull Request Template (`.github/PULL_REQUEST_TEMPLATE.md`)
- Added a required "Related issue(s)" section in the PR template
- Added required prompts to link issues using `Fixes #...` or `Closes
#...` syntax
- Updated the PR checklist to include a checkbox requiring that related
issues be linked in the description

### Contribution Guidelines (`CONTRIBUTING.md`)
- Strengthened PR requirements by making issue linking mandatory
- Added explicit requirement that PR descriptions must include links to
related issues using `Fixes #...` / `Closes #...` style
- Added requirement that PRs clearly describe both the problem being
solved and the solution provided

### Development Guide (`DEVELOPMENT.md`)
- Expanded the "Contributing" section's pull request instructions to
include expectations for linking related issues
- Added a note that PRs without linked issues may be closed to ensure
contributions are properly tracked

### External Contributor Triage Workflow
(`.github/workflows/pr-triage.yml`)
- Updated the automated bot comment for external contributors to
explicitly require linking an issue (e.g., `Fixes #1234`/`Closes #1234`)
- Retained existing CodeRabbit feedback-handling guidance while removing
previous review trigger instructions

### Feature Request Template
(`.github/ISSUE_TEMPLATE/feature_request.yml`)
- Updated the selectable "Component" options to reflect current project
structure
- Replaced previous options with: Studio, Memory, Workspaces,
Observability, Deployment, CLI, Server, and Other

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/mastra-ai/mastra/pull/16397)

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-10 21:20:54 -04:00
Akash Santra
eac259a920
fix(docs): unify CLI command and fix grammar across docs (#15854) 2026-04-28 08:35:15 -07:00
Ward Peeters
0d2c9d3887
fix lint (#14080) 2026-03-10 15:09:08 +01:00
Ward Peeters
610c769cc1
feat: add @dane-ai-mastra PR slash commands for automated CI actions (#14067) 2026-03-10 14:40:04 +01:00
Lennart
13457109af
chore(repo): Callout coderabbit in PR reviews (#13776) 2026-03-04 16:31:18 +01:00
Ryan Hansen
6dbeeb94a8
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 22:49:10 +01:00
Lennart
b6fd5edf56
chore: Add docs styleguides (#13263)
## Description

- Add docs styleguides
- Add AGENTS.md files and point CLAUDE.md file to it
- Add mastra-docs claude skill
- Improve prompts on writing docs

## Related Issue(s)

Fixes DEVED-110

## Type of Change

- [ ] 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)
- [X] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update

## Checklist

- [ ] I have made corresponding changes to the documentation (if
applicable)
- [ ] I have added tests that prove my fix is effective or that my
feature works


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

* **Documentation**
* Added comprehensive docs and styleguides (DOC, STYLEGUIDE, GUIDE_* ,
REFERENCE) and new AGENTS.md; reorganized docs content and contributor
workflow.
* Replaced extensive CLAUDE.md content with pointer to AGENTS.md;
cleared docs changelog and removed some legacy guideline files.
* Updated CLI/pr/changeset prompts and guidance to require multiple
changesets for multi-package changes and warn against very long
changesets.

* **Community**
* Updated Code of Conduct with expanded scope and clearer enforcement
guidance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-02-19 13:45:33 +01:00
Lennart
75136488da
chore: Improve internal docs and bug report template (#10159)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-11-17 13:59:22 +01:00
Lennart
8a37bddb6d
chore(repo): Improve READMEs (#8819)
## Description

With our recent improvements to the docs, I'm copying some of that over
to some key README files.

## Related Issue(s)

<!-- Link to the issue(s) this PR addresses, using hashtag notation:
#123 -->

## Type of Change

- [ ] 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)
- [X] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update

## Checklist

- [ ] I have made corresponding changes to the documentation (if
applicable)
- [ ] I have added tests that prove my fix is effective or that my
feature works
2025-10-14 08:08:20 -07:00
Joshua Folorunsho
4c1277c1ce update discord link 2024-12-08 20:45:25 +01:00
Kenny
35d6b31788 Merge branch 'main' into kenny/futr-787-cli-commands-to-add-an-engine 2024-11-25 13:27:28 +01:00
Joshua Folorunsho
eac036a9ef update readme and create guideline 2024-11-24 11:32:22 +01:00