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

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 (425) hide show
  1. package/.docs/docs/agents/code-mode.md +2 -2
  2. package/.docs/docs/agents/guardrails.md +5 -2
  3. package/.docs/docs/agents/human-in-the-loop.md +18 -5
  4. package/.docs/docs/agents/networks.md +1 -1
  5. package/.docs/docs/agents/overview.md +8 -7
  6. package/.docs/docs/agents/processors.md +72 -21
  7. package/.docs/docs/agents/structured-output.md +6 -6
  8. package/.docs/docs/agents/tools.md +10 -10
  9. package/.docs/docs/auth/composite-auth.md +4 -2
  10. package/.docs/docs/auth/custom-auth-provider.md +1 -1
  11. package/.docs/docs/auth/overview.md +3 -1
  12. package/.docs/docs/browser.md +13 -1
  13. package/.docs/docs/channels.md +33 -6
  14. package/.docs/docs/connections/a2a.md +1 -1
  15. package/.docs/docs/connections/acp.md +2 -2
  16. package/.docs/docs/connections/mcp.md +159 -50
  17. package/.docs/docs/connections/overview.md +1 -1
  18. package/.docs/docs/connections/sdk-agents.md +26 -15
  19. package/.docs/docs/develop.md +1 -1
  20. package/.docs/docs/evals/custom-scorers.md +5 -5
  21. package/.docs/docs/evals/experiments.md +29 -4
  22. package/.docs/docs/evals/multi-turn.md +2 -2
  23. package/.docs/docs/evals/overview.md +4 -4
  24. package/.docs/docs/evals/quick-checks.md +2 -2
  25. package/.docs/docs/guides/build-an-eval-loop.md +3 -3
  26. package/.docs/docs/guides/context-engineering.md +13 -6
  27. package/.docs/docs/guides/mcp-authentication-authorization.md +4 -4
  28. package/.docs/docs/guides/streaming.md +1 -1
  29. package/.docs/docs/harness/agent-controller.md +18 -21
  30. package/.docs/docs/harness/background-tasks.md +14 -3
  31. package/.docs/docs/harness/durable-agents.md +15 -9
  32. package/.docs/docs/harness/goals.md +5 -5
  33. package/.docs/docs/harness/overview.md +2 -2
  34. package/.docs/docs/harness/schedules.md +13 -11
  35. package/.docs/docs/index.md +7 -6
  36. package/.docs/docs/mastra-platform/connect/channels.md +1 -1
  37. package/.docs/docs/mastra-platform/connect/tools.md +4 -4
  38. package/.docs/docs/mastra-platform/environments.md +1 -1
  39. package/.docs/docs/mastra-platform/observability.md +1 -1
  40. package/.docs/docs/mastra-platform/server.md +1 -1
  41. package/.docs/docs/mastra-platform/studio.md +1 -1
  42. package/.docs/docs/memory/memory-processors.md +21 -15
  43. package/.docs/docs/memory/message-history.md +5 -5
  44. package/.docs/docs/memory/multi-user-threads.md +1 -1
  45. package/.docs/docs/memory/observational-memory.md +14 -14
  46. package/.docs/docs/memory/semantic-recall.md +22 -2
  47. package/.docs/docs/memory/working-memory.md +3 -3
  48. package/.docs/docs/observability/logging.md +5 -5
  49. package/.docs/docs/observability/tracing/overview.md +1 -0
  50. package/.docs/docs/sandbox/filesystem.md +26 -11
  51. package/.docs/docs/sandbox/overview.md +1 -1
  52. package/.docs/docs/server/mastra-client.md +1 -1
  53. package/.docs/docs/server/middleware.md +1 -1
  54. package/.docs/docs/server/overview.md +27 -0
  55. package/.docs/docs/server/request-context.md +3 -3
  56. package/.docs/docs/server/server-adapters.md +12 -204
  57. package/.docs/docs/signals/notifications.md +233 -0
  58. package/.docs/docs/signals/overview.md +94 -0
  59. package/.docs/docs/signals/running-across-processes.md +132 -0
  60. package/.docs/docs/signals/sending-signals.md +166 -0
  61. package/.docs/docs/signals/signal-providers.md +278 -0
  62. package/.docs/docs/signals/state-signals.md +103 -0
  63. package/.docs/docs/signals/thread-streams.md +94 -0
  64. package/.docs/docs/skills.md +4 -4
  65. package/.docs/docs/storage.md +1 -1
  66. package/.docs/docs/studio/auth.md +2 -2
  67. package/.docs/docs/studio/editor.md +39 -23
  68. package/.docs/docs/studio/observability.md +5 -1
  69. package/.docs/docs/subagents.md +6 -6
  70. package/.docs/docs/workflows/control-flow.md +14 -14
  71. package/.docs/docs/workflows/error-handling.md +1 -1
  72. package/.docs/integrations/agentic-ui/ai-sdk-ui.md +1 -1
  73. package/.docs/integrations/agentic-ui/copilotkit.md +1 -1
  74. package/.docs/integrations/agentic-ui/openui.md +1 -1
  75. package/.docs/integrations/browsers/agent-browser.md +1 -1
  76. package/.docs/integrations/browsers/browser-viewer.md +1 -1
  77. package/.docs/integrations/browsers/firecrawl.md +1 -1
  78. package/.docs/integrations/browsers/stagehand.md +6 -6
  79. package/.docs/integrations/channels/discord.md +1 -1
  80. package/.docs/integrations/channels/github.md +2 -2
  81. package/.docs/integrations/channels/imessage.md +2 -50
  82. package/.docs/integrations/channels/slack.md +1 -1
  83. package/.docs/integrations/channels/teams.md +1 -1
  84. package/.docs/integrations/channels/telegram.md +1 -1
  85. package/.docs/integrations/channels/whatsapp.md +1 -1
  86. package/.docs/integrations/databases/aurora-dsql.md +1 -1
  87. package/.docs/integrations/databases/cloudflare-kv.md +4 -0
  88. package/.docs/integrations/databases/elasticsearch.md +1 -1
  89. package/.docs/integrations/databases/mongodb.md +1 -1
  90. package/.docs/integrations/databases/oracledb.md +1 -1
  91. package/.docs/integrations/databases/postgresql.md +1 -1
  92. package/.docs/integrations/databases/redis.md +1 -1
  93. package/.docs/integrations/databases/upstash.md +1 -1
  94. package/.docs/integrations/deploy/aws-bedrock-agentcore.md +1 -0
  95. package/.docs/integrations/deploy/kubernetes.md +1 -1
  96. package/.docs/integrations/deploy/neon.md +2 -1
  97. package/.docs/integrations/deploy/render.md +2 -2
  98. package/.docs/integrations/file-storage/agentfs.md +1 -1
  99. package/.docs/integrations/file-storage/amazon-s3.md +20 -3
  100. package/.docs/integrations/file-storage/archil.md +1 -1
  101. package/.docs/integrations/file-storage/azure-blob.md +1 -1
  102. package/.docs/integrations/file-storage/google-cloud-storage.md +1 -1
  103. package/.docs/integrations/file-storage/google-drive.md +1 -1
  104. package/.docs/integrations/file-storage/mesa.md +1 -1
  105. package/.docs/integrations/file-storage/neon.md +210 -0
  106. package/.docs/integrations/file-storage/vercel-files.md +5 -1
  107. package/.docs/integrations/frameworks/express.md +0 -64
  108. package/.docs/integrations/observability/langfuse.md +1 -1
  109. package/.docs/integrations/observability/langsmith.md +2 -2
  110. package/.docs/integrations/observability/opentelemetry.md +5 -5
  111. package/.docs/integrations/sandboxes/apple-container.md +1 -1
  112. package/.docs/integrations/sandboxes/blaxel.md +1 -1
  113. package/.docs/integrations/sandboxes/daytona.md +1 -1
  114. package/.docs/integrations/sandboxes/docker.md +1 -1
  115. package/.docs/integrations/sandboxes/e2b-desktop.md +1 -1
  116. package/.docs/integrations/sandboxes/e2b.md +6 -2
  117. package/.docs/integrations/sandboxes/modal.md +1 -1
  118. package/.docs/integrations/sandboxes/railway.md +1 -1
  119. package/.docs/integrations/sandboxes/sprites.md +1 -1
  120. package/.docs/integrations/sandboxes/vercel.md +2 -2
  121. package/.docs/integrations/tools/brightdata.md +1 -1
  122. package/.docs/integrations/tools/firecrawl.md +1 -1
  123. package/.docs/integrations/tools/parallel.md +1 -1
  124. package/.docs/integrations/tools/perplexity.md +1 -1
  125. package/.docs/integrations/tools/tavily.md +1 -1
  126. package/.docs/integrations/voice/livekit.md +2 -2
  127. package/.docs/integrations.md +1 -0
  128. package/.docs/models/embeddings.md +2 -1
  129. package/.docs/models/environment-variables.md +1 -3
  130. package/.docs/models/gateways/custom-gateways.md +3 -3
  131. package/.docs/models/gateways/merge-gateway.md +7 -13
  132. package/.docs/models/gateways/netlify.md +2 -1
  133. package/.docs/models/gateways/openrouter.md +3 -2
  134. package/.docs/models/gateways/vercel.md +8 -5
  135. package/.docs/models/index.md +14 -16
  136. package/.docs/models/providers/302ai.md +3 -3
  137. package/.docs/models/providers/abacus.md +70 -110
  138. package/.docs/models/providers/aimlapi.md +171 -171
  139. package/.docs/models/providers/aixy.md +3 -1
  140. package/.docs/models/providers/aki-io.md +5 -6
  141. package/.docs/models/providers/alibaba-cn.md +9 -57
  142. package/.docs/models/providers/alibaba-coding-plan-cn.md +8 -12
  143. package/.docs/models/providers/alibaba-coding-plan.md +8 -12
  144. package/.docs/models/providers/alibaba-token-plan-cn.md +0 -2
  145. package/.docs/models/providers/alibaba-token-plan.md +29 -30
  146. package/.docs/models/providers/alibaba.md +33 -62
  147. package/.docs/models/providers/ambient.md +1 -9
  148. package/.docs/models/providers/amd.md +13 -9
  149. package/.docs/models/providers/anthropic.md +4 -2
  150. package/.docs/models/providers/arcee.md +6 -4
  151. package/.docs/models/providers/auriko.md +2 -2
  152. package/.docs/models/providers/baseten.md +4 -14
  153. package/.docs/models/providers/berget.md +3 -4
  154. package/.docs/models/providers/bothub.md +4 -4
  155. package/.docs/models/providers/boundless.md +0 -4
  156. package/.docs/models/providers/cline-pass.md +2 -8
  157. package/.docs/models/providers/cloudflare-workers-ai.md +1 -1
  158. package/.docs/models/providers/commandcode.md +0 -1
  159. package/.docs/models/providers/coralbricks.md +1 -1
  160. package/.docs/models/providers/cortecs.md +1 -1
  161. package/.docs/models/providers/crossmodel.md +69 -73
  162. package/.docs/models/providers/crusoe.md +1 -7
  163. package/.docs/models/providers/daoxe.md +1 -1
  164. package/.docs/models/providers/databricks.md +5 -10
  165. package/.docs/models/providers/deepinfra.md +2 -2
  166. package/.docs/models/providers/digitalocean.md +8 -24
  167. package/.docs/models/providers/dinference.md +0 -3
  168. package/.docs/models/providers/edenai.md +29 -5
  169. package/.docs/models/providers/empiriolabs.md +1 -8
  170. package/.docs/models/providers/engy.md +2 -2
  171. package/.docs/models/providers/evroc.md +2 -2
  172. package/.docs/models/providers/fastrouter.md +41 -50
  173. package/.docs/models/providers/fireworks-ai.md +6 -5
  174. package/.docs/models/providers/friendli.md +4 -5
  175. package/.docs/models/providers/frogbot.md +2 -7
  176. package/.docs/models/providers/google.md +5 -5
  177. package/.docs/models/providers/greenpt.md +14 -20
  178. package/.docs/models/providers/groq.md +3 -8
  179. package/.docs/models/providers/huggingface.md +5 -6
  180. package/.docs/models/providers/iflowcn.md +2 -18
  181. package/.docs/models/providers/impossibl.md +2 -9
  182. package/.docs/models/providers/inception.md +3 -2
  183. package/.docs/models/providers/inceptron.md +8 -6
  184. package/.docs/models/providers/inco.md +1 -1
  185. package/.docs/models/providers/inference.md +5 -11
  186. package/.docs/models/providers/infomaniak.md +10 -12
  187. package/.docs/models/providers/io-net.md +11 -17
  188. package/.docs/models/providers/iteracompute.md +5 -5
  189. package/.docs/models/providers/jalapeno.md +14 -19
  190. package/.docs/models/providers/jiekou.md +53 -63
  191. package/.docs/models/providers/kenari.md +35 -54
  192. package/.docs/models/providers/kilo.md +19 -33
  193. package/.docs/models/providers/lilac.md +2 -8
  194. package/.docs/models/providers/liquid.md +77 -0
  195. package/.docs/models/providers/llama.md +2 -11
  196. package/.docs/models/providers/llmgateway-providers.md +10 -27
  197. package/.docs/models/providers/llmgateway.md +12 -21
  198. package/.docs/models/providers/llmtr.md +1 -6
  199. package/.docs/models/providers/longcat.md +6 -5
  200. package/.docs/models/providers/lowrouter.md +1 -1
  201. package/.docs/models/providers/lucidquery.md +2 -2
  202. package/.docs/models/providers/meganova.md +6 -7
  203. package/.docs/models/providers/melious.md +11 -15
  204. package/.docs/models/providers/minimax-cn-coding-plan.md +4 -11
  205. package/.docs/models/providers/minimax-cn.md +4 -10
  206. package/.docs/models/providers/minimax-coding-plan.md +4 -11
  207. package/.docs/models/providers/minimax.md +4 -10
  208. package/.docs/models/providers/mistral.md +7 -6
  209. package/.docs/models/providers/moark.md +0 -2
  210. package/.docs/models/providers/modal.md +11 -7
  211. package/.docs/models/providers/moonshotai-cn.md +2 -2
  212. package/.docs/models/providers/nan.md +1 -1
  213. package/.docs/models/providers/nano-gpt.md +28 -31
  214. package/.docs/models/providers/nearai.md +3 -2
  215. package/.docs/models/providers/neuralwatt.md +1 -4
  216. package/.docs/models/providers/novita-ai.md +2 -1
  217. package/.docs/models/providers/nvidia.md +15 -35
  218. package/.docs/models/providers/oci.md +0 -1
  219. package/.docs/models/providers/ofox.md +149 -157
  220. package/.docs/models/providers/ollama-cloud.md +7 -12
  221. package/.docs/models/providers/openai.md +4 -2
  222. package/.docs/models/providers/opencode-go.md +2 -3
  223. package/.docs/models/providers/opencode.md +85 -87
  224. package/.docs/models/providers/opper.md +1 -4
  225. package/.docs/models/providers/orcarouter.md +14 -16
  226. package/.docs/models/providers/pareto.md +1 -1
  227. package/.docs/models/providers/perplexity-agent.md +43 -29
  228. package/.docs/models/providers/perplexity.md +2 -8
  229. package/.docs/models/providers/pioneer.md +13 -118
  230. package/.docs/models/providers/poe.md +16 -70
  231. package/.docs/models/providers/prime.md +2 -1
  232. package/.docs/models/providers/qihang-ai.md +7 -11
  233. package/.docs/models/providers/qiniu-ai.md +9 -94
  234. package/.docs/models/providers/regolo-ai.md +5 -7
  235. package/.docs/models/providers/requesty.md +0 -4
  236. package/.docs/models/providers/runinfra.md +3 -5
  237. package/.docs/models/providers/sarvam.md +1 -2
  238. package/.docs/models/providers/scaleway.md +12 -13
  239. package/.docs/models/providers/siliconflow-cn.md +35 -41
  240. package/.docs/models/providers/siliconflow.md +3 -6
  241. package/.docs/models/providers/snowflake-cortex.md +22 -22
  242. package/.docs/models/providers/stackit.md +2 -4
  243. package/.docs/models/providers/stepfun-ai.md +5 -7
  244. package/.docs/models/providers/stepfun.md +8 -10
  245. package/.docs/models/providers/submodel.md +1 -1
  246. package/.docs/models/providers/synthetic.md +2 -5
  247. package/.docs/models/providers/tempr.md +1 -4
  248. package/.docs/models/providers/tencent-coding-plan.md +3 -10
  249. package/.docs/models/providers/tensorx.md +0 -13
  250. package/.docs/models/providers/the-grid-ai.md +2 -1
  251. package/.docs/models/providers/thinkingmachines.md +45 -9
  252. package/.docs/models/providers/togetherai.md +17 -23
  253. package/.docs/models/providers/tokengo.md +1 -1
  254. package/.docs/models/providers/umans-ai-coding-plan.md +12 -11
  255. package/.docs/models/providers/umans-ai.md +11 -10
  256. package/.docs/models/providers/unorouter.md +0 -13
  257. package/.docs/models/providers/vancine.md +0 -1
  258. package/.docs/models/providers/vivgrid.md +3 -3
  259. package/.docs/models/providers/volcengine-coding-plan.md +8 -12
  260. package/.docs/models/providers/volcengine.md +12 -18
  261. package/.docs/models/providers/vultr.md +0 -2
  262. package/.docs/models/providers/wafer.ai.md +3 -7
  263. package/.docs/models/providers/wandb.md +1 -1
  264. package/.docs/models/providers/xai.md +21 -4
  265. package/.docs/models/providers/xiaomi-token-plan-ams.md +4 -5
  266. package/.docs/models/providers/xiaomi-token-plan-cn.md +4 -5
  267. package/.docs/models/providers/xiaomi-token-plan-sgp.md +4 -5
  268. package/.docs/models/providers/xiaomi.md +4 -4
  269. package/.docs/models/providers/xpersona.md +0 -1
  270. package/.docs/models/providers/zai-coding-plan.md +0 -4
  271. package/.docs/models/providers/zenmux.md +105 -125
  272. package/.docs/models/providers/zhipuai-coding-plan.md +0 -1
  273. package/.docs/models/providers/zhipuai.md +12 -12
  274. package/.docs/models/providers.md +1 -3
  275. package/.docs/reference/acp/acp-agent.md +4 -4
  276. package/.docs/reference/acp/create-acp-tool.md +1 -1
  277. package/.docs/reference/agent-controller/agent-controller-class.md +18 -23
  278. package/.docs/reference/agent-controller/session.md +8 -8
  279. package/.docs/reference/agents/agent.md +22 -46
  280. package/.docs/reference/agents/channels.md +17 -9
  281. package/.docs/reference/agents/durable-agent.md +14 -10
  282. package/.docs/reference/agents/generate.md +57 -3
  283. package/.docs/reference/agents/generateLegacy.md +2 -2
  284. package/.docs/reference/agents/getLLM.md +2 -2
  285. package/.docs/reference/agents/getMetadata.md +2 -2
  286. package/.docs/reference/agents/getSkill.md +1 -1
  287. package/.docs/reference/agents/inngest-agent.md +1 -1
  288. package/.docs/reference/agents/listSkills.md +1 -4
  289. package/.docs/reference/agents/network.md +1 -1
  290. package/.docs/reference/browser/agent-browser.md +1 -1
  291. package/.docs/reference/browser/browser-viewer.md +1 -1
  292. package/.docs/reference/browser/firecrawl-browser.md +1 -1
  293. package/.docs/reference/browser/mastra-browser.md +2 -2
  294. package/.docs/reference/browser/stagehand-browser.md +4 -4
  295. package/.docs/reference/channels/slack-provider.md +3 -0
  296. package/.docs/reference/cli/mastra.md +26 -0
  297. package/.docs/reference/client-js/agent-controller.md +14 -4
  298. package/.docs/reference/client-js/agents.md +21 -1
  299. package/.docs/reference/client-js/mastra-client.md +1 -1
  300. package/.docs/reference/client-js/observability.md +29 -4
  301. package/.docs/reference/coding-agent/build-base-prompt.md +1 -1
  302. package/.docs/reference/coding-agent/create-coding-agent.md +8 -8
  303. package/.docs/reference/configuration.md +33 -3
  304. package/.docs/reference/connect/tools.md +2 -2
  305. package/.docs/reference/core/getAgentById.md +1 -1
  306. package/.docs/reference/core/mastra-class.md +2 -2
  307. package/.docs/reference/core/mastra-model-gateway.md +34 -5
  308. package/.docs/reference/datasets/delete.md +6 -0
  309. package/.docs/reference/editor/mastra-editor.md +11 -9
  310. package/.docs/reference/editor/tool-provider.md +2 -2
  311. package/.docs/reference/evals/answer-relevancy.md +1 -1
  312. package/.docs/reference/evals/answer-similarity.md +1 -1
  313. package/.docs/reference/evals/bias.md +1 -1
  314. package/.docs/reference/evals/checks.md +1 -1
  315. package/.docs/reference/evals/context-precision.md +3 -3
  316. package/.docs/reference/evals/context-recall.md +3 -3
  317. package/.docs/reference/evals/context-relevance.md +11 -11
  318. package/.docs/reference/evals/create-classifier-scorer.md +6 -2
  319. package/.docs/reference/evals/faithfulness.md +1 -1
  320. package/.docs/reference/evals/hallucination.md +5 -5
  321. package/.docs/reference/evals/multi-turn-judge.md +2 -2
  322. package/.docs/reference/evals/noise-sensitivity.md +12 -12
  323. package/.docs/reference/evals/not-scorable.md +1 -1
  324. package/.docs/reference/evals/prompt-alignment.md +16 -16
  325. package/.docs/reference/evals/rubric.md +5 -5
  326. package/.docs/reference/evals/summarization.md +4 -4
  327. package/.docs/reference/evals/tool-call-accuracy.md +4 -4
  328. package/.docs/reference/evals/toxicity.md +1 -1
  329. package/.docs/reference/file-based-agents/config.md +3 -3
  330. package/.docs/reference/file-based-agents/instructions.md +1 -1
  331. package/.docs/reference/file-based-agents/processors.md +2 -0
  332. package/.docs/reference/file-based-agents/schedules.md +2 -2
  333. package/.docs/reference/file-based-agents/skills.md +1 -1
  334. package/.docs/reference/file-based-agents/subagents.md +5 -5
  335. package/.docs/reference/file-based-agents/workspace.md +1 -1
  336. package/.docs/reference/index.md +2 -0
  337. package/.docs/reference/manual-install.md +3 -2
  338. package/.docs/reference/memory/cloneThread.md +1 -1
  339. package/.docs/reference/memory/copyThread.md +1 -1
  340. package/.docs/reference/memory/deleteMessages.md +4 -1
  341. package/.docs/reference/memory/memory-class.md +5 -3
  342. package/.docs/reference/memory/observational-memory.md +16 -16
  343. package/.docs/reference/memory/serialized-memory-config.md +1 -1
  344. package/.docs/reference/memory/summarizeConversation.md +3 -3
  345. package/.docs/reference/memory/summarizeThread.md +3 -3
  346. package/.docs/reference/migrations/agentnetwork.md +4 -4
  347. package/.docs/reference/migrations/mcp-v2.md +1 -1
  348. package/.docs/reference/migrations/upgrade-to-v1/agent.md +1 -1
  349. package/.docs/reference/migrations/vnext-to-standard-apis.md +2 -2
  350. package/.docs/reference/observability/tracing/advanced-queries.md +131 -41
  351. package/.docs/reference/observability/tracing/exporters/langfuse.md +1 -1
  352. package/.docs/reference/observability/tracing/interfaces.md +2 -0
  353. package/.docs/reference/processors/batch-parts-processor.md +1 -1
  354. package/.docs/reference/processors/classifier-processor.md +2 -2
  355. package/.docs/reference/processors/cyber-refusal-handler.md +1 -1
  356. package/.docs/reference/processors/file-upload-processor.md +1 -1
  357. package/.docs/reference/processors/language-detector.md +1 -1
  358. package/.docs/reference/processors/message-history-processor.md +2 -2
  359. package/.docs/reference/processors/model-selection-processor.md +7 -7
  360. package/.docs/reference/processors/moderation-processor.md +2 -2
  361. package/.docs/reference/processors/pii-detector.md +2 -2
  362. package/.docs/reference/processors/prefill-error-handler.md +2 -2
  363. package/.docs/reference/processors/processor-interface.md +76 -12
  364. package/.docs/reference/processors/prompt-injection-detector.md +1 -1
  365. package/.docs/reference/processors/provider-history-compat.md +1 -1
  366. package/.docs/reference/processors/regex-filter-processor.md +1 -1
  367. package/.docs/reference/processors/response-cache.md +1 -1
  368. package/.docs/reference/processors/semantic-recall-processor.md +2 -2
  369. package/.docs/reference/processors/skill-search-processor.md +1 -1
  370. package/.docs/reference/processors/stream-error-retry-processor.md +3 -3
  371. package/.docs/reference/processors/system-prompt-scrubber.md +1 -1
  372. package/.docs/reference/processors/token-cost-control.md +1 -1
  373. package/.docs/reference/processors/token-limiter-processor.md +3 -3
  374. package/.docs/reference/processors/tool-call-filter.md +2 -2
  375. package/.docs/reference/processors/tool-search-processor.md +3 -3
  376. package/.docs/reference/processors/unicode-normalizer.md +1 -1
  377. package/.docs/reference/processors/working-memory-processor.md +2 -2
  378. package/.docs/reference/pubsub/lease-provider.md +2 -2
  379. package/.docs/reference/pubsub/redis-streams.md +1 -1
  380. package/.docs/reference/rag/chunking-and-embedding.md +1 -1
  381. package/.docs/reference/rag/graph-rag-guide.md +2 -2
  382. package/.docs/reference/rag/metadata-filters.md +1 -1
  383. package/.docs/reference/rag/rerank.md +1 -1
  384. package/.docs/reference/rag/retrieval.md +13 -13
  385. package/.docs/reference/server/nestjs-adapter.md +1 -1
  386. package/.docs/reference/server/routes.md +159 -0
  387. package/.docs/reference/signals/create-notification-inbox-tool.md +4 -4
  388. package/.docs/reference/signals/notifications.md +249 -0
  389. package/.docs/reference/signals/signal-provider.md +2 -0
  390. package/.docs/reference/signals/task-signal-provider.md +3 -3
  391. package/.docs/reference/signals/thread-events.md +69 -0
  392. package/.docs/reference/streaming/ChunkType.md +68 -0
  393. package/.docs/reference/streaming/agents/stream.md +3 -3
  394. package/.docs/reference/tools/create-code-mode.md +1 -1
  395. package/.docs/reference/tools/create-tool.md +17 -0
  396. package/.docs/reference/tools/mcp-client.md +430 -3
  397. package/.docs/reference/tools/mcp-server.md +173 -1
  398. package/.docs/reference/tools/task-tools.md +1 -1
  399. package/.docs/reference/tools/vector-query-tool.md +1 -1
  400. package/.docs/reference/vectors/libsql.md +1 -1
  401. package/.docs/reference/vectors/mongodb.md +2 -2
  402. package/.docs/reference/vectors/oracledb.md +2 -2
  403. package/.docs/reference/vectors/pg.md +1 -1
  404. package/.docs/reference/vectors/upstash.md +1 -1
  405. package/.docs/reference/voice/overview.md +24 -24
  406. package/.docs/reference/voice/speech-to-speech.md +6 -6
  407. package/.docs/reference/voice/speech-to-text.md +1 -1
  408. package/.docs/reference/voice/text-to-speech.md +1 -1
  409. package/.docs/reference/voice/voice.addInstructions.md +1 -1
  410. package/.docs/reference/workflows/workflow-methods/branch.md +1 -1
  411. package/.docs/reference/workspace/filesystem.md +17 -17
  412. package/.docs/reference/workspace/local-filesystem.md +52 -27
  413. package/.docs/reference/workspace/local-sandbox.md +1 -1
  414. package/.docs/reference/workspace/platform-filesystem.md +1 -1
  415. package/.docs/reference/workspace/platform-sandbox.md +23 -2
  416. package/.docs/reference/workspace/process-manager.md +13 -2
  417. package/.docs/reference/workspace/sandbox.md +16 -0
  418. package/.docs/reference/workspace/workspace-class.md +13 -12
  419. package/dist/index.js +1 -2
  420. package/dist/{src-Baf8l9Sp.js → src-DnH_jHt9.js} +2 -3
  421. package/dist/{src-Baf8l9Sp.js.map → src-DnH_jHt9.js.map} +1 -1
  422. package/dist/stdio.js +1 -1
  423. package/package.json +9 -9
  424. package/.docs/docs/harness/signal-providers.md +0 -212
  425. package/.docs/docs/harness/signals.md +0 -546
