@mastra/mcp-docs-server 1.0.0-beta.13 → 1.0.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +27 -27
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +78 -78
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +195 -195
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +173 -173
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +195 -195
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +195 -195
- package/.docs/organized/changelogs/%40mastra%2Fconvex.md +248 -0
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +338 -338
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +33 -33
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +16 -16
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +41 -41
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +195 -195
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Flance.md +195 -195
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +195 -195
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +139 -139
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +219 -219
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +219 -219
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +235 -235
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +102 -102
- package/.docs/organized/changelogs/%40mastra%2Frag.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Freact.md +77 -70
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +218 -218
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +195 -195
- package/.docs/organized/changelogs/create-mastra.md +13 -13
- package/.docs/organized/changelogs/mastra.md +56 -56
- package/.docs/organized/code-examples/agent-v6.md +210 -0
- package/.docs/organized/code-examples/ai-elements.md +1 -1
- package/.docs/organized/code-examples/client-side-tools.md +1 -1
- package/.docs/raw/agents/adding-voice.mdx +10 -6
- package/.docs/raw/agents/agent-approval.mdx +5 -6
- package/.docs/raw/agents/agent-memory.mdx +22 -30
- package/.docs/raw/agents/guardrails.mdx +60 -50
- package/.docs/raw/agents/networks.mdx +8 -12
- package/.docs/raw/agents/overview.mdx +39 -23
- package/.docs/raw/agents/processors.mdx +20 -19
- package/.docs/raw/agents/structured-output.mdx +11 -7
- package/.docs/raw/agents/using-tools.mdx +4 -5
- package/.docs/raw/deployment/mastra-server.mdx +3 -3
- package/.docs/raw/deployment/overview.mdx +7 -1
- package/.docs/raw/deployment/web-framework.mdx +4 -6
- package/.docs/raw/deployment/workflow-runners.mdx +14 -0
- package/.docs/raw/evals/custom-scorers.mdx +9 -6
- package/.docs/raw/evals/overview.mdx +3 -6
- package/.docs/raw/evals/running-in-ci.mdx +2 -2
- package/.docs/raw/getting-started/manual-install.mdx +20 -20
- package/.docs/raw/getting-started/mcp-docs-server.mdx +2 -2
- package/.docs/raw/getting-started/studio.mdx +1 -1
- package/.docs/raw/guides/agent-frameworks/ai-sdk.mdx +4 -4
- package/.docs/raw/guides/build-your-ui/ai-sdk-ui.mdx +30 -30
- package/.docs/raw/guides/build-your-ui/assistant-ui.mdx +8 -8
- package/.docs/raw/guides/build-your-ui/copilotkit.mdx +11 -11
- package/.docs/raw/guides/deployment/amazon-ec2.mdx +9 -9
- package/.docs/raw/guides/deployment/aws-lambda.mdx +11 -11
- package/.docs/raw/guides/deployment/azure-app-services.mdx +2 -2
- package/.docs/raw/guides/deployment/cloudflare-deployer.mdx +5 -6
- package/.docs/raw/guides/deployment/digital-ocean.mdx +10 -10
- package/.docs/raw/guides/deployment/index.mdx +1 -1
- package/.docs/raw/guides/deployment/inngest.mdx +444 -0
- package/.docs/raw/guides/deployment/netlify-deployer.mdx +4 -4
- package/.docs/raw/guides/deployment/vercel-deployer.mdx +5 -6
- package/.docs/raw/guides/getting-started/astro.mdx +292 -451
- package/.docs/raw/guides/getting-started/express.mdx +7 -7
- package/.docs/raw/guides/getting-started/hono.mdx +18 -18
- package/.docs/raw/guides/getting-started/next-js.mdx +19 -20
- package/.docs/raw/guides/getting-started/quickstart.mdx +4 -4
- package/.docs/raw/guides/getting-started/sveltekit.mdx +238 -409
- package/.docs/raw/guides/getting-started/vite-react.mdx +21 -21
- 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 +13 -13
- package/.docs/raw/guides/guide/stock-agent.mdx +5 -5
- package/.docs/raw/guides/guide/web-search.mdx +8 -8
- package/.docs/raw/guides/guide/whatsapp-chat-bot.mdx +7 -7
- package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +2 -2
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +1 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +11 -3
- package/.docs/raw/guides/migrations/upgrade-to-v1/processors.mdx +11 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +41 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +0 -2
- 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 +39 -0
- package/.docs/raw/mastra-cloud/observability.mdx +9 -15
- package/.docs/raw/mastra-cloud/overview.mdx +14 -44
- package/.docs/raw/mastra-cloud/setup.mdx +64 -0
- package/.docs/raw/mastra-cloud/studio.mdx +35 -0
- package/.docs/raw/mcp/overview.mdx +31 -13
- package/.docs/raw/mcp/publishing-mcp-server.mdx +2 -2
- package/.docs/raw/memory/memory-processors.mdx +9 -9
- package/.docs/raw/memory/message-history.mdx +69 -0
- package/.docs/raw/memory/overview.mdx +34 -76
- package/.docs/raw/memory/semantic-recall.mdx +58 -49
- package/.docs/raw/memory/storage.mdx +188 -0
- package/.docs/raw/memory/working-memory.mdx +7 -7
- package/.docs/raw/observability/logging.mdx +9 -10
- package/.docs/raw/observability/overview.mdx +0 -1
- package/.docs/raw/observability/tracing/bridges/otel.mdx +2 -2
- package/.docs/raw/observability/tracing/exporters/default.mdx +3 -3
- package/.docs/raw/observability/tracing/exporters/langfuse.mdx +1 -2
- package/.docs/raw/observability/tracing/overview.mdx +23 -25
- package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +3 -3
- package/.docs/raw/rag/chunking-and-embedding.mdx +6 -6
- package/.docs/raw/rag/graph-rag.mdx +7 -7
- package/.docs/raw/rag/overview.mdx +1 -1
- package/.docs/raw/rag/retrieval.mdx +21 -22
- package/.docs/raw/rag/vector-databases.mdx +22 -22
- package/.docs/raw/reference/agents/agent.mdx +3 -3
- package/.docs/raw/reference/agents/generate.mdx +1 -1
- package/.docs/raw/reference/agents/generateLegacy.mdx +2 -2
- package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +2 -2
- package/.docs/raw/reference/agents/getDefaultOptions.mdx +2 -2
- package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +2 -2
- package/.docs/raw/reference/agents/getDescription.mdx +1 -1
- package/.docs/raw/reference/agents/getInstructions.mdx +2 -2
- package/.docs/raw/reference/agents/getLLM.mdx +2 -2
- package/.docs/raw/reference/agents/getMemory.mdx +2 -2
- package/.docs/raw/reference/agents/getModel.mdx +2 -2
- package/.docs/raw/reference/agents/getTools.mdx +2 -2
- package/.docs/raw/reference/agents/getVoice.mdx +2 -2
- package/.docs/raw/reference/agents/listAgents.mdx +2 -2
- package/.docs/raw/reference/agents/listScorers.mdx +2 -2
- package/.docs/raw/reference/agents/listTools.mdx +2 -2
- package/.docs/raw/reference/agents/listWorkflows.mdx +2 -2
- package/.docs/raw/reference/agents/network.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/chat-route.mdx +2 -2
- package/.docs/raw/reference/ai-sdk/handle-chat-stream.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/handle-network-stream.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/handle-workflow-stream.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/network-route.mdx +2 -2
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-stream.mdx +6 -6
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-v4-messages.mdx +3 -3
- package/.docs/raw/reference/ai-sdk/to-ai-sdk-v5-messages.mdx +3 -3
- package/.docs/raw/reference/ai-sdk/with-mastra.mdx +1 -1
- package/.docs/raw/reference/ai-sdk/workflow-route.mdx +2 -2
- package/.docs/raw/reference/auth/auth0.mdx +1 -2
- package/.docs/raw/reference/auth/clerk.mdx +1 -2
- package/.docs/raw/reference/auth/firebase.mdx +2 -4
- package/.docs/raw/reference/auth/jwt.mdx +1 -2
- package/.docs/raw/reference/auth/supabase.mdx +1 -2
- package/.docs/raw/reference/auth/workos.mdx +1 -2
- package/.docs/raw/reference/cli/create-mastra.mdx +10 -10
- package/.docs/raw/reference/cli/mastra.mdx +9 -9
- package/.docs/raw/reference/client-js/agents.mdx +1 -2
- package/.docs/raw/reference/client-js/mastra-client.mdx +1 -1
- package/.docs/raw/reference/core/getAgent.mdx +1 -1
- package/.docs/raw/reference/core/getAgentById.mdx +1 -1
- package/.docs/raw/reference/core/getDeployer.mdx +1 -1
- package/.docs/raw/reference/core/getLogger.mdx +1 -1
- package/.docs/raw/reference/core/getMCPServer.mdx +1 -1
- package/.docs/raw/reference/core/getMCPServerById.mdx +1 -1
- package/.docs/raw/reference/core/getMemory.mdx +2 -2
- package/.docs/raw/reference/core/getServer.mdx +1 -1
- package/.docs/raw/reference/core/getStorage.mdx +2 -2
- package/.docs/raw/reference/core/getStoredAgentById.mdx +3 -3
- package/.docs/raw/reference/core/getTelemetry.mdx +1 -1
- package/.docs/raw/reference/core/getVector.mdx +1 -1
- package/.docs/raw/reference/core/getWorkflow.mdx +1 -1
- package/.docs/raw/reference/core/listAgents.mdx +1 -1
- package/.docs/raw/reference/core/listLogs.mdx +1 -1
- package/.docs/raw/reference/core/listLogsByRunId.mdx +1 -1
- package/.docs/raw/reference/core/listMCPServers.mdx +1 -1
- package/.docs/raw/reference/core/listMemory.mdx +2 -2
- package/.docs/raw/reference/core/listStoredAgents.mdx +4 -4
- package/.docs/raw/reference/core/listVectors.mdx +1 -1
- package/.docs/raw/reference/core/listWorkflows.mdx +1 -1
- package/.docs/raw/reference/core/setLogger.mdx +1 -1
- package/.docs/raw/reference/core/setStorage.mdx +2 -2
- package/.docs/raw/reference/core/setTelemetry.mdx +1 -1
- package/.docs/raw/reference/deployer/cloudflare.mdx +1 -2
- package/.docs/raw/reference/deployer/deployer.mdx +0 -1
- package/.docs/raw/reference/deployer/netlify.mdx +1 -1
- package/.docs/raw/reference/deployer/vercel.mdx +2 -4
- package/.docs/raw/reference/evals/answer-relevancy.mdx +1 -1
- package/.docs/raw/reference/evals/answer-similarity.mdx +1 -1
- package/.docs/raw/reference/evals/bias.mdx +1 -1
- package/.docs/raw/reference/evals/completeness.mdx +1 -1
- package/.docs/raw/reference/evals/content-similarity.mdx +1 -1
- package/.docs/raw/reference/evals/context-precision.mdx +1 -1
- package/.docs/raw/reference/evals/faithfulness.mdx +1 -1
- package/.docs/raw/reference/evals/hallucination.mdx +1 -1
- package/.docs/raw/reference/evals/keyword-coverage.mdx +1 -1
- package/.docs/raw/reference/evals/prompt-alignment.mdx +7 -7
- package/.docs/raw/reference/evals/textual-difference.mdx +1 -1
- package/.docs/raw/reference/evals/tone-consistency.mdx +1 -1
- package/.docs/raw/reference/evals/tool-call-accuracy.mdx +10 -10
- package/.docs/raw/reference/evals/toxicity.mdx +1 -1
- package/.docs/raw/reference/logging/pino-logger.mdx +7 -8
- package/.docs/raw/reference/memory/createThread.mdx +2 -2
- package/.docs/raw/reference/memory/deleteMessages.mdx +2 -2
- package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +2 -2
- package/.docs/raw/reference/memory/memory-class.mdx +3 -3
- package/.docs/raw/reference/memory/query.mdx +2 -2
- package/.docs/raw/reference/memory/recall.mdx +2 -2
- package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +1 -1
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +2 -2
- package/.docs/raw/reference/processors/language-detector.mdx +2 -2
- package/.docs/raw/reference/processors/message-history-processor.mdx +2 -2
- package/.docs/raw/reference/processors/moderation-processor.mdx +3 -3
- package/.docs/raw/reference/processors/pii-detector.mdx +3 -3
- package/.docs/raw/reference/processors/processor-interface.mdx +13 -13
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +2 -2
- package/.docs/raw/reference/processors/semantic-recall-processor.mdx +2 -2
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +2 -2
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +40 -19
- package/.docs/raw/reference/processors/tool-call-filter.mdx +3 -3
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +2 -2
- package/.docs/raw/reference/processors/working-memory-processor.mdx +3 -3
- package/.docs/raw/reference/rag/chunk.mdx +1 -1
- package/.docs/raw/reference/rag/extract-params.mdx +2 -2
- package/.docs/raw/reference/rag/metadata-filters.mdx +7 -7
- package/.docs/raw/reference/server/create-route.mdx +13 -13
- package/.docs/raw/reference/server/express-adapter.mdx +6 -7
- package/.docs/raw/reference/server/hono-adapter.mdx +6 -7
- package/.docs/raw/reference/server/mastra-server.mdx +20 -20
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +7 -5
- package/.docs/raw/reference/storage/cloudflare.mdx +2 -2
- package/.docs/raw/reference/storage/convex.mdx +6 -6
- package/.docs/raw/reference/storage/dynamodb.mdx +4 -4
- package/.docs/raw/reference/storage/lance.mdx +6 -5
- package/.docs/raw/reference/storage/libsql.mdx +72 -54
- package/.docs/raw/reference/storage/mongodb.mdx +84 -9
- package/.docs/raw/reference/storage/mssql.mdx +8 -6
- package/.docs/raw/{memory → reference}/storage/overview.mdx +12 -110
- package/.docs/raw/reference/storage/postgresql.mdx +82 -9
- package/.docs/raw/reference/storage/upstash.mdx +74 -2
- package/.docs/raw/reference/streaming/agents/stream.mdx +5 -5
- package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +2 -2
- package/.docs/raw/reference/streaming/workflows/observeStream.mdx +1 -1
- package/.docs/raw/reference/streaming/workflows/resumeStream.mdx +1 -1
- package/.docs/raw/reference/streaming/workflows/stream.mdx +2 -2
- package/.docs/raw/reference/streaming/workflows/timeTravelStream.mdx +4 -4
- package/.docs/raw/reference/templates/overview.mdx +1 -2
- package/.docs/raw/reference/tools/create-tool.mdx +1 -4
- package/.docs/raw/reference/tools/vector-query-tool.mdx +1 -1
- package/.docs/raw/reference/vectors/astra.mdx +3 -3
- package/.docs/raw/reference/vectors/chroma.mdx +3 -3
- package/.docs/raw/reference/vectors/convex.mdx +12 -12
- package/.docs/raw/reference/vectors/couchbase.mdx +5 -5
- package/.docs/raw/reference/vectors/duckdb.mdx +10 -10
- package/.docs/raw/reference/vectors/elasticsearch.mdx +4 -4
- package/.docs/raw/reference/vectors/lance.mdx +4 -4
- package/.docs/raw/reference/vectors/libsql.mdx +61 -11
- package/.docs/raw/reference/vectors/mongodb.mdx +58 -5
- package/.docs/raw/reference/vectors/pg.mdx +53 -6
- package/.docs/raw/reference/vectors/pinecone.mdx +3 -3
- package/.docs/raw/reference/vectors/qdrant.mdx +3 -3
- package/.docs/raw/reference/vectors/s3vectors.mdx +6 -6
- package/.docs/raw/reference/vectors/turbopuffer.mdx +4 -4
- package/.docs/raw/reference/vectors/upstash.mdx +55 -6
- package/.docs/raw/reference/vectors/vectorize.mdx +3 -3
- package/.docs/raw/reference/workflows/run-methods/cancel.mdx +2 -2
- package/.docs/raw/reference/workflows/run-methods/restart.mdx +1 -3
- package/.docs/raw/reference/workflows/run-methods/resume.mdx +2 -2
- package/.docs/raw/reference/workflows/run-methods/start.mdx +2 -2
- package/.docs/raw/reference/workflows/run-methods/startAsync.mdx +2 -2
- package/.docs/raw/reference/workflows/run-methods/timeTravel.mdx +5 -5
- package/.docs/raw/reference/workflows/run.mdx +1 -1
- package/.docs/raw/reference/workflows/step.mdx +3 -3
- package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +3 -3
- package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +6 -6
- package/.docs/raw/reference/workflows/workflow-methods/map.mdx +7 -7
- package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow.mdx +3 -3
- package/.docs/raw/server/auth/auth0.mdx +20 -14
- package/.docs/raw/server/auth/clerk.mdx +16 -9
- package/.docs/raw/server/auth/firebase.mdx +21 -15
- package/.docs/raw/server/auth/jwt.mdx +14 -7
- package/.docs/raw/server/auth/supabase.mdx +16 -9
- package/.docs/raw/server/auth/workos.mdx +19 -13
- package/.docs/raw/server/custom-adapters.mdx +10 -10
- package/.docs/raw/server/custom-api-routes.mdx +2 -4
- package/.docs/raw/server/mastra-client.mdx +24 -13
- package/.docs/raw/server/mastra-server.mdx +3 -3
- package/.docs/raw/server/middleware.mdx +7 -7
- package/.docs/raw/server/request-context.mdx +31 -30
- package/.docs/raw/server/server-adapters.mdx +6 -6
- package/.docs/raw/streaming/events.mdx +14 -7
- package/.docs/raw/streaming/overview.mdx +21 -10
- package/.docs/raw/streaming/tool-streaming.mdx +6 -6
- package/.docs/raw/streaming/workflow-streaming.mdx +6 -8
- package/.docs/raw/tools-mcp/advanced-usage.mdx +2 -2
- package/.docs/raw/tools-mcp/mcp-overview.mdx +31 -12
- package/.docs/raw/tools-mcp/overview.mdx +9 -10
- package/.docs/raw/voice/overview.mdx +2 -2
- package/.docs/raw/workflows/agents-and-tools.mdx +28 -19
- package/.docs/raw/workflows/control-flow.mdx +27 -40
- package/.docs/raw/workflows/error-handling.mdx +15 -22
- package/.docs/raw/workflows/human-in-the-loop.mdx +6 -7
- package/.docs/raw/workflows/input-data-mapping.mdx +7 -7
- package/.docs/raw/workflows/overview.mdx +34 -23
- package/.docs/raw/workflows/snapshots.mdx +16 -45
- package/.docs/raw/workflows/suspend-and-resume.mdx +7 -7
- package/.docs/raw/workflows/time-travel.mdx +16 -16
- package/.docs/raw/workflows/workflow-state.mdx +5 -8
- package/CHANGELOG.md +16 -0
- package/dist/logger.d.ts +3 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/stdio.js +53 -0
- package/package.json +3 -3
- package/.docs/raw/mastra-cloud/dashboard.mdx +0 -96
- package/.docs/raw/mastra-cloud/setting-up.mdx +0 -102
- 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/workflows/inngest-workflow.mdx +0 -363
|
@@ -1,502 +1,502 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
-
## 1.0.0-beta.
|
|
3
|
+
## 1.0.0-beta.15
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Minor Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Introduce StorageDomain base class for composite storage support ([#11249](https://github.com/mastra-ai/mastra/pull/11249))
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Storage adapters now use a domain-based architecture where each domain (memory, workflows, scores, observability, agents) extends a `StorageDomain` base class with `init()` and `dangerouslyClearAll()` methods.
|
|
10
|
+
|
|
11
|
+
**Key changes:**
|
|
12
|
+
- Add `StorageDomain` abstract base class that all domain storage classes extend
|
|
13
|
+
- Add `InMemoryDB` class for shared state across in-memory domain implementations
|
|
14
|
+
- All storage domains now implement `dangerouslyClearAll()` for test cleanup
|
|
15
|
+
- Remove `operations` from public `StorageDomains` type (now internal to each adapter)
|
|
16
|
+
- Add flexible client/config patterns - domains accept either an existing database client or config to create one internally
|
|
17
|
+
|
|
18
|
+
**Why this matters:**
|
|
19
|
+
|
|
20
|
+
This enables composite storage where you can use different database adapters per domain:
|
|
12
21
|
|
|
13
22
|
```typescript
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
await logError(errorInfo.error);
|
|
26
|
-
},
|
|
27
|
-
},
|
|
23
|
+
import { Mastra } from '@mastra/core';
|
|
24
|
+
import { PostgresStore } from '@mastra/pg';
|
|
25
|
+
import { ClickhouseStore } from '@mastra/clickhouse';
|
|
26
|
+
|
|
27
|
+
// Use Postgres for most domains but Clickhouse for observability
|
|
28
|
+
const mastra = new Mastra({
|
|
29
|
+
storage: new PostgresStore({
|
|
30
|
+
connectionString: 'postgres://...',
|
|
31
|
+
}),
|
|
32
|
+
// Future: override specific domains
|
|
33
|
+
// observability: new ClickhouseStore({ ... }).getStore('observability'),
|
|
28
34
|
});
|
|
29
35
|
```
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
**Standalone domain usage:**
|
|
32
38
|
|
|
33
|
-
|
|
39
|
+
Domains can now be used independently with flexible configuration:
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
```typescript
|
|
42
|
+
import { MemoryLibSQL } from '@mastra/libsql/memory';
|
|
36
43
|
|
|
37
|
-
|
|
44
|
+
// Option 1: Pass config to create client internally
|
|
45
|
+
const memory = new MemoryLibSQL({
|
|
46
|
+
url: 'file:./local.db',
|
|
47
|
+
});
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
// Option 2: Pass existing client for shared connections
|
|
50
|
+
import { createClient } from '@libsql/client';
|
|
51
|
+
const client = createClient({ url: 'file:./local.db' });
|
|
52
|
+
const memory = new MemoryLibSQL({ client });
|
|
53
|
+
```
|
|
40
54
|
|
|
41
|
-
**
|
|
42
|
-
|
|
55
|
+
**Breaking changes:**
|
|
56
|
+
- `StorageDomains` type no longer includes `operations` - access via `getStore()` instead
|
|
57
|
+
- Domain base classes now require implementing `dangerouslyClearAll()` method
|
|
43
58
|
|
|
44
|
-
|
|
59
|
+
- Refactor storage architecture to use domain-specific stores via `getStore()` pattern ([#11361](https://github.com/mastra-ai/mastra/pull/11361))
|
|
45
60
|
|
|
46
|
-
|
|
61
|
+
### Summary
|
|
47
62
|
|
|
48
|
-
|
|
63
|
+
This release introduces a new storage architecture that replaces passthrough methods on `MastraStorage` with domain-specific storage interfaces accessed via `getStore()`. This change reduces code duplication across storage adapters and provides a cleaner, more modular API.
|
|
49
64
|
|
|
50
|
-
|
|
65
|
+
### Migration Guide
|
|
51
66
|
|
|
52
|
-
|
|
67
|
+
All direct method calls on storage instances should be updated to use `getStore()`:
|
|
53
68
|
|
|
54
|
-
|
|
69
|
+
```typescript
|
|
70
|
+
// Before
|
|
71
|
+
const thread = await storage.getThreadById({ threadId });
|
|
72
|
+
await storage.persistWorkflowSnapshot({ workflowName, runId, snapshot });
|
|
73
|
+
await storage.createSpan(span);
|
|
55
74
|
|
|
56
|
-
|
|
75
|
+
// After
|
|
76
|
+
const memory = await storage.getStore('memory');
|
|
77
|
+
const thread = await memory?.getThreadById({ threadId });
|
|
57
78
|
|
|
58
|
-
|
|
79
|
+
const workflows = await storage.getStore('workflows');
|
|
80
|
+
await workflows?.persistWorkflowSnapshot({ workflowName, runId, snapshot });
|
|
59
81
|
|
|
60
|
-
|
|
82
|
+
const observability = await storage.getStore('observability');
|
|
83
|
+
await observability?.createSpan(span);
|
|
84
|
+
```
|
|
61
85
|
|
|
62
|
-
|
|
86
|
+
### Available Domains
|
|
87
|
+
- **`memory`**: Thread and message operations (`getThreadById`, `saveThread`, `saveMessages`, etc.)
|
|
88
|
+
- **`workflows`**: Workflow state persistence (`persistWorkflowSnapshot`, `loadWorkflowSnapshot`, `getWorkflowRunById`, etc.)
|
|
89
|
+
- **`scores`**: Evaluation scores (`saveScore`, `listScoresByScorerId`, etc.)
|
|
90
|
+
- **`observability`**: Tracing and spans (`createSpan`, `updateSpan`, `getTrace`, etc.)
|
|
91
|
+
- **`agents`**: Stored agent configurations (`createAgent`, `getAgentById`, `listAgents`, etc.)
|
|
63
92
|
|
|
64
|
-
|
|
93
|
+
### Breaking Changes
|
|
94
|
+
- Passthrough methods have been removed from `MastraStorage` base class
|
|
95
|
+
- All storage adapters now require accessing domains via `getStore()`
|
|
96
|
+
- The `stores` property on storage instances is now the canonical way to access domain storage
|
|
65
97
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
defaultAgentOptions: {
|
|
70
|
-
autoResumeSuspendedTools: true,
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
```
|
|
98
|
+
### Internal Changes
|
|
99
|
+
- Each storage adapter now initializes domain-specific stores in its constructor
|
|
100
|
+
- Domain stores share database connections and handle their own table initialization
|
|
74
101
|
|
|
75
|
-
-
|
|
76
|
-
- Errors thrown in workflow steps now preserve full error details including `cause` chain and custom properties
|
|
77
|
-
- Added `SerializedError` type with proper cause chain support
|
|
78
|
-
- Added `SerializedStepResult` and `SerializedStepFailure` types for handling errors loaded from storage
|
|
79
|
-
- Enhanced `addErrorToJSON` to recursively serialize error cause chains with max depth protection
|
|
80
|
-
- Added `hydrateSerializedStepErrors` to convert serialized errors back to Error instances
|
|
81
|
-
- Fixed Inngest workflow error handling to extract original error from `NonRetriableError.cause`
|
|
102
|
+
- Add support for AI SDK v6 ToolLoopAgent in Mastra ([#11254](https://github.com/mastra-ai/mastra/pull/11254))
|
|
82
103
|
|
|
83
|
-
|
|
104
|
+
You can now pass an AI SDK v6 `ToolLoopAgent` directly to Mastra's agents configuration. The agent will be automatically converted to a Mastra Agent while preserving all ToolLoopAgent lifecycle hooks:
|
|
105
|
+
- `prepareCall` - Called once at the start of generate/stream
|
|
106
|
+
- `prepareStep` - Called before each step in the agentic loop
|
|
107
|
+
- `stopWhen` - Custom stop conditions for the loop
|
|
84
108
|
|
|
85
|
-
|
|
109
|
+
Example:
|
|
86
110
|
|
|
87
|
-
|
|
111
|
+
```typescript
|
|
112
|
+
import { ToolLoopAgent } from 'ai';
|
|
113
|
+
import { Mastra } from '@mastra/core/mastra';
|
|
114
|
+
|
|
115
|
+
const toolLoopAgent = new ToolLoopAgent({
|
|
116
|
+
model: openai('gpt-4o'),
|
|
117
|
+
instructions: 'You are a helpful assistant.',
|
|
118
|
+
tools: { weather: weatherTool },
|
|
119
|
+
prepareStep: async ({ stepNumber }) => {
|
|
120
|
+
if (stepNumber === 0) {
|
|
121
|
+
return { toolChoice: 'required' };
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
});
|
|
88
125
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
- Add `InngestRun.startAsync()` - sends Inngest event without polling for result
|
|
126
|
+
const mastra = new Mastra({
|
|
127
|
+
agents: { toolLoopAgent },
|
|
128
|
+
});
|
|
93
129
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
130
|
+
// Use like any other Mastra agent
|
|
131
|
+
const agent = mastra.getAgent('toolLoopAgent');
|
|
132
|
+
const result = await agent.generate('What is the weather?');
|
|
133
|
+
```
|
|
98
134
|
|
|
99
|
-
|
|
135
|
+
- Unified observability schema with entity-based span identification ([#11132](https://github.com/mastra-ai/mastra/pull/11132))
|
|
100
136
|
|
|
101
|
-
|
|
137
|
+
## What changed
|
|
102
138
|
|
|
103
|
-
|
|
139
|
+
Spans now use a unified identification model with `entityId`, `entityType`, and `entityName` instead of separate `agentId`, `toolId`, `workflowId` fields.
|
|
104
140
|
|
|
105
141
|
**Before:**
|
|
106
142
|
|
|
107
143
|
```typescript
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
144
|
+
// Old span structure
|
|
145
|
+
span.agentId; // 'my-agent'
|
|
146
|
+
span.toolId; // undefined
|
|
147
|
+
span.workflowId; // undefined
|
|
113
148
|
```
|
|
114
149
|
|
|
115
150
|
**After:**
|
|
116
151
|
|
|
117
152
|
```typescript
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
console.log(result.error.statusCode); // 429
|
|
123
|
-
console.log(result.error.cause?.name); // "RateLimitError"
|
|
124
|
-
}
|
|
153
|
+
// New span structure
|
|
154
|
+
span.entityType; // EntityType.AGENT
|
|
155
|
+
span.entityId; // 'my-agent'
|
|
156
|
+
span.entityName; // 'My Agent'
|
|
125
157
|
```
|
|
126
158
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
Other changes:
|
|
130
|
-
- Added `UpdateWorkflowStateOptions` type for workflow state updates
|
|
131
|
-
|
|
132
|
-
- Fix Zod 4 compatibility issue with structuredOutput in agent.generate() ([#11133](https://github.com/mastra-ai/mastra/pull/11133))
|
|
133
|
-
|
|
134
|
-
Users with Zod 4 installed would see `TypeError: undefined is not an object (evaluating 'def.valueType._zod')` when using `structuredOutput` with agent.generate(). This happened because ProcessorStepSchema contains `z.custom()` fields that hold user-provided Zod schemas, and the workflow validation was trying to deeply validate these schemas causing version conflicts.
|
|
159
|
+
## New `listTraces()` API
|
|
135
160
|
|
|
136
|
-
|
|
161
|
+
Query traces with filtering, pagination, and sorting:
|
|
137
162
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
- Cancellation status is immediately persisted and reflected to observers
|
|
163
|
+
```typescript
|
|
164
|
+
const { spans, pagination } = await storage.listTraces({
|
|
165
|
+
filters: {
|
|
166
|
+
entityType: EntityType.AGENT,
|
|
167
|
+
entityId: 'my-agent',
|
|
168
|
+
userId: 'user-123',
|
|
169
|
+
environment: 'production',
|
|
170
|
+
status: TraceStatus.SUCCESS,
|
|
171
|
+
startedAt: { start: new Date('2024-01-01'), end: new Date('2024-01-31') },
|
|
172
|
+
},
|
|
173
|
+
pagination: { page: 0, perPage: 50 },
|
|
174
|
+
orderBy: { field: 'startedAt', direction: 'DESC' },
|
|
175
|
+
});
|
|
176
|
+
```
|
|
153
177
|
|
|
154
|
-
|
|
178
|
+
**Available filters:** date ranges (`startedAt`, `endedAt`), entity (`entityType`, `entityId`, `entityName`), identity (`userId`, `organizationId`), correlation IDs (`runId`, `sessionId`, `threadId`), deployment (`environment`, `source`, `serviceName`), `tags`, `metadata`, and `status`.
|
|
155
179
|
|
|
156
|
-
|
|
180
|
+
## New retrieval methods
|
|
181
|
+
- `getSpan({ traceId, spanId })` - Get a single span
|
|
182
|
+
- `getRootSpan({ traceId })` - Get the root span of a trace
|
|
183
|
+
- `getTrace({ traceId })` - Get all spans for a trace
|
|
157
184
|
|
|
158
|
-
|
|
185
|
+
## Backward compatibility
|
|
159
186
|
|
|
160
|
-
|
|
187
|
+
The legacy `getTraces()` method continues to work. When you pass `name: "agent run: my-agent"`, it automatically transforms to `entityId: "my-agent", entityType: AGENT`.
|
|
161
188
|
|
|
162
|
-
|
|
189
|
+
## Migration
|
|
163
190
|
|
|
164
|
-
**
|
|
191
|
+
**Automatic:** SQL-based stores (PostgreSQL, LibSQL, MSSQL) automatically add new columns to existing `spans` tables on initialization. Existing data is preserved with new columns set to `NULL`.
|
|
165
192
|
|
|
166
|
-
**
|
|
167
|
-
- The backend now sends the assistant message ID in the stream's start event, so `useChat` uses the same ID as storage
|
|
168
|
-
- Custom `data-*` parts (from `writer.custom()`) are now preserved when messages contain V5 tool parts
|
|
193
|
+
**No action required:** Your existing code continues to work. Adopt the new fields and `listTraces()` API at your convenience.
|
|
169
194
|
|
|
170
|
-
|
|
195
|
+
### Patch Changes
|
|
171
196
|
|
|
172
|
-
-
|
|
173
|
-
- @mastra/schema-compat@1.0.0-beta.3
|
|
174
|
-
- @mastra/observability@1.0.0-beta.5
|
|
197
|
+
- When calling `abort()` inside a `processInputStep` processor, the TripWire was being caught by the model retry logic instead of emitting a tripwire chunk to the stream. ([#11343](https://github.com/mastra-ai/mastra/pull/11343))
|
|
175
198
|
|
|
176
|
-
|
|
199
|
+
Before this fix, processors using `processInputStep` with abort would see errors like:
|
|
177
200
|
|
|
178
|
-
|
|
201
|
+
```
|
|
202
|
+
Error executing model gpt-4o-mini, attempt 1==== TripWire [Error]: Potentially harmful content detected
|
|
203
|
+
```
|
|
179
204
|
|
|
180
|
-
|
|
205
|
+
Now the TripWire is properly handled - it emits a tripwire chunk and signals the abort correctly,
|
|
181
206
|
|
|
182
|
-
|
|
207
|
+
- Consolidate memory integration tests and fix working memory filtering in MessageHistory processor ([#11367](https://github.com/mastra-ai/mastra/pull/11367))
|
|
183
208
|
|
|
184
|
-
|
|
209
|
+
Moved `extractWorkingMemoryTags`, `removeWorkingMemoryTags`, and `extractWorkingMemoryContent` utilities from `@mastra/memory` to `@mastra/core/memory` so they can be used by the `MessageHistory` processor.
|
|
185
210
|
|
|
186
|
-
|
|
211
|
+
Updated `MessageHistory.filterMessagesForPersistence()` to properly filter out `updateWorkingMemory` tool invocations and strip working memory tags from text content, fixing an issue where working memory tool call arguments were polluting saved message history for v5+ models.
|
|
187
212
|
|
|
188
|
-
-
|
|
213
|
+
Also consolidated integration tests for agent-memory, working-memory, and pg-storage into shared test functions that can run against multiple model versions (v4, v5, v6).
|
|
189
214
|
|
|
190
|
-
-
|
|
215
|
+
- Add support for AI SDK's `needsApproval` in tools. ([#11388](https://github.com/mastra-ai/mastra/pull/11388))
|
|
191
216
|
|
|
192
|
-
|
|
193
|
-
import { Mastra } from '@mastra/core';
|
|
217
|
+
**AI SDK tools with static approval:**
|
|
194
218
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
219
|
+
```typescript
|
|
220
|
+
import { tool } from 'ai';
|
|
221
|
+
import { z } from 'zod';
|
|
222
|
+
|
|
223
|
+
const weatherTool = tool({
|
|
224
|
+
description: 'Get weather information',
|
|
225
|
+
inputSchema: z.object({ city: z.string() }),
|
|
226
|
+
needsApproval: true,
|
|
227
|
+
execute: async ({ city }) => {
|
|
228
|
+
return { weather: 'sunny', temp: 72 };
|
|
198
229
|
},
|
|
199
230
|
});
|
|
200
231
|
```
|
|
201
232
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
- Expand `processInputStep` processor method and integrate `prepareStep` as a processor ([#10774](https://github.com/mastra-ai/mastra/pull/10774))
|
|
205
|
-
|
|
206
|
-
**New Features:**
|
|
207
|
-
- `prepareStep` callback now runs through the standard `processInputStep` pipeline
|
|
208
|
-
- Processors can now modify per-step: `model`, `tools`, `toolChoice`, `activeTools`, `messages`, `systemMessages`, `providerOptions`, `modelSettings`, and `structuredOutput`
|
|
209
|
-
- Processor chaining: each processor receives accumulated state from previous processors
|
|
210
|
-
- System messages are isolated per-step (reset at start of each step)
|
|
211
|
-
|
|
212
|
-
**Breaking Change:**
|
|
213
|
-
- `prepareStep` messages format changed from AI SDK v5 model messages to `MastraDBMessage` format
|
|
214
|
-
- Migration: Use `messageList.get.all.aiV5.model()` if you need the old format
|
|
233
|
+
**AI SDK tools with dynamic approval:**
|
|
215
234
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
235
|
+
```typescript
|
|
236
|
+
const paymentTool = tool({
|
|
237
|
+
description: 'Process payment',
|
|
238
|
+
inputSchema: z.object({ amount: z.number() }),
|
|
239
|
+
needsApproval: async ({ amount }) => amount > 1000,
|
|
240
|
+
execute: async ({ amount }) => {
|
|
241
|
+
return { success: true, amount };
|
|
242
|
+
},
|
|
243
|
+
});
|
|
244
|
+
```
|
|
223
245
|
|
|
224
|
-
**
|
|
246
|
+
**Mastra tools continue to work with `requireApproval`:**
|
|
225
247
|
|
|
226
248
|
```typescript
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
249
|
+
import { createTool } from '@mastra/core';
|
|
250
|
+
|
|
251
|
+
const deleteTool = createTool({
|
|
252
|
+
id: 'delete-file',
|
|
253
|
+
description: 'Delete a file',
|
|
254
|
+
requireApproval: true,
|
|
255
|
+
inputSchema: z.object({ path: z.string() }),
|
|
256
|
+
execute: async ({ path }) => {
|
|
257
|
+
return { deleted: true };
|
|
258
|
+
},
|
|
259
|
+
});
|
|
233
260
|
```
|
|
234
261
|
|
|
235
|
-
|
|
262
|
+
- Fix stopWhen type to accept AI SDK v6 StopCondition functions like `stepCountIs()` ([#11402](https://github.com/mastra-ai/mastra/pull/11402))
|
|
236
263
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
```typescript
|
|
240
|
-
import { createStep, createWorkflow } from '@mastra/core/workflows';
|
|
241
|
-
import {
|
|
242
|
-
ProcessorStepSchema,
|
|
243
|
-
} from '@mastra/core/processors';
|
|
264
|
+
- Fix missing `title` field in Convex threads table schema ([#11356](https://github.com/mastra-ai/mastra/pull/11356))
|
|
244
265
|
|
|
245
|
-
|
|
246
|
-
.then(createStep(new lengthValidator({...})))
|
|
247
|
-
.parallel([createStep(new piiDetector({...}), createStep(new toxicityChecker({...}))])
|
|
248
|
-
.commit();
|
|
266
|
+
The Convex schema was hardcoded and out of sync with the core `TABLE_SCHEMAS`, causing errors when creating threads:
|
|
249
267
|
|
|
250
|
-
|
|
268
|
+
```
|
|
269
|
+
Error: Failed to insert or update a document in table "mastra_threads"
|
|
270
|
+
because it does not match the schema: Object contains extra field `title`
|
|
271
|
+
that is not in the validator.
|
|
251
272
|
```
|
|
252
273
|
|
|
253
|
-
|
|
254
|
-
<img width="614" height="673" alt="image" src="https://github.com/user-attachments/assets/0d79f1fd-8fca-4d86-8b45-22fddea984a8" />
|
|
255
|
-
|
|
256
|
-
**3. Extended tripwire API** - `abort()` now accepts options for retry control and typed metadata:
|
|
274
|
+
Now the Convex schema dynamically builds from `TABLE_SCHEMAS` via a new `@mastra/core/storage/constants` export path that doesn't pull in Node.js dependencies (safe for Convex's sandboxed schema evaluation).
|
|
257
275
|
|
|
258
276
|
```typescript
|
|
259
|
-
|
|
260
|
-
|
|
277
|
+
// Users can now import schema tables without Node.js dependency issues
|
|
278
|
+
import { mastraThreadsTable, mastraMessagesTable } from '@mastra/convex/schema';
|
|
261
279
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
280
|
+
export default defineSchema({
|
|
281
|
+
mastra_threads: mastraThreadsTable,
|
|
282
|
+
mastra_messages: mastraMessagesTable,
|
|
283
|
+
});
|
|
284
|
+
```
|
|
265
285
|
|
|
266
|
-
|
|
286
|
+
Fixes #11319
|
|
267
287
|
|
|
268
|
-
|
|
288
|
+
- Added support for AI SDK v6 embedding models (specification version v3) in memory and vector modules. Fixed TypeScript error where `ModelRouterEmbeddingModel` was trying to implement a union type instead of `EmbeddingModelV2` directly. ([#11362](https://github.com/mastra-ai/mastra/pull/11362))
|
|
269
289
|
|
|
270
|
-
-
|
|
290
|
+
- fix: support gs:// and s3:// cloud storage URLs in attachmentsToParts ([#11398](https://github.com/mastra-ai/mastra/pull/11398))
|
|
271
291
|
|
|
272
|
-
|
|
292
|
+
- Add validation to detect when a function is passed as a tool instead of a tool object. Previously, passing a tool factory function (e.g., `tools: { myTool }` instead of `tools: { myTool: myTool() }`) would silently fail - the LLM would request tool calls but nothing would execute. Now throws a clear error with guidance on how to fix it. ([#11288](https://github.com/mastra-ai/mastra/pull/11288))
|
|
273
293
|
|
|
274
|
-
|
|
294
|
+
- Fix reasoning providerMetadata leaking into text parts when using memory with OpenAI reasoning models. The runState.providerOptions is now cleared after reasoning-end to prevent text parts from inheriting the reasoning's itemId. ([#11380](https://github.com/mastra-ai/mastra/pull/11380))
|
|
275
295
|
|
|
276
|
-
|
|
277
|
-
const articleSchema = z.object({
|
|
278
|
-
title: z.string(),
|
|
279
|
-
summary: z.string(),
|
|
280
|
-
tags: z.array(z.string()),
|
|
281
|
-
});
|
|
296
|
+
- Upgrade AI SDK v6 from beta to stable (6.0.1) and fix finishReason breaking change. ([#11351](https://github.com/mastra-ai/mastra/pull/11351))
|
|
282
297
|
|
|
283
|
-
|
|
284
|
-
const agentStep = createStep(agent, {
|
|
285
|
-
structuredOutput: { schema: articleSchema },
|
|
286
|
-
});
|
|
298
|
+
AI SDK v6 stable changed finishReason from a string to an object with `unified` and `raw` properties. Added `normalizeFinishReason()` helper to handle both v5 (string) and v6 (object) formats at the stream transform layer
|
|
287
299
|
|
|
288
|
-
|
|
289
|
-
const processStep = createStep({
|
|
290
|
-
id: 'process',
|
|
291
|
-
inputSchema: articleSchema, // Matches agent's outputSchema
|
|
292
|
-
outputSchema: z.object({ tagCount: z.number() }),
|
|
293
|
-
execute: async ({ inputData }) => ({
|
|
294
|
-
tagCount: inputData.tags.length, // Fully typed!
|
|
295
|
-
}),
|
|
296
|
-
});
|
|
300
|
+
- Improve autoResumeSuspendedTools instruction for tool approval ([#11338](https://github.com/mastra-ai/mastra/pull/11338))
|
|
297
301
|
|
|
298
|
-
|
|
299
|
-
```
|
|
302
|
+
- Add debugger-like click-through UI to workflow graph ([#11350](https://github.com/mastra-ai/mastra/pull/11350))
|
|
300
303
|
|
|
301
|
-
|
|
304
|
+
- Add `perStep` option to workflow run methods, allowing a workflow to run just a step instead of all the workflow steps ([#11276](https://github.com/mastra-ai/mastra/pull/11276))
|
|
302
305
|
|
|
303
|
-
-
|
|
306
|
+
- Fix workflow throwing error when using .map after .foreach ([#11352](https://github.com/mastra-ai/mastra/pull/11352))
|
|
304
307
|
|
|
305
|
-
-
|
|
308
|
+
- Bump @ai-sdk/openai from 3.0.0-beta.102 to 3.0.1 ([#11377](https://github.com/mastra-ai/mastra/pull/11377))
|
|
306
309
|
|
|
307
|
-
|
|
308
|
-
await workflow.deleteWorkflowRunById(runId);
|
|
309
|
-
```
|
|
310
|
+
## 1.0.0-beta.14
|
|
310
311
|
|
|
311
|
-
|
|
312
|
+
### Minor Changes
|
|
312
313
|
|
|
313
|
-
-
|
|
314
|
-
- Add persistence for custom data chunks (`data-*` parts) emitted via `writer.custom()` in tools
|
|
315
|
-
- Data chunks are now saved to message storage so they survive page refreshes
|
|
316
|
-
- Update `@assistant-ui/react` to v0.11.47 with native `DataMessagePart` support
|
|
317
|
-
- Convert `data-*` parts to `DataMessagePart` format (`{ type: 'data', name: string, data: T }`)
|
|
318
|
-
- Update related `@assistant-ui/*` packages for compatibility
|
|
314
|
+
- Add support for AI SDK v6 (LanguageModelV3) ([#11191](https://github.com/mastra-ai/mastra/pull/11191))
|
|
319
315
|
|
|
320
|
-
|
|
316
|
+
Agents can now use `LanguageModelV3` models from AI SDK v6 beta providers like `@ai-sdk/openai@^3.0.0-beta`.
|
|
321
317
|
|
|
322
|
-
|
|
318
|
+
**New features:**
|
|
319
|
+
- Usage normalization: V3's nested usage format is normalized to Mastra's flat format with `reasoningTokens`, `cachedInputTokens`, and raw data preserved in a `raw` field
|
|
323
320
|
|
|
324
|
-
|
|
321
|
+
**Backward compatible:** All existing V1 and V2 models continue to work unchanged.
|
|
325
322
|
|
|
326
|
-
|
|
327
|
-
- @mastra/observability@1.0.0-beta.4
|
|
323
|
+
### Patch Changes
|
|
328
324
|
|
|
329
|
-
|
|
325
|
+
- Fix model-level and runtime header support for LLM calls ([#11275](https://github.com/mastra-ai/mastra/pull/11275))
|
|
330
326
|
|
|
331
|
-
|
|
327
|
+
This fixes a bug where custom headers configured on models (like `anthropic-beta`) were not being passed through to the underlying AI SDK calls. The fix properly handles headers from multiple sources with correct priority:
|
|
332
328
|
|
|
333
|
-
|
|
329
|
+
**Header Priority (low to high):**
|
|
330
|
+
1. Model config headers - Headers set in model configuration
|
|
331
|
+
2. ModelSettings headers - Runtime headers that override model config
|
|
332
|
+
3. Provider-level headers - Headers baked into AI SDK providers (not overridden)
|
|
334
333
|
|
|
335
|
-
|
|
334
|
+
**Examples that now work:**
|
|
336
335
|
|
|
337
336
|
```typescript
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
tools: { myTool },
|
|
344
|
-
scorers: { myScorer },
|
|
345
|
-
});
|
|
346
|
-
|
|
347
|
-
// Create agent in storage via API or directly
|
|
348
|
-
await mastra.getStorage().createAgent({
|
|
349
|
-
agent: {
|
|
350
|
-
id: 'my-agent',
|
|
351
|
-
name: 'My Agent',
|
|
352
|
-
instructions: 'You are helpful',
|
|
353
|
-
model: { provider: 'openai', name: 'gpt-4' },
|
|
354
|
-
tools: { myTool: {} },
|
|
355
|
-
scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
|
|
337
|
+
// Model config headers
|
|
338
|
+
new Agent({
|
|
339
|
+
model: {
|
|
340
|
+
id: 'anthropic/claude-4-5-sonnet',
|
|
341
|
+
headers: { 'anthropic-beta': 'context-1m-2025-08-07' },
|
|
356
342
|
},
|
|
357
343
|
});
|
|
358
344
|
|
|
359
|
-
//
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
// List all stored agents with pagination
|
|
364
|
-
const { agents, total, hasMore } = await mastra.listStoredAgents({
|
|
365
|
-
page: 0,
|
|
366
|
-
perPage: 10,
|
|
345
|
+
// Runtime headers override config
|
|
346
|
+
agent.generate('...', {
|
|
347
|
+
modelSettings: { headers: { 'x-custom': 'runtime-value' } },
|
|
367
348
|
});
|
|
368
|
-
```
|
|
369
349
|
|
|
370
|
-
|
|
350
|
+
// Provider-level headers preserved
|
|
351
|
+
const openai = createOpenAI({ headers: { 'openai-organization': 'org-123' } });
|
|
352
|
+
new Agent({ model: openai('gpt-4o-mini') });
|
|
353
|
+
```
|
|
371
354
|
|
|
372
|
-
|
|
355
|
+
- Fixed AbortSignal not propagating from parent workflows to nested sub-workflows in the evented workflow engine. ([#11142](https://github.com/mastra-ai/mastra/pull/11142))
|
|
373
356
|
|
|
374
|
-
|
|
357
|
+
Previously, canceling a parent workflow did not stop nested sub-workflows, causing them to continue running and consuming resources after the parent was canceled.
|
|
375
358
|
|
|
376
|
-
-
|
|
359
|
+
Now, when you cancel a parent workflow, all nested sub-workflows are automatically canceled as well, ensuring clean termination of the entire workflow tree.
|
|
377
360
|
|
|
378
|
-
|
|
361
|
+
**Example:**
|
|
379
362
|
|
|
380
|
-
|
|
363
|
+
```typescript
|
|
364
|
+
const parentWorkflow = createWorkflow({ id: 'parent-workflow' }).then(someStep).then(nestedChildWorkflow).commit();
|
|
381
365
|
|
|
382
|
-
|
|
366
|
+
const run = await parentWorkflow.createRun();
|
|
367
|
+
const resultPromise = run.start({ inputData: { value: 5 } });
|
|
383
368
|
|
|
384
|
-
|
|
369
|
+
// Cancel the parent workflow - nested workflows will also be canceled
|
|
370
|
+
await run.cancel();
|
|
371
|
+
// or use: run.abortController.abort();
|
|
385
372
|
|
|
386
|
-
|
|
373
|
+
const result = await resultPromise;
|
|
374
|
+
// result.status === 'canceled'
|
|
375
|
+
// All nested child workflows are also canceled
|
|
376
|
+
```
|
|
387
377
|
|
|
388
|
-
|
|
378
|
+
Related to #11063
|
|
389
379
|
|
|
390
|
-
- Fix
|
|
380
|
+
- Fix empty overrideScorers causing error instead of skipping scoring ([#11257](https://github.com/mastra-ai/mastra/pull/11257))
|
|
391
381
|
|
|
392
|
-
|
|
393
|
-
- saveScore now correctly returns scores that can be retrieved with getScoreById
|
|
394
|
-
- Validation errors now include contextual information (scorer, entity, trace details) for easier debugging
|
|
382
|
+
When `overrideScorers` was passed as an empty object `{}`, the agent would throw a "No scorers found" error. Now an empty object explicitly skips scoring, while `undefined` continues to use default scorers.
|
|
395
383
|
|
|
396
|
-
|
|
397
|
-
Previously, calling getScoreById after saveScore would return null because the generated ID wasn't persisted to the database. This is now fixed across all store implementations, ensuring consistent behavior and data integrity.
|
|
384
|
+
- feat: Add field filtering and nested workflow control to workflow execution result endpoint ([#11246](https://github.com/mastra-ai/mastra/pull/11246))
|
|
398
385
|
|
|
399
|
-
|
|
400
|
-
- `
|
|
401
|
-
-
|
|
402
|
-
- State data is validated against the step's `stateSchema` when `validateInputs` is enabled (default: `true`)
|
|
386
|
+
Adds two optional query parameters to `/api/workflows/:workflowId/runs/:runId/execution-result` endpoint:
|
|
387
|
+
- `fields`: Request only specific fields (e.g., `status`, `result`, `error`)
|
|
388
|
+
- `withNestedWorkflows`: Control whether to fetch nested workflow data
|
|
403
389
|
|
|
404
|
-
|
|
390
|
+
This significantly reduces response payload size and improves response times for large workflows.
|
|
405
391
|
|
|
406
|
-
##
|
|
392
|
+
## Server Endpoint Usage
|
|
407
393
|
|
|
408
|
-
|
|
394
|
+
```http
|
|
395
|
+
# Get only status (minimal payload - fastest)
|
|
396
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status
|
|
409
397
|
|
|
410
|
-
|
|
398
|
+
# Get status and result
|
|
399
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,result
|
|
411
400
|
|
|
412
|
-
|
|
401
|
+
# Get all fields but without nested workflow data (faster)
|
|
402
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result?withNestedWorkflows=false
|
|
413
403
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
const storage = new PostgresStore({
|
|
417
|
-
connectionString: DATABASE_URL,
|
|
418
|
-
id: 'pg-storage',
|
|
419
|
-
});
|
|
420
|
-
await storage.init();
|
|
404
|
+
# Get only specific fields without nested workflow data
|
|
405
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,steps&withNestedWorkflows=false
|
|
421
406
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
connectionString: DATABASE_URL,
|
|
425
|
-
id: 'pg-storage',
|
|
426
|
-
disableInit: true,
|
|
427
|
-
});
|
|
407
|
+
# Get full data (default behavior)
|
|
408
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result
|
|
428
409
|
```
|
|
429
410
|
|
|
430
|
-
|
|
411
|
+
## Client SDK Usage
|
|
431
412
|
|
|
432
|
-
|
|
413
|
+
```typescript
|
|
414
|
+
import { MastraClient } from '@mastra/client-js';
|
|
433
415
|
|
|
434
|
-
|
|
416
|
+
const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
|
|
417
|
+
const workflow = client.getWorkflow('myWorkflow');
|
|
435
418
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
419
|
+
// Get only status (minimal payload - fastest)
|
|
420
|
+
const statusOnly = await workflow.runExecutionResult(runId, {
|
|
421
|
+
fields: ['status'],
|
|
422
|
+
});
|
|
423
|
+
console.log(statusOnly.status); // 'success' | 'failed' | 'running' | etc.
|
|
441
424
|
|
|
442
|
-
|
|
443
|
-
|
|
425
|
+
// Get status and result
|
|
426
|
+
const statusAndResult = await workflow.runExecutionResult(runId, {
|
|
427
|
+
fields: ['status', 'result'],
|
|
428
|
+
});
|
|
444
429
|
|
|
445
|
-
|
|
430
|
+
// Get all fields but without nested workflow data (faster)
|
|
431
|
+
const resultWithoutNested = await workflow.runExecutionResult(runId, {
|
|
432
|
+
withNestedWorkflows: false,
|
|
433
|
+
});
|
|
446
434
|
|
|
447
|
-
|
|
435
|
+
// Get specific fields without nested workflow data
|
|
436
|
+
const optimized = await workflow.runExecutionResult(runId, {
|
|
437
|
+
fields: ['status', 'steps'],
|
|
438
|
+
withNestedWorkflows: false,
|
|
439
|
+
});
|
|
448
440
|
|
|
449
|
-
|
|
441
|
+
// Get full execution result (default behavior)
|
|
442
|
+
const fullResult = await workflow.runExecutionResult(runId);
|
|
443
|
+
```
|
|
450
444
|
|
|
451
|
-
|
|
445
|
+
## Core API Changes
|
|
452
446
|
|
|
453
|
-
The
|
|
447
|
+
The `Workflow.getWorkflowRunExecutionResult` method now accepts an options object:
|
|
454
448
|
|
|
455
|
-
|
|
449
|
+
```typescript
|
|
450
|
+
await workflow.getWorkflowRunExecutionResult(runId, {
|
|
451
|
+
withNestedWorkflows: false, // default: true, set to false to skip nested workflow data
|
|
452
|
+
fields: ['status', 'result'], // optional field filtering
|
|
453
|
+
});
|
|
454
|
+
```
|
|
456
455
|
|
|
457
|
-
|
|
456
|
+
## Inngest Compatibility
|
|
458
457
|
|
|
459
|
-
|
|
458
|
+
The `@mastra/inngest` package has been updated to use the new options object API. This is a non-breaking internal change - no action required from inngest workflow users.
|
|
460
459
|
|
|
461
|
-
|
|
460
|
+
## Performance Impact
|
|
462
461
|
|
|
463
|
-
|
|
462
|
+
For workflows with large step outputs:
|
|
463
|
+
- Requesting only `status`: ~99% reduction in payload size
|
|
464
|
+
- Requesting `status,result,error`: ~95% reduction in payload size
|
|
465
|
+
- Using `withNestedWorkflows=false`: Avoids expensive nested workflow data fetching
|
|
466
|
+
- Combining both: Maximum performance optimization
|
|
464
467
|
|
|
465
|
-
|
|
468
|
+
- Removed a debug log that printed large Zod schemas, resulting in cleaner console output when using agents with memory enabled. ([#11279](https://github.com/mastra-ai/mastra/pull/11279))
|
|
466
469
|
|
|
467
|
-
|
|
470
|
+
- Set `externals: true` as the default for `mastra build` and cloud-deployer to reduce bundle issues with native dependencies. ([`0dbf199`](https://github.com/mastra-ai/mastra/commit/0dbf199110f22192ce5c95b1c8148d4872b4d119))
|
|
468
471
|
|
|
469
|
-
|
|
470
|
-
// TypeError: ToolStream<ChunkType> is not assignable to WritableStream<Partial<StoryPlan>>
|
|
471
|
-
await response.objectStream.pipeTo(writer);
|
|
472
|
-
```
|
|
472
|
+
**Note:** If you previously relied on the default bundling behavior (all dependencies bundled), you can explicitly set `externals: false` in your bundler configuration.
|
|
473
473
|
|
|
474
|
-
|
|
474
|
+
- Fix delayed promises rejecting when stream suspends on tool-call-approval ([#11278](https://github.com/mastra-ai/mastra/pull/11278))
|
|
475
475
|
|
|
476
|
-
|
|
477
|
-
// Works without type errors
|
|
478
|
-
await response.objectStream.pipeTo(writer);
|
|
479
|
-
```
|
|
476
|
+
When a stream ends in suspended state (e.g., requiring tool approval), the delayed promises like `toolResults`, `toolCalls`, `text`, etc. now resolve with partial results instead of rejecting with an error. This allows consumers to access data that was produced before the suspension.
|
|
480
477
|
|
|
481
|
-
|
|
478
|
+
Also improves generic type inference for `LLMStepResult` and related types throughout the streaming infrastructure.
|
|
482
479
|
|
|
483
|
-
|
|
480
|
+
## 1.0.0-beta.13
|
|
484
481
|
|
|
485
|
-
|
|
482
|
+
### Patch Changes
|
|
486
483
|
|
|
487
|
-
|
|
488
|
-
threadObject = await memory.createThread({
|
|
489
|
-
// ...
|
|
490
|
-
saveThread: false, // thread not in DB yet
|
|
491
|
-
});
|
|
492
|
-
// Later: MessageHistory calls saveMessages() -> PostgresStore throws "Thread not found"
|
|
493
|
-
```
|
|
484
|
+
- Add `onFinish` and `onError` lifecycle callbacks to workflow options ([#11200](https://github.com/mastra-ai/mastra/pull/11200))
|
|
494
485
|
|
|
495
|
-
|
|
486
|
+
Workflows now support lifecycle callbacks for server-side handling of workflow completion and errors:
|
|
487
|
+
- `onFinish`: Called when workflow completes with any status (success, failed, suspended, tripwire)
|
|
488
|
+
- `onError`: Called only when workflow fails (failed or tripwire status)
|
|
496
489
|
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
490
|
+
```typescript
|
|
491
|
+
const workflow = createWorkflow({
|
|
492
|
+
id: 'my-workflow',
|
|
493
|
+
inputSchema: z.object({ ... }),
|
|
494
|
+
outputSchema: z.object({ ... }),
|
|
495
|
+
options: {
|
|
496
|
+
onFinish: async (result) => {
|
|
497
|
+
// Handle any workflow completion
|
|
498
|
+
await updateJobStatus(result.status);
|
|
499
|
+
},
|
|
500
|
+
onError: async (errorInfo) => {
|
|
501
501
|
|
|
502
|
-
...
|
|
502
|
+
... 6796 more lines hidden. See full changelog in package directory.
|