@mastra/mcp-docs-server 1.2.13-alpha.1 → 1.2.13-alpha.11
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/agents/overview.md +1 -1
- package/.docs/docs/agents/supervisor-agents.md +2 -2
- package/.docs/docs/agents/using-tools.md +29 -0
- package/.docs/docs/{evals/datasets → datasets}/overview.md +3 -3
- package/.docs/docs/{evals/datasets → datasets}/running-experiments.md +27 -3
- package/.docs/docs/deployment/workers.md +14 -14
- package/.docs/docs/editor/overview.md +201 -206
- package/.docs/docs/evals/evals-with-memory.md +1 -1
- package/.docs/docs/getting-started/develop.md +196 -0
- package/.docs/docs/index.md +78 -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/workspaces.md +152 -0
- package/.docs/docs/memory/observational-memory.md +53 -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/studio/observability.md +4 -0
- package/.docs/docs/studio/overview.md +2 -2
- package/.docs/docs/workflows/overview.md +1 -1
- package/.docs/docs/workflows/scheduled-workflows.md +1 -0
- package/.docs/docs/workspace/search.md +1 -1
- 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/guides/getting-started/quickstart.md +3 -3
- package/.docs/{docs → guides}/rag/chunking-and-embedding.md +1 -1
- package/.docs/{docs → guides}/rag/graph-rag.md +1 -1
- package/.docs/{docs → guides}/rag/overview.md +2 -2
- package/.docs/{docs → guides}/rag/retrieval.md +1 -1
- package/.docs/{docs → guides}/voice/overview.md +4 -4
- package/.docs/{docs → guides}/voice/realtime-voice.md +2 -2
- package/.docs/{docs → guides}/voice/speech-to-speech.md +1 -1
- package/.docs/{docs → guides}/voice/speech-to-text.md +1 -1
- package/.docs/{docs → guides}/voice/text-to-speech.md +2 -2
- package/.docs/models/embeddings.md +63 -65
- package/.docs/models/environment-variables.md +1 -1
- package/.docs/models/gateways/openrouter.md +3 -6
- package/.docs/models/gateways/vercel.md +4 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/crof.md +2 -1
- package/.docs/models/providers/crossmodel.md +4 -3
- package/.docs/models/providers/empiriolabs.md +2 -1
- package/.docs/models/providers/huggingface.md +3 -1
- package/.docs/models/providers/hyper.md +10 -7
- package/.docs/models/providers/llmgateway.md +5 -4
- package/.docs/models/providers/minimax.md +1 -1
- package/.docs/models/providers/neuralwatt.md +3 -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/models/providers/scaleway.md +1 -3
- package/.docs/models/providers/the-grid-ai.md +3 -3
- package/.docs/models/providers/zai-coding-plan.md +11 -13
- package/.docs/models/providers/zhipuai-coding-plan.md +12 -12
- package/.docs/reference/agents/agent.md +1 -1
- package/.docs/reference/agents/durable-agent.md +12 -1
- package/.docs/reference/agents/generate.md +1 -1
- package/.docs/reference/agents/getVoice.md +1 -1
- package/.docs/{docs/getting-started → reference}/build-with-ai.md +5 -110
- package/.docs/reference/cli/create-mastra.md +2 -0
- package/.docs/reference/cli/mastra.md +36 -16
- package/.docs/reference/client-js/agents.md +1 -1
- package/.docs/reference/configuration.md +2 -2
- package/.docs/reference/core/getEditor.md +1 -1
- package/.docs/reference/core/getVector.md +2 -2
- package/.docs/reference/core/listVectors.md +2 -2
- package/.docs/reference/core/mastra-class.md +2 -2
- package/.docs/reference/datasets/startExperiment.md +6 -0
- package/.docs/reference/datasets/startExperimentAsync.md +4 -0
- package/.docs/reference/editor/browser-provider.md +2 -2
- package/.docs/reference/editor/filesystem-provider.md +1 -1
- package/.docs/reference/editor/mastra-editor.md +31 -18
- package/.docs/reference/editor/prompt-blocks.md +137 -0
- package/.docs/reference/editor/sandbox-provider.md +1 -1
- package/.docs/reference/editor/storage-browser-ref.md +3 -3
- package/.docs/reference/editor/storage-workspace-ref.md +3 -3
- package/.docs/reference/editor/tool-provider.md +44 -10
- package/.docs/reference/editor/tools.md +100 -0
- package/.docs/reference/editor/versioning.md +130 -0
- package/.docs/reference/evals/mastra-scorer.md +68 -8
- package/.docs/reference/evals/summarization.md +203 -0
- package/.docs/reference/file-based-agents/config.md +39 -1
- package/.docs/reference/index.md +4 -4
- package/.docs/reference/memory/observational-memory.md +76 -24
- package/.docs/reference/memory/serialized-memory-config.md +3 -3
- package/.docs/reference/observability/tracing/interfaces.md +6 -1
- package/.docs/reference/processors/processor-interface.md +14 -2
- package/.docs/reference/processors/regex-filter-processor.md +1 -1
- package/.docs/reference/processors/token-limiter-processor.md +15 -1
- package/.docs/reference/project-structure.md +1 -1
- package/.docs/reference/rag/database-config.md +1 -1
- package/.docs/reference/storage/composite.md +2 -0
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/tools/isolated-vm-transport.md +1 -1
- package/.docs/reference/vectors/mongodb.md +13 -13
- package/.docs/reference/voice/livekit.md +3 -3
- package/.docs/reference/workers/overview.md +10 -8
- package/.docs/reference/workspace/platform-filesystem.md +8 -5
- package/.docs/reference/workspace/platform-sandbox.md +83 -7
- package/CHANGELOG.md +44 -0
- package/README.md +1 -1
- package/package.json +5 -5
- package/.docs/docs/agent-builder/access-control.md +0 -99
- package/.docs/docs/agent-builder/browser.md +0 -63
- package/.docs/docs/agent-builder/channels.md +0 -78
- package/.docs/docs/agent-builder/configuration.md +0 -132
- package/.docs/docs/agent-builder/deploying.md +0 -124
- package/.docs/docs/agent-builder/integrations.md +0 -115
- package/.docs/docs/agent-builder/memory.md +0 -69
- package/.docs/docs/agent-builder/model-policy.md +0 -50
- package/.docs/docs/agent-builder/overview.md +0 -114
- package/.docs/docs/agent-builder/skill-registries.md +0 -31
- package/.docs/docs/agent-builder/workspace.md +0 -62
- package/.docs/docs/editor/prompts.md +0 -140
- package/.docs/docs/editor/tools.md +0 -148
- package/.docs/docs/getting-started/file-based-agents.md +0 -121
- package/.docs/docs/mastra-platform/workspace.md +0 -111
- package/.docs/docs/what-is-mastra.md +0 -161
- package/.docs/reference/client-js/agent-builder.md +0 -163
- package/.docs/reference/editor/agent-builder/agent-builder-options.md +0 -76
- package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +0 -79
- package/.docs/reference/editor/agent-builder/builder-models.md +0 -66
- /package/.docs/{docs → guides}/getting-started/manual-install.md +0 -0
- /package/.docs/{docs → guides}/rag/vector-databases.md +0 -0
|
@@ -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
|
|
|
@@ -39,7 +39,7 @@ Configure the platform credentials. The access token, project ID, and bucket nam
|
|
|
39
39
|
**.env file**:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
|
|
42
|
+
MASTRA_PLATFORM_ACCESS_TOKEN=your-platform-access-token
|
|
43
43
|
MASTRA_PROJECT_ID=your-project-id
|
|
44
44
|
MASTRA_PLATFORM_BUCKET_NAME=your-bucket-name
|
|
45
45
|
```
|
|
@@ -54,7 +54,7 @@ new PlatformFilesystem({
|
|
|
54
54
|
})
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
On a Mastra Platform deployment
|
|
57
|
+
On a Mastra Platform deployment, `MASTRA_PLATFORM_ACCESS_TOKEN`, `MASTRA_PROJECT_ID`, and `MASTRA_PLATFORM_BUCKET_NAME` are injected automatically, so the constructor can be called with no options. For local development, `MASTRA_PLATFORM_ACCESS_TOKEN` can contain an `sk_` API token from your organization's settings page under **API Tokens**.
|
|
58
58
|
|
|
59
59
|
## Usage
|
|
60
60
|
|
|
@@ -116,7 +116,7 @@ await fs.writeFile('/analyses/repo.md', 'x') // throws WorkspaceReadOnlyError
|
|
|
116
116
|
|
|
117
117
|
## Constructor parameters
|
|
118
118
|
|
|
119
|
-
**accessToken** (`string`): Platform
|
|
119
|
+
**accessToken** (`string`): Platform access token. Falls back to the MASTRA\_PLATFORM\_ACCESS\_TOKEN environment variable.
|
|
120
120
|
|
|
121
121
|
**projectId** (`string`): Platform project ID. Falls back to the MASTRA\_PROJECT\_ID environment variable.
|
|
122
122
|
|
|
@@ -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
|
|
|
@@ -39,7 +41,7 @@ Configure the platform credentials. The access token, project ID, and environmen
|
|
|
39
41
|
**.env file**:
|
|
40
42
|
|
|
41
43
|
```bash
|
|
42
|
-
|
|
44
|
+
MASTRA_PLATFORM_ACCESS_TOKEN=your-platform-access-token
|
|
43
45
|
MASTRA_PROJECT_ID=your-project-id
|
|
44
46
|
MASTRA_ENVIRONMENT_ID=your-environment-id
|
|
45
47
|
```
|
|
@@ -54,7 +56,7 @@ new PlatformSandbox({
|
|
|
54
56
|
})
|
|
55
57
|
```
|
|
56
58
|
|
|
57
|
-
On a Mastra Platform deployment
|
|
59
|
+
On a Mastra Platform deployment, `MASTRA_PLATFORM_ACCESS_TOKEN`, `MASTRA_PROJECT_ID`, and `MASTRA_ENVIRONMENT_ID` are injected automatically, so the constructor can be called with no options. For local development, `MASTRA_PLATFORM_ACCESS_TOKEN` can contain an `sk_` API token from your organization's settings page under **API Tokens**.
|
|
58
60
|
|
|
59
61
|
## Usage
|
|
60
62
|
|
|
@@ -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 starts 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:
|
|
@@ -135,7 +173,7 @@ console.log(result.exitCode)
|
|
|
135
173
|
|
|
136
174
|
## Constructor parameters
|
|
137
175
|
|
|
138
|
-
**accessToken** (`string`): Platform
|
|
176
|
+
**accessToken** (`string`): Platform access token. Falls back to the MASTRA\_PLATFORM\_ACCESS\_TOKEN environment variable.
|
|
139
177
|
|
|
140
178
|
**projectId** (`string`): Platform project ID. Falls back to the MASTRA\_PROJECT\_ID environment variable.
|
|
141
179
|
|
|
@@ -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,49 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.13-alpha.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`a19e5b7`](https://github.com/mastra-ai/mastra/commit/a19e5b79b76fffa92f9cf17e0e89c3fa714534e8), [`82201f7`](https://github.com/mastra-ai/mastra/commit/82201f75fae8e050a8de2df08b74875ee74c6b83), [`fb18da5`](https://github.com/mastra-ai/mastra/commit/fb18da56fc35689ae370621a8f10b5b0d8606e20), [`fb18da5`](https://github.com/mastra-ai/mastra/commit/fb18da56fc35689ae370621a8f10b5b0d8606e20), [`0a6598b`](https://github.com/mastra-ai/mastra/commit/0a6598bde80bde008986ad6616bed9632b9294cb), [`9e1dad8`](https://github.com/mastra-ai/mastra/commit/9e1dad8f7b1cab2bb7ade90e5b7561f24577b88a), [`2f43145`](https://github.com/mastra-ai/mastra/commit/2f4314504c03cbba280414ac81ba3197448ee6b0), [`34d34d8`](https://github.com/mastra-ai/mastra/commit/34d34d8c811df512fef4dd5459f79b7821be1866)]:
|
|
8
|
+
- @mastra/mcp@1.15.1-alpha.1
|
|
9
|
+
- @mastra/core@1.56.0-alpha.6
|
|
10
|
+
|
|
11
|
+
## 1.2.13-alpha.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`db4e6ff`](https://github.com/mastra-ai/mastra/commit/db4e6ff744503112eb64deeaf6c2b54bf26a54c7), [`6d19a65`](https://github.com/mastra-ai/mastra/commit/6d19a6517f5da3911023d446b7e2d5dad8adb1cb)]:
|
|
16
|
+
- @mastra/core@1.56.0-alpha.5
|
|
17
|
+
|
|
18
|
+
## 1.2.13-alpha.7
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 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)]:
|
|
23
|
+
- @mastra/core@1.56.0-alpha.4
|
|
24
|
+
- @mastra/mcp@1.15.1-alpha.0
|
|
25
|
+
|
|
26
|
+
## 1.2.13-alpha.5
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- 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)]:
|
|
31
|
+
- @mastra/core@1.56.0-alpha.3
|
|
32
|
+
|
|
33
|
+
## 1.2.13-alpha.4
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- Updated dependencies [[`322daa6`](https://github.com/mastra-ai/mastra/commit/322daa6d90552909204044790d850958f6745fed), [`cadaa13`](https://github.com/mastra-ai/mastra/commit/cadaa1372e1077c8e85eb64c5499ba8803caa323), [`06000d7`](https://github.com/mastra-ai/mastra/commit/06000d73712911572e913b8a83339270296d0a22), [`3de0188`](https://github.com/mastra-ai/mastra/commit/3de0188bfaf9a9c09c95fe322b53838cf52c70b6)]:
|
|
38
|
+
- @mastra/core@1.56.0-alpha.2
|
|
39
|
+
|
|
40
|
+
## 1.2.13-alpha.2
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [[`c5e56ff`](https://github.com/mastra-ai/mastra/commit/c5e56ff3bcabdf062708f2d48744fec304df6792), [`4e35a56`](https://github.com/mastra-ai/mastra/commit/4e35a56cdf8d74a5ff6d5eda01f2c1deaf6cc7be)]:
|
|
45
|
+
- @mastra/core@1.56.0-alpha.1
|
|
46
|
+
|
|
3
47
|
## 1.2.13-alpha.1
|
|
4
48
|
|
|
5
49
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Access Mastra's documentation via [Model Context Protocol (MCP)](https://modelco
|
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
|
-
Follow the [official installation](https://mastra.ai/
|
|
7
|
+
Follow the [official installation](https://mastra.ai/reference/build-with-ai#mcp-docs-server) instructions.
|
|
8
8
|
|
|
9
9
|
## Tools
|
|
10
10
|
|
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.11",
|
|
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.
|
|
31
|
+
"@mastra/core": "1.56.0-alpha.6",
|
|
32
|
+
"@mastra/mcp": "^1.15.1-alpha.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@hono/node-server": "^1.19.14",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"tsx": "^4.23.1",
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
47
|
"vitest": "4.1.10",
|
|
48
|
+
"@mastra/core": "1.56.0-alpha.6",
|
|
48
49
|
"@internal/lint": "0.0.119",
|
|
49
|
-
"@internal/types-builder": "0.0.94"
|
|
50
|
-
"@mastra/core": "1.56.0-alpha.0"
|
|
50
|
+
"@internal/types-builder": "0.0.94"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|
|
53
53
|
"repository": {
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Access control
|
|
4
|
-
|
|
5
|
-
> **Note:** The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. [Contact sales](https://mastra.ai/contact) for more information.
|
|
6
|
-
|
|
7
|
-
The Agent Builder includes with two supported roles: `admin` and `member`. Wire them through `Mastra.server.rbac`. Without an RBAC provider, every authenticated user has full Builder access; without authentication, the Builder is open to anyone who can reach the server.
|
|
8
|
-
|
|
9
|
-
## Roles
|
|
10
|
-
|
|
11
|
-
| Role | Permissions | What they can do |
|
|
12
|
-
| -------- | ------------------- | ----------------------------------------------------------------------------------------------- |
|
|
13
|
-
| `admin` | `*` | Full access. Create, edit, publish, and delete agents and skills. Manage every Builder surface. |
|
|
14
|
-
| `member` | scoped list (below) | Open the Builder, browse agents and skills, populate pickers, and chat with the Builder agent. |
|
|
15
|
-
|
|
16
|
-
## Minimum permissions
|
|
17
|
-
|
|
18
|
-
The Builder UI calls several resources on load, so a usable `member` role needs explicit grants on each. The Builder action layer (`/agent-builder/*`) is one resource. The data it reads and writes lives under separate resources.
|
|
19
|
-
|
|
20
|
-
| Permission | Used for |
|
|
21
|
-
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
-
| `agent-builder:*` | Load Builder actions and run Builder workflows. The derived Builder actions are `agent-builder:read` and `agent-builder:execute`. The wildcard grants both. |
|
|
23
|
-
| `agents:read`, `agents:execute` | List registered agents and chat with the Builder agent |
|
|
24
|
-
| `stored-agents:*` | List, view, create, and edit agents |
|
|
25
|
-
| `stored-skills:*` | List, view, create, and edit stored skills |
|
|
26
|
-
| `stored-workspaces:*` | Pick a workspace when editing an agent |
|
|
27
|
-
| `tools:read`, `tools:execute` | Populate the tool picker and run tools through agents |
|
|
28
|
-
| `workflows:read`, `workflows:execute` | Populate the workflow picker and run workflows through agents |
|
|
29
|
-
| `memory:read` | Preview memory configuration in the picker |
|
|
30
|
-
| `channels:read` | Show Slack/channel chips on agent pages |
|
|
31
|
-
| `infrastructure:read` | Builder diagnostics banner on the shell |
|
|
32
|
-
|
|
33
|
-
Grant `:write`, `:delete`, and `:publish` on `stored-agents` and `stored-skills` for users who should create or modify agents. The `:*` wildcards in the table above cover those actions. `admin` covers everything through the `*` wildcard.
|
|
34
|
-
|
|
35
|
-
## Quickstart with WorkOS
|
|
36
|
-
|
|
37
|
-
`@mastra/auth-workos` provides `MastraAuthWorkos` for SSO and `MastraRBACWorkos` for role-based access. Map WorkOS organization roles to the Builder's `admin` and `member` roles via `roleMapping`:
|
|
38
|
-
|
|
39
|
-
```typescript
|
|
40
|
-
import { MastraAuthWorkos, MastraRBACWorkos } from '@mastra/auth-workos'
|
|
41
|
-
|
|
42
|
-
export const mastraAuth = new MastraAuthWorkos({
|
|
43
|
-
redirectUri: process.env.WORKOS_REDIRECT_URI || 'http://localhost:4111/api/auth/callback',
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
export const rbacProvider = new MastraRBACWorkos({
|
|
47
|
-
roleMapping: {
|
|
48
|
-
admin: ['*'],
|
|
49
|
-
member: [
|
|
50
|
-
'agent-builder:*',
|
|
51
|
-
'agents:read',
|
|
52
|
-
'agents:execute',
|
|
53
|
-
'stored-agents:*',
|
|
54
|
-
'stored-skills:*',
|
|
55
|
-
'stored-workspaces:*',
|
|
56
|
-
'tools:read',
|
|
57
|
-
'tools:execute',
|
|
58
|
-
'workflows:read',
|
|
59
|
-
'workflows:execute',
|
|
60
|
-
'memory:read',
|
|
61
|
-
'channels:read',
|
|
62
|
-
'infrastructure:read',
|
|
63
|
-
],
|
|
64
|
-
_default: [],
|
|
65
|
-
},
|
|
66
|
-
})
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Register both providers on the Mastra server:
|
|
70
|
-
|
|
71
|
-
```typescript
|
|
72
|
-
import { Mastra } from '@mastra/core/mastra'
|
|
73
|
-
import { mastraAuth, rbacProvider } from './auth'
|
|
74
|
-
|
|
75
|
-
export const mastra = new Mastra({
|
|
76
|
-
server: {
|
|
77
|
-
auth: mastraAuth,
|
|
78
|
-
rbac: rbacProvider,
|
|
79
|
-
},
|
|
80
|
-
// ...storage, agents, editor
|
|
81
|
-
})
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
`_default` covers WorkOS roles not listed in the mapping. Omit it to deny unmapped users. Set `WORKOS_API_KEY` and `WORKOS_CLIENT_ID` in your environment.
|
|
85
|
-
|
|
86
|
-
## Permission grammar
|
|
87
|
-
|
|
88
|
-
Permission patterns follow `resource:action`. Wildcards are supported on either side:
|
|
89
|
-
|
|
90
|
-
- `*`: Full access (every resource, every action). Used by `admin`.
|
|
91
|
-
- `agent-builder:*`: Every action on the `agent-builder` resource.
|
|
92
|
-
- `*:read`: `read` Across every resource.
|
|
93
|
-
|
|
94
|
-
Patterns resolve through `matchesPermission()`. The first matching role permission grants the action.
|
|
95
|
-
|
|
96
|
-
## Related
|
|
97
|
-
|
|
98
|
-
- [Configuration](https://mastra.ai/docs/agent-builder/configuration): Wire RBAC alongside the rest of the Builder config.
|
|
99
|
-
- [Deploying](https://mastra.ai/docs/agent-builder/deploying): Auth, RBAC, and EE license setup for production.
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Browser
|
|
4
|
-
|
|
5
|
-
> **Note:** The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. [Contact sales](https://mastra.ai/contact) for more information.
|
|
6
|
-
|
|
7
|
-
The Agent Builder can give end-user agents a browser tool driven by a registered provider. Unlike filesystems and sandboxes, **there are no built-in browser providers** and you must register one through `MastraEditor.browsers`.
|
|
8
|
-
|
|
9
|
-
## Quickstart
|
|
10
|
-
|
|
11
|
-
Register a browser provider on `MastraEditor`, then pin it as the Builder default through `builder.configuration.agent.browser`:
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
import { MastraEditor } from '@mastra/editor'
|
|
15
|
-
import { StagehandBrowser } from '@mastra/stagehand'
|
|
16
|
-
|
|
17
|
-
new MastraEditor({
|
|
18
|
-
browsers: {
|
|
19
|
-
stagehand: {
|
|
20
|
-
id: 'stagehand',
|
|
21
|
-
name: 'Stagehand Browser',
|
|
22
|
-
createBrowser: config =>
|
|
23
|
-
new StagehandBrowser({
|
|
24
|
-
...config,
|
|
25
|
-
apiKey: process.env.BROWSERBASE_API_KEY ?? '',
|
|
26
|
-
env: 'BROWSERBASE',
|
|
27
|
-
projectId: process.env.BROWSERBASE_PROJECT_ID ?? '',
|
|
28
|
-
}),
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
builder: {
|
|
32
|
-
enabled: true,
|
|
33
|
-
configuration: {
|
|
34
|
-
agent: {
|
|
35
|
-
browser: {
|
|
36
|
-
type: 'inline',
|
|
37
|
-
config: { provider: 'stagehand', headless: true },
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
})
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Browser providers
|
|
46
|
-
|
|
47
|
-
`MastraEditor.browsers` accepts a `Record<string, BrowserProvider>`. Each provider exposes:
|
|
48
|
-
|
|
49
|
-
- `id`: Provider identifier, matched against `StorageBrowserConfig.provider` (e.g., `'stagehand'`).
|
|
50
|
-
- `name`: Display name shown in the Builder UI.
|
|
51
|
-
- `createBrowser(config)`: Hydrates a stored browser config into a runtime `MastraBrowser`. This is where you inject runtime-only credentials (API keys, project IDs) that aren't stored in the agent snapshot.
|
|
52
|
-
|
|
53
|
-
Browser classes release as separate packages (e.g., `@mastra/stagehand`, `@mastra/agent-browser`). The provider entry is a plain object wrapping the class, register one entry per browser you want the Builder to expose to end users. See the [StorageBrowserRef reference](https://mastra.ai/reference/editor/storage-browser-ref) for the full `browser` field schema, including all `StorageBrowserConfig` options.
|
|
54
|
-
|
|
55
|
-
## Feature toggle
|
|
56
|
-
|
|
57
|
-
The `features.agent.browser` toggle controls whether end users can enable browser access per agent in the Builder UI. It defaults to `true` only when a valid `configuration.agent.browser` (with a `config.provider`) is provided. Without a registered provider matching the pinned config, the toggle is forced off.
|
|
58
|
-
|
|
59
|
-
## Related
|
|
60
|
-
|
|
61
|
-
- [BuilderAgentDefaults reference](https://mastra.ai/reference/editor/agent-builder/builder-agent-defaults): The full `browser` field schema.
|
|
62
|
-
- [AgentBuilderOptions reference](https://mastra.ai/reference/editor/agent-builder/agent-builder-options): The full Builder config surface, including `features.agent.browser`.
|
|
63
|
-
- [Configuration](https://mastra.ai/docs/agent-builder/configuration): Wire `browser` alongside the rest of the Builder config.
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Channels
|
|
4
|
-
|
|
5
|
-
> **Note:** The Agent Builder is part of the Mastra Enterprise Edition. Production deployments require a valid EE license. [Contact sales](https://mastra.ai/contact) for more information.
|
|
6
|
-
|
|
7
|
-
Channels let Builder-created agents reach users outside the Mastra server. Register a channel provider on `Mastra.channels` and the Builder exposes the channel as an integration option for every agent.
|
|
8
|
-
|
|
9
|
-
Slack is currently the only supported channel.
|
|
10
|
-
|
|
11
|
-
## Quickstart
|
|
12
|
-
|
|
13
|
-
Install the Slack provider:
|
|
14
|
-
|
|
15
|
-
**npm**:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install @mastra/slack
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
**pnpm**:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
pnpm add @mastra/slack
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
**Yarn**:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
yarn add @mastra/slack
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
**Bun**:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
bun add @mastra/slack
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Register `SlackProvider` on `Mastra.channels`:
|
|
40
|
-
|
|
41
|
-
```typescript
|
|
42
|
-
import { Mastra } from '@mastra/core/mastra'
|
|
43
|
-
import { MastraEditor } from '@mastra/editor'
|
|
44
|
-
import { createBuilderAgent } from '@mastra/editor/ee'
|
|
45
|
-
import { SlackProvider } from '@mastra/slack'
|
|
46
|
-
|
|
47
|
-
export const mastra = new Mastra({
|
|
48
|
-
storage,
|
|
49
|
-
channels: {
|
|
50
|
-
slack: new SlackProvider({
|
|
51
|
-
refreshToken: process.env.SLACK_APP_CONFIG_REFRESH_TOKEN,
|
|
52
|
-
baseUrl: process.env.SLACK_BASE_URL,
|
|
53
|
-
}),
|
|
54
|
-
},
|
|
55
|
-
agents: { builderAgent: createBuilderAgent() },
|
|
56
|
-
editor: new MastraEditor({
|
|
57
|
-
builder: { enabled: true },
|
|
58
|
-
}),
|
|
59
|
-
})
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
The Slack provider handles app creation, OAuth, slash commands, and message routing for every Builder-created agent that opts in.
|
|
63
|
-
|
|
64
|
-
## Configuration
|
|
65
|
-
|
|
66
|
-
`SlackProvider` requires one environment variable and accepts one optional override:
|
|
67
|
-
|
|
68
|
-
- `SLACK_APP_CONFIG_REFRESH_TOKEN` (required): The refresh token from your Slack app configuration tokens, available under **Your App Configuration Tokens** on [api.slack.com/apps](https://api.slack.com/apps). The refresh token doesn't expire, but the access tokens it issues rotate every 12 hours and are auto-persisted to `Mastra.storage`.
|
|
69
|
-
- `baseUrl` (optional): The public URL Slack should send events and OAuth callbacks to. Defaults to the running Mastra server's host and port (for example, `http://localhost:4111` in local development). Pass `baseUrl` explicitly when the public URL differs from the server's resolved address: typically a tunnel for local development (`cloudflared tunnel --url http://localhost:4111`) or a deployed URL in production.
|
|
70
|
-
|
|
71
|
-
## Storage requirement
|
|
72
|
-
|
|
73
|
-
`SlackProvider` requires a persistent storage backend on the `Mastra` instance. Without storage, rotated tokens and app installations are lost on restart.
|
|
74
|
-
|
|
75
|
-
## Related
|
|
76
|
-
|
|
77
|
-
- [Deploying](https://mastra.ai/docs/agent-builder/deploying): Set a public `baseUrl` for production deployments.
|
|
78
|
-
- [Configuration](https://mastra.ai/docs/agent-builder/configuration): Wire channel toggles into the Builder UI.
|