@mastra/mcp-docs-server 1.0.0-beta.9 → 1.0.1
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/organized/changelogs/%40internal%2Fchangeset-cli.md +3 -1
- package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +3 -1
- package/.docs/organized/changelogs/%40internal%2Fplayground.md +60 -0
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +15 -15
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +3 -1
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +287 -287
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +302 -302
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +53 -53
- package/.docs/organized/changelogs/%40mastra%2Fauth.md +38 -0
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +66 -66
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +522 -212
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +239 -239
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +439 -234
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +450 -211
- package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +202 -0
- package/.docs/organized/changelogs/%40mastra%2Fconvex.md +448 -22
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +348 -348
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +60 -60
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +287 -287
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +106 -106
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +90 -90
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +86 -86
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +221 -221
- package/.docs/organized/changelogs/%40mastra%2Fduckdb.md +70 -0
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +403 -225
- package/.docs/organized/changelogs/%40mastra%2Felasticsearch.md +72 -0
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +145 -145
- package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +54 -0
- package/.docs/organized/changelogs/%40mastra%2Flance.md +456 -226
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +625 -229
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +71 -71
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +245 -245
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +28 -28
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +281 -281
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +354 -156
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +545 -212
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +481 -202
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +194 -194
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +781 -235
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +198 -198
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +282 -282
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +163 -163
- package/.docs/organized/changelogs/%40mastra%2Frag.md +310 -310
- package/.docs/organized/changelogs/%40mastra%2Freact.md +328 -237
- package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +64 -0
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +160 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +230 -230
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +57 -57
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +479 -232
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +53 -53
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +47 -47
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +110 -110
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +15 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +98 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +54 -54
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +46 -46
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +93 -93
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +47 -47
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +45 -45
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +45 -45
- package/.docs/organized/changelogs/create-mastra.md +219 -219
- package/.docs/organized/changelogs/mastra.md +276 -276
- package/.docs/organized/code-examples/a2a.md +2 -2
- package/.docs/organized/code-examples/agent-v6.md +221 -0
- package/.docs/organized/code-examples/agui.md +4 -4
- package/.docs/organized/code-examples/ai-elements.md +3 -3
- package/.docs/organized/code-examples/ai-sdk-useChat.md +2 -2
- package/.docs/organized/code-examples/ai-sdk-v5.md +3 -3
- package/.docs/organized/code-examples/assistant-ui.md +5 -5
- package/.docs/organized/code-examples/bird-checker-with-express.md +1 -1
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +2 -2
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +3 -3
- package/.docs/organized/code-examples/client-side-tools.md +4 -4
- package/.docs/organized/code-examples/crypto-chatbot.md +5 -5
- package/.docs/organized/code-examples/experimental-auth-weather-agent.md +1 -1
- package/.docs/organized/code-examples/fireworks-r1.md +2 -2
- package/.docs/organized/code-examples/heads-up-game.md +7 -7
- package/.docs/organized/code-examples/inngest.md +1075 -0
- package/.docs/organized/code-examples/mcp-configuration.md +1 -1
- package/.docs/organized/code-examples/mcp-server-adapters.md +2 -2
- package/.docs/organized/code-examples/memory-per-resource-example.md +3 -3
- package/.docs/organized/code-examples/memory-todo-agent.md +1 -1
- package/.docs/organized/code-examples/memory-with-context.md +1 -1
- package/.docs/organized/code-examples/memory-with-processors.md +1 -1
- package/.docs/organized/code-examples/openapi-spec-writer.md +3 -3
- package/.docs/organized/code-examples/quick-start.md +1 -5
- package/.docs/organized/code-examples/server-app-access.md +2 -2
- package/.docs/organized/code-examples/server-express-adapter.md +1 -1
- package/.docs/organized/code-examples/server-fastify-adapter.md +83 -0
- package/.docs/organized/code-examples/server-hono-adapter.md +2 -2
- package/.docs/organized/code-examples/server-koa-adapter.md +94 -0
- package/.docs/organized/code-examples/stock-price-tool.md +21 -2
- package/.docs/organized/code-examples/workflow-ai-recruiter.md +1 -1
- package/.docs/organized/code-examples/workflow-with-inline-steps.md +1 -1
- package/.docs/organized/code-examples/workflow-with-memory.md +1 -1
- package/.docs/organized/code-examples/workflow-with-separate-steps.md +1 -1
- package/.docs/organized/code-examples/workflow-with-suspend-resume.md +1 -1
- package/.docs/raw/agents/adding-voice.mdx +24 -6
- package/.docs/raw/agents/agent-approval.mdx +209 -12
- package/.docs/raw/agents/agent-memory.mdx +36 -32
- package/.docs/raw/agents/guardrails.mdx +105 -56
- package/.docs/raw/agents/network-approval.mdx +281 -0
- package/.docs/raw/agents/networks.mdx +69 -13
- package/.docs/raw/agents/overview.mdx +43 -25
- package/.docs/raw/agents/processors.mdx +234 -17
- package/.docs/raw/agents/structured-output.mdx +78 -8
- package/.docs/raw/agents/using-tools.mdx +67 -6
- package/.docs/raw/course/01-first-agent/07-creating-your-agent.md +1 -2
- package/.docs/raw/course/01-first-agent/12-connecting-tool-to-agent.md +1 -1
- package/.docs/raw/course/01-first-agent/16-adding-memory-to-agent.md +1 -2
- package/.docs/raw/course/02-agent-tools-mcp/05-updating-your-agent.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/10-updating-agent-instructions-zapier.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/16-updating-agent-instructions-github.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/21-updating-agent-instructions-hackernews.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/27-updating-agent-instructions-filesystem.md +1 -1
- package/.docs/raw/course/02-agent-tools-mcp/31-enhancing-memory-configuration.md +3 -3
- package/.docs/raw/course/03-agent-memory/04-creating-basic-memory-agent.md +1 -2
- package/.docs/raw/course/03-agent-memory/07-understanding-memory-threads.md +35 -0
- package/.docs/raw/course/03-agent-memory/08-configuring-conversation-history.md +1 -2
- package/.docs/raw/course/03-agent-memory/13-vector-store-configuration.md +1 -1
- package/.docs/raw/course/03-agent-memory/16-configuring-semantic-recall.md +4 -5
- package/.docs/raw/course/03-agent-memory/18-advanced-configuration-semantic-recall.md +1 -1
- package/.docs/raw/course/03-agent-memory/21-configuring-working-memory.md +3 -4
- package/.docs/raw/course/03-agent-memory/22-custom-working-memory-templates.md +3 -4
- package/.docs/raw/course/03-agent-memory/25-combining-memory-features.md +3 -4
- package/.docs/raw/course/03-agent-memory/27-creating-learning-assistant.md +3 -4
- package/.docs/raw/course/04-workflows/11-creating-an-ai-agent.md +2 -3
- package/.docs/raw/deployment/cloud-providers.mdx +22 -0
- package/.docs/raw/deployment/mastra-server.mdx +140 -0
- package/.docs/raw/deployment/monorepo.mdx +106 -42
- package/.docs/raw/deployment/overview.mdx +35 -48
- package/.docs/raw/deployment/web-framework.mdx +17 -19
- package/.docs/raw/deployment/workflow-runners.mdx +16 -0
- package/.docs/raw/evals/built-in-scorers.mdx +2 -0
- package/.docs/raw/evals/custom-scorers.mdx +60 -12
- package/.docs/raw/evals/overview.mdx +6 -6
- package/.docs/raw/evals/running-in-ci.mdx +4 -2
- package/.docs/raw/getting-started/manual-install.mdx +20 -20
- package/.docs/raw/getting-started/mcp-docs-server.mdx +59 -2
- package/.docs/raw/getting-started/project-structure.mdx +2 -2
- package/.docs/raw/getting-started/start.mdx +17 -1
- package/.docs/raw/getting-started/studio.mdx +6 -35
- package/.docs/raw/guides/agent-frameworks/ai-sdk.mdx +23 -33
- package/.docs/raw/guides/build-your-ui/ai-sdk-ui.mdx +1034 -80
- package/.docs/raw/guides/build-your-ui/assistant-ui.mdx +8 -8
- package/.docs/raw/guides/build-your-ui/copilotkit.mdx +32 -11
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/amazon-ec2.mdx +9 -9
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/aws-lambda.mdx +13 -16
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/azure-app-services.mdx +5 -7
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/cloudflare-deployer.mdx +8 -5
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/digital-ocean.mdx +18 -23
- package/.docs/raw/guides/deployment/index.mdx +32 -0
- package/.docs/raw/guides/deployment/inngest.mdx +673 -0
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/netlify-deployer.mdx +7 -3
- package/.docs/raw/{deployment/cloud-providers → guides/deployment}/vercel-deployer.mdx +8 -5
- package/.docs/raw/guides/getting-started/astro.mdx +292 -451
- package/.docs/raw/guides/getting-started/express.mdx +72 -153
- package/.docs/raw/guides/getting-started/hono.mdx +227 -0
- package/.docs/raw/guides/getting-started/next-js.mdx +173 -61
- package/.docs/raw/guides/getting-started/nuxt.mdx +505 -0
- package/.docs/raw/guides/getting-started/quickstart.mdx +5 -5
- package/.docs/raw/guides/getting-started/sveltekit.mdx +238 -409
- package/.docs/raw/guides/getting-started/vite-react.mdx +317 -147
- package/.docs/raw/guides/guide/ai-recruiter.mdx +10 -10
- package/.docs/raw/guides/guide/chef-michel.mdx +9 -11
- package/.docs/raw/guides/guide/notes-mcp-server.mdx +15 -15
- package/.docs/raw/guides/guide/research-assistant.mdx +20 -20
- package/.docs/raw/guides/guide/stock-agent.mdx +5 -5
- package/.docs/raw/guides/guide/web-search.mdx +38 -38
- package/.docs/raw/guides/guide/whatsapp-chat-bot.mdx +7 -7
- package/.docs/raw/guides/index.mdx +0 -1
- package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +2 -2
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +105 -4
- package/.docs/raw/guides/migrations/upgrade-to-v1/cli.mdx +15 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +170 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/deployment.mdx +42 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +0 -35
- package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +40 -3
- package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +17 -2
- package/.docs/raw/guides/migrations/upgrade-to-v1/processors.mdx +11 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/rag.mdx +47 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +271 -25
- package/.docs/raw/guides/migrations/upgrade-to-v1/tracing.mdx +72 -17
- package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +46 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +50 -7
- package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +21 -23
- package/.docs/raw/index.mdx +2 -2
- package/.docs/raw/mastra-cloud/deployment.mdx +86 -0
- package/.docs/raw/mastra-cloud/observability.mdx +43 -0
- package/.docs/raw/mastra-cloud/overview.mdx +31 -0
- package/.docs/raw/mastra-cloud/setup.mdx +64 -0
- package/.docs/raw/mastra-cloud/studio.mdx +35 -0
- package/.docs/raw/mcp/overview.mdx +60 -25
- package/.docs/raw/mcp/publishing-mcp-server.mdx +7 -4
- package/.docs/raw/memory/memory-processors.mdx +17 -12
- package/.docs/raw/memory/message-history.mdx +72 -0
- package/.docs/raw/memory/overview.mdx +38 -76
- package/.docs/raw/memory/semantic-recall.mdx +65 -52
- package/.docs/raw/memory/storage.mdx +248 -0
- package/.docs/raw/memory/working-memory.mdx +24 -13
- package/.docs/raw/observability/logging.mdx +16 -15
- package/.docs/raw/observability/overview.mdx +27 -7
- package/.docs/raw/observability/tracing/bridges/otel.mdx +7 -4
- package/.docs/raw/observability/tracing/exporters/arize.mdx +61 -24
- package/.docs/raw/observability/tracing/exporters/braintrust.mdx +32 -22
- package/.docs/raw/observability/tracing/exporters/cloud.mdx +24 -5
- package/.docs/raw/observability/tracing/exporters/datadog.mdx +175 -0
- package/.docs/raw/observability/tracing/exporters/default.mdx +28 -7
- package/.docs/raw/observability/tracing/exporters/laminar.mdx +89 -0
- package/.docs/raw/observability/tracing/exporters/langfuse.mdx +31 -22
- package/.docs/raw/observability/tracing/exporters/langsmith.mdx +33 -3
- package/.docs/raw/observability/tracing/exporters/otel.mdx +194 -22
- package/.docs/raw/observability/tracing/exporters/posthog.mdx +32 -22
- package/.docs/raw/observability/tracing/exporters/sentry.mdx +198 -0
- package/.docs/raw/observability/tracing/overview.mdx +388 -108
- package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +27 -7
- package/.docs/raw/rag/chunking-and-embedding.mdx +22 -33
- package/.docs/raw/rag/graph-rag.mdx +223 -0
- package/.docs/raw/rag/overview.mdx +6 -3
- package/.docs/raw/rag/retrieval.mdx +53 -57
- package/.docs/raw/rag/vector-databases.mdx +55 -31
- package/.docs/raw/reference/agents/agent.mdx +17 -14
- package/.docs/raw/reference/agents/generate.mdx +172 -44
- package/.docs/raw/reference/agents/generateLegacy.mdx +5 -3
- package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +5 -3
- package/.docs/raw/reference/agents/getDefaultOptions.mdx +5 -3
- package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +5 -3
- package/.docs/raw/reference/agents/getDescription.mdx +3 -1
- package/.docs/raw/reference/agents/getInstructions.mdx +5 -3
- package/.docs/raw/reference/agents/getLLM.mdx +5 -3
- package/.docs/raw/reference/agents/getMemory.mdx +5 -3
- package/.docs/raw/reference/agents/getModel.mdx +5 -3
- package/.docs/raw/reference/agents/getTools.mdx +4 -2
- package/.docs/raw/reference/agents/getVoice.mdx +4 -2
- package/.docs/raw/reference/agents/listAgents.mdx +4 -2
- package/.docs/raw/reference/agents/listScorers.mdx +5 -3
- package/.docs/raw/reference/agents/listTools.mdx +4 -2
- package/.docs/raw/reference/agents/listWorkflows.mdx +4 -2
- package/.docs/raw/reference/agents/network.mdx +113 -1
- package/.docs/raw/reference/ai-sdk/chat-route.mdx +6 -3
- package/.docs/raw/reference/ai-sdk/handle-chat-stream.mdx +4 -2
- package/.docs/raw/reference/ai-sdk/handle-network-stream.mdx +4 -2
- package/.docs/raw/reference/ai-sdk/handle-workflow-stream.mdx +5 -3
- package/.docs/raw/reference/ai-sdk/network-route.mdx +6 -3
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-stream.mdx +10 -6
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-v4-messages.mdx +130 -0
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-v5-messages.mdx +110 -0
- package/.docs/raw/reference/ai-sdk/with-mastra.mdx +122 -0
- package/.docs/raw/reference/ai-sdk/workflow-route.mdx +7 -4
- package/.docs/raw/reference/auth/auth0.mdx +5 -3
- package/.docs/raw/reference/auth/clerk.mdx +5 -3
- package/.docs/raw/reference/auth/firebase.mdx +6 -5
- package/.docs/raw/reference/auth/jwt.mdx +5 -3
- package/.docs/raw/reference/auth/supabase.mdx +5 -3
- package/.docs/raw/reference/auth/workos.mdx +5 -3
- package/.docs/raw/reference/cli/create-mastra.mdx +12 -10
- package/.docs/raw/reference/cli/mastra.mdx +63 -15
- package/.docs/raw/reference/client-js/agents.mdx +77 -35
- package/.docs/raw/reference/client-js/error-handling.mdx +3 -3
- package/.docs/raw/reference/client-js/logs.mdx +2 -0
- package/.docs/raw/reference/client-js/mastra-client.mdx +4 -2
- package/.docs/raw/reference/client-js/memory.mdx +43 -1
- package/.docs/raw/reference/client-js/observability.mdx +2 -0
- package/.docs/raw/reference/client-js/telemetry.mdx +2 -0
- package/.docs/raw/reference/client-js/tools.mdx +2 -0
- package/.docs/raw/reference/client-js/vectors.mdx +2 -0
- package/.docs/raw/reference/client-js/workflows.mdx +47 -3
- package/.docs/raw/reference/configuration.mdx +761 -0
- package/.docs/raw/reference/core/addGateway.mdx +2 -0
- package/.docs/raw/reference/core/getAgent.mdx +3 -1
- package/.docs/raw/reference/core/getAgentById.mdx +3 -1
- package/.docs/raw/reference/core/getDeployer.mdx +3 -1
- package/.docs/raw/reference/core/getGateway.mdx +2 -0
- package/.docs/raw/reference/core/getGatewayById.mdx +2 -0
- package/.docs/raw/reference/core/getLogger.mdx +3 -1
- package/.docs/raw/reference/core/getMCPServer.mdx +3 -1
- package/.docs/raw/reference/core/getMCPServerById.mdx +3 -1
- package/.docs/raw/reference/core/getMemory.mdx +7 -3
- package/.docs/raw/reference/core/getScorer.mdx +2 -0
- package/.docs/raw/reference/core/getScorerById.mdx +2 -0
- package/.docs/raw/reference/core/getServer.mdx +6 -4
- package/.docs/raw/reference/core/getStorage.mdx +5 -3
- package/.docs/raw/reference/core/getStoredAgentById.mdx +6 -4
- package/.docs/raw/reference/core/getTelemetry.mdx +3 -1
- package/.docs/raw/reference/core/getVector.mdx +3 -1
- package/.docs/raw/reference/core/getWorkflow.mdx +3 -1
- package/.docs/raw/reference/core/listAgents.mdx +3 -1
- package/.docs/raw/reference/core/listGateways.mdx +2 -0
- package/.docs/raw/reference/core/listLogs.mdx +3 -1
- package/.docs/raw/reference/core/listLogsByRunId.mdx +3 -1
- package/.docs/raw/reference/core/listMCPServers.mdx +3 -1
- package/.docs/raw/reference/core/listMemory.mdx +8 -4
- package/.docs/raw/reference/core/listScorers.mdx +2 -0
- package/.docs/raw/reference/core/listStoredAgents.mdx +7 -5
- package/.docs/raw/reference/core/listVectors.mdx +3 -1
- package/.docs/raw/reference/core/listWorkflows.mdx +3 -1
- package/.docs/raw/reference/core/mastra-class.mdx +27 -20
- package/.docs/raw/reference/core/mastra-model-gateway.mdx +2 -0
- package/.docs/raw/reference/core/setLogger.mdx +3 -1
- package/.docs/raw/reference/core/setStorage.mdx +6 -4
- package/.docs/raw/reference/deployer/cloudflare.mdx +22 -53
- package/.docs/raw/reference/deployer/deployer.mdx +2 -1
- package/.docs/raw/reference/deployer/netlify.mdx +4 -1
- package/.docs/raw/reference/deployer/vercel.mdx +5 -4
- package/.docs/raw/reference/evals/answer-relevancy.mdx +4 -1
- package/.docs/raw/reference/evals/answer-similarity.mdx +4 -1
- package/.docs/raw/reference/evals/bias.mdx +4 -1
- package/.docs/raw/reference/evals/completeness.mdx +4 -1
- package/.docs/raw/reference/evals/content-similarity.mdx +4 -1
- package/.docs/raw/reference/evals/context-precision.mdx +4 -1
- package/.docs/raw/reference/evals/context-relevance.mdx +2 -0
- package/.docs/raw/reference/evals/create-scorer.mdx +11 -3
- package/.docs/raw/reference/evals/faithfulness.mdx +4 -1
- package/.docs/raw/reference/evals/hallucination.mdx +4 -1
- package/.docs/raw/reference/evals/keyword-coverage.mdx +4 -1
- package/.docs/raw/reference/evals/mastra-scorer.mdx +2 -0
- package/.docs/raw/reference/evals/noise-sensitivity.mdx +2 -0
- package/.docs/raw/reference/evals/prompt-alignment.mdx +9 -7
- package/.docs/raw/reference/evals/run-evals.mdx +3 -1
- package/.docs/raw/reference/evals/scorer-utils.mdx +3 -0
- package/.docs/raw/reference/evals/textual-difference.mdx +4 -1
- package/.docs/raw/reference/evals/tone-consistency.mdx +4 -1
- package/.docs/raw/reference/evals/tool-call-accuracy.mdx +25 -23
- package/.docs/raw/reference/evals/toxicity.mdx +4 -1
- package/.docs/raw/reference/index.mdx +2 -1
- package/.docs/raw/reference/logging/pino-logger.mdx +10 -8
- package/.docs/raw/reference/memory/clone-utilities.mdx +345 -0
- package/.docs/raw/reference/memory/cloneThread.mdx +237 -0
- package/.docs/raw/reference/memory/createThread.mdx +6 -4
- package/.docs/raw/reference/memory/deleteMessages.mdx +4 -2
- package/.docs/raw/reference/memory/getThreadById.mdx +3 -1
- package/.docs/raw/reference/memory/listThreads.mdx +187 -0
- package/.docs/raw/reference/memory/memory-class.mdx +27 -20
- package/.docs/raw/reference/memory/recall.mdx +6 -4
- package/.docs/raw/reference/observability/tracing/bridges/otel.mdx +6 -2
- package/.docs/raw/reference/observability/tracing/configuration.mdx +51 -0
- package/.docs/raw/reference/observability/tracing/exporters/arize.mdx +25 -6
- package/.docs/raw/reference/observability/tracing/exporters/braintrust.mdx +23 -2
- package/.docs/raw/reference/observability/tracing/exporters/cloud-exporter.mdx +10 -0
- package/.docs/raw/reference/observability/tracing/exporters/console-exporter.mdx +3 -0
- package/.docs/raw/reference/observability/tracing/exporters/datadog.mdx +172 -0
- package/.docs/raw/reference/observability/tracing/exporters/default-exporter.mdx +10 -0
- package/.docs/raw/reference/observability/tracing/exporters/laminar.mdx +139 -0
- package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +26 -4
- package/.docs/raw/reference/observability/tracing/exporters/langsmith.mdx +10 -0
- package/.docs/raw/reference/observability/tracing/exporters/otel.mdx +51 -34
- package/.docs/raw/reference/observability/tracing/exporters/posthog.mdx +25 -4
- package/.docs/raw/reference/observability/tracing/exporters/sentry.mdx +224 -0
- package/.docs/raw/reference/observability/tracing/instances.mdx +2 -0
- package/.docs/raw/reference/observability/tracing/interfaces.mdx +20 -0
- package/.docs/raw/reference/observability/tracing/processors/sensitive-data-filter.mdx +2 -0
- package/.docs/raw/reference/observability/tracing/spans.mdx +2 -0
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +4 -2
- package/.docs/raw/reference/processors/language-detector.mdx +6 -3
- package/.docs/raw/reference/processors/message-history-processor.mdx +5 -2
- package/.docs/raw/reference/processors/moderation-processor.mdx +6 -4
- package/.docs/raw/reference/processors/pii-detector.mdx +6 -4
- package/.docs/raw/reference/processors/processor-interface.mdx +326 -23
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +5 -3
- package/.docs/raw/reference/processors/semantic-recall-processor.mdx +7 -2
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +5 -3
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +62 -19
- package/.docs/raw/reference/processors/tool-call-filter.mdx +5 -3
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +6 -3
- package/.docs/raw/reference/processors/working-memory-processor.mdx +6 -3
- package/.docs/raw/reference/rag/chunk.mdx +7 -6
- package/.docs/raw/reference/rag/database-config.mdx +8 -6
- package/.docs/raw/reference/rag/document.mdx +2 -0
- package/.docs/raw/reference/rag/embeddings.mdx +2 -0
- package/.docs/raw/reference/rag/extract-params.mdx +57 -3
- package/.docs/raw/reference/rag/graph-rag.mdx +2 -0
- package/.docs/raw/reference/rag/metadata-filters.mdx +27 -7
- package/.docs/raw/reference/rag/rerank.mdx +2 -0
- package/.docs/raw/reference/rag/rerankWithScorer.mdx +2 -0
- package/.docs/raw/reference/server/create-route.mdx +34 -18
- package/.docs/raw/reference/server/express-adapter.mdx +27 -51
- package/.docs/raw/reference/server/fastify-adapter.mdx +130 -0
- package/.docs/raw/reference/server/hono-adapter.mdx +27 -51
- package/.docs/raw/reference/server/koa-adapter.mdx +129 -0
- package/.docs/raw/reference/server/mastra-server.mdx +52 -34
- package/.docs/raw/reference/server/routes.mdx +73 -10
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +10 -5
- package/.docs/raw/reference/storage/cloudflare.mdx +12 -2
- package/.docs/raw/reference/storage/composite.mdx +245 -0
- package/.docs/raw/reference/storage/convex.mdx +8 -6
- package/.docs/raw/reference/storage/dynamodb.mdx +134 -8
- package/.docs/raw/reference/storage/lance.mdx +9 -5
- package/.docs/raw/reference/storage/libsql.mdx +76 -54
- package/.docs/raw/reference/storage/mongodb.mdx +115 -16
- package/.docs/raw/reference/storage/mssql.mdx +11 -6
- package/.docs/raw/{server-db/storage.mdx → reference/storage/overview.mdx} +15 -111
- package/.docs/raw/reference/storage/postgresql.mdx +228 -83
- package/.docs/raw/reference/storage/upstash.mdx +78 -2
- package/.docs/raw/reference/streaming/ChunkType.mdx +31 -3
- package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +67 -6
- package/.docs/raw/reference/streaming/agents/stream.mdx +48 -51
- package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +5 -3
- package/.docs/raw/reference/streaming/workflows/observeStream.mdx +3 -1
- package/.docs/raw/reference/streaming/workflows/resumeStream.mdx +3 -1
- package/.docs/raw/reference/streaming/workflows/stream.mdx +37 -22
- package/.docs/raw/reference/streaming/workflows/timeTravelStream.mdx +6 -4
- package/.docs/raw/reference/templates/overview.mdx +3 -2
- package/.docs/raw/reference/tools/client.mdx +3 -0
- package/.docs/raw/reference/tools/create-tool.mdx +127 -5
- package/.docs/raw/reference/tools/document-chunker-tool.mdx +2 -0
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +40 -3
- package/.docs/raw/reference/tools/mcp-client.mdx +110 -1
- package/.docs/raw/reference/tools/mcp-server.mdx +278 -24
- package/.docs/raw/reference/tools/vector-query-tool.mdx +68 -4
- package/.docs/raw/reference/vectors/astra.mdx +5 -3
- package/.docs/raw/reference/vectors/chroma.mdx +5 -3
- package/.docs/raw/reference/vectors/convex.mdx +14 -12
- package/.docs/raw/reference/vectors/couchbase.mdx +7 -5
- package/.docs/raw/reference/vectors/duckdb.mdx +12 -10
- package/.docs/raw/reference/vectors/elasticsearch.mdx +12 -4
- package/.docs/raw/reference/vectors/lance.mdx +6 -4
- package/.docs/raw/reference/vectors/libsql.mdx +66 -13
- package/.docs/raw/reference/vectors/mongodb.mdx +90 -10
- package/.docs/raw/reference/vectors/opensearch.mdx +30 -3
- package/.docs/raw/reference/vectors/pg.mdx +58 -6
- package/.docs/raw/reference/vectors/pinecone.mdx +23 -8
- package/.docs/raw/reference/vectors/qdrant.mdx +148 -4
- package/.docs/raw/reference/vectors/s3vectors.mdx +8 -6
- package/.docs/raw/reference/vectors/turbopuffer.mdx +6 -4
- package/.docs/raw/reference/vectors/upstash.mdx +60 -6
- package/.docs/raw/reference/vectors/vectorize.mdx +5 -3
- package/.docs/raw/reference/voice/azure.mdx +2 -0
- package/.docs/raw/reference/voice/cloudflare.mdx +2 -0
- package/.docs/raw/reference/voice/composite-voice.mdx +4 -0
- package/.docs/raw/reference/voice/deepgram.mdx +2 -0
- package/.docs/raw/reference/voice/elevenlabs.mdx +2 -0
- package/.docs/raw/reference/voice/google-gemini-live.mdx +3 -0
- package/.docs/raw/reference/voice/google.mdx +2 -0
- package/.docs/raw/reference/voice/mastra-voice.mdx +2 -0
- package/.docs/raw/reference/voice/murf.mdx +2 -0
- package/.docs/raw/reference/voice/openai-realtime.mdx +3 -0
- package/.docs/raw/reference/voice/openai.mdx +2 -0
- package/.docs/raw/reference/voice/playai.mdx +2 -0
- package/.docs/raw/reference/voice/sarvam.mdx +2 -0
- package/.docs/raw/reference/voice/speechify.mdx +2 -0
- package/.docs/raw/reference/voice/voice.addInstructions.mdx +3 -0
- package/.docs/raw/reference/voice/voice.addTools.mdx +3 -0
- package/.docs/raw/reference/voice/voice.answer.mdx +4 -0
- package/.docs/raw/reference/voice/voice.close.mdx +3 -0
- package/.docs/raw/reference/voice/voice.connect.mdx +5 -1
- package/.docs/raw/reference/voice/voice.events.mdx +2 -0
- package/.docs/raw/reference/voice/voice.getSpeakers.mdx +3 -0
- package/.docs/raw/reference/voice/voice.listen.mdx +6 -0
- package/.docs/raw/reference/voice/voice.off.mdx +2 -0
- package/.docs/raw/reference/voice/voice.on.mdx +5 -1
- package/.docs/raw/reference/voice/voice.send.mdx +4 -0
- package/.docs/raw/reference/voice/voice.speak.mdx +6 -0
- package/.docs/raw/reference/voice/voice.updateConfig.mdx +2 -0
- package/.docs/raw/reference/workflows/run-methods/cancel.mdx +55 -5
- package/.docs/raw/reference/workflows/run-methods/restart.mdx +3 -3
- package/.docs/raw/reference/workflows/run-methods/resume.mdx +6 -4
- package/.docs/raw/reference/workflows/run-methods/start.mdx +7 -5
- package/.docs/raw/reference/workflows/run-methods/startAsync.mdx +145 -0
- package/.docs/raw/reference/workflows/run-methods/timeTravel.mdx +10 -8
- package/.docs/raw/reference/workflows/run.mdx +11 -3
- package/.docs/raw/reference/workflows/step.mdx +56 -3
- package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +3 -1
- package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +3 -1
- package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +39 -2
- package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +3 -1
- package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +3 -1
- package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +71 -4
- package/.docs/raw/reference/workflows/workflow-methods/map.mdx +9 -7
- package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +3 -1
- package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +4 -6
- package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +4 -6
- package/.docs/raw/reference/workflows/workflow-methods/then.mdx +3 -1
- package/.docs/raw/reference/workflows/workflow.mdx +193 -2
- package/.docs/raw/{auth → server/auth}/auth0.mdx +40 -21
- package/.docs/raw/{auth → server/auth}/clerk.mdx +37 -16
- package/.docs/raw/{auth → server/auth}/firebase.mdx +47 -25
- package/.docs/raw/{auth → server/auth}/index.mdx +8 -6
- package/.docs/raw/{auth → server/auth}/jwt.mdx +22 -10
- package/.docs/raw/{auth → server/auth}/supabase.mdx +45 -25
- package/.docs/raw/{auth → server/auth}/workos.mdx +39 -20
- package/.docs/raw/{server-db → server}/custom-adapters.mdx +40 -24
- package/.docs/raw/{server-db → server}/custom-api-routes.mdx +6 -6
- package/.docs/raw/{server-db → server}/mastra-client.mdx +35 -38
- package/.docs/raw/server/mastra-server.mdx +86 -0
- package/.docs/raw/{server-db → server}/middleware.mdx +11 -9
- package/.docs/raw/{server-db → server}/request-context.mdx +85 -43
- package/.docs/raw/{server-db → server}/server-adapters.mdx +154 -33
- package/.docs/raw/streaming/events.mdx +16 -7
- package/.docs/raw/streaming/overview.mdx +30 -17
- package/.docs/raw/streaming/tool-streaming.mdx +8 -6
- package/.docs/raw/streaming/workflow-streaming.mdx +8 -8
- package/.docs/raw/tools-mcp/advanced-usage.mdx +4 -2
- package/.docs/raw/tools-mcp/mcp-overview.mdx +46 -12
- package/.docs/raw/tools-mcp/overview.mdx +14 -13
- package/.docs/raw/voice/overview.mdx +17 -2
- package/.docs/raw/voice/speech-to-speech.mdx +5 -0
- package/.docs/raw/voice/speech-to-text.mdx +4 -0
- package/.docs/raw/voice/text-to-speech.mdx +3 -0
- package/.docs/raw/workflows/agents-and-tools.mdx +70 -21
- package/.docs/raw/workflows/control-flow.mdx +369 -34
- package/.docs/raw/workflows/error-handling.mdx +192 -18
- package/.docs/raw/workflows/human-in-the-loop.mdx +8 -7
- package/.docs/raw/workflows/input-data-mapping.mdx +9 -7
- package/.docs/raw/workflows/overview.mdx +80 -34
- package/.docs/raw/workflows/snapshots.mdx +19 -45
- package/.docs/raw/workflows/suspend-and-resume.mdx +14 -14
- package/.docs/raw/workflows/time-travel.mdx +25 -21
- package/.docs/raw/workflows/workflow-state.mdx +7 -8
- package/CHANGELOG.md +260 -0
- package/README.md +36 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/logger.d.ts +3 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/stdio.js +746 -49
- package/dist/tools/course.d.ts.map +1 -1
- package/dist/tools/embedded-docs.d.ts +276 -0
- package/dist/tools/embedded-docs.d.ts.map +1 -0
- package/package.json +9 -8
- package/.docs/organized/changelogs/%40internal%2Fai-sdk-v4.md +0 -1
- package/.docs/raw/deployment/building-mastra.mdx +0 -73
- package/.docs/raw/deployment/cloud-providers/index.mdx +0 -55
- package/.docs/raw/deployment/mastra-cloud/dashboard.mdx +0 -100
- package/.docs/raw/deployment/mastra-cloud/observability.mdx +0 -53
- package/.docs/raw/deployment/mastra-cloud/overview.mdx +0 -65
- package/.docs/raw/deployment/mastra-cloud/setting-up.mdx +0 -105
- package/.docs/raw/memory/conversation-history.mdx +0 -24
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +0 -140
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +0 -150
- package/.docs/raw/memory/storage/memory-with-pg.mdx +0 -138
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +0 -146
- package/.docs/raw/memory/threads-and-resources.mdx +0 -95
- package/.docs/raw/reference/core/setTelemetry.mdx +0 -36
- package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +0 -110
- package/.docs/raw/reference/memory/query.mdx +0 -189
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +0 -70
- package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +0 -66
- package/.docs/raw/server-db/mastra-server.mdx +0 -97
- package/.docs/raw/workflows/inngest-workflow.mdx +0 -363
|
@@ -147,7 +147,7 @@ npx @mastra/codemod@beta v1/agent-processor-methods .
|
|
|
147
147
|
|
|
148
148
|
### Default options method renames for AI SDK versions
|
|
149
149
|
|
|
150
|
-
Default options methods have been renamed to clarify legacy (AI SDK v4) vs new (AI SDK v5) APIs. This change helps developers understand which AI SDK version they're targeting.
|
|
150
|
+
Default options methods have been renamed to clarify legacy (AI SDK v4) vs new (AI SDK v5+) APIs. This change helps developers understand which AI SDK version they're targeting.
|
|
151
151
|
|
|
152
152
|
To migrate, update method names based on which AI SDK version you're using.
|
|
153
153
|
|
|
@@ -158,7 +158,7 @@ To migrate, update method names based on which AI SDK version you're using.
|
|
|
158
158
|
+ const options = await agent.getDefaultGenerateOptionsLegacy();
|
|
159
159
|
+ const streamOptions = await agent.getDefaultStreamOptionsLegacy();
|
|
160
160
|
|
|
161
|
-
// For new AI SDK v5 (default)
|
|
161
|
+
// For new AI SDK v5+ (default)
|
|
162
162
|
const streamOptions = await agent.getDefaultStreamOptions();
|
|
163
163
|
```
|
|
164
164
|
|
|
@@ -213,7 +213,7 @@ To migrate, add an `id` field to all Agent configurations.
|
|
|
213
213
|
+ id: 'my-agent',
|
|
214
214
|
name: 'My Agent',
|
|
215
215
|
instructions: 'You are a helpful assistant',
|
|
216
|
-
model: openai
|
|
216
|
+
model: 'openai/gpt-4',
|
|
217
217
|
});
|
|
218
218
|
```
|
|
219
219
|
|
|
@@ -246,7 +246,7 @@ This behavior is enabled by default. If you need access to the full request data
|
|
|
246
246
|
|
|
247
247
|
### `generateVNext` and `streamVNext` methods
|
|
248
248
|
|
|
249
|
-
The deprecated `generateVNext()` and `streamVNext()` methods have been removed. These methods were previously used for AI SDK v5 compatibility but are now the standard implementation.
|
|
249
|
+
The deprecated `generateVNext()` and `streamVNext()` methods have been removed. These methods were previously used for AI SDK v5+ compatibility but are now the standard implementation.
|
|
250
250
|
|
|
251
251
|
To migrate, use the standard `generate()` and `stream()` methods.
|
|
252
252
|
|
|
@@ -313,3 +313,104 @@ To migrate, remove the `TMetrics` generic parameter and configure scorers using
|
|
|
313
313
|
// ...
|
|
314
314
|
});
|
|
315
315
|
```
|
|
316
|
+
|
|
317
|
+
### Tripwire response format changed
|
|
318
|
+
|
|
319
|
+
The tripwire response format has changed from separate `tripwire` and `tripwireReason` fields to a single `tripwire` object containing all related data.
|
|
320
|
+
|
|
321
|
+
To migrate, update your code to access tripwire data from the new object structure.
|
|
322
|
+
|
|
323
|
+
```diff
|
|
324
|
+
const result = await agent.generate('Hello');
|
|
325
|
+
|
|
326
|
+
- if (result.tripwire) {
|
|
327
|
+
- console.log(result.tripwireReason);
|
|
328
|
+
- }
|
|
329
|
+
+ if (result.tripwire) {
|
|
330
|
+
+ console.log(result.tripwire.reason);
|
|
331
|
+
+ // New fields available:
|
|
332
|
+
+ // result.tripwire.retry - whether this step should be retried
|
|
333
|
+
+ // result.tripwire.metadata - additional metadata from the processor
|
|
334
|
+
+ // result.tripwire.processorId - which processor triggered the tripwire
|
|
335
|
+
+ }
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
For streaming responses:
|
|
339
|
+
|
|
340
|
+
```diff
|
|
341
|
+
for await (const chunk of stream.fullStream) {
|
|
342
|
+
if (chunk.type === 'tripwire') {
|
|
343
|
+
- console.log(chunk.payload.tripwireReason);
|
|
344
|
+
+ console.log(chunk.payload.reason);
|
|
345
|
+
+ // New fields available:
|
|
346
|
+
+ // chunk.payload.retry
|
|
347
|
+
+ // chunk.payload.metadata
|
|
348
|
+
+ // chunk.payload.processorId
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
The step results now also include tripwire information:
|
|
354
|
+
|
|
355
|
+
```diff
|
|
356
|
+
const result = await agent.generate('Hello');
|
|
357
|
+
|
|
358
|
+
for (const step of result.steps) {
|
|
359
|
+
- // No tripwire info on steps
|
|
360
|
+
+ if (step.tripwire) {
|
|
361
|
+
+ console.log('Step was blocked:', step.tripwire.reason);
|
|
362
|
+
+ }
|
|
363
|
+
}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### `prepareStep` messages format
|
|
367
|
+
|
|
368
|
+
The `prepareStep` callback now receives messages in `MastraDBMessage` format instead of AI SDK v5+ model message format. This change unifies `prepareStep` with the new `processInputStep` processor method, which runs at each step of the agentic loop.
|
|
369
|
+
|
|
370
|
+
If you need the old AI SDK v5+ format, use `messageList.get.all.aiV5.model()`:
|
|
371
|
+
|
|
372
|
+
```diff
|
|
373
|
+
agent.generate('Hello', {
|
|
374
|
+
prepareStep: async ({ messages, messageList }) => {
|
|
375
|
+
- // messages was AI SDK v5+ ModelMessage format
|
|
376
|
+
- console.log(messages[0].content);
|
|
377
|
+
+ // messages is now MastraDBMessage format
|
|
378
|
+
+ // Use messageList to get AI SDK v5+ format if needed:
|
|
379
|
+
+ const aiSdkMessages = messageList.get.all.aiV5.model();
|
|
380
|
+
|
|
381
|
+
return { toolChoice: 'auto' };
|
|
382
|
+
},
|
|
383
|
+
});
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### `threadId` and `resourceId` to `memory` option
|
|
387
|
+
|
|
388
|
+
The `threadId` and `resourceId` options have been removed from `agent.stream()` and `agent.generate()`. Use the `memory` option instead, which provides a cleaner API for memory configuration.
|
|
389
|
+
|
|
390
|
+
To migrate, move `threadId` and `resourceId` into the `memory` option:
|
|
391
|
+
|
|
392
|
+
```diff
|
|
393
|
+
await agent.stream('Hello', {
|
|
394
|
+
- threadId: 'thread-123',
|
|
395
|
+
- resourceId: 'user-456',
|
|
396
|
+
+ memory: {
|
|
397
|
+
+ thread: 'thread-123',
|
|
398
|
+
+ resource: 'user-456',
|
|
399
|
+
+ },
|
|
400
|
+
});
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
The `memory` option also supports passing thread metadata when creating new threads:
|
|
404
|
+
|
|
405
|
+
```typescript
|
|
406
|
+
await agent.stream('Hello', {
|
|
407
|
+
memory: {
|
|
408
|
+
thread: {
|
|
409
|
+
id: 'thread-123',
|
|
410
|
+
title: 'Support conversation',
|
|
411
|
+
metadata: { category: 'billing' },
|
|
412
|
+
},
|
|
413
|
+
resource: 'user-456',
|
|
414
|
+
},
|
|
415
|
+
});
|
|
416
|
+
```
|
|
@@ -5,7 +5,21 @@ description: "Learn how to migrate CLI changes when upgrading to v1."
|
|
|
5
5
|
|
|
6
6
|
# CLI
|
|
7
7
|
|
|
8
|
-
The CLI has been simplified by removing deployment commands, configuration flags, and starter files.
|
|
8
|
+
The CLI has been simplified by removing deployment commands, configuration flags, and starter files. A new migration command has been added to help with database schema upgrades.
|
|
9
|
+
|
|
10
|
+
## Added
|
|
11
|
+
|
|
12
|
+
### `mastra migrate` command
|
|
13
|
+
|
|
14
|
+
A new `mastra migrate` command helps run database migrations when upgrading Mastra versions. This is particularly useful when upgrading from older versions that may have data incompatibilities.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npx mastra migrate
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The command bundles your project, connects to your configured storage, and runs any necessary migrations. Currently supports migrating duplicate spans entries that may prevent unique constraint creation.
|
|
21
|
+
|
|
22
|
+
See the [Storage migration guide](/guides/v1/migrations/upgrade-to-v1/storage#duplicate-spans-migration) for details on when this migration is needed.
|
|
9
23
|
|
|
10
24
|
## Removed
|
|
11
25
|
|
|
@@ -9,6 +9,103 @@ Client SDK changes align with server-side API updates including renamed utilitie
|
|
|
9
9
|
|
|
10
10
|
## Changed
|
|
11
11
|
|
|
12
|
+
### `messages` is now identical to `@mastra/core/agent` syntax
|
|
13
|
+
|
|
14
|
+
The `messages` argument is now the first argument of the `generate`, `stream` and `network` method calls, similar to the NodeJS version in `@mastra/core/agent`.
|
|
15
|
+
|
|
16
|
+
To migrate, move `messages` to the first argument of the method call:
|
|
17
|
+
|
|
18
|
+
**Using `@mastra/client-js`:**
|
|
19
|
+
|
|
20
|
+
```diff
|
|
21
|
+
const agent = client.getAgent('my-agent');
|
|
22
|
+
|
|
23
|
+
- await agent.generate({
|
|
24
|
+
- messages: [...]
|
|
25
|
+
+ await agent.generate([...], {
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
- await agent.stream({
|
|
29
|
+
- messages: [...]
|
|
30
|
+
+ await agent.stream([...], {
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
- await agent.network({
|
|
34
|
+
- messages: [...]
|
|
35
|
+
+ await agent.network([...], {
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
:::tip[Codemod]
|
|
40
|
+
|
|
41
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
42
|
+
|
|
43
|
+
```shell
|
|
44
|
+
npx @mastra/codemod@beta v1/client-msg-function-args .
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
:::
|
|
48
|
+
|
|
49
|
+
### `threadId` and `resourceId` to `memory` option
|
|
50
|
+
|
|
51
|
+
The `threadId` and `resourceId` options have been removed from agent method calls. Use the `memory` option instead, which provides a cleaner API for memory configuration. This applies to both `@mastra/client-js` and `@mastra/react` packages.
|
|
52
|
+
|
|
53
|
+
To migrate, move `threadId` and `resourceId` into the `memory` option:
|
|
54
|
+
|
|
55
|
+
**Using `@mastra/client-js`:**
|
|
56
|
+
|
|
57
|
+
```diff
|
|
58
|
+
const agent = client.getAgent('my-agent');
|
|
59
|
+
|
|
60
|
+
await agent.generate([...], {
|
|
61
|
+
- threadId: 'thread-123',
|
|
62
|
+
- resourceId: 'user-456',
|
|
63
|
+
+ memory: {
|
|
64
|
+
+ thread: 'thread-123',
|
|
65
|
+
+ resource: 'user-456',
|
|
66
|
+
+ },
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
+ await agent.stream([...], {
|
|
70
|
+
- threadId: 'thread-123',
|
|
71
|
+
- resourceId: 'user-456',
|
|
72
|
+
+ memory: {
|
|
73
|
+
+ thread: 'thread-123',
|
|
74
|
+
+ resource: 'user-456',
|
|
75
|
+
+ },
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Using `@mastra/react` `useChat` hook:**
|
|
80
|
+
|
|
81
|
+
The `useChat` hook internally passes the memory option when you provide a `threadId`. No changes are needed in your component code if you're using the hook's built-in memory handling. However, if you were manually passing options to `sendMessage`, update them accordingly:
|
|
82
|
+
|
|
83
|
+
```diff
|
|
84
|
+
const { sendMessage } = useChat({ agentId: 'my-agent' });
|
|
85
|
+
|
|
86
|
+
await sendMessage({
|
|
87
|
+
message: 'Hello',
|
|
88
|
+
mode: 'stream',
|
|
89
|
+
- threadId: 'thread-123',
|
|
90
|
+
+ threadId: 'thread-123', // Still works - internally converted to memory option
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The `memory` option also supports passing thread metadata when creating new threads:
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
await agent.generate([...], {
|
|
98
|
+
memory: {
|
|
99
|
+
thread: {
|
|
100
|
+
id: 'thread-123',
|
|
101
|
+
title: 'Support conversation',
|
|
102
|
+
metadata: { category: 'billing' },
|
|
103
|
+
},
|
|
104
|
+
resource: 'user-456',
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
12
109
|
### Client SDK types from `Get*` to `List*`
|
|
13
110
|
|
|
14
111
|
Client SDK types have been renamed from `Get*` to `List*` pattern. This change aligns type names with the method naming convention.
|
|
@@ -85,8 +182,52 @@ npx @mastra/codemod@beta v1/client-get-memory-thread .
|
|
|
85
182
|
|
|
86
183
|
:::
|
|
87
184
|
|
|
185
|
+
### Unified `runById` API for workflow runs
|
|
186
|
+
|
|
187
|
+
The `runById()` method now returns a unified `WorkflowState` object containing both metadata (runId, workflowName, resourceId, createdAt, updatedAt) and processed execution state (status, result, error, payload, steps). This unifies the previously separate `runById()` and `runExecutionResult()` methods.
|
|
188
|
+
|
|
189
|
+
The method also accepts an options object with optional `fields` and `withNestedWorkflows` parameters for performance optimization.
|
|
190
|
+
|
|
191
|
+
```diff
|
|
192
|
+
const workflow = client.getWorkflow('my-workflow');
|
|
193
|
+
|
|
194
|
+
- // Previously: runById returned raw WorkflowRun with snapshot
|
|
195
|
+
- const run = await workflow.runById(runId, requestContext);
|
|
196
|
+
- // Separately: runExecutionResult returned processed execution state
|
|
197
|
+
- const result = await workflow.runExecutionResult(runId);
|
|
198
|
+
|
|
199
|
+
+ // Now: Single method returns unified WorkflowState
|
|
200
|
+
+ const run = await workflow.runById(runId, {
|
|
201
|
+
+ requestContext, // Optional request context
|
|
202
|
+
+ fields: ['status', 'result'], // Optional: request only specific fields
|
|
203
|
+
+ withNestedWorkflows: false, // Optional: skip nested workflow data for performance
|
|
204
|
+
+ });
|
|
205
|
+
+ // Returns: { runId, workflowName, resourceId, createdAt, updatedAt, status, result, error, payload, steps }
|
|
206
|
+
```
|
|
207
|
+
|
|
88
208
|
## Removed
|
|
89
209
|
|
|
210
|
+
### `runExecutionResult` method and `GetWorkflowRunExecutionResultResponse` type
|
|
211
|
+
|
|
212
|
+
The `runExecutionResult()` method and `GetWorkflowRunExecutionResultResponse` type have been removed from `@mastra/client-js`. The `/execution-result` API endpoints have also been removed.
|
|
213
|
+
|
|
214
|
+
To migrate, use `runById()` instead, which now returns the same unified `WorkflowState` with both metadata and processed execution state.
|
|
215
|
+
|
|
216
|
+
```diff
|
|
217
|
+
- import type { GetWorkflowRunExecutionResultResponse } from '@mastra/client-js';
|
|
218
|
+
-
|
|
219
|
+
- const workflow = client.getWorkflow('my-workflow');
|
|
220
|
+
- const result = await workflow.runExecutionResult(runId);
|
|
221
|
+
|
|
222
|
+
+ const workflow = client.getWorkflow('my-workflow');
|
|
223
|
+
+ const result = await workflow.runById(runId);
|
|
224
|
+
+ // Or with options for performance optimization:
|
|
225
|
+
+ const result = await workflow.runById(runId, {
|
|
226
|
+
+ fields: ['status', 'result'], // Only fetch specific fields
|
|
227
|
+
+ withNestedWorkflows: false, // Skip expensive nested workflow data
|
|
228
|
+
+ });
|
|
229
|
+
```
|
|
230
|
+
|
|
90
231
|
### `toAISdkFormat` function
|
|
91
232
|
|
|
92
233
|
The `toAISdkFormat()` function has been removed from `@mastra/ai-sdk`. This change provides clearer naming for stream conversion utilities.
|
|
@@ -155,6 +296,35 @@ To migrate, use workflow streaming APIs instead of watch.
|
|
|
155
296
|
+ }
|
|
156
297
|
```
|
|
157
298
|
|
|
299
|
+
### Run-related methods cannot be called directly on workflow instance
|
|
300
|
+
|
|
301
|
+
Run-related methods cannot be called directly on workflow instance. You need to create a run instance first using `createRun()` method.
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
```diff
|
|
305
|
+
- const result = await workflow.start({ runId: '123', inputData: { ... } });
|
|
306
|
+
+ const run = await workflow.createRun({ runId: '123' });
|
|
307
|
+
+ const result = await run.start({ inputData: { ... } });
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
```diff
|
|
311
|
+
- const result = await workflow.stream({ runId: '123', inputData: { ... } });
|
|
312
|
+
+ const run = await workflow.createRun({ runId: '123' });
|
|
313
|
+
+ const stream = await run.stream({ inputData: { ... } });
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### `streamVNext`, `resumeStreamVNext`, and `observeStreamVNext` methods
|
|
317
|
+
|
|
318
|
+
The experimental `streamVNext()`, `resumeStreamVNext()`, and `observeStreamVNext()` methods have been removed. These methods are now the standard implementation with updated event structures and return types.
|
|
319
|
+
|
|
320
|
+
To migrate, use the standard `stream()`, `resumeStream()`, and `observeStream()` methods instead.
|
|
321
|
+
|
|
322
|
+
```diff
|
|
323
|
+
+ const run = await workflow.createRun({ runId: '123' });
|
|
324
|
+
- const stream = await run.streamVNext({ inputData: { ... } });
|
|
325
|
+
+ const stream = await run.stream({ inputData: { ... } });
|
|
326
|
+
```
|
|
327
|
+
|
|
158
328
|
### Deprecated stream endpoints
|
|
159
329
|
|
|
160
330
|
Some stream endpoints are deprecated and will be removed. The `/api/agents/:agentId/stream/vnext` endpoint returns 410 Gone, and `/api/agents/:agentId/stream/ui` is deprecated. This change consolidates on standard streaming endpoints.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Deployment | v1 Migration Guide"
|
|
3
|
+
description: "Learn how to migrate deployment configuration when upgrading to v1."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Deployment
|
|
7
|
+
|
|
8
|
+
The `CloudflareDeployer` configuration has been updated to use standard `wrangler.json` property names.
|
|
9
|
+
|
|
10
|
+
## Changed
|
|
11
|
+
|
|
12
|
+
### CloudflareDeployer uses standard wrangler.json property names
|
|
13
|
+
|
|
14
|
+
The `CloudflareDeployer` constructor now accepts standard `wrangler.json` property names instead of custom camelCase variants. This change aligns the deployer with Cloudflare's official configuration format and provides access to all wrangler configuration options.
|
|
15
|
+
|
|
16
|
+
Deprecated fields are automatically migrated at runtime with console warnings, but you should update your code to use the new field names.
|
|
17
|
+
|
|
18
|
+
```diff
|
|
19
|
+
const deployer = new CloudflareDeployer({
|
|
20
|
+
- projectName: 'my-worker',
|
|
21
|
+
+ name: 'my-worker',
|
|
22
|
+
- d1Databases: [
|
|
23
|
+
+ d1_databases: [
|
|
24
|
+
{
|
|
25
|
+
binding: 'DB',
|
|
26
|
+
database_name: 'my-db',
|
|
27
|
+
database_id: 'xxx',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
- kvNamespaces: [
|
|
31
|
+
+ kv_namespaces: [
|
|
32
|
+
{
|
|
33
|
+
binding: 'KV',
|
|
34
|
+
id: 'yyy',
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The `workerNamespace` field has been removed as it is no longer used.
|
|
41
|
+
|
|
42
|
+
For all available configuration options, see the [Wrangler configuration documentation](https://developers.cloudflare.com/workers/wrangler/configuration/).
|
|
@@ -158,38 +158,3 @@ To migrate, update any code that references tools by their configuration keys to
|
|
|
158
158
|
- mastra.getTool('searchTool');
|
|
159
159
|
+ mastra.getTool(weatherSearchTool.id);
|
|
160
160
|
```
|
|
161
|
-
|
|
162
|
-
## Removed
|
|
163
|
-
|
|
164
|
-
### `memory` property from Mastra class
|
|
165
|
-
|
|
166
|
-
The `memory` property has been removed from the Mastra class. Memory is now configured at the Agent level rather than globally.
|
|
167
|
-
|
|
168
|
-
To migrate, move memory configuration from the Mastra constructor to individual Agent constructors.
|
|
169
|
-
|
|
170
|
-
```diff
|
|
171
|
-
- const mastra = new Mastra({
|
|
172
|
-
- memory: new Memory({
|
|
173
|
-
- storage: libsqlStore,
|
|
174
|
-
- vector: libsqlVector,
|
|
175
|
-
- embedder: fastembed,
|
|
176
|
-
- }),
|
|
177
|
-
- });
|
|
178
|
-
-
|
|
179
|
-
- const agent = new Agent({
|
|
180
|
-
- name: 'my-agent',
|
|
181
|
-
- });
|
|
182
|
-
|
|
183
|
-
+ const mastra = new Mastra({
|
|
184
|
-
+ // memory removed from here
|
|
185
|
-
+ });
|
|
186
|
-
+
|
|
187
|
-
+ const agent = new Agent({
|
|
188
|
-
+ name: 'my-agent',
|
|
189
|
-
+ memory: new Memory({
|
|
190
|
-
+ storage: libsqlStore,
|
|
191
|
-
+ vector: libsqlVector,
|
|
192
|
-
+ embedder: fastembed,
|
|
193
|
-
+ }),
|
|
194
|
-
+ });
|
|
195
|
-
```
|
|
@@ -97,6 +97,35 @@ To migrate, if you were relying on the previous defaults, explicitly set these v
|
|
|
97
97
|
});
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
+
### `memory.readOnly` moved to `memory.options.readOnly`
|
|
101
|
+
|
|
102
|
+
The `readOnly` property has been moved from the top-level of the memory option to inside `options`. This change aligns `readOnly` with other memory configuration options like `lastMessages` and `semanticRecall`.
|
|
103
|
+
|
|
104
|
+
To migrate, move `readOnly` from the top level to inside `options`.
|
|
105
|
+
|
|
106
|
+
```diff
|
|
107
|
+
agent.stream('Hello', {
|
|
108
|
+
memory: {
|
|
109
|
+
thread: threadId,
|
|
110
|
+
resource: resourceId,
|
|
111
|
+
- readOnly: true,
|
|
112
|
+
+ options: {
|
|
113
|
+
+ readOnly: true,
|
|
114
|
+
+ },
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
:::tip[Codemod]
|
|
120
|
+
|
|
121
|
+
You can use Mastra's codemod CLI to update your code automatically:
|
|
122
|
+
|
|
123
|
+
```shell
|
|
124
|
+
npx @mastra/codemod@beta v1/memory-readonly-to-options .
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
:::
|
|
128
|
+
|
|
100
129
|
### `Memory.query()` renamed to `Memory.recall()`
|
|
101
130
|
|
|
102
131
|
The `Memory.query()` method has been renamed to `Memory.recall()`. The new method returns a simpler format with just `{ messages: MastraDBMessage[] }` instead of multiple format variations. This change better describes the action of retrieving messages from memory and simplifies the API.
|
|
@@ -252,18 +281,26 @@ To migrate, use `MastraDBMessage` for storage or AI SDK v5 message formats direc
|
|
|
252
281
|
|
|
253
282
|
The `processors` config option in the Memory constructor has been deprecated and now throws an error. Processors should be configured at the Agent level instead. This change provides clearer configuration boundaries and better encapsulation.
|
|
254
283
|
|
|
255
|
-
To migrate, move processor configuration from Memory to Agent
|
|
284
|
+
To migrate, move processor configuration from Memory to Agent using `inputProcessors` and/or `outputProcessors`.
|
|
256
285
|
|
|
257
286
|
```diff
|
|
287
|
+
+ import { TokenLimiter } from '@mastra/core/processors';
|
|
288
|
+
+
|
|
258
289
|
const memory = new Memory({
|
|
259
290
|
storage,
|
|
260
291
|
vector,
|
|
261
292
|
embedder,
|
|
262
293
|
- processors: [/* ... */],
|
|
263
294
|
});
|
|
264
|
-
|
|
295
|
+
|
|
265
296
|
const agent = new Agent({
|
|
266
297
|
memory,
|
|
267
|
-
+
|
|
298
|
+
+ inputProcessors: [
|
|
299
|
+
+ new TokenLimiter({ limit: 4000 }), // Limits historical messages to fit context window
|
|
300
|
+
+ ],
|
|
268
301
|
});
|
|
269
302
|
```
|
|
303
|
+
|
|
304
|
+
Additionally, the `@mastra/memory/processors` import path has been removed. Import processors from `@mastra/core/processors` instead. See the [processors migration guide](/guides/v1/migrations/upgrade-to-v1/processors#memory-processor-exports-moved-to-core) for details.
|
|
305
|
+
|
|
306
|
+
For more information on using processors with agents, see the [Processors docs](/docs/v1/agents/processors). For a complete example with memory, see the [TokenLimiter reference](/reference/v1/processors/token-limiter-processor#extended-usage-example).
|
|
@@ -5,6 +5,12 @@ description: "Overview of breaking changes when upgrading to Mastra v1."
|
|
|
5
5
|
|
|
6
6
|
# Upgrade to Mastra v1
|
|
7
7
|
|
|
8
|
+
:::info[First update to latest 0.x version]
|
|
9
|
+
Before upgrading to v1, make sure you've updated to the latest 0.x version of Mastra. Follow the [upgrade to latest 0.x guide](https://mastra.ai/guides/migrations/upgrade-to-latest-0x) first, then return here to complete the v1 migration.
|
|
10
|
+
:::
|
|
11
|
+
|
|
12
|
+
Mastra v1 is coming in January 2026. We recommend starting any new projects with the beta, or upgrading your existing project today to get ahead.
|
|
13
|
+
|
|
8
14
|
This guide provides a comprehensive overview of breaking changes when upgrading from Mastra 0.x to v1.0. The migration is organized by package and feature area to help you systematically update your codebase.
|
|
9
15
|
|
|
10
16
|
:::tip[Need help?]
|
|
@@ -15,12 +21,12 @@ Need help with the migration? Join our [Discord community](https://discord.gg/BT
|
|
|
15
21
|
|
|
16
22
|
### Update all Mastra packages to `beta` tag
|
|
17
23
|
|
|
18
|
-
Use your package manager to update your project's versions. Be sure to update **all** Mastra packages at the same time to ensure compatibility.
|
|
24
|
+
Use your package manager to update your project's versions. Be sure to update **all** Mastra packages at the same time to ensure compatibility (all `@mastra/*` packages and `mastra`).
|
|
19
25
|
|
|
20
26
|
Here's how you update the most commonly used packages:
|
|
21
27
|
|
|
22
28
|
```shell
|
|
23
|
-
npm install @mastra/core@beta
|
|
29
|
+
npm install @mastra/core@beta @mastra/loggers@beta @mastra/memory@beta mastra@beta
|
|
24
30
|
```
|
|
25
31
|
|
|
26
32
|
Install any other Mastra package with the `@beta` tag and you'll get the latest beta version available. Be sure to update all Mastra packages (especially if you're in a monorepo) to avoid version mismatches.
|
|
@@ -43,6 +49,12 @@ npx @mastra/codemod@beta v1
|
|
|
43
49
|
|
|
44
50
|
:::
|
|
45
51
|
|
|
52
|
+
:::note[Database Migration Required]
|
|
53
|
+
|
|
54
|
+
If you're using PostgreSQL or LibSQL storage, you'll need to run a database migration. See the [Storage migration guide](/guides/v1/migrations/upgrade-to-v1/storage#database-migration) for details.
|
|
55
|
+
|
|
56
|
+
:::
|
|
57
|
+
|
|
46
58
|
## Breaking Changes by Area
|
|
47
59
|
|
|
48
60
|
- **[Mastra Class](/guides/v1/migrations/upgrade-to-v1/mastra)** - Import restructuring and property access changes.
|
|
@@ -52,10 +64,12 @@ npx @mastra/codemod@beta v1
|
|
|
52
64
|
- **[Memory](/guides/v1/migrations/upgrade-to-v1/memory)** - Configuration now requires explicit parameters and defaults changed.
|
|
53
65
|
- **[Storage](/guides/v1/migrations/upgrade-to-v1/storage)** - Pagination standardized and methods renamed to list pattern.
|
|
54
66
|
- **[Vectors](/guides/v1/migrations/upgrade-to-v1/vectors)** - Vector store methods renamed to list pattern.
|
|
67
|
+
- **[RAG](/guides/v1/migrations/upgrade-to-v1/rag)** - Parameter naming updated for clarity.
|
|
55
68
|
- **[MCP](/guides/v1/migrations/upgrade-to-v1/mcp)** - Tool context reorganized and deprecated client classes removed.
|
|
56
69
|
- **[Tracing](/guides/v1/migrations/upgrade-to-v1/tracing)** - OTEL telemetry replaced with dedicated observability package and exporters.
|
|
57
70
|
- **[Evals & Scorers](/guides/v1/migrations/upgrade-to-v1/evals)** - Scorers API consolidated with new naming conventions.
|
|
58
71
|
- **[CLI](/guides/v1/migrations/upgrade-to-v1/cli)** - Commands and flags removed for simpler interface.
|
|
72
|
+
- **[Deployment](/guides/v1/migrations/upgrade-to-v1/deployment)** - CloudflareDeployer configuration updated to use standard wrangler.json property names.
|
|
59
73
|
- **[Client SDKs](/guides/v1/migrations/upgrade-to-v1/client)** - Types and utilities renamed for consistency.
|
|
60
74
|
- **[Voice Packages](/guides/v1/migrations/upgrade-to-v1/voice)** - Packages renamed from speech to voice.
|
|
61
75
|
|
|
@@ -96,6 +110,7 @@ npx @mastra/codemod@beta v1
|
|
|
96
110
|
|
|
97
111
|
### Low Impact Changes
|
|
98
112
|
|
|
113
|
+
- Rename `keepSeparator` to `separatorPosition` in chunk options - [RAG](/guides/v1/migrations/upgrade-to-v1/rag)
|
|
99
114
|
- Rename `createRunAsync` to `createRun` - [Workflows](/guides/v1/migrations/upgrade-to-v1/workflows)
|
|
100
115
|
- Update voice package names from `@mastra/speech-*` to `@mastra/voice-*` - [Voice Packages](/guides/v1/migrations/upgrade-to-v1/voice)
|
|
101
116
|
- Update scorer methods: `runExperiment` → `runEvals`, `getScorerByName` → `getScorerById` - [Evals & Scorers](/guides/v1/migrations/upgrade-to-v1/evals)
|
|
@@ -60,3 +60,14 @@ If you have used `InputProcessor`, replace it with `Processor` which implements
|
|
|
60
60
|
- import { InputProcessor, ModerationProcessor } from '@mastra/core/agent/input-processors/processors';
|
|
61
61
|
+ import { Processor, ModerationProcessor } from '@mastra/core/processors';
|
|
62
62
|
```
|
|
63
|
+
|
|
64
|
+
### Memory processor exports moved to core
|
|
65
|
+
|
|
66
|
+
The `@mastra/memory/processors` export has been removed. All processors are now exported from `@mastra/core/processors`. This change consolidates all processor exports in a single location.
|
|
67
|
+
|
|
68
|
+
To migrate, update your import paths from `@mastra/memory/processors` to `@mastra/core/processors`.
|
|
69
|
+
|
|
70
|
+
```diff
|
|
71
|
+
- import { TokenLimiter, ToolCallFilter } from '@mastra/memory/processors';
|
|
72
|
+
+ import { TokenLimiter, ToolCallFilter } from '@mastra/core/processors';
|
|
73
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "RAG | v1 Migration Guide"
|
|
3
|
+
description: "Migrate RAG-related breaking changes when upgrading to v1."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# RAG
|
|
7
|
+
|
|
8
|
+
The RAG package has renamed chunking parameters and narrowed their types.
|
|
9
|
+
|
|
10
|
+
## Changed
|
|
11
|
+
|
|
12
|
+
### `keepSeparator` to `separatorPosition`
|
|
13
|
+
|
|
14
|
+
The `keepSeparator` parameter has been renamed to `separatorPosition` with a simplified type. The old parameter had a confusing `boolean | 'start' | 'end'` type where `true` was secretly an alias for `'start'`. The new parameter uses explicit `'start' | 'end'` values, and omitting the parameter discards the separator.
|
|
15
|
+
|
|
16
|
+
To migrate, replace `keepSeparator` with `separatorPosition` using the mapping below:
|
|
17
|
+
|
|
18
|
+
| Old value | New value |
|
|
19
|
+
|-----------|-----------|
|
|
20
|
+
| `keepSeparator: true` | `separatorPosition: 'start'` |
|
|
21
|
+
| `keepSeparator: 'start'` | `separatorPosition: 'start'` |
|
|
22
|
+
| `keepSeparator: 'end'` | `separatorPosition: 'end'` |
|
|
23
|
+
| `keepSeparator: false` | Remove the parameter |
|
|
24
|
+
| Parameter omitted | No change needed |
|
|
25
|
+
|
|
26
|
+
```diff
|
|
27
|
+
await doc.chunk({
|
|
28
|
+
strategy: 'character',
|
|
29
|
+
separator: '.',
|
|
30
|
+
- keepSeparator: true,
|
|
31
|
+
+ separatorPosition: 'start',
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
await doc.chunk({
|
|
35
|
+
strategy: 'character',
|
|
36
|
+
separator: '.',
|
|
37
|
+
- keepSeparator: 'end',
|
|
38
|
+
+ separatorPosition: 'end',
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
await doc.chunk({
|
|
42
|
+
strategy: 'character',
|
|
43
|
+
separator: '.',
|
|
44
|
+
- keepSeparator: false,
|
|
45
|
+
+ // Parameter removed - separator is discarded by default
|
|
46
|
+
});
|
|
47
|
+
```
|