@mastra/mcp-docs-server 1.0.0-beta.9 → 1.0.1

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 (541) hide show
  1. package/.docs/organized/changelogs/%40internal%2Fchangeset-cli.md +3 -1
  2. package/.docs/organized/changelogs/%40internal%2Fexternal-types.md +3 -1
  3. package/.docs/organized/changelogs/%40internal%2Fplayground.md +60 -0
  4. package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +15 -15
  5. package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +3 -1
  6. package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +287 -287
  7. package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +302 -302
  8. package/.docs/organized/changelogs/%40mastra%2Fastra.md +53 -53
  9. package/.docs/organized/changelogs/%40mastra%2Fauth.md +38 -0
  10. package/.docs/organized/changelogs/%40mastra%2Fchroma.md +66 -66
  11. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +522 -212
  12. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +239 -239
  13. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +439 -234
  14. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +450 -211
  15. package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +202 -0
  16. package/.docs/organized/changelogs/%40mastra%2Fconvex.md +448 -22
  17. package/.docs/organized/changelogs/%40mastra%2Fcore.md +348 -348
  18. package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +60 -60
  19. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +287 -287
  20. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +106 -106
  21. package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +90 -90
  22. package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +86 -86
  23. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +221 -221
  24. package/.docs/organized/changelogs/%40mastra%2Fduckdb.md +70 -0
  25. package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +403 -225
  26. package/.docs/organized/changelogs/%40mastra%2Felasticsearch.md +72 -0
  27. package/.docs/organized/changelogs/%40mastra%2Fevals.md +145 -145
  28. package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +54 -0
  29. package/.docs/organized/changelogs/%40mastra%2Flance.md +456 -226
  30. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +625 -229
  31. package/.docs/organized/changelogs/%40mastra%2Floggers.md +71 -71
  32. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +245 -245
  33. package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +28 -28
  34. package/.docs/organized/changelogs/%40mastra%2Fmcp.md +281 -281
  35. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +354 -156
  36. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +545 -212
  37. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +481 -202
  38. package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +194 -194
  39. package/.docs/organized/changelogs/%40mastra%2Fpg.md +781 -235
  40. package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +198 -198
  41. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +282 -282
  42. package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +163 -163
  43. package/.docs/organized/changelogs/%40mastra%2Frag.md +310 -310
  44. package/.docs/organized/changelogs/%40mastra%2Freact.md +328 -237
  45. package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +64 -0
  46. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +160 -0
  47. package/.docs/organized/changelogs/%40mastra%2Fserver.md +230 -230
  48. package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +57 -57
  49. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +479 -232
  50. package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +53 -53
  51. package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +45 -45
  52. package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +45 -45
  53. package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +47 -47
  54. package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +110 -110
  55. package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +15 -0
  56. package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +98 -0
  57. package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +54 -54
  58. package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +46 -46
  59. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +93 -93
  60. package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +47 -47
  61. package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +45 -45
  62. package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +45 -45
  63. package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +45 -45
  64. package/.docs/organized/changelogs/create-mastra.md +219 -219
  65. package/.docs/organized/changelogs/mastra.md +276 -276
  66. package/.docs/organized/code-examples/a2a.md +2 -2
  67. package/.docs/organized/code-examples/agent-v6.md +221 -0
  68. package/.docs/organized/code-examples/agui.md +4 -4
  69. package/.docs/organized/code-examples/ai-elements.md +3 -3
  70. package/.docs/organized/code-examples/ai-sdk-useChat.md +2 -2
  71. package/.docs/organized/code-examples/ai-sdk-v5.md +3 -3
  72. package/.docs/organized/code-examples/assistant-ui.md +5 -5
  73. package/.docs/organized/code-examples/bird-checker-with-express.md +1 -1
  74. package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +2 -2
  75. package/.docs/organized/code-examples/bird-checker-with-nextjs.md +3 -3
  76. package/.docs/organized/code-examples/client-side-tools.md +4 -4
  77. package/.docs/organized/code-examples/crypto-chatbot.md +5 -5
  78. package/.docs/organized/code-examples/experimental-auth-weather-agent.md +1 -1
  79. package/.docs/organized/code-examples/fireworks-r1.md +2 -2
  80. package/.docs/organized/code-examples/heads-up-game.md +7 -7
  81. package/.docs/organized/code-examples/inngest.md +1075 -0
  82. package/.docs/organized/code-examples/mcp-configuration.md +1 -1
  83. package/.docs/organized/code-examples/mcp-server-adapters.md +2 -2
  84. package/.docs/organized/code-examples/memory-per-resource-example.md +3 -3
  85. package/.docs/organized/code-examples/memory-todo-agent.md +1 -1
  86. package/.docs/organized/code-examples/memory-with-context.md +1 -1
  87. package/.docs/organized/code-examples/memory-with-processors.md +1 -1
  88. package/.docs/organized/code-examples/openapi-spec-writer.md +3 -3
  89. package/.docs/organized/code-examples/quick-start.md +1 -5
  90. package/.docs/organized/code-examples/server-app-access.md +2 -2
  91. package/.docs/organized/code-examples/server-express-adapter.md +1 -1
  92. package/.docs/organized/code-examples/server-fastify-adapter.md +83 -0
  93. package/.docs/organized/code-examples/server-hono-adapter.md +2 -2
  94. package/.docs/organized/code-examples/server-koa-adapter.md +94 -0
  95. package/.docs/organized/code-examples/stock-price-tool.md +21 -2
  96. package/.docs/organized/code-examples/workflow-ai-recruiter.md +1 -1
  97. package/.docs/organized/code-examples/workflow-with-inline-steps.md +1 -1
  98. package/.docs/organized/code-examples/workflow-with-memory.md +1 -1
  99. package/.docs/organized/code-examples/workflow-with-separate-steps.md +1 -1
  100. package/.docs/organized/code-examples/workflow-with-suspend-resume.md +1 -1
  101. package/.docs/raw/agents/adding-voice.mdx +24 -6
  102. package/.docs/raw/agents/agent-approval.mdx +209 -12
  103. package/.docs/raw/agents/agent-memory.mdx +36 -32
  104. package/.docs/raw/agents/guardrails.mdx +105 -56
  105. package/.docs/raw/agents/network-approval.mdx +281 -0
  106. package/.docs/raw/agents/networks.mdx +69 -13
  107. package/.docs/raw/agents/overview.mdx +43 -25
  108. package/.docs/raw/agents/processors.mdx +234 -17
  109. package/.docs/raw/agents/structured-output.mdx +78 -8
  110. package/.docs/raw/agents/using-tools.mdx +67 -6
  111. package/.docs/raw/course/01-first-agent/07-creating-your-agent.md +1 -2
  112. package/.docs/raw/course/01-first-agent/12-connecting-tool-to-agent.md +1 -1
  113. package/.docs/raw/course/01-first-agent/16-adding-memory-to-agent.md +1 -2
  114. package/.docs/raw/course/02-agent-tools-mcp/05-updating-your-agent.md +1 -1
  115. package/.docs/raw/course/02-agent-tools-mcp/10-updating-agent-instructions-zapier.md +1 -1
  116. package/.docs/raw/course/02-agent-tools-mcp/16-updating-agent-instructions-github.md +1 -1
  117. package/.docs/raw/course/02-agent-tools-mcp/21-updating-agent-instructions-hackernews.md +1 -1
  118. package/.docs/raw/course/02-agent-tools-mcp/27-updating-agent-instructions-filesystem.md +1 -1
  119. package/.docs/raw/course/02-agent-tools-mcp/31-enhancing-memory-configuration.md +3 -3
  120. package/.docs/raw/course/03-agent-memory/04-creating-basic-memory-agent.md +1 -2
  121. package/.docs/raw/course/03-agent-memory/07-understanding-memory-threads.md +35 -0
  122. package/.docs/raw/course/03-agent-memory/08-configuring-conversation-history.md +1 -2
  123. package/.docs/raw/course/03-agent-memory/13-vector-store-configuration.md +1 -1
  124. package/.docs/raw/course/03-agent-memory/16-configuring-semantic-recall.md +4 -5
  125. package/.docs/raw/course/03-agent-memory/18-advanced-configuration-semantic-recall.md +1 -1
  126. package/.docs/raw/course/03-agent-memory/21-configuring-working-memory.md +3 -4
  127. package/.docs/raw/course/03-agent-memory/22-custom-working-memory-templates.md +3 -4
  128. package/.docs/raw/course/03-agent-memory/25-combining-memory-features.md +3 -4
  129. package/.docs/raw/course/03-agent-memory/27-creating-learning-assistant.md +3 -4
  130. package/.docs/raw/course/04-workflows/11-creating-an-ai-agent.md +2 -3
  131. package/.docs/raw/deployment/cloud-providers.mdx +22 -0
  132. package/.docs/raw/deployment/mastra-server.mdx +140 -0
  133. package/.docs/raw/deployment/monorepo.mdx +106 -42
  134. package/.docs/raw/deployment/overview.mdx +35 -48
  135. package/.docs/raw/deployment/web-framework.mdx +17 -19
  136. package/.docs/raw/deployment/workflow-runners.mdx +16 -0
  137. package/.docs/raw/evals/built-in-scorers.mdx +2 -0
  138. package/.docs/raw/evals/custom-scorers.mdx +60 -12
  139. package/.docs/raw/evals/overview.mdx +6 -6
  140. package/.docs/raw/evals/running-in-ci.mdx +4 -2
  141. package/.docs/raw/getting-started/manual-install.mdx +20 -20
  142. package/.docs/raw/getting-started/mcp-docs-server.mdx +59 -2
  143. package/.docs/raw/getting-started/project-structure.mdx +2 -2
  144. package/.docs/raw/getting-started/start.mdx +17 -1
  145. package/.docs/raw/getting-started/studio.mdx +6 -35
  146. package/.docs/raw/guides/agent-frameworks/ai-sdk.mdx +23 -33
  147. package/.docs/raw/guides/build-your-ui/ai-sdk-ui.mdx +1034 -80
  148. package/.docs/raw/guides/build-your-ui/assistant-ui.mdx +8 -8
  149. package/.docs/raw/guides/build-your-ui/copilotkit.mdx +32 -11
  150. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/amazon-ec2.mdx +9 -9
  151. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/aws-lambda.mdx +13 -16
  152. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/azure-app-services.mdx +5 -7
  153. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/cloudflare-deployer.mdx +8 -5
  154. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/digital-ocean.mdx +18 -23
  155. package/.docs/raw/guides/deployment/index.mdx +32 -0
  156. package/.docs/raw/guides/deployment/inngest.mdx +673 -0
  157. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/netlify-deployer.mdx +7 -3
  158. package/.docs/raw/{deployment/cloud-providers → guides/deployment}/vercel-deployer.mdx +8 -5
  159. package/.docs/raw/guides/getting-started/astro.mdx +292 -451
  160. package/.docs/raw/guides/getting-started/express.mdx +72 -153
  161. package/.docs/raw/guides/getting-started/hono.mdx +227 -0
  162. package/.docs/raw/guides/getting-started/next-js.mdx +173 -61
  163. package/.docs/raw/guides/getting-started/nuxt.mdx +505 -0
  164. package/.docs/raw/guides/getting-started/quickstart.mdx +5 -5
  165. package/.docs/raw/guides/getting-started/sveltekit.mdx +238 -409
  166. package/.docs/raw/guides/getting-started/vite-react.mdx +317 -147
  167. package/.docs/raw/guides/guide/ai-recruiter.mdx +10 -10
  168. package/.docs/raw/guides/guide/chef-michel.mdx +9 -11
  169. package/.docs/raw/guides/guide/notes-mcp-server.mdx +15 -15
  170. package/.docs/raw/guides/guide/research-assistant.mdx +20 -20
  171. package/.docs/raw/guides/guide/stock-agent.mdx +5 -5
  172. package/.docs/raw/guides/guide/web-search.mdx +38 -38
  173. package/.docs/raw/guides/guide/whatsapp-chat-bot.mdx +7 -7
  174. package/.docs/raw/guides/index.mdx +0 -1
  175. package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +2 -2
  176. package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +105 -4
  177. package/.docs/raw/guides/migrations/upgrade-to-v1/cli.mdx +15 -1
  178. package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +170 -0
  179. package/.docs/raw/guides/migrations/upgrade-to-v1/deployment.mdx +42 -0
  180. package/.docs/raw/guides/migrations/upgrade-to-v1/mastra.mdx +0 -35
  181. package/.docs/raw/guides/migrations/upgrade-to-v1/memory.mdx +40 -3
  182. package/.docs/raw/guides/migrations/upgrade-to-v1/overview.mdx +17 -2
  183. package/.docs/raw/guides/migrations/upgrade-to-v1/processors.mdx +11 -0
  184. package/.docs/raw/guides/migrations/upgrade-to-v1/rag.mdx +47 -0
  185. package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +271 -25
  186. package/.docs/raw/guides/migrations/upgrade-to-v1/tracing.mdx +72 -17
  187. package/.docs/raw/guides/migrations/upgrade-to-v1/vectors.mdx +46 -1
  188. package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +50 -7
  189. package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +21 -23
  190. package/.docs/raw/index.mdx +2 -2
  191. package/.docs/raw/mastra-cloud/deployment.mdx +86 -0
  192. package/.docs/raw/mastra-cloud/observability.mdx +43 -0
  193. package/.docs/raw/mastra-cloud/overview.mdx +31 -0
  194. package/.docs/raw/mastra-cloud/setup.mdx +64 -0
  195. package/.docs/raw/mastra-cloud/studio.mdx +35 -0
  196. package/.docs/raw/mcp/overview.mdx +60 -25
  197. package/.docs/raw/mcp/publishing-mcp-server.mdx +7 -4
  198. package/.docs/raw/memory/memory-processors.mdx +17 -12
  199. package/.docs/raw/memory/message-history.mdx +72 -0
  200. package/.docs/raw/memory/overview.mdx +38 -76
  201. package/.docs/raw/memory/semantic-recall.mdx +65 -52
  202. package/.docs/raw/memory/storage.mdx +248 -0
  203. package/.docs/raw/memory/working-memory.mdx +24 -13
  204. package/.docs/raw/observability/logging.mdx +16 -15
  205. package/.docs/raw/observability/overview.mdx +27 -7
  206. package/.docs/raw/observability/tracing/bridges/otel.mdx +7 -4
  207. package/.docs/raw/observability/tracing/exporters/arize.mdx +61 -24
  208. package/.docs/raw/observability/tracing/exporters/braintrust.mdx +32 -22
  209. package/.docs/raw/observability/tracing/exporters/cloud.mdx +24 -5
  210. package/.docs/raw/observability/tracing/exporters/datadog.mdx +175 -0
  211. package/.docs/raw/observability/tracing/exporters/default.mdx +28 -7
  212. package/.docs/raw/observability/tracing/exporters/laminar.mdx +89 -0
  213. package/.docs/raw/observability/tracing/exporters/langfuse.mdx +31 -22
  214. package/.docs/raw/observability/tracing/exporters/langsmith.mdx +33 -3
  215. package/.docs/raw/observability/tracing/exporters/otel.mdx +194 -22
  216. package/.docs/raw/observability/tracing/exporters/posthog.mdx +32 -22
  217. package/.docs/raw/observability/tracing/exporters/sentry.mdx +198 -0
  218. package/.docs/raw/observability/tracing/overview.mdx +388 -108
  219. package/.docs/raw/observability/tracing/processors/sensitive-data-filter.mdx +27 -7
  220. package/.docs/raw/rag/chunking-and-embedding.mdx +22 -33
  221. package/.docs/raw/rag/graph-rag.mdx +223 -0
  222. package/.docs/raw/rag/overview.mdx +6 -3
  223. package/.docs/raw/rag/retrieval.mdx +53 -57
  224. package/.docs/raw/rag/vector-databases.mdx +55 -31
  225. package/.docs/raw/reference/agents/agent.mdx +17 -14
  226. package/.docs/raw/reference/agents/generate.mdx +172 -44
  227. package/.docs/raw/reference/agents/generateLegacy.mdx +5 -3
  228. package/.docs/raw/reference/agents/getDefaultGenerateOptions.mdx +5 -3
  229. package/.docs/raw/reference/agents/getDefaultOptions.mdx +5 -3
  230. package/.docs/raw/reference/agents/getDefaultStreamOptions.mdx +5 -3
  231. package/.docs/raw/reference/agents/getDescription.mdx +3 -1
  232. package/.docs/raw/reference/agents/getInstructions.mdx +5 -3
  233. package/.docs/raw/reference/agents/getLLM.mdx +5 -3
  234. package/.docs/raw/reference/agents/getMemory.mdx +5 -3
  235. package/.docs/raw/reference/agents/getModel.mdx +5 -3
  236. package/.docs/raw/reference/agents/getTools.mdx +4 -2
  237. package/.docs/raw/reference/agents/getVoice.mdx +4 -2
  238. package/.docs/raw/reference/agents/listAgents.mdx +4 -2
  239. package/.docs/raw/reference/agents/listScorers.mdx +5 -3
  240. package/.docs/raw/reference/agents/listTools.mdx +4 -2
  241. package/.docs/raw/reference/agents/listWorkflows.mdx +4 -2
  242. package/.docs/raw/reference/agents/network.mdx +113 -1
  243. package/.docs/raw/reference/ai-sdk/chat-route.mdx +6 -3
  244. package/.docs/raw/reference/ai-sdk/handle-chat-stream.mdx +4 -2
  245. package/.docs/raw/reference/ai-sdk/handle-network-stream.mdx +4 -2
  246. package/.docs/raw/reference/ai-sdk/handle-workflow-stream.mdx +5 -3
  247. package/.docs/raw/reference/ai-sdk/network-route.mdx +6 -3
  248. package/.docs/raw/reference/ai-sdk/to-ai-sdk-stream.mdx +10 -6
  249. package/.docs/raw/reference/ai-sdk/to-ai-sdk-v4-messages.mdx +130 -0
  250. package/.docs/raw/reference/ai-sdk/to-ai-sdk-v5-messages.mdx +110 -0
  251. package/.docs/raw/reference/ai-sdk/with-mastra.mdx +122 -0
  252. package/.docs/raw/reference/ai-sdk/workflow-route.mdx +7 -4
  253. package/.docs/raw/reference/auth/auth0.mdx +5 -3
  254. package/.docs/raw/reference/auth/clerk.mdx +5 -3
  255. package/.docs/raw/reference/auth/firebase.mdx +6 -5
  256. package/.docs/raw/reference/auth/jwt.mdx +5 -3
  257. package/.docs/raw/reference/auth/supabase.mdx +5 -3
  258. package/.docs/raw/reference/auth/workos.mdx +5 -3
  259. package/.docs/raw/reference/cli/create-mastra.mdx +12 -10
  260. package/.docs/raw/reference/cli/mastra.mdx +63 -15
  261. package/.docs/raw/reference/client-js/agents.mdx +77 -35
  262. package/.docs/raw/reference/client-js/error-handling.mdx +3 -3
  263. package/.docs/raw/reference/client-js/logs.mdx +2 -0
  264. package/.docs/raw/reference/client-js/mastra-client.mdx +4 -2
  265. package/.docs/raw/reference/client-js/memory.mdx +43 -1
  266. package/.docs/raw/reference/client-js/observability.mdx +2 -0
  267. package/.docs/raw/reference/client-js/telemetry.mdx +2 -0
  268. package/.docs/raw/reference/client-js/tools.mdx +2 -0
  269. package/.docs/raw/reference/client-js/vectors.mdx +2 -0
  270. package/.docs/raw/reference/client-js/workflows.mdx +47 -3
  271. package/.docs/raw/reference/configuration.mdx +761 -0
  272. package/.docs/raw/reference/core/addGateway.mdx +2 -0
  273. package/.docs/raw/reference/core/getAgent.mdx +3 -1
  274. package/.docs/raw/reference/core/getAgentById.mdx +3 -1
  275. package/.docs/raw/reference/core/getDeployer.mdx +3 -1
  276. package/.docs/raw/reference/core/getGateway.mdx +2 -0
  277. package/.docs/raw/reference/core/getGatewayById.mdx +2 -0
  278. package/.docs/raw/reference/core/getLogger.mdx +3 -1
  279. package/.docs/raw/reference/core/getMCPServer.mdx +3 -1
  280. package/.docs/raw/reference/core/getMCPServerById.mdx +3 -1
  281. package/.docs/raw/reference/core/getMemory.mdx +7 -3
  282. package/.docs/raw/reference/core/getScorer.mdx +2 -0
  283. package/.docs/raw/reference/core/getScorerById.mdx +2 -0
  284. package/.docs/raw/reference/core/getServer.mdx +6 -4
  285. package/.docs/raw/reference/core/getStorage.mdx +5 -3
  286. package/.docs/raw/reference/core/getStoredAgentById.mdx +6 -4
  287. package/.docs/raw/reference/core/getTelemetry.mdx +3 -1
  288. package/.docs/raw/reference/core/getVector.mdx +3 -1
  289. package/.docs/raw/reference/core/getWorkflow.mdx +3 -1
  290. package/.docs/raw/reference/core/listAgents.mdx +3 -1
  291. package/.docs/raw/reference/core/listGateways.mdx +2 -0
  292. package/.docs/raw/reference/core/listLogs.mdx +3 -1
  293. package/.docs/raw/reference/core/listLogsByRunId.mdx +3 -1
  294. package/.docs/raw/reference/core/listMCPServers.mdx +3 -1
  295. package/.docs/raw/reference/core/listMemory.mdx +8 -4
  296. package/.docs/raw/reference/core/listScorers.mdx +2 -0
  297. package/.docs/raw/reference/core/listStoredAgents.mdx +7 -5
  298. package/.docs/raw/reference/core/listVectors.mdx +3 -1
  299. package/.docs/raw/reference/core/listWorkflows.mdx +3 -1
  300. package/.docs/raw/reference/core/mastra-class.mdx +27 -20
  301. package/.docs/raw/reference/core/mastra-model-gateway.mdx +2 -0
  302. package/.docs/raw/reference/core/setLogger.mdx +3 -1
  303. package/.docs/raw/reference/core/setStorage.mdx +6 -4
  304. package/.docs/raw/reference/deployer/cloudflare.mdx +22 -53
  305. package/.docs/raw/reference/deployer/deployer.mdx +2 -1
  306. package/.docs/raw/reference/deployer/netlify.mdx +4 -1
  307. package/.docs/raw/reference/deployer/vercel.mdx +5 -4
  308. package/.docs/raw/reference/evals/answer-relevancy.mdx +4 -1
  309. package/.docs/raw/reference/evals/answer-similarity.mdx +4 -1
  310. package/.docs/raw/reference/evals/bias.mdx +4 -1
  311. package/.docs/raw/reference/evals/completeness.mdx +4 -1
  312. package/.docs/raw/reference/evals/content-similarity.mdx +4 -1
  313. package/.docs/raw/reference/evals/context-precision.mdx +4 -1
  314. package/.docs/raw/reference/evals/context-relevance.mdx +2 -0
  315. package/.docs/raw/reference/evals/create-scorer.mdx +11 -3
  316. package/.docs/raw/reference/evals/faithfulness.mdx +4 -1
  317. package/.docs/raw/reference/evals/hallucination.mdx +4 -1
  318. package/.docs/raw/reference/evals/keyword-coverage.mdx +4 -1
  319. package/.docs/raw/reference/evals/mastra-scorer.mdx +2 -0
  320. package/.docs/raw/reference/evals/noise-sensitivity.mdx +2 -0
  321. package/.docs/raw/reference/evals/prompt-alignment.mdx +9 -7
  322. package/.docs/raw/reference/evals/run-evals.mdx +3 -1
  323. package/.docs/raw/reference/evals/scorer-utils.mdx +3 -0
  324. package/.docs/raw/reference/evals/textual-difference.mdx +4 -1
  325. package/.docs/raw/reference/evals/tone-consistency.mdx +4 -1
  326. package/.docs/raw/reference/evals/tool-call-accuracy.mdx +25 -23
  327. package/.docs/raw/reference/evals/toxicity.mdx +4 -1
  328. package/.docs/raw/reference/index.mdx +2 -1
  329. package/.docs/raw/reference/logging/pino-logger.mdx +10 -8
  330. package/.docs/raw/reference/memory/clone-utilities.mdx +345 -0
  331. package/.docs/raw/reference/memory/cloneThread.mdx +237 -0
  332. package/.docs/raw/reference/memory/createThread.mdx +6 -4
  333. package/.docs/raw/reference/memory/deleteMessages.mdx +4 -2
  334. package/.docs/raw/reference/memory/getThreadById.mdx +3 -1
  335. package/.docs/raw/reference/memory/listThreads.mdx +187 -0
  336. package/.docs/raw/reference/memory/memory-class.mdx +27 -20
  337. package/.docs/raw/reference/memory/recall.mdx +6 -4
  338. package/.docs/raw/reference/observability/tracing/bridges/otel.mdx +6 -2
  339. package/.docs/raw/reference/observability/tracing/configuration.mdx +51 -0
  340. package/.docs/raw/reference/observability/tracing/exporters/arize.mdx +25 -6
  341. package/.docs/raw/reference/observability/tracing/exporters/braintrust.mdx +23 -2
  342. package/.docs/raw/reference/observability/tracing/exporters/cloud-exporter.mdx +10 -0
  343. package/.docs/raw/reference/observability/tracing/exporters/console-exporter.mdx +3 -0
  344. package/.docs/raw/reference/observability/tracing/exporters/datadog.mdx +172 -0
  345. package/.docs/raw/reference/observability/tracing/exporters/default-exporter.mdx +10 -0
  346. package/.docs/raw/reference/observability/tracing/exporters/laminar.mdx +139 -0
  347. package/.docs/raw/reference/observability/tracing/exporters/langfuse.mdx +26 -4
  348. package/.docs/raw/reference/observability/tracing/exporters/langsmith.mdx +10 -0
  349. package/.docs/raw/reference/observability/tracing/exporters/otel.mdx +51 -34
  350. package/.docs/raw/reference/observability/tracing/exporters/posthog.mdx +25 -4
  351. package/.docs/raw/reference/observability/tracing/exporters/sentry.mdx +224 -0
  352. package/.docs/raw/reference/observability/tracing/instances.mdx +2 -0
  353. package/.docs/raw/reference/observability/tracing/interfaces.mdx +20 -0
  354. package/.docs/raw/reference/observability/tracing/processors/sensitive-data-filter.mdx +2 -0
  355. package/.docs/raw/reference/observability/tracing/spans.mdx +2 -0
  356. package/.docs/raw/reference/processors/batch-parts-processor.mdx +4 -2
  357. package/.docs/raw/reference/processors/language-detector.mdx +6 -3
  358. package/.docs/raw/reference/processors/message-history-processor.mdx +5 -2
  359. package/.docs/raw/reference/processors/moderation-processor.mdx +6 -4
  360. package/.docs/raw/reference/processors/pii-detector.mdx +6 -4
  361. package/.docs/raw/reference/processors/processor-interface.mdx +326 -23
  362. package/.docs/raw/reference/processors/prompt-injection-detector.mdx +5 -3
  363. package/.docs/raw/reference/processors/semantic-recall-processor.mdx +7 -2
  364. package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +5 -3
  365. package/.docs/raw/reference/processors/token-limiter-processor.mdx +62 -19
  366. package/.docs/raw/reference/processors/tool-call-filter.mdx +5 -3
  367. package/.docs/raw/reference/processors/unicode-normalizer.mdx +6 -3
  368. package/.docs/raw/reference/processors/working-memory-processor.mdx +6 -3
  369. package/.docs/raw/reference/rag/chunk.mdx +7 -6
  370. package/.docs/raw/reference/rag/database-config.mdx +8 -6
  371. package/.docs/raw/reference/rag/document.mdx +2 -0
  372. package/.docs/raw/reference/rag/embeddings.mdx +2 -0
  373. package/.docs/raw/reference/rag/extract-params.mdx +57 -3
  374. package/.docs/raw/reference/rag/graph-rag.mdx +2 -0
  375. package/.docs/raw/reference/rag/metadata-filters.mdx +27 -7
  376. package/.docs/raw/reference/rag/rerank.mdx +2 -0
  377. package/.docs/raw/reference/rag/rerankWithScorer.mdx +2 -0
  378. package/.docs/raw/reference/server/create-route.mdx +34 -18
  379. package/.docs/raw/reference/server/express-adapter.mdx +27 -51
  380. package/.docs/raw/reference/server/fastify-adapter.mdx +130 -0
  381. package/.docs/raw/reference/server/hono-adapter.mdx +27 -51
  382. package/.docs/raw/reference/server/koa-adapter.mdx +129 -0
  383. package/.docs/raw/reference/server/mastra-server.mdx +52 -34
  384. package/.docs/raw/reference/server/routes.mdx +73 -10
  385. package/.docs/raw/reference/storage/cloudflare-d1.mdx +10 -5
  386. package/.docs/raw/reference/storage/cloudflare.mdx +12 -2
  387. package/.docs/raw/reference/storage/composite.mdx +245 -0
  388. package/.docs/raw/reference/storage/convex.mdx +8 -6
  389. package/.docs/raw/reference/storage/dynamodb.mdx +134 -8
  390. package/.docs/raw/reference/storage/lance.mdx +9 -5
  391. package/.docs/raw/reference/storage/libsql.mdx +76 -54
  392. package/.docs/raw/reference/storage/mongodb.mdx +115 -16
  393. package/.docs/raw/reference/storage/mssql.mdx +11 -6
  394. package/.docs/raw/{server-db/storage.mdx → reference/storage/overview.mdx} +15 -111
  395. package/.docs/raw/reference/storage/postgresql.mdx +228 -83
  396. package/.docs/raw/reference/storage/upstash.mdx +78 -2
  397. package/.docs/raw/reference/streaming/ChunkType.mdx +31 -3
  398. package/.docs/raw/reference/streaming/agents/MastraModelOutput.mdx +67 -6
  399. package/.docs/raw/reference/streaming/agents/stream.mdx +48 -51
  400. package/.docs/raw/reference/streaming/agents/streamLegacy.mdx +5 -3
  401. package/.docs/raw/reference/streaming/workflows/observeStream.mdx +3 -1
  402. package/.docs/raw/reference/streaming/workflows/resumeStream.mdx +3 -1
  403. package/.docs/raw/reference/streaming/workflows/stream.mdx +37 -22
  404. package/.docs/raw/reference/streaming/workflows/timeTravelStream.mdx +6 -4
  405. package/.docs/raw/reference/templates/overview.mdx +3 -2
  406. package/.docs/raw/reference/tools/client.mdx +3 -0
  407. package/.docs/raw/reference/tools/create-tool.mdx +127 -5
  408. package/.docs/raw/reference/tools/document-chunker-tool.mdx +2 -0
  409. package/.docs/raw/reference/tools/graph-rag-tool.mdx +40 -3
  410. package/.docs/raw/reference/tools/mcp-client.mdx +110 -1
  411. package/.docs/raw/reference/tools/mcp-server.mdx +278 -24
  412. package/.docs/raw/reference/tools/vector-query-tool.mdx +68 -4
  413. package/.docs/raw/reference/vectors/astra.mdx +5 -3
  414. package/.docs/raw/reference/vectors/chroma.mdx +5 -3
  415. package/.docs/raw/reference/vectors/convex.mdx +14 -12
  416. package/.docs/raw/reference/vectors/couchbase.mdx +7 -5
  417. package/.docs/raw/reference/vectors/duckdb.mdx +12 -10
  418. package/.docs/raw/reference/vectors/elasticsearch.mdx +12 -4
  419. package/.docs/raw/reference/vectors/lance.mdx +6 -4
  420. package/.docs/raw/reference/vectors/libsql.mdx +66 -13
  421. package/.docs/raw/reference/vectors/mongodb.mdx +90 -10
  422. package/.docs/raw/reference/vectors/opensearch.mdx +30 -3
  423. package/.docs/raw/reference/vectors/pg.mdx +58 -6
  424. package/.docs/raw/reference/vectors/pinecone.mdx +23 -8
  425. package/.docs/raw/reference/vectors/qdrant.mdx +148 -4
  426. package/.docs/raw/reference/vectors/s3vectors.mdx +8 -6
  427. package/.docs/raw/reference/vectors/turbopuffer.mdx +6 -4
  428. package/.docs/raw/reference/vectors/upstash.mdx +60 -6
  429. package/.docs/raw/reference/vectors/vectorize.mdx +5 -3
  430. package/.docs/raw/reference/voice/azure.mdx +2 -0
  431. package/.docs/raw/reference/voice/cloudflare.mdx +2 -0
  432. package/.docs/raw/reference/voice/composite-voice.mdx +4 -0
  433. package/.docs/raw/reference/voice/deepgram.mdx +2 -0
  434. package/.docs/raw/reference/voice/elevenlabs.mdx +2 -0
  435. package/.docs/raw/reference/voice/google-gemini-live.mdx +3 -0
  436. package/.docs/raw/reference/voice/google.mdx +2 -0
  437. package/.docs/raw/reference/voice/mastra-voice.mdx +2 -0
  438. package/.docs/raw/reference/voice/murf.mdx +2 -0
  439. package/.docs/raw/reference/voice/openai-realtime.mdx +3 -0
  440. package/.docs/raw/reference/voice/openai.mdx +2 -0
  441. package/.docs/raw/reference/voice/playai.mdx +2 -0
  442. package/.docs/raw/reference/voice/sarvam.mdx +2 -0
  443. package/.docs/raw/reference/voice/speechify.mdx +2 -0
  444. package/.docs/raw/reference/voice/voice.addInstructions.mdx +3 -0
  445. package/.docs/raw/reference/voice/voice.addTools.mdx +3 -0
  446. package/.docs/raw/reference/voice/voice.answer.mdx +4 -0
  447. package/.docs/raw/reference/voice/voice.close.mdx +3 -0
  448. package/.docs/raw/reference/voice/voice.connect.mdx +5 -1
  449. package/.docs/raw/reference/voice/voice.events.mdx +2 -0
  450. package/.docs/raw/reference/voice/voice.getSpeakers.mdx +3 -0
  451. package/.docs/raw/reference/voice/voice.listen.mdx +6 -0
  452. package/.docs/raw/reference/voice/voice.off.mdx +2 -0
  453. package/.docs/raw/reference/voice/voice.on.mdx +5 -1
  454. package/.docs/raw/reference/voice/voice.send.mdx +4 -0
  455. package/.docs/raw/reference/voice/voice.speak.mdx +6 -0
  456. package/.docs/raw/reference/voice/voice.updateConfig.mdx +2 -0
  457. package/.docs/raw/reference/workflows/run-methods/cancel.mdx +55 -5
  458. package/.docs/raw/reference/workflows/run-methods/restart.mdx +3 -3
  459. package/.docs/raw/reference/workflows/run-methods/resume.mdx +6 -4
  460. package/.docs/raw/reference/workflows/run-methods/start.mdx +7 -5
  461. package/.docs/raw/reference/workflows/run-methods/startAsync.mdx +145 -0
  462. package/.docs/raw/reference/workflows/run-methods/timeTravel.mdx +10 -8
  463. package/.docs/raw/reference/workflows/run.mdx +11 -3
  464. package/.docs/raw/reference/workflows/step.mdx +56 -3
  465. package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +3 -1
  466. package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +3 -1
  467. package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +39 -2
  468. package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +3 -1
  469. package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +3 -1
  470. package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +71 -4
  471. package/.docs/raw/reference/workflows/workflow-methods/map.mdx +9 -7
  472. package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +3 -1
  473. package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +4 -6
  474. package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +4 -6
  475. package/.docs/raw/reference/workflows/workflow-methods/then.mdx +3 -1
  476. package/.docs/raw/reference/workflows/workflow.mdx +193 -2
  477. package/.docs/raw/{auth → server/auth}/auth0.mdx +40 -21
  478. package/.docs/raw/{auth → server/auth}/clerk.mdx +37 -16
  479. package/.docs/raw/{auth → server/auth}/firebase.mdx +47 -25
  480. package/.docs/raw/{auth → server/auth}/index.mdx +8 -6
  481. package/.docs/raw/{auth → server/auth}/jwt.mdx +22 -10
  482. package/.docs/raw/{auth → server/auth}/supabase.mdx +45 -25
  483. package/.docs/raw/{auth → server/auth}/workos.mdx +39 -20
  484. package/.docs/raw/{server-db → server}/custom-adapters.mdx +40 -24
  485. package/.docs/raw/{server-db → server}/custom-api-routes.mdx +6 -6
  486. package/.docs/raw/{server-db → server}/mastra-client.mdx +35 -38
  487. package/.docs/raw/server/mastra-server.mdx +86 -0
  488. package/.docs/raw/{server-db → server}/middleware.mdx +11 -9
  489. package/.docs/raw/{server-db → server}/request-context.mdx +85 -43
  490. package/.docs/raw/{server-db → server}/server-adapters.mdx +154 -33
  491. package/.docs/raw/streaming/events.mdx +16 -7
  492. package/.docs/raw/streaming/overview.mdx +30 -17
  493. package/.docs/raw/streaming/tool-streaming.mdx +8 -6
  494. package/.docs/raw/streaming/workflow-streaming.mdx +8 -8
  495. package/.docs/raw/tools-mcp/advanced-usage.mdx +4 -2
  496. package/.docs/raw/tools-mcp/mcp-overview.mdx +46 -12
  497. package/.docs/raw/tools-mcp/overview.mdx +14 -13
  498. package/.docs/raw/voice/overview.mdx +17 -2
  499. package/.docs/raw/voice/speech-to-speech.mdx +5 -0
  500. package/.docs/raw/voice/speech-to-text.mdx +4 -0
  501. package/.docs/raw/voice/text-to-speech.mdx +3 -0
  502. package/.docs/raw/workflows/agents-and-tools.mdx +70 -21
  503. package/.docs/raw/workflows/control-flow.mdx +369 -34
  504. package/.docs/raw/workflows/error-handling.mdx +192 -18
  505. package/.docs/raw/workflows/human-in-the-loop.mdx +8 -7
  506. package/.docs/raw/workflows/input-data-mapping.mdx +9 -7
  507. package/.docs/raw/workflows/overview.mdx +80 -34
  508. package/.docs/raw/workflows/snapshots.mdx +19 -45
  509. package/.docs/raw/workflows/suspend-and-resume.mdx +14 -14
  510. package/.docs/raw/workflows/time-travel.mdx +25 -21
  511. package/.docs/raw/workflows/workflow-state.mdx +7 -8
  512. package/CHANGELOG.md +260 -0
  513. package/README.md +36 -0
  514. package/dist/index.d.ts.map +1 -1
  515. package/dist/logger.d.ts +3 -0
  516. package/dist/logger.d.ts.map +1 -1
  517. package/dist/stdio.js +746 -49
  518. package/dist/tools/course.d.ts.map +1 -1
  519. package/dist/tools/embedded-docs.d.ts +276 -0
  520. package/dist/tools/embedded-docs.d.ts.map +1 -0
  521. package/package.json +9 -8
  522. package/.docs/organized/changelogs/%40internal%2Fai-sdk-v4.md +0 -1
  523. package/.docs/raw/deployment/building-mastra.mdx +0 -73
  524. package/.docs/raw/deployment/cloud-providers/index.mdx +0 -55
  525. package/.docs/raw/deployment/mastra-cloud/dashboard.mdx +0 -100
  526. package/.docs/raw/deployment/mastra-cloud/observability.mdx +0 -53
  527. package/.docs/raw/deployment/mastra-cloud/overview.mdx +0 -65
  528. package/.docs/raw/deployment/mastra-cloud/setting-up.mdx +0 -105
  529. package/.docs/raw/memory/conversation-history.mdx +0 -24
  530. package/.docs/raw/memory/storage/memory-with-libsql.mdx +0 -140
  531. package/.docs/raw/memory/storage/memory-with-mongodb.mdx +0 -150
  532. package/.docs/raw/memory/storage/memory-with-pg.mdx +0 -138
  533. package/.docs/raw/memory/storage/memory-with-upstash.mdx +0 -146
  534. package/.docs/raw/memory/threads-and-resources.mdx +0 -95
  535. package/.docs/raw/reference/core/setTelemetry.mdx +0 -36
  536. package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +0 -110
  537. package/.docs/raw/reference/memory/query.mdx +0 -189
  538. package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +0 -70
  539. package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +0 -66
  540. package/.docs/raw/server-db/mastra-server.mdx +0 -97
  541. package/.docs/raw/workflows/inngest-workflow.mdx +0 -363
