@mastra/mcp-docs-server 1.3.9-alpha.1 → 1.3.9-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.
- package/.docs/docs/agents/guardrails.md +3 -0
- package/.docs/docs/agents/human-in-the-loop.md +2 -1
- package/.docs/docs/agents/processors.md +3 -0
- package/.docs/docs/harness/agent-controller.md +1 -1
- package/.docs/docs/harness/background-tasks.md +11 -0
- package/.docs/docs/harness/durable-agents.md +24 -8
- package/.docs/docs/harness/signals.md +3 -1
- package/.docs/docs/mastra-platform/connect/channels.md +14 -2
- package/.docs/docs/mastra-platform/connect/overview.md +1 -1
- package/.docs/docs/mastra-platform/connect/providers.md +1 -0
- package/.docs/docs/mastra-platform/connect/tools.md +25 -3
- package/.docs/docs/mastra-platform/observability.md +1 -1
- package/.docs/docs/memory/observational-memory.md +4 -2
- package/.docs/docs/memory/semantic-recall.md +2 -0
- package/.docs/docs/studio/overview.md +8 -0
- package/.docs/docs/workflows/control-flow.md +3 -1
- package/.docs/docs/workflows/overview.md +2 -0
- package/.docs/docs/workflows/time-travel.md +1 -1
- package/.docs/integrations/databases/clickhouse.md +1 -1
- package/.docs/integrations/voice/google.md +6 -0
- package/.docs/models/embeddings.md +2 -1
- package/.docs/models/environment-variables.md +2 -0
- package/.docs/models/gateways/merge-gateway.md +3 -1
- package/.docs/models/gateways/netlify.md +8 -4
- package/.docs/models/gateways/openrouter.md +8 -4
- package/.docs/models/gateways/vercel.md +9 -4
- package/.docs/models/index.md +3 -1
- package/.docs/models/providers/302ai.md +2 -1
- package/.docs/models/providers/aimlapi.md +3 -3
- package/.docs/models/providers/alibaba-token-plan-cn.md +31 -30
- package/.docs/models/providers/baseten.md +27 -25
- package/.docs/models/providers/cloudflare-workers-ai.md +2 -1
- package/.docs/models/providers/commandcode.md +147 -0
- package/.docs/models/providers/coralbricks.md +5 -8
- package/.docs/models/providers/cortecs.md +5 -6
- package/.docs/models/providers/databricks.md +2 -1
- package/.docs/models/providers/deepinfra.md +2 -1
- package/.docs/models/providers/edenai.md +11 -3
- package/.docs/models/providers/empiriolabs.md +3 -1
- package/.docs/models/providers/engy.md +12 -11
- package/.docs/models/providers/fireworks-ai.md +2 -1
- package/.docs/models/providers/huggingface.md +2 -1
- package/.docs/models/providers/hyper.md +26 -25
- package/.docs/models/providers/kenari.md +1 -1
- package/.docs/models/providers/kilo.md +29 -24
- package/.docs/models/providers/llmgateway-providers.md +9 -12
- package/.docs/models/providers/llmgateway.md +3 -4
- package/.docs/models/providers/melious.md +16 -15
- package/.docs/models/providers/minimax-cn-coding-plan.md +2 -1
- package/.docs/models/providers/minimax-cn.md +3 -2
- package/.docs/models/providers/minimax-coding-plan.md +2 -1
- package/.docs/models/providers/minimax.md +3 -2
- package/.docs/models/providers/nano-gpt.md +61 -55
- package/.docs/models/providers/nearai.md +1 -1
- package/.docs/models/providers/nebius.md +2 -1
- package/.docs/models/providers/novita-ai.md +2 -1
- package/.docs/models/providers/nvidia.md +2 -1
- package/.docs/models/providers/ofox.md +26 -25
- package/.docs/models/providers/ollama-cloud.md +31 -29
- package/.docs/models/providers/openai.md +1 -1
- package/.docs/models/providers/opencode-go.md +7 -7
- package/.docs/models/providers/opencode.md +91 -91
- package/.docs/models/providers/pioneer.md +120 -119
- package/.docs/models/providers/prime.md +4 -1
- package/.docs/models/providers/reflection.md +77 -0
- package/.docs/models/providers/requesty.md +6 -2
- package/.docs/models/providers/scaleway.md +2 -1
- package/.docs/models/providers/standardcompute.md +47 -8
- package/.docs/models/providers/togetherai.md +4 -1
- package/.docs/models/providers/upstage.md +8 -7
- package/.docs/models/providers/wandb.md +4 -2
- package/.docs/models/providers/xai.md +0 -1
- package/.docs/models/providers/zenmux.md +2 -1
- package/.docs/models/providers.md +2 -0
- package/.docs/reference/agent-controller/session.md +3 -2
- package/.docs/reference/agents/channels.md +5 -1
- package/.docs/reference/agents/durable-agent.md +16 -7
- package/.docs/reference/agents/inngest-agent.md +4 -4
- package/.docs/reference/classifier/classifier.md +31 -7
- package/.docs/reference/cli/mastra.md +43 -6
- package/.docs/reference/client-js/agent-controller.md +2 -0
- package/.docs/reference/client-js/agents.md +20 -0
- package/.docs/reference/client-js/observability.md +165 -6
- package/.docs/reference/configuration.md +30 -0
- package/.docs/reference/connect/channels.md +2 -2
- package/.docs/reference/connect/providers.md +38 -3
- package/.docs/reference/connect/tools.md +21 -2
- package/.docs/reference/core/mastra-class.md +7 -1
- package/.docs/reference/datasets/list.md +9 -1
- package/.docs/reference/evals/create-classifier-scorer.md +1 -0
- package/.docs/reference/index.md +1 -1
- package/.docs/reference/memory/observational-memory.md +2 -2
- package/.docs/reference/memory/settled.md +13 -5
- package/.docs/reference/observability/metrics/automatic-metrics.md +3 -3
- package/.docs/reference/observability/metrics/queries.md +1 -0
- package/.docs/reference/observability/tracing/{trace-query.md → advanced-queries.md} +477 -158
- package/.docs/reference/observability/tracing/interfaces.md +6 -0
- package/.docs/reference/processors/classifier-processor.md +8 -6
- package/.docs/reference/processors/model-selection-processor.md +2 -2
- package/.docs/reference/processors/moderation-processor.md +5 -1
- package/.docs/reference/processors/system-prompt-scrubber.md +4 -0
- package/.docs/reference/rag/embeddings.md +18 -0
- package/.docs/reference/signals/create-notification-inbox-tool.md +11 -9
- package/.docs/reference/streaming/agents/stream.md +19 -1
- package/.docs/reference/tools/create-tool.md +2 -2
- package/.docs/reference/tools/mcp-client.md +2 -2
- package/.docs/reference/workflows/dynamic-workflow-definition.md +1 -1
- package/.docs/reference/workflows/run-methods/resume.md +1 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +15 -16
- package/.docs/reference/workflows/step.md +1 -0
- package/.docs/reference/workflows/workflow-methods/classifier.md +1 -0
- package/.docs/reference/workspace/factory-sandbox.md +2 -0
- package/.docs/reference/workspace/filesystem.md +4 -0
- package/.docs/reference/workspace/workspace-class.md +10 -10
- package/package.json +7 -8
|
@@ -75,7 +75,7 @@ OM performs thresholding with fast local token estimation. Text uses `tokenx`, a
|
|
|
75
75
|
|
|
76
76
|
**observation.maxRetries** (`number`): Retries after the initial Observer model call on transient provider errors. Governs OM's own retry ladder; the Observer model call itself is configured with no provider-level retries.
|
|
77
77
|
|
|
78
|
-
**observation.failurePolicy** (`'abort' | 'continue'`): Terminal policy once Observer retries are exhausted. 'abort' aborts the agent turn. 'continue' emits the existing failure diagnostic, keeps the failed input pending for a later cycle, and allows the main agent turn to continue. Persistence, indexing, transform, locking, invariant, and explicit abort failures remain fatal. This setting doesn't prevent the underlying provider error or change blockAfter or attachment handling, and it has no backstop for a sustained outage: pending messages keep accruing in the main agent's context until they reach the model's context limit.
|
|
78
|
+
**observation.failurePolicy** (`'abort' | 'continue'`): Terminal policy once Observer retries are exhausted in a synchronous observation. Background buffered observation failures are reported as om\_buffering\_failed and never stop the turn. 'abort' aborts the agent turn. 'continue' emits the existing failure diagnostic, keeps the failed input pending for a later cycle, and allows the main agent turn to continue. Persistence, indexing, transform, locking, invariant, and explicit abort failures remain fatal. This setting doesn't prevent the underlying provider error or change blockAfter or attachment handling, and it has no backstop for a sustained outage: pending messages keep accruing in the main agent's context until they reach the model's context limit.
|
|
79
79
|
|
|
80
80
|
**observation.messageTokens** (`number`): Token count of unobserved messages that triggers observation. When unobserved message tokens exceed this threshold, the Observer agent is called. Text is estimated locally with tokenx. Image parts are included with model-aware heuristics when possible, with deterministic fallbacks when image metadata is incomplete. Image-like file parts are counted the same way when uploads are normalized as files.
|
|
81
81
|
|
|
@@ -111,7 +111,7 @@ OM performs thresholding with fast local token estimation. Text uses `tokenx`, a
|
|
|
111
111
|
|
|
112
112
|
**reflection.maxRetries** (`number`): Retries after the initial Reflector model call on transient provider errors. Governs OM's own retry ladder; the Reflector model call itself is configured with no provider-level retries.
|
|
113
113
|
|
|
114
|
-
**reflection.failurePolicy** (`'abort' | 'continue'`): Terminal policy once Reflector retries are exhausted. 'abort' aborts the agent turn. 'continue' emits the failure diagnostic and allows the turn to continue, leaving already-persisted observations committed and deferring reflection to the next threshold crossing. A provider outage usually takes out both stages, so set the policy on observation too if the turn should survive one.
|
|
114
|
+
**reflection.failurePolicy** (`'abort' | 'continue'`): Terminal policy once Reflector retries are exhausted in a synchronous reflection. Background buffered reflection failures are reported as om\_buffering\_failed and never stop the turn. 'abort' aborts the agent turn. 'continue' emits the failure diagnostic and allows the turn to continue, leaving already-persisted observations committed and deferring reflection to the next threshold crossing. A provider outage usually takes out both stages, so set the policy on observation too if the turn should survive one.
|
|
115
115
|
|
|
116
116
|
**reflection.instruction** (`string`): Custom instruction appended to the Reflector's system prompt. Use this to customize how the Reflector consolidates observations, such as prioritizing certain types of information.
|
|
117
117
|
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
# Memory.settled()
|
|
6
6
|
|
|
7
|
-
The `.settled()` method resolves once
|
|
7
|
+
The `.settled()` method resolves once background work the `Memory` instance started has finished. Some memory work continues after an agent run returns:
|
|
8
8
|
|
|
9
9
|
- Observational memory cycles (buffered observation and reflection, including the nested agent runs they spawn)
|
|
10
10
|
- Vector cleanup started by `deleteThread()` and `deleteMessages()`
|
|
11
11
|
|
|
12
|
-
Await this method before closing a storage connection you own. Without it, background statements can run against a closed connection.
|
|
12
|
+
Await this method before closing a storage connection you own. Without it, background statements can run against a closed connection. A scoped call can return while other threads still use the store, so call `settled()` without a scope before closing shared storage.
|
|
13
13
|
|
|
14
|
-
The method is declared on the base memory class, so it's also available on the `MastraMemory` instance returned by `agent.getMemory()`.
|
|
14
|
+
The method is declared on the base memory class, so it's also available on the `MastraMemory` instance returned by `agent.getMemory()`. The `scope` parameter is only on `Memory` from `@mastra/memory`.
|
|
15
15
|
|
|
16
16
|
## Usage example
|
|
17
17
|
|
|
@@ -26,11 +26,19 @@ await store.close()
|
|
|
26
26
|
|
|
27
27
|
## Parameters
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
**scope** (`{ threadId?: string | null; resourceId?: string | null }`): Waits only for observational memory work on this thread (or resource, when observational memory uses resource scope). If the scope omits the id observational memory is keyed on (threadId for thread scope, resourceId for resource scope), it waits for all work. Vector cleanup is always included.
|
|
30
30
|
|
|
31
31
|
## Returns
|
|
32
32
|
|
|
33
|
-
**void** (`Promise<void>`): A promise that resolves when
|
|
33
|
+
**void** (`Promise<void>`): A promise that resolves when the requested background memory work has finished (all work, if unscoped). Background work that fails does not reject this promise.
|
|
34
|
+
|
|
35
|
+
## Wait for one conversation
|
|
36
|
+
|
|
37
|
+
On a busy server, waiting for all work can take a long time because other threads keep starting new work. Pass a scope to wait for less. When observational memory uses thread scope, the call below waits for `thread-123` only. When it uses resource scope, it waits for every thread under `user-456`:
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
await memory.settled({ threadId: 'thread-123', resourceId: 'user-456' })
|
|
41
|
+
```
|
|
34
42
|
|
|
35
43
|
## Extended usage example
|
|
36
44
|
|
|
@@ -10,7 +10,7 @@ For setup instructions, see the [Metrics overview](https://mastra.ai/docs/observ
|
|
|
10
10
|
|
|
11
11
|
## When Mastra emits automatic metrics
|
|
12
12
|
|
|
13
|
-
Metrics are extracted from spans when they end. The observability layer inspects each completed span, calculates duration, and
|
|
13
|
+
Metrics are extracted from spans when they end. The observability layer inspects each completed span, calculates duration, and reads token usage data from model generation and classifier evaluation spans. No manual instrumentation is needed.
|
|
14
14
|
|
|
15
15
|
### What affects whether a metric is available
|
|
16
16
|
|
|
@@ -35,7 +35,7 @@ Duration metrics record execution time in milliseconds, calculated from the span
|
|
|
35
35
|
|
|
36
36
|
## Token usage metrics
|
|
37
37
|
|
|
38
|
-
Token metrics are emitted
|
|
38
|
+
Token metrics are emitted from `MODEL_GENERATION` and `CLASSIFIER_EVALUATION` spans that include `usage` data. Token metrics require usage data from the provider.
|
|
39
39
|
|
|
40
40
|
### Input token metrics
|
|
41
41
|
|
|
@@ -142,7 +142,7 @@ When you spot a spike in latency or token usage on the Metrics dashboard, correl
|
|
|
142
142
|
|
|
143
143
|
### Token metrics are missing
|
|
144
144
|
|
|
145
|
-
- **Span is a model generation**: Token metrics are only emitted from `MODEL_GENERATION` spans.
|
|
145
|
+
- **Span is a model generation or classifier evaluation**: Token metrics are only emitted from `MODEL_GENERATION` and `CLASSIFIER_EVALUATION` spans.
|
|
146
146
|
- **Provider reports usage**: The model provider must include `usage` data in its response. Usage data is required to emit token metrics.
|
|
147
147
|
|
|
148
148
|
## Related
|
|
@@ -110,6 +110,7 @@ All metric operations accept the same optional `filters` object. Raw list reques
|
|
|
110
110
|
| `userId` | `string` | User ID |
|
|
111
111
|
| `organizationId` | `string` | Organization ID |
|
|
112
112
|
| `experimentId` | `string` | Experiment or evaluation run ID |
|
|
113
|
+
| `experimentIds` | `string[]` | One to 1,000 experiment IDs |
|
|
113
114
|
| `serviceName` | `string` | Service name |
|
|
114
115
|
| `environment` | `string` | Environment name |
|
|
115
116
|
| `resourceId` | `string` | Resource ID |
|