@mastra/core 0.24.0 → 1.0.0-beta.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 (812) hide show
  1. package/CHANGELOG.md +484 -139
  2. package/README.md +2 -3
  3. package/agent/message-list.d.ts +1 -0
  4. package/dist/action/index.d.ts +0 -2
  5. package/dist/action/index.d.ts.map +1 -1
  6. package/dist/agent/__tests__/mock-model.d.ts +3 -1
  7. package/dist/agent/__tests__/mock-model.d.ts.map +1 -1
  8. package/dist/agent/agent-legacy.d.ts +176 -0
  9. package/dist/agent/agent-legacy.d.ts.map +1 -0
  10. package/dist/agent/agent.d.ts +83 -229
  11. package/dist/agent/agent.d.ts.map +1 -1
  12. package/dist/agent/agent.types.d.ts +10 -25
  13. package/dist/agent/agent.types.d.ts.map +1 -1
  14. package/dist/agent/index.cjs +10 -26
  15. package/dist/agent/index.d.ts +1 -2
  16. package/dist/agent/index.d.ts.map +1 -1
  17. package/dist/agent/index.js +2 -2
  18. package/dist/agent/message-list/index.cjs +16 -0
  19. package/dist/agent/message-list/index.d.ts +77 -87
  20. package/dist/agent/message-list/index.d.ts.map +1 -1
  21. package/dist/agent/message-list/index.js +3 -0
  22. package/dist/agent/message-list/prompt/attachments-to-parts.d.ts +2 -2
  23. package/dist/agent/message-list/prompt/attachments-to-parts.d.ts.map +1 -1
  24. package/dist/agent/message-list/prompt/convert-to-mastra-v1.d.ts +2 -2
  25. package/dist/agent/message-list/prompt/download-assets.d.ts.map +1 -1
  26. package/dist/agent/message-list/prompt/invalid-content-error.d.ts +1 -1
  27. package/dist/agent/message-list/prompt/invalid-content-error.d.ts.map +1 -1
  28. package/dist/agent/message-list/types.d.ts +2 -1
  29. package/dist/agent/message-list/types.d.ts.map +1 -1
  30. package/dist/agent/message-list/utils/ai-v4-v5/core-model-message.d.ts +3 -2
  31. package/dist/agent/message-list/utils/ai-v4-v5/core-model-message.d.ts.map +1 -1
  32. package/dist/agent/message-list/utils/ai-v4-v5/ui-message.d.ts +3 -2
  33. package/dist/agent/message-list/utils/ai-v4-v5/ui-message.d.ts.map +1 -1
  34. package/dist/agent/message-list/utils/ai-v5/gemini-compatibility.d.ts +1 -1
  35. package/dist/agent/message-list/utils/ai-v5/gemini-compatibility.d.ts.map +1 -1
  36. package/dist/agent/message-list/utils/convert-messages.d.ts +4 -4
  37. package/dist/agent/message-list/utils/convert-messages.d.ts.map +1 -1
  38. package/dist/agent/test-utils.d.ts +2 -79
  39. package/dist/agent/test-utils.d.ts.map +1 -1
  40. package/dist/agent/trip-wire.d.ts +1 -1
  41. package/dist/agent/trip-wire.d.ts.map +1 -1
  42. package/dist/agent/types.d.ts +23 -37
  43. package/dist/agent/types.d.ts.map +1 -1
  44. package/dist/agent/utils.d.ts +15 -64
  45. package/dist/agent/utils.d.ts.map +1 -1
  46. package/dist/agent/workflows/prepare-stream/index.d.ts +16 -20
  47. package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
  48. package/dist/agent/workflows/prepare-stream/map-results-step.d.ts +5 -7
  49. package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
  50. package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts +14 -18
  51. package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts.map +1 -1
  52. package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts +6 -6
  53. package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts.map +1 -1
  54. package/dist/agent/workflows/prepare-stream/schema.d.ts +10 -12
  55. package/dist/agent/workflows/prepare-stream/schema.d.ts.map +1 -1
  56. package/dist/agent/workflows/prepare-stream/stream-step.d.ts +3 -7
  57. package/dist/agent/workflows/prepare-stream/stream-step.d.ts.map +1 -1
  58. package/dist/ai-sdk.types.d.ts +4705 -0
  59. package/dist/base.cjs +2 -2
  60. package/dist/base.d.ts +0 -16
  61. package/dist/base.d.ts.map +1 -1
  62. package/dist/base.js +1 -1
  63. package/dist/bundler/index.cjs +2 -2
  64. package/dist/bundler/index.d.ts +2 -1
  65. package/dist/bundler/index.d.ts.map +1 -1
  66. package/dist/bundler/index.js +1 -1
  67. package/dist/cache/index.cjs +3 -3
  68. package/dist/cache/index.js +1 -1
  69. package/dist/{chunk-7J3XX4AO.cjs → chunk-2ZVKF4HP.cjs} +199 -66
  70. package/dist/chunk-2ZVKF4HP.cjs.map +1 -0
  71. package/dist/chunk-4CDL2QJT.js +649 -0
  72. package/dist/chunk-4CDL2QJT.js.map +1 -0
  73. package/dist/chunk-5WRI5ZAA.js +29 -0
  74. package/dist/{chunk-3HXBPDKN.js.map → chunk-5WRI5ZAA.js.map} +1 -1
  75. package/dist/{chunk-KAEQISOW.js → chunk-76K3IYWM.js} +5 -5
  76. package/dist/chunk-76K3IYWM.js.map +1 -0
  77. package/dist/chunk-7AHYOMHJ.js +149 -0
  78. package/dist/chunk-7AHYOMHJ.js.map +1 -0
  79. package/dist/{chunk-UZKIGB7M.cjs → chunk-BMAFVZ2D.cjs} +5 -5
  80. package/dist/chunk-BMAFVZ2D.cjs.map +1 -0
  81. package/dist/chunk-CB575O6L.cjs +12432 -0
  82. package/dist/chunk-CB575O6L.cjs.map +1 -0
  83. package/dist/{chunk-6TEQIYXV.cjs → chunk-CBAB7GOD.cjs} +15 -15
  84. package/dist/chunk-CBAB7GOD.cjs.map +1 -0
  85. package/dist/{chunk-ROS5CMJS.cjs → chunk-CD56CXVE.cjs} +63 -50
  86. package/dist/chunk-CD56CXVE.cjs.map +1 -0
  87. package/dist/{chunk-Z4RIRDU3.js → chunk-CINNK34N.js} +45 -32
  88. package/dist/chunk-CINNK34N.js.map +1 -0
  89. package/dist/{chunk-77JHIM4E.cjs → chunk-DNEURYF3.cjs} +348 -424
  90. package/dist/chunk-DNEURYF3.cjs.map +1 -0
  91. package/dist/{chunk-A5KDVZDL.cjs → chunk-DSNPWVIG.cjs} +9 -9
  92. package/dist/chunk-DSNPWVIG.cjs.map +1 -0
  93. package/dist/chunk-DZUJEN5N.cjs +32 -0
  94. package/dist/{chunk-EBVYYC2Q.cjs.map → chunk-DZUJEN5N.cjs.map} +1 -1
  95. package/dist/chunk-E7K4FTLN.cjs +273 -0
  96. package/dist/chunk-E7K4FTLN.cjs.map +1 -0
  97. package/dist/{chunk-MJMID7LX.cjs → chunk-ECFXGXWO.cjs} +609 -644
  98. package/dist/chunk-ECFXGXWO.cjs.map +1 -0
  99. package/dist/chunk-ET6UOTTU.cjs +154 -0
  100. package/dist/chunk-ET6UOTTU.cjs.map +1 -0
  101. package/dist/chunk-GGYKYORQ.cjs +2060 -0
  102. package/dist/chunk-GGYKYORQ.cjs.map +1 -0
  103. package/dist/{chunk-HLRWYUFN.js → chunk-GRBGQ2GE.js} +5 -5
  104. package/dist/{chunk-HLRWYUFN.js.map → chunk-GRBGQ2GE.js.map} +1 -1
  105. package/dist/{chunk-3VXXCPKX.js → chunk-H6CZGPZD.js} +334 -410
  106. package/dist/chunk-H6CZGPZD.js.map +1 -0
  107. package/dist/chunk-HDJFSJCK.js +2237 -0
  108. package/dist/chunk-HDJFSJCK.js.map +1 -0
  109. package/dist/{chunk-34ZCWSUA.js → chunk-I4CXL4SR.js} +6 -9
  110. package/dist/chunk-I4CXL4SR.js.map +1 -0
  111. package/dist/{chunk-3JX2Y3WH.cjs → chunk-IQO7ANVS.cjs} +18 -21
  112. package/dist/chunk-IQO7ANVS.cjs.map +1 -0
  113. package/dist/{chunk-GPWMM745.cjs → chunk-J7O6WENZ.cjs} +5 -5
  114. package/dist/{chunk-GPWMM745.cjs.map → chunk-J7O6WENZ.cjs.map} +1 -1
  115. package/dist/{chunk-PZUZNPFM.js → chunk-JJ5O45LH.js} +3 -4
  116. package/dist/chunk-JJ5O45LH.js.map +1 -0
  117. package/dist/chunk-JPGVRWWL.js +12385 -0
  118. package/dist/chunk-JPGVRWWL.js.map +1 -0
  119. package/dist/chunk-JUBFO5J3.js +15761 -0
  120. package/dist/chunk-JUBFO5J3.js.map +1 -0
  121. package/dist/{chunk-E3PG7G6E.js → chunk-JV2KH24V.js} +599 -633
  122. package/dist/chunk-JV2KH24V.js.map +1 -0
  123. package/dist/chunk-KEXGB7FK.cjs +29 -0
  124. package/dist/chunk-KEXGB7FK.cjs.map +1 -0
  125. package/dist/chunk-KIZIOFZC.js +265 -0
  126. package/dist/chunk-KIZIOFZC.js.map +1 -0
  127. package/dist/{chunk-UXG7PYML.js → chunk-KJ2SW6VA.js} +9 -9
  128. package/dist/chunk-KJ2SW6VA.js.map +1 -0
  129. package/dist/{chunk-TTELJD4F.js → chunk-L54GIUCB.js} +2 -2
  130. package/dist/chunk-L54GIUCB.js.map +1 -0
  131. package/dist/chunk-LWBQ4P4N.cjs +2240 -0
  132. package/dist/chunk-LWBQ4P4N.cjs.map +1 -0
  133. package/dist/{chunk-ABZOBBLL.cjs → chunk-MA7TEM62.cjs} +735 -562
  134. package/dist/chunk-MA7TEM62.cjs.map +1 -0
  135. package/dist/{chunk-TSNDVBUU.cjs → chunk-MR7ZWBL6.cjs} +2 -2
  136. package/dist/chunk-MR7ZWBL6.cjs.map +1 -0
  137. package/dist/chunk-MSWTA73A.cjs +15825 -0
  138. package/dist/chunk-MSWTA73A.cjs.map +1 -0
  139. package/dist/chunk-MV7KHWUT.js +2031 -0
  140. package/dist/chunk-MV7KHWUT.js.map +1 -0
  141. package/dist/{chunk-3NTOFNIU.js → chunk-OJNJA5ZI.js} +3 -3
  142. package/dist/{chunk-3NTOFNIU.js.map → chunk-OJNJA5ZI.js.map} +1 -1
  143. package/dist/chunk-QM5SRDJX.js +9022 -0
  144. package/dist/chunk-QM5SRDJX.js.map +1 -0
  145. package/dist/{chunk-WBAXXG34.cjs → chunk-QUKUN6NR.cjs} +32 -66
  146. package/dist/chunk-QUKUN6NR.cjs.map +1 -0
  147. package/dist/chunk-S6URFGCZ.js +27 -0
  148. package/dist/chunk-S6URFGCZ.js.map +1 -0
  149. package/dist/chunk-SVLMF4UZ.cjs +9033 -0
  150. package/dist/chunk-SVLMF4UZ.cjs.map +1 -0
  151. package/dist/{chunk-ZMELUU72.js → chunk-TQTAMPSC.js} +3 -3
  152. package/dist/chunk-TQTAMPSC.js.map +1 -0
  153. package/dist/{chunk-5NTO7S5I.cjs → chunk-TWH4PTDG.cjs} +2 -4
  154. package/dist/chunk-TWH4PTDG.cjs.map +1 -0
  155. package/dist/{chunk-WCHE6FJ7.js → chunk-UIZSWUKP.js} +15 -50
  156. package/dist/chunk-UIZSWUKP.js.map +1 -0
  157. package/dist/{chunk-BWGXM3D4.js → chunk-VOQ3ULMT.js} +712 -541
  158. package/dist/chunk-VOQ3ULMT.js.map +1 -0
  159. package/dist/{chunk-MCASUJWY.cjs → chunk-VOY2RXOC.cjs} +36 -59
  160. package/dist/chunk-VOY2RXOC.cjs.map +1 -0
  161. package/dist/{chunk-FHVFGVIO.js → chunk-W7UH2PWL.js} +189 -56
  162. package/dist/chunk-W7UH2PWL.js.map +1 -0
  163. package/dist/chunk-WM6CK2F3.cjs +674 -0
  164. package/dist/chunk-WM6CK2F3.cjs.map +1 -0
  165. package/dist/{chunk-PFXXH2RP.js → chunk-X7JMA3IY.js} +15 -15
  166. package/dist/chunk-X7JMA3IY.js.map +1 -0
  167. package/dist/{chunk-NR77P3TK.js → chunk-XEVG546F.js} +14 -37
  168. package/dist/chunk-XEVG546F.js.map +1 -0
  169. package/dist/{chunk-QFF5JUKT.cjs → chunk-Y63IFHEZ.cjs} +4 -4
  170. package/dist/chunk-Y63IFHEZ.cjs.map +1 -0
  171. package/dist/{chunk-B7V6NYWH.cjs → chunk-Y6ROD72V.cjs} +4 -4
  172. package/dist/{chunk-B7V6NYWH.cjs.map → chunk-Y6ROD72V.cjs.map} +1 -1
  173. package/dist/deployer/index.cjs +8 -6
  174. package/dist/deployer/index.cjs.map +1 -1
  175. package/dist/deployer/index.js +10 -1
  176. package/dist/deployer/index.js.map +1 -1
  177. package/dist/di/index.cjs +3 -3
  178. package/dist/di/index.d.ts +1 -1
  179. package/dist/di/index.js +1 -1
  180. package/dist/error/index.cjs +6 -6
  181. package/dist/error/index.d.ts +0 -1
  182. package/dist/error/index.d.ts.map +1 -1
  183. package/dist/error/index.js +1 -1
  184. package/dist/{scores → evals}/base.d.ts +20 -18
  185. package/dist/evals/base.d.ts.map +1 -0
  186. package/dist/{scores → evals}/base.test-utils.d.ts +25 -25
  187. package/dist/evals/base.test-utils.d.ts.map +1 -0
  188. package/dist/{scores → evals}/hooks.d.ts +3 -3
  189. package/dist/evals/hooks.d.ts.map +1 -0
  190. package/dist/evals/index.cjs +37 -0
  191. package/dist/evals/index.d.ts +4 -0
  192. package/dist/evals/index.d.ts.map +1 -0
  193. package/dist/evals/index.js +4 -0
  194. package/dist/{scores/run-experiment → evals/run}/index.d.ts +18 -18
  195. package/dist/evals/run/index.d.ts.map +1 -0
  196. package/dist/evals/run/scorerAccumulator.d.ts.map +1 -0
  197. package/dist/{scores → evals}/scoreTraces/index.cjs +79 -99
  198. package/dist/evals/scoreTraces/index.cjs.map +1 -0
  199. package/dist/evals/scoreTraces/index.d.ts.map +1 -0
  200. package/dist/{scores → evals}/scoreTraces/index.js +72 -92
  201. package/dist/evals/scoreTraces/index.js.map +1 -0
  202. package/dist/{scores → evals}/scoreTraces/scoreTraces.d.ts +2 -2
  203. package/dist/evals/scoreTraces/scoreTraces.d.ts.map +1 -0
  204. package/dist/{scores → evals}/scoreTraces/scoreTracesWorkflow.d.ts +11 -11
  205. package/dist/evals/scoreTraces/scoreTracesWorkflow.d.ts.map +1 -0
  206. package/dist/{scores → evals}/scoreTraces/utils.d.ts +7 -7
  207. package/dist/evals/scoreTraces/utils.d.ts.map +1 -0
  208. package/dist/{scores → evals}/types.d.ts +22 -22
  209. package/dist/evals/types.d.ts.map +1 -0
  210. package/dist/features/index.cjs +8 -0
  211. package/dist/features/index.cjs.map +1 -0
  212. package/dist/features/index.d.ts +17 -0
  213. package/dist/features/index.d.ts.map +1 -0
  214. package/dist/features/index.js +6 -0
  215. package/dist/features/index.js.map +1 -0
  216. package/dist/hooks/index.cjs +4 -4
  217. package/dist/hooks/index.d.ts +1 -27
  218. package/dist/hooks/index.d.ts.map +1 -1
  219. package/dist/hooks/index.js +1 -1
  220. package/dist/index.cjs +2 -340
  221. package/dist/index.cjs.map +1 -1
  222. package/dist/index.d.ts +1 -18
  223. package/dist/index.d.ts.map +1 -1
  224. package/dist/index.js +1 -113
  225. package/dist/index.js.map +1 -1
  226. package/dist/integration/index.cjs +87 -10
  227. package/dist/integration/index.cjs.map +1 -1
  228. package/dist/integration/index.js +88 -1
  229. package/dist/integration/index.js.map +1 -1
  230. package/dist/integration/integration.d.ts +3 -3
  231. package/dist/integration/integration.d.ts.map +1 -1
  232. package/dist/llm/index.cjs +7 -7
  233. package/dist/llm/index.d.ts +5 -6
  234. package/dist/llm/index.d.ts.map +1 -1
  235. package/dist/llm/index.js +1 -1
  236. package/dist/llm/model/base.types.d.ts +6 -7
  237. package/dist/llm/model/base.types.d.ts.map +1 -1
  238. package/dist/llm/model/gateways/constants.d.ts.map +1 -1
  239. package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
  240. package/dist/llm/model/model.d.ts +7 -7
  241. package/dist/llm/model/model.d.ts.map +1 -1
  242. package/dist/llm/model/model.loop.d.ts +1 -1
  243. package/dist/llm/model/model.loop.d.ts.map +1 -1
  244. package/dist/llm/model/model.loop.types.d.ts +3 -3
  245. package/dist/llm/model/model.loop.types.d.ts.map +1 -1
  246. package/dist/llm/model/provider-types.generated.d.ts +80 -17
  247. package/dist/llm/model/resolve-model.d.ts +8 -8
  248. package/dist/llm/model/shared.types.d.ts +2 -2
  249. package/dist/llm/model/shared.types.d.ts.map +1 -1
  250. package/dist/logger/constants.d.ts +1 -1
  251. package/dist/logger/default-logger.d.ts +2 -2
  252. package/dist/logger/default-logger.d.ts.map +1 -1
  253. package/dist/logger/index.cjs +11 -11
  254. package/dist/logger/index.js +2 -2
  255. package/dist/logger/logger.d.ts +4 -4
  256. package/dist/logger/logger.d.ts.map +1 -1
  257. package/dist/logger/multi-logger.d.ts +2 -2
  258. package/dist/logger/multi-logger.d.ts.map +1 -1
  259. package/dist/logger/transport.d.ts +3 -3
  260. package/dist/logger/transport.d.ts.map +1 -1
  261. package/dist/loop/index.cjs +2 -2
  262. package/dist/loop/index.js +1 -1
  263. package/dist/loop/loop.d.ts +1 -1
  264. package/dist/loop/loop.d.ts.map +1 -1
  265. package/dist/loop/network/index.d.ts +15 -15
  266. package/dist/loop/network/index.d.ts.map +1 -1
  267. package/dist/loop/test-utils/generateText.d.ts.map +1 -1
  268. package/dist/loop/test-utils/options.d.ts.map +1 -1
  269. package/dist/loop/test-utils/resultObject.d.ts.map +1 -1
  270. package/dist/loop/test-utils/streamObject.d.ts.map +1 -1
  271. package/dist/loop/types.d.ts +4 -7
  272. package/dist/loop/types.d.ts.map +1 -1
  273. package/dist/loop/workflows/agentic-execution/index.d.ts +55 -55
  274. package/dist/loop/workflows/agentic-execution/index.d.ts.map +1 -1
  275. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +38 -38
  276. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
  277. package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +20 -20
  278. package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts.map +1 -1
  279. package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts +2 -2
  280. package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
  281. package/dist/loop/workflows/agentic-loop/index.d.ts +55 -55
  282. package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
  283. package/dist/loop/workflows/schema.d.ts +19 -20
  284. package/dist/loop/workflows/schema.d.ts.map +1 -1
  285. package/dist/loop/workflows/stream.d.ts +1 -1
  286. package/dist/loop/workflows/stream.d.ts.map +1 -1
  287. package/dist/mastra/hooks.d.ts +2 -2
  288. package/dist/mastra/hooks.d.ts.map +1 -1
  289. package/dist/mastra/index.cjs +2 -2
  290. package/dist/mastra/index.d.ts +389 -180
  291. package/dist/mastra/index.d.ts.map +1 -1
  292. package/dist/mastra/index.js +1 -1
  293. package/dist/mcp/index.cjs +41 -4
  294. package/dist/mcp/index.cjs.map +1 -1
  295. package/dist/mcp/index.d.ts +6 -4
  296. package/dist/mcp/index.d.ts.map +1 -1
  297. package/dist/mcp/index.js +39 -2
  298. package/dist/mcp/index.js.map +1 -1
  299. package/dist/mcp/types.d.ts +0 -15
  300. package/dist/mcp/types.d.ts.map +1 -1
  301. package/dist/memory/index.cjs +327 -13
  302. package/dist/memory/index.cjs.map +1 -1
  303. package/dist/memory/index.d.ts +1 -0
  304. package/dist/memory/index.d.ts.map +1 -1
  305. package/dist/memory/index.js +327 -1
  306. package/dist/memory/index.js.map +1 -1
  307. package/dist/memory/memory.d.ts +33 -57
  308. package/dist/memory/memory.d.ts.map +1 -1
  309. package/dist/memory/mock.d.ts +61 -0
  310. package/dist/memory/mock.d.ts.map +1 -0
  311. package/dist/memory/types.d.ts +48 -45
  312. package/dist/memory/types.d.ts.map +1 -1
  313. package/dist/models-dev-DNBKXHT4.js +3 -0
  314. package/dist/{models-dev-4VGIWYS3.js.map → models-dev-DNBKXHT4.js.map} +1 -1
  315. package/dist/models-dev-YBEEQIX6.cjs +12 -0
  316. package/dist/{models-dev-AXZASLL2.cjs.map → models-dev-YBEEQIX6.cjs.map} +1 -1
  317. package/dist/netlify-7G2L5VSH.js +3 -0
  318. package/dist/{netlify-VJXBII33.js.map → netlify-7G2L5VSH.js.map} +1 -1
  319. package/dist/netlify-GWNGSIRZ.cjs +12 -0
  320. package/dist/{netlify-TX6V7SJJ.cjs.map → netlify-GWNGSIRZ.cjs.map} +1 -1
  321. package/dist/{ai-tracing → observability}/context.d.ts +5 -5
  322. package/dist/observability/context.d.ts.map +1 -0
  323. package/dist/observability/index.cjs +36 -0
  324. package/dist/observability/index.d.ts +11 -0
  325. package/dist/observability/index.d.ts.map +1 -0
  326. package/dist/observability/index.js +3 -0
  327. package/dist/observability/no-op.d.ts +22 -0
  328. package/dist/observability/no-op.d.ts.map +1 -0
  329. package/dist/observability/types/index.d.ts +2 -0
  330. package/dist/observability/types/index.d.ts.map +1 -0
  331. package/dist/{ai-tracing/types.d.ts → observability/types/tracing.d.ts} +161 -107
  332. package/dist/observability/types/tracing.d.ts.map +1 -0
  333. package/dist/observability/utils.d.ts +12 -0
  334. package/dist/observability/utils.d.ts.map +1 -0
  335. package/dist/processors/index.cjs +11 -11
  336. package/dist/processors/index.d.ts +10 -9
  337. package/dist/processors/index.d.ts.map +1 -1
  338. package/dist/processors/index.js +1 -1
  339. package/dist/processors/processors/batch-parts.d.ts +2 -1
  340. package/dist/processors/processors/batch-parts.d.ts.map +1 -1
  341. package/dist/processors/processors/language-detector.d.ts +6 -5
  342. package/dist/processors/processors/language-detector.d.ts.map +1 -1
  343. package/dist/processors/processors/moderation.d.ts +8 -7
  344. package/dist/processors/processors/moderation.d.ts.map +1 -1
  345. package/dist/processors/processors/pii-detector.d.ts +8 -7
  346. package/dist/processors/processors/pii-detector.d.ts.map +1 -1
  347. package/dist/processors/processors/prompt-injection-detector.d.ts +6 -5
  348. package/dist/processors/processors/prompt-injection-detector.d.ts.map +1 -1
  349. package/dist/processors/processors/structured-output.d.ts +3 -2
  350. package/dist/processors/processors/structured-output.d.ts.map +1 -1
  351. package/dist/processors/processors/system-prompt-scrubber.d.ts +6 -5
  352. package/dist/processors/processors/system-prompt-scrubber.d.ts.map +1 -1
  353. package/dist/processors/processors/token-limiter.d.ts +5 -4
  354. package/dist/processors/processors/token-limiter.d.ts.map +1 -1
  355. package/dist/processors/processors/unicode-normalizer.d.ts +5 -4
  356. package/dist/processors/processors/unicode-normalizer.d.ts.map +1 -1
  357. package/dist/processors/runner.d.ts +5 -5
  358. package/dist/processors/runner.d.ts.map +1 -1
  359. package/dist/provider-registry.json +175 -42
  360. package/dist/{registry-generator-DXRSYYYT.js → registry-generator-H4YNODDH.js} +2 -2
  361. package/dist/{registry-generator-DXRSYYYT.js.map → registry-generator-H4YNODDH.js.map} +1 -1
  362. package/dist/{registry-generator-6WVOHM2L.cjs → registry-generator-MK63POJO.cjs} +2 -2
  363. package/dist/{registry-generator-6WVOHM2L.cjs.map → registry-generator-MK63POJO.cjs.map} +1 -1
  364. package/dist/relevance/index.cjs +47 -13
  365. package/dist/relevance/index.cjs.map +1 -1
  366. package/dist/relevance/index.d.ts +0 -1
  367. package/dist/relevance/index.d.ts.map +1 -1
  368. package/dist/relevance/index.js +49 -1
  369. package/dist/relevance/index.js.map +1 -1
  370. package/dist/relevance/mastra-agent/index.d.ts.map +1 -1
  371. package/dist/request-context/index.cjs +12 -0
  372. package/dist/{runtime-context → request-context}/index.d.ts +1 -1
  373. package/dist/{runtime-context → request-context}/index.d.ts.map +1 -1
  374. package/dist/request-context/index.js +3 -0
  375. package/dist/server/auth.d.ts.map +1 -1
  376. package/dist/server/index.cjs +9 -25
  377. package/dist/server/index.cjs.map +1 -1
  378. package/dist/server/index.js +4 -21
  379. package/dist/server/index.js.map +1 -1
  380. package/dist/server/types.d.ts +3 -3
  381. package/dist/server/types.d.ts.map +1 -1
  382. package/dist/storage/base.d.ts +75 -143
  383. package/dist/storage/base.d.ts.map +1 -1
  384. package/dist/storage/constants.d.ts +3 -4
  385. package/dist/storage/constants.d.ts.map +1 -1
  386. package/dist/storage/domains/index.d.ts +0 -2
  387. package/dist/storage/domains/index.d.ts.map +1 -1
  388. package/dist/storage/domains/memory/base.d.ts +19 -56
  389. package/dist/storage/domains/memory/base.d.ts.map +1 -1
  390. package/dist/storage/domains/memory/inmemory.d.ts +15 -35
  391. package/dist/storage/domains/memory/inmemory.d.ts.map +1 -1
  392. package/dist/storage/domains/observability/base.d.ts +24 -24
  393. package/dist/storage/domains/observability/base.d.ts.map +1 -1
  394. package/dist/storage/domains/observability/inmemory.d.ts +18 -18
  395. package/dist/storage/domains/observability/inmemory.d.ts.map +1 -1
  396. package/dist/storage/domains/operations/inmemory.d.ts.map +1 -1
  397. package/dist/storage/domains/scores/base.d.ts +5 -5
  398. package/dist/storage/domains/scores/base.d.ts.map +1 -1
  399. package/dist/storage/domains/scores/inmemory.d.ts +5 -5
  400. package/dist/storage/domains/scores/inmemory.d.ts.map +1 -1
  401. package/dist/storage/domains/workflows/base.d.ts +4 -11
  402. package/dist/storage/domains/workflows/base.d.ts.map +1 -1
  403. package/dist/storage/domains/workflows/inmemory.d.ts +4 -11
  404. package/dist/storage/domains/workflows/inmemory.d.ts.map +1 -1
  405. package/dist/storage/index.cjs +74 -1775
  406. package/dist/storage/index.cjs.map +1 -1
  407. package/dist/storage/index.js +1 -1744
  408. package/dist/storage/index.js.map +1 -1
  409. package/dist/storage/mock.d.ts +35 -92
  410. package/dist/storage/mock.d.ts.map +1 -1
  411. package/dist/storage/types.d.ts +77 -75
  412. package/dist/storage/types.d.ts.map +1 -1
  413. package/dist/stream/MastraAgentNetworkStream.d.ts +4 -2
  414. package/dist/stream/MastraAgentNetworkStream.d.ts.map +1 -1
  415. package/dist/stream/MastraWorkflowStream.d.ts +1 -1
  416. package/dist/stream/MastraWorkflowStream.d.ts.map +1 -1
  417. package/dist/stream/RunOutput.d.ts +1 -0
  418. package/dist/stream/RunOutput.d.ts.map +1 -1
  419. package/dist/stream/aisdk/v4/input.d.ts +1 -1
  420. package/dist/stream/aisdk/v4/input.d.ts.map +1 -1
  421. package/dist/stream/aisdk/v5/execute.d.ts +4 -11
  422. package/dist/stream/aisdk/v5/execute.d.ts.map +1 -1
  423. package/dist/stream/aisdk/v5/output.d.ts +1 -1
  424. package/dist/stream/aisdk/v5/output.d.ts.map +1 -1
  425. package/dist/stream/base/output.d.ts +1 -1
  426. package/dist/stream/base/output.d.ts.map +1 -1
  427. package/dist/stream/index.cjs +11 -11
  428. package/dist/stream/index.d.ts +1 -1
  429. package/dist/stream/index.d.ts.map +1 -1
  430. package/dist/stream/index.js +2 -2
  431. package/dist/stream/types.d.ts +2 -6
  432. package/dist/stream/types.d.ts.map +1 -1
  433. package/dist/test-utils/llm-mock.cjs +8 -8
  434. package/dist/test-utils/llm-mock.cjs.map +1 -1
  435. package/dist/test-utils/llm-mock.d.ts +1 -1
  436. package/dist/test-utils/llm-mock.d.ts.map +1 -1
  437. package/dist/test-utils/llm-mock.js +3 -3
  438. package/dist/test-utils/llm-mock.js.map +1 -1
  439. package/dist/tools/index.cjs +4 -4
  440. package/dist/tools/index.js +1 -1
  441. package/dist/tools/is-vercel-tool.cjs +2 -2
  442. package/dist/tools/is-vercel-tool.js +1 -1
  443. package/dist/tools/tool-builder/builder.d.ts +3 -71
  444. package/dist/tools/tool-builder/builder.d.ts.map +1 -1
  445. package/dist/tools/tool.d.ts +25 -25
  446. package/dist/tools/tool.d.ts.map +1 -1
  447. package/dist/tools/types.d.ts +102 -11
  448. package/dist/tools/types.d.ts.map +1 -1
  449. package/dist/tools/validation.d.ts +4 -3
  450. package/dist/tools/validation.d.ts.map +1 -1
  451. package/dist/tts/index.cjs +12 -6
  452. package/dist/tts/index.cjs.map +1 -1
  453. package/dist/tts/index.d.ts +0 -1
  454. package/dist/tts/index.d.ts.map +1 -1
  455. package/dist/tts/index.js +14 -1
  456. package/dist/tts/index.js.map +1 -1
  457. package/dist/types/dynamic-argument.d.ts +3 -3
  458. package/dist/utils/fetchWithRetry.d.ts +9 -0
  459. package/dist/utils/fetchWithRetry.d.ts.map +1 -0
  460. package/dist/utils.cjs +33 -17
  461. package/dist/utils.d.ts +39 -6
  462. package/dist/utils.d.ts.map +1 -1
  463. package/dist/utils.js +1 -1
  464. package/dist/vector/embed.d.ts +1 -1
  465. package/dist/vector/embed.d.ts.map +1 -1
  466. package/dist/vector/index.cjs +80 -8
  467. package/dist/vector/index.cjs.map +1 -1
  468. package/dist/vector/index.js +80 -1
  469. package/dist/vector/index.js.map +1 -1
  470. package/dist/vector/vector.d.ts +5 -2
  471. package/dist/vector/vector.d.ts.map +1 -1
  472. package/dist/voice/composite-voice.d.ts +1 -7
  473. package/dist/voice/composite-voice.d.ts.map +1 -1
  474. package/dist/voice/index.cjs +4 -4
  475. package/dist/voice/index.js +1 -1
  476. package/dist/voice/voice.d.ts +0 -1
  477. package/dist/voice/voice.d.ts.map +1 -1
  478. package/dist/workflows/default.d.ts +35 -43
  479. package/dist/workflows/default.d.ts.map +1 -1
  480. package/dist/workflows/evented/execution-engine.d.ts +5 -3
  481. package/dist/workflows/evented/execution-engine.d.ts.map +1 -1
  482. package/dist/workflows/evented/index.cjs +10 -10
  483. package/dist/workflows/evented/index.js +1 -1
  484. package/dist/workflows/evented/step-executor.d.ts +15 -13
  485. package/dist/workflows/evented/step-executor.d.ts.map +1 -1
  486. package/dist/workflows/evented/workflow-event-processor/index.d.ts +5 -5
  487. package/dist/workflows/evented/workflow-event-processor/index.d.ts.map +1 -1
  488. package/dist/workflows/evented/workflow-event-processor/loop.d.ts +3 -3
  489. package/dist/workflows/evented/workflow-event-processor/loop.d.ts.map +1 -1
  490. package/dist/workflows/evented/workflow-event-processor/parallel.d.ts +2 -2
  491. package/dist/workflows/evented/workflow-event-processor/sleep.d.ts +2 -2
  492. package/dist/workflows/evented/workflow-event-processor/utils.d.ts +2 -7
  493. package/dist/workflows/evented/workflow-event-processor/utils.d.ts.map +1 -1
  494. package/dist/workflows/evented/workflow.d.ts +11 -14
  495. package/dist/workflows/evented/workflow.d.ts.map +1 -1
  496. package/dist/workflows/execution-engine.d.ts +6 -6
  497. package/dist/workflows/execution-engine.d.ts.map +1 -1
  498. package/dist/workflows/index.cjs +22 -14
  499. package/dist/workflows/index.js +1 -1
  500. package/dist/workflows/step.d.ts +5 -5
  501. package/dist/workflows/step.d.ts.map +1 -1
  502. package/dist/workflows/types.d.ts +21 -44
  503. package/dist/workflows/types.d.ts.map +1 -1
  504. package/dist/workflows/utils.d.ts +14 -0
  505. package/dist/workflows/utils.d.ts.map +1 -1
  506. package/dist/workflows/workflow.d.ts +74 -64
  507. package/dist/workflows/workflow.d.ts.map +1 -1
  508. package/evals/scoreTraces.d.ts +1 -0
  509. package/evals.d.ts +1 -0
  510. package/features.d.ts +1 -0
  511. package/observability.d.ts +1 -0
  512. package/package.json +49 -64
  513. package/request-context.d.ts +1 -0
  514. package/src/_types/ai-sdk.types.d.ts +4705 -0
  515. package/src/llm/model/provider-types.generated.d.ts +80 -17
  516. package/agent/input-processor/processors.d.ts +0 -1
  517. package/ai-tracing.d.ts +0 -1
  518. package/dist/agent/index.warning.d.ts +0 -13
  519. package/dist/agent/index.warning.d.ts.map +0 -1
  520. package/dist/agent/input-processor/index.cjs +0 -28
  521. package/dist/agent/input-processor/index.d.ts +0 -10
  522. package/dist/agent/input-processor/index.d.ts.map +0 -1
  523. package/dist/agent/input-processor/index.js +0 -3
  524. package/dist/agent/input-processor/processors/index.d.ts +0 -6
  525. package/dist/agent/input-processor/processors/index.d.ts.map +0 -1
  526. package/dist/agent/input-processor/processors/language-detector.d.ts +0 -18
  527. package/dist/agent/input-processor/processors/language-detector.d.ts.map +0 -1
  528. package/dist/agent/input-processor/processors/moderation.d.ts +0 -18
  529. package/dist/agent/input-processor/processors/moderation.d.ts.map +0 -1
  530. package/dist/agent/input-processor/processors/pii-detector.d.ts +0 -18
  531. package/dist/agent/input-processor/processors/pii-detector.d.ts.map +0 -1
  532. package/dist/agent/input-processor/processors/prompt-injection-detector.d.ts +0 -18
  533. package/dist/agent/input-processor/processors/prompt-injection-detector.d.ts.map +0 -1
  534. package/dist/agent/input-processor/processors/unicode-normalizer.d.ts +0 -18
  535. package/dist/agent/input-processor/processors/unicode-normalizer.d.ts.map +0 -1
  536. package/dist/ai-tracing/context.d.ts.map +0 -1
  537. package/dist/ai-tracing/exporters/base.d.ts +0 -111
  538. package/dist/ai-tracing/exporters/base.d.ts.map +0 -1
  539. package/dist/ai-tracing/exporters/cloud.d.ts +0 -30
  540. package/dist/ai-tracing/exporters/cloud.d.ts.map +0 -1
  541. package/dist/ai-tracing/exporters/console.d.ts +0 -10
  542. package/dist/ai-tracing/exporters/console.d.ts.map +0 -1
  543. package/dist/ai-tracing/exporters/default.d.ts +0 -98
  544. package/dist/ai-tracing/exporters/default.d.ts.map +0 -1
  545. package/dist/ai-tracing/exporters/index.d.ts +0 -9
  546. package/dist/ai-tracing/exporters/index.d.ts.map +0 -1
  547. package/dist/ai-tracing/index.cjs +0 -148
  548. package/dist/ai-tracing/index.d.ts +0 -13
  549. package/dist/ai-tracing/index.d.ts.map +0 -1
  550. package/dist/ai-tracing/index.js +0 -3
  551. package/dist/ai-tracing/model-tracing.d.ts +0 -63
  552. package/dist/ai-tracing/model-tracing.d.ts.map +0 -1
  553. package/dist/ai-tracing/registry.d.ts +0 -51
  554. package/dist/ai-tracing/registry.d.ts.map +0 -1
  555. package/dist/ai-tracing/span_processors/index.d.ts +0 -5
  556. package/dist/ai-tracing/span_processors/index.d.ts.map +0 -1
  557. package/dist/ai-tracing/span_processors/sensitive-data-filter.d.ts +0 -85
  558. package/dist/ai-tracing/span_processors/sensitive-data-filter.d.ts.map +0 -1
  559. package/dist/ai-tracing/spans/base.d.ts +0 -65
  560. package/dist/ai-tracing/spans/base.d.ts.map +0 -1
  561. package/dist/ai-tracing/spans/default.d.ts +0 -13
  562. package/dist/ai-tracing/spans/default.d.ts.map +0 -1
  563. package/dist/ai-tracing/spans/index.d.ts +0 -7
  564. package/dist/ai-tracing/spans/index.d.ts.map +0 -1
  565. package/dist/ai-tracing/spans/no-op.d.ts +0 -15
  566. package/dist/ai-tracing/spans/no-op.d.ts.map +0 -1
  567. package/dist/ai-tracing/tracers/base.d.ts +0 -105
  568. package/dist/ai-tracing/tracers/base.d.ts.map +0 -1
  569. package/dist/ai-tracing/tracers/default.d.ts +0 -7
  570. package/dist/ai-tracing/tracers/default.d.ts.map +0 -1
  571. package/dist/ai-tracing/tracers/index.d.ts +0 -6
  572. package/dist/ai-tracing/tracers/index.d.ts.map +0 -1
  573. package/dist/ai-tracing/types.d.ts.map +0 -1
  574. package/dist/ai-tracing/utils.d.ts +0 -68
  575. package/dist/ai-tracing/utils.d.ts.map +0 -1
  576. package/dist/base.warning.d.ts +0 -9
  577. package/dist/base.warning.d.ts.map +0 -1
  578. package/dist/bundler/index.warning.d.ts +0 -9
  579. package/dist/bundler/index.warning.d.ts.map +0 -1
  580. package/dist/chunk-253FBVD4.cjs +0 -1303
  581. package/dist/chunk-253FBVD4.cjs.map +0 -1
  582. package/dist/chunk-2B3VLGTH.js +0 -87
  583. package/dist/chunk-2B3VLGTH.js.map +0 -1
  584. package/dist/chunk-34ZCWSUA.js.map +0 -1
  585. package/dist/chunk-3HXBPDKN.js +0 -105
  586. package/dist/chunk-3JX2Y3WH.cjs.map +0 -1
  587. package/dist/chunk-3VXXCPKX.js.map +0 -1
  588. package/dist/chunk-4R2TBRS7.cjs +0 -191
  589. package/dist/chunk-4R2TBRS7.cjs.map +0 -1
  590. package/dist/chunk-5NTO7S5I.cjs.map +0 -1
  591. package/dist/chunk-6C7VGVK4.js +0 -267
  592. package/dist/chunk-6C7VGVK4.js.map +0 -1
  593. package/dist/chunk-6KOL2B3A.cjs +0 -75
  594. package/dist/chunk-6KOL2B3A.cjs.map +0 -1
  595. package/dist/chunk-6TEQIYXV.cjs.map +0 -1
  596. package/dist/chunk-6VOPKVYH.cjs +0 -57
  597. package/dist/chunk-6VOPKVYH.cjs.map +0 -1
  598. package/dist/chunk-77JHIM4E.cjs.map +0 -1
  599. package/dist/chunk-7J3XX4AO.cjs.map +0 -1
  600. package/dist/chunk-A5KDVZDL.cjs.map +0 -1
  601. package/dist/chunk-ABZOBBLL.cjs.map +0 -1
  602. package/dist/chunk-AQGLVU53.cjs +0 -603
  603. package/dist/chunk-AQGLVU53.cjs.map +0 -1
  604. package/dist/chunk-BLUDYAPI.js +0 -596
  605. package/dist/chunk-BLUDYAPI.js.map +0 -1
  606. package/dist/chunk-BWGXM3D4.js.map +0 -1
  607. package/dist/chunk-C7OVZMPW.cjs +0 -91
  608. package/dist/chunk-C7OVZMPW.cjs.map +0 -1
  609. package/dist/chunk-DMBN72QF.cjs +0 -39
  610. package/dist/chunk-DMBN72QF.cjs.map +0 -1
  611. package/dist/chunk-DTTOVV72.js +0 -2880
  612. package/dist/chunk-DTTOVV72.js.map +0 -1
  613. package/dist/chunk-E3PG7G6E.js.map +0 -1
  614. package/dist/chunk-EBVYYC2Q.cjs +0 -111
  615. package/dist/chunk-FHVFGVIO.js.map +0 -1
  616. package/dist/chunk-GB5BIA4V.js +0 -167
  617. package/dist/chunk-GB5BIA4V.js.map +0 -1
  618. package/dist/chunk-HEQTUMUA.cjs +0 -271
  619. package/dist/chunk-HEQTUMUA.cjs.map +0 -1
  620. package/dist/chunk-HF3GZRFP.cjs +0 -9
  621. package/dist/chunk-HF3GZRFP.cjs.map +0 -1
  622. package/dist/chunk-JVV5LREI.js +0 -431
  623. package/dist/chunk-JVV5LREI.js.map +0 -1
  624. package/dist/chunk-KAEQISOW.js.map +0 -1
  625. package/dist/chunk-KDX3ZMQ2.js +0 -12
  626. package/dist/chunk-KDX3ZMQ2.js.map +0 -1
  627. package/dist/chunk-LG5B3KIW.js +0 -1215
  628. package/dist/chunk-LG5B3KIW.js.map +0 -1
  629. package/dist/chunk-LZUSZT7R.cjs +0 -170
  630. package/dist/chunk-LZUSZT7R.cjs.map +0 -1
  631. package/dist/chunk-MCASUJWY.cjs.map +0 -1
  632. package/dist/chunk-MJMID7LX.cjs.map +0 -1
  633. package/dist/chunk-MKCC5K77.js +0 -90
  634. package/dist/chunk-MKCC5K77.js.map +0 -1
  635. package/dist/chunk-NPNGPMT2.js +0 -39
  636. package/dist/chunk-NPNGPMT2.js.map +0 -1
  637. package/dist/chunk-NR77P3TK.js.map +0 -1
  638. package/dist/chunk-NUAURT4I.cjs +0 -82
  639. package/dist/chunk-NUAURT4I.cjs.map +0 -1
  640. package/dist/chunk-OIT3PCWA.js +0 -72
  641. package/dist/chunk-OIT3PCWA.js.map +0 -1
  642. package/dist/chunk-P35FNLTQ.cjs +0 -2936
  643. package/dist/chunk-P35FNLTQ.cjs.map +0 -1
  644. package/dist/chunk-PFXXH2RP.js.map +0 -1
  645. package/dist/chunk-PZUZNPFM.js.map +0 -1
  646. package/dist/chunk-QFF5JUKT.cjs.map +0 -1
  647. package/dist/chunk-RKXWLG33.js +0 -7
  648. package/dist/chunk-RKXWLG33.js.map +0 -1
  649. package/dist/chunk-ROS5CMJS.cjs.map +0 -1
  650. package/dist/chunk-SJMKDSRF.js +0 -179
  651. package/dist/chunk-SJMKDSRF.js.map +0 -1
  652. package/dist/chunk-SSULK22X.cjs +0 -14
  653. package/dist/chunk-SSULK22X.cjs.map +0 -1
  654. package/dist/chunk-TSNDVBUU.cjs.map +0 -1
  655. package/dist/chunk-TTELJD4F.js.map +0 -1
  656. package/dist/chunk-TX4TTPYJ.cjs +0 -436
  657. package/dist/chunk-TX4TTPYJ.cjs.map +0 -1
  658. package/dist/chunk-UXG7PYML.js.map +0 -1
  659. package/dist/chunk-UZKIGB7M.cjs.map +0 -1
  660. package/dist/chunk-VF676YCO.cjs +0 -150
  661. package/dist/chunk-VF676YCO.cjs.map +0 -1
  662. package/dist/chunk-VQASQG5D.js +0 -55
  663. package/dist/chunk-VQASQG5D.js.map +0 -1
  664. package/dist/chunk-WBAXXG34.cjs.map +0 -1
  665. package/dist/chunk-WCHE6FJ7.js.map +0 -1
  666. package/dist/chunk-WM4RO23J.js +0 -145
  667. package/dist/chunk-WM4RO23J.js.map +0 -1
  668. package/dist/chunk-Z4RIRDU3.js.map +0 -1
  669. package/dist/chunk-ZABG3SZ2.cjs +0 -93
  670. package/dist/chunk-ZABG3SZ2.cjs.map +0 -1
  671. package/dist/chunk-ZISECZZO.js +0 -72
  672. package/dist/chunk-ZISECZZO.js.map +0 -1
  673. package/dist/chunk-ZMELUU72.js.map +0 -1
  674. package/dist/deployer/index.warning.d.ts +0 -9
  675. package/dist/deployer/index.warning.d.ts.map +0 -1
  676. package/dist/eval/evaluation.d.ts +0 -14
  677. package/dist/eval/evaluation.d.ts.map +0 -1
  678. package/dist/eval/index.cjs +0 -16
  679. package/dist/eval/index.d.ts +0 -4
  680. package/dist/eval/index.d.ts.map +0 -1
  681. package/dist/eval/index.js +0 -3
  682. package/dist/eval/metric.d.ts +0 -8
  683. package/dist/eval/metric.d.ts.map +0 -1
  684. package/dist/eval/types.d.ts +0 -9
  685. package/dist/eval/types.d.ts.map +0 -1
  686. package/dist/integration/index.warning.d.ts +0 -3
  687. package/dist/integration/index.warning.d.ts.map +0 -1
  688. package/dist/integration/integration.warning.d.ts +0 -5
  689. package/dist/integration/integration.warning.d.ts.map +0 -1
  690. package/dist/integration/openapi-toolset.warning.d.ts +0 -5
  691. package/dist/integration/openapi-toolset.warning.d.ts.map +0 -1
  692. package/dist/loop/telemetry/index.d.ts +0 -36
  693. package/dist/loop/telemetry/index.d.ts.map +0 -1
  694. package/dist/loop/telemetry/noop.d.ts +0 -3
  695. package/dist/loop/telemetry/noop.d.ts.map +0 -1
  696. package/dist/loop/test-utils/mockTracer.d.ts +0 -47
  697. package/dist/loop/test-utils/mockTracer.d.ts.map +0 -1
  698. package/dist/loop/test-utils/telemetry.d.ts +0 -6
  699. package/dist/loop/test-utils/telemetry.d.ts.map +0 -1
  700. package/dist/memory/index.warning.d.ts +0 -6
  701. package/dist/memory/index.warning.d.ts.map +0 -1
  702. package/dist/models-dev-4VGIWYS3.js +0 -3
  703. package/dist/models-dev-AXZASLL2.cjs +0 -12
  704. package/dist/netlify-TX6V7SJJ.cjs +0 -12
  705. package/dist/netlify-VJXBII33.js +0 -3
  706. package/dist/relevance/cohere/index.d.ts +0 -9
  707. package/dist/relevance/cohere/index.d.ts.map +0 -1
  708. package/dist/runtime-context/index.cjs +0 -12
  709. package/dist/runtime-context/index.js +0 -3
  710. package/dist/scores/base.d.ts.map +0 -1
  711. package/dist/scores/base.test-utils.d.ts.map +0 -1
  712. package/dist/scores/hooks.d.ts.map +0 -1
  713. package/dist/scores/index.cjs +0 -37
  714. package/dist/scores/index.cjs.map +0 -1
  715. package/dist/scores/index.d.ts +0 -4
  716. package/dist/scores/index.d.ts.map +0 -1
  717. package/dist/scores/index.js +0 -4
  718. package/dist/scores/index.js.map +0 -1
  719. package/dist/scores/run-experiment/index.d.ts.map +0 -1
  720. package/dist/scores/run-experiment/scorerAccumulator.d.ts.map +0 -1
  721. package/dist/scores/scoreTraces/index.cjs.map +0 -1
  722. package/dist/scores/scoreTraces/index.d.ts.map +0 -1
  723. package/dist/scores/scoreTraces/index.js.map +0 -1
  724. package/dist/scores/scoreTraces/scoreTraces.d.ts.map +0 -1
  725. package/dist/scores/scoreTraces/scoreTracesWorkflow.d.ts.map +0 -1
  726. package/dist/scores/scoreTraces/utils.d.ts.map +0 -1
  727. package/dist/scores/types.d.ts.map +0 -1
  728. package/dist/storage/base.warning.d.ts +0 -8
  729. package/dist/storage/base.warning.d.ts.map +0 -1
  730. package/dist/storage/domains/legacy-evals/base.d.ts +0 -13
  731. package/dist/storage/domains/legacy-evals/base.d.ts.map +0 -1
  732. package/dist/storage/domains/legacy-evals/index.d.ts +0 -2
  733. package/dist/storage/domains/legacy-evals/index.d.ts.map +0 -1
  734. package/dist/storage/domains/legacy-evals/inmemory.d.ts +0 -17
  735. package/dist/storage/domains/legacy-evals/inmemory.d.ts.map +0 -1
  736. package/dist/storage/domains/traces/base.d.ts +0 -14
  737. package/dist/storage/domains/traces/base.d.ts.map +0 -1
  738. package/dist/storage/domains/traces/index.d.ts +0 -3
  739. package/dist/storage/domains/traces/index.d.ts.map +0 -1
  740. package/dist/storage/domains/traces/inmemory.d.ts +0 -22
  741. package/dist/storage/domains/traces/inmemory.d.ts.map +0 -1
  742. package/dist/storage/index.warning.d.ts +0 -3
  743. package/dist/storage/index.warning.d.ts.map +0 -1
  744. package/dist/telemetry/composite-exporter.d.ts +0 -10
  745. package/dist/telemetry/composite-exporter.d.ts.map +0 -1
  746. package/dist/telemetry/index.cjs +0 -32
  747. package/dist/telemetry/index.cjs.map +0 -1
  748. package/dist/telemetry/index.d.ts +0 -6
  749. package/dist/telemetry/index.d.ts.map +0 -1
  750. package/dist/telemetry/index.js +0 -3
  751. package/dist/telemetry/index.js.map +0 -1
  752. package/dist/telemetry/otel-vendor.cjs +0 -105
  753. package/dist/telemetry/otel-vendor.cjs.map +0 -1
  754. package/dist/telemetry/otel-vendor.d.ts +0 -11
  755. package/dist/telemetry/otel-vendor.d.ts.map +0 -1
  756. package/dist/telemetry/otel-vendor.js +0 -59
  757. package/dist/telemetry/otel-vendor.js.map +0 -1
  758. package/dist/telemetry/storage-exporter.d.ts +0 -21
  759. package/dist/telemetry/storage-exporter.d.ts.map +0 -1
  760. package/dist/telemetry/telemetry.d.ts +0 -59
  761. package/dist/telemetry/telemetry.d.ts.map +0 -1
  762. package/dist/telemetry/telemetry.decorators.d.ts +0 -15
  763. package/dist/telemetry/telemetry.decorators.d.ts.map +0 -1
  764. package/dist/telemetry/types.d.ts +0 -74
  765. package/dist/telemetry/types.d.ts.map +0 -1
  766. package/dist/telemetry/utility.d.ts +0 -15
  767. package/dist/telemetry/utility.d.ts.map +0 -1
  768. package/dist/tools/index.warning.d.ts +0 -8
  769. package/dist/tools/index.warning.d.ts.map +0 -1
  770. package/dist/tts/index.warning.d.ts +0 -7
  771. package/dist/tts/index.warning.d.ts.map +0 -1
  772. package/dist/vector/index.warning.d.ts +0 -6
  773. package/dist/vector/index.warning.d.ts.map +0 -1
  774. package/dist/workflows/index.warning.d.ts +0 -6
  775. package/dist/workflows/index.warning.d.ts.map +0 -1
  776. package/dist/workflows/legacy/index.cjs +0 -92
  777. package/dist/workflows/legacy/index.cjs.map +0 -1
  778. package/dist/workflows/legacy/index.d.ts +0 -5
  779. package/dist/workflows/legacy/index.d.ts.map +0 -1
  780. package/dist/workflows/legacy/index.js +0 -3
  781. package/dist/workflows/legacy/index.js.map +0 -1
  782. package/dist/workflows/legacy/machine.d.ts +0 -386
  783. package/dist/workflows/legacy/machine.d.ts.map +0 -1
  784. package/dist/workflows/legacy/step.d.ts +0 -15
  785. package/dist/workflows/legacy/step.d.ts.map +0 -1
  786. package/dist/workflows/legacy/types.d.ts +0 -397
  787. package/dist/workflows/legacy/types.d.ts.map +0 -1
  788. package/dist/workflows/legacy/utils.d.ts +0 -68
  789. package/dist/workflows/legacy/utils.d.ts.map +0 -1
  790. package/dist/workflows/legacy/workflow-instance.d.ts +0 -97
  791. package/dist/workflows/legacy/workflow-instance.d.ts.map +0 -1
  792. package/dist/workflows/legacy/workflow.d.ts +0 -109
  793. package/dist/workflows/legacy/workflow.d.ts.map +0 -1
  794. package/dist/workflows/workflow.warning.d.ts +0 -9
  795. package/dist/workflows/workflow.warning.d.ts.map +0 -1
  796. package/eval.d.ts +0 -1
  797. package/runtime-context.d.ts +0 -1
  798. package/scores/scoreTraces.d.ts +0 -1
  799. package/scores.d.ts +0 -1
  800. package/telemetry/otel-vendor.d.ts +0 -1
  801. package/telemetry.d.ts +0 -1
  802. package/workflows/legacy.d.ts +0 -1
  803. /package/dist/agent/{input-processor → message-list}/index.cjs.map +0 -0
  804. /package/dist/agent/{input-processor → message-list}/index.js.map +0 -0
  805. /package/dist/{ai-tracing → evals}/index.cjs.map +0 -0
  806. /package/dist/{ai-tracing → evals}/index.js.map +0 -0
  807. /package/dist/{scores/run-experiment → evals/run}/scorerAccumulator.d.ts +0 -0
  808. /package/dist/{scores → evals}/scoreTraces/index.d.ts +0 -0
  809. /package/dist/{eval → observability}/index.cjs.map +0 -0
  810. /package/dist/{eval → observability}/index.js.map +0 -0
  811. /package/dist/{runtime-context → request-context}/index.cjs.map +0 -0
  812. /package/dist/{runtime-context → request-context}/index.js.map +0 -0
