@mastra/core 1.0.0-beta.5 → 1.0.0-beta.7

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 (421) hide show
  1. package/CHANGELOG.md +448 -0
  2. package/dist/agent/agent-legacy.d.ts +17 -20
  3. package/dist/agent/agent-legacy.d.ts.map +1 -1
  4. package/dist/agent/agent-types.test-d.d.ts +2 -0
  5. package/dist/agent/agent-types.test-d.d.ts.map +1 -0
  6. package/dist/agent/agent.d.ts +4 -4
  7. package/dist/agent/agent.d.ts.map +1 -1
  8. package/dist/agent/agent.types.d.ts +1 -1
  9. package/dist/agent/agent.types.d.ts.map +1 -1
  10. package/dist/agent/index.cjs +9 -9
  11. package/dist/agent/index.js +2 -2
  12. package/dist/agent/message-list/index.cjs +3 -3
  13. package/dist/agent/message-list/index.d.ts +49 -0
  14. package/dist/agent/message-list/index.d.ts.map +1 -1
  15. package/dist/agent/message-list/index.js +1 -1
  16. package/dist/agent/save-queue/index.d.ts +3 -1
  17. package/dist/agent/save-queue/index.d.ts.map +1 -1
  18. package/dist/agent/test-utils.d.ts +37 -0
  19. package/dist/agent/test-utils.d.ts.map +1 -1
  20. package/dist/agent/trip-wire.d.ts.map +1 -1
  21. package/dist/agent/types.d.ts +18 -3
  22. package/dist/agent/types.d.ts.map +1 -1
  23. package/dist/agent/utils.d.ts.map +1 -1
  24. package/dist/agent/workflows/prepare-stream/index.d.ts +10 -10
  25. package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
  26. package/dist/agent/workflows/prepare-stream/map-results-step.d.ts +1 -3
  27. package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
  28. package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts +4 -4
  29. package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts.map +1 -1
  30. package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts +4 -4
  31. package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts.map +1 -1
  32. package/dist/agent/workflows/prepare-stream/schema.d.ts +14 -14
  33. package/dist/agent/workflows/prepare-stream/schema.d.ts.map +1 -1
  34. package/dist/base.cjs +2 -2
  35. package/dist/base.js +1 -1
  36. package/dist/bundler/index.cjs +2 -2
  37. package/dist/bundler/index.js +1 -1
  38. package/dist/cache/index.cjs +3 -3
  39. package/dist/cache/index.js +1 -1
  40. package/dist/{chunk-556MJ7CL.cjs → chunk-26YAGTXK.cjs} +43 -37
  41. package/dist/chunk-26YAGTXK.cjs.map +1 -0
  42. package/dist/{chunk-OJNJA5ZI.js → chunk-3CKZSDTQ.js} +3 -3
  43. package/dist/{chunk-OJNJA5ZI.js.map → chunk-3CKZSDTQ.js.map} +1 -1
  44. package/dist/{chunk-E7K4FTLN.cjs → chunk-3EYBRHB2.cjs} +18 -2
  45. package/dist/chunk-3EYBRHB2.cjs.map +1 -0
  46. package/dist/{chunk-X7F4CSGR.cjs → chunk-3JA6VPNM.cjs} +2 -2
  47. package/dist/chunk-3JA6VPNM.cjs.map +1 -0
  48. package/dist/{chunk-TQTAMPSC.js → chunk-3N3QE4ZK.js} +3 -3
  49. package/dist/chunk-3N3QE4ZK.js.map +1 -0
  50. package/dist/{chunk-BMAFVZ2D.cjs → chunk-4AP234N6.cjs} +4 -4
  51. package/dist/{chunk-BMAFVZ2D.cjs.map → chunk-4AP234N6.cjs.map} +1 -1
  52. package/dist/{chunk-XIDKHXNR.js → chunk-4F6RAJFU.js} +33 -6
  53. package/dist/chunk-4F6RAJFU.js.map +1 -0
  54. package/dist/{chunk-B5J5HYDN.js → chunk-4GTU7MB2.js} +160 -8
  55. package/dist/chunk-4GTU7MB2.js.map +1 -0
  56. package/dist/{chunk-ISMGVGUM.cjs → chunk-4JKEUSCC.cjs} +4 -4
  57. package/dist/{chunk-ISMGVGUM.cjs.map → chunk-4JKEUSCC.cjs.map} +1 -1
  58. package/dist/{chunk-KJIQGPQR.js → chunk-5T53HHNP.js} +24 -10
  59. package/dist/chunk-5T53HHNP.js.map +1 -0
  60. package/dist/{chunk-CBAB7GOD.cjs → chunk-6BJ7XHRH.cjs} +2 -2
  61. package/dist/{chunk-CBAB7GOD.cjs.map → chunk-6BJ7XHRH.cjs.map} +1 -1
  62. package/dist/{chunk-RROQ46B6.cjs → chunk-6C2PU6J4.cjs} +31 -47
  63. package/dist/chunk-6C2PU6J4.cjs.map +1 -0
  64. package/dist/{chunk-J7O6WENZ.cjs → chunk-6TBWJV35.js} +5 -5
  65. package/dist/chunk-6TBWJV35.js.map +1 -0
  66. package/dist/{chunk-DSNPWVIG.cjs → chunk-AF74UXR5.cjs} +4 -3
  67. package/dist/chunk-AF74UXR5.cjs.map +1 -0
  68. package/dist/chunk-AZQMPE7G.cjs +4981 -0
  69. package/dist/chunk-AZQMPE7G.cjs.map +1 -0
  70. package/dist/{chunk-HNHZGFZY.cjs → chunk-CZEJQSWB.cjs} +10 -2
  71. package/dist/chunk-CZEJQSWB.cjs.map +1 -0
  72. package/dist/{chunk-KEXGB7FK.cjs → chunk-DGV2FWB4.cjs} +7 -7
  73. package/dist/{chunk-KEXGB7FK.cjs.map → chunk-DGV2FWB4.cjs.map} +1 -1
  74. package/dist/{chunk-YDFX3JR2.js → chunk-DMPHPHMU.js} +174 -12
  75. package/dist/chunk-DMPHPHMU.js.map +1 -0
  76. package/dist/{chunk-76K3IYWM.js → chunk-EE5NIGJ4.js} +3 -3
  77. package/dist/{chunk-76K3IYWM.js.map → chunk-EE5NIGJ4.js.map} +1 -1
  78. package/dist/{chunk-Y63IFHEZ.cjs → chunk-EOPEDKLG.cjs} +4 -4
  79. package/dist/chunk-EOPEDKLG.cjs.map +1 -0
  80. package/dist/{chunk-T2CJRA6E.js → chunk-EPMSC67U.js} +145 -19
  81. package/dist/chunk-EPMSC67U.js.map +1 -0
  82. package/dist/{chunk-NZAXAFI3.js → chunk-F2GAJSBI.js} +3 -3
  83. package/dist/{chunk-NZAXAFI3.js.map → chunk-F2GAJSBI.js.map} +1 -1
  84. package/dist/{chunk-5O52O25J.js → chunk-F54IK3GJ.js} +2 -2
  85. package/dist/chunk-F54IK3GJ.js.map +1 -0
  86. package/dist/{chunk-KIZIOFZC.js → chunk-FNSFXWDN.js} +17 -3
  87. package/dist/chunk-FNSFXWDN.js.map +1 -0
  88. package/dist/{chunk-ZTTMSCLU.js → chunk-G32WDDGV.js} +85 -9
  89. package/dist/chunk-G32WDDGV.js.map +1 -0
  90. package/dist/{chunk-5SA2EZ33.js → chunk-GZ6MCDK2.js} +147 -15
  91. package/dist/chunk-GZ6MCDK2.js.map +1 -0
  92. package/dist/{chunk-NHP6ZIDG.cjs → chunk-HJNEZRI4.cjs} +28 -174
  93. package/dist/chunk-HJNEZRI4.cjs.map +1 -0
  94. package/dist/{chunk-S6URFGCZ.js → chunk-LSHPJWM5.js} +3 -3
  95. package/dist/{chunk-S6URFGCZ.js.map → chunk-LSHPJWM5.js.map} +1 -1
  96. package/dist/{chunk-XJQX54QP.cjs → chunk-M7CQULF7.cjs} +97 -16
  97. package/dist/chunk-M7CQULF7.cjs.map +1 -0
  98. package/dist/{chunk-D7CJ4HIQ.js → chunk-NAKPEQEQ.js} +10 -156
  99. package/dist/chunk-NAKPEQEQ.js.map +1 -0
  100. package/dist/{chunk-KJ2SW6VA.js → chunk-NRUZYMHE.js} +4 -3
  101. package/dist/chunk-NRUZYMHE.js.map +1 -0
  102. package/dist/{chunk-KWWD3U7G.cjs → chunk-PJ7AYWAX.cjs} +155 -29
  103. package/dist/chunk-PJ7AYWAX.cjs.map +1 -0
  104. package/dist/{chunk-7ZADRRDW.js → chunk-PK2A5WBG.js} +3 -3
  105. package/dist/chunk-PK2A5WBG.js.map +1 -0
  106. package/dist/{chunk-XBO6W7LZ.js → chunk-POM7FCH5.js} +6166 -4133
  107. package/dist/chunk-POM7FCH5.js.map +1 -0
  108. package/dist/{chunk-X7JMA3IY.js → chunk-PSCMWPLC.js} +2 -2
  109. package/dist/{chunk-X7JMA3IY.js.map → chunk-PSCMWPLC.js.map} +1 -1
  110. package/dist/{chunk-KP42JLXE.cjs → chunk-RBBEMTMA.cjs} +6199 -4154
  111. package/dist/chunk-RBBEMTMA.cjs.map +1 -0
  112. package/dist/chunk-TLLXRG2Z.js +4959 -0
  113. package/dist/chunk-TLLXRG2Z.js.map +1 -0
  114. package/dist/{chunk-SVLMF4UZ.cjs → chunk-TQB2HMEC.cjs} +45 -44
  115. package/dist/chunk-TQB2HMEC.cjs.map +1 -0
  116. package/dist/{chunk-Y6ROD72V.cjs → chunk-UIGRFDO6.cjs} +4 -4
  117. package/dist/{chunk-Y6ROD72V.cjs.map → chunk-UIGRFDO6.cjs.map} +1 -1
  118. package/dist/{chunk-PC6EKOWK.js → chunk-URBPEE67.js} +19 -31
  119. package/dist/chunk-URBPEE67.js.map +1 -0
  120. package/dist/{chunk-VYJXTHII.cjs → chunk-URMN7TTH.cjs} +148 -16
  121. package/dist/chunk-URMN7TTH.cjs.map +1 -0
  122. package/dist/{chunk-GRBGQ2GE.js → chunk-UVHSM2GU.cjs} +9 -3
  123. package/dist/chunk-UVHSM2GU.cjs.map +1 -0
  124. package/dist/{chunk-U3VE2EVB.cjs → chunk-VBKMNIWK.cjs} +30 -16
  125. package/dist/chunk-VBKMNIWK.cjs.map +1 -0
  126. package/dist/{chunk-V537VSV4.cjs → chunk-Y24HI6ND.cjs} +37 -10
  127. package/dist/chunk-Y24HI6ND.cjs.map +1 -0
  128. package/dist/{chunk-DQIZ5FFX.cjs → chunk-YBEW5YWC.cjs} +177 -15
  129. package/dist/chunk-YBEW5YWC.cjs.map +1 -0
  130. package/dist/{chunk-OUUPUAGA.cjs → chunk-YUXTDKYN.cjs} +168 -15
  131. package/dist/chunk-YUXTDKYN.cjs.map +1 -0
  132. package/dist/{chunk-IITXXVYI.cjs → chunk-YWMMBIOM.cjs} +10 -10
  133. package/dist/{chunk-IITXXVYI.cjs.map → chunk-YWMMBIOM.cjs.map} +1 -1
  134. package/dist/{chunk-3B2OPLGG.js → chunk-Z4Y554NX.js} +13 -7
  135. package/dist/chunk-Z4Y554NX.js.map +1 -0
  136. package/dist/{chunk-3ZQ7LX73.js → chunk-Z57R5WS4.js} +4 -4
  137. package/dist/{chunk-3ZQ7LX73.js.map → chunk-Z57R5WS4.js.map} +1 -1
  138. package/dist/{chunk-QM5SRDJX.js → chunk-ZUWJCGLM.js} +5 -4
  139. package/dist/chunk-ZUWJCGLM.js.map +1 -0
  140. package/dist/deployer/index.cjs +2 -2
  141. package/dist/deployer/index.js +1 -1
  142. package/dist/di/index.cjs +10 -2
  143. package/dist/di/index.d.ts +1 -1
  144. package/dist/di/index.d.ts.map +1 -1
  145. package/dist/di/index.js +1 -1
  146. package/dist/evals/base.d.ts +9 -1
  147. package/dist/evals/base.d.ts.map +1 -1
  148. package/dist/evals/index.cjs +9 -9
  149. package/dist/evals/index.js +2 -2
  150. package/dist/evals/scoreTraces/index.cjs +5 -5
  151. package/dist/evals/scoreTraces/index.js +2 -2
  152. package/dist/evals/types.d.ts +8 -8
  153. package/dist/index.cjs +2 -2
  154. package/dist/index.js +1 -1
  155. package/dist/integration/index.cjs +2 -2
  156. package/dist/integration/index.js +1 -1
  157. package/dist/llm/index.cjs +15 -15
  158. package/dist/llm/index.js +5 -5
  159. package/dist/llm/model/aisdk/v5/model.d.ts.map +1 -1
  160. package/dist/llm/model/gateways/constants.d.ts.map +1 -1
  161. package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
  162. package/dist/llm/model/model.d.ts.map +1 -1
  163. package/dist/llm/model/model.loop.d.ts +1 -1
  164. package/dist/llm/model/model.loop.d.ts.map +1 -1
  165. package/dist/llm/model/provider-options.d.ts +4 -1
  166. package/dist/llm/model/provider-options.d.ts.map +1 -1
  167. package/dist/llm/model/provider-registry.d.ts.map +1 -1
  168. package/dist/llm/model/provider-types.generated.d.ts +39 -1
  169. package/dist/logger/constants.d.ts +1 -0
  170. package/dist/logger/constants.d.ts.map +1 -1
  171. package/dist/logger/index.cjs +11 -11
  172. package/dist/logger/index.js +2 -2
  173. package/dist/logger/transport.d.ts +1 -1
  174. package/dist/logger/transport.d.ts.map +1 -1
  175. package/dist/loop/index.cjs +2 -2
  176. package/dist/loop/index.js +1 -1
  177. package/dist/loop/loop.d.ts.map +1 -1
  178. package/dist/loop/network/index.d.ts +2 -2
  179. package/dist/loop/network/index.d.ts.map +1 -1
  180. package/dist/loop/test-utils/fullStream.d.ts.map +1 -1
  181. package/dist/loop/types.d.ts +5 -2
  182. package/dist/loop/types.d.ts.map +1 -1
  183. package/dist/loop/workflows/agentic-execution/index.d.ts +96 -96
  184. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +65 -65
  185. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
  186. package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +32 -32
  187. package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts.map +1 -1
  188. package/dist/loop/workflows/agentic-loop/index.d.ts +97 -97
  189. package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
  190. package/dist/loop/workflows/schema.d.ts +32 -32
  191. package/dist/loop/workflows/stream.d.ts +1 -1
  192. package/dist/loop/workflows/stream.d.ts.map +1 -1
  193. package/dist/mastra/index.cjs +2 -2
  194. package/dist/mastra/index.d.ts +55 -0
  195. package/dist/mastra/index.d.ts.map +1 -1
  196. package/dist/mastra/index.js +1 -1
  197. package/dist/mcp/index.cjs +4 -4
  198. package/dist/mcp/index.js +2 -2
  199. package/dist/memory/index.cjs +21 -382
  200. package/dist/memory/index.cjs.map +1 -1
  201. package/dist/memory/index.js +1 -382
  202. package/dist/memory/index.js.map +1 -1
  203. package/dist/memory/memory.d.ts +22 -18
  204. package/dist/memory/memory.d.ts.map +1 -1
  205. package/dist/memory/mock.d.ts +6 -1
  206. package/dist/memory/mock.d.ts.map +1 -1
  207. package/dist/memory/types.d.ts +69 -11
  208. package/dist/memory/types.d.ts.map +1 -1
  209. package/dist/models-dev-6GD3644V.js +3 -0
  210. package/dist/{models-dev-F6MTIYTO.js.map → models-dev-6GD3644V.js.map} +1 -1
  211. package/dist/models-dev-IUQBXJSS.cjs +12 -0
  212. package/dist/{models-dev-XIVR5EJV.cjs.map → models-dev-IUQBXJSS.cjs.map} +1 -1
  213. package/dist/netlify-GXJ5D5DD.js +3 -0
  214. package/dist/{netlify-RX3JXCFQ.js.map → netlify-GXJ5D5DD.js.map} +1 -1
  215. package/dist/netlify-KJLY3GFS.cjs +12 -0
  216. package/dist/{netlify-MXBOGAJR.cjs.map → netlify-KJLY3GFS.cjs.map} +1 -1
  217. package/dist/observability/index.cjs +16 -8
  218. package/dist/observability/index.js +1 -1
  219. package/dist/observability/types/tracing.d.ts +183 -3
  220. package/dist/observability/types/tracing.d.ts.map +1 -1
  221. package/dist/observability/utils.d.ts +47 -1
  222. package/dist/observability/utils.d.ts.map +1 -1
  223. package/dist/processors/index.cjs +35 -11
  224. package/dist/processors/index.d.ts +99 -21
  225. package/dist/processors/index.d.ts.map +1 -1
  226. package/dist/processors/index.js +1 -1
  227. package/dist/processors/memory/index.d.ts +7 -0
  228. package/dist/processors/memory/index.d.ts.map +1 -0
  229. package/dist/processors/memory/message-history.d.ts +43 -0
  230. package/dist/processors/memory/message-history.d.ts.map +1 -0
  231. package/dist/processors/memory/semantic-recall.d.ts +152 -0
  232. package/dist/processors/memory/semantic-recall.d.ts.map +1 -0
  233. package/dist/processors/memory/working-memory.d.ts +65 -0
  234. package/dist/processors/memory/working-memory.d.ts.map +1 -0
  235. package/dist/processors/processors/index.d.ts +2 -1
  236. package/dist/processors/processors/index.d.ts.map +1 -1
  237. package/dist/processors/processors/language-detector.d.ts +14 -0
  238. package/dist/processors/processors/language-detector.d.ts.map +1 -1
  239. package/dist/processors/processors/moderation.d.ts +14 -0
  240. package/dist/processors/processors/moderation.d.ts.map +1 -1
  241. package/dist/processors/processors/pii-detector.d.ts +14 -0
  242. package/dist/processors/processors/pii-detector.d.ts.map +1 -1
  243. package/dist/processors/processors/prompt-injection-detector.d.ts +14 -0
  244. package/dist/processors/processors/prompt-injection-detector.d.ts.map +1 -1
  245. package/dist/processors/processors/structured-output.d.ts +2 -1
  246. package/dist/processors/processors/structured-output.d.ts.map +1 -1
  247. package/dist/processors/processors/token-limiter.d.ts +21 -11
  248. package/dist/processors/processors/token-limiter.d.ts.map +1 -1
  249. package/dist/processors/processors/tool-call-filter.d.ts +28 -0
  250. package/dist/processors/processors/tool-call-filter.d.ts.map +1 -0
  251. package/dist/processors/runner.d.ts +35 -4
  252. package/dist/processors/runner.d.ts.map +1 -1
  253. package/dist/provider-registry-7IFOXWPR.cjs +40 -0
  254. package/dist/{provider-registry-NBRXBOQT.cjs.map → provider-registry-7IFOXWPR.cjs.map} +1 -1
  255. package/dist/provider-registry-ZTMZMTVV.js +3 -0
  256. package/dist/{provider-registry-3LUCE7FT.js.map → provider-registry-ZTMZMTVV.js.map} +1 -1
  257. package/dist/provider-registry.json +111 -6
  258. package/dist/{registry-generator-DEPPRYYJ.cjs → registry-generator-34SC4TAU.cjs} +2 -2
  259. package/dist/registry-generator-34SC4TAU.cjs.map +1 -0
  260. package/dist/{registry-generator-FLW6NV42.js → registry-generator-UMTNPBJX.js} +2 -2
  261. package/dist/registry-generator-UMTNPBJX.js.map +1 -0
  262. package/dist/relevance/index.cjs +2 -2
  263. package/dist/relevance/index.js +1 -1
  264. package/dist/request-context/index.cjs +10 -2
  265. package/dist/request-context/index.d.ts +26 -0
  266. package/dist/request-context/index.d.ts.map +1 -1
  267. package/dist/request-context/index.js +1 -1
  268. package/dist/server/base.d.ts +51 -0
  269. package/dist/server/base.d.ts.map +1 -0
  270. package/dist/server/index.cjs +81 -2
  271. package/dist/server/index.cjs.map +1 -1
  272. package/dist/server/index.d.ts +3 -0
  273. package/dist/server/index.d.ts.map +1 -1
  274. package/dist/server/index.js +79 -2
  275. package/dist/server/index.js.map +1 -1
  276. package/dist/server/simple-auth.d.ts +27 -0
  277. package/dist/server/simple-auth.d.ts.map +1 -0
  278. package/dist/storage/base.d.ts +22 -1
  279. package/dist/storage/base.d.ts.map +1 -1
  280. package/dist/storage/domains/memory/inmemory.d.ts.map +1 -1
  281. package/dist/storage/index.cjs +49 -29
  282. package/dist/storage/index.js +1 -1
  283. package/dist/storage/storageWithInit.d.ts.map +1 -1
  284. package/dist/storage/types.d.ts +1 -1
  285. package/dist/storage/types.d.ts.map +1 -1
  286. package/dist/storage/utils.d.ts +82 -0
  287. package/dist/storage/utils.d.ts.map +1 -1
  288. package/dist/stream/MastraAgentNetworkStream.d.ts +1 -1
  289. package/dist/stream/MastraAgentNetworkStream.d.ts.map +1 -1
  290. package/dist/stream/MastraWorkflowStream.d.ts +1 -1
  291. package/dist/stream/MastraWorkflowStream.d.ts.map +1 -1
  292. package/dist/stream/RunOutput.d.ts +2 -2
  293. package/dist/stream/RunOutput.d.ts.map +1 -1
  294. package/dist/stream/aisdk/v5/execute.d.ts +3 -2
  295. package/dist/stream/aisdk/v5/execute.d.ts.map +1 -1
  296. package/dist/stream/aisdk/v5/input.d.ts +4 -1
  297. package/dist/stream/aisdk/v5/input.d.ts.map +1 -1
  298. package/dist/stream/aisdk/v5/output.d.ts +1 -1
  299. package/dist/stream/aisdk/v5/output.d.ts.map +1 -1
  300. package/dist/stream/aisdk/v5/transform.d.ts.map +1 -1
  301. package/dist/stream/base/base.d.ts +1 -1
  302. package/dist/stream/base/base.d.ts.map +1 -1
  303. package/dist/stream/base/output-format-handlers.d.ts +1 -1
  304. package/dist/stream/base/output-format-handlers.d.ts.map +1 -1
  305. package/dist/stream/base/output.d.ts +1 -1
  306. package/dist/stream/base/output.d.ts.map +1 -1
  307. package/dist/stream/index.cjs +11 -11
  308. package/dist/stream/index.js +2 -2
  309. package/dist/stream/types.d.ts +2 -0
  310. package/dist/stream/types.d.ts.map +1 -1
  311. package/dist/test-utils/llm-mock.cjs +44 -10
  312. package/dist/test-utils/llm-mock.cjs.map +1 -1
  313. package/dist/test-utils/llm-mock.d.ts +3 -0
  314. package/dist/test-utils/llm-mock.d.ts.map +1 -1
  315. package/dist/test-utils/llm-mock.js +36 -6
  316. package/dist/test-utils/llm-mock.js.map +1 -1
  317. package/dist/tools/index.cjs +6 -6
  318. package/dist/tools/index.js +2 -2
  319. package/dist/tools/is-vercel-tool.cjs +2 -2
  320. package/dist/tools/is-vercel-tool.js +1 -1
  321. package/dist/tools/stream.d.ts +18 -2
  322. package/dist/tools/stream.d.ts.map +1 -1
  323. package/dist/tools/tool-builder/builder.d.ts.map +1 -1
  324. package/dist/tools/tool.d.ts +13 -0
  325. package/dist/tools/tool.d.ts.map +1 -1
  326. package/dist/tools/types.d.ts +24 -3
  327. package/dist/tools/types.d.ts.map +1 -1
  328. package/dist/tools/validation.d.ts +1 -1
  329. package/dist/tools/validation.d.ts.map +1 -1
  330. package/dist/tts/index.cjs +2 -2
  331. package/dist/tts/index.js +1 -1
  332. package/dist/utils.cjs +22 -22
  333. package/dist/utils.d.ts +1 -1
  334. package/dist/utils.d.ts.map +1 -1
  335. package/dist/utils.js +1 -1
  336. package/dist/vector/index.cjs +4 -4
  337. package/dist/vector/index.js +2 -2
  338. package/dist/voice/index.cjs +6 -6
  339. package/dist/voice/index.js +1 -1
  340. package/dist/workflows/default.d.ts +176 -281
  341. package/dist/workflows/default.d.ts.map +1 -1
  342. package/dist/workflows/evented/index.cjs +10 -10
  343. package/dist/workflows/evented/index.js +1 -1
  344. package/dist/workflows/evented/step-executor.d.ts +1 -1
  345. package/dist/workflows/evented/step-executor.d.ts.map +1 -1
  346. package/dist/workflows/execution-engine.d.ts +4 -2
  347. package/dist/workflows/execution-engine.d.ts.map +1 -1
  348. package/dist/workflows/handlers/control-flow.d.ts +135 -0
  349. package/dist/workflows/handlers/control-flow.d.ts.map +1 -0
  350. package/dist/workflows/handlers/entry.d.ts +45 -0
  351. package/dist/workflows/handlers/entry.d.ts.map +1 -0
  352. package/dist/workflows/handlers/sleep.d.ts +62 -0
  353. package/dist/workflows/handlers/sleep.d.ts.map +1 -0
  354. package/dist/workflows/handlers/step.d.ts +60 -0
  355. package/dist/workflows/handlers/step.d.ts.map +1 -0
  356. package/dist/workflows/index.cjs +20 -20
  357. package/dist/workflows/index.js +1 -1
  358. package/dist/workflows/step.d.ts +2 -2
  359. package/dist/workflows/step.d.ts.map +1 -1
  360. package/dist/workflows/types.d.ts +158 -3
  361. package/dist/workflows/types.d.ts.map +1 -1
  362. package/dist/workflows/workflow.d.ts +8 -6
  363. package/dist/workflows/workflow.d.ts.map +1 -1
  364. package/package.json +8 -5
  365. package/src/llm/model/provider-types.generated.d.ts +39 -1
  366. package/dist/chunk-3B2OPLGG.js.map +0 -1
  367. package/dist/chunk-3PSWNGBF.js +0 -3
  368. package/dist/chunk-3PSWNGBF.js.map +0 -1
  369. package/dist/chunk-436FFEF6.js +0 -34
  370. package/dist/chunk-436FFEF6.js.map +0 -1
  371. package/dist/chunk-556MJ7CL.cjs.map +0 -1
  372. package/dist/chunk-5O52O25J.js.map +0 -1
  373. package/dist/chunk-5SA2EZ33.js.map +0 -1
  374. package/dist/chunk-7ZADRRDW.js.map +0 -1
  375. package/dist/chunk-B5J5HYDN.js.map +0 -1
  376. package/dist/chunk-D7CJ4HIQ.js.map +0 -1
  377. package/dist/chunk-DQIZ5FFX.cjs.map +0 -1
  378. package/dist/chunk-DSNPWVIG.cjs.map +0 -1
  379. package/dist/chunk-E7K4FTLN.cjs.map +0 -1
  380. package/dist/chunk-GRBGQ2GE.js.map +0 -1
  381. package/dist/chunk-HNHZGFZY.cjs.map +0 -1
  382. package/dist/chunk-J7O6WENZ.cjs.map +0 -1
  383. package/dist/chunk-KIZIOFZC.js.map +0 -1
  384. package/dist/chunk-KJ2SW6VA.js.map +0 -1
  385. package/dist/chunk-KJIQGPQR.js.map +0 -1
  386. package/dist/chunk-KP42JLXE.cjs.map +0 -1
  387. package/dist/chunk-KWWD3U7G.cjs.map +0 -1
  388. package/dist/chunk-NHP6ZIDG.cjs.map +0 -1
  389. package/dist/chunk-OUUPUAGA.cjs.map +0 -1
  390. package/dist/chunk-PC6EKOWK.js.map +0 -1
  391. package/dist/chunk-PE3V7GUL.cjs +0 -4
  392. package/dist/chunk-PE3V7GUL.cjs.map +0 -1
  393. package/dist/chunk-QGWNF2QJ.cjs +0 -1697
  394. package/dist/chunk-QGWNF2QJ.cjs.map +0 -1
  395. package/dist/chunk-QM5SRDJX.js.map +0 -1
  396. package/dist/chunk-RROQ46B6.cjs.map +0 -1
  397. package/dist/chunk-SVLMF4UZ.cjs.map +0 -1
  398. package/dist/chunk-T2CJRA6E.js.map +0 -1
  399. package/dist/chunk-T2UNO766.js +0 -1694
  400. package/dist/chunk-T2UNO766.js.map +0 -1
  401. package/dist/chunk-TQTAMPSC.js.map +0 -1
  402. package/dist/chunk-U3VE2EVB.cjs.map +0 -1
  403. package/dist/chunk-V3VLOOSW.cjs +0 -36
  404. package/dist/chunk-V3VLOOSW.cjs.map +0 -1
  405. package/dist/chunk-V537VSV4.cjs.map +0 -1
  406. package/dist/chunk-VYJXTHII.cjs.map +0 -1
  407. package/dist/chunk-X7F4CSGR.cjs.map +0 -1
  408. package/dist/chunk-XBO6W7LZ.js.map +0 -1
  409. package/dist/chunk-XIDKHXNR.js.map +0 -1
  410. package/dist/chunk-XJQX54QP.cjs.map +0 -1
  411. package/dist/chunk-Y63IFHEZ.cjs.map +0 -1
  412. package/dist/chunk-YDFX3JR2.js.map +0 -1
  413. package/dist/chunk-ZTTMSCLU.js.map +0 -1
  414. package/dist/models-dev-F6MTIYTO.js +0 -3
  415. package/dist/models-dev-XIVR5EJV.cjs +0 -12
  416. package/dist/netlify-MXBOGAJR.cjs +0 -12
  417. package/dist/netlify-RX3JXCFQ.js +0 -3
  418. package/dist/provider-registry-3LUCE7FT.js +0 -3
  419. package/dist/provider-registry-NBRXBOQT.cjs +0 -40
  420. package/dist/registry-generator-DEPPRYYJ.cjs.map +0 -1
  421. package/dist/registry-generator-FLW6NV42.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,453 @@
