@mastra/mcp-docs-server 1.2.11 → 1.2.12-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (448) hide show
  1. package/.docs/docs/agent-builder/access-control.md +3 -3
  2. package/.docs/docs/agent-builder/browser.md +1 -1
  3. package/.docs/docs/agent-builder/channels.md +1 -1
  4. package/.docs/docs/agent-builder/configuration.md +3 -3
  5. package/.docs/docs/agent-builder/deploying.md +2 -2
  6. package/.docs/docs/agent-builder/integrations.md +8 -8
  7. package/.docs/docs/agent-builder/memory.md +2 -2
  8. package/.docs/docs/agent-builder/overview.md +1 -1
  9. package/.docs/docs/agent-controller/channels.md +8 -6
  10. package/.docs/docs/agent-controller/modes.md +6 -6
  11. package/.docs/docs/agent-controller/overview.md +13 -9
  12. package/.docs/docs/agent-controller/session.md +27 -9
  13. package/.docs/docs/agent-controller/subagents.md +9 -6
  14. package/.docs/docs/agent-controller/threads-and-state.md +12 -8
  15. package/.docs/docs/agent-controller/tool-approvals.md +7 -3
  16. package/.docs/docs/agents/a2a.md +4 -2
  17. package/.docs/docs/agents/acp.md +5 -5
  18. package/.docs/docs/agents/agent-approval.md +13 -11
  19. package/.docs/docs/agents/code-mode.md +29 -6
  20. package/.docs/docs/agents/guardrails.md +8 -8
  21. package/.docs/docs/agents/networks.md +2 -2
  22. package/.docs/docs/agents/overview.md +9 -7
  23. package/.docs/docs/agents/processors.md +15 -15
  24. package/.docs/docs/agents/skills.md +6 -6
  25. package/.docs/docs/agents/structured-output.md +6 -6
  26. package/.docs/docs/agents/supervisor-agents.md +19 -13
  27. package/.docs/docs/agents/using-tools.md +48 -21
  28. package/.docs/docs/browser/agent-browser.md +4 -4
  29. package/.docs/docs/browser/browser-viewer.md +2 -2
  30. package/.docs/docs/browser/firecrawl.md +1 -1
  31. package/.docs/docs/browser/overview.md +2 -2
  32. package/.docs/docs/browser/recording.md +1 -1
  33. package/.docs/docs/browser/stagehand.md +7 -7
  34. package/.docs/docs/capabilities/channels/discord.md +1 -1
  35. package/.docs/docs/capabilities/channels/other-adapters.md +1 -1
  36. package/.docs/docs/capabilities/channels/overview.md +9 -5
  37. package/.docs/docs/capabilities/channels/slack.md +2 -2
  38. package/.docs/docs/capabilities/channels/teams.md +1 -1
  39. package/.docs/docs/capabilities/channels/telegram.md +1 -1
  40. package/.docs/docs/capabilities/channels/whatsapp.md +1 -1
  41. package/.docs/docs/deployment/mastra-server.md +1 -1
  42. package/.docs/docs/deployment/overview.md +6 -2
  43. package/.docs/docs/deployment/sandbox.md +3 -1
  44. package/.docs/docs/deployment/workers.md +137 -0
  45. package/.docs/docs/editor/overview.md +37 -31
  46. package/.docs/docs/editor/prompts.md +8 -4
  47. package/.docs/docs/editor/tools.md +3 -3
  48. package/.docs/docs/evals/built-in-scorers.md +4 -4
  49. package/.docs/docs/evals/custom-scorers.md +5 -5
  50. package/.docs/docs/evals/datasets/running-experiments.md +7 -7
  51. package/.docs/docs/evals/evals-with-memory.md +4 -4
  52. package/.docs/docs/evals/gates-and-verdicts.md +4 -4
  53. package/.docs/docs/evals/multi-turn.md +12 -12
  54. package/.docs/docs/evals/overview.md +6 -4
  55. package/.docs/docs/evals/quick-checks.md +2 -2
  56. package/.docs/docs/getting-started/build-with-ai.md +6 -4
  57. package/.docs/docs/getting-started/file-based-agents.md +6 -4
  58. package/.docs/docs/getting-started/manual-install.md +1 -1
  59. package/.docs/docs/index.md +9 -90
  60. package/.docs/docs/long-running-agents/background-tasks.md +10 -10
  61. package/.docs/docs/long-running-agents/durable-agents.md +46 -5
  62. package/.docs/docs/long-running-agents/goals.md +15 -11
  63. package/.docs/docs/long-running-agents/schedules.md +3 -3
  64. package/.docs/docs/long-running-agents/signal-providers.md +8 -6
  65. package/.docs/docs/long-running-agents/signals.md +9 -5
  66. package/.docs/docs/mastra-platform/configuration.md +3 -3
  67. package/.docs/docs/mastra-platform/database.md +8 -8
  68. package/.docs/docs/mastra-platform/deploy.md +8 -4
  69. package/.docs/docs/mastra-platform/environments.md +8 -4
  70. package/.docs/docs/mastra-platform/github.md +3 -1
  71. package/.docs/docs/mastra-platform/server.md +1 -1
  72. package/.docs/docs/mastra-platform/studio.md +2 -2
  73. package/.docs/docs/mastra-platform/workspace.md +6 -6
  74. package/.docs/docs/mcp/mcp-apps.md +1 -1
  75. package/.docs/docs/mcp/overview.md +9 -9
  76. package/.docs/docs/memory/memory-processors.md +10 -10
  77. package/.docs/docs/memory/message-history.md +11 -5
  78. package/.docs/docs/memory/multi-user-threads.md +6 -6
  79. package/.docs/docs/memory/observational-memory.md +27 -25
  80. package/.docs/docs/memory/overview.md +10 -10
  81. package/.docs/docs/memory/semantic-recall.md +3 -3
  82. package/.docs/docs/memory/working-memory.md +8 -8
  83. package/.docs/docs/observability/integrations/bridges/datadog.md +6 -6
  84. package/.docs/docs/observability/integrations/bridges/otel.md +5 -5
  85. package/.docs/docs/observability/integrations/exporters/datadog.md +1 -1
  86. package/.docs/docs/observability/integrations/exporters/laminar.md +1 -1
  87. package/.docs/docs/observability/integrations/exporters/langfuse.md +3 -3
  88. package/.docs/docs/observability/integrations/exporters/langsmith.md +4 -4
  89. package/.docs/docs/observability/integrations/exporters/mastra-platform.md +1 -1
  90. package/.docs/docs/observability/integrations/exporters/mastra-storage.md +1 -1
  91. package/.docs/docs/observability/integrations/exporters/otel.md +26 -4
  92. package/.docs/docs/observability/integrations/exporters/sentry.md +1 -1
  93. package/.docs/docs/observability/integrations/overview.md +1 -1
  94. package/.docs/docs/observability/integrations/processors/sensitive-data-filter.md +1 -1
  95. package/.docs/docs/observability/logging.md +1 -1
  96. package/.docs/docs/observability/metrics/overview.md +1 -1
  97. package/.docs/docs/observability/metrics/querying.md +8 -8
  98. package/.docs/docs/observability/overview.md +4 -4
  99. package/.docs/docs/observability/tracing/overview.md +18 -12
  100. package/.docs/docs/rag/chunking-and-embedding.md +1 -1
  101. package/.docs/docs/rag/graph-rag.md +7 -7
  102. package/.docs/docs/rag/overview.md +2 -2
  103. package/.docs/docs/rag/retrieval.md +18 -18
  104. package/.docs/docs/rag/vector-databases.md +2 -2
  105. package/.docs/docs/server/auth/composite-auth.md +2 -2
  106. package/.docs/docs/server/auth/fga.md +6 -6
  107. package/.docs/docs/server/auth/firebase.md +2 -2
  108. package/.docs/docs/server/auth/simple-auth.md +1 -1
  109. package/.docs/docs/server/auth/workers.md +133 -0
  110. package/.docs/docs/server/custom-adapters.md +4 -4
  111. package/.docs/docs/server/mastra-client.md +3 -3
  112. package/.docs/docs/server/mastra-server.md +2 -2
  113. package/.docs/docs/server/middleware.md +1 -1
  114. package/.docs/docs/server/pubsub.md +7 -4
  115. package/.docs/docs/server/request-context.md +11 -11
  116. package/.docs/docs/server/server-adapters.md +2 -2
  117. package/.docs/docs/storage/overview.md +2 -2
  118. package/.docs/docs/studio/auth.md +5 -5
  119. package/.docs/docs/studio/deployment.md +1 -1
  120. package/.docs/docs/studio/observability.md +2 -2
  121. package/.docs/docs/studio/overview.md +11 -9
  122. package/.docs/docs/voice/overview.md +26 -26
  123. package/.docs/docs/voice/realtime-voice.md +8 -8
  124. package/.docs/docs/voice/speech-to-speech.md +9 -9
  125. package/.docs/docs/voice/speech-to-text.md +3 -3
  126. package/.docs/docs/voice/text-to-speech.md +6 -6
  127. package/.docs/docs/what-is-mastra.md +161 -0
  128. package/.docs/docs/workflows/agents-and-tools.md +3 -3
  129. package/.docs/docs/workflows/control-flow.md +10 -8
  130. package/.docs/docs/workflows/error-handling.md +2 -2
  131. package/.docs/docs/workflows/overview.md +7 -6
  132. package/.docs/docs/workflows/scheduled-workflows.md +12 -12
  133. package/.docs/docs/workflows/snapshots.md +3 -3
  134. package/.docs/docs/workflows/suspend-and-resume.md +1 -1
  135. package/.docs/docs/workflows/time-travel.md +3 -1
  136. package/.docs/docs/workflows/workflow-state.md +1 -1
  137. package/.docs/docs/workspace/filesystem.md +10 -10
  138. package/.docs/docs/workspace/lsp.md +1 -1
  139. package/.docs/docs/workspace/overview.md +12 -12
  140. package/.docs/docs/workspace/sandbox.md +9 -7
  141. package/.docs/docs/workspace/search.md +3 -3
  142. package/.docs/docs/workspace/skills.md +7 -7
  143. package/.docs/guides/build-your-ui/ai-sdk-ui.md +6 -6
  144. package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +9 -9
  145. package/.docs/guides/build-your-ui/copilotkit/overview.md +2 -2
  146. package/.docs/guides/build-your-ui/openui.md +2 -2
  147. package/.docs/guides/concepts/multi-agent-systems.md +5 -5
  148. package/.docs/guides/concepts/streaming.md +10 -10
  149. package/.docs/guides/deployment/amazon-ec2.md +1 -1
  150. package/.docs/guides/deployment/aws-lambda.md +1 -1
  151. package/.docs/guides/deployment/azure-app-services.md +1 -1
  152. package/.docs/guides/deployment/cloudflare.md +1 -1
  153. package/.docs/guides/deployment/inngest.md +6 -6
  154. package/.docs/guides/deployment/kubernetes.md +1 -1
  155. package/.docs/guides/deployment/mastra-workers.md +232 -0
  156. package/.docs/guides/deployment/temporal.md +1 -1
  157. package/.docs/guides/deployment/vercel.md +1 -1
  158. package/.docs/guides/getting-started/astro.md +1 -1
  159. package/.docs/guides/getting-started/electron.md +1 -1
  160. package/.docs/guides/getting-started/nestjs.md +5 -5
  161. package/.docs/guides/getting-started/vite-react.md +1 -1
  162. package/.docs/guides/guide/ai-recruiter.md +1 -1
  163. package/.docs/guides/guide/chef-michel.md +2 -2
  164. package/.docs/guides/guide/code-review-bot.md +2 -2
  165. package/.docs/guides/guide/coding-agent.md +5 -5
  166. package/.docs/guides/guide/dev-assistant.md +2 -2
  167. package/.docs/guides/guide/docs-manager.md +4 -4
  168. package/.docs/guides/guide/firecrawl.md +1 -1
  169. package/.docs/guides/guide/github-actions-pr-description.md +5 -5
  170. package/.docs/guides/guide/research-assistant.md +4 -4
  171. package/.docs/guides/guide/research-coordinator.md +5 -5
  172. package/.docs/guides/guide/signal-provider.md +1 -1
  173. package/.docs/guides/guide/slack-assistant.md +1 -1
  174. package/.docs/guides/guide/stock-agent.md +3 -3
  175. package/.docs/guides/guide/web-search.md +4 -4
  176. package/.docs/guides/guide/whatsapp-chat-bot.md +2 -2
  177. package/.docs/guides/index.md +1 -1
  178. package/.docs/guides/migrations/agentnetwork.md +4 -4
  179. package/.docs/guides/migrations/ai-sdk-v4-to-v5.md +1 -1
  180. package/.docs/guides/migrations/mastra-cloud.md +6 -6
  181. package/.docs/guides/migrations/network-to-supervisor.md +9 -9
  182. package/.docs/guides/migrations/upgrade-to-v1/agent.md +6 -6
  183. package/.docs/guides/migrations/upgrade-to-v1/cli.md +1 -1
  184. package/.docs/guides/migrations/upgrade-to-v1/client.md +3 -3
  185. package/.docs/guides/migrations/upgrade-to-v1/evals.md +2 -2
  186. package/.docs/guides/migrations/upgrade-to-v1/memory.md +1 -1
  187. package/.docs/guides/migrations/upgrade-to-v1/overview.md +3 -3
  188. package/.docs/guides/migrations/upgrade-to-v1/processors.md +1 -1
  189. package/.docs/guides/migrations/upgrade-to-v1/storage.md +11 -11
  190. package/.docs/guides/migrations/upgrade-to-v1/tools.md +3 -3
  191. package/.docs/guides/migrations/upgrade-to-v1/tracing.md +2 -2
  192. package/.docs/guides/migrations/upgrade-to-v1/voice.md +1 -1
  193. package/.docs/guides/migrations/upgrade-to-v1/workflows.md +1 -1
  194. package/.docs/guides/migrations/vnext-to-standard-apis.md +2 -2
  195. package/.docs/models/environment-variables.md +1 -0
  196. package/.docs/models/gateways/custom-gateways.md +3 -3
  197. package/.docs/models/gateways/openrouter.md +1 -3
  198. package/.docs/models/gateways/vercel.md +2 -1
  199. package/.docs/models/index.md +6 -6
  200. package/.docs/models/providers/baseten.md +1 -1
  201. package/.docs/models/providers/chutes.md +2 -1
  202. package/.docs/models/providers/crossmodel.md +2 -2
  203. package/.docs/models/providers/deepinfra.md +1 -1
  204. package/.docs/models/providers/hyper.md +3 -3
  205. package/.docs/models/providers/llmgateway.md +4 -3
  206. package/.docs/models/providers/modal.md +73 -0
  207. package/.docs/models/providers/wandb.md +2 -1
  208. package/.docs/models/providers.md +1 -0
  209. package/.docs/reference/acp/acp-agent.md +4 -4
  210. package/.docs/reference/acp/create-acp-tool.md +3 -3
  211. package/.docs/reference/agent-controller/agent-controller-class.md +36 -36
  212. package/.docs/reference/agent-controller/session.md +6 -6
  213. package/.docs/reference/agents/agent.md +14 -14
  214. package/.docs/reference/agents/channels.md +29 -13
  215. package/.docs/reference/agents/durable-agent.md +54 -5
  216. package/.docs/reference/agents/generate.md +3 -3
  217. package/.docs/reference/agents/generateLegacy.md +1 -1
  218. package/.docs/reference/agents/getDefaultOptions.md +1 -1
  219. package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
  220. package/.docs/reference/agents/getLLM.md +2 -2
  221. package/.docs/reference/agents/getMetadata.md +2 -2
  222. package/.docs/reference/agents/inngest-agent.md +1 -1
  223. package/.docs/reference/agents/listScorers.md +1 -1
  224. package/.docs/reference/agents/listSkills.md +1 -1
  225. package/.docs/reference/agents/listSuspendedRuns.md +2 -2
  226. package/.docs/reference/agents/network.md +1 -1
  227. package/.docs/reference/ai-sdk/chat-route.md +1 -1
  228. package/.docs/reference/ai-sdk/network-route.md +1 -1
  229. package/.docs/reference/ai-sdk/to-ai-sdk-messages.md +1 -1
  230. package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +1 -1
  231. package/.docs/reference/ai-sdk/to-ai-sdk-v5-messages.md +1 -1
  232. package/.docs/reference/ai-sdk/workflow-route.md +1 -1
  233. package/.docs/reference/ai-sdk/workflow-snapshot-to-stream.md +2 -2
  234. package/.docs/reference/auth/auth0.md +1 -1
  235. package/.docs/reference/auth/fga.md +2 -2
  236. package/.docs/reference/auth/google.md +2 -2
  237. package/.docs/reference/auth/okta.md +1 -1
  238. package/.docs/reference/auth/workos.md +2 -2
  239. package/.docs/reference/browser/agent-browser.md +3 -3
  240. package/.docs/reference/browser/browser-viewer.md +4 -4
  241. package/.docs/reference/browser/firecrawl-browser.md +1 -1
  242. package/.docs/reference/browser/mastra-browser.md +4 -4
  243. package/.docs/reference/browser/stagehand-browser.md +8 -8
  244. package/.docs/reference/channels/slack-provider.md +2 -2
  245. package/.docs/reference/cli/create-mastra.md +1 -1
  246. package/.docs/reference/cli/mastra.md +155 -24
  247. package/.docs/reference/client-js/agents.md +26 -9
  248. package/.docs/reference/client-js/memory.md +2 -2
  249. package/.docs/reference/client-js/workflows.md +1 -1
  250. package/.docs/reference/coding-agent/build-base-prompt.md +2 -2
  251. package/.docs/reference/coding-agent/create-coding-agent.md +2 -2
  252. package/.docs/reference/configuration.md +7 -7
  253. package/.docs/reference/core/getAgentById.md +1 -1
  254. package/.docs/reference/core/getMCPServer.md +1 -1
  255. package/.docs/reference/core/getScorer.md +1 -1
  256. package/.docs/reference/core/mastra-class.md +48 -1
  257. package/.docs/reference/core/mastra-model-gateway.md +1 -1
  258. package/.docs/reference/datasets/addItem.md +1 -1
  259. package/.docs/reference/datasets/listItems.md +1 -1
  260. package/.docs/reference/deployer/netlify.md +4 -4
  261. package/.docs/reference/deployer/vercel.md +7 -7
  262. package/.docs/reference/editor/agent-builder/agent-builder-options.md +4 -4
  263. package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +6 -6
  264. package/.docs/reference/editor/agent-builder/builder-models.md +3 -3
  265. package/.docs/reference/editor/blob-store-provider.md +1 -1
  266. package/.docs/reference/editor/browser-provider.md +3 -3
  267. package/.docs/reference/editor/filesystem-provider.md +4 -4
  268. package/.docs/reference/editor/mastra-editor.md +5 -5
  269. package/.docs/reference/editor/processor-provider.md +3 -3
  270. package/.docs/reference/editor/sandbox-provider.md +4 -4
  271. package/.docs/reference/editor/storage-browser-ref.md +6 -6
  272. package/.docs/reference/editor/storage-workspace-ref.md +4 -4
  273. package/.docs/reference/editor/tool-provider.md +1 -1
  274. package/.docs/reference/evals/answer-relevancy.md +5 -5
  275. package/.docs/reference/evals/answer-similarity.md +1 -1
  276. package/.docs/reference/evals/bias.md +4 -4
  277. package/.docs/reference/evals/checks.md +3 -3
  278. package/.docs/reference/evals/completeness.md +5 -5
  279. package/.docs/reference/evals/content-similarity.md +5 -5
  280. package/.docs/reference/evals/context-precision.md +5 -5
  281. package/.docs/reference/evals/context-recall.md +11 -11
  282. package/.docs/reference/evals/context-relevance.md +15 -15
  283. package/.docs/reference/evals/create-scorer.md +1 -1
  284. package/.docs/reference/evals/faithfulness.md +4 -4
  285. package/.docs/reference/evals/filter-run.md +2 -2
  286. package/.docs/reference/evals/hallucination.md +11 -11
  287. package/.docs/reference/evals/keyword-coverage.md +6 -6
  288. package/.docs/reference/evals/mastra-scorer.md +2 -2
  289. package/.docs/reference/evals/noise-sensitivity.md +15 -15
  290. package/.docs/reference/evals/prompt-alignment.md +20 -20
  291. package/.docs/reference/evals/rubric.md +2 -2
  292. package/.docs/reference/evals/run-evals.md +3 -3
  293. package/.docs/reference/evals/scorer-utils.md +4 -4
  294. package/.docs/reference/evals/textual-difference.md +4 -4
  295. package/.docs/reference/evals/tool-call-accuracy.md +4 -4
  296. package/.docs/reference/evals/toxicity.md +5 -5
  297. package/.docs/reference/evals/trajectory-accuracy.md +10 -10
  298. package/.docs/reference/file-based-agents/config.md +3 -3
  299. package/.docs/reference/file-based-agents/instructions.md +3 -3
  300. package/.docs/reference/file-based-agents/logger.md +1 -1
  301. package/.docs/reference/file-based-agents/observability.md +1 -1
  302. package/.docs/reference/file-based-agents/processors.md +1 -1
  303. package/.docs/reference/file-based-agents/skills.md +1 -1
  304. package/.docs/reference/file-based-agents/storage.md +1 -1
  305. package/.docs/reference/file-based-agents/studio.md +1 -1
  306. package/.docs/reference/file-based-agents/subagents.md +4 -4
  307. package/.docs/reference/file-based-agents/tools.md +1 -1
  308. package/.docs/reference/file-based-agents/workspace.md +1 -1
  309. package/.docs/reference/index.md +2 -0
  310. package/.docs/reference/logging/pino-logger.md +3 -3
  311. package/.docs/reference/memory/clone-utilities.md +1 -1
  312. package/.docs/reference/memory/cloneThread.md +3 -3
  313. package/.docs/reference/memory/listThreads.md +1 -1
  314. package/.docs/reference/memory/memory-class.md +4 -4
  315. package/.docs/reference/memory/observational-memory.md +15 -15
  316. package/.docs/reference/memory/recall.md +2 -2
  317. package/.docs/reference/memory/serialized-memory-config.md +4 -4
  318. package/.docs/reference/memory/summarizeConversation.md +3 -3
  319. package/.docs/reference/memory/summarizeThread.md +3 -3
  320. package/.docs/reference/observability/feedback.md +1 -1
  321. package/.docs/reference/observability/metrics/automatic-metrics.md +7 -7
  322. package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
  323. package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +3 -3
  324. package/.docs/reference/observability/tracing/exporters/default-exporter.md +1 -1
  325. package/.docs/reference/observability/tracing/exporters/langfuse.md +1 -1
  326. package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +4 -4
  327. package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +1 -1
  328. package/.docs/reference/observability/tracing/interfaces.md +1 -1
  329. package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +1 -1
  330. package/.docs/reference/observability/tracing/span-filtering.md +1 -1
  331. package/.docs/reference/processors/batch-parts-processor.md +1 -1
  332. package/.docs/reference/processors/cost-guard-processor.md +1 -1
  333. package/.docs/reference/processors/language-detector.md +1 -1
  334. package/.docs/reference/processors/message-history-processor.md +1 -1
  335. package/.docs/reference/processors/moderation-processor.md +2 -2
  336. package/.docs/reference/processors/pii-detector.md +3 -3
  337. package/.docs/reference/processors/processor-interface.md +13 -13
  338. package/.docs/reference/processors/prompt-injection-detector.md +2 -2
  339. package/.docs/reference/processors/provider-history-compat.md +1 -1
  340. package/.docs/reference/processors/regex-filter-processor.md +1 -1
  341. package/.docs/reference/processors/response-cache.md +8 -8
  342. package/.docs/reference/processors/semantic-recall-processor.md +1 -1
  343. package/.docs/reference/processors/skill-search-processor.md +1 -1
  344. package/.docs/reference/processors/system-prompt-scrubber.md +2 -2
  345. package/.docs/reference/processors/token-limiter-processor.md +4 -4
  346. package/.docs/reference/processors/tool-call-filter.md +2 -2
  347. package/.docs/reference/processors/tool-search-processor.md +9 -9
  348. package/.docs/reference/processors/unicode-normalizer.md +2 -2
  349. package/.docs/reference/processors/working-memory-processor.md +1 -1
  350. package/.docs/reference/project-structure.md +1 -1
  351. package/.docs/reference/pubsub/base.md +4 -4
  352. package/.docs/reference/pubsub/google-cloud-pubsub.md +2 -2
  353. package/.docs/reference/pubsub/lease-provider.md +4 -4
  354. package/.docs/reference/pubsub/redis-streams.md +1 -1
  355. package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
  356. package/.docs/reference/rag/chunk.md +5 -5
  357. package/.docs/reference/rag/database-config.md +2 -2
  358. package/.docs/reference/rag/metadata-filters.md +2 -2
  359. package/.docs/reference/rag/rerank.md +1 -1
  360. package/.docs/reference/schedules/overview.md +1 -1
  361. package/.docs/reference/server/register-api-route.md +1 -1
  362. package/.docs/reference/server/routes.md +7 -7
  363. package/.docs/reference/signals/create-notification-inbox-tool.md +1 -1
  364. package/.docs/reference/signals/signal-provider.md +8 -8
  365. package/.docs/reference/storage/clickhouse.md +4 -4
  366. package/.docs/reference/storage/cloudflare-d1.md +4 -4
  367. package/.docs/reference/storage/convex.md +4 -4
  368. package/.docs/reference/storage/dsql.md +3 -3
  369. package/.docs/reference/storage/dynamodb.md +7 -7
  370. package/.docs/reference/storage/lance.md +1 -1
  371. package/.docs/reference/storage/mongodb.md +2 -2
  372. package/.docs/reference/storage/mssql.md +1 -1
  373. package/.docs/reference/storage/postgresql.md +2 -2
  374. package/.docs/reference/storage/redis.md +1 -1
  375. package/.docs/reference/storage/retention.md +33 -33
  376. package/.docs/reference/storage/spanner.md +8 -8
  377. package/.docs/reference/storage/upstash.md +1 -1
  378. package/.docs/reference/streaming/ChunkType.md +2 -2
  379. package/.docs/reference/streaming/agents/MastraModelOutput.md +1 -1
  380. package/.docs/reference/streaming/agents/stream.md +2 -2
  381. package/.docs/reference/streaming/agents/streamUntilIdle.md +2 -2
  382. package/.docs/reference/streaming/workflows/observeStream.md +1 -1
  383. package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
  384. package/.docs/reference/streaming/workflows/stream.md +1 -1
  385. package/.docs/reference/streaming/workflows/timeTravelStream.md +2 -2
  386. package/.docs/reference/templates/overview.md +1 -1
  387. package/.docs/reference/tools/brightdata.md +1 -1
  388. package/.docs/reference/tools/create-code-mode.md +3 -3
  389. package/.docs/reference/tools/create-tool.md +1 -1
  390. package/.docs/reference/tools/graph-rag-tool.md +1 -1
  391. package/.docs/reference/tools/isolated-vm-transport.md +74 -0
  392. package/.docs/reference/tools/mcp-client.md +15 -15
  393. package/.docs/reference/tools/mcp-server.md +21 -21
  394. package/.docs/reference/tools/submit-plan-tool.md +1 -1
  395. package/.docs/reference/tools/tavily.md +1 -1
  396. package/.docs/reference/tools/vector-query-tool.md +5 -5
  397. package/.docs/reference/vectors/astra.md +1 -1
  398. package/.docs/reference/vectors/chroma.md +2 -2
  399. package/.docs/reference/vectors/convex.md +2 -2
  400. package/.docs/reference/vectors/couchbase.md +4 -4
  401. package/.docs/reference/vectors/libsql.md +2 -2
  402. package/.docs/reference/vectors/mongodb.md +3 -3
  403. package/.docs/reference/vectors/pg.md +5 -5
  404. package/.docs/reference/vectors/qdrant.md +2 -2
  405. package/.docs/reference/vectors/s3vectors.md +4 -4
  406. package/.docs/reference/vectors/turbopuffer.md +1 -1
  407. package/.docs/reference/vectors/upstash.md +1 -1
  408. package/.docs/reference/voice/aws-nova-sonic.md +1 -1
  409. package/.docs/reference/voice/azure.md +1 -1
  410. package/.docs/reference/voice/google-gemini-live.md +4 -4
  411. package/.docs/reference/voice/inworld-realtime.md +7 -7
  412. package/.docs/reference/voice/livekit.md +13 -13
  413. package/.docs/reference/voice/mistral.md +1 -1
  414. package/.docs/reference/voice/openai-realtime.md +1 -1
  415. package/.docs/reference/voice/sarvam.md +1 -1
  416. package/.docs/reference/voice/voice.addInstructions.md +1 -1
  417. package/.docs/reference/voice/voice.addTools.md +1 -1
  418. package/.docs/reference/voice/voice.events.md +1 -1
  419. package/.docs/reference/voice/voice.getSpeakers.md +2 -2
  420. package/.docs/reference/voice/voice.on.md +2 -2
  421. package/.docs/reference/voice/xai-realtime.md +2 -2
  422. package/.docs/reference/workers/overview.md +85 -0
  423. package/.docs/reference/workflows/run-methods/cancel.md +1 -1
  424. package/.docs/reference/workflows/run-methods/startAsync.md +1 -1
  425. package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
  426. package/.docs/reference/workflows/workflow-methods/foreach.md +1 -1
  427. package/.docs/reference/workflows/workflow-methods/sleep.md +1 -1
  428. package/.docs/reference/workflows/workflow-state-reader.md +2 -2
  429. package/.docs/reference/workspace/agentfs-filesystem.md +1 -1
  430. package/.docs/reference/workspace/apple-container-sandbox.md +2 -2
  431. package/.docs/reference/workspace/daytona-sandbox.md +3 -3
  432. package/.docs/reference/workspace/docker-sandbox.md +2 -2
  433. package/.docs/reference/workspace/e2b-sandbox.md +2 -2
  434. package/.docs/reference/workspace/files-sdk-filesystem.md +3 -3
  435. package/.docs/reference/workspace/google-drive-filesystem.md +4 -4
  436. package/.docs/reference/workspace/local-filesystem.md +3 -3
  437. package/.docs/reference/workspace/local-sandbox.md +3 -3
  438. package/.docs/reference/workspace/modal-sandbox.md +1 -1
  439. package/.docs/reference/workspace/platform-filesystem.md +3 -3
  440. package/.docs/reference/workspace/platform-sandbox.md +2 -2
  441. package/.docs/reference/workspace/process-manager.md +1 -1
  442. package/.docs/reference/workspace/railway-sandbox.md +4 -4
  443. package/.docs/reference/workspace/s3-filesystem.md +1 -1
  444. package/.docs/reference/workspace/sandbox.md +1 -1
  445. package/.docs/reference/workspace/vercel-sandbox.md +1 -1
  446. package/.docs/reference/workspace/workspace-class.md +10 -10
  447. package/CHANGELOG.md +21 -0
  448. package/package.json +3 -3
