@mastra/mcp-docs-server 1.2.13-alpha.4 → 1.2.13-alpha.8
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/agents/agent-approval.md +2 -2
- package/.docs/docs/deployment/workers.md +14 -14
- package/.docs/docs/evals/datasets/running-experiments.md +1 -1
- package/.docs/docs/index.md +1 -1
- package/.docs/docs/long-running-agents/durable-agents.md +2 -2
- package/.docs/docs/mastra-platform/overview.md +1 -1
- package/.docs/docs/mastra-platform/{workspace.md → workspaces.md} +48 -7
- package/.docs/docs/memory/observational-memory.md +30 -13
- package/.docs/docs/memory/overview.md +14 -0
- package/.docs/docs/server/auth/workers.md +7 -5
- package/.docs/docs/server/mastra-client.md +60 -0
- package/.docs/docs/server/pubsub.md +2 -2
- package/.docs/docs/what-is-mastra.md +10 -10
- package/.docs/docs/workflows/overview.md +1 -1
- package/.docs/docs/workflows/scheduled-workflows.md +1 -0
- package/.docs/guides/deployment/kubernetes.md +2 -0
- package/.docs/guides/deployment/mastra-workers.md +350 -6
- package/.docs/guides/deployment/vercel.md +2 -0
- package/.docs/models/gateways/openrouter.md +1 -4
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/hyper.md +2 -1
- package/.docs/models/providers/minimax.md +1 -1
- package/.docs/models/providers/openai.md +2 -2
- package/.docs/models/providers/opencode-go.md +2 -1
- package/.docs/models/providers/opencode.md +1 -1
- package/.docs/models/providers/perplexity-agent.md +3 -1
- package/.docs/reference/agents/durable-agent.md +12 -1
- package/.docs/reference/cli/mastra.md +30 -14
- package/.docs/reference/core/mastra-class.md +1 -1
- package/.docs/reference/evals/summarization.md +203 -0
- package/.docs/reference/index.md +1 -0
- package/.docs/reference/memory/observational-memory.md +74 -24
- package/.docs/reference/observability/tracing/interfaces.md +3 -0
- package/.docs/reference/processors/regex-filter-processor.md +1 -1
- package/.docs/reference/tools/isolated-vm-transport.md +1 -1
- package/.docs/reference/vectors/mongodb.md +13 -13
- package/.docs/reference/workers/overview.md +10 -8
- package/.docs/reference/workspace/platform-filesystem.md +5 -2
- package/.docs/reference/workspace/platform-sandbox.md +80 -4
- package/CHANGELOG.md +15 -0
- package/package.json +5 -5
|
@@ -10,14 +10,14 @@ For usage patterns and deployment topologies, see [Workers](https://mastra.ai/do
|
|
|
10
10
|
|
|
11
11
|
Controls which workers start in the current process.
|
|
12
12
|
|
|
13
|
-
| Value | Behavior
|
|
14
|
-
| --------------------------- |
|
|
15
|
-
| _(not set)_ | Default workers are auto-created based on configuration
|
|
16
|
-
| `"false"` | Disables
|
|
17
|
-
| `"orchestration"` | Only the orchestration worker starts
|
|
18
|
-
| `"scheduler"` | Only the scheduler worker starts
|
|
19
|
-
| `"backgroundTasks"` | Only the background task worker starts
|
|
20
|
-
| `"orchestration,scheduler"` | Multiple workers (comma-separated)
|
|
13
|
+
| Value | Behavior |
|
|
14
|
+
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| _(not set)_ | Default workers are auto-created based on configuration |
|
|
16
|
+
| `"false"` | Disables worker event processing. The process serves HTTP requests and can still publish events to PubSub (e.g., workflow starts) without consuming them. |
|
|
17
|
+
| `"orchestration"` | Only the orchestration worker starts |
|
|
18
|
+
| `"scheduler"` | Only the scheduler worker starts |
|
|
19
|
+
| `"backgroundTasks"` | Only the background task worker starts |
|
|
20
|
+
| `"orchestration,scheduler"` | Multiple workers (comma-separated) |
|
|
21
21
|
|
|
22
22
|
Use this to run different worker types in separate containers from the same build artifact.
|
|
23
23
|
|
|
@@ -29,6 +29,8 @@ The base URL of the API server, used by the orchestration worker to execute work
|
|
|
29
29
|
MASTRA_STEP_EXECUTION_URL=http://api:4111/api
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
Use HTTPS URLs in production. See [Security recommendations](https://mastra.ai/docs/server/auth/workers).
|
|
33
|
+
|
|
32
34
|
The orchestration worker sends step execution requests to:
|
|
33
35
|
|
|
34
36
|
```text
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Stores files in a Mastra Platform workspace bucket. Each Mastra Platform environment can have one bucket, and `PlatformFilesystem` gives agents `read`, `write`, `list`, `delete`, and `move` operations against it.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Related providers: [`S3Filesystem`](https://mastra.ai/reference/workspace/s3-filesystem) for direct S3 access, [`LocalFilesystem`](https://mastra.ai/reference/workspace/local-filesystem) for local directories.
|
|
8
8
|
|
|
9
9
|
> **Info:** For interface details, see [WorkspaceFilesystem interface](https://mastra.ai/reference/workspace/filesystem).
|
|
10
10
|
|
|
@@ -157,7 +157,8 @@ Filesystem-specific errors match the standard workspace error types:
|
|
|
157
157
|
Other Platform API failures raise `PlatformApiError`. Structured `{ error: { message, type } }` responses are parsed into `.code` (machine-readable kind) and `.proxyMessage` (human string):
|
|
158
158
|
|
|
159
159
|
```typescript
|
|
160
|
-
import { FileNotFoundError
|
|
160
|
+
import { FileNotFoundError } from '@mastra/core/workspace'
|
|
161
|
+
import { PlatformApiError } from '@mastra/platform-workspace'
|
|
161
162
|
|
|
162
163
|
try {
|
|
163
164
|
await fs.readFile('/missing.txt')
|
|
@@ -173,6 +174,8 @@ try {
|
|
|
173
174
|
}
|
|
174
175
|
```
|
|
175
176
|
|
|
177
|
+
`FileNotFoundError`, `FileExistsError`, and `WorkspaceReadOnlyError` are re-exports of the standard workspace error types from `@mastra/core/workspace`. `PlatformApiError` is specific to `@mastra/platform-workspace`.
|
|
178
|
+
|
|
176
179
|
`code` and `proxyMessage` are `undefined` when the response body isn't JSON, for example an HTML 502 from a load balancer.
|
|
177
180
|
|
|
178
181
|
## Related
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# PlatformSandbox
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Client for provisioning sandboxes in a Mastra Platform environment. Each `PlatformSandbox` instance owns one remote sandbox: `start()` provisions it, `executeCommand()` runs against it, and `destroy()` tears it down. Construct additional instances to own additional remote sandboxes; use `clone()` to derive them from a configured template (see [Cloning](#cloning-for-a-fleet-of-sandboxes)).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Sandboxes boot from a pre-built recipe checkpoint with Python 3, Node 22, TypeScript, tsx, and common build tooling already installed. Pass a stable `id` to opt into [checkpoint recovery](#checkpoint-recovery) so a new sandbox boots from the previous one's filesystem.
|
|
8
|
+
|
|
9
|
+
Related providers: [`RailwaySandbox`](https://mastra.ai/reference/workspace/railway-sandbox) for self-hosted Railway sandboxes, [`LocalSandbox`](https://mastra.ai/reference/workspace/local-sandbox) for local sandboxes.
|
|
8
10
|
|
|
9
11
|
> **Info:** For interface details, see [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
10
12
|
|
|
@@ -103,7 +105,7 @@ The default `ISOLATED` mode allows outbound internet access only, with no privat
|
|
|
103
105
|
|
|
104
106
|
### Reattaching to a running sandbox
|
|
105
107
|
|
|
106
|
-
Pass an existing `sandboxId` to reattach to a live sandbox instead of creating a new one
|
|
108
|
+
Pass an existing `sandboxId` to reattach to a live sandbox instead of creating a new one:
|
|
107
109
|
|
|
108
110
|
```typescript
|
|
109
111
|
const sandbox = new PlatformSandbox({
|
|
@@ -116,6 +118,42 @@ const result = await sandbox.executeCommand('cat', ['/workspace/state.json'])
|
|
|
116
118
|
|
|
117
119
|
When `sandboxId` is set, `environmentId` isn't required because the sandbox already exists.
|
|
118
120
|
|
|
121
|
+
### Checkpoint recovery
|
|
122
|
+
|
|
123
|
+
The constructor `id` (explicit or auto-generated) is sent to the platform on `POST /sandbox` as an advisory recovery key:
|
|
124
|
+
|
|
125
|
+
- If the platform recognises the `id` from a previous session, the new sandbox boots from the most recent checkpoint of that earlier sandbox's filesystem instead of the base recipe.
|
|
126
|
+
- If the `id` isn't recognised, the platform falls through to a fresh sandbox from the base recipe. Auto-generated ids never match, so omitting `id` disables checkpoint recovery.
|
|
127
|
+
|
|
128
|
+
Pass a stable `id` to preserve a sandbox's filesystem across sessions or across a `destroy()`/`start()` cycle:
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
const sandbox = new PlatformSandbox({
|
|
132
|
+
id: `project-${projectId}`,
|
|
133
|
+
})
|
|
134
|
+
await sandbox.start() // Boots from the most recent checkpoint for this id, or fresh if unknown
|
|
135
|
+
```
|
|
136
|
+
|
|
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
|
+
|
|
139
|
+
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
|
+
|
|
141
|
+
### Cloning for a fleet of sandboxes
|
|
142
|
+
|
|
143
|
+
`clone()` returns an independent sibling `PlatformSandbox` that inherits credentials and defaults (access token, project, environment, network isolation, timeout, instructions, env, idle timeout) with per-instance overrides. The returned sandbox is unstarted and provisions on its own `start()`, so `clone()` performs no I/O:
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
const template = new PlatformSandbox({
|
|
147
|
+
networkIsolation: 'PRIVATE',
|
|
148
|
+
idleTimeoutMinutes: 30,
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
const perProject = template.clone({ id: `project-${projectId}` })
|
|
152
|
+
await perProject.start()
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Combine `clone()` with a stable `id` per clone to opt each clone into [checkpoint recovery](#checkpoint-recovery) independently.
|
|
156
|
+
|
|
119
157
|
### Executing commands
|
|
120
158
|
|
|
121
159
|
`executeCommand` runs a command on the remote sandbox and returns its output. Pass `args` to have arguments safely shell-quoted:
|
|
@@ -153,7 +191,7 @@ console.log(result.exitCode)
|
|
|
153
191
|
|
|
154
192
|
**instructions** (`string | ((opts: { defaultInstructions: string; requestContext?: RequestContext }) => string)`): Custom instructions returned by getInstructions(). A string fully replaces the defaults; a function receives the defaults and can extend or customize them per-request.
|
|
155
193
|
|
|
156
|
-
**id** (`string`): Unique identifier for this sandbox instance. (Default: `Auto-generated`)
|
|
194
|
+
**id** (`string`): Unique identifier for this sandbox instance. Sent to the platform as an advisory recovery key: if the platform recognizes the id from a previous sandbox, the new sandbox boots from that sandbox's most recent checkpoint instead of the base recipe. Unknown ids fall through to a fresh sandbox. Auto-generated when omitted, which disables checkpoint recovery. (Default: `Auto-generated`)
|
|
157
195
|
|
|
158
196
|
**fetch** (`typeof fetch`): Custom fetch implementation, mainly for testing.
|
|
159
197
|
|
|
@@ -169,6 +207,22 @@ console.log(result.exitCode)
|
|
|
169
207
|
|
|
170
208
|
**processes** (`PlatformProcessManager`): Background process manager. See SandboxProcessManager reference.
|
|
171
209
|
|
|
210
|
+
## Methods
|
|
211
|
+
|
|
212
|
+
**start** (`() => Promise<void>`): Provision the remote sandbox, or reattach when sandboxId was passed to the constructor. Idempotent once the sandbox is running. A destroyed reattach target falls through to a fresh provision.
|
|
213
|
+
|
|
214
|
+
**destroy** (`() => Promise<void>`): Tear down the remote sandbox and clear the cached exec lease. A subsequent start() provisions a fresh sandbox (or restores from checkpoint when a stable id is set).
|
|
215
|
+
|
|
216
|
+
**stop** (`() => Promise<void>`): Alias for destroy().
|
|
217
|
+
|
|
218
|
+
**executeCommand** (`(command: string, args?: string[], options?: ExecuteCommandOptions) => Promise<CommandResult>`): Run a command on the remote sandbox and return its stdout, stderr, exitCode, and executionTimeMs. command is a shell string, args are safely shell-quoted.
|
|
219
|
+
|
|
220
|
+
**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
|
+
|
|
222
|
+
**getInfo** (`() => Promise<SandboxInfo>`): Return the sandbox's platform id, provider, status, createdAt, and metadata (sandboxId, providerResourceId, platformStatus).
|
|
223
|
+
|
|
224
|
+
**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.
|
|
225
|
+
|
|
172
226
|
## Errors
|
|
173
227
|
|
|
174
228
|
Platform API failures raise `PlatformApiError`. Structured `{ error: { message, type } }` responses are parsed into `.code` (machine-readable kind) and `.proxyMessage` (human string); the raw response body stays available on `.body`:
|
|
@@ -192,6 +246,28 @@ try {
|
|
|
192
246
|
|
|
193
247
|
`code` and `proxyMessage` are `undefined` when the response body isn't JSON, for example an HTML 502 from a load balancer.
|
|
194
248
|
|
|
249
|
+
`executeCommand` runs over the direct-exec data plane (a WebSocket to the Railway tcp-proxy) and can also throw two typed sandbox errors on unrecoverable failure:
|
|
250
|
+
|
|
251
|
+
```typescript
|
|
252
|
+
import { SandboxDestroyedError, SandboxExecTransportError } from '@mastra/platform-workspace'
|
|
253
|
+
|
|
254
|
+
try {
|
|
255
|
+
await sandbox.executeCommand('pytest')
|
|
256
|
+
} catch (err) {
|
|
257
|
+
if (err instanceof SandboxDestroyedError) {
|
|
258
|
+
// /exec-lease returned 410; the sandbox has been destroyed.
|
|
259
|
+
// The cached sandbox id and lease have already been cleared,
|
|
260
|
+
// so reusing the instance will reprovision on the next call.
|
|
261
|
+
} else if (err instanceof SandboxExecTransportError) {
|
|
262
|
+
// Both the initial WebSocket attempt and the built-in retry
|
|
263
|
+
// closed without an exit frame against a live sandbox.
|
|
264
|
+
console.error(err.closeCode, err.closeReason, err.wsEndpoint)
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
`SandboxExecTransportError` carries diagnostic fields (`opened`, `closeCode`, `closeReason`, `wsEndpoint`, plus `sandboxId`, `command`, and `attempts`) so operators can distinguish a broken Railway data plane from a failed command.
|
|
270
|
+
|
|
195
271
|
## Related
|
|
196
272
|
|
|
197
273
|
- [PlatformFilesystem reference](https://mastra.ai/reference/workspace/platform-filesystem)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.13-alpha.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`4844167`](https://github.com/mastra-ai/mastra/commit/4844167cff2d5ec5004e94edd34970833040fa3f), [`5faf93f`](https://github.com/mastra-ai/mastra/commit/5faf93f03e19daea394b9e2a923f2e4f833407f2), [`80ad891`](https://github.com/mastra-ai/mastra/commit/80ad891f8cd10379aa5b5af7510c763783b2ab56), [`c78aa4e`](https://github.com/mastra-ai/mastra/commit/c78aa4ecc422ba70476da73709c3e7d85edc71d6), [`a1cb98d`](https://github.com/mastra-ai/mastra/commit/a1cb98d11990b560b98482292a1f34aa1a2d9092), [`598ad82`](https://github.com/mastra-ai/mastra/commit/598ad82d41c41389a686338a1d0e50b7400e1938), [`1fd6aad`](https://github.com/mastra-ai/mastra/commit/1fd6aad1ea4a9d32f65efa832307c35e981a4c0a)]:
|
|
8
|
+
- @mastra/core@1.56.0-alpha.4
|
|
9
|
+
- @mastra/mcp@1.15.1-alpha.0
|
|
10
|
+
|
|
11
|
+
## 1.2.13-alpha.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`594f7b2`](https://github.com/mastra-ai/mastra/commit/594f7b28f5263fb9982fd50d95c471fb971ea984), [`311f943`](https://github.com/mastra-ai/mastra/commit/311f943bee60e8fdf5c84499ea50e884276c936c), [`0c89896`](https://github.com/mastra-ai/mastra/commit/0c8989673fb7d106837098398131e570c6023b68), [`23b4238`](https://github.com/mastra-ai/mastra/commit/23b423844ad0bcf2a502a68dd62866d6160f9f6d), [`e320a76`](https://github.com/mastra-ai/mastra/commit/e320a763feaf65c6be3cebecf746defcbde161b3), [`03b4918`](https://github.com/mastra-ai/mastra/commit/03b4918c80d188ce375334c393e131c6e94bd7eb), [`14ef73a`](https://github.com/mastra-ai/mastra/commit/14ef73a4bbd73e7808414816eb0628ce1d80b5d7), [`1d677d5`](https://github.com/mastra-ai/mastra/commit/1d677d5f99d7db403f7828585e8c25f299f72628), [`93e28ec`](https://github.com/mastra-ai/mastra/commit/93e28ecce9031c02397e0ae8406593e5c7a95883), [`729dab4`](https://github.com/mastra-ai/mastra/commit/729dab408faccfaef0cbb048e5a4338f9172847e), [`484003d`](https://github.com/mastra-ai/mastra/commit/484003d33ff59330c86b19863e4a38732d7e4155), [`933d291`](https://github.com/mastra-ai/mastra/commit/933d291146b789c19442ad206f94da3e4be90c64)]:
|
|
16
|
+
- @mastra/core@1.56.0-alpha.3
|
|
17
|
+
|
|
3
18
|
## 1.2.13-alpha.4
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.2.13-alpha.
|
|
3
|
+
"version": "1.2.13-alpha.8",
|
|
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/core": "1.56.0-alpha.
|
|
32
|
-
"@mastra/mcp": "^1.15.0"
|
|
31
|
+
"@mastra/core": "1.56.0-alpha.4",
|
|
32
|
+
"@mastra/mcp": "^1.15.1-alpha.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@hono/node-server": "^1.19.14",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
47
|
"vitest": "4.1.10",
|
|
48
48
|
"@internal/lint": "0.0.119",
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
49
|
+
"@mastra/core": "1.56.0-alpha.4",
|
|
50
|
+
"@internal/types-builder": "0.0.94"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|
|
53
53
|
"repository": {
|