package/CHANGELOG.md CHANGED
@@ -1,223 +1,420 @@
1
1
  # @mastra/core
2
2
 
3
- ## 0.24.0
3
+ ## 1.0.0-beta.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - update peerdeps ([`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc))
7
+ - Set correct peer dependency range for `@mastra/observability` ([#9908](https://github.com/mastra-ai/mastra/pull/9908))
8
8
 
9
- - Fix workflow input property preservation after resume from snapshot ([#9527](https://github.com/mastra-ai/mastra/pull/9527))
9
+ - Add visual styles and labels for more workflow node types ([#9777](https://github.com/mastra-ai/mastra/pull/9777))
10
10
 
11
- Ensure that when resuming a workflow from a snapshot, the input property is correctly set from the snapshot's context input rather than from resume data. This prevents the loss of original workflow input data during suspend/resume cycles.
11
+ ## 1.0.0-beta.0
12
12
 
13
- - Fix a bug where streaming didn't output the final chunk ([#9726](https://github.com/mastra-ai/mastra/pull/9726))
13
+ ### Major Changes
14
14
 
15
- - Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. ([#9487](https://github.com/mastra-ai/mastra/pull/9487))
15
+ - Moving scorers under the eval domain, api method consistency, prebuilt evals, scorers require ids. ([#9589](https://github.com/mastra-ai/mastra/pull/9589))
16
16
 
17
- - Fix network routing agent smoothstreaming ([#9727](https://github.com/mastra-ai/mastra/pull/9727))
17
+ - **BREAKING CHANGE**: Scorers for Agents will now use `MastraDBMessage` instead of `UIMessage` ([#9702](https://github.com/mastra-ai/mastra/pull/9702))
18
+ - Scorer input/output types now use `MastraDBMessage[]` with nested `content` object structure
19
+ - Added `getTextContentFromMastraDBMessage()` helper function to extract text content from `MastraDBMessage` objects
20
+ - Added `createTestMessage()` helper function for creating `MastraDBMessage` objects in tests with optional tool invocations support
21
+ - Updated `extractToolCalls()` to access tool invocations from nested `content` structure
22
+ - Updated `getUserMessageFromRunInput()` and `getAssistantMessageFromRunOutput()` to use new message structure
23
+ - Removed `createUIMessage()`
18
24
 
19
- - Updated dependencies [[`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc)]:
20
- - @mastra/schema-compat@0.11.7
25
+ - 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))
21
26
 
22
- ## 0.24.0-alpha.0
27
+ Primitives that are added to other primitives are also automatically added to the Mastra instance
23
28
 
24
- ### Patch Changes
29
+ - 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))
25
30
 
26
- - update peerdeps ([`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc))
31
+ - **BREAKING:** Remove `getMessagesPaginated()` and add `perPage: false` support ([#9670](https://github.com/mastra-ai/mastra/pull/9670))
27
32
 
28
- - Fix workflow input property preservation after resume from snapshot ([#9527](https://github.com/mastra-ai/mastra/pull/9527))
33
+ Removes deprecated `getMessagesPaginated()` method. The `listMessages()` API and score handlers now support `perPage: false` to fetch all records without pagination limits.
29
34
 
30
- Ensure that when resuming a workflow from a snapshot, the input property is correctly set from the snapshot's context input rather than from resume data. This prevents the loss of original workflow input data during suspend/resume cycles.
35
+ **Storage changes:**
36
+ - `StoragePagination.perPage` type changed from `number` to `number | false`
37
+ - All storage implementations support `perPage: false`:
38
+ - Memory: `listMessages()`
39
+ - Scores: `listScoresBySpan()`, `listScoresByRunId()`, `listScoresByExecutionId()`
40
+ - HTTP query parser accepts `"false"` string (e.g., `?perPage=false`)
31
41
 
32
- - Fix a bug where streaming didn't output the final chunk ([#9726](https://github.com/mastra-ai/mastra/pull/9726))
42
+ **Memory changes:**
43
+ - `memory.query()` parameter type changed from `StorageGetMessagesArg` to `StorageListMessagesInput`
44
+ - Uses flat parameters (`page`, `perPage`, `include`, `filter`, `vectorSearchString`) instead of `selectBy` object
33
45
 
34
- - Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. ([#9487](https://github.com/mastra-ai/mastra/pull/9487))
46
+ **Stricter validation:**
47
+ - `listMessages()` requires non-empty, non-whitespace `threadId` (throws error instead of returning empty results)
35
48
 
36
- - Fix network routing agent smoothstreaming ([#9727](https://github.com/mastra-ai/mastra/pull/9727))
49
+ **Migration:**
37
50
 
38
- - Updated dependencies [[`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc)]:
39
- - @mastra/schema-compat@0.11.7-alpha.0
51
+ ```typescript
52
+ // Storage/Memory: Replace getMessagesPaginated with listMessages
53
+ - storage.getMessagesPaginated({ threadId, selectBy: { pagination: { page: 0, perPage: 20 } } })
54
+ + storage.listMessages({ threadId, page: 0, perPage: 20 })
55
+ + storage.listMessages({ threadId, page: 0, perPage: false }) // Fetch all
56
+
57
+ // Memory: Replace selectBy with flat parameters
58
+ - memory.query({ threadId, selectBy: { last: 20, include: [...] } })
59
+ + memory.query({ threadId, perPage: 20, include: [...] })
60
+
61
+ // Client SDK
62
+ - thread.getMessagesPaginated({ selectBy: { pagination: { page: 0 } } })
63
+ + thread.listMessages({ page: 0, perPage: 20 })
64
+ ```
40
65
 
41
- ## 0.23.3
66
+ - # Major Changes ([#9695](https://github.com/mastra-ai/mastra/pull/9695))
42
67
 
43
- ### Patch Changes
68
+ ## Storage Layer
44
69
 
45
- - Allow resuming nested workflow step with chained id ([#9464](https://github.com/mastra-ai/mastra/pull/9464))
70
+ ### BREAKING: Removed `storage.getMessages()`
46
71
 
47
- Example, you have a workflow like this
72
+ The `getMessages()` method has been removed from all storage implementations. Use `listMessages()` instead, which provides pagination support.
48
73
 
49
- ```
50
- export const supportWorkflow = mainWorkflow.then(nestedWorkflow).commit();
74
+ **Migration:**
75
+
76
+ ```typescript
77
+ // Before
78
+ const messages = await storage.getMessages({ threadId: 'thread-1' });
79
+
80
+ // After
81
+ const result = await storage.listMessages({
82
+ threadId: 'thread-1',
83
+ page: 0,
84
+ perPage: 50,
85
+ });
86
+ const messages = result.messages; // Access messages array
87
+ console.log(result.total); // Total count
88
+ console.log(result.hasMore); // Whether more pages exist
51
89
  ```
52
90
 
53
- And a step in `nestedWorkflow` is supsended, you can now also resume it any of these ways:
91
+ ### Message ordering default
54
92
 
55
- ```
56
- run.resume({
57
- step: "nestedWorkflow.suspendedStep", //chained nested workflow step id and suspended step id
58
- //other resume params
59
- })
93
+ `listMessages()` defaults to ASC (oldest first) ordering by `createdAt`, matching the previous `getMessages()` behavior.
94
+
95
+ **To use DESC ordering (newest first):**
96
+
97
+ ```typescript
98
+ const result = await storage.listMessages({
99
+ threadId: 'thread-1',
100
+ orderBy: { field: 'createdAt', direction: 'DESC' },
101
+ });
60
102
  ```
61
103
 
62
- OR
104
+ ## Client SDK
105
+
106
+ ### BREAKING: Renamed `client.getThreadMessages()` → `client.listThreadMessages()`
107
+
108
+ **Migration:**
63
109
 
110
+ ```typescript
111
+ // Before
112
+ const response = await client.getThreadMessages(threadId, { agentId });
113
+
114
+ // After
115
+ const response = await client.listThreadMessages(threadId, { agentId });
64
116
  ```
65
- run.resume({
66
- step: "nestedWorkflow", // just the nested workflow step/step id
67
- //other resume params
68
- })
117
+
118
+ The response format remains the same.
119
+
120
+ ## Type Changes
121
+
122
+ ### BREAKING: Removed `StorageGetMessagesArg` type
123
+
124
+ Use `StorageListMessagesInput` instead:
125
+
126
+ ```typescript
127
+ // Before
128
+ import type { StorageGetMessagesArg } from '@mastra/core';
129
+
130
+ // After
131
+ import type { StorageListMessagesInput } from '@mastra/core';
69
132
  ```
70
133
 
71
- - Fix creating system messages from inside processors using processInput. ([#9476](https://github.com/mastra-ai/mastra/pull/9476))
134
+ - - 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))
135
+ - The deprecated generateVNext() and streamVNext() methods have been removed since they're now the stable generate() and stream() methods.
136
+ - The deprecated `output` option has been removed entirely, in favour of `structuredOutput`.
72
137
 
73
- - Prevent changing workflow status to suspended when some parallel steps are still running ([#9460](https://github.com/mastra-ai/mastra/pull/9460))
138
+ Method renames to clarify the API surface:
139
+ - getDefaultGenerateOptions → getDefaultGenerateOptionsLegacy
140
+ - getDefaultStreamOptions → getDefaultStreamOptionsLegacy
141
+ - getDefaultVNextStreamOptions → getDefaultStreamOptions
74
142
 
75
- ## 0.23.3-alpha.0
143
+ - Bump minimum required Node.js version to 22.13.0 ([#9706](https://github.com/mastra-ai/mastra/pull/9706))
76
144
 
77
- ### Patch Changes
145
+ - 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))
78
146
 
79
- - Allow resuming nested workflow step with chained id ([#9464](https://github.com/mastra-ai/mastra/pull/9464))
147
+ - 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))
80
148
 
81
- Example, you have a workflow like this
149
+ - Update tool execution signature ([#9587](https://github.com/mastra-ai/mastra/pull/9587))
150
+
151
+ Consolidated the 3 different execution contexts to one
152
+
153
+ ```typescript
154
+ // before depending on the context the tool was executed in
155
+ tool.execute({ context: data });
156
+ tool.execute({ context: { inputData: data } });
157
+ tool.execute(data);
82
158
 
159
+ // now, for all contexts
160
+ tool.execute(data, context);
83
161
  ```
84
- export const supportWorkflow = mainWorkflow.then(nestedWorkflow).commit();
162
+
163
+ **Before:**
164
+
165
+ ```typescript
166
+ inputSchema: z.object({ something: z.string() }),
167
+ execute: async ({ context, tracingContext, runId, ... }) => {
168
+ return doSomething(context.string);
169
+ }
85
170
  ```
86
171
 
87
- And a step in `nestedWorkflow` is supsended, you can now also resume it any of these ways:
172
+ **After:**
88
173
 
174
+ ```typescript
175
+ inputSchema: z.object({ something: z.string() }),
176
+ execute: async (inputData, context) => {
177
+ const { agent, mcp, workflow, ...sharedContext } = context
178
+
179
+ // context that only an agent would get like toolCallId, messages, suspend, resume, etc
180
+ if (agent) {
181
+ doSomething(inputData.something, agent)
182
+ // context that only a workflow would get like runId, state, suspend, resume, etc
183
+ } else if (workflow) {
184
+ doSomething(inputData.something, workflow)
185
+ // context that only a workflow would get like "extra", "elicitation"
186
+ } else if (mcp) {
187
+ doSomething(inputData.something, mcp)
188
+ } else {
189
+ // Running a tool in no execution context
190
+ return doSomething(inputData.something);
191
+ }
192
+ }
89
193
  ```
90
- run.resume({
91
- step: "nestedWorkflow.suspendedStep", //chained nested workflow step id and suspended step id
92
- //other resume params
93
- })
194
+
195
+ - 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))
196
+
197
+ For example:
198
+
199
+ ```diff
200
+ import { Mastra, type Config } from "@mastra/core";
201
+ - import { Agent } from "@mastra/core";
202
+ - import { createTool } from "@mastra/core";
203
+ - import { createStep } from "@mastra/core";
204
+
205
+ + import { Agent } from "@mastra/core/agent";
206
+ + import { createTool } from "@mastra/core/tools";
207
+ + import { createStep } from "@mastra/core/workflows";
94
208
  ```
95
209
 
96
- OR
210
+ - 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))
211
+
212
+ 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.
97
213
 
214
+ Before:
215
+
216
+ ```typescript
217
+ // Two methods that did the same thing
218
+ memory.rememberMessages({ threadId, resourceId, config, vectorMessageSearch });
219
+ memory.query({ threadId, resourceId, perPage, vectorSearchString });
98
220
  ```
99
- run.resume({
100
- step: "nestedWorkflow", // just the nested workflow step/step id
101
- //other resume params
102
- })
221
+
222
+ After:
223
+
224
+ ```typescript
225
+ // Single unified method with clear purpose
226
+ memory.recall({ threadId, resourceId, perPage, vectorMessageSearch, threadConfig });
103
227
  ```
104
228
 
105
- - Fix creating system messages from inside processors using processInput. ([#9476](https://github.com/mastra-ai/mastra/pull/9476))
229
+ All usages have been updated across the codebase including tests. The agent now calls recall directly with the appropriate parameters.
106
230
 
107
- - Prevent changing workflow status to suspended when some parallel steps are still running ([#9460](https://github.com/mastra-ai/mastra/pull/9460))
231
+ - Rename RuntimeContext to RequestContext ([#9511](https://github.com/mastra-ai/mastra/pull/9511))
108
232
 
109
- ## 0.23.2
233
+ - Implement listMessages API for replacing previous methods ([#9531](https://github.com/mastra-ai/mastra/pull/9531))
110
234
 
111
- ### Patch Changes
235
+ - 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))
112
236
 
113
- - Fix agent onChunk callback receiving wrapped chunk instead of direct chunk ([#9402](https://github.com/mastra-ai/mastra/pull/9402))
237
+ - 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))
114
238
 
115
- - Ensure model_generation spans end before agent_run spans. ([#9393](https://github.com/mastra-ai/mastra/pull/9393))
239
+ - 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))
116
240
 
117
- - Fix OpenAI schema validation errors in processors ([#9400](https://github.com/mastra-ai/mastra/pull/9400))
241
+ - Experimental auth -> auth ([#9660](https://github.com/mastra-ai/mastra/pull/9660))
118
242
 
119
- - Don't call `os.homedir()` at top level (but lazy invoke it) to accommodate sandboxed environments ([#9357](https://github.com/mastra-ai/mastra/pull/9357))
243
+ - Renamed a bunch of observability/tracing-related things to drop the AI prefix. ([#9744](https://github.com/mastra-ai/mastra/pull/9744))
120
244
 
121
- - Detect thenable objects returned by AI model providers ([#9414](https://github.com/mastra-ai/mastra/pull/9414))
245
+ - Removed MastraMessageV3 intermediary format, now we go from MastraDBMessage->aiv5 formats and back directly ([#9094](https://github.com/mastra-ai/mastra/pull/9094))
122
246
 
123
- - Bug fix: Use input processors that are passed in generate or stream agent options rather than always defaulting to the processors set on the Agent class. ([#9422](https://github.com/mastra-ai/mastra/pull/9422))
247
+ - **Breaking Change**: Remove legacy v1 watch events and consolidate on v2 implementation. ([#9252](https://github.com/mastra-ai/mastra/pull/9252))
124
248
 
125
- - Fix tool input validation to use schema-compat transformed schemas ([#9360](https://github.com/mastra-ai/mastra/pull/9360))
249
+ This change simplifies the workflow watching API by removing the legacy v1 event system and promoting v2 as the standard (renamed to just `watch`).
126
250
 
127
- Previously, tool input validation used the original Zod schema while the LLM received a schema-compat transformed version. This caused validation failures when LLMs (like OpenAI o3 or Claude 3.5 Haiku) sent arguments matching the transformed schema but not the original.
251
+ ### What's Changed
252
+ - Removed legacy v1 watch event handlers and types
253
+ - Renamed `watch-v2` to `watch` throughout the codebase
254
+ - Removed `.watch()` method from client-js SDK (`Workflow` and `AgentBuilder` classes)
255
+ - Removed `/watch` HTTP endpoints from server and deployer
256
+ - Removed `WorkflowWatchResult` and v1 `WatchEvent` types
128
257
 
129
- For example:
130
- - OpenAI o3 reasoning models convert `.optional()` to `.nullable()`, sending `null` values
131
- - Claude 3.5 Haiku strips `min`/`max` string constraints, sending shorter strings
132
- - Validation would reject these valid responses because it checked against the original schema
258
+ - Remove various deprecated APIs from agent class. ([#9257](https://github.com/mastra-ai/mastra/pull/9257))
259
+ - `agent.llm` `agent.getLLM()`
260
+ - `agent.tools` `agent.getTools()`
261
+ - `agent.instructions` `agent.getInstructions()`
262
+ - `agent.speak()` → `agent.voice.speak()`
263
+ - `agent.getSpeakers()` → `agent.voice.getSpeakers()`
264
+ - `agent.listen` → `agent.voice.listen()`
265
+ - `agent.fetchMemory` → `(await agent.getMemory()).query()`
266
+ - `agent.toStep` → Add agent directly to the step, workflows handle the transformation
133
267
 
134
- The fix ensures validation uses the same schema-compat processed schema that was sent to the LLM, eliminating this mismatch.
268
+ - **BREAKING CHANGE**: Pagination APIs now use `page`/`perPage` instead of `offset`/`limit` ([#9592](https://github.com/mastra-ai/mastra/pull/9592))
135
269
 
136
- - Add import for WritableStream in execution-engine and dedupe llm.getModel in agent.ts ([#9341](https://github.com/mastra-ai/mastra/pull/9341))
270
+ 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.
137
271
 
138
- - pass writableStream parameter to workflow execution ([#9339](https://github.com/mastra-ai/mastra/pull/9339))
272
+ **Affected APIs:**
273
+ - `Memory.listThreadsByResourceId()`
274
+ - `Memory.listMessages()`
275
+ - `Storage.listWorkflowRuns()`
139
276
 
140
- - Save correct status in snapshot for all workflow parallel steps. ([#9398](https://github.com/mastra-ai/mastra/pull/9398))
141
- This ensures when you poll workflow run result using `getWorkflowRunExecutionResult(runId)`, you get the right status for all parallel steps
277
+ **Migration:**
142
278
 
143
- - Add ability to pass agent options when wrapping an agent with createStep. This allows configuring agent execution settings when using agents as workflow steps. ([#9359](https://github.com/mastra-ai/mastra/pull/9359))
279
+ ```typescript
280
+ // Before
281
+ await memory.listThreadsByResourceId({
282
+ resourceId: 'user-123',
283
+ offset: 20,
284
+ limit: 10,
285
+ });
144
286
 
145
- - Fix network loop iteration counter and usage promise handling: ([#9415](https://github.com/mastra-ai/mastra/pull/9415))
146
- - Fixed iteration counter in network loop that was stuck at 0 due to falsy check. Properly handled zero values to ensure maxSteps is correctly enforced.
147
- - Fixed usage promise resolution in RunOutput stream by properly resolving or rejecting the promise on stream close, preventing hanging promises when streams complete.
287
+ // After
288
+ await memory.listThreadsByResourceId({
289
+ resourceId: 'user-123',
290
+ page: 2, // page = Math.floor(offset / limit)
291
+ perPage: 10,
292
+ });
148
293
 
149
- - Workflow validation zod v4 support ([#9363](https://github.com/mastra-ai/mastra/pull/9363))
294
+ // Before
295
+ await memory.listMessages({
296
+ threadId: 'thread-456',
297
+ offset: 20,
298
+ limit: 10,
299
+ });
150
300
 
151
- - Fix usage tracking with agent network ([#9413](https://github.com/mastra-ai/mastra/pull/9413))
301
+ // After
302
+ await memory.listMessages({
303
+ threadId: 'thread-456',
304
+ page: 2,
305
+ perPage: 10,
306
+ });
152
307
 
153
- - Updated dependencies [[`6bb26c4`](https://github.com/mastra-ai/mastra/commit/6bb26c4e82795d70515577a7cbd1e186c07ccf24), [`8d8f674`](https://github.com/mastra-ai/mastra/commit/8d8f67428ad1bcc944e2666179c886bae80120f5)]:
154
- - @mastra/schema-compat@0.11.6
308
+ // Before
309
+ await storage.listWorkflowRuns({
310
+ workflowName: 'my-workflow',
311
+ offset: 20,
312
+ limit: 10,
313
+ });
155
314
 
156
- ## 0.23.2-alpha.1
315
+ // After
316
+ await storage.listWorkflowRuns({
317
+ workflowName: 'my-workflow',
318
+ page: 2,
319
+ perPage: 10,
320
+ });
321
+ ```
157
322
 
158
- ### Patch Changes
323
+ **Additional improvements:**
324
+ - Added validation for negative `page` values in all storage implementations
325
+ - Improved `perPage` validation to handle edge cases (negative values, `0`, `false`)
326
+ - Added reusable query parser utilities for consistent validation in handlers
159
327
 
160
- - Fix agent onChunk callback receiving wrapped chunk instead of direct chunk ([#9402](https://github.com/mastra-ai/mastra/pull/9402))
328
+ - ```([#9709](https://github.com/mastra-ai/mastra/pull/9709))
329
+ import { Mastra } from '@mastra/core';
330
+ import { Observability } from '@mastra/observability'; // Explicit import
161
331
 
162
- - Fix OpenAI schema validation errors in processors ([#9400](https://github.com/mastra-ai/mastra/pull/9400))
332
+ const mastra = new Mastra({
333
+ ...other_config,
334
+ observability: new Observability({
335
+ default: { enabled: true }
336
+ }) // Instance
337
+ });
338
+ ```
163
339
 
164
- - Detect thenable objects returned by AI model providers ([#9414](https://github.com/mastra-ai/mastra/pull/9414))
340
+ Instead of:
165
341
 
166
- - Bug fix: Use input processors that are passed in generate or stream agent options rather than always defaulting to the processors set on the Agent class. ([#9422](https://github.com/mastra-ai/mastra/pull/9422))
342
+ ```
343
+ import { Mastra } from '@mastra/core';
344
+ import '@mastra/observability/init'; // Explicit import
167
345
 
168
- - Save correct status in snapshot for all workflow parallel steps. ([#9398](https://github.com/mastra-ai/mastra/pull/9398))
169
- This ensures when you poll workflow run result using `getWorkflowRunExecutionResult(runId)`, you get the right status for all parallel steps
346
+ const mastra = new Mastra({
347
+ ...other_config,
348
+ observability: {
349
+ default: { enabled: true }
350
+ }
351
+ });
352
+ ```
170
353
 
171
- - Fix network loop iteration counter and usage promise handling: ([#9415](https://github.com/mastra-ai/mastra/pull/9415))
172
- - Fixed iteration counter in network loop that was stuck at 0 due to falsy check. Properly handled zero values to ensure maxSteps is correctly enforced.
173
- - Fixed usage promise resolution in RunOutput stream by properly resolving or rejecting the promise on stream close, preventing hanging promises when streams complete.
354
+ Also renamed a bunch of:
355
+ - `Tracing` things to `Observability` things.
356
+ - `AI-` things to just things.
174
357
 
175
- - Workflow validation zod v4 support ([#9363](https://github.com/mastra-ai/mastra/pull/9363))
358
+ - Changing getAgents -> listAgents, getTools -> listTools, getWorkflows -> listWorkflows ([#9495](https://github.com/mastra-ai/mastra/pull/9495))
176
359
 
177
- - Fix usage tracking with agent network ([#9413](https://github.com/mastra-ai/mastra/pull/9413))
360
+ - Removed old tracing code based on OpenTelemetry ([#9237](https://github.com/mastra-ai/mastra/pull/9237))
178
361
 
179
- ## 0.23.2-alpha.0
362
+ - Remove deprecated vector prompts and cohere provider from code ([#9596](https://github.com/mastra-ai/mastra/pull/9596))
180
363
 
181
- ### Patch Changes
364
+ - Mark as stable ([`83d5942`](https://github.com/mastra-ai/mastra/commit/83d5942669ce7bba4a6ca4fd4da697a10eb5ebdc))
182
365
 
183
- - Ensure model_generation spans end before agent_run spans. ([#9393](https://github.com/mastra-ai/mastra/pull/9393))
366
+ - Enforcing id required on Processor primitive ([#9591](https://github.com/mastra-ai/mastra/pull/9591))
184
367
 
185
- - Don't call `os.homedir()` at top level (but lazy invoke it) to accommodate sandboxed environments ([#9357](https://github.com/mastra-ai/mastra/pull/9357))
368
+ - **Breaking Changes:** ([#9045](https://github.com/mastra-ai/mastra/pull/9045))
369
+ - Moved `generateTitle` from `threads.generateTitle` to top-level memory option
370
+ - Changed default value from `true` to `false`
371
+ - Using `threads.generateTitle` now throws an error
186
372
 
187
- - Fix tool input validation to use schema-compat transformed schemas ([#9360](https://github.com/mastra-ai/mastra/pull/9360))
373
+ **Migration:**
374
+ Replace `threads: { generateTitle: true }` with `generateTitle: true` at the top level of memory options.
188
375
 
189
- Previously, tool input validation used the original Zod schema while the LLM received a schema-compat transformed version. This caused validation failures when LLMs (like OpenAI o3 or Claude 3.5 Haiku) sent arguments matching the transformed schema but not the original.
376
+ **Playground:**
377
+ The playground UI now displays thread IDs instead of "Chat from" when titles aren't generated.
190
378
 
191
- For example:
192
- - OpenAI o3 reasoning models convert `.optional()` to `.nullable()`, sending `null` values
193
- - Claude 3.5 Haiku strips `min`/`max` string constraints, sending shorter strings
194
- - Validation would reject these valid responses because it checked against the original schema
379
+ - Renamed `MastraMessageV2` to `MastraDBMessage` ([#9255](https://github.com/mastra-ai/mastra/pull/9255))
380
+ 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
195
381
 
196
- The fix ensures validation uses the same schema-compat processed schema that was sent to the LLM, eliminating this mismatch.
382
+ - moved ai-tracing code into @mastra/observability ([#9661](https://github.com/mastra-ai/mastra/pull/9661))
197
383
 
198
- - Add import for WritableStream in execution-engine and dedupe llm.getModel in agent.ts ([#9341](https://github.com/mastra-ai/mastra/pull/9341))
384
+ - Remove legacy evals from Mastra ([#9491](https://github.com/mastra-ai/mastra/pull/9491))
199
385
 
200
- - pass writableStream parameter to workflow execution ([#9339](https://github.com/mastra-ai/mastra/pull/9339))
386
+ - Removes deprecated input-processor type and processors. ([#9200](https://github.com/mastra-ai/mastra/pull/9200))
201
387
 
202
- - Add ability to pass agent options when wrapping an agent with createStep. This allows configuring agent execution settings when using agents as workflow steps. ([#9359](https://github.com/mastra-ai/mastra/pull/9359))
388
+ ### Minor Changes
203
389
 
204
- - Updated dependencies [[`6bb26c4`](https://github.com/mastra-ai/mastra/commit/6bb26c4e82795d70515577a7cbd1e186c07ccf24), [`8d8f674`](https://github.com/mastra-ai/mastra/commit/8d8f67428ad1bcc944e2666179c886bae80120f5)]:
205
- - @mastra/schema-compat@0.11.6-alpha.0
390
+ - **BREAKING CHANGE**: Memory scope defaults changed from 'thread' to 'resource' ([#8983](https://github.com/mastra-ai/mastra/pull/8983))
206
391
 
207
- ## 0.23.1
392
+ Both `workingMemory.scope` and `semanticRecall.scope` now default to `'resource'` instead of `'thread'`. This means:
393
+ - Working memory persists across all conversations for the same user/resource
394
+ - Semantic recall searches across all threads for the same user/resource
208
395
 
209
- ### Patch Changes
396
+ **Migration**: To maintain the previous thread-scoped behavior, explicitly set `scope: 'thread'`:
210
397
 
211
- - Updated dependencies [[`eb7c1c8`](https://github.com/mastra-ai/mastra/commit/eb7c1c8c592d8fb16dfd250e337d9cdc73c8d5de)]:
212
- - @mastra/schema-compat@0.11.5
398
+ ```typescript
399
+ memory: new Memory({
400
+ storage,
401
+ workingMemory: {
402
+ enabled: true,
403
+ scope: 'thread', // Explicitly set for thread-scoped behavior
404
+ },
405
+ semanticRecall: {
406
+ scope: 'thread', // Explicitly set for thread-scoped behavior
407
+ },
408
+ }),
409
+ ```
213
410
 
214
- ## 0.23.0
411
+ See the [migration guide](https://mastra.ai/docs/guides/migrations/memory-scope-defaults) for more details.
215
412
 
216
- ### Minor Changes
413
+ Also fixed issues where playground semantic recall search could show missing or incorrect results in certain cases.
217
414
 
218
415
  - Rename LLM span types and attributes to use Model prefix ([#9105](https://github.com/mastra-ai/mastra/pull/9105))
219
416
 
220
- BREAKING CHANGE: This release renames AI tracing span types and attribute interfaces to use the "Model" prefix instead of "LLM":
417
+ BREAKING CHANGE: This release renames tracing span types and attribute interfaces to use the "Model" prefix instead of "LLM":
221
418
  - `AISpanType.LLM_GENERATION` → `AISpanType.MODEL_GENERATION`
222
419
  - `AISpanType.LLM_STEP` → `AISpanType.MODEL_STEP`
223
420
  - `AISpanType.LLM_CHUNK` → `AISpanType.MODEL_CHUNK`
@@ -235,41 +432,189 @@
235
432
 
236
433
  ### Patch Changes
237
434
 
435
+ - Add exponential backoff to model retry logic to prevent cascading failures ([#9798](https://github.com/mastra-ai/mastra/pull/9798))
436
+
437
+ When AI model calls fail, the system now implements exponential backoff (1s, 2s, 4s, 8s, max 10s) before retrying instead of immediately hammering the API. This prevents:
438
+ - Rate limit violations from getting worse
439
+ - Cascading failures across all fallback models
440
+ - Wasted API quota by burning through retries instantly
441
+ - Production outages when all models fail due to rate limits
442
+
443
+ The backoff gives APIs time to recover from transient failures and rate limiting.
444
+
238
445
  - Update provider registry and model documentation with latest models and providers ([`f743dbb`](https://github.com/mastra-ai/mastra/commit/f743dbb8b40d1627b5c10c0e6fc154f4ebb6e394))
239
446
 
240
- - Add tool call approval ([#8649](https://github.com/mastra-ai/mastra/pull/8649))
447
+ - Fix agent onChunk callback receiving wrapped chunk instead of direct chunk ([#9350](https://github.com/mastra-ai/mastra/pull/9350))
241
448
 
242
- - Fix error handling and serialization in agent streaming to ensure errors are consistently exposed and preserved. ([#9192](https://github.com/mastra-ai/mastra/pull/9192))
449
+ - Deprecate `runCount` parameter in favor of `retryCount` for better naming clarity. The name `runCount` was misleading as it doesn't represent the total number of times a step has run, but rather the number of retry attempts made for a step. ([#9153](https://github.com/mastra-ai/mastra/pull/9153))
243
450
 
244
- ## 0.23.0-alpha.0
451
+ `runCount` is available in `execute()` functions and methods that interact with the step execution. This also applies to condition functions and loop condition functions that use this parameter. If your code uses `runCount`, change the name to `retryCount`.
245
452
 
246
- ### Minor Changes
453
+ Here's an example migration:
247
454
 
248
- - Rename LLM span types and attributes to use Model prefix ([#9105](https://github.com/mastra-ai/mastra/pull/9105))
455
+ ```diff
456
+ const myStep = createStep({
457
+ // Rest of step...
458
+ - execute: async ({ runCount, ...params }) => {
459
+ + execute: async ({ retryCount, ...params }) => {
460
+ // ... rest of your logic
461
+ }
462
+ });
463
+ ```
249
464
 
250
- BREAKING CHANGE: This release renames AI tracing span types and attribute interfaces to use the "Model" prefix instead of "LLM":
251
- - `AISpanType.LLM_GENERATION` → `AISpanType.MODEL_GENERATION`
252
- - `AISpanType.LLM_STEP` → `AISpanType.MODEL_STEP`
253
- - `AISpanType.LLM_CHUNK` → `AISpanType.MODEL_CHUNK`
254
- - `LLMGenerationAttributes` → `ModelGenerationAttributes`
255
- - `LLMStepAttributes` → `ModelStepAttributes`
256
- - `LLMChunkAttributes` → `ModelChunkAttributes`
257
- - `InternalSpans.LLM` → `InternalSpans.MODEL`
465
+ - Add requestContext column if it does not exist ([#9786](https://github.com/mastra-ai/mastra/pull/9786))
258
466
 
259
- This change better reflects that these span types apply to all AI models, not just Large Language Models.
467
+ - Track usage in workflow and agent network ([#9649](https://github.com/mastra-ai/mastra/pull/9649))
260
468
 
261
- Migration guide:
262
- - Update all imports: `import { ModelGenerationAttributes } from '@mastra/core/ai-tracing'`
263
- - Update span type references: `AISpanType.MODEL_GENERATION`
264
- - Update InternalSpans usage: `InternalSpans.MODEL`
469
+ - Allow resuming nested workflow step with chained id ([#9459](https://github.com/mastra-ai/mastra/pull/9459))
265
470
 
266
- ### Patch Changes
471
+ Example, you have a workflow like this
267
472
 
268
- - Update provider registry and model documentation with latest models and providers ([`f743dbb`](https://github.com/mastra-ai/mastra/commit/f743dbb8b40d1627b5c10c0e6fc154f4ebb6e394))
473
+ ```
474
+ export const supportWorkflow = mainWorkflow.then(nestedWorkflow).commit();
475
+ ```
476
+
477
+ And a step in `nestedWorkflow` is supsended, you can now also resume it any of these ways:
478
+
479
+ ```
480
+ run.resume({
481
+ step: "nestedWorkflow.suspendedStep", //chained nested workflow step id and suspended step id
482
+ //other resume params
483
+ })
484
+ ```
485
+
486
+ OR
487
+
488
+ ```
489
+ run.resume({
490
+ step: "nestedWorkflow", // just the nested workflow step/step id
491
+ //other resume params
492
+ })
493
+ ```
494
+
495
+ - Fix OpenAI schema validation errors in processors ([#9093](https://github.com/mastra-ai/mastra/pull/9093))
496
+
497
+ - Breaking change to move mcp related tool execute arguments nested under an `mcp` argument that is only populated if the tool is passed to an MCPServer. This simpliflies tool definitions and gives you the correct types when working with tools meant for MCP servers. ([#9134](https://github.com/mastra-ai/mastra/pull/9134))
498
+
499
+ - Ensure model_generation spans end before agent_run spans. ([#9251](https://github.com/mastra-ai/mastra/pull/9251))
500
+
501
+ - Fix workflow input property preservation after resume from snapshot ([#9380](https://github.com/mastra-ai/mastra/pull/9380))
502
+
503
+ Ensure that when resuming a workflow from a snapshot, the input property is correctly set from the snapshot's context input rather than from resume data. This prevents the loss of original workflow input data during suspend/resume cycles.
269
504
 
270
505
  - Add tool call approval ([#8649](https://github.com/mastra-ai/mastra/pull/8649))
271
506
 
272
- - Fix error handling and serialization in agent streaming to ensure errors are consistently exposed and preserved. ([#9192](https://github.com/mastra-ai/mastra/pull/9192))
507
+ - Fix error handling and serialization in agent streaming to ensure errors are consistently exposed and preserved. ([#9144](https://github.com/mastra-ai/mastra/pull/9144))
508
+
509
+ - Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. ([#9481](https://github.com/mastra-ai/mastra/pull/9481))
510
+
511
+ - Fix a bug where streaming didn't output the final chunk ([#9546](https://github.com/mastra-ai/mastra/pull/9546))
512
+
513
+ - Don't call `os.homedir()` at top level (but lazy invoke it) to accommodate sandboxed environments ([#9211](https://github.com/mastra-ai/mastra/pull/9211))
514
+
515
+ - Fix: Don't download unsupported media ([#9209](https://github.com/mastra-ai/mastra/pull/9209))
516
+
517
+ - Detect thenable objects returned by AI model providers ([#8905](https://github.com/mastra-ai/mastra/pull/8905))
518
+
519
+ - Fixes incorrect tool invocation format in message list that was causing client tools to fail during message format conversions. ([#9590](https://github.com/mastra-ai/mastra/pull/9590))
520
+
521
+ - Bug fix: Use input processors that are passed in generate or stream agent options rather than always defaulting to the processors set on the Agent class. ([#9407](https://github.com/mastra-ai/mastra/pull/9407))
522
+
523
+ - Fix tool input validation to use schema-compat transformed schemas ([#9258](https://github.com/mastra-ai/mastra/pull/9258))
524
+
525
+ Previously, tool input validation used the original Zod schema while the LLM received a schema-compat transformed version. This caused validation failures when LLMs (like OpenAI o3 or Claude 3.5 Haiku) sent arguments matching the transformed schema but not the original.
526
+
527
+ For example:
528
+ - OpenAI o3 reasoning models convert `.optional()` to `.nullable()`, sending `null` values
529
+ - Claude 3.5 Haiku strips `min`/`max` string constraints, sending shorter strings
530
+ - Validation would reject these valid responses because it checked against the original schema
531
+
532
+ The fix ensures validation uses the same schema-compat processed schema that was sent to the LLM, eliminating this mismatch.
533
+
534
+ - Add import for WriteableStream in execution-engine and dedupe llm.getModel in agent.ts ([#9185](https://github.com/mastra-ai/mastra/pull/9185))
535
+
536
+ - Use a shared `getAllToolPaths()` method from the bundler to discover tool paths. ([#9204](https://github.com/mastra-ai/mastra/pull/9204))
537
+
538
+ - Added support for .streamVNext and .stream that uses it in the inngest execution engine ([#9434](https://github.com/mastra-ai/mastra/pull/9434))
539
+
540
+ - pass writableStream parameter to workflow execution ([#9139](https://github.com/mastra-ai/mastra/pull/9139))
541
+
542
+ - Remove tools passed to the Routing Agent in .network() ([#9374](https://github.com/mastra-ai/mastra/pull/9374))
543
+
544
+ - Fix agent network iteration counter bug causing infinite loops ([#9762](https://github.com/mastra-ai/mastra/pull/9762))
545
+
546
+ The iteration counter in agent networks was stuck at 0 due to a faulty ternary operator that treated 0 as falsy. This prevented `maxSteps` from working correctly, causing infinite loops when the routing agent kept selecting primitives instead of returning "none".
547
+
548
+ **Changes:**
549
+ - Fixed iteration counter logic in `loop/network/index.ts` from `(inputData.iteration ? inputData.iteration : -1) + 1` to `(inputData.iteration ?? -1) + 1`
550
+ - Changed initial iteration value from `0` to `-1` so first iteration correctly starts at 0
551
+ - Added `checkIterations()` helper to validate iteration counting in all network tests
552
+
553
+ Fixes #9314
554
+
555
+ - Fix types from ai v4 ([#9818](https://github.com/mastra-ai/mastra/pull/9818))
556
+
557
+ - Save correct status in snapshot for all workflow parallel steps. ([#9379](https://github.com/mastra-ai/mastra/pull/9379))
558
+ This ensures when you poll workflow run result using `getWorkflowRunExecutionResult(runId)`, you get the right status for all parallel steps
559
+
560
+ - Prevent changing workflow status to suspended when some parallel steps are still running ([#9431](https://github.com/mastra-ai/mastra/pull/9431))
561
+
562
+ - Add ability to pass agent options when wrapping an agent with createStep. This allows configuring agent execution settings when using agents as workflow steps. ([#9199](https://github.com/mastra-ai/mastra/pull/9199))
563
+
564
+ - Fix MCP server registration ([#9802](https://github.com/mastra-ai/mastra/pull/9802))
565
+
566
+ - Fix network loop iteration counter and usage promise handling: ([#9408](https://github.com/mastra-ai/mastra/pull/9408))
567
+ - Fixed iteration counter in network loop that was stuck at 0 due to falsy check. Properly handled zero values to ensure maxSteps is correctly enforced.
568
+ - Fixed usage promise resolution in RunOutput stream by properly resolving or rejecting the promise on stream close, preventing hanging promises when streams complete.
569
+
570
+ - Remove `waitForEvent` from workflows. `waitForEvent` is now removed, please use suspend & resume flow instead. See https://mastra.ai/en/docs/workflows/suspend-and-resume for more details on suspend & resume flow. ([#9214](https://github.com/mastra-ai/mastra/pull/9214))
571
+
572
+ - Workflow validation zod v4 support ([#9319](https://github.com/mastra-ai/mastra/pull/9319))
573
+
574
+ - Use memory mock in server tests ([#9486](https://github.com/mastra-ai/mastra/pull/9486))
575
+
576
+ - Fix network routing agent smoothstreaming ([#9247](https://github.com/mastra-ai/mastra/pull/9247))
577
+
578
+ - Remove format from stream/generate ([#9577](https://github.com/mastra-ai/mastra/pull/9577))
579
+
580
+ - Fix agent network working memory tool routing. Memory tools are now included in routing agent instructions but excluded from its direct tool calls, allowing the routing agent to properly route to tool execution steps for memory updates. ([#9428](https://github.com/mastra-ai/mastra/pull/9428))
581
+
582
+ - Fix creating system messages from inside processors using processInput. ([#9469](https://github.com/mastra-ai/mastra/pull/9469))
583
+
584
+ - Fix usage tracking with agent network ([#9226](https://github.com/mastra-ai/mastra/pull/9226))
585
+
586
+ - Fix message conversion for incomplete client-side tool calls ([#9749](https://github.com/mastra-ai/mastra/pull/9749))
587
+
588
+ Fixed handling of `input-available` tool state in `sanitizeV5UIMessages()` to differentiate between two use cases:
589
+ 1. **Response messages FROM the LLM**: Keep `input-available` states (tool calls waiting for client-side execution) in `response.messages` for proper message history.
590
+ 2. **Prompt messages TO the LLM**: Filter out `input-available` states when sending historical messages back to the LLM, as these incomplete tool calls (without results) cause errors in the OpenAI Responses API.
591
+
592
+ The fix adds a `filterIncompleteToolCalls` parameter to control this behavior based on whether messages are being sent to or received from the LLM.
593
+
594
+ - Add `initialState` and `outputOptions` to run.stream() call. ([#9238](https://github.com/mastra-ai/mastra/pull/9238))
595
+
596
+ Example code
597
+
598
+ ```
599
+ const run = await workflow.createRunAsync();
600
+
601
+ const streamResult = run.stream({
602
+ inputData: {},
603
+ initialState: { value: 'test-state', otherValue: 'test-other-state' },
604
+ outputOptions: { includeState: true },
605
+ });
606
+ ```
607
+
608
+ Then the result from the stream will include the final state information
609
+
610
+ ```
611
+ const executionResult = await streamResult.result;
612
+ console.log(executionResult.state)
613
+ ```
614
+
615
+ - Updated dependencies [[`b9b7ffd`](https://github.com/mastra-ai/mastra/commit/b9b7ffdad6936a7d50b6b814b5bbe54e19087f66), [`dd1c38d`](https://github.com/mastra-ai/mastra/commit/dd1c38d1b75f1b695c27b40d8d9d6ed00d5e0f6f), [`83b08dc`](https://github.com/mastra-ai/mastra/commit/83b08dcf1bfcc915efab23c09207df90fa247908), [`f0f8f12`](https://github.com/mastra-ai/mastra/commit/f0f8f125c308f2d0fd36942ef652fd852df7522f), [`f111eac`](https://github.com/mastra-ai/mastra/commit/f111eac5de509b2e5fccfc1882e7f74cda264c74), [`51acef9`](https://github.com/mastra-ai/mastra/commit/51acef95b5977826594fe3ee24475842bd3d5780), [`eb09742`](https://github.com/mastra-ai/mastra/commit/eb09742197f66c4c38154c3beec78313e69760b2), [`354ad0b`](https://github.com/mastra-ai/mastra/commit/354ad0b7b1b8183ac567f236a884fc7ede6d7138), [`83d5942`](https://github.com/mastra-ai/mastra/commit/83d5942669ce7bba4a6ca4fd4da697a10eb5ebdc), [`a0c8c1b`](https://github.com/mastra-ai/mastra/commit/a0c8c1b87d4fee252aebda73e8637fbe01d761c9)]:
616
+ - @mastra/schema-compat@1.0.0-beta.0
617
+ - @mastra/observability@1.0.0-beta.0
273
618
 
274
619
  ## 0.22.2
275
620