@mastra/mcp-docs-server 1.1.42-alpha.2 → 1.1.42-alpha.5
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/channels.md +2 -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/observational-memory.md +19 -0
- 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/deployment/inngest.md +69 -0
- 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/agents/channels.md +1 -1
- package/.docs/reference/evals/create-scorer.md +2 -0
- package/.docs/reference/index.md +3 -0
- package/.docs/reference/memory/observational-memory.md +2 -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 +7 -5
|
@@ -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.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 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)]:
|
|
8
|
+
- @mastra/core@1.38.0-alpha.3
|
|
9
|
+
- @mastra/mcp@1.9.0-alpha.0
|
|
10
|
+
|
|
11
|
+
## 1.1.42-alpha.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`d779de3`](https://github.com/mastra-ai/mastra/commit/d779de3cd9d2e7ed8110547190e2f15e786a0e41), [`1750c97`](https://github.com/mastra-ai/mastra/commit/1750c975d6179fbf6db2813b15229d4f8f23fc55), [`0e32507`](https://github.com/mastra-ai/mastra/commit/0e32507962cdfa5569b7bda5bc6fb3dd34e40b03), [`3a081c1`](https://github.com/mastra-ai/mastra/commit/3a081c1255c5ae8c99f6dad91cc612934ef6f2bd), [`fe9eacd`](https://github.com/mastra-ai/mastra/commit/fe9eacd9545a0a9d64aad31c9fa90294a425289e), [`db79c86`](https://github.com/mastra-ai/mastra/commit/db79c86c60723d57e02f9636ca2611bd4515f194)]:
|
|
16
|
+
- @mastra/core@1.38.0-alpha.2
|
|
17
|
+
|
|
3
18
|
## 1.1.42-alpha.2
|
|
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.5",
|
|
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/
|
|
33
|
-
"@mastra/
|
|
31
|
+
"@mastra/mcp": "^1.9.0-alpha.0",
|
|
32
|
+
"@mastra/core": "1.38.0-alpha.3"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
35
|
"@hono/node-server": "^1.19.11",
|
|
@@ -48,7 +47,7 @@
|
|
|
48
47
|
"vitest": "4.1.5",
|
|
49
48
|
"@internal/lint": "0.0.99",
|
|
50
49
|
"@internal/types-builder": "0.0.74",
|
|
51
|
-
"@mastra/core": "1.
|
|
50
|
+
"@mastra/core": "1.38.0-alpha.3"
|
|
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
|
}
|