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

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 (375) hide show
  1. package/.docs/docs/agents/code-mode.md +2 -2
  2. package/.docs/docs/agents/guardrails.md +5 -5
  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 +7 -7
  6. package/.docs/docs/agents/processors.md +66 -20
  7. package/.docs/docs/agents/structured-output.md +6 -6
  8. package/.docs/docs/agents/tools.md +10 -10
  9. package/.docs/docs/browser.md +13 -1
  10. package/.docs/docs/channels.md +33 -6
  11. package/.docs/docs/connections/a2a.md +1 -1
  12. package/.docs/docs/connections/acp.md +2 -2
  13. package/.docs/docs/connections/mcp.md +159 -50
  14. package/.docs/docs/connections/overview.md +1 -1
  15. package/.docs/docs/connections/sdk-agents.md +8 -8
  16. package/.docs/docs/develop.md +1 -1
  17. package/.docs/docs/evals/custom-scorers.md +5 -5
  18. package/.docs/docs/evals/experiments.md +2 -2
  19. package/.docs/docs/evals/multi-turn.md +2 -2
  20. package/.docs/docs/evals/overview.md +4 -4
  21. package/.docs/docs/evals/quick-checks.md +2 -2
  22. package/.docs/docs/guides/build-an-eval-loop.md +3 -3
  23. package/.docs/docs/guides/context-engineering.md +13 -6
  24. package/.docs/docs/guides/mcp-authentication-authorization.md +2 -2
  25. package/.docs/docs/guides/streaming.md +1 -1
  26. package/.docs/docs/harness/agent-controller.md +7 -7
  27. package/.docs/docs/harness/background-tasks.md +3 -3
  28. package/.docs/docs/harness/durable-agents.md +5 -5
  29. package/.docs/docs/harness/goals.md +5 -5
  30. package/.docs/docs/harness/overview.md +2 -2
  31. package/.docs/docs/harness/schedules.md +5 -5
  32. package/.docs/docs/index.md +6 -6
  33. package/.docs/docs/mastra-platform/connect/channels.md +1 -1
  34. package/.docs/docs/mastra-platform/connect/tools.md +4 -4
  35. package/.docs/docs/mastra-platform/observability.md +1 -1
  36. package/.docs/docs/memory/memory-processors.md +7 -7
  37. package/.docs/docs/memory/message-history.md +5 -5
  38. package/.docs/docs/memory/multi-user-threads.md +1 -1
  39. package/.docs/docs/memory/observational-memory.md +14 -14
  40. package/.docs/docs/memory/semantic-recall.md +2 -2
  41. package/.docs/docs/memory/working-memory.md +2 -2
  42. package/.docs/docs/observability/logging.md +5 -5
  43. package/.docs/docs/observability/tracing/overview.md +1 -0
  44. package/.docs/docs/sandbox/filesystem.md +1 -0
  45. package/.docs/docs/sandbox/overview.md +1 -1
  46. package/.docs/docs/server/mastra-client.md +1 -1
  47. package/.docs/docs/server/middleware.md +1 -1
  48. package/.docs/docs/server/request-context.md +3 -3
  49. package/.docs/docs/server/server-adapters.md +12 -204
  50. package/.docs/docs/signals/notifications.md +233 -0
  51. package/.docs/docs/signals/overview.md +94 -0
  52. package/.docs/docs/signals/running-across-processes.md +132 -0
  53. package/.docs/docs/signals/sending-signals.md +166 -0
  54. package/.docs/docs/signals/signal-providers.md +278 -0
  55. package/.docs/docs/signals/state-signals.md +103 -0
  56. package/.docs/docs/signals/thread-streams.md +94 -0
  57. package/.docs/docs/skills.md +4 -4
  58. package/.docs/docs/storage.md +1 -1
  59. package/.docs/docs/studio/editor.md +39 -23
  60. package/.docs/docs/subagents.md +6 -6
  61. package/.docs/integrations/agentic-ui/ai-sdk-ui.md +1 -1
  62. package/.docs/integrations/agentic-ui/copilotkit.md +1 -1
  63. package/.docs/integrations/agentic-ui/openui.md +1 -1
  64. package/.docs/integrations/browsers/agent-browser.md +1 -1
  65. package/.docs/integrations/browsers/browser-viewer.md +1 -1
  66. package/.docs/integrations/browsers/firecrawl.md +1 -1
  67. package/.docs/integrations/browsers/stagehand.md +6 -6
  68. package/.docs/integrations/channels/discord.md +1 -1
  69. package/.docs/integrations/channels/github.md +2 -2
  70. package/.docs/integrations/channels/imessage.md +2 -50
  71. package/.docs/integrations/channels/slack.md +1 -1
  72. package/.docs/integrations/channels/teams.md +1 -1
  73. package/.docs/integrations/channels/telegram.md +1 -1
  74. package/.docs/integrations/channels/whatsapp.md +1 -1
  75. package/.docs/integrations/databases/aurora-dsql.md +1 -1
  76. package/.docs/integrations/databases/cloudflare-kv.md +4 -0
  77. package/.docs/integrations/databases/elasticsearch.md +1 -1
  78. package/.docs/integrations/databases/mongodb.md +1 -1
  79. package/.docs/integrations/databases/oracledb.md +1 -1
  80. package/.docs/integrations/databases/postgresql.md +1 -1
  81. package/.docs/integrations/databases/redis.md +1 -1
  82. package/.docs/integrations/databases/upstash.md +1 -1
  83. package/.docs/integrations/deploy/kubernetes.md +1 -1
  84. package/.docs/integrations/deploy/neon.md +2 -1
  85. package/.docs/integrations/deploy/render.md +2 -2
  86. package/.docs/integrations/file-storage/agentfs.md +1 -1
  87. package/.docs/integrations/file-storage/amazon-s3.md +20 -3
  88. package/.docs/integrations/file-storage/archil.md +1 -1
  89. package/.docs/integrations/file-storage/azure-blob.md +1 -1
  90. package/.docs/integrations/file-storage/google-cloud-storage.md +1 -1
  91. package/.docs/integrations/file-storage/google-drive.md +1 -1
  92. package/.docs/integrations/file-storage/mesa.md +1 -1
  93. package/.docs/integrations/file-storage/neon.md +210 -0
  94. package/.docs/integrations/file-storage/vercel-files.md +5 -1
  95. package/.docs/integrations/frameworks/express.md +0 -64
  96. package/.docs/integrations/observability/langfuse.md +1 -1
  97. package/.docs/integrations/observability/langsmith.md +2 -2
  98. package/.docs/integrations/observability/opentelemetry.md +5 -5
  99. package/.docs/integrations/sandboxes/apple-container.md +1 -1
  100. package/.docs/integrations/sandboxes/blaxel.md +1 -1
  101. package/.docs/integrations/sandboxes/daytona.md +1 -1
  102. package/.docs/integrations/sandboxes/docker.md +1 -1
  103. package/.docs/integrations/sandboxes/e2b-desktop.md +1 -1
  104. package/.docs/integrations/sandboxes/e2b.md +4 -2
  105. package/.docs/integrations/sandboxes/modal.md +1 -1
  106. package/.docs/integrations/sandboxes/railway.md +1 -1
  107. package/.docs/integrations/sandboxes/sprites.md +1 -1
  108. package/.docs/integrations/sandboxes/vercel.md +2 -2
  109. package/.docs/integrations/tools/brightdata.md +1 -1
  110. package/.docs/integrations/tools/firecrawl.md +1 -1
  111. package/.docs/integrations/tools/parallel.md +1 -1
  112. package/.docs/integrations/tools/perplexity.md +1 -1
  113. package/.docs/integrations/tools/tavily.md +1 -1
  114. package/.docs/integrations/voice/livekit.md +2 -2
  115. package/.docs/integrations.md +1 -0
  116. package/.docs/models/environment-variables.md +0 -2
  117. package/.docs/models/gateways/custom-gateways.md +3 -3
  118. package/.docs/models/gateways/merge-gateway.md +2 -14
  119. package/.docs/models/gateways/netlify.md +2 -1
  120. package/.docs/models/gateways/openrouter.md +3 -2
  121. package/.docs/models/gateways/vercel.md +3 -9
  122. package/.docs/models/index.md +13 -15
  123. package/.docs/models/providers/302ai.md +3 -3
  124. package/.docs/models/providers/abacus.md +70 -110
  125. package/.docs/models/providers/aimlapi.md +171 -171
  126. package/.docs/models/providers/aki-io.md +5 -6
  127. package/.docs/models/providers/alibaba-cn.md +2 -2
  128. package/.docs/models/providers/alibaba.md +2 -2
  129. package/.docs/models/providers/ambient.md +1 -1
  130. package/.docs/models/providers/auriko.md +2 -2
  131. package/.docs/models/providers/baseten.md +4 -4
  132. package/.docs/models/providers/berget.md +3 -4
  133. package/.docs/models/providers/bothub.md +4 -4
  134. package/.docs/models/providers/boundless.md +0 -4
  135. package/.docs/models/providers/cline-pass.md +2 -8
  136. package/.docs/models/providers/commandcode.md +0 -1
  137. package/.docs/models/providers/coralbricks.md +1 -1
  138. package/.docs/models/providers/cortecs.md +3 -3
  139. package/.docs/models/providers/crossmodel.md +1 -3
  140. package/.docs/models/providers/crusoe.md +1 -7
  141. package/.docs/models/providers/daoxe.md +1 -1
  142. package/.docs/models/providers/deepinfra.md +2 -2
  143. package/.docs/models/providers/digitalocean.md +6 -10
  144. package/.docs/models/providers/dinference.md +0 -3
  145. package/.docs/models/providers/edenai.md +12 -2
  146. package/.docs/models/providers/empiriolabs.md +0 -1
  147. package/.docs/models/providers/engy.md +2 -2
  148. package/.docs/models/providers/evroc.md +2 -2
  149. package/.docs/models/providers/fastrouter.md +41 -50
  150. package/.docs/models/providers/fireworks-ai.md +28 -23
  151. package/.docs/models/providers/friendli.md +4 -5
  152. package/.docs/models/providers/frogbot.md +2 -7
  153. package/.docs/models/providers/google.md +2 -5
  154. package/.docs/models/providers/greenpt.md +14 -20
  155. package/.docs/models/providers/groq.md +1 -1
  156. package/.docs/models/providers/huggingface.md +3 -1
  157. package/.docs/models/providers/iflowcn.md +2 -18
  158. package/.docs/models/providers/impossibl.md +2 -9
  159. package/.docs/models/providers/inceptron.md +8 -6
  160. package/.docs/models/providers/inco.md +1 -1
  161. package/.docs/models/providers/inference.md +5 -11
  162. package/.docs/models/providers/infomaniak.md +10 -12
  163. package/.docs/models/providers/io-net.md +11 -17
  164. package/.docs/models/providers/iteracompute.md +3 -3
  165. package/.docs/models/providers/jalapeno.md +14 -19
  166. package/.docs/models/providers/jiekou.md +53 -63
  167. package/.docs/models/providers/kenari.md +34 -53
  168. package/.docs/models/providers/kilo.md +12 -11
  169. package/.docs/models/providers/lilac.md +2 -8
  170. package/.docs/models/providers/llama.md +2 -11
  171. package/.docs/models/providers/llmgateway-providers.md +8 -16
  172. package/.docs/models/providers/llmgateway.md +9 -8
  173. package/.docs/models/providers/llmtr.md +1 -6
  174. package/.docs/models/providers/lowrouter.md +1 -1
  175. package/.docs/models/providers/lucidquery.md +2 -2
  176. package/.docs/models/providers/meganova.md +6 -7
  177. package/.docs/models/providers/melious.md +2 -7
  178. package/.docs/models/providers/mistral.md +4 -3
  179. package/.docs/models/providers/moark.md +0 -2
  180. package/.docs/models/providers/nan.md +1 -1
  181. package/.docs/models/providers/nano-gpt.md +16 -8
  182. package/.docs/models/providers/nearai.md +2 -1
  183. package/.docs/models/providers/neuralwatt.md +1 -4
  184. package/.docs/models/providers/novita-ai.md +2 -1
  185. package/.docs/models/providers/nvidia.md +15 -35
  186. package/.docs/models/providers/oci.md +0 -1
  187. package/.docs/models/providers/ofox.md +1 -1
  188. package/.docs/models/providers/ollama-cloud.md +2 -2
  189. package/.docs/models/providers/opencode-go.md +2 -3
  190. package/.docs/models/providers/opencode.md +85 -88
  191. package/.docs/models/providers/opper.md +1 -4
  192. package/.docs/models/providers/orcarouter.md +14 -16
  193. package/.docs/models/providers/pareto.md +1 -1
  194. package/.docs/models/providers/perplexity-agent.md +2 -12
  195. package/.docs/models/providers/pioneer.md +7 -7
  196. package/.docs/models/providers/poe.md +16 -70
  197. package/.docs/models/providers/prime.md +2 -1
  198. package/.docs/models/providers/qihang-ai.md +7 -11
  199. package/.docs/models/providers/qiniu-ai.md +9 -94
  200. package/.docs/models/providers/regolo-ai.md +5 -7
  201. package/.docs/models/providers/runinfra.md +1 -4
  202. package/.docs/models/providers/sarvam.md +1 -2
  203. package/.docs/models/providers/scaleway.md +12 -11
  204. package/.docs/models/providers/siliconflow-cn.md +35 -41
  205. package/.docs/models/providers/siliconflow.md +3 -6
  206. package/.docs/models/providers/stackit.md +2 -4
  207. package/.docs/models/providers/stepfun-ai.md +4 -4
  208. package/.docs/models/providers/stepfun.md +4 -4
  209. package/.docs/models/providers/submodel.md +1 -1
  210. package/.docs/models/providers/synthetic.md +0 -4
  211. package/.docs/models/providers/tempr.md +1 -4
  212. package/.docs/models/providers/tencent-coding-plan.md +3 -10
  213. package/.docs/models/providers/tensorx.md +0 -13
  214. package/.docs/models/providers/the-grid-ai.md +2 -1
  215. package/.docs/models/providers/tokengo.md +1 -1
  216. package/.docs/models/providers/umans-ai-coding-plan.md +12 -11
  217. package/.docs/models/providers/umans-ai.md +11 -10
  218. package/.docs/models/providers/unorouter.md +0 -13
  219. package/.docs/models/providers/vancine.md +0 -1
  220. package/.docs/models/providers/vivgrid.md +3 -3
  221. package/.docs/models/providers/volcengine-coding-plan.md +8 -12
  222. package/.docs/models/providers/volcengine.md +12 -18
  223. package/.docs/models/providers/vultr.md +0 -2
  224. package/.docs/models/providers/wafer.ai.md +3 -7
  225. package/.docs/models/providers/xai.md +19 -3
  226. package/.docs/models/providers/xiaomi-token-plan-ams.md +4 -4
  227. package/.docs/models/providers/xiaomi-token-plan-cn.md +4 -4
  228. package/.docs/models/providers/xiaomi-token-plan-sgp.md +4 -4
  229. package/.docs/models/providers/xiaomi.md +4 -4
  230. package/.docs/models/providers/xpersona.md +0 -1
  231. package/.docs/models/providers/zenmux.md +105 -125
  232. package/.docs/models/providers.md +0 -2
  233. package/.docs/reference/acp/acp-agent.md +4 -4
  234. package/.docs/reference/acp/create-acp-tool.md +1 -1
  235. package/.docs/reference/agent-controller/agent-controller-class.md +2 -2
  236. package/.docs/reference/agent-controller/session.md +10 -10
  237. package/.docs/reference/agents/agent.md +23 -47
  238. package/.docs/reference/agents/channels.md +13 -11
  239. package/.docs/reference/agents/durable-agent.md +13 -13
  240. package/.docs/reference/agents/generate.md +57 -3
  241. package/.docs/reference/agents/generateLegacy.md +2 -2
  242. package/.docs/reference/agents/getLLM.md +2 -2
  243. package/.docs/reference/agents/getMetadata.md +2 -2
  244. package/.docs/reference/agents/inngest-agent.md +1 -1
  245. package/.docs/reference/agents/network.md +1 -1
  246. package/.docs/reference/browser/agent-browser.md +1 -1
  247. package/.docs/reference/browser/browser-viewer.md +1 -1
  248. package/.docs/reference/browser/firecrawl-browser.md +1 -1
  249. package/.docs/reference/browser/mastra-browser.md +1 -1
  250. package/.docs/reference/browser/stagehand-browser.md +4 -4
  251. package/.docs/reference/channels/slack-provider.md +3 -0
  252. package/.docs/reference/cli/mastra.md +26 -0
  253. package/.docs/reference/client-js/agent-controller.md +2 -2
  254. package/.docs/reference/client-js/agents.md +18 -2
  255. package/.docs/reference/client-js/datasets.md +1 -1
  256. package/.docs/reference/client-js/observability.md +26 -1
  257. package/.docs/reference/coding-agent/build-base-prompt.md +1 -1
  258. package/.docs/reference/coding-agent/create-coding-agent.md +8 -8
  259. package/.docs/reference/configuration.md +4 -4
  260. package/.docs/reference/connect/channels.md +1 -1
  261. package/.docs/reference/connect/credential.md +1 -1
  262. package/.docs/reference/connect/tools.md +8 -10
  263. package/.docs/reference/core/getAgentById.md +1 -1
  264. package/.docs/reference/core/mastra-class.md +3 -3
  265. package/.docs/reference/core/mastra-model-gateway.md +1 -1
  266. package/.docs/reference/datasets/startExperiment.md +15 -0
  267. package/.docs/reference/editor/mastra-editor.md +2 -2
  268. package/.docs/reference/evals/answer-relevancy.md +1 -1
  269. package/.docs/reference/evals/answer-similarity.md +1 -1
  270. package/.docs/reference/evals/bias.md +1 -1
  271. package/.docs/reference/evals/checks.md +1 -1
  272. package/.docs/reference/evals/context-precision.md +3 -3
  273. package/.docs/reference/evals/context-recall.md +3 -3
  274. package/.docs/reference/evals/context-relevance.md +11 -11
  275. package/.docs/reference/evals/faithfulness.md +1 -1
  276. package/.docs/reference/evals/hallucination.md +5 -5
  277. package/.docs/reference/evals/multi-turn-judge.md +2 -2
  278. package/.docs/reference/evals/noise-sensitivity.md +12 -12
  279. package/.docs/reference/evals/not-scorable.md +1 -1
  280. package/.docs/reference/evals/prompt-alignment.md +16 -16
  281. package/.docs/reference/evals/rubric.md +6 -6
  282. package/.docs/reference/evals/run-evals.md +1 -1
  283. package/.docs/reference/evals/summarization.md +4 -4
  284. package/.docs/reference/evals/tool-call-accuracy.md +4 -4
  285. package/.docs/reference/evals/toxicity.md +1 -1
  286. package/.docs/reference/file-based-agents/config.md +3 -3
  287. package/.docs/reference/file-based-agents/schedules.md +1 -1
  288. package/.docs/reference/file-based-agents/subagents.md +4 -4
  289. package/.docs/reference/file-based-agents/workspace.md +1 -1
  290. package/.docs/reference/index.md +2 -1
  291. package/.docs/reference/manual-install.md +2 -2
  292. package/.docs/reference/memory/memory-class.md +3 -3
  293. package/.docs/reference/memory/observational-memory.md +16 -16
  294. package/.docs/reference/memory/summarizeConversation.md +3 -3
  295. package/.docs/reference/memory/summarizeThread.md +3 -3
  296. package/.docs/reference/migrations/agentnetwork.md +4 -4
  297. package/.docs/reference/migrations/mcp-v2.md +1 -1
  298. package/.docs/reference/migrations/upgrade-to-v1/agent.md +1 -1
  299. package/.docs/reference/migrations/vnext-to-standard-apis.md +2 -2
  300. package/.docs/reference/observability/tracing/advanced-queries.md +92 -11
  301. package/.docs/reference/observability/tracing/bridges/otel.md +1 -1
  302. package/.docs/reference/observability/tracing/exporters/langfuse.md +1 -1
  303. package/.docs/reference/observability/tracing/interfaces.md +2 -0
  304. package/.docs/reference/processors/batch-parts-processor.md +1 -1
  305. package/.docs/reference/processors/classifier-processor.md +2 -2
  306. package/.docs/reference/processors/cyber-refusal-handler.md +1 -1
  307. package/.docs/reference/processors/file-upload-processor.md +5 -5
  308. package/.docs/reference/processors/language-detector.md +1 -1
  309. package/.docs/reference/processors/message-history-processor.md +2 -2
  310. package/.docs/reference/processors/model-selection-processor.md +7 -7
  311. package/.docs/reference/processors/moderation-processor.md +3 -3
  312. package/.docs/reference/processors/pii-detector.md +2 -2
  313. package/.docs/reference/processors/prefill-error-handler.md +2 -2
  314. package/.docs/reference/processors/processor-interface.md +66 -10
  315. package/.docs/reference/processors/prompt-injection-detector.md +1 -1
  316. package/.docs/reference/processors/provider-history-compat.md +2 -2
  317. package/.docs/reference/processors/regex-filter-processor.md +1 -1
  318. package/.docs/reference/processors/response-cache.md +1 -1
  319. package/.docs/reference/processors/semantic-recall-processor.md +2 -2
  320. package/.docs/reference/processors/skill-search-processor.md +1 -1
  321. package/.docs/reference/processors/stream-error-retry-processor.md +3 -3
  322. package/.docs/reference/processors/system-prompt-scrubber.md +2 -2
  323. package/.docs/reference/processors/token-cost-control.md +1 -1
  324. package/.docs/reference/processors/token-limiter-processor.md +4 -4
  325. package/.docs/reference/processors/tool-call-filter.md +3 -3
  326. package/.docs/reference/processors/tool-search-processor.md +4 -4
  327. package/.docs/reference/processors/unicode-normalizer.md +1 -1
  328. package/.docs/reference/processors/working-memory-processor.md +2 -2
  329. package/.docs/reference/pubsub/lease-provider.md +2 -2
  330. package/.docs/reference/pubsub/redis-streams.md +11 -1
  331. package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
  332. package/.docs/reference/rag/chunking-and-embedding.md +1 -1
  333. package/.docs/reference/rag/graph-rag-guide.md +2 -2
  334. package/.docs/reference/rag/metadata-filters.md +1 -1
  335. package/.docs/reference/rag/rerank.md +1 -1
  336. package/.docs/reference/rag/retrieval.md +13 -13
  337. package/.docs/reference/server/nestjs-adapter.md +1 -1
  338. package/.docs/reference/signals/create-notification-inbox-tool.md +4 -4
  339. package/.docs/reference/signals/notifications.md +249 -0
  340. package/.docs/reference/signals/task-signal-provider.md +2 -2
  341. package/.docs/reference/signals/thread-events.md +69 -0
  342. package/.docs/reference/storage/retention.md +1 -1
  343. package/.docs/reference/streaming/ChunkType.md +68 -0
  344. package/.docs/reference/streaming/agents/stream.md +4 -4
  345. package/.docs/reference/tools/create-code-mode.md +1 -1
  346. package/.docs/reference/tools/create-tool.md +19 -2
  347. package/.docs/reference/tools/mcp-client.md +202 -11
  348. package/.docs/reference/tools/mcp-server.md +7 -5
  349. package/.docs/reference/tools/task-tools.md +1 -1
  350. package/.docs/reference/tools/vector-query-tool.md +1 -1
  351. package/.docs/reference/vectors/libsql.md +1 -1
  352. package/.docs/reference/vectors/mongodb.md +2 -2
  353. package/.docs/reference/vectors/oracledb.md +2 -2
  354. package/.docs/reference/vectors/pg.md +1 -1
  355. package/.docs/reference/vectors/turbopuffer.md +1 -1
  356. package/.docs/reference/vectors/upstash.md +1 -1
  357. package/.docs/reference/voice/overview.md +24 -24
  358. package/.docs/reference/voice/speech-to-speech.md +6 -6
  359. package/.docs/reference/voice/speech-to-text.md +1 -1
  360. package/.docs/reference/voice/text-to-speech.md +1 -1
  361. package/.docs/reference/voice/voice.addInstructions.md +1 -1
  362. package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
  363. package/.docs/reference/workspace/local-filesystem.md +1 -1
  364. package/.docs/reference/workspace/local-sandbox.md +1 -1
  365. package/.docs/reference/workspace/platform-filesystem.md +1 -1
  366. package/.docs/reference/workspace/platform-sandbox.md +21 -2
  367. package/.docs/reference/workspace/process-manager.md +13 -2
  368. package/.docs/reference/workspace/sandbox.md +1 -1
  369. package/.docs/reference/workspace/workspace-class.md +12 -12
  370. package/package.json +11 -11
  371. package/.docs/docs/guides/mcp-events.md +0 -306
  372. package/.docs/docs/harness/signal-providers.md +0 -212
  373. package/.docs/docs/harness/signals.md +0 -546
  374. package/.docs/docs/mastra-platform/connect/end-user-connections.md +0 -116
  375. package/.docs/reference/connect/user-connect-routes.md +0 -68
