@mastra/mcp-docs-server 1.3.6-alpha.9 → 1.3.6

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 (49) hide show
  1. package/.docs/docs/deployment/mastra-server.md +2 -2
  2. package/.docs/docs/harness/durable-agents.md +45 -9
  3. package/.docs/docs/harness/signals.md +12 -0
  4. package/.docs/docs/sandbox/overview.md +1 -0
  5. package/.docs/docs/server/pubsub.md +2 -0
  6. package/.docs/docs/subagents.md +1 -0
  7. package/.docs/docs/workflows/overview.md +2 -0
  8. package/.docs/integrations/sandboxes/blaxel.md +3 -1
  9. package/.docs/integrations/sandboxes/e2b.md +32 -1
  10. package/.docs/integrations/sandboxes/railway.md +13 -0
  11. package/.docs/integrations/sandboxes/sprites.md +219 -0
  12. package/.docs/integrations.md +1 -0
  13. package/.docs/models/environment-variables.md +2 -1
  14. package/.docs/models/gateways/merge-gateway.md +3 -1
  15. package/.docs/models/gateways/openrouter.md +1 -12
  16. package/.docs/models/gateways/vercel.md +2 -1
  17. package/.docs/models/index.md +3 -2
  18. package/.docs/models/providers/302ai.md +3 -1
  19. package/.docs/models/providers/ambient.md +17 -15
  20. package/.docs/models/providers/coralbricks.md +2 -2
  21. package/.docs/models/providers/deepinfra.md +2 -2
  22. package/.docs/models/providers/digitalocean.md +2 -1
  23. package/.docs/models/providers/edenai.md +305 -300
  24. package/.docs/models/providers/empiriolabs.md +4 -8
  25. package/.docs/models/providers/huggingface.md +7 -4
  26. package/.docs/models/providers/kilo.md +29 -40
  27. package/.docs/models/providers/llmgateway-providers.md +6 -6
  28. package/.docs/models/providers/llmgateway.md +3 -7
  29. package/.docs/models/providers/lowrouter.md +84 -0
  30. package/.docs/models/providers/moark.md +17 -9
  31. package/.docs/models/providers/nano-gpt.md +12 -12
  32. package/.docs/models/providers/nearai.md +22 -3
  33. package/.docs/models/providers/novita-ai.md +43 -66
  34. package/.docs/models/providers/ofox.md +2 -1
  35. package/.docs/models/providers/tinfoil.md +1 -2
  36. package/.docs/models/providers.md +2 -1
  37. package/.docs/reference/agents/durable-agent.md +40 -4
  38. package/.docs/reference/agents/inngest-agent.md +26 -0
  39. package/.docs/reference/client-js/agent-controller.md +1 -1
  40. package/.docs/reference/client-js/agents.md +2 -2
  41. package/.docs/reference/client-js/datasets.md +19 -0
  42. package/.docs/reference/core/mastra-class.md +12 -4
  43. package/.docs/reference/pubsub/lease-provider.md +2 -0
  44. package/.docs/reference/pubsub/valkey-streams.md +1 -1
  45. package/.docs/reference/server/routes.md +1 -0
  46. package/.docs/reference/storage/retention.md +21 -18
  47. package/.docs/reference/tools/mcp-client.md +5 -0
  48. package/.docs/reference/workspace/platform-sandbox.md +15 -2
  49. package/package.json +6 -6
@@ -95,29 +95,32 @@ Set the `retention` field on the store config.
95
95
 
96
96
  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.
97
97
 