1
1
  # @mastra/core
2
2
 
3
+ ## 1.0.0-beta.7
4
+
5
+ ### Minor Changes
6
+
7
+ - Add `disableInit` option to all storage adapters ([#10851](https://github.com/mastra-ai/mastra/pull/10851))
8
+
9
+ 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.
10
+
11
+ ```typescript
12
+ // CI/CD script - run migrations
13
+ const storage = new PostgresStore({
14
+ connectionString: DATABASE_URL,
15
+ id: 'pg-storage',
16
+ });
17
+ await storage.init();
18
+
19
+ // Runtime - skip auto-init
20
+ const storage = new PostgresStore({
21
+ connectionString: DATABASE_URL,
22
+ id: 'pg-storage',
23
+ disableInit: true,
24
+ });
25
+ ```
26
+
27
+ ### Patch Changes
28
+
29
+ - Add time-to-first-token (TTFT) support for Langfuse integration ([#10781](https://github.com/mastra-ai/mastra/pull/10781))
30
+
31
+ 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.
32
+
33
+ ```typescript
34
+ // completionStartTime is now automatically captured and sent to Langfuse
35
+ // enabling TTFT metrics in your Langfuse dashboard
36
+ const result = await agent.stream('Hello');
37
+ ```
38
+
39
+ - 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))
40
+ https://github.com/open-telemetry/semantic-conventions/blob/v1.38.0/docs/gen-ai/README.md
41
+
42
+ - 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))
43
+
44
+ - fix: generate unique text IDs for Anthropic/Google providers ([#10740](https://github.com/mastra-ai/mastra/pull/10740))
45
+
46
+ Workaround for duplicate text-start/text-end IDs in multi-step agentic flows.
47
+
48
+ 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.
49
+
50
+ 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.
51
+
52
+ Related: #9909
53
+
54
+ - Fix sub-agent requestContext propagation in listAgentTools ([#10844](https://github.com/mastra-ai/mastra/pull/10844))
55
+
56
+ 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.
57
+
58
+ No code changes required for consumers - this fix restores expected behavior for dynamic model configurations in sub-agents.
59
+
60
+ - Fix ToolStream type error when piping streams with different types ([#10845](https://github.com/mastra-ai/mastra/pull/10845))
61
+
62
+ 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.
63
+
64
+ Before:
65
+
66
+ ```typescript
67
+ // TypeError: ToolStream<ChunkType> is not assignable to WritableStream<Partial<StoryPlan>>
68
+ await response.objectStream.pipeTo(writer);
69
+ ```
70
+
71
+ After:
72
+
73
+ ```typescript
74
+ // Works without type errors
75
+ await response.objectStream.pipeTo(writer);
76
+ ```
77
+
78
+ - feat: add native Perplexity provider support ([#10885](https://github.com/mastra-ai/mastra/pull/10885))
79
+
80
+ - 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))
81
+
82
+ **Before:**
83
+
84
+ ```ts
85
+ threadObject = await memory.createThread({
86
+ // ...
87
+ saveThread: false, // thread not in DB yet
88
+ });
89
+ // Later: MessageHistory calls saveMessages() -> PostgresStore throws "Thread not found"
90
+ ```
91
+
92
+ **After:**
93
+
94
+ ```ts
95
+ threadObject = await memory.createThread({
96
+ // ...
97
+ saveThread: true, // thread persisted immediately
98
+ });
99
+ // MessageHistory can now save messages without error
100
+ ```
101
+
102
+ - Emit error chunk and call onError when agent workflow step fails ([#10907](https://github.com/mastra-ai/mastra/pull/10907))
103
+
104
+ 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.
105
+
106
+ - fix(core): use agent description when converting agent to tool ([#10879](https://github.com/mastra-ai/mastra/pull/10879))
107
+
108
+ - Adds native @ai-sdk/deepseek provider support instead of using the OpenAI-compatible fallback. ([#10822](https://github.com/mastra-ai/mastra/pull/10822))
109
+
110
+ ```typescript
111
+ const agent = new Agent({
112
+ model: 'deepseek/deepseek-reasoner',
113
+ });
114
+
115
+ // With provider options for reasoning
116
+ const response = await agent.generate('Solve this problem', {
117
+ providerOptions: {
118
+ deepseek: {
119
+ thinking: { type: 'enabled' },
120
+ },
121
+ },
122
+ });
123
+ ```
124
+
125
+ Also updates the doc generation scripts so DeepSeek provider options show up in the generated docs.
126
+
127
+ - Return state too if `includeState: true` is in `outputOptions` and workflow run is not successful ([#10806](https://github.com/mastra-ai/mastra/pull/10806))
128
+
129
+ - feat: Add partial response support for agent and workflow list endpoints ([#10886](https://github.com/mastra-ai/mastra/pull/10886))
130
+
131
+ Add optional `partial` query parameter to `/api/agents` and `/api/workflows` endpoints to return minimal data without schemas, reducing payload size for list views:
132
+ - When `partial=true`: tool schemas (inputSchema, outputSchema) are omitted
133
+ - When `partial=true`: workflow steps are replaced with stepCount integer
134
+ - When `partial=true`: workflow root schemas (inputSchema, outputSchema) are omitted
135
+ - Maintains backward compatibility when partial parameter is not provided
136
+
137
+ ## Server Endpoint Usage
138
+
139
+ ```http
140
+ # Get partial agent data (no tool schemas)
141
+ GET /api/agents?partial=true
142
+
143
+ # Get full agent data (default behavior)
144
+ GET /api/agents
145
+
146
+ # Get partial workflow data (stepCount instead of steps, no schemas)
147
+ GET /api/workflows?partial=true
148
+
149
+ # Get full workflow data (default behavior)
150
+ GET /api/workflows
151
+ ```
152
+
153
+ ## Client SDK Usage
154
+
155
+ ```typescript
156
+ import { MastraClient } from '@mastra/client-js';
157
+
158
+ const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
159
+
160
+ // Get partial agent list (smaller payload)
161
+ const partialAgents = await client.listAgents({ partial: true });
162
+
163
+ // Get full agent list with tool schemas
164
+ const fullAgents = await client.listAgents();
165
+
166
+ // Get partial workflow list (smaller payload)
167
+ const partialWorkflows = await client.listWorkflows({ partial: true });
168
+
169
+ // Get full workflow list with steps and schemas
170
+ const fullWorkflows = await client.listWorkflows();
171
+ ```
172
+
173
+ - Fix processInputStep so it runs correctly. ([#10909](https://github.com/mastra-ai/mastra/pull/10909))
174
+
175
+ - 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)]:
176
+ - @mastra/observability@1.0.0-beta.3
177
+
178
+ ## 1.0.0-beta.6
179
+
180
+ ### Major Changes
181
+
182
+ - Changed `.branch()` result schema to make all branch output fields optional. ([#10693](https://github.com/mastra-ai/mastra/pull/10693))
183
+
184
+ **Breaking change**: Branch outputs are now optional since only one branch executes at runtime. Update your workflow schemas to handle optional branch results.
185
+
186
+ **Before:**
187
+
188
+ ```typescript
189
+ const workflow = createWorkflow({...})
190
+ .branch([
191
+ [condition1, stepA], // outputSchema: { result: z.string() }
192
+ [condition2, stepB], // outputSchema: { data: z.number() }
193
+ ])
194
+ .map({
195
+ finalResult: { step: stepA, path: 'result' } // Expected non-optional
196
+ });
197
+ ```
198
+
199
+ **After:**
200
+
201
+ ```typescript
202
+ const workflow = createWorkflow({...})
203
+ .branch([
204
+ [condition1, stepA],
205
+ [condition2, stepB],
206
+ ])
207
+ .map({
208
+ finalResult: {
209
+ step: stepA,
210
+ path: 'result' // Now optional - provide fallback
211
+ }
212
+ });
213
+ ```
214
+
215
+ **Why**: Branch conditionals execute only one path, so non-executed branches don't produce outputs. The type system now correctly reflects this runtime behavior.
216
+
217
+ Related issue: https://github.com/mastra-ai/mastra/issues/10642
218
+
219
+ ### Minor Changes
220
+
221
+ - 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))
222
+
223
+ - Add reserved keys in RequestContext for secure resourceId/threadId setting from middleware ([#10657](https://github.com/mastra-ai/mastra/pull/10657))
224
+
225
+ 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.
226
+
227
+ - feat(workflows): add suspendData parameter to step execute function ([#10734](https://github.com/mastra-ai/mastra/pull/10734))
228
+
229
+ 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.
230
+
231
+ **New Features:**
232
+ - `suspendData` parameter automatically populated in step execute function when resuming
233
+ - Type-safe access to suspend data matching the step's `suspendSchema`
234
+ - Backward compatible - existing workflows continue to work unchanged
235
+
236
+ **Example:**
237
+
238
+ ```typescript
239
+ const step = createStep({
240
+ suspendSchema: z.object({ reason: z.string() }),
241
+ resumeSchema: z.object({ approved: z.boolean() }),
242
+ execute: async ({ suspend, suspendData, resumeData }) => {
243
+ if (!resumeData?.approved) {
244
+ return await suspend({ reason: 'Approval required' });
245
+ }
246
+
247
+ // Access original suspend data when resuming
248
+ console.log(`Resuming after: ${suspendData?.reason}`);
249
+ return { result: 'Approved' };
250
+ },
251
+ });
252
+ ```
253
+
254
+ - feat(storage): support querying messages from multiple threads ([#10663](https://github.com/mastra-ai/mastra/pull/10663))
255
+ - Fixed TypeScript errors where `threadId: string | string[]` was being passed to places expecting `Scalar` type
256
+ - Added proper multi-thread support for `listMessages` across all adapters when `threadId` is an array
257
+ - Updated `_getIncludedMessages` to look up message threadId by ID (since message IDs are globally unique)
258
+ - **upstash**: Added `msg-idx:{messageId}` index for O(1) message lookups (backwards compatible with fallback to scan for old messages, with automatic backfill)
259
+
260
+ - Adds trace tagging support to the BrainTrust and Langfuse tracing exporters. ([#10765](https://github.com/mastra-ai/mastra/pull/10765))
261
+
262
+ - Add `messageList` parameter to `processOutputStream` for accessing remembered messages during streaming ([#10608](https://github.com/mastra-ai/mastra/pull/10608))
263
+
264
+ - Unify transformScoreRow functions across storage adapters ([#10648](https://github.com/mastra-ai/mastra/pull/10648))
265
+
266
+ 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:
267
+ - `preferredTimestampFields`: Preferred source fields for timestamps (PostgreSQL, Cloudflare D1)
268
+ - `convertTimestamps`: Convert timestamp strings to Date objects (MSSQL, MongoDB, ClickHouse)
269
+ - `nullValuePattern`: Skip values matching pattern (ClickHouse's `'_null_'`)
270
+ - `fieldMappings`: Map source column names to schema fields (LibSQL's `additionalLLMContext`)
271
+
272
+ 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.
273
+
274
+ ### Patch Changes
275
+
276
+ - dependencies updates: ([#10110](https://github.com/mastra-ai/mastra/pull/10110))
277
+ - Updated dependency [`hono-openapi@^1.1.1` ↗︎](https://www.npmjs.com/package/hono-openapi/v/1.1.1) (from `^0.4.8`, in `dependencies`)
278
+
279
+ - unexpected json parse issue, log error but dont fail ([#10241](https://github.com/mastra-ai/mastra/pull/10241))
280
+
281
+ - Fixed a bug in agent networks where sometimes the task name was empty ([#10629](https://github.com/mastra-ai/mastra/pull/10629))
282
+
283
+ - 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))
284
+
285
+ - 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))
286
+
287
+ - `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))
288
+
289
+ 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.
290
+
291
+ - SimpleAuth and improved CloudAuth ([#10490](https://github.com/mastra-ai/mastra/pull/10490))
292
+
293
+ - 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))
294
+
295
+ The fix normalizes `undefined`/`null` to `{}` for object schemas and `[]` for array schemas before validation.
296
+
297
+ - 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))
298
+
299
+ - Fix error when spreading config objects in Mastra constructor ([#10718](https://github.com/mastra-ai/mastra/pull/10718))
300
+
301
+ 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.
302
+
303
+ - 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))
304
+
305
+ - Fix generateTitle model type to accept AI SDK LanguageModelV2 ([#10541](https://github.com/mastra-ai/mastra/pull/10541))
306
+
307
+ 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.
308
+
309
+ Previously, passing a standard `LanguageModelV2` would fail because `MastraLanguageModelV2` has different `doGenerate`/`doStream` return types. Now `MastraModelConfig` is used consistently across:
310
+ - `memory/types.ts` - `generateTitle.model` config
311
+ - `agent.ts` - `genTitle`, `generateTitleFromUserMessage`, `resolveTitleGenerationConfig`
312
+ - `agent-legacy.ts` - `AgentLegacyCapabilities` interface
313
+
314
+ - Fix message ordering when using toAISdkV5Messages or prepareStep ([#10686](https://github.com/mastra-ai/mastra/pull/10686))
315
+
316
+ 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.
317
+
318
+ Before:
319
+
320
+ ```
321
+ Input: [user: "hello", assistant: "Hi!", user: "bye"]
322
+ Output: [user: "bye", assistant: "Hi!", user: "hello"] // shuffled!
323
+ ```
324
+
325
+ After:
326
+
327
+ ```
328
+ Input: [user: "hello", assistant: "Hi!", user: "bye"]
329
+ Output: [user: "hello", assistant: "Hi!", user: "bye"] // correct order
330
+ ```
331
+
332
+ - Fix Scorer not using custom gateways registered with Mastra ([#10778](https://github.com/mastra-ai/mastra/pull/10778))
333
+
334
+ 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.
335
+
336
+ - Fix workflow run status not being updated from storage snapshot in createRun ([#10664](https://github.com/mastra-ai/mastra/pull/10664))
337
+
338
+ 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').
339
+
340
+ - Pass resourceId and threadId to network agent's subAgent when it has its own memory ([#10592](https://github.com/mastra-ai/mastra/pull/10592))
341
+
342
+ - 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))
343
+
344
+ - 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))
345
+
346
+ This lets you pass provider-specific settings like `reasoningEffort` for OpenAI thinking models:
347
+
348
+ ```typescript
349
+ const processor = new PromptInjectionDetector({
350
+ model: 'openai/o1-mini',
351
+ threshold: 0.7,
352
+ strategy: 'block',
353
+ providerOptions: {
354
+ openai: {
355
+ reasoningEffort: 'low',
356
+ },
357
+ },
358
+ });
359
+ ```
360
+
361
+ - 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))
362
+
363
+ - 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))
364
+
365
+ - Adds bidirectional integration with otel tracing via a new @mastra/otel-bridge package. ([#10482](https://github.com/mastra-ai/mastra/pull/10482))
366
+
367
+ - 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))
368
+
369
+ ```ts
370
+ const processor: Processor = {
371
+ id: 'my-processor',
372
+ processInputStep: async ({ messages, messageList, stepNumber, systemMessages }) => {
373
+ // Transform messages at each step before LLM call
374
+ return messageList;
375
+ },
376
+ };
377
+ ```
378
+
379
+ - 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))
380
+
381
+ **Before:**
382
+
383
+ ```ts
384
+ const result = await agent.generate('hello');
385
+ result.text; // "hello world" (unprocessed)
386
+ result.response.messages[0].content[0].text; // "HELLO WORLD" (processed)
387
+ ```
388
+
389
+ **After:**
390
+
391
+ ```ts
392
+ const result = await agent.generate('hello');
393
+ result.text; // "HELLO WORLD" (processed)
394
+ ```
395
+
396
+ 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.
397
+
398
+ - Refactored default engine to fit durable execution better, and the inngest engine to match. ([#10627](https://github.com/mastra-ai/mastra/pull/10627))
399
+ Also fixes requestContext persistence by relying on inngest step memoization.
400
+
401
+ Unifies some of the stepResults and error formats in both engines.
402
+
403
+ - Allow direct access to server app handle directly from Mastra instance. ([#10598](https://github.com/mastra-ai/mastra/pull/10598))
404
+
405
+ ```ts
406
+ // Before: HTTP request to localhost
407
+ const response = await fetch(`http://localhost:5000/api/tools`);
408
+
409
+ // After: Direct call via app.fetch()
410
+ const app = mastra.getServerApp<Hono>();
411
+ const response = await app.fetch(new Request('http://internal/api/tools'));
412
+ ```
413
+
414
+ - Added `mastra.getServerApp<T>()` to access the underlying Hono/Express app
415
+ - Added `mastra.getMastraServer()` and `mastra.setMastraServer()` for adapter access
416
+ - Added `MastraServerBase` class in `@mastra/core/server` for adapter implementations
417
+ - Server adapters now auto-register with Mastra in their constructor
418
+
419
+ - Fix network agent not getting `text-delta` from subAgent when `.stream` is used ([#10533](https://github.com/mastra-ai/mastra/pull/10533))
420
+
421
+ - Fix discriminatedUnion schema information lost when json schema is converted to zod ([#10500](https://github.com/mastra-ai/mastra/pull/10500))
422
+
423
+ - Fix writer.custom not working during workflow resume operations ([#10720](https://github.com/mastra-ai/mastra/pull/10720))
424
+
425
+ When a workflow step is resumed, the writer parameter was not being properly passed through, causing writer.custom() calls to fail. This fix ensures the writableStream parameter is correctly passed to both run.resume() and run.start() calls in the workflow execution engine, allowing custom events to be emitted properly during resume operations.
426
+
427
+ - Fix corrupted provider-registry.json file in global cache and regenerate corrupted files ([#10606](https://github.com/mastra-ai/mastra/pull/10606))
428
+
429
+ - Fix TypeScript error when using Zod schemas in `defaultOptions.structuredOutput` ([#10710](https://github.com/mastra-ai/mastra/pull/10710))
430
+
431
+ Previously, defining `structuredOutput.schema` in `defaultOptions` would cause a TypeScript error because the type only accepted `undefined`. Now any valid `OutputSchema` is correctly accepted.
432
+
433
+ - Add support for `providerOptions` when defining tools. This allows developers to specify provider-specific configurations (like Anthropic's `cacheControl`) per tool. ([#10649](https://github.com/mastra-ai/mastra/pull/10649))
434
+
435
+ ```typescript
436
+ createTool({
437
+ id: 'my-tool',
438
+ providerOptions: {
439
+ anthropic: { cacheControl: { type: 'ephemeral' } },
440
+ },
441
+ // ...
442
+ });
443
+ ```
444
+
445
+ - Fixed OpenAI reasoning message merging so distinct reasoning items are no longer dropped when they share a message ID. Prevents downstream errors where a function call is missing its required "reasoning" item. See #9005. ([#10614](https://github.com/mastra-ai/mastra/pull/10614))
446
+
447
+ - Updated dependencies [[`103586c`](https://github.com/mastra-ai/mastra/commit/103586cb23ebcd2466c7f68a71674d37cc10e263), [`61a5705`](https://github.com/mastra-ai/mastra/commit/61a570551278b6743e64243b3ce7d73de915ca8a), [`db70a48`](https://github.com/mastra-ai/mastra/commit/db70a48aeeeeb8e5f92007e8ede52c364ce15287), [`f03ae60`](https://github.com/mastra-ai/mastra/commit/f03ae60500fe350c9d828621006cdafe1975fdd8)]:
448
+ - @mastra/observability@1.0.0-beta.2
449
+ - @mastra/schema-compat@1.0.0-beta.2
450
+
3
451
  ## 1.0.0-beta.5
4
452
 
5
453
  ### Patch Changes
@@ -1,10 +1,10 @@
1
- import type { WritableStream } from 'stream/web';
1
+ import type { WritableStream } from 'node:stream/web';
2
2
  import type { UIMessage } from '../ai-sdk.types.d.ts';
3
3
  import type { JSONSchema7 } from 'json-schema';
4
4
  import type { z, ZodSchema } from 'zod';
5
5
  import type { MastraLLMV1 } from '../llm/model/index.js';
6
6
  import type { GenerateObjectResult, GenerateTextResult, StreamObjectResult, StreamTextResult } from '../llm/model/base.types.js';
7
- import type { MastraLanguageModel } from '../llm/model/shared.types.js';
7
+ import type { MastraModelConfig } from '../llm/model/shared.types.js';
8
8
  import type { Mastra } from '../mastra/index.js';
9
9
  import type { MastraMemory } from '../memory/memory.js';
10
10
  import type { MemoryConfig } from '../memory/types.js';
@@ -14,9 +14,8 @@ import { RequestContext } from '../request-context/index.js';
14
14
  import type { ChunkType } from '../stream/types.js';
15
15
  import type { CoreTool } from '../tools/types.js';
16
16
  import type { DynamicArgument } from '../types/index.js';
17
- import type { MessageListInput, MastraDBMessage, UIMessageWithMetadata } from './message-list/index.js';
18
17
  import { MessageList } from './message-list/index.js';
19
- import { SaveQueueManager } from './save-queue/index.js';
18
+ import type { MastraDBMessage, MessageListInput, UIMessageWithMetadata } from './message-list/index.js';
20
19
  import type { AgentGenerateOptions, AgentStreamOptions, AgentInstructions, ToolsetsInput, ToolsInput, AgentMethodType } from './types.js';
21
20
  /**
22
21
  * Interface for accessing Agent methods needed by the legacy handler.
@@ -57,6 +56,16 @@ export interface AgentLegacyCapabilities {
57
56
  getMemory(options: {
58
57
  requestContext: RequestContext;
59
58
  }): Promise<MastraMemory | undefined>;
59
+ /** Get memory messages (deprecated - use input processors) */
60
+ getMemoryMessages(args: {
61
+ resourceId?: string;
62
+ threadId: string;
63
+ vectorMessageSearch: string;
64
+ memoryConfig?: MemoryConfig;
65
+ requestContext: RequestContext;
66
+ }): Promise<{
67
+ messages: MastraDBMessage[];
68
+ }>;
60
69
  /** Convert tools for LLM */
61
70
  convertTools(args: {
62
71
  toolsets?: ToolsetsInput;
@@ -68,17 +77,8 @@ export interface AgentLegacyCapabilities {
68
77
  tracingContext?: TracingContext;
69
78
  writableStream?: WritableStream<ChunkType>;
70
79
  methodType: AgentMethodType;
71
- }): Promise<Record<string, CoreTool>>;
72
- /** Get memory messages */
73
- getMemoryMessages(args: {
74
- resourceId?: string;
75
- threadId: string;
76
- vectorMessageSearch: string;
77
80
  memoryConfig?: MemoryConfig;
78
- requestContext: RequestContext;
79
- }): Promise<{
80
- messages: MastraDBMessage[];
81
- }>;
81
+ }): Promise<Record<string, CoreTool>>;
82
82
  /** Run input processors */
83
83
  __runInputProcessors(args: {
84
84
  requestContext: RequestContext;
@@ -93,23 +93,20 @@ export interface AgentLegacyCapabilities {
93
93
  /** Get most recent user message */
94
94
  getMostRecentUserMessage(messages: Array<UIMessage | UIMessageWithMetadata>): UIMessage | UIMessageWithMetadata | undefined;
95
95
  /** Generate title for thread */
96
- genTitle(userMessage: UIMessage | UIMessageWithMetadata, requestContext: RequestContext, tracingContext: TracingContext, titleModel?: DynamicArgument<MastraLanguageModel>, titleInstructions?: DynamicArgument<string>): Promise<string | undefined>;
96
+ genTitle(userMessage: UIMessage | UIMessageWithMetadata, requestContext: RequestContext, tracingContext: TracingContext, titleModel?: DynamicArgument<MastraModelConfig>, titleInstructions?: DynamicArgument<string>): Promise<string | undefined>;
97
97
  /** Resolve title generation config */
98
98
  resolveTitleGenerationConfig(generateTitleConfig: boolean | {
99
- model: DynamicArgument<MastraLanguageModel>;
99
+ model: DynamicArgument<MastraModelConfig>;
100
100
  instructions?: DynamicArgument<string>;
101
101
  } | undefined): {
102
102
  shouldGenerate: boolean;
103
- model?: DynamicArgument<MastraLanguageModel>;
103
+ model?: DynamicArgument<MastraModelConfig>;
104
104
  instructions?: DynamicArgument<string>;
105
105
  };
106
106
  /** Save step messages */
107
107
  saveStepMessages(args: {
108
- saveQueueManager: SaveQueueManager;
109
108
  result: any;
110
109
  messageList: MessageList;
111
- threadId?: string;
112
- memoryConfig?: MemoryConfig;
113
110
  runId: string;
114
111
  }): Promise<void>;
115
112
  /** Convert instructions to string */
@@ -1 +1 @@
1
- {"version":3,"file":"agent-legacy.d.ts","sourceRoot":"","sources":["../../src/agent/agent-legacy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAA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,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,EAE3E,QAAQ,EAAE,gBAAgB,EAC1B,eAAe,GAAE,oBAAoB,CAAC,MAAM,EAAE,mBAAmB,CAAM,GACtE,OAAO,CAAC,MAAM,SAAS,SAAS,GAAG,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAiSlH;;;OAGG;IACG,YAAY,CAChB,MAAM,SAAS,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,EAC9D,mBAAmB,SAAS,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,EAE3E,QAAQ,EAAE,gBAAgB,EAC1B,aAAa,GAAE,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,CAAM,GAClE,OAAO,CACN,gBAAgB,CAAC,GAAG,EAAE,MAAM,SAAS,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,GAC3E,CAAC,kBAAkB,CAAC,MAAM,SAAS,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC,GAAG,iBAAiB,CAAC,CACtF;CA+MF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=agent-types.test-d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-types.test-d.d.ts","sourceRoot":"","sources":["../../src/agent/agent-types.test-d.ts"],"names":[],"mappings":""}
@@ -348,11 +348,11 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
348
348
  message: string | MessageInput;
349
349
  requestContext?: RequestContext;
350
350
  tracingContext: TracingContext;
351
- model?: DynamicArgument<MastraLanguageModel>;
351
+ model?: DynamicArgument<MastraModelConfig>;
352
352
  instructions?: DynamicArgument<string>;
353
353
  }): Promise<string>;
354
354
  getMostRecentUserMessage(messages: Array<UIMessage | UIMessageWithMetadata>): UIMessage | UIMessageWithMetadata | undefined;
355
- genTitle(userMessage: string | MessageInput | undefined, requestContext: RequestContext, tracingContext: TracingContext, model?: DynamicArgument<MastraLanguageModel>, instructions?: DynamicArgument<string>): Promise<string | undefined>;
355
+ genTitle(userMessage: string | MessageInput | undefined, requestContext: RequestContext, tracingContext: TracingContext, model?: DynamicArgument<MastraModelConfig>, instructions?: DynamicArgument<string>): Promise<string | undefined>;
356
356
  __setMemory(memory: DynamicArgument<MastraMemory>): void;
357
357
  /**
358
358
  * Retrieves and converts memory tools to CoreTool format.
@@ -563,11 +563,11 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
563
563
  * @internal
564
564
  */
565
565
  resolveTitleGenerationConfig(generateTitleConfig: boolean | {
566
- model: DynamicArgument<MastraLanguageModel>;
566
+ model: DynamicArgument<MastraModelConfig>;
567
567
  instructions?: DynamicArgument<string>;
568
568
  } | undefined): {
569
569
  shouldGenerate: boolean;
570
- model?: DynamicArgument<MastraLanguageModel>;
570
+ model?: DynamicArgument<MastraModelConfig>;
571
571
  instructions?: DynamicArgument<string>;
572
572
  };
573
573
  /**