@@ -57,6 +57,8 @@ await slack.configure({
57
57
 
58
58
  **textFormat** (`'markdown' | 'plain'`): Dialect for the agent's final reply text, forwarded to the Slack adapter. 'markdown' (the default) posts replies as markdown so Slack renders bold text, links, and tables natively. 'plain' posts literal plain text, the escape hatch for agents prompted to emit Slack mrkdwn. Applies to buffered replies (streaming: false) and the streaming fallback; native streaming is always markdown. (Default: `'markdown'`)
59
59
 
60
+ **textDisplay** (`'show' | 'hidden'`): Whether the agent's reply text is posted to Slack. 'hidden' never posts it, so the agent's own messages reach Slack only through tools you give it. Tool display, approval prompts, errors, and typing status are unaffected. (Default: `'show'`)
61
+
60
62
  **toolDisplay** (`ToolDisplay`): How tool calls are rendered in Slack: 'cards', 'text', 'timeline', 'grouped', 'hidden', or a function. 'hidden' suppresses tool call/result rendering entirely. 'timeline' and 'grouped' require streaming. With streaming: false, only static modes are available and the default is 'cards'. (Default: `'grouped'`)
61
63
 
62
64
  **typingStatus** (`boolean | TypingStatusFn`): Show a typing indicator while the agent works. Set false to disable, or pass a function to return custom status text per stream chunk (return undefined to fall back to the default for that chunk). (Default: `true`)
@@ -204,6 +206,7 @@ When `connect()` builds a Slack app, the generated manifest requests a default s
204
206
  | `users:read` | |
205
207
  | `reactions:write` | |
206
208
  | `files:read` | |
209
+ | `files:write` | |
207
210
  | `assistant:write` | |
208
211
 
209
212
  ## Accessing the provider
@@ -1728,6 +1728,32 @@ The response stays nested under `data` so `truncated` is preserved. `truncated`
1728
1728
 
1729
1729
  Servers whose observability store doesn't support trace aggregation return `501`. The CLI prints it like other request failures, as an `HTTP_ERROR` with the server response in `error.details.body`.
1730
1730
 
1731
+ #### `mastra api span query`
1732
+
1733
+ Queries completed observability spans across traces, including agent runs and tool calls nested inside other traces. The inline JSON input is required and uses the same request as [`querySpans()`](https://mastra.ai/reference/client-js/observability). Its `where` predicate filters span fields directly. Like other observability commands, it targets `https://observability.mastra.ai` by default.
1734
+
1735
+ ```bash
1736
+ mastra api span query <input>
1737
+ mastra api span query '{"timeRange":{"from":"2026-08-07T00:00:00.000Z","to":"2026-08-08T00:00:00.000Z"},"where":{"op":"and","args":[{"op":"eq","left":{"path":"spanType"},"right":{"literal":"tool_call"}},{"op":"eq","left":{"path":"status"},"right":{"literal":"error"}}]}}'
1738
+ ```
1739
+
1740
+ The response stays nested under `data` as `{ "spans": [], "page": { "next": "opaque-cursor" } }`. Pass a non-null `data.page.next` value back as `page.after` in the next query, keeping the same time range, predicate, and ordering. Run `mastra api span query --help` for more examples.
1741
+
1742
+ Servers whose observability store doesn't support span queries return `501`. Filters on identity, context, and parent or root entity fields return `422` when the store doesn't support them. Check `spanQueryContextFields` in the server's observability capabilities before using them. The CLI prints both as an `HTTP_ERROR` with the server response in `error.details.body`.
1743
+
1744
+ #### `mastra api span aggregate`
1745
+
1746
+ Groups the spans selected by a time range and optional `where` predicate, and returns one row of measures per group. It accepts the same measures, `interval`, `having`, `orderBy`, and `limit` as `trace aggregate`, but groups by span fields such as `spanType`, `entityName`, `status`, and `rootEntityName`.
1747
+
1748
+ ```bash
1749
+ mastra api span aggregate <input>
1750
+ mastra api span aggregate '{"timeRange":{"from":"2026-08-01T00:00:00.000Z","to":"2026-08-08T00:00:00.000Z"},"where":{"op":"eq","left":{"path":"spanType"},"right":{"literal":"tool_call"}},"groupBy":["entityName"],"measures":["count","errorRate","duration.p95"],"orderBy":{"field":"errorRate","direction":"desc"},"limit":10}'
1751
+ ```
1752
+
1753
+ Token and cost measures count usage on the span that recorded it, usually a `model_generation` span. They aren't added to parent spans such as `agent_run`. For span dimensions, measures, and limits, see [Aggregate spans](https://mastra.ai/reference/observability/tracing/advanced-queries). Run `mastra api span aggregate --help` for more examples.
1754
+
1755
+ Like `trace aggregate`, the command prints `rows` and `truncated` under `data`, and if the observability store can't aggregate spans, the CLI prints the server's `501` response as an `HTTP_ERROR`.
1756
+
1731
1757
  #### `mastra api trace get`
1732
1758
 
1733
1759
  Gets a lightweight timeline for one observability trace without fetching full span input, output, attributes, or metadata payloads. Pass `--verbose` to fetch the full trace payload.
@@ -177,10 +177,10 @@ Switches the active mode.
177
177
 
178
178
  ### `switchModel(modelId, options?)`
179
179
 
180
- Switches the session's active model and persists it as the current model for the active thread. Switching modes doesn't change it. Pass `{ thinkingLevel }` as the second argument to apply and persist a thinking level with the model.
180
+ Switches the session's active model and persists it as the current model for the active thread, independently of mode changes. Pass `{ thinkingLevel }` as the second argument to apply and persist a thinking level with the model.
181
181
 
182
182
  ```typescript
183
- await session.switchModel('anthropic/claude-sonnet-4-6', {
183
+ await session.switchModel('anthropic/claude-sonnet-5-5', {
184
184
  thinkingLevel: 'high',
185
185
  })
186
186
  ```
@@ -351,6 +351,22 @@ const { messages, initialHistoryPagination } = useChat({
351
351
 
352
352
  The subscription also exposes `abort(options?)` and `unsubscribe()`. `await subscription.abort({ clearPendingSignals: true })` requests an abort and clears pending signals without closing the subscription. Omit the flag to preserve pending input. `unsubscribe()` closes the subscription without aborting the run.
353
353
 
354
+ ### `abortRun(runId)`
355
+
356
+ Requests cancellation of a durable run by its ID, including a run without a memory thread. Cancelling the response body or aborting the client-wide `abortSignal` only disconnects the observer from durable execution. A per-call `abortSignal` passed to a streaming method requests cancellation for you. Use `abortRun()` to stop a run without that signal.
357
+
358
+ ```typescript
359
+ const runId = crypto.randomUUID()
360
+ const response = await agent.stream('Research this topic', { runId })
361
+
362
+ // When the user chooses Stop:
363
+ const { aborted } = await agent.abortRun(runId)
364
+ ```
365
+
366
+ **runId** (`string`): ID of the durable run to cancel.
367
+
368
+ Returns `{ aborted: boolean }`. A remote abort request is asynchronous, so `true` doesn't confirm that the worker has stopped. Unknown or completed runs return `false`. This method requires a durable agent and Agent execution permission. Run ownership checks apply. Runs with memory threads also require `memory:write` permission when fine-grained authorization is enabled. Non-durable agents return HTTP 501.
369
+
354
370
  ### `abortThread()`
355
371
 
356
372
  Requests cancellation of the thread's active run. Set `clearPendingSignals: true` to clear pending signals before aborting.
@@ -748,7 +764,7 @@ response.processDataStream({
748
764
 
749
765
  ### Shape client tool output for the model
750
766
 
751
- Client tools support `toModelOutput` to control what the model receives, including multimodal content such as images. Because client tools execute locally, the mapping also runs on the client after `execute` completes. The transformed output is sent back to the server alongside the raw result, so the raw result stays available for storage and application logic.
767
+ Client tools support `toModelOutput` to control what the model receives, including multimodal content such as images. Because client tools execute locally, the mapping also runs on the client after `execute` completes. The client sends both the transformed output and the raw result back to the server, keeping the raw result available for storage and application logic.
752
768
 
753
769
  ```typescript
754
770
  const screenshotTool = createTool({
@@ -849,7 +865,7 @@ const draft = await mastraClient.createStoredAgent({
849
865
  instructions: 'You are a helpful assistant.',
850
866
  model: {
851
867
  provider: 'openai',
852
- name: 'gpt-5',
868
+ name: 'gpt-5.6',
853
869
  },
854
870
  autoPublish: false,
855
871
  })
@@ -130,7 +130,7 @@ Submitting to an experiment that has a target returns a `400`. Submitting after
130
130
 
131
131
  ## finalizeExperiment()
132
132
 
133
- Marks a caller-driven experiment completed. The server computes per-item counts from the persisted result rows, so the caller keeps no bookkeeping: `succeededCount` (at least one attempt without an error), `failedCount` (every attempt errored), and `skippedCount` (never submitted). Idempotent: finalizing an already-completed experiment returns the stored record.
133
+ Marks a caller-driven experiment completed. The server handles bookkeeping for the caller by computing per-item counts from the persisted result rows: `succeededCount` (at least one attempt without an error), `failedCount` (every attempt errored), and `skippedCount` (never submitted). Idempotent: finalizing an already-completed experiment returns the stored record.
134
134
 
135
135
  **datasetId** (`string`): ID of the dataset the experiment runs against.
136
136
 
@@ -107,7 +107,32 @@ Each summary includes identity, context, entity lineage, status, timestamps, `du
107
107
 
108
108
  Check `capabilities.spanQueryContextFields` from `getObservabilityCapabilities()` before using the additional identity, context and parent/root entity filters. A missing or false value means these filters aren't available. With an older adapter, requests using these filters return a structured `422` error.
109
109
 
110
- DuckDB returns `null` for parent/root entity type, ID and name, and for `executionSource`. Equality filters on these fields match no spans. Parent/root entity version IDs remain available.
110
+ DuckDB returns `null` for parent/root entity type, ID and name on spans written before `@mastra/duckdb` stored them. Equality filters on these fields don't match those spans.
111
+
112
+ ### Aggregate spans
113
+
114
+ `aggregateSpans()` groups the spans `querySpans()` selects and returns one row per group. It counts spans at any depth, such as nested agent runs that trace aggregation misses:
115
+
116
+ ```typescript
117
+ const { capabilities } = await mastraClient.getObservabilityCapabilities()
118
+
119
+ if (capabilities.spanAggregate) {
120
+ const { rows, truncated } = await mastraClient.aggregateSpans({
121
+ timeRange: {
122
+ from: '2026-10-01T00:00:00.000Z',
123
+ to: '2026-10-08T00:00:00.000Z',
124
+ },
125
+ where: { op: 'eq', left: { path: 'spanType' }, right: { literal: 'agent_run' } },
126
+ groupBy: ['status'],
127
+ interval: '1d',
128
+ measures: ['count', 'errorRate'],
129
+ })
130
+ }
131
+ ```
132
+
133
+ The request and response match `aggregateTraces()`, with span dimensions such as `spanType`, `name`, and `parentEntityName`. Token and cost measures belong to the span that recorded the usage and aren't added to parent spans. Check `capabilities.spanAggregate` before calling.
134
+
135
+ See [Aggregate spans](https://mastra.ai/reference/observability/tracing/advanced-queries) for selection, dimensions, per-span usage, and how to list the spans behind a group.
111
136
 
112
137
  ## Querying threads
113
138
 
@@ -24,7 +24,7 @@ const prompt = buildBasePrompt({
24
24
  platform: process.platform,
25
25
  date: new Date().toDateString(),
26
26
  mode: 'build',
27
- modelId: 'openai/gpt-5',
27
+ modelId: 'openai/gpt-5.6',
28
28
  toolGuidance: '',
29
29
  })
30
30
  ```
@@ -22,7 +22,7 @@ import { createCodingAgent } from '@mastra/core/coding-agent'
22
22
  const agent = createCodingAgent({
23
23
  id: 'my-coding-agent',
24
24
  name: 'My Coding Agent',
25
- model: 'openai/gpt-5',
25
+ model: 'openai/gpt-5.6',
26
26
  instructions: 'You are a helpful coding assistant.',
27
27
  })
28
28
 
@@ -108,7 +108,7 @@ import { createCodingAgent } from '@mastra/core/coding-agent'
108
108
  const agent = createCodingAgent({
109
109
  id: 'my-coding-agent',
110
110
  name: 'My Coding Agent',
111
- model: 'openai/gpt-5',
111
+ model: 'openai/gpt-5.6',
112
112
  instructions: 'You are a helpful coding assistant.',
113
113
  basePath: '/srv/checkouts/my-app',
114
114
  })
@@ -123,7 +123,7 @@ import { LocalFilesystem, LocalSandbox, Workspace } from '@mastra/core/workspace
123
123
  const agent = createCodingAgent({
124
124
  id: 'my-coding-agent',
125
125
  name: 'My Coding Agent',
126
- model: 'openai/gpt-5',
126
+ model: 'openai/gpt-5.6',
127
127
  instructions: 'You are a helpful coding assistant.',
128
128
  workspace: new Workspace({
129
129
  filesystem: new LocalFilesystem({ basePath: '/srv/checkouts/my-app' }),
@@ -140,7 +140,7 @@ import { createCodingAgent } from '@mastra/core/coding-agent'
140
140
  const agent = createCodingAgent({
141
141
  id: 'my-coding-agent',
142
142
  name: 'My Coding Agent',
143
- model: 'openai/gpt-5',
143
+ model: 'openai/gpt-5.6',
144
144
  instructions: 'You are a helpful coding assistant.',
145
145
  workspace: undefined, // opt out of the default workspace
146
146
  })
@@ -157,7 +157,7 @@ import { Memory } from '@mastra/memory'
157
157
  const agent = createCodingAgent({
158
158
  id: 'my-coding-agent',
159
159
  name: 'My Coding Agent',
160
- model: 'openai/gpt-5',
160
+ model: 'openai/gpt-5.6',
161
161
  instructions: 'Plan multi-step work with the task tools, then carry it out.',
162
162
  memory: new Memory(),
163
163
  })
@@ -175,7 +175,7 @@ import { Memory } from '@mastra/memory'
175
175
  const agent = createCodingAgent({
176
176
  id: 'my-coding-agent',
177
177
  name: 'My Coding Agent',
178
- model: 'openai/gpt-5',
178
+ model: 'openai/gpt-5.6',
179
179
  instructions: 'You are a helpful coding assistant.',
180
180
  memory: new Memory(),
181
181
  signals: [
@@ -213,11 +213,11 @@ import { Memory } from '@mastra/memory'
213
213
  const agent = createCodingAgent({
214
214
  id: 'my-coding-agent',
215
215
  name: 'My Coding Agent',
216
- model: 'openai/gpt-5',
216
+ model: 'openai/gpt-5.6',
217
217
  instructions: 'You are a helpful coding assistant.',
218
218
  memory: new Memory(),
219
219
  goal: {
220
- judge: 'openai/gpt-5-mini',
220
+ judge: 'openai/gpt-6-luna',
221
221
  maxRuns: 50,
222
222
  },
223
223
  })
@@ -34,7 +34,7 @@ export const mastra = new Mastra({
34
34
  id: 'weather-agent',
35
35
  name: 'Weather Agent',
36
36
  instructions: 'You help with weather information',
37
- model: 'openai/gpt-5.6-sol',
37
+ model: 'openai/gpt-6.1-sol',
38
38
  }),
39
39
  },
40
40
  })
@@ -318,7 +318,7 @@ import { ModerationProcessor } from '@mastra/core/processors'
318
318
  export const mastra = new Mastra({
319
319
  processors: {
320
320
  moderation: new ModerationProcessor({
321
- model: 'openai/gpt-5-mini',
321
+ model: 'openai/gpt-6-luna',
322
322
  categories: ['hate', 'harassment', 'violence'],
323
323
  }),
324
324
  },
@@ -359,7 +359,7 @@ import { createToxicityScorer } from '@mastra/evals/scorers/prebuilt'
359
359
 
360
360
  export const mastra = new Mastra({
361
361
  scorers: {
362
- toxicity: createToxicityScorer({ model: 'openai/gpt-5-mini' }),
362
+ toxicity: createToxicityScorer({ model: 'openai/gpt-6-luna' }),
363
363
  },
364
364
  })
365
365
  ```
@@ -639,7 +639,7 @@ export const mastra = new Mastra({
639
639
  })
640
640
  ```
641
641
 
642
- Explicit values override copied source settings. Omitting this option preserves the existing workspace-copy behavior; it doesn't copy all settings from the source workspace.
642
+ Explicit values override copied source settings. Omitting this option preserves the existing workspace-copy behavior, which copies only a subset of the source workspace's settings.
643
643
 
644
644
  Only these keys are supported: `allowBuilds`, `onlyBuiltDependencies`, `ignoredBuiltDependencies`, `minimumReleaseAge`, `minimumReleaseAgeExclude`, `trustPolicy`, `trustPolicyExclude`, `trustPolicyIgnoreAfter`, and `blockExoticSubdeps`. Any other key throws an error before pnpm runs, including keys Mastra generates for deployment output (`packages`, `overrides`, `patchedDependencies`, `allowUnusedPatches`, `supportedArchitectures`, `nodeLinker`) and settings that change TLS verification, registries, network access, store integrity, dependency extensions, catalogs, or build-script permissions. `neverBuiltDependencies` is rejected because pnpm 10 runs every build script it doesn't list. This option doesn't accept command-line flags and isn't a place for secrets.
645
645
 
@@ -53,7 +53,7 @@ Each value in the `providers` record form is `true`, `false`, or a `ChannelsProv
53
53
 
54
54
  The resolved `ChannelsResolver` satisfies `@mastra/core`'s channels-resolver contract:
55
55
 
56
- - **Callable**: returns the current `Record<string, ChannelProvider>` of providers with an active connection. Mastra invokes it at runtime; the TTL cache makes repeat calls cheap. Only the first resolution waits on the platform. After the TTL expires, resolution returns the stale snapshot immediately and refreshes in the background, skipping the refresh during a short cooldown after a failed fetch, so a new connection can appear one resolution later than the TTL suggests.
56
+ - **Callable**: returns the current `Record<string, ChannelProvider>` of providers with an active connection. Mastra invokes it at runtime, using the TTL cache to keep repeat calls cheap. Only the first resolution waits on the platform. After the TTL expires, resolution returns the stale snapshot immediately and refreshes in the background, skipping the refresh during a short cooldown after a failed fetch, so a new connection can appear one resolution later than the TTL suggests.
57
57
  - `getRoutes()`: the union of API routes for every enabled channel, available synchronously so Mastra can mount them at construction. Routes exist before (and after) their provider has an active connection.
58
58
  - `refresh()`: fetches connections from the platform now and updates the cache. Rejects if the platform fetch fails.
59
59
  - `disconnect()`: clears the cached snapshot so the next resolution fetches fresh. It doesn't tear down providers, sessions, or credentials.
@@ -42,7 +42,7 @@ Most applications should prefer [`tools()`](https://mastra.ai/reference/connect/
42
42
 
43
43
  **connectionId** (`string`): ID of the connection to fetch credentials for.
44
44
 
45
- **options** (`{ client?: ConnectClientOptions; resourceId?: string }`): Optional platform client overrides (accessToken, orgId, baseUrl, fetch; see ConnectClientOptions in tools()) and the end-user resource ID to assert. The platform requires the matching resource ID for end-user connections, so omitting or mismatching it returns connection\_not\_found.
45
+ **options** (`{ client?: ConnectClientOptions }`): Optional platform client overrides (accessToken, orgId, baseUrl, fetch). See ConnectClientOptions in tools().
46
46
 
47
47
  ## Credential handling
48
48
 
@@ -14,7 +14,7 @@ export const opsAgent = new Agent({
14
14
  id: 'ops',
15
15
  name: 'ops',
16
16
  instructions: 'You help the team track work in Linear and GitHub.',
17
- model: 'openai/gpt-5-mini',
17
+ model: 'openai/gpt-6-luna',
18
18
  tools: tools(),
19
19
  })
20
20
  ```
@@ -37,8 +37,6 @@ See [Connect](https://mastra.ai/docs/mastra-platform/connect/overview) to get st
37
37
 
38
38
  **options.requireApproval** (`boolean | string[]`): Default tool-approval policy applied to every provider without its own requireApproval. true gates every provider tool except the synthetic \<provider>\_\_list\_connections helper; an array of keys or \* globs gates matching provider tools, with the same exception. A provider opts out with requireApproval: false.
39
39
 
40
- **options.resourceId** (`string | ((ctx?) => string | undefined | Promise<string | undefined>)`): End-user resource ID to resolve for: the agent gets global connections plus that user's own end-user connections, and every platform call asserts the ID. Pass a string (the per-request pattern tools: ctx => tools({ resourceId: ... }) stays cheap because identical options share one internal state) or a callback derived per resolution from the invocation context. A callback returning undefined resolves global-only. See End-user connections.
41
-
42
40
  **options.client** (`ConnectClientOptions`): Platform client overrides. See ConnectClientOptions below.
43
41
 
44
42
  **options.ttlMs** (`number`): How long a resolved snapshot stays fresh, in milliseconds. Default 30000. 0 revalidates on every resolution.
@@ -58,9 +56,9 @@ const connected = tools(ctx => ({
58
56
  }))
59
57
  ```
60
58
 
61
- The resolver memoizes snapshots per distinct options value, so requests producing the same options share one cached snapshot with the usual `ttlMs` and stale-while-revalidate semantics. Structurally equal options returned from different calls count as the same value; non-serializable values such as a custom `client.fetch` compare by identity. The resolver keeps caches for at most 32 distinct options values and evicts the least recently used one (closing its MCP transports) past that, so derive options from a small, closed set of inputs such as roles, not from unbounded per-request data.
59
+ The resolver memoizes snapshots per distinct options value, so requests producing the same options share one cached snapshot with the usual `ttlMs` and stale-while-revalidate semantics. Structurally equal options returned from different calls count as the same value, except that non-serializable values such as a custom `client.fetch` compare by identity. The resolver keeps caches for at most 32 distinct options values and evicts the least recently used one past that, so derive options from a small, closed set of inputs such as roles, not from unbounded per-request data.
62
60
 
63
- With the callback form, option validation runs at the first resolution that produces a given options value rather than at `tools()` time, and a validation error fails that resolution. `refresh()` fetches for the options the callback returns without a context (the same variant a direct `await connected()` call uses), and `disconnect()` closes every memoized variant.
61
+ With the callback form, option validation runs at the first resolution that produces an options value rather than at `tools()` time, and a validation error fails that resolution. `refresh()` fetches for the options the callback returns without a context (the same variant a direct `await connected()` call uses), and `disconnect()` closes every memoized variant.
64
62
 
65
63
  ### Per-provider options
66
64
 
@@ -88,7 +86,7 @@ Every field falls back to an environment variable, so a fully env-configured app
88
86
 
89
87
  ## The resolver
90
88
 
91
- The returned `ToolsResolver` caches its tools. Within `ttlMs` of the last fetch, it returns the cache. The first call after expiry still returns the cache right away and starts a background fetch from the platform (stale-while-revalidate). Later calls use the updated snapshot once the fetch succeeds. The resolver doesn't poll while idle, and refresh failures preserve the cached snapshot. Use `await connected.refresh()` to wait for a fresh tool record.
89
+ The returned `ToolsResolver` caches its tools. Within `ttlMs` of the last fetch, it returns the cache. The first call after expiry still returns the cache right away and starts a background fetch from the platform (stale-while-revalidate). Later calls use the updated snapshot once the fetch succeeds, or keep using the cached snapshot if the refresh fails. Refreshes depend on calls to the resolver rather than idle polling. Use `await connected.refresh()` to wait for a fresh tool record.
92
90
 
93
91
  Call the resolver directly when you need a plain tool record, for example for the `toolsets` option at generate time:
94
92
 
@@ -105,10 +103,10 @@ const response = await agent.generate('Summarize my open issues.', {
105
103
  The resolver also exposes methods for manual control:
106
104
 
107
105
  - `refresh()` fetches from the platform immediately, then updates the cache and returns the tool record. Rejects if the platform fetch fails.
108
- - `disconnect()` clears the cached snapshots and closes the MCP transports of the state behind this resolver. Resolvers created with identical options share that state, so this disconnects them too. The effect isn't permanent: a later resolution rebuilds the state, and already-returned MCP tools reconnect on their next call.
109
- - `with(extra)` returns a new resolver that merges extra tools into every resolution; extras win on key collision. It accepts a static tool record or a function (sync or async) and calls chain. Spreading the resolver's result in a `tools` callback achieves the same merge; see [Tools](https://mastra.ai/docs/mastra-platform/connect/tools).
106
+ - `disconnect()` clears the cached snapshots and closes the MCP transports of the state behind this resolver. Resolvers created with identical options share that state, so this disconnects them too. A later resolution rebuilds the state, and already-returned MCP tools reconnect on their next call.
107
+ - `with(extra)` returns a new resolver that merges extra tools into every resolution, giving extras priority on key collision. It accepts a static tool record or a function (sync or async) and calls chain. For the same merge using a spread of the resolver's result in a `tools` callback, see [Tools](https://mastra.ai/docs/mastra-platform/connect/tools).
110
108
 
111
- Errors fall into four groups:
109
+ Error handling depends on the cause:
112
110
 
113
111
  - Configuration errors (missing project ID or token, a malformed provider ID, both `allowTools` and `disallowTools` at one level, invalid `ttlMs`) throw when you call `tools()`. With [the callback form](#per-request-options), they fail the first resolution that produces the invalid options instead.
114
112
  - An enabled provider ID that the platform catalog confirms is unknown fails the resolution with `invalid_options`. An unknown tool key or zero-match glob in a per-provider filter does the same. If the catalog can't be reached, an unknown ID downgrades to a warning and is skipped.
@@ -146,7 +144,7 @@ Connections in `needs_reauth` status are skipped with a warning until someone [r
146
144
 
147
145
  Beyond the generated toolsets, the resolver discovers any connected provider that advertises MCP capability in the platform catalog. Discovered tools use the same flat contract, namespaced as `<provider-id>_<tool-name>`. If a provider has both a generated toolset and an MCP capability, the MCP catalog is preferred.
148
146
 
149
- The application sends only its platform token; the platform removes caller authentication before injecting the provider credential and proxying each protocol request to the provider's MCP server. MCP sessions are reused across refreshes and closed when the connection changes, the provider is detached, or `disconnect()` is called.
147
+ The application sends only its platform token. Before proxying each protocol request to the provider's MCP server, the platform removes caller authentication and injects the provider credential. MCP sessions are reused across refreshes and closed when the connection changes, the provider is detached, or `disconnect()` is called.
150
148
 
151
149
  Discovered MCP tools follow the same approval policy as generated tools: none require approval unless `requireApproval` asks for it, for example `'neon-mcp': { requireApproval: ['neon-mcp_run_sql'] }`. Passing the removed `autoApproveTools` key throws an `invalid_options` error at call time.
152
150
 
@@ -20,7 +20,7 @@ const supportAgent = new Agent({
20
20
  id: 'support-agent-id',
21
21
  name: 'Support Agent',
22
22
  instructions: 'Answer support questions clearly and concisely.',
23
- model: 'openai/gpt-5.6-sol',
23
+ model: 'openai/gpt-6.1-sol',
24
24
  })
25
25
 
26
26
  export const mastra = new Mastra({
@@ -149,11 +149,11 @@ Requires persistent storage. With an in-memory store, there's nothing to recover
149
149
 
150
150
  Recovery processes up to five agents concurrently, with up to five run waits per agent, independently of `recovery.workflowConcurrency`. Each built-in `recoverActiveRuns()` attempt waits up to 30 seconds in total for `recover()` setup and settlement of the whole recovered workflow, then frees its slot for another run. These limits bound waiting, not live executions. This isn't an overall recovery deadline: discovery and overridden custom recovery methods aren't bounded by this budget.
151
151
 
152
- A timed-out attempt continues in the background. Its outcome is `status: 'skipped'` with `reason: 'recovery-timeout'` and a future `retryAt`. It contributes only to `skipped`, not `recovered`, `succeeded`, or `failed`. Mastra schedules re-checks automatically. While the original attempt is pending, re-checks defer without starting another execution. After it settles, recovery checks the persisted snapshot and ownership before retrying; finished or suspended runs aren't restarted. Late settlement doesn't change the returned counts.
152
+ A timed-out attempt continues in the background. Its outcome is `status: 'skipped'` with `reason: 'recovery-timeout'` and a future `retryAt`. It contributes only to `skipped`, not `recovered`, `succeeded`, or `failed`. Mastra schedules re-checks automatically, deferring them until the original attempt settles to avoid starting another execution. Recovery then checks the persisted snapshot and ownership before retrying and skips finished or suspended runs. The returned counts remain unchanged by late settlement.
153
153
 
154
154
  When shutdown begins, recovery stops dispatching new agents and runs. The recovery traversal and original attempts, including timed-out setup or execution, participate in the same shared shutdown drain as active executions. A recovery wait timeout doesn't cancel the attempt or give it a separate shutdown drain window.
155
155
 
156
- A run that another execution still drives isn't taken over. It's counted in `skipped` and checked again once that execution's claim could have lapsed, so a run whose process crashed is recovered without another call. `shutdown()` cancels pending re-checks. See [run ownership](https://mastra.ai/docs/harness/durable-agents).
156
+ Mastra leaves a run under its current execution's control and counts it in `skipped`. Automatic re-checks begin once that execution's claim could have lapsed, allowing recovery after a process crash without another call. `shutdown()` cancels pending re-checks. See [run ownership](https://mastra.ai/docs/harness/durable-agents).
157
157
 
158
158
  ```typescript
159
159
  const result = await mastra.recoverAllDurableAgents()
@@ -170,4 +170,4 @@ Returns:
170
170
 
171
171
  **failed** (`number`): Runs whose restart threw an error.
172
172
 
173
- **skipped** (`number`): Runs skipped because they are already active, recovery is already in progress, or the recovery wait timed out. Only ownership skips eligible for re-checks are checked again; recovery timeouts are not automatically retried.
173
+ **skipped** (`number`): Runs skipped because they are already active, recovery is already in progress, or the recovery wait timed out. Skips with a future retryAt, including recovery timeouts, are automatically re-checked. Timeout re-checks wait for the original attempt to settle before deciding whether to retry.
@@ -52,7 +52,7 @@ class MyCustomGateway extends MastraModelGateway {
52
52
  return {
53
53
  'my-provider': {
54
54
  name: 'My Provider',
55
- models: ['openai/gpt-5.6-sol', 'anthropic/claude-sonnet-4-6'],
55
+ models: ['openai/gpt-6.1-sol', 'anthropic/claude-sonnet-5-5'],
56
56
  apiKeyEnvVar: 'MY_API_KEY',
57
57
  gateway: this.id,
58
58
  },
@@ -55,12 +55,27 @@ console.log(`${summary2.succeededCount}/${summary2.totalItems} succeeded`)
55
55
  console.log(`Status: ${summary2.status}`)
56
56
  ```
57
57
 
58
+ ### Compare models without changing the agent
59
+
60
+ Use `agentModel` to run the same agent against a different model. The registered agent keeps its own model, and the experiment's `metadata.agentModel` records the model the run used.
61
+
62
+ ```typescript
63
+ const summary = await dataset.startExperiment({
64
+ targetType: 'agent',
65
+ targetId: 'my-agent',
66
+ agentModel: 'anthropic/claude-haiku-5-5',
67
+ scorers: ['accuracy'],
68
+ })
69
+ ```
70
+
58
71
  ## Parameters
59
72
 
60
73
  **targetType** (`'agent' | 'workflow' | 'scorer'`): Type of registered target to run items against. Use with targetId.
61
74
 
62
75
  **targetId** (`string`): ID of the registered target. Use with targetType.
63
76
 
77
+ **agentModel** (`MastraModelConfig`): Model to run the agent target with, instead of the agent's own model. Accepts a provider/modelId string, a model config object (for example { id, url, apiKey }), a model instance, or a { model, id } object. Model functions and fallback arrays aren't supported. Applies only when targetType is 'agent'. The model is passed with each call the experiment makes, so the registered agent and other experiments are unaffected. The agent version is picked the same way as without agentModel, and sub-agents keep their own models. The experiment's metadata and each run's trace metadata record it as agentModel (for example anthropic/claude-haiku-5-5).
78
+
64
79
  **scorers** (`(MastraScorer | string)[] | AgentScorerConfig | WorkflowScorerConfig`): Scorers to evaluate each result. Accepts a flat array of MastraScorer instances or registered scorer IDs, or the same categorised config shape used by runEvals (AgentScorerConfig / WorkflowScorerConfig). When this option is provided, including as \[] or an empty categorized config, it overrides item-level and dataset-level scorer IDs for every item. When omitted, each item uses its own scorerIds when present, then falls back to the dataset scorer IDs. Sources aren't merged. Trajectory scorers (type: "trajectory") automatically receive a pre-extracted Trajectory as their output regardless of which form is used. Workflow step scorers are supported only through this run-level categorized configuration. Their results carry the originating stepId and keep targetScope: "span" (matching runEvals).
65
80
 
66
81
  **name** (`string`): Display name for the experiment.
@@ -94,7 +94,7 @@ All namespaces extend a shared CRUD base class, so they expose the same `create`
94
94
 
95
95
  **agent.getById** (`(id: string, options?: GetByIdOptions) => Promise<Agent | null>`): Return a hydrated Agent instance for a stored agent. Pass options with versionId, versionNumber, or status ("draft" | "published" | "archived") to target a specific version. Default version requests are cached.
96
96
 
97
- **agent.update** (`(input: StorageUpdateAgentInput) => Promise<Agent>`): Partially update a stored agent. Creates a version from the provided snapshot fields, assigns it to activeVersionId, and invalidates the cache. Set memory to null to disable memory.
97
+ **agent.update** (`(input: StorageUpdateAgentInput) => Promise<Agent>`): Partially update a stored agent. Creates a version from the provided snapshot fields and invalidates the cache. The new version is an inactive draft unless you pass activeVersionId (and status) explicitly. Set memory to null to disable memory.
98
98
 
99
99
  **agent.delete** (`(id: string) => Promise<void>`): Delete a stored agent and remove it from the Mastra runtime registry.
100
100
 
@@ -213,7 +213,7 @@ await editor.agent.create({
213
213
  id: 'support-agent',
214
214
  name: 'Support agent',
215
215
  instructions: 'You are a friendly support agent for Acme.',
216
- model: { provider: 'openai', name: 'gpt-5' },
216
+ model: { provider: 'openai', name: 'gpt-5.6' },
217
217
  memory: { type: 'id', memoryId: 'supportMemory' },
218
218
  })
219
219
  ```
@@ -75,7 +75,7 @@ import { runEvals } from '@mastra/core/evals'
75
75
  import { createAnswerRelevancyScorer } from '@mastra/evals/scorers/prebuilt'
76
76
  import { myAgent } from './agent'
77
77
 
78
- const scorer = createAnswerRelevancyScorer({ model: 'openai/gpt-5.6-sol' })
78
+ const scorer = createAnswerRelevancyScorer({ model: 'openai/gpt-6.1-sol' })
79
79
 
80
80
  const result = await runEvals({
81
81
  data: [
@@ -66,7 +66,7 @@ import { runEvals } from '@mastra/core/evals'
66
66
  import { createAnswerSimilarityScorer } from '@mastra/evals/scorers/prebuilt'
67
67
  import { myAgent } from './agent'
68
68
 
69
- const scorer = createAnswerSimilarityScorer({ model: 'openai/gpt-5.6-sol' })
69
+ const scorer = createAnswerSimilarityScorer({ model: 'openai/gpt-6.1-sol' })
70
70
 
71
71
  const result = await runEvals({
72
72
  data: [
@@ -88,7 +88,7 @@ import { runEvals } from '@mastra/core/evals'
88
88
  import { createBiasScorer } from '@mastra/evals/scorers/prebuilt'
89
89
  import { myAgent } from './agent'
90
90
 
91
- const scorer = createBiasScorer({ model: 'openai/gpt-5.6-sol' })
91
+ const scorer = createBiasScorer({ model: 'openai/gpt-6.1-sol' })
92
92
 
93
93
  const result = await runEvals({
94
94
  data: [
@@ -202,7 +202,7 @@ const result = await runEvals({
202
202
  checks.calledTool('get_weather'),
203
203
  checks.noToolErrors(),
204
204
  // LLM-based scorer
205
- createAnswerRelevancyScorer({ model: 'openai/gpt-5-mini' }),
205
+ createAnswerRelevancyScorer({ model: 'openai/gpt-6-luna' }),
206
206
  ],
207
207
  })
208
208
  ```
@@ -102,7 +102,7 @@ MAP = (1.0 + 0.67) / 2 = 0.835 ≈ **0.83**
102
102
 
103
103
  ```typescript
104
104
  const scorer = createContextPrecisionScorer({
105
- model: 'openai/gpt-5.6-sol',
105
+ model: 'openai/gpt-6.1-sol',
106
106
  options: {
107
107
  contextExtractor: (input, output) => {
108
108
  // Extract context dynamically based on the query
@@ -121,7 +121,7 @@ const scorer = createContextPrecisionScorer({
121
121
 
122
122
  ```typescript
123
123
  const scorer = createContextPrecisionScorer({
124
- model: 'openai/gpt-5.6-sol',
124
+ model: 'openai/gpt-6.1-sol',
125
125
  options: {
126
126
  context: [
127
127
  // Simulate retrieved documents from vector database
@@ -146,7 +146,7 @@ import { createContextPrecisionScorer } from '@mastra/evals/scorers/prebuilt'
146
146
  import { myAgent } from './agent'
147
147
 
148
148
  const scorer = createContextPrecisionScorer({
149
- model: 'openai/gpt-5.6-sol',
149
+ model: 'openai/gpt-6.1-sol',
150
150
  options: {
151
151
  contextExtractor: (input, output) => {
152
152
  // Extract context from agent's retrieved documents
@@ -105,7 +105,7 @@ Recall = 2/3 = 0.67
105
105
 
106
106
  ```typescript
107
107
  const scorer = createContextRecallScorer({
108
- model: 'openai/gpt-5.6-sol',
108
+ model: 'openai/gpt-6.1-sol',
109
109
  options: {
110
110
  contextExtractor: (input, output) => {
111
111
  const query = input?.inputMessages?.[0]?.content || ''
@@ -121,7 +121,7 @@ const scorer = createContextRecallScorer({
121
121
 
122
122
  ```typescript
123
123
  const scorer = createContextRecallScorer({
124
- model: 'openai/gpt-5.6-sol',
124
+ model: 'openai/gpt-6.1-sol',
125
125
  options: {
126
126
  context: [
127
127
  'Document 1: Einstein was born on 14 March 1879 in Ulm, Germany.',
@@ -142,7 +142,7 @@ import { createContextRecallScorer } from '@mastra/evals/scorers/prebuilt'
142
142
  import { myAgent } from './agent'
143
143
 
144
144
  const scorer = createContextRecallScorer({
145
- model: 'openai/gpt-5.6-sol',
145
+ model: 'openai/gpt-6.1-sol',
146
146
  options: {
147
147
  contextExtractor: (input, output) => {
148
148
  // Extract context from tool invocation results in the agent output