98
- | Domain | Table key | Anchor column | `maxAge` measures |
99
- | ----------------- | ------------------ | ---------------- | ---------------------------------------------------------------- |
100
- | `memory` | `threads` | `createdAt` | Thread age |
101
- | `memory` | `messages` | `createdAt` | Message age |
102
- | `memory` | `resources` | `createdAt` | Resource age |
103
- | `threadState` | `threadState` | `updatedAt` | Inactivity: state for still-active threads survives |
104
- | `observability` | `spans` | `startedAt` | Span age |
105
- | `observability` | `metrics` | `timestamp` | Metric event age (vNext only) |
106
- | `observability` | `logs` | `timestamp` | Log event age (vNext only) |
107
- | `observability` | `scores` | `timestamp` | Score event age (vNext only) |
108
- | `observability` | `feedback` | `timestamp` | Feedback event age (vNext only) |
109
- | `scores` | `scorers` | `createdAt` | Score record age |
110
- | `workflows` | `workflowSnapshot` | `updatedAt` | Inactivity, suspended or long-running workflows survive |
111
- | `backgroundTasks` | `backgroundTasks` | `completedAt` | Time since completion, in-flight tasks (`NULL`) are never pruned |
112
- | `experiments` | `experiments` | `completedAt` | Time since completion, running experiments are never pruned |
113
- | `notifications` | `notifications` | `createdAt` | Notification age |
114
- | `harness` | `sessions` | `createdAt` | Session record age |
115
- | `schedules` | `triggers` | `actual_fire_at` | Fire-history age (epoch-ms column) |
98
+ | Domain | Table key | Anchor column | `maxAge` measures |
99
+ | ----------------- | ------------------ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------- |
100
+ | `memory` | `threads` | `createdAt` | Thread age |
101
+ | `memory` | `messages` | `createdAt` | Message age |
102
+ | `memory` | `resources` | `createdAt` | Resource age |
103
+ | `memory` | `runFences` | `retiredAt` | Time since the durable agent execution holding the fence settled. Fences of running executions (`NULL`) are never pruned |
104
+ | `threadState` | `threadState` | `updatedAt` | Inactivity: state for still-active threads survives |
105
+ | `observability` | `spans` | `startedAt` | Span age |
106
+ | `observability` | `metrics` | `timestamp` | Metric event age (vNext only) |
107
+ | `observability` | `logs` | `timestamp` | Log event age (vNext only) |
108
+ | `observability` | `scores` | `timestamp` | Score event age (vNext only) |
109
+ | `observability` | `feedback` | `timestamp` | Feedback event age (vNext only) |
110
+ | `scores` | `scorers` | `createdAt` | Score record age |
111
+ | `workflows` | `workflowSnapshot` | `updatedAt` | Inactivity, suspended or long-running workflows survive |
112
+ | `workflows` | `runOwnership` | `updatedAt` | Inactivity. A running durable agent execution renews its claim every 10 seconds, so keep `maxAge` well above its 30-second lease |
113
+ | `backgroundTasks` | `backgroundTasks` | `completedAt` | Time since completion, in-flight tasks (`NULL`) are never pruned |
114
+ | `experiments` | `experiments` | `completedAt` | Time since completion, running experiments are never pruned |
115
+ | `notifications` | `notifications` | `createdAt` | Notification age |
116
+ | `harness` | `sessions` | `createdAt` | Session record age |
117
+ | `schedules` | `triggers` | `actual_fire_at` | Fire-history age (epoch-ms column) |
116
118
 
117
119
  > **Note:**
118
120
  >
119
121
  > - The memory `observational_memory` table has no timestamp anchor, so it can't be age-pruned and isn't a valid retention key.
120
122
  > - Experiments prune as whole units: an aged experiment's result rows are deleted together with it (results cascade with their parent), so a run is never left partially deleted. Retention doesn't have a separate `results` key.
123
+ > - `runOwnership` and `runFences` hold the run fencing records of durable agents, one small record per run in each. If the `runOwnership` `maxAge` is too short, a running execution can lose its run, but an execution that lost a run still can't write. A fence is retired only when its execution settles, so the fence of a run that crashed and was never recovered is never pruned.
121
124
  > - For `schedules`, the growth table is the fire history (`schedule_triggers`, one row per fire): schedule definitions are config and aren't pruned.
122
125
  > - On PostgreSQL, timestamp anchors use the timezone-aware mirror columns (for example `createdAtZ`, `completedAtZ`).
123
126
  > - DuckDB observability stores append-only events for all five signals. Its `spans` policy uses the event `timestamp` column rather than `startedAt`.
