@mastra/mcp-docs-server 1.2.15-alpha.9 → 1.2.16-alpha.1
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/agent-approval.md +19 -5
- package/.docs/docs/agents/code-mode.md +17 -2
- package/.docs/docs/agents/networks.md +2 -2
- package/.docs/docs/agents/overview.md +6 -6
- package/.docs/docs/agents/processors.md +3 -3
- package/.docs/docs/agents/using-tools.md +1 -1
- package/.docs/docs/browser/overview.md +9 -9
- package/.docs/docs/browser/recording.md +4 -4
- package/.docs/docs/capabilities/{channels/overview.md → channels.md} +71 -8
- package/.docs/docs/capabilities/subagents.md +7 -4
- package/.docs/docs/connections/overview.md +1 -1
- package/.docs/docs/datasets/overview.md +1 -1
- package/.docs/docs/datasets/running-experiments.md +49 -0
- package/.docs/docs/deployment/cloud-providers.md +13 -11
- package/.docs/docs/deployment/mastra-server.md +1 -1
- package/.docs/docs/deployment/monorepo.md +1 -1
- package/.docs/docs/deployment/overview.md +13 -10
- package/.docs/docs/deployment/sandbox.md +4 -4
- package/.docs/docs/deployment/web-framework.md +7 -7
- package/.docs/docs/deployment/workers.md +249 -3
- package/.docs/docs/deployment/workflow-runners.md +2 -2
- package/.docs/docs/evals/overview.md +1 -1
- package/.docs/docs/evals/quick-checks.md +1 -1
- package/.docs/docs/getting-started/develop.md +1 -1
- package/.docs/{guides/concepts → docs/guides}/multi-agent-systems.md +1 -1
- package/.docs/docs/harness/agent-controller.md +50 -9
- package/.docs/docs/harness/overview.md +3 -5
- package/.docs/docs/index.md +8 -8
- package/.docs/docs/long-running-agents/durable-agents.md +3 -3
- package/.docs/docs/long-running-agents/goals.md +1 -1
- package/.docs/docs/long-running-agents/schedules.md +1 -1
- package/.docs/docs/long-running-agents/signal-providers.md +5 -18
- package/.docs/docs/long-running-agents/signals.md +2 -2
- package/.docs/docs/mastra-platform/database.md +2 -2
- package/.docs/docs/mastra-platform/deploy.md +28 -1
- package/.docs/docs/mastra-platform/observability.md +63 -18
- package/.docs/docs/mastra-platform/overview.md +1 -1
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/trace-intelligence.md +9 -13
- package/.docs/docs/mcp/overview.md +43 -1
- package/.docs/docs/memory/memory-processors.md +5 -5
- package/.docs/docs/memory/message-history.md +3 -3
- package/.docs/docs/memory/multi-user-threads.md +1 -1
- package/.docs/docs/memory/observational-memory.md +2 -2
- package/.docs/docs/memory/semantic-recall.md +2 -1
- package/.docs/docs/memory/working-memory.md +2 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +18 -17
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/metrics/overview.md +1 -1
- package/.docs/docs/observability/overview.md +1 -5
- package/.docs/docs/observability/tracing/overview.md +3 -6
- package/.docs/docs/server/auth/fga.md +1 -1
- package/.docs/docs/server/auth/simple-auth.md +1 -1
- package/.docs/docs/server/auth/workers.md +3 -1
- package/.docs/docs/server/auth.md +15 -13
- package/.docs/docs/server/custom-adapters.md +1 -1
- package/.docs/docs/server/custom-api-routes.md +35 -0
- package/.docs/docs/server/mastra-client.md +3 -3
- package/.docs/docs/server/mastra-server.md +2 -2
- package/.docs/docs/storage/overview.md +20 -17
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/workflows/dynamic-workflows.md +1 -1
- package/.docs/docs/workflows/human-in-the-loop.md +2 -2
- package/.docs/docs/workflows/overview.md +4 -4
- package/.docs/docs/workflows/snapshots.md +12 -10
- package/.docs/docs/workflows/time-travel.md +2 -0
- package/.docs/docs/workspace/filesystem.md +15 -15
- package/.docs/docs/workspace/sandbox.md +18 -19
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/ai-sdk-ui.md +6 -6
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/assistant-ui.md +2 -2
- package/.docs/{guides/build-your-ui/copilotkit/overview.md → integrations/agentic-ui/copilotkit.md} +258 -5
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/openui.md +1 -1
- package/.docs/{docs/server → integrations}/auth/auth0.md +1 -1
- package/.docs/{docs/server → integrations}/auth/clerk.md +2 -2
- package/.docs/{docs/server → integrations}/auth/firebase.md +1 -1
- package/.docs/{docs/server → integrations}/auth/okta.md +24 -4
- package/.docs/{docs/server → integrations}/auth/supabase.md +2 -2
- package/.docs/{docs/server → integrations}/auth/workos.md +1 -1
- package/.docs/{docs/browser → integrations/browsers}/agent-browser.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/browser-viewer.md +3 -3
- package/.docs/{docs/browser → integrations/browsers}/firecrawl.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/stagehand.md +1 -1
- package/.docs/{docs/capabilities → integrations}/channels/discord.md +2 -2
- package/.docs/integrations/channels/github.md +103 -0
- package/.docs/{docs/capabilities → integrations}/channels/imessage.md +12 -4
- package/.docs/{docs/capabilities → integrations}/channels/slack.md +4 -4
- package/.docs/{docs/capabilities → integrations}/channels/teams.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/telegram.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/whatsapp.md +2 -2
- package/.docs/{reference/storage/dsql.md → integrations/databases/aurora-dsql.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/clickhouse.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/cloudflare-d1.md +1 -1
- package/.docs/{reference/storage/cloudflare.md → integrations/databases/cloudflare-kv.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/convex.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/duckdb.md +5 -5
- package/.docs/{reference/storage → integrations/databases}/dynamodb.md +1 -1
- package/.docs/{reference/storage/lance.md → integrations/databases/lancedb.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/libsql.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/mongodb.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/mssql.md +1 -1
- package/.docs/integrations/databases/neon.md +220 -0
- package/.docs/integrations/databases/oracledb.md +239 -0
- package/.docs/{reference/storage → integrations/databases}/postgresql.md +9 -9
- package/.docs/{reference/storage → integrations/databases}/redis.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/spanner.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/upstash.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/amazon-ec2.md +3 -3
- package/.docs/{guides/deployment → integrations/deploy}/aws-bedrock-agentcore.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/aws-lambda.md +4 -4
- package/.docs/{guides/deployment → integrations/deploy}/azure-app-services.md +4 -4
- package/.docs/{guides/deployment → integrations/deploy}/cloudflare.md +4 -4
- package/.docs/{guides/deployment → integrations/deploy}/digital-ocean.md +5 -5
- package/.docs/{guides/deployment → integrations/deploy}/inngest.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/kubernetes.md +4 -5
- package/.docs/{guides/deployment → integrations/deploy}/netlify.md +5 -5
- package/.docs/{guides/deployment → integrations/deploy}/temporal.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/vercel.md +5 -5
- package/.docs/{reference/workspace/agentfs-filesystem.md → integrations/file-storage/agentfs.md} +1 -1
- package/.docs/{reference/workspace/s3-filesystem.md → integrations/file-storage/amazon-s3.md} +6 -6
- package/.docs/{reference/workspace/archil-filesystem.md → integrations/file-storage/archil.md} +4 -4
- package/.docs/{reference/workspace/azure-blob-filesystem.md → integrations/file-storage/azure-blob.md} +3 -3
- package/.docs/{reference/workspace/gcs-filesystem.md → integrations/file-storage/google-cloud-storage.md} +6 -6
- package/.docs/{reference/workspace/google-drive-filesystem.md → integrations/file-storage/google-drive.md} +1 -1
- package/.docs/{reference/workspace/mesa-filesystem.md → integrations/file-storage/mesa.md} +3 -3
- package/.docs/{reference/workspace/files-sdk-filesystem.md → integrations/file-storage/vercel-files.md} +6 -6
- package/.docs/{guides/getting-started → integrations/frameworks}/astro.md +2 -2
- package/.docs/{guides/getting-started → integrations/frameworks}/electron.md +4 -4
- package/.docs/{guides/getting-started → integrations/frameworks}/express.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/hono.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/nestjs.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/next-js.md +3 -3
- package/.docs/{guides/getting-started → integrations/frameworks}/nuxt.md +2 -2
- package/.docs/{guides/getting-started → integrations/frameworks}/sveltekit.md +2 -2
- package/.docs/{guides/getting-started → integrations/frameworks}/vite-react.md +2 -2
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arize.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arthur.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/braintrust.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/confident-ai.md +1 -1
- package/.docs/integrations/observability/datadog.md +538 -0
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/laminar.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langfuse.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langsmith.md +1 -1
- package/.docs/{docs/observability/integrations/exporters/otel.md → integrations/observability/opentelemetry.md} +278 -46
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/posthog.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/sentry.md +1 -1
- package/.docs/{reference/workspace/agentcore-runtime-sandbox.md → integrations/sandboxes/agentcore.md} +1 -1
- package/.docs/{reference/workspace/apple-container-sandbox.md → integrations/sandboxes/apple-container.md} +2 -2
- package/.docs/{reference/workspace/blaxel-sandbox.md → integrations/sandboxes/blaxel.md} +1 -1
- package/.docs/{reference/workspace/daytona-sandbox.md → integrations/sandboxes/daytona.md} +24 -3
- package/.docs/{reference/workspace/docker-sandbox.md → integrations/sandboxes/docker.md} +2 -2
- package/.docs/{reference/workspace/e2b-sandbox.md → integrations/sandboxes/e2b.md} +4 -4
- package/.docs/{reference/workspace/modal-sandbox.md → integrations/sandboxes/modal.md} +3 -3
- package/.docs/{reference/workspace/railway-sandbox.md → integrations/sandboxes/railway.md} +9 -1
- package/.docs/{reference/workspace/vercel-sandbox.md → integrations/sandboxes/vercel.md} +143 -12
- package/.docs/{reference → integrations}/tools/brightdata.md +1 -1
- package/.docs/{guides/guide → integrations/tools}/firecrawl.md +2 -2
- package/.docs/{reference → integrations}/tools/perplexity.md +1 -1
- package/.docs/{reference → integrations}/tools/tavily.md +1 -1
- package/.docs/{reference → integrations}/voice/aws-nova-sonic.md +1 -1
- package/.docs/{reference → integrations}/voice/cloudflare.md +3 -3
- package/.docs/{reference/voice/google-gemini-live.md → integrations/voice/google.md} +305 -30
- package/.docs/{reference/voice/inworld-realtime.md → integrations/voice/inworld.md} +163 -25
- package/.docs/{reference → integrations}/voice/livekit.md +436 -33
- package/.docs/{reference/voice/openai-realtime.md → integrations/voice/openai.md} +117 -20
- package/.docs/integrations.md +147 -0
- package/.docs/models/embeddings.md +3 -3
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/custom-gateways.md +4 -0
- package/.docs/models/gateways/neon.md +1 -1
- package/.docs/models/gateways/netlify.md +1 -1
- package/.docs/models/gateways/openrouter.md +9 -3
- package/.docs/models/gateways/vercel.md +6 -4
- package/.docs/models/index.md +3 -3
- package/.docs/models/providers/302ai.md +1 -1
- package/.docs/models/providers/abacus.md +1 -1
- package/.docs/models/providers/abliteration-ai.md +1 -1
- package/.docs/models/providers/agentrouter.md +1 -1
- package/.docs/models/providers/ai-router.md +1 -1
- package/.docs/models/providers/aiand.md +1 -1
- package/.docs/models/providers/aki-io.md +1 -1
- package/.docs/models/providers/alibaba-cn.md +1 -1
- package/.docs/models/providers/alibaba-coding-plan-cn.md +1 -1
- package/.docs/models/providers/alibaba-coding-plan.md +1 -1
- package/.docs/models/providers/alibaba-token-plan-cn.md +1 -1
- package/.docs/models/providers/alibaba-token-plan.md +1 -1
- package/.docs/models/providers/alibaba.md +7 -5
- package/.docs/models/providers/ambient.md +2 -2
- package/.docs/models/providers/anyapi.md +1 -1
- package/.docs/models/providers/atomic-chat.md +1 -1
- package/.docs/models/providers/auriko.md +1 -1
- package/.docs/models/providers/bailing.md +1 -1
- package/.docs/models/providers/baseten.md +2 -2
- package/.docs/models/providers/berget.md +1 -1
- package/.docs/models/providers/blueclaw.md +1 -1
- package/.docs/models/providers/chutes.md +1 -1
- package/.docs/models/providers/clarifai.md +1 -1
- package/.docs/models/providers/claudinio.md +1 -1
- package/.docs/models/providers/cline-pass.md +1 -1
- package/.docs/models/providers/cloudferro-sherlock.md +1 -1
- package/.docs/models/providers/cloudflare-workers-ai.md +1 -1
- package/.docs/models/providers/coralbricks.md +75 -0
- package/.docs/models/providers/cortecs.md +3 -5
- package/.docs/models/providers/crof.md +1 -1
- package/.docs/models/providers/crossmodel.md +2 -3
- package/.docs/models/providers/daoxe.md +1 -1
- package/.docs/models/providers/databricks.md +1 -1
- package/.docs/models/providers/deepinfra.md +6 -5
- package/.docs/models/providers/digitalocean.md +5 -5
- package/.docs/models/providers/dinference.md +1 -1
- package/.docs/models/providers/drun.md +1 -1
- package/.docs/models/providers/ebcloud.md +1 -1
- package/.docs/models/providers/empiriolabs.md +3 -2
- package/.docs/models/providers/evroc.md +3 -4
- package/.docs/models/providers/fastrouter.md +1 -1
- package/.docs/models/providers/firepass.md +1 -1
- package/.docs/models/providers/fireworks-ai.md +1 -1
- package/.docs/models/providers/firmware.md +1 -1
- package/.docs/models/providers/freemodel.md +1 -1
- package/.docs/models/providers/friendli.md +1 -1
- package/.docs/models/providers/frogbot.md +1 -1
- package/.docs/models/providers/github-models.md +1 -1
- package/.docs/models/providers/gmicloud.md +1 -1
- package/.docs/models/providers/google.md +1 -1
- package/.docs/models/providers/greenpt.md +1 -1
- package/.docs/models/providers/helicone.md +1 -1
- package/.docs/models/providers/hetzner.md +8 -5
- package/.docs/models/providers/hpc-ai.md +1 -1
- package/.docs/models/providers/huggingface.md +1 -1
- package/.docs/models/providers/hyper.md +7 -7
- package/.docs/models/providers/iflowcn.md +1 -1
- package/.docs/models/providers/impossibl.md +1 -1
- package/.docs/models/providers/inception.md +1 -1
- package/.docs/models/providers/inceptron.md +1 -1
- package/.docs/models/providers/inference.md +1 -1
- package/.docs/models/providers/inferx.md +1 -1
- package/.docs/models/providers/infomaniak.md +1 -1
- package/.docs/models/providers/io-intelligence.md +1 -1
- package/.docs/models/providers/io-net.md +1 -1
- package/.docs/models/providers/jiekou.md +1 -1
- package/.docs/models/providers/kenari.md +1 -1
- package/.docs/models/providers/kilo.md +19 -13
- package/.docs/models/providers/kimi-for-coding.md +1 -1
- package/.docs/models/providers/kiro.md +1 -1
- package/.docs/models/providers/kuae-cloud-coding-plan.md +1 -1
- package/.docs/models/providers/lilac.md +1 -1
- package/.docs/models/providers/llama.md +1 -1
- package/.docs/models/providers/llmgateway.md +2 -7
- package/.docs/models/providers/llmtr.md +1 -1
- package/.docs/models/providers/lmstudio.md +1 -1
- package/.docs/models/providers/longcat.md +1 -1
- package/.docs/models/providers/lucidquery.md +1 -1
- package/.docs/models/providers/lynkr.md +1 -1
- package/.docs/models/providers/meganova.md +1 -1
- package/.docs/models/providers/meta.md +1 -1
- package/.docs/models/providers/minimax-cn-coding-plan.md +1 -1
- package/.docs/models/providers/minimax-cn.md +1 -1
- package/.docs/models/providers/minimax-coding-plan.md +1 -1
- package/.docs/models/providers/minimax.md +1 -1
- package/.docs/models/providers/mixlayer.md +1 -1
- package/.docs/models/providers/moark.md +1 -1
- package/.docs/models/providers/modal.md +1 -1
- package/.docs/models/providers/model-oracle-ai.md +1 -1
- package/.docs/models/providers/modelis.md +1 -1
- package/.docs/models/providers/modelscope.md +1 -1
- package/.docs/models/providers/moonshotai-cn.md +1 -1
- package/.docs/models/providers/moonshotai.md +1 -1
- package/.docs/models/providers/morph.md +1 -1
- package/.docs/models/providers/nano-gpt.md +11 -7
- package/.docs/models/providers/nearai.md +1 -1
- package/.docs/models/providers/nebius.md +3 -2
- package/.docs/models/providers/neuralwatt.md +1 -1
- package/.docs/models/providers/nova.md +1 -1
- package/.docs/models/providers/novita-ai.md +1 -1
- package/.docs/models/providers/nvidia.md +3 -2
- package/.docs/models/providers/ofox.md +4 -3
- package/.docs/models/providers/ollama-cloud.md +1 -1
- package/.docs/models/providers/opencode-go.md +1 -1
- package/.docs/models/providers/opencode.md +64 -64
- package/.docs/models/providers/orcarouter.md +1 -1
- package/.docs/models/providers/ovhcloud.md +1 -1
- package/.docs/models/providers/perplexity-agent.md +1 -1
- package/.docs/models/providers/pioneer.md +1 -1
- package/.docs/models/providers/poe.md +1 -1
- package/.docs/models/providers/poolside.md +1 -1
- package/.docs/models/providers/privatemode-ai.md +12 -10
- package/.docs/models/providers/qihang-ai.md +1 -1
- package/.docs/models/providers/qiniu-ai.md +1 -1
- package/.docs/models/providers/regolo-ai.md +26 -21
- package/.docs/models/providers/requesty.md +3 -3
- package/.docs/models/providers/routing-run.md +1 -1
- package/.docs/models/providers/sakana.md +1 -1
- package/.docs/models/providers/sarvam.md +1 -1
- package/.docs/models/providers/scaleway.md +1 -1
- package/.docs/models/providers/scx.md +1 -1
- package/.docs/models/providers/siliconflow-cn.md +1 -1
- package/.docs/models/providers/siliconflow.md +1 -1
- package/.docs/models/providers/snowflake-cortex.md +6 -2
- package/.docs/models/providers/stackit.md +1 -1
- package/.docs/models/providers/stepfun-ai-step-plan.md +1 -1
- package/.docs/models/providers/stepfun-ai.md +1 -1
- package/.docs/models/providers/stepfun-step-plan.md +1 -1
- package/.docs/models/providers/stepfun.md +1 -1
- package/.docs/models/providers/subconscious.md +1 -1
- package/.docs/models/providers/submodel.md +1 -1
- package/.docs/models/providers/synthetic.md +1 -1
- package/.docs/models/providers/tencent-coding-plan.md +1 -1
- package/.docs/models/providers/tencent-token-plan.md +1 -1
- package/.docs/models/providers/tencent-tokenhub.md +1 -1
- package/.docs/models/providers/tensorx.md +1 -1
- package/.docs/models/providers/the-grid-ai.md +1 -1
- package/.docs/models/providers/thinkingmachines.md +1 -1
- package/.docs/models/providers/tinfoil.md +2 -2
- package/.docs/models/providers/togetherai.md +1 -1
- package/.docs/models/providers/trustedrouter.md +1 -1
- package/.docs/models/providers/umans-ai-coding-plan.md +1 -1
- package/.docs/models/providers/umans-ai.md +1 -1
- package/.docs/models/providers/unorouter.md +1 -1
- package/.docs/models/providers/upstage.md +1 -1
- package/.docs/models/providers/venice.md +1 -1
- package/.docs/models/providers/vivgrid.md +1 -1
- package/.docs/models/providers/vultr.md +1 -1
- package/.docs/models/providers/wafer.ai.md +1 -1
- package/.docs/models/providers/wandb.md +3 -2
- package/.docs/models/providers/xiaomi-token-plan-ams.md +1 -1
- package/.docs/models/providers/xiaomi-token-plan-cn.md +1 -1
- package/.docs/models/providers/xiaomi-token-plan-sgp.md +1 -1
- package/.docs/models/providers/xiaomi.md +1 -1
- package/.docs/models/providers/xpersona.md +1 -1
- package/.docs/models/providers/zai-coding-plan.md +1 -1
- package/.docs/models/providers/zai.md +1 -1
- package/.docs/models/providers/zeldoc.md +8 -8
- package/.docs/models/providers/zenifra.md +1 -1
- package/.docs/models/providers/zenmux.md +1 -16
- package/.docs/models/providers/zhipuai-coding-plan.md +1 -1
- package/.docs/models/providers/zhipuai.md +1 -1
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/agent-controller/agent-controller-class.md +35 -4
- package/.docs/reference/agent-controller/session.md +5 -3
- package/.docs/reference/agents/channels.md +2 -2
- package/.docs/reference/agents/durable-agent.md +2 -0
- package/.docs/reference/agents/generateLegacy.md +2 -2
- package/.docs/reference/agents/getDefaultOptions.md +1 -1
- package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
- package/.docs/reference/agents/getVoice.md +1 -1
- package/.docs/reference/agents/inngest-agent.md +3 -1
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/ai-sdk/handle-network-stream.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +1 -1
- package/.docs/{guides/agent-frameworks/ai-sdk.md → reference/ai-sdk/overview.md} +2 -2
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/better-auth.md +1 -1
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +1 -1
- package/.docs/reference/auth/google.md +1 -1
- package/.docs/reference/auth/okta.md +5 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/auth/workos.md +1 -1
- package/.docs/reference/browser/agent-browser.md +2 -2
- package/.docs/reference/browser/browser-viewer.md +1 -1
- package/.docs/reference/browser/firecrawl-browser.md +1 -1
- package/.docs/reference/browser/mastra-browser.md +1 -1
- package/.docs/reference/browser/stagehand-browser.md +2 -2
- package/.docs/reference/channels/channel-provider.md +1 -1
- package/.docs/reference/channels/slack-provider.md +2 -2
- package/.docs/reference/cli/mastra.md +6 -6
- package/.docs/reference/client-js/agents.md +2 -1
- package/.docs/reference/client-js/workflows.md +3 -3
- package/.docs/reference/code-sdk/mount-agent-controller.md +1 -1
- package/.docs/reference/configuration.md +22 -28
- package/.docs/reference/core/addDynamicWorkflow.md +2 -2
- package/.docs/reference/core/addDynamicWorkflows.md +2 -2
- package/.docs/reference/core/getStorage.md +1 -1
- package/.docs/reference/core/getVector.md +2 -2
- package/.docs/reference/core/listVectors.md +2 -2
- package/.docs/reference/core/setStorage.md +1 -1
- package/.docs/reference/datasets/startExperiment.md +8 -0
- package/.docs/reference/file-based-agents/config.md +2 -0
- package/.docs/reference/file-based-agents/instructions.md +2 -0
- package/.docs/reference/file-based-agents/logger.md +2 -0
- package/.docs/reference/file-based-agents/memory.md +2 -0
- package/.docs/reference/file-based-agents/observability.md +2 -0
- package/.docs/reference/file-based-agents/processors.md +2 -0
- package/.docs/reference/file-based-agents/schedules.md +2 -0
- package/.docs/reference/file-based-agents/scorers.md +2 -0
- package/.docs/reference/file-based-agents/server.md +2 -0
- package/.docs/reference/file-based-agents/skills.md +2 -0
- package/.docs/reference/file-based-agents/storage.md +3 -1
- package/.docs/reference/file-based-agents/studio.md +3 -1
- package/.docs/reference/file-based-agents/subagents.md +2 -0
- package/.docs/reference/file-based-agents/tools.md +2 -0
- package/.docs/reference/file-based-agents/workflows.md +2 -0
- package/.docs/reference/file-based-agents/workspace.md +2 -0
- package/.docs/reference/index.md +34 -55
- package/.docs/{guides/getting-started → reference}/manual-install.md +3 -3
- package/.docs/{guides → reference}/migrations/ai-sdk-v4-to-v5.md +1 -1
- package/.docs/{guides → reference}/migrations/mastra-cloud.md +2 -2
- package/.docs/{guides → reference}/migrations/network-to-supervisor.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/cli.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/memory.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/overview.md +41 -41
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tools.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tracing.md +11 -13
- package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
- package/.docs/reference/observability/tracing/bridges/otel.md +2 -2
- package/.docs/reference/observability/tracing/exporters/arize.md +1 -1
- package/.docs/reference/observability/tracing/exporters/arthur.md +1 -1
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +0 -1
- package/.docs/reference/observability/tracing/exporters/confident-ai.md +1 -1
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +0 -1
- package/.docs/reference/observability/tracing/exporters/datadog.md +1 -1
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +0 -1
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +12 -1
- package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +0 -1
- package/.docs/reference/observability/tracing/exporters/otel.md +2 -2
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +111 -99
- package/.docs/reference/observability/tracing/span-filtering.md +1 -1
- package/.docs/reference/processors/pii-detector.md +2 -0
- package/.docs/reference/processors/prompt-injection-detector.md +2 -0
- package/.docs/reference/processors/regex-filter-processor.md +20 -0
- package/.docs/reference/processors/response-cache.md +2 -0
- package/.docs/reference/processors/tool-search-processor.md +33 -1
- package/.docs/reference/pubsub/lease-provider.md +1 -1
- package/.docs/{guides → reference}/rag/chunking-and-embedding.md +16 -19
- package/.docs/reference/rag/database-config.md +1 -1
- package/.docs/{guides/rag/graph-rag.md → reference/rag/graph-rag-guide.md} +1 -1
- package/.docs/reference/rag/metadata-filters.md +13 -4
- package/.docs/{guides → reference}/rag/overview.md +2 -2
- package/.docs/{guides → reference}/rag/retrieval.md +18 -1
- package/.docs/{guides → reference}/rag/vector-databases.md +42 -1
- package/.docs/reference/schedules/overview.md +2 -0
- package/.docs/reference/server/create-route.md +27 -1
- package/.docs/reference/server/register-api-route.md +2 -0
- package/.docs/reference/signals/create-notification-inbox-tool.md +2 -0
- package/.docs/reference/signals/signal-provider.md +2 -0
- package/.docs/reference/signals/task-signal-provider.md +2 -0
- package/.docs/reference/signals/webhook-signal-provider.md +2 -0
- package/.docs/reference/storage/composite.md +4 -4
- package/.docs/reference/storage/overview.md +1 -1
- package/.docs/reference/storage/retention.md +4 -4
- package/.docs/reference/streaming/ChunkType.md +3 -3
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/streaming/agents/streamLegacy.md +3 -3
- package/.docs/reference/streaming/agents/streamUntilIdle.md +1 -1
- package/.docs/reference/templates/overview.md +1 -1
- package/.docs/reference/tools/create-code-mode.md +3 -1
- package/.docs/reference/tools/isolated-vm-transport.md +1 -1
- package/.docs/reference/tools/mcp-client.md +51 -0
- package/.docs/reference/tools/mcp-server.md +1 -1
- package/.docs/reference/tools/quickjs-transport.md +92 -0
- package/.docs/reference/vectors/chroma.md +1 -1
- package/.docs/reference/vectors/convex.md +2 -2
- package/.docs/reference/vectors/oracledb.md +347 -0
- package/.docs/{guides → reference}/voice/overview.md +58 -109
- package/.docs/{guides → reference}/voice/speech-to-speech.md +1 -1
- package/.docs/{guides → reference}/voice/speech-to-text.md +8 -8
- package/.docs/{guides → reference}/voice/text-to-speech.md +11 -12
- package/.docs/reference/workers/overview.md +10 -8
- package/.docs/reference/workflows/dynamic-workflow-definition.md +3 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -0
- package/.docs/reference/workflows/workflow.md +18 -0
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/.docs/reference/workspace/platform-filesystem.md +3 -3
- package/.docs/reference/workspace/platform-sandbox.md +11 -3
- package/.docs/reference/workspace/process-manager.md +3 -3
- package/.docs/reference/workspace/sandbox.md +10 -0
- package/CHANGELOG.md +97 -0
- package/dist/index.js +1 -1
- package/dist/{src-BZcgzbk9.js → src-D-W-bx5t.js} +2 -2
- package/dist/{src-BZcgzbk9.js.map → src-D-W-bx5t.js.map} +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +6 -6
- package/.docs/docs/capabilities/channels/other-adapters.md +0 -68
- package/.docs/docs/observability/integrations/bridges/datadog.md +0 -219
- package/.docs/docs/observability/integrations/bridges/otel.md +0 -234
- package/.docs/docs/observability/integrations/exporters/datadog.md +0 -321
- package/.docs/docs/observability/integrations/exporters/mastra-platform.md +0 -201
- package/.docs/docs/observability/integrations/overview.md +0 -47
- package/.docs/docs/observability/integrations/processors/sensitive-data-filter.md +0 -302
- package/.docs/guides/build-your-ui/copilotkit/channels.md +0 -86
- package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +0 -174
- package/.docs/guides/deployment/mastra-workers.md +0 -576
- package/.docs/guides/getting-started/quickstart.md +0 -88
- package/.docs/guides/guide/ai-recruiter.md +0 -228
- package/.docs/guides/guide/chef-michel.md +0 -211
- package/.docs/guides/guide/code-review-bot.md +0 -228
- package/.docs/guides/guide/coding-agent.md +0 -392
- package/.docs/guides/guide/dev-assistant.md +0 -309
- package/.docs/guides/guide/docs-manager.md +0 -240
- package/.docs/guides/guide/github-actions-pr-description.md +0 -238
- package/.docs/guides/guide/notes-mcp-server.md +0 -418
- package/.docs/guides/guide/publishing-mcp-server.md +0 -137
- package/.docs/guides/guide/research-assistant.md +0 -350
- package/.docs/guides/guide/research-coordinator.md +0 -418
- package/.docs/guides/guide/signal-provider.md +0 -221
- package/.docs/guides/guide/slack-assistant.md +0 -193
- package/.docs/guides/guide/stock-agent.md +0 -132
- package/.docs/guides/guide/web-search.md +0 -322
- package/.docs/guides/guide/whatsapp-chat-bot.md +0 -407
- package/.docs/guides/index.md +0 -24
- package/.docs/guides/voice/realtime-voice.md +0 -430
- package/.docs/reference/voice/google.md +0 -290
- package/.docs/reference/voice/inworld.md +0 -137
- package/.docs/reference/voice/openai.md +0 -96
- package/.docs/reference/voice/playai.md +0 -82
- package/.docs/reference/workspace/vercel-serverless.md +0 -128
- /package/.docs/{guides/concepts → docs/guides}/streaming.md +0 -0
- /package/.docs/{reference → docs}/mastra-platform/api.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/better-auth.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/google.md +0 -0
- /package/.docs/{reference → integrations}/voice/azure.md +0 -0
- /package/.docs/{reference → integrations}/voice/deepgram.md +0 -0
- /package/.docs/{reference → integrations}/voice/elevenlabs.md +0 -0
- /package/.docs/{reference → integrations}/voice/mistral.md +0 -0
- /package/.docs/{reference → integrations}/voice/murf.md +0 -0
- /package/.docs/{reference → integrations}/voice/sarvam.md +0 -0
- /package/.docs/{reference → integrations}/voice/speechify.md +0 -0
- /package/.docs/{reference/voice/xai-realtime.md → integrations/voice/xai.md} +0 -0
- /package/.docs/{guides → reference}/migrations/agentnetwork.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/agent.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/client.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/deployment.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/evals.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mastra.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mcp.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/processors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/rag.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/storage.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/vectors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/voice.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/workflows.md +0 -0
- /package/.docs/{guides → reference}/migrations/vnext-to-standard-apis.md +0 -0
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Sensitive data filter
|
|
4
|
-
|
|
5
|
-
The Sensitive Data Filter is a span processor that redacts sensitive information from your traces during the processing pipeline before export. This ensures that passwords, API keys, tokens, and other confidential data never leave your application or get stored in observability platforms.
|
|
6
|
-
|
|
7
|
-
## Default configuration
|
|
8
|
-
|
|
9
|
-
The Sensitive Data Filter is included in the recommended observability configuration:
|
|
10
|
-
|
|
11
|
-
```ts
|
|
12
|
-
import {
|
|
13
|
-
Observability,
|
|
14
|
-
MastraStorageExporter,
|
|
15
|
-
MastraPlatformExporter,
|
|
16
|
-
SensitiveDataFilter,
|
|
17
|
-
} from '@mastra/observability'
|
|
18
|
-
|
|
19
|
-
export const mastra = new Mastra({
|
|
20
|
-
observability: new Observability({
|
|
21
|
-
configs: {
|
|
22
|
-
default: {
|
|
23
|
-
serviceName: 'mastra',
|
|
24
|
-
exporters: [new MastraStorageExporter(), new MastraPlatformExporter()],
|
|
25
|
-
spanOutputProcessors: [
|
|
26
|
-
new SensitiveDataFilter(), // Redacts sensitive fields before export
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
}),
|
|
31
|
-
storage: new LibSQLStore({
|
|
32
|
-
id: 'mastra-storage',
|
|
33
|
-
url: 'file:./mastra.db',
|
|
34
|
-
}),
|
|
35
|
-
})
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
With the default configuration, the filter redacts these common sensitive field names:
|
|
39
|
-
|
|
40
|
-
- `password`
|
|
41
|
-
- `token`
|
|
42
|
-
- `secret`
|
|
43
|
-
- `key`
|
|
44
|
-
- `apikey`
|
|
45
|
-
- `auth`
|
|
46
|
-
- `authorization`
|
|
47
|
-
- `bearer`
|
|
48
|
-
- `bearertoken`
|
|
49
|
-
- `jwt`
|
|
50
|
-
- `credential`
|
|
51
|
-
- `clientsecret`
|
|
52
|
-
- `privatekey`
|
|
53
|
-
- `refresh`
|
|
54
|
-
- `ssn`
|
|
55
|
-
|
|
56
|
-
> **Note:** Field matching is case-insensitive and normalizes separators. For example, `api-key`, `api_key`, and `Api Key` are all treated as `apikey`.
|
|
57
|
-
|
|
58
|
-
## How it works
|
|
59
|
-
|
|
60
|
-
The Sensitive Data Filter processes spans before they're sent to exporters, scanning through:
|
|
61
|
-
|
|
62
|
-
- **Attributes** - Span metadata and properties
|
|
63
|
-
- **Metadata** - Custom metadata attached to spans
|
|
64
|
-
- **Input** - Data sent to agents, tools, and LLMs
|
|
65
|
-
- **Output** - Responses and results
|
|
66
|
-
- **Error Information** - Stack traces and error details
|
|
67
|
-
|
|
68
|
-
When a sensitive field is detected, its value is replaced with `[REDACTED]` by default. The filter handles nested objects, arrays, and circular references safely.
|
|
69
|
-
|
|
70
|
-
## Custom configuration
|
|
71
|
-
|
|
72
|
-
You can customize which fields are redacted and how redaction displays:
|
|
73
|
-
|
|
74
|
-
```ts
|
|
75
|
-
import { SensitiveDataFilter, MastraStorageExporter, Observability } from '@mastra/observability'
|
|
76
|
-
|
|
77
|
-
export const mastra = new Mastra({
|
|
78
|
-
observability: new Observability({
|
|
79
|
-
configs: {
|
|
80
|
-
production: {
|
|
81
|
-
serviceName: 'my-service',
|
|
82
|
-
exporters: [new MastraStorageExporter()],
|
|
83
|
-
spanOutputProcessors: [
|
|
84
|
-
new SensitiveDataFilter({
|
|
85
|
-
// Add custom sensitive fields
|
|
86
|
-
sensitiveFields: [
|
|
87
|
-
// Default fields
|
|
88
|
-
'password',
|
|
89
|
-
'token',
|
|
90
|
-
'secret',
|
|
91
|
-
'key',
|
|
92
|
-
'apikey',
|
|
93
|
-
// Custom fields for your application
|
|
94
|
-
'creditCard',
|
|
95
|
-
'bankAccount',
|
|
96
|
-
'routingNumber',
|
|
97
|
-
'email',
|
|
98
|
-
'phoneNumber',
|
|
99
|
-
'dateOfBirth',
|
|
100
|
-
],
|
|
101
|
-
// Custom redaction token
|
|
102
|
-
redactionToken: '***SENSITIVE***',
|
|
103
|
-
// Redaction style
|
|
104
|
-
redactionStyle: 'full', // or 'partial'
|
|
105
|
-
}),
|
|
106
|
-
],
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
}),
|
|
110
|
-
})
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Redaction styles
|
|
114
|
-
|
|
115
|
-
The filter supports two redaction styles:
|
|
116
|
-
|
|
117
|
-
### Full Redaction (Default)
|
|
118
|
-
|
|
119
|
-
Replaces the entire value with a fixed token:
|
|
120
|
-
|
|
121
|
-
```jsonc
|
|
122
|
-
// Before
|
|
123
|
-
{
|
|
124
|
-
"apiKey": "sk-abc123xyz789def456",
|
|
125
|
-
"userId": "user_12345"
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// After
|
|
129
|
-
{
|
|
130
|
-
"apiKey": "[REDACTED]",
|
|
131
|
-
"userId": "user_12345"
|
|
132
|
-
}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Partial Redaction
|
|
136
|
-
|
|
137
|
-
Shows the first and last 3 characters, useful for debugging without exposing full values:
|
|
138
|
-
|
|
139
|
-
```ts
|
|
140
|
-
new SensitiveDataFilter({
|
|
141
|
-
redactionStyle: 'partial',
|
|
142
|
-
})
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
```json
|
|
146
|
-
// Before
|
|
147
|
-
{
|
|
148
|
-
"apiKey": "sk-abc123xyz789def456",
|
|
149
|
-
"creditCard": "4111111111111111"
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// After
|
|
153
|
-
{
|
|
154
|
-
"apiKey": "sk-…456",
|
|
155
|
-
"creditCard": "411…111"
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Values shorter than 7 characters are fully redacted to prevent information leakage.
|
|
160
|
-
|
|
161
|
-
## Field matching rules
|
|
162
|
-
|
|
163
|
-
The filter uses intelligent field matching:
|
|
164
|
-
|
|
165
|
-
1. **Case-Insensitive**: `APIKey`, `apikey`, and `ApiKey` are all matched
|
|
166
|
-
|
|
167
|
-
2. **Separator-Agnostic**: `api-key`, `api_key`, and `apiKey` are treated identically
|
|
168
|
-
|
|
169
|
-
3. **Exact Matching**: After normalization, fields must match exactly
|
|
170
|
-
|
|
171
|
-
- `token` matches `token`, `Token`, `TOKEN`
|
|
172
|
-
- `token` doesn't match `promptTokens` or `tokenCount`
|
|
173
|
-
|
|
174
|
-
## Nested object handling
|
|
175
|
-
|
|
176
|
-
The filter recursively processes nested structures:
|
|
177
|
-
|
|
178
|
-
```json
|
|
179
|
-
// Before
|
|
180
|
-
{
|
|
181
|
-
"user": {
|
|
182
|
-
"id": "12345",
|
|
183
|
-
"credentials": {
|
|
184
|
-
"password": "SuperSecret123!",
|
|
185
|
-
"apiKey": "sk-production-key"
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
"config": {
|
|
189
|
-
"auth": {
|
|
190
|
-
"jwt": "eyJhbGciOiJIUzI1NiIs..."
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// After
|
|
196
|
-
{
|
|
197
|
-
"user": {
|
|
198
|
-
"id": "12345",
|
|
199
|
-
"credentials": {
|
|
200
|
-
"password": "[REDACTED]",
|
|
201
|
-
"apiKey": "[REDACTED]"
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
"config": {
|
|
205
|
-
"auth": {
|
|
206
|
-
"jwt": "[REDACTED]"
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
## Performance considerations
|
|
213
|
-
|
|
214
|
-
The Sensitive Data Filter is designed to be lightweight and efficient:
|
|
215
|
-
|
|
216
|
-
- **Synchronous Processing**: No async operations, minimal latency impact
|
|
217
|
-
- **Circular Reference Handling**: Safely handles complex object graphs
|
|
218
|
-
- **Error Recovery**: If filtering fails, the field is replaced with an error marker rather than crashing
|
|
219
|
-
|
|
220
|
-
## Disabling the filter
|
|
221
|
-
|
|
222
|
-
If you need to disable sensitive data filtering (not recommended for production):
|
|
223
|
-
|
|
224
|
-
```ts
|
|
225
|
-
export const mastra = new Mastra({
|
|
226
|
-
observability: new Observability({
|
|
227
|
-
configs: {
|
|
228
|
-
debug: {
|
|
229
|
-
serviceName: 'debug-service',
|
|
230
|
-
spanOutputProcessors: [], // No processors, including no SensitiveDataFilter
|
|
231
|
-
exporters: [new MastraStorageExporter()],
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
}),
|
|
235
|
-
})
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
> **Warning:** Only disable sensitive data filtering in controlled environments. Never disable it when sending traces to external services or shared storage.
|
|
239
|
-
|
|
240
|
-
## Common use cases
|
|
241
|
-
|
|
242
|
-
### Healthcare Applications
|
|
243
|
-
|
|
244
|
-
```ts
|
|
245
|
-
new SensitiveDataFilter({
|
|
246
|
-
sensitiveFields: [
|
|
247
|
-
// HIPAA-related fields
|
|
248
|
-
'ssn',
|
|
249
|
-
'socialSecurityNumber',
|
|
250
|
-
'medicalRecordNumber',
|
|
251
|
-
'mrn',
|
|
252
|
-
'healthInsuranceNumber',
|
|
253
|
-
'diagnosisCode',
|
|
254
|
-
'icd10',
|
|
255
|
-
'prescription',
|
|
256
|
-
'medication',
|
|
257
|
-
],
|
|
258
|
-
})
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
### Financial Services
|
|
262
|
-
|
|
263
|
-
```ts
|
|
264
|
-
new SensitiveDataFilter({
|
|
265
|
-
sensitiveFields: [
|
|
266
|
-
// PCI compliance fields
|
|
267
|
-
'creditCard',
|
|
268
|
-
'ccNumber',
|
|
269
|
-
'cardNumber',
|
|
270
|
-
'cvv',
|
|
271
|
-
'cvc',
|
|
272
|
-
'securityCode',
|
|
273
|
-
'expirationDate',
|
|
274
|
-
'expiry',
|
|
275
|
-
'bankAccount',
|
|
276
|
-
'accountNumber',
|
|
277
|
-
'routingNumber',
|
|
278
|
-
'iban',
|
|
279
|
-
'swift',
|
|
280
|
-
],
|
|
281
|
-
})
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
## Error handling
|
|
285
|
-
|
|
286
|
-
If the filter encounters an error while processing a field, it replaces the field with a safe error marker:
|
|
287
|
-
|
|
288
|
-
```json
|
|
289
|
-
{
|
|
290
|
-
"problematicField": {
|
|
291
|
-
"error": {
|
|
292
|
-
"processor": "sensitive-data-filter"
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
As a result, processing errors don't prevent traces from being exported or cause application crashes.
|
|
299
|
-
|
|
300
|
-
## Related
|
|
301
|
-
|
|
302
|
-
- [SensitiveDataFilter API](https://mastra.ai/reference/observability/tracing/processors/sensitive-data-filter)
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# CopilotKit channels
|
|
4
|
-
|
|
5
|
-
The same Mastra agent that powers your in-app copilot can also run as a bot in messaging platforms. CopilotKit's Channels SDK connects your agent to Slack and other messaging platforms, with threads, tool calls, rich interactive messages, and human-in-the-loop approvals handled natively in the channel.
|
|
6
|
-
|
|
7
|
-
> **Info:** Full platform setup lives in the [CopilotKit Channels documentation](https://docs.copilotkit.ai/slack/mastra). This page shows how Channels fit together with a Mastra agent.
|
|
8
|
-
|
|
9
|
-
## How it fits together
|
|
10
|
-
|
|
11
|
-
Your Mastra agent stays where it's deployed, exposed over AG-UI through `registerCopilotKit()` (see [CopilotKit overview](https://mastra.ai/guides/build-your-ui/copilotkit/overview)). A channel is a separate long-running process built with `@copilotkit/channels`: you attach one or more platform adapters and point the channel at your agent. `createChannel` takes an array of adapters, so a single process can serve several platforms at once.
|
|
12
|
-
|
|
13
|
-
Install the SDK (batteries-included, every adapter):
|
|
14
|
-
|
|
15
|
-
**npm**:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install @copilotkit/channels
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
**pnpm**:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
pnpm add @copilotkit/channels
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
**Yarn**:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
yarn add @copilotkit/channels
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
**Bun**:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
bun add @copilotkit/channels
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
```typescript
|
|
40
|
-
import { createChannel, Message, Section } from '@copilotkit/channels'
|
|
41
|
-
import { slack } from '@copilotkit/channels/slack'
|
|
42
|
-
import { mastraAgent } from './agent' // your AG-UI Mastra agent
|
|
43
|
-
|
|
44
|
-
const channel = createChannel({
|
|
45
|
-
// Point the channel at your Mastra agent (an AbstractAgent, or a per-thread factory).
|
|
46
|
-
agent: mastraAgent,
|
|
47
|
-
adapters: [
|
|
48
|
-
slack({
|
|
49
|
-
botToken: process.env.SLACK_BOT_TOKEN!,
|
|
50
|
-
appToken: process.env.SLACK_APP_TOKEN!,
|
|
51
|
-
}),
|
|
52
|
-
],
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
channel.onMention(async ({ thread }) => {
|
|
56
|
-
await thread.runAgent()
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
await channel.start()
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
The agent receives ordinary AG-UI input and emits ordinary AG-UI events; the platform mechanics stay behind the adapter, so the same Mastra agent runs unchanged across every channel. Rich messages are written as JSX and rendered to each platform's native format (Block Kit on Slack, for example), so an interactive card degrades gracefully where a platform has no equivalent.
|
|
63
|
-
|
|
64
|
-
## Slack
|
|
65
|
-
|
|
66
|
-
The [Slack quickstart](https://docs.copilotkit.ai/slack/mastra) takes you from zero to a bot you can `@`-mention in a channel, then adds an interactive button card. Slack runs over Socket Mode, which opens an outbound WebSocket to Slack, so no public URL or tunnel is required during development.
|
|
67
|
-
|
|
68
|
-
Set the Slack credentials in your environment:
|
|
69
|
-
|
|
70
|
-
- `SLACK_BOT_TOKEN`: Bot User OAuth token (`xoxb-...`)
|
|
71
|
-
- `SLACK_APP_TOKEN`: App-level token with the `connections:write` scope (`xapp-...`)
|
|
72
|
-
|
|
73
|
-
## Other platforms
|
|
74
|
-
|
|
75
|
-
The Channels SDK isn't limited to Slack. Other platforms like Microsoft Teams run through the same `@copilotkit/channels` API: add the matching adapter to the `adapters` array and the rest of your agent code stays the same. See the [CopilotKit Channels documentation](https://docs.copilotkit.ai/slack/mastra) for the current platform list and per-platform setup.
|
|
76
|
-
|
|
77
|
-
## Message pipeline and architecture
|
|
78
|
-
|
|
79
|
-
Managed channels keep a deliberate credential split, which matters when your Mastra agent uses separate model keys and tools:
|
|
80
|
-
|
|
81
|
-
- **You keep** the agent logic, model credentials, tools, and the channel process.
|
|
82
|
-
- **CopilotKit Intelligence holds** the platform credentials, message delivery, registration, health, and reconnects.
|
|
83
|
-
|
|
84
|
-
A turn begins when a user messages the app. Intelligence receives the platform event, and the gateway delivers the turn to your running channel process. Your Mastra agent runs and renders a reply. Intelligence then returns the reply as native platform content. Platform credentials never enter the agent process, and enterprise Intelligence can be self-hosted for data residency.
|
|
85
|
-
|
|
86
|
-
> **Note:** By default, interactive actions live in memory and reset on restart. Back the channel with a durable action and state store (Redis or Postgres) so buttons and per-thread state survive restarts and span multiple instances.
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# CopilotKit generative UI
|
|
4
|
-
|
|
5
|
-
Generative UI describes interfaces that agents help create and that users can interact with. CopilotKit organizes these interfaces along a single axis, the **generative UI spectrum**, which runs from author-controlled (you decide every pixel) to agent-invented (the agent owns the rendered surface). Your position on the axis is a trade-off between predictability and breadth.
|
|
6
|
-
|
|
7
|
-
The spectrum has three tiers:
|
|
8
|
-
|
|
9
|
-
| Tier | Who controls the surface | Primitives |
|
|
10
|
-
| --------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------- |
|
|
11
|
-
| **Controlled** | You wrote the component. The agent picks which one to use and what data to pass. | Tool call rendering, state rendering, reasoning, components as tools |
|
|
12
|
-
| **Declarative** | The agent emits a structured spec. The frontend composes it from a catalog you registered. | A2UI (fixed-schema and flexible variants) |
|
|
13
|
-
| **Open-ended** | The UI is invented elsewhere (an MCP server) and you sandbox it. | MCP Apps |
|
|
14
|
-
|
|
15
|
-
Each tier is a Mastra agent exposed through `registerCopilotKit()` (see [CopilotKit overview](https://mastra.ai/guides/build-your-ui/copilotkit/overview)) plus the matching CopilotKit hook on the frontend. For the full concept, see CopilotKit's [generative UI spectrum](https://www.copilotkit.ai/generative-ui-spectrum) and [generative UI overview](https://docs.copilotkit.ai/concepts/generative-ui-overview).
|
|
16
|
-
|
|
17
|
-
> **Tip:** Mastra's [UI Dojo](https://ui-dojo.mastra.ai/) has working CopilotKit examples. Browse the source under `src/pages/copilot-kit`.
|
|
18
|
-
|
|
19
|
-
## Controlled
|
|
20
|
-
|
|
21
|
-
You provide a fixed set of components. The agent chooses which component to render and supplies its data. This predictable, brand-safe approach works well for high-traffic surfaces. The Controlled primitives use CopilotKit's v2 API, imported from `@copilotkit/react-core/v2`.
|
|
22
|
-
|
|
23
|
-
### Tool call rendering
|
|
24
|
-
|
|
25
|
-
Render an agent's tool call as a React component. Define the agent and tool on the Mastra server as usual:
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
import { Agent } from '@mastra/core/agent'
|
|
29
|
-
import { weatherTool } from '../tools/weather-tool'
|
|
30
|
-
|
|
31
|
-
export const weatherAgent = new Agent({
|
|
32
|
-
id: 'weather-agent',
|
|
33
|
-
name: 'Weather Agent',
|
|
34
|
-
instructions: 'Use the weatherTool to fetch current weather data.',
|
|
35
|
-
model: 'openai/gpt-5.6-sol',
|
|
36
|
-
tools: { weatherTool },
|
|
37
|
-
})
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
On the frontend, register a renderer for the tool by name with `useRenderTool`. It's render-only (it doesn't execute the tool); the `render` function receives the tool call's `status` and, once the agent returns, its `result`:
|
|
41
|
-
|
|
42
|
-
```tsx
|
|
43
|
-
import { z } from 'zod'
|
|
44
|
-
import { CopilotChat } from '@copilotkit/react-ui'
|
|
45
|
-
import { CopilotKit, useRenderTool } from '@copilotkit/react-core/v2'
|
|
46
|
-
import { Weather } from '@/components/weather'
|
|
47
|
-
|
|
48
|
-
function Chat() {
|
|
49
|
-
useRenderTool(
|
|
50
|
-
{
|
|
51
|
-
name: 'weatherTool',
|
|
52
|
-
parameters: z.object({ location: z.string() }),
|
|
53
|
-
render: ({ status, result }) => {
|
|
54
|
-
if (status !== 'complete') {
|
|
55
|
-
return <div>Retrieving weather...</div>
|
|
56
|
-
}
|
|
57
|
-
return <Weather {...result} />
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
[],
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
return <CopilotChat labels={{ title: 'Weather Assistant' }} />
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export default function Page() {
|
|
67
|
-
return (
|
|
68
|
-
<CopilotKit runtimeUrl="http://localhost:4111/copilotkit" agent="weatherAgent">
|
|
69
|
-
<Chat />
|
|
70
|
-
</CopilotKit>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Because Mastra streams tool-call arguments incrementally, the `render` function is called repeatedly as the arguments arrive, so the UI can paint progressively while the agent works.
|
|
76
|
-
|
|
77
|
-
### Components as tools
|
|
78
|
-
|
|
79
|
-
Register a React component and let the agent call it as a tool. CopilotKit renders it inline with typed props (defined with a Zod schema):
|
|
80
|
-
|
|
81
|
-
```tsx
|
|
82
|
-
import { z } from 'zod'
|
|
83
|
-
import { useComponent } from '@copilotkit/react-core/v2'
|
|
84
|
-
|
|
85
|
-
const schema = z.object({ text: z.string() })
|
|
86
|
-
|
|
87
|
-
function Callout({ text }: z.infer<typeof schema>) {
|
|
88
|
-
return <div className="callout">{text}</div>
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function Chat() {
|
|
92
|
-
useComponent({ name: 'callout', render: Callout, parameters: schema }, [])
|
|
93
|
-
return <CopilotChat labels={{ title: 'Assistant' }} />
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
The agent invokes `callout` like any other tool, and CopilotKit renders `Callout` with the props it passed.
|
|
98
|
-
|
|
99
|
-
### State rendering
|
|
100
|
-
|
|
101
|
-
Render UI from the agent's state and re-render as it streams. On Mastra, agent state is the agent's working memory, streamed to the client as it changes. Read it with `useAgent`; `agent.state` is reactive, so the component updates automatically:
|
|
102
|
-
|
|
103
|
-
```tsx
|
|
104
|
-
import { useAgent } from '@copilotkit/react-core/v2'
|
|
105
|
-
|
|
106
|
-
function TaskBoard() {
|
|
107
|
-
const { agent } = useAgent()
|
|
108
|
-
const tasks = (agent.state.tasks as any[]) ?? []
|
|
109
|
-
|
|
110
|
-
return (
|
|
111
|
-
<ul>
|
|
112
|
-
{tasks.map((task, i) => (
|
|
113
|
-
<li key={i}>
|
|
114
|
-
{task.title}: {task.status}
|
|
115
|
-
</li>
|
|
116
|
-
))}
|
|
117
|
-
</ul>
|
|
118
|
-
)
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### Reasoning
|
|
123
|
-
|
|
124
|
-
Reasoning is zero-config: when your Mastra agent runs a reasoning-capable model, `CopilotChat` renders the model's thinking inline as a dedicated message type, with no extra code. To restyle it, pass your own component to the `reasoningMessage` slot on `CopilotChat`. See CopilotKit's [generative UI guides](https://docs.copilotkit.ai/) for details.
|
|
125
|
-
|
|
126
|
-
## Declarative
|
|
127
|
-
|
|
128
|
-
Instead of a fixed component per tool, you register a catalog of typed building blocks and the agent assembles them into a UI tree per request. CopilotKit calls this **A2UI** (Agent-to-UI), which has fixed-schema and flexible variants. It suits the long tail of secondary interactions where breadth matters more than pixel-perfection.
|
|
129
|
-
|
|
130
|
-
The path of least resistance is to pass your catalog to the `<CopilotKit>` provider. That single prop enables A2UI rendering and injects the A2UI tool into your agent, so no backend change is needed:
|
|
131
|
-
|
|
132
|
-
```tsx
|
|
133
|
-
import { CopilotKit } from '@copilotkit/react-core/v2'
|
|
134
|
-
import { myCatalog } from './a2ui-catalog'
|
|
135
|
-
|
|
136
|
-
export default function Page() {
|
|
137
|
-
return (
|
|
138
|
-
<CopilotKit
|
|
139
|
-
runtimeUrl="http://localhost:4111/copilotkit"
|
|
140
|
-
agent="weatherAgent"
|
|
141
|
-
a2ui={{ catalog: myCatalog }}
|
|
142
|
-
>
|
|
143
|
-
{/* your app */}
|
|
144
|
-
</CopilotKit>
|
|
145
|
-
)
|
|
146
|
-
}
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
The catalog defines the primitives (their schemas) and the renderers (how each primitive displays). In the fixed-schema variant, the components are pre-authored and the agent's tool only supplies data. The flexible variant lets the agent compose the tree more freely. See CopilotKit's [A2UI documentation](https://docs.copilotkit.ai/a2a/generative-ui/a2ui).
|
|
150
|
-
|
|
151
|
-
## Open-ended
|
|
152
|
-
|
|
153
|
-
At the far end of the spectrum, the agent owns the entire surface: the UI is invented elsewhere and sandboxed in your app. CopilotKit supports this through **MCP Apps**, where an MCP server provides UI that renders inside your application. This tier trades determinism for novelty and is the most experimental point on the spectrum.
|
|
154
|
-
|
|
155
|
-
The path of least resistance keeps the frontend untouched: your existing `<CopilotKit>` provider is enough. On the backend, point `registerCopilotKit()` at one or more MCP servers with the `mcpApps` option (it's forwarded to the CopilotKit runtime):
|
|
156
|
-
|
|
157
|
-
```typescript
|
|
158
|
-
registerCopilotKit({
|
|
159
|
-
path: '/copilotkit',
|
|
160
|
-
resourceId: 'weatherAgent',
|
|
161
|
-
mcpApps: {
|
|
162
|
-
servers: [{ type: 'http', url: 'http://localhost:3108/mcp', serverId: 'my-server' }],
|
|
163
|
-
},
|
|
164
|
-
})
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
When the agent calls an MCP App tool, CopilotKit fetches and renders that tool's UI in the chat with no additional frontend code. See CopilotKit's [MCP Apps documentation](https://docs.copilotkit.ai/agno/generative-ui/mcp-apps).
|
|
168
|
-
|
|
169
|
-
## App control and interactivity
|
|
170
|
-
|
|
171
|
-
Some capabilities sit next to the spectrum rather than on it: they control your app or gate a run instead of rendering agent output. Both are covered in [Get started](https://mastra.ai/guides/build-your-ui/copilotkit/overview):
|
|
172
|
-
|
|
173
|
-
- **Frontend tools** (`useFrontendTool`): let the agent act on your application. This is part of CopilotKit's separate [App Control](https://docs.copilotkit.ai/) concept, alongside shared state and agent context.
|
|
174
|
-
- **Human-in-the-loop**: pause a run and wait for user approval or edits. Backend side, see Mastra's [Agent approval](https://mastra.ai/docs/agents/agent-approval); frontend side, see CopilotKit's [`useHumanInTheLoop`](https://docs.copilotkit.ai/reference/hooks/useHumanInTheLoop).
|