@mastra/mcp-docs-server 1.2.4-alpha.1 → 1.2.4-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.
Files changed (90) hide show
  1. package/.docs/docs/agent-controller/overview.md +1 -0
  2. package/.docs/docs/agent-controller/subagents.md +1 -0
  3. package/.docs/docs/agent-controller/threads-and-state.md +1 -0
  4. package/.docs/docs/agents/background-tasks.md +3 -3
  5. package/.docs/docs/agents/channels.md +4 -1
  6. package/.docs/docs/agents/code-mode.md +2 -0
  7. package/.docs/docs/agents/durable-agents.md +1 -1
  8. package/.docs/docs/agents/file-based-agents.md +1 -1
  9. package/.docs/docs/agents/goals.md +2 -0
  10. package/.docs/docs/agents/heartbeats.md +1 -1
  11. package/.docs/docs/agents/overview.md +104 -0
  12. package/.docs/docs/agents/processors.md +8 -2
  13. package/.docs/docs/agents/supervisor-agents.md +1 -0
  14. package/.docs/docs/agents/using-tools.md +3 -0
  15. package/.docs/docs/editor/overview.md +1 -0
  16. package/.docs/docs/evals/overview.md +1 -0
  17. package/.docs/docs/evals/quick-checks.md +1 -0
  18. package/.docs/docs/getting-started/build-with-ai.md +3 -5
  19. package/.docs/docs/getting-started/manual-install.md +15 -5
  20. package/.docs/docs/index.md +104 -0
  21. package/.docs/docs/memory/memory-processors.md +2 -0
  22. package/.docs/docs/memory/observational-memory.md +4 -0
  23. package/.docs/docs/memory/overview.md +3 -1
  24. package/.docs/docs/memory/semantic-recall.md +6 -0
  25. package/.docs/docs/observability/integrations/exporters/langfuse.md +1 -0
  26. package/.docs/docs/workspace/filesystem.md +3 -1
  27. package/.docs/docs/workspace/sandbox.md +2 -0
  28. package/.docs/guides/getting-started/quickstart.md +2 -0
  29. package/.docs/guides/migrations/agentnetwork.md +1 -0
  30. package/.docs/guides/migrations/upgrade-to-v1/memory.md +1 -0
  31. package/.docs/guides/migrations/upgrade-to-v1/voice.md +1 -0
  32. package/.docs/models/environment-variables.md +142 -0
  33. package/.docs/models/gateways/netlify.md +3 -2
  34. package/.docs/models/gateways/openrouter.md +2 -1
  35. package/.docs/models/gateways/vercel.md +2 -1
  36. package/.docs/models/index.md +8 -8
  37. package/.docs/models/providers/cerebras.md +5 -4
  38. package/.docs/models/providers/google.md +3 -1
  39. package/.docs/models/providers/opencode.md +2 -1
  40. package/.docs/models/providers/zhipuai.md +1 -1
  41. package/.docs/reference/agents/agent.md +3 -2
  42. package/.docs/reference/agents/channels.md +5 -0
  43. package/.docs/reference/evals/hallucination.md +1 -0
  44. package/.docs/reference/evals/prompt-alignment.md +1 -0
  45. package/.docs/reference/index.md +2 -0
  46. package/.docs/reference/memory/memory-class.md +1 -0
  47. package/.docs/reference/memory/observational-memory.md +8 -0
  48. package/.docs/reference/observability/tracing/exporters/langfuse.md +1 -0
  49. package/.docs/reference/processors/batch-parts-processor.md +1 -0
  50. package/.docs/reference/processors/cost-guard-processor.md +1 -0
  51. package/.docs/reference/processors/message-history-processor.md +1 -0
  52. package/.docs/reference/processors/moderation-processor.md +2 -0
  53. package/.docs/reference/processors/pii-detector.md +2 -0
  54. package/.docs/reference/processors/prefill-error-handler.md +2 -0
  55. package/.docs/reference/processors/processor-interface.md +3 -2
  56. package/.docs/reference/processors/prompt-injection-detector.md +1 -0
  57. package/.docs/reference/processors/provider-history-compat.md +2 -0
  58. package/.docs/reference/processors/regex-filter-processor.md +1 -0
  59. package/.docs/reference/processors/response-cache.md +1 -0
  60. package/.docs/reference/processors/semantic-recall-processor.md +1 -0
  61. package/.docs/reference/processors/skill-search-processor.md +1 -0
  62. package/.docs/reference/processors/stream-error-retry-processor.md +2 -0
  63. package/.docs/reference/processors/system-prompt-scrubber.md +1 -0
  64. package/.docs/reference/processors/token-limiter-processor.md +3 -0
  65. package/.docs/reference/processors/tool-call-filter.md +2 -0
  66. package/.docs/reference/processors/tool-search-processor.md +2 -0
  67. package/.docs/reference/processors/working-memory-processor.md +1 -0
  68. package/.docs/reference/signals/signal-provider.md +1 -0
  69. package/.docs/reference/signals/task-signal-provider.md +1 -0
  70. package/.docs/reference/signals/webhook-signal-provider.md +1 -0
  71. package/.docs/reference/templates/overview.md +1 -0
  72. package/.docs/reference/tools/create-code-mode.md +1 -0
  73. package/.docs/reference/tools/create-tool.md +2 -0
  74. package/.docs/reference/tools/mcp-client.md +1 -0
  75. package/.docs/reference/tools/mcp-server.md +1 -1
  76. package/.docs/reference/voice/voice.addInstructions.md +1 -0
  77. package/.docs/reference/workspace/agentcore-runtime-sandbox.md +1 -0
  78. package/.docs/reference/workspace/agentfs-filesystem.md +1 -0
  79. package/.docs/reference/workspace/apple-container-sandbox.md +257 -0
  80. package/.docs/reference/workspace/archil-filesystem.md +1 -0
  81. package/.docs/reference/workspace/azure-blob-filesystem.md +1 -0
  82. package/.docs/reference/workspace/docker-sandbox.md +1 -0
  83. package/.docs/reference/workspace/e2b-sandbox.md +1 -0
  84. package/.docs/reference/workspace/files-sdk-filesystem.md +1 -0
  85. package/.docs/reference/workspace/gcs-filesystem.md +1 -0
  86. package/.docs/reference/workspace/mesa-filesystem.md +319 -0
  87. package/.docs/reference/workspace/s3-filesystem.md +1 -0
  88. package/.docs/reference/workspace/vercel.md +1 -0
  89. package/CHANGELOG.md +15 -0
  90. package/package.json +4 -4
