@mastra/mcp-docs-server 1.1.42-alpha.4 → 1.1.42-alpha.6
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/agent-builder/memory.md +1 -1
- package/.docs/docs/agents/adding-voice.md +31 -0
- package/.docs/docs/agents/agent-approval.md +14 -0
- package/.docs/docs/agents/code-mode.md +163 -0
- package/.docs/docs/agents/signals.md +132 -71
- package/.docs/docs/getting-started/manual-install.md +1 -1
- package/.docs/docs/memory/semantic-recall.md +1 -1
- package/.docs/docs/observability/metrics/overview.md +1 -0
- package/.docs/docs/observability/metrics/querying.md +292 -0
- package/.docs/docs/server/auth/fga.md +2 -0
- package/.docs/docs/voice/overview.md +62 -0
- package/.docs/docs/voice/speech-to-speech.md +52 -1
- package/.docs/docs/workspace/sandbox.md +4 -2
- package/.docs/guides/guide/firecrawl.md +5 -5
- package/.docs/models/embeddings.md +2 -2
- package/.docs/reference/agents/agent.md +46 -17
- package/.docs/reference/index.md +3 -0
- package/.docs/reference/observability/metrics/automatic-metrics.md +7 -1
- package/.docs/reference/processors/tool-search-processor.md +31 -0
- package/.docs/reference/server/routes.md +81 -9
- package/.docs/reference/templates/overview.md +2 -2
- package/.docs/reference/tools/mcp-client.md +51 -0
- package/.docs/reference/vectors/pg.md +2 -0
- package/.docs/reference/voice/inworld-realtime.md +353 -0
- package/.docs/reference/voice/inworld.md +2 -0
- package/.docs/reference/workspace/agentcore-runtime-sandbox.md +202 -0
- package/.docs/reference/workspace/blaxel-sandbox.md +3 -0
- package/.docs/reference/workspace/docker-sandbox.md +3 -1
- package/.docs/reference/workspace/vercel-microvm-sandbox.md +199 -0
- package/.docs/reference/workspace/vercel.md +2 -0
- package/CHANGELOG.md +15 -0
- package/package.json +8 -6
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# AgentCoreRuntimeSandbox
|
|
2
|
+
|
|
3
|
+
Executes shell commands in an [AWS Bedrock AgentCore Runtime](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-execute-command.html) session by using `InvokeAgentRuntimeCommand`.
|
|
4
|
+
|
|
5
|
+
Use `AgentCoreRuntimeSandbox` when your agent already runs in AgentCore Runtime and you want Mastra workspace command execution to use the same runtime session.
|
|
6
|
+
|
|
7
|
+
> **Info:** For interface details, see [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
8
|
+
|
|
9
|
+
> **Warning:** `AgentCoreRuntimeSandbox` only supports one-shot command execution. It does not support background process management, stdin, or filesystem mounts. AgentCore Code Interpreter is a separate AWS service and is not part of this provider.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
**npm**:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @mastra/agentcore
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**pnpm**:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm add @mastra/agentcore
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Yarn**:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
yarn add @mastra/agentcore
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Bun**:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
bun add @mastra/agentcore
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
Add an `AgentCoreRuntimeSandbox` to a workspace and assign it to an agent:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { Agent } from '@mastra/core/agent'
|
|
43
|
+
import { Workspace } from '@mastra/core/workspace'
|
|
44
|
+
import { AgentCoreRuntimeSandbox } from '@mastra/agentcore'
|
|
45
|
+
|
|
46
|
+
const workspace = new Workspace({
|
|
47
|
+
sandbox: new AgentCoreRuntimeSandbox({
|
|
48
|
+
region: 'us-west-2',
|
|
49
|
+
agentRuntimeArn: process.env.AGENTCORE_RUNTIME_ARN!,
|
|
50
|
+
runtimeSessionId: '12345678-1234-1234-1234-123456789012',
|
|
51
|
+
}),
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const agent = new Agent({
|
|
55
|
+
name: 'dev-agent',
|
|
56
|
+
model: 'anthropic/claude-sonnet-4-6',
|
|
57
|
+
instructions: 'You are a helpful development assistant.',
|
|
58
|
+
workspace,
|
|
59
|
+
})
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Run commands programmatically through the sandbox:
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
const result = await workspace.sandbox?.executeCommand?.('npm', ['test'], {
|
|
66
|
+
cwd: '/workspace',
|
|
67
|
+
env: {
|
|
68
|
+
NODE_ENV: 'test',
|
|
69
|
+
},
|
|
70
|
+
timeout: 300_000,
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
if (!result?.success) {
|
|
74
|
+
console.error(result?.stderr)
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Constructor parameters
|
|
79
|
+
|
|
80
|
+
**agentRuntimeArn** (`string`): AgentCore Runtime ARN where commands execute.
|
|
81
|
+
|
|
82
|
+
**region** (`string`): AWS region for the Bedrock AgentCore client. Falls back to the AWS SDK default region chain.
|
|
83
|
+
|
|
84
|
+
**runtimeSessionId** (`string`): AgentCore Runtime session ID. Defaults to a generated UUID, which satisfies AgentCore Runtime session ID length requirements. (Default: `Generated UUID`)
|
|
85
|
+
|
|
86
|
+
**qualifier** (`string`): Agent runtime qualifier or endpoint. (Default: `DEFAULT`)
|
|
87
|
+
|
|
88
|
+
**contentType** (`string`): MIME type sent for command requests. (Default: `application/json`)
|
|
89
|
+
|
|
90
|
+
**accept** (`string`): Accept header used for command event streams. (Default: `application/vnd.amazon.eventstream`)
|
|
91
|
+
|
|
92
|
+
**commandTimeout** (`number`): Default command timeout in milliseconds. (Default: `300000`)
|
|
93
|
+
|
|
94
|
+
**stopSessionOnLifecycle** (`boolean`): Whether \`stop()\` and \`destroy()\` should call \`StopRuntimeSession\`. Defaults to false because AgentCore Runtime sessions are often shared with agent invocations outside the sandbox instance. (Default: `false`)
|
|
95
|
+
|
|
96
|
+
**stopClientToken** (`string`): Client token used when \`StopRuntimeSession\` is called. (Default: `Generated UUID`)
|
|
97
|
+
|
|
98
|
+
**client** (`BedrockAgentCoreClient`): Preconfigured AWS SDK client. Use this for custom credentials, retry behavior, or tests.
|
|
99
|
+
|
|
100
|
+
**instructions** (`string | ((opts) => string)`): Custom instructions that override the default instructions returned by \`getInstructions()\`. Pass a string to replace the defaults, or a function to extend them.
|
|
101
|
+
|
|
102
|
+
## Properties
|
|
103
|
+
|
|
104
|
+
**id** (`string`): Runtime session ID used by this sandbox instance.
|
|
105
|
+
|
|
106
|
+
**name** (`'AgentCoreRuntimeSandbox'`): Human-readable name.
|
|
107
|
+
|
|
108
|
+
**provider** (`'agentcore'`): Provider type identifier.
|
|
109
|
+
|
|
110
|
+
**status** (`ProviderStatus`): Current lifecycle status: \`'pending'\`, \`'starting'\`, \`'running'\`, \`'stopping'\`, \`'stopped'\`, \`'destroying'\`, \`'destroyed'\`, or \`'error'\`.
|
|
111
|
+
|
|
112
|
+
**runtimeSessionId** (`string`): AgentCore Runtime session ID used for command execution.
|
|
113
|
+
|
|
114
|
+
**agentRuntimeArn** (`string`): AgentCore Runtime ARN where commands execute.
|
|
115
|
+
|
|
116
|
+
## Methods
|
|
117
|
+
|
|
118
|
+
### Command execution
|
|
119
|
+
|
|
120
|
+
#### `executeCommand(command, args?, options?)`
|
|
121
|
+
|
|
122
|
+
Runs a one-shot shell command in the AgentCore Runtime session and returns stdout, stderr, exit code, and timeout status.
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
const result = await sandbox.executeCommand('npm', ['test'], {
|
|
126
|
+
cwd: '/workspace',
|
|
127
|
+
env: {
|
|
128
|
+
NODE_ENV: 'test',
|
|
129
|
+
},
|
|
130
|
+
timeout: 300_000,
|
|
131
|
+
})
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Returns: `Promise<CommandResult>`.
|
|
135
|
+
|
|
136
|
+
`options.timeout` is specified in milliseconds. AgentCore Runtime accepts command timeouts from 1 to 3600 seconds. The provider converts milliseconds to seconds before sending the request.
|
|
137
|
+
|
|
138
|
+
### Lifecycle
|
|
139
|
+
|
|
140
|
+
#### `start()`
|
|
141
|
+
|
|
142
|
+
Runs the sandbox lifecycle start hook. This provider does not create an AgentCore Runtime session during `start()`.
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
await sandbox.start()
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
#### `stop()`
|
|
149
|
+
|
|
150
|
+
Stops the AgentCore Runtime session only when `stopSessionOnLifecycle` is `true`.
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
await sandbox.stop()
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
#### `stopRuntimeSession()`
|
|
157
|
+
|
|
158
|
+
Explicitly stops the AgentCore Runtime session used by this sandbox.
|
|
159
|
+
|
|
160
|
+
Use this when the sandbox owns the runtime session and you want to clean it up directly. `destroy()` does not call this method unless `stopSessionOnLifecycle` is `true`, because AgentCore Runtime sessions can be shared with agent invocations outside the Workspace sandbox lifecycle.
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
await sandbox.stopRuntimeSession()
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### `destroy()`
|
|
167
|
+
|
|
168
|
+
Destroys the sandbox instance. If this instance owns its AWS SDK client, `destroy()` also destroys the client. If `stopSessionOnLifecycle` is `true`, it calls `StopRuntimeSession`.
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
await sandbox.destroy()
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Metadata
|
|
175
|
+
|
|
176
|
+
#### `getInfo()`
|
|
177
|
+
|
|
178
|
+
Returns sandbox status and AgentCore Runtime metadata.
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
const info = await sandbox.getInfo()
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Returns: `Promise<SandboxInfo>`.
|
|
185
|
+
|
|
186
|
+
## Limitations
|
|
187
|
+
|
|
188
|
+
`AgentCoreRuntimeSandbox` follows AgentCore Runtime command execution semantics:
|
|
189
|
+
|
|
190
|
+
- **One-shot commands**: Each command runs to completion or timeout.
|
|
191
|
+
- **No persistent shell**: Shell state does not carry over between commands. Encode state in each command, for example `cd /workspace && npm test`.
|
|
192
|
+
- **Background processes are not supported**: The provider does not expose a `processes` manager.
|
|
193
|
+
- **Interactive stdin is unavailable**: Runtime command execution does not provide an interactive stdin stream through this provider.
|
|
194
|
+
- **Workspace filesystem mounts are unsupported**: Workspace filesystem mounting is not supported by this provider.
|
|
195
|
+
- **Container-dependent tools**: Commands can only use tools installed in the AgentCore Runtime container image.
|
|
196
|
+
|
|
197
|
+
## Related
|
|
198
|
+
|
|
199
|
+
- [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox)
|
|
200
|
+
- [Workspace class](https://mastra.ai/reference/workspace/workspace-class)
|
|
201
|
+
- [Sandbox overview](https://mastra.ai/docs/workspace/sandbox)
|
|
202
|
+
- [AWS Bedrock AgentCore Runtime command execution](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-execute-command.html)
|
|
@@ -61,6 +61,7 @@ const workspace = new Workspace({
|
|
|
61
61
|
sandbox: new BlaxelSandbox({
|
|
62
62
|
image: 'node:20-slim',
|
|
63
63
|
memory: 8192,
|
|
64
|
+
region: 'auto',
|
|
64
65
|
timeout: '10m',
|
|
65
66
|
}),
|
|
66
67
|
})
|
|
@@ -76,6 +77,8 @@ const workspace = new Workspace({
|
|
|
76
77
|
|
|
77
78
|
**timeout** (`string`): Execution timeout as a duration string (e.g. '5m', '1h'). Maps to the Blaxel sandbox TTL.
|
|
78
79
|
|
|
80
|
+
**region** (`string`): Blaxel region where the sandbox should be created. Use 'auto' to choose a region automatically, or set a concrete region like 'us-pdx-1'. (Default: `process.env.BL_REGION || 'auto'`)
|
|
81
|
+
|
|
79
82
|
**env** (`Record<string, string>`): Environment variables to set in the sandbox.
|
|
80
83
|
|
|
81
84
|
**labels** (`Record<string, string>`): Custom labels for the sandbox.
|
|
@@ -56,7 +56,9 @@ const agent = new Agent({
|
|
|
56
56
|
|
|
57
57
|
## Constructor parameters
|
|
58
58
|
|
|
59
|
-
**id** (`string`): Unique identifier for this sandbox instance. Used for
|
|
59
|
+
**id** (`string`): Unique identifier for this sandbox instance. Used for label-based reconnection. (Default: `Auto-generated`)
|
|
60
|
+
|
|
61
|
+
**name** (`string`): Container display name passed to Docker as \`--name\`. Characters outside \`\[a-zA-Z0-9\_.-]\` are replaced with \`-\` and the result is prefixed if it would not start with an alphanumeric character. (Default: `` The sandbox `id` ``)
|
|
60
62
|
|
|
61
63
|
**image** (`string`): Docker image to use for the container. (Default: `'node:22-slim'`)
|
|
62
64
|
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# VercelMicroVMSandbox
|
|
2
|
+
|
|
3
|
+
Executes commands inside [Vercel Sandbox](https://vercel.com/docs/vercel-sandbox) — an ephemeral [Firecracker](https://firecracker-microvm.github.io/) MicroVM running Amazon Linux 2023. Provides a persistent in-session filesystem, `sudo` access, exposed ports, and background processes.
|
|
4
|
+
|
|
5
|
+
> **Info:** For interface details, see the [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
|
|
6
|
+
|
|
7
|
+
> **Note:** This is distinct from [`VercelSandbox`](https://mastra.ai/reference/workspace/vercel), which runs commands as stateless Vercel serverless **Functions**. `VercelMicroVMSandbox` runs a full Linux MicroVM with a persistent filesystem and long-running processes.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
**npm**:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @mastra/vercel
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**pnpm**:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm add @mastra/vercel
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Yarn**:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
yarn add @mastra/vercel
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Bun**:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
bun add @mastra/vercel
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Authentication
|
|
36
|
+
|
|
37
|
+
The `@vercel/sandbox` SDK uses a Vercel OIDC token automatically when available.
|
|
38
|
+
|
|
39
|
+
**OIDC (recommended)**:
|
|
40
|
+
|
|
41
|
+
For local development, link the project and pull a development token:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
vercel link
|
|
45
|
+
vercel env pull
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
On Vercel, authentication is handled automatically — no configuration needed.
|
|
49
|
+
|
|
50
|
+
**Access token (.env)**:
|
|
51
|
+
|
|
52
|
+
For environments without OIDC, provide all three values together:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
VERCEL_TOKEN=your-token
|
|
56
|
+
VERCEL_TEAM_ID=your-team-id
|
|
57
|
+
VERCEL_PROJECT_ID=your-project-id
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Constructor**:
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
new VercelMicroVMSandbox({
|
|
64
|
+
token: 'your-token',
|
|
65
|
+
teamId: 'your-team-id',
|
|
66
|
+
projectId: 'your-project-id',
|
|
67
|
+
})
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Usage
|
|
71
|
+
|
|
72
|
+
Add a `VercelMicroVMSandbox` to a workspace and assign it to an agent:
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { Agent } from '@mastra/core/agent'
|
|
76
|
+
import { Workspace } from '@mastra/core/workspace'
|
|
77
|
+
import { VercelMicroVMSandbox } from '@mastra/vercel'
|
|
78
|
+
|
|
79
|
+
const workspace = new Workspace({
|
|
80
|
+
sandbox: new VercelMicroVMSandbox({
|
|
81
|
+
runtime: 'node24',
|
|
82
|
+
timeout: 600_000,
|
|
83
|
+
}),
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
const agent = new Agent({
|
|
87
|
+
id: 'code-agent',
|
|
88
|
+
name: 'Code Agent',
|
|
89
|
+
instructions: 'You are a coding assistant working in this workspace.',
|
|
90
|
+
model: 'anthropic/claude-sonnet-4-6',
|
|
91
|
+
workspace,
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
const response = await agent.generate('Print "Hello, world!" and show the Node.js version.')
|
|
95
|
+
|
|
96
|
+
console.log(response.text)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Resources and exposed ports
|
|
100
|
+
|
|
101
|
+
Allocate vCPUs (2048 MB of memory per vCPU) and expose ports to reach network services running inside the sandbox:
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
const sandbox = new VercelMicroVMSandbox({
|
|
105
|
+
runtime: 'node24',
|
|
106
|
+
resources: { vcpus: 4 },
|
|
107
|
+
ports: [3000],
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
const workspace = new Workspace({ sandbox })
|
|
111
|
+
await sandbox._start()
|
|
112
|
+
|
|
113
|
+
// The public HTTPS domain for an exposed port is available via getInfo()
|
|
114
|
+
const { metadata } = sandbox.getInfo()
|
|
115
|
+
console.log(metadata?.domains) // { 3000: 'https://....vercel.run' }
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Streaming output
|
|
119
|
+
|
|
120
|
+
Stream command output in real time via `onStdout` and `onStderr` callbacks:
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
await sandbox.executeCommand('sh', ['-c', 'for i in 1 2 3; do echo "line $i"; sleep 1; done'], {
|
|
124
|
+
onStdout: chunk => process.stdout.write(chunk),
|
|
125
|
+
onStderr: chunk => process.stderr.write(chunk),
|
|
126
|
+
})
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Both callbacks are optional and can be used independently.
|
|
130
|
+
|
|
131
|
+
## Constructor parameters
|
|
132
|
+
|
|
133
|
+
**id** (`string`): Unique identifier for this sandbox instance. (Default: `Auto-generated`)
|
|
134
|
+
|
|
135
|
+
**sandboxName** (`string`): Optional name passed to the Vercel API. Auto-generated if omitted.
|
|
136
|
+
|
|
137
|
+
**token** (`string`): Vercel API token. Falls back to the VERCEL\_TOKEN environment variable. Omit to use the OIDC token.
|
|
138
|
+
|
|
139
|
+
**teamId** (`string`): Vercel team ID. Falls back to the VERCEL\_TEAM\_ID environment variable.
|
|
140
|
+
|
|
141
|
+
**projectId** (`string`): Vercel project ID. Falls back to the VERCEL\_PROJECT\_ID environment variable.
|
|
142
|
+
|
|
143
|
+
**runtime** (`'node24' | 'node22' | 'node26' | 'python3.13'`): Sandbox runtime. (Default: `'node24'`)
|
|
144
|
+
|
|
145
|
+
**timeout** (`number`): Timeout in milliseconds before the sandbox auto-terminates. (Default: `300000 (5 minutes)`)
|
|
146
|
+
|
|
147
|
+
**resources** (`{ vcpus?: number }`): Resource allocation. Each vCPU comes with 2048 MB of memory.
|
|
148
|
+
|
|
149
|
+
**ports** (`number[]`): Ports to expose from the sandbox (up to 4). Public HTTPS domains are available via getInfo().metadata.domains.
|
|
150
|
+
|
|
151
|
+
**env** (`Record<string, string>`): Default environment variables inherited by all commands. (Default: `{}`)
|
|
152
|
+
|
|
153
|
+
**metadata** (`Record<string, unknown>`): Custom metadata surfaced via getInfo(). (Default: `{}`)
|
|
154
|
+
|
|
155
|
+
**instructions** (`string | ((opts) => string)`): Override the default instructions returned by getInstructions(). Pass a string to replace them, or a function to extend the defaults.
|
|
156
|
+
|
|
157
|
+
## Properties
|
|
158
|
+
|
|
159
|
+
**id** (`string`): Sandbox instance identifier.
|
|
160
|
+
|
|
161
|
+
**name** (`string`): Provider name ('VercelMicroVMSandbox').
|
|
162
|
+
|
|
163
|
+
**provider** (`string`): Provider identifier ('vercel-microvm').
|
|
164
|
+
|
|
165
|
+
**status** (`ProviderStatus`): 'pending' | 'starting' | 'running' | 'stopping' | 'stopped' | 'destroying' | 'destroyed' | 'error'
|
|
166
|
+
|
|
167
|
+
**sandbox** (`Sandbox`): The underlying @vercel/sandbox Sandbox instance. Throws SandboxNotReadyError if the sandbox has not been started.
|
|
168
|
+
|
|
169
|
+
**processes** (`VercelMicroVMProcessManager`): Background process manager. See \[SandboxProcessManager reference]\(/reference/workspace/process-manager).
|
|
170
|
+
|
|
171
|
+
## Background processes
|
|
172
|
+
|
|
173
|
+
`VercelMicroVMSandbox` includes a process manager for spawning and managing background processes. Each spawned process runs as a detached command inside the MicroVM, with output streamed through the command logs.
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
const sandbox = new VercelMicroVMSandbox({ runtime: 'node24', ports: [3000] })
|
|
177
|
+
await sandbox.start()
|
|
178
|
+
|
|
179
|
+
const handle = await sandbox.processes.spawn('node server.js', {
|
|
180
|
+
env: { PORT: '3000' },
|
|
181
|
+
onStdout: data => console.log(data),
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
console.log(handle.stdout)
|
|
185
|
+
await handle.kill()
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
See the [`SandboxProcessManager` reference](https://mastra.ai/reference/workspace/process-manager) for the full API.
|
|
189
|
+
|
|
190
|
+
> **Note:** The Vercel Sandbox SDK does not expose a stdin channel for running commands, so `handle.sendStdin()` throws. Filesystem mounting (FUSE) is also not supported by this provider.
|
|
191
|
+
|
|
192
|
+
## Limits
|
|
193
|
+
|
|
194
|
+
- Up to 8 vCPUs, with 2048 MB of memory per vCPU.
|
|
195
|
+
- Up to 4 exposed ports.
|
|
196
|
+
- The filesystem is ephemeral — persisted only within the session and lost when the sandbox stops.
|
|
197
|
+
- Maximum runtime is plan-dependent (45 minutes on Hobby, up to 5 hours on Pro/Enterprise), with a default of 5 minutes.
|
|
198
|
+
|
|
199
|
+
See the [Vercel Sandbox documentation](https://vercel.com/docs/vercel-sandbox) for current limits and pricing.
|
|
@@ -6,6 +6,8 @@ Executes commands as [Vercel](https://vercel.com) serverless functions. Provides
|
|
|
6
6
|
|
|
7
7
|
> **Warning:** VercelSandbox is stateless. There is no persistent filesystem, no interactive shell, and no support for long-running or background processes. Only `/tmp` is writable and is ephemeral between invocations.
|
|
8
8
|
|
|
9
|
+
> **Note:** For a full Linux MicroVM with a persistent filesystem, `sudo` access, exposed ports, and background processes, use [`VercelMicroVMSandbox`](https://mastra.ai/reference/workspace/vercel-microvm-sandbox), which is backed by the [Vercel Sandbox](https://vercel.com/docs/vercel-sandbox) product.
|
|
10
|
+
|
|
9
11
|
## Installation
|
|
10
12
|
|
|
11
13
|
**npm**:
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.1.42-alpha.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`50ed00c`](https://github.com/mastra-ai/mastra/commit/50ed00caa914a85969b33de83f26b48e328ef641), [`9283971`](https://github.com/mastra-ai/mastra/commit/928397157009b4aef4d5fdf3a0a273cb371beb55), [`0bf2d93`](https://github.com/mastra-ai/mastra/commit/0bf2d932d20e2936f2d9abb8c0a86e24fbc97ec6), [`94dfef6`](https://github.com/mastra-ai/mastra/commit/94dfef6e2bf19a88467ea3940afcbce88a433f0f), [`a122f79`](https://github.com/mastra-ai/mastra/commit/a122f79427ae225ec79c7b2ed46278da48d04b17), [`4c02027`](https://github.com/mastra-ai/mastra/commit/4c020277235eaa6b1dc957c90ad0639eef213992), [`6855012`](https://github.com/mastra-ai/mastra/commit/685501247cc4717506f3e89beed03509d63a5370), [`7fef31c`](https://github.com/mastra-ai/mastra/commit/7fef31c0d2a6d362a43a647a8a4f6ab893758a23), [`7fef31c`](https://github.com/mastra-ai/mastra/commit/7fef31c0d2a6d362a43a647a8a4f6ab893758a23)]:
|
|
8
|
+
- @mastra/core@1.38.0-alpha.4
|
|
9
|
+
|
|
10
|
+
## 1.1.42-alpha.5
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`8ace89d`](https://github.com/mastra-ai/mastra/commit/8ace89df77f762e622d3b9f7f65ad7524350d050), [`fa63872`](https://github.com/mastra-ai/mastra/commit/fa6387280954e6b667bec5714b55ba082bc627ff), [`f07b646`](https://github.com/mastra-ai/mastra/commit/f07b64604ab7d25391179790b7fd4823df9e2dff), [`d8838ae`](https://github.com/mastra-ai/mastra/commit/d8838ae80b69780361693d27098f7f6684af12fe), [`40f9297`](https://github.com/mastra-ai/mastra/commit/40f9297003b921c62373d3e8d3a4bda76c9f6de3), [`0f0d1ba`](https://github.com/mastra-ai/mastra/commit/0f0d1ba67bfcb2204e571401662f1eceefc03357), [`8c31bcd`](https://github.com/mastra-ai/mastra/commit/8c31bcdb00e597880d5939b1b7d7566fbe5dacae), [`95b14cd`](https://github.com/mastra-ai/mastra/commit/95b14cdd820e86d97ac05fe568424c513a252e31), [`0e51c36`](https://github.com/mastra-ai/mastra/commit/0e51c362be673502ac79626a75d1416479b0b76e), [`aa36be2`](https://github.com/mastra-ai/mastra/commit/aa36be23aa513b7dc53cb8ca16b7fab8f20e43ad), [`212c635`](https://github.com/mastra-ai/mastra/commit/212c635203e61d036ab41db8ff86c3893dc795b3), [`d8838ae`](https://github.com/mastra-ai/mastra/commit/d8838ae80b69780361693d27098f7f6684af12fe), [`9aa5a73`](https://github.com/mastra-ai/mastra/commit/9aa5a73e7e110f6e9365eec69364a33d5f03bb56), [`f73c789`](https://github.com/mastra-ai/mastra/commit/f73c789e8ef21561580395d2c410119cab5848c8), [`8bd16da`](https://github.com/mastra-ai/mastra/commit/8bd16da73a4cb874d739373643dbd6a6e7f88684), [`c8630f8`](https://github.com/mastra-ai/mastra/commit/c8630f80d4f40cb5d22e60ab162b618b1907167a), [`47f71dc`](https://github.com/mastra-ai/mastra/commit/47f71dc6fbcbd12d71e21a979e676e20a02bd77d), [`50ceae2`](https://github.com/mastra-ai/mastra/commit/50ceae270878e2f8fb2b2c6c2faab09df0007c8a), [`8cdde58`](https://github.com/mastra-ai/mastra/commit/8cdde5875bbba6702d9df226f2b20232b8d75d6c), [`847ff1e`](https://github.com/mastra-ai/mastra/commit/847ff1e0d94368d94b2e173e4e0908e115568ef3), [`259d409`](https://github.com/mastra-ai/mastra/commit/259d409a514174299dbde1ff5e1121209b3ba850), [`9e16c68`](https://github.com/mastra-ai/mastra/commit/9e16c6818b6485ccb43df28aba6f3a2219d28662), [`cefca33`](https://github.com/mastra-ai/mastra/commit/cefca33ae666e69810c935fedf95a929c173d1d7), [`d00e8c5`](https://github.com/mastra-ai/mastra/commit/d00e8c50daebe5bce5bf2f48bde39c86fc3d2fe4), [`36fa7e2`](https://github.com/mastra-ai/mastra/commit/36fa7e24d14e58a1eb46147097b32f583e5b8775), [`87e9774`](https://github.com/mastra-ai/mastra/commit/87e97741c1e493cd6d62f478eb810b49bda4d57c), [`65a72e7`](https://github.com/mastra-ai/mastra/commit/65a72e70c25eedea8ff985a6624b96be2850236b), [`0f77241`](https://github.com/mastra-ai/mastra/commit/0f7724108806703799a8ba80ad0f09414afd5066), [`92ff509`](https://github.com/mastra-ai/mastra/commit/92ff5098ef8a990438ca038077021a5f7541ec1d), [`3fce5e7`](https://github.com/mastra-ai/mastra/commit/3fce5e70d011d289043e75003ef3336ed4aa43c3), [`a763592`](https://github.com/mastra-ai/mastra/commit/a763592c3db46963ef1011cfe16fe372816e775e), [`80c7737`](https://github.com/mastra-ai/mastra/commit/80c7737e32d7917b5f356957d67c169d01744fd3), [`3f1cf47`](https://github.com/mastra-ai/mastra/commit/3f1cf476f74c1e4cc2df908837e05853a5347e31)]:
|
|
15
|
+
- @mastra/core@1.38.0-alpha.3
|
|
16
|
+
- @mastra/mcp@1.9.0-alpha.0
|
|
17
|
+
|
|
3
18
|
## 1.1.42-alpha.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.1.42-alpha.
|
|
3
|
+
"version": "1.1.42-alpha.6",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
-
"bin": "dist/stdio.js",
|
|
9
8
|
"files": [
|
|
10
9
|
"dist",
|
|
11
10
|
".docs",
|
|
@@ -29,8 +28,8 @@
|
|
|
29
28
|
"jsdom": "^26.1.0",
|
|
30
29
|
"local-pkg": "^1.1.2",
|
|
31
30
|
"zod": "^4.4.3",
|
|
32
|
-
"@mastra/core": "1.38.0-alpha.
|
|
33
|
-
"@mastra/mcp": "^1.
|
|
31
|
+
"@mastra/core": "1.38.0-alpha.4",
|
|
32
|
+
"@mastra/mcp": "^1.9.0-alpha.0"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
35
|
"@hono/node-server": "^1.19.11",
|
|
@@ -46,9 +45,9 @@
|
|
|
46
45
|
"tsx": "^4.21.0",
|
|
47
46
|
"typescript": "^6.0.3",
|
|
48
47
|
"vitest": "4.1.5",
|
|
49
|
-
"@internal/types-builder": "0.0.74",
|
|
50
48
|
"@internal/lint": "0.0.99",
|
|
51
|
-
"@
|
|
49
|
+
"@internal/types-builder": "0.0.74",
|
|
50
|
+
"@mastra/core": "1.38.0-alpha.4"
|
|
52
51
|
},
|
|
53
52
|
"homepage": "https://mastra.ai",
|
|
54
53
|
"repository": {
|
|
@@ -68,5 +67,8 @@
|
|
|
68
67
|
"pretest": "pnpm turbo build --filter @mastra/mcp-docs-server",
|
|
69
68
|
"test": "vitest run",
|
|
70
69
|
"lint": "eslint ."
|
|
70
|
+
},
|
|
71
|
+
"bin": {
|
|
72
|
+
"mcp-docs-server": "dist/stdio.js"
|
|
71
73
|
}
|
|
72
74
|
}
|