@mastra/mcp-docs-server 1.2.23-alpha.6 → 1.2.23-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/.docs/docs/agents/code-mode.md +1 -1
  2. package/.docs/docs/agents/human-in-the-loop.md +1 -1
  3. package/.docs/docs/agents/networks.md +1 -1
  4. package/.docs/docs/agents/processors.md +1 -1
  5. package/.docs/docs/agents/structured-output.md +1 -1
  6. package/.docs/docs/auth/fga.md +1 -1
  7. package/.docs/docs/channels.md +2 -2
  8. package/.docs/docs/connections/mcp.md +1 -1
  9. package/.docs/docs/datasets/running-experiments.md +1 -1
  10. package/.docs/docs/deployment/sandbox.md +2 -2
  11. package/.docs/docs/deployment/workers.md +2 -2
  12. package/.docs/docs/evals/custom-scorers.md +1 -1
  13. package/.docs/docs/evals/multi-turn.md +1 -1
  14. package/.docs/docs/evals/overview.md +2 -2
  15. package/.docs/docs/evals/quick-checks.md +1 -1
  16. package/.docs/docs/evals/vitest-integration.md +136 -0
  17. package/.docs/docs/guides/context-engineering.md +1 -1
  18. package/.docs/docs/guides/multi-agent-systems.md +1 -1
  19. package/.docs/docs/guides/streaming.md +72 -52
  20. package/.docs/docs/harness/agent-controller.md +1 -1
  21. package/.docs/docs/harness/background-tasks.md +1 -1
  22. package/.docs/docs/harness/durable-agents.md +1 -1
  23. package/.docs/docs/harness/schedules.md +1 -1
  24. package/.docs/docs/harness/signal-providers.md +1 -1
  25. package/.docs/docs/harness/signals.md +1 -1
  26. package/.docs/docs/index.md +1 -1
  27. package/.docs/docs/mastra-platform/deploy.md +15 -15
  28. package/.docs/docs/mastra-platform/environments.md +2 -2
  29. package/.docs/docs/mastra-platform/github.md +2 -2
  30. package/.docs/docs/mastra-platform/regions.md +1 -1
  31. package/.docs/docs/mastra-platform/server.md +4 -4
  32. package/.docs/docs/mastra-platform/studio.md +1 -1
  33. package/.docs/docs/mastra-platform/trace-intelligence.md +1 -1
  34. package/.docs/docs/mastra-platform/workspaces.md +1 -1
  35. package/.docs/docs/memory/message-history.md +3 -3
  36. package/.docs/docs/memory/observational-memory.md +18 -18
  37. package/.docs/docs/memory/overview.md +1 -1
  38. package/.docs/docs/memory/working-memory.md +1 -1
  39. package/.docs/docs/observability/feedback.md +1 -1
  40. package/.docs/docs/observability/logging.md +1 -1
  41. package/.docs/docs/observability/tracing/overview.md +1 -1
  42. package/.docs/docs/sandbox/lsp.md +1 -1
  43. package/.docs/docs/sandbox/overview.md +1 -1
  44. package/.docs/docs/server/mastra-client.md +1 -1
  45. package/.docs/docs/server/overview.md +1 -1
  46. package/.docs/docs/server/pubsub.md +1 -1
  47. package/.docs/docs/server/request-context.md +2 -2
  48. package/.docs/docs/server/server-adapters.md +1 -1
  49. package/.docs/docs/skills.md +1 -1
  50. package/.docs/docs/studio/deployment.md +1 -1
  51. package/.docs/docs/studio/editor.md +1 -1
  52. package/.docs/docs/studio/overview.md +1 -1
  53. package/.docs/docs/subagents.md +2 -2
  54. package/.docs/docs/workflows/control-flow.md +1 -1
  55. package/.docs/docs/workflows/overview.md +1 -1
  56. package/.docs/docs/workflows/scheduled-workflows.md +1 -1
  57. package/.docs/docs/workflows/suspend-and-resume.md +2 -2
  58. package/.docs/integrations/sandboxes/agentcore.md +2 -0
  59. package/.docs/integrations/sandboxes/apple-container.md +4 -2
  60. package/.docs/integrations/sandboxes/blaxel.md +2 -0
  61. package/.docs/integrations/sandboxes/cloudflare-sandbox.md +1 -1
  62. package/.docs/integrations/sandboxes/daytona.md +2 -0
  63. package/.docs/integrations/sandboxes/docker.md +3 -1
  64. package/.docs/integrations/sandboxes/e2b.md +2 -0
  65. package/.docs/integrations/sandboxes/modal.md +3 -1
  66. package/.docs/integrations/sandboxes/railway.md +2 -0
  67. package/.docs/integrations/sandboxes/vercel.md +4 -0
  68. package/.docs/models/gateways/vercel.md +2 -1
  69. package/.docs/models/providers/chutes.md +1 -1
  70. package/.docs/models/providers/cortecs.md +3 -4
  71. package/.docs/models/providers/edenai.md +2 -1
  72. package/.docs/models/providers/iteracompute.md +8 -7
  73. package/.docs/models/providers/kilo.md +4 -4
  74. package/.docs/models/providers/vancine.md +4 -6
  75. package/.docs/reference/agent-controller/agent-controller-class.md +2 -2
  76. package/.docs/reference/agent-controller/session.md +3 -3
  77. package/.docs/reference/agents/durable-agent.md +1 -1
  78. package/.docs/reference/agents/getDefaultGenerateOptions.md +1 -1
  79. package/.docs/reference/agents/listSuspendedRuns.md +2 -2
  80. package/.docs/reference/ai-sdk/chat-route.md +1 -1
  81. package/.docs/reference/ai-sdk/network-route.md +1 -1
  82. package/.docs/reference/ai-sdk/workflow-route.md +1 -1
  83. package/.docs/reference/browser/browser-viewer.md +1 -1
  84. package/.docs/reference/cli/mastra.md +4 -4
  85. package/.docs/reference/core/mastra-class.md +1 -1
  86. package/.docs/reference/datasets/createExperiment.md +1 -1
  87. package/.docs/reference/editor/tool-provider.md +1 -1
  88. package/.docs/reference/editor/versioning.md +1 -1
  89. package/.docs/reference/evals/multi-turn-judge.md +1 -1
  90. package/.docs/reference/evals/rubric.md +1 -1
  91. package/.docs/reference/file-based-agents/schedules.md +2 -2
  92. package/.docs/reference/file-based-agents/workspace.md +1 -1
  93. package/.docs/reference/manual-install.md +3 -3
  94. package/.docs/reference/memory/observational-memory.md +4 -4
  95. package/.docs/reference/memory/settled.md +1 -1
  96. package/.docs/reference/migrations/mastra-cloud.md +9 -9
  97. package/.docs/reference/migrations/upgrade-to-v1/overview.md +1 -1
  98. package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +1 -1
  99. package/.docs/reference/processors/processor-interface.md +1 -1
  100. package/.docs/reference/processors/regex-filter-processor.md +3 -3
  101. package/.docs/reference/processors/token-cost-control.md +2 -2
  102. package/.docs/reference/processors/token-limiter-processor.md +1 -1
  103. package/.docs/reference/processors/tool-search-processor.md +1 -1
  104. package/.docs/reference/processors/working-memory-processor.md +1 -1
  105. package/.docs/reference/pubsub/base.md +2 -2
  106. package/.docs/reference/pubsub/lease-provider.md +2 -2
  107. package/.docs/reference/rag/vector-databases.md +33 -33
  108. package/.docs/reference/server/create-route.md +1 -1
  109. package/.docs/reference/signals/task-signal-provider.md +1 -1
  110. package/.docs/reference/storage/composite.md +1 -1
  111. package/.docs/reference/storage/retention.md +4 -4
  112. package/.docs/reference/streaming/ChunkType.md +1 -1
  113. package/.docs/reference/tools/isolated-vm-transport.md +1 -1
  114. package/.docs/reference/tools/mcp-client.md +2 -2
  115. package/.docs/reference/vectors/couchbase.md +1 -1
  116. package/.docs/reference/vectors/mongodb.md +2 -2
  117. package/.docs/reference/voice/overview.md +1 -1
  118. package/.docs/reference/workflows/workflow-methods/foreach.md +1 -1
  119. package/.docs/reference/workspace/platform-sandbox.md +3 -1
  120. package/.docs/reference/workspace/process-manager.md +1 -1
  121. package/.docs/reference/workspace/sandbox.md +20 -3
  122. package/.docs/reference/workspace/workspace-class.md +3 -3
  123. package/package.json +6 -7
  124. package/CHANGELOG.md +0 -5936
