@mastra/mcp-docs-server 1.2.23-alpha.1 → 1.2.23-alpha.10

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 (168) 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 +16 -16
  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 +3 -4
  13. package/.docs/docs/evals/multi-turn.md +1 -1
  14. package/.docs/docs/evals/overview.md +11 -11
  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 +49 -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/overview.md +10 -11
  24. package/.docs/docs/harness/schedules.md +1 -1
  25. package/.docs/docs/harness/signal-providers.md +1 -1
  26. package/.docs/docs/harness/signals.md +1 -1
  27. package/.docs/docs/index.md +1 -1
  28. package/.docs/docs/mastra-platform/deploy.md +15 -15
  29. package/.docs/docs/mastra-platform/environments.md +2 -2
  30. package/.docs/docs/mastra-platform/github.md +2 -2
  31. package/.docs/docs/mastra-platform/regions.md +1 -1
  32. package/.docs/docs/mastra-platform/server.md +4 -4
  33. package/.docs/docs/mastra-platform/studio.md +1 -1
  34. package/.docs/docs/mastra-platform/trace-intelligence.md +1 -1
  35. package/.docs/docs/mastra-platform/workspaces.md +1 -1
  36. package/.docs/docs/memory/message-history.md +3 -3
  37. package/.docs/docs/memory/observational-memory.md +18 -18
  38. package/.docs/docs/memory/overview.md +1 -1
  39. package/.docs/docs/memory/semantic-recall.md +0 -2
  40. package/.docs/docs/memory/working-memory.md +1 -1
  41. package/.docs/docs/observability/feedback.md +2 -2
  42. package/.docs/docs/observability/integrations/exporters/mastra-storage.md +1 -1
  43. package/.docs/docs/observability/logging.md +1 -1
  44. package/.docs/docs/observability/metrics/overview.md +1 -1
  45. package/.docs/docs/observability/overview.md +13 -11
  46. package/.docs/docs/observability/tracing/overview.md +13 -13
  47. package/.docs/docs/sandbox/lsp.md +1 -1
  48. package/.docs/docs/sandbox/overview.md +1 -1
  49. package/.docs/docs/server/mastra-client.md +1 -1
  50. package/.docs/docs/server/overview.md +1 -1
  51. package/.docs/docs/server/pubsub.md +1 -1
  52. package/.docs/docs/server/request-context.md +2 -2
  53. package/.docs/docs/server/server-adapters.md +1 -1
  54. package/.docs/docs/skills.md +1 -1
  55. package/.docs/docs/studio/deployment.md +1 -1
  56. package/.docs/docs/studio/editor.md +1 -1
  57. package/.docs/docs/studio/observability.md +2 -2
  58. package/.docs/docs/studio/overview.md +1 -1
  59. package/.docs/docs/subagents.md +2 -2
  60. package/.docs/docs/workflows/agents-and-tools.md +0 -4
  61. package/.docs/docs/workflows/control-flow.md +1 -3
  62. package/.docs/docs/workflows/overview.md +1 -1
  63. package/.docs/docs/workflows/scheduled-workflows.md +1 -1
  64. package/.docs/docs/workflows/suspend-and-resume.md +2 -2
  65. package/.docs/integrations/sandboxes/agentcore.md +2 -0
  66. package/.docs/integrations/sandboxes/apple-container.md +5 -3
  67. package/.docs/integrations/sandboxes/blaxel.md +2 -0
  68. package/.docs/integrations/sandboxes/cloudflare-sandbox.md +1 -1
  69. package/.docs/integrations/sandboxes/daytona.md +2 -0
  70. package/.docs/integrations/sandboxes/docker.md +3 -1
  71. package/.docs/integrations/sandboxes/e2b.md +4 -0
  72. package/.docs/integrations/sandboxes/modal.md +3 -1
  73. package/.docs/integrations/sandboxes/railway.md +2 -0
  74. package/.docs/integrations/sandboxes/vercel.md +4 -0
  75. package/.docs/models/environment-variables.md +5 -0
  76. package/.docs/models/gateways/merge-gateway.md +2 -1
  77. package/.docs/models/gateways/netlify.md +6 -2
  78. package/.docs/models/gateways/openrouter.md +3 -5
  79. package/.docs/models/gateways/vercel.md +4 -1
  80. package/.docs/models/index.md +1 -1
  81. package/.docs/models/providers/abliteration-ai.md +7 -6
  82. package/.docs/models/providers/above.md +83 -0
  83. package/.docs/models/providers/aiand.md +4 -2
  84. package/.docs/models/providers/anthropic.md +2 -1
  85. package/.docs/models/providers/berget.md +4 -2
  86. package/.docs/models/providers/bothub.md +76 -0
  87. package/.docs/models/providers/chutes.md +1 -1
  88. package/.docs/models/providers/coralbricks.md +4 -4
  89. package/.docs/models/providers/cortecs.md +3 -3
  90. package/.docs/models/providers/crossmodel.md +4 -3
  91. package/.docs/models/providers/edenai.md +8 -6
  92. package/.docs/models/providers/empiriolabs.md +1 -2
  93. package/.docs/models/providers/fireworks-ai.md +2 -1
  94. package/.docs/models/providers/friendli.md +3 -2
  95. package/.docs/models/providers/google.md +1 -2
  96. package/.docs/models/providers/groq.md +2 -1
  97. package/.docs/models/providers/hyper.md +8 -6
  98. package/.docs/models/providers/iteracompute.md +8 -7
  99. package/.docs/models/providers/kilo.md +29 -32
  100. package/.docs/models/providers/klokintegration.md +77 -0
  101. package/.docs/models/providers/llmgateway-providers.md +2 -26
  102. package/.docs/models/providers/llmgateway.md +3 -14
  103. package/.docs/models/providers/nano-gpt.md +75 -92
  104. package/.docs/models/providers/neuralwatt.md +2 -1
  105. package/.docs/models/providers/ollama-cloud.md +2 -1
  106. package/.docs/models/providers/opencode-go.md +1 -1
  107. package/.docs/models/providers/opencode.md +2 -2
  108. package/.docs/models/providers/orcarouter.md +3 -2
  109. package/.docs/models/providers/requesty.md +5 -7
  110. package/.docs/models/providers/sensenova.md +77 -0
  111. package/.docs/models/providers/synthetic.md +3 -2
  112. package/.docs/models/providers/tokenrouter.md +75 -0
  113. package/.docs/models/providers/trustedrouter.md +13 -13
  114. package/.docs/models/providers/vancine.md +13 -11
  115. package/.docs/models/providers.md +5 -0
  116. package/.docs/reference/agent-controller/agent-controller-class.md +2 -2
  117. package/.docs/reference/agent-controller/session.md +3 -3
  118. package/.docs/reference/agents/durable-agent.md +77 -9
  119. package/.docs/reference/agents/getDefaultGenerateOptions.md +1 -1
  120. package/.docs/reference/agents/listSuspendedRuns.md +2 -2
  121. package/.docs/reference/ai-sdk/chat-route.md +1 -1
  122. package/.docs/reference/ai-sdk/network-route.md +1 -1
  123. package/.docs/reference/ai-sdk/workflow-route.md +1 -1
  124. package/.docs/reference/browser/browser-viewer.md +1 -1
  125. package/.docs/reference/cli/mastra.md +4 -4
  126. package/.docs/reference/core/mastra-class.md +1 -1
  127. package/.docs/reference/datasets/createExperiment.md +1 -1
  128. package/.docs/reference/editor/tool-provider.md +1 -1
  129. package/.docs/reference/editor/versioning.md +1 -1
  130. package/.docs/reference/evals/multi-turn-judge.md +1 -1
  131. package/.docs/reference/evals/rubric.md +1 -1
  132. package/.docs/reference/file-based-agents/schedules.md +2 -2
  133. package/.docs/reference/file-based-agents/workspace.md +1 -1
  134. package/.docs/reference/manual-install.md +3 -3
  135. package/.docs/reference/memory/observational-memory.md +4 -4
  136. package/.docs/reference/memory/settled.md +1 -1
  137. package/.docs/reference/migrations/mastra-cloud.md +9 -9
  138. package/.docs/reference/migrations/upgrade-to-v1/overview.md +1 -1
  139. package/.docs/reference/observability/tracing/configuration.md +2 -2
  140. package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +1 -1
  141. package/.docs/reference/processors/processor-interface.md +1 -1
  142. package/.docs/reference/processors/regex-filter-processor.md +3 -3
  143. package/.docs/reference/processors/token-cost-control.md +2 -2
  144. package/.docs/reference/processors/token-limiter-processor.md +1 -1
  145. package/.docs/reference/processors/tool-search-processor.md +1 -1
  146. package/.docs/reference/processors/working-memory-processor.md +1 -1
  147. package/.docs/reference/pubsub/base.md +2 -2
  148. package/.docs/reference/pubsub/lease-provider.md +2 -2
  149. package/.docs/reference/rag/vector-databases.md +33 -33
  150. package/.docs/reference/server/create-route.md +1 -1
  151. package/.docs/reference/signals/task-signal-provider.md +1 -1
  152. package/.docs/reference/storage/composite.md +1 -1
  153. package/.docs/reference/storage/retention.md +4 -4
  154. package/.docs/reference/streaming/ChunkType.md +1 -1
  155. package/.docs/reference/tools/isolated-vm-transport.md +1 -1
  156. package/.docs/reference/tools/mcp-client.md +2 -2
  157. package/.docs/reference/vectors/couchbase.md +1 -1
  158. package/.docs/reference/vectors/mongodb.md +2 -2
  159. package/.docs/reference/voice/overview.md +1 -1
  160. package/.docs/reference/workflows/workflow-methods/agent.md +4 -4
  161. package/.docs/reference/workflows/workflow-methods/foreach.md +1 -1
  162. package/.docs/reference/workflows/workflow-methods/tool.md +2 -2
  163. package/.docs/reference/workspace/platform-sandbox.md +6 -2
  164. package/.docs/reference/workspace/process-manager.md +1 -1
  165. package/.docs/reference/workspace/sandbox.md +20 -3
  166. package/.docs/reference/workspace/workspace-class.md +3 -3
  167. package/package.json +5 -6
  168. package/CHANGELOG.md +0 -5929
