@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
@@ -21,7 +21,7 @@ const agent = new Agent({
21
21
  id: 'coding-agent',
22
22
  name: 'Coding agent',
23
23
  instructions: 'Help with software engineering tasks.',
24
- model: 'anthropic/claude-sonnet-4-6',
24
+ model: 'anthropic/claude-sonnet-5-5',
25
25
  })
26
26
 
27
27
  const controller = new AgentController({
@@ -172,27 +172,25 @@ A message lifecycle starts with the initial message in `message_start`. Compact
172
172
 
173
173
  #### `createSession(options)`
174
174
 
175
- Get or create the live session registered for the `(resourceId, scope)` pair. Call `init()` before this method.
175
+ Get or create the live session registered under `id`. Call `init()` before this method.
176
176
 
177
177
  ```typescript
178
178
  const session = await controller.createSession({
179
+ id: 'run-a',
179
180
  resourceId: 'project-42',
180
- scope: 'editor-window-1',
181
181
  threadId: 'thread-7',
182
182
  })
183
183
  ```
184
184
 
185
- The same `resourceId` and `scope` return the same `Session` instance. A different scope creates an isolated session for the same resource. When `threadId` is supplied, the method switches a cached session to that thread or creates the thread when it doesn't exist.
185
+ The same `id` returns the same `Session` instance. Sessions with different ids are independent even when they share a `resourceId`: each has its own run loop, thread binding, mode, model, and state, while their stored threads and resource-scoped memory belong to the shared resource. When `id` is omitted, it defaults to `resourceId`, so one session per resource needs no id. When `threadId` is supplied, the method switches a cached session to that thread or creates the thread when it doesn't exist.
186
186
 
187
- **resourceId** (`string`): Memory resource and live-session registry key. Defaults to the configured resourceId or controller id.
188
-
189
- **scope** (`string`): Optional registry namespace that allows multiple live sessions for one resource.
187
+ **resourceId** (`string`): Memory resource that owns the session's threads and resource-scoped memory. Defaults to the configured resourceId or controller id.
190
188
 
191
189
  **threadId** (`string`): Exact thread to bind. Missing threads are created with this identifier.
192
190
 
193
191
  **createInitialThread** (`boolean`): Create a thread when no existing thread matches. Set false to start the session without a thread; the first message or session.thread.ensureId() creates it, so unused sessions leave no empty thread behind. (Default: `true`)
194
192
 
195
- **id** (`string`): Stable session identifier. Defaults to the controller id.
193
+ **id** (`string`): Session identifier and live-session registry key. Defaults to resourceId.
196
194
 
197
195
  **ownerId** (`string`): Stable identity of the process-local Session host. Defaults to id. New threads use it as their initial owner, but later transfers do not change this value.
198
196
 
@@ -206,12 +204,12 @@ The same `resourceId` and `scope` return the same `Session` instance. A differen
206
204
 
207
205
  Returns: `Promise<Session<TState>>`
208
206
 
209
- #### `getSessionByResource(resourceId, scope?)`
207
+ #### `getSession(sessionId, requestContext?)`
210
208
 
211
- Return the live session registered for a resource and optional scope.
209
+ Return the live session registered under `sessionId`, or `undefined` when none is live.
212
210
 
213
211
  ```typescript
214
- const session = await controller.getSessionByResource('project-42', 'editor-window-1')
212
+ const session = await controller.getSession('run-a')
215
213
  ```
216
214
 
217
215
  Returns: `Promise<Session<TState> | undefined>`
@@ -220,7 +218,7 @@ Returns: `Promise<Session<TState> | undefined>`
220
218
 
221
219
  Subscribe to process-local notifications after `createSession()` materializes a new live session, with isolated listener errors prevented from affecting other listeners. Call the returned function to unsubscribe.
222
220
 
223
- By default listeners are fire-and-forget. Pass `{ blocking: true }` to make `createSession()` await the listener before resolving the new session, so the host can prepare session state before the caller can start a run. Blocking listeners run sequentially in registration order, before fire-and-forget listeners are notified. A blocking listener must not call `createSession()` for the same `(resourceId, scope)` pair. That call would await its own hydration and deadlock.
221
+ By default listeners are fire-and-forget. Pass `{ blocking: true }` to make `createSession()` await the listener before resolving the new session, so the host can prepare session state before the caller can start a run. Blocking listeners run sequentially in registration order, before fire-and-forget listeners are notified. A blocking listener must not call `createSession()` for the same session `id`. That call would await its own hydration and deadlock.
224
222
 
225
223
  ```typescript
226
224
  const unsubscribe = controller.onSessionCreated(
@@ -251,7 +249,7 @@ const unsubscribe = controller.onSessionDeleted(session => {
251
249
  })
252
250
 
253
251
  await controller.createSession({ resourceId: 'project-42' })
254
- await controller.deleteSession({ resourceId: 'project-42' })
252
+ await controller.deleteSession({ sessionId: 'project-42' })
255
253
  unsubscribe()
256
254
  ```
257
255
 
@@ -259,22 +257,19 @@ This listener is best-effort and runs only in the current process. It isn't a pe
259
257
 
260
258
  Returns: `() => void`
261
259
 
262
- #### `deleteSession({ resourceId, scope? })`
260
+ #### `deleteSession({ sessionId })`
263
261
 
264
- Tear down the materialized session for a resource and optional scope. The method aborts active work, then removes thread subscriptions, the active thread lock, and the live session from the controller registry. It doesn't delete persisted threads or messages.
262
+ Tear down the materialized session registered under `sessionId`. The method aborts active work, then removes thread subscriptions, the active thread lock, and the live session from the controller registry. It doesn't delete persisted threads or messages.
265
263
 
266
264
  ```typescript
267
- const deleted = await controller.deleteSession({
268
- resourceId: 'project-42',
269
- scope: 'editor-window-1',
270
- })
265
+ const deleted = await controller.deleteSession({ sessionId: 'run-a' })
271
266
  ```
272
267
 
273
- Returns: `Promise<boolean>`. The result is `true` when a live session was removed and `false` when no matching live session exists or when another deletion is already in progress for the same resource and scope.
268
+ Returns: `Promise<boolean>`. The result is `true` when a live session was removed and `false` when no matching live session exists or when another deletion is already in progress for the same session.
274
269
 
275
270
  #### `setResourceId(session, { resourceId })`
276
271
 
277
- Move a live session to another resource and clear its active thread binding.
272
+ Move a live session to another resource and clear its active thread binding. The session stays registered under its id.
278
273
 
279
274
  ```typescript
280
275
  await controller.setResourceId(session, { resourceId: 'project-43' })
@@ -353,12 +348,12 @@ Returns: `Promise<StorageListMessagesOutput>` with controller-format messages.
353
348
 
354
349
  #### `generateThreadTitle(options)`
355
350
 
356
- Generate and store a title from a thread's conversation without creating a Session. `threadId` is required. `resourceId`, `scope`, `model`, and `requestContext` are optional. The method throws when the thread doesn't exist and returns `undefined` when the model produces no title.
351
+ Generate and store a title from a thread's conversation without creating a Session. `threadId` is required. `sessionId`, `model`, and `requestContext` are optional; pass `sessionId` to borrow a live session's agent and request context. The method throws when the thread doesn't exist and returns `undefined` when the model produces no title.
357
352
 
358
353
  ```typescript
359
354
  const title = await controller.generateThreadTitle({
360
355
  threadId: 'thread-7',
361
- resourceId: 'project-42',
356
+ sessionId: 'run-a',
362
357
  })
363
358
  ```
364
359
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # Session
6
6
 
7
- A `Session` is the isolated runtime for one resource and optional scope. It owns its event bus, thread binding, state, mode and model selections, run control, approvals, suspensions, follow-ups, and display state. The [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class) supplies shared agents, configuration, storage, workspaces, and services.
7
+ A `Session` is the isolated runtime registered under one session id. Several sessions can share a resource, which owns their stored threads and resource-scoped memory. It owns its event bus, thread binding, state, mode and model selections, run control, approvals, suspensions, follow-ups, and display state. The [`AgentController`](https://mastra.ai/reference/agent-controller/agent-controller-class) supplies shared agents, configuration, storage, workspaces, and services.
8
8
 
9
9
  Create sessions through `controller.createSession()`. Direct construction and controller wiring methods aren't application APIs.
10
10
 
@@ -164,7 +164,7 @@ session.abort()
164
164
 
165
165
  #### `getWorkspace()`
166
166
 
167
- Return the workspace resolved for this session. This preserves session-level overrides and workspaces selected from the session scope.
167
+ Return the workspace resolved for this session. This preserves session-level overrides.
168
168
 
169
169
  A workspace is optional. When neither the session nor the `AgentController` configures one, the session still runs without filesystem or sandbox access, and this returns `undefined`. Check the result before using it.
170
170
 
@@ -573,7 +573,7 @@ if (session.model.hasSelection()) {
573
573
  Set the active model in memory without persisting it, reporting model use, or emitting a `model_changed` event.
574
574
 
575
575
  ```typescript
576
- session.model.set({ modelId: 'anthropic/claude-sonnet-4-6' })
576
+ session.model.set({ modelId: 'anthropic/claude-sonnet-5-5' })
577
577
  ```
578
578
 
579
579
  ### `session.model.switch(modelId, options?)`
@@ -583,7 +583,7 @@ Switch the session's active model. The model ID is persisted as the thread's `cu
583
583
  Pass `{ thinkingLevel }` as the second argument to switch and persist both values in one operation. The level must be `'off'`, `'low'`, `'medium'`, `'high'`, `'xhigh'`, or `'max'`, and the controller's state schema must accept it. Both live values are updated before events are emitted. Omitting the option preserves the existing thinking-level override. Every `model_changed` event includes the current `{ modelId, thinkingLevel }`, even when the thinking level is unchanged. The level is `undefined` when the session has no override.
584
584
 
585
585
  ```typescript
586
- await session.model.switch('anthropic/claude-sonnet-4-6', {
586
+ await session.model.switch('anthropic/claude-sonnet-5-5', {
587
587
  thinkingLevel: 'high',
588
588
  })
589
589
  ```
@@ -632,7 +632,7 @@ Switch one role between automatic and explicit selection. Pass `'auto'` to follo
632
632
  ```typescript
633
633
  await session.om.observer.switchModel({ modelId: 'auto' })
634
634
  await session.om.reflector.switchModel({
635
- modelId: 'anthropic/claude-haiku-4-5',
635
+ modelId: 'anthropic/claude-haiku-5-5',
636
636
  })
637
637
  ```
638
638
 
@@ -692,11 +692,11 @@ Set the subagent model ID. Pass an `agentType` to set a per-type override, or om
692
692
 
693
693
  ```typescript
694
694
  // Set the global subagent model
695
- await session.subagents.model.set({ modelId: 'anthropic/claude-sonnet-4-6' })
695
+ await session.subagents.model.set({ modelId: 'anthropic/claude-sonnet-5-5' })
696
696
 
697
697
  // Set a per-type override
698
698
  await session.subagents.model.set({
699
- modelId: 'anthropic/claude-haiku-4-5',
699
+ modelId: 'anthropic/claude-haiku-5-5',
700
700
  agentType: 'explore',
701
701
  })
702
702
  ```
@@ -838,7 +838,7 @@ Thread-owned preferences include thinking level, observational memory settings,
838
838
 
839
839
  A queued write keeps its source thread through asynchronous updates and validation. Switching from A to B while a write is pending doesn't apply A's preferences to B. Host-field updates still affect the host. A retained run and the active view of the same thread share update ordering. A resumed run sees edits made while it was parked. Events without a source address that affect the conversation display are emitted only while that source is active.
840
840
 
841
- Inside a tool's controller request context, `state` is a snapshot taken when the context was built. Use `getState()` or `session.state.get()` to read the latest source-thread state after a write.
841
+ Inside a tool's controller request context, `sessionId`, `resourceId`, and `threadId` identify the session, its resource, and its active thread. `state` is a snapshot taken when the context was built. Use `getState()` or `session.state.get()` to read the latest source-thread state after a write.
842
842
 
843
843
  ### `session.state.get()`
844
844
 
@@ -20,7 +20,7 @@ export const agent = new Agent({
20
20
  id: 'test-agent',
21
21
  name: 'Test Agent',
22
22
  instructions: 'You are a helpful assistant that provides concise answers.',
23
- model: 'openai/gpt-5.6-sol',
23
+ model: 'openai/gpt-6.1-sol',
24
24
  })
25
25
 
26
26
  // System message object
@@ -31,7 +31,7 @@ export const agent2 = new Agent({
31
31
  role: 'system',
32
32
  content: 'You are an expert programmer',
33
33
  },
34
- model: 'openai/gpt-5.6-sol',
34
+ model: 'openai/gpt-6.1-sol',
35
35
  })
36
36
 
37
37
  // Array of system messages
@@ -42,7 +42,7 @@ export const agent3 = new Agent({
42
42
  { role: 'system', content: 'You are a helpful assistant' },
43
43
  { role: 'system', content: 'You have expertise in TypeScript' },
44
44
  ],
45
- model: 'openai/gpt-5.6-sol',
45
+ model: 'openai/gpt-6.1-sol',
46
46
  })
