@mastra/mcp-docs-server 1.3.6-alpha.12 → 1.3.6-alpha.16

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.
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![EmpirioLabs AI logo](https://models.dev/logos/empiriolabs.svg)EmpirioLabs AI
6
6
 
7
- Access 66 EmpirioLabs AI models through Mastra's model router. Authentication is handled automatically using the `EMPIRIOLABS_API_KEY` environment variable.
7
+ Access 62 EmpirioLabs AI models through Mastra's model router. Authentication is handled automatically using the `EMPIRIOLABS_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [EmpirioLabs AI documentation](https://docs.empiriolabs.ai).
10
10
 
@@ -19,7 +19,7 @@ const agent = new Agent({
19
19
  id: "my-agent",
20
20
  name: "My Agent",
21
21
  instructions: "You are a helpful assistant",
22
- model: "empiriolabs/deepseek-v3-2"
22
+ model: "empiriolabs/deepseek-v4-1-flash"
23
23
  });
24
24
 
25
25
  // Generate a response
@@ -38,9 +38,7 @@ for await (const chunk of stream) {
38
38
 
39
39
  | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
40
  | -------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
- | `empiriolabs/deepseek-v3-2` | 128K | | | | | | $0.57 | $2 |
42
41
  | `empiriolabs/deepseek-v4-1-flash` | 1.0M | | | | | | $0.30 | $1 |
43
- | `empiriolabs/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
44
42
  | `empiriolabs/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.42 | $1 |
45
43
  | `empiriolabs/deepseek-v4-pro` | 1.0M | | | | | | $2 | $3 |
46
44
  | `empiriolabs/deepseek-v4-pro-0813` | 1.0M | | | | | | $1 | $4 |
@@ -84,7 +82,6 @@ for await (const chunk of stream) {
84
82
  | `empiriolabs/qwen3-6-27b` | 256K | | | | | | $0.41 | $2 |
85
83
  | `empiriolabs/qwen3-6-35b-a3b` | 131K | | | | | | $0.07 | $0.42 |
86
84
  | `empiriolabs/qwen3-6-flash` | 1.0M | | | | | | $0.25 | $2 |
87
- | `empiriolabs/qwen3-6-max-preview` | 256K | | | | | | $1 | $8 |
88
85
  | `empiriolabs/qwen3-6-plus` | 1.0M | | | | | | $0.50 | $3 |
89
86
  | `empiriolabs/qwen3-7-flash` | 1.0M | | | | | | $0.03 | $0.13 |
90
87
  | `empiriolabs/qwen3-7-max` | 1.0M | | | | | | $3 | $8 |
@@ -94,7 +91,6 @@ for await (const chunk of stream) {
94
91
  | `empiriolabs/qwen3-8-max` | 1.0M | | | | | | $2 | $6 |
95
92
  | `empiriolabs/qwen3-8-max-0902` | 1.0M | | | | | | $2 | $6 |
96
93
  | `empiriolabs/qwen3-8-omni-flash` | 1.0M | | | | | | $0.30 | $0.94 |
97
- | `empiriolabs/qwen3-max` | 256K | | | | | | $1 | $6 |
98
94
  | `empiriolabs/seed-2-0-code` | 256K | | | | | | $0.40 | $2 |
99
95
  | `empiriolabs/seed-2-0-lite` | 256K | | | | | | $0.31 | $3 |
100
96
  | `empiriolabs/seed-2-0-mini` | 256K | | | | | | $0.12 | $0.50 |
@@ -117,7 +113,7 @@ const agent = new Agent({
117
113
  name: "custom-agent",
118
114
  model: {
119
115
  url: "https://api.empiriolabs.ai/v1",
120
- id: "empiriolabs/deepseek-v3-2",
116
+ id: "empiriolabs/deepseek-v4-1-flash",
121
117
  apiKey: process.env.EMPIRIOLABS_API_KEY,
122
118
  headers: {
123
119
  "X-Custom-Header": "value"
@@ -136,7 +132,7 @@ const agent = new Agent({
136
132
  const useAdvanced = requestContext.task === "complex";
137
133
  return useAdvanced
138
134
  ? "empiriolabs/step-5-preview"
139
- : "empiriolabs/deepseek-v3-2";
135
+ : "empiriolabs/deepseek-v4-1-flash";
140
136
  }
141
137
  });
142
138
  ```
@@ -42,20 +42,20 @@ for await (const chunk of stream) {
42
42
  | `kilo/~anthropic/claude-haiku-latest` | 1.0M | | | | | | $0.10 | $0.50 |
43
43
  | `kilo/~anthropic/claude-opus-latest` | 1.0M | | | | | | $4 | $20 |
44
44
  | `kilo/~anthropic/claude-sonnet-latest` | 1.0M | | | | | | $2 | $10 |
45
- | `kilo/~deepseek/deepseek-flash-latest` | 1.0M | | | | | | $0.02 | $0.60 |
46
- | `kilo/~deepseek/deepseek-pro-latest` | 1.0M | | | | | | $0.14 | $0.43 |
45
+ | `kilo/~deepseek/deepseek-flash-latest` | 1.0M | | | | | | $0.00 | $0.60 |
46
+ | `kilo/~deepseek/deepseek-pro-latest` | 1.0M | | | | | | $0.22 | $0.66 |
47
47
  | `kilo/~deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.01 | $1 |
48
48
  | `kilo/~google/gemini-flash-latest` | 1.0M | | | | | | $0.75 | $4 |
49
49
  | `kilo/~google/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
50
- | `kilo/~moonshotai/kimi-latest` | 1.0M | | | | | | $0.70 | $15 |
50
+ | `kilo/~moonshotai/kimi-latest` | 1.0M | | | | | | $0.28 | $15 |
51
51
  | `kilo/~openai/gpt-astra-latest` | 1.1M | | | | | | $10 | $50 |
52
52
  | `kilo/~openai/gpt-luna-latest` | 1.1M | | | | | | $0.10 | $0.50 |
53
53
  | `kilo/~openai/gpt-mini-latest` | 400K | | | | | | $0.75 | $5 |
54
54
  | `kilo/~openai/gpt-sol-latest` | 1.1M | | | | | | $2 | $10 |
55
55
  | `kilo/~openai/gpt-terra-latest` | 1.1M | | | | | | $2 | $12 |
56
56
  | `kilo/~x-ai/grok-latest` | 500K | | | | | | $2 | $6 |
57
- | `kilo/~z-ai/glm-flash-latest` | 1.0M | | | | | | $0.03 | $0.72 |
58
- | `kilo/~z-ai/glm-latest` | 1.0M | | | | | | $0.04 | $6 |
57
+ | `kilo/~z-ai/glm-flash-latest` | 1.0M | | | | | | $0.04 | $0.50 |
58
+ | `kilo/~z-ai/glm-latest` | 1.0M | | | | | | $0.04 | $5 |
59
59
  | `kilo/aion-labs/aion-2.0` | 131K | | | | | | $0.80 | $2 |
60
60
  | `kilo/aion-labs/aion-3.0` | 131K | | | | | | $3 | $6 |
61
61
  | `kilo/aion-labs/aion-3.0-mini` | 131K | | | | | | $0.70 | $1 |
@@ -105,7 +105,7 @@ for await (const chunk of stream) {
105
105
  | `kilo/deepseek/deepseek-r1` | 64K | | | | | | $0.70 | $3 |
106
106
  | `kilo/deepseek/deepseek-r1-0528` | 164K | | | | | | $0.70 | $3 |
107
107
  | `kilo/deepseek/deepseek-v3.1-terminus` | 164K | | | | | | $0.27 | $1 |
108
- | `kilo/deepseek/deepseek-v3.2` | 164K | | | | | | $0.26 | $0.42 |
108
+ | `kilo/deepseek/deepseek-v3.2` | 164K | | | | | | $0.26 | $0.80 |
109
109
  | `kilo/deepseek/deepseek-v3.2-exp` | 164K | | | | | | $0.27 | $0.41 |
110
110
  | `kilo/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.03 | $1 |
111
111
  | `kilo/deepseek/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.44 | $1 |
@@ -286,7 +286,7 @@ for await (const chunk of stream) {
286
286
  | `kilo/openai/gpt-audio` | 128K | | | | | | $3 | $10 |
287
287
  | `kilo/openai/gpt-audio-mini` | 128K | | | | | | $0.60 | $2 |
288
288
  | `kilo/openai/gpt-chat-latest` | 400K | | | | | | $5 | $30 |
289
- | `kilo/openai/gpt-oss-120b` | 131K | | | | | | $0.03 | $0.17 |
289
+ | `kilo/openai/gpt-oss-120b` | 131K | | | | | | $0.03 | $0.15 |
290
290
  | `kilo/openai/gpt-oss-20b` | 131K | | | | | | $0.02 | $0.09 |
291
291
  | `kilo/openai/gpt-oss-safeguard-20b` | 131K | | | | | | $0.07 | $0.30 |
292
292
  | `kilo/openai/o1` | 200K | | | | | | $15 | $60 |
@@ -343,7 +343,7 @@ for await (const chunk of stream) {
343
343
  | `kilo/qwen/qwen3.5-plus-02-15` | 1.0M | | | | | | $0.26 | $2 |
344
344
  | `kilo/qwen/qwen3.5-plus-20260420` | 1.0M | | | | | | $0.30 | $2 |
345
345
  | `kilo/qwen/qwen3.6-27b` | 262K | | | | | | $0.45 | $3 |
346
- | `kilo/qwen/qwen3.6-35b-a3b` | 262K | | | | | | $0.15 | $1 |
346
+ | `kilo/qwen/qwen3.6-35b-a3b` | 262K | | | | | | $0.10 | $0.95 |
347
347
  | `kilo/qwen/qwen3.6-flash` | 1.0M | | | | | | $0.19 | $1 |
348
348
  | `kilo/qwen/qwen3.6-plus` | 1.0M | | | | | | $0.33 | $2 |
349
349
  | `kilo/qwen/qwen3.7-flash` | 1.0M | | | | | | $0.03 | $0.13 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![LLM Gateway logo](https://models.dev/logos/llmgateway-providers.svg)LLM Gateway
6
6
 
7
- Access 452 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
7
+ Access 446 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [LLM Gateway documentation](https://llmgateway.io/docs).
10
10
 
@@ -46,23 +46,17 @@ for await (const chunk of stream) {
46
46
  | `llmgateway-providers/alibaba/glm-5.3` | 1.0M | | | | | | $1 | $4 |
47
47
  | `llmgateway-providers/alibaba/kimi-k2.5` | 262K | | | | | | $0.57 | $3 |
48
48
  | `llmgateway-providers/alibaba/kimi-k3` | 1.0M | | | | | | $3 | $15 |
49
- | `llmgateway-providers/alibaba/qwen-coder-plus` | 131K | | | | | | $0.50 | $1 |
50
49
  | `llmgateway-providers/alibaba/qwen-flash` | 1.0M | | | | | | $0.05 | $0.40 |
51
50
  | `llmgateway-providers/alibaba/qwen-max` | 33K | | | | | | $2 | $6 |
52
- | `llmgateway-providers/alibaba/qwen-omni-turbo` | 33K | | | | | | $0.20 | $0.80 |
53
51
  | `llmgateway-providers/alibaba/qwen-plus` | 131K | | | | | | $0.40 | $1 |
54
52
  | `llmgateway-providers/alibaba/qwen-plus-latest` | 1.0M | | | | | | $0.40 | $1 |
55
53
  | `llmgateway-providers/alibaba/qwen3-coder-flash` | 998K | | | | | | $0.30 | $2 |
56
- | `llmgateway-providers/alibaba/qwen3-coder-plus` | 1.0M | | | | | | $1 | $5 |
57
- | `llmgateway-providers/alibaba/qwen3-max` | 256K | | | | | | $1 | $6 |
58
- | `llmgateway-providers/alibaba/qwen3-vl-flash` | 262K | | | | | | $0.05 | $0.40 |
59
54
  | `llmgateway-providers/alibaba/qwen3-vl-plus` | 262K | | | | | | $0.20 | $2 |
60
55
  | `llmgateway-providers/alibaba/qwen3.5-122b-a10b` | 262K | | | | | | $0.40 | $3 |
61
56
  | `llmgateway-providers/alibaba/qwen3.5-27b` | 262K | | | | | | $0.30 | $2 |
62
57
  | `llmgateway-providers/alibaba/qwen3.5-35b-a3b` | 262K | | | | | | $0.25 | $2 |
63
58
  | `llmgateway-providers/alibaba/qwen3.6-35b-a3b` | 262K | | | | | | $0.38 | $2 |
64
59
  | `llmgateway-providers/alibaba/qwen3.6-flash` | 984K | | | | | | $0.25 | $2 |
65
- | `llmgateway-providers/alibaba/qwen3.6-max-preview` | 262K | | | | | | $1 | $8 |
66
60
  | `llmgateway-providers/alibaba/qwen3.6-plus` | 984K | | | | | | $0.50 | $3 |
67
61
  | `llmgateway-providers/alibaba/qwen3.7-flash` | 984K | | | | | | $0.03 | $0.13 |
68
62
  | `llmgateway-providers/alibaba/qwen3.7-max` | 984K | | | | | | $3 | $8 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![DevPass (LLM Gateway) logo](https://models.dev/logos/llmgateway.svg)DevPass (LLM Gateway)
6
6
 
7
- Access 219 DevPass (LLM Gateway) models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
7
+ Access 214 DevPass (LLM Gateway) models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [DevPass (LLM Gateway) documentation](https://llmgateway.io/docs).
10
10
 
@@ -206,10 +206,8 @@ for await (const chunk of stream) {
206
206
  | `llmgateway/o3` | 200K | | | | | | $2 | $8 |
207
207
  | `llmgateway/o3-mini` | 200K | | | | | | $1 | $4 |
208
208
  | `llmgateway/o4-mini` | 200K | | | | | | $1 | $4 |
209
- | `llmgateway/qwen-coder-plus` | 131K | | | | | | $0.50 | $1 |
210
209
  | `llmgateway/qwen-flash` | 1.0M | | | | | | $0.05 | $0.40 |
211
210
  | `llmgateway/qwen-max` | 33K | | | | | | $2 | $6 |
212
- | `llmgateway/qwen-omni-turbo` | 33K | | | | | | $0.20 | $0.80 |
213
211
  | `llmgateway/qwen-plus` | 131K | | | | | | $0.40 | $1 |
214
212
  | `llmgateway/qwen-plus-latest` | 1.0M | | | | | | $0.40 | $1 |
215
213
  | `llmgateway/qwen3-235b-a22b-fp8` | 41K | | | | | | $0.20 | $0.80 |
@@ -220,14 +218,12 @@ for await (const chunk of stream) {
220
218
  | `llmgateway/qwen3-coder-480b-a35b-instruct` | 262K | | | | | | $0.38 | $2 |
221
219
  | `llmgateway/qwen3-coder-flash` | 998K | | | | | | $0.30 | $2 |
222
220
  | `llmgateway/qwen3-coder-next` | 262K | | | | | | $0.11 | $0.68 |
223
- | `llmgateway/qwen3-coder-plus` | 1.0M | | | | | | $1 | $5 |
224
221
  | `llmgateway/qwen3-max` | 262K | | | | | | $0.84 | $3 |
225
222
  | `llmgateway/qwen3-next-80b-a3b-instruct` | 131K | | | | | | $0.15 | $1 |
226
223
  | `llmgateway/qwen3-next-80b-a3b-thinking` | 131K | | | | | | $0.15 | $1 |
227
224
  | `llmgateway/qwen3-vl-235b-a22b-instruct` | 262K | | | | | | $0.20 | $0.88 |
228
225
  | `llmgateway/qwen3-vl-235b-a22b-thinking` | 131K | | | | | | $0.98 | $4 |
229
226
  | `llmgateway/qwen3-vl-30b-a3b-instruct` | 262K | | | | | | $0.15 | $0.60 |
230
- | `llmgateway/qwen3-vl-flash` | 262K | | | | | | $0.05 | $0.40 |
231
227
  | `llmgateway/qwen3-vl-plus` | 262K | | | | | | $0.20 | $2 |
232
228
  | `llmgateway/qwen3.5-122b-a10b` | 262K | | | | | | $0.40 | $3 |
233
229
  | `llmgateway/qwen3.5-27b` | 262K | | | | | | $0.30 | $2 |
@@ -235,7 +231,6 @@ for await (const chunk of stream) {
235
231
  | `llmgateway/qwen3.5-9b` | 262K | | | | | | $0.10 | $0.15 |
236
232
  | `llmgateway/qwen3.6-35b-a3b` | 262K | | | | | | $0.25 | $1 |
237
233
  | `llmgateway/qwen3.6-flash` | 984K | | | | | | $0.25 | $2 |
238
- | `llmgateway/qwen3.6-max-preview` | 262K | | | | | | $1 | $8 |
239
234
  | `llmgateway/qwen3.6-plus` | 984K | | | | | | $0.50 | $3 |
240
235
  | `llmgateway/qwen3.7-flash` | 984K | | | | | | $0.03 | $0.13 |
241
236
  | `llmgateway/qwen3.7-max` | 1.0M | | | | | | $1 | $4 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Moark logo](https://models.dev/logos/moark.svg)Moark
6
6
 
7
- Access 2 Moark models through Mastra's model router. Authentication is handled automatically using the `MOARK_API_KEY` environment variable.
7
+ Access 10 Moark models through Mastra's model router. Authentication is handled automatically using the `MOARK_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Moark documentation](https://moark.com).
10
10
 
@@ -19,7 +19,7 @@ const agent = new Agent({
19
19
  id: "my-agent",
20
20
  name: "My Agent",
21
21
  instructions: "You are a helpful assistant",
22
- model: "moark/GLM-4.7"
22
+ model: "moark/DeepSeek-V4-Flash"
23
23
  });
24
24
 
25
25
  // Generate a response
@@ -36,10 +36,18 @@ for await (const chunk of stream) {
36
36
 
37
37
  ## Models
38
38
 
39
- | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
- | -------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
- | `moark/GLM-4.7` | 205K | | | | | | $4 | $14 |
42
- | `moark/MiniMax-M2.1` | 205K | | | | | | $2 | $8 |
39
+ | Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
40
+ | ------------------------------ | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
41
+ | `moark/DeepSeek-V4-Flash` | 1.0M | | | | | | $0.50 | $0.50 |
42
+ | `moark/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.15 | $0.30 |
43
+ | `moark/DeepSeek-V4-Pro` | 1.0M | | | | | | $2 | $4 |
44
+ | `moark/GLM-4.7` | 205K | | | | | | $0.42 | $2 |
45
+ | `moark/GLM-5.3` | 1.0M | | | | | | $1 | $4 |
46
+ | `moark/Kimi-K2.6` | 262K | | | | | | $0.98 | $4 |
47
+ | `moark/kimi-k3` | 1.0M | | | | | | $3 | $15 |
48
+ | `moark/MiniMax-M2.1` | 205K | | | | | | $0.29 | $1 |
49
+ | `moark/MiniMax-M2.7` | 205K | | | | | | $0.29 | $1 |
50
+ | `moark/Qwen3.6-Flash` | 1.0M | | | | | | $0.18 | $1 |
43
51
 
44
52
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
45
53
 
@@ -53,7 +61,7 @@ const agent = new Agent({
53
61
  name: "custom-agent",
54
62
  model: {
55
63
  url: "https://moark.com/v1",
56
- id: "moark/GLM-4.7",
64
+ id: "moark/DeepSeek-V4-Flash",
57
65
  apiKey: process.env.MOARK_API_KEY,
58
66
  headers: {
59
67
  "X-Custom-Header": "value"
@@ -71,8 +79,8 @@ const agent = new Agent({
71
79
  model: ({ requestContext }) => {
72
80
  const useAdvanced = requestContext.task === "complex";
73
81
  return useAdvanced
74
- ? "moark/MiniMax-M2.1"
75
- : "moark/GLM-4.7";
82
+ ? "moark/kimi-k3"
83
+ : "moark/DeepSeek-V4-Flash";
76
84
  }
77
85
  });
78
86
  ```
@@ -164,7 +164,7 @@ Returns: [`Promise<DurableAgentStreamResult>`](#durableagentstreamresult)
164
164
 
165
165
  #### `resume(runId, resumeData, options?)`
166
166
 
167
- Resumes a suspended run, for example after a tool approval. Pass the `runId` from the original stream and the data the run was waiting on. Throws if no registry entry exists for the run.
167
+ Resumes a suspended run, for example after a tool approval. Pass the `runId` from the original stream and the data the run was waiting on. Throws if no registry entry exists for the run. If another execution holds the run, `resume()` waits up to 5 seconds for it to finish, then throws `DURABLE_AGENT_EXECUTION_CONFLICT`. See [run ownership](https://mastra.ai/docs/harness/durable-agents).
168
168
 
169
169
  ```typescript
170
170
  const { output, cleanup } = await durableAgent.resume(runId, {
@@ -324,11 +324,18 @@ interface DurableAgentListActiveRunsResult {
324
324
 
325
325
  #### `recoverActiveRuns(options?)`
326
326
 
327
- Discovers runs stuck in `running` status for this agent and re-drives them from the last persisted snapshot. Accepts the same filters and pagination as `listActiveRuns()`, plus `runId`. Returns a summary of what was recovered.
327
+ Discovers runs stuck in `running` status for this agent and re-drives them from the last persisted snapshot. Accepts the same filters and pagination as `listActiveRuns()`, plus `runId`. Returns the outcome for each run.
328
328
 
329
329
  ```typescript
330
330
  const result = await durableAgent.recoverActiveRuns()
331
- // { recovered: [{ runId, status }], succeeded: 2, failed: 0 }
331
+ // {
332
+ // recovered: [
333
+ // { runId: 'run-1', status: 'success' },
334
+ // { runId: 'run-2', status: 'skipped', reason: 'run-active', retryAt: 1760123456789 },
335
+ // ],
336
+ // succeeded: 1,
337
+ // failed: 0,
338
+ // }
332
339
  ```
333
340
 
334
341
  Pass a `runId` to recover a single known run:
@@ -337,11 +344,26 @@ Pass a `runId` to recover a single known run:
337
344
  await durableAgent.recoverActiveRuns({ runId: 'run-abc-123' })
338
345
  ```
339
346
 
347
+ A run that another execution still drives isn't taken over. Its entry has `status: 'skipped'` and a `reason`, and `recoverActiveRuns()` doesn't check it again. For a run held by another process, `retryAt` is the time after which that claim lapses unless renewed. Call `recoverActiveRuns({ runId })` after it to recover the run if its process crashed. [`mastra.recoverAllDurableAgents()`](https://mastra.ai/reference/core/mastra-class) schedules these re-checks itself.
348
+
349
+ | `reason` | Meaning |
350
+ | --------------------- | ------------------------------------------------------------------------------ |
351
+ | `run-active` | Another execution, possibly in another process, holds the run. Sets `retryAt`. |
352
+ | `run-active-locally` | This process is executing the run. |
353
+ | `already-in-progress` | This process is already recovering the run. |
354
+
340
355
  Returns:
341
356
 
342
357
  ```typescript
343
358
  interface DurableAgentRecoverActiveRunsResult {
344
- recovered: Array<{ runId: string; status: 'success' | 'failed'; error?: Error }>
359
+ recovered: Array<{
360
+ runId: string
361
+ status: 'success' | 'failed' | 'skipped'
362
+ error?: Error
363
+ reason?: 'run-active' | 'run-active-locally' | 'already-in-progress'
364
+ // Epoch milliseconds
365
+ retryAt?: number
366
+ }>
345
367
  succeeded: number
346
368
  failed: number
347
369
  }
@@ -363,6 +385,20 @@ await output.text
363
385
  cleanup()
364
386
  ```
365
387
 
388
+ `recover()` throws instead of recovering a run that isn't orphaned:
389
+
390
+ | Error ID | Thrown when |
391
+ | ------------------------------------------- | -------------------------------------------------------------------- |
392
+ | `DURABLE_AGENT_RUN_ACTIVE` | Another execution holds the run, and `force` isn't set. |
393
+ | `DURABLE_AGENT_RECOVER_RUN_ACTIVE_LOCALLY` | This process is executing the run. `force` doesn't override this. |
394
+ | `DURABLE_AGENT_RECOVER_ALREADY_IN_PROGRESS` | This process is already recovering the run. |
395
+ | `DURABLE_AGENT_RECOVER_RUN_SUSPENDED` | The run is suspended. Continue it with `resume()`. |
396
+ | `DURABLE_AGENT_EXECUTION_CONFLICT` | With `force`, another execution claimed the run during the takeover. |
397
+
398
+ The server's `POST /agents/:agentId/recover` route returns these errors as `409 Conflict`.
399
+
400
+ **options.force** (`boolean`): Take the run over even while another execution holds it. That execution loses the run and stops, and streams for the run drop the events it still publishes. Its writes are rejected when the storage adapter supports run fencing. (Default: `false`)
401
+
366
402
  Returns: [`Promise<DurableAgentStreamResult>`](#durableagentstreamresult)
367
403
 
368
404
  ## Stream options
@@ -324,6 +324,32 @@ interface InngestAgentStreamResult<OUTPUT = undefined> {
324
324
 
325
325
  **cleanup** (`() => void`): Unsubscribes from PubSub and clears registry entries for the run. Call it when done with the run.
326
326
 
327
+ ## Event size limit
328
+
329
+ Inngest Realtime caps each message at about 512 KB. The default `InngestPubSub` keeps every stream event under 480 KB:
330
+
331
+ - An oversized `finish` event is sent without `output.steps`. The final text, usage, and finish reason still arrive, but `steps`, `toolCalls`, and `toolResults` on the stream result are empty for that run.
332
+ - Any other oversized event, such as a `tool-result` chunk carrying a large tool result, is replaced with a `data-oversized-event` chunk. Its `data` holds the original `eventType`, `chunkType`, `bytes`, and `limit`. The chunk is transient, so it isn't saved to memory.
333
+
334
+ Both cases log a warning. Only the live stream is reduced: messages saved to memory and the run's workflow snapshot keep the full data.
335
+
336
+ To avoid the limit:
337
+
338
+ - Return small tool results, such as an ID or summary, and fetch large data separately.
339
+ - Read full results from memory or the workflow run after the stream finishes.
340
+ - Pass a `pubsub` without the limit, such as [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams):
341
+
342
+ ```typescript
343
+ import { createInngestAgent } from '@mastra/inngest'
344
+ import { RedisStreamsPubSub } from '@mastra/redis-streams'
345
+
346
+ const durableAgent = createInngestAgent({
347
+ agent,
348
+ inngest,
349
+ pubsub: new RedisStreamsPubSub({ url: 'redis://localhost:6379' }),
350
+ })
351
+ ```
352
+
327
353
  ## Serving Inngest functions
328
354
 
329
355
  The `@mastra/inngest` package provides `serve()` and `createServe()` to register Inngest workflow functions with your HTTP framework.
@@ -109,7 +109,7 @@ Subscribes to the session's event stream over SSE. The promise resolves once the
109
109
 
110
110
  **onReconnect** (`() => void`): Called each time the stream is re-established after a drop. The server does not replay events missed while disconnected, so re-sync from here with session.state() and, for the message gap, session.listMessages().
111
111
 
112
- **reconnect** (`boolean | { maxRetries?: number; delayMs?: number; maxDelayMs?: number }`): Re-establishes the stream after an established stream drops. Retries back off exponentially from delayMs (default 1000) up to maxDelayMs (default 30000). maxRetries (default Infinity) bounds the attempts per outage and resets once a connection is re-established. When retries are exhausted, onError fires.
112
+ **reconnect** (`boolean | { maxRetries?: number; delayMs?: number; maxDelayMs?: number }`): Re-establishes the stream after an established stream drops. Retries back off exponentially from delayMs (default 1000) up to maxDelayMs (default 30000). maxRetries (default Infinity) bounds the attempts per outage and resets once a connection is re-established. When retries are exhausted, onError fires. A reconnect request that fails with a 4xx (other than 408 and 429) or 501 stops reconnecting immediately and passes that MastraClientError to onError.
113
113
 
114
114
  Returns: `Promise<AgentControllerSubscription>`, an object with an `unsubscribe()` method that stops reading and releases the stream.
115
115
 
@@ -304,13 +304,13 @@ await subscription.processDataStream({
304
304
 
305
305
  Pass `withInitialHistory: true` (or `{ perPage }`) to receive the stored messages as a first `thread-history` chunk instead of fetching history separately. Finished runs aren't replayed after it, so completed answers don't stream again on reconnect.
306
306
 
307
- `subscribeToThread()` returns the underlying `Response` plus a `processDataStream()` helper. The helper reads the subscription stream until the connection closes or the request is aborted. Pass `reconnect: true` to resubscribe when the transport closes or a reconnect request fails, such as after a proxy idle timeout.
307
+ `subscribeToThread()` returns the underlying `Response` plus a `processDataStream()` helper. The helper reads the subscription stream until the connection closes or the request is aborted. Pass `reconnect: true` to resubscribe when the transport closes or a reconnect request fails, such as after a proxy idle timeout. If a reconnect request fails with a 4xx status (for example `401` or `403`) or `501`, `processDataStream()` stops reconnecting and rejects with the original `MastraClientError`. `408` and `429` are still retried.
308
308
 
309
309
  **resourceId** (`string`): Resource ID for the memory thread.
310
310
 
311
311
  **threadId** (`string`): Thread ID to subscribe to.
312
312
 
313
- **processDataStream().reconnect** (`boolean | { maxRetries?: number; delayMs?: number }`): Reconnects the subscription stream after it closes or a reconnect request fails. true retries indefinitely with a one-second delay.
313
+ **processDataStream().reconnect** (`boolean | { maxRetries?: number; delayMs?: number }`): Reconnects the subscription stream after it closes or a reconnect request fails. true retries indefinitely with a one-second delay. A 4xx (other than 408 and 429) or 501 response stops reconnecting and rejects with that error.
314
314
 
315
315
  The subscription also exposes `abort(options?)` and `unsubscribe()`. `await subscription.abort({ clearPendingSignals: true })` requests an abort and clears pending signals without closing the subscription. Omit the flag to preserve pending input. `unsubscribe()` closes the subscription without aborting the run.
316
316
 
@@ -159,6 +159,25 @@ await client.deleteDatasetExperiment('dataset-id', 'experiment-id', {
159
159
 
160
160
  Returns `Promise<{ success: boolean }>`. A missing experiment, an experiment associated with another dataset, or a dataset outside the supplied tenancy returns a `404` response.
161
161
 
162
+ ## getExperiment()
163
+
164
+ Gets an experiment by ID without requiring a dataset reference. The response includes the experiment's `datasetId`, which is `null` for experiments orphaned by dataset deletion.
165
+
166
+ ```typescript
167
+ const experiment = await client.getExperiment('experiment-id', {
168
+ organizationId: 'organization-id',
169
+ projectId: 'project-id',
170
+ })
171
+ ```
172
+
173
+ **experimentId** (`string`): ID of the experiment to get.
174
+
175
+ **options.organizationId** (`string`): Organization ID used to scope the lookup.
176
+
177
+ **options.projectId** (`string`): Project ID used to scope the lookup.
178
+
179
+ Returns the experiment. A missing experiment, or one outside the supplied tenancy, returns a `404` response.
180
+
162
181
  ## deleteExperiment()
163
182
 
164
183
  Deletes an experiment by ID without requiring a dataset reference. Use this method for experiments orphaned by dataset deletion. The server deletes the experiment's observability traces and then deletes the experiment and its result records. Unsupported storage leaves the traces in place, and the server logs a warning. If trace deletion fails for any other reason, the promise rejects and Mastra keeps the experiment and its result records, although some traces may already have been removed.
@@ -131,10 +131,14 @@ Visit the [Configuration reference](https://mastra.ai/reference/configuration) f
131
131
 
132
132
  **scheduler.enabled** (`boolean`): Explicitly enable or disable the scheduler.
133
133
 
134
- **recovery** (`MastraRecoveryConfig`): Boot-time recovery behavior for orphaned agent and workflow runs. See Crash recovery. (Default: `{ durableAgents: 'off' }`)
134
+ **recovery** (`MastraRecoveryConfig`): Boot-time recovery behavior for orphaned agent and workflow runs. See Crash recovery. (Default: `{ durableAgents: 'off', workflows: 'auto', workflowConcurrency: 5 }`)
135
135
 
136
136
  **recovery.durableAgents** (`'auto' | 'off'`): Set to 'auto' to automatically re-drive orphaned RUNNING durable agent runs on server boot. This also controls the default snapshot-persistence policy for durable agents: running checkpoints are only written when set to 'auto' (or when an agent sets a custom shouldPersistSnapshot that includes running). Recovery re-issues LLM calls and re-executes tool calls, so tools must be idempotent. See Crash recovery.
137
137
 
138
+ **recovery.workflows** (`'auto' | 'off'`): Set to 'off' to skip restarting active workflow runs on server boot. Individual workflows can also opt out with autoRestartActiveRuns: false.
139
+
140
+ **recovery.workflowConcurrency** (`number`): Maximum number of workflow runs restarted at the same time during boot recovery. Use Infinity for no limit. Workflow and durable agent recovery run in parallel.
141
+
138
142
  ## Methods
139
143
 
140
144
  ### `recoverAllDurableAgents()`
@@ -143,17 +147,21 @@ Re-drives every orphaned `running` durable-agent run across all registered durab
143
147
 
144
148
  Requires persistent storage. With an in-memory store, there's nothing to recover after a process restart.
145
149
 
150
+ A run that another execution still drives isn't taken over. It's counted in `skipped` and checked again once that execution's claim could have lapsed, so a run whose process crashed is recovered without another call. `shutdown()` cancels pending re-checks. See [run ownership](https://mastra.ai/docs/harness/durable-agents).
151
+
146
152
  ```typescript
147
153
  const result = await mastra.recoverAllDurableAgents()
148
- // { agents: 2, recovered: 3, succeeded: 3, failed: 0 }
154
+ // { agents: 2, recovered: 3, succeeded: 3, failed: 0, skipped: 1 }
149
155
  ```
150
156
 
151
157
  Returns:
152
158
 
153
159
  **agents** (`number`): Number of durable agents scanned.
154
160
 
155
- **recovered** (`number`): Total number of runs that were re-driven.
161
+ **recovered** (`number`): Total number of runs that were re-driven: succeeded plus failed.
156
162
 
157
163
  **succeeded** (`number`): Runs that restarted successfully.
158
164
 
159
- **failed** (`number`): Runs whose restart threw an error.
165
+ **failed** (`number`): Runs whose restart threw an error.
166
+
167
+ **skipped** (`number`): Runs that another execution still drives. Each is checked again later.
@@ -6,6 +6,8 @@
6
6
 
7
7
  `LeaseProvider` is the distributed leasing contract, separate from event delivery ([`PubSub`](https://mastra.ai/reference/pubsub/base)). Mastra's [signals layer](https://mastra.ai/docs/harness/signals) uses it to elect a single owner across multiple processes (for example, serverless invocations) for a resource, most commonly a thread key. The owner is the process that wakes and runs the agent stream, so other processes route follow-up work to it instead of starting a competing run.
8
8
 
9
+ [Durable agents](https://mastra.ai/docs/harness/durable-agents) also claim each run through a lease when the workflows store doesn't support run fencing, so crash recovery can tell whether another process still drives the run.
10
+
9
11
  Leasing is separate from pub/sub. A `LeaseProvider` implementation needs actual lock coordination, whether through an atomic Redis operation such as `SET` or Lua or through an in-memory map for a single process. For backends that omit leasing, the signals runtime preserves single-process behavior with a no-op provider.
10
12
 
11
13
  The built-in [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams) implements `LeaseProvider`, which is what enables signals to coordinate across instances in distributed and serverless deployments.
@@ -49,7 +49,7 @@ export const mastra = new Mastra({
49
49
 
50
50
  ## Constructor parameters
51
51
 
52
- **url** (`string`): Valkey connection URL. Falls back to valkeyOptions.url. (Default: `valkey://localhost:6379`)
52
+ **url** (`string`): Valkey connection URL. Falls back to valkeyOptions.url. rediss\:// and valkeys\:// URLs enable TLS unless valkeyOptions.useTLS is set. (Default: `valkey://localhost:6379`)
53
53
 
54
54
  **valkeyOptions** (`ValkeyClientOptions`): GLIDE connection options, including native client configuration.
55
55
 
@@ -405,6 +405,7 @@ On authenticated servers, the read routes require the `stored-workflows:read` pe
405
405
  | `POST` | `/api/datasets/:datasetId/items` | Add a dataset item |
406
406
  | `DELETE` | `/api/datasets/:datasetId/items/:itemId/purge` | Permanently scrub an item's content from every dataset version and linked experiment result |
407
407
  | `GET` | `/api/experiments` | List experiments across datasets |
408
+ | `GET` | `/api/experiments/:experimentId` | Get an experiment by ID without knowing its dataset |
408
409
  | `DELETE` | `/api/experiments/:experimentId` | Delete an experiment, including one orphaned by dataset deletion |
409
410
  | `GET` | `/api/datasets/:datasetId/experiments` | List experiments for a dataset |
410
411
  | `POST` | `/api/datasets/:datasetId/experiments` | Trigger an experiment, or create one without starting it (`start: false`) |
@@ -95,29 +95,32 @@ Set the `retention` field on the store config.
95
95
 
96
96
  Each domain specifies its age-prunable tables and the timestamp column that anchors comparison, chosen so `maxAge` matches the meaning of the data. Append-only logs use creation time, live state uses last activity, and jobs or runs use completion time so in-flight work isn't pruned.
97
97
 
98
- | Domain | Table key | Anchor column | `maxAge` measures |
99
- | ----------------- | ------------------ | ---------------- | ---------------------------------------------------------------- |
100
- | `memory` | `threads` | `createdAt` | Thread age |
101
- | `memory` | `messages` | `createdAt` | Message age |
102
- | `memory` | `resources` | `createdAt` | Resource age |
103
- | `threadState` | `threadState` | `updatedAt` | Inactivity: state for still-active threads survives |
104
- | `observability` | `spans` | `startedAt` | Span age |
105
- | `observability` | `metrics` | `timestamp` | Metric event age (vNext only) |
106
- | `observability` | `logs` | `timestamp` | Log event age (vNext only) |
107
- | `observability` | `scores` | `timestamp` | Score event age (vNext only) |
108
- | `observability` | `feedback` | `timestamp` | Feedback event age (vNext only) |
109
- | `scores` | `scorers` | `createdAt` | Score record age |
110
- | `workflows` | `workflowSnapshot` | `updatedAt` | Inactivity, suspended or long-running workflows survive |
111
- | `backgroundTasks` | `backgroundTasks` | `completedAt` | Time since completion, in-flight tasks (`NULL`) are never pruned |
112
- | `experiments` | `experiments` | `completedAt` | Time since completion, running experiments are never pruned |
113
- | `notifications` | `notifications` | `createdAt` | Notification age |
114
- | `harness` | `sessions` | `createdAt` | Session record age |
115
- | `schedules` | `triggers` | `actual_fire_at` | Fire-history age (epoch-ms column) |
98
+ | Domain | Table key | Anchor column | `maxAge` measures |
99
+ | ----------------- | ------------------ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------- |
100
+ | `memory` | `threads` | `createdAt` | Thread age |
101
+ | `memory` | `messages` | `createdAt` | Message age |
102
+ | `memory` | `resources` | `createdAt` | Resource age |
103
+ | `memory` | `runFences` | `retiredAt` | Time since the durable agent execution holding the fence settled. Fences of running executions (`NULL`) are never pruned |
104
+ | `threadState` | `threadState` | `updatedAt` | Inactivity: state for still-active threads survives |
105
+ | `observability` | `spans` | `startedAt` | Span age |
106
+ | `observability` | `metrics` | `timestamp` | Metric event age (vNext only) |
107
+ | `observability` | `logs` | `timestamp` | Log event age (vNext only) |
108
+ | `observability` | `scores` | `timestamp` | Score event age (vNext only) |
109
+ | `observability` | `feedback` | `timestamp` | Feedback event age (vNext only) |
110
+ | `scores` | `scorers` | `createdAt` | Score record age |
111
+ | `workflows` | `workflowSnapshot` | `updatedAt` | Inactivity, suspended or long-running workflows survive |
112
+ | `workflows` | `runOwnership` | `updatedAt` | Inactivity. A running durable agent execution renews its claim every 10 seconds, so keep `maxAge` well above its 30-second lease |
113
+ | `backgroundTasks` | `backgroundTasks` | `completedAt` | Time since completion, in-flight tasks (`NULL`) are never pruned |
114
+ | `experiments` | `experiments` | `completedAt` | Time since completion, running experiments are never pruned |
115
+ | `notifications` | `notifications` | `createdAt` | Notification age |
116
+ | `harness` | `sessions` | `createdAt` | Session record age |
117
+ | `schedules` | `triggers` | `actual_fire_at` | Fire-history age (epoch-ms column) |
116
118
 
117
119
  > **Note:**
118
120
  >
119
121
  > - The memory `observational_memory` table has no timestamp anchor, so it can't be age-pruned and isn't a valid retention key.
120
122
  > - Experiments prune as whole units: an aged experiment's result rows are deleted together with it (results cascade with their parent), so a run is never left partially deleted. Retention doesn't have a separate `results` key.
123
+ > - `runOwnership` and `runFences` hold the run fencing records of durable agents, one small record per run in each. If the `runOwnership` `maxAge` is too short, a running execution can lose its run, but an execution that lost a run still can't write. A fence is retired only when its execution settles, so the fence of a run that crashed and was never recovered is never pruned.
121
124
  > - For `schedules`, the growth table is the fire history (`schedule_triggers`, one row per fire): schedule definitions are config and aren't pruned.
122
125
  > - On PostgreSQL, timestamp anchors use the timezone-aware mirror columns (for example `createdAtZ`, `completedAtZ`).
123
126
  > - DuckDB observability stores append-only events for all five signals. Its `spans` policy uses the event `timestamp` column rather than `startedAt`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.3.6-alpha.12",
3
+ "version": "1.3.6-alpha.16",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,7 +26,7 @@
26
26
  "@mastra/mcp-legacy": "npm:@mastra/mcp@^1.18.0",
27
27
  "local-pkg": "^1.1.2",
28
28
  "zod": "^4.6.4",
29
- "@mastra/core": "1.76.0-alpha.6",
29
+ "@mastra/core": "1.76.0-alpha.8",
30
30
  "@mastra/mcp": "^2.3.0-alpha.1"
31
31
  },
32
32
  "devDependencies": {
@@ -44,8 +44,8 @@
44
44
  "typescript": "^7.0.2",
45
45
  "vitest": "4.1.11",
46
46
  "@internal/types-builder": "0.0.116",
47
- "@mastra/core": "1.76.0-alpha.6",
48
- "@internal/lint": "0.0.141"
47
+ "@internal/lint": "0.0.141",
48
+ "@mastra/core": "1.76.0-alpha.8"
49
49
  },
50
50
  "homepage": "https://mastra.ai",
51
51
  "repository": {