@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
|
@@ -1,502 +1,502 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
-
## 1.0.
|
|
3
|
+
## 1.0.4
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 1.0.4-alpha.0
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 1.0.0
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### Major Changes
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
import { Mastra } from '@mastra/core';
|
|
13
|
-
import { LibSQLStore } from '@mastra/libsql';
|
|
11
|
+
- Moving scorers under the eval domain, api method consistency, prebuilt evals, scorers require ids. ([#9589](https://github.com/mastra-ai/mastra/pull/9589))
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
- Scorers for Agents will now use `MastraDBMessage` instead of `UIMessage` ([#9702](https://github.com/mastra-ai/mastra/pull/9702))
|
|
14
|
+
- Scorer input/output types now use `MastraDBMessage[]` with nested `content` object structure
|
|
15
|
+
- Added `getTextContentFromMastraDBMessage()` helper function to extract text content from `MastraDBMessage` objects
|
|
16
|
+
- Added `createTestMessage()` helper function for creating `MastraDBMessage` objects in tests with optional tool invocations support
|
|
17
|
+
- Updated `extractToolCalls()` to access tool invocations from nested `content` structure
|
|
18
|
+
- Updated `getUserMessageFromRunInput()` and `getAssistantMessageFromRunOutput()` to use new message structure
|
|
19
|
+
- Removed `createUIMessage()`
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
await mastra.getStorage().createAgent({
|
|
23
|
-
agent: {
|
|
24
|
-
id: 'my-agent',
|
|
25
|
-
name: 'My Agent',
|
|
26
|
-
instructions: 'You are helpful',
|
|
27
|
-
model: { provider: 'openai', name: 'gpt-4' },
|
|
28
|
-
tools: { myTool: {} },
|
|
29
|
-
scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
|
|
30
|
-
},
|
|
31
|
-
});
|
|
21
|
+
- Every Mastra primitive (agent, MCPServer, workflow, tool, processor, scorer, and vector) now has a get, list, and add method associated with it. Each primitive also now requires an id to be set. ([#9675](https://github.com/mastra-ai/mastra/pull/9675))
|
|
32
22
|
|
|
33
|
-
|
|
34
|
-
const agent = await mastra.getStoredAgentById('my-agent');
|
|
35
|
-
const response = await agent.generate({ messages: 'Hello!' });
|
|
23
|
+
Primitives that are added to other primitives are also automatically added to the Mastra instance
|
|
36
24
|
|
|
37
|
-
|
|
38
|
-
const { agents, total, hasMore } = await mastra.listStoredAgents({
|
|
39
|
-
page: 0,
|
|
40
|
-
perPage: 10,
|
|
41
|
-
});
|
|
42
|
-
```
|
|
25
|
+
- Update handlers to use `listWorkflowRuns` instead of `getWorkflowRuns`. Fix type names from `StoragelistThreadsByResourceIdInput/Output` to `StorageListThreadsByResourceIdInput/Output`. ([#9507](https://github.com/mastra-ai/mastra/pull/9507))
|
|
43
26
|
|
|
44
|
-
|
|
27
|
+
- Refactor workflow and tool types to remove Zod-specific constraints ([#11814](https://github.com/mastra-ai/mastra/pull/11814))
|
|
45
28
|
|
|
46
|
-
|
|
29
|
+
Removed Zod-specific type constraints across all workflow implementations and tool types, replacing them with generic types. This ensures type consistency across default, evented, and inngest workflows while preparing for Zod v4 migration.
|
|
47
30
|
|
|
48
|
-
|
|
31
|
+
**Workflow Changes:**
|
|
32
|
+
- Removed `z.ZodObject<any>` and `z.ZodType<any>` constraints from all workflow generic types
|
|
33
|
+
- Updated method signatures to use `TInput` and `TState` directly instead of `z.infer<TInput>` and `z.infer<TState>`
|
|
34
|
+
- Aligned conditional types across all workflow implementations using `TInput extends unknown` pattern
|
|
35
|
+
- Fixed `TSteps` generic to properly use `TEngineType` instead of `any`
|
|
49
36
|
|
|
50
|
-
|
|
37
|
+
**Tool Changes:**
|
|
38
|
+
- Removed Zod schema constraints from `ToolExecutionContext` and related interfaces
|
|
39
|
+
- Simplified type parameters from `TSuspendSchema extends ZodLikeSchema` to `TSuspend` and `TResume`
|
|
40
|
+
- Updated tool execution context types to use generic types
|
|
51
41
|
|
|
52
|
-
|
|
42
|
+
**Type Utilities:**
|
|
43
|
+
- Refactored type helpers to work with generic schemas instead of Zod-specific types
|
|
44
|
+
- Updated type extraction utilities for better compatibility
|
|
53
45
|
|
|
54
|
-
This change
|
|
46
|
+
This change maintains backward compatibility while improving type consistency and preparing for Zod v4 support across all affected packages.
|
|
55
47
|
|
|
56
|
-
-
|
|
48
|
+
- Remove `getMessagesPaginated()` and add `perPage: false` support ([#9670](https://github.com/mastra-ai/mastra/pull/9670))
|
|
57
49
|
|
|
58
|
-
|
|
50
|
+
Removes deprecated `getMessagesPaginated()` method. The `listMessages()` API and score handlers now support `perPage: false` to fetch all records without pagination limits.
|
|
59
51
|
|
|
60
|
-
|
|
52
|
+
**Storage changes:**
|
|
53
|
+
- `StoragePagination.perPage` type changed from `number` to `number | false`
|
|
54
|
+
- All storage implementations support `perPage: false`:
|
|
55
|
+
- Memory: `listMessages()`
|
|
56
|
+
- Scores: `listScoresBySpan()`, `listScoresByRunId()`, `listScoresByExecutionId()`
|
|
57
|
+
- HTTP query parser accepts `"false"` string (e.g., `?perPage=false`)
|
|
61
58
|
|
|
62
|
-
|
|
59
|
+
**Memory changes:**
|
|
60
|
+
- `memory.query()` parameter type changed from `StorageGetMessagesArg` to `StorageListMessagesInput`
|
|
61
|
+
- Uses flat parameters (`page`, `perPage`, `include`, `filter`, `vectorSearchString`) instead of `selectBy` object
|
|
63
62
|
|
|
64
|
-
|
|
63
|
+
**Stricter validation:**
|
|
64
|
+
- `listMessages()` requires non-empty, non-whitespace `threadId` (throws error instead of returning empty results)
|
|
65
65
|
|
|
66
|
-
**
|
|
67
|
-
- saveScore now correctly returns scores that can be retrieved with getScoreById
|
|
68
|
-
- Validation errors now include contextual information (scorer, entity, trace details) for easier debugging
|
|
66
|
+
**Migration:**
|
|
69
67
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
68
|
+
```typescript
|
|
69
|
+
// Storage/Memory: Replace getMessagesPaginated with listMessages
|
|
70
|
+
- storage.getMessagesPaginated({ threadId, selectBy: { pagination: { page: 0, perPage: 20 } } })
|
|
71
|
+
+ storage.listMessages({ threadId, page: 0, perPage: 20 })
|
|
72
|
+
+ storage.listMessages({ threadId, page: 0, perPage: false }) // Fetch all
|
|
73
|
+
|
|
74
|
+
// Memory: Replace selectBy with flat parameters
|
|
75
|
+
- memory.query({ threadId, selectBy: { last: 20, include: [...] } })
|
|
76
|
+
+ memory.query({ threadId, perPage: 20, include: [...] })
|
|
77
|
+
|
|
78
|
+
// Client SDK
|
|
79
|
+
- thread.getMessagesPaginated({ selectBy: { pagination: { page: 0 } } })
|
|
80
|
+
+ thread.listMessages({ page: 0, perPage: 20 })
|
|
81
|
+
```
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
- **Removed `storage.getMessages()`** ([#9695](https://github.com/mastra-ai/mastra/pull/9695))
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
The `getMessages()` method has been removed from all storage implementations. Use `listMessages()` instead, which provides pagination support.
|
|
85
86
|
|
|
86
|
-
|
|
87
|
+
**Migration:**
|
|
87
88
|
|
|
88
89
|
```typescript
|
|
89
|
-
//
|
|
90
|
-
const
|
|
91
|
-
connectionString: DATABASE_URL,
|
|
92
|
-
id: 'pg-storage',
|
|
93
|
-
});
|
|
94
|
-
await storage.init();
|
|
90
|
+
// Before
|
|
91
|
+
const messages = await storage.getMessages({ threadId: 'thread-1' });
|
|
95
92
|
|
|
96
|
-
//
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
// After
|
|
94
|
+
const result = await storage.listMessages({
|
|
95
|
+
threadId: 'thread-1',
|
|
96
|
+
page: 0,
|
|
97
|
+
perPage: 50,
|
|
101
98
|
});
|
|
99
|
+
const messages = result.messages; // Access messages array
|
|
100
|
+
console.log(result.total); // Total count
|
|
101
|
+
console.log(result.hasMore); // Whether more pages exist
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
**Message ordering default**
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
`listMessages()` defaults to ASC (oldest first) ordering by `createdAt`, matching the previous `getMessages()` behavior.
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
**To use DESC ordering (newest first):**
|
|
109
109
|
|
|
110
110
|
```typescript
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
const result = await storage.listMessages({
|
|
112
|
+
threadId: 'thread-1',
|
|
113
|
+
orderBy: { field: 'createdAt', direction: 'DESC' },
|
|
114
|
+
});
|
|
114
115
|
```
|
|
115
116
|
|
|
116
|
-
|
|
117
|
-
https://github.com/open-telemetry/semantic-conventions/blob/v1.38.0/docs/gen-ai/README.md
|
|
118
|
-
|
|
119
|
-
- Standardize error IDs across all storage and vector stores using centralized helper functions (`createStorageErrorId` and `createVectorErrorId`). This ensures consistent error ID patterns (`MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS}` and `MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}`) across the codebase for better error tracking and debugging. ([#10913](https://github.com/mastra-ai/mastra/pull/10913))
|
|
120
|
-
|
|
121
|
-
- fix: generate unique text IDs for Anthropic/Google providers ([#10740](https://github.com/mastra-ai/mastra/pull/10740))
|
|
117
|
+
**Renamed `client.getThreadMessages()` → `client.listThreadMessages()`**
|
|
122
118
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
The `@ai-sdk/anthropic` and `@ai-sdk/google` providers use numeric indices ("0", "1", etc.) for text block IDs that reset for each LLM call. This caused duplicate IDs when an agent does TEXT → TOOL → TEXT, breaking message ordering and storage.
|
|
126
|
-
|
|
127
|
-
The fix replaces numeric IDs with UUIDs, maintaining a map per step so text-start, text-delta, and text-end chunks for the same block share the same UUID. OpenAI's UUIDs pass through unchanged.
|
|
128
|
-
|
|
129
|
-
Related: #9909
|
|
130
|
-
|
|
131
|
-
- Fix sub-agent requestContext propagation in listAgentTools ([#10844](https://github.com/mastra-ai/mastra/pull/10844))
|
|
132
|
-
|
|
133
|
-
Sub-agents with dynamic model configurations were broken because `requestContext` was not being passed to `getModel()` when creating agent tools. This caused sub-agents using function-based model configurations to receive an empty context instead of the parent's context.
|
|
134
|
-
|
|
135
|
-
No code changes required for consumers - this fix restores expected behavior for dynamic model configurations in sub-agents.
|
|
136
|
-
|
|
137
|
-
- Fix ToolStream type error when piping streams with different types ([#10845](https://github.com/mastra-ai/mastra/pull/10845))
|
|
138
|
-
|
|
139
|
-
Changes `ToolStream` to extend `WritableStream<unknown>` instead of `WritableStream<T>`. This fixes the TypeScript error when piping `objectStream` or `fullStream` to `writer` in workflow steps.
|
|
140
|
-
|
|
141
|
-
Before:
|
|
119
|
+
**Migration:**
|
|
142
120
|
|
|
143
121
|
```typescript
|
|
144
|
-
//
|
|
145
|
-
await
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
After:
|
|
149
|
-
|
|
150
|
-
```typescript
|
|
151
|
-
// Works without type errors
|
|
152
|
-
await response.objectStream.pipeTo(writer);
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
- feat: add native Perplexity provider support ([#10885](https://github.com/mastra-ai/mastra/pull/10885))
|
|
156
|
-
|
|
157
|
-
- When sending the first message to a new thread with PostgresStore, users would get a "Thread not found" error. This happened because the thread was created in memory but not persisted to the database before the MessageHistory output processor tried to save messages. ([#10881](https://github.com/mastra-ai/mastra/pull/10881))
|
|
158
|
-
|
|
159
|
-
**Before:**
|
|
160
|
-
|
|
161
|
-
```ts
|
|
162
|
-
threadObject = await memory.createThread({
|
|
163
|
-
// ...
|
|
164
|
-
saveThread: false, // thread not in DB yet
|
|
165
|
-
});
|
|
166
|
-
// Later: MessageHistory calls saveMessages() -> PostgresStore throws "Thread not found"
|
|
167
|
-
```
|
|
122
|
+
// Before
|
|
123
|
+
const response = await client.getThreadMessages(threadId, { agentId });
|
|
168
124
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
```ts
|
|
172
|
-
threadObject = await memory.createThread({
|
|
173
|
-
// ...
|
|
174
|
-
saveThread: true, // thread persisted immediately
|
|
175
|
-
});
|
|
176
|
-
// MessageHistory can now save messages without error
|
|
125
|
+
// After
|
|
126
|
+
const response = await client.listThreadMessages(threadId, { agentId });
|
|
177
127
|
```
|
|
178
128
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
When a workflow step fails (e.g., tool not found), the error is now properly emitted as an error chunk to the stream and the onError callback is called. This fixes the issue where agent.generate() would throw "promise 'text' was not resolved or rejected" instead of the actual error message.
|
|
129
|
+
The response format remains the same.
|
|
182
130
|
|
|
183
|
-
|
|
131
|
+
**Removed `StorageGetMessagesArg` type**
|
|
184
132
|
|
|
185
|
-
|
|
133
|
+
Use `StorageListMessagesInput` instead:
|
|
186
134
|
|
|
187
135
|
```typescript
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
});
|
|
136
|
+
// Before
|
|
137
|
+
import type { StorageGetMessagesArg } from '@mastra/core';
|
|
191
138
|
|
|
192
|
-
//
|
|
193
|
-
|
|
194
|
-
providerOptions: {
|
|
195
|
-
deepseek: {
|
|
196
|
-
thinking: { type: 'enabled' },
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
});
|
|
139
|
+
// After
|
|
140
|
+
import type { StorageListMessagesInput } from '@mastra/core';
|
|
200
141
|
```
|
|
201
142
|
|
|
202
|
-
|
|
143
|
+
- - Removes modelSettings.abortSignal in favour of top-level abortSignal only. Also removes the deprecated output field - use structuredOutput.schema instead. ([`9e1911d`](https://github.com/mastra-ai/mastra/commit/9e1911db2b4db85e0e768c3f15e0d61e319869f6))
|
|
144
|
+
- The deprecated generateVNext() and streamVNext() methods have been removed since they're now the stable generate() and stream() methods.
|
|
145
|
+
- The deprecated `output` option has been removed entirely, in favour of `structuredOutput`.
|
|
203
146
|
|
|
204
|
-
|
|
147
|
+
Method renames to clarify the API surface:
|
|
148
|
+
- getDefaultGenerateOptions → getDefaultGenerateOptionsLegacy
|
|
149
|
+
- getDefaultStreamOptions → getDefaultStreamOptionsLegacy
|
|
150
|
+
- getDefaultVNextStreamOptions → getDefaultStreamOptions
|
|
205
151
|
|
|
206
|
-
-
|
|
152
|
+
- Bump minimum required Node.js version to 22.13.0 ([#9706](https://github.com/mastra-ai/mastra/pull/9706))
|
|
207
153
|
|
|
208
|
-
|
|
209
|
-
- When `partial=true`: tool schemas (inputSchema, outputSchema) are omitted
|
|
210
|
-
- When `partial=true`: workflow steps are replaced with stepCount integer
|
|
211
|
-
- When `partial=true`: workflow root schemas (inputSchema, outputSchema) are omitted
|
|
212
|
-
- Maintains backward compatibility when partial parameter is not provided
|
|
154
|
+
- Replace `getThreadsByResourceIdPaginated` with `listThreadsByResourceId` across memory handlers. Update client SDK to use `listThreads()` with `offset`/`limit` parameters instead of deprecated `getMemoryThreads()`. Consolidate `/api/memory/threads` routes to single paginated endpoint. ([#9508](https://github.com/mastra-ai/mastra/pull/9508))
|
|
213
155
|
|
|
214
|
-
|
|
156
|
+
- Add new list methods to storage API: `listMessages`, `listMessagesById`, `listThreadsByResourceId`, and `listWorkflowRuns`. Most methods are currently wrappers around existing methods. Full implementations will be added when migrating away from legacy methods. ([#9489](https://github.com/mastra-ai/mastra/pull/9489))
|
|
215
157
|
|
|
216
|
-
|
|
217
|
-
# Get partial agent data (no tool schemas)
|
|
218
|
-
GET /api/agents?partial=true
|
|
158
|
+
- Update tool execution signature ([#9587](https://github.com/mastra-ai/mastra/pull/9587))
|
|
219
159
|
|
|
220
|
-
|
|
221
|
-
GET /api/agents
|
|
160
|
+
Consolidated the 3 different execution contexts to one
|
|
222
161
|
|
|
223
|
-
|
|
224
|
-
|
|
162
|
+
```typescript
|
|
163
|
+
// before depending on the context the tool was executed in
|
|
164
|
+
tool.execute({ context: data });
|
|
165
|
+
tool.execute({ context: { inputData: data } });
|
|
166
|
+
tool.execute(data);
|
|
225
167
|
|
|
226
|
-
|
|
227
|
-
|
|
168
|
+
// now, for all contexts
|
|
169
|
+
tool.execute(data, context);
|
|
228
170
|
```
|
|
229
171
|
|
|
230
|
-
|
|
172
|
+
**Before:**
|
|
231
173
|
|
|
232
174
|
```typescript
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
const partialAgents = await client.listAgents({ partial: true });
|
|
239
|
-
|
|
240
|
-
// Get full agent list with tool schemas
|
|
241
|
-
const fullAgents = await client.listAgents();
|
|
175
|
+
inputSchema: z.object({ something: z.string() }),
|
|
176
|
+
execute: async ({ context, tracingContext, runId, ... }) => {
|
|
177
|
+
return doSomething(context.string);
|
|
178
|
+
}
|
|
179
|
+
```
|
|
242
180
|
|
|
243
|
-
|
|
244
|
-
const partialWorkflows = await client.listWorkflows({ partial: true });
|
|
181
|
+
**After:**
|
|
245
182
|
|
|
246
|
-
|
|
247
|
-
|
|
183
|
+
```typescript
|
|
184
|
+
inputSchema: z.object({ something: z.string() }),
|
|
185
|
+
execute: async (inputData, context) => {
|
|
186
|
+
const { agent, mcp, workflow, ...sharedContext } = context
|
|
187
|
+
|
|
188
|
+
// context that only an agent would get like toolCallId, messages, suspend, resume, etc
|
|
189
|
+
if (agent) {
|
|
190
|
+
doSomething(inputData.something, agent)
|
|
191
|
+
// context that only a workflow would get like runId, state, suspend, resume, etc
|
|
192
|
+
} else if (workflow) {
|
|
193
|
+
doSomething(inputData.something, workflow)
|
|
194
|
+
// context that only a workflow would get like "extra", "elicitation"
|
|
195
|
+
} else if (mcp) {
|
|
196
|
+
doSomething(inputData.something, mcp)
|
|
197
|
+
} else {
|
|
198
|
+
// Running a tool in no execution context
|
|
199
|
+
return doSomething(inputData.something);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
248
202
|
```
|
|
249
203
|
|
|
250
|
-
-
|
|
204
|
+
- The `@mastra/core` package no longer allows top-level imports except for `Mastra` and `type Config`. You must use subpath imports for all other imports. ([#9544](https://github.com/mastra-ai/mastra/pull/9544))
|
|
251
205
|
|
|
252
|
-
|
|
253
|
-
- @mastra/observability@1.0.0-beta.3
|
|
206
|
+
For example:
|
|
254
207
|
|
|
255
|
-
|
|
208
|
+
```diff
|
|
209
|
+
import { Mastra, type Config } from "@mastra/core";
|
|
210
|
+
- import { Agent } from "@mastra/core";
|
|
211
|
+
- import { createTool } from "@mastra/core";
|
|
212
|
+
- import { createStep } from "@mastra/core";
|
|
256
213
|
|
|
257
|
-
|
|
214
|
+
+ import { Agent } from "@mastra/core/agent";
|
|
215
|
+
+ import { createTool } from "@mastra/core/tools";
|
|
216
|
+
+ import { createStep } from "@mastra/core/workflows";
|
|
217
|
+
```
|
|
258
218
|
|
|
259
|
-
-
|
|
219
|
+
- This simplifies the Memory API by removing the confusing rememberMessages method and renaming query to recall for better clarity. ([#9701](https://github.com/mastra-ai/mastra/pull/9701))
|
|
260
220
|
|
|
261
|
-
|
|
221
|
+
The rememberMessages method name implied it might persist data when it was actually just retrieving messages, same as query. Having two methods that did essentially the same thing was unnecessary.
|
|
262
222
|
|
|
263
|
-
|
|
223
|
+
Before:
|
|
264
224
|
|
|
265
225
|
```typescript
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
[condition2, stepB], // outputSchema: { data: z.number() }
|
|
270
|
-
])
|
|
271
|
-
.map({
|
|
272
|
-
finalResult: { step: stepA, path: 'result' } // Expected non-optional
|
|
273
|
-
});
|
|
226
|
+
// Two methods that did the same thing
|
|
227
|
+
memory.rememberMessages({ threadId, resourceId, config, vectorMessageSearch });
|
|
228
|
+
memory.query({ threadId, resourceId, perPage, vectorSearchString });
|
|
274
229
|
```
|
|
275
230
|
|
|
276
|
-
|
|
231
|
+
After:
|
|
277
232
|
|
|
278
233
|
```typescript
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
[condition1, stepA],
|
|
282
|
-
[condition2, stepB],
|
|
283
|
-
])
|
|
284
|
-
.map({
|
|
285
|
-
finalResult: {
|
|
286
|
-
step: stepA,
|
|
287
|
-
path: 'result' // Now optional - provide fallback
|
|
288
|
-
}
|
|
289
|
-
});
|
|
234
|
+
// Single unified method with clear purpose
|
|
235
|
+
memory.recall({ threadId, resourceId, perPage, vectorMessageSearch, threadConfig });
|
|
290
236
|
```
|
|
291
237
|
|
|
292
|
-
|
|
238
|
+
All usages have been updated across the codebase including tests. The agent now calls recall directly with the appropriate parameters.
|
|
293
239
|
|
|
294
|
-
|
|
240
|
+
- Rename RuntimeContext to RequestContext ([#9511](https://github.com/mastra-ai/mastra/pull/9511))
|
|
295
241
|
|
|
296
|
-
|
|
242
|
+
- Implement listMessages API for replacing previous methods ([#9531](https://github.com/mastra-ai/mastra/pull/9531))
|
|
297
243
|
|
|
298
|
-
-
|
|
244
|
+
- Rename `defaultVNextStreamOptions` to `defaultOptions`. Add "Legacy" suffix to v1 option properties and methods (`defaultGenerateOptions` → `defaultGenerateOptionsLegacy`, `defaultStreamOptions` → `defaultStreamOptionsLegacy`). ([#9535](https://github.com/mastra-ai/mastra/pull/9535))
|
|
299
245
|
|
|
300
|
-
-
|
|
246
|
+
- **Breaking Change**: Convert OUTPUT generic from `OutputSchema` constraint to plain generic ([#11741](https://github.com/mastra-ai/mastra/pull/11741))
|
|
301
247
|
|
|
302
|
-
This
|
|
248
|
+
This change removes the direct dependency on Zod typings in the public API by converting all `OUTPUT extends OutputSchema` generic constraints to plain `OUTPUT` generics throughout the codebase. This is preparation for moving to a standard schema approach.
|
|
249
|
+
- All generic type parameters previously constrained to `OutputSchema` (e.g., `<OUTPUT extends OutputSchema = undefined>`) are now plain generics with defaults (e.g., `<OUTPUT = undefined>`)
|
|
250
|
+
- Affects all public APIs including `Agent`, `MastraModelOutput`, `AgentExecutionOptions`, and stream/generate methods
|
|
251
|
+
- `InferSchemaOutput<OUTPUT>` replaced with `OUTPUT` throughout
|
|
252
|
+
- `PartialSchemaOutput<OUTPUT>` replaced with `Partial<OUTPUT>`
|
|
253
|
+
- Schema fields now use `NonNullable<OutputSchema<OUTPUT>>` instead of `OUTPUT` directly
|
|
254
|
+
- Added `FullOutput<OUTPUT>` type representing complete output with all fields
|
|
255
|
+
- Added `AgentExecutionOptionsBase<OUTPUT>` type
|
|
256
|
+
- `getFullOutput()` method now returns `Promise<FullOutput<OUTPUT>>`
|
|
257
|
+
- `Agent` class now generic: `Agent<TAgentId, TTools, TOutput>`
|
|
258
|
+
- `agent.generate()` and `agent.stream()` methods have updated signatures
|
|
259
|
+
- `MastraModelOutput<OUTPUT>` no longer requires `OutputSchema` constraint
|
|
260
|
+
- Network route and streaming APIs updated to use plain OUTPUT generic
|
|
303
261
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
Adds a new `suspendData` parameter to workflow step execute functions that provides access to the data originally passed to `suspend()` when the step was suspended. This enables steps to access context about why they were suspended when they are later resumed.
|
|
307
|
-
|
|
308
|
-
**New Features:**
|
|
309
|
-
- `suspendData` parameter automatically populated in step execute function when resuming
|
|
310
|
-
- Type-safe access to suspend data matching the step's `suspendSchema`
|
|
311
|
-
- Backward compatible - existing workflows continue to work unchanged
|
|
312
|
-
|
|
313
|
-
**Example:**
|
|
262
|
+
**Before:**
|
|
314
263
|
|
|
315
264
|
```typescript
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
resumeSchema: z.object({ approved: z.boolean() }),
|
|
319
|
-
execute: async ({ suspend, suspendData, resumeData }) => {
|
|
320
|
-
if (!resumeData?.approved) {
|
|
321
|
-
return await suspend({ reason: 'Approval required' });
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
// Access original suspend data when resuming
|
|
325
|
-
console.log(`Resuming after: ${suspendData?.reason}`);
|
|
326
|
-
return { result: 'Approved' };
|
|
327
|
-
},
|
|
265
|
+
const output = await agent.generate<z.ZodType>([...], {
|
|
266
|
+
structuredOutput: { schema: mySchema }
|
|
328
267
|
});
|
|
329
|
-
```
|
|
330
268
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
269
|
+
**After:**
|
|
270
|
+
const output = await agent.generate<z.infer<typeof mySchema>>([...], {
|
|
271
|
+
structuredOutput: { schema: mySchema }
|
|
272
|
+
});
|
|
273
|
+
// Or rely on type inference:
|
|
274
|
+
const output = await agent.generate([...], {
|
|
275
|
+
structuredOutput: { schema: mySchema }
|
|
276
|
+
});
|
|
338
277
|
|
|
339
|
-
|
|
278
|
+
```
|
|
340
279
|
|
|
341
|
-
-
|
|
280
|
+
- Remove `getThreadsByResourceId` and `getThreadsByResourceIdPaginated` methods from storage interfaces in favor of `listThreadsByResourceId`. The new method uses `offset`/`limit` pagination and a nested `orderBy` object structure (`{ field, direction }`). ([#9536](https://github.com/mastra-ai/mastra/pull/9536))
|
|
342
281
|
|
|
343
|
-
|
|
344
|
-
- `preferredTimestampFields`: Preferred source fields for timestamps (PostgreSQL, Cloudflare D1)
|
|
345
|
-
- `convertTimestamps`: Convert timestamp strings to Date objects (MSSQL, MongoDB, ClickHouse)
|
|
346
|
-
- `nullValuePattern`: Skip values matching pattern (ClickHouse's `'_null_'`)
|
|
347
|
-
- `fieldMappings`: Map source column names to schema fields (LibSQL's `additionalLLMContext`)
|
|
282
|
+
- Remove `getMessagesById` method from storage interfaces in favor of `listMessagesById`. The new method only returns V2-format messages and removes the format parameter, simplifying the API surface. Users should migrate from `getMessagesById({ messageIds, format })` to `listMessagesById({ messageIds })`. ([#9534](https://github.com/mastra-ai/mastra/pull/9534))
|
|
348
283
|
|
|
349
|
-
|
|
284
|
+
- Experimental auth -> auth ([#9660](https://github.com/mastra-ai/mastra/pull/9660))
|
|
350
285
|
|
|
351
|
-
|
|
286
|
+
- Renamed a bunch of observability/tracing-related things to drop the AI prefix. ([#9744](https://github.com/mastra-ai/mastra/pull/9744))
|
|
352
287
|
|
|
353
|
-
-
|
|
354
|
-
- Updated dependency [`hono-openapi@^1.1.1` ↗︎](https://www.npmjs.com/package/hono-openapi/v/1.1.1) (from `^0.4.8`, in `dependencies`)
|
|
288
|
+
- Removed MastraMessageV3 intermediary format, now we go from MastraDBMessage->aiv5 formats and back directly ([#9094](https://github.com/mastra-ai/mastra/pull/9094))
|
|
355
289
|
|
|
356
|
-
-
|
|
290
|
+
- **Breaking Change**: Remove legacy v1 watch events and consolidate on v2 implementation. ([#9252](https://github.com/mastra-ai/mastra/pull/9252))
|
|
357
291
|
|
|
358
|
-
|
|
292
|
+
This change simplifies the workflow watching API by removing the legacy v1 event system and promoting v2 as the standard (renamed to just `watch`).
|
|
359
293
|
|
|
360
|
-
|
|
294
|
+
**What's Changed**
|
|
295
|
+
- Removed legacy v1 watch event handlers and types
|
|
296
|
+
- Renamed `watch-v2` to `watch` throughout the codebase
|
|
297
|
+
- Removed `.watch()` method from client-js SDK (`Workflow` and `AgentBuilder` classes)
|
|
298
|
+
- Removed `/watch` HTTP endpoints from server and deployer
|
|
299
|
+
- Removed `WorkflowWatchResult` and v1 `WatchEvent` types
|
|
361
300
|
|
|
362
|
-
-
|
|
301
|
+
- Remove various deprecated APIs from agent class. ([#9257](https://github.com/mastra-ai/mastra/pull/9257))
|
|
302
|
+
- `agent.llm` → `agent.getLLM()`
|
|
303
|
+
- `agent.tools` → `agent.getTools()`
|
|
304
|
+
- `agent.instructions` → `agent.getInstructions()`
|
|
305
|
+
- `agent.speak()` → `agent.voice.speak()`
|
|
306
|
+
- `agent.getSpeakers()` → `agent.voice.getSpeakers()`
|
|
307
|
+
- `agent.listen` → `agent.voice.listen()`
|
|
308
|
+
- `agent.fetchMemory` → `(await agent.getMemory()).query()`
|
|
309
|
+
- `agent.toStep` → Add agent directly to the step, workflows handle the transformation
|
|
363
310
|
|
|
364
|
-
-
|
|
311
|
+
- Pagination APIs now use `page`/`perPage` instead of `offset`/`limit` ([#9592](https://github.com/mastra-ai/mastra/pull/9592))
|
|
365
312
|
|
|
366
|
-
|
|
313
|
+
All storage and memory pagination APIs have been updated to use `page` (0-indexed) and `perPage` instead of `offset` and `limit`, aligning with standard REST API patterns.
|
|
367
314
|
|
|
368
|
-
|
|
315
|
+
**Affected APIs:**
|
|
316
|
+
- `Memory.listThreadsByResourceId()`
|
|
317
|
+
- `Memory.listMessages()`
|
|
318
|
+
- `Storage.listWorkflowRuns()`
|
|
369
319
|
|
|
370
|
-
|
|
320
|
+
**Migration:**
|
|
371
321
|
|
|
372
|
-
|
|
322
|
+
```typescript
|
|
323
|
+
// Before
|
|
324
|
+
await memory.listThreadsByResourceId({
|
|
325
|
+
resourceId: 'user-123',
|
|
326
|
+
offset: 20,
|
|
327
|
+
limit: 10,
|
|
328
|
+
});
|
|
373
329
|
|
|
374
|
-
|
|
330
|
+
// After
|
|
331
|
+
await memory.listThreadsByResourceId({
|
|
332
|
+
resourceId: 'user-123',
|
|
333
|
+
page: 2, // page = Math.floor(offset / limit)
|
|
334
|
+
perPage: 10,
|
|
335
|
+
});
|
|
375
336
|
|
|
376
|
-
|
|
337
|
+
// Before
|
|
338
|
+
await memory.listMessages({
|
|
339
|
+
threadId: 'thread-456',
|
|
340
|
+
offset: 20,
|
|
341
|
+
limit: 10,
|
|
342
|
+
});
|
|
377
343
|
|
|
378
|
-
|
|
344
|
+
// After
|
|
345
|
+
await memory.listMessages({
|
|
346
|
+
threadId: 'thread-456',
|
|
347
|
+
page: 2,
|
|
348
|
+
perPage: 10,
|
|
349
|
+
});
|
|
379
350
|
|
|
380
|
-
|
|
351
|
+
// Before
|
|
352
|
+
await storage.listWorkflowRuns({
|
|
353
|
+
workflowName: 'my-workflow',
|
|
354
|
+
offset: 20,
|
|
355
|
+
limit: 10,
|
|
356
|
+
});
|
|
381
357
|
|
|
382
|
-
|
|
358
|
+
// After
|
|
359
|
+
await storage.listWorkflowRuns({
|
|
360
|
+
workflowName: 'my-workflow',
|
|
361
|
+
page: 2,
|
|
362
|
+
perPage: 10,
|
|
363
|
+
});
|
|
364
|
+
```
|
|
383
365
|
|
|
384
|
-
|
|
366
|
+
**Additional improvements:**
|
|
367
|
+
- Added validation for negative `page` values in all storage implementations
|
|
368
|
+
- Improved `perPage` validation to handle edge cases (negative values, `0`, `false`)
|
|
369
|
+
- Added reusable query parser utilities for consistent validation in handlers
|
|
385
370
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
- `agent-legacy.ts` - `AgentLegacyCapabilities` interface
|
|
371
|
+
- ```ts ([#9709](https://github.com/mastra-ai/mastra/pull/9709))
|
|
372
|
+
import { Mastra } from '@mastra/core';
|
|
373
|
+
import { Observability } from '@mastra/observability'; // Explicit import
|
|
390
374
|
|
|
391
|
-
|
|
375
|
+
const mastra = new Mastra({
|
|
376
|
+
...other_config,
|
|
377
|
+
observability: new Observability({
|
|
378
|
+
default: { enabled: true },
|
|
379
|
+
}), // Instance
|
|
380
|
+
});
|
|
381
|
+
```
|
|
392
382
|
|
|
393
|
-
|
|
383
|
+
Instead of:
|
|
394
384
|
|
|
395
|
-
|
|
385
|
+
```ts
|
|
386
|
+
import { Mastra } from '@mastra/core';
|
|
387
|
+
import '@mastra/observability/init'; // Explicit import
|
|
396
388
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
389
|
+
const mastra = new Mastra({
|
|
390
|
+
...other_config,
|
|
391
|
+
observability: {
|
|
392
|
+
default: { enabled: true },
|
|
393
|
+
},
|
|
394
|
+
});
|
|
400
395
|
```
|
|
401
396
|
|
|
402
|
-
|
|
397
|
+
Also renamed a bunch of:
|
|
398
|
+
- `Tracing` things to `Observability` things.
|
|
399
|
+
- `AI-` things to just things.
|
|
403
400
|
|
|
404
|
-
|
|
405
|
-
Input: [user: "hello", assistant: "Hi!", user: "bye"]
|
|
406
|
-
Output: [user: "hello", assistant: "Hi!", user: "bye"] // correct order
|
|
407
|
-
```
|
|
401
|
+
- Changing getAgents -> listAgents, getTools -> listTools, getWorkflows -> listWorkflows ([#9495](https://github.com/mastra-ai/mastra/pull/9495))
|
|
408
402
|
|
|
409
|
-
-
|
|
403
|
+
- Removed old tracing code based on OpenTelemetry ([#9237](https://github.com/mastra-ai/mastra/pull/9237))
|
|
410
404
|
|
|
411
|
-
|
|
405
|
+
- Remove deprecated vector prompts and cohere provider from code ([#9596](https://github.com/mastra-ai/mastra/pull/9596))
|
|
412
406
|
|
|
413
|
-
-
|
|
407
|
+
- Renamed MastraStorage to MastraCompositeStore for better clarity. The old MastraStorage name remains available as a deprecated alias for backward compatibility, but will be removed in a future version. ([#12093](https://github.com/mastra-ai/mastra/pull/12093))
|
|
414
408
|
|
|
415
|
-
|
|
409
|
+
**Migration:**
|
|
416
410
|
|
|
417
|
-
|
|
411
|
+
Update your imports and usage:
|
|
418
412
|
|
|
419
|
-
|
|
413
|
+
```typescript
|
|
414
|
+
// Before
|
|
415
|
+
import { MastraStorage } from '@mastra/core/storage';
|
|
420
416
|
|
|
421
|
-
|
|
417
|
+
const storage = new MastraStorage({
|
|
418
|
+
id: 'composite',
|
|
419
|
+
domains: { ... }
|
|
420
|
+
});
|
|
422
421
|
|
|
423
|
-
|
|
422
|
+
// After
|
|
423
|
+
import { MastraCompositeStore } from '@mastra/core/storage';
|
|
424
424
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
threshold: 0.7,
|
|
429
|
-
strategy: 'block',
|
|
430
|
-
providerOptions: {
|
|
431
|
-
openai: {
|
|
432
|
-
reasoningEffort: 'low',
|
|
433
|
-
},
|
|
434
|
-
},
|
|
425
|
+
const storage = new MastraCompositeStore({
|
|
426
|
+
id: 'composite',
|
|
427
|
+
domains: { ... }
|
|
435
428
|
});
|
|
436
429
|
```
|
|
437
430
|
|
|
438
|
-
|
|
431
|
+
The new name better reflects that this is a composite storage implementation that routes different domains (workflows, traces, messages) to different underlying stores, avoiding confusion with the general "Mastra Storage" concept.
|
|
439
432
|
|
|
440
|
-
-
|
|
433
|
+
- Mark as stable ([`83d5942`](https://github.com/mastra-ai/mastra/commit/83d5942669ce7bba4a6ca4fd4da697a10eb5ebdc))
|
|
441
434
|
|
|
442
|
-
-
|
|
443
|
-
|
|
444
|
-
- Adds `processInputStep` method to the Processor interface. Unlike `processInput` which runs once at the start, this runs at each step of the agentic loop (including tool call continuations). ([#10650](https://github.com/mastra-ai/mastra/pull/10650))
|
|
445
|
-
|
|
446
|
-
```ts
|
|
447
|
-
const processor: Processor = {
|
|
448
|
-
id: 'my-processor',
|
|
449
|
-
processInputStep: async ({ messages, messageList, stepNumber, systemMessages }) => {
|
|
450
|
-
// Transform messages at each step before LLM call
|
|
451
|
-
return messageList;
|
|
452
|
-
},
|
|
453
|
-
};
|
|
454
|
-
```
|
|
435
|
+
- Changed `.branch()` result schema to make all branch output fields optional. ([#10693](https://github.com/mastra-ai/mastra/pull/10693))
|
|
455
436
|
|
|
456
|
-
|
|
437
|
+
**Breaking change**: Branch outputs are now optional since only one branch executes at runtime. Update your workflow schemas to handle optional branch results.
|
|
457
438
|
|
|
458
439
|
**Before:**
|
|
459
440
|
|
|
460
|
-
```
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
|
|
441
|
+
```typescript
|
|
442
|
+
const workflow = createWorkflow({...})
|
|
443
|
+
.branch([
|
|
444
|
+
[condition1, stepA], // outputSchema: { result: z.string() }
|
|
445
|
+
[condition2, stepB], // outputSchema: { data: z.number() }
|
|
446
|
+
])
|
|
447
|
+
.map({
|
|
448
|
+
finalResult: { step: stepA, path: 'result' } // Expected non-optional
|
|
449
|
+
});
|
|
464
450
|
```
|
|
465
451
|
|
|
466
452
|
**After:**
|
|
467
453
|
|
|
468
|
-
```
|
|
469
|
-
const
|
|
470
|
-
|
|
454
|
+
```typescript
|
|
455
|
+
const workflow = createWorkflow({...})
|
|
456
|
+
.branch([
|
|
457
|
+
[condition1, stepA],
|
|
458
|
+
[condition2, stepB],
|
|
459
|
+
])
|
|
460
|
+
.map({
|
|
461
|
+
finalResult: {
|
|
462
|
+
step: stepA,
|
|
463
|
+
path: 'result' // Now optional - provide fallback
|
|
464
|
+
}
|
|
465
|
+
});
|
|
471
466
|
```
|
|
472
467
|
|
|
473
|
-
|
|
468
|
+
**Why**: Branch conditionals execute only one path, so non-executed branches don't produce outputs. The type system now correctly reflects this runtime behavior.
|
|
474
469
|
|
|
475
|
-
|
|
476
|
-
Also fixes requestContext persistence by relying on inngest step memoization.
|
|
470
|
+
Related issue: https://github.com/mastra-ai/mastra/issues/10642
|
|
477
471
|
|
|
478
|
-
|
|
472
|
+
- Enforcing id required on Processor primitive ([#9591](https://github.com/mastra-ai/mastra/pull/9591))
|
|
479
473
|
|
|
480
|
-
-
|
|
474
|
+
- **Breaking Changes:** ([#9045](https://github.com/mastra-ai/mastra/pull/9045))
|
|
475
|
+
- Moved `generateTitle` from `threads.generateTitle` to top-level memory option
|
|
476
|
+
- Changed default value from `true` to `false`
|
|
477
|
+
- Using `threads.generateTitle` now throws an error
|
|
481
478
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
const response = await fetch(`http://localhost:5000/api/tools`);
|
|
479
|
+
**Migration:**
|
|
480
|
+
Replace `threads: { generateTitle: true }` with `generateTitle: true` at the top level of memory options.
|
|
485
481
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
const response = await app.fetch(new Request('http://internal/api/tools'));
|
|
489
|
-
```
|
|
482
|
+
**Playground:**
|
|
483
|
+
The playground UI now displays thread IDs instead of "Chat from" when titles aren't generated.
|
|
490
484
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
- Added `MastraServerBase` class in `@mastra/core/server` for adapter implementations
|
|
494
|
-
- Server adapters now auto-register with Mastra in their constructor
|
|
485
|
+
- Renamed `MastraMessageV2` to `MastraDBMessage` ([#9255](https://github.com/mastra-ai/mastra/pull/9255))
|
|
486
|
+
Made the return format of all methods that return db messages consistent. It's always `{ messages: MastraDBMessage[] }` now, and messages can be converted after that using `@mastra/ai-sdk/ui`'s `toAISdkV4/5Messages()` function
|
|
495
487
|
|
|
496
|
-
-
|
|
488
|
+
- moved ai-tracing code into @mastra/observability ([#9661](https://github.com/mastra-ai/mastra/pull/9661))
|
|
497
489
|
|
|
498
|
-
-
|
|
490
|
+
- Remove legacy evals from Mastra ([#9491](https://github.com/mastra-ai/mastra/pull/9491))
|
|
499
491
|
|
|
500
|
-
-
|
|
492
|
+
- Use tool's outputSchema to validate results and return an error object if schema does not match output results. ([#9664](https://github.com/mastra-ai/mastra/pull/9664))
|
|
501
493
|
|
|
502
|
-
|
|
494
|
+
```typescript
|
|
495
|
+
const getUserTool = createTool({
|
|
496
|
+
id: 'get-user',
|
|
497
|
+
outputSchema: z.object({
|
|
498
|
+
id: z.string(),
|
|
499
|
+
name: z.string(),
|
|
500
|
+
email: z.string().email(),
|
|
501
|
+
|
|
502
|
+
... 11704 more lines hidden. See full changelog in package directory.
|