@mastra/mcp-docs-server 1.0.0-beta.4 → 1.0.0-beta.6

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 (286) hide show
  1. package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +201 -1
  2. package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +201 -1
  3. package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +201 -1
  4. package/.docs/organized/changelogs/%40mastra%2Fastra.md +201 -1
  5. package/.docs/organized/changelogs/%40mastra%2Fchroma.md +201 -1
  6. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +201 -1
  7. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +201 -1
  8. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +201 -1
  9. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +201 -1
  10. package/.docs/organized/changelogs/%40mastra%2Fconvex.md +29 -0
  11. package/.docs/organized/changelogs/%40mastra%2Fcore.md +411 -211
  12. package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +201 -1
  13. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +201 -1
  14. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +201 -1
  15. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +201 -1
  16. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +201 -1
  17. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +201 -1
  18. package/.docs/organized/changelogs/%40mastra%2Fduckdb.md +42 -0
  19. package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +201 -1
  20. package/.docs/organized/changelogs/%40mastra%2Felasticsearch.md +52 -0
  21. package/.docs/organized/changelogs/%40mastra%2Fevals.md +201 -1
  22. package/.docs/organized/changelogs/%40mastra%2Flance.md +201 -1
  23. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +201 -1
  24. package/.docs/organized/changelogs/%40mastra%2Floggers.md +201 -1
  25. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +201 -1
  26. package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +201 -1
  27. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +201 -1
  28. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +201 -1
  29. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +201 -1
  30. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +201 -1
  31. package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +201 -1
  32. package/.docs/organized/changelogs/%40mastra%2Fpg.md +201 -1
  33. package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +201 -1
  34. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +201 -1
  35. package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +201 -1
  36. package/.docs/organized/changelogs/%40mastra%2Frag.md +201 -1
  37. package/.docs/organized/changelogs/%40mastra%2Freact.md +89 -1
  38. package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +9 -0
  39. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +42 -0
  40. package/.docs/organized/changelogs/%40mastra%2Fserver.md +201 -1
  41. package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +201 -1
  42. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +201 -1
  43. package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +201 -1
  44. package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +201 -1
  45. package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +201 -1
  46. package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +201 -1
  47. package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +201 -1
  48. package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +92 -1
  49. package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +67 -1
  50. package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +201 -1
  51. package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +201 -1
  52. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +201 -1
  53. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +201 -1
  54. package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +201 -1
  55. package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +201 -1
  56. package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +201 -1
  57. package/.docs/organized/changelogs/create-mastra.md +201 -1
  58. package/.docs/organized/changelogs/mastra.md +201 -1
  59. package/.docs/organized/code-examples/agui.md +1 -0
  60. package/.docs/organized/code-examples/ai-sdk-v5.md +1 -0
  61. package/.docs/organized/code-examples/mcp-server-adapters.md +721 -0
  62. package/.docs/organized/code-examples/memory-with-processors.md +1 -1
  63. package/.docs/organized/code-examples/quick-start.md +1 -1
  64. package/.docs/organized/code-examples/server-app-access.md +342 -0
  65. package/.docs/raw/agents/adding-voice.mdx +7 -10
  66. package/.docs/raw/agents/agent-approval.mdx +189 -0
  67. package/.docs/raw/agents/guardrails.mdx +26 -23
  68. package/.docs/raw/agents/networks.mdx +2 -2
  69. package/.docs/raw/agents/overview.mdx +27 -62
  70. package/.docs/raw/agents/processors.mdx +279 -0
  71. package/.docs/raw/agents/using-tools.mdx +4 -5
  72. package/.docs/raw/course/01-first-agent/05-running-playground.md +5 -5
  73. package/.docs/raw/course/01-first-agent/09-testing-your-agent.md +3 -3
  74. package/.docs/raw/course/01-first-agent/13-testing-your-tool.md +3 -3
  75. package/.docs/raw/course/01-first-agent/17-testing-memory.md +2 -2
  76. package/.docs/raw/course/04-workflows/07-using-playground.md +1 -1
  77. package/.docs/raw/deployment/building-mastra.mdx +1 -1
  78. package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +1 -1
  79. package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +1 -1
  80. package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +1 -1
  81. package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +1 -1
  82. package/.docs/raw/deployment/cloud-providers/index.mdx +20 -27
  83. package/.docs/raw/deployment/cloud-providers/netlify-deployer.mdx +44 -13
  84. package/.docs/raw/deployment/mastra-cloud/observability.mdx +19 -17
  85. package/.docs/raw/deployment/mastra-cloud/setting-up.mdx +1 -1
  86. package/.docs/raw/deployment/overview.mdx +2 -2
  87. package/.docs/raw/deployment/web-framework.mdx +5 -5
  88. package/.docs/raw/evals/custom-scorers.mdx +3 -5
  89. package/.docs/raw/evals/overview.mdx +2 -3
  90. package/.docs/raw/evals/running-in-ci.mdx +0 -2
  91. package/.docs/raw/{guides/guide → getting-started}/manual-install.mdx +2 -2
  92. package/.docs/raw/getting-started/project-structure.mdx +1 -1
  93. package/.docs/raw/getting-started/start.mdx +72 -0
  94. package/.docs/raw/getting-started/studio.mdx +1 -1
  95. package/.docs/raw/{frameworks/agentic-uis/ai-sdk.mdx → guides/build-your-ui/ai-sdk-ui.mdx} +113 -11
  96. package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/astro.mdx +23 -25
  97. package/.docs/raw/{frameworks/servers → guides/getting-started}/express.mdx +3 -4
  98. package/.docs/raw/guides/{quickstarts/nextjs.mdx → getting-started/next-js.mdx} +11 -11
  99. package/.docs/raw/guides/{quickstarts/standalone-server.mdx → getting-started/quickstart.mdx} +7 -7
  100. package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/sveltekit.mdx +23 -25
  101. package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/vite-react.mdx +7 -7
  102. package/.docs/raw/guides/guide/ai-recruiter.mdx +2 -3
  103. package/.docs/raw/guides/guide/chef-michel.mdx +2 -3
  104. package/.docs/raw/guides/guide/notes-mcp-server.mdx +2 -2
  105. package/.docs/raw/guides/guide/research-assistant.mdx +7 -8
  106. package/.docs/raw/guides/guide/stock-agent.mdx +4 -6
  107. package/.docs/raw/guides/guide/web-search.mdx +12 -10
  108. package/.docs/raw/guides/guide/whatsapp-chat-bot.mdx +421 -0
  109. package/.docs/raw/guides/index.mdx +3 -35
  110. package/.docs/raw/guides/migrations/agentnetwork.mdx +4 -4
  111. package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +1 -1
  112. package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +40 -0
  113. package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +5 -0
  114. package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +51 -0
  115. package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +2 -2
  116. package/.docs/raw/index.mdx +2 -2
  117. package/.docs/raw/mcp/overview.mdx +3 -5
  118. package/.docs/raw/memory/memory-processors.mdx +264 -79
  119. package/.docs/raw/memory/semantic-recall.mdx +7 -7
  120. package/.docs/raw/memory/storage/memory-with-libsql.mdx +2 -4
  121. package/.docs/raw/memory/storage/memory-with-mongodb.mdx +2 -4
  122. package/.docs/raw/memory/storage/memory-with-pg.mdx +2 -4
  123. package/.docs/raw/memory/storage/memory-with-upstash.mdx +2 -4
  124. package/.docs/raw/memory/threads-and-resources.mdx +3 -3
  125. package/.docs/raw/memory/working-memory.mdx +14 -7
  126. package/.docs/raw/{logging.mdx → observability/logging.mdx} +1 -1
  127. package/.docs/raw/observability/overview.mdx +2 -3
  128. package/.docs/raw/observability/tracing/bridges/otel.mdx +176 -0
  129. package/.docs/raw/observability/tracing/exporters/arize.mdx +17 -0
  130. package/.docs/raw/observability/tracing/exporters/braintrust.mdx +19 -0
  131. package/.docs/raw/observability/tracing/exporters/langfuse.mdx +20 -0
  132. package/.docs/raw/observability/tracing/exporters/langsmith.mdx +12 -0
  133. package/.docs/raw/observability/tracing/exporters/otel.mdx +25 -5
  134. package/.docs/raw/observability/tracing/exporters/posthog.mdx +107 -0
  135. package/.docs/raw/observability/tracing/overview.mdx +74 -8
  136. package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +0 -1
  137. package/.docs/raw/rag/chunking-and-embedding.mdx +16 -17
  138. package/.docs/raw/rag/overview.mdx +3 -2
  139. package/.docs/raw/rag/retrieval.mdx +43 -38
  140. package/.docs/raw/rag/vector-databases.mdx +93 -2
  141. package/.docs/raw/reference/agents/agent.mdx +7 -10
  142. package/.docs/raw/reference/agents/generate.mdx +55 -6
  143. package/.docs/raw/reference/agents/generateLegacy.mdx +2 -2
  144. package/.docs/raw/reference/agents/getLLM.mdx +1 -1
  145. package/.docs/raw/reference/agents/network.mdx +46 -3
  146. package/.docs/raw/reference/cli/mastra.mdx +2 -1
  147. package/.docs/raw/reference/client-js/agents.mdx +3 -3
  148. package/.docs/raw/reference/client-js/memory.mdx +43 -0
  149. package/.docs/raw/reference/client-js/workflows.mdx +92 -63
  150. package/.docs/raw/reference/core/getLogger.mdx +1 -1
  151. package/.docs/raw/reference/core/listLogs.mdx +1 -1
  152. package/.docs/raw/reference/core/listLogsByRunId.mdx +1 -1
  153. package/.docs/raw/reference/core/mastra-model-gateway.mdx +5 -19
  154. package/.docs/raw/reference/core/setLogger.mdx +1 -1
  155. package/.docs/raw/reference/core/setTelemetry.mdx +1 -1
  156. package/.docs/raw/reference/deployer/netlify.mdx +1 -2
  157. package/.docs/raw/reference/evals/answer-relevancy.mdx +28 -98
  158. package/.docs/raw/reference/evals/answer-similarity.mdx +12 -258
  159. package/.docs/raw/reference/evals/bias.mdx +29 -87
  160. package/.docs/raw/reference/evals/completeness.mdx +31 -90
  161. package/.docs/raw/reference/evals/content-similarity.mdx +28 -88
  162. package/.docs/raw/reference/evals/context-precision.mdx +28 -130
  163. package/.docs/raw/reference/evals/context-relevance.mdx +11 -11
  164. package/.docs/raw/reference/evals/faithfulness.mdx +28 -101
  165. package/.docs/raw/reference/evals/hallucination.mdx +28 -103
  166. package/.docs/raw/reference/evals/keyword-coverage.mdx +28 -107
  167. package/.docs/raw/reference/evals/noise-sensitivity.mdx +11 -11
  168. package/.docs/raw/reference/evals/prompt-alignment.mdx +15 -15
  169. package/.docs/raw/reference/evals/scorer-utils.mdx +362 -0
  170. package/.docs/raw/reference/evals/textual-difference.mdx +27 -100
  171. package/.docs/raw/reference/evals/tone-consistency.mdx +25 -98
  172. package/.docs/raw/reference/evals/tool-call-accuracy.mdx +7 -7
  173. package/.docs/raw/reference/evals/toxicity.mdx +29 -92
  174. package/.docs/raw/reference/index.mdx +1 -0
  175. package/.docs/raw/reference/memory/memory-class.mdx +5 -7
  176. package/.docs/raw/reference/observability/tracing/bridges/otel.mdx +150 -0
  177. package/.docs/raw/reference/observability/tracing/configuration.mdx +0 -4
  178. package/.docs/raw/reference/observability/tracing/exporters/arize.mdx +4 -0
  179. package/.docs/raw/reference/observability/tracing/exporters/langsmith.mdx +17 -1
  180. package/.docs/raw/reference/observability/tracing/exporters/otel.mdx +6 -0
  181. package/.docs/raw/reference/observability/tracing/exporters/posthog.mdx +132 -0
  182. package/.docs/raw/reference/observability/tracing/instances.mdx +0 -4
  183. package/.docs/raw/reference/observability/tracing/interfaces.mdx +29 -4
  184. package/.docs/raw/reference/observability/tracing/spans.mdx +0 -4
  185. package/.docs/raw/reference/processors/batch-parts-processor.mdx +1 -1
  186. package/.docs/raw/reference/processors/language-detector.mdx +10 -3
  187. package/.docs/raw/reference/processors/message-history-processor.mdx +131 -0
  188. package/.docs/raw/reference/processors/moderation-processor.mdx +12 -5
  189. package/.docs/raw/reference/processors/pii-detector.mdx +12 -5
  190. package/.docs/raw/reference/processors/processor-interface.mdx +502 -0
  191. package/.docs/raw/reference/processors/prompt-injection-detector.mdx +10 -3
  192. package/.docs/raw/reference/processors/semantic-recall-processor.mdx +197 -0
  193. package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +3 -4
  194. package/.docs/raw/reference/processors/token-limiter-processor.mdx +2 -2
  195. package/.docs/raw/reference/processors/tool-call-filter.mdx +125 -0
  196. package/.docs/raw/reference/processors/unicode-normalizer.mdx +1 -1
  197. package/.docs/raw/reference/processors/working-memory-processor.mdx +221 -0
  198. package/.docs/raw/reference/rag/embeddings.mdx +5 -5
  199. package/.docs/raw/reference/rag/rerank.mdx +1 -2
  200. package/.docs/raw/reference/rag/rerankWithScorer.mdx +0 -1
  201. package/.docs/raw/reference/storage/cloudflare-d1.mdx +37 -0
  202. package/.docs/raw/reference/storage/convex.mdx +164 -0
  203. package/.docs/raw/reference/storage/lance.mdx +33 -0
  204. package/.docs/raw/reference/storage/libsql.mdx +37 -0
  205. package/.docs/raw/reference/storage/mongodb.mdx +39 -0
  206. package/.docs/raw/reference/storage/mssql.mdx +37 -0
  207. package/.docs/raw/reference/storage/postgresql.mdx +37 -0
  208. package/.docs/raw/reference/streaming/ChunkType.mdx +1 -1
  209. package/.docs/raw/reference/streaming/agents/stream.mdx +64 -2
  210. package/.docs/raw/reference/streaming/workflows/observeStream.mdx +7 -9
  211. package/.docs/raw/reference/streaming/workflows/{resumeStreamVNext.mdx → resumeStream.mdx} +51 -11
  212. package/.docs/raw/reference/streaming/workflows/stream.mdx +83 -24
  213. package/.docs/raw/reference/templates/overview.mdx +1 -4
  214. package/.docs/raw/reference/tools/client.mdx +1 -2
  215. package/.docs/raw/reference/tools/create-tool.mdx +132 -0
  216. package/.docs/raw/reference/tools/graph-rag-tool.mdx +5 -5
  217. package/.docs/raw/reference/tools/mcp-client.mdx +76 -21
  218. package/.docs/raw/reference/tools/mcp-server.mdx +1 -2
  219. package/.docs/raw/reference/tools/vector-query-tool.mdx +14 -15
  220. package/.docs/raw/reference/vectors/chroma.mdx +81 -1
  221. package/.docs/raw/reference/vectors/convex.mdx +429 -0
  222. package/.docs/raw/reference/vectors/couchbase.mdx +24 -17
  223. package/.docs/raw/reference/vectors/duckdb.mdx +462 -0
  224. package/.docs/raw/reference/vectors/elasticsearch.mdx +310 -0
  225. package/.docs/raw/reference/vectors/lance.mdx +38 -22
  226. package/.docs/raw/reference/vectors/libsql.mdx +35 -2
  227. package/.docs/raw/reference/vectors/mongodb.mdx +35 -2
  228. package/.docs/raw/reference/vectors/opensearch.mdx +37 -16
  229. package/.docs/raw/reference/vectors/pg.mdx +43 -36
  230. package/.docs/raw/reference/vectors/pinecone.mdx +48 -1
  231. package/.docs/raw/reference/vectors/qdrant.mdx +36 -1
  232. package/.docs/raw/reference/vectors/turbopuffer.mdx +74 -0
  233. package/.docs/raw/reference/voice/google.mdx +159 -20
  234. package/.docs/raw/reference/voice/openai-realtime.mdx +2 -2
  235. package/.docs/raw/reference/voice/voice.addInstructions.mdx +2 -3
  236. package/.docs/raw/reference/voice/voice.addTools.mdx +1 -1
  237. package/.docs/raw/reference/voice/voice.answer.mdx +1 -1
  238. package/.docs/raw/reference/voice/voice.close.mdx +1 -1
  239. package/.docs/raw/reference/voice/voice.connect.mdx +1 -1
  240. package/.docs/raw/reference/voice/voice.off.mdx +1 -1
  241. package/.docs/raw/reference/voice/voice.on.mdx +1 -1
  242. package/.docs/raw/reference/voice/voice.send.mdx +1 -1
  243. package/.docs/raw/reference/voice/voice.updateConfig.mdx +1 -1
  244. package/.docs/raw/reference/workflows/run-methods/restart.mdx +142 -0
  245. package/.docs/raw/reference/workflows/run-methods/resume.mdx +44 -0
  246. package/.docs/raw/reference/workflows/run-methods/start.mdx +44 -0
  247. package/.docs/raw/reference/workflows/run.mdx +13 -5
  248. package/.docs/raw/reference/workflows/step.mdx +13 -0
  249. package/.docs/raw/reference/workflows/workflow.mdx +19 -0
  250. package/.docs/raw/server-db/mastra-client.mdx +1 -2
  251. package/.docs/raw/server-db/mastra-server.mdx +30 -1
  252. package/.docs/raw/server-db/request-context.mdx +0 -1
  253. package/.docs/raw/server-db/storage.mdx +11 -0
  254. package/.docs/raw/streaming/overview.mdx +26 -15
  255. package/.docs/raw/streaming/tool-streaming.mdx +48 -5
  256. package/.docs/raw/streaming/workflow-streaming.mdx +5 -11
  257. package/.docs/raw/tools-mcp/advanced-usage.mdx +1 -2
  258. package/.docs/raw/tools-mcp/mcp-overview.mdx +3 -5
  259. package/.docs/raw/voice/overview.mdx +21 -41
  260. package/.docs/raw/voice/speech-to-speech.mdx +4 -4
  261. package/.docs/raw/voice/speech-to-text.mdx +1 -2
  262. package/.docs/raw/voice/text-to-speech.mdx +1 -2
  263. package/.docs/raw/workflows/control-flow.mdx +180 -0
  264. package/.docs/raw/workflows/error-handling.mdx +1 -0
  265. package/.docs/raw/workflows/human-in-the-loop.mdx +4 -4
  266. package/.docs/raw/workflows/overview.mdx +56 -44
  267. package/.docs/raw/workflows/snapshots.mdx +1 -0
  268. package/.docs/raw/workflows/suspend-and-resume.mdx +85 -16
  269. package/.docs/raw/workflows/time-travel.mdx +313 -0
  270. package/.docs/raw/workflows/workflow-state.mdx +191 -0
  271. package/CHANGELOG.md +18 -0
  272. package/dist/{chunk-5NJC7NRO.js → chunk-4CM2BQNP.js} +24 -4
  273. package/dist/prepare-docs/package-changes.d.ts.map +1 -1
  274. package/dist/prepare-docs/prepare.js +1 -1
  275. package/dist/stdio.js +1 -1
  276. package/package.json +7 -7
  277. package/.docs/raw/agents/human-in-the-loop-with-tools.mdx +0 -90
  278. package/.docs/raw/frameworks/agentic-uis/cedar-os.mdx +0 -102
  279. package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +0 -179
  280. package/.docs/raw/frameworks/web-frameworks/next-js.mdx +0 -379
  281. package/.docs/raw/getting-started/quickstart.mdx +0 -27
  282. package/.docs/raw/getting-started/templates.mdx +0 -73
  283. package/.docs/raw/reference/streaming/workflows/observeStreamVNext.mdx +0 -47
  284. package/.docs/raw/reference/streaming/workflows/streamVNext.mdx +0 -153
  285. /package/.docs/raw/{frameworks/agentic-uis → guides/build-your-ui}/assistant-ui.mdx +0 -0
  286. /package/.docs/raw/{frameworks/agentic-uis → guides/build-your-ui}/copilotkit.mdx +0 -0
