@mastra/mcp-docs-server 1.2.15-alpha.19 → 1.2.15-alpha.20
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/mastra-platform/deploy.md +27 -0
- package/.docs/docs/mastra-platform/trace-intelligence.md +9 -13
- package/.docs/docs/server/custom-api-routes.md +35 -0
- package/.docs/docs/workflows/time-travel.md +2 -0
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/openrouter.md +1 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/coralbricks.md +75 -0
- package/.docs/models/providers/evroc.md +2 -3
- package/.docs/models/providers/hyper.md +6 -6
- package/.docs/models/providers/kilo.md +5 -6
- package/.docs/models/providers/llmgateway.md +1 -2
- package/.docs/models/providers/nano-gpt.md +1 -3
- package/.docs/models/providers/privatemode-ai.md +5 -4
- package/.docs/models/providers/snowflake-cortex.md +5 -1
- package/.docs/models/providers/wandb.md +2 -1
- package/.docs/models/providers/zenmux.md +0 -15
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/server/create-route.md +27 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -0
- package/.docs/reference/workspace/platform-sandbox.md +8 -0
- package/.docs/reference/workspace/railway-sandbox.md +8 -0
- package/.docs/reference/workspace/sandbox.md +10 -0
- package/CHANGELOG.md +7 -0
- package/package.json +3 -3
|
@@ -132,6 +132,33 @@ mastra deploy --env staging --env-file .env.staging
|
|
|
132
132
|
|
|
133
133
|
To change variables on a running service without a redeploy, update them in the dashboard and run [`mastra env restart`](https://mastra.ai/reference/cli/mastra).
|
|
134
134
|
|
|
135
|
+
## Private npm packages
|
|
136
|
+
|
|
137
|
+
Projects that depend on packages from a private registry install them during the deploy using the standard `NPM_TOKEN` contract.
|
|
138
|
+
|
|
139
|
+
1. Store a read-only registry token as `NPM_TOKEN` on the project or environment through the dashboard.
|
|
140
|
+
|
|
141
|
+
2. Commit a token-free `.npmrc` that points your scope at the registry and reads the token from the environment:
|
|
142
|
+
|
|
143
|
+
```ini
|
|
144
|
+
@your-org:registry=https://npm.pkg.github.com
|
|
145
|
+
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Keep the `${NPM_TOKEN}` reference literal. The package manager resolves it at install time, so the token itself never lands in your repository.
|
|
149
|
+
|
|
150
|
+
3. Deploy as usual:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
mastra deploy
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
In a monorepo, a `.npmrc` in your project directory takes precedence over one at the repository root.
|
|
157
|
+
|
|
158
|
+
`NPM_TOKEN` is available during dependency installation. Mastra redacts its value from the Mastra source-build logs that it streams. The generated Dockerfile receives it as a build argument, so the runtime image stays free of the token. `NPM_TOKEN` is also injected into the running service as a regular environment variable, so treat it as a secret your application can read.
|
|
159
|
+
|
|
160
|
+
Projects without a private-registry `.npmrc` need no changes. When your `.npmrc` references `${NPM_TOKEN}`, set the variable or the dependency install fails.
|
|
161
|
+
|
|
135
162
|
## Project resolution
|
|
136
163
|
|
|
137
164
|
Every deploy resolves its target project in this order:
|
|
@@ -56,12 +56,9 @@ The flow chart connects themes in adjacent trace signal columns:
|
|
|
56
56
|
|
|
57
57
|
The flow shows association, not causation or execution order. For example, a ribbon between a Goal and an Outcome means that both themes occurred in the same traces. It doesn't show that the goal caused the outcome.
|
|
58
58
|
|
|
59
|
-
###
|
|
59
|
+
### Other and Noise
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- **Trace count**: The number of distinct traces assigned to a theme in the selected snapshot.
|
|
64
|
-
- **Stage share**: The percentage of analyzed traces for that trace signal assigned to the theme.
|
|
61
|
+
Each node shows its trace count: the number of distinct traces assigned to that theme in the selected snapshot. A theme's details also state its share, for example "28 of 70 traces in this snapshot (40%)".
|
|
65
62
|
|
|
66
63
|
Studio shows the most common themes for each trace signal type. It may combine smaller themes into **Other** to preserve totals without overcrowding the chart.
|
|
67
64
|
|
|
@@ -69,26 +66,25 @@ Studio shows the most common themes for each trace signal type. It may combine s
|
|
|
69
66
|
|
|
70
67
|
### Snapshots
|
|
71
68
|
|
|
72
|
-
A snapshot is a moving analysis window over a set of traces. Snapshots can overlap, so don't add their trace counts together. Compare trace count and
|
|
69
|
+
A snapshot is a moving analysis window over a set of traces. Snapshots can overlap, so don't add their trace counts together. Compare a theme's trace count and its share of the snapshot together because traffic volume can change between windows.
|
|
73
70
|
|
|
74
71
|
A theme can persist, disappear, split, merge, or return across snapshots. Treat theme names and descriptions as generated summaries, not fixed taxonomies.
|
|
75
72
|
|
|
76
73
|
## Use the Trace Intelligence page
|
|
77
74
|
|
|
78
75
|
1. Use the **Agent** selector to switch between agents with available analysis. An agent doesn't appear until its first themes are ready.
|
|
79
|
-
2. Select a theme in the flow to filter every column to traces containing that theme.
|
|
80
|
-
3.
|
|
76
|
+
2. Select a theme in the flow to open its details and filter every column to traces containing that theme.
|
|
77
|
+
3. The details panel shows the theme's description, its share of the snapshot, paged example summaries, and a trend of its trace count over time.
|
|
81
78
|
4. Select **Clear filter** to restore the complete flow.
|
|
82
79
|
|
|
83
80
|
You can also:
|
|
84
81
|
|
|
85
|
-
- Select
|
|
86
|
-
-
|
|
87
|
-
- Drag the distribution cards to reorder the trace signal columns and see a different relationship perspective.
|
|
82
|
+
- Select **Noise** in the flow to inspect its share and generated example summaries.
|
|
83
|
+
- Drag the column headers above the chart to reorder the trace signal columns and see a different relationship perspective.
|
|
88
84
|
- Use the timeline to select a snapshot, or select **Play** to watch themes change over time.
|
|
89
|
-
-
|
|
85
|
+
- Switch to **Compare** to see which themes grew, shrank, entered the range, or left the range between two points in time, or **Lifelines** to follow each theme's share across the whole selected range.
|
|
90
86
|
|
|
91
|
-
Filtering the flow by a theme is unavailable for snapshots with more than 2,000 traces.
|
|
87
|
+
Filtering the flow by a theme is unavailable for snapshots with more than 2,000 traces. Selecting a theme still opens its details there without filtering the flow.
|
|
92
88
|
|
|
93
89
|
## Troubleshooting
|
|
94
90
|
|
|
@@ -35,6 +35,41 @@ curl http://localhost:4111/my-custom-route
|
|
|
35
35
|
|
|
36
36
|
Each route's handler receives the Hono `Context`. Within the handler you can access the `Mastra` instance to fetch or call agents and workflows.
|
|
37
37
|
|
|
38
|
+
## Schema validation
|
|
39
|
+
|
|
40
|
+
Use [`createRoute()`](https://mastra.ai/reference/server/create-route) in `apiRoutes` to parse and validate path parameters, query parameters, and request bodies with Zod. The schemas also infer the handler parameters and generate OpenAPI metadata.
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
import { Mastra } from '@mastra/core'
|
|
44
|
+
import { createRoute } from '@mastra/server/server-adapter'
|
|
45
|
+
import { z } from 'zod'
|
|
46
|
+
|
|
47
|
+
const createItemRoute = createRoute({
|
|
48
|
+
method: 'POST',
|
|
49
|
+
path: '/items',
|
|
50
|
+
responseType: 'json',
|
|
51
|
+
bodySchema: z.object({
|
|
52
|
+
name: z.string().min(1),
|
|
53
|
+
}),
|
|
54
|
+
responseSchema: z.object({
|
|
55
|
+
id: z.string(),
|
|
56
|
+
name: z.string(),
|
|
57
|
+
}),
|
|
58
|
+
handler: async ({ name }) => ({
|
|
59
|
+
id: crypto.randomUUID(),
|
|
60
|
+
name,
|
|
61
|
+
}),
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
export const mastra = new Mastra({
|
|
65
|
+
server: {
|
|
66
|
+
apiRoutes: [createItemRoute],
|
|
67
|
+
},
|
|
68
|
+
})
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
By default, Mastra returns a `400` response when validation fails. The `onValidationError` callback can override the status and response body. Validated values and the `Mastra` server context are passed directly to the handler.
|
|
72
|
+
|
|
38
73
|
## Middleware
|
|
39
74
|
|
|
40
75
|
To add route-specific middleware pass a `middleware` array when calling `registerApiRoute()`.
|
|
@@ -15,6 +15,8 @@ When you call `timeTravel()` on a workflow run:
|
|
|
15
15
|
3. Execution begins from the specified step with the provided or reconstructed input data
|
|
16
16
|
4. The workflow continues to completion from that point forward
|
|
17
17
|
|
|
18
|
+
If the workflow definition has changed since the run was recorded (for example, a step was renamed), or the recorded run never reached a step that precedes the target, time travel fails with a descriptive error before anything executes, and the stored snapshot is left unchanged.
|
|
19
|
+
|
|
18
20
|
Time travel requires storage to be configured since it relies on persisted workflow snapshots.
|
|
19
21
|
|
|
20
22
|
## Basic usage
|
|
@@ -35,6 +35,7 @@ List of required environment variables for each model provider and gateway suppo
|
|
|
35
35
|
| [ClinePass](https://mastra.ai/models/providers/cline-pass) | `cline-pass/*` | `CLINE_API_KEY` |
|
|
36
36
|
| [CloudFerro Sherlock](https://mastra.ai/models/providers/cloudferro-sherlock) | `cloudferro-sherlock/*` | `CLOUDFERRO_SHERLOCK_API_KEY` |
|
|
37
37
|
| [Cloudflare Workers AI](https://mastra.ai/models/providers/cloudflare-workers-ai) | `cloudflare-workers-ai/*` | `CLOUDFLARE_ACCOUNT_ID`, `CLOUDFLARE_API_KEY` |
|
|
38
|
+
| [CoralBricks](https://mastra.ai/models/providers/coralbricks) | `coralbricks/*` | `CORAL_API_KEY` |
|
|
38
39
|
| [Cortecs](https://mastra.ai/models/providers/cortecs) | `cortecs/*` | `CORTECS_API_KEY` |
|
|
39
40
|
| [CrofAI](https://mastra.ai/models/providers/crof) | `crof/*` | `CROF_API_KEY` |
|
|
40
41
|
| [CrossModel](https://mastra.ai/models/providers/crossmodel) | `crossmodel/*` | `CROSSMODEL_API_KEY` |
|
|
@@ -155,6 +155,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
155
155
|
| `meta-llama/llama-4-maverick` |
|
|
156
156
|
| `meta-llama/llama-4-scout` |
|
|
157
157
|
| `meta-llama/llama-guard-4-12b` |
|
|
158
|
+
| `meta/muse-glimmer-30b` |
|
|
158
159
|
| `meta/muse-spark-1.1` |
|
|
159
160
|
| `meta/muse-spark-1.2` |
|
|
160
161
|
| `microsoft/phi-4` |
|
|
@@ -240,7 +241,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
240
241
|
| `openai/gpt-5.2-chat` |
|
|
241
242
|
| `openai/gpt-5.2-codex` |
|
|
242
243
|
| `openai/gpt-5.2-pro` |
|
|
243
|
-
| `openai/gpt-5.3-chat` |
|
|
244
244
|
| `openai/gpt-5.3-codex` |
|
|
245
245
|
| `openai/gpt-5.4` |
|
|
246
246
|
| `openai/gpt-5.4-image-2` |
|
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 5460 models from 169 providers through a single API.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# CoralBricks
|
|
4
|
+
|
|
5
|
+
Access 3 CoralBricks models through Mastra's model router. Authentication is handled automatically using the `CORAL_API_KEY` environment variable.
|
|
6
|
+
|
|
7
|
+
Learn more in the [CoralBricks documentation](https://www.coralbricks.ai/docs).
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
CORAL_API_KEY=your-api-key
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Agent } from "@mastra/core/agent";
|
|
15
|
+
|
|
16
|
+
const agent = new Agent({
|
|
17
|
+
id: "my-agent",
|
|
18
|
+
name: "My Agent",
|
|
19
|
+
instructions: "You are a helpful assistant",
|
|
20
|
+
model: "coralbricks/glm-5.2-fp4"
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// Generate a response
|
|
24
|
+
const response = await agent.generate("Hello!");
|
|
25
|
+
|
|
26
|
+
// Stream a response
|
|
27
|
+
const stream = await agent.stream("Tell me a story");
|
|
28
|
+
for await (const chunk of stream) {
|
|
29
|
+
console.log(chunk);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
> **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [CoralBricks documentation](https://www.coralbricks.ai/docs) for details.
|
|
34
|
+
|
|
35
|
+
## Models
|
|
36
|
+
|
|
37
|
+
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
|
+
| -------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
+
| `coralbricks/glm-5.2-fp4` | 1.0M | | | | | | $1 | $4 |
|
|
40
|
+
| `coralbricks/gpt-oss-120b` | 131K | | | | | | $0.12 | $0.60 |
|
|
41
|
+
| `coralbricks/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
42
|
+
|
|
43
|
+
## Advanced configuration
|
|
44
|
+
|
|
45
|
+
### Custom headers
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
const agent = new Agent({
|
|
49
|
+
id: "custom-agent",
|
|
50
|
+
name: "custom-agent",
|
|
51
|
+
model: {
|
|
52
|
+
url: "https://inference.coralbricks.ai/v1",
|
|
53
|
+
id: "coralbricks/glm-5.2-fp4",
|
|
54
|
+
apiKey: process.env.CORAL_API_KEY,
|
|
55
|
+
headers: {
|
|
56
|
+
"X-Custom-Header": "value"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Dynamic model selection
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
const agent = new Agent({
|
|
66
|
+
id: "dynamic-agent",
|
|
67
|
+
name: "Dynamic Agent",
|
|
68
|
+
model: ({ requestContext }) => {
|
|
69
|
+
const useAdvanced = requestContext.task === "complex";
|
|
70
|
+
return useAdvanced
|
|
71
|
+
? "coralbricks/kimi-k3"
|
|
72
|
+
: "coralbricks/glm-5.2-fp4";
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# evroc
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 15 evroc models through Mastra's model router. Authentication is handled automatically using the `EVROC_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [evroc documentation](https://docs.evroc.com/products/think/overview.html).
|
|
8
8
|
|
|
@@ -49,9 +49,8 @@ for await (const chunk of stream) {
|
|
|
49
49
|
| `evroc/openai/whisper-large-v3-turbo` | 448 | | | | | | $0.00 | $0.00 |
|
|
50
50
|
| `evroc/Qwen/Qwen3-Embedding-8B` | 41K | | | | | | $0.12 | $0.12 |
|
|
51
51
|
| `evroc/Qwen/Qwen3-Reranker-4B` | 32K | | | | | | $0.06 | — |
|
|
52
|
-
| `evroc/Qwen/Qwen3-VL-30B-A3B-Instruct` | 100K | | | | | | $0.23 | $0.92 |
|
|
53
52
|
| `evroc/Qwen/Qwen3.6-35B-A3B-FP8` | 262K | | | | | | $0.34 | $1 |
|
|
54
|
-
| `evroc/zai-org/GLM-5.2` |
|
|
53
|
+
| `evroc/zai-org/GLM-5.2` | 524K | | | | | | $1 | $6 |
|
|
55
54
|
|
|
56
55
|
## Advanced configuration
|
|
57
56
|
|
|
@@ -39,19 +39,19 @@ for await (const chunk of stream) {
|
|
|
39
39
|
| `hyper/deepseek-v4-flash` | 1.0M | | | | | | $0.20 | $0.40 |
|
|
40
40
|
| `hyper/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.15 | $0.30 |
|
|
41
41
|
| `hyper/deepseek-v4-pro` | 1.0M | | | | | | $2 | $5 |
|
|
42
|
-
| `hyper/gemma-4-26b-a4b-it` | 256K | | | | | | $0.12 | $0.
|
|
42
|
+
| `hyper/gemma-4-26b-a4b-it` | 256K | | | | | | $0.12 | $0.41 |
|
|
43
43
|
| `hyper/glm-5.1` | 203K | | | | | | $2 | $5 |
|
|
44
44
|
| `hyper/glm-5.2` | 1.0M | | | | | | $1 | $4 |
|
|
45
|
-
| `hyper/gpt-oss-120b` | 131K | | | | | | $0.
|
|
46
|
-
| `hyper/kimi-k2.5` | 262K | | | | | | $0.
|
|
45
|
+
| `hyper/gpt-oss-120b` | 131K | | | | | | $0.19 | $0.73 |
|
|
46
|
+
| `hyper/kimi-k2.5` | 262K | | | | | | $0.56 | $3 |
|
|
47
47
|
| `hyper/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
48
48
|
| `hyper/kimi-k2.7-code` | 256K | | | | | | $0.95 | $4 |
|
|
49
49
|
| `hyper/kimi-k3` | 1.0M | | | | | | $3 | $16 |
|
|
50
|
-
| `hyper/llama-3.3-70b-instruct` | 128K | | | | | | $0.
|
|
50
|
+
| `hyper/llama-3.3-70b-instruct` | 128K | | | | | | $0.60 | $0.74 |
|
|
51
51
|
| `hyper/llama-4-maverick-17b-128e-instruct-fp8` | 430K | | | | | | $0.27 | $0.90 |
|
|
52
|
-
| `hyper/minimax-m2.7` | 262K | | | | | | $0.
|
|
52
|
+
| `hyper/minimax-m2.7` | 262K | | | | | | $0.48 | $2 |
|
|
53
53
|
| `hyper/minimax-m3` | 512K | | | | | | $0.33 | $1 |
|
|
54
|
-
| `hyper/qwen3-coder-480b-a35b-instruct-int4-mixed-ar` | 106K | | | | | | $0.
|
|
54
|
+
| `hyper/qwen3-coder-480b-a35b-instruct-int4-mixed-ar` | 106K | | | | | | $0.45 | $2 |
|
|
55
55
|
| `hyper/qwen3-next-80b-a3b-instruct` | 262K | | | | | | $0.12 | $1 |
|
|
56
56
|
| `hyper/qwen3.6-flash` | 1.0M | | | | | | $1 | $4 |
|
|
57
57
|
| `hyper/qwen3.6-max` | 256K | | | | | | $2 | $12 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Kilo Gateway
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 346 Kilo Gateway models through Mastra's model router. Authentication is handled automatically using the `KILO_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Kilo Gateway documentation](https://kilo.ai).
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@ for await (const chunk of stream) {
|
|
|
40
40
|
| `kilo/~anthropic/claude-haiku-latest` | 200K | | | | | | $1 | $5 |
|
|
41
41
|
| `kilo/~anthropic/claude-opus-latest` | 1.0M | | | | | | $5 | $25 |
|
|
42
42
|
| `kilo/~anthropic/claude-sonnet-latest` | 1.0M | | | | | | $2 | $10 |
|
|
43
|
-
| `kilo/~deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.08 | $0.
|
|
43
|
+
| `kilo/~deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.08 | $0.16 |
|
|
44
44
|
| `kilo/~google/gemini-flash-latest` | 1.0M | | | | | | $2 | $8 |
|
|
45
45
|
| `kilo/~google/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
|
|
46
46
|
| `kilo/~moonshotai/kimi-latest` | 1.0M | | | | | | $3 | $14 |
|
|
@@ -157,7 +157,7 @@ for await (const chunk of stream) {
|
|
|
157
157
|
| `kilo/meta-llama/llama-3.2-1b-instruct` | 60K | | | | | | $0.03 | $0.20 |
|
|
158
158
|
| `kilo/meta-llama/llama-3.2-3b-instruct` | 131K | | | | | | $0.05 | $0.33 |
|
|
159
159
|
| `kilo/meta-llama/llama-3.3-70b-instruct` | 131K | | | | | | $0.10 | $0.32 |
|
|
160
|
-
| `kilo/meta-llama/llama-4-maverick` |
|
|
160
|
+
| `kilo/meta-llama/llama-4-maverick` | 1.0M | | | | | | $0.20 | $0.70 |
|
|
161
161
|
| `kilo/meta-llama/llama-4-scout` | 328K | | | | | | $0.10 | $0.30 |
|
|
162
162
|
| `kilo/meta-llama/llama-guard-4-12b` | 164K | | | | | | $0.18 | $0.18 |
|
|
163
163
|
| `kilo/meta/muse-spark-1.1` | 1.0M | | | | | | $1 | $4 |
|
|
@@ -242,7 +242,6 @@ for await (const chunk of stream) {
|
|
|
242
242
|
| `kilo/openai/gpt-5.2-chat` | 128K | | | | | | $2 | $14 |
|
|
243
243
|
| `kilo/openai/gpt-5.2-codex` | 400K | | | | | | $2 | $14 |
|
|
244
244
|
| `kilo/openai/gpt-5.2-pro` | 400K | | | | | | $21 | $168 |
|
|
245
|
-
| `kilo/openai/gpt-5.3-chat` | 128K | | | | | | $2 | $14 |
|
|
246
245
|
| `kilo/openai/gpt-5.3-codex` | 400K | | | | | | $2 | $14 |
|
|
247
246
|
| `kilo/openai/gpt-5.4` | 1.1M | | | | | | $3 | $15 |
|
|
248
247
|
| `kilo/openai/gpt-5.4-image-2` | 272K | | | | | | $8 | $15 |
|
|
@@ -302,7 +301,7 @@ for await (const chunk of stream) {
|
|
|
302
301
|
| `kilo/qwen/qwen3-32b` | 41K | | | | | | $0.10 | $0.42 |
|
|
303
302
|
| `kilo/qwen/qwen3-8b` | 131K | | | | | | $0.12 | $0.46 |
|
|
304
303
|
| `kilo/qwen/qwen3-coder` | 262K | | | | | | $0.97 | $5 |
|
|
305
|
-
| `kilo/qwen/qwen3-coder-30b-a3b-instruct` |
|
|
304
|
+
| `kilo/qwen/qwen3-coder-30b-a3b-instruct` | 262K | | | | | | $0.29 | $1 |
|
|
306
305
|
| `kilo/qwen/qwen3-coder-flash` | 1.0M | | | | | | $0.20 | $0.97 |
|
|
307
306
|
| `kilo/qwen/qwen3-coder-next` | 262K | | | | | | $0.30 | $2 |
|
|
308
307
|
| `kilo/qwen/qwen3-coder-plus` | 1.0M | | | | | | $0.65 | $3 |
|
|
@@ -381,7 +380,7 @@ for await (const chunk of stream) {
|
|
|
381
380
|
| `kilo/z-ai/glm-5` | 205K | | | | | | $1 | $3 |
|
|
382
381
|
| `kilo/z-ai/glm-5-turbo` | 203K | | | | | | $1 | $4 |
|
|
383
382
|
| `kilo/z-ai/glm-5.1` | 203K | | | | | | $1 | $4 |
|
|
384
|
-
| `kilo/z-ai/glm-5.2` |
|
|
383
|
+
| `kilo/z-ai/glm-5.2` | 1.0M | | | | | | $1 | $4 |
|
|
385
384
|
| `kilo/z-ai/glm-5v-turbo` | 203K | | | | | | $1 | $4 |
|
|
386
385
|
|
|
387
386
|
## Advanced configuration
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# LLM Gateway
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 186 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [LLM Gateway documentation](https://llmgateway.io/docs).
|
|
8
8
|
|
|
@@ -41,7 +41,6 @@ for await (const chunk of stream) {
|
|
|
41
41
|
| `llmgateway/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
|
|
42
42
|
| `llmgateway/claude-haiku-4-5` | 200K | | | | | | $1 | $5 |
|
|
43
43
|
| `llmgateway/claude-haiku-4-5-20251001` | 200K | | | | | | $1 | $5 |
|
|
44
|
-
| `llmgateway/claude-haiku-4-5-free` | 200K | | | | | | — | — |
|
|
45
44
|
| `llmgateway/claude-opus-4-1-20250805` | 200K | | | | | | $15 | $75 |
|
|
46
45
|
| `llmgateway/claude-opus-4-5-20251101` | 200K | | | | | | $5 | $25 |
|
|
47
46
|
| `llmgateway/claude-opus-4-6` | 1.0M | | | | | | $5 | $25 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# NanoGPT
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 618 NanoGPT models through Mastra's model router. Authentication is handled automatically using the `NANO_GPT_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [NanoGPT documentation](https://docs.nano-gpt.com).
|
|
8
8
|
|
|
@@ -566,8 +566,6 @@ for await (const chunk of stream) {
|
|
|
566
566
|
| `nano-gpt/TEE/glm-5.2:thinking` | 1.0M | | | | | | $1 | $5 |
|
|
567
567
|
| `nano-gpt/TEE/gpt-oss-120b` | 131K | | | | | | $2 | $2 |
|
|
568
568
|
| `nano-gpt/TEE/gpt-oss-20b` | 131K | | | | | | $0.20 | $0.80 |
|
|
569
|
-
| `nano-gpt/TEE/kimi-k2.5` | 128K | | | | | | $0.60 | $3 |
|
|
570
|
-
| `nano-gpt/TEE/kimi-k2.5-thinking` | 128K | | | | | | $0.60 | $3 |
|
|
571
569
|
| `nano-gpt/TEE/kimi-k2.6` | 262K | | | | | | $2 | $5 |
|
|
572
570
|
| `nano-gpt/TEE/kimi-k3` | 1.0M | | | | | | $3 | $15 |
|
|
573
571
|
| `nano-gpt/TEE/llama3-3-70b` | 128K | | | | | | $2 | $2 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Privatemode AI
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 6 Privatemode AI models through Mastra's model router. Authentication is handled automatically using the `PRIVATEMODE_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Privatemode AI documentation](https://docs.privatemode.ai).
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ const agent = new Agent({
|
|
|
17
17
|
id: "my-agent",
|
|
18
18
|
name: "My Agent",
|
|
19
19
|
instructions: "You are a helpful assistant",
|
|
20
|
-
model: "privatemode-ai/
|
|
20
|
+
model: "privatemode-ai/deepseek-ocr-2"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// Generate a response
|
|
@@ -36,6 +36,7 @@ for await (const chunk of stream) {
|
|
|
36
36
|
|
|
37
37
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
38
|
| ----------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
+
| `privatemode-ai/deepseek-ocr-2` | 8K | | | | | | $0.89 | $1 |
|
|
39
40
|
| `privatemode-ai/gpt-oss-120b` | 128K | | | | | | — | — |
|
|
40
41
|
| `privatemode-ai/kimi-k2.6` | 262K | | | | | | — | — |
|
|
41
42
|
| `privatemode-ai/qwen3-embedding-4b` | 32K | | | | | | — | — |
|
|
@@ -52,7 +53,7 @@ const agent = new Agent({
|
|
|
52
53
|
name: "custom-agent",
|
|
53
54
|
model: {
|
|
54
55
|
url: "http://localhost:8080/v1",
|
|
55
|
-
id: "privatemode-ai/
|
|
56
|
+
id: "privatemode-ai/deepseek-ocr-2",
|
|
56
57
|
apiKey: process.env.PRIVATEMODE_API_KEY,
|
|
57
58
|
headers: {
|
|
58
59
|
"X-Custom-Header": "value"
|
|
@@ -71,7 +72,7 @@ const agent = new Agent({
|
|
|
71
72
|
const useAdvanced = requestContext.task === "complex";
|
|
72
73
|
return useAdvanced
|
|
73
74
|
? "privatemode-ai/whisper-large-v3"
|
|
74
|
-
: "privatemode-ai/
|
|
75
|
+
: "privatemode-ai/deepseek-ocr-2";
|
|
75
76
|
}
|
|
76
77
|
});
|
|
77
78
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Snowflake Cortex
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 25 Snowflake Cortex models through Mastra's model router. Authentication is handled automatically using the `SNOWFLAKE_CORTEX_PAT` environment variable. Configure `SNOWFLAKE_ACCOUNT` as well.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Snowflake Cortex documentation](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-rest-api).
|
|
8
8
|
|
|
@@ -39,10 +39,14 @@ for await (const chunk of stream) {
|
|
|
39
39
|
| ----------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
40
40
|
| `snowflake-cortex/claude-fable-5` | 1.0M | | | | | | — | — |
|
|
41
41
|
| `snowflake-cortex/claude-haiku-4-5` | 200K | | | | | | — | — |
|
|
42
|
+
| `snowflake-cortex/claude-opus-4-5` | 200K | | | | | | — | — |
|
|
43
|
+
| `snowflake-cortex/claude-opus-4-6` | 1.0M | | | | | | — | — |
|
|
42
44
|
| `snowflake-cortex/claude-opus-4-7` | 1.0M | | | | | | — | — |
|
|
43
45
|
| `snowflake-cortex/claude-opus-4-8` | 1.0M | | | | | | — | — |
|
|
46
|
+
| `snowflake-cortex/claude-opus-5` | 1.0M | | | | | | — | — |
|
|
44
47
|
| `snowflake-cortex/claude-sonnet-4-5` | 200K | | | | | | — | — |
|
|
45
48
|
| `snowflake-cortex/claude-sonnet-4-6` | 1.0M | | | | | | — | — |
|
|
49
|
+
| `snowflake-cortex/claude-sonnet-5` | 1.0M | | | | | | — | — |
|
|
46
50
|
| `snowflake-cortex/deepseek-r1` | 128K | | | | | | — | — |
|
|
47
51
|
| `snowflake-cortex/gemini-3.1-pro` | 1.0M | | | | | | — | — |
|
|
48
52
|
| `snowflake-cortex/mistral-large2` | 262K | | | | | | — | — |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Weights & Biases
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 28 Weights & Biases models through Mastra's model router. Authentication is handled automatically using the `WANDB_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Weights & Biases documentation](https://docs.wandb.ai).
|
|
8
8
|
|
|
@@ -53,6 +53,7 @@ for await (const chunk of stream) {
|
|
|
53
53
|
| `wandb/moonshotai/Kimi-K3` | 1.0M | | | | | | $3 | $15 |
|
|
54
54
|
| `wandb/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8` | 262K | | | | | | $0.20 | $0.80 |
|
|
55
55
|
| `wandb/nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B` | 262K | | | | | | $0.75 | $3 |
|
|
56
|
+
| `wandb/nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B` | 262K | | | | | | $0.10 | $0.25 |
|
|
56
57
|
| `wandb/openai/gpt-oss-120b` | 131K | | | | | | $0.03 | $0.17 |
|
|
57
58
|
| `wandb/openai/gpt-oss-20b` | 131K | | | | | | $0.03 | $0.13 |
|
|
58
59
|
| `wandb/OpenPipe/Qwen3-14B-Instruct` | 33K | | | | | | $0.05 | $0.22 |
|
|
@@ -36,8 +36,6 @@ for await (const chunk of stream) {
|
|
|
36
36
|
|
|
37
37
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
38
|
| --------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
|
-
| `zenmux/anthropic/claude-3.5-haiku` | 200K | | | | | | $0.80 | $4 |
|
|
40
|
-
| `zenmux/anthropic/claude-3.7-sonnet` | 200K | | | | | | $3 | $15 |
|
|
41
39
|
| `zenmux/anthropic/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
|
|
42
40
|
| `zenmux/anthropic/claude-haiku-4.5` | 200K | | | | | | $1 | $5 |
|
|
43
41
|
| `zenmux/anthropic/claude-opus-4` | 200K | | | | | | $15 | $75 |
|
|
@@ -52,7 +50,6 @@ for await (const chunk of stream) {
|
|
|
52
50
|
| `zenmux/anthropic/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
|
|
53
51
|
| `zenmux/anthropic/claude-sonnet-5-free` | 1.0M | | | | | | — | — |
|
|
54
52
|
| `zenmux/baidu/ernie-5.0-thinking-preview` | 128K | | | | | | $0.84 | $3 |
|
|
55
|
-
| `zenmux/deepseek/deepseek-chat` | 128K | | | | | | $0.28 | $0.42 |
|
|
56
53
|
| `zenmux/deepseek/deepseek-v3.2` | 128K | | | | | | $0.28 | $0.43 |
|
|
57
54
|
| `zenmux/deepseek/deepseek-v3.2-exp` | 163K | | | | | | $0.22 | $0.33 |
|
|
58
55
|
| `zenmux/deepseek/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
|
|
@@ -65,8 +62,6 @@ for await (const chunk of stream) {
|
|
|
65
62
|
| `zenmux/google/gemini-3.1-flash-lite-preview` | 1.1M | | | | | | $0.25 | $2 |
|
|
66
63
|
| `zenmux/google/gemini-3.1-pro-preview` | 1.0M | | | | | | $2 | $12 |
|
|
67
64
|
| `zenmux/google/gemini-3.5-flash` | 1.0M | | | | | | $2 | $9 |
|
|
68
|
-
| `zenmux/inclusionai/ling-1t` | 128K | | | | | | $0.56 | $2 |
|
|
69
|
-
| `zenmux/inclusionai/ring-1t` | 128K | | | | | | $0.56 | $2 |
|
|
70
65
|
| `zenmux/inclusionai/ring-2.6-1t` | 262K | | | | | | $0.30 | $3 |
|
|
71
66
|
| `zenmux/kuaishou/kat-coder-pro-v2` | 256K | | | | | | $0.30 | $1 |
|
|
72
67
|
| `zenmux/minimax/minimax-m2` | 204K | | | | | | $0.30 | $1 |
|
|
@@ -76,9 +71,6 @@ for await (const chunk of stream) {
|
|
|
76
71
|
| `zenmux/minimax/minimax-m2.7` | 205K | | | | | | $0.31 | $1 |
|
|
77
72
|
| `zenmux/minimax/minimax-m2.7-highspeed` | 205K | | | | | | $0.61 | $2 |
|
|
78
73
|
| `zenmux/minimax/minimax-m3` | 512K | | | | | | $0.60 | $2 |
|
|
79
|
-
| `zenmux/moonshotai/kimi-k2-0905` | 262K | | | | | | $0.60 | $3 |
|
|
80
|
-
| `zenmux/moonshotai/kimi-k2-thinking` | 262K | | | | | | $0.60 | $3 |
|
|
81
|
-
| `zenmux/moonshotai/kimi-k2-thinking-turbo` | 262K | | | | | | $1 | $8 |
|
|
82
74
|
| `zenmux/moonshotai/kimi-k2.5` | 262K | | | | | | $0.58 | $3 |
|
|
83
75
|
| `zenmux/moonshotai/kimi-k2.6` | 262K | | | | | | $0.95 | $4 |
|
|
84
76
|
| `zenmux/moonshotai/kimi-k2.7-code` | 262K | | | | | | $0.95 | $4 |
|
|
@@ -115,7 +107,6 @@ for await (const chunk of stream) {
|
|
|
115
107
|
| `zenmux/qwen/qwen3.7-plus` | 1.0M | | | | | | $0.40 | $2 |
|
|
116
108
|
| `zenmux/sapiens-ai/agnes-1.5-lite` | 256K | | | | | | $0.12 | $0.60 |
|
|
117
109
|
| `zenmux/sapiens-ai/agnes-1.5-pro` | 256K | | | | | | $0.16 | $0.80 |
|
|
118
|
-
| `zenmux/stepfun/step-3` | 66K | | | | | | $0.21 | $0.57 |
|
|
119
110
|
| `zenmux/stepfun/step-3.5-flash` | 256K | | | | | | $0.10 | $0.30 |
|
|
120
111
|
| `zenmux/stepfun/step-3.7-flash` | 256K | | | | | | $0.20 | $1 |
|
|
121
112
|
| `zenmux/stepfun/step-3.7-flash-free` | 256K | | | | | | — | — |
|
|
@@ -125,17 +116,11 @@ for await (const chunk of stream) {
|
|
|
125
116
|
| `zenmux/volcengine/doubao-seed-2.0-lite` | 256K | | | | | | $0.09 | $0.51 |
|
|
126
117
|
| `zenmux/volcengine/doubao-seed-2.0-mini` | 256K | | | | | | $0.03 | $0.28 |
|
|
127
118
|
| `zenmux/volcengine/doubao-seed-2.0-pro` | 256K | | | | | | $0.45 | $2 |
|
|
128
|
-
| `zenmux/volcengine/doubao-seed-code` | 256K | | | | | | $0.17 | $1 |
|
|
129
|
-
| `zenmux/x-ai/grok-4` | 256K | | | | | | $3 | $15 |
|
|
130
|
-
| `zenmux/x-ai/grok-4-fast` | 2.0M | | | | | | $0.20 | $0.50 |
|
|
131
|
-
| `zenmux/x-ai/grok-4.1-fast` | 2.0M | | | | | | $0.20 | $0.50 |
|
|
132
|
-
| `zenmux/x-ai/grok-4.1-fast-non-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
|
|
133
119
|
| `zenmux/x-ai/grok-4.2-fast` | 2.0M | | | | | | $3 | $9 |
|
|
134
120
|
| `zenmux/x-ai/grok-4.2-fast-non-reasoning` | 2.0M | | | | | | $3 | $9 |
|
|
135
121
|
| `zenmux/x-ai/grok-4.3` | 1.0M | | | | | | $1 | $3 |
|
|
136
122
|
| `zenmux/x-ai/grok-4.5` | 500K | | | | | | $2 | $6 |
|
|
137
123
|
| `zenmux/x-ai/grok-build-0.1` | 256K | | | | | | $1 | $2 |
|
|
138
|
-
| `zenmux/x-ai/grok-code-fast-1` | 256K | | | | | | $0.20 | $2 |
|
|
139
124
|
| `zenmux/xiaomi/mimo-v2-flash` | 262K | | | | | | $0.10 | $0.30 |
|
|
140
125
|
| `zenmux/xiaomi/mimo-v2-omni` | 265K | | | | | | $0.40 | $2 |
|
|
141
126
|
| `zenmux/xiaomi/mimo-v2-pro` | 1.0M | | | | | | $1 | $3 |
|
|
@@ -39,6 +39,7 @@ Direct access to individual AI model providers. Each provider offers unique mode
|
|
|
39
39
|
- [ClinePass](https://mastra.ai/models/providers/cline-pass)
|
|
40
40
|
- [CloudFerro Sherlock](https://mastra.ai/models/providers/cloudferro-sherlock)
|
|
41
41
|
- [Cloudflare Workers AI](https://mastra.ai/models/providers/cloudflare-workers-ai)
|
|
42
|
+
- [CoralBricks](https://mastra.ai/models/providers/coralbricks)
|
|
42
43
|
- [Cortecs](https://mastra.ai/models/providers/cortecs)
|
|
43
44
|
- [CrofAI](https://mastra.ai/models/providers/crof)
|
|
44
45
|
- [CrossModel](https://mastra.ai/models/providers/crossmodel)
|
|
@@ -72,10 +72,36 @@ handler: async params => {
|
|
|
72
72
|
|
|
73
73
|
## Return value
|
|
74
74
|
|
|
75
|
-
Returns a `ServerRoute` object that can be registered with an adapter.
|
|
75
|
+
Returns a `ServerRoute` object that can be registered with an adapter or passed to `server.apiRoutes` on the `Mastra` instance.
|
|
76
76
|
|
|
77
77
|
## Examples
|
|
78
78
|
|
|
79
|
+
### Register through `server.apiRoutes`
|
|
80
|
+
|
|
81
|
+
Routes created with `createRoute()` can be passed to `server.apiRoutes`. The adapter registers them with runtime validation, typed handler parameters, and generated OpenAPI metadata. See [Custom API routes](https://mastra.ai/docs/server/custom-api-routes) for details.
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
import { Mastra } from '@mastra/core'
|
|
85
|
+
import { createRoute } from '@mastra/server/server-adapter'
|
|
86
|
+
import { z } from 'zod'
|
|
87
|
+
|
|
88
|
+
const createItemRoute = createRoute({
|
|
89
|
+
method: 'POST',
|
|
90
|
+
path: '/items',
|
|
91
|
+
responseType: 'json',
|
|
92
|
+
bodySchema: z.object({
|
|
93
|
+
name: z.string(),
|
|
94
|
+
}),
|
|
95
|
+
handler: async ({ name }) => ({ id: 'new-id', name }),
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
export const mastra = new Mastra({
|
|
99
|
+
server: {
|
|
100
|
+
apiRoutes: [createItemRoute],
|
|
101
|
+
},
|
|
102
|
+
})
|
|
103
|
+
```
|
|
104
|
+
|
|
79
105
|
### GET route with path params
|
|
80
106
|
|
|
81
107
|
```typescript
|
|
@@ -150,6 +150,7 @@ const result = await run.timeTravel({
|
|
|
150
150
|
- When re-executing a workflow, the workflow loads the existing snapshot from storage (if available)
|
|
151
151
|
- Step results before the target step are reconstructed from the snapshot or provided context
|
|
152
152
|
- Execution begins from the specified step with the provided or reconstructed input data
|
|
153
|
+
- If a step that precedes the target in the current workflow definition has no recorded entry in the snapshot (for example, the step was renamed since the run was recorded, or the run never reached it), `timeTravel` rejects with a descriptive error before anything executes and the stored snapshot is left unchanged
|
|
153
154
|
- The workflow continues to completion from that point forward
|
|
154
155
|
- Time travel can be used on workflows that haven't been run yet by providing custom context or input data for the step to start from.
|
|
155
156
|
|
|
@@ -136,6 +136,12 @@ await sandbox.start() // Boots from the most recent checkpoint for this id, or f
|
|
|
136
136
|
|
|
137
137
|
Checkpoint recovery is coarser than `sandboxId` reattachment. Reattaching (via `sandboxId`) rejoins the exact live sandbox and its running processes. Checkpoint recovery constructs a brand new sandbox and restores its filesystem from the latest checkpoint the platform captured for the previous sandbox with that `id`. Running processes and any filesystem writes made after the last checkpoint aren't restored.
|
|
138
138
|
|
|
139
|
+
Call `snapshot()` after a filesystem update to capture the configured recovery checkpoint immediately. It resolves without capturing when the sandbox has no caller-provided `id` or isn't running.
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
await sandbox.snapshot()
|
|
143
|
+
```
|
|
144
|
+
|
|
139
145
|
Each `id` maps to one independent filesystem. Reusing the same `id` across unrelated sandboxes causes the platform to boot them from each other's checkpoint.
|
|
140
146
|
|
|
141
147
|
### Cloning for a fleet of sandboxes
|
|
@@ -219,6 +225,8 @@ console.log(result.exitCode)
|
|
|
219
225
|
|
|
220
226
|
**clone** (`(options?: SandboxCloneOptions) => PlatformSandbox`): Construct an unstarted sibling PlatformSandbox that inherits credentials and defaults with per-instance overrides (id, sandboxId, env, idleTimeoutMinutes). Performs no I/O. Use to build a fleet of independent sandboxes from one configured template.
|
|
221
227
|
|
|
228
|
+
**snapshot** (`() => Promise<void>`): Capture the configured recovery checkpoint immediately. Resolves without work when no caller-provided id exists or the sandbox is not running.
|
|
229
|
+
|
|
222
230
|
**getInfo** (`() => Promise<SandboxInfo>`): Return the sandbox's platform id, provider, status, createdAt, and metadata (sandboxId, providerResourceId, platformStatus).
|
|
223
231
|
|
|
224
232
|
**getInstructions** (`(opts?: { requestContext?: RequestContext }) => string`): Return the sandbox instructions the workspace surfaces in tool descriptions. Honors the instructions constructor option; otherwise returns platform-default instructions that include the current remote sandbox id when running.
|
|
@@ -141,6 +141,12 @@ const sandbox = new RailwaySandbox({
|
|
|
141
141
|
|
|
142
142
|
`RailwaySandbox` refreshes the checkpoint shortly before the idle timeout. Recovery restores the latest successful checkpoint. It doesn't restore running processes or filesystem writes made after the last checkpoint.
|
|
143
143
|
|
|
144
|
+
Call `snapshot()` after a filesystem update to capture the configured checkpoint immediately. It resolves without capturing when `checkpointName` isn't configured or the sandbox isn't running.
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
await sandbox.snapshot()
|
|
148
|
+
```
|
|
149
|
+
|
|
144
150
|
Use one stable checkpoint name for each independent filesystem. Don't share a checkpoint name across unrelated sessions or projects.
|
|
145
151
|
|
|
146
152
|
### Cloned sandbox checkpoints
|
|
@@ -228,6 +234,8 @@ const result = await sandbox.executeCommand('cat', ['/tmp/state.txt'])
|
|
|
228
234
|
|
|
229
235
|
**clone** (`(options?) => RailwaySandbox`): Construct an unstarted sibling sandbox that inherits credentials and defaults. Accepts optional id, sandboxId, env, idleTimeoutMinutes, and checkpointName overrides. The cloned sandbox uses options.checkpointName when set, otherwise it inherits the template checkpointName.
|
|
230
236
|
|
|
237
|
+
**snapshot** (`() => Promise<void>`): Capture the configured recovery checkpoint immediately. Resolves without work when checkpointName is not configured or the sandbox is not running.
|
|
238
|
+
|
|
231
239
|
## Background processes
|
|
232
240
|
|
|
233
241
|
`RailwaySandbox` includes a built-in process manager for spawning and managing background processes. Each spawned process runs as a Railway `exec` session.
|
|
@@ -38,6 +38,16 @@ Clean up sandbox resources. Called by `workspace.destroy()`.
|
|
|
38
38
|
await sandbox.destroy()
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
### `snapshot()`
|
|
42
|
+
|
|
43
|
+
Persists the sandbox's current state when the provider supports snapshots. Other providers resolve without doing work.
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
await sandbox.snapshot()
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Returns:** `Promise<void>`
|
|
50
|
+
|
|
41
51
|
### `executeCommand(command, args?, options?)`
|
|
42
52
|
|
|
43
53
|
Execute a shell command.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.15-alpha.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`9571e3a`](https://github.com/mastra-ai/mastra/commit/9571e3a06ed2c5220196460bf82a2129255c3a8b), [`d6c56f9`](https://github.com/mastra-ai/mastra/commit/d6c56f951db3213330b98b0abafa9778c8770e58), [`9571e3a`](https://github.com/mastra-ai/mastra/commit/9571e3a06ed2c5220196460bf82a2129255c3a8b), [`acc3513`](https://github.com/mastra-ai/mastra/commit/acc3513b19f79bf0a7ec2998694580edca54086c), [`94e7ae9`](https://github.com/mastra-ai/mastra/commit/94e7ae970b37c888cd1244ef013292639a2fe6d1), [`6a667b4`](https://github.com/mastra-ai/mastra/commit/6a667b4b7cd6a93fe41fcdd357b08c5a8c09b9ab), [`2440e09`](https://github.com/mastra-ai/mastra/commit/2440e096ea6c2def1ccc1eb2d0f3f5b88c4af940), [`a59049b`](https://github.com/mastra-ai/mastra/commit/a59049b1652a13efff66ac826326b5ed9a550342)]:
|
|
8
|
+
- @mastra/core@1.58.0-alpha.13
|
|
9
|
+
|
|
3
10
|
## 1.2.15-alpha.19
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.2.15-alpha.
|
|
3
|
+
"version": "1.2.15-alpha.20",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"jsdom": "^26.1.0",
|
|
29
29
|
"local-pkg": "^1.1.2",
|
|
30
30
|
"zod": "^4.4.3",
|
|
31
|
-
"@mastra/core": "1.58.0-alpha.
|
|
31
|
+
"@mastra/core": "1.58.0-alpha.13",
|
|
32
32
|
"@mastra/mcp": "^1.16.0-alpha.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"tsx": "^4.23.1",
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
47
|
"vitest": "4.1.10",
|
|
48
|
-
"@mastra/core": "1.58.0-alpha.12",
|
|
49
48
|
"@internal/lint": "0.0.121",
|
|
49
|
+
"@mastra/core": "1.58.0-alpha.13",
|
|
50
50
|
"@internal/types-builder": "0.0.96"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|