@@ -35,11 +35,11 @@ MongoDB Vector Search is a good solution for teams who want to consolidate vecto
35
35
 
36
36
  ### Using VoyageAI with MongoDB
37
37
 
38
- MongoDB works seamlessly with VoyageAI's embedding models, which are optimized for retrieval tasks. For complete examples and specialized models, see the [VoyageAI embeddings documentation](https://mastra.ai/models/embeddings) and [MongoDB vector reference](https://mastra.ai/reference/vectors/mongodb).
38
+ MongoDB works directly with VoyageAI's embedding models, which are optimized for retrieval tasks. For complete examples and specialized models, see the [VoyageAI embeddings documentation](https://mastra.ai/models/embeddings) and [MongoDB vector reference](https://mastra.ai/reference/vectors/mongodb).
39
39
 
40
40
  ### Hybrid Search (Vector + Full-Text)
41
41
 
42
- MongoDB supports hybrid search that fuses vector similarity with BM25 full-text search using server-side `$rankFusion` (requires MongoDB >= 8.0; generally available from 8.1, and enabled on MongoDB Atlas 8.0.x). This is useful when you want to combine semantic and keyword-based retrieval:
42
+ MongoDB supports hybrid search that combines vector similarity with BM25 full-text search through server-side `$rankFusion`. It requires MongoDB 8.0 or later, is generally available from 8.1, and is enabled on MongoDB Atlas 8.0.x. Use it to combine semantic retrieval with keyword-based results:
43
43
 