@@ -0,0 +1,257 @@
1
+ # AppleContainerSandbox
2
+
3
+ Executes commands inside local OCI Linux containers through Apple's [`container`](https://github.com/apple/container) CLI. The provider starts a long-lived container and uses `container exec` for workspace commands.
4
+
5
+ > **Info:** For interface details, see [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox).
6
+
7
+ ## Installation
8
+
9
+ **npm**:
10
+
11
+ ```bash
12
+ npm install @mastra/apple-container
13
+ ```
14
+
15
+ **pnpm**:
16
+
17
+ ```bash
18
+ pnpm add @mastra/apple-container
19
+ ```
20
+
21
+ **Yarn**:
22
+
23
+ ```bash
24
+ yarn add @mastra/apple-container
25
+ ```
26
+
27
+ **Bun**:
28
+
29
+ ```bash
30
+ bun add @mastra/apple-container
31
+ ```
32
+
33
+ Requires an Apple silicon Mac running macOS 26 or newer with Apple's `container` CLI installed. Start the container system before using the provider:
34
+
35
+ ```bash
36
+ container system start
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ Add an `AppleContainerSandbox` to a workspace and assign it to an agent:
42
+
43
+ ```typescript
44
+ import { Agent } from '@mastra/core/agent'
45
+ import { Workspace } from '@mastra/core/workspace'
46
+ import { AppleContainerSandbox } from '@mastra/apple-container'
47
+
48
+ const workspace = new Workspace({
49
+ sandbox: new AppleContainerSandbox({
50
+ image: 'node:22-slim',
51
+ volumes: {
52
+ '/Users/me/project': '/workspace',
53
+ },
54
+ workingDir: '/workspace',
55
+ }),
56
+ })
57
+
58
+ const agent = new Agent({
59
+ id: 'dev-agent',
60
+ name: 'Dev Agent',
61
+ instructions: 'You are a coding assistant working in this workspace.',
62
+ model: 'anthropic/claude-sonnet-4-6',
63
+ workspace,
64
+ })
65
+
66
+ const response = await agent.generate('Run `node --version`.')
67
+ console.log(response.text)
68
+ ```
69
+
70
+ ## Constructor parameters
71
+
72
+ **id** (`string`): Unique identifier for this sandbox instance. (Default: `Auto-generated`)
73
+
74
+ **name** (`string`): Apple container name passed to \`container run --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` ``)
75
+
76
+ **image** (`string`): OCI image to use for the container. (Default: `'node:22-slim'`)
77
+
78
+ **command** (`string[]`): Container init command. Must keep the container alive for exec-based command execution. (Default: `['sleep', 'infinity']`)
79
+
80
+ **env** (`Record<string, string>`): Environment variables to set in the container and on command execs.
81
+
82
+ **volumes** (`Record<string, string>`): Host-to-container bind mounts. Keys are host paths, values are container paths.
83
+
84
+ **mounts** (`string[]`): Raw \`container run --mount\` specs.
85
+
86
+ **network** (`string`): Apple container network attachment spec.
87
+
88
+ **publishedPorts** (`string[]`): Port publish specs passed as \`--publish\`.
89
+
90
+ **publishedSockets** (`string[]`): Socket publish specs passed as \`--publish-socket\`.
91
+
92
+ **cpus** (`number | string`): Number of CPUs to allocate.
93
+
94
+ **memory** (`string`): Memory allocation, for example '1G'.
95
+
96
+ **platform** (`string`): OCI platform, for example 'linux/arm64'.
97
+
98
+ **arch** (`string`): Image architecture when selecting a multi-arch image.
99
+
100
+ **os** (`string`): Image operating system when selecting a multi-platform image.
101
+
102
+ **rosetta** (`boolean`): Enable Rosetta in the container. (Default: `false`)
103
+
104
+ **readonlyRootfs** (`boolean`): Mount the container root filesystem as read-only. (Default: `false`)
105
+
106
+ **ssh** (`boolean`): Forward the host SSH agent socket. (Default: `false`)
107
+
108
+ **init** (`boolean`): Enable Apple's init process in the container. (Default: `true`)
109
+
110
+ **virtualization** (`boolean`): Expose virtualization capabilities to the container. (Default: `false`)
111
+
112
+ **capAdd** (`string[]`): Linux capabilities to add.
113
+
114
+ **capDrop** (`string[]`): Linux capabilities to drop.
115
+
116
+ **tmpfs** (`string[]`): tmpfs destination paths passed as \`--tmpfs\`, for example \`/tmp\`.
117
+
118
+ **dns** (`string[]`): DNS nameserver IPs.
119
+
120
+ **dnsSearch** (`string[]`): DNS search domains.
121
+
122
+ **noDns** (`boolean`): Do not configure DNS in the container. (Default: `false`)
123
+
124
+ **labels** (`Record<string, string>`): Additional container labels. Mastra labels (mastra.sandbox, mastra.sandbox.id) are always included.
125
+
126
+ **workingDir** (`string`): Working directory inside the container. (Default: `'/workspace'`)
127
+
128
+ **timeout** (`number`): Default command timeout in milliseconds. (Default: `300000 (5 minutes)`)
129
+
130
+ **deleteOnDestroy** (`boolean`): Delete the Apple container when the sandbox is destroyed. When false, destroy stops the container instead. (Default: `true`)
131
+
132
+ **containerBinary** (`string`): Path or name for the Apple container CLI. (Default: `'container'`)
133
+
134
+ **instructions** (`string | function`): Custom instructions that override the default instructions returned by getInstructions(). Pass an empty string to suppress instructions.
135
+
136
+ ## Properties
137
+
138
+ **id** (`string`): Sandbox instance identifier.
139
+
140
+ **name** (`string`): Provider name ('AppleContainerSandbox').
141
+
142
+ **provider** (`string`): Provider identifier ('apple-container').
143
+
144
+ **status** (`ProviderStatus`): 'pending' | 'starting' | 'running' | 'stopping' | 'stopped' | 'destroying' | 'destroyed' | 'error'
145
+
146
+ **containerId** (`string`): Apple container ID when known, otherwise the configured container name.
147
+
148
+ ## Environment variables
149
+
150
+ Set environment variables at the container level with `env`. Per-command environment variables can also be passed through `executeCommand` options:
151
+
152
+ ```typescript
153
+ const sandbox = new AppleContainerSandbox({
154
+ image: 'node:22-slim',
155
+ env: {
156
+ NODE_ENV: 'development',
157
+ },
158
+ })
159
+
160
+ await sandbox.executeCommand('node', ['-e', 'console.log(process.env.TASK_ID)'], {
161
+ env: { TASK_ID: '42' },
162
+ })
163
+ ```
164
+
165
+ ## Bind mounts
166
+
167
+ Mount host directories into the container using the `volumes` option:
168
+
169
+ ```typescript
170
+ const sandbox = new AppleContainerSandbox({
171
+ image: 'node:22-slim',
172
+ volumes: {
173
+ '/Users/me/project': '/workspace/project',
174
+ '/Users/me/.npm': '/root/.npm',
175
+ },
176
+ })
177
+ ```
178
+
179
+ Bind mounts are applied at container creation time. The host paths must exist before the sandbox starts.
180
+
181
+ ## Resource and platform options
182
+
183
+ Apple container CLI options can be passed through the constructor:
184
+
185
+ ```typescript
186
+ const sandbox = new AppleContainerSandbox({
187
+ image: 'node:22-slim',
188
+ volumes: {
189
+ '/Users/me/project': '/workspace',
190
+ },
191
+ cpus: 2,
192
+ memory: '2G',
193
+ platform: 'linux/arm64',
194
+ readonlyRootfs: true,
195
+ tmpfs: ['/tmp'],
196
+ })
197
+ ```
198
+
199
+ These options are only applied when a new container is created. If the sandbox reconnects to an existing container with the same name, destroy and recreate the sandbox to apply changed runtime options. Apple `--tmpfs` accepts container paths only, such as `/tmp`; it does not accept Docker-style option specs like `/tmp:rw,size=256m`. When `readonlyRootfs` is enabled, make sure `workingDir` points to a path supplied by the image, a bind mount, or a writable tmpfs.
200
+
201
+ ## Security model
202
+
203
+ `AppleContainerSandbox` runs local containers through the host Apple `container` service. Treat constructor options as trusted server-side configuration:
204
+
205
+ - `volumes`, `mounts`, and `publishedSockets` can expose host paths to containerized code.
206
+ - `publishedPorts` can expose in-container services on the host or network; bind to `127.0.0.1` when only local access is intended.
207
+ - `ssh` forwards the host SSH agent socket.
208
+ - `capAdd` and `virtualization` can expand what containerized code can do.
209
+ - `containerBinary` is a constructor-only escape hatch for trusted code and is not part of the serializable editor provider schema.
210
+
211
+ Use the narrowest mounts and capabilities your workload needs. Existing containers are only reconnected when they carry Mastra ownership labels for the sandbox ID. Containers created by this provider also include a config-hash label; when that label is present, reconnect fails if immutable runtime options such as image, command, mounts, ports, capabilities, or working directory changed.
212
+
213
+ ## Limitations
214
+
215
+ `AppleContainerSandbox` implements foreground workspace command execution with `executeCommand()`. It does not yet expose a `SandboxProcessManager` for background processes or LSP sessions.
216
+
217
+ Command timeouts are enforced inside the container so timed-out commands are cleaned up by the container runtime. Abort signals cancel the host CLI wait path and should not be used as a substitute for command timeouts when in-container cleanup matters.
218
+
219
+ ## Reconnection
220
+
221
+ `AppleContainerSandbox` reconnects by inspecting a container with the configured name. When `start()` is called:
222
+
223
+ - A running container is reused.
224
+ - A stopped container is restarted.
225
+ - A missing container is created from the configured image.
226
+ - A container with the configured name but without matching Mastra ownership labels fails instead of being managed.
227
+ - A Mastra-owned container with a config-hash label that does not match immutable runtime options fails instead of being reused.
228
+
229
+ ```typescript
230
+ const sandbox = new AppleContainerSandbox({ id: 'persistent-sandbox' })
231
+ await sandbox.start()
232
+
233
+ const sandbox2 = new AppleContainerSandbox({ id: 'persistent-sandbox' })
234
+ await sandbox2.start()
235
+ ```
236
+
237
+ ## Editor provider
238
+
239
+ Register the provider with `MastraEditor` to hydrate stored sandbox configs:
240
+
241
+ ```typescript
242
+ import { MastraEditor } from '@mastra/editor'
243
+ import { appleContainerSandboxProvider } from '@mastra/apple-container'
244
+
245
+ const editor = new MastraEditor({
246
+ sandboxes: {
247
+ [appleContainerSandboxProvider.id]: appleContainerSandboxProvider,
248
+ },
249
+ })
250
+ ```
251
+
252
+ ## Related
253
+
254
+ - [WorkspaceSandbox interface](https://mastra.ai/reference/workspace/sandbox)
255
+ - [DockerSandbox reference](https://mastra.ai/reference/workspace/docker-sandbox)
256
+ - [LocalSandbox reference](https://mastra.ai/reference/workspace/local-sandbox)
257
+ - [Workspace overview](https://mastra.ai/docs/workspace/overview)
@@ -48,6 +48,7 @@ const workspace = new Workspace({
48
48
  })
49
49
 
50
50
  const agent = new Agent({
51
+ id: 'file-agent',
51
52
  name: 'file-agent',
52
53
  model: 'anthropic/claude-opus-4-7',
53
54
  workspace,
@@ -47,6 +47,7 @@ const workspace = new Workspace({
47
47
  })
48
48
 
49
49
  const agent = new Agent({
50
+ id: 'file-agent',
50
51
  name: 'file-agent',
51
52
  model: 'anthropic/claude-opus-4-7',
52
53
  workspace,
@@ -48,6 +48,7 @@ const workspace = new Workspace({
48
48
  })
49
49
 
50
50
  const agent = new Agent({
51
+ id: 'dev-agent',
51
52
  name: 'dev-agent',
52
53
  model: 'anthropic/claude-opus-4-7',
53
54
  workspace,
@@ -47,6 +47,7 @@ const workspace = new Workspace({
47
47
  })
48
48
 
49
49
  const agent = new Agent({
50
+ id: 'dev-agent',
50
51
  name: 'dev-agent',
51
52
  model: 'anthropic/claude-opus-4-7',
52
53
  workspace,
@@ -57,6 +57,7 @@ const workspace = new Workspace({
57
57
  })
58
58
 
59
59
  const agent = new Agent({
60
+ id: 'file-agent',
60
61
  name: 'file-agent',
61
62
  model: 'anthropic/claude-opus-4-7',
62
63
  workspace,
@@ -48,6 +48,7 @@ const workspace = new Workspace({
48
48
  })
49
49
 
50
50
  const agent = new Agent({
51
+ id: 'file-agent',
51
52
  name: 'file-agent',
52
53
  model: 'anthropic/claude-opus-4-7',
53
54
  workspace,
@@ -0,0 +1,319 @@
1
+ # MesaFilesystem
2
+
3
+ Stores workspace files in [Mesa](https://docs.mesa.dev/content/getting-started/introduction) repos through the standard Mastra `WorkspaceFilesystem` interface.
4
+
5
+ Use `MesaFilesystem` when agents need versioned file storage. For a local directory, use [`LocalFilesystem`](https://mastra.ai/reference/workspace/local-filesystem). For object storage, use [`S3Filesystem`](https://mastra.ai/reference/workspace/s3-filesystem), [`GCSFilesystem`](https://mastra.ai/reference/workspace/gcs-filesystem), or [`AzureBlobFilesystem`](https://mastra.ai/reference/workspace/azure-blob-filesystem).
6
+
7
+ > **Info:** `MesaFilesystem` runs in the Mastra process.
8
+ >
9
+ > [Mesa's POSIX mount](https://docs.mesa.dev/content/mesafs/posix-mount) (for using a Mesa filesystem within a sandbox) is not yet part of the `@mastra/mesa` package. Support is coming soon.
10
+
11
+ ## Installation
12
+
13
+ **npm**:
14
+
15
+ ```bash
16
+ npm install @mastra/mesa
17
+ ```
18
+
19
+ **pnpm**:
20
+
21
+ ```bash
22
+ pnpm add @mastra/mesa
23
+ ```
24
+
25
+ **Yarn**:
26
+
27
+ ```bash
28
+ yarn add @mastra/mesa
29
+ ```
30
+
31
+ **Bun**:
32
+
33
+ ```bash
34
+ bun add @mastra/mesa
35
+ ```
36
+
37
+ ## Usage example
38
+
39
+ Mount one Mesa repo and pass the filesystem to a workspace:
40
+
41
+ ```typescript
42
+ import { Agent } from '@mastra/core/agent'
43
+ import { Workspace } from '@mastra/core/workspace'
44
+ import { MesaFilesystem } from '@mastra/mesa'
45
+
46
+ const workspace = new Workspace({
47
+ filesystem: new MesaFilesystem({
48
+ apiKey: process.env.MESA_API_KEY,
49
+ org: 'acme',
50
+ repos: [{ name: 'docs', bookmark: 'main' }],
51
+ }),
52
+ })
53
+
54
+ const agent = new Agent({
55
+ id: 'file-agent',
56
+ name: 'file-agent',
57
+ model: 'anthropic/claude-opus-4-7',
58
+ workspace,
59
+ })
60
+ ```
61
+
62
+ `apiKey` falls back to `MESA_API_KEY` when omitted.
63
+
64
+ ## Constructor parameters
65
+
66
+ **apiKey** (`string`): Mesa API key. Falls back to \`MESA\_API\_KEY\` when omitted.
67
+
68
+ **org** (`string`): Mesa org slug. When omitted, the Mesa SDK resolves the default org.
69
+
70
+ **repos** (`RepoConfig[]`): Mesa repos to mount.
71
+
72
+ **cache** (`{ diskCache?: { path: string; maxSizeBytes?: number } }`): Mesa filesystem cache configuration.
73
+
74
+ **ttl** (`number`): Mesa mount token lifetime in seconds.
75
+
76
+ **readOnly** (`boolean`): Mount all repos as read-only. (Default: `false`)
77
+
78
+ ## Properties
79
+
80
+ **id** (`string`): Filesystem instance identifier.
81
+
82
+ **name** (`string`): Provider name (\`'MesaFilesystem'\`).
83
+
84
+ **provider** (`string`): Provider identifier (\`'mesa'\`).
85
+
86
+ **readOnly** (`boolean | undefined`): Whether write operations are blocked.
87
+
88
+ **client** (`Mesa | undefined`): Mesa SDK client created by this provider. Undefined before initialization.
89
+
90
+ **filesystem** (`MesaFileSystem`): Active Mesa filesystem. Access this after initialization when you need the raw Mesa SDK filesystem.
91
+
92
+ **change** (`MesaFileSystem["change"]`): Mesa change management operations for the mounted filesystem.
93
+
94
+ **bookmark** (`MesaFileSystem["bookmark"]`): Mesa bookmark management operations for the mounted filesystem.
95
+
96
+ ## Methods
97
+
98
+ `MesaFilesystem` implements the [WorkspaceFilesystem interface](https://mastra.ai/reference/workspace/filesystem).
99
+
100
+ ### File operations
101
+
102
+ #### `readFile(path, options?)`
103
+
104
+ Reads a file from Mesa.
105
+
106
+ ```typescript
107
+ const content = await filesystem.readFile('/acme/docs/README.md', {
108
+ encoding: 'utf-8',
109
+ })
110
+ ```
111
+
112
+ Returns: `Promise<string | Buffer>`
113
+
114
+ #### `writeFile(path, content, options?)`
115
+
116
+ Writes a file to Mesa.
117
+
118
+ ```typescript
119
+ await filesystem.writeFile('/acme/docs/report.md', '# Report')
120
+ ```
121
+
122
+ Returns: `Promise<void>`
123
+
124
+ #### `appendFile(path, content)`
125
+
126
+ Appends content to a file.
127
+
128
+ ```typescript
129
+ await filesystem.appendFile('/acme/docs/log.txt', 'new line\n')
130
+ ```
131
+
132
+ Returns: `Promise<void>`
133
+
134
+ #### `deleteFile(path, options?)`
135
+
136
+ Deletes a file.
137
+
138
+ ```typescript
139
+ await filesystem.deleteFile('/acme/docs/old-report.md')
140
+ ```
141
+
142
+ Returns: `Promise<void>`
143
+
144
+ #### `copyFile(src, dest, options?)`
145
+
146
+ Copies a file.
147
+
148
+ ```typescript
149
+ await filesystem.copyFile('/acme/docs/report.md', '/acme/docs/archive/report.md')
150
+ ```
151
+
152
+ Returns: `Promise<void>`
153
+
154
+ #### `moveFile(src, dest, options?)`
155
+
156
+ Moves or renames a file.
157
+
158
+ ```typescript
159
+ await filesystem.moveFile('/acme/docs/draft.md', '/acme/docs/final.md')
160
+ ```
161
+
162
+ Returns: `Promise<void>`
163
+
164
+ ### Directory operations
165
+
166
+ #### `mkdir(path, options?)`
167
+
168
+ Creates a directory.
169
+
170
+ ```typescript
171
+ await filesystem.mkdir('/acme/docs/reports', { recursive: true })
172
+ ```
173
+
174
+ Returns: `Promise<void>`
175
+
176
+ #### `rmdir(path, options?)`
177
+
178
+ Removes a directory.
179
+
180
+ ```typescript
181
+ await filesystem.rmdir('/acme/docs/reports', { recursive: true })
182
+ ```
183
+
184
+ Returns: `Promise<void>`
185
+
186
+ #### `readdir(path, options?)`
187
+
188
+ Lists directory entries.
189
+
190
+ ```typescript
191
+ const entries = await filesystem.readdir('/acme/docs', {
192
+ recursive: true,
193
+ extension: '.md',
194
+ })
195
+ ```
196
+
197
+ Returns: `Promise<FileEntry[]>`
198
+
199
+ ### Path operations
200
+
201
+ #### `exists(path)`
202
+
203
+ Checks whether a path exists.
204
+
205
+ ```typescript
206
+ const exists = await filesystem.exists('/acme/docs/README.md')
207
+ ```
208
+
209
+ Returns: `Promise<boolean>`
210
+
211
+ #### `stat(path)`
212
+
213
+ Returns file or directory metadata.
214
+
215
+ ```typescript
216
+ const stat = await filesystem.stat('/acme/docs/README.md')
217
+ ```
218
+
219
+ Returns: `Promise<FileStat>`
220
+
221
+ #### `realpath(path)`
222
+
223
+ Returns the canonical path from Mesa.
224
+
225
+ ```typescript
226
+ const realPath = await filesystem.realpath('/acme/docs/README.md')
227
+ ```
228
+
229
+ Returns: `Promise<string>`
230
+
231
+ ### Mesa operations
232
+
233
+ #### `bash(options?)`
234
+
235
+ Creates a Mesa-backed Bash runtime for this filesystem.
236
+
237
+ ```typescript
238
+ const bash = await filesystem.bash({
239
+ cwd: '/acme/docs',
240
+ })
241
+ ```
242
+
243
+ Returns: `Promise<Bash>`
244
+
245
+ ## Path semantics
246
+
247
+ Methods expect absolute paths. For `MesaFilesystem`, paths are rooted at the Mesa mount and must include the org slug and repo name:
248
+
249
+ ```typescript
250
+ await filesystem.readFile('/acme/docs/README.md')
251
+ ```
252
+
253
+ Do not omit the leading slash:
254
+
255
+ ```typescript
256
+ await filesystem.readFile('acme/docs/README.md') // Incorrect
257
+ await filesystem.readFile('/acme/docs/README.md') // Correct
258
+ ```
259
+
260
+ The org comes from `org` in the constructor, or from the Mesa SDK's default org inference when `org` is omitted. It still appears as the first path segment.
261
+
262
+ When you mount multiple repos, each repo is available under the org segment:
263
+
264
+ ```typescript
265
+ const filesystem = new MesaFilesystem({
266
+ org: 'acme',
267
+ repos: [
268
+ { name: 'docs', bookmark: 'main' },
269
+ { name: 'website', bookmark: 'main' },
270
+ ],
271
+ })
272
+
273
+ await filesystem.readFile('/acme/docs/README.md')
274
+ await filesystem.readFile('/acme/website/package.json')
275
+ ```
276
+
277
+ ## Mesa versioning APIs
278
+
279
+ Access the underlying Mesa filesystem for Mesa-specific change and bookmark operations:
280
+
281
+ ```typescript
282
+ await filesystem.writeFile('/acme/docs/draft.md', 'Draft')
283
+
284
+ const current = await filesystem.change.current({
285
+ repo: 'docs',
286
+ })
287
+
288
+ await filesystem.bookmark.move({
289
+ repo: 'docs',
290
+ name: 'main',
291
+ changeId: current.changeId,
292
+ })
293
+ ```
294
+
295
+ More details on versioning semantics can be found in [Mesa's docs](https://docs.mesa.dev/content/concepts/versioning).
296
+
297
+ ## Read-only mode
298
+
299
+ Set `readOnly: true` to block write operations through Mastra:
300
+
301
+ ```typescript
302
+ const filesystem = new MesaFilesystem({
303
+ repos: [{ name: 'docs', bookmark: 'main' }],
304
+ readOnly: true,
305
+ })
306
+ ```
307
+
308
+ Read operations still work. Write operations throw `WorkspaceReadOnlyError`.
309
+
310
+ ## Concurrency
311
+
312
+ `overwrite: false` and `expectedMtime` use preflight checks before writing. These checks are not atomic unless Mesa adds native conditional writes for app mounts.
313
+
314
+ ## Related
315
+
316
+ - [WorkspaceFilesystem interface](https://mastra.ai/reference/workspace/filesystem)
317
+ - [Filesystem docs](https://mastra.ai/docs/workspace/filesystem)
318
+ - [Workspace overview](https://mastra.ai/docs/workspace/overview)
319
+ - [Mesa documentation](https://docs.mesa.dev/content/getting-started/introduction)
@@ -49,6 +49,7 @@ const workspace = new Workspace({
49
49
  })
50
50
 
51
51
  const agent = new Agent({
52
+ id: 'file-agent',
52
53
  name: 'file-agent',
53
54
  model: 'anthropic/claude-opus-4-7',
54
55
  workspace,
@@ -50,6 +50,7 @@ const workspace = new Workspace({
50
50
  })
51
51
 
52
52
  const agent = new Agent({
53
+ id: 'dev-agent',
53
54
  name: 'dev-agent',
54
55
  model: 'anthropic/claude-sonnet-4-6',
55
56
  workspace,
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.2.4-alpha.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`1340fb7`](https://github.com/mastra-ai/mastra/commit/1340fb76262a3ca062130aa71859f07257a0a5a4)]:
8
+ - @mastra/core@1.49.0-alpha.2
9
+
10
+ ## 1.2.4-alpha.2
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`cc440a3`](https://github.com/mastra-ai/mastra/commit/cc440a39400d8ce06655462b26c1666a1b3d4320), [`ea6327b`](https://github.com/mastra-ai/mastra/commit/ea6327ba2d63ca647804bc97b347e03a58617162), [`3439fa8`](https://github.com/mastra-ai/mastra/commit/3439fa836ecfcaa257b40c20b30ac2a8be22e9ea), [`85107f2`](https://github.com/mastra-ai/mastra/commit/85107f2758b527147fccbedff962961927c2d3b8), [`06ff9e0`](https://github.com/mastra-ai/mastra/commit/06ff9e0befd1d642ab87ff749285ee4091205c7e), [`7f5e1ff`](https://github.com/mastra-ai/mastra/commit/7f5e1ff695a92f672bb3976363925d1e9136b54a), [`b8375c1`](https://github.com/mastra-ai/mastra/commit/b8375c1f8fe905df8ae2ae9a893bb365f17aec4e), [`9ab5faa`](https://github.com/mastra-ai/mastra/commit/9ab5faaff673ee9953ab4604cec217ee57875cd5), [`003f35d`](https://github.com/mastra-ai/mastra/commit/003f35d19e07b23b4bacc591c8bc0c59b42124ae)]:
15
+ - @mastra/core@1.49.0-alpha.1
16
+ - @mastra/mcp@1.13.0-alpha.0
17
+
3
18
  ## 1.2.4-alpha.0
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.4-alpha.1",
3
+ "version": "1.2.4-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",
@@ -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.48.1-alpha.0",
32
- "@mastra/mcp": "^1.12.1"
31
+ "@mastra/core": "1.49.0-alpha.2",
32
+ "@mastra/mcp": "^1.13.0-alpha.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@hono/node-server": "^1.19.11",
@@ -47,7 +47,7 @@
47
47
  "vitest": "4.1.8",
48
48
  "@internal/lint": "0.0.110",
49
49
  "@internal/types-builder": "0.0.85",
50
- "@mastra/core": "1.48.1-alpha.0"
50
+ "@mastra/core": "1.49.0-alpha.2"
51
51
  },
52
52
  "homepage": "https://mastra.ai",
53
53
  "repository": {