@mastra/mcp-docs-server 1.0.0-beta.0 → 1.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (496) hide show
  1. package/.docs/organized/changelogs/%40internal%2Fchangeset-cli.md +1 -15
  2. package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +1 -7
  3. package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +201 -1
  4. package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +1 -55
  5. package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +201 -1
  6. package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +250 -50
  7. package/.docs/organized/changelogs/%40mastra%2Fastra.md +201 -1
  8. package/.docs/organized/changelogs/%40mastra%2Fauth.md +6 -0
  9. package/.docs/organized/changelogs/%40mastra%2Fchroma.md +201 -1
  10. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +201 -1
  11. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +201 -1
  12. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +201 -1
  13. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +201 -1
  14. package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +26 -0
  15. package/.docs/organized/changelogs/%40mastra%2Fconvex.md +89 -0
  16. package/.docs/organized/changelogs/%40mastra%2Fcore.md +396 -196
  17. package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +201 -1
  18. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +201 -1
  19. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +201 -1
  20. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +201 -1
  21. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +201 -1
  22. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +200 -0
  23. package/.docs/organized/changelogs/%40mastra%2Fduckdb.md +42 -0
  24. package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +201 -1
  25. package/.docs/organized/changelogs/%40mastra%2Felasticsearch.md +61 -0
  26. package/.docs/organized/changelogs/%40mastra%2Fevals.md +201 -1
  27. package/.docs/organized/changelogs/%40mastra%2Flance.md +201 -1
  28. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +201 -1
  29. package/.docs/organized/changelogs/%40mastra%2Floggers.md +201 -1
  30. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +201 -1
  31. package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +201 -1
  32. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +201 -1
  33. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +201 -1
  34. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +201 -1
  35. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +201 -1
  36. package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +201 -1
  37. package/.docs/organized/changelogs/%40mastra%2Fpg.md +201 -1
  38. package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +201 -1
  39. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +251 -51
  40. package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +201 -1
  41. package/.docs/organized/changelogs/%40mastra%2Frag.md +201 -1
  42. package/.docs/organized/changelogs/%40mastra%2Freact.md +128 -1
  43. package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +18 -0
  44. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +42 -0
  45. package/.docs/organized/changelogs/%40mastra%2Fserver.md +251 -51
  46. package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +201 -1
  47. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +201 -1
  48. package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +201 -1
  49. package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +201 -1
  50. package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +201 -1
  51. package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +201 -1
  52. package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +201 -1
  53. package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +92 -1
  54. package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +67 -1
  55. package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +201 -1
  56. package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +201 -1
  57. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +201 -1
  58. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +201 -1
  59. package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +201 -1
  60. package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +201 -1
  61. package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +201 -1
  62. package/.docs/organized/changelogs/create-mastra.md +201 -1
  63. package/.docs/organized/changelogs/mastra.md +201 -1
  64. package/.docs/organized/code-examples/agui.md +1 -0
  65. package/.docs/organized/code-examples/ai-elements.md +2 -2
  66. package/.docs/organized/code-examples/ai-sdk-useChat.md +2 -2
  67. package/.docs/organized/code-examples/ai-sdk-v5.md +3 -2
  68. package/.docs/organized/code-examples/assistant-ui.md +2 -2
  69. package/.docs/organized/code-examples/bird-checker-with-express.md +1 -1
  70. package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +2 -2
  71. package/.docs/organized/code-examples/bird-checker-with-nextjs.md +2 -2
  72. package/.docs/organized/code-examples/client-side-tools.md +1 -1
  73. package/.docs/organized/code-examples/crypto-chatbot.md +2 -2
  74. package/.docs/organized/code-examples/fireworks-r1.md +1 -1
  75. package/.docs/organized/code-examples/heads-up-game.md +1 -1
  76. package/.docs/organized/code-examples/mcp-configuration.md +0 -3
  77. package/.docs/organized/code-examples/mcp-server-adapters.md +720 -0
  78. package/.docs/organized/code-examples/memory-per-resource-example.md +1 -1
  79. package/.docs/organized/code-examples/memory-with-processors.md +1 -1
  80. package/.docs/organized/code-examples/openapi-spec-writer.md +1 -1
  81. package/.docs/organized/code-examples/processors-with-ai-sdk.md +14 -0
  82. package/.docs/organized/code-examples/quick-start.md +2 -2
  83. package/.docs/organized/code-examples/server-app-access.md +342 -0
  84. package/.docs/organized/code-examples/server-express-adapter.md +87 -0
  85. package/.docs/organized/code-examples/server-hono-adapter.md +85 -0
  86. package/.docs/organized/code-examples/stock-price-tool.md +1 -21
  87. package/.docs/organized/code-examples/workflow-ai-recruiter.md +1 -1
  88. package/.docs/organized/code-examples/workflow-with-inline-steps.md +1 -1
  89. package/.docs/organized/code-examples/workflow-with-memory.md +1 -1
  90. package/.docs/organized/code-examples/workflow-with-separate-steps.md +1 -1
  91. package/.docs/organized/code-examples/workflow-with-suspend-resume.md +1 -1
  92. package/.docs/raw/agents/adding-voice.mdx +56 -10
  93. package/.docs/raw/agents/agent-approval.mdx +189 -0
  94. package/.docs/raw/agents/agent-memory.mdx +2 -2
  95. package/.docs/raw/agents/guardrails.mdx +27 -24
  96. package/.docs/raw/agents/networks.mdx +3 -3
  97. package/.docs/raw/agents/overview.mdx +19 -168
  98. package/.docs/raw/agents/processors.mdx +279 -0
  99. package/.docs/raw/agents/structured-output.mdx +224 -0
  100. package/.docs/raw/agents/using-tools.mdx +14 -14
  101. package/.docs/raw/auth/auth0.mdx +2 -2
  102. package/.docs/raw/auth/clerk.mdx +2 -2
  103. package/.docs/raw/auth/firebase.mdx +2 -2
  104. package/.docs/raw/auth/index.mdx +1 -1
  105. package/.docs/raw/auth/jwt.mdx +2 -2
  106. package/.docs/raw/auth/supabase.mdx +2 -2
  107. package/.docs/raw/auth/workos.mdx +2 -2
  108. package/.docs/raw/community/contributing-templates.mdx +1 -1
  109. package/.docs/raw/community/discord.mdx +2 -2
  110. package/.docs/raw/community/licensing.mdx +1 -1
  111. package/.docs/raw/course/01-first-agent/03-verifying-installation.md +1 -1
  112. package/.docs/raw/course/01-first-agent/05-running-playground.md +5 -5
  113. package/.docs/raw/course/01-first-agent/09-testing-your-agent.md +3 -3
  114. package/.docs/raw/course/01-first-agent/13-testing-your-tool.md +3 -3
  115. package/.docs/raw/course/01-first-agent/17-testing-memory.md +2 -2
  116. package/.docs/raw/course/02-agent-tools-mcp/02-installing-mcp.md +1 -1
  117. package/.docs/raw/course/03-agent-memory/03-installing-memory.md +1 -1
  118. package/.docs/raw/course/04-workflows/07-using-playground.md +1 -1
  119. package/.docs/raw/deployment/{server-deployment.mdx → building-mastra.mdx} +4 -4
  120. package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +3 -3
  121. package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +4 -4
  122. package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +4 -4
  123. package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/cloudflare-deployer.mdx +2 -2
  124. package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +3 -3
  125. package/.docs/raw/deployment/cloud-providers/index.mdx +26 -29
  126. package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/netlify-deployer.mdx +46 -15
  127. package/.docs/raw/deployment/{serverless-platforms → cloud-providers}/vercel-deployer.mdx +2 -2
  128. package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/dashboard.mdx +3 -3
  129. package/.docs/raw/deployment/mastra-cloud/observability.mdx +53 -0
  130. package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/overview.mdx +3 -3
  131. package/.docs/raw/{mastra-cloud → deployment/mastra-cloud}/setting-up.mdx +4 -4
  132. package/.docs/raw/deployment/monorepo.mdx +3 -3
  133. package/.docs/raw/deployment/overview.mdx +7 -7
  134. package/.docs/raw/deployment/web-framework.mdx +6 -6
  135. package/.docs/raw/evals/{off-the-shelf-scorers.mdx → built-in-scorers.mdx} +17 -15
  136. package/.docs/raw/evals/custom-scorers.mdx +4 -6
  137. package/.docs/raw/evals/overview.mdx +6 -7
  138. package/.docs/raw/evals/running-in-ci.mdx +2 -4
  139. package/.docs/raw/getting-started/{installation.mdx → manual-install.mdx} +15 -89
  140. package/.docs/raw/getting-started/mcp-docs-server.mdx +6 -6
  141. package/.docs/raw/getting-started/project-structure.mdx +2 -2
  142. package/.docs/raw/getting-started/start.mdx +72 -0
  143. package/.docs/raw/getting-started/studio.mdx +8 -6
  144. package/.docs/raw/guides/agent-frameworks/ai-sdk.mdx +147 -0
  145. package/.docs/raw/guides/build-your-ui/ai-sdk-ui.mdx +627 -0
  146. package/.docs/raw/{frameworks/agentic-uis → guides/build-your-ui}/assistant-ui.mdx +72 -20
  147. package/.docs/raw/guides/build-your-ui/copilotkit.mdx +206 -0
  148. package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/astro.mdx +28 -30
  149. package/.docs/raw/{frameworks/servers → guides/getting-started}/express.mdx +4 -5
  150. package/.docs/raw/guides/getting-started/next-js.mdx +276 -0
  151. package/.docs/raw/guides/getting-started/quickstart.mdx +97 -0
  152. package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/sveltekit.mdx +28 -30
  153. package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/vite-react.mdx +12 -12
  154. package/.docs/raw/guides/guide/ai-recruiter.mdx +2 -3
  155. package/.docs/raw/guides/guide/chef-michel.mdx +2 -3
  156. package/.docs/raw/guides/guide/notes-mcp-server.mdx +3 -3
  157. package/.docs/raw/guides/guide/research-assistant.mdx +8 -18
  158. package/.docs/raw/guides/guide/stock-agent.mdx +4 -6
  159. package/.docs/raw/guides/guide/web-search.mdx +12 -10
  160. package/.docs/raw/guides/guide/whatsapp-chat-bot.mdx +421 -0
  161. package/.docs/raw/guides/index.mdx +3 -35
  162. package/.docs/raw/guides/migrations/agentnetwork.mdx +4 -4
  163. package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +119 -0
  164. package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +56 -6
  165. package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +42 -2
  166. package/.docs/raw/guides/migrations/upgrade-to-v1/evals.mdx +31 -1
  167. package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +29 -5
  168. package/.docs/raw/guides/migrations/upgrade-to-v1/mcp.mdx +3 -3
  169. package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +28 -0
  170. package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +59 -37
  171. package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +80 -0
  172. package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +70 -5
  173. package/.docs/raw/guides/migrations/upgrade-to-v1/tracing.mdx +13 -13
  174. package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +25 -1
  175. package/.docs/raw/guides/migrations/upgrade-to-v1/voice.mdx +1 -1
  176. package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +175 -2
  177. package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +2 -2
  178. package/.docs/raw/index.mdx +4 -4
  179. package/.docs/raw/mcp/overview.mdx +358 -0
  180. package/.docs/raw/mcp/publishing-mcp-server.mdx +139 -0
  181. package/.docs/raw/memory/conversation-history.mdx +1 -1
  182. package/.docs/raw/memory/memory-processors.mdx +265 -80
  183. package/.docs/raw/memory/overview.mdx +3 -3
  184. package/.docs/raw/memory/semantic-recall.mdx +10 -10
  185. package/.docs/raw/memory/storage/memory-with-libsql.mdx +5 -10
  186. package/.docs/raw/memory/storage/memory-with-mongodb.mdx +150 -0
  187. package/.docs/raw/memory/storage/memory-with-pg.mdx +5 -10
  188. package/.docs/raw/memory/storage/memory-with-upstash.mdx +5 -10
  189. package/.docs/raw/memory/threads-and-resources.mdx +4 -4
  190. package/.docs/raw/memory/working-memory.mdx +16 -8
  191. package/.docs/raw/{logging.mdx → observability/logging.mdx} +8 -8
  192. package/.docs/raw/observability/overview.mdx +5 -6
  193. package/.docs/raw/observability/tracing/bridges/otel.mdx +200 -0
  194. package/.docs/raw/observability/tracing/exporters/arize.mdx +39 -3
  195. package/.docs/raw/observability/tracing/exporters/braintrust.mdx +22 -3
  196. package/.docs/raw/observability/tracing/exporters/cloud.mdx +4 -4
  197. package/.docs/raw/observability/tracing/exporters/default.mdx +6 -6
  198. package/.docs/raw/observability/tracing/exporters/langfuse.mdx +86 -3
  199. package/.docs/raw/observability/tracing/exporters/langsmith.mdx +15 -3
  200. package/.docs/raw/observability/tracing/exporters/otel.mdx +128 -30
  201. package/.docs/raw/observability/tracing/exporters/posthog.mdx +127 -0
  202. package/.docs/raw/observability/tracing/overview.mdx +100 -29
  203. package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +2 -3
  204. package/.docs/raw/rag/chunking-and-embedding.mdx +16 -17
  205. package/.docs/raw/rag/overview.mdx +5 -4
  206. package/.docs/raw/rag/retrieval.mdx +44 -39
  207. package/.docs/raw/rag/vector-databases.mdx +94 -3
  208. package/.docs/raw/reference/agents/agent.mdx +10 -14
  209. package/.docs/raw/reference/agents/generate.mdx +67 -99
  210. package/.docs/raw/reference/agents/generateLegacy.mdx +3 -3
  211. package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +1 -1
  212. package/.docs/raw/reference/agents/getDefaultOptions.mdx +1 -1
  213. package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +1 -1
  214. package/.docs/raw/reference/agents/getDescription.mdx +1 -1
  215. package/.docs/raw/reference/agents/getInstructions.mdx +1 -1
  216. package/.docs/raw/reference/agents/getLLM.mdx +2 -2
  217. package/.docs/raw/reference/agents/getMemory.mdx +1 -1
  218. package/.docs/raw/reference/agents/getModel.mdx +1 -1
  219. package/.docs/raw/reference/agents/getTools.mdx +69 -0
  220. package/.docs/raw/reference/agents/getVoice.mdx +1 -1
  221. package/.docs/raw/reference/agents/listAgents.mdx +1 -1
  222. package/.docs/raw/reference/agents/listScorers.mdx +1 -1
  223. package/.docs/raw/reference/agents/listTools.mdx +2 -2
  224. package/.docs/raw/reference/agents/listWorkflows.mdx +1 -1
  225. package/.docs/raw/reference/agents/network.mdx +33 -72
  226. package/.docs/raw/reference/ai-sdk/chat-route.mdx +127 -0
  227. package/.docs/raw/reference/ai-sdk/handle-chat-stream.mdx +117 -0
  228. package/.docs/raw/reference/ai-sdk/handle-network-stream.mdx +64 -0
  229. package/.docs/raw/reference/ai-sdk/handle-workflow-stream.mdx +116 -0
  230. package/.docs/raw/reference/ai-sdk/network-route.mdx +99 -0
  231. package/.docs/raw/reference/ai-sdk/to-ai-sdk-stream.mdx +289 -0
  232. package/.docs/raw/reference/ai-sdk/with-mastra.mdx +119 -0
  233. package/.docs/raw/reference/ai-sdk/workflow-route.mdx +110 -0
  234. package/.docs/raw/reference/auth/auth0.mdx +1 -1
  235. package/.docs/raw/reference/auth/clerk.mdx +1 -1
  236. package/.docs/raw/reference/auth/firebase.mdx +1 -1
  237. package/.docs/raw/reference/auth/jwt.mdx +1 -1
  238. package/.docs/raw/reference/auth/supabase.mdx +1 -1
  239. package/.docs/raw/reference/auth/workos.mdx +1 -1
  240. package/.docs/raw/reference/cli/create-mastra.mdx +11 -11
  241. package/.docs/raw/reference/cli/mastra.mdx +25 -12
  242. package/.docs/raw/reference/client-js/agents.mdx +252 -68
  243. package/.docs/raw/reference/client-js/error-handling.mdx +1 -1
  244. package/.docs/raw/reference/client-js/logs.mdx +1 -1
  245. package/.docs/raw/reference/client-js/mastra-client.mdx +4 -4
  246. package/.docs/raw/reference/client-js/memory.mdx +48 -2
  247. package/.docs/raw/reference/client-js/observability.mdx +1 -1
  248. package/.docs/raw/reference/client-js/telemetry.mdx +1 -1
  249. package/.docs/raw/reference/client-js/tools.mdx +1 -1
  250. package/.docs/raw/reference/client-js/vectors.mdx +1 -1
  251. package/.docs/raw/reference/client-js/workflows.mdx +93 -64
  252. package/.docs/raw/reference/core/addGateway.mdx +59 -0
  253. package/.docs/raw/reference/core/getAgent.mdx +1 -1
  254. package/.docs/raw/reference/core/getAgentById.mdx +1 -1
  255. package/.docs/raw/reference/core/getDeployer.mdx +1 -1
  256. package/.docs/raw/reference/core/getGateway.mdx +59 -0
  257. package/.docs/raw/reference/core/getGatewayById.mdx +62 -0
  258. package/.docs/raw/reference/core/getLogger.mdx +3 -3
  259. package/.docs/raw/reference/core/getMCPServer.mdx +4 -4
  260. package/.docs/raw/reference/core/getMCPServerById.mdx +5 -5
  261. package/.docs/raw/reference/core/getMemory.mdx +73 -0
  262. package/.docs/raw/reference/core/getScorer.mdx +1 -1
  263. package/.docs/raw/reference/core/getScorerById.mdx +1 -1
  264. package/.docs/raw/reference/core/getServer.mdx +2 -2
  265. package/.docs/raw/reference/core/getStorage.mdx +1 -1
  266. package/.docs/raw/reference/core/getStoredAgentById.mdx +183 -0
  267. package/.docs/raw/reference/core/getTelemetry.mdx +3 -3
  268. package/.docs/raw/reference/core/getVector.mdx +1 -1
  269. package/.docs/raw/reference/core/getWorkflow.mdx +1 -1
  270. package/.docs/raw/reference/core/listAgents.mdx +1 -1
  271. package/.docs/raw/reference/core/listGateways.mdx +53 -0
  272. package/.docs/raw/reference/core/listLogs.mdx +3 -3
  273. package/.docs/raw/reference/core/listLogsByRunId.mdx +3 -3
  274. package/.docs/raw/reference/core/listMCPServers.mdx +5 -5
  275. package/.docs/raw/reference/core/listMemory.mdx +70 -0
  276. package/.docs/raw/reference/core/listScorers.mdx +1 -1
  277. package/.docs/raw/reference/core/listStoredAgents.mdx +151 -0
  278. package/.docs/raw/reference/core/listVectors.mdx +1 -1
  279. package/.docs/raw/reference/core/listWorkflows.mdx +1 -1
  280. package/.docs/raw/reference/core/mastra-class.mdx +17 -1
  281. package/.docs/raw/reference/core/mastra-model-gateway.mdx +227 -0
  282. package/.docs/raw/reference/core/setLogger.mdx +3 -3
  283. package/.docs/raw/reference/core/setStorage.mdx +1 -1
  284. package/.docs/raw/reference/core/setTelemetry.mdx +3 -3
  285. package/.docs/raw/reference/deployer/cloudflare.mdx +1 -1
  286. package/.docs/raw/reference/deployer/deployer.mdx +1 -1
  287. package/.docs/raw/reference/deployer/netlify.mdx +2 -3
  288. package/.docs/raw/reference/deployer/vercel.mdx +1 -1
  289. package/.docs/raw/reference/evals/answer-relevancy.mdx +29 -99
  290. package/.docs/raw/reference/evals/answer-similarity.mdx +13 -259
  291. package/.docs/raw/reference/evals/bias.mdx +30 -88
  292. package/.docs/raw/reference/evals/completeness.mdx +32 -91
  293. package/.docs/raw/reference/evals/content-similarity.mdx +29 -89
  294. package/.docs/raw/reference/evals/context-precision.mdx +29 -131
  295. package/.docs/raw/reference/evals/context-relevance.mdx +12 -12
  296. package/.docs/raw/reference/evals/create-scorer.mdx +59 -50
  297. package/.docs/raw/reference/evals/faithfulness.mdx +29 -102
  298. package/.docs/raw/reference/evals/hallucination.mdx +29 -104
  299. package/.docs/raw/reference/evals/keyword-coverage.mdx +29 -108
  300. package/.docs/raw/reference/evals/mastra-scorer.mdx +3 -1
  301. package/.docs/raw/reference/evals/noise-sensitivity.mdx +12 -12
  302. package/.docs/raw/reference/evals/prompt-alignment.mdx +16 -16
  303. package/.docs/raw/reference/evals/run-evals.mdx +1 -1
  304. package/.docs/raw/reference/evals/scorer-utils.mdx +362 -0
  305. package/.docs/raw/reference/evals/textual-difference.mdx +28 -101
  306. package/.docs/raw/reference/evals/tone-consistency.mdx +26 -99
  307. package/.docs/raw/reference/evals/tool-call-accuracy.mdx +8 -8
  308. package/.docs/raw/reference/evals/toxicity.mdx +30 -93
  309. package/.docs/raw/reference/index.mdx +1 -0
  310. package/.docs/raw/reference/logging/pino-logger.mdx +2 -2
  311. package/.docs/raw/reference/memory/createThread.mdx +1 -1
  312. package/.docs/raw/reference/memory/deleteMessages.mdx +1 -1
  313. package/.docs/raw/reference/memory/getThreadById.mdx +1 -1
  314. package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +1 -1
  315. package/.docs/raw/reference/memory/memory-class.mdx +6 -8
  316. package/.docs/raw/reference/memory/query.mdx +1 -1
  317. package/.docs/raw/reference/memory/recall.mdx +1 -1
  318. package/.docs/raw/reference/observability/tracing/bridges/otel.mdx +177 -0
  319. package/.docs/raw/reference/observability/tracing/configuration.mdx +12 -16
  320. package/.docs/raw/reference/observability/tracing/exporters/arize.mdx +31 -2
  321. package/.docs/raw/reference/observability/tracing/exporters/braintrust.mdx +1 -1
  322. package/.docs/raw/reference/observability/tracing/exporters/cloud-exporter.mdx +9 -9
  323. package/.docs/raw/reference/observability/tracing/exporters/console-exporter.mdx +9 -9
  324. package/.docs/raw/reference/observability/tracing/exporters/default-exporter.mdx +9 -9
  325. package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +44 -1
  326. package/.docs/raw/reference/observability/tracing/exporters/langsmith.mdx +18 -2
  327. package/.docs/raw/reference/observability/tracing/exporters/otel.mdx +34 -44
  328. package/.docs/raw/reference/observability/tracing/exporters/posthog.mdx +132 -0
  329. package/.docs/raw/reference/observability/tracing/instances.mdx +8 -12
  330. package/.docs/raw/reference/observability/tracing/interfaces.mdx +36 -11
  331. package/.docs/raw/reference/observability/tracing/processors/sensitive-data-filter.mdx +1 -1
  332. package/.docs/raw/reference/observability/tracing/spans.mdx +7 -11
  333. package/.docs/raw/reference/processors/batch-parts-processor.mdx +10 -4
  334. package/.docs/raw/reference/processors/language-detector.mdx +19 -6
  335. package/.docs/raw/reference/processors/message-history-processor.mdx +131 -0
  336. package/.docs/raw/reference/processors/moderation-processor.mdx +21 -8
  337. package/.docs/raw/reference/processors/pii-detector.mdx +21 -8
  338. package/.docs/raw/reference/processors/processor-interface.mdx +502 -0
  339. package/.docs/raw/reference/processors/prompt-injection-detector.mdx +19 -6
  340. package/.docs/raw/reference/processors/semantic-recall-processor.mdx +197 -0
  341. package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +12 -7
  342. package/.docs/raw/reference/processors/token-limiter-processor.mdx +11 -5
  343. package/.docs/raw/reference/processors/tool-call-filter.mdx +125 -0
  344. package/.docs/raw/reference/processors/unicode-normalizer.mdx +10 -4
  345. package/.docs/raw/reference/processors/working-memory-processor.mdx +221 -0
  346. package/.docs/raw/reference/rag/chunk.mdx +1 -1
  347. package/.docs/raw/reference/rag/database-config.mdx +1 -1
  348. package/.docs/raw/reference/rag/document.mdx +1 -1
  349. package/.docs/raw/reference/rag/embeddings.mdx +6 -6
  350. package/.docs/raw/reference/rag/extract-params.mdx +1 -1
  351. package/.docs/raw/reference/rag/graph-rag.mdx +1 -1
  352. package/.docs/raw/reference/rag/metadata-filters.mdx +1 -1
  353. package/.docs/raw/reference/rag/rerank.mdx +2 -3
  354. package/.docs/raw/reference/rag/rerankWithScorer.mdx +1 -2
  355. package/.docs/raw/reference/server/create-route.mdx +328 -0
  356. package/.docs/raw/reference/server/express-adapter.mdx +260 -0
  357. package/.docs/raw/reference/server/hono-adapter.mdx +242 -0
  358. package/.docs/raw/reference/server/mastra-server.mdx +345 -0
  359. package/.docs/raw/reference/server/routes.mdx +250 -0
  360. package/.docs/raw/reference/storage/cloudflare-d1.mdx +39 -2
  361. package/.docs/raw/reference/storage/cloudflare.mdx +2 -2
  362. package/.docs/raw/reference/storage/convex.mdx +164 -0
  363. package/.docs/raw/reference/storage/dynamodb.mdx +4 -4
  364. package/.docs/raw/reference/storage/lance.mdx +35 -2
  365. package/.docs/raw/reference/storage/libsql.mdx +39 -2
  366. package/.docs/raw/reference/storage/mongodb.mdx +41 -2
  367. package/.docs/raw/reference/storage/mssql.mdx +39 -2
  368. package/.docs/raw/reference/storage/postgresql.mdx +39 -2
  369. package/.docs/raw/reference/storage/upstash.mdx +2 -2
  370. package/.docs/raw/reference/streaming/ChunkType.mdx +2 -2
  371. package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +1 -1
  372. package/.docs/raw/reference/streaming/agents/stream.mdx +68 -95
  373. package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +1 -1
  374. package/.docs/raw/reference/streaming/workflows/observeStream.mdx +8 -10
  375. package/.docs/raw/reference/streaming/workflows/{resumeStreamVNext.mdx → resumeStream.mdx} +51 -11
  376. package/.docs/raw/reference/streaming/workflows/stream.mdx +84 -25
  377. package/.docs/raw/reference/streaming/workflows/timeTravelStream.mdx +170 -0
  378. package/.docs/raw/reference/templates/overview.mdx +3 -6
  379. package/.docs/raw/reference/tools/client.mdx +2 -3
  380. package/.docs/raw/reference/tools/create-tool.mdx +135 -4
  381. package/.docs/raw/reference/tools/document-chunker-tool.mdx +1 -1
  382. package/.docs/raw/reference/tools/graph-rag-tool.mdx +7 -7
  383. package/.docs/raw/reference/tools/mcp-client.mdx +131 -23
  384. package/.docs/raw/reference/tools/mcp-server.mdx +56 -8
  385. package/.docs/raw/reference/tools/vector-query-tool.mdx +16 -17
  386. package/.docs/raw/reference/vectors/astra.mdx +1 -1
  387. package/.docs/raw/reference/vectors/chroma.mdx +82 -2
  388. package/.docs/raw/reference/vectors/convex.mdx +429 -0
  389. package/.docs/raw/reference/vectors/couchbase.mdx +33 -20
  390. package/.docs/raw/reference/vectors/duckdb.mdx +462 -0
  391. package/.docs/raw/reference/vectors/elasticsearch.mdx +310 -0
  392. package/.docs/raw/reference/vectors/lance.mdx +39 -23
  393. package/.docs/raw/reference/vectors/libsql.mdx +37 -4
  394. package/.docs/raw/reference/vectors/mongodb.mdx +43 -4
  395. package/.docs/raw/reference/vectors/opensearch.mdx +38 -17
  396. package/.docs/raw/reference/vectors/pg.mdx +44 -37
  397. package/.docs/raw/reference/vectors/pinecone.mdx +70 -3
  398. package/.docs/raw/reference/vectors/qdrant.mdx +37 -2
  399. package/.docs/raw/reference/vectors/s3vectors.mdx +2 -2
  400. package/.docs/raw/reference/vectors/turbopuffer.mdx +75 -1
  401. package/.docs/raw/reference/vectors/upstash.mdx +1 -1
  402. package/.docs/raw/reference/vectors/vectorize.mdx +1 -1
  403. package/.docs/raw/reference/voice/azure.mdx +96 -81
  404. package/.docs/raw/reference/voice/cloudflare.mdx +1 -1
  405. package/.docs/raw/reference/voice/composite-voice.mdx +72 -29
  406. package/.docs/raw/reference/voice/deepgram.mdx +1 -1
  407. package/.docs/raw/reference/voice/elevenlabs.mdx +1 -1
  408. package/.docs/raw/reference/voice/google-gemini-live.mdx +1 -1
  409. package/.docs/raw/reference/voice/google.mdx +160 -21
  410. package/.docs/raw/reference/voice/mastra-voice.mdx +1 -1
  411. package/.docs/raw/reference/voice/murf.mdx +1 -1
  412. package/.docs/raw/reference/voice/openai-realtime.mdx +3 -3
  413. package/.docs/raw/reference/voice/openai.mdx +1 -1
  414. package/.docs/raw/reference/voice/playai.mdx +1 -1
  415. package/.docs/raw/reference/voice/sarvam.mdx +1 -1
  416. package/.docs/raw/reference/voice/speechify.mdx +1 -1
  417. package/.docs/raw/reference/voice/voice.addInstructions.mdx +3 -4
  418. package/.docs/raw/reference/voice/voice.addTools.mdx +2 -2
  419. package/.docs/raw/reference/voice/voice.answer.mdx +2 -2
  420. package/.docs/raw/reference/voice/voice.close.mdx +2 -2
  421. package/.docs/raw/reference/voice/voice.connect.mdx +2 -2
  422. package/.docs/raw/reference/voice/voice.events.mdx +1 -1
  423. package/.docs/raw/reference/voice/voice.getSpeakers.mdx +1 -1
  424. package/.docs/raw/reference/voice/voice.listen.mdx +87 -53
  425. package/.docs/raw/reference/voice/voice.off.mdx +2 -2
  426. package/.docs/raw/reference/voice/voice.on.mdx +2 -2
  427. package/.docs/raw/reference/voice/voice.send.mdx +2 -2
  428. package/.docs/raw/reference/voice/voice.speak.mdx +76 -41
  429. package/.docs/raw/reference/voice/voice.updateConfig.mdx +2 -2
  430. package/.docs/raw/reference/workflows/run-methods/cancel.mdx +1 -1
  431. package/.docs/raw/reference/workflows/run-methods/restart.mdx +142 -0
  432. package/.docs/raw/reference/workflows/run-methods/resume.mdx +45 -1
  433. package/.docs/raw/reference/workflows/run-methods/start.mdx +48 -4
  434. package/.docs/raw/reference/workflows/run-methods/timeTravel.mdx +310 -0
  435. package/.docs/raw/reference/workflows/run.mdx +28 -6
  436. package/.docs/raw/reference/workflows/step.mdx +65 -1
  437. package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +1 -1
  438. package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
  439. package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +1 -1
  440. package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +1 -1
  441. package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +1 -1
  442. package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +1 -1
  443. package/.docs/raw/reference/workflows/workflow-methods/map.mdx +1 -1
  444. package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
  445. package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +1 -1
  446. package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +1 -1
  447. package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +1 -1
  448. package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
  449. package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +1 -1
  450. package/.docs/raw/reference/workflows/workflow.mdx +21 -2
  451. package/.docs/raw/server-db/custom-adapters.mdx +386 -0
  452. package/.docs/raw/server-db/custom-api-routes.mdx +6 -6
  453. package/.docs/raw/server-db/mastra-client.mdx +7 -8
  454. package/.docs/raw/server-db/{production-server.mdx → mastra-server.mdx} +16 -8
  455. package/.docs/raw/server-db/middleware.mdx +31 -31
  456. package/.docs/raw/server-db/request-context.mdx +3 -4
  457. package/.docs/raw/server-db/server-adapters.mdx +312 -0
  458. package/.docs/raw/server-db/storage.mdx +12 -1
  459. package/.docs/raw/streaming/events.mdx +1 -1
  460. package/.docs/raw/streaming/overview.mdx +27 -16
  461. package/.docs/raw/streaming/tool-streaming.mdx +58 -19
  462. package/.docs/raw/streaming/workflow-streaming.mdx +6 -12
  463. package/.docs/raw/tools-mcp/advanced-usage.mdx +2 -3
  464. package/.docs/raw/tools-mcp/mcp-overview.mdx +5 -7
  465. package/.docs/raw/tools-mcp/overview.mdx +1 -1
  466. package/.docs/raw/voice/overview.mdx +88 -41
  467. package/.docs/raw/voice/speech-to-speech.mdx +5 -5
  468. package/.docs/raw/voice/speech-to-text.mdx +3 -4
  469. package/.docs/raw/voice/text-to-speech.mdx +3 -4
  470. package/.docs/raw/workflows/agents-and-tools.mdx +43 -5
  471. package/.docs/raw/workflows/control-flow.mdx +186 -1
  472. package/.docs/raw/workflows/error-handling.mdx +5 -4
  473. package/.docs/raw/workflows/human-in-the-loop.mdx +160 -213
  474. package/.docs/raw/workflows/inngest-workflow.mdx +2 -2
  475. package/.docs/raw/workflows/input-data-mapping.mdx +1 -1
  476. package/.docs/raw/workflows/overview.mdx +67 -47
  477. package/.docs/raw/workflows/snapshots.mdx +5 -3
  478. package/.docs/raw/workflows/suspend-and-resume.mdx +121 -204
  479. package/.docs/raw/workflows/time-travel.mdx +313 -0
  480. package/.docs/raw/workflows/workflow-state.mdx +190 -0
  481. package/CHANGELOG.md +88 -0
  482. package/dist/{chunk-5NJC7NRO.js → chunk-4CM2BQNP.js} +24 -4
  483. package/dist/prepare-docs/package-changes.d.ts.map +1 -1
  484. package/dist/prepare-docs/prepare.js +1 -1
  485. package/dist/stdio.js +17 -19
  486. package/package.json +11 -15
  487. package/.docs/raw/deployment/serverless-platforms/index.mdx +0 -58
  488. package/.docs/raw/frameworks/agentic-uis/ai-sdk.mdx +0 -688
  489. package/.docs/raw/frameworks/agentic-uis/cedar-os.mdx +0 -123
  490. package/.docs/raw/frameworks/agentic-uis/copilotkit.mdx +0 -382
  491. package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +0 -179
  492. package/.docs/raw/frameworks/web-frameworks/next-js.mdx +0 -379
  493. package/.docs/raw/getting-started/templates.mdx +0 -73
  494. package/.docs/raw/mastra-cloud/observability.mdx +0 -51
  495. package/.docs/raw/reference/streaming/workflows/observeStreamVNext.mdx +0 -47
  496. package/.docs/raw/reference/streaming/workflows/streamVNext.mdx +0 -153