47
47
  ```
48
48
 
@@ -65,7 +65,7 @@ export const agent = new Agent({
65
65
  },
66
66
  },
67
67
  },
68
- model: 'openai/gpt-5.6-sol',
68
+ model: 'openai/gpt-6.1-sol',
69
69
  })
70
70
  ```
71
71
 
@@ -94,7 +94,7 @@ export const agent = new Agent({
94
94
  },
95
95
  },
96
96
  ],
97
- model: 'anthropic/claude-sonnet-4-6',
97
+ model: 'anthropic/claude-sonnet-5-5',
98
98
  })
99
99
  ```
100
100
 
@@ -104,9 +104,9 @@ For the simplest setup, pass `model` as a string in `provider/model` format. Sep
104
104
 
105
105
  Popular provider strings and credentials:
106
106
 
107
- - **OpenAI**: `openai/gpt-5.6-sol` uses `OPENAI_API_KEY`.
108
- - **Anthropic**: `anthropic/claude-sonnet-4-6` uses `ANTHROPIC_API_KEY`.
109
- - **Google**: `google/gemini-2.5-pro` uses `GOOGLE_API_KEY` or `GOOGLE_GENERATIVE_AI_API_KEY`.
107
+ - **OpenAI**: `openai/gpt-6.1-sol` uses `OPENAI_API_KEY`.
108
+ - **Anthropic**: `anthropic/claude-sonnet-5-5` uses `ANTHROPIC_API_KEY`.
109
+ - **Google**: `google/gemini-3.8-flash` uses `GOOGLE_API_KEY` or `GOOGLE_GENERATIVE_AI_API_KEY`.
110
110
 
111
111
  See [models](https://mastra.ai/models) for supported model IDs and [environment variables](https://mastra.ai/models/environment-variables) for the complete provider list.
112
112
 
@@ -246,35 +246,7 @@ agent.queueMessage('Also check whether the tests need updates.', {
246
246
 
247
247
  `queueMessage()` accepts the same `message` and `options` shape as `sendMessage()` and returns `{ accepted: Promise<SendAgentSignalAccepted>, signal: CreatedAgentSignal, persisted?: Promise<void> }`, with the same `accepted` semantics as `sendMessage()`. Pass an optional `queueOwnerId` to group local queued messages for observation and cancellation. The owner ID is local metadata: it's neither serialized with the message nor an authorization mechanism.
248
248
 
249
- Use `subscribeThreadEvents({ resourceId, threadId }, listener)` to observe local thread events. Currently, Mastra emits only `queue-count-changed`, which reports all locally pending messages on the shared thread, including messages submitted by other Sessions or Agents using the same runtime and PubSub instance. The listener receives a synchronous baseline with the current local count, then updates only when its count changes. Its unsubscribe function is idempotent and doesn't cancel queued messages. Pass an optional `queueOwnerId` to restrict queue-count notifications to that owner's messages submitted by the calling Agent.
250
-
251
- ```typescript
252
- const scope = {
253
- resourceId: 'user-123',
254
- threadId: 'thread-abc',
255
- }
256
-
257
- const unsubscribe = agent.subscribeThreadEvents(scope, event => {
258
- if (event.type === 'queue-count-changed') {
259
- console.log(`${event.count} messages are pending`)
260
- }
261
- })
262
-
263
- agent.queueMessage('Review the failing test.', {
264
- ...scope,
265
- ifIdle: { streamOptions: { maxSteps: 3 } },
266
- })
267
-
268
- unsubscribe()
269
- ```
270
-
271
- `subscribeThreadEvents()` is distinct from `subscribeToThread()`, which streams agent output. It doesn't currently emit composite thread state, individual message lifecycle events, run events, or approval events. Mastra may add those as separate event types in the future.
272
-
273
- AgentController Sessions observe the shared thread count when they subscribe, even before submitting a follow-up. `session.steer()` aborts the current run before sending the new input, without clearing queued follow-ups. Session cleanup stops observation and cancels unfinished local preparation, but leaves submitted messages in the Agent queue.
274
-
275
- The count includes messages waiting in the local FIFO and a non-cancelled message while it acquires or transfers its lease. It drops at cancellation, execution handoff, forwarding to another owner, or failure, not when model generation completes. An idle `queueMessage()` handoff is immediate and isn't represented as a cancellable pending slot.
276
-
277
- Use [`cancelQueuedMessages()`](#cancelqueuedmessagesoptions) to cancel selected pending input or an owner group. Queue-count events count only entries in the queue shared by `queueMessage()` and `queueSignal()`, not signals waiting for delivery into an active run. Owner-scoped observation and cancellation match the calling Agent, its local runtime, resource, thread, and owner ID.
249
+ Use [`subscribeThreadEvents({ resourceId, threadId }, listener)`](https://mastra.ai/reference/signals/thread-events) to observe locally pending messages on the shared thread. The listener currently receives only `queue-count-changed` events. For subscription options, count semantics, unsubscribe behavior, and owner-scoped observation, see the [Thread events reference](https://mastra.ai/reference/signals/thread-events).
278
250
 
279
251
  ### `queueSignal(signal, options)`
280
252
 
@@ -325,7 +297,7 @@ For `signalIds`, Mastra publishes all requested IDs through PubSub, even when no
325
297
 
326
298
  Sends a signal to an active run or memory thread.
327
299
 
328
- **signal** (`{ type: 'user' | 'state' | 'reactive' | 'notification' | 'user-message' | 'system-reminder'; tagName?: string; contents: string | Array<TextPart | FilePart>; attributes?: Record<string, JSONValue>; metadata?: Record<string, unknown>; providerOptions?: ProviderMetadata }`): Signal context to send to the thread. type is the semantic signal category. tagName controls the XML tag the model sees. For example, { type: 'notification', tagName: 'github-review' } renders as \<github-review>...\</github-review>. Legacy user-message and system-reminder payloads are still accepted and normalized. Unknown type values are rejected; use tagName for custom XML tags.
300
+ **signal** (`{ type: 'user' | 'state' | 'reactive' | 'notification' | 'user-message' | 'system-reminder'; tagName?: string; contents: string | Array<TextPart | FilePart>; attributes?: Record<string, JSONValue>; metadata?: Record<string, unknown>; providerOptions?: ProviderMetadata; transient?: boolean }`): Signal context to send to the thread. type is the semantic signal category. tagName controls the XML tag the model sees. For example, { type: 'notification', tagName: 'github-review' } renders as \<github-review>...\</github-review>. tagName and attribute names must be XML-safe: letters, numbers, periods, hyphens, and underscores, starting with a letter or underscore. Set transient: true to deliver the signal to the current model request without storing it; transient signals are never stored, state signals cannot be transient, and combining transient with a persist behavior discards the signal. Legacy user-message and system-reminder payloads are still accepted and normalized. Unknown type values are rejected; use tagName for custom XML tags.
329
301
 
330
302
  **options** (`object`): Targeting and delivery behavior for the signal.
331
303
 
@@ -414,7 +386,7 @@ Returns `{ accepted: Promise<SendAgentSignalAccepted>, signal: CreatedAgentSigna
414
386
 
415
387
  ### `sendNotificationSignal(notification, options)`
416
388
 
417
- Creates or coalesces a notification inbox record and resolves the notification delivery policy. It sends a notification signal when the decision is immediate.
389
+ Creates or coalesces a notification inbox record and resolves the notification delivery policy. It sends a notification signal when the decision is immediate. For record fields, statuses, priorities, policy evaluation, and dispatch configuration, see the [Notifications reference](https://mastra.ai/reference/signals/notifications).
418
390
 
419
391
  ```typescript
420
392
  const result = await agent.sendNotificationSignal(
@@ -464,7 +436,7 @@ const result = await agent.sendNotificationSignal(
464
436
 
465
437
  Returns `{ record: NotificationRecord, decision: NotificationDeliveryDecision, runId?: string, signal?: CreatedAgentSignal, persisted?: Promise<void>, accepted?: Promise<SendAgentSignalAccepted> }`. `record` is the stored inbox record. `decision` is the delivery-policy result. `signal` and `runId` are present when ingress emits a signal immediately, including the immediate summary emitted for active high-priority notifications. `persisted` is present when the emitted signal is persisted without waking an idle thread. `accepted` is present when a signal is emitted and resolves at decision-time, once Mastra decides what to do with it: `{ action: 'wake', runId, output }` when this process runs the agent (it started or won the lease to start the run), `{ action: 'deliver', runId }` when the signal is forwarded onto an existing run, or `{ action: 'persist' }` / `{ action: 'discard' }` when nothing ran. `runId` on the accepted result is present only on `wake` and `deliver`. On the `wake` action, `output` is the agent stream for in-process consumption.
466
438
 
467
- Default delivery is priority-aware. `urgent` notifications deliver immediately. `high` notifications deliver immediately when the thread is idle. When the thread is active, Mastra emits a summary immediately and keeps `deliverAt` for later full delivery when the thread is idle. `medium` notifications deliver immediately when idle and batch into summaries when active. `low` notifications batch into summaries in both active and idle threads. Idle low-priority summaries reach subscribers without waking the model loop. For the full flow, visit [Signals](https://mastra.ai/docs/harness/signals).
439
+ Default delivery is priority-aware. `urgent` notifications deliver immediately. `high` notifications deliver immediately when the thread is idle. When the thread is active, Mastra emits a summary immediately and keeps `deliverAt` for later full delivery when the thread is idle. `medium` notifications deliver immediately when idle and batch into summaries when active. `low` notifications batch into summaries in both active and idle threads. Idle low-priority summaries reach subscribers without waking the model loop. For the full flow, visit [Signals](https://mastra.ai/docs/signals/notifications).
468
440
 
469
441
  Configure `notifications.deliveryPolicy` on the agent when some notifications should wait for a different dispatch window or summary rollup:
470
442
 
@@ -473,7 +445,7 @@ export const supportAgent = new Agent({
473
445
  id: 'support-agent',
474
446
  name: 'Support Agent',
475
447
  instructions: 'Help the user triage updates.',
476
- model: 'openai/gpt-5.6-sol',
448
+ model: 'openai/gpt-6.1-sol',
477
449
  notifications: {
478
450
  deliveryPolicy: {
479
451
  priorities: {
@@ -528,7 +500,7 @@ Subscribes to raw stream chunks for a memory thread. Use this before calling `se
528
500
 
529
501
  **options.hideSignals** (`boolean | AgentSignalType[]`): Use true to hide all recognized signals, false to show all, or an array to hide selected types from this subscription, including live, idle-persisted, and replayed signals. Other subscribers and the initiating stream keep their own policies.
530
502
 
531
- **options.withInitialHistory** (`boolean | { perPage?: number }`): Emit the stored thread messages as one thread-history chunk first, then only retained parts newer than that history, then live parts. Completed runs already in storage aren't replayed; pending tool approvals are still emitted. perPage limits how many recent messages are loaded (default 40). Requires agent memory; without it the subscription is live-only.
503
+ **options.withInitialHistory** (`boolean | { perPage?: number }`): Emit the stored thread messages as one thread-history chunk first, then only retained parts newer than that history, then live parts. Completed runs already in storage aren't replayed; pending tool approvals are still emitted. perPage limits how many recent messages are loaded (default 40). Without agent memory, or when the thread has no stored messages yet, the history chunk is emitted with an empty messages array.
532
504
 
533
505
  By default, subscriptions include every signal type, including reactive reminders. To hide reminders for one subscriber without affecting another:
534
506
 
@@ -553,6 +525,8 @@ for await (const chunk of subscription.stream) {
553
525
  }
554
526
  ```
555
527
 
528
+ The `thread-history` chunk carries the newest `perPage` messages and a `hasMore` flag. See [Thread subscription chunks](https://mastra.ai/reference/streaming/ChunkType) for its shape.
529
+
556
530
  `hideSignals: true` hides all recognized signal types. Set it to `false` to show all signals. An array accepts `user`, `state`, `reactive`, `notification`, `user-message`, and `system-reminder`. Matching normalizes `system-reminder` to `reactive` and `user-message` to `user`. An omitted option, `false`, or `[]` excludes nothing. Each subscriber filters its own live and replayed chunks, including remote pubsub events and idle-persisted signals. Filtering preserves non-signal chunks, unknown or malformed signal chunks, ordering, and completion/error events, even when every signal type is excluded.
557
531
 
558
532
  Exclusions don't change model context, storage, shared broadcasts, or another caller's output. They aren't a security boundary and don't replace `ifActive`/`ifIdle` delivery policies or `transient` persistence behavior. This option is supported by the in-process core API, not HTTP or client-js subscription requests. See [stream signal visibility](https://mastra.ai/reference/streaming/agents/stream) for transform ordering and the distinction from recall's exact stored-type matching and reminder-hidden history default.
@@ -611,7 +585,7 @@ Returns an `AgentThreadSubscription` object with these members:
611
585
 
612
586
  **notifications** (`object`): Notification delivery configuration for durable notification signals.
613
587
 
614
- **notifications.deliveryPolicy** (`NotificationDeliveryPolicyConfig`): Controls how notification records are delivered. Configure a default decision, per-priority decisions, per-source decisions, or a custom decide() function.
588
+ **notifications.deliveryPolicy** (`NotificationDeliveryPolicyConfig`): Controls how notification records are delivered. Configure a default decision, per-priority decisions, per-source decisions, or a custom decide() function. See Notifications for policy types and evaluation order.
615
589
 
616
590
  **voice** (`CompositeVoice`): Voice settings for speech input and output.
617
591
 
@@ -664,7 +638,7 @@ export const agent = new Agent({
664
638
  id: 'support-agent',
665
639
  name: 'support-agent',
666
640
  instructions: 'Help users with their questions.',
667
- model: 'openai/gpt-5.6-sol',
641
+ model: 'openai/gpt-6.1-sol',
668
642
  hooks: {
669
643
  beforeToolCall: ({ toolName, input }) => {
670
644
  console.log(`Running ${toolName}`, input)
@@ -694,9 +668,11 @@ The hook context `metadata` includes `agentId` and `agentName`. Per-execution ho
694
668
 
695
669
  ## Editor overrides
696
670
 
697
- When you register the [`MastraEditor`](https://mastra.ai/reference/editor/mastra-editor), the `editor` field controls which parts of a code-defined agent can be changed through the editor. Fields owned by code are read-only in Studio and are stripped from saved overrides.
671
+ When you register the [`MastraEditor`](https://mastra.ai/reference/editor/mastra-editor), the `editor` field controls which parts of an agent are defined in code and which are owned by Studio. Fields owned by code are read-only in Studio and are stripped from saved overrides. Fields owned by Studio must be omitted from code; the agent reads them from stored overrides and fails closed when they're missing.
672
+
673
+ **editor** (`false | { instructions?: boolean; tools?: boolean | { description?: boolean } }`): Omit to allow editing instructions and tools, using values in code as defaults. Set to false to lock the agent. Set instructions: true to make Studio own the instructions; omit instructions from code. Set tools: true to make Studio own tool membership and descriptions; omit tools from code. Set tools: { description: true } to keep tool membership in code and allow only description edits.
698
674
 
699
- **editor** (`false | { instructions?: boolean; tools?: boolean | { description?: boolean } }`): Omit to allow editing instructions and tools. Set to false to lock the agent. Set instructions: true to allow instruction edits. Set tools: true to allow tool membership and description edits, or tools: { description: true } to allow only description edits.
675
+ When a field is owned by Studio, TypeScript rejects it in code: `instructions` with `editor: { instructions: true }` and `tools` with `editor: { tools: true }` are type errors. An agent whose instructions are owned by Studio fails closed until a stored version with instructions is published.
700
676
 
701
677
  The agent's `id`, `name`, and `model` always come from code and can't be overridden through Editor. See [Editor](https://mastra.ai/docs/studio/editor) for usage.
702
678
 
@@ -19,7 +19,7 @@ export const supportAgent = new Agent({
19
19
  id: 'support-agent',
20
20
  name: 'Support Agent',
21
21
  instructions: 'You are a helpful support assistant.',
22
- model: 'openai/gpt-5.6-sol',
22
+ model: 'openai/gpt-6.1-sol',
23
23
  channels: {
24
24
  adapters: {
25
25
  slack: createSlackAdapter(),
@@ -41,7 +41,7 @@ The `channels` property accepts a `ChannelConfig` object with the following fiel
41
41
 
42
42
  **inlineLinks** (`InlineLinkEntry[]`): Promote URLs found in message text to file parts so the model can process linked content. Each entry matches a domain. Disabled by default.
43
43
 
44
- **tools** (`boolean`): Whether getTools() returns the channel-specific tools (add\_reaction, remove\_reaction). Set to false for models that do not support function calling. Channel tools are never added to the agent automatically — pass them explicitly via tools: { ...channels.getTools() }. (Default: `true`)
44
+ **tools** (`boolean`): Whether getTools() returns the channel-specific tools (add\_reaction, remove\_reaction). Set to false for models that do not support function calling. Channel tools are never added to the agent automatically — pass them explicitly via tools: { ...channels.getTools() }. They work on any run in a channel-backed thread, including runs that did not start from a chat message, such as a schedule or a Studio prompt. (Default: `true`)
45
45
 
46
46
  **state** (`StateAdapter`): State adapter for subscriptions and deduplication. Defaults to MastraStateAdapter backed by the Mastra instance storage. Channels require storage to be configured. (Default: `MastraStateAdapter (from Mastra storage)`)
47
47
 
@@ -72,7 +72,7 @@ const agent = new Agent({
72
72
  id: 'example',
73
73
  name: 'Example',
74
74
  instructions: '...',
75
- model: 'openai/gpt-5.6-sol',
75
+ model: 'openai/gpt-6.1-sol',
76
76
  channels: {
77
77
  adapters: {
78
78
  discord: {
@@ -100,12 +100,14 @@ const agent = new Agent({
100
100
 
101
101
  **formatError** (`(error: Error) => PostableMessage`): Override how errors are rendered in the chat. Return a user-friendly message instead of exposing the raw error. (Default: `"❌ Error: <error.message>"`)
102
102
 
103
- **formatToolCall** (`(args: { toolName: string; args: unknown; result: unknown; isError: boolean }) => PostableMessage | null`): \*\*Deprecated\*\* — use toolDisplay (function form) instead. When set, runs as a ToolDisplayFn that only fires on result/error events; running and approval events fall through to no render. Mutually exclusive with toolDisplay at the type level.
103
+ **formatToolCall** (`(info: { toolName: string; args: Record<string, unknown>; result: unknown; isError?: boolean }) => PostableMessage | null`): \*\*Deprecated\*\* — use toolDisplay (function form) instead. When set, runs as a ToolDisplayFn that only fires on result/error events; running and approval events fall through to no render. Mutually exclusive with toolDisplay at the type level.
104
104
 
105
105
  **streaming** (`boolean | { updateIntervalMs?: number }`): Stream agent text deltas to the channel as the agent generates them instead of buffering and posting once per step. Requires the underlying adapter to support post-and-edit streaming. Slack defaults to true; other adapters default to false. (Default: `false (true for Slack)`)
106
106
 
107
107
  **textFormat** (`'markdown' | 'plain'`): Dialect for the agent's final reply text. 'markdown' (the default) posts replies as markdown: adapters with native markdown rendering (Slack) render it directly, others convert it to their platform format. 'plain' posts replies as literal plain text, restoring the pre-markdown behavior for agents prompted to emit a platform dialect such as Slack mrkdwn. Applies to final reply text only; tool cards, error messages, and tripwire notices are unaffected. Native streaming is always markdown regardless of this setting. (Default: `'markdown'`)
108
108
 
109
+ **textDisplay** (`'show' | 'hidden'`): Whether the agent's reply text is posted to the channel. 'hidden' never posts reply text, so the agent's own messages reach the channel only through tools you give it, such as a reply tool. Tool display, approval prompts, error messages, and typing status are unaffected, and the text still reaches the agent's stream and memory. (Default: `'show'`)
110
+
109
111
  **toolDisplay** (`'cards' | 'text' | 'timeline' | 'grouped' | 'hidden' | ToolDisplayFn`): How tool calls are rendered in the channel. "cards" posts per-tool running/result cards as rich Block Kit. "text" posts the same lifecycle as plain text (no Block Kit). "timeline" and "grouped" stream tool state as inline task\_update chunks (requires streaming: true; Slack only today — other adapters may render a placeholder). "hidden" executes tools silently. Pass a function to render tool events yourself; return { kind: "post", message } for a discrete post/edit, { kind: "stream", chunk } to push into the streaming widget, or undefined to skip rendering that event. Add openIfEmpty: false to a stream result when its chunk should only apply to an active streaming session. Approve/deny prompts render as a separate built-in card in every string mode; a toolDisplay function receives the approval event and may replace the card by returning { kind: "post", message }. (Default: `'cards' ('grouped' for Slack)`)
110
112
 
111
113
  **typingStatus** (`boolean | ((chunk: AgentChunkType, ctx: TypingStatusContext) => string | false | null | undefined | void)`): Control the platform typing indicator. true uses built-in defaults (is typing… on text, is calling {tool}… on tool-call, is waiting for approval… on tool-call-approval). false suppresses typing entirely — useful when a live streaming widget (e.g. toolDisplay: "grouped" in Slack) already conveys progress. Pass a function to set custom status copy per chunk; return a string to set the status, or false/null/undefined to leave it unchanged. Compose with defaultTypingStatus (exported from @mastra/core/channels) to fall back to defaults for chunks you don't handle. (Default: `true`)
@@ -151,7 +153,7 @@ const agent = new Agent({
151
153
  id: 'streaming-agent',
152
154
  name: 'Streaming Agent',
153
155
  instructions: '...',
154
- model: 'openai/gpt-5.6-sol',
156
+ model: 'openai/gpt-6.1-sol',
155
157
  channels: {
156
158
  adapters: {
157
159
  slack: {
@@ -179,7 +181,7 @@ const agent = new Agent({
179
181
  id: 'custom-typing-agent',
180
182
  name: 'Custom Typing Agent',
181
183
  instructions: '...',
182
- model: 'openai/gpt-5.6-sol',
184
+ model: 'openai/gpt-6.1-sol',
183
185
  channels: {
184
186
  adapters: {
185
187
  discord: {
@@ -213,7 +215,7 @@ const agent = new Agent({
213
215
  id: 'custom-handler-agent',
214
216
  name: 'Custom Handler Agent',
215
217
  instructions: '...',
216
- model: 'openai/gpt-5.6-sol',
218
+ model: 'openai/gpt-6.1-sol',
217
219
  channels: {
218
220
  adapters: {
219
221
  slack: createSlackAdapter(),
@@ -248,6 +250,8 @@ type ChannelHandler = (
248
250
  type ChannelHandlerContext = {
249
251
  mastra?: Mastra
250
252
  requestContext: RequestContext
253
+ readonly signalMetadata: Record<string, unknown>
254
+ readonly skipped: readonly Message[]
251
255
  }
252
256
  ```
253
257
 
@@ -271,6 +275,10 @@ onDirectMessage: async (thread, message, defaultHandler, ctx) => {
271
275
 
272
276
  Anything the run reads from its request context can be decided per message this way, such as which user a platform sender maps to.
273
277
 
278
+ `ctx.signalMetadata` is the metadata attached to this message's Agent Signal, built fresh for every message. Add JSON-serializable, non-sensitive values before calling `defaultHandler`. Mastra may persist signal metadata and publish it through PubSub. Unlike `ctx.requestContext`, it follows the message whether it starts a new run or is delivered to one that is already active.
279
+
280
+ `ctx.skipped` lists earlier messages from the same sender that the Chat SDK batched into this turn when a `chatOptions.concurrency` strategy such as `burst`, `debounce`, or `queue` is set, oldest first. It's empty when nothing was batched.
281
+
274
282
  ## Resource ID resolution
275
283
 
276
284
  By default a channel thread's memory `resourceId` is `${platform}:${message.author.userId}`. The sender owns the memory, scoped per platform. For apps with a shared identity, such as single sign-on (SSO), this splits memory: the same user gets `feishu:user_123` in a Feishu DM but `user_123` on the web.
@@ -285,7 +293,7 @@ const agent = new Agent({
285
293
  id: 'sso-agent',
286
294
  name: 'SSO Agent',
287
295
  instructions: '...',
288
- model: 'openai/gpt-5.6-sol',
296
+ model: 'openai/gpt-6.1-sol',
289
297
  channels: {
290
298
  adapters: {
291
299
  slack: createSlackAdapter(),
@@ -328,7 +336,7 @@ const agent = new Agent({
328
336
  id: 'session-agent',
329
337
  name: 'Session Agent',
330
338
  instructions: '...',
331
- model: 'openai/gpt-5.6-sol',
339
+ model: 'openai/gpt-6.1-sol',
332
340
  channels: {
333
341
  adapters: {
334
342
  slack: createSlackAdapter(),
@@ -21,7 +21,7 @@ const agent = new Agent({
21
21
  id: 'my-agent',
22
22
  name: 'My Agent',
23
23
  instructions: 'You are a helpful assistant',
24
- model: 'openai/gpt-5.6-sol',
24
+ model: 'openai/gpt-6.1-sol',
25
25
  })
26
26
 
27
27
  const durableAgent = createDurableAgent({ agent })
@@ -53,7 +53,7 @@ const myAgent = new Agent({
53
53
  id: 'my-agent',
54
54
  name: 'My Agent',
55
55
  instructions: 'You are a helpful assistant',
56
- model: 'openai/gpt-5.6-sol',
56
+ model: 'openai/gpt-6.1-sol',
57
57
  durable: true, // or: { maxSteps: 10, cleanupTimeoutMs: 60_000 }
58
58
  })
59
59
 
@@ -181,7 +181,9 @@ Returns: [`Promise<DurableAgentStreamResult>`](#durableagentstreamresult)
181
181
 
182
182
  Reconnects to an existing run. Use this after a network disconnection. For the supported general reconnect flow, omit `offset` to replay all available cached events before receiving live events.
183
183
 
184
- When observing from another process, the observing agent must have the same `id` as the agent that started the run. If the persisted run belongs to an agent with a different ID, `observe()` throws `DURABLE_AGENT_OBSERVE_AGENT_MISMATCH`, matching the ownership checks in `resume()` and `recover()`.
184
+ The observing agent must have the same effective `id` as the agent that started the run, both for live observations in the same process and for persisted observations from another process. The effective ID is the DurableAgent's `id`, including any ID override, rather than the wrapped agent's original ID. Different DurableAgent instances with the same effective ID can observe the same run.
185
+
186
+ If the live or persisted run identifies a different owner agent ID, `observe()` throws `DURABLE_AGENT_OBSERVE_AGENT_MISMATCH`. Legacy live entries without owner metadata retain their existing behavior.
185
187
 
186
188
  For runs configured with `structuredOutput`, an observer in another process reconstructs `output.object` from the persisted schema and replayed text.
187
189
 
@@ -328,7 +330,9 @@ interface DurableAgentListActiveRunsResult {
328
330
 
329
331
  Discovers runs stuck in `running` status for this agent and re-drives them from the last persisted snapshot. Accepts the same filters and pagination as `listActiveRuns()`, plus `runId`. Returns the outcome for each run.
330
332
 
331
- Attempts run serially. Each attempt has a single 30-second wait budget covering both `recover()` setup and settlement of the whole recovered workflow. When the budget expires, recovery moves to the next run and returns `status: 'skipped'` with `reason: 'recovery-timeout'` and no `retryAt`. The timeout doesn't cancel setup or execution, release a live claim, or count as success or failure. The attempt continues in the background, and its eventual outcome doesn't change the returned results. Mastra doesn't automatically retry a timed-out attempt.
333
+ Up to five run waits proceed concurrently, with results returned in discovery order. Each attempt has a single 30-second wait budget covering both `recover()` setup and settlement of the whole recovered workflow. When the budget expires, another run can use the slot. The outcome is `status: 'skipped'` with `reason: 'recovery-timeout'` and `retryAt` set 30 seconds ahead. The timeout doesn't cancel setup or execution, release a live claim, or count as success or failure. The attempt continues in the background, and its eventual outcome doesn't change the returned results. The concurrency limit bounds waiting, not live executions.
334
+
335
+ [`mastra.recoverAllDurableAgents()`](https://mastra.ai/reference/core/mastra-class) schedules timeout re-checks automatically. Direct callers of `recoverActiveRuns()` must schedule their own calls after `retryAt`. While the original bulk attempt remains pending, re-checks defer with another `recovery-timeout` and a future `retryAt`, without invoking `recover()` again. Once it settles, recovery checks the persisted snapshot and ownership before retrying. Finished or suspended runs aren't restarted.
332
336
 
333
337
  The budget applies only to each run attempt in `recoverActiveRuns()`, not to discovery, a direct `recover()` call, or overridden custom recovery methods. When shutdown begins, recovery stops dispatching new runs. The original attempt remains tracked for Mastra's shared shutdown drain even after the wait times out.
334
338
 
@@ -352,12 +356,12 @@ await durableAgent.recoverActiveRuns({ runId: 'run-abc-123' })
352
356
 
353
357
  A run that another execution still drives isn't taken over. Its entry has `status: 'skipped'` and a `reason`, and `recoverActiveRuns()` doesn't check it again. For a run held by another process, `retryAt` is the time after which that claim lapses unless renewed. Call `recoverActiveRuns({ runId })` after it to recover the run if its process crashed. [`mastra.recoverAllDurableAgents()`](https://mastra.ai/reference/core/mastra-class) schedules these re-checks itself.
354
358
 
355
- | `reason` | Meaning |
356
- | --------------------- | ----------------------------------------------------------------------------------------------------------------- |
357
- | `run-active` | Another execution, possibly in another process, holds the run. Sets `retryAt`. |
358
- | `run-active-locally` | This process is executing the run. |
359
- | `already-in-progress` | This process is already recovering the run. |
360
- | `recovery-timeout` | The 30-second wait budget expired. The attempt continues in the background, with no `retryAt` or automatic retry. |
359
+ | `reason` | Meaning |
360
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
361
+ | `run-active` | Another execution, possibly in another process, holds the run. Sets `retryAt`. |
362
+ | `run-active-locally` | This process is executing the run. |
363
+ | `already-in-progress` | This process is already recovering the run. |
364
+ | `recovery-timeout` | The wait expired or an earlier bulk recovery attempt is still pending. Sets `retryAt`; re-checks don't duplicate the pending attempt. |
361
365
 
362
366
  Returns:
363
367