@@ -44,7 +44,7 @@ Task tracking requires a memory-backed thread (`threadId` + `resourceId`). Witho
44
44
 
45
45
  ### Agent integration
46
46
 
47
- These methods are called automatically by the Agent when the provider is passed to `signals`. You normally don't call them directly.
47
+ The Agent calls these methods automatically when the provider is passed to `signals`, so you normally don't call them directly.
48
48
 
49
49
  #### `getTools()`
50
50
 
@@ -255,7 +255,7 @@ const thread = await memoryStore?.getThreadById({ threadId: '...' })
255
255
 
256
256
  ## Closing connections
257
257
 
258
- `close()` releases the connections of the stores a composite was built from: the `default` and `editor` stores, plus any domain that owns its own client. Each store is closed once, even when it backs several domains. When passed to the Mastra class, `close()` is called by `shutdown()`:
258
+ `close()` releases connections for the stores used by a composite, including the `default` and `editor` stores and any domain with its own client. Each store closes once even if it backs several domains. When the composite is passed to the Mastra class, `shutdown()` calls `close()`:
259
259
 
260
260
  ```typescript
261
261
  import { MastraCompositeStore } from '@mastra/core/storage'
@@ -4,7 +4,7 @@
4
4
 
5
5
  # Storage retention
6
6
 
7
- Storage grows without bound by default. Retention is an opt-in, age-based cleanup system: you declare per-table `maxAge` policies in the `retention` config, then call `storage.prune()` to delete rows older than their configured age. Anything you don't configure is kept forever, so there is no behavior change until you opt in.
7
+ Because storage grows without bound by default, Mastra provides an opt-in, age-based retention system. Declare per-table `maxAge` policies in the `retention` config, then call `storage.prune()` to delete rows older than their configured age. Unconfigured data is kept forever, so behavior doesn't change until you opt in.
8
8
 
9
9
  `prune()` deletes rows. It caps growth and is safe to run against large tables (batched, bounded, resumable, cancellable). It never reclaims disk: on SQLite/libSQL the freed pages are reused by future writes so the file stops growing, but handing disk back to the OS (for example a `VACUUM`) is left to the underlying database and the operator to manage.
10
10
 
@@ -37,7 +37,7 @@ const storage = new LibSQLStore({
37
37
  const results = await storage.prune()
38
38
  ```