@@ -1,302 +1,502 @@
1
1
  # @mastra/core
2
2
 
3
- ## 1.0.0-beta.0
3
+ ## 1.0.0-beta.10
4
4
 
5
- ### Major Changes
6
-
7
- - Moving scorers under the eval domain, api method consistency, prebuilt evals, scorers require ids. ([#9589](https://github.com/mastra-ai/mastra/pull/9589))
5
+ ### Patch Changes
8
6
 
9
- - **BREAKING CHANGE**: Scorers for Agents will now use `MastraDBMessage` instead of `UIMessage` ([#9702](https://github.com/mastra-ai/mastra/pull/9702))
10
- - Scorer input/output types now use `MastraDBMessage[]` with nested `content` object structure
11
- - Added `getTextContentFromMastraDBMessage()` helper function to extract text content from `MastraDBMessage` objects
12
- - Added `createTestMessage()` helper function for creating `MastraDBMessage` objects in tests with optional tool invocations support
13
- - Updated `extractToolCalls()` to access tool invocations from nested `content` structure
14
- - Updated `getUserMessageFromRunInput()` and `getAssistantMessageFromRunOutput()` to use new message structure
15
- - Removed `createUIMessage()`
7
+ - Add support for typed structured output in agent workflow steps ([#11014](https://github.com/mastra-ai/mastra/pull/11014))
16
8
 
17
- - 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))
9
+ When wrapping an agent with `createStep()` and providing a `structuredOutput.schema`, the step's `outputSchema` is now correctly inferred from the provided schema instead of defaulting to `{ text: string }`.
18
10
 
19
- Primitives that are added to other primitives are also automatically added to the Mastra instance
11
+ This enables type-safe chaining of agent steps with structured output to subsequent steps:
20
12
 
21
- - 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))
13
+ ```typescript
14
+ const articleSchema = z.object({
15
+ title: z.string(),
16
+ summary: z.string(),
17
+ tags: z.array(z.string()),
18
+ });
22
19
 
23
- - **BREAKING:** Remove `getMessagesPaginated()` and add `perPage: false` support ([#9670](https://github.com/mastra-ai/mastra/pull/9670))
20
+ // Agent step with structured output - outputSchema is now articleSchema
21
+ const agentStep = createStep(agent, {
22
+ structuredOutput: { schema: articleSchema },
23
+ });
24
24
 
25
- Removes deprecated `getMessagesPaginated()` method. The `listMessages()` API and score handlers now support `perPage: false` to fetch all records without pagination limits.
25
+ // Next step can receive the structured output directly
26
+ const processStep = createStep({
27
+ id: 'process',
28
+ inputSchema: articleSchema, // Matches agent's outputSchema
29
+ outputSchema: z.object({ tagCount: z.number() }),
30
+ execute: async ({ inputData }) => ({
31
+ tagCount: inputData.tags.length, // Fully typed!
32
+ }),
33
+ });
26
34
 
27
- **Storage changes:**
28
- - `StoragePagination.perPage` type changed from `number` to `number | false`
29
- - All storage implementations support `perPage: false`:
30
- - Memory: `listMessages()`
31
- - Scores: `listScoresBySpan()`, `listScoresByRunId()`, `listScoresByExecutionId()`
32
- - HTTP query parser accepts `"false"` string (e.g., `?perPage=false`)
35
+ workflow.then(agentStep).then(processStep).commit();
36
+ ```
33
37
 
34
- **Memory changes:**
35
- - `memory.query()` parameter type changed from `StorageGetMessagesArg` to `StorageListMessagesInput`
36
- - Uses flat parameters (`page`, `perPage`, `include`, `filter`, `vectorSearchString`) instead of `selectBy` object
38
+ When `structuredOutput` is not provided, the agent step continues to use the default `{ text: string }` output schema.
37
39
 
38
- **Stricter validation:**
39
- - `listMessages()` requires non-empty, non-whitespace `threadId` (throws error instead of returning empty results)
40
+ - Fixed a bug where multiple tools streaming output simultaneously could fail with "WritableStreamDefaultWriter is locked" errors. Tool streaming now works reliably during concurrent tool executions. ([#10830](https://github.com/mastra-ai/mastra/pull/10830))
40
41
 
41
- **Migration:**
42
+ - Add delete workflow run API ([#10991](https://github.com/mastra-ai/mastra/pull/10991))
42
43
 
43
44
  ```typescript
44
- // Storage/Memory: Replace getMessagesPaginated with listMessages
45
- - storage.getMessagesPaginated({ threadId, selectBy: { pagination: { page: 0, perPage: 20 } } })
46
- + storage.listMessages({ threadId, page: 0, perPage: 20 })
47
- + storage.listMessages({ threadId, page: 0, perPage: false }) // Fetch all
48
-
49
- // Memory: Replace selectBy with flat parameters
50
- - memory.query({ threadId, selectBy: { last: 20, include: [...] } })
51
- + memory.query({ threadId, perPage: 20, include: [...] })
52
-
53
- // Client SDK
54
- - thread.getMessagesPaginated({ selectBy: { pagination: { page: 0 } } })
55
- + thread.listMessages({ page: 0, perPage: 20 })
45
+ await workflow.deleteWorkflowRunById(runId);
56
46
  ```
57
47
 
58
- - # Major Changes ([#9695](https://github.com/mastra-ai/mastra/pull/9695))
48
+ - Fixed CachedToken tracking in all Observability Exporters. Also fixed TimeToFirstToken in Langfuse, Braintrust, PostHog exporters. Fixed trace formatting in Posthog Exporter. ([#11029](https://github.com/mastra-ai/mastra/pull/11029))
49
+
50
+ - fix: persist data-\* chunks from writer.custom() to memory storage ([#10884](https://github.com/mastra-ai/mastra/pull/10884))
51
+ - Add persistence for custom data chunks (`data-*` parts) emitted via `writer.custom()` in tools
52
+ - Data chunks are now saved to message storage so they survive page refreshes
53
+ - Update `@assistant-ui/react` to v0.11.47 with native `DataMessagePart` support
54
+ - Convert `data-*` parts to `DataMessagePart` format (`{ type: 'data', name: string, data: T }`)
55
+ - Update related `@assistant-ui/*` packages for compatibility
59
56
 
60
- ## Storage Layer
57
+ - Fixed double validation bug that prevented Zod transforms from working correctly in tool schemas. ([#11025](https://github.com/mastra-ai/mastra/pull/11025))
61
58
 
62
- ### BREAKING: Removed `storage.getMessages()`
59
+ When tools with Zod `.transform()` or `.pipe()` in their `outputSchema` were executed through the Agent pipeline, validation was happening twice - once in Tool.execute() (correct) and again in CoreToolBuilder (incorrect). The second validation received already-transformed data but expected pre-transform data, causing validation errors.
63
60
 
64
- The `getMessages()` method has been removed from all storage implementations. Use `listMessages()` instead, which provides pagination support.
61
+ This fix enables proper use of Zod transforms in both `inputSchema` (for normalizing/cleaning input data) and `outputSchema` (for transforming output data to be LLM-friendly).
65
62
 
66
- **Migration:**
63
+ - Updated dependencies [[`5d7000f`](https://github.com/mastra-ai/mastra/commit/5d7000f757cd65ea9dc5b05e662fd83dfd44e932)]:
64
+ - @mastra/observability@1.0.0-beta.4
65
+
66
+ ## 1.0.0-beta.9
67
+
68
+ ### Minor Changes
69
+
70
+ - Add stored agents support ([#10953](https://github.com/mastra-ai/mastra/pull/10953))
71
+
72
+ Agents can now be stored in the database and loaded at runtime. This lets you persist agent configurations and dynamically create executable Agent instances from storage.
67
73
 
68
74
  ```typescript
69
- // Before
70
- const messages = await storage.getMessages({ threadId: 'thread-1' });
75
+ import { Mastra } from '@mastra/core';
76
+ import { LibSQLStore } from '@mastra/libsql';
77
+
78
+ const mastra = new Mastra({
79
+ storage: new LibSQLStore({ url: ':memory:' }),
80
+ tools: { myTool },
81
+ scorers: { myScorer },
82
+ });
83
+
84
+ // Create agent in storage via API or directly
85
+ await mastra.getStorage().createAgent({
86
+ agent: {
87
+ id: 'my-agent',
88
+ name: 'My Agent',
89
+ instructions: 'You are helpful',
90
+ model: { provider: 'openai', name: 'gpt-4' },
91
+ tools: { myTool: {} },
92
+ scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
93
+ },
94
+ });
71
95
 
72
- // After
73
- const result = await storage.listMessages({
74
- threadId: 'thread-1',
96
+ // Load and use the agent
97
+ const agent = await mastra.getStoredAgentById('my-agent');
98
+ const response = await agent.generate({ messages: 'Hello!' });
99
+
100
+ // List all stored agents with pagination
101
+ const { agents, total, hasMore } = await mastra.listStoredAgents({
75
102
  page: 0,
76
- perPage: 50,
103
+ perPage: 10,
77
104
  });
78
- const messages = result.messages; // Access messages array
79
- console.log(result.total); // Total count
80
- console.log(result.hasMore); // Whether more pages exist
81
105
  ```
82
106
 
83
- ### Message ordering default
107
+ Also adds a memory registry to Mastra so stored agents can reference memory instances by key.
108
+
109
+ ### Patch Changes
110
+
111
+ - Add agentId and agentName attributes to MODEL_GENERATION spans. This allows users to correlate gen_ai.usage metrics with specific agents when analyzing LLM operation spans. The attributes are exported as gen_ai.agent.id and gen_ai.agent.name in the OtelExporter. ([#10984](https://github.com/mastra-ai/mastra/pull/10984))
112
+
113
+ - Fix JSON parsing errors when LLMs output unescaped newlines in structured output strings ([#10965](https://github.com/mastra-ai/mastra/pull/10965))
114
+
115
+ Some LLMs (particularly when not using native JSON mode) output actual newline characters inside JSON string values instead of properly escaped `\n` sequences. This breaks JSON parsing and causes structured output to fail.
116
+
117
+ This change adds preprocessing to escape unescaped control characters (`\n`, `\r`, `\t`) within JSON string values before parsing, making structured output more robust across different LLM providers.
118
+
119
+ - Fix toolCallId propagation in agent network tool execution. The toolCallId property was undefined at runtime despite being required by TypeScript type definitions in AgentToolExecutionContext. Now properly passes the toolCallId through to the tool's context during network tool execution. ([#10951](https://github.com/mastra-ai/mastra/pull/10951))
120
+
121
+ - Exports `convertFullStreamChunkToMastra` from the stream module for AI SDK stream chunk transformations. ([#10911](https://github.com/mastra-ai/mastra/pull/10911))
122
+
123
+ ## 1.0.0-beta.8
124
+
125
+ ### Patch Changes
126
+
127
+ - Fix saveScore not persisting ID correctly, breaking getScoreById retrieval ([#10915](https://github.com/mastra-ai/mastra/pull/10915))
128
+
129
+ **What Changed**
130
+ - saveScore now correctly returns scores that can be retrieved with getScoreById
131
+ - Validation errors now include contextual information (scorer, entity, trace details) for easier debugging
132
+
133
+ **Impact**
134
+ Previously, calling getScoreById after saveScore would return null because the generated ID wasn't persisted to the database. This is now fixed across all store implementations, ensuring consistent behavior and data integrity.
135
+
136
+ - `setState` is now async ([#10944](https://github.com/mastra-ai/mastra/pull/10944))
137
+ - `setState` must now be awaited: `await setState({ key: value })`
138
+ - State updates are merged automatically—no need to spread the previous state
139
+ - State data is validated against the step's `stateSchema` when `validateInputs` is enabled (default: `true`)
140
+
141
+ - Add human-in-the-loop support for workflows used in agent ([#10871](https://github.com/mastra-ai/mastra/pull/10871))
84
142
 
85
- `listMessages()` defaults to ASC (oldest first) ordering by `createdAt`, matching the previous `getMessages()` behavior.
143
+ ## 1.0.0-beta.7
86
144
 
87
- **To use DESC ordering (newest first):**
145
+ ### Minor Changes
146
+
147
+ - Add `disableInit` option to all storage adapters ([#10851](https://github.com/mastra-ai/mastra/pull/10851))
148
+
149
+ Adds a new `disableInit` config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with `disableInit: true` so it doesn't attempt schema changes at runtime.
88
150
 
89
151
  ```typescript
90
- const result = await storage.listMessages({
91
- threadId: 'thread-1',
92
- orderBy: { field: 'createdAt', direction: 'DESC' },
152
+ // CI/CD script - run migrations
153
+ const storage = new PostgresStore({
154
+ connectionString: DATABASE_URL,
155
+ id: 'pg-storage',
156
+ });
157
+ await storage.init();
158
+
159
+ // Runtime - skip auto-init
160
+ const storage = new PostgresStore({
161
+ connectionString: DATABASE_URL,
162
+ id: 'pg-storage',
163
+ disableInit: true,
93
164
  });
94
165
  ```
95
166
 
96
- ## Client SDK
167
+ ### Patch Changes
97
168
 
98
- ### BREAKING: Renamed `client.getThreadMessages()` `client.listThreadMessages()`
169
+ - Add time-to-first-token (TTFT) support for Langfuse integration ([#10781](https://github.com/mastra-ai/mastra/pull/10781))
99
170
 
100
- **Migration:**
171
+ Adds `completionStartTime` to model generation spans, which Langfuse uses to calculate TTFT metrics. The timestamp is automatically captured when the first content chunk arrives during streaming.
101
172
 
102
173
  ```typescript
103
- // Before
104
- const response = await client.getThreadMessages(threadId, { agentId });
174
+ // completionStartTime is now automatically captured and sent to Langfuse
175
+ // enabling TTFT metrics in your Langfuse dashboard
176
+ const result = await agent.stream('Hello');
177
+ ```
178
+
179
+ - Updated OtelExporters, Bridge, and Arize packages to better implement GenAI v1.38.0 Otel Semantic Conventions. See: ([#10591](https://github.com/mastra-ai/mastra/pull/10591))
180
+ https://github.com/open-telemetry/semantic-conventions/blob/v1.38.0/docs/gen-ai/README.md
181
+
182
+ - Standardize error IDs across all storage and vector stores using centralized helper functions (`createStorageErrorId` and `createVectorErrorId`). This ensures consistent error ID patterns (`MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS}` and `MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}`) across the codebase for better error tracking and debugging. ([#10913](https://github.com/mastra-ai/mastra/pull/10913))
183
+
184
+ - fix: generate unique text IDs for Anthropic/Google providers ([#10740](https://github.com/mastra-ai/mastra/pull/10740))
185
+
186
+ Workaround for duplicate text-start/text-end IDs in multi-step agentic flows.
187
+
188
+ The `@ai-sdk/anthropic` and `@ai-sdk/google` providers use numeric indices ("0", "1", etc.) for text block IDs that reset for each LLM call. This caused duplicate IDs when an agent does TEXT → TOOL → TEXT, breaking message ordering and storage.
189
+
190
+ The fix replaces numeric IDs with UUIDs, maintaining a map per step so text-start, text-delta, and text-end chunks for the same block share the same UUID. OpenAI's UUIDs pass through unchanged.
191
+
192
+ Related: #9909
193
+
194
+ - Fix sub-agent requestContext propagation in listAgentTools ([#10844](https://github.com/mastra-ai/mastra/pull/10844))
195
+
196
+ Sub-agents with dynamic model configurations were broken because `requestContext` was not being passed to `getModel()` when creating agent tools. This caused sub-agents using function-based model configurations to receive an empty context instead of the parent's context.
197
+
198
+ No code changes required for consumers - this fix restores expected behavior for dynamic model configurations in sub-agents.
199
+
200
+ - Fix ToolStream type error when piping streams with different types ([#10845](https://github.com/mastra-ai/mastra/pull/10845))
105
201
 
106
- // After
107
- const response = await client.listThreadMessages(threadId, { agentId });
202
+ Changes `ToolStream` to extend `WritableStream<unknown>` instead of `WritableStream<T>`. This fixes the TypeScript error when piping `objectStream` or `fullStream` to `writer` in workflow steps.
203
+
204
+ Before:
205
+
206
+ ```typescript
207
+ // TypeError: ToolStream<ChunkType> is not assignable to WritableStream<Partial<StoryPlan>>
208
+ await response.objectStream.pipeTo(writer);
108
209
  ```
109
210
 
110
- The response format remains the same.
211
+ After:
111
212
 
112
- ## Type Changes
213
+ ```typescript
214
+ // Works without type errors
215
+ await response.objectStream.pipeTo(writer);
216
+ ```
113
217
 
114
- ### BREAKING: Removed `StorageGetMessagesArg` type
218
+ - feat: add native Perplexity provider support ([#10885](https://github.com/mastra-ai/mastra/pull/10885))
115
219
 
116
- Use `StorageListMessagesInput` instead:
220
+ - When sending the first message to a new thread with PostgresStore, users would get a "Thread not found" error. This happened because the thread was created in memory but not persisted to the database before the MessageHistory output processor tried to save messages. ([#10881](https://github.com/mastra-ai/mastra/pull/10881))
221
+
222
+ **Before:**
223
+
224
+ ```ts
225
+ threadObject = await memory.createThread({
226
+ // ...
227
+ saveThread: false, // thread not in DB yet
228
+ });
229
+ // Later: MessageHistory calls saveMessages() -> PostgresStore throws "Thread not found"
230
+ ```
231
+
232
+ **After:**
233
+
234
+ ```ts
235
+ threadObject = await memory.createThread({
236
+ // ...
237
+ saveThread: true, // thread persisted immediately
238
+ });
239
+ // MessageHistory can now save messages without error
240
+ ```
241
+
242
+ - Emit error chunk and call onError when agent workflow step fails ([#10907](https://github.com/mastra-ai/mastra/pull/10907))
243
+
244
+ When a workflow step fails (e.g., tool not found), the error is now properly emitted as an error chunk to the stream and the onError callback is called. This fixes the issue where agent.generate() would throw "promise 'text' was not resolved or rejected" instead of the actual error message.
245
+
246
+ - fix(core): use agent description when converting agent to tool ([#10879](https://github.com/mastra-ai/mastra/pull/10879))
247
+
248
+ - Adds native @ai-sdk/deepseek provider support instead of using the OpenAI-compatible fallback. ([#10822](https://github.com/mastra-ai/mastra/pull/10822))
117
249
 
118
250
  ```typescript
119
- // Before
120
- import type { StorageGetMessagesArg } from '@mastra/core';
251
+ const agent = new Agent({
252
+ model: 'deepseek/deepseek-reasoner',
253
+ });
121
254
 
122
- // After
123
- import type { StorageListMessagesInput } from '@mastra/core';
255
+ // With provider options for reasoning
256
+ const response = await agent.generate('Solve this problem', {
257
+ providerOptions: {
258
+ deepseek: {
259
+ thinking: { type: 'enabled' },
260
+ },
261
+ },
262
+ });
124
263
  ```
125
264
 
126
- - - Removes modelSettings.abortSignal in favour of top-level abortSignal only. Also removes the deprecated output field - use structuredOutput.schema instead. ([`9e1911d`](https://github.com/mastra-ai/mastra/commit/9e1911db2b4db85e0e768c3f15e0d61e319869f6))
127
- - The deprecated generateVNext() and streamVNext() methods have been removed since they're now the stable generate() and stream() methods.
128
- - The deprecated `output` option has been removed entirely, in favour of `structuredOutput`.
265
+ Also updates the doc generation scripts so DeepSeek provider options show up in the generated docs.
129
266
 
130
- Method renames to clarify the API surface:
131
- - getDefaultGenerateOptions → getDefaultGenerateOptionsLegacy
132
- - getDefaultStreamOptions → getDefaultStreamOptionsLegacy
133
- - getDefaultVNextStreamOptions → getDefaultStreamOptions
267
+ - Return state too if `includeState: true` is in `outputOptions` and workflow run is not successful ([#10806](https://github.com/mastra-ai/mastra/pull/10806))
134
268
 
135
- - Bump minimum required Node.js version to 22.13.0 ([#9706](https://github.com/mastra-ai/mastra/pull/9706))
269
+ - feat: Add partial response support for agent and workflow list endpoints ([#10886](https://github.com/mastra-ai/mastra/pull/10886))
136
270
 
137
- - Replace `getThreadsByResourceIdPaginated` with `listThreadsByResourceId` across memory handlers. Update client SDK to use `listThreads()` with `offset`/`limit` parameters instead of deprecated `getMemoryThreads()`. Consolidate `/api/memory/threads` routes to single paginated endpoint. ([#9508](https://github.com/mastra-ai/mastra/pull/9508))
271
+ Add optional `partial` query parameter to `/api/agents` and `/api/workflows` endpoints to return minimal data without schemas, reducing payload size for list views:
272
+ - When `partial=true`: tool schemas (inputSchema, outputSchema) are omitted
273
+ - When `partial=true`: workflow steps are replaced with stepCount integer
274
+ - When `partial=true`: workflow root schemas (inputSchema, outputSchema) are omitted
275
+ - Maintains backward compatibility when partial parameter is not provided
138
276
 
139
- - Add new list methods to storage API: `listMessages`, `listMessagesById`, `listThreadsByResourceId`, and `listWorkflowRuns`. Most methods are currently wrappers around existing methods. Full implementations will be added when migrating away from legacy methods. ([#9489](https://github.com/mastra-ai/mastra/pull/9489))
277
+ ## Server Endpoint Usage
140
278
 
141
- - Update tool execution signature ([#9587](https://github.com/mastra-ai/mastra/pull/9587))
279
+ ```http
280
+ # Get partial agent data (no tool schemas)
281
+ GET /api/agents?partial=true
142
282
 
143
- Consolidated the 3 different execution contexts to one
283
+ # Get full agent data (default behavior)
284
+ GET /api/agents
285
+
286
+ # Get partial workflow data (stepCount instead of steps, no schemas)
287
+ GET /api/workflows?partial=true
288
+
289
+ # Get full workflow data (default behavior)
290
+ GET /api/workflows
291
+ ```
292
+
293
+ ## Client SDK Usage
144
294
 
145
295
  ```typescript
146
- // before depending on the context the tool was executed in
147
- tool.execute({ context: data });
148
- tool.execute({ context: { inputData: data } });
149
- tool.execute(data);
296
+ import { MastraClient } from '@mastra/client-js';
297
+
298
+ const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
299
+
300
+ // Get partial agent list (smaller payload)
301
+ const partialAgents = await client.listAgents({ partial: true });
302
+
303
+ // Get full agent list with tool schemas
304
+ const fullAgents = await client.listAgents();
305
+
306
+ // Get partial workflow list (smaller payload)
307
+ const partialWorkflows = await client.listWorkflows({ partial: true });
150
308
 
151
- // now, for all contexts
152
- tool.execute(data, context);
309
+ // Get full workflow list with steps and schemas
310
+ const fullWorkflows = await client.listWorkflows();
153
311
  ```
154
312
 
313
+ - Fix processInputStep so it runs correctly. ([#10909](https://github.com/mastra-ai/mastra/pull/10909))
314
+
315
+ - Updated dependencies [[`6c59a40`](https://github.com/mastra-ai/mastra/commit/6c59a40e0ad160467bd13d63a8a287028d75b02d), [`3076c67`](https://github.com/mastra-ai/mastra/commit/3076c6778b18988ae7d5c4c5c466366974b2d63f), [`0bada2f`](https://github.com/mastra-ai/mastra/commit/0bada2f2c1234932cf30c1c47a719ffb64b801c5), [`cc60ff6`](https://github.com/mastra-ai/mastra/commit/cc60ff616541a3b0fb531a7e469bf9ae7bb90528)]:
316
+ - @mastra/observability@1.0.0-beta.3
317
+
318
+ ## 1.0.0-beta.6
319
+
320
+ ### Major Changes
321
+
322
+ - Changed `.branch()` result schema to make all branch output fields optional. ([#10693](https://github.com/mastra-ai/mastra/pull/10693))
323
+
324
+ **Breaking change**: Branch outputs are now optional since only one branch executes at runtime. Update your workflow schemas to handle optional branch results.
325
+
155
326
  **Before:**
156
327
 
157
328
  ```typescript
158
- inputSchema: z.object({ something: z.string() }),
159
- execute: async ({ context, tracingContext, runId, ... }) => {
160
- return doSomething(context.string);
161
- }
329
+ const workflow = createWorkflow({...})
330
+ .branch([
331
+ [condition1, stepA], // outputSchema: { result: z.string() }
332
+ [condition2, stepB], // outputSchema: { data: z.number() }
333
+ ])
334
+ .map({
335
+ finalResult: { step: stepA, path: 'result' } // Expected non-optional
336
+ });
162
337
  ```
163
338
 
164
339
  **After:**
165
340
 
166
341
  ```typescript
167
- inputSchema: z.object({ something: z.string() }),
168
- execute: async (inputData, context) => {
169
- const { agent, mcp, workflow, ...sharedContext } = context
170
-
171
- // context that only an agent would get like toolCallId, messages, suspend, resume, etc
172
- if (agent) {
173
- doSomething(inputData.something, agent)
174
- // context that only a workflow would get like runId, state, suspend, resume, etc
175
- } else if (workflow) {
176
- doSomething(inputData.something, workflow)
177
- // context that only a workflow would get like "extra", "elicitation"
178
- } else if (mcp) {
179
- doSomething(inputData.something, mcp)
180
- } else {
181
- // Running a tool in no execution context
182
- return doSomething(inputData.something);
183
- }
184
- }
342
+ const workflow = createWorkflow({...})
343
+ .branch([
344
+ [condition1, stepA],
345
+ [condition2, stepB],
346
+ ])
347
+ .map({
348
+ finalResult: {
349
+ step: stepA,
350
+ path: 'result' // Now optional - provide fallback
351
+ }
352
+ });
185
353
  ```
186
354
 
187
- - The `@mastra/core` package no longer allows top-level imports except for `Mastra` and `type Config`. You must use subpath imports for all other imports. ([#9544](https://github.com/mastra-ai/mastra/pull/9544))
355
+ **Why**: Branch conditionals execute only one path, so non-executed branches don't produce outputs. The type system now correctly reflects this runtime behavior.
188
356
 
189
- For example:
357
+ Related issue: https://github.com/mastra-ai/mastra/issues/10642
190
358
 
191
- ```diff
192
- import { Mastra, type Config } from "@mastra/core";
193
- - import { Agent } from "@mastra/core";
194
- - import { createTool } from "@mastra/core";
195
- - import { createStep } from "@mastra/core";
359
+ ### Minor Changes
196
360
 
197
- + import { Agent } from "@mastra/core/agent";
198
- + import { createTool } from "@mastra/core/tools";
199
- + import { createStep } from "@mastra/core/workflows";
200
- ```
361
+ - 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))
201
362
 
202
- - This simplifies the Memory API by removing the confusing rememberMessages method and renaming query to recall for better clarity. ([#9701](https://github.com/mastra-ai/mastra/pull/9701))
363
+ - Add reserved keys in RequestContext for secure resourceId/threadId setting from middleware ([#10657](https://github.com/mastra-ai/mastra/pull/10657))
203
364
 
204
- The rememberMessages method name implied it might persist data when it was actually just retrieving messages, same as query. Having two methods that did essentially the same thing was unnecessary.
365
+ 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.
205
366
 
206
- Before:
367
+ - feat(workflows): add suspendData parameter to step execute function ([#10734](https://github.com/mastra-ai/mastra/pull/10734))
207
368
 
208
- ```typescript
209
- // Two methods that did the same thing
210
- memory.rememberMessages({ threadId, resourceId, config, vectorMessageSearch });
211
- memory.query({ threadId, resourceId, perPage, vectorSearchString });
212
- ```
369
+ 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.
213
370
 
214
- After:
371
+ **New Features:**
372
+ - `suspendData` parameter automatically populated in step execute function when resuming
373
+ - Type-safe access to suspend data matching the step's `suspendSchema`
374
+ - Backward compatible - existing workflows continue to work unchanged
375
+
376
+ **Example:**
215
377
 
216
378
  ```typescript
217
- // Single unified method with clear purpose
218
- memory.recall({ threadId, resourceId, perPage, vectorMessageSearch, threadConfig });
379
+ const step = createStep({
380
+ suspendSchema: z.object({ reason: z.string() }),
381
+ resumeSchema: z.object({ approved: z.boolean() }),
382
+ execute: async ({ suspend, suspendData, resumeData }) => {
383
+ if (!resumeData?.approved) {
384
+ return await suspend({ reason: 'Approval required' });
385
+ }
386
+
387
+ // Access original suspend data when resuming
388
+ console.log(`Resuming after: ${suspendData?.reason}`);
389
+ return { result: 'Approved' };
390
+ },
391
+ });
219
392
  ```
220
393
 
221
- All usages have been updated across the codebase including tests. The agent now calls recall directly with the appropriate parameters.
394
+ - feat(storage): support querying messages from multiple threads ([#10663](https://github.com/mastra-ai/mastra/pull/10663))
395
+ - Fixed TypeScript errors where `threadId: string | string[]` was being passed to places expecting `Scalar` type
396
+ - Added proper multi-thread support for `listMessages` across all adapters when `threadId` is an array
397
+ - Updated `_getIncludedMessages` to look up message threadId by ID (since message IDs are globally unique)
398
+ - **upstash**: Added `msg-idx:{messageId}` index for O(1) message lookups (backwards compatible with fallback to scan for old messages, with automatic backfill)
222
399
 
223
- - Rename RuntimeContext to RequestContext ([#9511](https://github.com/mastra-ai/mastra/pull/9511))
400
+ - Adds trace tagging support to the BrainTrust and Langfuse tracing exporters. ([#10765](https://github.com/mastra-ai/mastra/pull/10765))
224
401
 
225
- - Implement listMessages API for replacing previous methods ([#9531](https://github.com/mastra-ai/mastra/pull/9531))
402
+ - Add `messageList` parameter to `processOutputStream` for accessing remembered messages during streaming ([#10608](https://github.com/mastra-ai/mastra/pull/10608))
226
403
 
227
- - Rename `defaultVNextStreamOptions` to `defaultOptions`. Add "Legacy" suffix to v1 option properties and methods (`defaultGenerateOptions` → `defaultGenerateOptionsLegacy`, `defaultStreamOptions` → `defaultStreamOptionsLegacy`). ([#9535](https://github.com/mastra-ai/mastra/pull/9535))
404
+ - Unify transformScoreRow functions across storage adapters ([#10648](https://github.com/mastra-ai/mastra/pull/10648))
228
405
 
229
- - Remove `getThreadsByResourceId` and `getThreadsByResourceIdPaginated` methods from storage interfaces in favor of `listThreadsByResourceId`. The new method uses `offset`/`limit` pagination and a nested `orderBy` object structure (`{ field, direction }`). ([#9536](https://github.com/mastra-ai/mastra/pull/9536))
406
+ 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:
407
+ - `preferredTimestampFields`: Preferred source fields for timestamps (PostgreSQL, Cloudflare D1)
408
+ - `convertTimestamps`: Convert timestamp strings to Date objects (MSSQL, MongoDB, ClickHouse)
409
+ - `nullValuePattern`: Skip values matching pattern (ClickHouse's `'_null_'`)
410
+ - `fieldMappings`: Map source column names to schema fields (LibSQL's `additionalLLMContext`)
230
411
 
231
- - Remove `getMessagesById` method from storage interfaces in favor of `listMessagesById`. The new method only returns V2-format messages and removes the format parameter, simplifying the API surface. Users should migrate from `getMessagesById({ messageIds, format })` to `listMessagesById({ messageIds })`. ([#9534](https://github.com/mastra-ai/mastra/pull/9534))
412
+ 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.
232
413
 
233
- - Experimental auth -> auth ([#9660](https://github.com/mastra-ai/mastra/pull/9660))
414
+ ### Patch Changes
234
415
 
235
- - Renamed a bunch of observability/tracing-related things to drop the AI prefix. ([#9744](https://github.com/mastra-ai/mastra/pull/9744))
416
+ - dependencies updates: ([#10110](https://github.com/mastra-ai/mastra/pull/10110))
417
+ - Updated dependency [`hono-openapi@^1.1.1` ↗︎](https://www.npmjs.com/package/hono-openapi/v/1.1.1) (from `^0.4.8`, in `dependencies`)
236
418
 
237
- - Removed MastraMessageV3 intermediary format, now we go from MastraDBMessage->aiv5 formats and back directly ([#9094](https://github.com/mastra-ai/mastra/pull/9094))
419
+ - unexpected json parse issue, log error but dont fail ([#10241](https://github.com/mastra-ai/mastra/pull/10241))
238
420
 
239
- - **Breaking Change**: Remove legacy v1 watch events and consolidate on v2 implementation. ([#9252](https://github.com/mastra-ai/mastra/pull/9252))
421
+ - Fixed a bug in agent networks where sometimes the task name was empty ([#10629](https://github.com/mastra-ai/mastra/pull/10629))
240
422
 
241
- This change simplifies the workflow watching API by removing the legacy v1 event system and promoting v2 as the standard (renamed to just `watch`).
423
+ - 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))
242
424
 
243
- ### What's Changed
244
- - Removed legacy v1 watch event handlers and types
245
- - Renamed `watch-v2` to `watch` throughout the codebase
246
- - Removed `.watch()` method from client-js SDK (`Workflow` and `AgentBuilder` classes)
247
- - Removed `/watch` HTTP endpoints from server and deployer
248
- - Removed `WorkflowWatchResult` and v1 `WatchEvent` types
425
+ - 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))
249
426
 
250
- - Remove various deprecated APIs from agent class. ([#9257](https://github.com/mastra-ai/mastra/pull/9257))
251
- - `agent.llm` → `agent.getLLM()`
252
- - `agent.tools` → `agent.getTools()`
253
- - `agent.instructions` → `agent.getInstructions()`
254
- - `agent.speak()` → `agent.voice.speak()`
255
- - `agent.getSpeakers()` → `agent.voice.getSpeakers()`
256
- - `agent.listen` → `agent.voice.listen()`
257
- - `agent.fetchMemory` → `(await agent.getMemory()).query()`
258
- - `agent.toStep` → Add agent directly to the step, workflows handle the transformation
427
+ - `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))
259
428
 
260
- - **BREAKING CHANGE**: Pagination APIs now use `page`/`perPage` instead of `offset`/`limit` ([#9592](https://github.com/mastra-ai/mastra/pull/9592))
429
+ 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.
261
430
 
262
- All storage and memory pagination APIs have been updated to use `page` (0-indexed) and `perPage` instead of `offset` and `limit`, aligning with standard REST API patterns.
431
+ - SimpleAuth and improved CloudAuth ([#10490](https://github.com/mastra-ai/mastra/pull/10490))
263
432
 
264
- **Affected APIs:**
265
- - `Memory.listThreadsByResourceId()`
266
- - `Memory.listMessages()`
267
- - `Storage.listWorkflowRuns()`
433
+ - 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))
268
434
 
269
- **Migration:**
435
+ The fix normalizes `undefined`/`null` to `{}` for object schemas and `[]` for array schemas before validation.
270
436
 
271
- ```typescript
272
- // Before
273
- await memory.listThreadsByResourceId({
274
- resourceId: 'user-123',
275
- offset: 20,
276
- limit: 10,
277
- });
437
+ - 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))
278
438
 
279
- // After
280
- await memory.listThreadsByResourceId({
281
- resourceId: 'user-123',
282
- page: 2, // page = Math.floor(offset / limit)
283
- perPage: 10,
284
- });
439
+ - Fix error when spreading config objects in Mastra constructor ([#10718](https://github.com/mastra-ai/mastra/pull/10718))
285
440
 
286
- // Before
287
- await memory.listMessages({
288
- threadId: 'thread-456',
289
- offset: 20,
290
- limit: 10,
291
- });
441
+ 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.
292
442
 
293
- // After
294
- await memory.listMessages({
295
- threadId: 'thread-456',
296
- page: 2,
297
- perPage: 10,
443
+ - 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))
444
+
445
+ - Fix generateTitle model type to accept AI SDK LanguageModelV2 ([#10541](https://github.com/mastra-ai/mastra/pull/10541))
446
+
447
+ 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.
448
+
449
+ Previously, passing a standard `LanguageModelV2` would fail because `MastraLanguageModelV2` has different `doGenerate`/`doStream` return types. Now `MastraModelConfig` is used consistently across:
450
+ - `memory/types.ts` - `generateTitle.model` config
451
+ - `agent.ts` - `genTitle`, `generateTitleFromUserMessage`, `resolveTitleGenerationConfig`
452
+ - `agent-legacy.ts` - `AgentLegacyCapabilities` interface
453
+
454
+ - Fix message ordering when using toAISdkV5Messages or prepareStep ([#10686](https://github.com/mastra-ai/mastra/pull/10686))
455
+
456
+ 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.
457
+
458
+ Before:
459
+
460
+ ```
461
+ Input: [user: "hello", assistant: "Hi!", user: "bye"]
462
+ Output: [user: "bye", assistant: "Hi!", user: "hello"] // shuffled!
463
+ ```
464
+
465
+ After:
466
+
467
+ ```
468
+ Input: [user: "hello", assistant: "Hi!", user: "bye"]
469
+ Output: [user: "hello", assistant: "Hi!", user: "bye"] // correct order
470
+ ```
471
+
472
+ - Fix Scorer not using custom gateways registered with Mastra ([#10778](https://github.com/mastra-ai/mastra/pull/10778))
473
+
474
+ 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.
475
+
476
+ - Fix workflow run status not being updated from storage snapshot in createRun ([#10664](https://github.com/mastra-ai/mastra/pull/10664))
477
+
478
+ 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').
479
+
480
+ - Pass resourceId and threadId to network agent's subAgent when it has its own memory ([#10592](https://github.com/mastra-ai/mastra/pull/10592))
481
+
482
+ - 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))
483
+
484
+ - 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))
485
+
486
+ This lets you pass provider-specific settings like `reasoningEffort` for OpenAI thinking models:
487
+
488
+ ```typescript
489
+ const processor = new PromptInjectionDetector({
490
+ model: 'openai/o1-mini',
491
+ threshold: 0.7,
492
+ strategy: 'block',
493
+ providerOptions: {
494
+ openai: {
495
+ reasoningEffort: 'low',
496
+ },
497
+ },
298
498
  });
499
+ ```
299
500
 
300
- // Before
301
501
 
302
- ... 5120 more lines hidden. See full changelog in package directory.
502
+ ... 6056 more lines hidden. See full changelog in package directory.