@@ -93,7 +93,7 @@ export const agent = new Agent({
93
93
  id: 'filtered-agent',
94
94
  name: 'filtered-agent',
95
95
  instructions: 'You are a helpful assistant',
96
- model: 'openai/gpt-5.5',
96
+ model: 'openai/gpt-5.6-sol',
97
97
  tools: {
98
98
  searchDatabase,
99
99
  sendEmail,
@@ -119,7 +119,7 @@ export const agent = new Agent({
119
119
  id: 'no-tools-context-agent',
120
120
  name: 'no-tools-context-agent',
121
121
  instructions: 'You are a helpful assistant',
122
- model: 'openai/gpt-5.5',
122
+ model: 'openai/gpt-5.6-sol',
123
123
  tools: {
124
124
  searchDatabase,
125
125
  sendEmail,
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ToolSearchProcessor
4
4
 
5
- The `ToolSearchProcessor` is an **input processor** that enables dynamic tool discovery and loading. Instead of providing all tools to the agent upfront, it gives the agent two meta-tools (`search_tools` and `load_tool`) that let it find and load tools on demand. This reduces context token usage when working with large tool libraries.
5
+ The `ToolSearchProcessor` is an **input processor** that enables runtime-defined tool discovery and loading. Instead of providing all tools to the agent upfront, it gives the agent two meta-tools (`search_tools` and `load_tool`) that let it find and load tools on demand. This reduces context token usage when working with large tool libraries.
6
6
 
7
7
  ## Usage example
8
8
 
@@ -91,11 +91,11 @@ Immediately runs TTL cleanup instead of waiting for the scheduled sweep.
91
91
  const cleaned = processor.cleanupNow()
92
92
  ```
93
93
 
94
- Returns: `number` the count of threads cleaned up.
94
+ Returns: `number`: the count of threads cleaned up.
95
95
 
96
96
  ## Request-aware filtering
97
97
 
98
- Use `filter` to apply request-specific policy to dynamic tools. The hook receives the resolved tool ID as `toolName`, the tool, request context, and phase. `toolName` is the ID returned by `search_tools`, which may differ from the key used in the `tools` object.
98
+ Use `filter` to apply request-specific policy to runtime-defined tools. The hook receives the resolved tool ID as `toolName`, the tool, request context, and phase. `toolName` is the ID returned by `search_tools`, which may differ from the key used in the `tools` object.
99
99
 
100
100
  ```typescript
101
101
  import { ToolSearchProcessor } from '@mastra/core/processors'
@@ -120,7 +120,7 @@ The `phase` value describes where the filter is being applied:
120
120
  - `load`: Blocks `load_tool` from loading disallowed tools.
121
121
  - `active`: Hides already-loaded tools from the current request if they're no longer allowed.
122
122
 
123
- If the hook throws or rejects, `ToolSearchProcessor` treats the tool as disallowed for that request. The hook may run for every matching search candidate, so keep async policy checks cheap or cached. The `search_tools` meta-tool is always available; `load_tool` is available unless `search.autoLoad` is enabled. Tools passed directly through the agent or `processInputStep` remain available unless you filter them outside `ToolSearchProcessor`.
123
+ If the hook throws or rejects, `ToolSearchProcessor` treats the tool as disallowed for that request. The hook may run for every matching search candidate, so keep async policy checks cheap or cached. The `search_tools` meta-tool is always available. `load_tool` is available unless `search.autoLoad` is enabled. Tools passed directly through the agent or `processInputStep` remain available unless you filter them outside `ToolSearchProcessor`.
124
124
 
125
125
  ## Extended usage example
126
126
 
@@ -150,7 +150,7 @@ const agent = new Agent({
150
150
  name: 'dynamic-tools-agent',
151
151
  instructions:
152
152
  'You are a helpful assistant with access to many tools. Use search_tools to find relevant tools, then load_tool to make them available.',
153
- model: 'openai/gpt-5.5',
153
+ model: 'openai/gpt-5.6-sol',
154
154
  inputProcessors: [toolSearch],
155
155
  })
156
156
  ```
@@ -188,7 +188,7 @@ Every match is activated, so keep `topK` small (for example, `3`) to avoid addin
188
188
 
189
189
  ## Loaded-tool storage
190
190
 
191
- The `storage` option controls where the set of loaded tools is tracked. The default is `'in-memory'`; the `'context'` store is opt-in.
191
+ The `storage` option controls where the set of loaded tools is tracked. The default is `'in-memory'`. The `'context'` store is opt-in.
192
192
 
193
193
  ### `'in-memory'` (default)
194
194
 
@@ -205,7 +205,7 @@ Use `clearState`, `clearAllState`, `getStateStats`, and `cleanupNow` to inspect
205
205
  Loaded state is derived from the conversation messages: a tool is loaded while a `search_tools` or `load_tool` result naming it remains in the messages. This mode:
206
206
 
207
207
  - Requires no memory configuration.
208
- - Is restart-safe the durable record is the persisted message history.
208
+ - Is restart-safe: the durable record is the persisted message history.
209
209
  - De-loads a tool automatically once that result is no longer present in the messages.
210
210
 
211
211
  ```typescript
@@ -219,7 +219,7 @@ const toolSearch = new ToolSearchProcessor({
219
219
 
220
220
  Loading tools is cache-friendly in both modes: loads are append-only, so the cached prompt prefix stays stable for providers that support prompt caching.
221
221
 
222
- Unloading a tool changes the tool definitions sent to the model, which shifts the cached prefix and causes the next turn to pay a cache write instead of a cache hit. In `'in-memory'` mode this happens when a thread's state is evicted by `ttl`. In `'context'` mode it happens when a tool's discovery result is no longer present in the messages (for example, when older messages are trimmed) the tool de-loads and the model must search for it again before reuse. This is expected: removing an unused tool trades one cache write for a smaller prefix on later turns.
222
+ Unloading a tool changes the tool definitions sent to the model, which shifts the cached prefix and causes the next turn to pay a cache write instead of a cache hit. In `'in-memory'` mode this happens when a thread's state is evicted by `ttl`. In `'context'` mode it happens when a tool's discovery result is no longer present in the messages (for example, when older messages are trimmed). The tool de-loads, and the model must search for it again before reuse. This is expected: removing an unused tool trades one cache write for a smaller prefix on later turns.
223
223
 
224
224
  ## Combining with other processors
225
225
 
@@ -230,7 +230,7 @@ import { ToolSearchProcessor, TokenLimiter } from '@mastra/core/processors'
230
230
  const agent = new Agent({
231
231
  id: 'my-agent',
232
232
  name: 'my-agent',
233
- model: 'openai/gpt-5.5',
233
+ model: 'openai/gpt-5.6-sol',
234
234
  inputProcessors: [
235
235
  new ToolSearchProcessor({
236
236
  tools: allTools,
@@ -2,7 +2,7 @@
2
2
 
3
3
  # UnicodeNormalizer
4
4
 
5
- The `UnicodeNormalizer` is an **input processor** that normalizes Unicode text to ensure consistent formatting and remove potentially problematic characters before messages are sent to the language model. This processor helps maintain text quality by handling various Unicode representations, removing control characters, and standardizing whitespace formatting.
5
+ The `UnicodeNormalizer` is an **input processor** that normalizes Unicode text to ensure consistent formatting and remove potentially problematic characters before messages are sent to the language model. This processor handles Unicode representations and removes control characters. It also standardizes whitespace formatting.
6
6
 
7
7
  ## Usage example
8
8
 
@@ -45,7 +45,7 @@ export const agent = new Agent({
45
45
  id: 'normalized-agent',
46
46
  name: 'normalized-agent',
47
47
  instructions: 'You are a helpful assistant',
48
- model: 'openai/gpt-5.5',
48
+ model: 'openai/gpt-5.6-sol',
49
49
  inputProcessors: [
50
50
  new UnicodeNormalizer({
51
51
  stripControlChars: true,
@@ -70,7 +70,7 @@ export const agent = new Agent({
70
70
  id: 'personalized-agent',
71
71
  name: 'personalized-agent',
72
72
  instructions: 'You are a helpful assistant that remembers user preferences',
73
- model: 'openai/gpt-5.5',
73
+ model: 'openai/gpt-5.6-sol',
74
74
  inputProcessors: [
75
75
  new WorkingMemory({
76
76
  storage,
@@ -4,7 +4,7 @@
4
4
 
5
5
  Your new Mastra project, created with the `create mastra` command, comes with a predefined set of files and folders to help you get started.
6
6
 
7
- Mastra is a framework, but it's mostly **unopinionated** about how you organize or colocate your files. The CLI provides a sensible default structure that works well for most projects, but you're free to adapt it to your workflow or team conventions. You could even build your entire project in a single file if you wanted! Whatever structure you choose, keep it consistent to ensure your code stays maintainable and straightforward to navigate.
7
+ Mastra is a framework, but it's mostly **unopinionated** about how you organize or colocate your files. The CLI provides a sensible default structure that works well for most projects, but you're free to adapt it to your workflow or team conventions. You could even build your entire project in a single file if you wanted! Whatever structure you choose, keep it consistent to ensure your code stays maintainable and straightforward to browse.
8
8
 
9
9
  ## Default project structure
10
10
 
@@ -77,7 +77,7 @@ await pubsub.publish('my-topic', {
77
77
 
78
78
  Registers a callback to receive events published to a topic. When `options.group` is set, subscribers in the same group compete for messages and each event is delivered to one member. Without a group, every subscriber receives every event.
79
79
 
80
- Pass `options.batch` to opt in to batched delivery. The callback signature is unchanged: a batch of N events is delivered as N consecutive `cb(event, ack, nack)` calls in publish order. Batching is honored only when the backend's [`supportsNativeBatching`](#properties) is `true`; other backends ignore the option and deliver events one at a time.
80
+ Pass `options.batch` to opt in to batched delivery. The callback signature is unchanged: a batch of N events is delivered as N consecutive `cb(event, ack, nack)` calls in publish order. Batching is honored only when the backend's [`supportsNativeBatching`](#properties) is `true`. Other backends ignore the option and deliver events one at a time.
81
81
 
82
82
  ```typescript
83
83
  await pubsub.subscribe('my-topic', (event, ack, nack) => {
@@ -103,9 +103,9 @@ await pubsub.flush()
103
103
 
104
104
  #### `clearTopic(topic)`
105
105
 
106
- Deletes all retained state for a topic cached history, persistent stream entries, and consumer groups once no more events will be published to it. Mastra's run lifecycles (durable agents and the evented workflow engine) call this automatically when a run reaches a terminal state, so per-run topics don't accumulate on transports that retain messages.
106
+ Deletes all retained state for a topic (cached history, persistent stream entries, and consumer groups) once no more events will be published to it. Mastra's run lifecycles (durable agents and the evented workflow engine) call this automatically when a run reaches a terminal state, so per-run topics don't accumulate on transports that retain messages.
107
107
 
108
- The default implementation is a no-op: transports that retain nothing per topic (such as `EventEmitterPubSub`) have nothing to clear. Backends that persist messages, like [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams), override it. The contract is best-effort implementations log failures rather than throwing, because callers invoke it fire-and-forget at cleanup boundaries.
108
+ The default implementation is a no-op: transports that retain nothing per topic (such as `EventEmitterPubSub`) have nothing to clear. Backends that persist messages, like [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams), override it. The contract is best-effort: implementations log failures rather than throwing, because callers invoke it fire-and-forget at cleanup boundaries.
109
109
 
110
110
  ```typescript
111
111
  await pubsub.clearTopic('workflow.events.v2.run-123')
@@ -177,7 +177,7 @@ await pubsub.subscribeFromOffset('my-topic', 42, event => {
177
177
 
178
178
  ### `SubscribeBatchOptions`
179
179
 
180
- Per-subscription batching policy. The callback signature doesn't change; a batch of N events becomes N consecutive callback invocations in publish order.
180
+ Per-subscription batching policy. The callback signature doesn't change. A batch of N events becomes N consecutive callback invocations in publish order.
181
181
 
182
182
  **maxSize** (`number`): Maximum events held before forcing a flush.
183
183
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  Use it for distributed deployments on Google Cloud. For single-process delivery, use [`EventEmitterPubSub`](https://mastra.ai/reference/pubsub/event-emitter). For Redis, use [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams).
8
8
 
9
- Each topic maps to a Google Cloud topic. Subscriptions with a group share a named subscription, so members compete for events. Subscriptions without a group create a per-instance subscription, so every instance receives every event.
9
+ Each topic maps to a Google Cloud topic. Subscriptions with a group share a subscription, so members compete for events. Subscriptions without a group create a per-instance subscription, so every instance receives every event.
10
10
 
11
11
  ## Installation
12
12
 
@@ -85,7 +85,7 @@ await pubsub.flush()
85
85
 
86
86
  ### `destroy(topicName)`
87
87
 
88
- Removes the subscription and topic for a given topic name. Use this to clean up Google Cloud resources.
88
+ Removes the subscription and topic for a topic name. Use this to clean up Google Cloud resources.
89
89
 
90
90
  ```typescript
91
91
  await pubsub.destroy('workflow.events')
@@ -2,9 +2,9 @@
2
2
 
3
3
  # LeaseProvider
4
4
 
5
- `LeaseProvider` is the distributed leasing contract, separate from event delivery ([`PubSub`](https://mastra.ai/reference/pubsub/base)). Mastra's [signals layer](https://mastra.ai/docs/long-running-agents/signals) uses it to elect a single owner across multiple processes (for example, serverless invocations) for a given resource, most commonly a thread key. The owner is the process that wakes and runs the agent stream, so other processes route follow-up work to it instead of starting a competing run.
5
+ `LeaseProvider` is the distributed leasing contract, separate from event delivery ([`PubSub`](https://mastra.ai/reference/pubsub/base)). Mastra's [signals layer](https://mastra.ai/docs/long-running-agents/signals) uses it to elect a single owner across multiple processes (for example, serverless invocations) for a resource, most commonly a thread key. The owner is the process that wakes and runs the agent stream, so other processes route follow-up work to it instead of starting a competing run.
6
6
 
7
- Leasing is a distinct concern from pub/sub. A backend implements `LeaseProvider` only when it can genuinely coordinate a lock, such as Redis via atomic `SET`/Lua, or an in-memory map for single-process. Backends that can't lease omit it; the signals runtime feature-detects the capability and falls back to a no-op provider, preserving single-process behavior.
7
+ Leasing is a distinct concern from pub/sub. A backend implements `LeaseProvider` only when it can actually coordinate a lock, such as Redis via atomic `SET`/Lua, or an in-memory map for single-process. Backends that can't lease omit it; the signals runtime feature-detects the capability and falls back to a no-op provider, preserving single-process behavior.
8
8
 
9
9
  The built-in [`RedisStreamsPubSub`](https://mastra.ai/reference/pubsub/redis-streams) implements `LeaseProvider`, which is what enables signals to coordinate across instances in distributed and serverless deployments.
10
10
 
@@ -102,7 +102,7 @@ Returns: `Promise<boolean>`
102
102
 
103
103
  #### `transferLease(key, fromOwner, toOwner, ttlMs)`
104
104
 
105
- Atomically hands a held lease from `fromOwner` to `toOwner`, refreshing its TTL, without releasing the key in between. This is the gap-free primitive used when one owner finishes but a follow-up owner must take over the same key immediately, for example when a thread run completes and a queued follow-up run drains on the same thread. A naive release-then-acquire would briefly leave the key empty, letting a racing process win the freed lease and start a competing run.
105
+ Atomically transfers a held lease from `fromOwner` to `toOwner` and refreshes its TTL without releasing the key in between. This gap-free primitive lets a follow-up owner take over the same key immediately after the current owner finishes. For example, a queued follow-up run can take over when a thread run completes. A naive release-then-acquire briefly leaves the key empty. A racing process could then win the freed lease and start a competing run.
106
106
 
107
107
  Returns `true` if `fromOwner` still held the lease and ownership moved to `toOwner`, or `false` if the lease was already lost, in which case the caller should fall back to a fresh `acquireLease`.
108
108
 
@@ -129,5 +129,5 @@ When the configured pub/sub backend doesn't implement `LeaseProvider`, the runti
129
129
 
130
130
  - [PubSub](https://mastra.ai/reference/pubsub/base): The event delivery contract, separate from leasing
131
131
  - [RedisStreamsPubSub](https://mastra.ai/reference/pubsub/redis-streams): The built-in backend that implements `LeaseProvider`
132
- - [Signals](https://mastra.ai/docs/long-running-agents/signals): The runtime that uses leasing to coordinate thread runs across processes
132
+ - [Signals](https://mastra.ai/docs/long-running-agents/signals): The runtime that uses leasing to coordinate thread execution across processes
133
133
  - [Channels](https://mastra.ai/docs/capabilities/channels/overview): Uses leasing to coordinate agent runs in serverless and multi-instance deployments
@@ -101,7 +101,7 @@ await pubsub.flush()
101
101
 
102
102
  ### `clearTopic(topic)`
103
103
 
104
- Deletes a topic's stream and every consumer group on it, freeing the memory a finished topic would otherwise hold. Mastra's run lifecycles durable agents and the evented workflow engine call this automatically when a run reaches a terminal state; call it yourself only once nothing will read the topic again. It's best-effort and never throws failures are logged at warn level. A subscriber still attached when the stream is deleted recovers on its own but misses the deleted entries.
104
+ Deletes a topic's stream and every consumer group on it, freeing the memory a finished topic would otherwise hold. Mastra's run lifecycles (durable agents and the evented workflow engine) call this automatically when a run reaches a terminal state. Call it yourself only once nothing will read the topic again. It's best-effort and never throws. Failures are logged at warn level. A subscriber still attached when the stream is deleted recovers on its own but misses the deleted entries.
105
105
 
106
106
  Automatic cleanup requires `@mastra/core` and `@mastra/redis-streams` versions that both support `clearTopic`: the runtime routes the call through its caching layer, so upgrade the two packages together to get end-of-run stream deletion.
107
107
 
@@ -51,4 +51,4 @@ await pubsub.close()
51
51
 
52
52
  ## Broker election
53
53
 
54
- The first process to bind the socket becomes the broker and routes events between all connected clients. Other processes connect as clients. When the broker exits, an exclusive lock file serializes the next election so exactly one client becomes the new broker, and the remaining clients resubscribe to it. This avoids a split-brain state where two processes both act as broker.
54
+ The first process to bind the socket becomes the broker and routes events between all connected clients. Other processes connect as clients. When the broker exits, an exclusive lock file serializes the next election. Exactly one client becomes the new broker. The remaining clients resubscribe to it. This avoids a split-brain state where two processes both act as broker.
@@ -2,7 +2,7 @@
2
2
 
3
3
  # .chunk()
4
4
 
5
- The `.chunk()` function splits documents into smaller segments using various strategies and options.
5
+ The `.chunk()` function splits documents into smaller segments using strategies and options.
6
6
 
7
7
  ## Example
8
8
 
@@ -39,11 +39,11 @@ const chunksWithMetadata = await doc.chunk({
39
39
 
40
40
  ## Parameters
41
41
 
42
- The following parameters are available for all chunking strategies. **Important:** Each strategy will only utilize a subset of these parameters relevant to its specific use case.
42
+ The following parameters are available for all chunking strategies. Each strategy will only utilize a subset of these parameters relevant to its specific use case.
43
43
 
44
44
  **strategy** (`'recursive' | 'character' | 'token' | 'markdown' | 'semantic-markdown' | 'html' | 'json' | 'latex' | 'sentence'`): The chunking strategy to use. If not specified, defaults based on document type. Depending on the chunking strategy, there are additional optionals. Defaults: .md files → 'markdown', .html/.htm → 'html', .json → 'json', .tex → 'latex', others → 'recursive'
45
45
 
46
- **maxSize** (`number`): Maximum size of each chunk. \*\*Note:\*\* Some strategy configurations (markdown with headers, HTML with headers) ignore this parameter. (Default: `4000`)
46
+ **maxSize** (`number`): Maximum size of each chunk. Some strategy configurations (markdown with headers, HTML with headers) ignore this parameter. (Default: `4000`)
47
47
 
48
48
  **overlap** (`number`): Number of characters/tokens that overlap between chunks. (Default: `50`)
49
49
 
@@ -162,7 +162,7 @@ The options documented below are passed directly at the top level of the configu
162
162
 
163
163
  **returnEachLine** (`boolean`): Whether to return each line as a separate chunk
164
164
 
165
- **Important:** When using the HTML strategy, all general options are ignored. Use `headers` for header-based splitting or `sections` for section-based splitting. If used together, `sections` will be ignored.
165
+ When using the HTML strategy, all general options are ignored. Use `headers` for header-based splitting or `sections` for section-based splitting. If used together, `sections` will be ignored.
166
166
 
167
167
  ### Markdown
168
168
 
@@ -172,7 +172,7 @@ The options documented below are passed directly at the top level of the configu
172
172
 
173
173
  **returnEachLine** (`boolean`): Whether to return each line as a separate chunk
174
174
 
175
- **Important:** When using the `headers` option, the markdown strategy ignores all general options and content is split based on the markdown header structure. To use size-based chunking with markdown, omit the `headers` parameter.
175
+ When using the `headers` option, the markdown strategy ignores all general options and content is split based on the markdown header structure. To use size-based chunking with markdown, omit the `headers` parameter.
176
176
 
177
177
  ### Semantic Markdown
178
178
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # DatabaseConfig
4
4
 
5
- The `DatabaseConfig` type allows you to specify database-specific configurations when using vector query tools. These configurations enable you to leverage unique features and optimizations offered by different vector stores.
5
+ The `DatabaseConfig` type allows you to specify database-specific configurations when using vector query tools. These configurations enable you to use features and optimizations offered by different vector stores.
6
6
 
7
7
  ## Type definition
8
8
 
@@ -252,7 +252,7 @@ const vectorTool = createVectorQueryTool({
252
252
  1. **Environment Configuration**: Use different namespaces or configurations for different environments
253
253
  2. **Performance Tuning**: Start with default values and adjust based on your specific needs
254
254
  3. **Quality Filtering**: Use minScore to filter out low-quality results
255
- 4. **Runtime Flexibility**: Override configurations at runtime for dynamic scenarios
255
+ 4. **Runtime Flexibility**: Override configurations at runtime for runtime-defined scenarios
256
256
  5. **Documentation**: Document your specific configuration choices for team members
257
257
 
258
258
  ## Migration guide
@@ -194,8 +194,8 @@ const results = await store.query({
194
194
 
195
195
  - Equality values must be primitives (string/number/boolean). `null`/`undefined`, arrays, objects, and Date aren't allowed for equality. Range operators accept numbers or Date (Dates are normalized to epoch ms).
196
196
  - `$in`/`$nin` require **non-empty arrays of primitives**; Date elements are allowed and normalized to epoch ms. **Array equality** isn't supported.
197
- - Implicit AND is canonicalized (`{a:1,b:2}` → `{$and:[{a:1},{b:2}]}`). Logical operators must contain field conditions, use non-empty arrays, and appear only at the root or within other logical operators (not inside field values).
198
- - Keys listed in `nonFilterableMetadataKeys` at index creation are stored but not filterable; this setting is immutable.
197
+ - Implicit AND is canonicalized (`{a:1,b:2}` → `{$and:[{a:1},{b:2}]`). Logical operators must contain field conditions and use non-empty arrays. They may appear only at the root or within other logical operators (not inside field values).
198
+ - Keys listed in `nonFilterableMetadataKeys` at index creation are stored but not filterable. This setting is immutable.
199
199
  - $exists requires a boolean value.
200
200
  - undefined/null/empty filters are treated as no filter.
201
201
  - Each metadata key name limited to 63 characters.
@@ -18,7 +18,7 @@ function rerank(
18
18
  ```typescript
19
19
  import { rerank } from '@mastra/rag'
20
20
 
21
- const model = 'openai/gpt-5.5'
21
+ const model = 'openai/gpt-5.6-sol'
22
22
 
23
23
  const rerankedResults = await rerank(vectorSearchResults, 'How do I deploy to production?', model, {
24
24
  weights: {
@@ -150,7 +150,7 @@ const updated = await mastra.schedules.update('pinger', {
150
150
  })
151
151
  ```
152
152
 
153
- Agent schedule patches can update `cron`, `timezone`, `prompt`, `name`, `signalType`, `tagName`, `attributes`, `providerOptions`, `ifActive`, `ifIdle`, `metadata`, and `status`. `threadId` and `resourceId` aren't patchable; create a new schedule when the thread target needs to change.
153
+ Agent schedule patches can update `cron`, `timezone`, `prompt`, `name`, `signalType`, `tagName`, `attributes`, `providerOptions`, `ifActive`, `ifIdle`, `metadata`, and `status`. `threadId` and `resourceId` aren't patchable. Create a new schedule when the thread target needs to change.
154
154
 
155
155
  Workflow schedule patches can update `cron`, `timezone`, `inputData`, `initialState`, `requestContext`, `metadata`, and `status`. Agent-only patch fields such as `prompt`, `signalType`, and `ifIdle` throw on workflow schedules.
156
156
 
@@ -20,7 +20,7 @@ The URL path for the route. Supports path parameters using `:param` syntax.
20
20
  registerApiRoute("/items/:itemId", { ... })
21
21
  ```
22
22
 
23
- **Note:** Custom route paths can't start with the server's configured `apiPrefix` (default: `/api`), as that prefix is reserved for built-in Mastra routes. If you set a custom `apiPrefix`, only that prefix is reserved for example, with `apiPrefix: '/mastra/api'`, paths like `/api/my-endpoint` are allowed.
23
+ Custom route paths can't start with the server's configured `apiPrefix` (default: `/api`), as that prefix is reserved for built-in Mastra routes. If you set a custom `apiPrefix`, only that prefix is reserved. For example, with `apiPrefix: '/mastra/api'`, paths like `/api/my-endpoint` are allowed.
24
24
 
25
25
  ### options
26
26
 
@@ -25,17 +25,17 @@ Server adapters register these routes when you call `server.init()`. All routes
25
25
 
26
26
  `GET /api/agents/:agentId` accepts optional query parameters to control which stored config version is applied as overrides to code-defined agents:
27
27
 
28
- | Parameter | Type | Default | Description |
29
- | ----------- | ------------------------ | --------- | ---------------------------------------------------------------------------------------------------------------------- |
30
- | `status` | `'draft' \| 'published'` | `'draft'` | Which stored version to resolve. `draft` returns the latest version, `published` returns the active published version. |
31
- | `versionId` | `string` | | A specific version ID to resolve. Takes precedence over `status`. |
28
+ | Parameter | Type | Default | Description |
29
+ | ----------- | ------------------------ | ------------- | ---------------------------------------------------------------------------------------------------------------- |
30
+ | `status` | `'draft' \| 'published'` | `'published'` | Which stored version to resolve. `draft` returns the latest version, and `published` returns the active version. |
31
+ | `versionId` | `string` | None | A specific version ID to resolve. Takes precedence over `status`. |
32
32
 
33
33
  ```bash
34
- # Get agent with latest draft overrides (default)
34
+ # Get agent with active published overrides (default)
35
35
  GET /api/agents/my-agent
36
36
 
37
- # Get agent with published overrides
38
- GET /api/agents/my-agent?status=published
37
+ # Get agent with latest draft overrides
38
+ GET /api/agents/my-agent?status=draft
39
39
 
40
40
  # Get agent with a specific version's overrides
41
41
  GET /api/agents/my-agent?versionId=abc123
@@ -22,7 +22,7 @@ export const supportAgent = new Agent({
22
22
  id: 'support-agent',
23
23
  name: 'Support Agent',
24
24
  instructions: 'Help the user triage updates.',
25
- model: 'openai/gpt-5.5',
25
+ model: 'openai/gpt-5.6-sol',
26
26
  tools: {
27
27
  notificationInbox: createNotificationInboxTool({ storage: notificationsStorage }),
28
28
  },
@@ -51,7 +51,7 @@ const agent = new Agent({
51
51
  })
52
52
  ```
53
53
 
54
- The agent calls `connect(this)`, registers any processors or tools the provider returns, and starts polling.
54
+ The agent calls `connect(this)` and registers any processors or tools the provider returns. It then starts polling.
55
55
 
56
56
  ## Constructor parameters
57
57
 
@@ -142,7 +142,7 @@ Returns: `Record<string, unknown>`
142
142
 
143
143
  #### `subscribe(target, externalResourceId, metadata?)`
144
144
 
145
- Subscribe a thread to an external resource. This is a protected method call it from within your provider implementation.
145
+ Subscribe a thread to an external resource. This is a protected method: call it from within your provider implementation.
146
146
 
147
147
  ```typescript
148
148
  const sub = this.subscribe(
@@ -152,7 +152,7 @@ const sub = this.subscribe(
152
152
  )
153
153
  ```
154
154
 
155
- Returns: `SignalSubscription` the created subscription, or the existing one with merged metadata.
155
+ Returns: `SignalSubscription`: the created subscription, or the existing one with merged metadata.
156
156
 
157
157
  **target** (`SignalProviderTarget`): The thread to subscribe. Must include threadId and resourceId.
158
158
 
@@ -171,7 +171,7 @@ const removed = this.unsubscribe(
171
171
  )
172
172
  ```
173
173
 
174
- Returns: `boolean` `true` if removed, `false` if no matching subscription existed.
174
+ Returns: `boolean`: `true` if removed, `false` if no matching subscription existed.
175
175
 
176
176
  #### `getSubscriptions()`
177
177
 
@@ -235,7 +235,7 @@ const removed = this.unsubscribeAll({
235
235
  })
236
236
  ```
237
237
 
238
- Returns: `number` count of removed subscriptions.
238
+ Returns: `number`: count of removed subscriptions.
239
239
 
240
240
  #### `subscriptionCount`
241
241
 
@@ -253,7 +253,7 @@ Returns: `number`
253
253
 
254
254
  #### `poll(subscriptions)`
255
255
 
256
- Called on each poll cycle with all active subscriptions. Override to check external sources and emit notifications. The framework prevents overlapping poll cycles if a `poll()` call takes longer than `pollInterval`, the next cycle is skipped.
256
+ Called on each poll cycle with all active subscriptions. Override to check external sources and emit notifications. The framework prevents overlapping poll cycles: if a `poll()` call takes longer than `pollInterval`, the next cycle is skipped.
257
257
 
258
258
  ```typescript
259
259
  async poll(subscriptions: SignalSubscription[]) {
@@ -271,7 +271,7 @@ async poll(subscriptions: SignalSubscription[]) {
271
271
 
272
272
  #### `startPolling()`
273
273
 
274
- Start the polling timer. Called by the Agent after `connect()`. Idempotent calling multiple times has no effect.
274
+ Start the polling timer. Called by the Agent after `connect()`. Idempotent: calling multiple times has no effect.
275
275
 
276
276
  ```typescript
277
277
  provider.startPolling()
@@ -289,7 +289,7 @@ provider.stopPolling()
289
289
 
290
290
  #### `handleWebhook(request)`
291
291
 
292
- Handle an incoming webhook request. Override to parse the payload, match it to subscriptions, and emit notification signals. See [`WebhookSignalProvider`](https://mastra.ai/reference/signals/webhook-signal-provider) for a ready-to-use implementation.
292
+ Handle an incoming webhook request. Override to parse the payload and match it to subscriptions. Then emit notification signals. See [`WebhookSignalProvider`](https://mastra.ai/reference/signals/webhook-signal-provider) for a ready-to-use implementation.
293
293
 
294
294
  ```typescript
295
295
  async handleWebhook(request) {
@@ -129,7 +129,7 @@ yarn dlx mastra migrate
129
129
  bun x mastra migrate
130
130
  ```
131
131
 
132
- The migration copies span data from `mastra_ai_spans` into `mastra_span_events` in day-sized batches. It handles column mapping, deduplicates legacy rows, and preserves the original table as a backup. After migration, traces appear in Studio through the vNext adapter.
132
+ The migration copies span data from `mastra_ai_spans` into `mastra_span_events` in day-sized batches. It handles column mapping and deduplicates legacy rows. The original table remains as a backup. After migration, traces appear in Studio through the vNext adapter.
133
133
 
134
134
  > **Note:** The legacy table isn't deleted. Drop it manually after verifying the migration.
135
135
 
@@ -261,7 +261,7 @@ Set `cluster` to add `ON CLUSTER` to Mastra-owned DDL such as table creation, ma
261
261
 
262
262
  Manual maintenance such as `optimizeTable()` and `materializeTtl()` runs on every replica when `cluster` is set. These operations can be expensive on a large cluster. Prefer running them outside peak hours, and let routine merges happen on the background merge queue rather than triggering them on every restart.
263
263
 
264
- If existing Mastra tables use local `MergeTree` or `ReplacingMergeTree` engines, initialization fails while `replication` is enabled. Mastra refuses to silently convert local tables because copy-and-swap is unsafe across replicas. To migrate, recreate the affected tables as `Replicated*` before enabling replication. The typical sequence is: rename the local table, run `CREATE TABLE ... ENGINE = ReplicatedMergeTree(...) ON CLUSTER ...`, run `INSERT INTO ... SELECT * FROM <renamed_local>`, then drop the renamed local table.
264
+ If existing Mastra tables use local `MergeTree` or `ReplacingMergeTree` engines, initialization fails while `replication` is enabled. Mastra refuses to silently convert local tables because copy-and-swap is unsafe across replicas. To migrate, recreate the affected tables as `Replicated*` before enabling replication. To migrate safely, rename the local table, run `CREATE TABLE ... ENGINE = ReplicatedMergeTree(...) ON CLUSTER ...`, run `INSERT INTO ... SELECT * FROM <renamed_local>`, then drop `<renamed_local>`.
265
265
 
266
266
  Don't set `replication` on ClickHouse Cloud. Cloud rewrites `MergeTree` to `SharedMergeTree` server-side, and explicit `ReplicatedMergeTree` engines produce incorrect DDL. `replication` is only for self-managed multi-replica clusters.
267
267
 
@@ -271,7 +271,7 @@ Don't set `replication` on ClickHouse Cloud. Cloud rewrites `MergeTree` to `Shar
271
271
 
272
272
  ## Hosting options
273
273
 
274
- ClickHouse runs anywhere you can reach it over HTTP. Two common choices:
274
+ ClickHouse runs anywhere you can reach it over HTTP. Common choices include:
275
275
 
276
276
  - **[ClickHouse Cloud](https://clickhouse.com/cloud)**: Managed service with a free trial tier. Provides connection details directly compatible with `url`, `username`, and `password`.
277
277
  - **Self-hosted**: Run the official [`clickhouse/clickhouse-server`](https://hub.docker.com/r/clickhouse/clickhouse-server) container or install from the [official packages](https://clickhouse.com/docs/en/install). Suitable for VPS, dedicated hardware, or Kubernetes.
@@ -333,7 +333,7 @@ export const mastra = new Mastra({
333
333
  })
334
334
  ```
335
335
 
336
- Two ways to provision the database:
336
+ Provision the database with either option:
337
337
 
338
338
  - **Managed**: Use ClickHouse Cloud. Set `CLICKHOUSE_URL`, `CLICKHOUSE_USERNAME`, and `CLICKHOUSE_PASSWORD` as environment variables in your hosting platform.
339
339
  - **Self-hosted on Railway**: Add a ClickHouse service to your Railway project from the official Docker image, then reference it in the application service through Railway's private networking.
@@ -61,11 +61,11 @@ export const mastra = new Mastra({
61
61
  })
62
62
  ```
63
63
 
64
- > **Note:** When using `import { env } from 'cloudflare:workers'`, `D1Store` must be initialized inline inside `new Mastra({...})` not extracted to a module-level variable. Alternatively, initialize `D1Store` inside the `fetch` handler after `env` is available. See [CloudflareDeployer reference](https://mastra.ai/reference/deployer/cloudflare) for details.
64
+ > **Note:** When using `import { env } from 'cloudflare:workers'`, `D1Store` must be initialized inline inside `new Mastra({...})`: not extracted to a module-level variable. Alternatively, initialize `D1Store` inside the `fetch` handler after `env` is available. See [CloudflareDeployer reference](https://mastra.ai/reference/deployer/cloudflare) for details.
65
65
 
66
66
  ### Using in a Cloudflare Worker without HTTP routes
67
67
 
68
- If you want to call Mastra directly in a Worker for example, to run an agent or trigger a workflow without serving HTTP routes, you don't need `CloudflareDeployer`. Access the D1 binding from the worker's `env` parameter and call Mastra programmatically.
68
+ If you want to call Mastra directly in a Worker (for example, to run an agent or trigger a workflow) without serving HTTP routes, you don't need `CloudflareDeployer`. Access the D1 binding from the worker's `env` parameter and call Mastra programmatically.
69
69
 
70
70
  ```typescript
71
71
  import { D1Store } from '@mastra/cloudflare-d1'
@@ -213,8 +213,8 @@ export default {
213
213
 
214
214
  ### Transactions & Consistency
215
215
 
216
- Cloudflare D1 provides transactional guarantees for single-row operations. This means that multiple operations can be executed as a single, all-or-nothing unit of work.
216
+ Cloudflare D1 provides transactional guarantees for single-row operations. Multiple operations can be executed as a single, all-or-nothing unit of work.
217
217
 
218
218
  ### Table Creation & Migrations
219
219
 
220
- Tables are created automatically when storage is initialized (and can be isolated per environment using the `tablePrefix` option), but advanced schema changes—such as adding columns, changing data types, or modifying indexes—require manual migration and careful planning to avoid data loss.
220
+ Tables are created automatically when storage is initialized (and can be isolated per environment using the `tablePrefix` option), but advanced schema changes require manual migration and careful planning. Examples include adding columns or changing data types and indexes to avoid data loss.
@@ -182,7 +182,7 @@ During batched cleanup, cache metadata can temporarily use an internal `deleted`
182
182
 
183
183
  `clear()` only removes rows whose stored `keyPrefix` exactly matches the configured `keyPrefix`. It doesn't clear nested prefixes by string prefix matching. Each `listPush()` refreshes the list TTL using the cache's configured `ttlMs`.
184
184
 
185
- Use a non-empty `keyPrefix` unless you intentionally want `clear()` to remove every cache key in the deployment. Expired list rows are reclaimed incrementally during reads and writes; `clear()` removes all rows for the prefix.
185
+ Use a non-empty `keyPrefix` unless you intentionally want `clear()` to remove every cache key in the deployment. Expired list rows are reclaimed incrementally during reads and writes. `clear()` removes all rows for the prefix.
186
186
 
187
187
  `ConvexServerCache` works best for durable replay of moderate-frequency events. For high-frequency token streams, prefer batching events or using a lower-latency cache backend.
188
188
 
@@ -217,14 +217,14 @@ All typed tables include:
217
217
  - An `id` field for Mastra's record ID (distinct from Convex's auto-generated `_id`)
218
218
  - A `by_record_id` index for efficient lookups by Mastra ID
219
219
 
220
- This design ensures compatibility with Mastra's storage contract while leveraging Convex's automatic indexing and real-time capabilities.
220
+ This design ensures compatibility with Mastra's storage contract while using Convex's automatic indexing and real-time capabilities.
221
221
 
222
222
  ### Environment variables
223
223
 
224
224
  Set these environment variables for your deployment:
225
225
 
226
- - `CONVEX_URL` Your Convex deployment URL
227
- - `CONVEX_ADMIN_KEY` Admin authentication token (get from Convex dashboard)
226
+ - `CONVEX_URL`: Your Convex deployment URL
227
+ - `CONVEX_ADMIN_KEY`: Admin authentication token (get from Convex dashboard)
228
228
 
229
229
  ## Related
230
230
 
@@ -183,7 +183,7 @@ storage.db // Database client for executing queries
183
183
  storage.pool // Underlying pg.Pool instance
184
184
  ```
185
185
 
186
- This enables direct queries and custom transaction management. When using these fields:
186
+ It supports direct queries and custom transaction management. When using these fields:
187
187
 
188
188
  - You are responsible for proper connection and transaction handling.
189
189
  - Closing the store (`storage.close()`) will destroy the connection pool if it was created by the store.
@@ -199,7 +199,7 @@ Connections are authenticated with IAM. No database passwords are required. `@ma
199
199
 
200
200
  #### Single database, schema-based isolation
201
201
 
202
- Each cluster exposes a single database named `postgres`. Logical separation is done via schemas. The `schemaName` option controls where Mastra tables are created.
202
+ Each cluster exposes a single database `postgres`. Logical separation is done via schemas. The `schemaName` option controls where Mastra tables are created.
203
203
 
204
204
  #### No PostgreSQL extensions
205
205
 
@@ -243,7 +243,7 @@ export const dsqlAgent = new Agent({
243
243
  name: 'DSQL Agent',
244
244
  instructions:
245
245
  'You are an AI agent with the ability to automatically recall memories from previous interactions.',
246
- model: 'openai/gpt-5.5',
246
+ model: 'openai/gpt-5.6-sol',
247
247
  memory: new Memory({
248
248
  storage: new DSQLStore({
249
249
  id: 'dsql-agent-storage',