@mastra/mcp-docs-server 1.3.9-alpha.4 → 1.3.9-alpha.7

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 (73) hide show
  1. package/.docs/docs/agents/human-in-the-loop.md +2 -1
  2. package/.docs/docs/harness/agent-controller.md +1 -1
  3. package/.docs/docs/harness/durable-agents.md +17 -5
  4. package/.docs/docs/harness/signals.md +3 -1
  5. package/.docs/docs/memory/observational-memory.md +4 -2
  6. package/.docs/docs/studio/overview.md +8 -0
  7. package/.docs/docs/workflows/control-flow.md +3 -1
  8. package/.docs/docs/workflows/overview.md +2 -0
  9. package/.docs/docs/workflows/time-travel.md +1 -1
  10. package/.docs/integrations/voice/google.md +6 -0
  11. package/.docs/models/gateways/merge-gateway.md +3 -1
  12. package/.docs/models/gateways/netlify.md +7 -4
  13. package/.docs/models/gateways/openrouter.md +7 -4
  14. package/.docs/models/gateways/vercel.md +7 -1
  15. package/.docs/models/index.md +1 -1
  16. package/.docs/models/providers/alibaba-token-plan-cn.md +31 -30
  17. package/.docs/models/providers/baseten.md +27 -25
  18. package/.docs/models/providers/cloudflare-workers-ai.md +2 -1
  19. package/.docs/models/providers/coralbricks.md +5 -8
  20. package/.docs/models/providers/cortecs.md +4 -4
  21. package/.docs/models/providers/deepinfra.md +2 -1
  22. package/.docs/models/providers/edenai.md +12 -6
  23. package/.docs/models/providers/empiriolabs.md +3 -1
  24. package/.docs/models/providers/engy.md +12 -11
  25. package/.docs/models/providers/fireworks-ai.md +2 -1
  26. package/.docs/models/providers/huggingface.md +2 -1
  27. package/.docs/models/providers/hyper.md +26 -25
  28. package/.docs/models/providers/kilo.md +23 -20
  29. package/.docs/models/providers/llmgateway-providers.md +9 -5
  30. package/.docs/models/providers/llmgateway.md +3 -1
  31. package/.docs/models/providers/minimax-cn-coding-plan.md +2 -1
  32. package/.docs/models/providers/minimax-cn.md +3 -2
  33. package/.docs/models/providers/minimax-coding-plan.md +2 -1
  34. package/.docs/models/providers/minimax.md +3 -2
  35. package/.docs/models/providers/nano-gpt.md +52 -55
  36. package/.docs/models/providers/nearai.md +1 -1
  37. package/.docs/models/providers/nebius.md +2 -1
  38. package/.docs/models/providers/novita-ai.md +2 -1
  39. package/.docs/models/providers/nvidia.md +2 -1
  40. package/.docs/models/providers/ofox.md +2 -1
  41. package/.docs/models/providers/ollama-cloud.md +31 -29
  42. package/.docs/models/providers/opencode-go.md +2 -2
  43. package/.docs/models/providers/opencode.md +87 -89
  44. package/.docs/models/providers/prime.md +3 -1
  45. package/.docs/models/providers/requesty.md +4 -1
  46. package/.docs/models/providers/standardcompute.md +47 -8
  47. package/.docs/models/providers/togetherai.md +4 -1
  48. package/.docs/models/providers/upstage.md +8 -7
  49. package/.docs/models/providers/wandb.md +3 -2
  50. package/.docs/models/providers/zenmux.md +2 -1
  51. package/.docs/reference/agents/channels.md +5 -1
  52. package/.docs/reference/agents/durable-agent.md +11 -6
  53. package/.docs/reference/classifier/classifier.md +29 -5
  54. package/.docs/reference/client-js/agent-controller.md +2 -0
  55. package/.docs/reference/client-js/observability.md +117 -0
  56. package/.docs/reference/core/mastra-class.md +7 -1
  57. package/.docs/reference/evals/create-classifier-scorer.md +1 -0
  58. package/.docs/reference/memory/observational-memory.md +2 -2
  59. package/.docs/reference/observability/tracing/trace-query.md +39 -10
  60. package/.docs/reference/processors/classifier-processor.md +8 -6
  61. package/.docs/reference/processors/model-selection-processor.md +2 -2
  62. package/.docs/reference/processors/moderation-processor.md +5 -1
  63. package/.docs/reference/processors/system-prompt-scrubber.md +4 -0
  64. package/.docs/reference/signals/create-notification-inbox-tool.md +11 -9
  65. package/.docs/reference/tools/create-tool.md +2 -2
  66. package/.docs/reference/tools/mcp-client.md +2 -2
  67. package/.docs/reference/workflows/dynamic-workflow-definition.md +1 -1
  68. package/.docs/reference/workflows/run-methods/resume.md +1 -1
  69. package/.docs/reference/workflows/run-methods/timeTravel.md +15 -16
  70. package/.docs/reference/workflows/step.md +1 -0
  71. package/.docs/reference/workflows/workflow-methods/classifier.md +1 -0
  72. package/.docs/reference/workspace/factory-sandbox.md +2 -0
  73. package/package.json +8 -9
