@mastra/mcp-docs-server 0.13.37 → 0.13.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/changelogs/%40internal%2Fchangeset-cli.md +2 -0
- package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +2 -0
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +8 -8
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +2 -0
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +23 -23
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +69 -69
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +25 -25
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +15 -15
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +27 -27
- package/.docs/organized/changelogs/%40mastra%2Freact.md +15 -15
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +23 -23
- package/.docs/organized/changelogs/create-mastra.md +5 -5
- package/.docs/organized/changelogs/mastra.md +17 -17
- package/.docs/raw/agents/adding-voice.mdx +20 -9
- package/.docs/raw/agents/agent-memory.mdx +55 -39
- package/.docs/raw/agents/guardrails.mdx +68 -61
- package/.docs/raw/agents/networks.mdx +50 -46
- package/.docs/raw/agents/overview.mdx +125 -88
- package/.docs/raw/agents/using-tools.mdx +14 -15
- package/.docs/raw/auth/auth0.mdx +28 -27
- package/.docs/raw/auth/clerk.mdx +22 -20
- package/.docs/raw/auth/firebase.mdx +42 -39
- package/.docs/raw/auth/index.mdx +1 -1
- package/.docs/raw/auth/jwt.mdx +18 -16
- package/.docs/raw/auth/supabase.mdx +20 -18
- package/.docs/raw/auth/workos.mdx +32 -26
- package/.docs/raw/community/contributing-templates.mdx +7 -7
- package/.docs/raw/community/discord.mdx +2 -2
- package/.docs/raw/community/licensing.mdx +1 -1
- package/.docs/raw/course/03-agent-memory/26-updating-mastra-export-comprehensive.md +0 -32
- package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +41 -22
- package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +48 -29
- package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +52 -24
- package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +86 -55
- package/.docs/raw/deployment/cloud-providers/index.mdx +16 -13
- package/.docs/raw/deployment/monorepo.mdx +32 -42
- package/.docs/raw/deployment/overview.mdx +15 -15
- package/.docs/raw/deployment/server-deployment.mdx +18 -23
- package/.docs/raw/deployment/serverless-platforms/cloudflare-deployer.mdx +16 -17
- package/.docs/raw/deployment/serverless-platforms/index.mdx +15 -12
- package/.docs/raw/deployment/serverless-platforms/netlify-deployer.mdx +14 -23
- package/.docs/raw/deployment/serverless-platforms/vercel-deployer.mdx +16 -23
- package/.docs/raw/deployment/web-framework.mdx +14 -14
- package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +138 -145
- package/.docs/raw/frameworks/agentic-uis/assistant-ui.mdx +54 -43
- package/.docs/raw/frameworks/agentic-uis/cedar-os.mdx +51 -36
- package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +161 -120
- package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +59 -48
- package/.docs/raw/frameworks/servers/express.mdx +45 -44
- package/.docs/raw/frameworks/web-frameworks/astro.mdx +245 -162
- package/.docs/raw/frameworks/web-frameworks/next-js.mdx +112 -69
- package/.docs/raw/frameworks/web-frameworks/sveltekit.mdx +189 -164
- package/.docs/raw/frameworks/web-frameworks/vite-react.mdx +94 -81
- package/.docs/raw/getting-started/installation.mdx +164 -133
- package/.docs/raw/getting-started/mcp-docs-server.mdx +36 -39
- package/.docs/raw/getting-started/project-structure.mdx +34 -42
- package/.docs/raw/getting-started/studio.mdx +40 -58
- package/.docs/raw/getting-started/templates.mdx +22 -27
- package/.docs/raw/index.mdx +9 -9
- package/.docs/raw/mastra-cloud/dashboard.mdx +10 -10
- package/.docs/raw/mastra-cloud/observability.mdx +7 -8
- package/.docs/raw/mastra-cloud/overview.mdx +16 -22
- package/.docs/raw/mastra-cloud/setting-up.mdx +33 -20
- package/.docs/raw/memory/conversation-history.mdx +2 -2
- package/.docs/raw/memory/overview.mdx +21 -23
- package/.docs/raw/memory/semantic-recall.mdx +14 -13
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +27 -28
- package/.docs/raw/memory/storage/memory-with-pg.mdx +26 -26
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +26 -27
- package/.docs/raw/memory/threads-and-resources.mdx +23 -20
- package/.docs/raw/memory/working-memory.mdx +27 -38
- package/.docs/raw/observability/ai-tracing/exporters/arize.mdx +30 -29
- package/.docs/raw/observability/ai-tracing/exporters/braintrust.mdx +8 -9
- package/.docs/raw/observability/ai-tracing/exporters/cloud.mdx +17 -16
- package/.docs/raw/observability/ai-tracing/exporters/default.mdx +31 -32
- package/.docs/raw/observability/ai-tracing/exporters/langfuse.mdx +18 -17
- package/.docs/raw/observability/ai-tracing/exporters/langsmith.mdx +14 -14
- package/.docs/raw/observability/ai-tracing/exporters/otel.mdx +56 -46
- package/.docs/raw/observability/ai-tracing/overview.mdx +145 -122
- package/.docs/raw/observability/ai-tracing/processors/sensitive-data-filter.mdx +57 -36
- package/.docs/raw/observability/logging.mdx +14 -17
- package/.docs/raw/observability/nextjs-tracing.mdx +5 -5
- package/.docs/raw/observability/otel-tracing.mdx +17 -18
- package/.docs/raw/observability/overview.mdx +14 -10
- package/.docs/raw/rag/chunking-and-embedding.mdx +10 -8
- package/.docs/raw/rag/overview.mdx +5 -5
- package/.docs/raw/rag/retrieval.mdx +125 -107
- package/.docs/raw/rag/vector-databases.mdx +232 -223
- package/.docs/raw/reference/agents/agent.mdx +54 -41
- package/.docs/raw/reference/agents/generate.mdx +367 -261
- package/.docs/raw/reference/agents/generateLegacy.mdx +260 -178
- package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +7 -5
- package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +7 -5
- package/.docs/raw/reference/agents/getDescription.mdx +3 -2
- package/.docs/raw/reference/agents/getInstructions.mdx +7 -5
- package/.docs/raw/reference/agents/getLLM.mdx +11 -7
- package/.docs/raw/reference/agents/getMemory.mdx +7 -5
- package/.docs/raw/reference/agents/getModel.mdx +7 -5
- package/.docs/raw/reference/agents/getScorers.mdx +7 -5
- package/.docs/raw/reference/agents/getTools.mdx +7 -5
- package/.docs/raw/reference/agents/getVoice.mdx +7 -5
- package/.docs/raw/reference/agents/getWorkflows.mdx +7 -5
- package/.docs/raw/reference/agents/listAgents.mdx +6 -4
- package/.docs/raw/reference/agents/network.mdx +171 -116
- package/.docs/raw/reference/auth/auth0.mdx +18 -14
- package/.docs/raw/reference/auth/clerk.mdx +15 -12
- package/.docs/raw/reference/auth/firebase.mdx +23 -16
- package/.docs/raw/reference/auth/jwt.mdx +7 -6
- package/.docs/raw/reference/auth/supabase.mdx +13 -10
- package/.docs/raw/reference/auth/workos.mdx +17 -13
- package/.docs/raw/reference/cli/create-mastra.mdx +61 -44
- package/.docs/raw/reference/cli/mastra.mdx +11 -11
- package/.docs/raw/reference/client-js/agents.mdx +40 -43
- package/.docs/raw/reference/client-js/error-handling.mdx +1 -1
- package/.docs/raw/reference/client-js/logs.mdx +1 -1
- package/.docs/raw/reference/client-js/mastra-client.mdx +21 -13
- package/.docs/raw/reference/client-js/memory.mdx +6 -2
- package/.docs/raw/reference/client-js/observability.mdx +10 -9
- package/.docs/raw/reference/client-js/telemetry.mdx +1 -1
- package/.docs/raw/reference/client-js/tools.mdx +1 -1
- package/.docs/raw/reference/client-js/vectors.mdx +1 -1
- package/.docs/raw/reference/client-js/workflows-legacy.mdx +1 -1
- package/.docs/raw/reference/client-js/workflows.mdx +7 -7
- package/.docs/raw/reference/core/getAgent.mdx +6 -5
- package/.docs/raw/reference/core/getAgentById.mdx +5 -4
- package/.docs/raw/reference/core/getAgents.mdx +3 -3
- package/.docs/raw/reference/core/getDeployer.mdx +4 -3
- package/.docs/raw/reference/core/getLogger.mdx +4 -3
- package/.docs/raw/reference/core/getLogs.mdx +10 -6
- package/.docs/raw/reference/core/getLogsByRunId.mdx +8 -5
- package/.docs/raw/reference/core/getMCPServer.mdx +8 -5
- package/.docs/raw/reference/core/getMCPServers.mdx +4 -3
- package/.docs/raw/reference/core/getMemory.mdx +4 -3
- package/.docs/raw/reference/core/getScorer.mdx +15 -12
- package/.docs/raw/reference/core/getScorerByName.mdx +12 -9
- package/.docs/raw/reference/core/getScorers.mdx +3 -2
- package/.docs/raw/reference/core/getServer.mdx +4 -3
- package/.docs/raw/reference/core/getStorage.mdx +4 -3
- package/.docs/raw/reference/core/getTelemetry.mdx +4 -3
- package/.docs/raw/reference/core/getVector.mdx +6 -4
- package/.docs/raw/reference/core/getVectors.mdx +4 -3
- package/.docs/raw/reference/core/getWorkflow.mdx +7 -4
- package/.docs/raw/reference/core/getWorkflows.mdx +5 -3
- package/.docs/raw/reference/core/mastra-class.mdx +16 -16
- package/.docs/raw/reference/core/setLogger.mdx +6 -4
- package/.docs/raw/reference/core/setStorage.mdx +4 -4
- package/.docs/raw/reference/core/setTelemetry.mdx +4 -3
- package/.docs/raw/reference/deployer/cloudflare.mdx +11 -7
- package/.docs/raw/reference/deployer/deployer.mdx +2 -1
- package/.docs/raw/reference/deployer/netlify.mdx +4 -4
- package/.docs/raw/reference/deployer/vercel.mdx +6 -6
- package/.docs/raw/reference/evals/answer-relevancy.mdx +4 -5
- package/.docs/raw/reference/evals/bias.mdx +4 -5
- package/.docs/raw/reference/evals/completeness.mdx +4 -5
- package/.docs/raw/reference/evals/content-similarity.mdx +4 -5
- package/.docs/raw/reference/evals/context-position.mdx +4 -5
- package/.docs/raw/reference/evals/context-precision.mdx +4 -5
- package/.docs/raw/reference/evals/context-relevancy.mdx +4 -5
- package/.docs/raw/reference/evals/contextual-recall.mdx +4 -5
- package/.docs/raw/reference/evals/faithfulness.mdx +4 -5
- package/.docs/raw/reference/evals/hallucination.mdx +4 -6
- package/.docs/raw/reference/evals/keyword-coverage.mdx +4 -5
- package/.docs/raw/reference/evals/prompt-alignment.mdx +4 -6
- package/.docs/raw/reference/evals/summarization.mdx +4 -6
- package/.docs/raw/reference/evals/textual-difference.mdx +4 -5
- package/.docs/raw/reference/evals/tone-consistency.mdx +4 -7
- package/.docs/raw/reference/evals/toxicity.mdx +4 -5
- package/.docs/raw/reference/index.mdx +3 -3
- package/.docs/raw/reference/legacyWorkflows/after.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/afterEvent.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/commit.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/createRun.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/else.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/events.mdx +7 -7
- package/.docs/raw/reference/legacyWorkflows/execute.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/if.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/resume.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/resumeWithEvent.mdx +6 -6
- package/.docs/raw/reference/legacyWorkflows/snapshots.mdx +6 -6
- package/.docs/raw/reference/legacyWorkflows/start.mdx +6 -6
- package/.docs/raw/reference/legacyWorkflows/step-class.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/step-condition.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/step-function.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/step-options.mdx +6 -6
- package/.docs/raw/reference/legacyWorkflows/step-retries.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/suspend.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/then.mdx +5 -5
- package/.docs/raw/reference/legacyWorkflows/until.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/watch.mdx +3 -3
- package/.docs/raw/reference/legacyWorkflows/while.mdx +4 -4
- package/.docs/raw/reference/legacyWorkflows/workflow.mdx +7 -7
- package/.docs/raw/reference/memory/createThread.mdx +10 -10
- package/.docs/raw/reference/memory/deleteMessages.mdx +7 -5
- package/.docs/raw/reference/memory/getThreadById.mdx +6 -5
- package/.docs/raw/reference/memory/getThreadsByResourceId.mdx +11 -10
- package/.docs/raw/reference/memory/getThreadsByResourceIdPaginated.mdx +10 -9
- package/.docs/raw/reference/memory/{Memory.mdx → memory-class.mdx} +53 -46
- package/.docs/raw/reference/memory/query.mdx +39 -25
- package/.docs/raw/reference/observability/ai-tracing/ai-tracing.mdx +9 -5
- package/.docs/raw/reference/observability/ai-tracing/configuration.mdx +26 -22
- package/.docs/raw/reference/observability/ai-tracing/exporters/arize.mdx +16 -12
- package/.docs/raw/reference/observability/ai-tracing/exporters/braintrust.mdx +14 -14
- package/.docs/raw/reference/observability/ai-tracing/exporters/cloud-exporter.mdx +16 -11
- package/.docs/raw/reference/observability/ai-tracing/exporters/console-exporter.mdx +10 -6
- package/.docs/raw/reference/observability/ai-tracing/exporters/default-exporter.mdx +23 -15
- package/.docs/raw/reference/observability/ai-tracing/exporters/langfuse.mdx +6 -6
- package/.docs/raw/reference/observability/ai-tracing/exporters/langsmith.mdx +13 -13
- package/.docs/raw/reference/observability/ai-tracing/exporters/otel.mdx +44 -36
- package/.docs/raw/reference/observability/ai-tracing/interfaces.mdx +115 -106
- package/.docs/raw/reference/observability/ai-tracing/processors/sensitive-data-filter.mdx +37 -32
- package/.docs/raw/reference/observability/ai-tracing/span.mdx +29 -26
- package/.docs/raw/reference/observability/logging/pino-logger.mdx +13 -15
- package/.docs/raw/reference/observability/otel-tracing/otel-config.mdx +2 -2
- package/.docs/raw/reference/observability/otel-tracing/providers/arize-ax.mdx +3 -3
- package/.docs/raw/reference/observability/otel-tracing/providers/arize-phoenix.mdx +2 -1
- package/.docs/raw/reference/observability/otel-tracing/providers/dash0.mdx +1 -1
- package/.docs/raw/reference/observability/otel-tracing/providers/index.mdx +12 -14
- package/.docs/raw/reference/observability/otel-tracing/providers/keywordsai.mdx +3 -3
- package/.docs/raw/reference/observability/otel-tracing/providers/laminar.mdx +1 -1
- package/.docs/raw/reference/observability/otel-tracing/providers/langfuse.mdx +4 -4
- package/.docs/raw/reference/observability/otel-tracing/providers/langsmith.mdx +1 -1
- package/.docs/raw/reference/observability/otel-tracing/providers/langwatch.mdx +2 -2
- package/.docs/raw/reference/observability/otel-tracing/providers/new-relic.mdx +1 -1
- package/.docs/raw/reference/observability/otel-tracing/providers/signoz.mdx +1 -1
- package/.docs/raw/reference/observability/otel-tracing/providers/traceloop.mdx +1 -1
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +13 -10
- package/.docs/raw/reference/processors/language-detector.mdx +27 -17
- package/.docs/raw/reference/processors/moderation-processor.mdx +26 -17
- package/.docs/raw/reference/processors/pii-detector.mdx +28 -18
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +25 -17
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +26 -17
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +22 -15
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +13 -12
- package/.docs/raw/reference/rag/chunk.mdx +41 -23
- package/.docs/raw/reference/rag/database-config.mdx +56 -38
- package/.docs/raw/reference/rag/document.mdx +1 -1
- package/.docs/raw/reference/rag/embeddings.mdx +1 -1
- package/.docs/raw/reference/rag/extract-params.mdx +1 -1
- package/.docs/raw/reference/rag/graph-rag.mdx +1 -1
- package/.docs/raw/reference/rag/metadata-filters.mdx +23 -26
- package/.docs/raw/reference/rag/rerank.mdx +1 -1
- package/.docs/raw/reference/rag/rerankWithScorer.mdx +2 -2
- package/.docs/raw/reference/scorers/answer-relevancy.mdx +35 -17
- package/.docs/raw/reference/scorers/answer-similarity.mdx +84 -68
- package/.docs/raw/reference/scorers/bias.mdx +22 -19
- package/.docs/raw/reference/scorers/completeness.mdx +21 -16
- package/.docs/raw/reference/scorers/content-similarity.mdx +12 -10
- package/.docs/raw/reference/scorers/context-precision.mdx +73 -64
- package/.docs/raw/reference/scorers/context-relevance.mdx +142 -126
- package/.docs/raw/reference/scorers/create-scorer.mdx +93 -61
- package/.docs/raw/reference/scorers/faithfulness.mdx +21 -13
- package/.docs/raw/reference/scorers/hallucination.mdx +17 -12
- package/.docs/raw/reference/scorers/keyword-coverage.mdx +32 -27
- package/.docs/raw/reference/scorers/mastra-scorer.mdx +39 -33
- package/.docs/raw/reference/scorers/noise-sensitivity.mdx +203 -152
- package/.docs/raw/reference/scorers/prompt-alignment.mdx +186 -132
- package/.docs/raw/reference/scorers/run-experiment.mdx +40 -31
- package/.docs/raw/reference/scorers/textual-difference.mdx +25 -26
- package/.docs/raw/reference/scorers/tone-consistency.mdx +29 -26
- package/.docs/raw/reference/scorers/tool-call-accuracy.mdx +180 -176
- package/.docs/raw/reference/scorers/toxicity.mdx +35 -31
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +1 -1
- package/.docs/raw/reference/storage/cloudflare.mdx +1 -1
- package/.docs/raw/reference/storage/dynamodb.mdx +1 -1
- package/.docs/raw/reference/storage/lance.mdx +1 -1
- package/.docs/raw/reference/storage/libsql.mdx +2 -2
- package/.docs/raw/reference/storage/mongodb.mdx +4 -5
- package/.docs/raw/reference/storage/mssql.mdx +5 -4
- package/.docs/raw/reference/storage/postgresql.mdx +35 -33
- package/.docs/raw/reference/storage/upstash.mdx +6 -5
- package/.docs/raw/reference/streaming/ChunkType.mdx +788 -314
- package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +265 -109
- package/.docs/raw/reference/streaming/agents/stream.mdx +375 -266
- package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +233 -162
- package/.docs/raw/reference/streaming/workflows/observeStream.mdx +4 -4
- package/.docs/raw/reference/streaming/workflows/observeStreamVNext.mdx +5 -5
- package/.docs/raw/reference/streaming/workflows/resumeStreamVNext.mdx +24 -20
- package/.docs/raw/reference/streaming/workflows/stream.mdx +35 -26
- package/.docs/raw/reference/streaming/workflows/streamVNext.mdx +36 -27
- package/.docs/raw/reference/templates/overview.mdx +16 -39
- package/.docs/raw/reference/tools/client.mdx +1 -1
- package/.docs/raw/reference/tools/create-tool.mdx +45 -35
- package/.docs/raw/reference/tools/document-chunker-tool.mdx +2 -2
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +12 -12
- package/.docs/raw/reference/tools/mcp-client.mdx +70 -64
- package/.docs/raw/reference/tools/mcp-server.mdx +91 -78
- package/.docs/raw/reference/tools/vector-query-tool.mdx +48 -38
- package/.docs/raw/reference/vectors/astra.mdx +1 -1
- package/.docs/raw/reference/vectors/chroma.mdx +25 -19
- package/.docs/raw/reference/vectors/couchbase.mdx +4 -4
- package/.docs/raw/reference/vectors/lance.mdx +5 -6
- package/.docs/raw/reference/vectors/libsql.mdx +1 -1
- package/.docs/raw/reference/vectors/mongodb.mdx +1 -1
- package/.docs/raw/reference/vectors/opensearch.mdx +1 -1
- package/.docs/raw/reference/vectors/pg.mdx +8 -4
- package/.docs/raw/reference/vectors/pinecone.mdx +1 -1
- package/.docs/raw/reference/vectors/qdrant.mdx +1 -1
- package/.docs/raw/reference/vectors/s3vectors.mdx +35 -27
- package/.docs/raw/reference/vectors/turbopuffer.mdx +1 -1
- package/.docs/raw/reference/vectors/upstash.mdx +33 -25
- package/.docs/raw/reference/vectors/vectorize.mdx +1 -1
- package/.docs/raw/reference/voice/azure.mdx +1 -1
- package/.docs/raw/reference/voice/cloudflare.mdx +1 -1
- package/.docs/raw/reference/voice/composite-voice.mdx +1 -1
- package/.docs/raw/reference/voice/deepgram.mdx +1 -1
- package/.docs/raw/reference/voice/elevenlabs.mdx +1 -1
- package/.docs/raw/reference/voice/google-gemini-live.mdx +6 -4
- package/.docs/raw/reference/voice/google.mdx +1 -1
- package/.docs/raw/reference/voice/mastra-voice.mdx +1 -1
- package/.docs/raw/reference/voice/murf.mdx +1 -1
- package/.docs/raw/reference/voice/openai-realtime.mdx +1 -1
- package/.docs/raw/reference/voice/openai.mdx +1 -1
- package/.docs/raw/reference/voice/playai.mdx +1 -1
- package/.docs/raw/reference/voice/sarvam.mdx +1 -1
- package/.docs/raw/reference/voice/speechify.mdx +1 -1
- package/.docs/raw/reference/voice/voice.addInstructions.mdx +1 -1
- package/.docs/raw/reference/voice/voice.addTools.mdx +1 -1
- package/.docs/raw/reference/voice/voice.answer.mdx +1 -1
- package/.docs/raw/reference/voice/voice.close.mdx +1 -1
- package/.docs/raw/reference/voice/voice.connect.mdx +1 -1
- package/.docs/raw/reference/voice/voice.events.mdx +1 -1
- package/.docs/raw/reference/voice/voice.getSpeakers.mdx +23 -30
- package/.docs/raw/reference/voice/voice.listen.mdx +1 -1
- package/.docs/raw/reference/voice/voice.off.mdx +1 -1
- package/.docs/raw/reference/voice/voice.on.mdx +1 -1
- package/.docs/raw/reference/voice/voice.send.mdx +1 -1
- package/.docs/raw/reference/voice/voice.speak.mdx +1 -1
- package/.docs/raw/reference/voice/voice.updateConfig.mdx +1 -1
- package/.docs/raw/reference/workflows/run-methods/cancel.mdx +4 -3
- package/.docs/raw/reference/workflows/run-methods/resume.mdx +49 -34
- package/.docs/raw/reference/workflows/run-methods/start.mdx +43 -31
- package/.docs/raw/reference/workflows/run-methods/watch.mdx +7 -8
- package/.docs/raw/reference/workflows/run.mdx +7 -10
- package/.docs/raw/reference/workflows/step.mdx +15 -12
- package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +7 -7
- package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/map.mdx +3 -2
- package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +5 -5
- package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +3 -2
- package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +3 -2
- package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +3 -3
- package/.docs/raw/reference/workflows/workflow.mdx +13 -10
- package/.docs/raw/scorers/custom-scorers.mdx +58 -48
- package/.docs/raw/scorers/evals-old-api/custom-eval.mdx +6 -8
- package/.docs/raw/scorers/evals-old-api/overview.mdx +8 -8
- package/.docs/raw/scorers/evals-old-api/running-in-ci.mdx +9 -9
- package/.docs/raw/scorers/evals-old-api/textual-evals.mdx +5 -5
- package/.docs/raw/scorers/off-the-shelf-scorers.mdx +3 -1
- package/.docs/raw/scorers/overview.mdx +20 -19
- package/.docs/raw/server-db/custom-api-routes.mdx +8 -8
- package/.docs/raw/server-db/mastra-client.mdx +56 -54
- package/.docs/raw/server-db/middleware.mdx +11 -7
- package/.docs/raw/server-db/production-server.mdx +5 -7
- package/.docs/raw/server-db/runtime-context.mdx +41 -38
- package/.docs/raw/server-db/storage.mdx +82 -87
- package/.docs/raw/streaming/events.mdx +24 -16
- package/.docs/raw/streaming/overview.mdx +17 -18
- package/.docs/raw/streaming/tool-streaming.mdx +9 -10
- package/.docs/raw/streaming/workflow-streaming.mdx +14 -12
- package/.docs/raw/tools-mcp/advanced-usage.mdx +2 -2
- package/.docs/raw/tools-mcp/mcp-overview.mdx +92 -102
- package/.docs/raw/tools-mcp/overview.mdx +9 -14
- package/.docs/raw/voice/overview.mdx +273 -250
- package/.docs/raw/voice/speech-to-speech.mdx +14 -12
- package/.docs/raw/voice/speech-to-text.mdx +2 -2
- package/.docs/raw/voice/text-to-speech.mdx +2 -2
- package/.docs/raw/workflows/agents-and-tools.mdx +29 -28
- package/.docs/raw/workflows/control-flow.mdx +24 -24
- package/.docs/raw/workflows/error-handling.mdx +15 -17
- package/.docs/raw/workflows/human-in-the-loop.mdx +39 -39
- package/.docs/raw/workflows/inngest-workflow.mdx +33 -29
- package/.docs/raw/workflows/input-data-mapping.mdx +9 -9
- package/.docs/raw/workflows/overview.mdx +60 -60
- package/.docs/raw/workflows/snapshots.mdx +54 -36
- package/.docs/raw/workflows/suspend-and-resume.mdx +52 -57
- package/.docs/raw/workflows-legacy/control-flow.mdx +15 -17
- package/.docs/raw/workflows-legacy/dynamic-workflows.mdx +3 -1
- package/.docs/raw/workflows-legacy/error-handling.mdx +8 -6
- package/.docs/raw/workflows-legacy/nested-workflows.mdx +6 -0
- package/.docs/raw/workflows-legacy/overview.mdx +28 -26
- package/.docs/raw/workflows-legacy/runtime-variables.mdx +4 -2
- package/.docs/raw/workflows-legacy/steps.mdx +5 -3
- package/.docs/raw/workflows-legacy/suspend-and-resume.mdx +10 -8
- package/.docs/raw/workflows-legacy/variables.mdx +10 -8
- package/CHANGELOG.md +14 -0
- package/package.json +5 -5
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +0 -148
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Reference: ChunkType |
|
|
2
|
+
title: "Reference: ChunkType | Streaming | Mastra Docs"
|
|
3
3
|
description: "Documentation for the ChunkType type used in Mastra streaming responses, defining all possible chunk types and their payloads."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import { PropertiesTable } from "@/components/properties-table";
|
|
6
|
+
import PropertiesTable from "@site/src/components/PropertiesTable";
|
|
8
7
|
|
|
9
8
|
# ChunkType
|
|
10
9
|
|
|
@@ -19,27 +18,45 @@ All chunks include these base properties:
|
|
|
19
18
|
{
|
|
20
19
|
name: "type",
|
|
21
20
|
type: "string",
|
|
22
|
-
description: "The specific chunk type identifier"
|
|
21
|
+
description: "The specific chunk type identifier",
|
|
23
22
|
},
|
|
24
23
|
{
|
|
25
24
|
name: "runId",
|
|
26
25
|
type: "string",
|
|
27
|
-
description: "Unique identifier for this execution run"
|
|
26
|
+
description: "Unique identifier for this execution run",
|
|
28
27
|
},
|
|
29
28
|
{
|
|
30
29
|
name: "from",
|
|
31
30
|
type: "ChunkFrom",
|
|
32
31
|
description: "Source of the chunk",
|
|
33
|
-
properties: [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
properties: [
|
|
33
|
+
{
|
|
34
|
+
type: "enum",
|
|
35
|
+
parameters: [
|
|
36
|
+
{
|
|
37
|
+
name: "AGENT",
|
|
38
|
+
type: "'AGENT'",
|
|
39
|
+
description: "Chunk from agent execution",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "USER",
|
|
43
|
+
type: "'USER'",
|
|
44
|
+
description: "Chunk from user input",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "SYSTEM",
|
|
48
|
+
type: "'SYSTEM'",
|
|
49
|
+
description: "Chunk from system processes",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "WORKFLOW",
|
|
53
|
+
type: "'WORKFLOW'",
|
|
54
|
+
description: "Chunk from workflow execution",
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
43
60
|
]}
|
|
44
61
|
/>
|
|
45
62
|
|
|
@@ -54,20 +71,31 @@ Signals the beginning of text generation.
|
|
|
54
71
|
{
|
|
55
72
|
name: "type",
|
|
56
73
|
type: '"text-start"',
|
|
57
|
-
description: "Chunk type identifier"
|
|
74
|
+
description: "Chunk type identifier",
|
|
58
75
|
},
|
|
59
76
|
{
|
|
60
77
|
name: "payload",
|
|
61
78
|
type: "TextStartPayload",
|
|
62
79
|
description: "Text start information",
|
|
63
|
-
properties: [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
80
|
+
properties: [
|
|
81
|
+
{
|
|
82
|
+
type: "TextStartPayload",
|
|
83
|
+
parameters: [
|
|
84
|
+
{
|
|
85
|
+
name: "id",
|
|
86
|
+
type: "string",
|
|
87
|
+
description: "Unique identifier for this text generation",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "providerMetadata",
|
|
91
|
+
type: "SharedV2ProviderMetadata",
|
|
92
|
+
isOptional: true,
|
|
93
|
+
description: "Provider-specific metadata",
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
},
|
|
71
99
|
]}
|
|
72
100
|
/>
|
|
73
101
|
|
|
@@ -80,21 +108,36 @@ Incremental text content during generation.
|
|
|
80
108
|
{
|
|
81
109
|
name: "type",
|
|
82
110
|
type: '"text-delta"',
|
|
83
|
-
description: "Chunk type identifier"
|
|
111
|
+
description: "Chunk type identifier",
|
|
84
112
|
},
|
|
85
113
|
{
|
|
86
114
|
name: "payload",
|
|
87
115
|
type: "TextDeltaPayload",
|
|
88
116
|
description: "Incremental text content",
|
|
89
|
-
properties: [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
117
|
+
properties: [
|
|
118
|
+
{
|
|
119
|
+
type: "TextDeltaPayload",
|
|
120
|
+
parameters: [
|
|
121
|
+
{
|
|
122
|
+
name: "id",
|
|
123
|
+
type: "string",
|
|
124
|
+
description: "Unique identifier for this text generation",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: "text",
|
|
128
|
+
type: "string",
|
|
129
|
+
description: "The incremental text content",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: "providerMetadata",
|
|
133
|
+
type: "SharedV2ProviderMetadata",
|
|
134
|
+
isOptional: true,
|
|
135
|
+
description: "Provider-specific metadata",
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
},
|
|
98
141
|
]}
|
|
99
142
|
/>
|
|
100
143
|
|
|
@@ -107,20 +150,31 @@ Signals the end of text generation.
|
|
|
107
150
|
{
|
|
108
151
|
name: "type",
|
|
109
152
|
type: '"text-end"',
|
|
110
|
-
description: "Chunk type identifier"
|
|
153
|
+
description: "Chunk type identifier",
|
|
111
154
|
},
|
|
112
155
|
{
|
|
113
156
|
name: "payload",
|
|
114
157
|
type: "TextEndPayload",
|
|
115
158
|
description: "Text end information",
|
|
116
|
-
properties: [
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
159
|
+
properties: [
|
|
160
|
+
{
|
|
161
|
+
type: "TextEndPayload",
|
|
162
|
+
parameters: [
|
|
163
|
+
{
|
|
164
|
+
name: "id",
|
|
165
|
+
type: "string",
|
|
166
|
+
description: "Unique identifier for this text generation",
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: "providerMetadata",
|
|
170
|
+
type: "SharedV2ProviderMetadata",
|
|
171
|
+
isOptional: true,
|
|
172
|
+
description: "Provider-specific metadata",
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
},
|
|
124
178
|
]}
|
|
125
179
|
/>
|
|
126
180
|
|
|
@@ -135,21 +189,37 @@ Signals the beginning of reasoning generation (for models that support reasoning
|
|
|
135
189
|
{
|
|
136
190
|
name: "type",
|
|
137
191
|
type: '"reasoning-start"',
|
|
138
|
-
description: "Chunk type identifier"
|
|
192
|
+
description: "Chunk type identifier",
|
|
139
193
|
},
|
|
140
194
|
{
|
|
141
195
|
name: "payload",
|
|
142
196
|
type: "ReasoningStartPayload",
|
|
143
197
|
description: "Reasoning start information",
|
|
144
|
-
properties: [
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
198
|
+
properties: [
|
|
199
|
+
{
|
|
200
|
+
type: "ReasoningStartPayload",
|
|
201
|
+
parameters: [
|
|
202
|
+
{
|
|
203
|
+
name: "id",
|
|
204
|
+
type: "string",
|
|
205
|
+
description: "Unique identifier for this reasoning generation",
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: "signature",
|
|
209
|
+
type: "string",
|
|
210
|
+
isOptional: true,
|
|
211
|
+
description: "Reasoning signature if available",
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: "providerMetadata",
|
|
215
|
+
type: "SharedV2ProviderMetadata",
|
|
216
|
+
isOptional: true,
|
|
217
|
+
description: "Provider-specific metadata",
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
},
|
|
153
223
|
]}
|
|
154
224
|
/>
|
|
155
225
|
|
|
@@ -162,21 +232,36 @@ Incremental reasoning text during generation.
|
|
|
162
232
|
{
|
|
163
233
|
name: "type",
|
|
164
234
|
type: '"reasoning-delta"',
|
|
165
|
-
description: "Chunk type identifier"
|
|
235
|
+
description: "Chunk type identifier",
|
|
166
236
|
},
|
|
167
237
|
{
|
|
168
238
|
name: "payload",
|
|
169
239
|
type: "ReasoningDeltaPayload",
|
|
170
240
|
description: "Incremental reasoning content",
|
|
171
|
-
properties: [
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
241
|
+
properties: [
|
|
242
|
+
{
|
|
243
|
+
type: "ReasoningDeltaPayload",
|
|
244
|
+
parameters: [
|
|
245
|
+
{
|
|
246
|
+
name: "id",
|
|
247
|
+
type: "string",
|
|
248
|
+
description: "Unique identifier for this reasoning generation",
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: "text",
|
|
252
|
+
type: "string",
|
|
253
|
+
description: "The incremental reasoning text",
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
name: "providerMetadata",
|
|
257
|
+
type: "SharedV2ProviderMetadata",
|
|
258
|
+
isOptional: true,
|
|
259
|
+
description: "Provider-specific metadata",
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
},
|
|
263
|
+
],
|
|
264
|
+
},
|
|
180
265
|
]}
|
|
181
266
|
/>
|
|
182
267
|
|
|
@@ -189,21 +274,37 @@ Signals the end of reasoning generation.
|
|
|
189
274
|
{
|
|
190
275
|
name: "type",
|
|
191
276
|
type: '"reasoning-end"',
|
|
192
|
-
description: "Chunk type identifier"
|
|
277
|
+
description: "Chunk type identifier",
|
|
193
278
|
},
|
|
194
279
|
{
|
|
195
280
|
name: "payload",
|
|
196
281
|
type: "ReasoningEndPayload",
|
|
197
282
|
description: "Reasoning end information",
|
|
198
|
-
properties: [
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
283
|
+
properties: [
|
|
284
|
+
{
|
|
285
|
+
type: "ReasoningEndPayload",
|
|
286
|
+
parameters: [
|
|
287
|
+
{
|
|
288
|
+
name: "id",
|
|
289
|
+
type: "string",
|
|
290
|
+
description: "Unique identifier for this reasoning generation",
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
name: "signature",
|
|
294
|
+
type: "string",
|
|
295
|
+
isOptional: true,
|
|
296
|
+
description: "Final reasoning signature if available",
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
name: "providerMetadata",
|
|
300
|
+
type: "SharedV2ProviderMetadata",
|
|
301
|
+
isOptional: true,
|
|
302
|
+
description: "Provider-specific metadata",
|
|
303
|
+
},
|
|
304
|
+
],
|
|
305
|
+
},
|
|
306
|
+
],
|
|
307
|
+
},
|
|
207
308
|
]}
|
|
208
309
|
/>
|
|
209
310
|
|
|
@@ -216,21 +317,38 @@ Contains the reasoning signature from models that support advanced reasoning (li
|
|
|
216
317
|
{
|
|
217
318
|
name: "type",
|
|
218
319
|
type: '"reasoning-signature"',
|
|
219
|
-
description: "Chunk type identifier"
|
|
320
|
+
description: "Chunk type identifier",
|
|
220
321
|
},
|
|
221
322
|
{
|
|
222
323
|
name: "payload",
|
|
223
324
|
type: "ReasoningSignaturePayload",
|
|
224
|
-
description:
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
325
|
+
description:
|
|
326
|
+
"Metadata about the model's reasoning process characteristics",
|
|
327
|
+
properties: [
|
|
328
|
+
{
|
|
329
|
+
type: "ReasoningSignaturePayload",
|
|
330
|
+
parameters: [
|
|
331
|
+
{
|
|
332
|
+
name: "id",
|
|
333
|
+
type: "string",
|
|
334
|
+
description: "Unique identifier for the reasoning session",
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
name: "signature",
|
|
338
|
+
type: "string",
|
|
339
|
+
description:
|
|
340
|
+
"Signature describing the reasoning approach or effort level (e.g., reasoning effort settings)",
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: "providerMetadata",
|
|
344
|
+
type: "SharedV2ProviderMetadata",
|
|
345
|
+
isOptional: true,
|
|
346
|
+
description: "Provider-specific metadata",
|
|
347
|
+
},
|
|
348
|
+
],
|
|
349
|
+
},
|
|
350
|
+
],
|
|
351
|
+
},
|
|
234
352
|
]}
|
|
235
353
|
/>
|
|
236
354
|
|
|
@@ -245,24 +363,54 @@ A tool is being called.
|
|
|
245
363
|
{
|
|
246
364
|
name: "type",
|
|
247
365
|
type: '"tool-call"',
|
|
248
|
-
description: "Chunk type identifier"
|
|
366
|
+
description: "Chunk type identifier",
|
|
249
367
|
},
|
|
250
368
|
{
|
|
251
369
|
name: "payload",
|
|
252
370
|
type: "ToolCallPayload",
|
|
253
371
|
description: "Tool call information",
|
|
254
|
-
properties: [
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
372
|
+
properties: [
|
|
373
|
+
{
|
|
374
|
+
type: "ToolCallPayload",
|
|
375
|
+
parameters: [
|
|
376
|
+
{
|
|
377
|
+
name: "toolCallId",
|
|
378
|
+
type: "string",
|
|
379
|
+
description: "Unique identifier for this tool call",
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
name: "toolName",
|
|
383
|
+
type: "string",
|
|
384
|
+
description: "Name of the tool being called",
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
name: "args",
|
|
388
|
+
type: "Record<string, any>",
|
|
389
|
+
isOptional: true,
|
|
390
|
+
description: "Arguments passed to the tool",
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
name: "providerExecuted",
|
|
394
|
+
type: "boolean",
|
|
395
|
+
isOptional: true,
|
|
396
|
+
description: "Whether the provider executed the tool",
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
name: "output",
|
|
400
|
+
type: "any",
|
|
401
|
+
isOptional: true,
|
|
402
|
+
description: "Tool output if available",
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
name: "providerMetadata",
|
|
406
|
+
type: "SharedV2ProviderMetadata",
|
|
407
|
+
isOptional: true,
|
|
408
|
+
description: "Provider-specific metadata",
|
|
409
|
+
},
|
|
410
|
+
],
|
|
411
|
+
},
|
|
412
|
+
],
|
|
413
|
+
},
|
|
266
414
|
]}
|
|
267
415
|
/>
|
|
268
416
|
|
|
@@ -275,25 +423,59 @@ Result from a tool execution.
|
|
|
275
423
|
{
|
|
276
424
|
name: "type",
|
|
277
425
|
type: '"tool-result"',
|
|
278
|
-
description: "Chunk type identifier"
|
|
426
|
+
description: "Chunk type identifier",
|
|
279
427
|
},
|
|
280
428
|
{
|
|
281
429
|
name: "payload",
|
|
282
430
|
type: "ToolResultPayload",
|
|
283
431
|
description: "Tool execution result",
|
|
284
|
-
properties: [
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
432
|
+
properties: [
|
|
433
|
+
{
|
|
434
|
+
type: "ToolResultPayload",
|
|
435
|
+
parameters: [
|
|
436
|
+
{
|
|
437
|
+
name: "toolCallId",
|
|
438
|
+
type: "string",
|
|
439
|
+
description: "Unique identifier for the tool call",
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
name: "toolName",
|
|
443
|
+
type: "string",
|
|
444
|
+
description: "Name of the executed tool",
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
name: "result",
|
|
448
|
+
type: "any",
|
|
449
|
+
description: "The result of the tool execution",
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
name: "isError",
|
|
453
|
+
type: "boolean",
|
|
454
|
+
isOptional: true,
|
|
455
|
+
description: "Whether the result is an error",
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
name: "providerExecuted",
|
|
459
|
+
type: "boolean",
|
|
460
|
+
isOptional: true,
|
|
461
|
+
description: "Whether the provider executed the tool",
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
name: "args",
|
|
465
|
+
type: "Record<string, any>",
|
|
466
|
+
isOptional: true,
|
|
467
|
+
description: "Arguments that were passed to the tool",
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
name: "providerMetadata",
|
|
471
|
+
type: "SharedV2ProviderMetadata",
|
|
472
|
+
isOptional: true,
|
|
473
|
+
description: "Provider-specific metadata",
|
|
474
|
+
},
|
|
475
|
+
],
|
|
476
|
+
},
|
|
477
|
+
],
|
|
478
|
+
},
|
|
297
479
|
]}
|
|
298
480
|
/>
|
|
299
481
|
|
|
@@ -306,23 +488,48 @@ Signals the start of streaming tool call arguments.
|
|
|
306
488
|
{
|
|
307
489
|
name: "type",
|
|
308
490
|
type: '"tool-call-input-streaming-start"',
|
|
309
|
-
description: "Chunk type identifier"
|
|
491
|
+
description: "Chunk type identifier",
|
|
310
492
|
},
|
|
311
493
|
{
|
|
312
494
|
name: "payload",
|
|
313
495
|
type: "ToolCallInputStreamingStartPayload",
|
|
314
496
|
description: "Tool call input streaming start information",
|
|
315
|
-
properties: [
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
497
|
+
properties: [
|
|
498
|
+
{
|
|
499
|
+
type: "ToolCallInputStreamingStartPayload",
|
|
500
|
+
parameters: [
|
|
501
|
+
{
|
|
502
|
+
name: "toolCallId",
|
|
503
|
+
type: "string",
|
|
504
|
+
description: "Unique identifier for this tool call",
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
name: "toolName",
|
|
508
|
+
type: "string",
|
|
509
|
+
description: "Name of the tool being called",
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
name: "providerExecuted",
|
|
513
|
+
type: "boolean",
|
|
514
|
+
isOptional: true,
|
|
515
|
+
description: "Whether the provider executed the tool",
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
name: "dynamic",
|
|
519
|
+
type: "boolean",
|
|
520
|
+
isOptional: true,
|
|
521
|
+
description: "Whether the tool call is dynamic",
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
name: "providerMetadata",
|
|
525
|
+
type: "SharedV2ProviderMetadata",
|
|
526
|
+
isOptional: true,
|
|
527
|
+
description: "Provider-specific metadata",
|
|
528
|
+
},
|
|
529
|
+
],
|
|
530
|
+
},
|
|
531
|
+
],
|
|
532
|
+
},
|
|
326
533
|
]}
|
|
327
534
|
/>
|
|
328
535
|
|
|
@@ -335,22 +542,42 @@ Incremental tool call arguments during streaming.
|
|
|
335
542
|
{
|
|
336
543
|
name: "type",
|
|
337
544
|
type: '"tool-call-delta"',
|
|
338
|
-
description: "Chunk type identifier"
|
|
545
|
+
description: "Chunk type identifier",
|
|
339
546
|
},
|
|
340
547
|
{
|
|
341
548
|
name: "payload",
|
|
342
549
|
type: "ToolCallDeltaPayload",
|
|
343
550
|
description: "Incremental tool call arguments",
|
|
344
|
-
properties: [
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
551
|
+
properties: [
|
|
552
|
+
{
|
|
553
|
+
type: "ToolCallDeltaPayload",
|
|
554
|
+
parameters: [
|
|
555
|
+
{
|
|
556
|
+
name: "argsTextDelta",
|
|
557
|
+
type: "string",
|
|
558
|
+
description: "Incremental text delta for tool arguments",
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
name: "toolCallId",
|
|
562
|
+
type: "string",
|
|
563
|
+
description: "Unique identifier for this tool call",
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
name: "toolName",
|
|
567
|
+
type: "string",
|
|
568
|
+
isOptional: true,
|
|
569
|
+
description: "Name of the tool being called",
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
name: "providerMetadata",
|
|
573
|
+
type: "SharedV2ProviderMetadata",
|
|
574
|
+
isOptional: true,
|
|
575
|
+
description: "Provider-specific metadata",
|
|
576
|
+
},
|
|
577
|
+
],
|
|
578
|
+
},
|
|
579
|
+
],
|
|
580
|
+
},
|
|
354
581
|
]}
|
|
355
582
|
/>
|
|
356
583
|
|
|
@@ -363,20 +590,31 @@ Signals the end of streaming tool call arguments.
|
|
|
363
590
|
{
|
|
364
591
|
name: "type",
|
|
365
592
|
type: '"tool-call-input-streaming-end"',
|
|
366
|
-
description: "Chunk type identifier"
|
|
593
|
+
description: "Chunk type identifier",
|
|
367
594
|
},
|
|
368
595
|
{
|
|
369
596
|
name: "payload",
|
|
370
597
|
type: "ToolCallInputStreamingEndPayload",
|
|
371
598
|
description: "Tool call input streaming end information",
|
|
372
|
-
properties: [
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
599
|
+
properties: [
|
|
600
|
+
{
|
|
601
|
+
type: "ToolCallInputStreamingEndPayload",
|
|
602
|
+
parameters: [
|
|
603
|
+
{
|
|
604
|
+
name: "toolCallId",
|
|
605
|
+
type: "string",
|
|
606
|
+
description: "Unique identifier for this tool call",
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
name: "providerMetadata",
|
|
610
|
+
type: "SharedV2ProviderMetadata",
|
|
611
|
+
isOptional: true,
|
|
612
|
+
description: "Provider-specific metadata",
|
|
613
|
+
},
|
|
614
|
+
],
|
|
615
|
+
},
|
|
616
|
+
],
|
|
617
|
+
},
|
|
380
618
|
]}
|
|
381
619
|
/>
|
|
382
620
|
|
|
@@ -389,25 +627,59 @@ An error occurred during tool execution.
|
|
|
389
627
|
{
|
|
390
628
|
name: "type",
|
|
391
629
|
type: '"tool-error"',
|
|
392
|
-
description: "Chunk type identifier"
|
|
630
|
+
description: "Chunk type identifier",
|
|
393
631
|
},
|
|
394
632
|
{
|
|
395
633
|
name: "payload",
|
|
396
634
|
type: "ToolErrorPayload",
|
|
397
635
|
description: "Tool error information",
|
|
398
|
-
properties: [
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
636
|
+
properties: [
|
|
637
|
+
{
|
|
638
|
+
type: "ToolErrorPayload",
|
|
639
|
+
parameters: [
|
|
640
|
+
{
|
|
641
|
+
name: "id",
|
|
642
|
+
type: "string",
|
|
643
|
+
isOptional: true,
|
|
644
|
+
description: "Optional identifier",
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
name: "toolCallId",
|
|
648
|
+
type: "string",
|
|
649
|
+
description: "Unique identifier for the tool call",
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
name: "toolName",
|
|
653
|
+
type: "string",
|
|
654
|
+
description: "Name of the tool that failed",
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
name: "args",
|
|
658
|
+
type: "Record<string, any>",
|
|
659
|
+
isOptional: true,
|
|
660
|
+
description: "Arguments that were passed to the tool",
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
name: "error",
|
|
664
|
+
type: "unknown",
|
|
665
|
+
description: "The error that occurred",
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
name: "providerExecuted",
|
|
669
|
+
type: "boolean",
|
|
670
|
+
isOptional: true,
|
|
671
|
+
description: "Whether the provider executed the tool",
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
name: "providerMetadata",
|
|
675
|
+
type: "SharedV2ProviderMetadata",
|
|
676
|
+
isOptional: true,
|
|
677
|
+
description: "Provider-specific metadata",
|
|
678
|
+
},
|
|
679
|
+
],
|
|
680
|
+
},
|
|
681
|
+
],
|
|
682
|
+
},
|
|
411
683
|
]}
|
|
412
684
|
/>
|
|
413
685
|
|
|
@@ -422,25 +694,55 @@ Contains source information for content.
|
|
|
422
694
|
{
|
|
423
695
|
name: "type",
|
|
424
696
|
type: '"source"',
|
|
425
|
-
description: "Chunk type identifier"
|
|
697
|
+
description: "Chunk type identifier",
|
|
426
698
|
},
|
|
427
699
|
{
|
|
428
700
|
name: "payload",
|
|
429
701
|
type: "SourcePayload",
|
|
430
702
|
description: "Source information",
|
|
431
|
-
properties: [
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
703
|
+
properties: [
|
|
704
|
+
{
|
|
705
|
+
type: "SourcePayload",
|
|
706
|
+
parameters: [
|
|
707
|
+
{ name: "id", type: "string", description: "Unique identifier" },
|
|
708
|
+
{
|
|
709
|
+
name: "sourceType",
|
|
710
|
+
type: "'url' | 'document'",
|
|
711
|
+
description: "Type of source",
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
name: "title",
|
|
715
|
+
type: "string",
|
|
716
|
+
description: "Title of the source",
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
name: "mimeType",
|
|
720
|
+
type: "string",
|
|
721
|
+
isOptional: true,
|
|
722
|
+
description: "MIME type of the source",
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
name: "filename",
|
|
726
|
+
type: "string",
|
|
727
|
+
isOptional: true,
|
|
728
|
+
description: "Filename if applicable",
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
name: "url",
|
|
732
|
+
type: "string",
|
|
733
|
+
isOptional: true,
|
|
734
|
+
description: "URL if applicable",
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
name: "providerMetadata",
|
|
738
|
+
type: "SharedV2ProviderMetadata",
|
|
739
|
+
isOptional: true,
|
|
740
|
+
description: "Provider-specific metadata",
|
|
741
|
+
},
|
|
742
|
+
],
|
|
743
|
+
},
|
|
744
|
+
],
|
|
745
|
+
},
|
|
444
746
|
]}
|
|
445
747
|
/>
|
|
446
748
|
|
|
@@ -453,22 +755,42 @@ Contains file data.
|
|
|
453
755
|
{
|
|
454
756
|
name: "type",
|
|
455
757
|
type: '"file"',
|
|
456
|
-
description: "Chunk type identifier"
|
|
758
|
+
description: "Chunk type identifier",
|
|
457
759
|
},
|
|
458
760
|
{
|
|
459
761
|
name: "payload",
|
|
460
762
|
type: "FilePayload",
|
|
461
763
|
description: "File data",
|
|
462
|
-
properties: [
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
764
|
+
properties: [
|
|
765
|
+
{
|
|
766
|
+
type: "FilePayload",
|
|
767
|
+
parameters: [
|
|
768
|
+
{
|
|
769
|
+
name: "data",
|
|
770
|
+
type: "string | Uint8Array",
|
|
771
|
+
description: "The file data",
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
name: "base64",
|
|
775
|
+
type: "string",
|
|
776
|
+
isOptional: true,
|
|
777
|
+
description: "Base64 encoded data if applicable",
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
name: "mimeType",
|
|
781
|
+
type: "string",
|
|
782
|
+
description: "MIME type of the file",
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
name: "providerMetadata",
|
|
786
|
+
type: "SharedV2ProviderMetadata",
|
|
787
|
+
isOptional: true,
|
|
788
|
+
description: "Provider-specific metadata",
|
|
789
|
+
},
|
|
790
|
+
],
|
|
791
|
+
},
|
|
792
|
+
],
|
|
793
|
+
},
|
|
472
794
|
]}
|
|
473
795
|
/>
|
|
474
796
|
|
|
@@ -483,19 +805,25 @@ Signals the start of streaming.
|
|
|
483
805
|
{
|
|
484
806
|
name: "type",
|
|
485
807
|
type: '"start"',
|
|
486
|
-
description: "Chunk type identifier"
|
|
808
|
+
description: "Chunk type identifier",
|
|
487
809
|
},
|
|
488
810
|
{
|
|
489
811
|
name: "payload",
|
|
490
812
|
type: "StartPayload",
|
|
491
813
|
description: "Start information",
|
|
492
|
-
properties: [
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
814
|
+
properties: [
|
|
815
|
+
{
|
|
816
|
+
type: "StartPayload",
|
|
817
|
+
parameters: [
|
|
818
|
+
{
|
|
819
|
+
name: "[key: string]",
|
|
820
|
+
type: "any",
|
|
821
|
+
description: "Additional start data",
|
|
822
|
+
},
|
|
823
|
+
],
|
|
824
|
+
},
|
|
825
|
+
],
|
|
826
|
+
},
|
|
499
827
|
]}
|
|
500
828
|
/>
|
|
501
829
|
|
|
@@ -508,21 +836,37 @@ Signals the start of a processing step.
|
|
|
508
836
|
{
|
|
509
837
|
name: "type",
|
|
510
838
|
type: '"step-start"',
|
|
511
|
-
description: "Chunk type identifier"
|
|
839
|
+
description: "Chunk type identifier",
|
|
512
840
|
},
|
|
513
841
|
{
|
|
514
842
|
name: "payload",
|
|
515
843
|
type: "StepStartPayload",
|
|
516
844
|
description: "Step start information",
|
|
517
|
-
properties: [
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
845
|
+
properties: [
|
|
846
|
+
{
|
|
847
|
+
type: "StepStartPayload",
|
|
848
|
+
parameters: [
|
|
849
|
+
{
|
|
850
|
+
name: "messageId",
|
|
851
|
+
type: "string",
|
|
852
|
+
isOptional: true,
|
|
853
|
+
description: "Optional message identifier",
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
name: "request",
|
|
857
|
+
type: "object",
|
|
858
|
+
description: "Request information including body and other data",
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
name: "warnings",
|
|
862
|
+
type: "LanguageModelV2CallWarning[]",
|
|
863
|
+
isOptional: true,
|
|
864
|
+
description: "Any warnings from the language model call",
|
|
865
|
+
},
|
|
866
|
+
],
|
|
867
|
+
},
|
|
868
|
+
],
|
|
869
|
+
},
|
|
526
870
|
]}
|
|
527
871
|
/>
|
|
528
872
|
|
|
@@ -535,26 +879,67 @@ Signals the completion of a processing step.
|
|
|
535
879
|
{
|
|
536
880
|
name: "type",
|
|
537
881
|
type: '"step-finish"',
|
|
538
|
-
description: "Chunk type identifier"
|
|
882
|
+
description: "Chunk type identifier",
|
|
539
883
|
},
|
|
540
884
|
{
|
|
541
885
|
name: "payload",
|
|
542
886
|
type: "StepFinishPayload",
|
|
543
887
|
description: "Step completion information",
|
|
544
|
-
properties: [
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
888
|
+
properties: [
|
|
889
|
+
{
|
|
890
|
+
type: "StepFinishPayload",
|
|
891
|
+
parameters: [
|
|
892
|
+
{
|
|
893
|
+
name: "id",
|
|
894
|
+
type: "string",
|
|
895
|
+
isOptional: true,
|
|
896
|
+
description: "Optional identifier",
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
name: "messageId",
|
|
900
|
+
type: "string",
|
|
901
|
+
isOptional: true,
|
|
902
|
+
description: "Optional message identifier",
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
name: "stepResult",
|
|
906
|
+
type: "object",
|
|
907
|
+
description:
|
|
908
|
+
"Step execution result with reason, warnings, and continuation info",
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
name: "output",
|
|
912
|
+
type: "object",
|
|
913
|
+
description: "Output information including usage statistics",
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
name: "metadata",
|
|
917
|
+
type: "object",
|
|
918
|
+
description:
|
|
919
|
+
"Execution metadata including request and provider info",
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
name: "totalUsage",
|
|
923
|
+
type: "LanguageModelV2Usage",
|
|
924
|
+
isOptional: true,
|
|
925
|
+
description: "Total usage statistics",
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
name: "response",
|
|
929
|
+
type: "LanguageModelV2ResponseMetadata",
|
|
930
|
+
isOptional: true,
|
|
931
|
+
description: "Response metadata",
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
name: "providerMetadata",
|
|
935
|
+
type: "SharedV2ProviderMetadata",
|
|
936
|
+
isOptional: true,
|
|
937
|
+
description: "Provider-specific metadata",
|
|
938
|
+
},
|
|
939
|
+
],
|
|
940
|
+
},
|
|
941
|
+
],
|
|
942
|
+
},
|
|
558
943
|
]}
|
|
559
944
|
/>
|
|
560
945
|
|
|
@@ -567,19 +952,25 @@ Contains raw data from the provider.
|
|
|
567
952
|
{
|
|
568
953
|
name: "type",
|
|
569
954
|
type: '"raw"',
|
|
570
|
-
description: "Chunk type identifier"
|
|
955
|
+
description: "Chunk type identifier",
|
|
571
956
|
},
|
|
572
957
|
{
|
|
573
958
|
name: "payload",
|
|
574
959
|
type: "RawPayload",
|
|
575
960
|
description: "Raw provider data",
|
|
576
|
-
properties: [
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
961
|
+
properties: [
|
|
962
|
+
{
|
|
963
|
+
type: "RawPayload",
|
|
964
|
+
parameters: [
|
|
965
|
+
{
|
|
966
|
+
name: "[key: string]",
|
|
967
|
+
type: "any",
|
|
968
|
+
description: "Raw data from the provider",
|
|
969
|
+
},
|
|
970
|
+
],
|
|
971
|
+
},
|
|
972
|
+
],
|
|
973
|
+
},
|
|
583
974
|
]}
|
|
584
975
|
/>
|
|
585
976
|
|
|
@@ -592,22 +983,40 @@ Stream has completed successfully.
|
|
|
592
983
|
{
|
|
593
984
|
name: "type",
|
|
594
985
|
type: '"finish"',
|
|
595
|
-
description: "Chunk type identifier"
|
|
986
|
+
description: "Chunk type identifier",
|
|
596
987
|
},
|
|
597
988
|
{
|
|
598
989
|
name: "payload",
|
|
599
990
|
type: "FinishPayload",
|
|
600
991
|
description: "Completion information",
|
|
601
|
-
properties: [
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
992
|
+
properties: [
|
|
993
|
+
{
|
|
994
|
+
type: "FinishPayload",
|
|
995
|
+
parameters: [
|
|
996
|
+
{
|
|
997
|
+
name: "stepResult",
|
|
998
|
+
type: "object",
|
|
999
|
+
description: "Step execution result",
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
name: "output",
|
|
1003
|
+
type: "object",
|
|
1004
|
+
description: "Output information including usage",
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
name: "metadata",
|
|
1008
|
+
type: "object",
|
|
1009
|
+
description: "Execution metadata",
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
name: "messages",
|
|
1013
|
+
type: "object",
|
|
1014
|
+
description: "Message history",
|
|
1015
|
+
},
|
|
1016
|
+
],
|
|
1017
|
+
},
|
|
1018
|
+
],
|
|
1019
|
+
},
|
|
611
1020
|
]}
|
|
612
1021
|
/>
|
|
613
1022
|
|
|
@@ -620,19 +1029,25 @@ An error occurred during streaming.
|
|
|
620
1029
|
{
|
|
621
1030
|
name: "type",
|
|
622
1031
|
type: '"error"',
|
|
623
|
-
description: "Chunk type identifier"
|
|
1032
|
+
description: "Chunk type identifier",
|
|
624
1033
|
},
|
|
625
1034
|
{
|
|
626
1035
|
name: "payload",
|
|
627
1036
|
type: "ErrorPayload",
|
|
628
1037
|
description: "Error information",
|
|
629
|
-
properties: [
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
1038
|
+
properties: [
|
|
1039
|
+
{
|
|
1040
|
+
type: "ErrorPayload",
|
|
1041
|
+
parameters: [
|
|
1042
|
+
{
|
|
1043
|
+
name: "error",
|
|
1044
|
+
type: "unknown",
|
|
1045
|
+
description: "The error that occurred",
|
|
1046
|
+
},
|
|
1047
|
+
],
|
|
1048
|
+
},
|
|
1049
|
+
],
|
|
1050
|
+
},
|
|
636
1051
|
]}
|
|
637
1052
|
/>
|
|
638
1053
|
|
|
@@ -645,19 +1060,25 @@ Stream was aborted.
|
|
|
645
1060
|
{
|
|
646
1061
|
name: "type",
|
|
647
1062
|
type: '"abort"',
|
|
648
|
-
description: "Chunk type identifier"
|
|
1063
|
+
description: "Chunk type identifier",
|
|
649
1064
|
},
|
|
650
1065
|
{
|
|
651
1066
|
name: "payload",
|
|
652
1067
|
type: "AbortPayload",
|
|
653
1068
|
description: "Abort information",
|
|
654
|
-
properties: [
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
1069
|
+
properties: [
|
|
1070
|
+
{
|
|
1071
|
+
type: "AbortPayload",
|
|
1072
|
+
parameters: [
|
|
1073
|
+
{
|
|
1074
|
+
name: "[key: string]",
|
|
1075
|
+
type: "any",
|
|
1076
|
+
description: "Additional abort data",
|
|
1077
|
+
},
|
|
1078
|
+
],
|
|
1079
|
+
},
|
|
1080
|
+
],
|
|
1081
|
+
},
|
|
661
1082
|
]}
|
|
662
1083
|
/>
|
|
663
1084
|
|
|
@@ -672,13 +1093,14 @@ Emitted when using output generation with defined schemas. Contains partial or c
|
|
|
672
1093
|
{
|
|
673
1094
|
name: "type",
|
|
674
1095
|
type: '"object"',
|
|
675
|
-
description: "Chunk type identifier"
|
|
1096
|
+
description: "Chunk type identifier",
|
|
676
1097
|
},
|
|
677
1098
|
{
|
|
678
1099
|
name: "object",
|
|
679
1100
|
type: "PartialSchemaOutput<OUTPUT>",
|
|
680
|
-
description:
|
|
681
|
-
|
|
1101
|
+
description:
|
|
1102
|
+
"Partial or complete structured data matching the defined schema. The type is determined by the OUTPUT schema parameter.",
|
|
1103
|
+
},
|
|
682
1104
|
]}
|
|
683
1105
|
/>
|
|
684
1106
|
|
|
@@ -691,19 +1113,26 @@ Contains output from agent or workflow execution, particularly used for tracking
|
|
|
691
1113
|
{
|
|
692
1114
|
name: "type",
|
|
693
1115
|
type: '"tool-output"',
|
|
694
|
-
description: "Chunk type identifier"
|
|
1116
|
+
description: "Chunk type identifier",
|
|
695
1117
|
},
|
|
696
1118
|
{
|
|
697
1119
|
name: "payload",
|
|
698
1120
|
type: "ToolOutputPayload",
|
|
699
1121
|
description: "Wrapped execution output with metadata",
|
|
700
|
-
properties: [
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
1122
|
+
properties: [
|
|
1123
|
+
{
|
|
1124
|
+
type: "ToolOutputPayload",
|
|
1125
|
+
parameters: [
|
|
1126
|
+
{
|
|
1127
|
+
name: "output",
|
|
1128
|
+
type: "ChunkType",
|
|
1129
|
+
description:
|
|
1130
|
+
"Nested chunk data, often containing finish events with usage statistics",
|
|
1131
|
+
},
|
|
1132
|
+
],
|
|
1133
|
+
},
|
|
1134
|
+
],
|
|
1135
|
+
},
|
|
707
1136
|
]}
|
|
708
1137
|
/>
|
|
709
1138
|
|
|
@@ -716,19 +1145,26 @@ Contains output from workflow step execution, used primarily for usage tracking
|
|
|
716
1145
|
{
|
|
717
1146
|
name: "type",
|
|
718
1147
|
type: '"step-output"',
|
|
719
|
-
description: "Chunk type identifier"
|
|
1148
|
+
description: "Chunk type identifier",
|
|
720
1149
|
},
|
|
721
1150
|
{
|
|
722
1151
|
name: "payload",
|
|
723
1152
|
type: "StepOutputPayload",
|
|
724
1153
|
description: "Workflow step execution output with metadata",
|
|
725
|
-
properties: [
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
1154
|
+
properties: [
|
|
1155
|
+
{
|
|
1156
|
+
type: "StepOutputPayload",
|
|
1157
|
+
parameters: [
|
|
1158
|
+
{
|
|
1159
|
+
name: "output",
|
|
1160
|
+
type: "ChunkType",
|
|
1161
|
+
description:
|
|
1162
|
+
"Nested chunk data from step execution, typically containing finish events or other step results",
|
|
1163
|
+
},
|
|
1164
|
+
],
|
|
1165
|
+
},
|
|
1166
|
+
],
|
|
1167
|
+
},
|
|
732
1168
|
]}
|
|
733
1169
|
/>
|
|
734
1170
|
|
|
@@ -743,20 +1179,32 @@ Contains metadata about the LLM provider's response. Emitted by some providers a
|
|
|
743
1179
|
{
|
|
744
1180
|
name: "type",
|
|
745
1181
|
type: '"response-metadata"',
|
|
746
|
-
description: "Chunk type identifier"
|
|
1182
|
+
description: "Chunk type identifier",
|
|
747
1183
|
},
|
|
748
1184
|
{
|
|
749
1185
|
name: "payload",
|
|
750
1186
|
type: "ResponseMetadataPayload",
|
|
751
1187
|
description: "Provider response metadata for tracking and debugging",
|
|
752
|
-
properties: [
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
1188
|
+
properties: [
|
|
1189
|
+
{
|
|
1190
|
+
type: "ResponseMetadataPayload",
|
|
1191
|
+
parameters: [
|
|
1192
|
+
{
|
|
1193
|
+
name: "signature",
|
|
1194
|
+
type: "string",
|
|
1195
|
+
isOptional: true,
|
|
1196
|
+
description: "Response signature if available",
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
name: "[key: string]",
|
|
1200
|
+
type: "any",
|
|
1201
|
+
description:
|
|
1202
|
+
"Additional provider-specific metadata fields (e.g., id, modelId, timestamp, headers)",
|
|
1203
|
+
},
|
|
1204
|
+
],
|
|
1205
|
+
},
|
|
1206
|
+
],
|
|
1207
|
+
},
|
|
760
1208
|
]}
|
|
761
1209
|
/>
|
|
762
1210
|
|
|
@@ -769,21 +1217,39 @@ Contains monitoring and observability data from agent execution. Can include wor
|
|
|
769
1217
|
{
|
|
770
1218
|
name: "type",
|
|
771
1219
|
type: '"watch"',
|
|
772
|
-
description: "Chunk type identifier"
|
|
1220
|
+
description: "Chunk type identifier",
|
|
773
1221
|
},
|
|
774
1222
|
{
|
|
775
1223
|
name: "payload",
|
|
776
1224
|
type: "WatchPayload",
|
|
777
|
-
description:
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
1225
|
+
description:
|
|
1226
|
+
"Monitoring data for observability and debugging of agent execution",
|
|
1227
|
+
properties: [
|
|
1228
|
+
{
|
|
1229
|
+
type: "WatchPayload",
|
|
1230
|
+
parameters: [
|
|
1231
|
+
{
|
|
1232
|
+
name: "workflowState",
|
|
1233
|
+
type: "object",
|
|
1234
|
+
isOptional: true,
|
|
1235
|
+
description:
|
|
1236
|
+
"Current workflow execution state (when used in workflows)",
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
name: "eventTimestamp",
|
|
1240
|
+
type: "number",
|
|
1241
|
+
isOptional: true,
|
|
1242
|
+
description: "Timestamp when the event occurred",
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
name: "[key: string]",
|
|
1246
|
+
type: "any",
|
|
1247
|
+
description: "Additional monitoring and execution data",
|
|
1248
|
+
},
|
|
1249
|
+
],
|
|
1250
|
+
},
|
|
1251
|
+
],
|
|
1252
|
+
},
|
|
787
1253
|
]}
|
|
788
1254
|
/>
|
|
789
1255
|
|
|
@@ -796,19 +1262,27 @@ Emitted when the stream is forcibly terminated due to content being blocked by o
|
|
|
796
1262
|
{
|
|
797
1263
|
name: "type",
|
|
798
1264
|
type: '"tripwire"',
|
|
799
|
-
description: "Chunk type identifier"
|
|
1265
|
+
description: "Chunk type identifier",
|
|
800
1266
|
},
|
|
801
1267
|
{
|
|
802
1268
|
name: "payload",
|
|
803
1269
|
type: "TripwirePayload",
|
|
804
|
-
description:
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
1270
|
+
description:
|
|
1271
|
+
"Information about why the stream was terminated by safety mechanisms",
|
|
1272
|
+
properties: [
|
|
1273
|
+
{
|
|
1274
|
+
type: "TripwirePayload",
|
|
1275
|
+
parameters: [
|
|
1276
|
+
{
|
|
1277
|
+
name: "tripwireReason",
|
|
1278
|
+
type: "string",
|
|
1279
|
+
description:
|
|
1280
|
+
"Explanation of why the content was blocked (e.g., 'Output processor blocked content')",
|
|
1281
|
+
},
|
|
1282
|
+
],
|
|
1283
|
+
},
|
|
1284
|
+
],
|
|
1285
|
+
},
|
|
812
1286
|
]}
|
|
813
1287
|
/>
|
|
814
1288
|
|
|
@@ -819,29 +1293,29 @@ const stream = await agent.stream("Hello");
|
|
|
819
1293
|
|
|
820
1294
|
for await (const chunk of stream.fullStream) {
|
|
821
1295
|
switch (chunk.type) {
|
|
822
|
-
case
|
|
823
|
-
console.log(
|
|
1296
|
+
case "text-delta":
|
|
1297
|
+
console.log("Text:", chunk.payload.text);
|
|
824
1298
|
break;
|
|
825
1299
|
|
|
826
|
-
case
|
|
827
|
-
console.log(
|
|
1300
|
+
case "tool-call":
|
|
1301
|
+
console.log("Calling tool:", chunk.payload.toolName);
|
|
828
1302
|
break;
|
|
829
1303
|
|
|
830
|
-
case
|
|
831
|
-
console.log(
|
|
1304
|
+
case "tool-result":
|
|
1305
|
+
console.log("Tool result:", chunk.payload.result);
|
|
832
1306
|
break;
|
|
833
1307
|
|
|
834
|
-
case
|
|
835
|
-
console.log(
|
|
1308
|
+
case "reasoning-delta":
|
|
1309
|
+
console.log("Reasoning:", chunk.payload.text);
|
|
836
1310
|
break;
|
|
837
1311
|
|
|
838
|
-
case
|
|
839
|
-
console.log(
|
|
840
|
-
console.log(
|
|
1312
|
+
case "finish":
|
|
1313
|
+
console.log("Finished:", chunk.payload.stepResult.reason);
|
|
1314
|
+
console.log("Usage:", chunk.payload.output.usage);
|
|
841
1315
|
break;
|
|
842
1316
|
|
|
843
|
-
case
|
|
844
|
-
console.error(
|
|
1317
|
+
case "error":
|
|
1318
|
+
console.error("Error:", chunk.payload.error);
|
|
845
1319
|
break;
|
|
846
1320
|
}
|
|
847
1321
|
}
|
|
@@ -849,6 +1323,6 @@ for await (const chunk of stream.fullStream) {
|
|
|
849
1323
|
|
|
850
1324
|
## Related Types
|
|
851
1325
|
|
|
852
|
-
- [.stream()](./agents/stream
|
|
853
|
-
- [MastraModelOutput](./agents/MastraModelOutput
|
|
854
|
-
- [workflow.streamVNext()](./workflows/streamVNext
|
|
1326
|
+
- [.stream()](./agents/stream) - Method that returns streams emitting these chunks
|
|
1327
|
+
- [MastraModelOutput](./agents/MastraModelOutput) - The stream object that emits these chunks
|
|
1328
|
+
- [workflow.streamVNext()](./workflows/streamVNext) - Method that returns streams emitting these chunks for workflows
|