@mastra/mcp-docs-server 1.1.9-alpha.0 → 1.1.9-alpha.2
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/adding-voice.md +4 -4
- package/.docs/docs/agents/agent-approval.md +3 -3
- package/.docs/docs/agents/agent-memory.md +1 -1
- package/.docs/docs/agents/network-approval.md +1 -1
- package/.docs/docs/agents/networks.md +1 -1
- package/.docs/docs/agents/overview.md +1 -1
- package/.docs/docs/agents/processors.md +8 -8
- package/.docs/docs/agents/structured-output.md +1 -1
- package/.docs/docs/agents/supervisor-agents.md +3 -3
- package/.docs/docs/agents/using-tools.md +1 -1
- package/.docs/docs/build-with-ai/mcp-docs-server.md +1 -1
- package/.docs/docs/build-with-ai/skills.md +1 -1
- package/.docs/docs/community/contributing-templates.md +1 -1
- package/.docs/docs/community/discord.md +2 -2
- package/.docs/docs/community/licensing.md +1 -1
- package/.docs/docs/deployment/cloud-providers.md +2 -2
- package/.docs/docs/deployment/mastra-server.md +1 -1
- package/.docs/docs/deployment/monorepo.md +1 -1
- package/.docs/docs/deployment/overview.md +3 -3
- package/.docs/docs/deployment/studio.md +1 -1
- package/.docs/docs/deployment/web-framework.md +1 -1
- package/.docs/docs/deployment/workflow-runners.md +1 -1
- package/.docs/docs/evals/built-in-scorers.md +1 -1
- package/.docs/docs/evals/custom-scorers.md +6 -6
- package/.docs/docs/evals/overview.md +1 -1
- package/.docs/docs/evals/running-in-ci.md +6 -6
- package/.docs/docs/getting-started/build-with-ai.md +2 -2
- package/.docs/docs/getting-started/manual-install.md +1 -1
- package/.docs/docs/getting-started/project-structure.md +1 -1
- package/.docs/docs/index.md +1 -1
- package/.docs/docs/mcp/overview.md +1 -1
- package/.docs/docs/mcp/publishing-mcp-server.md +3 -3
- package/.docs/docs/memory/memory-processors.md +8 -8
- package/.docs/docs/memory/message-history.md +2 -2
- package/.docs/docs/memory/observational-memory.md +5 -5
- package/.docs/docs/memory/semantic-recall.md +7 -7
- package/.docs/docs/memory/working-memory.md +14 -14
- package/.docs/docs/observability/datasets/overview.md +1 -1
- package/.docs/docs/observability/datasets/running-experiments.md +1 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/overview.md +5 -5
- package/.docs/docs/observability/tracing/bridges/otel.md +7 -7
- package/.docs/docs/observability/tracing/exporters/arize.md +3 -3
- package/.docs/docs/observability/tracing/exporters/braintrust.md +1 -1
- package/.docs/docs/observability/tracing/exporters/cloud.md +2 -2
- package/.docs/docs/observability/tracing/exporters/datadog.md +3 -3
- package/.docs/docs/observability/tracing/exporters/default.md +7 -7
- package/.docs/docs/observability/tracing/exporters/laminar.md +1 -1
- package/.docs/docs/observability/tracing/exporters/langfuse.md +3 -3
- package/.docs/docs/observability/tracing/exporters/langsmith.md +4 -4
- package/.docs/docs/observability/tracing/exporters/otel.md +8 -8
- package/.docs/docs/observability/tracing/exporters/posthog.md +2 -2
- package/.docs/docs/observability/tracing/exporters/sentry.md +4 -4
- package/.docs/docs/observability/tracing/overview.md +20 -20
- package/.docs/docs/observability/tracing/processors/sensitive-data-filter.md +11 -11
- package/.docs/docs/rag/chunking-and-embedding.md +4 -4
- package/.docs/docs/rag/overview.md +2 -2
- package/.docs/docs/rag/retrieval.md +4 -4
- package/.docs/docs/rag/vector-databases.md +11 -11
- package/.docs/docs/server/auth/auth0.md +1 -1
- package/.docs/docs/server/auth/clerk.md +1 -1
- package/.docs/docs/server/auth/composite-auth.md +9 -9
- package/.docs/docs/server/auth/custom-auth-provider.md +12 -12
- package/.docs/docs/server/auth/firebase.md +2 -2
- package/.docs/docs/server/auth/jwt.md +1 -1
- package/.docs/docs/server/auth/simple-auth.md +8 -8
- package/.docs/docs/server/auth/supabase.md +1 -1
- package/.docs/docs/server/auth/workos.md +1 -1
- package/.docs/docs/server/auth.md +1 -1
- package/.docs/docs/server/custom-adapters.md +7 -7
- package/.docs/docs/server/custom-api-routes.md +2 -2
- package/.docs/docs/server/mastra-client.md +1 -1
- package/.docs/docs/server/mastra-server.md +1 -1
- package/.docs/docs/server/request-context.md +2 -2
- package/.docs/docs/server/server-adapters.md +1 -1
- package/.docs/docs/streaming/events.md +1 -1
- package/.docs/docs/streaming/overview.md +1 -1
- package/.docs/docs/streaming/tool-streaming.md +2 -2
- package/.docs/docs/voice/overview.md +3 -3
- package/.docs/docs/voice/speech-to-speech.md +1 -1
- package/.docs/docs/voice/speech-to-text.md +2 -2
- package/.docs/docs/voice/text-to-speech.md +2 -2
- package/.docs/docs/workflows/agents-and-tools.md +1 -1
- package/.docs/docs/workflows/control-flow.md +1 -1
- package/.docs/docs/workflows/error-handling.md +3 -3
- package/.docs/docs/workflows/suspend-and-resume.md +1 -1
- package/.docs/docs/workflows/time-travel.md +1 -1
- package/.docs/docs/workflows/workflow-state.md +1 -1
- package/.docs/docs/workspace/filesystem.md +1 -1
- package/.docs/docs/workspace/overview.md +1 -1
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/docs/workspace/skills.md +2 -2
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +2 -2
- package/.docs/guides/build-your-ui/assistant-ui.md +1 -1
- package/.docs/guides/build-your-ui/copilotkit.md +1 -1
- package/.docs/guides/deployment/digital-ocean.md +1 -1
- package/.docs/guides/getting-started/astro.md +1 -1
- package/.docs/guides/getting-started/electron.md +1 -1
- package/.docs/guides/getting-started/next-js.md +1 -1
- package/.docs/guides/getting-started/vite-react.md +1 -1
- package/.docs/guides/guide/ai-recruiter.md +3 -3
- package/.docs/guides/guide/chef-michel.md +4 -4
- package/.docs/guides/guide/code-review-bot.md +3 -3
- package/.docs/guides/guide/dev-assistant.md +5 -5
- package/.docs/guides/guide/docs-manager.md +3 -3
- package/.docs/guides/guide/github-actions-pr-description.md +2 -2
- package/.docs/guides/guide/notes-mcp-server.md +3 -3
- package/.docs/guides/guide/research-assistant.md +4 -4
- package/.docs/guides/guide/research-coordinator.md +1 -1
- package/.docs/guides/guide/stock-agent.md +4 -4
- package/.docs/guides/guide/web-search.md +2 -2
- package/.docs/guides/guide/whatsapp-chat-bot.md +1 -1
- package/.docs/guides/migrations/ai-sdk-v4-to-v5.md +3 -3
- package/.docs/guides/migrations/network-to-supervisor.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/agent.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/deployment.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/evals.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/mastra.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/overview.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/storage.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/tracing.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/vectors.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/voice.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/workflows.md +1 -1
- package/.docs/guides/migrations/vnext-to-standard-apis.md +1 -1
- package/.docs/models/embeddings.md +4 -4
- package/.docs/models/gateways/custom-gateways.md +4 -4
- package/.docs/models/gateways/netlify.md +1 -1
- package/.docs/models/gateways/openrouter.md +1 -1
- package/.docs/models/gateways/vercel.md +9 -2
- package/.docs/models/gateways.md +2 -2
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/302ai.md +3 -3
- package/.docs/models/providers/abacus.md +3 -3
- package/.docs/models/providers/aihubmix.md +3 -3
- package/.docs/models/providers/alibaba-cn.md +3 -3
- package/.docs/models/providers/alibaba-coding-plan-cn.md +3 -3
- package/.docs/models/providers/alibaba-coding-plan.md +3 -3
- package/.docs/models/providers/alibaba.md +3 -3
- package/.docs/models/providers/anthropic.md +4 -4
- package/.docs/models/providers/bailing.md +3 -3
- package/.docs/models/providers/baseten.md +3 -3
- package/.docs/models/providers/berget.md +3 -3
- package/.docs/models/providers/cerebras.md +4 -4
- package/.docs/models/providers/chutes.md +6 -5
- package/.docs/models/providers/clarifai.md +3 -3
- package/.docs/models/providers/cloudferro-sherlock.md +3 -3
- package/.docs/models/providers/cloudflare-workers-ai.md +3 -3
- package/.docs/models/providers/cortecs.md +3 -3
- package/.docs/models/providers/deepinfra.md +4 -4
- package/.docs/models/providers/deepseek.md +3 -3
- package/.docs/models/providers/drun.md +3 -3
- package/.docs/models/providers/evroc.md +3 -3
- package/.docs/models/providers/fastrouter.md +3 -3
- package/.docs/models/providers/fireworks-ai.md +3 -3
- package/.docs/models/providers/firmware.md +3 -3
- package/.docs/models/providers/friendli.md +3 -3
- package/.docs/models/providers/github-models.md +3 -3
- package/.docs/models/providers/google.md +4 -4
- package/.docs/models/providers/groq.md +4 -4
- package/.docs/models/providers/helicone.md +3 -3
- package/.docs/models/providers/huggingface.md +3 -3
- package/.docs/models/providers/iflowcn.md +3 -3
- package/.docs/models/providers/inception.md +3 -3
- package/.docs/models/providers/inference.md +3 -3
- package/.docs/models/providers/io-net.md +3 -3
- package/.docs/models/providers/jiekou.md +3 -3
- package/.docs/models/providers/kilo.md +3 -3
- package/.docs/models/providers/kimi-for-coding.md +4 -4
- package/.docs/models/providers/kuae-cloud-coding-plan.md +3 -3
- package/.docs/models/providers/llama.md +3 -3
- package/.docs/models/providers/lmstudio.md +3 -3
- package/.docs/models/providers/lucidquery.md +3 -3
- package/.docs/models/providers/meganova.md +3 -3
- package/.docs/models/providers/minimax-cn-coding-plan.md +4 -4
- package/.docs/models/providers/minimax-cn.md +4 -4
- package/.docs/models/providers/minimax-coding-plan.md +4 -4
- package/.docs/models/providers/minimax.md +4 -4
- package/.docs/models/providers/mistral.md +4 -4
- package/.docs/models/providers/moark.md +3 -3
- package/.docs/models/providers/modelscope.md +3 -3
- package/.docs/models/providers/moonshotai-cn.md +3 -3
- package/.docs/models/providers/moonshotai.md +3 -3
- package/.docs/models/providers/morph.md +3 -3
- package/.docs/models/providers/nano-gpt.md +25 -23
- package/.docs/models/providers/nebius.md +3 -3
- package/.docs/models/providers/nova.md +3 -3
- package/.docs/models/providers/novita-ai.md +3 -3
- package/.docs/models/providers/nvidia.md +3 -3
- package/.docs/models/providers/ollama-cloud.md +3 -3
- package/.docs/models/providers/openai.md +4 -4
- package/.docs/models/providers/opencode-go.md +3 -3
- package/.docs/models/providers/opencode.md +3 -3
- package/.docs/models/providers/ovhcloud.md +3 -3
- package/.docs/models/providers/perplexity-agent.md +4 -4
- package/.docs/models/providers/perplexity.md +4 -4
- package/.docs/models/providers/poe.md +3 -3
- package/.docs/models/providers/privatemode-ai.md +3 -3
- package/.docs/models/providers/qihang-ai.md +3 -3
- package/.docs/models/providers/qiniu-ai.md +3 -3
- package/.docs/models/providers/requesty.md +3 -3
- package/.docs/models/providers/scaleway.md +3 -3
- package/.docs/models/providers/siliconflow-cn.md +3 -3
- package/.docs/models/providers/siliconflow.md +3 -3
- package/.docs/models/providers/stackit.md +3 -3
- package/.docs/models/providers/stepfun.md +3 -3
- package/.docs/models/providers/submodel.md +3 -3
- package/.docs/models/providers/synthetic.md +3 -3
- package/.docs/models/providers/togetherai.md +4 -4
- package/.docs/models/providers/upstage.md +3 -3
- package/.docs/models/providers/vivgrid.md +4 -4
- package/.docs/models/providers/vultr.md +3 -3
- package/.docs/models/providers/wandb.md +3 -3
- package/.docs/models/providers/xai.md +4 -4
- package/.docs/models/providers/xiaomi.md +3 -3
- package/.docs/models/providers/zai-coding-plan.md +3 -3
- package/.docs/models/providers/zai.md +3 -3
- package/.docs/models/providers/zenmux.md +4 -4
- package/.docs/models/providers/zhipuai-coding-plan.md +3 -3
- package/.docs/models/providers/zhipuai.md +3 -3
- package/.docs/reference/agents/agent.md +3 -3
- package/.docs/reference/agents/generateLegacy.md +1 -1
- package/.docs/reference/agents/network.md +2 -2
- package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +1 -1
- package/.docs/reference/auth/auth0.md +4 -4
- package/.docs/reference/auth/better-auth.md +2 -2
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +4 -4
- package/.docs/reference/auth/jwt.md +1 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/auth/workos.md +4 -4
- package/.docs/reference/cli/mastra.md +1 -1
- package/.docs/reference/client-js/agents.md +22 -22
- package/.docs/reference/client-js/error-handling.md +2 -2
- package/.docs/reference/client-js/logs.md +2 -2
- package/.docs/reference/client-js/mastra-client.md +1 -1
- package/.docs/reference/client-js/memory.md +6 -6
- package/.docs/reference/client-js/observability.md +4 -4
- package/.docs/reference/client-js/telemetry.md +1 -1
- package/.docs/reference/client-js/tools.md +3 -3
- package/.docs/reference/client-js/vectors.md +2 -2
- package/.docs/reference/client-js/workflows.md +12 -12
- package/.docs/reference/core/getGatewayById.md +1 -1
- package/.docs/reference/core/getMCPServer.md +2 -2
- package/.docs/reference/core/getMCPServerById.md +2 -2
- package/.docs/reference/core/getMemory.md +1 -1
- package/.docs/reference/core/getScorer.md +2 -2
- package/.docs/reference/core/getScorerById.md +2 -2
- package/.docs/reference/core/getStoredAgentById.md +2 -2
- package/.docs/reference/core/listMCPServers.md +2 -2
- package/.docs/reference/core/listMemory.md +1 -1
- package/.docs/reference/core/listScorers.md +1 -1
- package/.docs/reference/core/listStoredAgents.md +2 -2
- package/.docs/reference/core/mastra-class.md +1 -1
- package/.docs/reference/core/mastra-model-gateway.md +11 -11
- package/.docs/reference/datasets/dataset.md +1 -1
- package/.docs/reference/deployer.md +4 -4
- package/.docs/reference/evals/answer-relevancy.md +3 -3
- package/.docs/reference/evals/answer-similarity.md +3 -3
- package/.docs/reference/evals/bias.md +4 -4
- package/.docs/reference/evals/completeness.md +5 -5
- package/.docs/reference/evals/content-similarity.md +3 -3
- package/.docs/reference/evals/context-precision.md +6 -6
- package/.docs/reference/evals/context-relevance.md +6 -6
- package/.docs/reference/evals/create-scorer.md +7 -7
- package/.docs/reference/evals/faithfulness.md +3 -3
- package/.docs/reference/evals/hallucination.md +5 -5
- package/.docs/reference/evals/keyword-coverage.md +3 -3
- package/.docs/reference/evals/mastra-scorer.md +6 -6
- package/.docs/reference/evals/noise-sensitivity.md +9 -9
- package/.docs/reference/evals/prompt-alignment.md +5 -5
- package/.docs/reference/evals/run-evals.md +5 -5
- package/.docs/reference/evals/scorer-utils.md +17 -17
- package/.docs/reference/evals/textual-difference.md +3 -3
- package/.docs/reference/evals/tone-consistency.md +4 -4
- package/.docs/reference/evals/tool-call-accuracy.md +9 -9
- package/.docs/reference/evals/toxicity.md +3 -3
- package/.docs/reference/harness/harness-class.md +1 -1
- package/.docs/reference/memory/clone-utilities.md +7 -7
- package/.docs/reference/memory/cloneThread.md +4 -4
- package/.docs/reference/memory/createThread.md +1 -1
- package/.docs/reference/memory/deleteMessages.md +1 -1
- package/.docs/reference/memory/getThreadById.md +1 -1
- package/.docs/reference/memory/listThreads.md +3 -3
- package/.docs/reference/memory/memory-class.md +1 -1
- package/.docs/reference/memory/observational-memory.md +1 -1
- package/.docs/reference/memory/recall.md +1 -1
- package/.docs/reference/observability/tracing/bridges/otel.md +5 -5
- package/.docs/reference/observability/tracing/configuration.md +17 -17
- package/.docs/reference/observability/tracing/exporters/arize.md +4 -4
- package/.docs/reference/observability/tracing/exporters/braintrust.md +3 -3
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +6 -6
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +4 -4
- package/.docs/reference/observability/tracing/exporters/datadog.md +4 -4
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +6 -6
- package/.docs/reference/observability/tracing/exporters/laminar.md +2 -2
- package/.docs/reference/observability/tracing/exporters/langfuse.md +4 -4
- package/.docs/reference/observability/tracing/exporters/langsmith.md +6 -6
- package/.docs/reference/observability/tracing/exporters/otel.md +12 -12
- package/.docs/reference/observability/tracing/exporters/posthog.md +3 -3
- package/.docs/reference/observability/tracing/exporters/sentry.md +5 -5
- package/.docs/reference/observability/tracing/instances.md +9 -9
- package/.docs/reference/observability/tracing/interfaces.md +39 -39
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +5 -5
- package/.docs/reference/observability/tracing/spans.md +13 -13
- package/.docs/reference/processors/processor-interface.md +15 -15
- package/.docs/reference/rag/chunk.md +2 -2
- package/.docs/reference/rag/database-config.md +8 -8
- package/.docs/reference/rag/document.md +11 -11
- package/.docs/reference/rag/embeddings.md +5 -5
- package/.docs/reference/rag/extract-params.md +8 -8
- package/.docs/reference/rag/graph-rag.md +4 -4
- package/.docs/reference/rag/metadata-filters.md +5 -5
- package/.docs/reference/rag/rerank.md +2 -2
- package/.docs/reference/rag/rerankWithScorer.md +2 -2
- package/.docs/reference/server/express-adapter.md +1 -1
- package/.docs/reference/server/fastify-adapter.md +1 -1
- package/.docs/reference/server/hono-adapter.md +1 -1
- package/.docs/reference/server/koa-adapter.md +1 -1
- package/.docs/reference/server/mastra-server.md +16 -16
- package/.docs/reference/server/register-api-route.md +5 -5
- package/.docs/reference/server/routes.md +1 -1
- package/.docs/reference/storage/cloudflare-d1.md +2 -2
- package/.docs/reference/storage/cloudflare.md +2 -2
- package/.docs/reference/storage/composite.md +1 -1
- package/.docs/reference/storage/convex.md +5 -5
- package/.docs/reference/storage/dynamodb.md +5 -5
- package/.docs/reference/storage/lance.md +3 -3
- package/.docs/reference/storage/libsql.md +1 -1
- package/.docs/reference/storage/mongodb.md +5 -5
- package/.docs/reference/storage/mssql.md +3 -3
- package/.docs/reference/storage/overview.md +2 -2
- package/.docs/reference/storage/postgresql.md +5 -5
- package/.docs/reference/storage/upstash.md +3 -3
- package/.docs/reference/streaming/ChunkType.md +13 -13
- package/.docs/reference/streaming/agents/MastraModelOutput.md +6 -6
- package/.docs/reference/streaming/agents/stream.md +2 -2
- package/.docs/reference/streaming/agents/streamLegacy.md +1 -1
- package/.docs/reference/streaming/workflows/observeStream.md +1 -1
- package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
- package/.docs/reference/streaming/workflows/stream.md +1 -1
- package/.docs/reference/templates/overview.md +3 -3
- package/.docs/reference/tools/create-tool.md +9 -9
- package/.docs/reference/tools/document-chunker-tool.md +4 -4
- package/.docs/reference/tools/graph-rag-tool.md +7 -7
- package/.docs/reference/tools/mcp-client.md +13 -13
- package/.docs/reference/tools/mcp-server.md +23 -23
- package/.docs/reference/tools/vector-query-tool.md +12 -12
- package/.docs/reference/vectors/astra.md +13 -13
- package/.docs/reference/vectors/chroma.md +16 -16
- package/.docs/reference/vectors/convex.md +15 -15
- package/.docs/reference/vectors/couchbase.md +15 -15
- package/.docs/reference/vectors/duckdb.md +17 -17
- package/.docs/reference/vectors/elasticsearch.md +14 -14
- package/.docs/reference/vectors/lance.md +22 -22
- package/.docs/reference/vectors/libsql.md +15 -15
- package/.docs/reference/vectors/mongodb.md +18 -18
- package/.docs/reference/vectors/opensearch.md +11 -11
- package/.docs/reference/vectors/pg.md +21 -21
- package/.docs/reference/vectors/pinecone.md +15 -15
- package/.docs/reference/vectors/qdrant.md +15 -15
- package/.docs/reference/vectors/s3vectors.md +17 -17
- package/.docs/reference/vectors/turbopuffer.md +14 -14
- package/.docs/reference/vectors/upstash.md +15 -15
- package/.docs/reference/vectors/vectorize.md +16 -16
- package/.docs/reference/voice/azure.md +8 -8
- package/.docs/reference/voice/cloudflare.md +5 -5
- package/.docs/reference/voice/composite-voice.md +5 -5
- package/.docs/reference/voice/deepgram.md +5 -5
- package/.docs/reference/voice/elevenlabs.md +6 -6
- package/.docs/reference/voice/google-gemini-live.md +20 -20
- package/.docs/reference/voice/google.md +9 -9
- package/.docs/reference/voice/mastra-voice.md +17 -17
- package/.docs/reference/voice/murf.md +6 -6
- package/.docs/reference/voice/openai-realtime.md +16 -16
- package/.docs/reference/voice/openai.md +5 -5
- package/.docs/reference/voice/playai.md +5 -5
- package/.docs/reference/voice/sarvam.md +5 -5
- package/.docs/reference/voice/speechify.md +5 -5
- package/.docs/reference/voice/voice.addInstructions.md +2 -2
- package/.docs/reference/voice/voice.addTools.md +2 -2
- package/.docs/reference/voice/voice.answer.md +2 -2
- package/.docs/reference/voice/voice.close.md +2 -2
- package/.docs/reference/voice/voice.connect.md +5 -5
- package/.docs/reference/voice/voice.events.md +2 -2
- package/.docs/reference/voice/voice.getSpeakers.md +3 -3
- package/.docs/reference/voice/voice.listen.md +6 -6
- package/.docs/reference/voice/voice.off.md +2 -2
- package/.docs/reference/voice/voice.on.md +3 -3
- package/.docs/reference/voice/voice.send.md +2 -2
- package/.docs/reference/voice/voice.speak.md +5 -5
- package/.docs/reference/voice/voice.updateConfig.md +3 -3
- package/.docs/reference/workflows/run-methods/startAsync.md +1 -1
- package/.docs/reference/workflows/run.md +3 -3
- package/.docs/reference/workflows/step.md +2 -2
- package/.docs/reference/workflows/workflow-methods/create-run.md +1 -1
- package/.docs/reference/workflows/workflow.md +1 -1
- package/.docs/reference/workspace/daytona-sandbox.md +2 -2
- package/.docs/reference/workspace/e2b-sandbox.md +2 -2
- package/.docs/reference/workspace/filesystem.md +1 -1
- package/.docs/reference/workspace/gcs-filesystem.md +1 -1
- package/.docs/reference/workspace/local-filesystem.md +1 -1
- package/.docs/reference/workspace/local-sandbox.md +4 -4
- package/.docs/reference/workspace/process-manager.md +2 -2
- package/.docs/reference/workspace/s3-filesystem.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +2 -2
- package/CHANGELOG.md +14 -0
- package/package.json +4 -4
|
@@ -52,7 +52,7 @@ constructor(options: MastraServerOptions<TApp>)
|
|
|
52
52
|
|
|
53
53
|
These methods must be implemented by adapters:
|
|
54
54
|
|
|
55
|
-
### registerContextMiddleware()
|
|
55
|
+
### `registerContextMiddleware()`
|
|
56
56
|
|
|
57
57
|
Attach Mastra context to every request.
|
|
58
58
|
|
|
@@ -67,7 +67,7 @@ abstract registerContextMiddleware(): void
|
|
|
67
67
|
- `tools` - Available tools
|
|
68
68
|
- `abortSignal` - Request cancellation signal
|
|
69
69
|
|
|
70
|
-
### registerAuthMiddleware()
|
|
70
|
+
### `registerAuthMiddleware()`
|
|
71
71
|
|
|
72
72
|
Register authentication and authorization middleware.
|
|
73
73
|
|
|
@@ -75,7 +75,7 @@ Register authentication and authorization middleware.
|
|
|
75
75
|
abstract registerAuthMiddleware(): void
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
### registerRoute()
|
|
78
|
+
### `registerRoute()`
|
|
79
79
|
|
|
80
80
|
Register a single route with the framework.
|
|
81
81
|
|
|
@@ -87,7 +87,7 @@ abstract registerRoute(
|
|
|
87
87
|
): Promise<void>
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
### getParams()
|
|
90
|
+
### `getParams()`
|
|
91
91
|
|
|
92
92
|
Extract parameters from the request.
|
|
93
93
|
|
|
@@ -102,7 +102,7 @@ abstract getParams(
|
|
|
102
102
|
}>
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
### sendResponse()
|
|
105
|
+
### `sendResponse()`
|
|
106
106
|
|
|
107
107
|
Send response based on route type.
|
|
108
108
|
|
|
@@ -114,7 +114,7 @@ abstract sendResponse(
|
|
|
114
114
|
): Promise<unknown>
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
### stream()
|
|
117
|
+
### `stream()`
|
|
118
118
|
|
|
119
119
|
Handle streaming responses.
|
|
120
120
|
|
|
@@ -128,7 +128,7 @@ abstract stream(
|
|
|
128
128
|
|
|
129
129
|
## Instance methods
|
|
130
130
|
|
|
131
|
-
### init()
|
|
131
|
+
### `init()`
|
|
132
132
|
|
|
133
133
|
Initialize the server by registering all middleware and routes.
|
|
134
134
|
|
|
@@ -142,7 +142,7 @@ Calls in order:
|
|
|
142
142
|
2. `registerAuthMiddleware()`
|
|
143
143
|
3. `registerRoutes()`
|
|
144
144
|
|
|
145
|
-
### registerRoutes()
|
|
145
|
+
### `registerRoutes()`
|
|
146
146
|
|
|
147
147
|
Register all Mastra routes.
|
|
148
148
|
|
|
@@ -150,7 +150,7 @@ Register all Mastra routes.
|
|
|
150
150
|
async registerRoutes(): Promise<void>
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
### getApp()
|
|
153
|
+
### `getApp()`
|
|
154
154
|
|
|
155
155
|
Get the framework app instance.
|
|
156
156
|
|
|
@@ -158,7 +158,7 @@ Get the framework app instance.
|
|
|
158
158
|
getApp<T = TApp>(): T
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
-
### parsePathParams()
|
|
161
|
+
### `parsePathParams()`
|
|
162
162
|
|
|
163
163
|
Validate path parameters with the route's Zod schema.
|
|
164
164
|
|
|
@@ -169,7 +169,7 @@ async parsePathParams(
|
|
|
169
169
|
): Promise<Record<string, unknown>>
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
### parseQueryParams()
|
|
172
|
+
### `parseQueryParams()`
|
|
173
173
|
|
|
174
174
|
Validate query parameters with the route's Zod schema.
|
|
175
175
|
|
|
@@ -180,7 +180,7 @@ async parseQueryParams(
|
|
|
180
180
|
): Promise<Record<string, unknown>>
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
### parseBody()
|
|
183
|
+
### `parseBody()`
|
|
184
184
|
|
|
185
185
|
Validate request body with the route's Zod schema.
|
|
186
186
|
|
|
@@ -191,7 +191,7 @@ async parseBody(
|
|
|
191
191
|
): Promise<unknown>
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
### registerOpenAPIRoute()
|
|
194
|
+
### `registerOpenAPIRoute()`
|
|
195
195
|
|
|
196
196
|
Register an endpoint that serves the OpenAPI specification.
|
|
197
197
|
|
|
@@ -205,7 +205,7 @@ async registerOpenAPIRoute(
|
|
|
205
205
|
|
|
206
206
|
## Protected methods
|
|
207
207
|
|
|
208
|
-
### mergeRequestContext()
|
|
208
|
+
### `mergeRequestContext()`
|
|
209
209
|
|
|
210
210
|
Merge request context from multiple sources (query params and body).
|
|
211
211
|
|
|
@@ -218,7 +218,7 @@ protected mergeRequestContext(options: {
|
|
|
218
218
|
|
|
219
219
|
## Types
|
|
220
220
|
|
|
221
|
-
### BodyLimitOptions
|
|
221
|
+
### `BodyLimitOptions`
|
|
222
222
|
|
|
223
223
|
```typescript
|
|
224
224
|
interface BodyLimitOptions {
|
|
@@ -227,7 +227,7 @@ interface BodyLimitOptions {
|
|
|
227
227
|
}
|
|
228
228
|
```
|
|
229
229
|
|
|
230
|
-
### StreamOptions
|
|
230
|
+
### `StreamOptions`
|
|
231
231
|
|
|
232
232
|
```typescript
|
|
233
233
|
interface StreamOptions {
|
|
@@ -32,7 +32,7 @@ registerApiRoute("/items/:itemId", { ... })
|
|
|
32
32
|
|
|
33
33
|
**openapi** (`DescribeRouteOptions`): OpenAPI metadata for Swagger UI documentation
|
|
34
34
|
|
|
35
|
-
## OpenAPI
|
|
35
|
+
## OpenAPI options
|
|
36
36
|
|
|
37
37
|
The `openapi` property accepts standard OpenAPI 3.1 operation fields from [hono-openapi](https://github.com/honojs/middleware/tree/main/packages/openapi). Routes without an `openapi` property aren't included in Swagger UI.
|
|
38
38
|
|
|
@@ -52,11 +52,11 @@ The `openapi` property accepts standard OpenAPI 3.1 operation fields from [hono-
|
|
|
52
52
|
|
|
53
53
|
**security** (`SecurityRequirementObject[]`): Security requirements for the operation
|
|
54
54
|
|
|
55
|
-
## Return
|
|
55
|
+
## Return value
|
|
56
56
|
|
|
57
57
|
Returns an `ApiRoute` object to be passed to `server.apiRoutes` in the Mastra configuration.
|
|
58
58
|
|
|
59
|
-
## Handler
|
|
59
|
+
## Handler context
|
|
60
60
|
|
|
61
61
|
The handler receives a Hono `Context` object with access to:
|
|
62
62
|
|
|
@@ -201,7 +201,7 @@ registerApiRoute('/items/:itemId', {
|
|
|
201
201
|
})
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
### Using createHandler
|
|
204
|
+
### Using `createHandler()`
|
|
205
205
|
|
|
206
206
|
For routes that need async initialization:
|
|
207
207
|
|
|
@@ -219,7 +219,7 @@ registerApiRoute('/dynamic', {
|
|
|
219
219
|
})
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
## Error
|
|
222
|
+
## Error handling
|
|
223
223
|
|
|
224
224
|
Throw errors with status codes using Hono's `HTTPException`:
|
|
225
225
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Cloudflare D1
|
|
1
|
+
# Cloudflare D1 storage
|
|
2
2
|
|
|
3
3
|
The Cloudflare D1 storage implementation provides a serverless SQL database solution using Cloudflare D1, supporting relational operations and transactional consistency.
|
|
4
4
|
|
|
@@ -139,7 +139,7 @@ Or in `wrangler.jsonc`:
|
|
|
139
139
|
|
|
140
140
|
**tablePrefix** (`string`): Optional prefix for all table names (useful for environment isolation)
|
|
141
141
|
|
|
142
|
-
## Additional
|
|
142
|
+
## Additional notes
|
|
143
143
|
|
|
144
144
|
### Schema Management
|
|
145
145
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Cloudflare
|
|
1
|
+
# Cloudflare storage
|
|
2
2
|
|
|
3
3
|
The Cloudflare KV storage implementation provides a globally distributed, serverless key-value store solution using Cloudflare Workers KV.
|
|
4
4
|
|
|
@@ -69,7 +69,7 @@ const storageRest = new CloudflareStore({
|
|
|
69
69
|
|
|
70
70
|
**keyPrefix** (`string`): Optional prefix for all keys (useful for environment isolation)
|
|
71
71
|
|
|
72
|
-
### Additional
|
|
72
|
+
### Additional notes
|
|
73
73
|
|
|
74
74
|
### Schema Management
|
|
75
75
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Convex
|
|
1
|
+
# Convex storage
|
|
2
2
|
|
|
3
3
|
The Convex storage implementation provides a serverless storage solution using [Convex](https://convex.dev), a full-stack TypeScript development platform with real-time sync and automatic caching.
|
|
4
4
|
|
|
@@ -32,7 +32,7 @@ yarn add @mastra/convex@latest
|
|
|
32
32
|
bun add @mastra/convex@latest
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
## Convex
|
|
35
|
+
## Convex setup
|
|
36
36
|
|
|
37
37
|
Before using `ConvexStore`, you need to set up the Convex schema and storage handler in your Convex project.
|
|
38
38
|
|
|
@@ -103,7 +103,7 @@ const storage = new ConvexStore({
|
|
|
103
103
|
|
|
104
104
|
**storageFunction** (`string`): Path to the storage mutation function (default: 'mastra/storage:handle') (Default: `mastra/storage:handle`)
|
|
105
105
|
|
|
106
|
-
## Constructor
|
|
106
|
+
## Constructor examples
|
|
107
107
|
|
|
108
108
|
```ts
|
|
109
109
|
import { ConvexStore } from '@mastra/convex'
|
|
@@ -124,7 +124,7 @@ const storeCustom = new ConvexStore({
|
|
|
124
124
|
})
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
## Additional
|
|
127
|
+
## Additional notes
|
|
128
128
|
|
|
129
129
|
### Schema Management
|
|
130
130
|
|
|
@@ -148,7 +148,7 @@ All typed tables include:
|
|
|
148
148
|
|
|
149
149
|
This design ensures compatibility with Mastra's storage contract while leveraging Convex's automatic indexing and real-time capabilities.
|
|
150
150
|
|
|
151
|
-
### Environment
|
|
151
|
+
### Environment variables
|
|
152
152
|
|
|
153
153
|
Set these environment variables for your deployment:
|
|
154
154
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# DynamoDB
|
|
1
|
+
# DynamoDB storage
|
|
2
2
|
|
|
3
3
|
The DynamoDB storage implementation provides a scalable and performant NoSQL database solution for Mastra, leveraging a single-table design pattern with [ElectroDB](https://electrodb.dev/).
|
|
4
4
|
|
|
@@ -120,7 +120,7 @@ For local development, you can use [DynamoDB Local](https://docs.aws.amazon.com/
|
|
|
120
120
|
|
|
121
121
|
**config.ttl** (`object`): TTL (Time To Live) configuration for automatic data expiration. Configure per entity type: thread, message, trace, eval, workflow\_snapshot, resource, score. Each entity config includes: enabled (boolean), attributeName (string, default: 'ttl'), defaultTtlSeconds (number).
|
|
122
122
|
|
|
123
|
-
## TTL (
|
|
123
|
+
## TTL (time to live) configuration
|
|
124
124
|
|
|
125
125
|
DynamoDB TTL allows you to automatically delete items after a specified time period. This is useful for:
|
|
126
126
|
|
|
@@ -216,7 +216,7 @@ aws dynamodb update-time-to-live \
|
|
|
216
216
|
|
|
217
217
|
> **Note:** DynamoDB deletes expired items within 48 hours after expiration. Items remain queryable until actually deleted.
|
|
218
218
|
|
|
219
|
-
## AWS IAM
|
|
219
|
+
## AWS IAM permissions
|
|
220
220
|
|
|
221
221
|
The IAM role or user executing the code needs appropriate permissions to interact with the specified DynamoDB table and its indexes. Below is a sample policy. Replace `${YOUR_TABLE_NAME}` with your actual table name and `${YOUR_AWS_REGION}` and `${YOUR_AWS_ACCOUNT_ID}` with appropriate values.
|
|
222
222
|
|
|
@@ -246,7 +246,7 @@ The IAM role or user executing the code needs appropriate permissions to interac
|
|
|
246
246
|
}
|
|
247
247
|
```
|
|
248
248
|
|
|
249
|
-
## Key
|
|
249
|
+
## Key considerations
|
|
250
250
|
|
|
251
251
|
Before diving into the architectural details, keep these key points in mind when working with the DynamoDB storage adapter:
|
|
252
252
|
|
|
@@ -255,7 +255,7 @@ Before diving into the architectural details, keep these key points in mind when
|
|
|
255
255
|
- **Understanding GSIs:** Familiarity with how the GSIs are structured (as per `TABLE_SETUP.md`) is important for understanding data retrieval and potential query patterns.
|
|
256
256
|
- **ElectroDB:** The adapter uses ElectroDB to manage interactions with DynamoDB, providing a layer of abstraction and type safety over raw DynamoDB operations.
|
|
257
257
|
|
|
258
|
-
## Architectural
|
|
258
|
+
## Architectural approach
|
|
259
259
|
|
|
260
260
|
This storage adapter utilizes a **single-table design pattern** leveraging [ElectroDB](https://electrodb.dev/), a common and recommended approach for DynamoDB. This differs architecturally from relational database adapters (like `@mastra/pg` or `@mastra/libsql`) that typically use multiple tables, each dedicated to a specific entity (threads, messages, etc.).
|
|
261
261
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# LanceDB
|
|
1
|
+
# LanceDB storage
|
|
2
2
|
|
|
3
3
|
The LanceDB storage implementation provides a high-performance storage solution using the LanceDB database system, which excels at handling both traditional data storage and vector operations.
|
|
4
4
|
|
|
@@ -51,7 +51,7 @@ const storage = await LanceStorage.create('my-storage', 's3://bucket/db', {
|
|
|
51
51
|
|
|
52
52
|
## Parameters
|
|
53
53
|
|
|
54
|
-
### LanceStorage.create()
|
|
54
|
+
### `LanceStorage.create()`
|
|
55
55
|
|
|
56
56
|
**name** (`string`): Name identifier for the storage instance
|
|
57
57
|
|
|
@@ -59,7 +59,7 @@ const storage = await LanceStorage.create('my-storage', 's3://bucket/db', {
|
|
|
59
59
|
|
|
60
60
|
**options** (`ConnectionOptions`): Connection options for LanceDB, such as timeout settings, authentication, etc.
|
|
61
61
|
|
|
62
|
-
## Additional
|
|
62
|
+
## Additional notes
|
|
63
63
|
|
|
64
64
|
### Schema Management
|
|
65
65
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# MongoDB
|
|
1
|
+
# MongoDB storage
|
|
2
2
|
|
|
3
3
|
The MongoDB storage implementation provides a scalable storage solution using MongoDB databases with support for both document storage and vector operations.
|
|
4
4
|
|
|
@@ -56,7 +56,7 @@ const storage = new MongoDBStore({
|
|
|
56
56
|
|
|
57
57
|
> **Deprecation Notice:** The `url` parameter is deprecated but still supported for backward compatibility. Please use `uri` instead in all new code.
|
|
58
58
|
|
|
59
|
-
## Constructor
|
|
59
|
+
## Constructor examples
|
|
60
60
|
|
|
61
61
|
You can instantiate `MongoDBStore` in the following ways:
|
|
62
62
|
|
|
@@ -84,7 +84,7 @@ const store2 = new MongoDBStore({
|
|
|
84
84
|
})
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
## Additional
|
|
87
|
+
## Additional notes
|
|
88
88
|
|
|
89
89
|
### Collection Management
|
|
90
90
|
|
|
@@ -138,7 +138,7 @@ const thread = await memoryStore?.getThreadById({ threadId: '...' })
|
|
|
138
138
|
|
|
139
139
|
> **Warning:** If `init()` isn't called, collections won't be created and storage operations will fail silently or throw errors.
|
|
140
140
|
|
|
141
|
-
## Vector
|
|
141
|
+
## Vector search capabilities
|
|
142
142
|
|
|
143
143
|
MongoDB storage includes built-in vector search capabilities for AI applications:
|
|
144
144
|
|
|
@@ -190,7 +190,7 @@ const results = await vectorStore.query({
|
|
|
190
190
|
});
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
## Usage
|
|
193
|
+
## Usage example
|
|
194
194
|
|
|
195
195
|
### Adding memory to an agent
|
|
196
196
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# MSSQL
|
|
1
|
+
# MSSQL storage
|
|
2
2
|
|
|
3
3
|
The MSSQL storage implementation provides a production-ready storage solution using Microsoft SQL Server databases.
|
|
4
4
|
|
|
@@ -45,7 +45,7 @@ const storage = new MSSQLStore({
|
|
|
45
45
|
|
|
46
46
|
**schemaName** (`string`): The name of the schema you want the storage to use. Will use the default schema if not provided.
|
|
47
47
|
|
|
48
|
-
## Constructor
|
|
48
|
+
## Constructor examples
|
|
49
49
|
|
|
50
50
|
You can instantiate `MSSQLStore` in the following ways:
|
|
51
51
|
|
|
@@ -89,7 +89,7 @@ const store5 = new MSSQLStore({
|
|
|
89
89
|
})
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
## Additional
|
|
92
|
+
## Additional notes
|
|
93
93
|
|
|
94
94
|
### Schema Management
|
|
95
95
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# PostgreSQL
|
|
1
|
+
# PostgreSQL storage
|
|
2
2
|
|
|
3
3
|
The PostgreSQL storage implementation provides a production-ready storage solution using PostgreSQL databases.
|
|
4
4
|
|
|
@@ -71,7 +71,7 @@ const storage = new PostgresStore({
|
|
|
71
71
|
|
|
72
72
|
**indexes** (`CreateIndexOptions[]`): Custom indexes to create during initialization.
|
|
73
73
|
|
|
74
|
-
## Constructor
|
|
74
|
+
## Constructor examples
|
|
75
75
|
|
|
76
76
|
You can instantiate `PostgresStore` in the following ways:
|
|
77
77
|
|
|
@@ -119,7 +119,7 @@ const store4 = new PostgresStore({
|
|
|
119
119
|
})
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
## Additional
|
|
122
|
+
## Additional notes
|
|
123
123
|
|
|
124
124
|
### Schema Management
|
|
125
125
|
|
|
@@ -316,7 +316,7 @@ This pattern ensures only one `PostgresStore` instance is created regardless of
|
|
|
316
316
|
|
|
317
317
|
> **Tip:** This singleton pattern is only necessary during local development with HMR. In production builds, modules are only loaded once.
|
|
318
318
|
|
|
319
|
-
## Usage
|
|
319
|
+
## Usage example
|
|
320
320
|
|
|
321
321
|
### Adding memory to an agent
|
|
322
322
|
|
|
@@ -387,7 +387,7 @@ for await (const chunk of stream.textStream) {
|
|
|
387
387
|
}
|
|
388
388
|
```
|
|
389
389
|
|
|
390
|
-
## Index
|
|
390
|
+
## Index management
|
|
391
391
|
|
|
392
392
|
PostgreSQL storage provides index management to optimize query performance.
|
|
393
393
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Upstash
|
|
1
|
+
# Upstash storage
|
|
2
2
|
|
|
3
3
|
The Upstash storage implementation provides a serverless-friendly storage solution using Upstash's Redis-compatible key-value store.
|
|
4
4
|
|
|
@@ -52,7 +52,7 @@ const storage = new UpstashStore({
|
|
|
52
52
|
|
|
53
53
|
**prefix** (`string`): Key prefix for all stored items (Default: `mastra:`)
|
|
54
54
|
|
|
55
|
-
## Additional
|
|
55
|
+
## Additional notes
|
|
56
56
|
|
|
57
57
|
### Key Structure
|
|
58
58
|
|
|
@@ -87,7 +87,7 @@ For optimal performance:
|
|
|
87
87
|
- Monitor Redis memory usage
|
|
88
88
|
- Consider data expiration policies if needed
|
|
89
89
|
|
|
90
|
-
## Usage
|
|
90
|
+
## Usage example
|
|
91
91
|
|
|
92
92
|
### Adding memory to an agent
|
|
93
93
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `ChunkType` type defines the mastra format of stream chunks that can be emitted during streaming responses from agents.
|
|
4
4
|
|
|
5
|
-
## Base
|
|
5
|
+
## Base properties
|
|
6
6
|
|
|
7
7
|
All chunks include these base properties:
|
|
8
8
|
|
|
@@ -20,7 +20,7 @@ All chunks include these base properties:
|
|
|
20
20
|
|
|
21
21
|
**from.WORKFLOW** (`'WORKFLOW'`): Chunk from workflow execution
|
|
22
22
|
|
|
23
|
-
## Text
|
|
23
|
+
## Text chunks
|
|
24
24
|
|
|
25
25
|
### text-start
|
|
26
26
|
|
|
@@ -60,7 +60,7 @@ Signals the end of text generation.
|
|
|
60
60
|
|
|
61
61
|
**payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
|
|
62
62
|
|
|
63
|
-
## Reasoning
|
|
63
|
+
## Reasoning chunks
|
|
64
64
|
|
|
65
65
|
### reasoning-start
|
|
66
66
|
|
|
@@ -118,7 +118,7 @@ Contains the reasoning signature from models that support advanced reasoning (li
|
|
|
118
118
|
|
|
119
119
|
**payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
|
|
120
120
|
|
|
121
|
-
## Tool
|
|
121
|
+
## Tool chunks
|
|
122
122
|
|
|
123
123
|
### tool-call
|
|
124
124
|
|
|
@@ -162,7 +162,7 @@ Result from a tool execution.
|
|
|
162
162
|
|
|
163
163
|
**payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
|
|
164
164
|
|
|
165
|
-
### tool-call-input-streaming-start
|
|
165
|
+
### `tool-call-input-streaming-start`
|
|
166
166
|
|
|
167
167
|
Signals the start of streaming tool call arguments.
|
|
168
168
|
|
|
@@ -180,7 +180,7 @@ Signals the start of streaming tool call arguments.
|
|
|
180
180
|
|
|
181
181
|
**payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
|
|
182
182
|
|
|
183
|
-
### tool-call-delta
|
|
183
|
+
### `tool-call-delta`
|
|
184
184
|
|
|
185
185
|
Incremental tool call arguments during streaming.
|
|
186
186
|
|
|
@@ -196,7 +196,7 @@ Incremental tool call arguments during streaming.
|
|
|
196
196
|
|
|
197
197
|
**payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
|
|
198
198
|
|
|
199
|
-
### tool-call-input-streaming-end
|
|
199
|
+
### `tool-call-input-streaming-end`
|
|
200
200
|
|
|
201
201
|
Signals the end of streaming tool call arguments.
|
|
202
202
|
|
|
@@ -230,7 +230,7 @@ An error occurred during tool execution.
|
|
|
230
230
|
|
|
231
231
|
**payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
|
|
232
232
|
|
|
233
|
-
## Source and
|
|
233
|
+
## Source and file chunks
|
|
234
234
|
|
|
235
235
|
### source
|
|
236
236
|
|
|
@@ -270,7 +270,7 @@ Contains file data.
|
|
|
270
270
|
|
|
271
271
|
**payload.providerMetadata** (`SharedV2ProviderMetadata`): Provider-specific metadata
|
|
272
272
|
|
|
273
|
-
## Control
|
|
273
|
+
## Control chunks
|
|
274
274
|
|
|
275
275
|
### start
|
|
276
276
|
|
|
@@ -368,7 +368,7 @@ Stream was aborted.
|
|
|
368
368
|
|
|
369
369
|
**payload.\[key: string]** (`any`): Additional abort data
|
|
370
370
|
|
|
371
|
-
## Object and
|
|
371
|
+
## Object and output chunks
|
|
372
372
|
|
|
373
373
|
### object
|
|
374
374
|
|
|
@@ -398,7 +398,7 @@ Contains output from workflow step execution, used primarily for usage tracking
|
|
|
398
398
|
|
|
399
399
|
**payload.output** (`ChunkType`): Nested chunk data from step execution, typically containing finish events or other step results
|
|
400
400
|
|
|
401
|
-
## Metadata and
|
|
401
|
+
## Metadata and special chunks
|
|
402
402
|
|
|
403
403
|
### response-metadata
|
|
404
404
|
|
|
@@ -442,7 +442,7 @@ Emitted when the stream is forcibly terminated due to content being blocked by a
|
|
|
442
442
|
|
|
443
443
|
**payload.processorId** (`string`): ID of the processor that triggered the tripwire
|
|
444
444
|
|
|
445
|
-
## Usage
|
|
445
|
+
## Usage example
|
|
446
446
|
|
|
447
447
|
```typescript
|
|
448
448
|
const stream = await agent.stream('Hello')
|
|
@@ -477,7 +477,7 @@ for await (const chunk of stream.fullStream) {
|
|
|
477
477
|
}
|
|
478
478
|
```
|
|
479
479
|
|
|
480
|
-
## Related
|
|
480
|
+
## Related types
|
|
481
481
|
|
|
482
482
|
- [.stream()](https://mastra.ai/reference/streaming/agents/stream) - Method that returns streams emitting these chunks
|
|
483
483
|
- [MastraModelOutput](https://mastra.ai/reference/streaming/agents/MastraModelOutput) - The stream object that emits these chunks
|
|
@@ -9,7 +9,7 @@ const stream = await agent.stream('Hello world')
|
|
|
9
9
|
|
|
10
10
|
For setup and basic usage, see the [.stream()](https://mastra.ai/reference/streaming/agents/stream) method documentation.
|
|
11
11
|
|
|
12
|
-
## Streaming
|
|
12
|
+
## Streaming properties
|
|
13
13
|
|
|
14
14
|
These properties provide real-time access to model outputs as they're generated:
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ These properties provide real-time access to model outputs as they're generated:
|
|
|
25
25
|
|
|
26
26
|
**elementStream** (`ReadableStream<OUTPUT extends (infer T)[] ? T : never>`): Stream of individual array elements when the output schema defines an array type. Each element is emitted as it's completed rather than waiting for the entire array.
|
|
27
27
|
|
|
28
|
-
## Promise-based
|
|
28
|
+
## Promise-based properties
|
|
29
29
|
|
|
30
30
|
These properties resolve to final values after the stream completes:
|
|
31
31
|
|
|
@@ -95,7 +95,7 @@ These properties resolve to final values after the stream completes:
|
|
|
95
95
|
|
|
96
96
|
**response.uiMessages** (`UIMessage[]`): Response messages in UI format, includes any metadata added by output processors
|
|
97
97
|
|
|
98
|
-
## Error
|
|
98
|
+
## Error properties
|
|
99
99
|
|
|
100
100
|
**error** (`string | Error | { message: string; stack: string; } | undefined`): Error information if the stream encountered an error. Undefined if no errors occurred. Can be a string message, Error object, or serialized error with stack trace.
|
|
101
101
|
|
|
@@ -123,7 +123,7 @@ These properties resolve to final values after the stream completes:
|
|
|
123
123
|
|
|
124
124
|
**consumeStream.onError** (`(error: Error) => void`): Callback for handling stream errors
|
|
125
125
|
|
|
126
|
-
## Usage
|
|
126
|
+
## Usage examples
|
|
127
127
|
|
|
128
128
|
### Basic Text Streaming
|
|
129
129
|
|
|
@@ -221,7 +221,7 @@ for await (const chunk of stream.fullStream) {
|
|
|
221
221
|
}
|
|
222
222
|
```
|
|
223
223
|
|
|
224
|
-
### Error
|
|
224
|
+
### Error handling
|
|
225
225
|
|
|
226
226
|
```typescript
|
|
227
227
|
const stream = await agent.stream('Analyze this data')
|
|
@@ -246,7 +246,7 @@ if (stream.error) {
|
|
|
246
246
|
}
|
|
247
247
|
```
|
|
248
248
|
|
|
249
|
-
## Related
|
|
249
|
+
## Related types
|
|
250
250
|
|
|
251
251
|
- [.stream()](https://mastra.ai/reference/streaming/agents/stream) - Method that returns MastraModelOutput
|
|
252
252
|
- [ChunkType](https://mastra.ai/reference/streaming/ChunkType) - All possible chunk types in the full stream
|
|
@@ -290,7 +290,7 @@ for await (const chunk of stream.textStream) {
|
|
|
290
290
|
}
|
|
291
291
|
```
|
|
292
292
|
|
|
293
|
-
### Advanced
|
|
293
|
+
### Advanced example with Options
|
|
294
294
|
|
|
295
295
|
```ts
|
|
296
296
|
import { z } from 'zod'
|
|
@@ -323,7 +323,7 @@ await agent.stream('message for agent', {
|
|
|
323
323
|
})
|
|
324
324
|
```
|
|
325
325
|
|
|
326
|
-
## OpenAI WebSocket
|
|
326
|
+
## OpenAI WebSocket transport
|
|
327
327
|
|
|
328
328
|
Opt into OpenAI Responses WebSocket streaming via `providerOptions.openai.transport`. This only applies to streaming calls and is currently supported for direct OpenAI models (for example, `openai/gpt-4o`). If WebSocket streaming is unavailable, Mastra falls back to HTTP streaming. By default, Mastra closes the WebSocket when the stream finishes.
|
|
329
329
|
|
|
@@ -146,7 +146,7 @@ await agent.streamLegacy('message for agent', {
|
|
|
146
146
|
})
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
## Migration to
|
|
149
|
+
## Migration to new API
|
|
150
150
|
|
|
151
151
|
> **Info:** The new `.stream()` method offers enhanced capabilities including AI SDK v5+ compatibility, better structured output handling, and improved callback system. See the [migration guide](https://mastra.ai/guides/migrations/vnext-to-standard-apis) for detailed migration instructions.
|
|
152
152
|
|