44
44
  ```ts
45
45
  await store.createSearchIndex({ indexName: 'myCollection', fields: ['text'] })
@@ -107,7 +107,7 @@ await store.upsert({
107
107
 
108
108
  ### Using Oracle Database Vector Search
109
109
 
110
- OracleDB stores embeddings in native `VECTOR` columns and metadata in Oracle JSON. Exact search is the default; HNSW and IVF indexes can be configured for tuned deployments.
110
+ OracleDB stores embeddings in native `VECTOR` columns and metadata in Oracle JSON. Exact search is the default. HNSW and IVF indexes can be configured for tuned deployments.
111
111
 
112
112
  **Pinecone**:
113
113
 
@@ -239,8 +239,8 @@ const store = new UpstashVector({
239
239
  token: process.env.UPSTASH_TOKEN,
240
240
  })
241
241
 
242
- // There is no store.createIndex call here, Upstash creates indexes (known as namespaces in Upstash) automatically
243
- // when you upsert if that namespace does not exist yet.
242
+ // Upstash creates indexes (known as namespaces) automatically, so no store.createIndex call is needed here
243
+ // when you upsert if that namespace doesn't exist yet.
244
244
  await store.upsert({
245
245
  indexName: 'myCollection', // the namespace name in Upstash
246
246
  vectors: embeddings,
@@ -426,20 +426,20 @@ Collection and index names must:
426
426
 
427
427
  - Start with a letter or underscore
428
428
  - Be up to 120 bytes long
429
- - Contain only letters, numbers, underscores, or dots
430
- - Cannot contain `$` or the null character
429
+ - Contain only letters, numbers, underscore characters, or dots
430
+ - Can't contain `$` or the null character
431
431
  - Example: `my_collection.123` is valid
432
- - Example: `my-index` is not valid (contains hyphen)
433
- - Example: `My$Collection` is not valid (contains `$`)
432
+ - Example: `my-index` isn't valid (contains hyphen)
433
+ - Example: `My$Collection` isn't valid (contains `$`)
434
434
 
435
435
  **PgVector**:
436
436
 
437
437
  Index names must:
438
438
 
439
439
  - Start with a letter or underscore
440
- - Contain only letters, numbers, and underscores
440
+ - Contain only letters, numbers, and underscore characters
441
441
  - Example: `my_index_123` is valid
442
- - Example: `my-index` is not valid (contains hyphen)
442
+ - Example: `my-index` isn't valid (contains hyphen)
443
443
 
444
444
  **OracleDB**:
445
445
 
@@ -466,7 +466,7 @@ Index names must:
466
466
  - Have a combined length (with project ID) under 52 characters
467
467
 
468
468
  - Example: `my-index-123` is valid
469
- - Example: `my.index` is not valid (contains dot)
469
+ - Example: `my.index` isn't valid (contains dot)
470
470
 
471
471
  **Qdrant**:
472
472
 
@@ -482,7 +482,7 @@ Collection names must:
482
482
 
483
483
  - Example: `my_collection_123` is valid
484
484
 
485
- - Example: `my/collection` is not valid (contains slash)
485
+ - Example: `my/collection` isn't valid (contains slash)
486
486
 
487
487
  **Chroma**:
488
488
 
@@ -490,11 +490,11 @@ Collection names must:
490
490
 
491
491
  - Be 3-63 characters long
492
492
  - Start and end with a letter or number
493
- - Contain only letters, numbers, underscores, or hyphens
493
+ - Contain only letters, numbers, underscore characters, or hyphens
494
494
  - Not contain consecutive periods (..)
495
495
  - Not be a valid IPv4 address
496
496
  - Example: `my-collection-123` is valid
497
- - Example: `my..collection` is not valid (consecutive periods)
497
+ - Example: `my..collection` isn't valid (consecutive periods)
498
498
 
499
499
  **Astra**:
500
500
 
@@ -502,18 +502,18 @@ Collection names must:
502
502
 
503
503
  - Not be empty
504
504
  - Be 48 characters or less
505
- - Contain only letters, numbers, and underscores
505
+ - Contain only letters, numbers, and `_` characters
506
506
  - Example: `my_collection_123` is valid
507
- - Example: `my-collection` is not valid (contains hyphen)
507
+ - Example: `my-collection` isn't valid (contains hyphen)
508
508
 
509
509
  **libSQL**:
510
510
 
511
511
  Index names must:
512
512
 
513
513
  - Start with a letter or underscore
514
- - Contain only letters, numbers, and underscores
514
+ - Contain only letters, numbers, and `_` characters
515
515
  - Example: `my_index_123` is valid
516
- - Example: `my-index` is not valid (contains hyphen)
516
+ - Example: `my-index` isn't valid (contains hyphen)
517
517
 
518
518
  **Upstash**:
519
519
 
@@ -532,7 +532,7 @@ Namespace names must:
532
532
 
533
533
  - Example: `MyNamespace123` is valid
534
534
 
535
- - Example: `_namespace` is not valid (starts with underscore)
535
+ - Example: `_namespace` isn't valid (starts with underscore)
536
536
 
537
537
  **Cloudflare**:
538
538
 
@@ -543,19 +543,19 @@ Index names must:
543
543
  - Contain only lowercase ASCII letters, numbers, and dashes
544
544
  - Use dashes instead of spaces
545
545
  - Example: `my-index-123` is valid
546
- - Example: `My_Index` is not valid (uppercase and underscore)
546
+ - Example: `My_Index` isn't valid (uppercase and underscore)
547
547
 
548
548
  **OpenSearch**:
549
549
 
550
550
  Index names must:
551
551
 
552
552
  - Use only lowercase letters
553
- - Not begin with underscores or hyphens
553
+ - Not begin with underscore characters or hyphens
554
554
  - Not contain spaces, commas
555
555
  - Not contain special characters (e.g. `:`, `"`, `*`, `+`, `/`, `\`, `|`, `?`, `#`, `>`, `<`)