39
39
 
40
- `retention` is fully typed. Keys must be real domain keys, and each table key must be one the domain declares as retention-eligible. Passing the object straight into a store config type-checks it; if you build it standalone, use `satisfies RetentionConfig` so unknown domains or tables are compile errors:
40
+ `retention` is fully typed. Domain keys must exist, and their table keys must be declared retention-eligible. Store configs type-check objects passed directly. When building an object separately, use `satisfies RetentionConfig` so unknown domains or tables produce compile errors:
41
41
 
42
42
  ```typescript
43
43
  import type { RetentionConfig } from '@mastra/core/storage'
@@ -67,7 +67,7 @@ Set the `retention` field on the store config.
67
67
 
68
68
  ### Retention-eligible tables
69
69
 
70
- Each domain declares which of its tables can be age-pruned and which timestamp column anchors the comparison. The anchor is chosen so `maxAge` means what you'd expect for that data. Append-only logs use creation time, and live state uses last activity. Jobs and runs use completion time, so in-flight work is never pruned.
70
+ Each domain specifies its age-prunable tables and the timestamp column that anchors comparison, chosen so `maxAge` matches the meaning of the data. Append-only logs use creation time, live state uses last activity, and jobs or runs use completion time so in-flight work isn't pruned.
71
71
 
72
72
  | Domain | Table key | Anchor column | `maxAge` measures |
73
73
  | ----------------- | ------------------ | ---------------- | ---------------------------------------------------------------- |
@@ -158,7 +158,7 @@ interface PruneResult {
158
158
 
159
159
  ## Running prune on a schedule
160
160
 
161
- `prune()` has no built-in scheduler: you decide when it runs. Because it's bounded, a single call may not delete everything. When any result has `done: false`, eligible rows remain and you call again on the next tick. This keeps each invocation short and lets a large backlog drain over several runs.
161
+ `prune()` has no built-in scheduler, so you decide when it runs. A bounded call may leave eligible rows, indicated by any result with `done: false`. Call it again on the next tick. Short invocations let a large backlog drain over several runs.
162
162
 
163
163
  ```typescript