@@ -1,302 +1,502 @@
1
1
  # @mastra/core
2
2
 
3
- ## 1.0.0-beta.4
3
+ ## 1.0.0-beta.6
4
4
 
5
- ### Patch Changes
5
+ ### Major Changes
6
6
 
7
- - Fix message list provider metadata handling and reasoning text optimization ([#10281](https://github.com/mastra-ai/mastra/pull/10281))
8
- - Improved provider metadata preservation across message transformations
9
- - Optimized reasoning text storage to avoid duplication (using `details` instead of `reasoning` field)
10
- - Fixed test snapshots for timestamp precision and metadata handling
7
+ - Changed `.branch()` result schema to make all branch output fields optional. ([#10693](https://github.com/mastra-ai/mastra/pull/10693))
11
8
 
12
- - Allow provider to pass through options to the auth config ([#10284](https://github.com/mastra-ai/mastra/pull/10284))
9
+ **Breaking change**: Branch outputs are now optional since only one branch executes at runtime. Update your workflow schemas to handle optional branch results.
13
10
 
14
- - Fix deprecation warning when agent network executes workflows by using `.fullStream` instead of iterating `WorkflowRunOutput` directly ([#10285](https://github.com/mastra-ai/mastra/pull/10285))
11
+ **Before:**
15
12
 
16
- - Fix generate toolResults and mismatch in provider tool names ([#10282](https://github.com/mastra-ai/mastra/pull/10282))
13
+ ```typescript
14
+ const workflow = createWorkflow({...})
15
+ .branch([
16
+ [condition1, stepA], // outputSchema: { result: z.string() }
17
+ [condition2, stepB], // outputSchema: { data: z.number() }
18
+ ])
19
+ .map({
20
+ finalResult: { step: stepA, path: 'result' } // Expected non-optional
21
+ });
22
+ ```
17
23
 
18
- - Support AI SDK voice models ([#10304](https://github.com/mastra-ai/mastra/pull/10304))
24
+ **After:**
19
25
 
20
- Mastra now supports AI SDK's transcription and speech models directly in `CompositeVoice`, enabling seamless integration with a wide range of voice providers through the AI SDK ecosystem. This allows you to use models from OpenAI, ElevenLabs, Groq, Deepgram, LMNT, Hume, and many more for both speech-to-text (transcription) and text-to-speech capabilities.
26
+ ```typescript
27
+ const workflow = createWorkflow({...})
28
+ .branch([
29
+ [condition1, stepA],
30
+ [condition2, stepB],
31
+ ])
32
+ .map({
33
+ finalResult: {
34
+ step: stepA,
35
+ path: 'result' // Now optional - provide fallback
36
+ }
37
+ });
38
+ ```
21
39
 
22
- AI SDK models are automatically wrapped when passed to `CompositeVoice`, so you can mix and match AI SDK models with existing Mastra voice providers for maximum flexibility.
40
+ **Why**: Branch conditionals execute only one path, so non-executed branches don't produce outputs. The type system now correctly reflects this runtime behavior.
23
41
 
24
- ## Usage Example
42
+ Related issue: https://github.com/mastra-ai/mastra/issues/10642
25
43
 
26
- ```typescript
27
- import { CompositeVoice } from '@mastra/core/voice';
28
- import { openai } from '@ai-sdk/openai';
29
- import { elevenlabs } from '@ai-sdk/elevenlabs';
30
-
31
- // Use AI SDK models directly with CompositeVoice
32
- const voice = new CompositeVoice({
33
- input: openai.transcription('whisper-1'), // AI SDK transcription model
34
- output: elevenlabs.speech('eleven_turbo_v2'), // AI SDK speech model
35
- });
44
+ ### Minor Changes
36
45
 
37
- // Convert text to speech
38
- const audioStream = await voice.speak('Hello from AI SDK!');
46
+ - Memory system now uses processors. Memory processors (`MessageHistory`, `SemanticRecall`, `WorkingMemory`) are now exported from `@mastra/memory/processors` and automatically added to the agent pipeline based on your memory config. Core processors (`ToolCallFilter`, `TokenLimiter`) remain in `@mastra/core/processors`. ([#9254](https://github.com/mastra-ai/mastra/pull/9254))
39
47
 
40
- // Convert speech to text
41
- const transcript = await voice.listen(audioStream);
42
- console.log(transcript);
43
- ```
48
+ - Add reserved keys in RequestContext for secure resourceId/threadId setting from middleware ([#10657](https://github.com/mastra-ai/mastra/pull/10657))
44
49
 
45
- Fixes #9947
50
+ This allows middleware to securely set `resourceId` and `threadId` via reserved keys in RequestContext (`MASTRA_RESOURCE_ID_KEY` and `MASTRA_THREAD_ID_KEY`), which take precedence over client-provided values for security.
46
51
 
47
- ## 1.0.0-beta.3
52
+ - feat(workflows): add suspendData parameter to step execute function ([#10734](https://github.com/mastra-ai/mastra/pull/10734))
48
53
 
49
- ### Major Changes
54
+ Adds a new `suspendData` parameter to workflow step execute functions that provides access to the data originally passed to `suspend()` when the step was suspended. This enables steps to access context about why they were suspended when they are later resumed.
50
55
 
51
- - Use tool's outputSchema to validate results and return an error object if schema does not match output results. ([#9664](https://github.com/mastra-ai/mastra/pull/9664))
56
+ **New Features:**
57
+ - `suspendData` parameter automatically populated in step execute function when resuming
58
+ - Type-safe access to suspend data matching the step's `suspendSchema`
59
+ - Backward compatible - existing workflows continue to work unchanged
60
+
61
+ **Example:**
52
62
 
53
63
  ```typescript
54
- const getUserTool = createTool({
55
- id: 'get-user',
56
- outputSchema: z.object({
57
- id: z.string(),
58
- name: z.string(),
59
- email: z.string().email(),
60
- }),
61
- execute: async inputData => {
62
- return { id: '123', name: 'John' };
64
+ const step = createStep({
65
+ suspendSchema: z.object({ reason: z.string() }),
66
+ resumeSchema: z.object({ approved: z.boolean() }),
67
+ execute: async ({ suspend, suspendData, resumeData }) => {
68
+ if (!resumeData?.approved) {
69
+ return await suspend({ reason: 'Approval required' });
70
+ }
71
+
72
+ // Access original suspend data when resuming
73
+ console.log(`Resuming after: ${suspendData?.reason}`);
74
+ return { result: 'Approved' };
63
75
  },
64
76
  });
65
77
  ```
66
78
 
67
- When validation fails, the tool returns a `ValidationError`:
79
+ - feat(storage): support querying messages from multiple threads ([#10663](https://github.com/mastra-ai/mastra/pull/10663))
80
+ - Fixed TypeScript errors where `threadId: string | string[]` was being passed to places expecting `Scalar` type
81
+ - Added proper multi-thread support for `listMessages` across all adapters when `threadId` is an array
82
+ - Updated `_getIncludedMessages` to look up message threadId by ID (since message IDs are globally unique)
83
+ - **upstash**: Added `msg-idx:{messageId}` index for O(1) message lookups (backwards compatible with fallback to scan for old messages, with automatic backfill)
68
84
 
69
- ```typescript
70
- // Before v1 - invalid output would silently pass through
71
- await getUserTool.execute({});
72
- // { id: "123", name: "John" } - missing email
73
-
74
- // After v1 - validation error is returned
75
- await getUserTool.execute({});
76
- // {
77
- // error: true,
78
- // message: "Tool output validation failed for get-user. The tool returned invalid output:\n- email: Required\n\nReturned output: {...}",
79
- // validationErrors: { ... }
80
- // }
81
- ```
85
+ - Adds trace tagging support to the BrainTrust and Langfuse tracing exporters. ([#10765](https://github.com/mastra-ai/mastra/pull/10765))
86
+
87
+ - Add `messageList` parameter to `processOutputStream` for accessing remembered messages during streaming ([#10608](https://github.com/mastra-ai/mastra/pull/10608))
88
+
89
+ - Unify transformScoreRow functions across storage adapters ([#10648](https://github.com/mastra-ai/mastra/pull/10648))
90
+
91
+ Added a unified `transformScoreRow` function in `@mastra/core/storage` that provides schema-driven row transformation for score data. This eliminates code duplication across 10 storage adapters while maintaining store-specific behavior through configurable options:
92
+ - `preferredTimestampFields`: Preferred source fields for timestamps (PostgreSQL, Cloudflare D1)
93
+ - `convertTimestamps`: Convert timestamp strings to Date objects (MSSQL, MongoDB, ClickHouse)
94
+ - `nullValuePattern`: Skip values matching pattern (ClickHouse's `'_null_'`)
95
+ - `fieldMappings`: Map source column names to schema fields (LibSQL's `additionalLLMContext`)
96
+
97
+ Each store adapter now uses the unified function with appropriate options, reducing ~200 lines of duplicate transformation logic while ensuring consistent behavior across all storage backends.
82
98
 
83
99
  ### Patch Changes
84
100
 
85
- - dependencies updates: ([#10131](https://github.com/mastra-ai/mastra/pull/10131))
86
- - Updated dependency [`hono@^4.10.5` ↗︎](https://www.npmjs.com/package/hono/v/4.10.5) (from `^4.9.7`, in `dependencies`)
101
+ - dependencies updates: ([#10110](https://github.com/mastra-ai/mastra/pull/10110))
102
+ - Updated dependency [`hono-openapi@^1.1.1` ↗︎](https://www.npmjs.com/package/hono-openapi/v/1.1.1) (from `^0.4.8`, in `dependencies`)
103
+
104
+ - unexpected json parse issue, log error but dont fail ([#10241](https://github.com/mastra-ai/mastra/pull/10241))
105
+
106
+ - Fixed a bug in agent networks where sometimes the task name was empty ([#10629](https://github.com/mastra-ai/mastra/pull/10629))
107
+
108
+ - Adds `tool-result` and `tool-error` chunks to the processor.processOutputStream path. Processors now have access to these two chunks. ([#10645](https://github.com/mastra-ai/mastra/pull/10645))
109
+
110
+ - Include `.input` in workflow results for both engines and remove the option to omit them from Inngest workflows. ([#10688](https://github.com/mastra-ai/mastra/pull/10688))
111
+
112
+ - `getSpeakers` endpoint returns an empty array if voice is not configured on the agent and `getListeners` endpoint returns `{ enabled: false }` if voice is not figured on the agent. ([#10560](https://github.com/mastra-ai/mastra/pull/10560))
113
+
114
+ When no voice is set on agent don't throw error, by default set voice to undefined rather than DefaultVoice which throws errors when it is accessed.
115
+
116
+ - SimpleAuth and improved CloudAuth ([#10490](https://github.com/mastra-ai/mastra/pull/10490))
117
+
118
+ - When LLMs like Claude Sonnet 4.5 and Gemini 2.4 call tools with all-optional parameters, they send `args: undefined` instead of `args: {}`. This caused validation to fail with "root: Required". ([#10728](https://github.com/mastra-ai/mastra/pull/10728))
119
+
120
+ The fix normalizes `undefined`/`null` to `{}` for object schemas and `[]` for array schemas before validation.
121
+
122
+ - Fixed tool validation error messages so logs show Zod validation errors directly instead of hiding them inside structured JSON. ([#10579](https://github.com/mastra-ai/mastra/pull/10579))
123
+
124
+ - Fix error when spreading config objects in Mastra constructor ([#10718](https://github.com/mastra-ai/mastra/pull/10718))
87
125
 
88
- - Only handle download image asset transformation if needed ([#10122](https://github.com/mastra-ai/mastra/pull/10122))
126
+ Adds validation guards to handle undefined/null values that can occur when config objects are spread (`{ ...config }`). Previously, if getters or non-enumerable properties resulted in undefined values during spread, the constructor would throw cryptic errors when accessing `.id` or `.name` on undefined objects.
89
127
 
90
- - Add serializedStepGraph to runExecutionResult response ([#10004](https://github.com/mastra-ai/mastra/pull/10004))
128
+ - Fix GPT-5/o3 reasoning models failing with "required reasoning item" errors when using memory with tools. Empty reasoning is now stored with providerMetadata to preserve OpenAI's item_reference. ([#10585](https://github.com/mastra-ai/mastra/pull/10585))
91
129
 
92
- - Fix tool outputSchema validation to allow unsupported Zod types like ZodTuple. The outputSchema is only used for internal validation and never sent to the LLM, so model compatibility checks are not needed. ([#9409](https://github.com/mastra-ai/mastra/pull/9409))
130
+ - Fix generateTitle model type to accept AI SDK LanguageModelV2 ([#10541](https://github.com/mastra-ai/mastra/pull/10541))
93
131
 
94
- - Fix vector definition to fix pinecone ([#10150](https://github.com/mastra-ai/mastra/pull/10150))
132
+ Updated the `generateTitle.model` config option to accept `MastraModelConfig` instead of `MastraLanguageModel`. This allows users to pass raw AI SDK `LanguageModelV2` models (e.g., `anthropic.languageModel('claude-3-5-haiku-20241022')`) directly without type errors.
95
133
 
96
- - fix resumeStream type to use resumeSchema ([#10202](https://github.com/mastra-ai/mastra/pull/10202))
134
+ Previously, passing a standard `LanguageModelV2` would fail because `MastraLanguageModelV2` has different `doGenerate`/`doStream` return types. Now `MastraModelConfig` is used consistently across:
135
+ - `memory/types.ts` - `generateTitle.model` config
136
+ - `agent.ts` - `genTitle`, `generateTitleFromUserMessage`, `resolveTitleGenerationConfig`
137
+ - `agent-legacy.ts` - `AgentLegacyCapabilities` interface
97
138
 
98
- - Add type bailed to workflowRunStatus ([#10091](https://github.com/mastra-ai/mastra/pull/10091))
139
+ - Fix message ordering when using toAISdkV5Messages or prepareStep ([#10686](https://github.com/mastra-ai/mastra/pull/10686))
99
140
 
100
- - default validate inputs to true in Workflow execute ([#10222](https://github.com/mastra-ai/mastra/pull/10222))
141
+ Messages without `createdAt` timestamps were getting shuffled because they all received identical timestamps during conversion. Now messages are assigned monotonically increasing timestamps via `generateCreatedAt()`, preserving input order.
101
142
 
102
- - Add support for doGenerate in LanguageModelV2. This change fixes issues with OpenAI stream permissions. ([#10239](https://github.com/mastra-ai/mastra/pull/10239))
103
- - Added new abstraction over LanguageModelV2
143
+ Before:
104
144
 
105
- - Fix input tool validation when no inputSchema is provided ([#9941](https://github.com/mastra-ai/mastra/pull/9941))
145
+ ```
146
+ Input: [user: "hello", assistant: "Hi!", user: "bye"]
147
+ Output: [user: "bye", assistant: "Hi!", user: "hello"] // shuffled!
148
+ ```
149
+
150
+ After:
151
+
152
+ ```
153
+ Input: [user: "hello", assistant: "Hi!", user: "bye"]
154
+ Output: [user: "hello", assistant: "Hi!", user: "bye"] // correct order
155
+ ```
156
+
157
+ - Fix Scorer not using custom gateways registered with Mastra ([#10778](https://github.com/mastra-ai/mastra/pull/10778))
158
+
159
+ Scorers now have access to custom gateways when resolving models. Previously, calling `resolveModelConfig` in the scorer didn't pass the Mastra instance, so custom gateways were never available.
106
160
 
107
- - Adds ability to create custom `MastraModelGateway`'s that can be added to the `Mastra` class instance under the `gateways` property. Giving you typescript autocompletion in any model picker string. ([#10180](https://github.com/mastra-ai/mastra/pull/10180))
161
+ - Fix workflow run status not being updated from storage snapshot in createRun ([#10664](https://github.com/mastra-ai/mastra/pull/10664))
162
+
163
+ When createRun is called with an existing runId, it now correctly updates the run's status from the storage snapshot. This fixes the issue where different workflow instances (e.g., different API requests) would get a run with 'pending' status instead of the correct status from storage (e.g., 'suspended').
164
+
165
+ - Pass resourceId and threadId to network agent's subAgent when it has its own memory ([#10592](https://github.com/mastra-ai/mastra/pull/10592))
166
+
167
+ - use `agent.getMemory` to fetch the memory instance on the Agent class to make sure that storage gets set if memory doesn't set it itself. ([#10556](https://github.com/mastra-ai/mastra/pull/10556))
168
+
169
+ - Built-in processors that use internal agents (PromptInjectionDetector, ModerationProcessor, PIIDetector, LanguageDetector, StructuredOutputProcessor) now accept `providerOptions` to control model behavior. ([#10651](https://github.com/mastra-ai/mastra/pull/10651))
170
+
171
+ This lets you pass provider-specific settings like `reasoningEffort` for OpenAI thinking models:
108
172
 
109
173
  ```typescript
110
- import { MastraModelGateway, type ProviderConfig } from '@mastra/core/llm';
111
- import { createOpenAICompatible } from '@ai-sdk/openai-compatible-v5';
112
- import type { LanguageModelV2 } from '@ai-sdk/provider-v5';
113
-
114
- class MyCustomGateway extends MastraModelGateway {
115
- readonly id = 'my-custom-gateway';
116
- readonly name = 'My Custom Gateway';
117
- readonly prefix = 'custom';
118
-
119
- async fetchProviders(): Promise<Record<string, ProviderConfig>> {
120
- return {
121
- 'my-provider': {
122
- name: 'My Provider',
123
- models: ['model-1', 'model-2'],
124
- apiKeyEnvVar: 'MY_API_KEY',
125
- gateway: this.id,
126
- },
127
- };
128
- }
129
-
130
- buildUrl(modelId: string, envVars?: Record<string, string>): string {
131
- return 'https://api.my-provider.com/v1';
132
- }
133
-
134
- async getApiKey(modelId: string): Promise<string> {
135
- const apiKey = process.env.MY_API_KEY;
136
- if (!apiKey) throw new Error('MY_API_KEY not set');
137
- return apiKey;
138
- }
139
-
140
- async resolveLanguageModel({
141
- modelId,
142
- providerId,
143
- apiKey,
144
- }: {
145
- modelId: string;
146
- providerId: string;
147
- apiKey: string;
148
- }): Promise<LanguageModelV2> {
149
- const baseURL = this.buildUrl(`${providerId}/${modelId}`);
150
- return createOpenAICompatible({
151
- name: providerId,
152
- apiKey,
153
- baseURL,
154
- }).chatModel(modelId);
155
- }
156
- }
157
-
158
- new Mastra({
159
- gateways: {
160
- myGateway: new MyCustomGateway(),
174
+ const processor = new PromptInjectionDetector({
175
+ model: 'openai/o1-mini',
176
+ threshold: 0.7,
177
+ strategy: 'block',
178
+ providerOptions: {
179
+ openai: {
180
+ reasoningEffort: 'low',
181
+ },
161
182
  },
162
183
  });
163
184
  ```
164
185
 
165
- - Add an additional check to determine whether the model natively supports specific file types. Only download the file if the model does not support it natively. ([#9790](https://github.com/mastra-ai/mastra/pull/9790))
186
+ - Improved typing for `workflow.then` to allow the provided steps `inputSchema` to be a subset of the previous steps `outputSchema`. Also errors if the provided steps `inputSchema` is a superset of the previous steps outputSchema. ([#10763](https://github.com/mastra-ai/mastra/pull/10763))
166
187
 
167
- - Add restart method to workflow run that allows restarting an active workflow run ([#9750](https://github.com/mastra-ai/mastra/pull/9750))
168
- Add status filter to `listWorkflowRuns`
169
- Add automatic restart to restart active workflow runs when server starts
188
+ - Fix type issue with workflow `.parallel()` when passing multiple steps, one or more of which has a `resumeSchema` provided. ([#10708](https://github.com/mastra-ai/mastra/pull/10708))
170
189
 
171
- - Validate schemas by default in workflow. Previously, if you want schemas in the workflow to be validated, you'd have to add `validateInputs` option, now, this will be done by default but can be disabled. ([#10186](https://github.com/mastra-ai/mastra/pull/10186))
190
+ - Adds bidirectional integration with otel tracing via a new @mastra/otel-bridge package. ([#10482](https://github.com/mastra-ai/mastra/pull/10482))
172
191
 
173
- For workflows whose schemas and step schemas you don't want validated, do this
192
+ - Adds `processInputStep` method to the Processor interface. Unlike `processInput` which runs once at the start, this runs at each step of the agentic loop (including tool call continuations). ([#10650](https://github.com/mastra-ai/mastra/pull/10650))
174
193
 
175
- ```diff
176
- createWorkflow({
177
- + options: {
178
- + validateInputs: false
179
- + }
180
- })
194
+ ```ts
195
+ const processor: Processor = {
196
+ id: 'my-processor',
197
+ processInputStep: async ({ messages, messageList, stepNumber, systemMessages }) => {
198
+ // Transform messages at each step before LLM call
199
+ return messageList;
200
+ },
201
+ };
181
202
  ```
182
203
 
183
- - Fix inngest parallel workflow ([#10169](https://github.com/mastra-ai/mastra/pull/10169))
184
- Fix tool as step in inngest
185
- Fix inngest nested workflow
204
+ - When using output processors with `agent.generate()`, `result.text` was returning the unprocessed LLM response instead of the processed text. ([#10735](https://github.com/mastra-ai/mastra/pull/10735))
205
+
206
+ **Before:**
186
207
 
187
- - Add timeTravel to workflows. This makes it possible to start a workflow run from a particular step in the workflow ([#9994](https://github.com/mastra-ai/mastra/pull/9994))
208
+ ```ts
209
+ const result = await agent.generate('hello');
210
+ result.text; // "hello world" (unprocessed)
211
+ result.response.messages[0].content[0].text; // "HELLO WORLD" (processed)
212
+ ```
188
213
 
189
- Example code:
214
+ **After:**
190
215
 
191
216
  ```ts
192
- const result = await run.timeTravel({
193
- step: 'step2',
194
- inputData: {
195
- value: 'input',
196
- },
197
- });
217
+ const result = await agent.generate('hello');
218
+ result.text; // "HELLO WORLD" (processed)
198
219
  ```
199
220
 
200
- - Fixes assets not being downloaded when available ([#10079](https://github.com/mastra-ai/mastra/pull/10079))
221
+ The bug was caused by the `text` delayed promise being resolved twice - first correctly with the processed text, then overwritten with the unprocessed buffered text.
201
222
 
202
- - Remove unused dependencies ([#10019](https://github.com/mastra-ai/mastra/pull/10019))
223
+ - Refactored default engine to fit durable execution better, and the inngest engine to match. ([#10627](https://github.com/mastra-ai/mastra/pull/10627))
224
+ Also fixes requestContext persistence by relying on inngest step memoization.
203
225
 
204
- - Updated dependencies [[`a64d16a`](https://github.com/mastra-ai/mastra/commit/a64d16aedafe57ee5707bdcc25f96e07fa1a0233)]:
205
- - @mastra/observability@1.0.0-beta.1
226
+ Unifies some of the stepResults and error formats in both engines.
206
227
 
207
- ## 1.0.0-beta.2
228
+ - Allow direct access to server app handle directly from Mastra instance. ([#10598](https://github.com/mastra-ai/mastra/pull/10598))
208
229
 
209
- ### Patch Changes
230
+ ```ts
231
+ // Before: HTTP request to localhost
232
+ const response = await fetch(`http://localhost:5000/api/tools`);
210
233
 
211
- - Make suspendPayload optional when calling `suspend()` ([#9926](https://github.com/mastra-ai/mastra/pull/9926))
212
- Save value returned as `suspendOutput` if user returns data still after calling `suspend()`
213
- Automatically call `commit()` on uncommitted workflows when registering in Mastra instance
214
- Show actual suspendPayload on Studio in suspend/resume flow
234
+ // After: Direct call via app.fetch()
235
+ const app = mastra.getServerApp<Hono>();
236
+ const response = await app.fetch(new Request('http://internal/api/tools'));
237
+ ```
215
238
 
216
- ## 1.0.0-beta.1
239
+ - Added `mastra.getServerApp<T>()` to access the underlying Hono/Express app
240
+ - Added `mastra.getMastraServer()` and `mastra.setMastraServer()` for adapter access
241
+ - Added `MastraServerBase` class in `@mastra/core/server` for adapter implementations
242
+ - Server adapters now auto-register with Mastra in their constructor
217
243
 
218
- ### Patch Changes
244
+ - Fix network agent not getting `text-delta` from subAgent when `.stream` is used ([#10533](https://github.com/mastra-ai/mastra/pull/10533))
219
245
 
220
- - Set correct peer dependency range for `@mastra/observability` ([#9908](https://github.com/mastra-ai/mastra/pull/9908))
246
+ - Fix discriminatedUnion schema information lost when json schema is converted to zod ([#10500](https://github.com/mastra-ai/mastra/pull/10500))
221
247
 
222
- - Add visual styles and labels for more workflow node types ([#9777](https://github.com/mastra-ai/mastra/pull/9777))
248
+ - Fix writer.custom not working during workflow resume operations ([#10720](https://github.com/mastra-ai/mastra/pull/10720))
223
249
 
224
- - `registerApiRoute` now accepts a `requiresAuth` option, so custom endpoints can opt in/out of Mastra auth without mutating the returned route object.
250
+ When a workflow step is resumed, the writer parameter was not being properly passed through, causing writer.custom() calls to fail. This fix ensures the writableStream parameter is correctly passed to both run.resume() and run.start() calls in the workflow execution engine, allowing custom events to be emitted properly during resume operations.
225
251
 
226
- ## 1.0.0-beta.0
252
+ - Fix corrupted provider-registry.json file in global cache and regenerate corrupted files ([#10606](https://github.com/mastra-ai/mastra/pull/10606))
227
253
 
228
- ### Major Changes
254
+ - Fix TypeScript error when using Zod schemas in `defaultOptions.structuredOutput` ([#10710](https://github.com/mastra-ai/mastra/pull/10710))
229
255
 
230
- - Moving scorers under the eval domain, api method consistency, prebuilt evals, scorers require ids. ([#9589](https://github.com/mastra-ai/mastra/pull/9589))
256
+ Previously, defining `structuredOutput.schema` in `defaultOptions` would cause a TypeScript error because the type only accepted `undefined`. Now any valid `OutputSchema` is correctly accepted.
231
257
 
232
- - **BREAKING CHANGE**: Scorers for Agents will now use `MastraDBMessage` instead of `UIMessage` ([#9702](https://github.com/mastra-ai/mastra/pull/9702))
233
- - Scorer input/output types now use `MastraDBMessage[]` with nested `content` object structure
234
- - Added `getTextContentFromMastraDBMessage()` helper function to extract text content from `MastraDBMessage` objects
235
- - Added `createTestMessage()` helper function for creating `MastraDBMessage` objects in tests with optional tool invocations support
236
- - Updated `extractToolCalls()` to access tool invocations from nested `content` structure
237
- - Updated `getUserMessageFromRunInput()` and `getAssistantMessageFromRunOutput()` to use new message structure
238
- - Removed `createUIMessage()`
258
+ - Add support for `providerOptions` when defining tools. This allows developers to specify provider-specific configurations (like Anthropic's `cacheControl`) per tool. ([#10649](https://github.com/mastra-ai/mastra/pull/10649))
239
259
 
240
- - Every Mastra primitive (agent, MCPServer, workflow, tool, processor, scorer, and vector) now has a get, list, and add method associated with it. Each primitive also now requires an id to be set. ([#9675](https://github.com/mastra-ai/mastra/pull/9675))
260
+ ```typescript
261
+ createTool({
262
+ id: 'my-tool',
263
+ providerOptions: {
264
+ anthropic: { cacheControl: { type: 'ephemeral' } },
265
+ },
266
+ // ...
267
+ });
268
+ ```
241
269
 
242
- Primitives that are added to other primitives are also automatically added to the Mastra instance
270
+ - Fixed OpenAI reasoning message merging so distinct reasoning items are no longer dropped when they share a message ID. Prevents downstream errors where a function call is missing its required "reasoning" item. See #9005. ([#10614](https://github.com/mastra-ai/mastra/pull/10614))
243
271
 
244
- - Update handlers to use `listWorkflowRuns` instead of `getWorkflowRuns`. Fix type names from `StoragelistThreadsByResourceIdInput/Output` to `StorageListThreadsByResourceIdInput/Output`. ([#9507](https://github.com/mastra-ai/mastra/pull/9507))
272
+ - Updated dependencies [[`103586c`](https://github.com/mastra-ai/mastra/commit/103586cb23ebcd2466c7f68a71674d37cc10e263), [`61a5705`](https://github.com/mastra-ai/mastra/commit/61a570551278b6743e64243b3ce7d73de915ca8a), [`db70a48`](https://github.com/mastra-ai/mastra/commit/db70a48aeeeeb8e5f92007e8ede52c364ce15287), [`f03ae60`](https://github.com/mastra-ai/mastra/commit/f03ae60500fe350c9d828621006cdafe1975fdd8)]:
273
+ - @mastra/observability@1.0.0-beta.2
274
+ - @mastra/schema-compat@1.0.0-beta.2
245
275
 
246
- - **BREAKING:** Remove `getMessagesPaginated()` and add `perPage: false` support ([#9670](https://github.com/mastra-ai/mastra/pull/9670))
276
+ ## 1.0.0-beta.5
247
277
 
248
- Removes deprecated `getMessagesPaginated()` method. The `listMessages()` API and score handlers now support `perPage: false` to fetch all records without pagination limits.
278
+ ### Patch Changes
279
+
280
+ - Add Azure OpenAI gateway ([#9990](https://github.com/mastra-ai/mastra/pull/9990))
249
281
 
250
- **Storage changes:**
251
- - `StoragePagination.perPage` type changed from `number` to `number | false`
252
- - All storage implementations support `perPage: false`:
253
- - Memory: `listMessages()`
254
- - Scores: `listScoresBySpan()`, `listScoresByRunId()`, `listScoresByExecutionId()`
255
- - HTTP query parser accepts `"false"` string (e.g., `?perPage=false`)
282
+ The Azure OpenAI gateway supports three configuration modes:
283
+ 1. **Static deployments**: Provide deployment names from Azure Portal
284
+ 2. **Dynamic discovery**: Query Azure Management API for available deployments
285
+ 3. **Manual**: Specify deployment names when creating agents
256
286
 
257
- **Memory changes:**
258
- - `memory.query()` parameter type changed from `StorageGetMessagesArg` to `StorageListMessagesInput`
259
- - Uses flat parameters (`page`, `perPage`, `include`, `filter`, `vectorSearchString`) instead of `selectBy` object
287
+ ## Usage
260
288
 
261
- **Stricter validation:**
262
- - `listMessages()` requires non-empty, non-whitespace `threadId` (throws error instead of returning empty results)
289
+ ```typescript
290
+ import { Mastra } from '@mastra/core';
291
+ import { AzureOpenAIGateway } from '@mastra/core/llm';
292
+
293
+ // Static mode (recommended)
294
+ export const mastra = new Mastra({
295
+ gateways: [
296
+ new AzureOpenAIGateway({
297
+ resourceName: process.env.AZURE_RESOURCE_NAME!,
298
+ apiKey: process.env.AZURE_API_KEY!,
299
+ deployments: ['gpt-4-prod', 'gpt-35-turbo-dev'],
300
+ }),
301
+ ],
302
+ });
263
303
 
264
- **Migration:**
304
+ // Dynamic discovery mode
305
+ export const mastra = new Mastra({
306
+ gateways: [
307
+ new AzureOpenAIGateway({
308
+ resourceName: process.env.AZURE_RESOURCE_NAME!,
309
+ apiKey: process.env.AZURE_API_KEY!,
310
+ management: {
311
+ tenantId: process.env.AZURE_TENANT_ID!,
312
+ clientId: process.env.AZURE_CLIENT_ID!,
313
+ clientSecret: process.env.AZURE_CLIENT_SECRET!,
314
+ subscriptionId: process.env.AZURE_SUBSCRIPTION_ID!,
315
+ resourceGroup: 'my-resource-group',
316
+ },
317
+ }),
318
+ ],
319
+ });
320
+
321
+ // Use Azure OpenAI models
322
+ const agent = new Agent({
323
+ model: 'azure-openai/gpt-4-deployment',
324
+ instructions: 'You are a helpful assistant',
325
+ });
326
+ ```
327
+
328
+ - - Fix tool suspension throwing error when `outputSchema` is passed to tool during creation ([#10444](https://github.com/mastra-ai/mastra/pull/10444))
329
+ - Pass `suspendSchema` and `resumeSchema` from tool into step created when creating step from tool
330
+
331
+ - Add `onOutput` hook for tools ([#10466](https://github.com/mastra-ai/mastra/pull/10466))
332
+
333
+ Tools now support an `onOutput` lifecycle hook that is invoked after successful tool execution. This complements the existing `onInputStart`, `onInputDelta`, and `onInputAvailable` hooks to provide complete visibility into the tool execution lifecycle.
334
+
335
+ The `onOutput` hook receives:
336
+ - `output`: The tool's return value (typed according to `outputSchema`)
337
+ - `toolCallId`: Unique identifier for the tool call
338
+ - `toolName`: The name of the tool that was executed
339
+ - `abortSignal`: Signal for detecting if the operation should be cancelled
340
+
341
+ Example usage:
265
342
 
266
343
  ```typescript
267
- // Storage/Memory: Replace getMessagesPaginated with listMessages
268
- - storage.getMessagesPaginated({ threadId, selectBy: { pagination: { page: 0, perPage: 20 } } })
269
- + storage.listMessages({ threadId, page: 0, perPage: 20 })
270
- + storage.listMessages({ threadId, page: 0, perPage: false }) // Fetch all
271
-
272
- // Memory: Replace selectBy with flat parameters
273
- - memory.query({ threadId, selectBy: { last: 20, include: [...] } })
274
- + memory.query({ threadId, perPage: 20, include: [...] })
275
-
276
- // Client SDK
277
- - thread.getMessagesPaginated({ selectBy: { pagination: { page: 0 } } })
278
- + thread.listMessages({ page: 0, perPage: 20 })
344
+ import { createTool } from '@mastra/core/tools';
345
+ import { z } from 'zod';
346
+
347
+ export const weatherTool = createTool({
348
+ id: 'weather-tool',
349
+ description: 'Get weather information',
350
+ outputSchema: z.object({
351
+ temperature: z.number(),
352
+ conditions: z.string(),
353
+ }),
354
+ execute: async input => {
355
+ return { temperature: 72, conditions: 'sunny' };
356
+ },
357
+ onOutput: ({ output, toolCallId, toolName }) => {
358
+ console.log(`${toolName} completed:`, output);
359
+ // output is fully typed based on outputSchema
360
+ },
361
+ });
279
362
  ```
280
363
 
281
- - # Major Changes ([#9695](https://github.com/mastra-ai/mastra/pull/9695))
364
+ Hook execution order:
365
+ 1. `onInputStart` - Input streaming begins
366
+ 2. `onInputDelta` - Input chunks arrive (called multiple times)
367
+ 3. `onInputAvailable` - Complete input parsed and validated
368
+ 4. Tool's `execute` function runs
369
+ 5. `onOutput` - Tool completed successfully (NEW)
370
+
371
+ - Add new deleteVectors, updateVector by filter ([#10408](https://github.com/mastra-ai/mastra/pull/10408))
372
+
373
+ - Fix base64 encoded images with threads - issue #10480 ([#10483](https://github.com/mastra-ai/mastra/pull/10483))
374
+
375
+ Fixed "Invalid URL" error when using base64 encoded images (without `data:` prefix) in agent calls with threads and resources. Raw base64 strings are now automatically converted to proper data URIs before being processed.
376
+
377
+ **Changes:**
378
+ - Updated `attachments-to-parts.ts` to detect and convert raw base64 strings to data URIs
379
+ - Fixed `MessageList` image processing to handle raw base64 in two locations:
380
+ - Image part conversion in `aiV4CoreMessageToV1PromptMessage`
381
+ - File part to experimental_attachments conversion in `mastraDBMessageToAIV4UIMessage`
382
+ - Added comprehensive tests for base64 images, data URIs, and HTTP URLs with threads
383
+
384
+ **Breaking Change:** None - this is a bug fix that maintains backward compatibility while adding support for raw base64 strings.
385
+
386
+ - Fix message metadata not persisting when using simple message format. Previously, custom metadata passed in messages (e.g., `{role: 'user', content: 'text', metadata: {userId: '123'}}`) was not being saved to the database. This occurred because the CoreMessage conversion path didn't preserve metadata fields. ([#10488](https://github.com/mastra-ai/mastra/pull/10488))
387
+
388
+ Now metadata is properly preserved for all message input formats:
389
+ - Simple CoreMessage format: `{role, content, metadata}`
390
+ - Full UIMessage format: `{role, content, parts, metadata}`
391
+ - AI SDK v5 ModelMessage format with metadata
392
+
393
+ Fixes #8556
394
+
395
+ - feat: Composite auth implementation ([#10359](https://github.com/mastra-ai/mastra/pull/10359))
396
+
397
+ - Fix requireApproval property being ignored for tools passed via toolsets, clientTools, and memoryTools parameters. The requireApproval flag now correctly propagates through all tool conversion paths, ensuring tools requiring approval will properly request user approval before execution. ([#10464](https://github.com/mastra-ai/mastra/pull/10464))
282
398
 
283
- ## Storage Layer
399
+ - Add timeTravel APIs and add timeTravel feature to studio ([#10361](https://github.com/mastra-ai/mastra/pull/10361))
284
400
 
285
- ### BREAKING: Removed `storage.getMessages()`
401
+ - Fix Azure Foundry rate limit handling for -1 values ([#10409](https://github.com/mastra-ai/mastra/pull/10409))
286
402
 
287
- The `getMessages()` method has been removed from all storage implementations. Use `listMessages()` instead, which provides pagination support.
403
+ - Fix model headers not being passed through gateway system ([#10465](https://github.com/mastra-ai/mastra/pull/10465))
288
404
 
289
- **Migration:**
405
+ Previously, custom headers specified in `MastraModelConfig` were not being passed through the gateway system to model providers. This affected:
406
+ - OpenRouter (preventing activity tracking with `HTTP-Referer` and `X-Title`)
407
+ - Custom providers using custom URLs (headers not passed to `createOpenAICompatible`)
408
+ - Custom gateway implementations (headers not available in `resolveLanguageModel`)
409
+
410
+ Now headers are correctly passed through the entire gateway system:
411
+ - Base `MastraModelGateway` interface updated to accept headers
412
+ - `ModelRouterLanguageModel` passes headers from config to all gateways
413
+ - OpenRouter receives headers for activity tracking
414
+ - Custom URL providers receive headers via `createOpenAICompatible`
415
+ - Custom gateways can access headers in their `resolveLanguageModel` implementation
416
+
417
+ Example usage:
290
418
 
291
419
  ```typescript
292
- // Before
293
- const messages = await storage.getMessages({ threadId: 'thread-1' });
294
-
295
- // After
296
- const result = await storage.listMessages({
297
- threadId: 'thread-1',
298
- page: 0,
299
- perPage: 50,
420
+ // Works with OpenRouter
421
+ const agent = new Agent({
422
+ name: 'my-agent',
423
+ instructions: 'You are a helpful assistant.',
424
+ model: {
425
+ id: 'openrouter/anthropic/claude-3-5-sonnet',
426
+ headers: {
427
+ 'HTTP-Referer': 'https://myapp.com',
428
+ 'X-Title': 'My Application',
429
+ },
430
+ },
431
+ });
432
+
433
+ // Also works with custom providers
434
+ const customAgent = new Agent({
435
+ name: 'custom-agent',
436
+ instructions: 'You are a helpful assistant.',
437
+ model: {
438
+ id: 'custom-provider/model',
439
+ url: 'https://api.custom.com/v1',
440
+ apiKey: 'key',
441
+ headers: {
442
+ 'X-Custom-Header': 'custom-value',
443
+ },
444
+ },
300
445
  });
446
+ ```
447
+
448
+ Fixes https://github.com/mastra-ai/mastra/issues/9760
449
+
450
+ - fix(agent): persist messages before tool suspension ([#10369](https://github.com/mastra-ai/mastra/pull/10369))
451
+
452
+ Fixes issues where thread and messages were not saved before suspension when tools require approval or call suspend() during execution. This caused conversation history to be lost if users refreshed during tool approval or suspension.
453
+
454
+ **Backend changes (@mastra/core):**
455
+ - Add assistant messages to messageList immediately after LLM execution
456
+ - Flush messages synchronously before suspension to persist state
457
+ - Create thread if it doesn't exist before flushing
458
+ - Add metadata helpers to persist and remove tool approval state
459
+ - Pass saveQueueManager and memory context through workflow for immediate persistence
460
+
461
+ **Frontend changes (@mastra/react):**
462
+ - Extract runId from pending approvals to enable resumption after refresh
463
+ - Convert `pendingToolApprovals` (DB format) to `requireApprovalMetadata` (runtime format)
464
+ - Handle both `dynamic-tool` and `tool-{NAME}` part types for approval state
465
+ - Change runId from hardcoded `agentId` to unique `uuid()`
466
+
467
+ **UI changes (@mastra/playground-ui):**
468
+ - Handle tool calls awaiting approval in message initialization
469
+ - Convert approval metadata format when loading initial messages
470
+
471
+ Fixes #9745, #9906
472
+
473
+ - Update MockMemory to work with new storage API changes. MockMemory now properly implements all abstract MastraMemory methods. This includes proper thread management, message saving with MessageList conversion, working memory operations with scope support, and resource listing. ([#10368](https://github.com/mastra-ai/mastra/pull/10368))
474
+
475
+ Add Zod v4 support for working memory schemas. Memory implementations now check for Zod v4's built-in `.toJsonSchema()` method before falling back to the `zodToJsonSchema` compatibility function, improving performance and forward compatibility while maintaining backward compatibility with Zod v3.
476
+
477
+ Add Gemini 3 Pro test coverage in agent-gemini.test.ts to validate the latest Gemini model integration.
478
+
479
+ - Fix race condition in parallel tool stream writes ([#10463](https://github.com/mastra-ai/mastra/pull/10463))
480
+
481
+ Introduces a write queue to ToolStream to serialize access to the underlying stream, preventing writer locked errors
482
+
483
+ - Remove unneeded console warning when flushing messages and no threadId or saveQueueManager is found. ([#10498](https://github.com/mastra-ai/mastra/pull/10498))
484
+
485
+ - Add optional includeRawChunks parameter to agent execution options, ([#10456](https://github.com/mastra-ai/mastra/pull/10456))
486
+ allowing users to include raw chunks in stream output where supported
487
+ by the model provider.
488
+
489
+ - When `mastra dev` runs, multiple processes can write to `provider-registry.json` concurrently (auto-refresh, syncGateways, syncGlobalCacheToLocal). This causes file corruption where the end of the JSON appears twice, making it unparseable. ([#10455](https://github.com/mastra-ai/mastra/pull/10455))
490
+
491
+ The fix uses atomic writes via the write-to-temp-then-rename pattern. Instead of:
492
+
493
+ ```ts
494
+ fs.writeFileSync(filePath, content, 'utf-8');
495
+ ```
496
+
497
+ We now do:
498
+
499
+ ```ts
500
+ const tempPath = `${filePath}.${process.pid}.${Date.now()}.${randomSuffix}.tmp`;
301
501
 
302
- ... 5343 more lines hidden. See full changelog in package directory.
502
+ ... 5741 more lines hidden. See full changelog in package directory.