@mastra/mcp-docs-server 1.3.15-alpha.1 → 1.3.15-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/docs/agents/guardrails.md +1 -1
- package/.docs/docs/agents/human-in-the-loop.md +2 -2
- package/.docs/docs/agents/networks.md +1 -1
- package/.docs/docs/agents/overview.md +2 -2
- package/.docs/docs/agents/processors.md +2 -2
- package/.docs/docs/agents/tools.md +3 -3
- package/.docs/docs/auth/composite-auth.md +1 -1
- package/.docs/docs/auth/custom-auth-provider.md +5 -5
- package/.docs/docs/auth/fga.md +1 -1
- package/.docs/docs/auth/jwt.md +2 -2
- package/.docs/docs/auth/simple-auth.md +1 -1
- package/.docs/docs/browser.md +1 -1
- package/.docs/docs/channels.md +2 -2
- package/.docs/docs/connections/sdk-agents.md +1 -1
- package/.docs/docs/deployment/overview.md +2 -2
- package/.docs/docs/deployment/web-framework.md +3 -3
- package/.docs/docs/develop.md +1 -1
- package/.docs/docs/evals/built-in-scorers.md +1 -1
- package/.docs/docs/evals/custom-scorers.md +8 -8
- package/.docs/docs/evals/overview.md +1 -1
- package/.docs/docs/evals/quick-checks.md +1 -1
- package/.docs/docs/guides/authentication-identity.md +1 -1
- package/.docs/docs/guides/context-engineering.md +1 -1
- package/.docs/docs/guides/multi-agent-systems.md +2 -2
- package/.docs/docs/harness/agent-controller.md +5 -3
- package/.docs/docs/harness/background-tasks.md +7 -1
- package/.docs/docs/harness/durable-agents.md +1 -1
- package/.docs/docs/index.md +2 -2
- package/.docs/docs/license.md +1 -1
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/trace-intelligence.md +3 -3
- package/.docs/docs/mastra-platform/workspaces.md +1 -1
- package/.docs/docs/memory/memory-processors.md +2 -2
- package/.docs/docs/memory/message-history.md +1 -1
- package/.docs/docs/memory/multi-user-threads.md +1 -1
- package/.docs/docs/memory/observational-memory.md +3 -3
- package/.docs/docs/memory/semantic-recall.md +4 -4
- package/.docs/docs/memory/working-memory.md +16 -16
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +12 -12
- package/.docs/docs/observability/tracing/overview.md +4 -2
- package/.docs/docs/sandbox/filesystem.md +1 -1
- package/.docs/docs/server/custom-api-routes.md +1 -1
- package/.docs/docs/server/middleware.md +1 -1
- package/.docs/docs/server/request-context.md +1 -1
- package/.docs/docs/signals/overview.md +1 -1
- package/.docs/docs/signals/sending-signals.md +1 -1
- package/.docs/docs/studio/deployment.md +2 -2
- package/.docs/docs/studio/editor.md +2 -2
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/workflows/control-flow.md +4 -4
- package/.docs/docs/workflows/overview.md +3 -3
- package/.docs/docs/workflows/snapshots.md +2 -2
- package/.docs/integrations/agentic-ui/ai-sdk-ui.md +3 -3
- package/.docs/integrations/agentic-ui/assistant-ui.md +5 -5
- package/.docs/integrations/agentic-ui/copilotkit.md +4 -4
- package/.docs/integrations/agentic-ui/openui.md +2 -2
- package/.docs/integrations/auth/auth0.md +3 -3
- package/.docs/integrations/auth/better-auth.md +1 -1
- package/.docs/integrations/auth/clerk.md +1 -1
- package/.docs/integrations/auth/firebase.md +3 -3
- package/.docs/integrations/auth/google.md +2 -2
- package/.docs/integrations/auth/okta.md +3 -3
- package/.docs/integrations/auth/supabase.md +1 -1
- package/.docs/integrations/auth/workos.md +1 -1
- package/.docs/integrations/browsers/stagehand.md +1 -1
- package/.docs/integrations/channels/imessage.md +1 -1
- package/.docs/integrations/channels/ring.md +6 -6
- package/.docs/integrations/channels/slack.md +1 -1
- package/.docs/integrations/channels/whatsapp.md +1 -1
- package/.docs/integrations/databases/aurora-dsql.md +13 -13
- package/.docs/integrations/databases/clickhouse.md +2 -2
- package/.docs/integrations/databases/cloudflare-d1.md +4 -4
- package/.docs/integrations/databases/cloudflare-kv.md +10 -10
- package/.docs/integrations/databases/convex.md +6 -6
- package/.docs/integrations/databases/dynamodb.md +8 -8
- package/.docs/integrations/databases/elasticsearch.md +6 -6
- package/.docs/integrations/databases/lancedb.md +4 -4
- package/.docs/integrations/databases/mongodb.md +2 -2
- package/.docs/integrations/databases/mssql.md +2 -2
- package/.docs/integrations/databases/oracledb.md +2 -2
- package/.docs/integrations/databases/postgresql.md +14 -14
- package/.docs/integrations/databases/redis.md +7 -7
- package/.docs/integrations/databases/spanner.md +2 -2
- package/.docs/integrations/databases/upstash.md +5 -5
- package/.docs/integrations/databases/valkey.md +1 -1
- package/.docs/integrations/deploy/amazon-ec2.md +1 -1
- package/.docs/integrations/deploy/aws-bedrock-agentcore.md +1 -1
- package/.docs/integrations/deploy/aws-lambda.md +12 -12
- package/.docs/integrations/deploy/azure-app-services.md +2 -2
- package/.docs/integrations/deploy/cloudflare.md +2 -2
- package/.docs/integrations/deploy/digital-ocean.md +2 -2
- package/.docs/integrations/deploy/inngest.md +5 -5
- package/.docs/integrations/deploy/kubernetes-helm.md +20 -20
- package/.docs/integrations/deploy/neon.md +1 -1
- package/.docs/integrations/deploy/netlify.md +1 -1
- package/.docs/integrations/deploy/render.md +1 -1
- package/.docs/integrations/deploy/temporal.md +1 -1
- package/.docs/integrations/deploy/vercel.md +4 -4
- package/.docs/integrations/file-storage/google-cloud-storage.md +1 -1
- package/.docs/integrations/frameworks/angular.md +1 -1
- package/.docs/integrations/frameworks/astro.md +3 -3
- package/.docs/integrations/frameworks/electron.md +1 -1
- package/.docs/integrations/frameworks/express.md +1 -1
- package/.docs/integrations/frameworks/hono.md +1 -1
- package/.docs/integrations/frameworks/nestjs.md +2 -2
- package/.docs/integrations/frameworks/next-js.md +3 -3
- package/.docs/integrations/frameworks/nuxt.md +1 -1
- package/.docs/integrations/frameworks/sveltekit.md +1 -1
- package/.docs/integrations/frameworks/tanstack-start.md +3 -3
- package/.docs/integrations/frameworks/vite-react.md +3 -3
- package/.docs/integrations/observability/arize.md +9 -9
- package/.docs/integrations/observability/arthur.md +3 -3
- package/.docs/integrations/observability/braintrust.md +3 -3
- package/.docs/integrations/observability/confident-ai.md +5 -5
- package/.docs/integrations/observability/datadog.md +9 -9
- package/.docs/integrations/observability/laminar.md +2 -2
- package/.docs/integrations/observability/langfuse.md +13 -13
- package/.docs/integrations/observability/langsmith.md +9 -9
- package/.docs/integrations/observability/opentelemetry.md +23 -23
- package/.docs/integrations/observability/sentry.md +4 -4
- package/.docs/integrations/sandboxes/agentcore.md +1 -1
- package/.docs/integrations/sandboxes/apple-container.md +2 -2
- package/.docs/integrations/sandboxes/cloudflare-sandbox.md +6 -6
- package/.docs/integrations/sandboxes/daytona.md +5 -5
- package/.docs/integrations/sandboxes/docker.md +6 -6
- package/.docs/integrations/sandboxes/e2b-desktop.md +1 -1
- package/.docs/integrations/sandboxes/e2b.md +14 -14
- package/.docs/integrations/sandboxes/modal.md +1 -1
- package/.docs/integrations/sandboxes/railway.md +1 -1
- package/.docs/integrations/sandboxes/sprites.md +2 -2
- package/.docs/integrations/sandboxes/vercel.md +4 -4
- package/.docs/integrations/vectors/couchbase.md +1 -1
- package/.docs/integrations/vectors/duckdb.md +5 -5
- package/.docs/integrations/vectors/lance.md +3 -3
- package/.docs/integrations/vectors/mongodb.md +5 -5
- package/.docs/integrations/vectors/pg.md +11 -11
- package/.docs/integrations/vectors/qdrant.md +2 -2
- package/.docs/integrations/vectors/upstash.md +4 -4
- package/.docs/integrations/voice/azure.md +1 -1
- package/.docs/integrations/voice/cloudflare.md +1 -1
- package/.docs/integrations/voice/google.md +12 -12
- package/.docs/integrations/voice/inworld.md +2 -2
- package/.docs/integrations/voice/livekit.md +25 -25
- package/.docs/integrations/voice/openai.md +4 -4
- package/.docs/integrations/voice/sarvam.md +1 -1
- package/.docs/integrations/voice/speechify.md +1 -1
- package/.docs/integrations/voice/xai.md +1 -1
- package/.docs/models/environment-variables.md +92 -3
- package/.docs/models/gateways/merge-gateway.md +4 -1
- package/.docs/models/gateways/neon.md +1 -2
- package/.docs/models/gateways/netlify.md +7 -6
- package/.docs/models/gateways/openrouter.md +16 -11
- package/.docs/models/gateways/requesty.md +7 -17
- package/.docs/models/gateways/vercel.md +12 -16
- package/.docs/models/index.md +93 -30
- package/.docs/models/providers/302ai.md +2 -1
- package/.docs/models/providers/abacus.md +1 -1
- package/.docs/models/providers/abliteratedllm.md +95 -0
- package/.docs/models/providers/abliteration-ai.md +7 -6
- package/.docs/models/providers/adaption.md +87 -0
- package/.docs/models/providers/adzuki.md +92 -0
- package/.docs/models/providers/aigrow.md +89 -0
- package/.docs/models/providers/aimlapi.md +1 -7
- package/.docs/models/providers/aipg.md +82 -0
- package/.docs/models/providers/aistupidlevel.md +90 -0
- package/.docs/models/providers/aki-io.md +15 -13
- package/.docs/models/providers/ambient.md +13 -12
- package/.docs/models/providers/anonrouter.md +83 -0
- package/.docs/models/providers/anthropic.md +18 -20
- package/.docs/models/providers/apiko.md +83 -0
- package/.docs/models/providers/augure.md +86 -0
- package/.docs/models/providers/autarcho.md +81 -0
- package/.docs/models/providers/bailing.md +15 -12
- package/.docs/models/providers/bumo.md +100 -0
- package/.docs/models/providers/byteplus.md +94 -0
- package/.docs/models/providers/cedarllm.md +81 -0
- package/.docs/models/providers/cheapaimodel.md +85 -0
- package/.docs/models/providers/cheapest-token.md +99 -0
- package/.docs/models/providers/cheapllm.md +81 -0
- package/.docs/models/providers/chutes.md +8 -8
- package/.docs/models/providers/cline-pass.md +4 -3
- package/.docs/models/providers/cloudcode.md +86 -0
- package/.docs/models/providers/cloudflare-workers-ai.md +2 -1
- package/.docs/models/providers/commandcode.md +22 -1
- package/.docs/models/providers/confidential-ai.md +81 -0
- package/.docs/models/providers/cortecs.md +14 -14
- package/.docs/models/providers/crossmodel.md +7 -2
- package/.docs/models/providers/deepinfra.md +3 -1
- package/.docs/models/providers/digitalocean.md +5 -4
- package/.docs/models/providers/dothoosh.md +96 -0
- package/.docs/models/providers/doubleword.md +98 -0
- package/.docs/models/providers/edenai.md +52 -44
- package/.docs/models/providers/empiriolabs.md +2 -1
- package/.docs/models/providers/engy.md +2 -1
- package/.docs/models/providers/entrim.md +84 -0
- package/.docs/models/providers/ezkielyna.md +85 -0
- package/.docs/models/providers/fastrouter.md +21 -5
- package/.docs/models/providers/fiftyx.md +81 -0
- package/.docs/models/providers/fireworks-ai.md +1 -1
- package/.docs/models/providers/fortytwo.md +81 -0
- package/.docs/models/providers/frequency.md +81 -0
- package/.docs/models/providers/frogbot.md +30 -5
- package/.docs/models/providers/gisoo.md +96 -0
- package/.docs/models/providers/google.md +5 -4
- package/.docs/models/providers/graphn.md +87 -0
- package/.docs/models/providers/hetzner.md +1 -1
- package/.docs/models/providers/hostinger-router.md +88 -0
- package/.docs/models/providers/huawei-maas.md +88 -0
- package/.docs/models/providers/hubris.md +96 -0
- package/.docs/models/providers/huggingface.md +5 -1
- package/.docs/models/providers/humain.md +82 -0
- package/.docs/models/providers/hyper.md +24 -22
- package/.docs/models/providers/inceptron.md +4 -4
- package/.docs/models/providers/infer.md +17 -9
- package/.docs/models/providers/inferall.md +86 -0
- package/.docs/models/providers/inference-coop.md +88 -0
- package/.docs/models/providers/inferenceapis.md +91 -0
- package/.docs/models/providers/inferris.md +84 -0
- package/.docs/models/providers/infersia.md +86 -0
- package/.docs/models/providers/isoquant.md +82 -0
- package/.docs/models/providers/iteracompute.md +33 -16
- package/.docs/models/providers/jad-ai.md +83 -0
- package/.docs/models/providers/joingonka.md +83 -0
- package/.docs/models/providers/jzstoken.md +102 -0
- package/.docs/models/providers/keln.md +94 -0
- package/.docs/models/providers/kenari.md +47 -12
- package/.docs/models/providers/kilo.md +191 -100
- package/.docs/models/providers/kitani.md +89 -0
- package/.docs/models/providers/klavo.md +90 -0
- package/.docs/models/providers/korouter.md +99 -0
- package/.docs/models/providers/kunavo.md +96 -0
- package/.docs/models/providers/liquid.md +15 -8
- package/.docs/models/providers/lithosai.md +83 -0
- package/.docs/models/providers/llmgateway-providers.md +96 -43
- package/.docs/models/providers/llmgateway.md +33 -21
- package/.docs/models/providers/logits.md +82 -0
- package/.docs/models/providers/lowrouter.md +17 -4
- package/.docs/models/providers/lyceum.md +88 -0
- package/.docs/models/providers/mallard.md +81 -0
- package/.docs/models/providers/meragpt.md +81 -0
- package/.docs/models/providers/mistral.md +1 -1
- package/.docs/models/providers/moneo.md +92 -0
- package/.docs/models/providers/nan.md +11 -8
- package/.docs/models/providers/nano-gpt.md +77 -73
- package/.docs/models/providers/nearai.md +1 -1
- package/.docs/models/providers/nebius.md +3 -6
- package/.docs/models/providers/neuralwatt.md +28 -25
- package/.docs/models/providers/nodecode.md +81 -0
- package/.docs/models/providers/nokeep.md +83 -0
- package/.docs/models/providers/novita-ai.md +4 -1
- package/.docs/models/providers/oathbreaker.md +82 -0
- package/.docs/models/providers/obscurify.md +95 -0
- package/.docs/models/providers/ofox.md +7 -3
- package/.docs/models/providers/ollama-cloud.md +2 -1
- package/.docs/models/providers/openai.md +4 -2
- package/.docs/models/providers/opencode-go.md +3 -1
- package/.docs/models/providers/opencode.md +5 -3
- package/.docs/models/providers/opper.md +2 -1
- package/.docs/models/providers/outerlabs.md +98 -0
- package/.docs/models/providers/paraloncloud.md +81 -0
- package/.docs/models/providers/pareto.md +9 -7
- package/.docs/models/providers/phala.md +99 -0
- package/.docs/models/providers/phase.md +82 -0
- package/.docs/models/providers/powerspring.md +87 -0
- package/.docs/models/providers/prime.md +5 -5
- package/.docs/models/providers/proxystacks.md +84 -0
- package/.docs/models/providers/rayline.md +82 -0
- package/.docs/models/providers/refuseless.md +86 -0
- package/.docs/models/providers/ruapi.md +89 -0
- package/.docs/models/providers/runcrate.md +91 -0
- package/.docs/models/providers/runinfra.md +2 -1
- package/.docs/models/providers/sagg.md +81 -0
- package/.docs/models/providers/sambanova.md +10 -12
- package/.docs/models/providers/sandbase.md +90 -0
- package/.docs/models/providers/scx-ai.md +20 -10
- package/.docs/models/providers/sensenova.md +4 -4
- package/.docs/models/providers/siliconflow-cn.md +2 -1
- package/.docs/models/providers/sokkan.md +85 -0
- package/.docs/models/providers/sparrowcodes.md +99 -0
- package/.docs/models/providers/steadyrouter.md +101 -0
- package/.docs/models/providers/stepping-stone.md +95 -0
- package/.docs/models/providers/superbot-gg.md +82 -0
- package/.docs/models/providers/synthetic.md +14 -14
- package/.docs/models/providers/synthorai.md +92 -0
- package/.docs/models/providers/teamorouter.md +90 -0
- package/.docs/models/providers/teapot-router.md +87 -0
- package/.docs/models/providers/tencent-token-plan.md +23 -11
- package/.docs/models/providers/tenstorrent.md +84 -0
- package/.docs/models/providers/therouter.md +81 -0
- package/.docs/models/providers/tinfoil.md +1 -1
- package/.docs/models/providers/toapis.md +83 -0
- package/.docs/models/providers/tokenify.md +85 -0
- package/.docs/models/providers/tokenlab.md +81 -0
- package/.docs/models/providers/tokenwatt.md +81 -0
- package/.docs/models/providers/trustedtokens.md +90 -0
- package/.docs/models/providers/umans-ai-coding-plan.md +2 -5
- package/.docs/models/providers/umans-ai.md +5 -7
- package/.docs/models/providers/unbiased.md +81 -0
- package/.docs/models/providers/uncensuredai.md +83 -0
- package/.docs/models/providers/unrestricted.md +84 -0
- package/.docs/models/providers/uplinkswitch.md +92 -0
- package/.docs/models/providers/verda.md +81 -0
- package/.docs/models/providers/volcengine-coding-plan.md +16 -9
- package/.docs/models/providers/volcengine.md +2 -2
- package/.docs/models/providers/wafer.ai.md +20 -10
- package/.docs/models/providers/wallaby.md +7 -5
- package/.docs/models/providers/wally.md +9 -8
- package/.docs/models/providers/watt.md +98 -0
- package/.docs/models/providers/xxapi.md +96 -0
- package/.docs/models/providers/zenifra.md +22 -10
- package/.docs/models/providers/zerogpu.md +89 -0
- package/.docs/models/providers/zro.md +85 -0
- package/.docs/models/providers.md +92 -3
- package/.docs/reference/agents/agent.md +1 -1
- package/.docs/reference/agents/durable-agent.md +2 -2
- package/.docs/reference/agents/generateLegacy.md +4 -4
- package/.docs/reference/agents/network.md +2 -2
- package/.docs/reference/ai-sdk/overview.md +2 -2
- package/.docs/reference/build-with-ai.md +3 -3
- package/.docs/reference/channels/slack-provider.md +1 -1
- package/.docs/reference/classifier/classifier.md +1 -1
- package/.docs/reference/cli/mastra.md +2 -2
- package/.docs/reference/client-js/agent-controller.md +1 -1
- package/.docs/reference/client-js/memory.md +10 -10
- package/.docs/reference/client-js/observability.md +1 -1
- package/.docs/reference/client-js/responses.md +1 -1
- package/.docs/reference/client-js/tools.md +2 -2
- package/.docs/reference/client-js/vectors.md +6 -6
- package/.docs/reference/configuration.md +1 -1
- package/.docs/reference/connect/tools.md +1 -1
- package/.docs/reference/deployer.md +4 -4
- package/.docs/reference/evals/answer-relevancy.md +2 -2
- package/.docs/reference/evals/bias.md +2 -2
- package/.docs/reference/evals/checks.md +1 -1
- package/.docs/reference/evals/completeness.md +4 -4
- package/.docs/reference/evals/content-similarity.md +4 -4
- package/.docs/reference/evals/context-precision.md +6 -6
- package/.docs/reference/evals/context-recall.md +1 -1
- package/.docs/reference/evals/context-relevance.md +9 -9
- package/.docs/reference/evals/create-scorer.md +3 -3
- package/.docs/reference/evals/faithfulness.md +1 -1
- package/.docs/reference/evals/hallucination.md +6 -6
- package/.docs/reference/evals/keyword-coverage.md +2 -2
- package/.docs/reference/evals/multi-turn-judge.md +1 -1
- package/.docs/reference/evals/noise-sensitivity.md +16 -16
- package/.docs/reference/evals/prompt-alignment.md +25 -25
- package/.docs/reference/evals/run-evals.md +2 -2
- package/.docs/reference/evals/summarization.md +1 -1
- package/.docs/reference/evals/textual-difference.md +2 -2
- package/.docs/reference/evals/tone-consistency.md +2 -2
- package/.docs/reference/evals/tool-call-accuracy.md +10 -10
- package/.docs/reference/evals/toxicity.md +2 -2
- package/.docs/reference/evals/trajectory-accuracy.md +2 -2
- package/.docs/reference/manual-install.md +2 -2
- package/.docs/reference/memory/listThreads.md +1 -1
- package/.docs/reference/migrations/agentnetwork.md +1 -1
- package/.docs/reference/migrations/mastra-cloud.md +4 -4
- package/.docs/reference/migrations/mcp-v2.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/deployment.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/overview.md +8 -8
- package/.docs/reference/migrations/upgrade-to-v1/tracing.md +3 -3
- package/.docs/reference/observability/tracing/bridges/datadog.md +4 -4
- package/.docs/reference/observability/tracing/bridges/otel.md +4 -4
- package/.docs/reference/observability/tracing/exporters/arize.md +4 -4
- package/.docs/reference/observability/tracing/exporters/arthur.md +3 -3
- package/.docs/reference/observability/tracing/exporters/braintrust.md +2 -2
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +2 -2
- package/.docs/reference/observability/tracing/exporters/confident-ai.md +2 -2
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/datadog.md +3 -3
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +5 -5
- package/.docs/reference/observability/tracing/exporters/laminar.md +2 -2
- package/.docs/reference/observability/tracing/exporters/langfuse.md +3 -3
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +5 -5
- package/.docs/reference/observability/tracing/exporters/otel.md +4 -4
- package/.docs/reference/observability/tracing/exporters/posthog.md +2 -2
- package/.docs/reference/observability/tracing/exporters/sentry.md +4 -4
- package/.docs/reference/observability/tracing/instances.md +1 -1
- package/.docs/reference/processors/model-selection-processor.md +2 -2
- package/.docs/reference/processors/processor-interface.md +3 -3
- package/.docs/reference/processors/stream-error-retry-processor.md +1 -1
- package/.docs/reference/processors/system-prompt-scrubber.md +1 -1
- package/.docs/reference/processors/token-limiter-processor.md +1 -1
- package/.docs/reference/processors/unicode-normalizer.md +1 -1
- package/.docs/reference/project-structure.md +2 -2
- package/.docs/reference/pubsub/google-cloud-pubsub.md +1 -1
- package/.docs/reference/pubsub/lease-provider.md +1 -1
- package/.docs/reference/pubsub/redis-streams.md +1 -1
- package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
- package/.docs/reference/rag/chunk.md +1 -1
- package/.docs/reference/rag/chunking-and-embedding.md +4 -4
- package/.docs/reference/rag/database-config.md +4 -4
- package/.docs/reference/rag/graph-rag-guide.md +3 -3
- package/.docs/reference/rag/metadata-filters.md +4 -4
- package/.docs/reference/rag/overview.md +4 -0
- package/.docs/reference/rag/rerank.md +1 -1
- package/.docs/reference/rag/rerankWithScorer.md +1 -1
- package/.docs/reference/rag/retrieval.md +8 -6
- package/.docs/reference/rag/vector-databases.md +7 -7
- package/.docs/reference/server/nestjs-adapter.md +1 -1
- package/.docs/reference/server/register-api-route.md +5 -5
- package/.docs/reference/storage/composite.md +1 -1
- package/.docs/reference/storage/overview.md +1 -1
- package/.docs/reference/storage/retention.md +2 -2
- package/.docs/reference/storage/turso.md +1 -1
- package/.docs/reference/streaming/agents/MastraModelOutput.md +5 -5
- package/.docs/reference/streaming/agents/stream.md +5 -5
- package/.docs/reference/streaming/agents/streamLegacy.md +4 -4
- package/.docs/reference/templates/overview.md +1 -1
- package/.docs/reference/tools/bedrock-kb-tool.md +8 -8
- package/.docs/reference/tools/mcp-client.md +9 -9
- package/.docs/reference/tools/mcp-server.md +17 -17
- package/.docs/reference/tools/vector-query-tool.md +6 -6
- package/.docs/reference/voice/composite-voice.md +3 -3
- package/.docs/reference/voice/overview.md +5 -5
- package/.docs/reference/voice/speech-to-speech.md +2 -2
- package/.docs/reference/voice/voice.close.md +1 -1
- package/.docs/reference/voice/voice.connect.md +1 -1
- package/.docs/reference/voice/voice.listen.md +1 -1
- package/.docs/reference/voice/voice.speak.md +1 -1
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@ The observability system has been restructured in v1 with a dedicated `@mastra/o
|
|
|
16
16
|
|
|
17
17
|
### From OTEL-based Telemetry (0.x)
|
|
18
18
|
|
|
19
|
-
If you're using the old `telemetry:` configuration in Mastra, the system has been
|
|
19
|
+
If you're using the old `telemetry:` configuration in Mastra, the system has been redesigned.
|
|
20
20
|
|
|
21
21
|
**Before (0.x with OTEL telemetry):**
|
|
22
22
|
|
|
@@ -131,7 +131,7 @@ Key changes:
|
|
|
131
131
|
3. Use explicit `configs:` with `MastraStorageExporter`, `MastraPlatformExporter`, and `SensitiveDataFilter`
|
|
132
132
|
4. Export types change from string literals (`'otlp'`) to exporter class instances (`new OtelExporter()`)
|
|
133
133
|
|
|
134
|
-
### From AI
|
|
134
|
+
### From AI tracing
|
|
135
135
|
|
|
136
136
|
If you already upgraded to AI tracing (the intermediate system), you need to install the new package and use the explicit configuration.
|
|
137
137
|
|
|
@@ -318,7 +318,7 @@ node --import=./.mastra/output/instrumentation.mjs --env-file=".env" .mastra/out
|
|
|
318
318
|
|
|
319
319
|
#### After (v1)
|
|
320
320
|
|
|
321
|
-
|
|
321
|
+
Remove the `instrumentation.mjs` file and configure observability in your Mastra instance:
|
|
322
322
|
|
|
323
323
|
```typescript
|
|
324
324
|
// src/mastra/index.ts
|
|
@@ -83,11 +83,11 @@ The flush is best-effort: dd-trace sends LLM Observability data from a backgroun
|
|
|
83
83
|
async shutdown(): Promise<void>
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
Force-finishes any APM spans that weren't
|
|
86
|
+
Force-finishes any APM spans that weren't closed cleanly and flushes pending LLM Observability data. It then disables the integration and clears all internal state.
|
|
87
87
|
|
|
88
88
|
## Usage examples
|
|
89
89
|
|
|
90
|
-
### Basic
|
|
90
|
+
### Basic usage
|
|
91
91
|
|
|
92
92
|
```typescript
|
|
93
93
|
import tracer from 'dd-trace'
|
|
@@ -116,7 +116,7 @@ const mastra = new Mastra({
|
|
|
116
116
|
})
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
### Agentless
|
|
119
|
+
### Agentless mode (LLM observability only, no local agent)
|
|
120
120
|
|
|
121
121
|
If you don't have a local Datadog Agent and only want LLM Observability data, enable agentless mode:
|
|
122
122
|
|
|
@@ -130,7 +130,7 @@ new DatadogBridge({
|
|
|
130
130
|
|
|
131
131
|
Note: APM data can't be sent in agentless mode. If you only need LLM Observability data without `dd-trace` APM, the [Datadog Exporter](https://mastra.ai/reference/observability/tracing/exporters/datadog) is a simpler choice.
|
|
132
132
|
|
|
133
|
-
### With
|
|
133
|
+
### With additional exporters
|
|
134
134
|
|
|
135
135
|
The bridge can be combined with non-Datadog exporters to send traces to additional destinations:
|
|
136
136
|
|
|
@@ -64,11 +64,11 @@ Force flushes the tracer provider and logger provider if they support `forceFlus
|
|
|
64
64
|
async shutdown(): Promise<void>
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
Shuts down the bridge and cleans up resources. Ends any spans that weren't
|
|
67
|
+
Shuts down the bridge and cleans up resources. Ends any spans that weren't closed cleanly, then flushes the providers so those spans are exported.
|
|
68
68
|
|
|
69
69
|
## Usage examples
|
|
70
70
|
|
|
71
|
-
### Basic
|
|
71
|
+
### Basic usage
|
|
72
72
|
|
|
73
73
|
```typescript
|
|
74
74
|
import { Mastra } from '@mastra/core'
|
|
@@ -88,7 +88,7 @@ const mastra = new Mastra({
|
|
|
88
88
|
})
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
### Combined with
|
|
91
|
+
### Combined with exporters
|
|
92
92
|
|
|
93
93
|
The bridge can be used alongside exporters. The bridge handles OTEL context, while exporters send data to additional destinations:
|
|
94
94
|
|
|
@@ -147,7 +147,7 @@ const result = await agent.generate('Hello', {
|
|
|
147
147
|
})
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
### How
|
|
150
|
+
### How tags are stored
|
|
151
151
|
|
|
152
152
|
Tags are stored as a JSON-stringified array in the `mastra.tags` span attribute:
|
|
153
153
|
|
|
@@ -76,7 +76,7 @@ Flushes pending data and shuts down the client.
|
|
|
76
76
|
|
|
77
77
|
## Usage
|
|
78
78
|
|
|
79
|
-
### Zero-
|
|
79
|
+
### Zero-config (using environment variables)
|
|
80
80
|
|
|
81
81
|
```typescript
|
|
82
82
|
import { ArizeExporter } from '@mastra/arize'
|
|
@@ -86,7 +86,7 @@ import { ArizeExporter } from '@mastra/arize'
|
|
|
86
86
|
const exporter = new ArizeExporter()
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
### Phoenix
|
|
89
|
+
### Phoenix configuration
|
|
90
90
|
|
|
91
91
|
```typescript
|
|
92
92
|
import { ArizeExporter } from '@mastra/arize'
|
|
@@ -98,7 +98,7 @@ const exporter = new ArizeExporter({
|
|
|
98
98
|
})
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
### Arize AX
|
|
101
|
+
### Arize AX configuration
|
|
102
102
|
|
|
103
103
|
```typescript
|
|
104
104
|
import { ArizeExporter } from '@mastra/arize'
|
|
@@ -128,7 +128,7 @@ const result = await agent.generate('Hello', {
|
|
|
128
128
|
})
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
### How
|
|
131
|
+
### How tags are stored
|
|
132
132
|
|
|
133
133
|
Tags are stored using the OpenInference `tag.tags` attribute:
|
|
134
134
|
|
|
@@ -70,7 +70,7 @@ Flushes pending data and shuts down the client.
|
|
|
70
70
|
|
|
71
71
|
## Usage
|
|
72
72
|
|
|
73
|
-
### Zero-
|
|
73
|
+
### Zero-config (using environment variables)
|
|
74
74
|
|
|
75
75
|
```typescript
|
|
76
76
|
import { ArthurExporter } from '@mastra/arthur'
|
|
@@ -79,7 +79,7 @@ import { ArthurExporter } from '@mastra/arthur'
|
|
|
79
79
|
const exporter = new ArthurExporter()
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
### Explicit
|
|
82
|
+
### Explicit configuration
|
|
83
83
|
|
|
84
84
|
```typescript
|
|
85
85
|
import { ArthurExporter } from '@mastra/arthur'
|
|
@@ -109,7 +109,7 @@ const result = await agent.generate('Hello', {
|
|
|
109
109
|
})
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
### How
|
|
112
|
+
### How tags are stored
|
|
113
113
|
|
|
114
114
|
Tags are stored using the OpenInference `tag.tags` attribute:
|
|
115
115
|
|
|
@@ -71,7 +71,7 @@ Flushes pending data and shuts down the client.
|
|
|
71
71
|
|
|
72
72
|
## Usage
|
|
73
73
|
|
|
74
|
-
### Zero-
|
|
74
|
+
### Zero-config (using environment variables)
|
|
75
75
|
|
|
76
76
|
```typescript
|
|
77
77
|
import { BraintrustExporter } from '@mastra/braintrust'
|
|
@@ -80,7 +80,7 @@ import { BraintrustExporter } from '@mastra/braintrust'
|
|
|
80
80
|
const exporter = new BraintrustExporter()
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
### Explicit
|
|
83
|
+
### Explicit configuration
|
|
84
84
|
|
|
85
85
|
```typescript
|
|
86
86
|
import { BraintrustExporter } from '@mastra/braintrust'
|
|
@@ -184,7 +184,7 @@ The exporter batches tracing spans, logs, metrics, scores, and feedback for effi
|
|
|
184
184
|
- With `projectId` or `MASTRA_PROJECT_ID`, derived routes use `/projects/:projectId/ai/{signal}/publish`
|
|
185
185
|
- Explicit full publish URLs are used as-is, even when `projectId` is configured
|
|
186
186
|
|
|
187
|
-
### Signal
|
|
187
|
+
### Signal processing
|
|
188
188
|
|
|
189
189
|
- `exportTracingEvent()` only exports `SPAN_ENDED` tracing events
|
|
190
190
|
- `onLogEvent()`, `onMetricEvent()`, `onScoreEvent()`, and `onFeedbackEvent()` buffer every event they receive for that signal type
|
|
@@ -238,7 +238,7 @@ const customExporter = new CloudExporter({
|
|
|
238
238
|
|
|
239
239
|
- [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview): Complete guide
|
|
240
240
|
|
|
241
|
-
### Other
|
|
241
|
+
### Other exporters
|
|
242
242
|
|
|
243
243
|
- [DefaultExporter](https://mastra.ai/reference/observability/tracing/exporters/default-exporter): Storage persistence
|
|
244
244
|
- [ConsoleExporter](https://mastra.ai/reference/observability/tracing/exporters/console-exporter): Debug output
|
|
@@ -107,7 +107,7 @@ Finalizes any open traces and flushes pending posts.
|
|
|
107
107
|
|
|
108
108
|
## Usage
|
|
109
109
|
|
|
110
|
-
### Zero-
|
|
110
|
+
### Zero-config (using environment variables)
|
|
111
111
|
|
|
112
112
|
```typescript
|
|
113
113
|
import { DeepEvalExporter } from '@mastra/deepeval'
|
|
@@ -116,7 +116,7 @@ import { DeepEvalExporter } from '@mastra/deepeval'
|
|
|
116
116
|
const exporter = new DeepEvalExporter()
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
### Explicit
|
|
119
|
+
### Explicit configuration
|
|
120
120
|
|
|
121
121
|
```typescript
|
|
122
122
|
import { DeepEvalExporter } from '@mastra/deepeval'
|
|
@@ -125,7 +125,7 @@ const exporterWithLogger = new ConsoleExporter({
|
|
|
125
125
|
|
|
126
126
|
- [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview): Complete guide
|
|
127
127
|
|
|
128
|
-
### Other
|
|
128
|
+
### Other exporters
|
|
129
129
|
|
|
130
130
|
- [MastraStorageExporter](https://mastra.ai/reference/observability/tracing/exporters/mastra-storage-exporter): Storage persistence
|
|
131
131
|
- [MastraPlatformExporter](https://mastra.ai/reference/observability/tracing/exporters/mastra-platform-exporter): Mastra platform
|
|
@@ -64,7 +64,7 @@ Flushes pending data and shuts down the exporter. Cancels any pending cleanup ti
|
|
|
64
64
|
|
|
65
65
|
## Usage
|
|
66
66
|
|
|
67
|
-
### Zero-
|
|
67
|
+
### Zero-config (using environment variables)
|
|
68
68
|
|
|
69
69
|
```typescript
|
|
70
70
|
import { DatadogExporter } from '@mastra/datadog'
|
|
@@ -73,7 +73,7 @@ import { DatadogExporter } from '@mastra/datadog'
|
|
|
73
73
|
const exporter = new DatadogExporter()
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
### Explicit
|
|
76
|
+
### Explicit configuration
|
|
77
77
|
|
|
78
78
|
```typescript
|
|
79
79
|
import { DatadogExporter } from '@mastra/datadog'
|
|
@@ -86,7 +86,7 @@ const exporter = new DatadogExporter({
|
|
|
86
86
|
})
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
### With
|
|
89
|
+
### With local Datadog agent
|
|
90
90
|
|
|
91
91
|
```typescript
|
|
92
92
|
const exporter = new DatadogExporter({
|
|
@@ -51,7 +51,7 @@ Extends `BaseExporterConfig`, which includes:
|
|
|
51
51
|
type TracingStorageStrategy = 'realtime' | 'batch-with-updates' | 'insert-only'
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
### Strategy
|
|
54
|
+
### Strategy behaviors
|
|
55
55
|
|
|
56
56
|
- **realtime**: Immediately persists each event to storage
|
|
57
57
|
- **batch-with-updates**: Batches creates and updates separately, applies in order
|
|
@@ -119,7 +119,7 @@ The exporter will:
|
|
|
119
119
|
|
|
120
120
|
## Batching behavior
|
|
121
121
|
|
|
122
|
-
### Flush
|
|
122
|
+
### Flush triggers
|
|
123
123
|
|
|
124
124
|
The buffer flushes when any of these conditions are met:
|
|
125
125
|
|
|
@@ -128,7 +128,7 @@ The buffer flushes when any of these conditions are met:
|
|
|
128
128
|
- Buffer size reaches `maxBufferSize` (emergency flush)
|
|
129
129
|
- `shutdown()` is called
|
|
130
130
|
|
|
131
|
-
### Retry
|
|
131
|
+
### Retry logic
|
|
132
132
|
|
|
133
133
|
Failed flushes are retried with exponential backoff:
|
|
134
134
|
|
|
@@ -138,7 +138,7 @@ Failed flushes are retried with exponential backoff:
|
|
|
138
138
|
|
|
139
139
|
When storage doesn't support a signal or retries are exhausted, `DefaultExporter` emits an `ObservabilityDropEvent` through `onDroppedEvent` handlers registered on exporters and bridges. The drop event includes the signal, reason, count, exporter name, storage name when known, and sanitized error details.
|
|
140
140
|
|
|
141
|
-
### Out-of-
|
|
141
|
+
### Out-of-order handling
|
|
142
142
|
|
|
143
143
|
For `batch-with-updates` strategy:
|
|
144
144
|
|
|
@@ -170,7 +170,7 @@ const customExporter = new DefaultExporter({
|
|
|
170
170
|
|
|
171
171
|
- [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview): Complete guide
|
|
172
172
|
|
|
173
|
-
### Other
|
|
173
|
+
### Other exporters
|
|
174
174
|
|
|
175
175
|
- [CloudExporter](https://mastra.ai/reference/observability/tracing/exporters/cloud-exporter): Mastra platform
|
|
176
176
|
- [ConsoleExporter](https://mastra.ai/reference/observability/tracing/exporters/console-exporter): Debug output
|
|
@@ -60,7 +60,7 @@ Flushes pending data and shuts down the exporter.
|
|
|
60
60
|
|
|
61
61
|
## Usage
|
|
62
62
|
|
|
63
|
-
### Zero-
|
|
63
|
+
### Zero-config (using environment variables)
|
|
64
64
|
|
|
65
65
|
```typescript
|
|
66
66
|
import { LaminarExporter } from '@mastra/laminar'
|
|
@@ -69,7 +69,7 @@ import { LaminarExporter } from '@mastra/laminar'
|
|
|
69
69
|
const exporter = new LaminarExporter()
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
### Explicit
|
|
72
|
+
### Explicit configuration
|
|
73
73
|
|
|
74
74
|
```typescript
|
|
75
75
|
import { LaminarExporter } from '@mastra/laminar'
|
|
@@ -86,7 +86,7 @@ Flushes pending data and shuts down both the span processor and the client.
|
|
|
86
86
|
|
|
87
87
|
## Usage
|
|
88
88
|
|
|
89
|
-
### Zero-
|
|
89
|
+
### Zero-config (using environment variables)
|
|
90
90
|
|
|
91
91
|
```typescript
|
|
92
92
|
import { LangfuseExporter } from '@mastra/langfuse'
|
|
@@ -95,7 +95,7 @@ import { LangfuseExporter } from '@mastra/langfuse'
|
|
|
95
95
|
const exporter = new LangfuseExporter()
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
### Explicit
|
|
98
|
+
### Explicit configuration
|
|
99
99
|
|
|
100
100
|
```typescript
|
|
101
101
|
import { LangfuseExporter } from '@mastra/langfuse'
|
|
@@ -154,7 +154,7 @@ const agent = new Agent({
|
|
|
154
154
|
})
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
### Helper
|
|
157
|
+
### Helper functions
|
|
158
158
|
|
|
159
159
|
#### `withLangfusePrompt(prompt)`
|
|
160
160
|
|
|
@@ -318,7 +318,7 @@ The original `CloudExporter` is preserved unchanged so dashboards or alert rules
|
|
|
318
318
|
|
|
319
319
|
- [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview): Complete guide
|
|
320
320
|
|
|
321
|
-
### Other
|
|
321
|
+
### Other exporters
|
|
322
322
|
|
|
323
323
|
- [MastraStorageExporter](https://mastra.ai/reference/observability/tracing/exporters/mastra-storage-exporter): Storage persistence
|
|
324
324
|
- [ConsoleExporter](https://mastra.ai/reference/observability/tracing/exporters/console-exporter): Debug output
|
|
@@ -83,7 +83,7 @@ Inspect the current queue with `exporter.getByteBatchingStats()`.
|
|
|
83
83
|
type TracingStorageStrategy = 'realtime' | 'batch-with-updates' | 'insert-only'
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
### Strategy
|
|
86
|
+
### Strategy behaviors
|
|
87
87
|
|
|
88
88
|
- **realtime**: Immediately persists each event to storage. Use it only in single-process local development. It isn't supported with durable execution: when a durable agent or an Inngest, Temporal, or evented workflow is registered, the exporter logs one warning and runs `batch-with-updates`.
|
|
89
89
|
- **batch-with-updates**: Batches creates and updates separately, applies in order
|
|
@@ -153,7 +153,7 @@ The exporter will:
|
|
|
153
153
|
|
|
154
154
|
## Batching behavior
|
|
155
155
|
|
|
156
|
-
### Flush
|
|
156
|
+
### Flush triggers
|
|
157
157
|
|
|
158
158
|
The buffer flushes when any of these conditions are met:
|
|
159
159
|
|
|
@@ -162,7 +162,7 @@ The buffer flushes when any of these conditions are met:
|
|
|
162
162
|
- Buffer size reaches `maxBufferSize` (emergency flush)
|
|
163
163
|
- `shutdown()` is called
|
|
164
164
|
|
|
165
|
-
### Retry
|
|
165
|
+
### Retry logic
|
|
166
166
|
|
|
167
167
|
Failed flushes are retried with exponential backoff:
|
|
168
168
|
|
|
@@ -170,7 +170,7 @@ Failed flushes are retried with exponential backoff:
|
|
|
170
170
|
- Maximum attempts: `maxRetries`
|
|
171
171
|
- Batch is dropped after all retries fail
|
|
172
172
|
|
|
173
|
-
### Out-of-
|
|
173
|
+
### Out-of-order handling
|
|
174
174
|
|
|
175
175
|
For `batch-with-updates` strategy:
|
|
176
176
|
|
|
@@ -221,7 +221,7 @@ The original `DefaultExporter` is preserved unchanged so dashboards or alert rul
|
|
|
221
221
|
|
|
222
222
|
- [Tracing Overview](https://mastra.ai/docs/observability/tracing/overview): Complete guide
|
|
223
223
|
|
|
224
|
-
### Other
|
|
224
|
+
### Other exporters
|
|
225
225
|
|
|
226
226
|
- [MastraPlatformExporter](https://mastra.ai/reference/observability/tracing/exporters/mastra-platform-exporter): Mastra platform
|
|
227
227
|
- [ConsoleExporter](https://mastra.ai/reference/observability/tracing/exporters/console-exporter): Debug output
|
|
@@ -235,7 +235,7 @@ Flushes pending traces and shuts down the exporter.
|
|
|
235
235
|
|
|
236
236
|
## Usage examples
|
|
237
237
|
|
|
238
|
-
### Zero-
|
|
238
|
+
### Zero-config (using environment variables)
|
|
239
239
|
|
|
240
240
|
```typescript
|
|
241
241
|
import { OtelExporter } from '@mastra/otel-exporter'
|
|
@@ -250,7 +250,7 @@ const exporter = new OtelExporter({ provider: { signoz: {} } })
|
|
|
250
250
|
// Set LMNR_PROJECT_API_KEY for Laminar
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
-
### Explicit
|
|
253
|
+
### Explicit configuration
|
|
254
254
|
|
|
255
255
|
```typescript
|
|
256
256
|
import { OtelExporter } from '@mastra/otel-exporter'
|
|
@@ -265,7 +265,7 @@ const exporter = new OtelExporter({
|
|
|
265
265
|
})
|
|
266
266
|
```
|
|
267
267
|
|
|
268
|
-
### With
|
|
268
|
+
### With custom endpoint
|
|
269
269
|
|
|
270
270
|
```typescript
|
|
271
271
|
const exporter = new OtelExporter({
|
|
@@ -308,7 +308,7 @@ const result = await agent.generate('Hello', {
|
|
|
308
308
|
})
|
|
309
309
|
```
|
|
310
310
|
|
|
311
|
-
### How
|
|
311
|
+
### How tags are stored
|
|
312
312
|
|
|
313
313
|
Tags are stored as a JSON-stringified array in the `mastra.tags` span attribute for maximum backend compatibility:
|
|
314
314
|
|
|
@@ -67,7 +67,7 @@ Flushes pending batched events and shuts down the PostHog client.
|
|
|
67
67
|
|
|
68
68
|
## Usage
|
|
69
69
|
|
|
70
|
-
### Zero-
|
|
70
|
+
### Zero-config (using environment variables)
|
|
71
71
|
|
|
72
72
|
```typescript
|
|
73
73
|
import { PosthogExporter } from '@mastra/posthog'
|
|
@@ -76,7 +76,7 @@ import { PosthogExporter } from '@mastra/posthog'
|
|
|
76
76
|
const exporter = new PosthogExporter()
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
### Explicit
|
|
79
|
+
### Explicit configuration
|
|
80
80
|
|
|
81
81
|
```typescript
|
|
82
82
|
import { PosthogExporter } from '@mastra/posthog'
|
|
@@ -57,7 +57,7 @@ Ends all active spans and clears internal state before closing the Sentry connec
|
|
|
57
57
|
|
|
58
58
|
## Usage
|
|
59
59
|
|
|
60
|
-
### Zero-
|
|
60
|
+
### Zero-config (using environment variables)
|
|
61
61
|
|
|
62
62
|
```typescript
|
|
63
63
|
import { SentryExporter } from '@mastra/sentry'
|
|
@@ -66,7 +66,7 @@ import { SentryExporter } from '@mastra/sentry'
|
|
|
66
66
|
const exporter = new SentryExporter()
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
### Explicit
|
|
69
|
+
### Explicit configuration
|
|
70
70
|
|
|
71
71
|
```typescript
|
|
72
72
|
import { SentryExporter } from '@mastra/sentry'
|
|
@@ -79,7 +79,7 @@ const exporter = new SentryExporter({
|
|
|
79
79
|
})
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
### With
|
|
82
|
+
### With sampling
|
|
83
83
|
|
|
84
84
|
```typescript
|
|
85
85
|
const exporter = new SentryExporter({
|
|
@@ -89,7 +89,7 @@ const exporter = new SentryExporter({
|
|
|
89
89
|
})
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
### With
|
|
92
|
+
### With custom Sentry options
|
|
93
93
|
|
|
94
94
|
```typescript
|
|
95
95
|
const exporter = new SentryExporter({
|
|
@@ -139,9 +139,9 @@ Returning `undefined` abstains, and the agent's configured model is used.
|
|
|
139
139
|
|
|
140
140
|
## Routing scope
|
|
141
141
|
|
|
142
|
-
Each step in a run sends the conversation and every tool result so far to the model. That makes the opening call the cheapest one, not the most expensive, so routing only that call captures
|
|
142
|
+
Each step in a run sends the conversation and every tool result so far to the model. That makes the opening call the cheapest one, not the most expensive, so routing only that call captures little.
|
|
143
143
|
|
|
144
|
-
On a four-step run the opening call holds
|
|
144
|
+
On a four-step run the opening call holds about 14% of the input tokens, so routing it alone captures under a tenth of the available saving. That figure counts every input token at full price. With prompt caching, most of a later step's input is a discounted cache read, so routing later steps saves less than their token share suggests.
|
|
145
145
|
|
|
146
146
|
`scope: 'run'` is the default for this reason. Use `scope: 'first-step'` when you would rather a long run drift back to the capable model than commit to one decision, and accept that on multi-step runs it saves close to nothing.
|
|
147
147
|
|
|
@@ -165,7 +165,7 @@ Most processor methods receive both `messages` and `messageList`. They point to
|
|
|
165
165
|
- `messages`: A stage-scoped array of `MastraDBMessage` objects. For input processing, `processInput` and `processInputStep` exclude system messages. For output processing, `processOutputResult` and `processOutputStep` include the latest LLM response. The array is backed by `messageList`, so in-place edits to a message's `content.parts` remain visible to downstream processors and persistence.
|
|
166
166
|
- `messageList`: The live `MessageList` instance backing the run. It exposes filtered views (input, response, remembered, all), multiple output formats (db, ui, core), and methods for mutating the conversation.
|
|
167
167
|
|
|
168
|
-
Use `messages` when you only need to read, map over, or
|
|
168
|
+
Use `messages` when you only need to read, map over, or make small edits to fields on the current stage's messages. Use `messageList` when you need to:
|
|
169
169
|
|
|
170
170
|
- Read messages from another stage, for example input messages while processing output.
|
|
171
171
|
- Add, remove, or replace whole messages.
|
|
@@ -1122,7 +1122,7 @@ The `abort` function on each method throws a `TripWire` error that stops process
|
|
|
1122
1122
|
abort('Blocked content detected', { retry: false, metadata: { category: 'pii' } })
|
|
1123
1123
|
```
|
|
1124
1124
|
|
|
1125
|
-
- `reason`: A human-readable explanation.
|
|
1125
|
+
- `reason`: A human-readable explanation. Shown as `tripwire.payload.reason`.
|
|
1126
1126
|
- `retry`: When `true`, the agent retries the same step with `reason` fed back as feedback. Retries only run when `maxProcessorRetries` is set on the agent or call; otherwise the request aborts. The safety cap of `3` that applies when no cap is set covers only error-processor retries from `processAPIError`. It doesn't give abort retries a budget.
|
|
1127
1127
|
- `metadata`: Optional structured data attached to the `tripwire` chunk for downstream consumers.
|
|
1128
1128
|
|
|
@@ -1169,7 +1169,7 @@ await writer.custom({
|
|
|
1169
1169
|
|
|
1170
1170
|
Pass `transient` as a property of the chunk, not as the second argument to `writer.custom()`. The second argument contains writer options such as `messageId`.
|
|
1171
1171
|
|
|
1172
|
-
By default, processors **don't** see `data-*` chunks in `processOutputStream` so they don't
|
|
1172
|
+
By default, processors **don't** see `data-*` chunks in `processOutputStream` so they don't process tool telemetry by mistake or their own output. Opt in by setting `processDataParts: true` on the processor:
|
|
1173
1173
|
|
|
1174
1174
|
```typescript
|
|
1175
1175
|
class ModerationCollector implements Processor {
|
|
@@ -114,7 +114,7 @@ export const agent = new Agent({
|
|
|
114
114
|
})
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
## Default OpenAI
|
|
117
|
+
## Default OpenAI responses matcher
|
|
118
118
|
|
|
119
119
|
`isRetryableOpenAIResponsesStreamError` matches OpenAI Responses stream error chunks with `type: 'error'` or `type: 'response.failed'`. It reads each chunk with the shared provider-failure reader from `@mastra/core/error` and retries chunks that report a rate limit, a provider outage, or a timeout. As a fallback, it retries errors with explicit retry guidance such as `You can retry your request`. It never retries a credential or quota refusal.
|
|
120
120
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# SystemPromptScrubber
|
|
6
6
|
|
|
7
|
-
The `SystemPromptScrubber` is an **output processor** that detects and handles system prompts, instructions, and other revealing information that could introduce security vulnerabilities. This processor helps maintain security by identifying types of system prompts and providing flexible strategies for handling them, including multiple redaction methods to ensure sensitive information is
|
|
7
|
+
The `SystemPromptScrubber` is an **output processor** that detects and handles system prompts, instructions, and other revealing information that could introduce security vulnerabilities. This processor helps maintain security by identifying types of system prompts and providing flexible strategies for handling them, including multiple redaction methods to ensure sensitive information is sanitized.
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
@@ -70,7 +70,7 @@ for await (const part of stream.fullStream) {
|
|
|
70
70
|
|
|
71
71
|
## Media token counting
|
|
72
72
|
|
|
73
|
-
Images and file attachments are estimated instead of tokenized, including `file` message parts and tool results shaped like `{ data, mediaType }`. Images use a flat per-image estimate; other media uses decoded byte size, while remote URLs and provider file ids use a flat fallback because their size isn't known locally. Encoded payloads such as base64 data are never counted as text, avoiding an inflated count that could truncate history
|
|
73
|
+
Images and file attachments are estimated instead of tokenized, including `file` message parts and tool results shaped like `{ data, mediaType }`. Images use a flat per-image estimate; other media uses decoded byte size, while remote URLs and provider file ids use a flat fallback because their size isn't known locally. Encoded payloads such as base64 data are never counted as text, avoiding an inflated count that could truncate history without need.
|
|
74
74
|
|
|
75
75
|
## Error behavior
|
|
76
76
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# UnicodeNormalizer
|
|
6
6
|
|
|
7
|
-
The `UnicodeNormalizer` is an **input processor** that normalizes Unicode text to ensure consistent formatting and remove
|
|
7
|
+
The `UnicodeNormalizer` is an **input processor** that normalizes Unicode text to ensure consistent formatting and remove problematic characters before messages are sent to the language model. This processor always normalizes text to Unicode NFKC form. The normalization form isn't configurable. It also standardizes whitespace formatting. Control character removal is opt-in: set `stripControlChars` to `true` to enable it.
|
|
8
8
|
|
|
9
9
|
## Usage example
|
|
10
10
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Your new Mastra project, created with the `create mastra` command, comes with a predefined set of files and folders to help you get started.
|
|
8
8
|
|
|
9
|
-
Mastra is a framework, but it's mostly **unopinionated** about how you organize or colocate your files. The CLI provides a sensible default structure that works well for most projects, but you're free to adapt it to your workflow or team conventions. You could even build your entire project in a single file if you wanted! Whatever structure you choose, keep it consistent to
|
|
9
|
+
Mastra is a framework, but it's mostly **unopinionated** about how you organize or colocate your files. The CLI provides a sensible default structure that works well for most projects, but you're free to adapt it to your workflow or team conventions. You could even build your entire project in a single file if you wanted! Whatever structure you choose, keep it consistent to keep your code maintainable and consistent.
|
|
10
10
|
|
|
11
11
|
## Default project structure
|
|
12
12
|
|
|
@@ -26,7 +26,7 @@ A project created with the `create mastra` command looks like this:
|
|
|
26
26
|
└── tsconfig.json
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
The default project is based on the [Agent Harness template](https://github.com/mastra-ai/template-agent-harness). Use the predefined files as templates. Duplicate and adapt them to
|
|
29
|
+
The default project is based on the [Agent Harness template](https://github.com/mastra-ai/template-agent-harness). Use the predefined files as templates. Duplicate and adapt them to create your own agents, tools, workflows, etc.
|
|
30
30
|
|
|
31
31
|
### Folders
|
|
32
32
|
|
|
@@ -61,7 +61,7 @@ export const mastra = new Mastra({
|
|
|
61
61
|
|
|
62
62
|
### `init(topicName, group?)`
|
|
63
63
|
|
|
64
|
-
Creates the topic and a subscription if they don't already exist, and returns the subscription. `subscribe` calls this internally, so you
|
|
64
|
+
Creates the topic and a subscription if they don't already exist, and returns the subscription. `subscribe` calls this internally, so you don't normally call it directly.
|
|
65
65
|
|
|
66
66
|
```typescript
|
|
67
67
|
await pubsub.init('workflow.events')
|
|
@@ -108,7 +108,7 @@ Returns: `Promise<boolean>`
|
|
|
108
108
|
|
|
109
109
|
#### `transferLease(key, fromOwner, toOwner, ttlMs)`
|
|
110
110
|
|
|
111
|
-
Atomically transfers a held lease from `fromOwner` to `toOwner` and refreshes its TTL without releasing the key in between. This gap-free primitive lets a follow-up owner take over the same key immediately after the current owner finishes. For example, a queued follow-up run can take over when a thread run completes. A naive release-then-acquire
|
|
111
|
+
Atomically transfers a held lease from `fromOwner` to `toOwner` and refreshes its TTL without releasing the key in between. This gap-free primitive lets a follow-up owner take over the same key immediately after the current owner finishes. For example, a queued follow-up run can take over when a thread run completes. A naive release-then-acquire leaves the key empty for a moment. A racing process could then win the freed lease and start a competing run.
|
|
112
112
|
|
|
113
113
|
Returns `true` if `fromOwner` still held the lease and ownership moved to `toOwner`, or `false` if the lease was already lost, in which case the caller should fall back to a fresh `acquireLease`.
|
|
114
114
|
|
|
@@ -218,7 +218,7 @@ redis-cli --scan --pattern 'mastra:topic:*' | while read -r key; do
|
|
|
218
218
|
done
|
|
219
219
|
```
|
|
220
220
|
|
|
221
|
-
The loop only touches streams without a TTL, so it's safe to run
|
|
221
|
+
The loop only touches streams without a TTL, so it's safe to run more than once. After step 2, a stream that's still in use keeps its data, because every write refreshes the TTL.
|
|
222
222
|
|
|
223
223
|
## Redelivery and reclaim
|
|
224
224
|
|
|
@@ -53,7 +53,7 @@ await pubsub.close()
|
|
|
53
53
|
|
|
54
54
|
## Broker election
|
|
55
55
|
|
|
56
|
-
The broker is the first process to link its socket into place at the shared path. It routes events between all connected clients, and other processes connect to it as clients. Each candidate binds a socket at a private name and hard-links it to the shared path. The link fails if a socket is already there, preventing a candidate from
|
|
56
|
+
The broker is the first process to link its socket into place at the shared path. It routes events between all connected clients, and other processes connect to it as clients. Each candidate binds a socket at a private name and hard-links it to the shared path. The link fails if a socket is already there, preventing a candidate from replacing a live broker.
|
|
57
57
|
|
|
58
58
|
When the broker exits cleanly, it removes the shared path. Clients then reconnect, and the first to link its socket into place becomes the new broker. The remaining clients resubscribe to it.
|
|
59
59
|
|