@mastra/mcp-docs-server 1.2.10-alpha.6 → 1.2.10-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/docs/server/auth/fga.md +3 -0
- package/.docs/models/embeddings.md +1 -0
- package/.docs/models/gateways/openrouter.md +1 -4
- package/.docs/models/gateways/vercel.md +1 -5
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/ambient.md +3 -3
- package/.docs/models/providers/crossmodel.md +2 -1
- package/.docs/models/providers/fireworks-ai.md +1 -3
- package/.docs/models/providers/wandb.md +6 -6
- package/.docs/reference/auth/fga.md +140 -0
- package/.docs/reference/index.md +1 -0
- package/.docs/reference/streaming/agents/stream.md +2 -0
- package/CHANGELOG.md +14 -0
- package/package.json +4 -4
|
@@ -254,6 +254,8 @@ class MyFGAProvider implements IFGAProvider {
|
|
|
254
254
|
}
|
|
255
255
|
```
|
|
256
256
|
|
|
257
|
+
> **Note:** See the [`IFGAProvider` reference](https://mastra.ai/reference/auth/fga) for every method, parameter, and the `ActorSignal` type.
|
|
258
|
+
|
|
257
259
|
## System actors
|
|
258
260
|
|
|
259
261
|
Autonomous and scheduled agents run without an end user. Mark these calls with an actor signal so FGA can tell them apart from user requests:
|
|
@@ -296,5 +298,6 @@ The actor signal is trusted input, so construct it server-side:
|
|
|
296
298
|
|
|
297
299
|
## Related
|
|
298
300
|
|
|
301
|
+
- [`IFGAProvider` reference](https://mastra.ai/reference/auth/fga)
|
|
299
302
|
- [Authentication overview](https://mastra.ai/docs/server/auth)
|
|
300
303
|
- [WorkOS authentication](https://mastra.ai/docs/server/auth/workos)
|
|
@@ -96,6 +96,7 @@ const customModel = voyageEmbedding({
|
|
|
96
96
|
model: "voyage-3.5",
|
|
97
97
|
inputType: "query", // or 'document'
|
|
98
98
|
outputDimension: 512, // 256, 512, 1024, or 2048
|
|
99
|
+
baseUrl: "https://ai.mongodb.com/v1", // Optional: custom endpoint (e.g. MongoDB-hosted Voyage)
|
|
99
100
|
});
|
|
100
101
|
|
|
101
102
|
const { embeddings: customEmbeddings } = await customModel.doEmbed({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# OpenRouter
|
|
4
4
|
|
|
5
|
-
OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
5
|
+
OpenRouter aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 340 models through Mastra's model router.
|
|
6
6
|
|
|
7
7
|
Learn more in the [OpenRouter documentation](https://openrouter.ai/models).
|
|
8
8
|
|
|
@@ -139,8 +139,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
139
139
|
| `inclusionai/ling-2.6-flash` |
|
|
140
140
|
| `inclusionai/ling-3.0-flash:free` |
|
|
141
141
|
| `inclusionai/ring-2.6-1t` |
|
|
142
|
-
| `inflection/inflection-3-pi` |
|
|
143
|
-
| `inflection/inflection-3-productivity` |
|
|
144
142
|
| `kwaipilot/kat-coder-air-v2.5` |
|
|
145
143
|
| `kwaipilot/kat-coder-pro-v2` |
|
|
146
144
|
| `kwaipilot/kat-coder-pro-v2.5` |
|
|
@@ -224,7 +222,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
224
222
|
| `openai/gpt-4o-2024-11-20` |
|
|
225
223
|
| `openai/gpt-4o-mini` |
|
|
226
224
|
| `openai/gpt-4o-mini-2024-07-18` |
|
|
227
|
-
| `openai/gpt-4o-mini-search-preview` |
|
|
228
225
|
| `openai/gpt-4o-search-preview` |
|
|
229
226
|
| `openai/gpt-5` |
|
|
230
227
|
| `openai/gpt-5-chat` |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Vercel
|
|
4
4
|
|
|
5
|
-
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
5
|
+
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 300 models through Mastra's model router.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers).
|
|
8
8
|
|
|
@@ -83,7 +83,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
83
83
|
| `anthropic/claude-opus-4.5` |
|
|
84
84
|
| `anthropic/claude-opus-4.6` |
|
|
85
85
|
| `anthropic/claude-opus-4.7` |
|
|
86
|
-
| `anthropic/claude-opus-4.7-fast` |
|
|
87
86
|
| `anthropic/claude-opus-4.8` |
|
|
88
87
|
| `anthropic/claude-opus-4.8-fast` |
|
|
89
88
|
| `anthropic/claude-opus-5` |
|
|
@@ -139,7 +138,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
139
138
|
| `google/gemini-3.1-flash-image-preview` |
|
|
140
139
|
| `google/gemini-3.1-flash-lite` |
|
|
141
140
|
| `google/gemini-3.1-flash-lite-image` |
|
|
142
|
-
| `google/gemini-3.1-flash-lite-preview` |
|
|
143
141
|
| `google/gemini-3.1-pro-preview` |
|
|
144
142
|
| `google/gemini-3.5-flash` |
|
|
145
143
|
| `google/gemini-3.5-flash-lite` |
|
|
@@ -227,7 +225,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
227
225
|
| `openai/gpt-4o-mini-transcribe` |
|
|
228
226
|
| `openai/gpt-4o-transcribe` |
|
|
229
227
|
| `openai/gpt-5` |
|
|
230
|
-
| `openai/gpt-5-chat` |
|
|
231
228
|
| `openai/gpt-5-codex` |
|
|
232
229
|
| `openai/gpt-5-mini` |
|
|
233
230
|
| `openai/gpt-5-nano` |
|
|
@@ -238,7 +235,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
238
235
|
| `openai/gpt-5.1-instant` |
|
|
239
236
|
| `openai/gpt-5.1-thinking` |
|
|
240
237
|
| `openai/gpt-5.2` |
|
|
241
|
-
| `openai/gpt-5.2-chat` |
|
|
242
238
|
| `openai/gpt-5.2-codex` |
|
|
243
239
|
| `openai/gpt-5.2-pro` |
|
|
244
240
|
| `openai/gpt-5.3-chat` |
|
package/.docs/models/index.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Model Providers
|
|
4
4
|
|
|
5
|
-
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to
|
|
5
|
+
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 4937 models from 161 providers through a single API.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -36,13 +36,13 @@ for await (const chunk of stream) {
|
|
|
36
36
|
|
|
37
37
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
38
|
| ------------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
-
| `ambient/ambient/large` | 101K | | | | | | $
|
|
39
|
+
| `ambient/ambient/large` | 101K | | | | | | $0.76 | $2 |
|
|
40
40
|
| `ambient/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
41
41
|
| `ambient/moonshotai/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
42
|
-
| `ambient/moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.
|
|
42
|
+
| `ambient/moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.73 | $4 |
|
|
43
43
|
| `ambient/stepfun/step-3.7-flash` | 262K | | | | | | $0.19 | $1 |
|
|
44
44
|
| `ambient/xiaomi/mimo-v2.5` | 1.0M | | | | | | $0.40 | $2 |
|
|
45
|
-
| `ambient/z-ai/glm-5.2` | 101K | | | | | | $
|
|
45
|
+
| `ambient/z-ai/glm-5.2` | 101K | | | | | | $0.76 | $2 |
|
|
46
46
|
| `ambient/zai-org/GLM-5.1-FP8` | 203K | | | | | | $1 | $4 |
|
|
47
47
|
| `ambient/zai-org/GLM-5.2-FP8` | 203K | | | | | | $1 | $4 |
|
|
48
48
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# CrossModel
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 46 CrossModel models through Mastra's model router. Authentication is handled automatically using the `CROSSMODEL_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [CrossModel documentation](https://www.crossmodel.ai/docs).
|
|
8
8
|
|
|
@@ -40,6 +40,7 @@ for await (const chunk of stream) {
|
|
|
40
40
|
| `crossmodel/anthropic/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
|
|
41
41
|
| `crossmodel/anthropic/claude-opus-4-7` | 1.0M | | | | | | $5 | $25 |
|
|
42
42
|
| `crossmodel/anthropic/claude-opus-4-8` | 1.0M | | | | | | $5 | $25 |
|
|
43
|
+
| `crossmodel/anthropic/claude-opus-5` | 1.0M | | | | | | $5 | $25 |
|
|
43
44
|
| `crossmodel/anthropic/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
|
|
44
45
|
| `crossmodel/anthropic/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
|
|
45
46
|
| `crossmodel/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.16 | $0.32 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Fireworks AI
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 14 Fireworks AI models through Mastra's model router. Authentication is handled automatically using the `FIREWORKS_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Fireworks AI documentation](https://fireworks.ai/docs/).
|
|
8
8
|
|
|
@@ -38,7 +38,6 @@ for await (const chunk of stream) {
|
|
|
38
38
|
| ------------------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
39
|
| `fireworks-ai/accounts/fireworks/models/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
40
40
|
| `fireworks-ai/accounts/fireworks/models/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
|
|
41
|
-
| `fireworks-ai/accounts/fireworks/models/glm-5p1` | 203K | | | | | | $1 | $4 |
|
|
42
41
|
| `fireworks-ai/accounts/fireworks/models/glm-5p2` | 1.0M | | | | | | $1 | $4 |
|
|
43
42
|
| `fireworks-ai/accounts/fireworks/models/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
|
|
44
43
|
| `fireworks-ai/accounts/fireworks/models/gpt-oss-20b` | 131K | | | | | | $0.07 | $0.30 |
|
|
@@ -47,7 +46,6 @@ for await (const chunk of stream) {
|
|
|
47
46
|
| `fireworks-ai/accounts/fireworks/models/minimax-m2p7` | 197K | | | | | | $0.30 | $1 |
|
|
48
47
|
| `fireworks-ai/accounts/fireworks/models/minimax-m3` | 512K | | | | | | $0.30 | $1 |
|
|
49
48
|
| `fireworks-ai/accounts/fireworks/models/qwen3p7-plus` | 262K | | | | | | $0.40 | $2 |
|
|
50
|
-
| `fireworks-ai/accounts/fireworks/routers/glm-5p1-fast` | 203K | | | | | | $3 | $9 |
|
|
51
49
|
| `fireworks-ai/accounts/fireworks/routers/glm-5p2-fast` | 1.0M | | | | | | $2 | $7 |
|
|
52
50
|
| `fireworks-ai/accounts/fireworks/routers/kimi-k2p6-fast` | 262K | | | | | | $2 | $8 |
|
|
53
51
|
| `fireworks-ai/accounts/fireworks/routers/kimi-k2p6-turbo` | 262K | | | | | | $2 | $8 |
|
|
@@ -39,20 +39,20 @@ for await (const chunk of stream) {
|
|
|
39
39
|
| `wandb/deepseek-ai/DeepSeek-V3.1` | 161K | | | | | | $0.55 | $2 |
|
|
40
40
|
| `wandb/deepseek-ai/DeepSeek-V4-Flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
41
41
|
| `wandb/deepseek-ai/DeepSeek-V4-Pro` | 1.0M | | | | | | $2 | $3 |
|
|
42
|
-
| `wandb/google/gemma-4-31B-it` | 262K | | | | | | $0.
|
|
42
|
+
| `wandb/google/gemma-4-31B-it` | 262K | | | | | | $0.10 | $0.34 |
|
|
43
43
|
| `wandb/ibm-granite/granite-4.1-8b` | 131K | | | | | | $0.05 | $0.10 |
|
|
44
44
|
| `wandb/JetBrains/Mellum2-12B-A2.5B-Instruct` | 131K | | | | | | $0.05 | $0.10 |
|
|
45
45
|
| `wandb/meta-llama/Llama-3.1-70B-Instruct` | 128K | | | | | | $0.80 | $0.80 |
|
|
46
46
|
| `wandb/meta-llama/Llama-3.1-8B-Instruct` | 128K | | | | | | $0.22 | $0.22 |
|
|
47
47
|
| `wandb/meta-llama/Llama-3.3-70B-Instruct` | 128K | | | | | | $0.71 | $0.71 |
|
|
48
48
|
| `wandb/MiniMaxAI/MiniMax-M2.5` | 197K | | | | | | $0.30 | $1 |
|
|
49
|
-
| `wandb/MiniMaxAI/MiniMax-M3` | 262K | | | | | | $0.
|
|
49
|
+
| `wandb/MiniMaxAI/MiniMax-M3` | 262K | | | | | | $0.23 | $0.96 |
|
|
50
50
|
| `wandb/moonshotai/Kimi-K2.5` | 262K | | | | | | $0.60 | $3 |
|
|
51
|
-
| `wandb/moonshotai/Kimi-K2.6` | 262K | | | | | | $0.
|
|
52
|
-
| `wandb/moonshotai/Kimi-K2.7-Code` | 262K | | | | | | $0.
|
|
51
|
+
| `wandb/moonshotai/Kimi-K2.6` | 262K | | | | | | $0.65 | $3 |
|
|
52
|
+
| `wandb/moonshotai/Kimi-K2.7-Code` | 262K | | | | | | $0.71 | $4 |
|
|
53
53
|
| `wandb/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8` | 262K | | | | | | $0.20 | $0.80 |
|
|
54
54
|
| `wandb/nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B` | 262K | | | | | | $0.75 | $3 |
|
|
55
|
-
| `wandb/openai/gpt-oss-120b` | 131K | | | | | | $0.
|
|
55
|
+
| `wandb/openai/gpt-oss-120b` | 131K | | | | | | $0.03 | $0.17 |
|
|
56
56
|
| `wandb/openai/gpt-oss-20b` | 131K | | | | | | $0.03 | $0.13 |
|
|
57
57
|
| `wandb/OpenPipe/Qwen3-14B-Instruct` | 33K | | | | | | $0.05 | $0.22 |
|
|
58
58
|
| `wandb/Qwen/Qwen3-30B-A3B-Instruct-2507` | 262K | | | | | | $0.10 | $0.30 |
|
|
@@ -61,7 +61,7 @@ for await (const chunk of stream) {
|
|
|
61
61
|
| `wandb/Qwen/Qwen3.6-27B` | 262K | | | | | | $0.60 | $4 |
|
|
62
62
|
| `wandb/Qwen/Qwen3.6-35B-A3B` | 262K | | | | | | $0.25 | $1 |
|
|
63
63
|
| `wandb/zai-org/GLM-5.1` | 203K | | | | | | $1 | $4 |
|
|
64
|
-
| `wandb/zai-org/GLM-5.2` | 262K | | | | | | $
|
|
64
|
+
| `wandb/zai-org/GLM-5.2` | 262K | | | | | | $0.76 | $2 |
|
|
65
65
|
|
|
66
66
|
## Advanced configuration
|
|
67
67
|
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# IFGAProvider
|
|
4
|
+
|
|
5
|
+
The `IFGAProvider` interface defines a fine-grained authorization (FGA) provider. Mastra calls it to decide whether a user or a system actor may perform a permission on a specific resource. Implement it to connect Mastra to an FGA backend, such as WorkOS Authorization.
|
|
6
|
+
|
|
7
|
+
For concepts, configuration, and the lifecycle points where Mastra enforces FGA, see [Fine-grained authorization](https://mastra.ai/docs/server/auth/fga).
|
|
8
|
+
|
|
9
|
+
## Usage example
|
|
10
|
+
|
|
11
|
+
The following example implements a minimal provider. `require` throws to deny, and `check` returns a boolean.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { FGADeniedError } from '@mastra/core/auth/ee'
|
|
15
|
+
import type { FGACheckParams, IFGAProvider, MastraFGAPermissionInput } from '@mastra/core/auth/ee'
|
|
16
|
+
|
|
17
|
+
class MyFGAProvider implements IFGAProvider {
|
|
18
|
+
async check(user: any, params: FGACheckParams): Promise<boolean> {
|
|
19
|
+
// Your authorization logic.
|
|
20
|
+
return true
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async require(user: any, params: FGACheckParams): Promise<void> {
|
|
24
|
+
if (!(await this.check(user, params))) {
|
|
25
|
+
throw new FGADeniedError(user, params.resource, params.permission)
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async filterAccessible<T extends { id: string }>(
|
|
30
|
+
user: any,
|
|
31
|
+
resources: T[],
|
|
32
|
+
resourceType: string,
|
|
33
|
+
permission: MastraFGAPermissionInput,
|
|
34
|
+
): Promise<T[]> {
|
|
35
|
+
return resources
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Methods
|
|
41
|
+
|
|
42
|
+
### `check(user, params)`
|
|
43
|
+
|
|
44
|
+
Returns whether `user` has the permission on the resource. Use it for non-throwing checks, such as filtering or conditional UI.
|
|
45
|
+
|
|
46
|
+
Returns: `Promise<boolean>`
|
|
47
|
+
|
|
48
|
+
### `require(user, params)`
|
|
49
|
+
|
|
50
|
+
Throws `FGADeniedError` when `user` lacks the permission. Mastra calls this at its [enforcement points](https://mastra.ai/docs/server/auth/fga).
|
|
51
|
+
|
|
52
|
+
Returns: `Promise<void>`
|
|
53
|
+
|
|
54
|
+
### `filterAccessible(user, resources, resourceType, permission)`
|
|
55
|
+
|
|
56
|
+
Returns the subset of `resources` that `user` can access with `permission`.
|
|
57
|
+
|
|
58
|
+
Returns: `Promise<T[]>`
|
|
59
|
+
|
|
60
|
+
### `requireActor(actor, params)`
|
|
61
|
+
|
|
62
|
+
Authorizes a non-user system actor, such as an autonomous or scheduled agent. Optional.
|
|
63
|
+
|
|
64
|
+
System actors skip the user-centric `require()` path, so implement `requireActor` to enforce per-agent least privilege for them. Throw `FGADeniedError` to deny. When a provider doesn't implement `requireActor`, Mastra preserves the trusted-actor bypass (allow after the tenant-scope check), so adding it is backward compatible.
|
|
65
|
+
|
|
66
|
+
Treat `actor.permissions` as an untrusted claim. Resolve the agent's authoritative grants from a trusted source keyed by `actor.agentId`, rather than trusting the inline values. See [System actors](https://mastra.ai/docs/server/auth/fga).
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import { FGADeniedError } from '@mastra/core/auth/ee'
|
|
70
|
+
import type { ActorSignal, FGACheckParams, IFGAProvider } from '@mastra/core/auth/ee'
|
|
71
|
+
|
|
72
|
+
class MyFGAProvider implements IFGAProvider {
|
|
73
|
+
// ...check, require, filterAccessible...
|
|
74
|
+
|
|
75
|
+
async requireActor(actor: ActorSignal, params: FGACheckParams): Promise<void> {
|
|
76
|
+
const agentId = actor === true ? undefined : actor.agentId
|
|
77
|
+
// Resolve the agent's authoritative grants from a trusted source keyed by agentId.
|
|
78
|
+
const granted = await this.grantsForAgent(agentId)
|
|
79
|
+
const required = Array.isArray(params.permission) ? params.permission : [params.permission]
|
|
80
|
+
if (!required.some(permission => granted.includes(permission))) {
|
|
81
|
+
throw new FGADeniedError(null, params.resource, params.permission)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Returns: `Promise<void>`
|
|
88
|
+
|
|
89
|
+
## Configuration properties
|
|
90
|
+
|
|
91
|
+
Optional properties control route coverage and startup validation.
|
|
92
|
+
|
|
93
|
+
**requireForProtectedRoutes** (`boolean`): When true, protected routes without route-level FGA metadata or resolver output are denied instead of allowed through. (Default: `false`)
|
|
94
|
+
|
|
95
|
+
**auditProtectedRoutes** (`boolean | 'warn' | 'error'`): Audits protected routes that lack built-in FGA metadata. Use true or 'warn' to log a startup warning, 'error' to fail startup, or false to disable. (Default: `false`)
|
|
96
|
+
|
|
97
|
+
**resolveRouteFGA** (`FGARouteResolver`): Derives resource type, resource ID, and permission from the route, parsed params, and request context.
|
|
98
|
+
|
|
99
|
+
**validatePermissions** (`(permissions: MastraFGAPermissionInput[]) => void | Promise<void>`): Startup validation for provider-specific permission mappings. Throw when a permission Mastra may emit is not mapped.
|
|
100
|
+
|
|
101
|
+
## Parameters
|
|
102
|
+
|
|
103
|
+
The `params` argument passed to `check`, `require`, and `requireActor`.
|
|
104
|
+
|
|
105
|
+
**resource** (`{ type: string; id: string }`): The resource being accessed.
|
|
106
|
+
|
|
107
|
+
**permission** (`MastraFGAPermissionInput | MastraFGAPermissionInput[]`): The permission(s) being checked. When an array is provided, the actor needs any one of the listed permissions.
|
|
108
|
+
|
|
109
|
+
**context** (`FGACheckContext`): Provider-specific context for resource resolution, including the owning resourceId, the request context, and action metadata.
|
|
110
|
+
|
|
111
|
+
## `ActorSignal`
|
|
112
|
+
|
|
113
|
+
Identifies a call made by a trusted non-user actor rather than an authenticated end user. It is either `true` (the anonymous system shorthand) or an object that names the acting agent and carries the grants a provider can enforce.
|
|
114
|
+
|
|
115
|
+
**actorKind** (`'system'`): Marks the object form of the signal.
|
|
116
|
+
|
|
117
|
+
**agentId** (`string`): Identity of the acting system agent. Unlike the check resource (the target), this names the actor itself, so a provider can enforce per-agent least privilege.
|
|
118
|
+
|
|
119
|
+
**permissions** (`MastraFGAPermissionInput[]`): Permission grants claimed for this actor. This is an untrusted, self-asserted hint; a provider enforcing real least privilege resolves the agent's authoritative grants from a trusted source keyed by agentId rather than trusting these values.
|
|
120
|
+
|
|
121
|
+
**scope** (`Record<string, string>`): Additional provider-specific scope for the actor, for example tenant or environment.
|
|
122
|
+
|
|
123
|
+
**sourceWorkflow** (`string`): Name of the workflow that started the actor run, when applicable.
|
|
124
|
+
|
|
125
|
+
## `FGADeniedError`
|
|
126
|
+
|
|
127
|
+
Thrown when an authorization check is denied. `require` and `requireActor` throw it to deny, and Mastra surfaces it as an HTTP `403`.
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
import { FGADeniedError } from '@mastra/core/auth/ee'
|
|
131
|
+
|
|
132
|
+
throw new FGADeniedError(user, { type: 'agent', id: 'reporter' }, 'agents:execute')
|
|
133
|
+
// Optional fourth argument: a reason string included in the error message.
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Related
|
|
137
|
+
|
|
138
|
+
- [Fine-grained authorization](https://mastra.ai/docs/server/auth/fga)
|
|
139
|
+
- [System actors](https://mastra.ai/docs/server/auth/fga)
|
|
140
|
+
- [WorkOS authentication](https://mastra.ai/reference/auth/workos)
|
package/.docs/reference/index.md
CHANGED
|
@@ -49,6 +49,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
49
49
|
- [Auth0](https://mastra.ai/reference/auth/auth0)
|
|
50
50
|
- [Better Auth](https://mastra.ai/reference/auth/better-auth)
|
|
51
51
|
- [Clerk](https://mastra.ai/reference/auth/clerk)
|
|
52
|
+
- [Fine-Grained Authorization](https://mastra.ai/reference/auth/fga)
|
|
52
53
|
- [Firebase](https://mastra.ai/reference/auth/firebase)
|
|
53
54
|
- [Google](https://mastra.ai/reference/auth/google)
|
|
54
55
|
- [JSON Web Token](https://mastra.ai/reference/auth/jwt)
|
|
@@ -62,6 +62,8 @@ const stream = await agent.stream('message for agent')
|
|
|
62
62
|
|
|
63
63
|
**options.isTaskComplete.timeout** (`number`): Maximum time in milliseconds to wait for all scorers to complete.
|
|
64
64
|
|
|
65
|
+
**options.isTaskComplete.suppressFeedback** (`boolean`): When true, marks the completion check feedback so consumers can hide it from displayed output. Feedback is only added to the conversation when the check fails, to guide the next iteration.
|
|
66
|
+
|
|
65
67
|
**options.delegation** (`DelegationConfig`): Configuration for subagent delegation. Use this to control and monitor when the agent delegates tasks to other agents, including the ability to modify, reject delegations, and provide feedback to guide the supervisor.
|
|
66
68
|
|
|
67
69
|
**options.delegation.onDelegationStart** (`(context: DelegationStartContext) => DelegationStartResult | void | Promise<DelegationStartResult | void>`): Called before delegating to a subagent. Use this to modify the delegation parameters or reject the delegation entirely.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.10-alpha.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`73839cb`](https://github.com/mastra-ai/mastra/commit/73839cb58322679c170627d1015669ede5f619aa), [`8e4dc79`](https://github.com/mastra-ai/mastra/commit/8e4dc793dcf035ea506f9ce79f56d2d501a4be14), [`2db93cc`](https://github.com/mastra-ai/mastra/commit/2db93ccd0b872e4de7853a93383efe0647901df8), [`094ab61`](https://github.com/mastra-ai/mastra/commit/094ab6129a1a3ecf6eeb86decac17d5faea4e02a), [`fe80944`](https://github.com/mastra-ai/mastra/commit/fe80944f3ef6681fea6eae8200fce387b7bb3c2f), [`e51e166`](https://github.com/mastra-ai/mastra/commit/e51e166c52e220abc9b64554ce37359dca8544b1)]:
|
|
8
|
+
- @mastra/core@1.53.0-alpha.4
|
|
9
|
+
|
|
10
|
+
## 1.2.10-alpha.7
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies:
|
|
15
|
+
- @mastra/core@1.53.0-alpha.3
|
|
16
|
+
|
|
3
17
|
## 1.2.10-alpha.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.2.10-alpha.
|
|
3
|
+
"version": "1.2.10-alpha.9",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"jsdom": "^26.1.0",
|
|
29
29
|
"local-pkg": "^1.1.2",
|
|
30
30
|
"zod": "^4.4.3",
|
|
31
|
-
"@mastra/
|
|
32
|
-
"@mastra/
|
|
31
|
+
"@mastra/core": "1.53.0-alpha.4",
|
|
32
|
+
"@mastra/mcp": "^1.15.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@hono/node-server": "^1.19.14",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"vitest": "4.1.10",
|
|
48
48
|
"@internal/lint": "0.0.116",
|
|
49
49
|
"@internal/types-builder": "0.0.91",
|
|
50
|
-
"@mastra/core": "1.53.0-alpha.
|
|
50
|
+
"@mastra/core": "1.53.0-alpha.4"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|
|
53
53
|
"repository": {
|