@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,5 +1,222 @@
|
|
|
1
1
|
# @mastra/server
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.15
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Unified observability schema with entity-based span identification ([#11132](https://github.com/mastra-ai/mastra/pull/11132))
|
|
8
|
+
|
|
9
|
+
## What changed
|
|
10
|
+
|
|
11
|
+
Spans now use a unified identification model with `entityId`, `entityType`, and `entityName` instead of separate `agentId`, `toolId`, `workflowId` fields.
|
|
12
|
+
|
|
13
|
+
**Before:**
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
// Old span structure
|
|
17
|
+
span.agentId; // 'my-agent'
|
|
18
|
+
span.toolId; // undefined
|
|
19
|
+
span.workflowId; // undefined
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**After:**
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
// New span structure
|
|
26
|
+
span.entityType; // EntityType.AGENT
|
|
27
|
+
span.entityId; // 'my-agent'
|
|
28
|
+
span.entityName; // 'My Agent'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## New `listTraces()` API
|
|
32
|
+
|
|
33
|
+
Query traces with filtering, pagination, and sorting:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
const { spans, pagination } = await storage.listTraces({
|
|
37
|
+
filters: {
|
|
38
|
+
entityType: EntityType.AGENT,
|
|
39
|
+
entityId: 'my-agent',
|
|
40
|
+
userId: 'user-123',
|
|
41
|
+
environment: 'production',
|
|
42
|
+
status: TraceStatus.SUCCESS,
|
|
43
|
+
startedAt: { start: new Date('2024-01-01'), end: new Date('2024-01-31') },
|
|
44
|
+
},
|
|
45
|
+
pagination: { page: 0, perPage: 50 },
|
|
46
|
+
orderBy: { field: 'startedAt', direction: 'DESC' },
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**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`.
|
|
51
|
+
|
|
52
|
+
## New retrieval methods
|
|
53
|
+
- `getSpan({ traceId, spanId })` - Get a single span
|
|
54
|
+
- `getRootSpan({ traceId })` - Get the root span of a trace
|
|
55
|
+
- `getTrace({ traceId })` - Get all spans for a trace
|
|
56
|
+
|
|
57
|
+
## Backward compatibility
|
|
58
|
+
|
|
59
|
+
The legacy `getTraces()` method continues to work. When you pass `name: "agent run: my-agent"`, it automatically transforms to `entityId: "my-agent", entityType: AGENT`.
|
|
60
|
+
|
|
61
|
+
## Migration
|
|
62
|
+
|
|
63
|
+
**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`.
|
|
64
|
+
|
|
65
|
+
**No action required:** Your existing code continues to work. Adopt the new fields and `listTraces()` API at your convenience.
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- Refactor storage architecture to use domain-specific stores via `getStore()` pattern ([#11361](https://github.com/mastra-ai/mastra/pull/11361))
|
|
70
|
+
|
|
71
|
+
### Summary
|
|
72
|
+
|
|
73
|
+
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.
|
|
74
|
+
|
|
75
|
+
### Migration Guide
|
|
76
|
+
|
|
77
|
+
All direct method calls on storage instances should be updated to use `getStore()`:
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
// Before
|
|
81
|
+
const thread = await storage.getThreadById({ threadId });
|
|
82
|
+
await storage.persistWorkflowSnapshot({ workflowName, runId, snapshot });
|
|
83
|
+
await storage.createSpan(span);
|
|
84
|
+
|
|
85
|
+
// After
|
|
86
|
+
const memory = await storage.getStore('memory');
|
|
87
|
+
const thread = await memory?.getThreadById({ threadId });
|
|
88
|
+
|
|
89
|
+
const workflows = await storage.getStore('workflows');
|
|
90
|
+
await workflows?.persistWorkflowSnapshot({ workflowName, runId, snapshot });
|
|
91
|
+
|
|
92
|
+
const observability = await storage.getStore('observability');
|
|
93
|
+
await observability?.createSpan(span);
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Available Domains
|
|
97
|
+
- **`memory`**: Thread and message operations (`getThreadById`, `saveThread`, `saveMessages`, etc.)
|
|
98
|
+
- **`workflows`**: Workflow state persistence (`persistWorkflowSnapshot`, `loadWorkflowSnapshot`, `getWorkflowRunById`, etc.)
|
|
99
|
+
- **`scores`**: Evaluation scores (`saveScore`, `listScoresByScorerId`, etc.)
|
|
100
|
+
- **`observability`**: Tracing and spans (`createSpan`, `updateSpan`, `getTrace`, etc.)
|
|
101
|
+
- **`agents`**: Stored agent configurations (`createAgent`, `getAgentById`, `listAgents`, etc.)
|
|
102
|
+
|
|
103
|
+
### Breaking Changes
|
|
104
|
+
- Passthrough methods have been removed from `MastraStorage` base class
|
|
105
|
+
- All storage adapters now require accessing domains via `getStore()`
|
|
106
|
+
- The `stores` property on storage instances is now the canonical way to access domain storage
|
|
107
|
+
|
|
108
|
+
### Internal Changes
|
|
109
|
+
- Each storage adapter now initializes domain-specific stores in its constructor
|
|
110
|
+
- Domain stores share database connections and handle their own table initialization
|
|
111
|
+
|
|
112
|
+
- Add `/api/system/packages` endpoint that returns installed Mastra packages and versions from the dev environment ([#11211](https://github.com/mastra-ai/mastra/pull/11211))
|
|
113
|
+
|
|
114
|
+
- 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))
|
|
115
|
+
|
|
116
|
+
- Fixed voice transcription endpoint ([#11348](https://github.com/mastra-ai/mastra/pull/11348))
|
|
117
|
+
|
|
118
|
+
The voice transcription endpoint (`/api/agents/:agentId/voice/listen`) now correctly handles multipart/form-data requests for audio uploads rather than only parsing JSON request bodies.
|
|
119
|
+
|
|
120
|
+
Both Express and Hono adapters now parse multipart/form-data bodies and handle JSON-encoded form fields.
|
|
121
|
+
|
|
122
|
+
**Breaking change:** The server schema field for the transcription endpoint was renamed from `audioData` to `audio` to match the client SDK. If you are making direct API calls to the transcription endpoint (not using the SDK), you will need to update your request body to use `audio` instead of `audioData`.
|
|
123
|
+
|
|
124
|
+
- Updated dependencies [[`33a4d2e`](https://github.com/mastra-ai/mastra/commit/33a4d2e4ed8af51f69256232f00c34d6b6b51d48), [`4aaa844`](https://github.com/mastra-ai/mastra/commit/4aaa844a4f19d054490f43638a990cc57bda8d2f), [`4a1a6cb`](https://github.com/mastra-ai/mastra/commit/4a1a6cb3facad54b2bb6780b00ce91d6de1edc08), [`31d13d5`](https://github.com/mastra-ai/mastra/commit/31d13d5fdc2e2380e2e3ee3ec9fb29d2a00f265d), [`4c62166`](https://github.com/mastra-ai/mastra/commit/4c621669f4a29b1f443eca3ba70b814afa286266), [`7bcbf10`](https://github.com/mastra-ai/mastra/commit/7bcbf10133516e03df964b941f9a34e9e4ab4177), [`4353600`](https://github.com/mastra-ai/mastra/commit/43536005a65988a8eede236f69122e7f5a284ba2), [`6986fb0`](https://github.com/mastra-ai/mastra/commit/6986fb064f5db6ecc24aa655e1d26529087b43b3), [`053e979`](https://github.com/mastra-ai/mastra/commit/053e9793b28e970086b0507f7f3b76ea32c1e838), [`e26dc9c`](https://github.com/mastra-ai/mastra/commit/e26dc9c3ccfec54ae3dc3e2b2589f741f9ae60a6), [`55edf73`](https://github.com/mastra-ai/mastra/commit/55edf7302149d6c964fbb7908b43babfc2b52145), [`27c0009`](https://github.com/mastra-ai/mastra/commit/27c0009777a6073d7631b0eb7b481d94e165b5ca), [`dee388d`](https://github.com/mastra-ai/mastra/commit/dee388dde02f2e63c53385ae69252a47ab6825cc), [`3f3fc30`](https://github.com/mastra-ai/mastra/commit/3f3fc3096f24c4a26cffeecfe73085928f72aa63), [`d90ea65`](https://github.com/mastra-ai/mastra/commit/d90ea6536f7aa51c6545a4e9215b55858e98e16d), [`d171e55`](https://github.com/mastra-ai/mastra/commit/d171e559ead9f52ec728d424844c8f7b164c4510), [`10c2735`](https://github.com/mastra-ai/mastra/commit/10c27355edfdad1ee2b826b897df74125eb81fb8), [`1924cf0`](https://github.com/mastra-ai/mastra/commit/1924cf06816e5e4d4d5333065ec0f4bb02a97799), [`b339816`](https://github.com/mastra-ai/mastra/commit/b339816df0984d0243d944ac2655d6ba5f809cde)]:
|
|
125
|
+
- @mastra/core@1.0.0-beta.15
|
|
126
|
+
|
|
127
|
+
## 1.0.0-beta.14
|
|
128
|
+
|
|
129
|
+
### Patch Changes
|
|
130
|
+
|
|
131
|
+
- Add execution metadata to A2A message/send responses. The A2A protocol now returns detailed execution information including tool calls, tool results, token usage, and finish reason in the task metadata. This allows clients to inspect which tools were invoked during agent execution and access execution statistics without additional queries. ([#11241](https://github.com/mastra-ai/mastra/pull/11241))
|
|
132
|
+
|
|
133
|
+
- feat: Add field filtering and nested workflow control to workflow execution result endpoint ([#11246](https://github.com/mastra-ai/mastra/pull/11246))
|
|
134
|
+
|
|
135
|
+
Adds two optional query parameters to `/api/workflows/:workflowId/runs/:runId/execution-result` endpoint:
|
|
136
|
+
- `fields`: Request only specific fields (e.g., `status`, `result`, `error`)
|
|
137
|
+
- `withNestedWorkflows`: Control whether to fetch nested workflow data
|
|
138
|
+
|
|
139
|
+
This significantly reduces response payload size and improves response times for large workflows.
|
|
140
|
+
|
|
141
|
+
## Server Endpoint Usage
|
|
142
|
+
|
|
143
|
+
```http
|
|
144
|
+
# Get only status (minimal payload - fastest)
|
|
145
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status
|
|
146
|
+
|
|
147
|
+
# Get status and result
|
|
148
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,result
|
|
149
|
+
|
|
150
|
+
# Get all fields but without nested workflow data (faster)
|
|
151
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result?withNestedWorkflows=false
|
|
152
|
+
|
|
153
|
+
# Get only specific fields without nested workflow data
|
|
154
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,steps&withNestedWorkflows=false
|
|
155
|
+
|
|
156
|
+
# Get full data (default behavior)
|
|
157
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Client SDK Usage
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
import { MastraClient } from '@mastra/client-js';
|
|
164
|
+
|
|
165
|
+
const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
|
|
166
|
+
const workflow = client.getWorkflow('myWorkflow');
|
|
167
|
+
|
|
168
|
+
// Get only status (minimal payload - fastest)
|
|
169
|
+
const statusOnly = await workflow.runExecutionResult(runId, {
|
|
170
|
+
fields: ['status'],
|
|
171
|
+
});
|
|
172
|
+
console.log(statusOnly.status); // 'success' | 'failed' | 'running' | etc.
|
|
173
|
+
|
|
174
|
+
// Get status and result
|
|
175
|
+
const statusAndResult = await workflow.runExecutionResult(runId, {
|
|
176
|
+
fields: ['status', 'result'],
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
// Get all fields but without nested workflow data (faster)
|
|
180
|
+
const resultWithoutNested = await workflow.runExecutionResult(runId, {
|
|
181
|
+
withNestedWorkflows: false,
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
// Get specific fields without nested workflow data
|
|
185
|
+
const optimized = await workflow.runExecutionResult(runId, {
|
|
186
|
+
fields: ['status', 'steps'],
|
|
187
|
+
withNestedWorkflows: false,
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
// Get full execution result (default behavior)
|
|
191
|
+
const fullResult = await workflow.runExecutionResult(runId);
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Core API Changes
|
|
195
|
+
|
|
196
|
+
The `Workflow.getWorkflowRunExecutionResult` method now accepts an options object:
|
|
197
|
+
|
|
198
|
+
```typescript
|
|
199
|
+
await workflow.getWorkflowRunExecutionResult(runId, {
|
|
200
|
+
withNestedWorkflows: false, // default: true, set to false to skip nested workflow data
|
|
201
|
+
fields: ['status', 'result'], // optional field filtering
|
|
202
|
+
});
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Inngest Compatibility
|
|
206
|
+
|
|
207
|
+
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.
|
|
208
|
+
|
|
209
|
+
## Performance Impact
|
|
210
|
+
|
|
211
|
+
For workflows with large step outputs:
|
|
212
|
+
- Requesting only `status`: ~99% reduction in payload size
|
|
213
|
+
- Requesting `status,result,error`: ~95% reduction in payload size
|
|
214
|
+
- Using `withNestedWorkflows=false`: Avoids expensive nested workflow data fetching
|
|
215
|
+
- Combining both: Maximum performance optimization
|
|
216
|
+
|
|
217
|
+
- Updated dependencies [[`4f94ed8`](https://github.com/mastra-ai/mastra/commit/4f94ed8177abfde3ec536e3574883e075423350c), [`ac3cc23`](https://github.com/mastra-ai/mastra/commit/ac3cc2397d1966bc0fc2736a223abc449d3c7719), [`a86f4df`](https://github.com/mastra-ai/mastra/commit/a86f4df0407311e0d2ea49b9a541f0938810d6a9), [`029540c`](https://github.com/mastra-ai/mastra/commit/029540ca1e582fc2dd8d288ecd4a9b0f31a954ef), [`66741d1`](https://github.com/mastra-ai/mastra/commit/66741d1a99c4f42cf23a16109939e8348ac6852e), [`01b20fe`](https://github.com/mastra-ai/mastra/commit/01b20fefb7c67c2b7d79417598ef4e60256d1225), [`0dbf199`](https://github.com/mastra-ai/mastra/commit/0dbf199110f22192ce5c95b1c8148d4872b4d119), [`a7ce182`](https://github.com/mastra-ai/mastra/commit/a7ce1822a8785ce45d62dd5c911af465e144f7d7)]:
|
|
218
|
+
- @mastra/core@1.0.0-beta.14
|
|
219
|
+
|
|
3
220
|
## 1.0.0-beta.13
|
|
4
221
|
|
|
5
222
|
### Patch Changes
|
|
@@ -282,221 +499,4 @@
|
|
|
282
499
|
|
|
283
500
|
- Network handler now accesses thread and resource parameters from the nested memory object instead of directly from request body. ([#10294](https://github.com/mastra-ai/mastra/pull/10294))
|
|
284
501
|
|
|
285
|
-
|
|
286
|
-
- @mastra/core@1.0.0-beta.4
|
|
287
|
-
|
|
288
|
-
## 1.0.0-beta.3
|
|
289
|
-
|
|
290
|
-
### Patch Changes
|
|
291
|
-
|
|
292
|
-
- Fix semantic search endpoint to return results in the correct format. Also fix the delete messages endpoint to properly normalize ids in the expected format. ([#10032](https://github.com/mastra-ai/mastra/pull/10032))
|
|
293
|
-
|
|
294
|
-
- Updated dependencies [[`2319326`](https://github.com/mastra-ai/mastra/commit/2319326f8c64e503a09bbcf14be2dd65405445e0), [`d629361`](https://github.com/mastra-ai/mastra/commit/d629361a60f6565b5bfb11976fdaf7308af858e2), [`08c31c1`](https://github.com/mastra-ai/mastra/commit/08c31c188ebccd598acaf55e888b6397d01f7eae), [`fd3d338`](https://github.com/mastra-ai/mastra/commit/fd3d338a2c362174ed5b383f1f011ad9fb0302aa), [`c30400a`](https://github.com/mastra-ai/mastra/commit/c30400a49b994b1b97256fe785eb6c906fc2b232), [`69e0a87`](https://github.com/mastra-ai/mastra/commit/69e0a878896a2da9494945d86e056a5f8f05b851), [`01f8878`](https://github.com/mastra-ai/mastra/commit/01f88783de25e4de048c1c8aace43e26373c6ea5), [`4c77209`](https://github.com/mastra-ai/mastra/commit/4c77209e6c11678808b365d545845918c40045c8), [`d827d08`](https://github.com/mastra-ai/mastra/commit/d827d0808ffe1f3553a84e975806cc989b9735dd), [`23c10a1`](https://github.com/mastra-ai/mastra/commit/23c10a1efdd9a693c405511ab2dc8a1236603162), [`676ccc7`](https://github.com/mastra-ai/mastra/commit/676ccc7fe92468d2d45d39c31a87825c89fd1ea0), [`c10398d`](https://github.com/mastra-ai/mastra/commit/c10398d5b88f1d4af556f4267ff06f1d11e89179), [`00c2387`](https://github.com/mastra-ai/mastra/commit/00c2387f5f04a365316f851e58666ac43f8c4edf), [`ad6250d`](https://github.com/mastra-ai/mastra/commit/ad6250dbdaad927e29f74a27b83f6c468b50a705), [`3a73998`](https://github.com/mastra-ai/mastra/commit/3a73998fa4ebeb7f3dc9301afe78095fc63e7999), [`e16d553`](https://github.com/mastra-ai/mastra/commit/e16d55338403c7553531cc568125c63d53653dff), [`4d59f58`](https://github.com/mastra-ai/mastra/commit/4d59f58de2d90d6e2810a19d4518e38ddddb9038), [`e1bb9c9`](https://github.com/mastra-ai/mastra/commit/e1bb9c94b4eb68b019ae275981be3feb769b5365), [`351a11f`](https://github.com/mastra-ai/mastra/commit/351a11fcaf2ed1008977fa9b9a489fc422e51cd4)]:
|
|
295
|
-
- @mastra/core@1.0.0-beta.3
|
|
296
|
-
|
|
297
|
-
## 1.0.0-beta.2
|
|
298
|
-
|
|
299
|
-
### Patch Changes
|
|
300
|
-
|
|
301
|
-
- Updated dependencies [[`465ac05`](https://github.com/mastra-ai/mastra/commit/465ac0526a91d175542091c675181f1a96c98c46)]:
|
|
302
|
-
- @mastra/core@1.0.0-beta.2
|
|
303
|
-
|
|
304
|
-
## 1.0.0-beta.1
|
|
305
|
-
|
|
306
|
-
### Patch Changes
|
|
307
|
-
|
|
308
|
-
- Updated dependencies [[`910db9e`](https://github.com/mastra-ai/mastra/commit/910db9e0312888495eb5617b567f247d03303814), [`e7266a2`](https://github.com/mastra-ai/mastra/commit/e7266a278db02035c97a5e9cd9d1669a6b7a535d)]:
|
|
309
|
-
- @mastra/core@1.0.0-beta.1
|
|
310
|
-
|
|
311
|
-
## 1.0.0-beta.0
|
|
312
|
-
|
|
313
|
-
### Major Changes
|
|
314
|
-
|
|
315
|
-
- Moving scorers under the eval domain, api method consistency, prebuilt evals, scorers require ids. ([#9589](https://github.com/mastra-ai/mastra/pull/9589))
|
|
316
|
-
|
|
317
|
-
- 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))
|
|
318
|
-
|
|
319
|
-
Primitives that are added to other primitives are also automatically added to the Mastra instance
|
|
320
|
-
|
|
321
|
-
- 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))
|
|
322
|
-
|
|
323
|
-
- **BREAKING:** Remove `getMessagesPaginated()` and add `perPage: false` support ([#9670](https://github.com/mastra-ai/mastra/pull/9670))
|
|
324
|
-
|
|
325
|
-
Removes deprecated `getMessagesPaginated()` method. The `listMessages()` API and score handlers now support `perPage: false` to fetch all records without pagination limits.
|
|
326
|
-
|
|
327
|
-
**Storage changes:**
|
|
328
|
-
- `StoragePagination.perPage` type changed from `number` to `number | false`
|
|
329
|
-
- All storage implementations support `perPage: false`:
|
|
330
|
-
- Memory: `listMessages()`
|
|
331
|
-
- Scores: `listScoresBySpan()`, `listScoresByRunId()`, `listScoresByExecutionId()`
|
|
332
|
-
- HTTP query parser accepts `"false"` string (e.g., `?perPage=false`)
|
|
333
|
-
|
|
334
|
-
**Memory changes:**
|
|
335
|
-
- `memory.query()` parameter type changed from `StorageGetMessagesArg` to `StorageListMessagesInput`
|
|
336
|
-
- Uses flat parameters (`page`, `perPage`, `include`, `filter`, `vectorSearchString`) instead of `selectBy` object
|
|
337
|
-
|
|
338
|
-
**Stricter validation:**
|
|
339
|
-
- `listMessages()` requires non-empty, non-whitespace `threadId` (throws error instead of returning empty results)
|
|
340
|
-
|
|
341
|
-
**Migration:**
|
|
342
|
-
|
|
343
|
-
```typescript
|
|
344
|
-
// Storage/Memory: Replace getMessagesPaginated with listMessages
|
|
345
|
-
- storage.getMessagesPaginated({ threadId, selectBy: { pagination: { page: 0, perPage: 20 } } })
|
|
346
|
-
+ storage.listMessages({ threadId, page: 0, perPage: 20 })
|
|
347
|
-
+ storage.listMessages({ threadId, page: 0, perPage: false }) // Fetch all
|
|
348
|
-
|
|
349
|
-
// Memory: Replace selectBy with flat parameters
|
|
350
|
-
- memory.query({ threadId, selectBy: { last: 20, include: [...] } })
|
|
351
|
-
+ memory.query({ threadId, perPage: 20, include: [...] })
|
|
352
|
-
|
|
353
|
-
// Client SDK
|
|
354
|
-
- thread.getMessagesPaginated({ selectBy: { pagination: { page: 0 } } })
|
|
355
|
-
+ thread.listMessages({ page: 0, perPage: 20 })
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
- # Major Changes ([#9695](https://github.com/mastra-ai/mastra/pull/9695))
|
|
359
|
-
|
|
360
|
-
## Storage Layer
|
|
361
|
-
|
|
362
|
-
### BREAKING: Removed `storage.getMessages()`
|
|
363
|
-
|
|
364
|
-
The `getMessages()` method has been removed from all storage implementations. Use `listMessages()` instead, which provides pagination support.
|
|
365
|
-
|
|
366
|
-
**Migration:**
|
|
367
|
-
|
|
368
|
-
```typescript
|
|
369
|
-
// Before
|
|
370
|
-
const messages = await storage.getMessages({ threadId: 'thread-1' });
|
|
371
|
-
|
|
372
|
-
// After
|
|
373
|
-
const result = await storage.listMessages({
|
|
374
|
-
threadId: 'thread-1',
|
|
375
|
-
page: 0,
|
|
376
|
-
perPage: 50,
|
|
377
|
-
});
|
|
378
|
-
const messages = result.messages; // Access messages array
|
|
379
|
-
console.log(result.total); // Total count
|
|
380
|
-
console.log(result.hasMore); // Whether more pages exist
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
### Message ordering default
|
|
384
|
-
|
|
385
|
-
`listMessages()` defaults to ASC (oldest first) ordering by `createdAt`, matching the previous `getMessages()` behavior.
|
|
386
|
-
|
|
387
|
-
**To use DESC ordering (newest first):**
|
|
388
|
-
|
|
389
|
-
```typescript
|
|
390
|
-
const result = await storage.listMessages({
|
|
391
|
-
threadId: 'thread-1',
|
|
392
|
-
orderBy: { field: 'createdAt', direction: 'DESC' },
|
|
393
|
-
});
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
## Client SDK
|
|
397
|
-
|
|
398
|
-
### BREAKING: Renamed `client.getThreadMessages()` → `client.listThreadMessages()`
|
|
399
|
-
|
|
400
|
-
**Migration:**
|
|
401
|
-
|
|
402
|
-
```typescript
|
|
403
|
-
// Before
|
|
404
|
-
const response = await client.getThreadMessages(threadId, { agentId });
|
|
405
|
-
|
|
406
|
-
// After
|
|
407
|
-
const response = await client.listThreadMessages(threadId, { agentId });
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
The response format remains the same.
|
|
411
|
-
|
|
412
|
-
## Type Changes
|
|
413
|
-
|
|
414
|
-
### BREAKING: Removed `StorageGetMessagesArg` type
|
|
415
|
-
|
|
416
|
-
Use `StorageListMessagesInput` instead:
|
|
417
|
-
|
|
418
|
-
```typescript
|
|
419
|
-
// Before
|
|
420
|
-
import type { StorageGetMessagesArg } from '@mastra/core';
|
|
421
|
-
|
|
422
|
-
// After
|
|
423
|
-
import type { StorageListMessagesInput } from '@mastra/core';
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
- Bump minimum required Node.js version to 22.13.0 ([#9706](https://github.com/mastra-ai/mastra/pull/9706))
|
|
427
|
-
|
|
428
|
-
- 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))
|
|
429
|
-
|
|
430
|
-
- 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))
|
|
431
|
-
|
|
432
|
-
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.
|
|
433
|
-
|
|
434
|
-
Before:
|
|
435
|
-
|
|
436
|
-
```typescript
|
|
437
|
-
// Two methods that did the same thing
|
|
438
|
-
memory.rememberMessages({ threadId, resourceId, config, vectorMessageSearch });
|
|
439
|
-
memory.query({ threadId, resourceId, perPage, vectorSearchString });
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
After:
|
|
443
|
-
|
|
444
|
-
```typescript
|
|
445
|
-
// Single unified method with clear purpose
|
|
446
|
-
memory.recall({ threadId, resourceId, perPage, vectorMessageSearch, threadConfig });
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
All usages have been updated across the codebase including tests. The agent now calls recall directly with the appropriate parameters.
|
|
450
|
-
|
|
451
|
-
- Rename RuntimeContext to RequestContext ([#9511](https://github.com/mastra-ai/mastra/pull/9511))
|
|
452
|
-
|
|
453
|
-
- 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))
|
|
454
|
-
|
|
455
|
-
- 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))
|
|
456
|
-
|
|
457
|
-
- Renamed a bunch of observability/tracing-related things to drop the AI prefix. ([#9744](https://github.com/mastra-ai/mastra/pull/9744))
|
|
458
|
-
|
|
459
|
-
- **Breaking Change**: Remove legacy v1 watch events and consolidate on v2 implementation. ([#9252](https://github.com/mastra-ai/mastra/pull/9252))
|
|
460
|
-
|
|
461
|
-
This change simplifies the workflow watching API by removing the legacy v1 event system and promoting v2 as the standard (renamed to just `watch`).
|
|
462
|
-
|
|
463
|
-
### What's Changed
|
|
464
|
-
- Removed legacy v1 watch event handlers and types
|
|
465
|
-
- Renamed `watch-v2` to `watch` throughout the codebase
|
|
466
|
-
- Removed `.watch()` method from client-js SDK (`Workflow` and `AgentBuilder` classes)
|
|
467
|
-
- Removed `/watch` HTTP endpoints from server and deployer
|
|
468
|
-
- Removed `WorkflowWatchResult` and v1 `WatchEvent` types
|
|
469
|
-
|
|
470
|
-
- **BREAKING CHANGE**: Pagination APIs now use `page`/`perPage` instead of `offset`/`limit` ([#9592](https://github.com/mastra-ai/mastra/pull/9592))
|
|
471
|
-
|
|
472
|
-
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.
|
|
473
|
-
|
|
474
|
-
**Affected APIs:**
|
|
475
|
-
- `Memory.listThreadsByResourceId()`
|
|
476
|
-
- `Memory.listMessages()`
|
|
477
|
-
- `Storage.listWorkflowRuns()`
|
|
478
|
-
|
|
479
|
-
**Migration:**
|
|
480
|
-
|
|
481
|
-
```typescript
|
|
482
|
-
// Before
|
|
483
|
-
await memory.listThreadsByResourceId({
|
|
484
|
-
resourceId: 'user-123',
|
|
485
|
-
offset: 20,
|
|
486
|
-
limit: 10,
|
|
487
|
-
});
|
|
488
|
-
|
|
489
|
-
// After
|
|
490
|
-
await memory.listThreadsByResourceId({
|
|
491
|
-
resourceId: 'user-123',
|
|
492
|
-
page: 2, // page = Math.floor(offset / limit)
|
|
493
|
-
perPage: 10,
|
|
494
|
-
});
|
|
495
|
-
|
|
496
|
-
// Before
|
|
497
|
-
await memory.listMessages({
|
|
498
|
-
threadId: 'thread-456',
|
|
499
|
-
offset: 20,
|
|
500
|
-
limit: 10,
|
|
501
|
-
|
|
502
|
-
... 4317 more lines hidden. See full changelog in package directory.
|
|
502
|
+
... 4534 more lines hidden. See full changelog in package directory.
|