164
164
  // Runs on your own cron (node-cron, a workflow schedule, an external job, etc.).
@@ -354,7 +354,7 @@ Signals the completion of a processing step.
354
354
 
355
355
  ### raw
356
356
 
357
- Contains raw data from the provider. Content types Mastra doesn't recognize are also emitted as `raw` chunks rather than being discarded. Raw chunks only appear when `includeRawChunks` is enabled.
357
+ Contains raw data from the provider, including content types Mastra doesn't recognize, which are emitted as `raw` chunks rather than discarded. Raw chunks only appear when `includeRawChunks` is enabled.
358
358
 
359
359
  **type** (`"raw"`): Chunk type identifier
360
360
 
@@ -38,7 +38,7 @@ bun add @mastra/isolated-vm
38
38
 
39
39
  `isolated-vm` is a native addon. It provides prebuilt binaries for common platforms, so installation usually needs no extra setup. A C++ toolchain is only needed on platforms without a matching prebuild, where it falls back to compiling from source.
40
40
 
41
- On Node.js 20 and later, the host process must be started with the `--no-node-snapshot` flag, otherwise creating an isolate crashes the process. The constructor throws an error when the flag is missing. Pass the flag when starting your server, or set it through `NODE_OPTIONS`:
41
+ On Node.js 20 and later, creating an isolate crashes unless the host process starts with `--no-node-snapshot`. The constructor reports the missing flag as an error. Pass it when starting the server or through `NODE_OPTIONS`:
42
42
 
43
43
  ```bash
44
44
  NODE_OPTIONS=--no-node-snapshot npm run dev
@@ -349,7 +349,7 @@ console.log(instructionsByServer.db)
349
349
 
350
350
  ### `authenticate()`
351
351
 
352
- Runs the interactive OAuth authorization-code flow for a server configured with an `MCPOAuthClientProvider` whose redirect URL points at a loopback address. Starts a local callback server, delivers the authorization URL through the provider's `onRedirectToAuthorization` callback, waits for the browser to return the authorization code, exchanges it for tokens, and reconnects. See [Interactive browser authentication](#interactive-browser-authentication).
352
+ Runs the interactive OAuth authorization-code flow for a server whose `MCPOAuthClientProvider` uses a loopback redirect URL. A local callback server passes the authorization URL to the provider's `onRedirectToAuthorization` callback and waits for the browser to return the code. It then exchanges the code for tokens and reconnects. See [Interactive browser authentication](#interactive-browser-authentication).
353
353
 
354
354
  The optional `timeoutMs` bounds how long the flow waits for the browser to return the authorization code before rejecting, and defaults to 5 minutes.
355
355
 
@@ -1056,7 +1056,7 @@ try {
1056
1056
 
1057
1057
  Concurrent `authenticate()` calls for the same server join the pending flow. Different servers authenticate independently. With valid stored tokens the call reconnects without opening a browser.
1058
1058
 
1059
- Hosts that drive the flow themselves can capture the authorization code with the exported `createOAuthCallbackServer` helper, which binds a one-shot loopback server and validates the OAuth `state` parameter before resolving with the code. It creates a plain HTTP server, so it's only for local loopback redirects. Web applications that use an HTTPS redirect URL must host their own callback endpoint and drive the provider directly rather than using this helper:
1059
+ Hosts that drive the flow can capture the authorization code with the exported `createOAuthCallbackServer` helper. It creates a one-shot loopback server that validates the OAuth `state` parameter before resolving with the code. Because the server uses plain HTTP, use it only for local loopback redirects. Web applications with an HTTPS redirect URL must host their own callback endpoint and drive the provider directly:
1060
1060
 
1061
1061
  ```typescript