@@ -1,502 +1,502 @@
1
1
  # @mastra/core
2
2
 
3
- ## 1.0.0-beta.9
3
+ ## 1.0.4
4
4
 
5
- ### Minor Changes
5
+ ## 1.0.4-alpha.0
6
6
 
7
- - Add stored agents support ([#10953](https://github.com/mastra-ai/mastra/pull/10953))
7
+ ## 1.0.0
8
8
 
9
- 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.
9
+ ### Major Changes
10
10
 
11
- ```typescript
12
- import { Mastra } from '@mastra/core';
13
- import { LibSQLStore } from '@mastra/libsql';
11
+ - Moving scorers under the eval domain, api method consistency, prebuilt evals, scorers require ids. ([#9589](https://github.com/mastra-ai/mastra/pull/9589))
14
12
 
15
- const mastra = new Mastra({
16
- storage: new LibSQLStore({ url: ':memory:' }),
17
- tools: { myTool },
18
- scorers: { myScorer },
19
- });
13
+ - Scorers for Agents will now use `MastraDBMessage` instead of `UIMessage` ([#9702](https://github.com/mastra-ai/mastra/pull/9702))
14
+ - Scorer input/output types now use `MastraDBMessage[]` with nested `content` object structure
15
+ - Added `getTextContentFromMastraDBMessage()` helper function to extract text content from `MastraDBMessage` objects
16
+ - Added `createTestMessage()` helper function for creating `MastraDBMessage` objects in tests with optional tool invocations support
17
+ - Updated `extractToolCalls()` to access tool invocations from nested `content` structure
18
+ - Updated `getUserMessageFromRunInput()` and `getAssistantMessageFromRunOutput()` to use new message structure
19
+ - Removed `createUIMessage()`
20
20
 
21
- // Create agent in storage via API or directly
22
- await mastra.getStorage().createAgent({
23
- agent: {
24
- id: 'my-agent',
25
- name: 'My Agent',
26
- instructions: 'You are helpful',
27
- model: { provider: 'openai', name: 'gpt-4' },
28
- tools: { myTool: {} },
29
- scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
30
- },
31
- });
21
+ - 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))
32
22
 
33
- // Load and use the agent
34
- const agent = await mastra.getStoredAgentById('my-agent');
35
- const response = await agent.generate({ messages: 'Hello!' });
23
+ Primitives that are added to other primitives are also automatically added to the Mastra instance
36
24
 
37
- // List all stored agents with pagination
38
- const { agents, total, hasMore } = await mastra.listStoredAgents({
39
- page: 0,
40
- perPage: 10,
41
- });
42
- ```
25
+ - 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))
43
26
 
