@mastra/mcp-docs-server 1.2.16-alpha.3 → 1.2.16-alpha.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.
- package/.docs/docs/agents/a2a.md +1 -1
- package/.docs/docs/agents/guardrails.md +11 -10
- package/.docs/docs/agents/overview.md +2 -0
- package/.docs/docs/agents/processors.md +8 -8
- package/.docs/docs/agents/structured-output.md +1 -1
- package/.docs/docs/agents/using-tools.md +51 -12
- package/.docs/docs/browser/overview.md +22 -3
- package/.docs/docs/capabilities/subagents.md +2 -2
- package/.docs/docs/datasets/running-experiments.md +2 -2
- package/.docs/docs/deployment/overview.md +3 -3
- package/.docs/docs/deployment/sandbox.md +1 -1
- package/.docs/docs/deployment/workers.md +5 -5
- package/.docs/docs/deployment/workflow-runners.md +1 -1
- package/.docs/docs/editor/overview.md +3 -1
- package/.docs/docs/evals/custom-scorers.md +1 -1
- package/.docs/docs/evals/multi-turn.md +1 -1
- package/.docs/docs/evals/overview.md +3 -3
- package/.docs/docs/getting-started/develop.md +1 -1
- package/.docs/docs/harness/agent-controller.md +2 -2
- package/.docs/docs/harness/overview.md +1 -1
- package/.docs/docs/long-running-agents/background-tasks.md +2 -2
- package/.docs/docs/long-running-agents/goals.md +3 -2
- package/.docs/docs/long-running-agents/signals.md +2 -2
- package/.docs/docs/mastra-platform/deploy.md +1 -1
- package/.docs/docs/mastra-platform/github.md +1 -1
- package/.docs/docs/mastra-platform/observability.md +1 -1
- package/.docs/docs/mastra-platform/overview.md +3 -3
- package/.docs/docs/mastra-platform/server.md +2 -2
- package/.docs/docs/mastra-platform/trace-intelligence.md +3 -3
- package/.docs/docs/memory/memory-processors.md +1 -1
- package/.docs/docs/memory/message-history.md +2 -2
- package/.docs/docs/memory/observational-memory.md +13 -13
- package/.docs/docs/memory/semantic-recall.md +1 -1
- package/.docs/docs/memory/working-memory.md +1 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/metrics/querying.md +1 -1
- package/.docs/docs/observability/tracing/overview.md +3 -3
- package/.docs/docs/server/custom-adapters.md +2 -2
- package/.docs/docs/server/custom-api-routes.md +1 -1
- package/.docs/docs/server/mastra-client.md +1 -1
- package/.docs/docs/server/server-adapters.md +1 -1
- package/.docs/docs/studio/deployment.md +2 -2
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/studio/overview.md +2 -0
- package/.docs/docs/workflows/dynamic-workflows.md +1 -1
- package/.docs/docs/workflows/scheduled-workflows.md +1 -1
- package/.docs/docs/workflows/suspend-and-resume.md +1 -1
- package/.docs/docs/workspace/overview.md +2 -1
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/docs/workspace/skills.md +1 -1
- package/.docs/integrations/browsers/agent-browser.md +2 -3
- package/.docs/integrations/browsers/firecrawl.md +0 -1
- package/.docs/integrations/browsers/stagehand.md +2 -3
- package/.docs/models/gateways/openrouter.md +1 -2
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/kilo.md +6 -7
- package/.docs/models/providers/nano-gpt.md +2 -1
- package/.docs/reference/acp/acp-agent.md +1 -1
- package/.docs/reference/agent-controller/session.md +1 -1
- package/.docs/reference/agents/channels.md +1 -1
- package/.docs/reference/agents/inngest-agent.md +1 -1
- package/.docs/reference/ai-sdk/overview.md +1 -1
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/google.md +1 -1
- package/.docs/reference/browser/agent-browser.md +2 -2
- package/.docs/reference/browser/browser-viewer.md +1 -1
- package/.docs/reference/browser/stagehand-browser.md +2 -2
- package/.docs/reference/channels/channel-provider.md +1 -1
- package/.docs/reference/channels/slack-provider.md +1 -1
- package/.docs/reference/cli/mastra.md +5 -5
- package/.docs/reference/code-sdk/mount-agent-controller.md +1 -1
- package/.docs/reference/coding-agent/build-base-prompt.md +2 -1
- package/.docs/reference/configuration.md +3 -3
- package/.docs/reference/core/getAgentById.md +1 -1
- package/.docs/reference/core/getWorkflow.md +2 -2
- package/.docs/reference/core/mastra-class.md +1 -1
- package/.docs/reference/deployer/netlify.md +1 -1
- package/.docs/reference/deployer.md +1 -1
- package/.docs/reference/editor/prompt-blocks.md +1 -1
- package/.docs/reference/editor/tools.md +1 -1
- package/.docs/reference/evals/completeness.md +1 -1
- package/.docs/reference/evals/noise-sensitivity.md +1 -1
- package/.docs/reference/evals/summarization.md +1 -1
- package/.docs/reference/file-based-agents/config.md +1 -1
- package/.docs/reference/file-based-agents/skills.md +5 -5
- package/.docs/reference/file-based-agents/workspace.md +1 -1
- package/.docs/reference/index.md +1 -1
- package/.docs/reference/logging/pino-logger.md +1 -1
- package/.docs/reference/memory/observational-memory.md +12 -4
- package/.docs/reference/migrations/upgrade-to-v1/agent.md +3 -3
- package/.docs/reference/migrations/upgrade-to-v1/client.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/evals.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/mastra.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/mcp.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/overview.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/processors.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/storage.md +5 -5
- package/.docs/reference/migrations/upgrade-to-v1/tools.md +1 -1
- package/.docs/reference/observability/tracing/bridges/datadog.md +1 -1
- package/.docs/reference/observability/tracing/bridges/otel.md +1 -1
- package/.docs/reference/observability/tracing/exporters/arize.md +1 -1
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +2 -2
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/otel.md +1 -1
- package/.docs/reference/observability/tracing/exporters/sentry.md +1 -1
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +27 -3
- package/.docs/reference/processors/batch-parts-processor.md +1 -1
- package/.docs/reference/processors/language-detector.md +1 -2
- package/.docs/reference/processors/processor-interface.md +16 -16
- package/.docs/reference/processors/stream-error-retry-processor.md +2 -2
- package/.docs/reference/processors/token-cost-control.md +154 -0
- package/.docs/reference/rag/chunking-and-embedding.md +1 -1
- package/.docs/reference/rag/metadata-filters.md +1 -1
- package/.docs/reference/server/koa-adapter.md +1 -1
- package/.docs/reference/signals/webhook-signal-provider.md +1 -1
- package/.docs/reference/storage/retention.md +1 -1
- package/.docs/reference/tools/bedrock-kb-tool.md +1 -1
- package/.docs/reference/tools/mcp-client.md +3 -3
- package/.docs/reference/tools/mcp-server.md +5 -5
- package/.docs/reference/tools/task-tools.md +1 -1
- package/.docs/reference/tools/vector-query-tool.md +1 -1
- package/.docs/reference/vectors/chroma.md +1 -1
- package/.docs/reference/vectors/convex.md +1 -1
- package/.docs/reference/vectors/couchbase.md +1 -1
- package/.docs/reference/vectors/mongodb.md +2 -2
- package/.docs/reference/vectors/pg.md +1 -1
- package/.docs/reference/vectors/qdrant.md +2 -2
- package/.docs/reference/voice/overview.md +1 -1
- package/.docs/reference/voice/speech-to-speech.md +1 -1
- package/.docs/reference/voice/speech-to-text.md +1 -1
- package/.docs/reference/voice/voice.on.md +1 -1
- package/.docs/reference/voice/voice.updateConfig.md +1 -1
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +1 -1
- package/CHANGELOG.md +14 -0
- package/package.json +5 -5
- package/.docs/docs/browser/recording.md +0 -120
- package/.docs/reference/processors/cost-guard-processor.md +0 -115
|
@@ -98,7 +98,7 @@ export const claudeCodeAgent = new AcpAgent({
|
|
|
98
98
|
|
|
99
99
|
#### `generate(messages, options?)`
|
|
100
100
|
|
|
101
|
-
Sends the prompt to the ACP agent
|
|
101
|
+
Sends the prompt to the ACP agent and buffers text chunks from the response before returning a Mastra subagent generate result.
|
|
102
102
|
|
|
103
103
|
```typescript
|
|
104
104
|
const result = await codeAgent.generate('Inspect the repository and summarize the test setup')
|
|
@@ -249,7 +249,7 @@ const usage = session.getTokenUsage()
|
|
|
249
249
|
|
|
250
250
|
## Identity
|
|
251
251
|
|
|
252
|
-
`session.identity` owns the stable identifiers for the conversation: the resource ID
|
|
252
|
+
`session.identity` owns the stable identifiers for the conversation: the resource ID and session `id`, plus an `ownerId`. The `id` and `ownerId` are stable for the life of the session and don't change when the resource ID is switched. They mirror the `id` and `ownerId` fields on `SessionRecord` in storage.
|
|
253
253
|
|
|
254
254
|
### `session.identity.getId()`
|
|
255
255
|
|
|
@@ -309,7 +309,7 @@ The `ResolveResourceIdContext` passed to the function:
|
|
|
309
309
|
|
|
310
310
|
## Thread ID resolution
|
|
311
311
|
|
|
312
|
-
By default a new channel thread gets a random UUID as its internal Mastra thread id. Pass `resolveThreadId` to pick the id yourself: for example, give the thread the same id as
|
|
312
|
+
By default a new channel thread gets a random UUID as its internal Mastra thread id. Pass `resolveThreadId` to pick the id yourself: for example, give the thread the same id as its session to match the names your app assigns to threads it creates.
|
|
313
313
|
|
|
314
314
|
The hook runs after `resolveResourceId`, so the resolved owner is available on the context. Like `resolveResourceId` it runs only when a new thread is created: reused threads keep their stored id and never call the hook. The returned id must be unique across the memory store. If it already belongs to an existing thread, Mastra logs a warning and uses a generated id instead so the existing thread is never overwritten. Return `ctx.defaultThreadId` to keep the built-in behavior.
|
|
315
315
|
|
|
@@ -121,7 +121,7 @@ Returns: [`Promise<InngestAgentStreamResult>`](#inngestagentstreamresult)
|
|
|
121
121
|
|
|
122
122
|
#### `resume(runId, resumeData, options?)`
|
|
123
123
|
|
|
124
|
-
Resumes a suspended Inngest run, for example after a tool approval. Loads the workflow snapshot from storage
|
|
124
|
+
Resumes a suspended Inngest run, for example after a tool approval. Loads the workflow snapshot from storage and finds the suspended step before sending a resume event to Inngest.
|
|
125
125
|
|
|
126
126
|
```typescript
|
|
127
127
|
const { output, cleanup } = await durableAgent.resume(
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# AI SDK
|
|
4
4
|
|
|
5
|
-
If you're already using the [Vercel AI SDK](https://sdk.vercel.ai) directly and want to add Mastra capabilities like [processors](https://mastra.ai/docs/agents/processors) or [memory](https://mastra.ai/docs/memory/memory-processors) without switching to the full Mastra agent API, [`withMastra()`](https://mastra.ai/reference/ai-sdk/with-mastra) lets you wrap any AI SDK model with these features. This is useful when you want to keep your existing AI SDK code but add input/output processing
|
|
5
|
+
If you're already using the [Vercel AI SDK](https://sdk.vercel.ai) directly and want to add Mastra capabilities like [processors](https://mastra.ai/docs/agents/processors) or [memory](https://mastra.ai/docs/memory/memory-processors) without switching to the full Mastra agent API, [`withMastra()`](https://mastra.ai/reference/ai-sdk/with-mastra) lets you wrap any AI SDK model with these features. This is useful when you want to keep your existing AI SDK code but add input/output processing and conversation persistence, including content filtering.
|
|
6
6
|
|
|
7
7
|
> **Tip:** If you want to use Mastra together with AI SDK UI (e.g. `useChat()`), visit the [AI SDK UI guide](https://mastra.ai/integrations/agentic-ui/ai-sdk-ui).
|
|
8
8
|
|
|
@@ -26,7 +26,7 @@ export const mastra = new Mastra({
|
|
|
26
26
|
|
|
27
27
|
**domain** (`string`): Your Auth0 domain (e.g., your-tenant.auth0.com). This is used to verify JWT tokens issued by your Auth0 tenant. (Default: `process.env.AUTH0_DOMAIN`)
|
|
28
28
|
|
|
29
|
-
**audience** (`string`): Your Auth0 API identifier/audience
|
|
29
|
+
**audience** (`string`): Your Auth0 API identifier/audience, which restricts tokens to your API. (Default: `process.env.AUTH0_AUDIENCE`)
|
|
30
30
|
|
|
31
31
|
**name** (`string`): Custom name for the auth provider instance. (Default: `"auth0"`)
|
|
32
32
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## MastraAuthGoogle class
|
|
6
6
|
|
|
7
|
-
The `MastraAuthGoogle` class provides authentication for Mastra using Google Workspace. It implements an OAuth 2.0 / OIDC login flow with encrypted session cookies
|
|
7
|
+
The `MastraAuthGoogle` class provides authentication for Mastra using Google Workspace. It implements an OAuth 2.0 / OIDC login flow with encrypted session cookies and verifies Google ID tokens. It integrates with the Mastra server through the `auth` option.
|
|
8
8
|
|
|
9
9
|
### Usage example
|
|
10
10
|
|
|
@@ -46,7 +46,7 @@ then interact with elements using their refs (e.g., @e5).`,
|
|
|
46
46
|
|
|
47
47
|
**screencast** (`ScreencastOptions`): Configuration for streaming browser frames to Studio.
|
|
48
48
|
|
|
49
|
-
**recording** (`BrowserRecordingOptions`):
|
|
49
|
+
**recording** (`BrowserRecordingOptions`): Beta option for adding browser recording tools. Provide outputDir to add browser\_record and browser\_record\_caption to the toolset. You can also set maxDurationMs, maxWidth, and maxHeight as defaults for every recording.
|
|
50
50
|
|
|
51
51
|
**excludeTools** (`BrowserToolName[]`): Tool names to exclude from the browser toolset. Use this to disable specific tools for models that do not support certain capabilities, such as vision.
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ then interact with elements using their refs (e.g., @e5).`,
|
|
|
54
54
|
|
|
55
55
|
`AgentBrowser` provides 16 deterministic tools for browser automation. All tools that interact with elements use refs from the accessibility tree snapshot.
|
|
56
56
|
|
|
57
|
-
When `recording` is configured, `AgentBrowser` also adds the
|
|
57
|
+
When `recording` is configured, `AgentBrowser` also adds the Beta `browser_record` and `browser_record_caption` tools. See [Browser recording (Beta)](https://mastra.ai/docs/browser/overview).
|
|
58
58
|
|
|
59
59
|
### Core tools
|
|
60
60
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# BrowserViewer
|
|
4
4
|
|
|
5
|
-
The `BrowserViewer` class provides browser automation for CLI-based tools. It launches Chrome
|
|
5
|
+
The `BrowserViewer` class provides browser automation for CLI-based tools. It launches Chrome through Playwright and exposes a Chrome DevTools Protocol (CDP) URL. It automatically injects that URL into CLI commands run through workspace tools.
|
|
6
6
|
|
|
7
7
|
Use `BrowserViewer` when your agent drives a browser through a CLI tool like `browser-use`, `agent-browser`, or `browse`. For SDK-based browser automation, use [`AgentBrowser`](https://mastra.ai/reference/browser/agent-browser) or [`StagehandBrowser`](https://mastra.ai/reference/browser/stagehand-browser).
|
|
8
8
|
|
|
@@ -63,7 +63,7 @@ Use stagehand_extract to get data from pages.`,
|
|
|
63
63
|
|
|
64
64
|
**screencast** (`ScreencastOptions`): Configuration for streaming browser frames to Studio.
|
|
65
65
|
|
|
66
|
-
**recording** (`BrowserRecordingOptions`):
|
|
66
|
+
**recording** (`BrowserRecordingOptions`): Beta option for adding browser recording tools. Provide outputDir to add browser\_record and browser\_record\_caption to the toolset. You can also set maxDurationMs, maxWidth, and maxHeight as defaults for every recording.
|
|
67
67
|
|
|
68
68
|
**excludeTools** (`StagehandToolName[]`): Tool names to exclude from the browser toolset. Use this to disable specific tools for models that do not support certain capabilities, such as vision.
|
|
69
69
|
|
|
@@ -71,7 +71,7 @@ Use stagehand_extract to get data from pages.`,
|
|
|
71
71
|
|
|
72
72
|
`StagehandBrowser` provides 7 AI-powered tools for browser automation.
|
|
73
73
|
|
|
74
|
-
When `recording` is configured, `StagehandBrowser` also adds the
|
|
74
|
+
When `recording` is configured, `StagehandBrowser` also adds the Beta `browser_record` and `browser_record_caption` tools. See [Browser recording (Beta)](https://mastra.ai/docs/browser/overview).
|
|
75
75
|
|
|
76
76
|
Core tools:
|
|
77
77
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# ChannelProvider
|
|
4
4
|
|
|
5
|
-
`ChannelProvider` is the interface that platform integrations implement to connect agents to a messaging platform. A provider owns the full lifecycle
|
|
5
|
+
`ChannelProvider` is the interface that platform integrations implement to connect agents to a messaging platform. A provider owns the full integration lifecycle. This includes app provisioning with OAuth, webhook routing with event handling, adapter creation and agent wiring, and credential management.
|
|
6
6
|
|
|
7
7
|
Register providers on the `Mastra` constructor under `channels`, keyed by an id you choose. Each provider's routes are merged into the server's API routes automatically, and `initialize()` runs during Mastra startup.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# SlackProvider
|
|
4
4
|
|
|
5
|
-
`SlackProvider` is the managed path for connecting agents to Slack. Register it on `Mastra.channels` and it provisions Slack apps
|
|
5
|
+
`SlackProvider` is the managed path for connecting agents to Slack. Register it on `Mastra.channels` and it provisions Slack apps through the Manifest API and runs the OAuth install flow. It also rotates configuration tokens and routes Slack events to your agents. Use it when you want Mastra to own app creation and installation. For the lower-level path where you create the Slack app and configure scopes and webhooks yourself, use [`createSlackAdapter`](https://mastra.ai/integrations/channels/slack) on the agent's `channels.adapters` instead.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -226,7 +226,7 @@ The content digest excludes `experiment-worker-manifest.json` to avoid a self-re
|
|
|
226
226
|
|
|
227
227
|
The worker implements the pinned experiment companion-worker protocol version `1`. It reads strict UTF-8 NDJSON frames from standard input and requires every frame, including the last one, to end with a newline. Frames larger than 1 MiB, malformed or truncated frames, unsupported protocol or canonicalization versions, and messages that don't match the active experiment correlation are rejected as protocol failures.
|
|
228
228
|
|
|
229
|
-
A run request must match the artifact's embedded build ID and include the ordered dataset item count and SHA-256 attestation. The worker emits contiguous sequence numbers starting at `0`, timer-driven heartbeats, awaited experiment lifecycle events, and exactly one terminal event. Cancellation must match the active protocol version
|
|
229
|
+
A run request must match the artifact's embedded build ID and include the ordered dataset item count and SHA-256 attestation. The worker emits contiguous sequence numbers starting at `0`, timer-driven heartbeats, awaited experiment lifecycle events, and exactly one terminal event. Cancellation must match the active protocol version and experiment ID, plus the job ID, attempt, and idempotency key.
|
|
230
230
|
|
|
231
231
|
Protocol exit codes are:
|
|
232
232
|
|
|
@@ -528,7 +528,7 @@ Emit machine-readable JSON.
|
|
|
528
528
|
|
|
529
529
|
Provisions and attaches a managed database, then polls until it's ready. Provisioning errors are printed with the provider's error detail.
|
|
530
530
|
|
|
531
|
-
By default the database is scoped to a single environment
|
|
531
|
+
By default, the database is scoped to a single environment. Pass an environment argument to select it. If you omit the argument, the CLI uses the project's only environment or prompts you when several are available. In non-interactive contexts (CI, `--json`) an environment argument is required. Pass `--shared` to attach a project-scoped database that's shared by every environment instead.
|
|
532
532
|
|
|
533
533
|
Environment-scoped databases inherit their provider region from the environment. Shared databases accept `--region`.
|
|
534
534
|
|
|
@@ -797,7 +797,7 @@ Lists all environment variables for the linked project. Values are partially mas
|
|
|
797
797
|
|
|
798
798
|
### `mastra server env set`
|
|
799
799
|
|
|
800
|
-
Sets an environment variable. The CLI reads the current map
|
|
800
|
+
Sets an environment variable. The CLI reads the current map and applies the change before uploading the result.
|
|
801
801
|
|
|
802
802
|
```bash
|
|
803
803
|
mastra server env set <key> <value>
|
|
@@ -1226,7 +1226,7 @@ mastra api agent get <agentId>
|
|
|
1226
1226
|
|
|
1227
1227
|
#### `mastra api agent run`
|
|
1228
1228
|
|
|
1229
|
-
Runs an agent with JSON input. Use command help to see examples for text prompts
|
|
1229
|
+
Runs an agent with JSON input. Use command help to see examples for text prompts and chat messages, including memory thread options.
|
|
1230
1230
|
|
|
1231
1231
|
```bash
|
|
1232
1232
|
mastra api agent run <agentId> <input>
|
|
@@ -1370,7 +1370,7 @@ mastra api thread get <threadId>
|
|
|
1370
1370
|
|
|
1371
1371
|
#### `mastra api thread create`
|
|
1372
1372
|
|
|
1373
|
-
Creates a memory thread. Pass one JSON input object
|
|
1373
|
+
Creates a memory thread. Pass one JSON input object. The CLI splits fields such as `agentId` into query parameters when required by the server route.
|
|
1374
1374
|
|
|
1375
1375
|
```bash
|
|
1376
1376
|
mastra api thread create <input>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **Beta:** Breaking changes may occur without a major version bump until the API is stable.
|
|
6
6
|
|
|
7
|
-
The `mountAgentControllerOnMastra()` function builds the Mastra Code agent controller (the coding agent behind
|
|
7
|
+
The `mountAgentControllerOnMastra()` function builds the Mastra Code agent controller (the coding agent behind [Mastra Code](https://code.mastra.ai), with its modes, tools, memory, and thread management) and registers it on a server-owned [Mastra](https://mastra.ai/reference/core/mastra-class) instance. Use it to serve the Mastra Code agent to your own UI (web app, editor, bot): each client creates or resumes its own isolated session through the returned [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class).
|
|
8
8
|
|
|
9
9
|
To construct the `Mastra` instance yourself (for example in a deployable entry file), use `prepareAgentControllerMount()` from the same package, which returns the constructor args plus a `finalize()` callback.
|
|
10
10
|
|
|
@@ -74,4 +74,5 @@ const prompt = buildBasePrompt({
|
|
|
74
74
|
|
|
75
75
|
## Related
|
|
76
76
|
|
|
77
|
-
- [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent)
|
|
77
|
+
- [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent)
|
|
78
|
+
- [Mastra Code](https://code.mastra.ai)
|
|
@@ -801,7 +801,7 @@ export const mastra = new Mastra({
|
|
|
801
801
|
|
|
802
802
|
**Type:** `(err: Error, c: Context) => Response | Promise<Response>`
|
|
803
803
|
|
|
804
|
-
Custom error handler called when an unhandled error occurs. Use this to customize error responses
|
|
804
|
+
Custom error handler called when an unhandled error occurs. Use this to customize error responses or log errors to external services such as Sentry. You can also implement custom error formatting.
|
|
805
805
|
|
|
806
806
|
This hook is supported by all server adapters. The `c` parameter provides a Hono-compatible context object: for non-Hono adapters (Koa, Express, Fastify), a shim is provided with commonly used methods like `c.json()` and `c.req.path`.
|
|
807
807
|
|
|
@@ -830,7 +830,7 @@ export const mastra = new Mastra({
|
|
|
830
830
|
|
|
831
831
|
**Type:** `(error: ZodError, context: 'query' | 'body' | 'path') => { status: number; body: unknown } | undefined`
|
|
832
832
|
|
|
833
|
-
Custom handler called when a request fails Zod schema validation. Use this to customize validation error responses
|
|
833
|
+
Custom handler called when a request fails Zod schema validation. Use this to customize validation error responses and change the status code, or to format errors to match your API standards.
|
|
834
834
|
|
|
835
835
|
Return a `{ status, body }` object to override the default `400` response, or `undefined` to use the default behavior. This hook is supported by all server adapters (Hono, Express, Fastify, Koa).
|
|
836
836
|
|
|
@@ -886,7 +886,7 @@ export const mastra = new Mastra({
|
|
|
886
886
|
|
|
887
887
|
Base path for hosting [Studio](https://mastra.ai/docs/studio/overview). Use this to host the Studio on a sub-path of your existing application instead of the root.
|
|
888
888
|
|
|
889
|
-
This is useful when integrating with existing applications
|
|
889
|
+
This is useful when integrating with existing applications or authentication tools such as Cloudflare Zero Trust that benefit from shared domains. It also supports managing multiple services under one domain.
|
|
890
890
|
|
|
891
891
|
```typescript
|
|
892
892
|
import { Mastra } from '@mastra/core'
|
|
@@ -8,7 +8,7 @@ Use `mastra.getAgentById(id)` to retrieve the code-defined agent. Use `await mas
|
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
11
|
-
The following example registers an agent
|
|
11
|
+
The following example registers an agent and retrieves it by ID before using the returned agent.
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
14
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Mastra.getWorkflow()
|
|
4
4
|
|
|
5
|
-
The `.getWorkflow()` method is used to retrieve a workflow by its registration key.
|
|
5
|
+
The `.getWorkflow()` method is used to retrieve a workflow by its registration key. The method provides full TypeScript type inference for workflow input and output schemas.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ await run.startAsync({
|
|
|
19
19
|
|
|
20
20
|
## Type inference
|
|
21
21
|
|
|
22
|
-
For best TypeScript support, use `getWorkflow()` with the workflow's **registration key** (the key used when adding the workflow to Mastra).
|
|
22
|
+
For best TypeScript support, use `getWorkflow()` with the workflow's **registration key** (the key used when adding the workflow to Mastra). The registration key provides full type inference for:
|
|
23
23
|
|
|
24
24
|
- Input data schemas
|
|
25
25
|
- Output data schemas
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
The `Mastra` class is the central orchestrator in any Mastra application, managing agents, workflows, storage, logging, observability, and more. Typically, you create a single instance of `Mastra` to coordinate your application.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`Mastra` is the top-level registry where you register agents, workflows, tools, and other components that need to be accessible throughout your application.
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
@@ -50,7 +50,7 @@ export const mastra = new Mastra({
|
|
|
50
50
|
- `target?: 'serverless' | 'edge'`: Deploy target for Netlify. Defaults to `'serverless'`.
|
|
51
51
|
|
|
52
52
|
- `'serverless'`: Standard [Netlify Functions](https://docs.netlify.com/functions/overview/) (Node.js runtime, 60s default timeout).
|
|
53
|
-
- `'edge'`: [Netlify Edge Functions](https://docs.netlify.com/build/edge-functions/overview/) (Deno-based runtime
|
|
53
|
+
- `'edge'`: [Netlify Edge Functions](https://docs.netlify.com/build/edge-functions/overview/) (Deno-based runtime that runs at the edge closest to users without a fixed timeout).
|
|
54
54
|
|
|
55
55
|
### Edge functions example
|
|
56
56
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Deployer
|
|
4
4
|
|
|
5
|
-
The Deployer handles the deployment of standalone Mastra applications by packaging code
|
|
5
|
+
The Deployer handles the deployment of standalone Mastra applications by packaging code and managing environment files while serving applications through the Hono framework. Concrete implementations must define the deploy method for specific deployment targets.
|
|
6
6
|
|
|
7
7
|
## Usage example
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Prompt blocks
|
|
4
4
|
|
|
5
|
-
Prompt blocks are reusable instruction templates managed by Editor. An agent's instructions can combine inline text
|
|
5
|
+
Prompt blocks are reusable instruction templates managed by Editor. An agent's instructions can combine inline text with embedded prompt blocks and references to independently versioned prompt blocks.
|
|
6
6
|
|
|
7
7
|
See [Prompt blocks](https://mastra.ai/docs/editor/overview) for the Studio workflow and common uses.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Tool configuration
|
|
4
4
|
|
|
5
|
-
Editor stores tool selections as part of an agent version. A stored configuration can add registered tools
|
|
5
|
+
Editor stores tool selections as part of an agent version. A stored configuration can add registered tools and tools from integration providers, as well as tools from Model Context Protocol (MCP) clients.
|
|
6
6
|
|
|
7
7
|
See [Editor tools](https://mastra.ai/docs/editor/overview) for the Studio workflow and common uses.
|
|
8
8
|
|
|
@@ -177,7 +177,7 @@ Include in your test harness to:
|
|
|
177
177
|
|
|
178
178
|
- Benchmark different models' noise resistance before deployment
|
|
179
179
|
- Identify agents vulnerable to manipulation during development
|
|
180
|
-
- Create detailed test coverage for
|
|
180
|
+
- Create detailed test coverage for multiple noise types
|
|
181
181
|
- Ensure consistent behavior across updates
|
|
182
182
|
|
|
183
183
|
### Security Testing
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Summarization scorer
|
|
4
4
|
|
|
5
|
-
The `createSummarizationScorer()` function creates a scorer that evaluates a summary on two axes: whether every claim
|
|
5
|
+
The `createSummarizationScorer()` function creates a scorer that evaluates a summary on two axes: whether every claim has source-text support and whether the summary preserves the source information. The final score is the lower of the two. A summary can't pass by being faithful but empty or by being thorough but wrong.
|
|
6
6
|
|
|
7
7
|
The summary is the agent's last message that carries text, and the source text defaults to the first user message of the run input. Pass `source` or `sourceExtractor` when the text being summarized lives somewhere else, such as a tool result.
|
|
8
8
|
|
|
@@ -101,7 +101,7 @@ Missing `instructions.md`, `instructions.ts`, and `config.instructions` fails th
|
|
|
101
101
|
|
|
102
102
|
## Discovery lifecycle
|
|
103
103
|
|
|
104
|
-
File-based primitives are discovered by the Mastra bundler under `mastra dev` and `mastra build`. During discovery, Mastra reads supported files under `src/mastra
|
|
104
|
+
File-based primitives are discovered by the Mastra bundler under `mastra dev` and `mastra build`. During discovery, Mastra reads supported files under `src/mastra/` and imports TypeScript and JavaScript modules. It also reads markdown instructions and skills. The bundler then copies workspace seed files and registers the assembled primitives with your Mastra app.
|
|
105
105
|
|
|
106
106
|
After discovery, a file-based agent runs as a normal [`Agent`](https://mastra.ai/reference/agents/agent). Calling it from the Agent API, Studio, workflows, or your application code uses the same runtime as a code-defined agent.
|
|
107
107
|
|
|
@@ -22,11 +22,11 @@ Always report temperatures in Celsius and Fahrenheit. Include the user's preferr
|
|
|
22
22
|
|
|
23
23
|
## Skills vs tools vs instructions
|
|
24
24
|
|
|
25
|
-
| Need | Use | Why
|
|
26
|
-
| ---------------------------------------------------- | ------------------------------------------------------------------------------- |
|
|
27
|
-
| Always-on identity, tone, or rules | [`instructions.md`](https://mastra.ai/reference/file-based-agents/instructions) | The model should see the guidance every turn.
|
|
28
|
-
| Callable action with inputs and outputs | [`tools/`](https://mastra.ai/reference/file-based-agents/tools) | The model needs to execute code
|
|
29
|
-
| Detailed reference or procedure loaded when relevant | `skills/` | The model only needs the full guidance for specific tasks.
|
|
25
|
+
| Need | Use | Why |
|
|
26
|
+
| ---------------------------------------------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
27
|
+
| Always-on identity, tone, or rules | [`instructions.md`](https://mastra.ai/reference/file-based-agents/instructions) | The model should see the guidance every turn. |
|
|
28
|
+
| Callable action with inputs and outputs | [`tools/`](https://mastra.ai/reference/file-based-agents/tools) | The model needs to execute code or call APIs, including operations that perform side effects. |
|
|
29
|
+
| Detailed reference or procedure loaded when relevant | `skills/` | The model only needs the full guidance for specific tasks. |
|
|
30
30
|
|
|
31
31
|
## Skill formats
|
|
32
32
|
|
|
@@ -15,7 +15,7 @@ Without `workspace.ts`, a file-based agent gets a default [`Workspace`](https://
|
|
|
15
15
|
- [`LocalFilesystem`](https://mastra.ai/reference/workspace/local-filesystem) rooted at the agent's bundled workspace directory.
|
|
16
16
|
- [`LocalSandbox`](https://mastra.ai/reference/workspace/local-sandbox) with the same working directory.
|
|
17
17
|
|
|
18
|
-
This gives the agent file tools and shell tools automatically. The default workspace is per agent
|
|
18
|
+
This gives the agent file tools and shell tools automatically. The default workspace is per agent. Subagents get nested workspace directories under their parent agent's workspace path.
|
|
19
19
|
|
|
20
20
|
## Quickstart
|
|
21
21
|
|
package/.docs/reference/index.md
CHANGED
|
@@ -243,7 +243,6 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
243
243
|
- [Span filtering](https://mastra.ai/reference/observability/tracing/span-filtering)
|
|
244
244
|
- [Spans](https://mastra.ai/reference/observability/tracing/spans)
|
|
245
245
|
- [BatchPartsProcessor](https://mastra.ai/reference/processors/batch-parts-processor)
|
|
246
|
-
- [CostGuardProcessor](https://mastra.ai/reference/processors/cost-guard-processor)
|
|
247
246
|
- [LanguageDetector](https://mastra.ai/reference/processors/language-detector)
|
|
248
247
|
- [MessageHistory](https://mastra.ai/reference/processors/message-history-processor)
|
|
249
248
|
- [ModerationProcessor](https://mastra.ai/reference/processors/moderation-processor)
|
|
@@ -258,6 +257,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
258
257
|
- [SkillSearchProcessor](https://mastra.ai/reference/processors/skill-search-processor)
|
|
259
258
|
- [StreamErrorRetryProcessor](https://mastra.ai/reference/processors/stream-error-retry-processor)
|
|
260
259
|
- [SystemPromptScrubber](https://mastra.ai/reference/processors/system-prompt-scrubber)
|
|
260
|
+
- [TokenCostControl](https://mastra.ai/reference/processors/token-cost-control)
|
|
261
261
|
- [TokenLimiterProcessor](https://mastra.ai/reference/processors/token-limiter-processor)
|
|
262
262
|
- [ToolCallFilter](https://mastra.ai/reference/processors/tool-call-filter)
|
|
263
263
|
- [ToolSearchProcessor](https://mastra.ai/reference/processors/tool-search-processor)
|
|
@@ -149,7 +149,7 @@ You can create custom transports using the `createCustomTransport` utility to in
|
|
|
149
149
|
|
|
150
150
|
### Sentry transport example
|
|
151
151
|
|
|
152
|
-
Creates a custom transport using `createCustomTransport` and integrates it with a third-party logging stream such as `pino-sentry-transport`.
|
|
152
|
+
Creates a custom transport using `createCustomTransport` and integrates it with a third-party logging stream such as `pino-sentry-transport`. The custom transport forwards logs to an external system such as Sentry for advanced monitoring and observability.
|
|
153
153
|
|
|
154
154
|
```typescript
|
|
155
155
|
import { createCustomTransport } from '@mastra/core/loggers'
|
|
@@ -87,7 +87,7 @@ OM performs thresholding with fast local token estimation. Text uses `tokenx`, a
|
|
|
87
87
|
|
|
88
88
|
**observation.activateOnProviderChange** (`boolean`): Force buffered observations to activate when the actor provider or model changes. If unset, the top-level activateOnProviderChange value is used for observations. Currently only applied when using the standalone ObservationalMemory class; new Memory(...) applies the top-level activateOnProviderChange only.
|
|
89
89
|
|
|
90
|
-
**observation.blockAfter** (`number`): Safety net
|
|
90
|
+
**observation.blockAfter** (`number`): Safety net for when background buffering can't keep up. Values from 1 up to (but not including) 100 are multipliers of messageTokens: 1.2 resolves to 120% of the threshold (36k tokens with the default 30k). Values of 100 or more are absolute token counts and must be greater than messageTokens. Above this point, activation uses the smallest set of buffered chunks that reaches the retention target, even when that overshoots the target by more than the usual safeguard allows. It never activates more chunks than are needed to reach the retention target, so it removes only slightly more history than a normal activation. It changes the result only when the retention floor is above roughly 20,000 tokens; with the default bufferActivation (a 6k floor) it has no observable effect. Activation usually keeps a minimum remaining context (the smaller of 1000 tokens or the retention floor), but a single buffered chunk that covers the whole pending window still activates and can leave less. Crossing blockAfter does not trigger a blocking observation. A synchronous (blocking) observation runs when the messageTokens threshold is reached and buffered activation did not happen. Only relevant when bufferTokens is set. Defaults to 1.2 when async buffering is enabled.
|
|
91
91
|
|
|
92
92
|
**observation.previousObserverTokens** (`number | false`): Optional token budget for the observer's previous-observations context. When set to a number, the observations passed to the Observer agent are tail-truncated to fit within this budget while keeping the newest observations and preserving highlighted 🔴 items when possible. When a buffered reflection is pending, the already-reflected observation lines are automatically replaced with the reflection summary before truncation. Set to 0 to omit previous observations entirely, or false to disable truncation explicitly.
|
|
93
93
|
|
|
@@ -353,7 +353,7 @@ export const agent = new Agent({
|
|
|
353
353
|
|
|
354
354
|
Async buffering is **enabled by default**. It pre-computes observations in the background as the conversation grows: when the `messageTokens` threshold is reached, buffered observations activate instantly with no blocking LLM call.
|
|
355
355
|
|
|
356
|
-
The lifecycle follows **buffer → activate → remove messages → repeat**. Background Observer calls run at `bufferTokens` intervals, each producing a chunk of observations. At threshold, chunks activate: observations move into the log, raw messages are removed from context.
|
|
356
|
+
The lifecycle follows **buffer → activate → remove messages → repeat**. Background Observer calls run at `bufferTokens` intervals, each producing a chunk of observations. At threshold, chunks activate: observations move into the log, raw messages are removed from context. Above the `blockAfter` threshold, activation may overshoot the retention target instead of activating fewer chunks. If the threshold is reached and no buffered chunk activates, a synchronous observation runs instead.
|
|
357
357
|
|
|
358
358
|
Default settings:
|
|
359
359
|
|
|
@@ -383,7 +383,7 @@ export const agent = new Agent({
|
|
|
383
383
|
bufferTokens: 5_000,
|
|
384
384
|
// Activate to retain 30% of threshold
|
|
385
385
|
bufferActivation: 0.7,
|
|
386
|
-
//
|
|
386
|
+
// Above 1.5x the threshold, let activation overshoot the retention target
|
|
387
387
|
blockAfter: 1.5,
|
|
388
388
|
},
|
|
389
389
|
reflection: {
|
|
@@ -787,6 +787,8 @@ Mastra also injects scope-aware usage instructions into the agent's context. For
|
|
|
787
787
|
|
|
788
788
|
**partIndex** (`number`): Fetch a single message part at full detail by its positional index. Use this when a low-detail recall shows an interesting part at \[p1] — call again with partIndex: 1 to see the full content without loading every part.
|
|
789
789
|
|
|
790
|
+
**charOffset** (`number`): Character position to continue reading a truncated single part. Only applies with cursor and partIndex. When a part is larger than the token budget, the result includes nextCharOffset — pass that exact value here in the next call to read the following chunk. The chunks concatenate to the original part text. (Default: `0`)
|
|
791
|
+
|
|
790
792
|
**before** (`string`): For mode: "threads" only. Filter to threads created before this date. Accepts ISO 8601 format (e.g. "2026-03-15", "2026-03-10T00:00:00Z").
|
|
791
793
|
|
|
792
794
|
**after** (`string`): For mode: "threads" only. Filter to threads created after this date. Accepts ISO 8601 format (e.g. "2026-03-01", "2026-03-10T00:00:00Z").
|
|
@@ -809,10 +811,16 @@ Mastra also injects scope-aware usage instructions into the agent's context. For
|
|
|
809
811
|
|
|
810
812
|
**hasPrevPage** (`boolean`): Whether more messages exist before this page.
|
|
811
813
|
|
|
812
|
-
**truncated** (`boolean`): Present and true when the output was capped by the token budget. The agent can paginate or use partIndex to access remaining content.
|
|
814
|
+
**truncated** (`boolean`): Present and true when the output was capped by the token budget. The agent can paginate or use partIndex to access remaining content. When a single part is itself too large, the partIndex result includes nextCharOffset for continuing within the part.
|
|
813
815
|
|
|
814
816
|
**tokenOffset** (`number`): Approximate number of tokens that were trimmed when truncated is true.
|
|
815
817
|
|
|
818
|
+
**charOffset** (`number`): On single-part results (partIndex), the character position this chunk starts at. 0 unless the call passed a charOffset.
|
|
819
|
+
|
|
820
|
+
**nextCharOffset** (`number`): On single-part results, present when the part was truncated and more content remains. Pass this value as charOffset in the next call to continue reading from where this chunk ended.
|
|
821
|
+
|
|
822
|
+
**note** (`string`): On truncated single-part results, the exact follow-up call for retrieving the next chunk.
|
|
823
|
+
|
|
816
824
|
### Returns (threads mode)
|
|
817
825
|
|
|
818
826
|
**threads** (`string`): Formatted thread listing. Each thread shows its title, ID, and dates. The current thread is marked with ← current.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Agent class
|
|
4
4
|
|
|
5
|
-
The Agent class has been updated with reorganized voice methods
|
|
5
|
+
The Agent class has been updated with reorganized voice methods and property access patterns, plus streamlined streaming APIs.
|
|
6
6
|
|
|
7
7
|
## Changed
|
|
8
8
|
|
|
@@ -70,7 +70,7 @@ To migrate, update all imports and parameter names from `RuntimeContext`/`runtim
|
|
|
70
70
|
|
|
71
71
|
### Direct property access to getter methods
|
|
72
72
|
|
|
73
|
-
Direct property access to `agent.llm`, `agent.tools`, and `agent.instructions` is deprecated.
|
|
73
|
+
Direct property access to `agent.llm`, `agent.tools`, and `agent.instructions` is deprecated. The accessors improve encapsulation and align with the broader API design.
|
|
74
74
|
|
|
75
75
|
To migrate, replace property access with the corresponding getter methods.
|
|
76
76
|
|
|
@@ -146,7 +146,7 @@ To migrate, update processor method names.
|
|
|
146
146
|
|
|
147
147
|
Mastra v1 continues to accept both Zod v3 and Zod v4 schemas in public agent APIs that take structured output schemas. This includes methods such as `agent.generateLegacy()` and `agent.streamLegacy()` and the related option types.
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
Existing Zod schemas passed to agent APIs don't require migration for Zod version compatibility. Keep your existing schema imports:
|
|
150
150
|
|
|
151
151
|
```ts
|
|
152
152
|
import { z as z3 } from 'zod/v3'
|
|
@@ -148,7 +148,7 @@ client.memory.listMessages({
|
|
|
148
148
|
|
|
149
149
|
### `getMemoryThread` parameter structure
|
|
150
150
|
|
|
151
|
-
The `getMemoryThread` method parameter structure has been updated.
|
|
151
|
+
The `getMemoryThread` method parameter structure has been updated. The new structure aligns the API across memory methods.
|
|
152
152
|
|
|
153
153
|
To migrate, update the method call with the new parameter structure. Check the updated API documentation for the specific changes.
|
|
154
154
|
|
|
@@ -74,7 +74,7 @@ const scorer = createScorer({
|
|
|
74
74
|
|
|
75
75
|
### Scorer configuration from `name` to `id`
|
|
76
76
|
|
|
77
|
-
Scorers now require an `id` field instead of `name`. The `name` field is now optional.
|
|
77
|
+
Scorers now require an `id` field instead of `name`. The `name` field is now optional. The new field aligns scorers with other Mastra entities.
|
|
78
78
|
|
|
79
79
|
To migrate, update scorer definitions to use `id` as the required field.
|
|
80
80
|
|
|
@@ -49,7 +49,7 @@ const mastra = new Mastra({
|
|
|
49
49
|
|
|
50
50
|
### Required `id` parameter for all mastra primitives
|
|
51
51
|
|
|
52
|
-
All storages, vector stores, agents, workflows, mcpServers, processors, scorers, and tools now require an `id` parameter during initialization.
|
|
52
|
+
All storages, vector stores, agents, workflows, mcpServers, processors, scorers, and tools now require an `id` parameter during initialization. Required IDs standardize the Mastra API and prevent ID conflicts.
|
|
53
53
|
|
|
54
54
|
All these primitives also now have `get`, `list`, and `add` functions.
|
|
55
55
|
|
|
@@ -59,7 +59,7 @@ To migrate, replace all calls to `mcp.getToolsets()` with `mcp.listToolsets()`.
|
|
|
59
59
|
|
|
60
60
|
### MCP tool context properties organization
|
|
61
61
|
|
|
62
|
-
Context properties in MCP tools are now organized under the `context.mcp` namespace.
|
|
62
|
+
Context properties in MCP tools are now organized under the `context.mcp` namespace. The namespace organizes MCP-specific functionality under a clear API surface.
|
|
63
63
|
|
|
64
64
|
To migrate, access MCP-specific properties like `elicitation` and `extra` through `context.mcp` instead of directly from the context parameter.
|
|
65
65
|
|
|
@@ -108,7 +108,7 @@ Work through this checklist in order, starting with high-impact changes that aff
|
|
|
108
108
|
- Update storage methods from `get*` to `list*` pattern - [Storage](https://mastra.ai/reference/migrations/upgrade-to-v1/storage)
|
|
109
109
|
- Replace direct property access with getter methods - [Mastra Class](https://mastra.ai/reference/migrations/upgrade-to-v1/mastra), [Agent Class](https://mastra.ai/reference/migrations/upgrade-to-v1/agent)
|
|
110
110
|
- Update memory scope if relying on default `thread` scope - [Memory](https://mastra.ai/reference/migrations/upgrade-to-v1/memory)
|
|
111
|
-
- Update vector store calls to use
|
|
111
|
+
- Update vector store calls to use arguments by name - [Storage](https://mastra.ai/reference/migrations/upgrade-to-v1/storage)
|
|
112
112
|
- Remove `format` parameter from agent methods - [Agent Class](https://mastra.ai/reference/migrations/upgrade-to-v1/agent)
|
|
113
113
|
- Update voice methods to use `agent.voice` namespace - [Agent Class](https://mastra.ai/reference/migrations/upgrade-to-v1/agent)
|
|
114
114
|
- Rename configuration property `processors` to `spanOutputProcessors` (if using custom processors) - [Tracing](https://mastra.ai/reference/migrations/upgrade-to-v1/tracing)
|
|
@@ -8,7 +8,7 @@ Processor interfaces have been updated to use consistent naming patterns and dat
|
|
|
8
8
|
|
|
9
9
|
### Processor configuration from `name` to `id`
|
|
10
10
|
|
|
11
|
-
Processors now require an `id` field instead of `name`. The `name` field is now optional.
|
|
11
|
+
Processors now require an `id` field instead of `name`. The `name` field is now optional. The new field aligns processors with other Mastra entities such as scorers and agents.
|
|
12
12
|
|
|
13
13
|
To migrate, update processor definitions to use `id` as the required field.
|
|
14
14
|
|