1062
1062
  import { createOAuthCallbackServer, getCallbackUrlCandidates } from '@mastra/mcp'
@@ -216,7 +216,7 @@ try {
216
216
 
217
217
  - **Index Deletion Caveat:** Deleting a Search index doesn't delete the vectors/documents in the associated Couchbase collection. Data remains unless explicitly removed.
218
218
  - **Required Permissions:** The Couchbase user must have permissions to connect, read/write documents in the target collection (`kv` role), and manage Search Indexes (`search_admin` role on the relevant bucket/scope).
219
- - **Index Definition Details & Document Structure:** The `createIndex` method constructs a Search Index definition that indexes the `embedding` field (as type `vector`) and the `content` field (as type `text`), targeting documents within the specified `scopeName.collectionName`. Each document stores the vector in the `embedding` field and metadata in the `metadata` field. If `metadata` contains a `text` property, its value is also copied to a top-level `content` field, which is indexed for text search.
219
+ - **Index Definition Details & Document Structure:** The `createIndex` method builds a Search Index definition for documents in `scopeName.collectionName`. It indexes the `embedding` field as a vector and the `content` field as text. Each document stores its vector in `embedding`, with metadata kept in `metadata`. A `text` property within `metadata` is also copied to the top-level `content` field for text search.
220
220
  - **Replication & Durability:** Consider using Couchbase's built-in replication and persistence features for data durability. Monitor index statistics regularly to ensure efficient search.
221
221
 
222
222
  ## Limitations
@@ -222,7 +222,7 @@ const results = await store.textQuery({
222
222
 
223
223
  ### `hybridQuery()`
224
224
 
225
- Runs a hybrid search that fuses vector similarity and full-text results using MongoDB's server-side `$rankFusion`. It requires MongoDB >= 8.0 and is generally available from 8.1. On 8.0.x, it may require a MongoDB support case for enablement. It runs where enabled, including MongoDB Atlas 8.0.x. A full-text search index must exist: it's auto-created for managed indexes, but for a bring-your-own collection you must call `createSearchIndex()` first (opt-in).
225
+ Runs a hybrid search that fuses vector similarity with full-text results through MongoDB's server-side `$rankFusion`. The feature requires MongoDB 8.0 or later and is generally available from 8.1. MongoDB Atlas 8.0.x supports it where enabled, although enablement may require a support case. A full-text search index must exist. Managed indexes create one automatically, while bring-your-own collections require an explicit `createSearchIndex()` call.
226
226
 
227
227
  **indexName** (`string`): Name of the Mastra index to search
228
228
 
@@ -255,7 +255,7 @@ const results = await store.hybridQuery({
255
255
  })
256
256
  ```
257
257
 
258
- `hybridQuery()` requires MongoDB >= 8.0 for the `$rankFusion` stage. The stage is generally available from 8.1. On 8.0.x, it may need a MongoDB support case to enable and runs where enabled, such as MongoDB Atlas 8.0.x. If you're running an older version, or `$rankFusion` isn't enabled on your 8.0.x deployment, use `query()` and `textQuery()` separately and merge the results client-side.
258
+ `hybridQuery()` requires MongoDB 8.0 or later for the `$rankFusion` stage, which is generally available from 8.1. On 8.0.x, the stage runs where enabled, including MongoDB Atlas, but enablement may require a support case. If your deployment is older or lacks `$rankFusion`, run `query()` and `textQuery()` separately before merging the results client-side.
259
259
 
260
260
  ### `describeIndex()`
261
261
 
@@ -1090,7 +1090,7 @@ const voice = new CompositeVoice({
1090
1090
  output: elevenlabs.speech('eleven_turbo_v2'), // AI SDK speech
1091
1091
  })
1092
1092
 
1093
- // Works seamlessly with your agent
1093
+ // Works directly with your agent
1094
1094
  const voiceAgent = new Agent({
1095
1095
  id: 'aisdk-voice-agent',
1096
1096
  name: 'AI SDK Voice Agent',
@@ -26,7 +26,7 @@ workflow.foreach(step1, { concurrency: 2 })
26
26
 
27
27
  ### Execution and waiting
28
28
 
29
- The `.foreach()` method processes all items before the next step executes. The step following `.foreach()` only runs after every iteration has completed, regardless of concurrency settings. With `concurrency: 1` (default), items process sequentially. With higher concurrency, items process in parallel batches, but the next step still waits for all batches to finish.
29
+ The `.foreach()` method processes every item before the next step executes, regardless of concurrency settings. The default `concurrency: 1` processes items sequentially. Higher values use parallel batches, but the next step still waits for every batch to finish.
30
30
 
31
31
  If you need to run multiple operations per item, use a nested workflow as the step. This keeps all operations for each item together and is cleaner than chaining multiple `.foreach()` calls. See [Nested workflows inside foreach](https://mastra.ai/docs/workflows/control-flow) for examples.
32
32
 
@@ -175,7 +175,7 @@ await sandbox.start()
175
175
 
176
176
  `createRepoTemplate()` accepts the same `cpuCount` and `memoryMB` sizing as the `Template()` builder methods, as plain options. They carry the identity and stale-fallback semantics described above. Omit them for the provider defaults.
177
177
 
178
- `getRepositoryAccess` mirrors the resolver a Factory sandbox context carries, so a host can pass its context straight through; when it's absent, `createRepoTemplate()` returns `undefined` and the sandbox boots the provider default. The resolver doesn't run when `PlatformSandbox` reattaches to an existing `sandboxId`. It resolves the repository's default-branch head at fresh-start time, then Platform starts or reuses the corresponding template build. If the repository head can't be resolved or the provider build fails, sandbox creation continues with the provider's default template so runtime setup can perform a cold checkout. For private repositories, the short-lived authorization token is sent as an ephemeral build environment value that stays out of the serialized definition and the persisted template record. It has no effect on content identity.
178
+ `getRepositoryAccess` mirrors the resolver a Factory sandbox context carries, so a host can pass its context straight through; when it's absent, `createRepoTemplate()` returns `undefined` and the sandbox boots the provider default. The resolver skips reattachment to an existing `sandboxId`; on a fresh start, it resolves the repository's default-branch head before Platform starts or reuses the corresponding template build. If the repository head can't be resolved or the provider build fails, sandbox creation continues with the provider's default template so runtime setup can perform a cold checkout. For private repositories, the short-lived authorization token is sent as an ephemeral build environment value that stays out of the serialized definition and the persisted template record. It has no effect on content identity.
179
179
 
180
180
  `createRepoTemplate()` also attaches a commit-independent `family` key (`repo:<cloneUrl>:<workdir>`, with the workdir derived from the clone URL) to the definition. `family` groups successive builds of the "same thing", so every commit of the same repository belongs to the same family. Platform uses it to find a prior ready build in the same family and boot the new commit on that warm filesystem while the exact commit template builds in the background. For E2B, stale lookup is also partitioned by the effective CPU and memory settings so a fallback can't silently change the requested machine size. Callers using the raw `Template()` builder can attach their own family key with `.withFamily(key)` (any non-empty string up to 200 characters). Omit it to opt out of family fallback. The family key never influences the content-addressed template identity: two definitions that differ only in `family` share the same cache slot.
181
181
 
@@ -289,6 +289,8 @@ console.log(result.exitCode)
289
289
 
290
290
  **env** (`Record<string, string>`): Environment variables baked into the sandbox at creation time. Per-command environment variables can also be passed to executeCommand.
291
291
 
292
+ **workingDirectory** (`string`): Default directory for command execution when no per-command cwd is given. A per-command cwd always wins. Use an absolute path.
293
+
292
294
  **timeout** (`number`): Default command execution timeout in milliseconds. Overridable per call via ExecuteCommandOptions.timeout.
293
295
 
294
296
  **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.
@@ -60,7 +60,7 @@ const handle = await sandbox.processes.spawn('npm run dev', {
60
60
 
61
61
  **options.env** (`NodeJS.ProcessEnv`): Environment variables for the process.
62
62
 
63
- **options.cwd** (`string`): Working directory for the process.
63
+ **options.cwd** (`string`): Working directory for the process. Defaults to the sandbox's configured workingDirectory, then the provider default.
64
64
 
65
65
  **options.onStdout** (`(data: string) => void`): Callback for stdout chunks. Called as data arrives.
66
66
 
@@ -41,7 +41,7 @@ Provider implementations plug into the start lifecycle at one of three rungs; th
41
41
  2. **`start()` override returning `SandboxStartResult`**: for providers whose API is a fused get-or-create where decomposition would add round-trips (`PlatformSandbox`, `RailwaySandbox`).
42
42
  3. **`start()` override returning `void`**: legacy providers, where the outcome is unknown.
43
43
 
44
- Concurrent `start()` calls on one instance coalesce onto a single in-flight attempt, and joined callers share that attempt's result (all observe `outcome: 'created'` when the shared attempt created the VM). The in-flight slot is cleared when the attempt settles, so a failed start can be retried. While the sandbox is already `running`, `start()` resolves `{ outcome: 'connected' }` without re-invoking the provider.
44
+ Concurrent `start()` calls on one instance coalesce onto a single in-flight attempt, and joined callers share that attempt's result (all observe `outcome: 'created'` when the shared attempt created the VM). The in-flight slot is cleared when the attempt settles, so a failed start can be retried. For a sandbox already in the `running` state, `start()` resolves `{ outcome: 'connected' }` without re-invoking the provider.
45
45
 
46
46
  The result is also forwarded to the `onStart` lifecycle hook as `{ sandbox, outcome }`.
47
47
 
@@ -94,6 +94,23 @@ Semantics:
94
94
  - Each call wraps the current hook, so attach once per sandbox instance. Attaching on a path that runs per request stacks duplicate work on every start.
95
95
  - Only starts that begin after the call see the new hook.
96
96
 
97
+ ### `workingDirectory` (constructor option)
98
+
99
+ Sets the default directory for command execution and process spawns. When a command provides no per-command `cwd`, the sandbox runs it from this directory. A per-command `cwd` always wins. When neither is provided, each provider keeps its own default (E2B home, Docker `/workspace`, Vercel serverless `/tmp`, and so on).
100
+
101
+ ```typescript
102
+ const sandbox = new E2BSandbox({ workingDirectory: '/home/user/my-repo' })
103
+ await sandbox.executeCommand('pwd') // /home/user/my-repo
104
+ await sandbox.executeCommand('pwd', [], { cwd: '/tmp' }) // /tmp
105
+ ```
106
+
107
+ The effective value is readable through the `sandbox.workingDirectory` getter. Providers that compute their value, such as Daytona's automatic probe or Docker's `/workspace` default, report the effective directory through the same getter.
108
+
109
+ Semantics:
110
+
111
+ - The value passes to the provider as-is, and the sandbox doesn't create the directory. Absolute paths are recommended: `~`-prefixed paths only work where the provider documents expansion.
112
+ - Some providers keep earlier option names as deprecated aliases feeding the same field: `workingDir` on Docker and Apple container, `workdir` on Modal. When both the alias and `workingDirectory` are set, `workingDirectory` wins.
113
+
97
114
  ### `stop()`
98
115
 
99
116
  Stop the sandbox.
@@ -139,7 +156,7 @@ const result = await sandbox.executeCommand('npm', ['install', 'lodash'])
139
156
 
140
157
  **options.timeout** (`number`): Execution timeout in milliseconds
141
158
 
142
- **options.cwd** (`string`): Working directory for the command
159
+ **options.cwd** (`string`): Working directory for this command. Defaults to the sandbox's configured workingDirectory, then the provider default.
143
160
 
144
161
  **options.env** (`Record<string, string>`): Additional environment variables for this command. These take precedence over the sandbox environment for this command execution only.
145
162
 
@@ -167,7 +184,7 @@ The runtime environment applies to commands executed through the sandbox rather
167
184
 
168
185
  ### `getEnv()`
169
186
 
170
- Returns a copy of the sandbox's current runtime environment. Mutating the returned object doesn't change the sandbox, so use `setEnv()` for updates.
187
+ Returns a copy of the sandbox's current runtime environment; because mutations to the returned object don't change the sandbox, use `setEnv()` for updates.
171
188
 
172
189
  ```typescript
173
190
  const token = sandbox.getEnv().GH_TOKEN
@@ -243,7 +243,7 @@ Stop the workspace's live resources without destroying them.
243
243
  await workspace.stop()
244
244
  ```
245
245
 
246
- `stop()` shuts down language servers and closes the browser, then stops the sandbox provider. Remote sandbox providers suspend or pause the sandbox so it can resume later. `LocalSandbox` kills its background processes and unmounts filesystems. Stopping isn't a teardown. The filesystem, search index, and skills keep working, and the next sandbox operation starts the sandbox again.
246
+ `stop()` shuts down language servers and the browser before stopping the sandbox provider. Remote providers suspend or pause the sandbox for later resumption, while `LocalSandbox` kills background processes and unmounts filesystems. Stopping isn't a teardown. The filesystem and search index remain available along with skills, and the next sandbox operation starts the sandbox again.
247
247
 
248
248
  `mastra.shutdown()` calls `stop()` for registered workspaces, so a process restart suspends remote sandboxes instead of deleting them. To fully tear a workspace down, call `destroy()` or `mastra.removeWorkspace(id, { destroy: true })` explicitly.
249
249
 
@@ -390,7 +390,7 @@ if (workspace.hasFilesystemConfig()) {
390
390
 
391
391
  #### `resolveFilesystem({ requestContext })`
392
392
 
393
- Resolve the filesystem for a request context. When a resolver function is configured, calls it with the provided `requestContext`. When a static filesystem is configured, returns it directly. Returns `undefined` if no filesystem is configured.
393
+ Resolve the filesystem for a request context by calling a configured resolver with `requestContext` or returning a configured static filesystem directly. Returns `undefined` when no filesystem is configured.
394
394
 
395
395
  ```typescript
396
396
  import { RequestContext } from '@mastra/core/request-context'
@@ -421,7 +421,7 @@ if (workspace.hasSandboxConfig()) {
421
421
 
422
422
  #### `resolveSandbox({ requestContext })`
423
423
 
424
- Resolve the sandbox for a request context. When a resolver function is configured, calls it with the provided `requestContext`. When a static sandbox is configured, returns it directly. Returns `undefined` if no sandbox is configured.
424
+ Resolve the sandbox for a request context by calling a configured resolver with `requestContext` or returning a configured static sandbox directly. Returns `undefined` when no sandbox is configured.
425
425
 
426
426
  ```typescript
427
427
  import { RequestContext } from '@mastra/core/request-context'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.2.23-alpha.6",
3
+ "version": "1.2.23-alpha.8",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -8,8 +8,7 @@
8
8
  "files": [
9
9
  "dist",
10
10
  ".docs",
11
- "README.md",
12
- "CHANGELOG.md"
11
+ "README.md"
13
12
  ],
14
13
  "exports": {
15
14
  ".": {
@@ -28,8 +27,8 @@
28
27
  "jsdom": "^26.1.0",
29
28
  "local-pkg": "^1.1.2",
30
29
  "zod": "^4.4.3",
31
- "@mastra/mcp": "^1.17.2",
32
- "@mastra/core": "1.63.3-alpha.1"
30
+ "@mastra/core": "1.64.0-alpha.2",
31
+ "@mastra/mcp": "^1.17.3-alpha.0"
33
32
  },
34
33
  "devDependencies": {
35
34
  "@hono/node-server": "^2.0.0",
@@ -46,8 +45,8 @@
46
45
  "typescript": "^7.0.2",
47
46
  "vitest": "4.1.10",
48
47
  "@internal/lint": "0.0.129",
49
- "@internal/types-builder": "0.0.104",
50
- "@mastra/core": "1.63.3-alpha.1"
48
+ "@mastra/core": "1.64.0-alpha.2",
49
+ "@internal/types-builder": "0.0.104"
51
50
  },
52
51
  "homepage": "https://mastra.ai",
53
52
  "repository": {