@@ -17,6 +17,7 @@ constructor({
17
17
  id?: string;
18
18
  servers: Record<string, MastraMCPServerDefinition>;
19
19
  timeout?: number;
20
+ clientInfo?: { name?: string; version?: string };
20
21
  }: MCPClientOptions)
21
22
  ```
22
23
 
@@ -28,6 +29,8 @@ constructor({
28
29
 
29
30
  **timeout** (`number`): Global timeout value in milliseconds for all servers unless overridden in individual server configs. (Default: `60000`)
30
31
 
32
+ **clientInfo** (`{ name?: string; version?: string }`): Client name and version every server receives on connect and with each request, so servers can attribute traffic to your application. Defaults to the server key as name and '1.0.0' as version. Individual server configs can override either field with their own clientInfo. Doesn't change tool name prefixes, which always use the server key.
33
+
31
34
  ### `MastraMCPServerDefinition`
32
35
 
33
36
  Each server in the `servers` map is configured using the `MastraMCPServerDefinition` type. The transport type is detected based on the provided parameters:
@@ -59,6 +62,8 @@ The client speaks the MCP `2026-07-28` revision. On connect it asks the server w
59
62
 
60
63
  **timeout** (`number`): Server-specific timeout in milliseconds. Falls back to the client-level timeout when omitted.
61
64
 
65
+ **clientInfo** (`{ name?: string; version?: string }`): Overrides the top-level clientInfo for this server. Fields you set replace the top-level values; fields you omit keep them.
66
+
62
67
  **capabilities** (`MCPClientCapabilities`): Client capabilities to advertise: elicitation and extensions. elicitation is only accepted together with an inputRequests handler and defaults to form support when a handler is configured. Roots and sampling are not supported.
63
68
 
64
69
  **inputRequests** (`MCPInputRequestHandler`): Answers input requests from this server. When a tool, resource or prompt call ends as input\_required, the handler is called with each embedded request and the client retries the call with the answers. Without a handler an input\_required result surfaces as an error. See Answering input requests below.
@@ -123,10 +123,21 @@ const result = await sandbox.executeCommand('cat', ['/workspace/state.json'])
123
123
 
124
124
  When `sandboxId` is set, `environmentId` isn't required because the sandbox already exists.
125
125
 
126
- Read the platform's id for the running sandbox from the `sandboxId` property after `start()` and persist it for the next reattach. The property is `undefined` until the sandbox has started in the current process. The option passed to the constructor is a hint for `start()`. Before `start()` runs, `getInfo()` answers from local state and doesn't ask the platform about the hint. If the platform no longer knows the id, `start()` falls through to a fresh provision keyed by the sandbox's logical `id`. That fallback needs `environmentId` (or `MASTRA_ENVIRONMENT_ID`), so pass it whenever a hint might be stale; without it, `start()` throws `environmentId is required`.
126
+ Read the platform's id for the running sandbox from the `sandboxId` property after `start()` and persist it for the next reattach. The property is `undefined` until the sandbox has started in the current process. The option passed to the constructor is a hint for `start()`. Before `start()` runs, `getInfo()` answers from local state and doesn't ask the platform about the hint. Under the default `reattach: 'best-effort'`, if the platform no longer knows the id, `start()` falls through to a fresh provision keyed by the sandbox's logical `id`. That fallback needs `environmentId` (or `MASTRA_ENVIRONMENT_ID`), so pass it whenever a hint might be stale; without it, `start()` throws `environmentId is required`.
127
127
 
128
128
  `start()` reports `{ outcome: 'connected' }` on reattach and `{ outcome: 'created' }` on a fresh provision (including a checkpoint-recovered boot, which is a new VM even when its filesystem was restored). See [`start()`](https://mastra.ai/reference/workspace/sandbox) for the shared contract.
129
129
 
130
+ When a fresh sandbox would silently lose state your app depends on, set `reattach: 'required'`:
131
+
132
+ ```typescript
133
+ const sandbox = new PlatformSandbox({
134
+ sandboxId: 'sbx_abc123',
135
+ reattach: 'required',
136
+ })
137
+ ```
138
+
139
+ With `reattach: 'required'`, a reattach target the platform reports as missing (404), gone (410), or destroyed rejects `start()` with a `SandboxError` whose `code` is `SANDBOX_REATTACH_FAILED`, and no sandbox is provisioned. The error's `details` include `provider`, `sandboxId`, `logicalId` (the sandbox's logical `id`), and `reason`. Other errors propagate unchanged. To start fresh, clear your persisted `sandboxId` and construct the sandbox without it. Clones inherit the `reattach` setting.
140
+
130
141
  ### Reusable templates
131
142
 
132
143
  Pass a reusable template builder to `PlatformSandbox`. A fresh sandbox start sends the serialized definition to Platform, which content-addresses it and starts or reuses the provider build. Sandbox creation never blocks on a build. When the exact template isn't built yet, Platform boots the sandbox on the best available fallback and rebuilds the requested template in the background. The fallback is a same-lineage stale template with matching resources when one exists, otherwise the provider base template:
@@ -315,6 +326,8 @@ console.log(result.exitCode)
315
326
 
316
327
  **sandboxId** (`string`): Existing sandbox ID to reattach to instead of creating a new sandbox. When set, environmentId is not required.
317
328
 
329
+ **reattach** (`'best-effort' | 'required'`): What start() does when sandboxId is set but the platform reports that sandbox as missing, gone, or destroyed. 'best-effort' provisions a fresh sandbox. 'required' throws a SandboxError with code SANDBOX\_REATTACH\_FAILED instead of provisioning. (Default: `'best-effort'`)
330
+
318
331
  **seedCheckpointName** (`string`): Boot-only fallback checkpoint used when the primary recovery checkpoint for id has no stored state. Later snapshots continue writing to the checkpoint for id.
319
332
 
320
333
  **template** (`SandboxTemplateBuilder | (() => SandboxTemplateBuilder | undefined | Promise<SandboxTemplateBuilder | undefined>)`): Reusable template builder or lazy resolver used during a fresh sandbox provision. Resolver and provider build failures fall back to the selected provider default.
@@ -351,7 +364,7 @@ console.log(result.exitCode)
351
364
 
352
365
  ## Methods
353
366
 
354
- **start** (`() => Promise<SandboxStartResult>`): Provision the remote sandbox, or reattach when sandboxId was passed to the constructor. Idempotent once the sandbox is running. A destroyed reattach target falls through to a fresh provision.
367
+ **start** (`() => Promise<SandboxStartResult>`): Provision the remote sandbox, or reattach when sandboxId was passed to the constructor. Idempotent once the sandbox is running. A destroyed reattach target falls through to a fresh provision under the default reattach: 'best-effort', and throws SANDBOX\_REATTACH\_FAILED under reattach: 'required'.
355
368
 
356
369
  **destroy** (`() => Promise<void>`): Tear down the remote sandbox and clear the cached exec lease. A subsequent start() provisions a fresh sandbox (or restores from checkpoint when a stable id is set).
357
370
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.3.6-alpha.9",
3
+ "version": "1.3.6",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,8 +26,8 @@
26
26
  "@mastra/mcp-legacy": "npm:@mastra/mcp@^1.18.0",
27
27
  "local-pkg": "^1.1.2",
28
28
  "zod": "^4.6.4",
29
- "@mastra/core": "1.76.0-alpha.4",
30
- "@mastra/mcp": "^2.2.1-alpha.0"
29
+ "@mastra/mcp": "^2.3.0",
30
+ "@mastra/core": "1.76.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hono/node-server": "^2.0.0",
@@ -43,9 +43,9 @@
43
43
  "tsx": "^4.23.1",
44
44
  "typescript": "^7.0.2",
45
45
  "vitest": "4.1.11",
46
- "@internal/lint": "0.0.141",
47
- "@internal/types-builder": "0.0.116",
48
- "@mastra/core": "1.76.0-alpha.4"
46
+ "@internal/lint": "0.0.142",
47
+ "@internal/types-builder": "0.0.117",
48
+ "@mastra/core": "1.76.0"
49
49
  },
50
50
  "homepage": "https://mastra.ai",
51
51
  "repository": {