556
556
  - Example: `my-index-123` is valid
557
- - Example: `My_Index` is not valid (contains uppercase letters)
558
- - Example: `_myindex` is not valid (begins with underscore)
557
+ - Example: `My_Index` isn't valid (contains uppercase letters)
558
+ - Example: `_myindex` isn't valid (begins with underscore)
559
559
 
560
560
  **Elasticsearch**:
561
561
 
@@ -563,29 +563,29 @@ Index names must:
563
563
 
564
564
  - Use only lowercase letters
565
565
  - Not exceed 255 bytes (counting multi-byte characters)
566
- - Not begin with underscores, hyphens, or plus signs
566
+ - Not begin with underscore characters, hyphens, or plus signs
567
567
  - Not contain spaces, commas
568
568
  - Not contain special characters (e.g. `:`, `"`, `*`, `+`, `/`, `\`, `|`, `?`, `#`, `>`, `<`)
569
569
  - Not be "." or ".."
570
570
  - Not start with "." (deprecated except for system/hidden indices)
571
571
  - Example: `my-index-123` is valid
572
- - Example: `My_Index` is not valid (contains uppercase letters)
573
- - Example: `_myindex` is not valid (begins with underscore)
574
- - Example: `.myindex` is not valid (begins with dot, deprecated)
572
+ - Example: `My_Index` isn't valid (contains uppercase letters)
573
+ - Example: `_myindex` isn't valid (begins with underscore)
574
+ - Example: `.myindex` isn't valid (begins with dot, deprecated)
575
575
 
576
576
  **S3 Vectors**:
577
577
 
578
578
  Index names must:
579
579
 
580
580
  - Be unique within the same vector bucket
581
- - Be 3–63 characters long
581
+ - Be between 3 and 63 characters long
582
582
  - Use only lowercase letters (`a–z`), numbers (`0–9`), hyphens (`-`), and dots (`.`)
583
583
  - Begin and end with a letter or number
584
584
  - Example: `my-index.123` is valid
585
- - Example: `my_index` is not valid (contains underscore)
586
- - Example: `-myindex` is not valid (begins with hyphen)
587
- - Example: `myindex-` is not valid (ends with hyphen)
588
- - Example: `MyIndex` is not valid (contains uppercase letters)
585
+ - Example: `my_index` isn't valid (contains underscore)
586
+ - Example: `-myindex` isn't valid (begins with hyphen)
587
+ - Example: `myindex-` isn't valid (ends with hyphen)
588
+ - Example: `MyIndex` isn't valid (contains uppercase letters)
589
589
 
590
590
  ### Upserting Embeddings
591
591
 
@@ -80,7 +80,7 @@ Returns a `ServerRoute` object that can be registered with an adapter or passed
80
80
 
81
81
  ### Register through `server.apiRoutes`
82
82
 
83
- Routes created with `createRoute()` can be passed to `server.apiRoutes`. The adapter registers them with runtime validation, typed handler parameters, and generated OpenAPI metadata. See [Custom API routes](https://mastra.ai/docs/server/custom-api-routes) for details.
83
+ Routes created with `createRoute()` can be passed to `server.apiRoutes`, where the adapter adds runtime validation and typed handler parameters while generating OpenAPI metadata. See [Custom API routes](https://mastra.ai/docs/server/custom-api-routes) for details.
84
84
 
85
85
  ```typescript
86
86
  import { Mastra } from '@mastra/core'
@@ -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',
@@ -12,9 +12,9 @@ Unlike wrapping an agent with `createStep()`, `.agent()` records a declarative e
12
12
 
13
13
  ```typescript
14
14
  workflow
15
- .map({ prompt: mapVariable({ initData: workflow, path: "topic" }) })
15
+ .map({ prompt: mapVariable({ initData: workflow, path: 'topic' }) })
16
16
  .agent(testAgent)
17
- .commit();
17
+ .commit()
18
18
  ```
19
19
 
20
20
  ## Parameters
@@ -42,7 +42,7 @@ workflow
42
42
  }),
43
43
  },
44
44
  })
45
- .commit();
45
+ .commit()
46
46
  ```
47
47
 
48
48
  ## Referencing an agent by ID
@@ -50,7 +50,7 @@ workflow
50
50
  Pass a string to reference a registered agent without importing it. The agent must be registered on the Mastra instance when the workflow runs:
51
51
 
52
52
  ```typescript
53
- workflow.agent("test-agent", { maxSteps: 3 }).commit();
53
+ workflow.agent('test-agent', { maxSteps: 3 }).commit()
54
54
  ```
55
55
 
56
56
  ## Persisting agent steps
@@ -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
 
@@ -11,7 +11,7 @@ Unlike wrapping a tool with `createStep()`, `.tool()` records a declarative entr
11
11
  ## Usage example
12
12
 
13
13
  ```typescript
14
- workflow.tool(testTool).commit();
14
+ workflow.tool(testTool).commit()
15
15
  ```
16
16
 
17
17
  ## Parameters
@@ -31,7 +31,7 @@ workflow.tool(testTool).commit();
31
31
  Pass a string to reference a registered tool without importing it. The tool must be registered on the Mastra instance when the workflow runs:
32
32
 
33
33
  ```typescript
34
- workflow.tool("lookup-customer", { retries: 2 }).commit();
34
+ workflow.tool('lookup-customer', { retries: 2 }).commit()
35
35
  ```
36
36
 
37
37
  ## Persisting tool steps
@@ -175,9 +175,11 @@ 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
+ `setupCommand` also accepts an array. Each entry runs as its own cached build step. `workingDirectory` sets the cwd for the build and the sandbox, and the repository is cloned to `<workingDirectory>/<repo>`. `buildEnv` passes environment variables to the build steps only. They never enter the serialized definition.
179
179
 
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.
180
+ `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.
181
+
182
+ `createRepoTemplate()` also attaches a commit-independent `family` key (`repo:<cloneUrl>:<workingDirectory>/<repo>`) 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
183
 
182
184
  Platform stores build state under the definition's server-derived content hash within the selected environment and provider.
183
185
 
@@ -289,6 +291,8 @@ console.log(result.exitCode)
289
291
 
290
292
  **env** (`Record<string, string>`): Environment variables baked into the sandbox at creation time. Per-command environment variables can also be passed to executeCommand.
291
293
 
294
+ **workingDirectory** (`string`): Default directory for command execution when no per-command cwd is given. A per-command cwd always wins. Use an absolute path.
295
+
292
296
  **timeout** (`number`): Default command execution timeout in milliseconds. Overridable per call via ExecuteCommandOptions.timeout.
293
297
 
294
298
  **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.1",
3
+ "version": "1.2.23-alpha.10",
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/core": "1.63.3-alpha.0",
32
- "@mastra/mcp": "^1.17.2"
30
+ "@mastra/core": "1.64.0-alpha.4",
31
+ "@mastra/mcp": "^1.17.3-alpha.0"
33
32
  },
34
33
  "devDependencies": {
35
34
  "@hono/node-server": "^2.0.0",
@@ -45,8 +44,8 @@
45
44
  "tsx": "^4.23.1",
46
45
  "typescript": "^7.0.2",
47
46
  "vitest": "4.1.10",
48
- "@mastra/core": "1.63.3-alpha.0",
49
47
  "@internal/lint": "0.0.129",
48
+ "@mastra/core": "1.64.0-alpha.4",
50
49
  "@internal/types-builder": "0.0.104"
51
50
  },
52
51
  "homepage": "https://mastra.ai",