@mastra/mcp-docs-server 1.3.10-alpha.0 → 1.3.10-alpha.10

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 (466) hide show
  1. package/.docs/docs/agents/guardrails.md +8 -0
  2. package/.docs/docs/agents/human-in-the-loop.md +9 -0
  3. package/.docs/docs/agents/processors.md +3 -0
  4. package/.docs/docs/agents/tools.md +5 -0
  5. package/.docs/docs/channels.md +15 -0
  6. package/.docs/docs/deployment/mastra-server.md +2 -0
  7. package/.docs/docs/deployment/monorepo.md +2 -0
  8. package/.docs/docs/evals/overview.md +2 -0
  9. package/.docs/docs/harness/background-tasks.md +4 -0
  10. package/.docs/docs/harness/durable-agents.md +6 -1
  11. package/.docs/docs/harness/goals.md +2 -0
  12. package/.docs/docs/harness/schedules.md +5 -0
  13. package/.docs/docs/mastra-platform/connect/providers.md +27 -26
  14. package/.docs/docs/mastra-platform/deploy.md +2 -0
  15. package/.docs/docs/mastra-platform/server.md +10 -6
  16. package/.docs/docs/mastra-platform/studio.md +1 -1
  17. package/.docs/docs/mastra-platform/system-environment-variables.md +3 -0
  18. package/.docs/docs/mastra-platform/workspaces.md +1 -1
  19. package/.docs/docs/memory/message-history.md +3 -0
  20. package/.docs/docs/memory/observational-memory.md +10 -0
  21. package/.docs/docs/memory/overview.md +6 -0
  22. package/.docs/docs/memory/semantic-recall.md +5 -1
  23. package/.docs/docs/observability/integrations/exporters/mastra-storage.md +2 -1
  24. package/.docs/docs/observability/logging.md +3 -0
  25. package/.docs/docs/observability/tracing/overview.md +16 -0
  26. package/.docs/docs/sandbox/search.md +11 -0
  27. package/.docs/docs/server/custom-adapters.md +53 -1
  28. package/.docs/docs/server/custom-api-routes.md +2 -0
  29. package/.docs/docs/server/request-context.md +6 -0
  30. package/.docs/docs/signals/thread-streams.md +34 -3
  31. package/.docs/docs/studio/overview.md +2 -0
  32. package/.docs/docs/subagents.md +7 -1
  33. package/.docs/docs/workflows/agents-and-tools.md +16 -1
  34. package/.docs/docs/workflows/control-flow.md +57 -0
  35. package/.docs/docs/workflows/human-in-the-loop.md +3 -0
  36. package/.docs/docs/workflows/overview.md +9 -1
  37. package/.docs/docs/workflows/scheduled-workflows.md +10 -2
  38. package/.docs/docs/workflows/suspend-and-resume.md +6 -0
  39. package/.docs/docs/workflows/workflow-state.md +12 -0
  40. package/.docs/integrations/agentic-ui/copilotkit.md +2 -0
  41. package/.docs/integrations/auth/better-auth.md +2 -0
  42. package/.docs/integrations/auth/google.md +2 -0
  43. package/.docs/integrations/auth/okta.md +2 -0
  44. package/.docs/integrations/databases/aurora-dsql.md +2 -2
  45. package/.docs/integrations/databases/dynamodb.md +4 -4
  46. package/.docs/integrations/databases/postgresql.md +4 -4
  47. package/.docs/integrations/deploy/inngest.md +1 -0
  48. package/.docs/integrations/file-storage/archil.md +3 -3
  49. package/.docs/integrations/file-storage/mesa.md +1 -1
  50. package/.docs/integrations/observability/datadog.md +5 -0
  51. package/.docs/integrations/observability/langsmith.md +33 -0
  52. package/.docs/integrations/observability/opentelemetry.md +27 -4
  53. package/.docs/integrations/observability/sentry.md +22 -22
  54. package/.docs/integrations/sandboxes/cloudflare-sandbox.md +1 -1
  55. package/.docs/integrations/sandboxes/daytona.md +3 -3
  56. package/.docs/integrations/sandboxes/docker.md +1 -1
  57. package/.docs/integrations/sandboxes/e2b.md +5 -5
  58. package/.docs/integrations/sandboxes/modal.md +3 -3
  59. package/.docs/integrations/sandboxes/railway.md +3 -3
  60. package/.docs/integrations/sandboxes/vercel.md +4 -4
  61. package/.docs/integrations/tools/brightdata.md +1 -1
  62. package/.docs/integrations/tools/parallel.md +3 -3
  63. package/.docs/integrations/tools/perplexity.md +1 -1
  64. package/.docs/integrations/tools/tavily.md +1 -1
  65. package/.docs/integrations/voice/azure.md +4 -4
  66. package/.docs/integrations/voice/cloudflare.md +3 -3
  67. package/.docs/integrations/voice/deepgram.md +2 -2
  68. package/.docs/integrations/voice/elevenlabs.md +4 -4
  69. package/.docs/integrations/voice/gladia.md +10 -10
  70. package/.docs/integrations/voice/google.md +11 -11
  71. package/.docs/integrations/voice/inworld.md +23 -23
  72. package/.docs/integrations/voice/livekit.md +9 -6
  73. package/.docs/integrations/voice/mistral.md +2 -2
  74. package/.docs/integrations/voice/modelslab.md +1 -1
  75. package/.docs/integrations/voice/murf.md +1 -1
  76. package/.docs/integrations/voice/openai.md +5 -5
  77. package/.docs/integrations/voice/sarvam.md +6 -6
  78. package/.docs/integrations/voice/speechify.md +25 -12
  79. package/.docs/integrations/voice/xai.md +3 -3
  80. package/.docs/models/environment-variables.md +2 -0
  81. package/.docs/models/gateways/merge-gateway.md +3 -1
  82. package/.docs/models/gateways/neon.md +2 -1
  83. package/.docs/models/gateways/netlify.md +2 -5
  84. package/.docs/models/gateways/openrouter.md +5 -6
  85. package/.docs/models/gateways/vercel.md +5 -6
  86. package/.docs/models/index.md +9 -1
  87. package/.docs/models/providers/302ai.md +4 -0
  88. package/.docs/models/providers/abacus.md +4 -0
  89. package/.docs/models/providers/abliteration-ai.md +4 -0
  90. package/.docs/models/providers/above.md +4 -0
  91. package/.docs/models/providers/agentrouter.md +4 -0
  92. package/.docs/models/providers/agnes.md +4 -0
  93. package/.docs/models/providers/ai-router.md +4 -0
  94. package/.docs/models/providers/ai21.md +4 -0
  95. package/.docs/models/providers/aiand.md +8 -7
  96. package/.docs/models/providers/aimlapi.md +9 -10
  97. package/.docs/models/providers/ainetcafe.md +4 -0
  98. package/.docs/models/providers/aixy.md +4 -0
  99. package/.docs/models/providers/aki-io.md +4 -0
  100. package/.docs/models/providers/alibaba-cn.md +4 -0
  101. package/.docs/models/providers/alibaba-coding-plan-cn.md +4 -0
  102. package/.docs/models/providers/alibaba-coding-plan.md +4 -0
  103. package/.docs/models/providers/alibaba-token-plan-cn.md +4 -0
  104. package/.docs/models/providers/alibaba-token-plan.md +4 -0
  105. package/.docs/models/providers/alibaba.md +4 -0
  106. package/.docs/models/providers/ambient.md +5 -1
  107. package/.docs/models/providers/amd.md +4 -0
  108. package/.docs/models/providers/anthropic.md +4 -0
  109. package/.docs/models/providers/anyapi.md +4 -0
  110. package/.docs/models/providers/arcee.md +4 -0
  111. package/.docs/models/providers/atomic-chat.md +4 -0
  112. package/.docs/models/providers/auriko.md +4 -0
  113. package/.docs/models/providers/bailing.md +4 -0
  114. package/.docs/models/providers/baseten.md +4 -0
  115. package/.docs/models/providers/bee.md +4 -0
  116. package/.docs/models/providers/berget.md +4 -0
  117. package/.docs/models/providers/blueclaw.md +4 -0
  118. package/.docs/models/providers/bothub.md +4 -0
  119. package/.docs/models/providers/boundless.md +4 -0
  120. package/.docs/models/providers/cerebras.md +4 -0
  121. package/.docs/models/providers/chutes.md +18 -11
  122. package/.docs/models/providers/clarifai.md +4 -0
  123. package/.docs/models/providers/claudinio.md +4 -0
  124. package/.docs/models/providers/cline-pass.md +6 -0
  125. package/.docs/models/providers/cloudferro-sherlock.md +4 -0
  126. package/.docs/models/providers/cloudflare-workers-ai.md +4 -0
  127. package/.docs/models/providers/commandcode.md +6 -1
  128. package/.docs/models/providers/coralbricks.md +4 -0
  129. package/.docs/models/providers/cortecs.md +8 -3
  130. package/.docs/models/providers/crof.md +4 -0
  131. package/.docs/models/providers/crossmodel.md +4 -0
  132. package/.docs/models/providers/crusoe.md +4 -0
  133. package/.docs/models/providers/daoxe.md +4 -0
  134. package/.docs/models/providers/databricks.md +4 -0
  135. package/.docs/models/providers/deepinfra.md +4 -0
  136. package/.docs/models/providers/deepseek.md +4 -0
  137. package/.docs/models/providers/digitalocean.md +6 -1
  138. package/.docs/models/providers/dinference.md +4 -0
  139. package/.docs/models/providers/drun.md +4 -0
  140. package/.docs/models/providers/ebcloud.md +4 -0
  141. package/.docs/models/providers/echo.md +4 -0
  142. package/.docs/models/providers/edenai.md +22 -8
  143. package/.docs/models/providers/empiriolabs.md +8 -4
  144. package/.docs/models/providers/engy.md +4 -0
  145. package/.docs/models/providers/evroc.md +4 -0
  146. package/.docs/models/providers/fastrouter.md +4 -0
  147. package/.docs/models/providers/firepass.md +4 -0
  148. package/.docs/models/providers/fireworks-ai.md +4 -0
  149. package/.docs/models/providers/firmware.md +4 -0
  150. package/.docs/models/providers/freemodel.md +4 -0
  151. package/.docs/models/providers/friendli.md +15 -12
  152. package/.docs/models/providers/frogbot.md +4 -0
  153. package/.docs/models/providers/github-models.md +4 -0
  154. package/.docs/models/providers/gmicloud.md +4 -0
  155. package/.docs/models/providers/google.md +4 -0
  156. package/.docs/models/providers/greenpt.md +4 -0
  157. package/.docs/models/providers/groq.md +4 -0
  158. package/.docs/models/providers/helicone.md +4 -0
  159. package/.docs/models/providers/hetzner.md +4 -0
  160. package/.docs/models/providers/hpc-ai.md +4 -0
  161. package/.docs/models/providers/huggingface.md +6 -1
  162. package/.docs/models/providers/hyper.md +4 -0
  163. package/.docs/models/providers/iflowcn.md +4 -0
  164. package/.docs/models/providers/impossibl.md +4 -0
  165. package/.docs/models/providers/inception.md +4 -0
  166. package/.docs/models/providers/inceptron.md +10 -6
  167. package/.docs/models/providers/inco.md +4 -0
  168. package/.docs/models/providers/infer.md +4 -0
  169. package/.docs/models/providers/inference.md +4 -0
  170. package/.docs/models/providers/inferx.md +4 -0
  171. package/.docs/models/providers/infomaniak.md +4 -0
  172. package/.docs/models/providers/io-net.md +4 -0
  173. package/.docs/models/providers/iteracompute.md +4 -0
  174. package/.docs/models/providers/jalapeno.md +4 -0
  175. package/.docs/models/providers/jiekou.md +4 -0
  176. package/.docs/models/providers/kenari.md +4 -0
  177. package/.docs/models/providers/kilo.md +27 -24
  178. package/.docs/models/providers/kimi-code-plan-cn.md +7 -1
  179. package/.docs/models/providers/kimi-code-plan-global.md +7 -1
  180. package/.docs/models/providers/kimi-for-coding.md +4 -0
  181. package/.docs/models/providers/kiro.md +4 -0
  182. package/.docs/models/providers/klokintegration.md +4 -0
  183. package/.docs/models/providers/kosmik.md +4 -0
  184. package/.docs/models/providers/kuae-cloud-coding-plan.md +4 -0
  185. package/.docs/models/providers/lilac.md +4 -0
  186. package/.docs/models/providers/liquid.md +4 -0
  187. package/.docs/models/providers/llama.md +4 -0
  188. package/.docs/models/providers/llmgateway-providers.md +19 -9
  189. package/.docs/models/providers/llmgateway.md +12 -6
  190. package/.docs/models/providers/llmtech.md +4 -0
  191. package/.docs/models/providers/llmtr.md +4 -0
  192. package/.docs/models/providers/lmstudio.md +4 -0
  193. package/.docs/models/providers/longcat.md +4 -0
  194. package/.docs/models/providers/lowrouter.md +6 -1
  195. package/.docs/models/providers/lucidquery.md +4 -0
  196. package/.docs/models/providers/lynkr.md +4 -0
  197. package/.docs/models/providers/meganova.md +4 -0
  198. package/.docs/models/providers/melious.md +4 -0
  199. package/.docs/models/providers/meta.md +4 -0
  200. package/.docs/models/providers/minimax-cn-coding-plan.md +4 -0
  201. package/.docs/models/providers/minimax-cn.md +4 -0
  202. package/.docs/models/providers/minimax-coding-plan.md +4 -0
  203. package/.docs/models/providers/minimax.md +4 -0
  204. package/.docs/models/providers/mistral.md +4 -0
  205. package/.docs/models/providers/mixlayer.md +4 -0
  206. package/.docs/models/providers/moark.md +4 -0
  207. package/.docs/models/providers/modal.md +4 -0
  208. package/.docs/models/providers/model-oracle-ai.md +4 -0
  209. package/.docs/models/providers/modelis.md +4 -0
  210. package/.docs/models/providers/modelscope.md +4 -0
  211. package/.docs/models/providers/moonshotai-cn.md +8 -2
  212. package/.docs/models/providers/moonshotai.md +8 -2
  213. package/.docs/models/providers/morph.md +18 -6
  214. package/.docs/models/providers/munito-eu.md +84 -0
  215. package/.docs/models/providers/munito.md +85 -0
  216. package/.docs/models/providers/nan.md +4 -0
  217. package/.docs/models/providers/nano-gpt.md +651 -619
  218. package/.docs/models/providers/nearai.md +5 -1
  219. package/.docs/models/providers/nebius.md +33 -27
  220. package/.docs/models/providers/neosmith.md +4 -0
  221. package/.docs/models/providers/neuralwatt.md +4 -0
  222. package/.docs/models/providers/nova.md +4 -0
  223. package/.docs/models/providers/novita-ai.md +7 -1
  224. package/.docs/models/providers/nvidia.md +4 -0
  225. package/.docs/models/providers/oci.md +4 -0
  226. package/.docs/models/providers/ofox.md +4 -0
  227. package/.docs/models/providers/ollama-cloud.md +4 -0
  228. package/.docs/models/providers/openai.md +6 -1
  229. package/.docs/models/providers/opencode-go.md +8 -2
  230. package/.docs/models/providers/opencode.md +4 -1
  231. package/.docs/models/providers/openreason.md +4 -0
  232. package/.docs/models/providers/opper.md +4 -0
  233. package/.docs/models/providers/orcarouter.md +4 -0
  234. package/.docs/models/providers/ovhcloud.md +4 -0
  235. package/.docs/models/providers/pareto.md +4 -0
  236. package/.docs/models/providers/pendra.md +4 -0
  237. package/.docs/models/providers/perplexity-agent.md +4 -0
  238. package/.docs/models/providers/perplexity.md +4 -0
  239. package/.docs/models/providers/pioneer.md +4 -0
  240. package/.docs/models/providers/poe.md +4 -0
  241. package/.docs/models/providers/poolside.md +4 -0
  242. package/.docs/models/providers/prime.md +7 -2
  243. package/.docs/models/providers/privatemode-ai.md +4 -0
  244. package/.docs/models/providers/qihang-ai.md +4 -0
  245. package/.docs/models/providers/qiniu-ai.md +4 -0
  246. package/.docs/models/providers/reflection.md +4 -0
  247. package/.docs/models/providers/regolo-ai.md +4 -0
  248. package/.docs/models/providers/requesty.md +10 -1
  249. package/.docs/models/providers/routing-run.md +4 -0
  250. package/.docs/models/providers/runinfra.md +4 -0
  251. package/.docs/models/providers/sakana.md +4 -0
  252. package/.docs/models/providers/sambanova.md +4 -0
  253. package/.docs/models/providers/sarvam.md +4 -0
  254. package/.docs/models/providers/scaleway.md +4 -0
  255. package/.docs/models/providers/scnet-token-plan.md +4 -0
  256. package/.docs/models/providers/scx-ai.md +4 -0
  257. package/.docs/models/providers/scx.md +4 -0
  258. package/.docs/models/providers/sensenova.md +4 -0
  259. package/.docs/models/providers/siliconflow-cn.md +4 -0
  260. package/.docs/models/providers/siliconflow.md +4 -0
  261. package/.docs/models/providers/snowflake-cortex.md +4 -0
  262. package/.docs/models/providers/stackit.md +4 -0
  263. package/.docs/models/providers/standardcompute.md +4 -0
  264. package/.docs/models/providers/stepfun-ai-step-plan.md +4 -0
  265. package/.docs/models/providers/stepfun-ai.md +4 -0
  266. package/.docs/models/providers/stepfun-step-plan.md +4 -0
  267. package/.docs/models/providers/stepfun.md +4 -0
  268. package/.docs/models/providers/subconscious.md +4 -0
  269. package/.docs/models/providers/submodel.md +4 -0
  270. package/.docs/models/providers/synthetic.md +4 -0
  271. package/.docs/models/providers/tempr.md +4 -0
  272. package/.docs/models/providers/tencent-coding-plan.md +4 -0
  273. package/.docs/models/providers/tencent-token-plan.md +4 -0
  274. package/.docs/models/providers/tencent-tokenhub.md +4 -0
  275. package/.docs/models/providers/tensorx.md +4 -0
  276. package/.docs/models/providers/the-grid-ai.md +4 -0
  277. package/.docs/models/providers/thinkingmachines.md +4 -0
  278. package/.docs/models/providers/tinfoil.md +4 -0
  279. package/.docs/models/providers/togetherai.md +4 -0
  280. package/.docs/models/providers/tokengo.md +4 -0
  281. package/.docs/models/providers/tokenrouter.md +4 -0
  282. package/.docs/models/providers/trustedrouter.md +4 -0
  283. package/.docs/models/providers/umans-ai-coding-plan.md +4 -0
  284. package/.docs/models/providers/umans-ai.md +4 -0
  285. package/.docs/models/providers/unorouter.md +4 -0
  286. package/.docs/models/providers/upstage.md +4 -0
  287. package/.docs/models/providers/vancine.md +4 -0
  288. package/.docs/models/providers/vispark.md +4 -0
  289. package/.docs/models/providers/vivgrid.md +30 -39
  290. package/.docs/models/providers/volcengine-coding-plan.md +4 -0
  291. package/.docs/models/providers/volcengine.md +4 -0
  292. package/.docs/models/providers/vultr.md +4 -0
  293. package/.docs/models/providers/wafer.ai.md +4 -0
  294. package/.docs/models/providers/wallaby.md +4 -0
  295. package/.docs/models/providers/wandb.md +9 -5
  296. package/.docs/models/providers/xai.md +4 -0
  297. package/.docs/models/providers/xiaomi-token-plan-ams.md +4 -0
  298. package/.docs/models/providers/xiaomi-token-plan-cn.md +4 -0
  299. package/.docs/models/providers/xiaomi-token-plan-sgp.md +4 -0
  300. package/.docs/models/providers/xiaomi.md +4 -0
  301. package/.docs/models/providers/xpersona.md +4 -0
  302. package/.docs/models/providers/zai-coding-plan.md +4 -0
  303. package/.docs/models/providers/zai.md +4 -0
  304. package/.docs/models/providers/zeldoc.md +4 -0
  305. package/.docs/models/providers/zenifra.md +4 -0
  306. package/.docs/models/providers/zenmux.md +4 -0
  307. package/.docs/models/providers/zhipuai-coding-plan.md +4 -0
  308. package/.docs/models/providers/zhipuai.md +4 -0
  309. package/.docs/models/providers.md +2 -0
  310. package/.docs/reference/acp/acp-agent.md +1 -1
  311. package/.docs/reference/acp/create-acp-tool.md +1 -1
  312. package/.docs/reference/agent-controller/agent-controller-class.md +2 -2
  313. package/.docs/reference/agent-controller/session.md +5 -5
  314. package/.docs/reference/agents/agent.md +8 -4
  315. package/.docs/reference/agents/channels.md +26 -7
  316. package/.docs/reference/agents/createSkill.md +1 -1
  317. package/.docs/reference/agents/durable-agent.md +29 -21
  318. package/.docs/reference/agents/generate.md +4 -1
  319. package/.docs/reference/agents/generateLegacy.md +2 -2
  320. package/.docs/reference/agents/inngest-agent.md +2 -0
  321. package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +1 -1
  322. package/.docs/reference/auth/auth0.md +2 -2
  323. package/.docs/reference/auth/better-auth.md +7 -3
  324. package/.docs/reference/auth/clerk.md +1 -1
  325. package/.docs/reference/auth/firebase.md +4 -4
  326. package/.docs/reference/auth/google.md +6 -6
  327. package/.docs/reference/auth/jwt.md +1 -1
  328. package/.docs/reference/auth/neon.md +6 -6
  329. package/.docs/reference/auth/okta.md +9 -8
  330. package/.docs/reference/auth/workos.md +3 -3
  331. package/.docs/reference/browser/agent-browser.md +1 -1
  332. package/.docs/reference/browser/firecrawl-browser.md +1 -1
  333. package/.docs/reference/browser/stagehand-browser.md +1 -1
  334. package/.docs/reference/channels/slack-provider.md +4 -2
  335. package/.docs/reference/channels/teams-provider.md +2 -2
  336. package/.docs/reference/channels/telegram-provider.md +2 -2
  337. package/.docs/reference/client-js/agent-controller.md +4 -1
  338. package/.docs/reference/client-js/agents.md +21 -1
  339. package/.docs/reference/client-js/conversations.md +3 -3
  340. package/.docs/reference/client-js/datasets.md +1 -1
  341. package/.docs/reference/client-js/observability.md +13 -14
  342. package/.docs/reference/client-js/responses.md +4 -4
  343. package/.docs/reference/client-js/workflows.md +2 -0
  344. package/.docs/reference/code-sdk/mount-agent-controller.md +2 -2
  345. package/.docs/reference/coding-agent/create-coding-agent.md +1 -1
  346. package/.docs/reference/configuration.md +1 -1
  347. package/.docs/reference/connect/channels.md +2 -2
  348. package/.docs/reference/connect/providers.md +166 -112
  349. package/.docs/reference/connect/tools.md +16 -16
  350. package/.docs/reference/core/mastra-class.md +7 -5
  351. package/.docs/reference/core/mastra-model-gateway.md +6 -1
  352. package/.docs/reference/datasets/startExperiment.md +17 -2
  353. package/.docs/reference/deployer.md +6 -3
  354. package/.docs/reference/editor/blob-store-provider.md +2 -2
  355. package/.docs/reference/editor/tool-provider.md +1 -1
  356. package/.docs/reference/evals/answer-relevancy.md +2 -2
  357. package/.docs/reference/evals/answer-similarity.md +4 -2
  358. package/.docs/reference/evals/bias.md +2 -2
  359. package/.docs/reference/evals/content-similarity.md +2 -2
  360. package/.docs/reference/evals/hallucination.md +3 -3
  361. package/.docs/reference/evals/noise-sensitivity.md +1 -1
  362. package/.docs/reference/evals/prompt-alignment.md +10 -9
  363. package/.docs/reference/evals/rubric.md +1 -1
  364. package/.docs/reference/evals/run-evals.md +1 -1
  365. package/.docs/reference/evals/scorer-utils.md +6 -4
  366. package/.docs/reference/evals/tone-consistency.md +5 -5
  367. package/.docs/reference/evals/tool-call-accuracy.md +4 -4
  368. package/.docs/reference/evals/trajectory-accuracy.md +1 -1
  369. package/.docs/reference/file-based-agents/schedules.md +1 -1
  370. package/.docs/reference/logging/pino-logger.md +1 -1
  371. package/.docs/reference/memory/memory-class.md +2 -2
  372. package/.docs/reference/memory/observational-memory.md +10 -10
  373. package/.docs/reference/memory/summarizeConversation.md +1 -1
  374. package/.docs/reference/memory/summarizeThread.md +1 -1
  375. package/.docs/reference/migrations/upgrade-to-v1/storage.md +1 -1
  376. package/.docs/reference/migrations/upgrade-to-v1/tools.md +7 -1
  377. package/.docs/reference/migrations/vnext-to-standard-apis.md +1 -1
  378. package/.docs/reference/observability/metrics/automatic-metrics.md +10 -8
  379. package/.docs/reference/observability/tracing/bridges/otel.md +1 -1
  380. package/.docs/reference/observability/tracing/exporters/confident-ai.md +2 -2
  381. package/.docs/reference/observability/tracing/exporters/console-exporter.md +3 -3
  382. package/.docs/reference/observability/tracing/exporters/default-exporter.md +1 -1
  383. package/.docs/reference/observability/tracing/exporters/langsmith.md +8 -0
  384. package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +4 -0
  385. package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +5 -1
  386. package/.docs/reference/observability/tracing/exporters/sentry.md +5 -5
  387. package/.docs/reference/observability/tracing/interfaces.md +21 -1
  388. package/.docs/reference/processors/batch-parts-processor.md +1 -1
  389. package/.docs/reference/processors/classifier-processor.md +1 -1
  390. package/.docs/reference/processors/file-upload-processor.md +8 -8
  391. package/.docs/reference/processors/moderation-processor.md +1 -1
  392. package/.docs/reference/processors/processor-interface.md +5 -5
  393. package/.docs/reference/processors/provider-history-compat.md +13 -12
  394. package/.docs/reference/processors/response-cache.md +1 -1
  395. package/.docs/reference/processors/stream-error-retry-processor.md +9 -5
  396. package/.docs/reference/processors/system-prompt-scrubber.md +1 -1
  397. package/.docs/reference/processors/token-limiter-processor.md +1 -1
  398. package/.docs/reference/processors/tool-call-filter.md +1 -1
  399. package/.docs/reference/processors/tool-search-processor.md +3 -3
  400. package/.docs/reference/processors/unicode-normalizer.md +1 -1
  401. package/.docs/reference/pubsub/redis-streams.md +10 -0
  402. package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
  403. package/.docs/reference/rag/chunking-and-embedding.md +1 -1
  404. package/.docs/reference/rag/database-config.md +20 -15
  405. package/.docs/reference/rag/extract-params.md +2 -2
  406. package/.docs/reference/rag/retrieval.md +11 -0
  407. package/.docs/reference/schedules/overview.md +17 -1
  408. package/.docs/reference/server/koa-adapter.md +2 -0
  409. package/.docs/reference/signals/notifications.md +2 -2
  410. package/.docs/reference/storage/overview.md +30 -13
  411. package/.docs/reference/storage/retention.md +1 -1
  412. package/.docs/reference/streaming/ChunkType.md +20 -2
  413. package/.docs/reference/streaming/agents/MastraModelOutput.md +3 -3
  414. package/.docs/reference/streaming/agents/stream.md +4 -4
  415. package/.docs/reference/streaming/agents/streamLegacy.md +2 -2
  416. package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
  417. package/.docs/reference/tools/ask-user-tool.md +1 -1
  418. package/.docs/reference/tools/bedrock-kb-tool.md +2 -2
  419. package/.docs/reference/tools/create-code-mode.md +1 -1
  420. package/.docs/reference/tools/create-tool.md +2 -2
  421. package/.docs/reference/tools/document-chunker-tool.md +1 -1
  422. package/.docs/reference/tools/mcp-client.md +6 -6
  423. package/.docs/reference/tools/mcp-server.md +4 -4
  424. package/.docs/reference/tools/task-tools.md +3 -1
  425. package/.docs/reference/tools/vector-query-tool.md +1 -0
  426. package/.docs/reference/vectors/astra.md +3 -1
  427. package/.docs/reference/vectors/azure-ai-search.md +2 -2
  428. package/.docs/reference/vectors/chroma.md +2 -2
  429. package/.docs/reference/vectors/convex.md +1 -1
  430. package/.docs/reference/vectors/couchbase.md +12 -5
  431. package/.docs/reference/vectors/duckdb.md +5 -5
  432. package/.docs/reference/vectors/mongodb.md +6 -6
  433. package/.docs/reference/vectors/pg.md +1 -1
  434. package/.docs/reference/vectors/pinecone.md +1 -1
  435. package/.docs/reference/vectors/qdrant.md +1 -1
  436. package/.docs/reference/vectors/s3vectors.md +3 -0
  437. package/.docs/reference/vectors/turbopuffer.md +1 -1
  438. package/.docs/reference/vectors/upstash.md +8 -4
  439. package/.docs/reference/vectors/vectorize.md +4 -2
  440. package/.docs/reference/vectors/weaviate.md +1 -1
  441. package/.docs/reference/voice/voice.send.md +1 -1
  442. package/.docs/reference/voice/voice.speak.md +1 -1
  443. package/.docs/reference/voice/voice.updateConfig.md +1 -1
  444. package/.docs/reference/workflows/run-methods/restart.md +1 -1
  445. package/.docs/reference/workflows/run-methods/resume.md +1 -1
  446. package/.docs/reference/workflows/run-methods/start.md +1 -1
  447. package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
  448. package/.docs/reference/workflows/run.md +2 -2
  449. package/.docs/reference/workflows/step.md +4 -0
  450. package/.docs/reference/workflows/workflow-methods/agent.md +2 -0
  451. package/.docs/reference/workflows/workflow-methods/classifier.md +5 -0
  452. package/.docs/reference/workflows/workflow-methods/dountil.md +1 -1
  453. package/.docs/reference/workflows/workflow-methods/map.md +2 -0
  454. package/.docs/reference/workflows/workflow.md +2 -2
  455. package/.docs/reference/workspace/factory-sandbox.md +11 -2
  456. package/.docs/reference/workspace/filesystem.md +2 -2
  457. package/.docs/reference/workspace/local-sandbox.md +3 -3
  458. package/.docs/reference/workspace/platform-filesystem.md +3 -3
  459. package/.docs/reference/workspace/platform-sandbox.md +10 -8
  460. package/.docs/reference/workspace/sandbox.md +1 -1
  461. package/.docs/reference/workspace/workspace-class.md +13 -13
  462. package/dist/index.js +1 -1
  463. package/dist/{src-DnH_jHt9.js → src-Cv7bX2-6.js} +10 -19
  464. package/dist/{src-DnH_jHt9.js.map → src-Cv7bX2-6.js.map} +1 -1
  465. package/dist/stdio.js +2 -3
  466. package/package.json +14 -14