44
- Also adds a memory registry to Mastra so stored agents can reference memory instances by key.
27
+ - Refactor workflow and tool types to remove Zod-specific constraints ([#11814](https://github.com/mastra-ai/mastra/pull/11814))
45
28
 
46
- ### Patch Changes
29
+ Removed Zod-specific type constraints across all workflow implementations and tool types, replacing them with generic types. This ensures type consistency across default, evented, and inngest workflows while preparing for Zod v4 migration.
47
30
 
48
- - 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))
31
+ **Workflow Changes:**
32
+ - Removed `z.ZodObject<any>` and `z.ZodType<any>` constraints from all workflow generic types
33
+ - Updated method signatures to use `TInput` and `TState` directly instead of `z.infer<TInput>` and `z.infer<TState>`
34
+ - Aligned conditional types across all workflow implementations using `TInput extends unknown` pattern
35
+ - Fixed `TSteps` generic to properly use `TEngineType` instead of `any`
49
36
 
50
- - Fix JSON parsing errors when LLMs output unescaped newlines in structured output strings ([#10965](https://github.com/mastra-ai/mastra/pull/10965))
37
+ **Tool Changes:**
38
+ - Removed Zod schema constraints from `ToolExecutionContext` and related interfaces
39
+ - Simplified type parameters from `TSuspendSchema extends ZodLikeSchema` to `TSuspend` and `TResume`
40
+ - Updated tool execution context types to use generic types
51
41
 
52
- 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.
42
+ **Type Utilities:**
43
+ - Refactored type helpers to work with generic schemas instead of Zod-specific types
44
+ - Updated type extraction utilities for better compatibility
53
45
 
54
- 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.
46
+ This change maintains backward compatibility while improving type consistency and preparing for Zod v4 support across all affected packages.
55
47
 
56
- - 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))
48
+ - Remove `getMessagesPaginated()` and add `perPage: false` support ([#9670](https://github.com/mastra-ai/mastra/pull/9670))
57
49
 
58
- - Exports `convertFullStreamChunkToMastra` from the stream module for AI SDK stream chunk transformations. ([#10911](https://github.com/mastra-ai/mastra/pull/10911))
50
+ Removes deprecated `getMessagesPaginated()` method. The `listMessages()` API and score handlers now support `perPage: false` to fetch all records without pagination limits.
59
51
 
60
- ## 1.0.0-beta.8
52
+ **Storage changes:**
53
+ - `StoragePagination.perPage` type changed from `number` to `number | false`
54
+ - All storage implementations support `perPage: false`:
55
+ - Memory: `listMessages()`
56
+ - Scores: `listScoresBySpan()`, `listScoresByRunId()`, `listScoresByExecutionId()`
57
+ - HTTP query parser accepts `"false"` string (e.g., `?perPage=false`)
61
58
 
62
- ### Patch Changes
59
+ **Memory changes:**
60
+ - `memory.query()` parameter type changed from `StorageGetMessagesArg` to `StorageListMessagesInput`
61
+ - Uses flat parameters (`page`, `perPage`, `include`, `filter`, `vectorSearchString`) instead of `selectBy` object
63
62
 
64
- - Fix saveScore not persisting ID correctly, breaking getScoreById retrieval ([#10915](https://github.com/mastra-ai/mastra/pull/10915))
63
+ **Stricter validation:**
64
+ - `listMessages()` requires non-empty, non-whitespace `threadId` (throws error instead of returning empty results)
65
65
 
66
- **What Changed**
67
- - saveScore now correctly returns scores that can be retrieved with getScoreById
68
- - Validation errors now include contextual information (scorer, entity, trace details) for easier debugging
66
+ **Migration:**
69
67
 
70
- **Impact**
71
- 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.
72
-
73
- - `setState` is now async ([#10944](https://github.com/mastra-ai/mastra/pull/10944))
74
- - `setState` must now be awaited: `await setState({ key: value })`
75
- - State updates are merged automatically—no need to spread the previous state
76
- - State data is validated against the step's `stateSchema` when `validateInputs` is enabled (default: `true`)
77
-
78
- - Add human-in-the-loop support for workflows used in agent ([#10871](https://github.com/mastra-ai/mastra/pull/10871))
79
-
80
- ## 1.0.0-beta.7
68
+ ```typescript
69
+ // Storage/Memory: Replace getMessagesPaginated with listMessages
70
+ - storage.getMessagesPaginated({ threadId, selectBy: { pagination: { page: 0, perPage: 20 } } })
71
+ + storage.listMessages({ threadId, page: 0, perPage: 20 })
72
+ + storage.listMessages({ threadId, page: 0, perPage: false }) // Fetch all
73
+
74
+ // Memory: Replace selectBy with flat parameters
75
+ - memory.query({ threadId, selectBy: { last: 20, include: [...] } })
76
+ + memory.query({ threadId, perPage: 20, include: [...] })
77
+
78
+ // Client SDK
79
+ - thread.getMessagesPaginated({ selectBy: { pagination: { page: 0 } } })
80
+ + thread.listMessages({ page: 0, perPage: 20 })
81
+ ```
81
82
 
82
- ### Minor Changes
83
+ - **Removed `storage.getMessages()`** ([#9695](https://github.com/mastra-ai/mastra/pull/9695))
83
84
 
84
- - Add `disableInit` option to all storage adapters ([#10851](https://github.com/mastra-ai/mastra/pull/10851))
85
+ The `getMessages()` method has been removed from all storage implementations. Use `listMessages()` instead, which provides pagination support.
85
86
 
86
- 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.
87
+ **Migration:**
87
88
 
88
89
  ```typescript
89
- // CI/CD script - run migrations
90
- const storage = new PostgresStore({
91
- connectionString: DATABASE_URL,
92
- id: 'pg-storage',
93
- });
94
- await storage.init();
90
+ // Before
91
+ const messages = await storage.getMessages({ threadId: 'thread-1' });
95
92
 
96
- // Runtime - skip auto-init
97
- const storage = new PostgresStore({
98
- connectionString: DATABASE_URL,
99
- id: 'pg-storage',
100
- disableInit: true,
93
+ // After
94
+ const result = await storage.listMessages({
95
+ threadId: 'thread-1',
96
+ page: 0,
97
+ perPage: 50,
101
98
  });
99
+ const messages = result.messages; // Access messages array
100
+ console.log(result.total); // Total count
101
+ console.log(result.hasMore); // Whether more pages exist
102
102
  ```
103
103
 
104
- ### Patch Changes
104
+ **Message ordering default**
105
105
 
106
- - Add time-to-first-token (TTFT) support for Langfuse integration ([#10781](https://github.com/mastra-ai/mastra/pull/10781))
106
+ `listMessages()` defaults to ASC (oldest first) ordering by `createdAt`, matching the previous `getMessages()` behavior.
107
107
 
108
- 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.
108
+ **To use DESC ordering (newest first):**
109
109
 
110
110
  ```typescript
111
- // completionStartTime is now automatically captured and sent to Langfuse
112
- // enabling TTFT metrics in your Langfuse dashboard
113
- const result = await agent.stream('Hello');
111
+ const result = await storage.listMessages({
112
+ threadId: 'thread-1',
113
+ orderBy: { field: 'createdAt', direction: 'DESC' },
114
+ });
114
115
  ```
115
116
 
116
- - 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))
117
- https://github.com/open-telemetry/semantic-conventions/blob/v1.38.0/docs/gen-ai/README.md
118
-
119
- - 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))
120
-
121
- - fix: generate unique text IDs for Anthropic/Google providers ([#10740](https://github.com/mastra-ai/mastra/pull/10740))
117
+ **Renamed `client.getThreadMessages()` `client.listThreadMessages()`**
122
118
 
123
- Workaround for duplicate text-start/text-end IDs in multi-step agentic flows.
124
-
125
- 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.
126
-
127
- 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.
128
-
129
- Related: #9909
130
-
131
- - Fix sub-agent requestContext propagation in listAgentTools ([#10844](https://github.com/mastra-ai/mastra/pull/10844))
132
-
133
- 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.
134
-
135
- No code changes required for consumers - this fix restores expected behavior for dynamic model configurations in sub-agents.
136
-
137
- - Fix ToolStream type error when piping streams with different types ([#10845](https://github.com/mastra-ai/mastra/pull/10845))
138
-
139
- 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.
140
-
141
- Before:
119
+ **Migration:**
142
120
 
143
121
  ```typescript
144
- // TypeError: ToolStream<ChunkType> is not assignable to WritableStream<Partial<StoryPlan>>
145
- await response.objectStream.pipeTo(writer);
146
- ```
147
-
148
- After:
149
-
150
- ```typescript
151
- // Works without type errors
152
- await response.objectStream.pipeTo(writer);
153
- ```
154
-
155
- - feat: add native Perplexity provider support ([#10885](https://github.com/mastra-ai/mastra/pull/10885))
156
-
157
- - 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))
158
-
159
- **Before:**
160
-
161
- ```ts
162
- threadObject = await memory.createThread({
163
- // ...
164
- saveThread: false, // thread not in DB yet
165
- });
166
- // Later: MessageHistory calls saveMessages() -> PostgresStore throws "Thread not found"
167
- ```
122
+ // Before
123
+ const response = await client.getThreadMessages(threadId, { agentId });
168
124
 
169
- **After:**
170
-
171
- ```ts
172
- threadObject = await memory.createThread({
173
- // ...
174
- saveThread: true, // thread persisted immediately
175
- });
176
- // MessageHistory can now save messages without error
125
+ // After
126
+ const response = await client.listThreadMessages(threadId, { agentId });
177
127
  ```
178
128
 
179
- - Emit error chunk and call onError when agent workflow step fails ([#10907](https://github.com/mastra-ai/mastra/pull/10907))
180
-
181
- 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.
129
+ The response format remains the same.
182
130
 
183
- - fix(core): use agent description when converting agent to tool ([#10879](https://github.com/mastra-ai/mastra/pull/10879))
131
+ **Removed `StorageGetMessagesArg` type**
184
132
 
185
- - Adds native @ai-sdk/deepseek provider support instead of using the OpenAI-compatible fallback. ([#10822](https://github.com/mastra-ai/mastra/pull/10822))
133
+ Use `StorageListMessagesInput` instead:
186
134
 
187
135
  ```typescript
188
- const agent = new Agent({
189
- model: 'deepseek/deepseek-reasoner',
190
- });
136
+ // Before
137
+ import type { StorageGetMessagesArg } from '@mastra/core';
191
138
 
192
- // With provider options for reasoning
193
- const response = await agent.generate('Solve this problem', {
194
- providerOptions: {
195
- deepseek: {
196
- thinking: { type: 'enabled' },
197
- },
198
- },
199
- });
139
+ // After
140
+ import type { StorageListMessagesInput } from '@mastra/core';
200
141
  ```
201
142
 
202
- Also updates the doc generation scripts so DeepSeek provider options show up in the generated docs.
143
+ - - 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))
144
+ - The deprecated generateVNext() and streamVNext() methods have been removed since they're now the stable generate() and stream() methods.
145
+ - The deprecated `output` option has been removed entirely, in favour of `structuredOutput`.
203
146
 
204
- - Return state too if `includeState: true` is in `outputOptions` and workflow run is not successful ([#10806](https://github.com/mastra-ai/mastra/pull/10806))
147
+ Method renames to clarify the API surface:
148
+ - getDefaultGenerateOptions → getDefaultGenerateOptionsLegacy
149
+ - getDefaultStreamOptions → getDefaultStreamOptionsLegacy
150
+ - getDefaultVNextStreamOptions → getDefaultStreamOptions
205
151
 
206
- - feat: Add partial response support for agent and workflow list endpoints ([#10886](https://github.com/mastra-ai/mastra/pull/10886))
152
+ - Bump minimum required Node.js version to 22.13.0 ([#9706](https://github.com/mastra-ai/mastra/pull/9706))
207
153
 
208
- Add optional `partial` query parameter to `/api/agents` and `/api/workflows` endpoints to return minimal data without schemas, reducing payload size for list views:
209
- - When `partial=true`: tool schemas (inputSchema, outputSchema) are omitted
210
- - When `partial=true`: workflow steps are replaced with stepCount integer
211
- - When `partial=true`: workflow root schemas (inputSchema, outputSchema) are omitted
212
- - Maintains backward compatibility when partial parameter is not provided
154
+ - 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))
213
155
 
214
- ## Server Endpoint Usage
156
+ - 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))
215
157
 
216
- ```http
217
- # Get partial agent data (no tool schemas)
218
- GET /api/agents?partial=true
158
+ - Update tool execution signature ([#9587](https://github.com/mastra-ai/mastra/pull/9587))
219
159
 
220
- # Get full agent data (default behavior)
221
- GET /api/agents
160
+ Consolidated the 3 different execution contexts to one
222
161
 
223
- # Get partial workflow data (stepCount instead of steps, no schemas)
224
- GET /api/workflows?partial=true
162
+ ```typescript
163
+ // before depending on the context the tool was executed in
164
+ tool.execute({ context: data });
165
+ tool.execute({ context: { inputData: data } });
166
+ tool.execute(data);
225
167
 
226
- # Get full workflow data (default behavior)
227
- GET /api/workflows
168
+ // now, for all contexts
169
+ tool.execute(data, context);
228
170
  ```
229
171
 
230
- ## Client SDK Usage
172
+ **Before:**
231
173
 
232
174
  ```typescript
233
- import { MastraClient } from '@mastra/client-js';
234
-
235
- const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
236
-
237
- // Get partial agent list (smaller payload)
238
- const partialAgents = await client.listAgents({ partial: true });
239
-
240
- // Get full agent list with tool schemas
241
- const fullAgents = await client.listAgents();
175
+ inputSchema: z.object({ something: z.string() }),
176
+ execute: async ({ context, tracingContext, runId, ... }) => {
177
+ return doSomething(context.string);
178
+ }
179
+ ```
242
180
 
243
- // Get partial workflow list (smaller payload)
244
- const partialWorkflows = await client.listWorkflows({ partial: true });
181
+ **After:**
245
182
 
246
- // Get full workflow list with steps and schemas
247
- const fullWorkflows = await client.listWorkflows();
183
+ ```typescript
184
+ inputSchema: z.object({ something: z.string() }),
185
+ execute: async (inputData, context) => {
186
+ const { agent, mcp, workflow, ...sharedContext } = context
187
+
188
+ // context that only an agent would get like toolCallId, messages, suspend, resume, etc
189
+ if (agent) {
190
+ doSomething(inputData.something, agent)
191
+ // context that only a workflow would get like runId, state, suspend, resume, etc
192
+ } else if (workflow) {
193
+ doSomething(inputData.something, workflow)
194
+ // context that only a workflow would get like "extra", "elicitation"
195
+ } else if (mcp) {
196
+ doSomething(inputData.something, mcp)
197
+ } else {
198
+ // Running a tool in no execution context
199
+ return doSomething(inputData.something);
200
+ }
201
+ }
248
202
  ```
249
203
 
250
- - Fix processInputStep so it runs correctly. ([#10909](https://github.com/mastra-ai/mastra/pull/10909))
204
+ - 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))
251
205
 
252
- - 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)]:
253
- - @mastra/observability@1.0.0-beta.3
206
+ For example:
254
207
 
255
- ## 1.0.0-beta.6
208
+ ```diff
209
+ import { Mastra, type Config } from "@mastra/core";
210
+ - import { Agent } from "@mastra/core";
211
+ - import { createTool } from "@mastra/core";
212
+ - import { createStep } from "@mastra/core";
256
213
 
257
- ### Major Changes
214
+ + import { Agent } from "@mastra/core/agent";
215
+ + import { createTool } from "@mastra/core/tools";
216
+ + import { createStep } from "@mastra/core/workflows";
217
+ ```
258
218
 
259
- - Changed `.branch()` result schema to make all branch output fields optional. ([#10693](https://github.com/mastra-ai/mastra/pull/10693))
219
+ - 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))
260
220
 
261
- **Breaking change**: Branch outputs are now optional since only one branch executes at runtime. Update your workflow schemas to handle optional branch results.
221
+ 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.
262
222
 
263
- **Before:**
223
+ Before:
264
224
 
265
225
  ```typescript
266
- const workflow = createWorkflow({...})
267
- .branch([
268
- [condition1, stepA], // outputSchema: { result: z.string() }
269
- [condition2, stepB], // outputSchema: { data: z.number() }
270
- ])
271
- .map({
272
- finalResult: { step: stepA, path: 'result' } // Expected non-optional
273
- });
226
+ // Two methods that did the same thing
227
+ memory.rememberMessages({ threadId, resourceId, config, vectorMessageSearch });
228
+ memory.query({ threadId, resourceId, perPage, vectorSearchString });
274
229
  ```
275
230
 
276
- **After:**
231
+ After:
277
232
 
278
233
  ```typescript
279
- const workflow = createWorkflow({...})
280
- .branch([
281
- [condition1, stepA],
282
- [condition2, stepB],
283
- ])
284
- .map({
285
- finalResult: {
286
- step: stepA,
287
- path: 'result' // Now optional - provide fallback
288
- }
289
- });
234
+ // Single unified method with clear purpose
235
+ memory.recall({ threadId, resourceId, perPage, vectorMessageSearch, threadConfig });
290
236
  ```
291
237
 
292
- **Why**: Branch conditionals execute only one path, so non-executed branches don't produce outputs. The type system now correctly reflects this runtime behavior.
238
+ All usages have been updated across the codebase including tests. The agent now calls recall directly with the appropriate parameters.
293
239
 
294
- Related issue: https://github.com/mastra-ai/mastra/issues/10642
240
+ - Rename RuntimeContext to RequestContext ([#9511](https://github.com/mastra-ai/mastra/pull/9511))
295
241
 
296
- ### Minor Changes
242
+ - Implement listMessages API for replacing previous methods ([#9531](https://github.com/mastra-ai/mastra/pull/9531))
297
243
 
298
- - 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))
244
+ - 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))
299
245
 
300
- - Add reserved keys in RequestContext for secure resourceId/threadId setting from middleware ([#10657](https://github.com/mastra-ai/mastra/pull/10657))
246
+ - **Breaking Change**: Convert OUTPUT generic from `OutputSchema` constraint to plain generic ([#11741](https://github.com/mastra-ai/mastra/pull/11741))
301
247
 
302
- 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.
248
+ This change removes the direct dependency on Zod typings in the public API by converting all `OUTPUT extends OutputSchema` generic constraints to plain `OUTPUT` generics throughout the codebase. This is preparation for moving to a standard schema approach.
249
+ - All generic type parameters previously constrained to `OutputSchema` (e.g., `<OUTPUT extends OutputSchema = undefined>`) are now plain generics with defaults (e.g., `<OUTPUT = undefined>`)
250
+ - Affects all public APIs including `Agent`, `MastraModelOutput`, `AgentExecutionOptions`, and stream/generate methods
251
+ - `InferSchemaOutput<OUTPUT>` replaced with `OUTPUT` throughout
252
+ - `PartialSchemaOutput<OUTPUT>` replaced with `Partial<OUTPUT>`
253
+ - Schema fields now use `NonNullable<OutputSchema<OUTPUT>>` instead of `OUTPUT` directly
254
+ - Added `FullOutput<OUTPUT>` type representing complete output with all fields
255
+ - Added `AgentExecutionOptionsBase<OUTPUT>` type
256
+ - `getFullOutput()` method now returns `Promise<FullOutput<OUTPUT>>`
257
+ - `Agent` class now generic: `Agent<TAgentId, TTools, TOutput>`
258
+ - `agent.generate()` and `agent.stream()` methods have updated signatures
259
+ - `MastraModelOutput<OUTPUT>` no longer requires `OutputSchema` constraint
260
+ - Network route and streaming APIs updated to use plain OUTPUT generic
303
261
 
304
- - feat(workflows): add suspendData parameter to step execute function ([#10734](https://github.com/mastra-ai/mastra/pull/10734))
305
-
306
- 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.
307
-
308
- **New Features:**
309
- - `suspendData` parameter automatically populated in step execute function when resuming
310
- - Type-safe access to suspend data matching the step's `suspendSchema`
311
- - Backward compatible - existing workflows continue to work unchanged
312
-
313
- **Example:**
262
+ **Before:**
314
263
 
315
264
  ```typescript
316
- const step = createStep({
317
- suspendSchema: z.object({ reason: z.string() }),
318
- resumeSchema: z.object({ approved: z.boolean() }),
319
- execute: async ({ suspend, suspendData, resumeData }) => {
320
- if (!resumeData?.approved) {
321
- return await suspend({ reason: 'Approval required' });
322
- }
323
-
324
- // Access original suspend data when resuming
325
- console.log(`Resuming after: ${suspendData?.reason}`);
326
- return { result: 'Approved' };
327
- },
265
+ const output = await agent.generate<z.ZodType>([...], {
266
+ structuredOutput: { schema: mySchema }
328
267
  });
329
- ```
330
268
 
331
- - feat(storage): support querying messages from multiple threads ([#10663](https://github.com/mastra-ai/mastra/pull/10663))
332
- - Fixed TypeScript errors where `threadId: string | string[]` was being passed to places expecting `Scalar` type
333
- - Added proper multi-thread support for `listMessages` across all adapters when `threadId` is an array
334
- - Updated `_getIncludedMessages` to look up message threadId by ID (since message IDs are globally unique)
335
- - **upstash**: Added `msg-idx:{messageId}` index for O(1) message lookups (backwards compatible with fallback to scan for old messages, with automatic backfill)
336
-
337
- - Adds trace tagging support to the BrainTrust and Langfuse tracing exporters. ([#10765](https://github.com/mastra-ai/mastra/pull/10765))
269
+ **After:**
270
+ const output = await agent.generate<z.infer<typeof mySchema>>([...], {
271
+ structuredOutput: { schema: mySchema }
272
+ });
273
+ // Or rely on type inference:
274
+ const output = await agent.generate([...], {
275
+ structuredOutput: { schema: mySchema }
276
+ });
338
277
 
339
- - Add `messageList` parameter to `processOutputStream` for accessing remembered messages during streaming ([#10608](https://github.com/mastra-ai/mastra/pull/10608))
278
+ ```
340
279
 
341
- - Unify transformScoreRow functions across storage adapters ([#10648](https://github.com/mastra-ai/mastra/pull/10648))
280
+ - 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))
342
281
 
343
- 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:
344
- - `preferredTimestampFields`: Preferred source fields for timestamps (PostgreSQL, Cloudflare D1)
345
- - `convertTimestamps`: Convert timestamp strings to Date objects (MSSQL, MongoDB, ClickHouse)
346
- - `nullValuePattern`: Skip values matching pattern (ClickHouse's `'_null_'`)
347
- - `fieldMappings`: Map source column names to schema fields (LibSQL's `additionalLLMContext`)
282
+ - 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))
348
283
 
349
- 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.
284
+ - Experimental auth -> auth ([#9660](https://github.com/mastra-ai/mastra/pull/9660))
350
285
 
351
- ### Patch Changes
286
+ - Renamed a bunch of observability/tracing-related things to drop the AI prefix. ([#9744](https://github.com/mastra-ai/mastra/pull/9744))
352
287
 
353
- - dependencies updates: ([#10110](https://github.com/mastra-ai/mastra/pull/10110))
354
- - Updated dependency [`hono-openapi@^1.1.1` ↗︎](https://www.npmjs.com/package/hono-openapi/v/1.1.1) (from `^0.4.8`, in `dependencies`)
288
+ - Removed MastraMessageV3 intermediary format, now we go from MastraDBMessage->aiv5 formats and back directly ([#9094](https://github.com/mastra-ai/mastra/pull/9094))
355
289
 
356
- - unexpected json parse issue, log error but dont fail ([#10241](https://github.com/mastra-ai/mastra/pull/10241))
290
+ - **Breaking Change**: Remove legacy v1 watch events and consolidate on v2 implementation. ([#9252](https://github.com/mastra-ai/mastra/pull/9252))
357
291
 
358
- - Fixed a bug in agent networks where sometimes the task name was empty ([#10629](https://github.com/mastra-ai/mastra/pull/10629))
292
+ This change simplifies the workflow watching API by removing the legacy v1 event system and promoting v2 as the standard (renamed to just `watch`).
359
293
 
360
- - 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))
294
+ **What's Changed**
295
+ - Removed legacy v1 watch event handlers and types
296
+ - Renamed `watch-v2` to `watch` throughout the codebase
297
+ - Removed `.watch()` method from client-js SDK (`Workflow` and `AgentBuilder` classes)
298
+ - Removed `/watch` HTTP endpoints from server and deployer
299
+ - Removed `WorkflowWatchResult` and v1 `WatchEvent` types
361
300
 
362
- - 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))
301
+ - Remove various deprecated APIs from agent class. ([#9257](https://github.com/mastra-ai/mastra/pull/9257))
302
+ - `agent.llm` → `agent.getLLM()`
303
+ - `agent.tools` → `agent.getTools()`
304
+ - `agent.instructions` → `agent.getInstructions()`
305
+ - `agent.speak()` → `agent.voice.speak()`
306
+ - `agent.getSpeakers()` → `agent.voice.getSpeakers()`
307
+ - `agent.listen` → `agent.voice.listen()`
308
+ - `agent.fetchMemory` → `(await agent.getMemory()).query()`
309
+ - `agent.toStep` → Add agent directly to the step, workflows handle the transformation
363
310
 
364
- - `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))
311
+ - Pagination APIs now use `page`/`perPage` instead of `offset`/`limit` ([#9592](https://github.com/mastra-ai/mastra/pull/9592))
365
312
 
366
- 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.
313
+ 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.
367
314
 
368
- - SimpleAuth and improved CloudAuth ([#10490](https://github.com/mastra-ai/mastra/pull/10490))
315
+ **Affected APIs:**
316
+ - `Memory.listThreadsByResourceId()`
317
+ - `Memory.listMessages()`
318
+ - `Storage.listWorkflowRuns()`
369
319
 
370
- - 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))
320
+ **Migration:**
371
321
 
372
- The fix normalizes `undefined`/`null` to `{}` for object schemas and `[]` for array schemas before validation.
322
+ ```typescript
323
+ // Before
324
+ await memory.listThreadsByResourceId({
325
+ resourceId: 'user-123',
326
+ offset: 20,
327
+ limit: 10,
328
+ });
373
329
 
374
- - 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))
330
+ // After
331
+ await memory.listThreadsByResourceId({
332
+ resourceId: 'user-123',
333
+ page: 2, // page = Math.floor(offset / limit)
334
+ perPage: 10,
335
+ });
375
336
 
376
- - Fix error when spreading config objects in Mastra constructor ([#10718](https://github.com/mastra-ai/mastra/pull/10718))
337
+ // Before
338
+ await memory.listMessages({
339
+ threadId: 'thread-456',
340
+ offset: 20,
341
+ limit: 10,
342
+ });
377
343
 
378
- 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.
344
+ // After
345
+ await memory.listMessages({
346
+ threadId: 'thread-456',
347
+ page: 2,
348
+ perPage: 10,
349
+ });
379
350
 
380
- - 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))
351
+ // Before
352
+ await storage.listWorkflowRuns({
353
+ workflowName: 'my-workflow',
354
+ offset: 20,
355
+ limit: 10,
356
+ });
381
357
 
382
- - Fix generateTitle model type to accept AI SDK LanguageModelV2 ([#10541](https://github.com/mastra-ai/mastra/pull/10541))
358
+ // After
359
+ await storage.listWorkflowRuns({
360
+ workflowName: 'my-workflow',
361
+ page: 2,
362
+ perPage: 10,
363
+ });
364
+ ```
383
365
 
384
- 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.
366
+ **Additional improvements:**
367
+ - Added validation for negative `page` values in all storage implementations
368
+ - Improved `perPage` validation to handle edge cases (negative values, `0`, `false`)
369
+ - Added reusable query parser utilities for consistent validation in handlers
385
370
 
386
- Previously, passing a standard `LanguageModelV2` would fail because `MastraLanguageModelV2` has different `doGenerate`/`doStream` return types. Now `MastraModelConfig` is used consistently across:
387
- - `memory/types.ts` - `generateTitle.model` config
388
- - `agent.ts` - `genTitle`, `generateTitleFromUserMessage`, `resolveTitleGenerationConfig`
389
- - `agent-legacy.ts` - `AgentLegacyCapabilities` interface
371
+ - ```ts ([#9709](https://github.com/mastra-ai/mastra/pull/9709))
372
+ import { Mastra } from '@mastra/core';
373
+ import { Observability } from '@mastra/observability'; // Explicit import
390
374
 
391
- - Fix message ordering when using toAISdkV5Messages or prepareStep ([#10686](https://github.com/mastra-ai/mastra/pull/10686))
375
+ const mastra = new Mastra({
376
+ ...other_config,
377
+ observability: new Observability({
378
+ default: { enabled: true },
379
+ }), // Instance
380
+ });
381
+ ```
392
382
 
393
- 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.
383
+ Instead of:
394
384
 
395
- Before:
385
+ ```ts
386
+ import { Mastra } from '@mastra/core';
387
+ import '@mastra/observability/init'; // Explicit import
396
388
 
397
- ```
398
- Input: [user: "hello", assistant: "Hi!", user: "bye"]
399
- Output: [user: "bye", assistant: "Hi!", user: "hello"] // shuffled!
389
+ const mastra = new Mastra({
390
+ ...other_config,
391
+ observability: {
392
+ default: { enabled: true },
393
+ },
394
+ });
400
395
  ```
401
396
 
402
- After:
397
+ Also renamed a bunch of:
398
+ - `Tracing` things to `Observability` things.
399
+ - `AI-` things to just things.
403
400
 
404
- ```
405
- Input: [user: "hello", assistant: "Hi!", user: "bye"]
406
- Output: [user: "hello", assistant: "Hi!", user: "bye"] // correct order
407
- ```
401
+ - Changing getAgents -> listAgents, getTools -> listTools, getWorkflows -> listWorkflows ([#9495](https://github.com/mastra-ai/mastra/pull/9495))
408
402
 
409
- - Fix Scorer not using custom gateways registered with Mastra ([#10778](https://github.com/mastra-ai/mastra/pull/10778))
403
+ - Removed old tracing code based on OpenTelemetry ([#9237](https://github.com/mastra-ai/mastra/pull/9237))
410
404
 
411
- 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.
405
+ - Remove deprecated vector prompts and cohere provider from code ([#9596](https://github.com/mastra-ai/mastra/pull/9596))
412
406
 
413
- - Fix workflow run status not being updated from storage snapshot in createRun ([#10664](https://github.com/mastra-ai/mastra/pull/10664))
407
+ - Renamed MastraStorage to MastraCompositeStore for better clarity. The old MastraStorage name remains available as a deprecated alias for backward compatibility, but will be removed in a future version. ([#12093](https://github.com/mastra-ai/mastra/pull/12093))
414
408
 
415
- 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').
409
+ **Migration:**
416
410
 
417
- - Pass resourceId and threadId to network agent's subAgent when it has its own memory ([#10592](https://github.com/mastra-ai/mastra/pull/10592))
411
+ Update your imports and usage:
418
412
 
419
- - 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))
413
+ ```typescript
414
+ // Before
415
+ import { MastraStorage } from '@mastra/core/storage';
420
416
 
421
- - 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))
417
+ const storage = new MastraStorage({
418
+ id: 'composite',
419
+ domains: { ... }
420
+ });
422
421
 
423
- This lets you pass provider-specific settings like `reasoningEffort` for OpenAI thinking models:
422
+ // After
423
+ import { MastraCompositeStore } from '@mastra/core/storage';
424
424
 
425
- ```typescript
426
- const processor = new PromptInjectionDetector({
427
- model: 'openai/o1-mini',
428
- threshold: 0.7,
429
- strategy: 'block',
430
- providerOptions: {
431
- openai: {
432
- reasoningEffort: 'low',
433
- },
434
- },
425
+ const storage = new MastraCompositeStore({
426
+ id: 'composite',
427
+ domains: { ... }
435
428
  });
436
429
  ```
437
430
 
438
- - 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))
431
+ The new name better reflects that this is a composite storage implementation that routes different domains (workflows, traces, messages) to different underlying stores, avoiding confusion with the general "Mastra Storage" concept.
439
432
 
440
- - 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))
433
+ - Mark as stable ([`83d5942`](https://github.com/mastra-ai/mastra/commit/83d5942669ce7bba4a6ca4fd4da697a10eb5ebdc))
441
434
 
442
- - Adds bidirectional integration with otel tracing via a new @mastra/otel-bridge package. ([#10482](https://github.com/mastra-ai/mastra/pull/10482))
443
-
444
- - 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))
445
-
446
- ```ts
447
- const processor: Processor = {
448
- id: 'my-processor',
449
- processInputStep: async ({ messages, messageList, stepNumber, systemMessages }) => {
450
- // Transform messages at each step before LLM call
451
- return messageList;
452
- },
453
- };
454
- ```
435
+ - Changed `.branch()` result schema to make all branch output fields optional. ([#10693](https://github.com/mastra-ai/mastra/pull/10693))
455
436
 
456
- - 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))
437
+ **Breaking change**: Branch outputs are now optional since only one branch executes at runtime. Update your workflow schemas to handle optional branch results.
457
438
 
458
439
  **Before:**
459
440
 
460
- ```ts
461
- const result = await agent.generate('hello');
462
- result.text; // "hello world" (unprocessed)
463
- result.response.messages[0].content[0].text; // "HELLO WORLD" (processed)
441
+ ```typescript
442
+ const workflow = createWorkflow({...})
443
+ .branch([
444
+ [condition1, stepA], // outputSchema: { result: z.string() }
445
+ [condition2, stepB], // outputSchema: { data: z.number() }
446
+ ])
447
+ .map({
448
+ finalResult: { step: stepA, path: 'result' } // Expected non-optional
449
+ });
464
450
  ```
465
451
 
466
452
  **After:**
467
453
 
468
- ```ts
469
- const result = await agent.generate('hello');
470
- result.text; // "HELLO WORLD" (processed)
454
+ ```typescript
455
+ const workflow = createWorkflow({...})
456
+ .branch([
457
+ [condition1, stepA],
458
+ [condition2, stepB],
459
+ ])
460
+ .map({
461
+ finalResult: {
462
+ step: stepA,
463
+ path: 'result' // Now optional - provide fallback
464
+ }
465
+ });
471
466
  ```
472
467
 
473
- 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.
468
+ **Why**: Branch conditionals execute only one path, so non-executed branches don't produce outputs. The type system now correctly reflects this runtime behavior.
474
469
 
475
- - Refactored default engine to fit durable execution better, and the inngest engine to match. ([#10627](https://github.com/mastra-ai/mastra/pull/10627))
476
- Also fixes requestContext persistence by relying on inngest step memoization.
470
+ Related issue: https://github.com/mastra-ai/mastra/issues/10642
477
471
 
478
- Unifies some of the stepResults and error formats in both engines.
472
+ - Enforcing id required on Processor primitive ([#9591](https://github.com/mastra-ai/mastra/pull/9591))
479
473
 
480
- - Allow direct access to server app handle directly from Mastra instance. ([#10598](https://github.com/mastra-ai/mastra/pull/10598))
474
+ - **Breaking Changes:** ([#9045](https://github.com/mastra-ai/mastra/pull/9045))
475
+ - Moved `generateTitle` from `threads.generateTitle` to top-level memory option
476
+ - Changed default value from `true` to `false`
477
+ - Using `threads.generateTitle` now throws an error
481
478
 
482
- ```ts
483
- // Before: HTTP request to localhost
484
- const response = await fetch(`http://localhost:5000/api/tools`);
479
+ **Migration:**
480
+ Replace `threads: { generateTitle: true }` with `generateTitle: true` at the top level of memory options.
485
481
 
486
- // After: Direct call via app.fetch()
487
- const app = mastra.getServerApp<Hono>();
488
- const response = await app.fetch(new Request('http://internal/api/tools'));
489
- ```
482
+ **Playground:**
483
+ The playground UI now displays thread IDs instead of "Chat from" when titles aren't generated.
490
484
 
491
- - Added `mastra.getServerApp<T>()` to access the underlying Hono/Express app
492
- - Added `mastra.getMastraServer()` and `mastra.setMastraServer()` for adapter access
493
- - Added `MastraServerBase` class in `@mastra/core/server` for adapter implementations
494
- - Server adapters now auto-register with Mastra in their constructor
485
+ - Renamed `MastraMessageV2` to `MastraDBMessage` ([#9255](https://github.com/mastra-ai/mastra/pull/9255))
486
+ Made the return format of all methods that return db messages consistent. It's always `{ messages: MastraDBMessage[] }` now, and messages can be converted after that using `@mastra/ai-sdk/ui`'s `toAISdkV4/5Messages()` function
495
487
 
496
- - Fix network agent not getting `text-delta` from subAgent when `.stream` is used ([#10533](https://github.com/mastra-ai/mastra/pull/10533))
488
+ - moved ai-tracing code into @mastra/observability ([#9661](https://github.com/mastra-ai/mastra/pull/9661))
497
489
 
498
- - Fix discriminatedUnion schema information lost when json schema is converted to zod ([#10500](https://github.com/mastra-ai/mastra/pull/10500))
490
+ - Remove legacy evals from Mastra ([#9491](https://github.com/mastra-ai/mastra/pull/9491))
499
491
 
500
- - Fix writer.custom not working during workflow resume operations ([#10720](https://github.com/mastra-ai/mastra/pull/10720))
492
+ - 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))
501
493
 
502
- ... 5993 more lines hidden. See full changelog in package directory.
494
+ ```typescript
495
+ const getUserTool = createTool({
496
+ id: 'get-user',
497
+ outputSchema: z.object({
498
+ id: z.string(),
499
+ name: z.string(),
500
+ email: z.string().email(),
501
+
502
+ ... 11704 more lines hidden. See full changelog in package directory.