@mastra/mcp-docs-server 1.3.2-alpha.12 → 1.3.2-alpha.15

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 (69) hide show
  1. package/.docs/docs/agents/code-mode.md +1 -1
  2. package/.docs/docs/agents/processors.md +3 -3
  3. package/.docs/docs/agents/tools.md +1 -1
  4. package/.docs/docs/connections/acp.md +3 -3
  5. package/.docs/docs/connections/mcp.md +1 -1
  6. package/.docs/docs/deployment/workers.md +7 -2
  7. package/.docs/docs/develop.md +4 -4
  8. package/.docs/docs/evals/datasets.md +1 -1
  9. package/.docs/docs/evals/experiments.md +4 -4
  10. package/.docs/docs/evals/multi-turn.md +2 -2
  11. package/.docs/docs/evals/vitest-integration.md +1 -1
  12. package/.docs/docs/harness/agent-controller.md +5 -3
  13. package/.docs/docs/harness/background-tasks.md +2 -2
  14. package/.docs/docs/harness/goals.md +27 -4
  15. package/.docs/docs/harness/schedules.md +1 -1
  16. package/.docs/docs/harness/signals.md +2 -2
  17. package/.docs/docs/mastra-platform/deploy.md +1 -1
  18. package/.docs/docs/mastra-platform/environments.md +1 -1
  19. package/.docs/docs/mastra-platform/observability.md +1 -1
  20. package/.docs/docs/mastra-platform/workspaces.md +1 -1
  21. package/.docs/docs/memory/observational-memory.md +3 -3
  22. package/.docs/docs/memory/overview.md +1 -1
  23. package/.docs/docs/sandbox/skills.md +1 -1
  24. package/.docs/docs/server/pubsub.md +1 -1
  25. package/.docs/docs/server/server-adapters.md +1 -1
  26. package/.docs/docs/studio/auth.md +1 -1
  27. package/.docs/docs/workflows/dynamic-workflows.md +1 -1
  28. package/.docs/docs/workflows/overview.md +1 -1
  29. package/.docs/docs/workflows/scheduled-workflows.md +11 -7
  30. package/.docs/integrations/frameworks/nestjs.md +34 -1
  31. package/.docs/models/gateways/merge-gateway.md +2 -1
  32. package/.docs/models/gateways/openrouter.md +2 -1
  33. package/.docs/models/gateways/vercel.md +2 -1
  34. package/.docs/models/index.md +212 -2
  35. package/.docs/models/providers/anthropic.md +3 -2
  36. package/.docs/models/providers/bailing.md +1 -1
  37. package/.docs/models/providers/cloudflare-workers-ai.md +3 -3
  38. package/.docs/models/providers/digitalocean.md +2 -1
  39. package/.docs/models/providers/edenai.md +3 -1
  40. package/.docs/models/providers/kilo.md +16 -15
  41. package/.docs/models/providers/llmgateway-providers.md +2 -3
  42. package/.docs/models/providers/llmgateway.md +2 -1
  43. package/.docs/models/providers/mistral.md +1 -2
  44. package/.docs/models/providers/nano-gpt.md +3 -6
  45. package/.docs/models/providers/nebius.md +2 -1
  46. package/.docs/models/providers/nvidia.md +1 -1
  47. package/.docs/models/providers/ofox.md +2 -1
  48. package/.docs/models/providers/opencode.md +2 -1
  49. package/.docs/models/providers/pioneer.md +4 -2
  50. package/.docs/models/providers/togetherai.md +1 -3
  51. package/.docs/reference/client-js/agent-controller.md +1 -1
  52. package/.docs/reference/datasets/finalizeExperiment.md +1 -1
  53. package/.docs/reference/file-based-agents/logger.md +1 -1
  54. package/.docs/reference/file-based-agents/schedules.md +3 -3
  55. package/.docs/reference/file-based-agents/workspace.md +1 -1
  56. package/.docs/reference/migrations/mcp-v2.md +1 -1
  57. package/.docs/reference/observability/tracing/interfaces.md +1 -1
  58. package/.docs/reference/observability/tracing/trace-query.md +37 -16
  59. package/.docs/reference/processors/model-selection-processor.md +1 -1
  60. package/.docs/reference/pubsub/google-cloud-pubsub.md +1 -1
  61. package/.docs/reference/pubsub/redis-streams.md +3 -3
  62. package/.docs/reference/rag/graph-rag.md +1 -1
  63. package/.docs/reference/storage/retention.md +1 -1
  64. package/.docs/reference/workers/overview.md +3 -1
  65. package/.docs/reference/workflows/workflow.md +1 -1
  66. package/.docs/reference/workspace/platform-sandbox.md +1 -1
  67. package/.docs/reference/workspace/sandbox.md +1 -1
  68. package/.docs/reference/workspace/workspace-class.md +1 -1
  69. package/package.json +4 -4
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![NanoGPT logo](https://models.dev/logos/nano-gpt.svg)NanoGPT
6
6
 
7
- Access 600 NanoGPT models through Mastra's model router. Authentication is handled automatically using the `NANO_GPT_API_KEY` environment variable.
7
+ Access 597 NanoGPT models through Mastra's model router. Authentication is handled automatically using the `NANO_GPT_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [NanoGPT documentation](https://docs.nano-gpt.com).
10
10
 
@@ -60,11 +60,6 @@ for await (const chunk of stream) {
60
60
  | `nano-gpt/anthropic/claude-haiku-4.5` | 200K | | | | | | $1 | $5 |
61
61
  | `nano-gpt/anthropic/claude-haiku-4.5:thinking` | 200K | | | | | | $1 | $5 |
62
62
  | `nano-gpt/anthropic/claude-haiku-latest` | 200K | | | | | | $1 | $5 |
63
- | `nano-gpt/anthropic/claude-opus-4` | 200K | | | | | | $15 | $75 |
64
- | `nano-gpt/anthropic/claude-opus-4:thinking` | 200K | | | | | | $15 | $75 |
65
- | `nano-gpt/anthropic/claude-opus-4:thinking:1024` | 200K | | | | | | $15 | $75 |
66
- | `nano-gpt/anthropic/claude-opus-4:thinking:32768` | 200K | | | | | | $15 | $75 |
67
- | `nano-gpt/anthropic/claude-opus-4:thinking:8192` | 200K | | | | | | $15 | $75 |
68
63
  | `nano-gpt/anthropic/claude-opus-4.1` | 200K | | | | | | $15 | $75 |
69
64
  | `nano-gpt/anthropic/claude-opus-4.1:thinking` | 200K | | | | | | $15 | $75 |
70
65
  | `nano-gpt/anthropic/claude-opus-4.1:thinking:1024` | 200K | | | | | | $15 | $75 |
@@ -96,6 +91,8 @@ for await (const chunk of stream) {
96
91
  | `nano-gpt/anthropic/claude-sonnet-4.6:thinking` | 1.0M | | | | | | $3 | $15 |
97
92
  | `nano-gpt/anthropic/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
98
93
  | `nano-gpt/anthropic/claude-sonnet-5:thinking` | 1.0M | | | | | | $2 | $10 |
94
+ | `nano-gpt/anthropic/claude-sonnet-5.5` | 1.0M | | | | | | $2 | $10 |
95
+ | `nano-gpt/anthropic/claude-sonnet-5.5:thinking` | 1.0M | | | | | | $2 | $10 |
99
96
  | `nano-gpt/anthropic/claude-sonnet-latest` | 1.0M | | | | | | $2 | $10 |
100
97
  | `nano-gpt/arcee-ai/trinity-large-thinking` | 262K | | | | | | $0.25 | $0.90 |
101
98
  | `nano-gpt/asi1-mini` | 128K | | | | | | $1 | $1 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Nebius Token Factory logo](https://models.dev/logos/nebius.svg)Nebius Token Factory
6
6
 
7
- Access 20 Nebius Token Factory models through Mastra's model router. Authentication is handled automatically using the `NEBIUS_API_KEY` environment variable.
7
+ Access 21 Nebius Token Factory models through Mastra's model router. Authentication is handled automatically using the `NEBIUS_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Nebius Token Factory documentation](https://docs.tokenfactory.nebius.com/).
10
10
 
@@ -55,6 +55,7 @@ for await (const chunk of stream) {
55
55
  | `nebius/Qwen/Qwen3-30B-A3B-Instruct-2507` | 262K | | | | | | $0.10 | $0.30 |
56
56
  | `nebius/Qwen/Qwen3-Embedding-8B` | 41K | | | | | | $0.01 | — |
57
57
  | `nebius/Qwen/Qwen3.5-397B-A17B` | 262K | | | | | | $0.60 | $4 |
58
+ | `nebius/Qwen/Qwen3.8-27B` | 262K | | | | | | $0.45 | $3 |
58
59
  | `nebius/zai-org/GLM-5.2` | 1.0M | | | | | | $1 | $4 |
59
60
  | `nebius/zai-org/GLM-5.3` | 1.0M | | | | | | $1 | $4 |
60
61
  | `nebius/zai-org/GLM-5.3-Flash` | 1.0M | | | | | | $0.15 | $0.50 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Nvidia logo](https://models.dev/logos/nvidia.svg)Nvidia
6
6
 
7
- Access 105 Nvidia models through Mastra's model router. Authentication is handled automatically using the `NVIDIA_API_KEY` environment variable.
7
+ Access 103 Nvidia models through Mastra's model router. Authentication is handled automatically using the `NVIDIA_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Nvidia documentation](https://docs.api.nvidia.com/nim/).
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Ofox logo](https://models.dev/logos/ofox.svg)Ofox
6
6
 
7
- Access 148 Ofox models through Mastra's model router. Authentication is handled automatically using the `OFOX_API_KEY` environment variable.
7
+ Access 149 Ofox models through Mastra's model router. Authentication is handled automatically using the `OFOX_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Ofox documentation](https://ofox.ai/docs).
10
10
 
@@ -185,6 +185,7 @@ for await (const chunk of stream) {
185
185
  | `ofox/z-ai/glm-5.2` | 1.0M | | | | | | $1 | $4 |
186
186
  | `ofox/z-ai/glm-5.3` | 1.0M | | | | | | $1 | $4 |
187
187
  | `ofox/z-ai/glm-5.3-flash` | 1.0M | | | | | | $0.15 | $0.50 |
188
+ | `ofox/z-ai/glm-5.3-flashx` | 1.0M | | | | | | $0.15 | $0.50 |
188
189
  | `ofox/z-ai/glm-5v-turbo` | 200K | | | | | | $1 | $4 |
189
190
 
190
191
  Model availability, capabilities, context windows, and pricing are sourced from [models.dev](https://models.dev) and may change.
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![OpenCode Zen logo](https://models.dev/logos/opencode.svg)OpenCode Zen
6
6
 
7
- Access 112 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
7
+ Access 113 OpenCode Zen models through Mastra's model router. Authentication is handled automatically using the `OPENCODE_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [OpenCode Zen documentation](https://opencode.ai/docs/zen).
10
10
 
@@ -52,6 +52,7 @@ for await (const chunk of stream) {
52
52
  | `opencode/claude-sonnet-4-5` | 1.0M | | | | | | $3 | $15 |
53
53
  | `opencode/claude-sonnet-4-6` | 1.0M | | | | | | $3 | $15 |
54
54
  | `opencode/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
55
+ | `opencode/claude-sonnet-5-5` | 1.0M | | | | | | $2 | $10 |
55
56
  | `opencode/deepseek-v4-flash` | 1.0M | | | | | | $0.14 | $0.28 |
56
57
  | `opencode/deepseek-v4-flash-vision-exp` | 1.0M | | | | | | $0.14 | $0.28 |
57
58
  | `opencode/deepseek-v4-pro` | 1.0M | | | | | | $2 | $4 |
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Pioneer logo](https://models.dev/logos/pioneer.svg)Pioneer
6
6
 
7
- Access 114 Pioneer models through Mastra's model router. Authentication is handled automatically using the `PIONEER_API_KEY` environment variable.
7
+ Access 116 Pioneer models through Mastra's model router. Authentication is handled automatically using the `PIONEER_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Pioneer documentation](https://agent.pioneer.ai/llms.txt).
10
10
 
@@ -59,11 +59,13 @@ for await (const chunk of stream) {
59
59
  | `pioneer/devstral-small-2` | 256K | | | | | | $0.10 | $0.30 |
60
60
  | `pioneer/fastino/gliguard-LLMGuardrails-300M` | 8K | | | | | | $0.15 | $0.15 |
61
61
  | `pioneer/fastino/gliguard-PII-multi` | 8K | | | | | | $0.15 | $0.15 |
62
+ | `pioneer/fastino/GLiNER-2.5-Decide` | 8K | | | | | | $0.15 | $0.15 |
62
63
  | `pioneer/fastino/gliner2-base-v1` | 8K | | | | | | $0.15 | $0.15 |
63
64
  | `pioneer/fastino/gliner2-large-v1` | 8K | | | | | | $0.15 | $0.15 |
64
65
  | `pioneer/fastino/gliner2-multi-large-v1` | 8K | | | | | | $0.15 | $0.15 |
65
66
  | `pioneer/fastino/gliner2-multi-v1` | 8K | | | | | | $0.15 | $0.15 |
66
67
  | `pioneer/fastino/gliner2-privacy-filter-PII-multi` | 8K | | | | | | $0.15 | $0.15 |
68
+ | `pioneer/fastino/gliner2.5-base-v1` | 4K | | | | | | $0.03 | — |
67
69
  | `pioneer/fastino/gliner2.5-multi-v1` | 4K | | | | | | $0.15 | $0.15 |
68
70
  | `pioneer/gemini-3-flash` | 1.0M | | | | | | $0.50 | $3 |
69
71
  | `pioneer/gemini-3.1-flash-lite` | 1.0M | | | | | | $0.25 | $2 |
@@ -164,7 +166,7 @@ const agent = new Agent({
164
166
  id: "custom-agent",
165
167
  name: "custom-agent",
166
168
  model: {
167
- url: "https://api.pioneer.ai/v1",
169
+ url: "https://api.fastino.ai/v1",
168
170
  id: "pioneer/HuggingFaceTB/SmolLM3-3B-Base",
169
171
  apiKey: process.env.PIONEER_API_KEY,
170
172
  headers: {
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ![Together AI logo](https://models.dev/logos/togetherai.svg)Together AI
6
6
 
7
- Access 39 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
7
+ Access 36 Together AI models through Mastra's model router. Authentication is handled automatically using the `TOGETHER_API_KEY` environment variable.
8
8
 
9
9
  Learn more in the [Together AI documentation](https://docs.together.ai/docs/serverless-models).
10
10
 
@@ -48,8 +48,6 @@ for await (const chunk of stream) {
48
48
  | `togetherai/meta-llama/Meta-Llama-3-8B-Instruct-Lite` | 8K | | | | | | $0.14 | $0.14 |
49
49
  | `togetherai/MiniMaxAI/MiniMax-M2.7` | 197K | | | | | | $0.30 | $1 |
50
50
  | `togetherai/MiniMaxAI/MiniMax-M3` | 524K | | | | | | $0.30 | $1 |
51
- | `togetherai/moonshotai/Kimi-K2.6` | 262K | | | | | | $1 | $5 |
52
- | `togetherai/moonshotai/Kimi-K2.7-Code` | 262K | | | | | | $0.95 | $4 |
53
51
  | `togetherai/moonshotai/Kimi-K3` | 1.0M | | | | | | $3 | $15 |
54
52
  | `togetherai/nvidia/nemotron-3-ultra-550b-a55b` | 512K | | | | | | $0.60 | $4 |
55
53
  | `togetherai/openai/gpt-oss-120b` | 131K | | | | | | $0.15 | $0.60 |
@@ -91,7 +91,7 @@ Returns: `Promise<CreateAgentControllerSessionResponse>`
91
91
 
92
92
  ### `subscribe(options)`
93
93
 
94
- Subscribes to the session's event stream over SSE. The promise resolves once the stream is established and rejects when it can't connect, so a rejected call leaves nothing running in the background. `reconnect` only governs re-establishing a stream that drops after it was established. To retry the initial connection, loop around `subscribe()`.
94
+ Subscribes to the session's event stream over SSE. The promise resolves once the stream is established and rejects when it can't connect. A rejected call leaves nothing running in the background. `reconnect` only governs re-establishing a stream that drops after it was established. To retry the initial connection, loop around `subscribe()`.
95
95
 
96
96
  **onEvent** (`(event: AgentControllerEvent) => void`): Called for each event received over the stream. See Events for the event types.
97
97
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  **Added in:** `@mastra/core@1.61.0`
8
8
 
9
- Finalizes a caller-driven experiment created with [`createExperiment()`](https://mastra.ai/reference/datasets/createExperiment), with or without a target. Mastra computes the final counts server-side from the persisted result rows and marks the experiment `'completed'`, so the caller never tracks completion bookkeeping.
9
+ Finalizes a caller-driven experiment created with [`createExperiment()`](https://mastra.ai/reference/datasets/createExperiment), with or without a target. Mastra computes the final counts server-side from the persisted result rows and marks the experiment `'completed'`. The caller never tracks completion bookkeeping.
10
10
 
11
11
  Counts are per item, so `succeededCount + failedCount + skippedCount === totalItems` even when items have multiple attempts:
12
12
 
@@ -23,7 +23,7 @@ export default new PinoLogger({
23
23
  })
24
24
  ```
25
25
 
26
- Mastra registers the logger before storage, observability, and file-based agents, so those primitives log through this logger as they're wired up.
26
+ Mastra registers the logger before storage, observability, and file-based agents. Those primitives log through this logger as they're wired up.
27
27
 
28
28
  ## Precedence with code
29
29
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  > **Beta:** Breaking changes may occur without a major version bump until the API is stable.
8
8
 
9
- A file-based agent discovers **schedules** from its `schedules/` directory. Each file declares one recurring task: a cron expression plus what the agent should do when it fires. Mastra registers them into schedule storage at startup, so a scheduled agent needs no runtime registration code.
9
+ A file-based agent discovers **schedules** from its `schedules/` directory. Each file declares one recurring task: a cron expression plus what the agent should do when it fires. Mastra registers them into schedule storage at startup. A scheduled agent needs no runtime registration code.
10
10
 
11
11
  Use this page for the file-based convention. To create schedules at runtime instead, see [Schedules](https://mastra.ai/reference/schedules/overview).
12
12
 
@@ -90,11 +90,11 @@ export default defineSchedule({
90
90
  })
91
91
  ```
92
92
 
93
- The handler's return value is merged over the schedule's stored fields. Returning `undefined` applies no overrides, so the fire falls back to those stored fields. Since a handler-mode schedule can't declare a `prompt`, that fire then fails for a missing prompt. Return a `prompt` to run, or `null` to skip.
93
+ The handler's return value is merged over the schedule's stored fields. Returning `undefined` applies no overrides. The fire falls back to those stored fields. Since a handler-mode schedule can't declare a `prompt`, that fire then fails for a missing prompt. Return a `prompt` to run, or `null` to skip.
94
94
 
95
95
  Handlers are functions, so they can't be persisted on the stored schedule row. Mastra resolves them in-process when the schedule fires. A handler-mode schedule that supplies no prompt (and declares none) fails that fire with a reason rather than sending the agent an empty message.
96
96
 
97
- That in-process lookup means the process running the scheduler must have the owning agent registered. A normal deployment boots a single entry and gets that for free. Standalone workers need the same entry as your server. Boot one from a trimmed entry and it has no handler to call, so its fires fail rather than run.
97
+ That in-process lookup means the process running the scheduler must have the owning agent registered. A normal deployment boots a single entry and gets that for free. Standalone workers need the same entry as your server. Boot one from a trimmed entry and it has no handler to call. Its fires fail rather than run.
98
98
 
99
99
  ### Markdown schedules
100
100
 
@@ -75,7 +75,7 @@ The workspace filesystem controls file-tool access, and the sandbox determines w
75
75
 
76
76
  ## Seed files
77
77
 
78
- Add a `workspace/` directory to include starting files with the agent. Mastra mirrors files under `workspace/` into the agent's default runtime workspace at build time, so the agent starts with those files on disk.
78
+ Add a `workspace/` directory to include starting files with the agent. Mastra mirrors files under `workspace/` into the agent's default runtime workspace at build time. The agent starts with those files on disk.
79
79
 
80
80
  ```text
81
81
  src/mastra/agents/weather/
@@ -244,7 +244,7 @@ servers: {
244
244
 
245
245
  ### `roots` and `sampling`
246
246
 
247
- Clients no longer advertise `roots`. `setRoots()` and `sendRootsListChanged()` are gone. Servers neither request sampling nor advertise it. A server that embeds a `roots/list` or `sampling/createMessage` request in `input_required` isn't answered: the client has no handler for those methods, so the call fails instead of fabricating a response.
247
+ Clients no longer advertise `roots`. `setRoots()` and `sendRootsListChanged()` are gone. Servers neither request sampling nor advertise it. A server that embeds a `roots/list` or `sampling/createMessage` request in `input_required` isn't answered: the client has no handler for those methods. The call fails instead of fabricating a response.
248
248
 
249
249
  ### `logging/setLevel` and `sendLoggingMessage`
250
250
 
@@ -153,7 +153,7 @@ describeSpanError(span) // SpanErrorInfo | undefined
153
153
 
154
154
  ### Processor spans
155
155
 
156
- A processor span records which pipeline phase produced it, so a reader narrows its payloads on that phase instead of on the payload's shape. The recorded phase is finer than the one a processor declares: `outputStream` and `outputResult` are separate here, because they record different payloads.
156
+ A processor span records which pipeline phase produced it. A reader narrows its payloads on that phase instead of on the payload's shape. The recorded phase is finer than the one a processor declares: `outputStream` and `outputResult` are separate here, because they record different payloads.
157
157
 
158
158
  ```typescript
159
159
  import { describeProcessorPipeline, describeSpanOutput } from '@mastra/core/observability'
@@ -283,21 +283,21 @@ Hono and Fastify enforce the request-body limit before JSON parsing. Express and
283
283
 
284
284
  ## Fields and operators
285
285
 
286
- | Predicate context | Fields | Operators |
287
- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
288
- | Trace | `traceId`, `threadId`, `resourceId`, `entityName`, `entityType`, `environment`, `status` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
289
- | Trace metadata | `metadata.<key>` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
290
- | Trace | `startedAt`, `endedAt`, `durationMs` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
291
- | Trace | `tags` | `includes`, `notIncludes`, `exists`, `notExists` |
292
- | Span | `name`, `spanType`, `model`, `provider`, `status`, `entityType`, `entityId`, `entityName`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
293
- | Span | `startedAt`, `endedAt`, `durationMs` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
294
- | Span | `error` | `exists`, `notExists` |
295
- | Score | `scorerId`, `scorerVersion`, `scoreSource`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
296
- | Score | `score`, `timestamp` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
297
- | Score | `spanId` | `exists`, `notExists` |
298
- | Feedback | `feedbackType`, `feedbackSource`, `feedbackUserId`, `sourceId`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
299
- | Feedback | `value`, `timestamp` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
300
- | Feedback | `comment` | `exists`, `notExists` |
286
+ | Predicate context | Fields | Operators |
287
+ | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
288
+ | Trace | `traceId`, `threadId`, `resourceId`, `runId`, `sessionId`, `userId`, `organizationId`, `entityName`, `entityType`, `environment`, `status` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
289
+ | Trace metadata | `metadata.<key>` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
290
+ | Trace | `startedAt`, `endedAt`, `durationMs` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
291
+ | Trace | `tags` | `includes`, `notIncludes`, `exists`, `notExists` |
292
+ | Span | `name`, `spanType`, `model`, `provider`, `status`, `entityType`, `entityId`, `entityName`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId`, `runId`, `sessionId`, `userId`, `organizationId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
293
+ | Span | `startedAt`, `endedAt`, `durationMs` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
294
+ | Span | `error` | `exists`, `notExists` |
295
+ | Score | `scorerId`, `scorerVersion`, `scoreSource`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
296
+ | Score | `score`, `timestamp` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
297
+ | Score | `spanId` | `exists`, `notExists` |
298
+ | Feedback | `feedbackType`, `feedbackSource`, `feedbackUserId`, `sourceId`, `entityVersionId`, `parentEntityVersionId`, `rootEntityVersionId` | `eq`, `ne`, `in`, `notIn`, `exists`, `notExists` |
299
+ | Feedback | `value`, `timestamp` | `eq`, `ne`, `in`, `notIn`, `lt`, `lte`, `gt`, `gte`, `exists`, `notExists` |
300
+ | Feedback | `comment` | `exists`, `notExists` |
301
301
 
302
302
  Compose predicates with `{ op: 'and', args: [...] }`, `{ op: 'or', args: [...] }`, and `{ op: 'not', arg: ... }`. Comparison predicates place a field reference on the left and a literal on the right. Membership predicates use a field reference in `value` and a homogeneous literal array in `set`. Tag predicates name the stored tag collection in `path`. `includes` and `notIncludes` also take one tag in `value`, while `exists` and `notExists` take only `op` and `path`. See [Filter by tags](#filter-by-tags).
303
303
 
@@ -319,6 +319,27 @@ This top-level predicate doesn't inspect child spans. In contrast, `spans.some`
319
319
 
320
320
  Trace queries exclude incomplete roots before evaluating predicates. As a result, `{ op: 'notExists', path: 'durationMs' }` doesn't find running traces or malformed roots without a usable `endedAt`.
321
321
 
322
+ ### Filter by context identifiers
323
+
324
+ `runId`, `sessionId`, `userId`, and `organizationId` are available at trace scope and inside `spans.some` / `spans.none`. Trace-scope predicates read the current root span. Span-scope predicates bind to one related current span, so a run recorded only on a child span is found through `spans.some`:
325
+
326
+ ```typescript
327
+ const sessionTracesWithRun = {
328
+ op: 'and',
329
+ args: [
330
+ { op: 'eq', left: { path: 'organizationId' }, right: { literal: 'org-123' } },
331
+ { op: 'eq', left: { path: 'sessionId' }, right: { literal: 'session-123' } },
332
+ {
333
+ spans: {
334
+ some: { op: 'eq', left: { path: 'runId' }, right: { literal: 'run-42' } },
335
+ },
336
+ },
337
+ ],
338
+ }
339
+ ```
340
+
341
+ These identifiers support `eq`, `ne`, `in`, `notIn`, `exists`, and `notExists`. Field discovery lists them, but value discovery doesn't return their recorded values. Stores advertise support through the `trace-query-context-ids` feature. A predicate on one of these fields against an older store returns `501` before storage runs, and field discovery omits them for that store.
342
+
322
343
  ### Filter by span properties
323
344
 
324
345
  Every condition inside one `spans.some` or `spans.none` clause applies to the same current span. For example, this predicate finds a failed tool span whose name is `medication_lookup`; a matching name on one span and an error on another don't satisfy it:
@@ -679,7 +700,7 @@ const plan = planTraceQuery(parseTraceQueryRequest(request), {
679
700
  })
680
701
  ```
681
702
 
682
- `resourceId` is optional and narrows within the organization. Keyset and delta cursors are bound to the scope, so a cursor minted under one scope and reused under another returns `409` before storage runs. A scoped request against an observability store or `@mastra/core` that predates tenant scope returns `501` instead of running unscoped. Stores advertise support through the `trace-query-tenant-scope` feature. Callers can't name `organizationId` or `projectId` in predicates. Without a scope the routes behave as before, so self-hosted installations keep their own tenant model.
703
+ `resourceId` is optional and narrows within the organization. Keyset and delta cursors are bound to the scope. A cursor created under one scope and reused under another returns `409` before storage runs. A scoped request against an observability store or `@mastra/core` that predates tenant scope returns `501` instead of running unscoped. Stores advertise support through the `trace-query-tenant-scope` feature. Callers can't name `projectId` in predicates. An `organizationId` predicate compares recorded data and is ANDed with the scope, so it can only narrow the tenant's own traces and never widens it. Without a scope the routes behave as before, so self-hosted installations keep their own tenant model.
683
704
 
684
705
  Cursor pagination is deterministic, but it isn't a database snapshot. Traces or replacement signals written between page requests can change later pages.
685
706
 
@@ -223,7 +223,7 @@ Before enabling routing, run a sample of your traffic with and without the proce
223
223
 
224
224
  - The classifier runs **once per request**, in `processInput`, not once per step. The decision is stashed in per-request state and read on each step.
225
225
  - Only the **latest user message** is classified. The system prompt, retrieved context, and earlier turns aren't sent to the classifier, which keeps the routing call flat as context grows. A terse follow-up such as `"now apply that to the rest"` is therefore routed on that sentence alone. If your follow-ups often re-open hard reasoning rather than applying an earlier result, keep them on the capable model by leaving it as the default.
226
- - Only downgrade. Keep the capable model as the agent's configured default and use the processor to move down, so an incorrect decision costs quality on that request. With the default `scope: 'run'`, a bad downgrade applies to every step of the run, so a run that turns out harder than its first message stays on the cheaper model.
226
+ - Only downgrade. Keep the capable model as the agent's configured default and use the processor to move down. An incorrect decision then costs quality on that request. With the default `scope: 'run'`, a bad downgrade applies to every step of the run. A run that turns out harder than its first message stays on the cheaper model.
227
227
  - The processor adds a classifier round-trip to the critical path of every request, including those it ends up abstaining on.
228
228
  - With `choices`, each criterion is named after its model, so `onDecision` reports the chosen model as the `choice`.
229
229
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  Use it for distributed deployments on Google Cloud. For single-process delivery, use [`EventEmitterPubSub`](https://mastra.ai/reference/pubsub/event-emitter). For Redis, use [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams).
10
10
 
11
- Each topic maps to a Google Cloud topic. Subscriptions with a group share a subscription, so members compete for events. Subscriptions without a group create a per-instance subscription, so every instance receives every event.
11
+ Each topic maps to a Google Cloud topic. Subscriptions with a group share a subscription. Members compete for events. Subscriptions without a group create a per-instance subscription. Every instance receives every event.
12
12
 
13
13
  ## Installation
14
14
 
@@ -4,11 +4,11 @@
4
4
 
5
5
  # RedisStreamsPubSub
6
6
 
7
- `RedisStreamsPubSub` is a [`PubSub`](https://mastra.ai/reference/pubsub/base) implementation backed by [Redis Streams](https://redis.io/docs/latest/develop/data-types/streams/). It delivers events across processes and hosts, with persistence, consumer groups, and redelivery on failure. It also implements [`LeaseProvider`](https://mastra.ai/reference/pubsub/lease-provider), so the signals layer can elect a single owner per resource across instances, which is what lets signals coordinate runs in distributed and serverless deployments.
7
+ `RedisStreamsPubSub` is a [`PubSub`](https://mastra.ai/reference/pubsub/base) implementation backed by [Redis Streams](https://redis.io/docs/latest/develop/data-types/streams/). It delivers events across processes and hosts, with persistence, consumer groups, and redelivery on failure. It also implements [`LeaseProvider`](https://mastra.ai/reference/pubsub/lease-provider). The signals layer can elect a single owner per resource across instances, which is what lets signals coordinate runs in distributed and serverless deployments.
8
8
 
9
9
  Use it for distributed deployments where several services share an event stream. For single-process delivery, use [`EventEmitterPubSub`](https://mastra.ai/reference/pubsub/event-emitter). For Google Cloud, use [`GoogleCloudPubSub`](https://mastra.ai/reference/pubsub/google-cloud-pubsub).
10
10
 
11
- Each topic maps to a Redis stream key. Subscriptions with a group use a Redis consumer group, so members share work round-robin. Subscriptions without a group create a private consumer group, so every subscriber receives every event.
11
+ Each topic maps to a Redis stream key. Subscriptions with a group use a Redis consumer group. Members share work round-robin. Subscriptions without a group create a private consumer group. Every subscriber receives every event.
12
12
 
13
13
  `RedisStreamsPubSub` is a pull transport: consumers read events with `XREADGROUP`, so Mastra runs an orchestration worker to read on its behalf.
14
14
 
@@ -74,7 +74,7 @@ export const mastra = new Mastra({
74
74
 
75
75
  ### Bring your own client
76
76
 
77
- To control client construction yourself (TLS, credential providers, and so on), pass an unconnected `redis` client as `client`. The pubsub uses it as its writer and calls `client.duplicate()` for each subscription's blocking reader, so every connection stays distinct. The pubsub owns the client's lifecycle (it connects on first use and quits it on `close()`), so don't share it with the rest of your app.
77
+ To control client construction yourself (TLS, credential providers, and so on), pass an unconnected `redis` client as `client`. The pubsub uses it as its writer and calls `client.duplicate()` for each subscription's blocking reader. Every connection stays distinct. The pubsub owns the client's lifecycle (it connects on first use and quits it on `close()`), so don't share it with the rest of your app.
78
78
 
79
79
  ```typescript
80
80
  import { RedisStreamsPubSub } from '@mastra/redis-streams'
@@ -127,7 +127,7 @@ Throws if the snapshot version is unsupported, if a node embedding doesn't match
127
127
 
128
128
  ## Persisting a graph
129
129
 
130
- Building a graph is O(n²) in the number of chunks, so rebuilding it on every process start is wasteful. Serialize the graph once and store the snapshot wherever you already keep state. A snapshot is plain JSON, so any store works (a file, a blob column, a key-value cache), and `GraphRAG` doesn't depend on a storage backend.
130
+ Building a graph is O(n²) in the number of chunks, so rebuilding it on every process start is wasteful. Serialize the graph once and store the snapshot wherever you already keep state. A snapshot is plain JSON. Any store works (a file, a blob column, a key-value cache), and `GraphRAG` doesn't depend on a storage backend.
131
131
 
132
132
  ```typescript
133
133
  import { readFile, writeFile } from 'node:fs/promises'
@@ -202,7 +202,7 @@ async function retentionTick() {
202
202
  }
203
203
  ```
204
204
 
205
- You can also cancel a long-running prune with an `AbortSignal`: the loop stops between batches and returns partial results with `done: false`, so the next run resumes cleanly.
205
+ You can also cancel a long-running prune with an `AbortSignal`: the loop stops between batches and returns partial results with `done: false`. The next run resumes cleanly.
206
206
 
207
207
  ## ClickHouse native TTL
208
208
 
@@ -25,6 +25,8 @@ Controls which workers start in the current process.
25
25
 
26
26
  Use this to run different worker types in separate containers from the same build artifact.
27
27
 
28
+ Setting `MASTRA_WORKERS` to any value, including `"false"`, also makes `createWorkflow` build workflows that declare `schedule` on the evented engine. Set it on every process in a split deployment. See [Scheduled workflows](https://mastra.ai/docs/workflows/scheduled-workflows).
29
+
28
30
  ### `MASTRA_STEP_EXECUTION_URL`
29
31
 
30
32
  The base URL of the API server, used by the orchestration worker to execute workflow steps remotely. Required when the orchestration worker runs in a separate process from the API.
@@ -61,7 +63,7 @@ Processes workflow events from the PubSub `workflows` topic. Requires a pull-cap
61
63
 
62
64
  ### SchedulerWorker
63
65
 
64
- Polls storage for due cron schedules and publishes `workflow.start` events.
66
+ Polls storage for due cron schedules and publishes a `workflow.start` event to the `workflows` topic for each fire. The orchestration worker runs default-engine workflows in-process and evented workflows step by step.
65
67
 
66
68
  - **Name**: `scheduler`
67
69
  - **Single instance only**: Run exactly one instance to avoid duplicate fires
@@ -103,7 +103,7 @@ export const testWorkflow = createWorkflow({
103
103
 
104
104
  **requestContextSchema** (`StandardJSONSchemaV1`): Standard JSON Schema for validating request context values. When provided, the context is validated at the start of run.start(), throwing an error if validation fails.
105
105
 
106
- **schedule** (`WorkflowScheduleConfig | WorkflowScheduleConfig[]`): Optional cron schedule for the workflow. Accepts a single config or an array of configs to fire on multiple cadences. Setting this auto-promotes the workflow to the evented execution engine. See the scheduled workflows guide for usage.
106
+ **schedule** (`WorkflowScheduleConfig | WorkflowScheduleConfig[]`): Optional cron schedule for the workflow. Accepts a single config or an array of configs to fire on multiple cadences. Declaring a schedule keeps the execution engine unchanged unless the MASTRA\_WORKERS environment variable is set, in which case the workflow runs on the evented engine. See the scheduled workflows guide for usage.
107
107
 
108
108
  **schedule.id** (`string`): Stable identifier for the schedule. Required when passing an array of schedules. Defaults to the workflow id when passing a single schedule object.
109
109
 
@@ -227,7 +227,7 @@ await sandbox.snapshot()
227
227
 
228
228
  Each `id` maps to one independent filesystem. Reusing the same `id` across unrelated sandboxes causes the platform to boot them from each other's checkpoint.
229
229
 
230
- Set `seedCheckpointName` to provide a boot-only fallback when the checkpoint for `id` doesn't exist yet. The platform restores the checkpoint for `id` first when both exist. Later snapshots continue writing to the checkpoint for `id`, so the seed remains unchanged.
230
+ Set `seedCheckpointName` to provide a boot-only fallback when the checkpoint for `id` doesn't exist yet. The platform restores the checkpoint for `id` first when both exist. Later snapshots continue writing to the checkpoint for `id`. The seed remains unchanged.
231
231
 
232
232
  ```typescript
233
233
  const sandbox = new PlatformSandbox({
@@ -67,7 +67,7 @@ new E2BSandbox({
67
67
 
68
68
  Semantics:
69
69
 
70
- - A thrown error is fatal: `start()` rejects with the hook's error and the sandbox is marked `error`, so a caller never observes a running sandbox whose setup hook failed. Nothing is latched, and the next `start()` (including the one triggered by the next lazy command) retries the hook. `onStop` and `onDestroy` remain non-fatal observers, because teardown proceeds best-effort.
70
+ - A thrown error is fatal: `start()` rejects with the hook's error and the sandbox is marked `error`. A caller never observes a running sandbox whose setup hook failed. Nothing is latched, and the next `start()` (including the one triggered by the next lazy command) retries the hook. `onStop` and `onDestroy` remain non-fatal observers, because teardown proceeds best-effort.
71
71
  - `outcome` distinguishes the branches: `'created'` means this start provisioned a fresh VM (run setup), `'connected'` means it reconnected or resumed (setup normally already ran, so probe when the hook must self-heal a crash between create and setup-complete). `undefined` means the provider doesn't report.
72
72
  - Keep setup work idempotent. A hook re-runs whenever a probe decides it should, and a checkpoint-recovered fresh VM reports `outcome: 'created'`.
73
73
  - The sandbox status flips to `running` before the hook executes (the hook runs commands through the sandbox's own command path), so commands issued concurrently through `ensureRunning()` can interleave with it. Callers awaiting the original `start()` always observe a sandbox whose hook finished.
@@ -253,7 +253,7 @@ await workspace.stop()
253
253
 
254
254
  `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.
255
255
 
256
- `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.
256
+ `mastra.shutdown()` calls `stop()` for registered workspaces. 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.
257
257
 
258
258
  #### `destroy()`
259
259
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "1.3.2-alpha.12",
3
+ "version": "1.3.2-alpha.15",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -27,7 +27,7 @@
27
27
  "local-pkg": "^1.1.2",
28
28
  "zod": "^4.6.4",
29
29
  "@mastra/mcp": "^2.1.1-alpha.0",
30
- "@mastra/core": "1.72.0-alpha.7"
30
+ "@mastra/core": "1.72.0-alpha.9"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hono/node-server": "^2.0.0",
@@ -44,8 +44,8 @@
44
44
  "typescript": "^7.0.2",
45
45
  "vitest": "4.1.11",
46
46
  "@internal/types-builder": "0.0.112",
47
- "@internal/lint": "0.0.137",
48
- "@mastra/core": "1.72.0-alpha.7"
47
+ "@mastra/core": "1.72.0-alpha.9",
48
+ "@internal/lint": "0.0.137"
49
49
  },
50
50
  "homepage": "https://mastra.ai",
51
51
  "repository": {