@@ -382,6 +382,7 @@ Vector store prompts define query patterns and filtering capabilities for each v
382
382
 
383
383
  ```ts
384
384
  import { MONGODB_PROMPT } from '@mastra/mongodb'
385
+ import { Agent } from '@mastra/core/agent'
385
386
 
386
387
  export const ragAgent = new Agent({
387
388
  id: 'rag-agent',
@@ -416,6 +417,7 @@ export const ragAgent = new Agent({
416
417
 
417
418
  ```ts
418
419
  import { PINECONE_PROMPT } from '@mastra/pinecone'
420
+ import { Agent } from '@mastra/core/agent'
419
421
 
420
422
  export const ragAgent = new Agent({
421
423
  id: 'rag-agent',
@@ -433,6 +435,7 @@ export const ragAgent = new Agent({
433
435
 
434
436
  ```ts
435
437
  import { QDRANT_PROMPT } from '@mastra/qdrant'
438
+ import { Agent } from '@mastra/core/agent'
436
439
 
437
440
  export const ragAgent = new Agent({
438
441
  id: 'rag-agent',
@@ -450,6 +453,7 @@ export const ragAgent = new Agent({
450
453
 
451
454
  ```ts
452
455
  import { CHROMA_PROMPT } from '@mastra/chroma'
456
+ import { Agent } from '@mastra/core/agent'
453
457
 
454
458
  export const ragAgent = new Agent({
455
459
  id: 'rag-agent',
@@ -467,6 +471,7 @@ export const ragAgent = new Agent({
467
471
 
468
472
  ```ts
469
473
  import { ASTRA_PROMPT } from '@mastra/astra'
474
+ import { Agent } from '@mastra/core/agent'
470
475
 
471
476
  export const ragAgent = new Agent({
472
477
  id: 'rag-agent',
@@ -484,6 +489,7 @@ export const ragAgent = new Agent({
484
489
 
485
490
  ```ts
486
491
  import { LIBSQL_PROMPT } from '@mastra/libsql'
492
+ import { Agent } from '@mastra/core/agent'
487
493
 
488
494
  export const ragAgent = new Agent({
489
495
  id: 'rag-agent',
@@ -501,6 +507,7 @@ export const ragAgent = new Agent({
501
507
 
502
508
  ```ts
503
509
  import { UPSTASH_PROMPT } from '@mastra/upstash'
510
+ import { Agent } from '@mastra/core/agent'
504
511
 
505
512
  export const ragAgent = new Agent({
506
513
  id: 'rag-agent',
@@ -518,6 +525,7 @@ export const ragAgent = new Agent({
518
525
 
519
526
  ```ts
520
527
  import { VECTORIZE_PROMPT } from '@mastra/vectorize'
528
+ import { Agent } from '@mastra/core/agent'
521
529
 
522
530
  export const ragAgent = new Agent({
523
531
  id: 'rag-agent',
@@ -535,6 +543,7 @@ export const ragAgent = new Agent({
535
543
 
536
544
  ```ts
537
545
  import { OPENSEARCH_PROMPT } from '@mastra/opensearch'
546
+ import { Agent } from '@mastra/core/agent'
538
547
 
539
548
  export const ragAgent = new Agent({
540
549
  id: 'rag-agent',
@@ -552,6 +561,7 @@ export const ragAgent = new Agent({
552
561
 
553
562
  ```ts
554
563
  import { ORACLEDB_PROMPT } from '@mastra/oracledb'
564
+ import { Agent } from '@mastra/core/agent'
555
565
 
556
566
  export const ragAgent = new Agent({
557
567
  id: 'rag-agent',
@@ -569,6 +579,7 @@ export const ragAgent = new Agent({
569
579
 
570
580
  ```ts
571
581
  import { S3VECTORS_PROMPT } from '@mastra/s3vectors'
582
+ import { Agent } from '@mastra/core/agent'
572
583
 
573
584
  export const ragAgent = new Agent({
574
585
  id: 'rag-agent',
@@ -10,6 +10,22 @@
10
10
 
11
11
  For usage patterns and concepts, see [Schedules](https://mastra.ai/docs/harness/schedules).
12
12
 
13
+ ## Delivery guarantees
14
+
15
+ Scheduled publication is best-effort, not at-least-once delivery. The scheduler atomically claims an occurrence and advances `nextFireAt` before publishing the agent or workflow start event. An exhausted cron schedule is marked `completed` in that claim. Completion means there are no remaining occurrences, not that the target started or succeeded.
16
+
17
+ The scheduler makes up to three publication attempts for the same claimed occurrence, waiting 100 ms and then 200 ms between attempts. A transport can accept an event before returning an error, so retries can publish duplicates with the same run ID.
18
+
19
+ After all three attempts fail, the scheduler logs the schedule ID, run ID, scheduled fire time, `publicationOutcome: 'unknown'`, and `automaticReplay: false`. It invokes the configured `scheduler.onError` hook and attempts to record a trigger with outcome `failed`. This failure describes the publication attempts. It doesn't prove that the target never started.
20
+
21
+ Once those attempts are exhausted, the scheduler doesn't replay the occurrence. Recurring schedules remain active and can fire at their next scheduled time. Terminal schedules remain completed with any recorded failure details in trigger history.
22
+
23
+ After a successful claim, an info-level `Claimed schedule occurrence` log identifies the schedule ID, run ID, and scheduled fire time. A matching `Published schedule occurrence` log reports transport acceptance. If neither that success log nor the final failure log follows a claim, publication is unconfirmed. These logs aren't durable state: a crash between the claim commit and logging, or before logs are flushed, can leave no log record.
24
+
25
+ If a publisher process dies after the claim commits, or confirmation is lost, that occurrence may be skipped without a failed trigger. A replacement scheduler can't distinguish an unpublished event from one accepted before the crash using claim metadata or missing trigger history. It doesn't replay the occurrence or block later recurring fires. A publication acknowledgement also doesn't guarantee target execution, and transport redelivery can produce duplicates.
26
+
27
+ Before manually rerunning missed work, check target execution and transport records independently. Missing trigger history or a failed publication attempt alone isn't evidence that rerunning is safe.
28
+
13
29
  ## Usage example
14
30
 
15
31
  Create an agent schedule:
@@ -62,7 +78,7 @@ const schedule = await mastra.schedules.create({
62
78
 
63
79
  **name** (`string`): Free-form label for distinguishing multiple schedules on the same agent or thread.
64
80
 
65
- **timezone** (`string`): IANA timezone used to resolve cron fire times, for example America/New\_York.
81
+ **timezone** (`string`): IANA timezone used to resolve cron fire times, for example America/New_York.
66
82
 
67
83
  **threadId** (`string`): Thread that receives the scheduled signal. When omitted, each fire runs threadless with agent.generate().
68
84
 
@@ -104,6 +104,8 @@ await server.init()
104
104
  The [`server.onError`](https://mastra.ai/reference/configuration) hook is also supported. When configured, it's called before the error propagates to middleware, and its response is used directly:
105
105
 
106
106
  ```typescript
107
+ import { Mastra } from '@mastra/core'
108
+
107
109
  const mastra = new Mastra({
108
110
  server: {
109
111
  onError: (err, c) => {
@@ -83,7 +83,7 @@ Each key serves a different purpose:
83
83
  - `dedupeKey` identifies the same event. Reuse it when a retry or duplicate webhook should update the existing record.
84
84
  - `coalesceKey` groups related events. Use it when several events should become one record, such as multiple failures from the same pipeline.
85
85
 
86
- Both keys use the same matching rules. The difference is intent: a dedupe key represents one event that may arrive twice, while a coalesce key represents a set of related events.
86
+ Both keys use the same matching rules despite their different purposes.
87
87
 
88
88
  When a notification merges:
89
89
 
@@ -188,7 +188,7 @@ The built-in policy is:
188
188
  | `medium` | Deliver immediately | Batch into a summary |
189
189
  | `low` | Batch into a summary | Batch into a summary |
190
190
 
191
- A custom `decide` function runs at receipt time and again at delivery time for records whose receipt-time decision deferred them or scheduled a summary. At delivery time, the record's persisted schedule already fixes when and how it delivers, so only `streamOptions` and `hold` are honored. Keep the decider side-effect free.
191
+ A custom `decide` function runs at receipt time and again at delivery time for records whose receipt-time decision deferred them or scheduled a summary. The record's persisted schedule fixes when and how it delivers. Only `streamOptions` and `hold` from the delivery-time decision are honored. Keep the decider side-effect free.
192
192
 
193
193
  ## Dispatch
194
194
 
@@ -12,15 +12,32 @@ Mastra storage is organized into domains. Each domain owns a set of tables or co
12
12
 
13
13
  Not every storage adapter implements every domain. Composite storage lets you mix adapters per domain when the adapter packages export the corresponding domain classes.
14
14
 
15
- | Domain | Description |
16
- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
17
- | `memory` | Conversation persistence: messages, threads, and resources (including working memory). |
18
- | `workflows` | Workflow run snapshots used for suspend and resume. |
19
- | `workflowDefinitions` | Persisted [dynamic workflow](https://mastra.ai/docs/workflows/dynamic-workflows) definitions (beta). Loaded and live-registered on boot. |
20
- | `scores` | Evaluation score records from eval runs. |
21
- | `observability` | Traces and spans used by observability exporters and Studio. |
22
- | `datasets` | Dataset records, versioned items, and dataset versions used by experiments. |
23
- | `experiments` | Experiment runs and per-item experiment results. |
15
+ | Domain | Description |
16
+ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
17
+ | `memory` | Conversation persistence: messages, threads, and resources (including working memory). |
18
+ | `workflows` | Workflow run snapshots used for suspend and resume. |
19
+ | `workflowDefinitions` | Persisted [dynamic workflow](https://mastra.ai/docs/workflows/dynamic-workflows) definitions (beta). Loaded and live-registered on boot. |
20
+ | `scores` | Evaluation score records from eval runs. |
21
+ | `observability` | Traces and spans used by observability exporters and Studio. |
22
+ | `datasets` | Dataset records, versioned items, and dataset versions used by experiments. |
23
+ | `experiments` | Experiment runs and per-item experiment results. |
24
+ | `agents` | Stored agent definitions and their versions, used by the Mastra Editor. |
25
+ | `promptBlocks` | Stored prompt blocks and their versions, used by the Mastra Editor. |
26
+ | `scorerDefinitions` | Stored scorer definitions, used by the Mastra Editor. |
27
+ | `mcpClients` | Stored MCP client configurations, used by the Mastra Editor. |
28
+ | `mcpServers` | Stored MCP server configurations, used by the Mastra Editor. |
29
+ | `workspaces` | Stored workspace configurations, used by the Mastra Editor. |
30
+ | `skills` | Stored skills and their versions, used by the Mastra Editor. |
31
+ | `favorites` | Per-user favorites on stored entities. |
32
+ | `blobs` | Content-addressable blobs keyed by SHA-256 hash. Stores file contents for skill versioning. |
33
+ | `backgroundTasks` | Background task state: creation, status updates, and cleanup. |
34
+ | `schedules` | Schedules polled by the scheduler to trigger workflow and agent runs. |
35
+ | `channels` | Channel installations and configuration for multi-platform integrations. |
36
+ | `harness` | Harness session records. |
37
+ | `toolProviderConnections` | User-assigned names for tool provider connections. |
38
+ | `notifications` | Notification records. |
39
+ | `threadState` | Durable per-thread state, such as task lists and goals. |
40
+ | `knowledge` | Knowledge graph nodes and records (experimental). |
24
41
 
25
42
  The schema definitions below cover the built-in database-backed tables documented for `memory`, `workflows`, `scores`, and `observability`. Other domains, and non-database adapters, use implementation-specific storage structures.
26
43
 
@@ -30,11 +47,11 @@ The schema definitions below cover the built-in database-backed tables documente
30
47
 
31
48
  Stores conversation messages and their metadata. Each message belongs to a thread and contains the actual content along with metadata about the sender role and message type.
32
49
 
33
- idtextPRIMARYKEYNOT NULLUnique identifier for the messagethread\_idtextFK → threads.idNOT NULLParent thread referenceresourceIdtextCAN BE NULLID of the resource that owns this messagecontenttextNOT NULLJSON of the message content in V2 format. Example: `{ format: 2, parts: [...] }`roletextNOT NULLEnum of `user | assistant`createdAttimestampNOT NULLUsed for thread message ordering
50
+ idtextPRIMARYKEYNOT NULLUnique identifier for the messagethread_idtextFK → threads.idNOT NULLParent thread referenceresourceIdtextCAN BE NULLID of the resource that owns this messagecontenttextNOT NULLJSON of the message content in V2 format. Example: `{ format: 2, parts: [...] }`roletextNOT NULLEnum of `user | assistant`createdAttimestampNOT NULLUsed for thread message ordering
34
51
 
35
52
  The message `content` column contains a JSON object conforming to the `MastraMessageContentV2` type, which is designed to align closely with the AI SDK `UIMessage` message shape.
36
53
 
37
- formatintegerNOT NULLMessage format version (currently 2)partsarray (JSON)NOT NULLArray of message parts (text, tool-invocation, file, reasoning, etc.). The structure of items in this array varies by `type`.experimental\_attachmentsarray (JSON)CAN BE NULLOptional array of file attachmentscontenttextCAN BE NULLOptional main text content of the messagetoolInvocationsarray (JSON)CAN BE NULLOptional array summarizing tool calls and resultsreasoningobject (JSON)CAN BE NULLOptional information about the reasoning process behind the assistant's responseannotationsobject (JSON)CAN BE NULLOptional additional metadata or annotations
54
+ formatintegerNOT NULLMessage format version (currently 2)partsarray (JSON)NOT NULLArray of message parts (text, tool-invocation, file, reasoning, etc.). The structure of items in this array varies by `type`.experimental_attachmentsarray (JSON)CAN BE NULLOptional array of file attachmentscontenttextCAN BE NULLOptional main text content of the messagetoolInvocationsarray (JSON)CAN BE NULLOptional array summarizing tool calls and resultsreasoningobject (JSON)CAN BE NULLOptional information about the reasoning process behind the assistant's responseannotationsobject (JSON)CAN BE NULLOptional additional metadata or annotations
38
55
 
39
56
  **Threads**:
40
57
 
@@ -76,7 +93,7 @@ createdAttimestampNOT NULLWhen the resource record was first createdupdatedAttim
76
93
 
77
94
  When `suspend()` is called on a workflow, its state is saved in the following format. When `resume()` is called, that state is rehydrated.
78
95
 
79
- workflow\_nametextNOT NULLName of the workflowrun\_idtextNOT NULLUnique identifier for the workflow execution. Used to track state across suspend/resume cyclessnapshotjsonbNOT NULLWorkflow state as JSON. Example:
96
+ workflow_nametextNOT NULLName of the workflowrun_idtextNOT NULLUnique identifier for the workflow execution. Used to track state across suspend/resume cyclessnapshotjsonbNOT NULLWorkflow state as JSON. Example:
80
97
 
81
98
  ```json
82
99
  {
@@ -115,7 +132,7 @@ inputtextNOT NULLInput provided to the agentoutputtextNOT NULLOutput generated b
115
132
  }
116
133
  ```
117
134
 
118
- agent\_nametextNOT NULLmetric\_nametextNOT NULLe.g Faithfulness, Hallucination, etc.instructionstextNOT NULLSystem prompt or instructions for the agenttest\_infojsonbNOT NULLAdditional test metadata and configurationglobal\_run\_iduuidv4NOT NULLGroups related evaluation runs (e.g. all unit tests in a CI run)run\_iduuidv4NOT NULLUnique identifier for the run being evaluated (format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`)created\_attimestampNOT NULL
135
+ agent_nametextNOT NULLmetric_nametextNOT NULLe.g Faithfulness, Hallucination, etc.instructionstextNOT NULLSystem prompt or instructions for the agenttest_infojsonbNOT NULLAdditional test metadata and configurationglobal_run_iduuidv4NOT NULLGroups related evaluation runs (e.g. all unit tests in a CI run)run_iduuidv4NOT NULLUnique identifier for the run being evaluated (format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`)created_attimestampNOT NULL
119
136
 
120
137
  **Traces**:
121
138
 
@@ -294,7 +294,7 @@ const storage = new MongoDBStore({
294
294
 
295
295
  ## Reclaiming disk
296
296
 
297
- `prune()` deletes rows but doesn't shrink the database file. On SQLite/libSQL the freed pages go on a freelist and are reused by future writes, so the file stops growing: for most users this alone solves the unbounded-growth problem.
297
+ `prune()` deletes rows but doesn't shrink the database file. On SQLite/libSQL the freed pages go on a freelist for reuse by future writes. Reusing these pages prevents unbounded file growth for most users.
298
298
 
299
299
  Handing that free space back to the OS is a separate concern that Mastra doesn't manage. If you specifically need to shrink the file, run the underlying database's compaction (for example `VACUUM` on self-hosted libSQL) yourself in a maintenance window. A full `VACUUM` locks the file and needs roughly twice the file size in free disk. On PostgreSQL, autovacuum reclaims dead tuples for reuse automatically. A manual `VACUUM FULL` is only needed if you must return disk to the OS.
300
300
 
@@ -726,7 +726,7 @@ type UserMessagePendingChunk = {
726
726
 
727
727
  A transient removal event emitted when accepted user input is cancelled before delivery. Subscribers can remove the pending projection whose `data.id` matches the cancelled signal.
728
728
 
729
- The chunk isn't saved to conversation history. It is emitted only after the input is removed, not when cancellation is merely requested.
729
+ The chunk is emitted only after the input has been removed, confirming removal rather than a cancellation request. It remains transient and isn't saved to conversation history.
730
730
 
731
731
  ```typescript
732
732
  type UserMessageCancelledChunk = {
@@ -746,7 +746,7 @@ type UserMessageCancelledChunk = {
746
746
 
747
747
  The stored history of a thread, emitted at the start of a thread subscription.
748
748
 
749
- `thread-history` arrives only when you call [`agent.subscribeToThread()`](https://mastra.ai/reference/agents/agent) with `withInitialHistory: true`. It is the first chunk, followed by retained parts newer than the history and then live parts. Without agent memory, or when the thread has no stored messages yet, the chunk is still emitted first with an empty `messages` array and `hasMore: false`.
749
+ `thread-history` arrives only when you call [`agent.subscribeToThread()`](https://mastra.ai/reference/agents/agent) with `withInitialHistory: true`. It's the first chunk, followed by retained parts newer than the history and then live parts. Without agent memory, or when the thread has no stored messages yet, the chunk is still emitted first with an empty `messages` array and `hasMore: false`.
750
750
 
751
751
  **type** (`"thread-history"`): Chunk type identifier
752
752
 
@@ -764,8 +764,26 @@ The stored history of a thread, emitted at the start of a thread subscription.
764
764
 
765
765
  **payload.hasMore** (`boolean`): Whether older messages exist beyond this page.
766
766
 
767
+ **payload.activeRunId** (`string | null`): Run holding thread ownership during hydration, or null when idle. Use thread-run-status for the outcome.
768
+
767
769
  For queue-count events on the same thread, see the [Thread events reference](https://mastra.ai/reference/signals/thread-events).
768
770
 
771
+ ### thread-run-status
772
+
773
+ `ThreadRunStatusChunk` reports a run's outcome independently of stored-message replay. It's exported from `@mastra/core/stream` and emitted only when `subscribeToThread()` receives `withRunStatus: true`. The option defaults to `false`.
774
+
775
+ Live output precedes its status. `success`, `failed`, and `aborted` are final outcomes. `suspended` is resumable, so the same run can later emit more output and a final outcome. A status doesn't close the subscription.
776
+
777
+ **type** (`"thread-run-status"`): Chunk type identifier.
778
+
779
+ **runId** (`string`): ID of the run whose outcome is reported.
780
+
781
+ **from** (`ChunkFrom`): Always AGENT for thread run outcomes.
782
+
783
+ **payload** (`{ status: "success" | "failed" | "aborted" | "suspended" }`): Run outcome. Suspended runs can resume.
784
+
785
+ With `withInitialHistory`, `thread-history` arrives first. Opted-in late subscribers then receive one outcome per still-retained finished run, including runs outside that history page. Final outcomes are deduplicated within a subscription. Suspensions are deduplicated per execution segment. Reconnecting can redeliver outcomes. Recovery depends on PubSub retention and isn't a permanent audit log. See [Thread streams](https://mastra.ai/docs/signals/thread-streams).
786
+
769
787
  ## Usage example
770
788
 
771
789
  ```typescript
@@ -75,15 +75,15 @@ These properties resolve to final values after the stream completes:
75
75
 
76
76
  **usage.cachedInputTokens** (`number`): Number of input tokens that were a cache hit
77
77
 
78
- **finishReason** (`Promise<string | undefined>`): Reason why generation stopped (e.g., 'stop', 'length', 'tool\_calls', 'content\_filter'). Undefined if the stream hasn't finished.
78
+ **finishReason** (`Promise<string | undefined>`): Reason why generation stopped (e.g., 'stop', 'length', 'tool_calls', 'content_filter'). Undefined if the stream hasn't finished.
79
79
 
80
80
  **finishReason.stop** (`'stop'`): Model finished naturally
81
81
 
82
82
  **finishReason.length** (`'length'`): Hit maximum token limit
83
83
 
84
- **finishReason.tool\_calls** (`'tool_calls'`): Model called tools
84
+ **finishReason.tool_calls** (`'tool_calls'`): Model called tools
85
85
 
86
- **finishReason.content\_filter** (`'content_filter'`): Content was filtered
86
+ **finishReason.content_filter** (`'content_filter'`): Content was filtered
87
87
 
88
88
  **response** (`Promise<Response>`): Response metadata and messages from the model provider.
89
89
 
@@ -122,7 +122,7 @@ const stream = await agent.stream('message for agent')
122
122
 
123
123
  **options.output** (`Zod schema | JsonSchema7`): \*\*Deprecated.\*\* Use structuredOutput without a model to achieve the same thing. Defines the expected structure of the output. Can be a JSON Schema object or a Zod schema.
124
124
 
125
- **options.scopes** (`string[]`): Scopes the run acts as, written as \<type>:\<value> (for example org:acme, resource:user-123, thread:conversation-123). Memory reads its resource and thread from resource: and thread: scopes. Other scopes are passed to tools and processors. Combined with the agent's scopes and the mastra\_\_scopes request context key. Throws if a resource: or thread: scope conflicts with another resource or thread value.
125
+ **options.scopes** (`string[]`): Scopes the run acts as, written as \<type>:\<value> (for example org:acme, resource:user-123, thread:conversation-123). Memory reads its resource and thread from resource: and thread: scopes. Other scopes are passed to tools and processors. Combined with the agent's scopes and the mastra__scopes request context key. Throws if a resource: or thread: scope conflicts with another resource or thread value.
126
126
 
127
127
  **options.memory** (`object`): Configuration for memory. This is the preferred way to manage memory.
128
128
 
@@ -192,7 +192,7 @@ const stream = await agent.stream('message for agent')
192
192
 
193
193
  **options.toolCallConcurrency** (`number`): Maximum number of tool calls to execute concurrently. Defaults to 1 when approval may be required, otherwise 10.
194
194
 
195
- **options.eagerToolExecution** (`boolean`): Defaults to true. A tool call whose arguments have finished streaming starts executing immediately, instead of waiting for the model to finish the whole step. Set it to false to restore the previous scheduling. Tool results and message history keep their model-call order either way. Only server-side tools are started early: approval-gated, suspend-schema-declaring, provider-executed, client-side, background-dispatched (by argument or by backgroundTasks config), missing and inactive tools are left to the post-stream pass, as is any run using autoResumeSuspendedTools or an output processor that runs after the stream completes. That last case is wider than it sounds: a processor workflow you build yourself counts whatever it contains, because its contents are not inspected, and so does structuredOutput when given an explicit model. A processor implementing processToolResult is excluded too when a provider-executed tool is configured: that hook runs inside the stream when a provider result arrives there, and its abort bails the turn before the post-stream pass, so starting a tool early would change whether it runs, not just when. Without a provider tool, the hook only sees results after the pass and early dispatch stays on. Also left to the post-stream pass is any run using toolCallConcurrency.strategy: 'called' (the full set of called tools is not known until the step finishes). Eager executions honour the same toolCallConcurrency limit (they are counted separately from the post-stream pass, so the limit constrains each rather than being pooled across both) and aborting the run waits for work already running, then keeps its result, as the post-stream pass does. A tool that already ran is never run again, and its finished result is never thrown away. If the last model fails mid-stream with no retry, its calls still run through the post-stream pass, which adopts eager work instead of restarting it. If the attempt is retried or failed over, tools still running are allowed to finish, and every started call's result or error is written into the conversation before the replacement attempt begins, even if the retry never runs. A tool that calls suspend() at runtime without declaring a suspend schema cannot be detected in advance; the early attempt hands its suspension back to that call's own post-stream iteration, which raises the real suspension with the tool's own payload, so the tool body runs exactly once — the same as it would without early execution. Because that pre-suspend work already happened, an attempt holding such a call is never retried or failed over: the run suspends on that call instead, so resuming it is the only way the tool runs again. Not supported by durable agents, which reject an explicit true.
195
+ **options.eagerToolExecution** (`boolean`): Defaults to true. A tool call whose arguments have finished streaming starts executing immediately, instead of waiting for the model to finish the whole step. Set it to false to restore the previous scheduling. Tool results and message history keep their model-call order either way. Only server-side tools are started early: approval-gated, suspend-schema-declaring, provider-executed, client-side, background-dispatched (by argument or by backgroundTasks config), missing and inactive tools are left to the post-stream pass, as is any run using autoResumeSuspendedTools or an output processor that runs after the stream completes. That last case is wider than it sounds: a processor workflow you build yourself counts whatever it contains, because its contents are not inspected, and so does structuredOutput when given an explicit model. A processor implementing processToolResult is excluded too when a provider-executed tool is configured: that hook runs inside the stream when a provider result arrives there, and its abort bails the turn before the post-stream pass, so starting a tool early would change whether it runs, not just when. Without a provider tool, the hook only sees results after the pass and early dispatch stays on. Also left to the post-stream pass is any run using toolCallConcurrency.strategy: 'called' (the full set of called tools is not known until the step finishes). Eager executions honour the same toolCallConcurrency limit (they are counted separately from the post-stream pass, so the limit constrains each rather than being pooled across both). Aborting the run gives running tool executions a 250 ms grace period to settle and keeps successful results completed within that window. Canceled tool calls emit a tool-result chunk carrying a cancellation notice and record it in conversation history, so the next turn knows the tool started and its effects are unknown. Check the tool's status before retrying. Later results or errors are ignored. The grace period bounds the wait for tool cleanup, not the overall run deadline. For in-process agents, the remaining modelSettings.timeout.totalMs budget can expire first, producing MastraTimeoutError instead of the cancellation notice. This timeout precedence has not been verified for durable agents. This does not forcibly stop tool code or an already-running onOutput hook. Already-started tool code and external side effects may continue after cancellation. If the last model fails mid-stream with no retry, its calls still run through the post-stream pass, which adopts eager work instead of restarting it. Unless the caller cancels the run, retry and fallback allow running tools to finish and write every started call's result or error into the conversation before the replacement attempt begins, even if the retry never runs. A tool that calls suspend() at runtime without declaring a suspend schema cannot be detected in advance; the early attempt hands its suspension back to that call's own post-stream iteration, which raises the real suspension with the tool's own payload, so the tool body runs exactly once — the same as it would without early execution. Because that pre-suspend work already happened, an attempt holding such a call is never retried or failed over: the run suspends on that call instead, so resuming it is the only way the tool runs again. Not supported by durable agents, which reject an explicit true.
196
196
 
197
197
  **options.providerOptions** (`Record<string, Record<string, JSONValue>>`): Additional provider-specific options that are passed through to the underlying LLM provider. The structure is { providerName: { optionKey: value } }. For example: { openai: { reasoningEffort: 'high' }, anthropic: { maxTokens: 1000 } }.
198
198
 
@@ -250,7 +250,7 @@ const stream = await agent.stream('message for agent')
250
250
 
251
251
  ## `stopWhen` errors
252
252
 
253
- If a `stopWhen` predicate throws, `fullStream` rejects with that error. The stream does not emit a `step-finish`, `finish`, or `error` chunk for the failure. Catch the rejection around stream consumption:
253
+ If a `stopWhen` predicate throws, `fullStream` rejects with that error without emitting a `step-finish`, `finish`, or `error` chunk for the failure. Catch the rejection around stream consumption:
254
254
 
255
255
  ```ts
256
256
  async function consumeStream() {
@@ -264,7 +264,7 @@ async function consumeStream() {
264
264
  }
265
265
  ```
266
266
 
267
- Durable transports reconstruct cross-process errors from their serialized name and message. The original stack, cause, and subclass identity are not available to the stream consumer.
267
+ Durable transports reconstruct cross-process errors from their serialized name and message. The original stack, cause, and subclass identity aren't available to the stream consumer.
268
268
 
269
269
  ## Signal visibility
270
270
 
@@ -24,7 +24,7 @@ await agent.streamLegacy('message for agent')
24
24
 
25
25
  **options.context** (`CoreMessage[]`): Additional context messages to provide to the agent.
26
26
 
27
- **options.experimental\_output** (`Zod schema | JsonSchema7`): Enables structured output generation alongside text generation and tool calls. The model will generate responses that conform to the provided schema.
27
+ **options.experimental_output** (`Zod schema | JsonSchema7`): Enables structured output generation alongside text generation and tool calls. The model will generate responses that conform to the provided schema.
28
28
 
29
29
  **options.instructions** (`string`): Custom instructions that override the agent's default instructions for this specific generation. Useful for dynamically modifying agent behavior without creating a new agent instance.
30
30
 
@@ -54,7 +54,7 @@ await agent.streamLegacy('message for agent')
54
54
 
55
55
  **options.onFinish** (`StreamTextOnFinishCallback<any> | StreamObjectOnFinishCallback<OUTPUT>`): Callback function called when streaming completes. Receives the final result.
56
56
 
57
- **options.onStepFinish** (`StreamTextOnStepFinishCallback<any> | never`): Callback function called after each execution step. Receives step details as a JSON string. Unavailable for structured output
57
+ **options.onStepFinish** (`StreamTextOnStepFinishCallback<any> | never`): Callback function called after each execution step. Receives the step result (text, tool calls, tool results, usage, finish reason) plus the runId. Unavailable for structured output
58
58
 
59
59
  **options.resourceId** (`string`): \*\*Deprecated.\*\* Use memory.resource instead. Identifier for the user or resource interacting with the agent. Must be provided if threadId is provided.
60
60
 
@@ -60,7 +60,7 @@ if (result!.status === 'suspended') {
60
60
 
61
61
  **stream.status** (`Promise<RunStatus>`): A promise that resolves to the current workflow run status
62
62
 
63
- **stream.result** (`Promise<WorkflowResult<TState, TOutput, TSteps>>`): A promise that resolves to the final workflow result
63
+ **stream.result** (`Promise<WorkflowResult<TState, TInput, TOutput, TSteps>>`): A promise that resolves to the final workflow result
64
64
 
65
65
  **stream.usage** (`Promise<{ inputTokens: number; outputTokens: number; totalTokens: number, reasoningTokens?: number, cacheInputTokens?: number }>`): A promise that resolves to token usage statistics
66
66
 
@@ -60,7 +60,7 @@ The model calls this tool with the following parameters:
60
60
 
61
61
  **options.description** (`string`): Explanation of what this option means.
62
62
 
63
- **selectionMode** (`'single_select' | 'multi_select'`): Controls how many options the user can select. Defaults to 'single\_select' when options are provided. Requires options.
63
+ **selectionMode** (`'single_select' | 'multi_select'`): Controls how many options the user can select. Defaults to 'single_select' when options are provided. Requires options.
64
64
 
65
65
  ## Suspend payload
66
66
 
@@ -41,11 +41,11 @@ const agent = new Agent({
41
41
 
42
42
  **knowledgeBaseId** (`string`): The ID of the Amazon Bedrock Knowledge Base to query.
43
43
 
44
- **region** (`string`): AWS region where the Knowledge Base is deployed. Defaults to AWS\_REGION environment variable or us-east-1.
44
+ **region** (`string`): AWS region where the Knowledge Base is deployed. Defaults to AWS_REGION environment variable or us-east-1.
45
45
 
46
46
  **numberOfResults** (`number`): Maximum number of results to return. Defaults to 5.
47
47
 
48
- **useAgenticRetrieval** (`boolean`): Use AgenticRetrieveStream for complex queries with query decomposition and managed reranking. Falls back to standard Retrieve on failure. Defaults to true (disable with USE\_AGENTIC\_RETRIEVAL=false env var).
48
+ **useAgenticRetrieval** (`boolean`): Use AgenticRetrieveStream for complex queries with query decomposition and managed reranking. Falls back to standard Retrieve on failure. Defaults to true (disable with USE_AGENTIC_RETRIEVAL=false env var).
49
49
 
50
50
  **userId** (`string`): Default AWS user ID for document-level access control. A userId in the Mastra request context takes precedence.
51
51
 
@@ -70,7 +70,7 @@ export const shopAgent = new Agent({
70
70
 
71
71
  Returns a `CodeModeResult` object.
72
72
 
73
- **tool** (`Tool<any, any>`): The generated code mode tool. By default, its id is execute\_typescript.
73
+ **tool** (`Tool<any, any>`): The generated code mode tool. By default, its id is execute_typescript.
74
74
 
75
75
  **instructions** (`string`): Generated model instructions with typed external\_\* declarations for the configured tools.
76
76
 
@@ -232,7 +232,7 @@ export const weatherTool = createTool({
232
232
  })
233
233
  ```
234
234
 
235
- Mastra forwards `strict: true` to model adapters that support strict tool calling. On adapters that don't support strict tool calling, Mastra ignores this option.
235
+ Mastra forwards `strict: true` to model adapters that support strict tool calling and ignores the option for other adapters.
236
236
 
237
237
  ## Example with `toModelOutput`
238
238
 
@@ -490,7 +490,7 @@ Client-executed tools don't define an `execute` function. The browser runs the t
490
490
 
491
491
  For client-executed results, the follow-up request must include both the assistant tool call and the tool result, which `@mastra/client-js` sends automatically. A request that carries only the tool result doesn't fire the hook. In this case the callback receives `{ toolCallId, toolName, output, abortSignal }` only.
492
492
 
493
- Delivery is at least once, so a retried request runs the hook again. Keep the hook idempotent and treat client output as untrusted data: the server doesn't validate the result against `outputSchema`, so the `output` type is a static type only.
493
+ At-least-once delivery means a retried request runs the hook again. Keep the hook idempotent and treat client output as untrusted data: the server doesn't validate the result against `outputSchema`, so the `output` type is a static type only.
494
494
 
495
495
  ### Hook execution order
496
496
 
@@ -37,7 +37,7 @@ const { chunks } = await chunker.execute()
37
37
 
38
38
  ### `ChunkParams`
39
39
 
40
- **strategy** (`'recursive'`): The chunking strategy to use (Default: `'recursive'`)
40
+ **strategy** (`'character' | 'recursive' | 'token' | 'markdown' | 'html' | 'json' | 'latex' | 'sentence' | 'semantic-markdown'`): The chunking strategy to use (Default: `'recursive'`)
41
41
 
42
42
  **maxSize** (`number`): Maximum size of each chunk in tokens/characters (Default: `512`)
43
43
 
@@ -214,7 +214,7 @@ The client speaks the MCP `2026-07-28` revision. On connect it asks the server w
214
214
 
215
215
  **env** (`Record<string, string>`): For Stdio servers: Environment variables to set for the command.
216
216
 
217
- **inheritDefaultEnv** (`boolean`): For Stdio servers: Whether the subprocess environment starts from the MCP SDK's default inherited environment. The default is a curated whitelist, not the full process environment: on POSIX it inherits HOME, LOGNAME, PATH, SHELL, TERM, and USER; on Windows it inherits APPDATA, HOMEDRIVE, HOMEPATH, LOCALAPPDATA, PATH, PROCESSOR\_ARCHITECTURE, SYSTEMDRIVE, SYSTEMROOT, TEMP, USERNAME, and USERPROFILE. When set to false, only the variables explicitly listed in env are passed to the subprocess. Note that a subprocess without PATH may fail to spawn commands that are not absolute paths. (Default: `true`)
217
+ **inheritDefaultEnv** (`boolean`): For Stdio servers: Whether the subprocess environment starts from the MCP SDK's default inherited environment. The default is a curated whitelist, not the full process environment: on POSIX it inherits HOME, LOGNAME, PATH, SHELL, TERM, and USER; on Windows it inherits APPDATA, HOMEDRIVE, HOMEPATH, LOCALAPPDATA, PATH, PROCESSOR_ARCHITECTURE, SYSTEMDRIVE, SYSTEMROOT, TEMP, USERNAME, and USERPROFILE. When set to false, only the variables explicitly listed in env are passed to the subprocess. Note that a subprocess without PATH may fail to spawn commands that are not absolute paths. (Default: `true`)
218
218
 
219
219
  **url** (`URL`): For HTTP servers: The URL of the server.
220
220
 
@@ -234,7 +234,7 @@ The client speaks the MCP `2026-07-28` revision. On connect it asks the server w
234
234
 
235
235
  **capabilities** (`MCPClientCapabilities`): Client capabilities to advertise: elicitation and extensions. elicitation is only accepted together with an inputRequests handler and defaults to form support when a handler is configured. Roots and sampling are not supported.
236
236
 
237
- **inputRequests** (`MCPInputRequestHandler`): Answers input requests from this server. When a tool, resource or prompt call ends as input\_required, the handler is called with each embedded request and the client retries the call with the answers. Without a handler an input\_required result surfaces as an error. See Answering input requests below.
237
+ **inputRequests** (`MCPInputRequestHandler`): Answers input requests from this server. When a tool, resource or prompt call ends as input_required, the handler is called with each embedded request and the client retries the call with the answers. Without a handler an input_required result surfaces as an error. See Answering input requests below.
238
238
 
239
239
  **authProvider** (`OAuthClientProvider`): For HTTP servers: OAuth authentication provider for automatic token refresh and OAuth flow management. Use MCPOAuthClientProvider for a ready-to-use implementation.
240
240
 
@@ -968,7 +968,7 @@ The client doesn't receive notifications when the server's event list changes ye
968
968
 
969
969
  #### `events.subscribe(serverName, eventName, args?, options?)`
970
970
 
971
- Starts a subscription and resolves once the server confirms it. Errors such as an unknown event, invalid arguments, or a forbidden subscription reject the returned promise. A new subscription starts at the point the server accepts it, so occurrences from before that point are not delivered unless `options.cursor` resumes from an earlier position. Under webhook delivery the promise can resolve after that point: the client answers `503` for a delivery it can't route yet, and the server retries it.
971
+ Starts a subscription and resolves once the server confirms it. Errors such as an unknown event, invalid arguments, or a forbidden subscription reject the returned promise. A new subscription starts at the point the server accepts it, so occurrences from before that point aren't delivered unless `options.cursor` resumes from an earlier position. Under webhook delivery the promise can resolve after that point: the client answers `503` for a delivery it can't route yet, and the server retries it.
972
972
 
973
973
  ```typescript
974
974
  async subscribe(
@@ -981,7 +981,7 @@ async subscribe(
981
981
 
982
982
  The client picks the first mode the event offers in this order: `webhook` (only when the client has [`webhook` settings](#webhook-delivery)), `push` (a long-lived `events/stream` request), then `poll` (repeated `events/poll` requests). Pass `options.delivery` to force a mode.
983
983
 
984
- **delivery** (`'webhook' | 'push' | 'poll'`): Forces a delivery mode. When the event doesn't offer it, or for webhook without client webhook settings, subscribe() rejects with MCP\_CLIENT\_SUBSCRIBE\_EVENT\_FAILED and error.cause.id is MCP\_EVENTS\_NO\_COMPATIBLE\_DELIVERY\_MODE or MCP\_EVENTS\_WEBHOOK\_NOT\_CONFIGURED.
984
+ **delivery** (`'webhook' | 'push' | 'poll'`): Forces a delivery mode. When the event doesn't offer it, or for webhook without client webhook settings, subscribe() rejects with MCP_CLIENT_SUBSCRIBE_EVENT_FAILED and error.cause.id is MCP_EVENTS_NO_COMPATIBLE_DELIVERY_MODE or MCP_EVENTS_WEBHOOK_NOT_CONFIGURED.
985
985
 
986
986
  **cursor** (`string | null`): Resumes from a cursor saved earlier. Omit or pass null to start from now.
987
987
 
@@ -997,7 +997,7 @@ The client picks the first mode the event offers in this order: `webhook` (only
997
997
 
998
998
  **dedupWindow** (`number`): Number of recent event ids remembered to drop duplicate occurrences. (Default: `1000`)
999
999
 
1000
- **maxBufferedEvents** (`number`): Most occurrences held while your loop isn't reading. When full, the oldest unread occurrence is dropped, the next one has truncated set, and onError receives MCP\_EVENTS\_BUFFER\_OVERFLOW. (Default: `1000`)
1000
+ **maxBufferedEvents** (`number`): Most occurrences held while your loop isn't reading. When full, the oldest unread occurrence is dropped, the next one has truncated set, and onError receives MCP_EVENTS_BUFFER_OVERFLOW. (Default: `1000`)
1001
1001
 
1002
1002
  **retry** (`{ initialDelayMs?: number; maxDelayMs?: number; factor?: number; maxAttempts?: number }`): Backoff with full jitter for transient failures. Defaults to 1000 ms initial delay, 30000 ms maximum, factor 2, unlimited retries.
1003
1003
 
@@ -1131,7 +1131,7 @@ If the subscription ends, for example because the server terminates it, each sub
1131
1131
 
1132
1132
  **coalesce** (`boolean`): Sets coalesceKey: 'mcp-events:\<key>' on event notifications, whatever the provider id. Pending notifications from one subscription then merge, so a burst that arrives before the agent reads its inbox keeps only the latest occurrence. When off, every occurrence is its own notification. (Default: `false`)
1133
1133
 
1134
- **tools** (`boolean | { servers: string[] }`): Gives the agent the mcp\_events\_list, mcp\_events\_subscribe and mcp\_events\_unsubscribe tools, which act on the current thread and require memory. Event descriptions and error messages from the server reach the model inside the same untrusted-data block as event data. Subscriptions made through the tools are lost on restart. Pass servers to limit them to those servers. (Default: `false`)
1134
+ **tools** (`boolean | { servers: string[] }`): Gives the agent the mcp_events_list, mcp_events_subscribe and mcp_events_unsubscribe tools, which act on the current thread and require memory. Event descriptions and error messages from the server reach the model inside the same untrusted-data block as event data. Subscriptions made through the tools are lost on restart. Pass servers to limit them to those servers. (Default: `false`)
1135
1135
 
1136
1136
  **onError** (`(error: unknown, info: { server: string; event: string; key: string }) => void`): Receives delivery, cursor store and subscription errors.
1137
1137
 
@@ -73,7 +73,7 @@ The constructor accepts an `MCPServerConfig` object with the following propertie
73
73
 
74
74
  **agents** (`Record<string, Agent>`): An object where keys are agent identifiers and values are Mastra Agent instances. Each agent will be automatically converted into a tool named ask\_\<agentIdentifier>. The agent \*\*must\*\* have a non-empty description string property defined in its constructor configuration. This description will be used in the tool's description. If an agent's description is missing or empty, an error will be thrown during MCPServer initialization.
75
75
 
76
- **workflows** (`Record<string, Workflow>`): An object where keys are workflow identifiers and values are Mastra Workflow instances. Each workflow is converted into a tool named run\_\<workflowKey>. The workflow's inputSchema becomes the tool's input schema. The workflow \*\*must\*\* have a non-empty description string property, which is used for the tool's description. If a workflow's description is missing or empty, an error will be thrown. The tool executes the workflow by calling workflow\.createRun() followed by run.start({ inputData: \<tool\_input> }). If a tool name derived from an agent or workflow (e.g., ask\_myAgent or run\_myWorkflow) collides with an explicitly defined tool name or another derived name, the explicitly defined tool takes precedence, and a warning is logged. Agents/workflows leading to subsequent collisions are skipped.
76
+ **workflows** (`Record<string, Workflow>`): An object where keys are workflow identifiers and values are Mastra Workflow instances. Each workflow is converted into a tool named run\_\<workflowKey>. The workflow's inputSchema becomes the tool's input schema. The workflow \*\*must\*\* have a non-empty description string property, which is used for the tool's description. If a workflow's description is missing or empty, an error will be thrown. The tool executes the workflow by calling workflow\.createRun() followed by run.start({ inputData: \<tool_input> }). If a tool name derived from an agent or workflow (e.g., ask_myAgent or run_myWorkflow) collides with an explicitly defined tool name or another derived name, the explicitly defined tool takes precedence, and a warning is logged. Agents/workflows leading to subsequent collisions are skipped.
77
77
 
78
78
  **description** (`string`): Optional description of what the MCP server does. Announced to MCP clients as part of the server's identity and returned in the registry server info.
79
79
 
@@ -89,7 +89,7 @@ The constructor accepts an `MCPServerConfig` object with the following propertie
89
89
 
90
90
  **fga** (`{ resourceMapping?: Partial<Record<'tool' | 'tools', { fgaResourceType: string; deriveId?: ({ user, resourceId, requestContext }) => string | undefined }>>; permissionMapping?: Record<string, string> }`): Overrides resource and permission mappings for this MCP server's tools/list and tools/call FGA checks. Use this when MCP authorization should be scoped differently from internal agent or workflow tool execution.
91
91
 
92
- **requestState** (`{ key?: string | Uint8Array; ttlSeconds?: number }`): Integrity protection for input\_required continuation state. key is an HMAC key of at least 32 bytes that every instance able to answer a continuation must share; ttlSeconds (default 600) is how long a suspended round stays answerable. Without a key the server generates one per process. See the Asking the caller for input section.
92
+ **requestState** (`{ key?: string | Uint8Array; ttlSeconds?: number }`): Integrity protection for input_required continuation state. key is an HMAC key of at least 32 bytes that every instance able to answer a continuation must share; ttlSeconds (default 600) is how long a suspended round stays answerable. Without a key the server generates one per process. See the Asking the caller for input section.
93
93
 
94
94
  **cacheHints** (`MCPServerCacheHints`): Cache hints (ttlMs / cacheScope) advertised on cacheable results, keyed by operation: 'tools/list', 'prompts/list', 'resources/list', 'resources/templates/list', 'resources/read' and 'server/discover'.
95
95
 
@@ -1464,7 +1464,7 @@ const ticketCreated = defineEvent({
1464
1464
  })
1465
1465
  ```
1466
1466
 
1467
- `authorize` runs on every `events/poll`, every `events/stream` open, and every webhook `events/subscribe`, including refreshes. An open stream isn't checked again until it reconnects, and a webhook subscription until its next refresh. A caller who loses access keeps receiving occurrences until then. FGA isn't applied to events; use `authorize` to restrict them.
1467
+ `authorize` runs on every `events/poll`, every `events/stream` open, and every webhook `events/subscribe`, including refreshes. An open stream isn't checked again until it reconnects, and a webhook subscription until its next refresh. A caller who loses access keeps receiving occurrences until then. Use `authorize` to restrict events because FGA doesn't apply to them.
1468
1468
 
1469
1469
  ### `defineEvent()` options
1470
1470
 
@@ -1584,7 +1584,7 @@ Records an occurrence, delivers it to matching push streams and webhook subscrip
1584
1584
  - Emitted events stay in the process that emitted them. Push streams, webhook subscriptions, and buffered polls only see events emitted by the same `MCPServer` instance, so a serverless or multi-instance deployment needs a `poll` source backed by shared storage.
1585
1585
  - The buffer is in memory. A restarted server treats earlier cursors as a gap and reports `truncated: true`.
1586
1586
  - Webhook delivery state (pending retries, suspension, verification results) is in memory and rebuilt when clients refresh.
1587
- - Changes to the list of event types aren't announced yet. The server doesn't advertise `listChanged` or send `notifications/events/list_changed`, because the MCP TypeScript SDK 2.2.0 doesn't carry the `eventsListChanged` filter on `subscriptions/listen`. Clients should re-run `events/list` to see changed event types.
1587
+ - Event-list change announcements require the `eventsListChanged` filter on `subscriptions/listen`, which the MCP TypeScript SDK version used by `@mastra/mcp` doesn't carry. Until that support is available, the server neither advertises `listChanged` nor sends `notifications/events/list_changed`. Clients should re-run `events/list` to see changed event types.
1588
1588
 
1589
1589
  ## Related information
1590
1590
 
@@ -31,6 +31,8 @@ Or import the tools directly. `taskWriteTool`, `taskUpdateTool`, `taskCompleteTo
31
31
 
32
32
  ```typescript
33
33
  import { taskWriteTool, taskUpdateTool, taskCompleteTool, taskCheckTool } from '@mastra/core/tools'
34
+ import { Agent } from '@mastra/core/agent'
35
+ import { Memory } from '@mastra/memory'
34
36
 
35
37
  const agent = new Agent({
36
38
  id: 'coder',
@@ -50,7 +52,7 @@ Create or replace the entire task list. Each call replaces the previous list.
50
52
 
51
53
  **tasks** (`TaskItemInput[]`): The complete updated task list.
52
54
 
53
- **tasks.id** (`string`): Stable task identifier (e.g. 'task\_investigate\_tests'). Keep this unchanged across updates. Auto-generated when omitted.
55
+ **tasks.id** (`string`): Stable task identifier (e.g. 'task_investigate_tests'). Keep this unchanged across updates. Auto-generated when omitted.
54
56
 
55
57
  **tasks.content** (`string`): Task description in imperative form (e.g. 'Fix authentication bug').
56
58
 
@@ -436,6 +436,7 @@ For multi-tenant applications where each tenant has isolated data (e.g., separat
436
436
  ```typescript
437
437
  import { createVectorQueryTool, VectorStoreResolver } from '@mastra/rag'
438
438
  import { PgVector } from '@mastra/pg'
439
+ import { RequestContext } from '@mastra/core/request-context'
439
440
 
440
441
  // Cache for tenant-specific vector stores
441
442
  const vectorStoreCache = new Map<string, PgVector>()
@@ -8,6 +8,8 @@ The AstraVector class provides vector search using [DataStax Astra DB](https://w
8
8
 
9
9
  ## Constructor options
10
10
 
11
+ **id** (`string`): Unique identifier for this vector store instance
12
+
11
13
  **token** (`string`): Astra DB API token
12
14
 
13
15
  **endpoint** (`string`): Astra DB API endpoint
@@ -22,7 +24,7 @@ The AstraVector class provides vector search using [DataStax Astra DB](https://w
22
24
 
23
25
  **dimension** (`number`): Vector dimension (must match your embedding model)
24
26
 
25
- **metric** (`'cosine' | 'euclidean' | 'dotproduct'`): Distance metric for similarity search (maps to dot\_product for dotproduct) (Default: `cosine`)
27
+ **metric** (`'cosine' | 'euclidean' | 'dotproduct'`): Distance metric for similarity search (maps to dot_product for dotproduct) (Default: `cosine`)
26
28
 
27
29
  ### `upsert()`
28
30