@@ -109,7 +109,7 @@ const result = await runEvals({
109
109
  scorers: [
110
110
  {
111
111
  scorer: createMultiTurnJudgeScorer({
112
- model: 'anthropic/claude-haiku-4-5',
112
+ model: 'anthropic/claude-haiku-5-5',
113
113
  criterion:
114
114
  'The agent provided forecasts for London and Paris, and gave weather-appropriate packing advice.',
115
115
  }),
@@ -132,7 +132,7 @@ export const conversationJudge = createScorer({
132
132
  description: 'Grades every assistant turn in a conversation against one criterion',
133
133
  type: 'agent',
134
134
  judge: {
135
- model: 'anthropic/claude-haiku-4-5',
135
+ model: 'anthropic/claude-haiku-5-5',
136
136
  instructions: 'You grade multi-turn assistant transcripts against a single criterion.',
137
137
  },
138
138
  })
@@ -64,11 +64,11 @@ export const evaluatedAgent = new Agent({
64
64
  id: 'evaluated-agent',
65
65
  scorers: {
66
66
  relevancy: {
67
- scorer: createAnswerRelevancyScorer({ model: 'openai/gpt-5-mini' }),
67
+ scorer: createAnswerRelevancyScorer({ model: 'openai/gpt-6-luna' }),
68
68
  sampling: { type: 'ratio', rate: 0.5 },
69
69
  },
70
70
  safety: {
71
- scorer: createToxicityScorer({ model: 'openai/gpt-5-mini' }),
71
+ scorer: createToxicityScorer({ model: 'openai/gpt-6-luna' }),
72
72
  sampling: { type: 'ratio', rate: 1 },
73
73
  },
74
74
  },
@@ -138,7 +138,7 @@ export const myAgent = new Agent({
138
138
  // ...
139
139
  scorers: {
140
140
  relevancy: {
141
- scorer: createAnswerRelevancyScorer({ model: 'openai/gpt-5-mini' }),
141
+ scorer: createAnswerRelevancyScorer({ model: 'openai/gpt-6-luna' }),
142
142
  filter: {
143
143
  op: 'eq',
144
144
  left: { path: 'requestContext.plan' },
@@ -177,7 +177,7 @@ export const mastra = new Mastra({
177
177
  scorers: {
178
178
  calledTool: checks.calledTool('get_weather'),
179
179
  includes: checks.includes('Brooklyn'),
180
- relevancy: createAnswerRelevancyScorer({ model: 'openai/gpt-5-mini' }),
180
+ relevancy: createAnswerRelevancyScorer({ model: 'openai/gpt-6-luna' }),
181
181
  },
182
182
  })
183
183
  ```
@@ -90,7 +90,7 @@ const result = await runEvals({
90
90
  checks.noToolErrors(),
91
91
 
92
92
  // LLM-based scorer (semantic, costs tokens)
93
- createFaithfulnessScorer({ model: 'openai/gpt-5-mini' }),
93
+ createFaithfulnessScorer({ model: 'openai/gpt-6-luna' }),
94
94
  ],
95
95
  })
96
96
  ```
@@ -107,7 +107,7 @@ export const weatherAgent = new Agent({
107
107
  id: 'weather-agent',
108
108
  name: 'Weather Agent',
109
109
  instructions: 'Answer weather questions using the get_weather tool.',
110
- model: 'openai/gpt-5.6-sol',
110
+ model: 'openai/gpt-6.1-sol',
111
111
  tools: { get_weather: weatherTool },
112
112
  scorers: {
113
113
  noErrors: {
@@ -48,7 +48,7 @@ import { Agent } from '@mastra/core/agent'
48
48
  export const refundPolicyAgent = new Agent({
49
49
  id: 'refund-policy-agent',
50
50
  name: 'Aster Space Reservations',
51
- model: 'openai/gpt-5.6-sol',
51
+ model: 'openai/gpt-6.1-sol',
52
52
  instructions: `
53
53
  Answer reservation-deposit questions for Aster Space.
54
54
  - Customer cancellations are refundable within 14 days of payment,
@@ -171,7 +171,7 @@ export const refundCorrectnessScorer = createScorer({
171
171
  description: 'Checks an answer against the test case’s expected outcome.',
172
172
  type: 'agent',
173
173
  judge: {
174
- model: 'anthropic/claude-sonnet-4-6',
174
+ model: 'anthropic/claude-sonnet-5-5',
175
175
  instructions: `
176
176
  Evaluate correctness against the supplied ground truth.
177
177
  Pass only if every "must" criterion is satisfied and no "mustNot"
@@ -385,7 +385,7 @@ Reuse a [rubric scorer](https://mastra.ai/reference/evals/rubric) with shared cr
385
385
  import { createRubricScorer } from '@mastra/evals/scorers/prebuilt'
386
386
 
387
387
  const toneOfVoice = createRubricScorer({
388
- model: 'openai/gpt-5-mini',
388
+ model: 'openai/gpt-6-luna',
389
389
  criteria: 'Use plain, professional language.\nAvoid sales pitches and exaggerated enthusiasm.',
390
390
  })
391
391
  ```
@@ -33,9 +33,8 @@ export const supportAgent = new Agent({
33
33
  id: 'support-agent',
34
34
  name: 'Support Agent',
35
35
  instructions: `You help customers understand their account.
36
- Today is ${new Date().toDateString()}.
37
36
  Use plain language and don't invent account details.`,
38
- model: 'openai/gpt-5.6-sol',
37
+ model: 'openai/gpt-6.1-sol',
39
38
  })
40
39
  ```
41
40
 
@@ -51,7 +50,15 @@ instructions: ({ requestContext }) => {
51
50
  }
52
51
  ```
53
52
 
54
- Use `RequestContext` when instructions depend on data that changes with each request, such as the current user, tenant, locale, role, or feature flags. Values that don't come from the request, such as the current date, can be interpolated directly as shown in the first example.
53
+ Use `RequestContext` when instructions depend on data that changes with each request, such as the current user, tenant, locale, role, or feature flags. Anything evaluated when the agent is constructed, including an interpolated `new Date()`, is fixed for the life of the process, so compute time-dependent values inside a callback and pass an explicit timezone:
54
+
55
+ ```typescript
56
+ instructions: () =>
57
+ `You help customers understand their account.
58
+ Today is ${new Date().toLocaleDateString('en-US', { timeZone: 'America/New_York' })}.`
59
+ ```
60
+
61
+ Resolving the date in the callback means a long-running server picks up the new day after midnight, and the explicit `timeZone` keeps the date stable regardless of the host's timezone. If the date must refresh across tool continuations or coexist with Studio instruction overrides, use a [`processInputStep`](https://mastra.ai/reference/processors/processor-interface) processor instead.
55
62
 
56
63
  > **Tip:** If the resolved instructions change often, the model provider may not be able to reuse the same prompt cache prefix. Keep the stable part first, and pass frequently changing background through messages or signals instead.
57
64
  >
@@ -160,7 +167,7 @@ import { Memory } from '@mastra/memory'
160
167
  export const assistant = new Agent({
161
168
  id: 'assistant',
162
169
  name: 'Assistant',
163
- model: 'openai/gpt-5.6-sol',
170
+ model: 'openai/gpt-6.1-sol',
164
171
  memory: new Memory({
165
172
  options: {
166
173
  lastMessages: 20,
@@ -195,7 +202,7 @@ import { Memory } from '@mastra/memory'
195
202
  export const assistant = new Agent({
196
203
  id: 'assistant',
197
204
  name: 'Assistant',
198
- model: 'openai/gpt-5.6-sol',
205
+ model: 'openai/gpt-6.1-sol',
199
206
  memory: new Memory({
200
207
  options: {
201
208
  observationalMemory: true,
@@ -210,7 +217,7 @@ Observations are added in stable chunks, which helps providers reuse the existin
210
217
 
211
218
  ## Signals
212
219
 
213
- [Signals](https://mastra.ai/docs/harness/signals) add messages or system-generated context to a memory-backed thread. Delivery depends on the thread's state: a signal can wake an idle agent or enter an active loop. It can also wait for the next turn or persist without waking the agent.
220
+ [Signals](https://mastra.ai/docs/signals/overview) add messages or system-generated context to a memory-backed thread. Delivery depends on the thread's state: a signal can wake an idle agent or enter an active loop. It can also wait for the next turn or persist without waking the agent.
214
221
 
215
222
  State signals require memory and an existing thread. Notification inbox signals require a storage adapter with notification support.
216
223
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
4
4
 
5
- # MCP authentication
5
+ # MCP authentication and authorization
6
6
 
7
7
  You either connect your Mastra application to someone else's protected MCP server, or you expose your own tools and data to a third-party client. Each direction needs different credentials and different checks.
8
8
 
@@ -47,7 +47,7 @@ A separate provider per MCP server does one thing and not another:
47
47
 
48
48
  The specification recommends support for **Client ID Metadata Documents (CIMD)**, which identify a client through an HTTPS metadata URL. It also defines pre-registration. Clients that support all registration options should prefer existing pre-registered information when available. Legacy Dynamic Client Registration (DCR) remains optional for compatibility but is deprecated for new implementations. See the versioned [client registration rules](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/client-registration).
49
49
 
50
- Mastra's provider accepts pre-registered client information and supports a DCR-based flow. Don't infer CIMD support from the presence of OAuth support. Check the registration mechanism supported by your client integration and authorization server before choosing a deployment.
50
+ `MCPOAuthClientProvider` never registers a client at runtime and doesn't support DCR. Configure exactly one client identity: `clientInformation` for a client pre-registered with the authorization server, or `clientMetadataUrl` for CIMD. Check that your authorization server supports the mechanism you choose before deploying. See the [OAuth client reference](https://mastra.ai/reference/tools/mcp-client) for configuration examples.
51
51
 
52
52
  Mastra's interactive `authenticate()` flow uses a local loopback callback server. It isn't a hosted multi-user login endpoint. A hosted application must own its callback endpoint and associate each authorization attempt with the correct user and provider. See [interactive browser authentication](https://mastra.ai/reference/tools/mcp-client).
53
53
 
@@ -97,7 +97,7 @@ Protecting Mastra routes with `server.auth` and providing interoperable OAuth di
97
97
 
98
98
  Alongside the MCP transport, Mastra registers REST routes used by Studio to list servers, inspect tools, execute tools, and read resources. See the [MCP routes reference](https://mastra.ai/reference/server/routes) for the full list. These paths use the default `/api` prefix.
99
99
 
100
- The `POST /api/mcp/:serverId/tools/:toolId/execute` route calls `executeTool()` directly, without a protocol client. With a Mastra FGA provider configured, `MCPServer.executeTool()` enforces tool execution permission using the user in `requestContext`. The REST tool list also filters tools through FGA. These permission checks don't replace route authentication.
100
+ The `POST /api/mcp/:serverId/tools/:toolId/execute` route calls `executeTool()` directly, without a protocol client. With a Mastra FGA provider configured, `MCPServer.executeTool()` enforces tool execution permission using the user in `requestContext`. The REST tool list also filters tools through FGA, but these permission checks don't replace route authentication.
101
101
 
102
102
  Built-in authentication for these routes depends on `server.auth`. Without it, `requiresAuth: true` doesn't enforce authentication. Custom middleware that checks only the `/mcp` or `/sse` transport paths leaves the REST routes open. If you use custom middleware instead of `server.auth`, default-deny `/api/mcp/*` and allow access only after authentication.
103
103
 
@@ -125,7 +125,7 @@ An MCP access token is for the MCP server. The specification prohibits passing t
125
125
 
126
126
  Keep access tokens, refresh tokens, and service credentials outside model-visible instructions, tool arguments, and tool results. Return only the data needed for the task. The [authentication and identity guide](https://mastra.ai/docs/guides/authentication-identity) explains this model boundary.
127
127
 
128
- ## Verify before production
128
+ ## Production checklist
129
129
 
130
130
  - [ ] **Validate tokens:** Configure validation for your issuer, including audience and expiry checks, and confirm an unvalidated token is rejected.
131
131
  - [ ] **Challenge missing tokens:** Confirm every protected server path returns `401` without a bearer token.
@@ -225,7 +225,7 @@ export const testAgent = new Agent({
225
225
  id: 'test-agent',
226
226
  name: 'Test Agent',
227
227
  instructions: 'You are a weather agent.',
228
- model: 'openai/gpt-5.6-sol',
228
+ model: 'openai/gpt-6.1-sol',
229
229
  tools: { testTool },
230
230
  })
231
231
  ```
@@ -36,7 +36,7 @@ const agent = new Agent({
36
36
  id: 'assistant',
37
37
  name: 'Assistant',
38
38
  instructions: 'Help the user plan and complete tasks.',
39
- model: 'openai/gpt-5.6-sol',
39
+ model: 'openai/gpt-6.1-sol',
40
40
  })
41
41
 
42
42
  const controller = new AgentController({
@@ -90,43 +90,40 @@ Use the same controller for many Sessions. Don't store a current Session on the
90
90
  The controller, Session, and thread have different lifetimes:
91
91
 
92
92
  - **Controller**: A shared host for configuration and runtime services. Initialize it once and reuse it.
93
- - **Session**: An isolated live runtime for one user, task, or concurrent work scope. It owns the active mode, model, state, event bus, run state, grants, and current thread binding.
93
+ - **Session**: An isolated live runtime for one user, task, or concurrent piece of work, addressed by its session id. It owns the active mode, model, state, event bus, run state, grants, and current thread binding.
94
94
  - **Thread**: A stored conversation containing messages and thread settings. Threads can survive controller and process recreation when you configure storage.
95
95
 
96
96
  A Session is live state. Arbitrary [`session.state`](https://mastra.ai/reference/agent-controller/session), permission grants, pending approvals, and active runs don't automatically survive process recreation. Thread messages and selected thread settings, including the active mode and the current model, can persist through storage, but switching modes doesn't change the model.
97
97
 
98
98
  ## Sessions and threads
99
99
 
100
- `createSession()` is get-or-create by `resourceId` and optional `scope`:
100
+ `createSession()` is get-or-create by session `id`. The `resourceId` names who owns the session's threads and resource-scoped memory. When you omit `id`, it defaults to `resourceId`:
101
101
 
102
102
  ```typescript
103
103
  const webSession = await controller.createSession({
104
+ id: 'user-123:web',
104
105
  resourceId: 'user-123',
105
- scope: 'web',
106
106
  })
107
107
 
108
- const sameWebSession = await controller.createSession({
109
- resourceId: 'user-123',
110
- scope: 'web',
111
- })
108
+ const sameWebSession = await controller.getSession('user-123:web')
112
109
 
113
110
  const workerSession = await controller.createSession({
111
+ id: 'user-123:background-worker',
114
112
  resourceId: 'user-123',
115
- scope: 'background-worker',
116
113
  })
117
114
 
118
115
  console.log(webSession === sameWebSession) // true
119
116
  console.log(webSession === workerSession) // false
120
117
  ```
121
118
 
122
- Sessions with different scopes have separate event buses, run loops, state, mode and model selections, and current thread bindings. Their stored threads still belong to the shared `resourceId`.
119
+ Sessions with different ids have separate event buses, run loops, state, mode and model selections, and current thread bindings. Their stored threads and resource-scoped memory still belong to the shared `resourceId`, so listing threads by resource returns both sessions' threads.
123
120
 
124
121
  Pass `threadId` when the host must bind the Session to an exact thread. The controller switches to the existing thread or creates it with that ID when it's missing. This behavior also applies when `createSession()` returns a cached Session:
125
122
 
126
123
  ```typescript
127
124
  const session = await controller.createSession({
125
+ id: 'user-123:web',
128
126
  resourceId: 'user-123',
129
- scope: 'web',
130
127
  threadId: 'support-ticket-42',
131
128
  })
132
129
  ```
@@ -214,7 +211,7 @@ console.log(session.mode.resolve().instructions)
214
211
  Switch models independently with [`session.model.switch()`](https://mastra.ai/reference/agent-controller/session), then read the active selection with [`session.model.get()`](https://mastra.ai/reference/agent-controller/session). The selection is stored as the thread's current model and remains active when the Session changes modes:
215
212
 
216
213
  ```typescript
217
- await session.model.switch('anthropic/claude-sonnet-4-6')
214
+ await session.model.switch('anthropic/claude-sonnet-5-5')
218
215
 
219
216
  console.log(session.model.get())
220
217
  ```
@@ -231,8 +228,8 @@ const controller = new AgentController({
231
228
  omConfig: {
232
229
  observerModel: 'auto',
233
230
  reflectorModel: 'auto',
234
- defaultObserverModelId: 'openai/gpt-5-mini',
235
- defaultReflectorModelId: 'openai/gpt-5-mini',
231
+ defaultObserverModelId: 'openai/gpt-6-luna',
232
+ defaultReflectorModelId: 'openai/gpt-6-luna',
236
233
  resolveAutoModelId: ({ currentModelId }) => currentModelId,
237
234
  },
238
235
  })
@@ -346,7 +343,7 @@ const controller = new AgentController({
346
343
  instructions: 'Inspect the change and report actionable findings.',
347
344
  allowedControllerTools: ['searchDocs'],
348
345
  allowedWorkspaceTools: ['view', 'find_files'],
349
- defaultModelId: 'openai/gpt-5-mini',
346
+ defaultModelId: 'openai/gpt-6-luna',
350
347
  },
351
348
  ],
352
349
  })
@@ -358,12 +355,12 @@ Use [`session.subagents.model.set()`](https://mastra.ai/reference/agent-controll
358
355
 
359
356
  ```typescript
360
357
  await session.subagents.model.set({
361
- modelId: 'openai/gpt-5-mini',
358
+ modelId: 'openai/gpt-6-luna',
362
359
  })
363
360
 
364
361
  await session.subagents.model.set({
365
362
  agentType: 'code-reviewer',
366
- modelId: 'anthropic/claude-sonnet-4-6',
363
+ modelId: 'anthropic/claude-sonnet-5-5',
367
364
  })
368
365
 
369
366
  const reviewerModel = session.subagents.model.get({
@@ -430,9 +427,9 @@ channels: {
430
427
  const install = await installs.authorize(requestContext.get('teamId'))
431
428
 
432
429
  return controller.createSession({
430
+ id: `${install.id}:${thread.id}`,
433
431
  resourceId: thread.resourceId,
434
432
  threadId: thread.id,
435
- scope: install.id,
436
433
  ownerId: controller.id,
437
434
  requestContext,
438
435
  })
@@ -440,7 +437,7 @@ channels: {
440
437
  }
441
438
  ```
442
439
 
443
- Create the session under `thread.resourceId`. Because a session can bind only threads it owns, use `resolveResourceId` to assign a different owner to the mapped thread. Pass `threadId: thread.id` so the session opens on the mapped thread. Without it, a session that has tags or a `projectPath` doesn't treat the mapped thread as its own, so it creates an extra empty thread before switching to the mapped one. Sessions are get-or-create for each `resourceId` and `scope` combination. Pass `scope` when one thread needs separate sessions for each installation or principal.
440
+ Create the session under `thread.resourceId`. Because a session can bind only threads it owns, use `resolveResourceId` to assign a different owner to the mapped thread. Pass `threadId: thread.id` so the session opens on the mapped thread. Without it, a session that has tags or a `projectPath` doesn't treat the mapped thread as its own, so it creates an extra empty thread before switching to the mapped one. Sessions are get-or-create by `id`. Give each installation or principal its own `id` when one thread needs separate sessions.
444
441
 
445
442
  Failures that aren't refusals (a storage outage, a bug in your resolver's dependencies) still post an error to the thread, so a broken bot doesn't look like a silent one. If you need to tell them apart in your own code, a refusal is a `ChannelSessionRejectedError` with the original error as its `cause`.
446
443
 
@@ -490,7 +487,7 @@ Subscriptions are isolated by Session. Events from another Session on the same c
490
487
 
491
488
  ### Client-side sessions
492
489
 
493
- [`client.getAgentController(key).session(resourceId, scope?)`](https://mastra.ai/reference/client-js/agent-controller) returns a session client bound to one resource. Pass the key the controller is registered under in `new Mastra({ agentControllers })`, which can differ from the controller's `id`. Sessions are get-or-create on the server, so `create()` resumes an existing conversation instead of forking it. Pass `scope` when one resource needs independent sessions, such as one per git worktree:
490
+ [`client.getAgentController(key).session(sessionId)`](https://mastra.ai/reference/client-js/agent-controller) returns a session client addressed by its session id. Pass the key the controller is registered under in `new Mastra({ agentControllers })`, which can differ from the controller's `id`. Sessions are get-or-create on the server, so `create()` resumes an existing conversation instead of forking it. Pass `resourceId` to `create()` when several sessions share one resource; otherwise the resource defaults to the session id:
494
491
 
495
492
  ```typescript
496
493
  import { MastraClient } from '@mastra/client-js'
@@ -513,7 +510,7 @@ const subscription = await session.subscribe({
513
510
  subscription.unsubscribe()
514
511
  ```
515
512
 
516
- `subscribe()` takes an options object and is async, unlike the in-process listener. Its promise resolves once the stream is established and rejects when it can't connect. A rejected call leaves nothing running in the background. `reconnect: true` re-establishes a stream that drops after it was established, with exponential backoff. A connection that goes silent without closing, for example after the device sleeps, counts as a drop once no data, including server heartbeats, arrives for `idleTimeoutMs` (default `60000`).
513
+ `subscribe()` takes an options object and is async, unlike the in-process listener. Its promise resolves once the stream is established and rejects when it can't connect. A rejected call leaves nothing running in the background. `reconnect: true` re-establishes a stream that drops after it was established, with exponential backoff. A connection that stays open but stops delivering data, for example after the device sleeps, counts as a drop once no data, including server heartbeats, arrives for `idleTimeoutMs` (default `60000`).
517
514
 
518
515
  The server doesn't replay events missed while the stream was down, so read `session.state()` from `onReconnect` for the current mode, model, and thread. The client surface has no `session.displayState.get()`.
519
516
 
@@ -85,7 +85,7 @@ import { Agent } from '@mastra/core/agent'
85
85
  export const researcher = new Agent({
86
86
  id: 'researcher',
87
87
  instructions: 'You research topics and answer questions.',
88
- model: 'openai/gpt-5.6-sol',
88
+ model: 'openai/gpt-6.1-sol',
89
89
  tools: { researchTool, summarizeTool },
90
90
  backgroundTasks: {
91
91
  tools: {
@@ -176,6 +176,17 @@ const stream = await agent.stream('Research solana for me', {
176
176
 
177
177
  Visit [`Agent.stream()`](https://mastra.ai/reference/streaming/agents/stream) for the full API.
178
178
 
179
+ To change the default for every `untilIdle: true` call, including calls Mastra makes internally, set `untilIdleMaxIdleMs` on the Mastra `backgroundTasks` config. Use a value longer than your slowest background task so its completion still triggers a continuation turn. A per-call `maxIdleMs` still takes precedence:
180
+
181
+ ```typescript
182
+ export const mastra = new Mastra({
183
+ backgroundTasks: {
184
+ enabled: true,
185
+ untilIdleMaxIdleMs: 30 * 60_000,
186
+ },
187
+ })
188
+ ```
189
+
179
190
  ### Aggregate properties
180
191
 
181
192
  `stream()` with `untilIdle` returns a `MastraModelOutput` that looks like the one from a regular `stream()` call, but `fullStream` alone spans the initial turn and any auto-continuations. Aggregate properties (`text`, `toolCalls`, `toolResults`, `finishReason`, `messageList`, `getFullOutput()`) still resolve against the **first turn's** internal buffer. If you need an aggregate view across continuations, consume `fullStream` yourself and accumulate.
@@ -190,7 +201,7 @@ import { Agent } from '@mastra/core/agent'
190
201
  const supervisor = new Agent({
191
202
  id: 'supervisor',
192
203
  instructions: 'Coordinate research and writing using the available agents.',
193
- model: 'openai/gpt-5.6-sol',
204
+ model: 'openai/gpt-6.1-sol',
194
205
  agents: { researchAgent, writingAgent },
195
206
  backgroundTasks: {
196
207
  tools: {
@@ -216,7 +227,7 @@ The background config used for the inherited dispatch (for example `waitTimeoutM
216
227
  const researchAgent = new Agent({
217
228
  id: 'research-agent',
218
229
  description: 'Gathers factual information.',
219
- model: 'openai/gpt-5-mini',
230
+ model: 'openai/gpt-6-luna',
220
231
  tools: { deepResearchTool },
221
232
  backgroundTasks: {
222
233
  tools: {
@@ -33,7 +33,7 @@ const agent = new Agent({
33
33
  id: 'researcher',
34
34
  name: 'Researcher',
35
35
  instructions: 'You research topics thoroughly.',
36
- model: 'openai/gpt-5.6-sol',
36
+ model: 'openai/gpt-6.1-sol',
37
37
  })
38
38
 
39
39
  export const durableResearcher = createDurableAgent({ agent })
@@ -97,7 +97,7 @@ import { createDurableAgent } from '@mastra/core/agent/durable'
97
97
  const agent = new Agent({
98
98
  id: 'helper',
99
99
  instructions: 'You are a helpful assistant.',
100
- model: 'openai/gpt-5.6-sol',
100
+ model: 'openai/gpt-6.1-sol',
101
101
  })
102
102
 
103
103
  export const durableHelper = createDurableAgent({ agent })
@@ -114,7 +114,7 @@ import { createEventedAgent } from '@mastra/core/agent/durable'
114
114
  const agent = new Agent({
115
115
  id: 'writer',
116
116
  instructions: 'You write articles.',
117
- model: 'openai/gpt-5.6-sol',
117
+ model: 'openai/gpt-6.1-sol',
118
118
  })
119
119
 
120
120
  export const eventedWriter = createEventedAgent({ agent })
@@ -129,7 +129,7 @@ await mastraClient.createStoredAgent({
129
129
  id: 'helper',
130
130
  name: 'Helper',
131
131
  instructions: 'You are a helpful assistant.',
132
- model: { provider: 'openai', name: 'gpt-5' },
132
+ model: { provider: 'openai', name: 'gpt-5.6' },
133
133
  durable: true,
134
134
  })
135
135
  ```
@@ -150,7 +150,7 @@ const inngest = new Inngest({ id: 'my-app' })
150
150
  const agent = new Agent({
151
151
  id: 'analyst',
152
152
  instructions: 'You analyze data.',
153
- model: 'openai/gpt-5.6-sol',
153
+ model: 'openai/gpt-6.1-sol',
154
154
  })
155
155
 
156
156
  export const inngestAnalyst = createInngestAgent({ agent, inngest })
@@ -170,7 +170,11 @@ for await (const chunk of output.fullStream) {
170
170
  }
171
171
  ```
172
172
 
173
- Calling `observe(runId)` without an offset is the supported general reconnect flow. It replays all available cached events before delivering live events. The optional `offset` is an inclusive, zero-based PubSub event index, not a chunk number, and the public stream doesn't expose it. If an offset skips earlier text deltas, aggregated text is partial and structured output may be invalid. On transports with numeric offset support, an offset beyond the highest retained index also skips live events with lower indexes. Events arrive only when the published index reaches the requested offset. If the index counter restarts below that offset and never reaches it, observation remains pending indefinitely. See [`observe(runId, options?)`](https://mastra.ai/reference/agents/durable-agent) for the full offset and transport behavior.
173
+ Calling `observe(runId)` without an offset is the supported general reconnect flow. It replays all available cached events before delivering live events. For a completed run, observation replays the retained events and closes. If the run is unknown or its history has been cleared and no live run remains, observation closes without events. The HTTP observe endpoint returns an empty, closed stream in this case rather than waiting for its idle timeout.
174
+
175
+ The optional `offset` is an inclusive, zero-based PubSub event index, not a chunk number, and the public stream doesn't expose it. If an offset skips earlier text deltas, aggregated text is partial and structured output may be invalid. On transports with numeric offset support, an offset beyond the highest retained index also skips live events with lower indexes. A live run waits for the published index to reach the requested offset. A completed run with a retained terminal event closes even when the offset skips every event. See [`observe(runId, options?)`](https://mastra.ai/reference/agents/durable-agent) for the full offset and transport behavior.
176
+
177
+ Replay isn't a permanent execution archive. Events remain available only until [cleanup](#cleanup) clears them or the cache removes them. A workflow snapshot can't reconstruct cleared stream events, and disabling caching prevents historical replay.
174
178
 
175
179
  Observing doesn't own the run. When the loop ends, or you leave it early with `break`, `return`, or an error, the observer unsubscribes and the run keeps going for anyone else watching it. To stop observing from outside the loop, for example when the client disconnects, call `detach()`:
176
180
 
@@ -188,7 +192,7 @@ for await (const chunk of output.fullStream) {
188
192
 
189
193
  If you pass `idleTimeoutMs` and no chunks arrive for that long, Mastra checks `isAlive` when you provide it. If `isAlive` returns `true` or throws, the timer restarts and the stream stays open. Otherwise the stream ends with an error chunk and detaches the observer. The run itself is only cleaned up when `isAlive` returns `false`.
190
194
 
191
- `createDurableAgent()` and `createEventedAgent()` use an in-memory cache by default, which means resumable streams work within a single process. For production, provide a persistent cache backend (e.g., Redis) so cached events survive process restarts:
195
+ `createDurableAgent()` and `createEventedAgent()` use an in-memory cache by default, which means resumable streams work within a single process. For reconnects across processes or replicas, share the replay cache, PubSub transport, and run storage between the producer and observer. A shared transport delivers live events but can't recover events held only in another process's cache. Configure a persistent cache backend (for example, Redis) so retained events survive process restarts:
192
196
 
193
197
  ```typescript
194
198
  import { createDurableAgent } from '@mastra/core/agent/durable'
@@ -249,7 +253,7 @@ Visit [Background tasks](https://mastra.ai/docs/harness/background-tasks) for th
249
253
 
250
254
  Every `stream()` and `observe()` call returns a `cleanup` function that tears the run down: it unsubscribes from PubSub, removes the run from the internal registry, and deletes the run's cached events so nobody can replay it afterward.
251
255
 
252
- When you don't call `cleanup()` yourself, Mastra calls it `cleanupTimeoutMs` after the run finishes, errors, or is aborted. Detaching an observer or reaching a plain `idleTimeoutMs` doesn't start this timer. Set `cleanupTimeoutMs: 0` to turn the timer off.
256
+ When you don't call `cleanup()` yourself, Mastra calls it `cleanupTimeoutMs` after the run finishes, errors, or is aborted. The default is 30 seconds, so completed-run replay is limited to that window unless you configure a different value or call `cleanup()` sooner. Detaching an observer or reaching a plain `idleTimeoutMs` doesn't start this timer. Set `cleanupTimeoutMs: 0` to turn the timer off.
253
257
 
254
258
  Call `cleanup()` from the process that started the run. To stop watching a run from `observe()`, use `detach()` or leave the loop instead.
255
259
 
@@ -320,7 +324,9 @@ export const mastra = new Mastra({
320
324
 
321
325
  On startup, this discovers every registered durable agent with runs stuck in `running` status and re-drives them from the last persisted snapshot.
322
326
 
323
- Recovery attempts runs serially, waiting up to 30 seconds per run for both `recover()` setup and settlement of the whole recovered workflow. If that wait expires, the attempt continues in the background while recovery moves to later runs and agents. Discovery and overridden custom recovery methods aren't bounded by this budget.
327
+ Recovery processes up to five agents concurrently, with up to five run waits per agent. Each wait covers both `recover()` setup and settlement of the whole recovered workflow and lasts at most 30 seconds. If it expires, the attempt continues in the background and frees a slot for another run. These limits bound waiting, not the number of live executions. Discovery and overridden custom recovery methods aren't bounded by this budget.
328
+
329
+ Timed-out runs carry `retryAt` and are checked again automatically. Re-checks defer until the original attempt settles, so they don't start duplicate executions. After it settles, recovery checks the persisted snapshot and ownership before retrying. Finished or suspended runs aren't restarted.
324
330
 
325
331
  When shutdown begins, recovery stops dispatching new runs and agents and cancels pending re-checks. Original attempts, including those whose wait timed out, remain tracked for Mastra's shared shutdown drain. A recovery timeout doesn't cancel execution or add a separate drain window.
326
332
 
@@ -33,10 +33,10 @@ const worker = new Agent({
33
33
  id: 'worker',
34
34
  name: 'worker',
35
35
  instructions: 'You complete software tasks end to end.',
36
- model: 'openai/gpt-5.6-sol',
36
+ model: 'openai/gpt-6.1-sol',
37
37
  memory,
38
38
  goal: {
39
- judge: 'openai/gpt-5-mini',
39
+ judge: 'openai/gpt-6-luna',
40
40
  maxRuns: 50,
41
41
  },
42
42
  })
@@ -91,7 +91,7 @@ const worker = new Agent({
91
91
  id: 'worker',
92
92
  name: 'worker',
93
93
  instructions: 'You complete software tasks end to end.',
94
- model: 'openai/gpt-5.6-sol',
94
+ model: 'openai/gpt-6.1-sol',
95
95
  memory,
96
96
  goal: {
97
97
  // A resolver function lets you inject provider credentials and read the
@@ -108,7 +108,7 @@ To hand the decision to your own scorer, pass it as `scorer` and keep `judge` se
108
108
 
109
109
  ```typescript
110
110
  goal: {
111
- judge: 'openai/gpt-5-mini',
111
+ judge: 'openai/gpt-6-luna',
112
112
  // Replaces the built-in judge pipeline. `prompt`, `tools`, and `maxSteps` no longer apply.
113
113
  scorer: 'tests-pass',
114
114
  }
@@ -137,6 +137,6 @@ Per-objective values written by `setObjective` / `updateObjectiveOptions` take p
137
137
  ## Related
138
138
 
139
139
  - [Supervisor agents](https://mastra.ai/docs/subagents): `isTaskComplete` and the rubric scorer
140
- - [Signal providers](https://mastra.ai/docs/harness/signal-providers): How the objective is projected into context
140
+ - [Signal providers](https://mastra.ai/docs/signals/signal-providers): How the objective is projected into context
141
141
  - [Memory storage](https://mastra.ai/docs/storage): The storage backend goals require
142
142
  - [Mastra Factory](https://factory.mastra.ai) and [Mastra Code](https://code.mastra.ai): Examples of goal-driven coding agents
@@ -20,7 +20,7 @@ Choose a starting point based on what the agent needs. You may use one capabilit
20
20
  | Run slow tools, workflows, or subagents without blocking | [Background Tasks](https://mastra.ai/docs/harness/background-tasks) | Finish work asynchronously and return its result to the agent. |
21
21
  | Keep an agent working until it reaches an objective | [Goals](https://mastra.ai/docs/harness/goals) | Evaluate a thread-scoped objective until it's complete or reaches its run budget. |
22
22
  | Start work automatically at recurring times | [Schedules](https://mastra.ai/docs/harness/schedules) | Start isolated runs or send prompts into an existing thread on a cron schedule. |
23
- | Add context, redirect active work, or wake an idle thread | [Signals](https://mastra.ai/docs/harness/signals) | Deliver input now or hold it for the next turn. |
24
- | React to changes in GitHub, Slack, continuous integration, or another external system | [Signal Providers](https://mastra.ai/docs/harness/signal-providers) | Track subscriptions and forward matching events to agent threads. |
23
+ | Add context, redirect active work, or wake an idle thread | [Signals](https://mastra.ai/docs/signals/overview) | Deliver input now or hold it for the next turn. |
24
+ | React to changes in GitHub, Slack, continuous integration, or another external system | [Signal Providers](https://mastra.ai/docs/signals/signal-providers) | Track subscriptions and forward matching events to agent threads. |
25
25
  | Build an interactive product with sessions, modes, state, approvals, and events, or let users steer, queue follow-up work, and stop a run | [AgentController](https://mastra.ai/docs/harness/agent-controller) | Host isolated sessions around a shared agent runtime, each with its own run controls. |
26
26
  | Give an agent files, a shell, and the defaults a coding agent needs | [`createCodingAgent()`](https://mastra.ai/reference/coding-agent/create-coding-agent) | Build a standard agent with a workspace, task tracking, and retries already configured. |
@@ -6,7 +6,7 @@
6
6
 
7
7
  **Added in:** `@mastra/core@1.50.0`
8
8
 
9
- A schedule runs an agent on a cron cadence. On each fire, Mastra sends a prompt either as a [signal](https://mastra.ai/docs/harness/signals) into a thread or as a threadless [`agent.generate()`](https://mastra.ai/reference/agents/generate) run. Use schedules for recurring work such as daily summaries and periodic checks, including scheduled nudges into a conversation.
9
+ A schedule runs an agent on a cron cadence. On each fire, Mastra sends a prompt either as a [signal](https://mastra.ai/docs/signals/sending-signals) into a thread or as a threadless [`agent.generate()`](https://mastra.ai/reference/agents/generate) run. Use schedules for recurring work such as daily summaries and periodic checks, including scheduled nudges into a conversation.
10
10
 
11
11
  Schedules are persisted, so they survive restarts and redeploys. Manage them at runtime through [`mastra.schedules`](https://mastra.ai/reference/schedules/overview), the canonical create, read, update, and delete (CRUD) surface. The same surface also manages [workflow schedules](https://mastra.ai/docs/workflows/scheduled-workflows) (pass `workflowId` instead of `agentId` to schedule a workflow).
12
12
 
@@ -25,7 +25,7 @@ const pinger = new Agent({
25
25
  id: 'pinger',
26
26
  name: 'Pinger',
27
27
  instructions: 'Report the current system status in one sentence.',
28
- model: 'openai/gpt-5.6-sol',
28
+ model: 'openai/gpt-6.1-sol',
29
29
  })
30
30
 
31
31
  const mastra = new Mastra({
@@ -71,7 +71,7 @@ Without a `threadId`, each fire is an isolated `agent.generate()` run. Nothing i
71
71
 
72
72
  ### Threaded
73
73
 
74
- With a `threadId`, the schedule sends a [signal](https://mastra.ai/docs/harness/signals) into that thread. The prompt joins the agent's conversation. Threaded schedules require a `resourceId` alongside the `threadId`.
74
+ With a `threadId`, the schedule sends a [signal](https://mastra.ai/docs/signals/sending-signals) into that thread. The prompt joins the agent's conversation. Threaded schedules require a `resourceId` alongside the `threadId`.
75
75
 
76
76
  ```typescript
77
77
  await mastra.schedules.create({
@@ -83,7 +83,7 @@ await mastra.schedules.create({
83
83
  })
84
84
  ```
85
85
 
86
- Threaded schedules accept extra fields that control how the signal behaves, including the signal type, XML tag, tag attributes, and active-or-idle delivery behavior. They mirror the options [`agent.sendSignal()`](https://mastra.ai/docs/harness/signals) accepts and stay JSON-serializable so they persist with the schedule.
86
+ Threaded schedules accept extra fields that control how the signal behaves, including the signal type, XML tag, tag attributes, and active-or-idle delivery behavior. They mirror the options [`agent.sendSignal()`](https://mastra.ai/docs/signals/sending-signals) accepts and stay JSON-serializable so they persist with the schedule.
87
87
 
88
88
  These fields require a `threadId`. For the full threaded input shape, see the [agent schedule input reference](https://mastra.ai/reference/schedules/overview).
89
89
 
@@ -171,13 +171,13 @@ const mastra = new Mastra({
171
171
  return { prompt: `Status as of ${trigger.firedAt.toISOString()}` }
172
172
  },
173
173
  onFinish: async ({ agentId, outcome, runId }) => {
174
- // Runs on any non-error, non-abort outcome
174
+ // Runs on any non-error, non-abort outcome. For a threaded schedule, this is the hand-off, not the end of the run
175
175
  },
176
176
  onError: async ({ agentId, phase, error }) => {
177
- // Runs when prepare, the signal, or the agent run threw
177
+ // Runs when prepare or the signal threw, or a threadless run failed without aborting
178
178
  },
179
179
  onAbort: async ({ agentId, runId }) => {
180
- // Runs when the run was aborted mid-stream
180
+ // Runs when a threadless run was aborted
181
181
  },
182
182
  },
183
183
  })
@@ -186,9 +186,11 @@ const mastra = new Mastra({
186
186
  The hooks are:
187
187
 
188
188
  - `prepare`: runs before the fire. Return an object to override fire-time parameters such as `prompt` or `threadId`, `null` to skip the fire, or `undefined` to use the stored defaults.
189
- - `onFinish`: runs once per trigger that reached a non-error, non-abort terminal state.
190
- - `onError`: runs after a failure in `prepare` or the signal. It also runs when the agent run fails.
191
- - `onAbort`: runs when the run was aborted mid-stream.
189
+ - `onFinish`: runs once per trigger that reached a non-error, non-abort outcome. When a threaded schedule starts a new run, it runs with `outcome: 'succeeded'` as soon as the run starts, not when it finishes.
190
+ - `onError`: runs after a failure in `prepare` or the signal. For a schedule without a `threadId`, it also runs when the agent run fails with an error that isn't an abort.
191
+ - `onAbort`: runs when the run of a schedule without a `threadId` was aborted.
192
+
193
+ For a schedule with a `threadId`, the worker sends the prompt to the thread and doesn't wait for the run. Errors and aborts after the run starts surface on that thread's run, not through `onError` or `onAbort`.
192
194
 
193
195
  Every hook context includes `agentId` (the agent the schedule fired for) alongside `schedule` and `trigger`.
194
196
 
@@ -224,5 +226,5 @@ Turning on **Experimental schedule tools** in `/settings` (restart required) giv
224
226
  ## Related
225
227
 
226
228
  - [`mastra.schedules`](https://mastra.ai/reference/schedules/overview): API reference for creating and managing schedules.
227
- - [Signals](https://mastra.ai/docs/harness/signals): the delivery mechanism behind threaded schedules.
229
+ - [Signals](https://mastra.ai/docs/signals/sending-signals): the delivery mechanism behind threaded schedules.
228
230
  - [Scheduled workflows](https://mastra.ai/docs/workflows/scheduled-workflows): declare a cron schedule on a workflow definition.