@@ -118,7 +118,7 @@ try {
118
118
 
119
119
  Over HTTP, a losing resume returns `409 Conflict`.
120
120
 
121
- This claim only applies to `resume()`. [`timeTravel()`](https://mastra.ai/reference/workflows/run-methods/timeTravel) doesn't claim the run, so concurrent time travel calls aren't rejected.
121
+ [`timeTravel()`](https://mastra.ai/reference/workflows/run-methods/timeTravel) claims the run the same way and throws `WORKFLOW_TIME_TRAVEL_ALREADY_CLAIMED` when it loses.
122
122
 
123
123
  > **Note:** The claim is enforced atomically by storage adapters that report `supportsConcurrentUpdates()`. Adapters without atomic read-modify-write support (such as ClickHouse, Cloudflare D1, Cloudflare KV, Cloudflare Durable Objects, LanceDB, and Redis) can't enforce it, and the claim is also skipped when `shouldPersistSnapshot` excludes the `running` status.
124
124
 
@@ -152,30 +152,29 @@ const result = await run.timeTravel({
152
152
 
153
153
  ## Concurrent time travel calls
154
154
 
155
- `timeTravel()` doesn't claim the run before it executes. It only rejects runs whose stored status is `running`. If two `timeTravel()` calls target the same run at the same time, both can proceed, and the target step and every step after it run once per call.
155
+ Only one `timeTravel()` call can run for a workflow run at a time. Before it runs anything, `timeTravel()` atomically claims the run by moving its stored status from the status it loaded (for example `suspended` or `success`) to `running`. If another caller already claimed it, this call throws `WORKFLOW_TIME_TRAVEL_ALREADY_CLAIMED` and executes no steps. A call that loads the run while it's already `running` throws `WORKFLOW_TIME_TRAVEL_RUN_RUNNING`.
156
156
 
157
- This matters whenever time travel can be triggered more than once for the same run, such as a "retry from step" button pressed twice or a retried API request. Make sure only one call proceeds per run in your application, for example with a per-run lock or an idempotency key:
157
+ This matters whenever time travel can be triggered more than once for the same run, such as a "retry from step" button pressed twice or a retried API request.
158
158
 
159
159
  ```typescript
160
- const inFlight = new Set<string>()
161
-
162
- async function retryFromStep(runId: string, step: string) {
163
- if (inFlight.has(runId)) {
164
- throw new Error(`Time travel already in progress for run ${runId}`)
165
- }
166
- inFlight.add(runId)
167
- try {
168
- const run = await workflow.createRun({ runId })
169
- return await run.timeTravel({ step })
170
- } finally {
171
- inFlight.delete(runId)
160
+ try {
161
+ await run.timeTravel({ step: 'step2' })
162
+ } catch (error) {
163
+ if (
164
+ error.id === 'WORKFLOW_TIME_TRAVEL_ALREADY_CLAIMED' ||
165
+ error.id === 'WORKFLOW_TIME_TRAVEL_RUN_RUNNING'
166
+ ) {
167
+ // Another caller is already re-running this workflow. Re-read the run
168
+ // state instead of time travelling again.
172
169
  }
173
170
  }
174
171
  ```
175
172
 
176
- The in-memory set above only protects a single process. If several server instances can handle the same run, use a shared lock instead, such as a database row lock.
173
+ Over HTTP, `POST /api/workflows/:workflowId/time-travel-async` returns `409 Conflict` for a losing call. The `time-travel` and `time-travel-stream` endpoints respond before the time travel finishes, so a losing call doesn't change their status code.
174
+
175
+ Calling `timeTravel()` again after the previous call finished is still allowed and re-runs the target step.
177
176
 
178
- Unlike [`resume()`](https://mastra.ai/reference/workflows/run-methods/resume), `timeTravel()` has no `WORKFLOW_RESUME_ALREADY_CLAIMED` equivalent, and the HTTP endpoint doesn't return `409 Conflict` for concurrent calls.
177
+ > **Note:** The claim is enforced atomically by storage adapters that report `supportsConcurrentUpdates()`. Adapters without atomic read-modify-write support (such as ClickHouse, Cloudflare D1, Cloudflare KV, Cloudflare Durable Objects, LanceDB, and Redis) can't enforce it, and the claim is also skipped when `shouldPersistSnapshot` excludes the `running` status. The Inngest workflow runner doesn't claim the run yet.
179
178
 
180
179
  ## Notes
181
180
 
@@ -185,6 +185,7 @@ The typed step output is JSON-safe:
185
185
  - `answers.route.choice` is the selected choice literal.
186
186
  - `answers.urgent.probability` is the probability that the boolean answer is `true`, not a thresholded boolean.
187
187
  - Choice and score answers may include distributions.
188
+ - A question the decision model refused is `{ type: 'refusal' }` and has no `choice`, `score`, or `probability`.
188
189
  - `usage` contains normalized token usage.
189
190
 
190
191
  `maxRetries` controls classifier model-call retries. `retries` controls workflow step retries. Classifier warnings, response metadata, and raw provider data aren't included in workflow output.
@@ -58,6 +58,7 @@ Mappings use the same validated path grammar as other workflow steps and persist
58
58
  - Choice answers expose `answers.<question>.choice` and may include `probabilities`.
59
59
  - Score answers expose `answers.<question>.score` and may include `probabilities`.
60
60
  - Boolean answers expose the raw `P(true)` value as `answers.<question>.probability`. Apply an explicit threshold when routing.
61
+ - Refused questions are `{ type: 'refusal' }` and have no `choice`, `score`, or `probability`.
61
62
  - `usage` contains normalized token usage.
62
63
 
63
64
  ## Retries and errors
@@ -127,6 +127,8 @@ class MyFactorySandbox extends FactorySandbox<Settings> {
127
127
  }
128
128
  ```
129
129
 
130
+ When a user recreates a stuck session's sandbox, Factory may call `create` with only `sessionId` and the persisted `sandboxId` (no repository access, empty settings) and then call the returned sandbox's `destroy()` without starting it. This happens when the server restarted or the session was opened on another replica. For recreate to work, `destroy()` must find and remove the session's VM from `sandboxId` or the session id alone. Factory doesn't offer recreate for `LocalFactorySandbox`, because its `destroy()` keeps the session directory.
131
+
130
132
  ## FactorySandboxContext
131
133
 
132
134
  Everything Factory knows about the session, passed to `create`, `template` and the build methods.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.3.9-alpha.4",
3
+ "version": "1.3.9-alpha.7",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -25,9 +25,9 @@
25
25
  "dependencies": {
26
26
  "@mastra/mcp-legacy": "npm:@mastra/mcp@^1.18.0",
27
27
  "local-pkg": "^1.1.2",
28
- "zod": "^4.6.4",
29
- "@mastra/mcp": "^2.4.2-alpha.0",
30
- "@mastra/core": "1.79.0-alpha.2"
28
+ "zod": "^4.6.7",
29
+ "@mastra/core": "1.79.0-alpha.4",
30
+ "@mastra/mcp": "^2.5.0-alpha.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hono/node-server": "^2.0.0",
@@ -37,15 +37,14 @@
37
37
  "@vitest/ui": "4.1.11",
38
38
  "@wong2/mcp-cli": "^2.0.0",
39
39
  "cross-env": "^10.1.0",
40
- "eslint": "^10.7.0",
41
40
  "hono": "^4.13.7",
42
41
  "tsdown": "0.22.9",
43
42
  "tsx": "^4.23.1",
44
43
  "typescript": "^7.0.2",
45
44
  "vitest": "4.1.11",
46
- "@internal/types-builder": "0.0.119",
47
45
  "@internal/lint": "0.0.144",
48
- "@mastra/core": "1.79.0-alpha.2"
46
+ "@mastra/core": "1.79.0-alpha.4",
47
+ "@internal/types-builder": "0.0.119"
49
48
  },
50
49
  "homepage": "https://mastra.ai",
51
50
  "repository": {
@@ -64,8 +63,8 @@
64
63
  "build:cli": "tsdown --silent --config tsdown.config.ts",
65
64
  "pretest": "pnpm turbo build --filter @mastra/mcp-docs-server",
66
65
  "test": "vitest run",
67
- "lint": "oxlint . && eslint .",
68
- "lint:fix": "oxlint --fix . && eslint --fix ."
66
+ "lint": "oxlint --type-aware .",
67
+ "lint:fix": "oxlint --type-aware --fix ."
69
68
  },
70
69
  "bin": {
71
70
  "mcp-docs-server": "dist/stdio.js"