@mastra/core 1.0.0-beta.4 → 1.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (464) hide show
  1. package/CHANGELOG.md +598 -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 +6 -6
  7. package/dist/agent/agent.d.ts.map +1 -1
  8. package/dist/agent/agent.types.d.ts +3 -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/message-list/prompt/attachments-to-parts.d.ts.map +1 -1
  17. package/dist/agent/save-queue/index.d.ts +3 -1
  18. package/dist/agent/save-queue/index.d.ts.map +1 -1
  19. package/dist/agent/test-utils.d.ts +37 -0
  20. package/dist/agent/test-utils.d.ts.map +1 -1
  21. package/dist/agent/trip-wire.d.ts.map +1 -1
  22. package/dist/agent/types.d.ts +20 -6
  23. package/dist/agent/types.d.ts.map +1 -1
  24. package/dist/agent/utils.d.ts.map +1 -1
  25. package/dist/agent/workflows/prepare-stream/index.d.ts +10 -10
  26. package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
  27. package/dist/agent/workflows/prepare-stream/map-results-step.d.ts +1 -3
  28. package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
  29. package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts +4 -4
  30. package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts.map +1 -1
  31. package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts +4 -4
  32. package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts.map +1 -1
  33. package/dist/agent/workflows/prepare-stream/schema.d.ts +12 -13
  34. package/dist/agent/workflows/prepare-stream/schema.d.ts.map +1 -1
  35. package/dist/agent/workflows/prepare-stream/stream-step.d.ts +8 -1
  36. package/dist/agent/workflows/prepare-stream/stream-step.d.ts.map +1 -1
  37. package/dist/base.cjs +2 -2
  38. package/dist/base.js +1 -1
  39. package/dist/bundler/index.cjs +2 -2
  40. package/dist/bundler/index.js +1 -1
  41. package/dist/cache/index.cjs +3 -3
  42. package/dist/cache/index.js +1 -1
  43. package/dist/{chunk-OJNJA5ZI.js → chunk-3CKZSDTQ.js} +3 -3
  44. package/dist/{chunk-OJNJA5ZI.js.map → chunk-3CKZSDTQ.js.map} +1 -1
  45. package/dist/{chunk-TQTAMPSC.js → chunk-3N3QE4ZK.js} +3 -3
  46. package/dist/chunk-3N3QE4ZK.js.map +1 -0
  47. package/dist/{chunk-WQSGX6XA.cjs → chunk-3TKNXJES.cjs} +56 -15
  48. package/dist/chunk-3TKNXJES.cjs.map +1 -0
  49. package/dist/{chunk-XXBWX7DT.js → chunk-45NA5ZD3.js} +11673 -9468
  50. package/dist/chunk-45NA5ZD3.js.map +1 -0
  51. package/dist/{chunk-KEURQGCQ.js → chunk-4F6RAJFU.js} +105 -21
  52. package/dist/chunk-4F6RAJFU.js.map +1 -0
  53. package/dist/{chunk-ISMGVGUM.cjs → chunk-4JKEUSCC.cjs} +4 -4
  54. package/dist/{chunk-ISMGVGUM.cjs.map → chunk-4JKEUSCC.cjs.map} +1 -1
  55. package/dist/{chunk-CYVNOIXS.cjs → chunk-4KUOSXJ7.cjs} +30 -16
  56. package/dist/chunk-4KUOSXJ7.cjs.map +1 -0
  57. package/dist/{chunk-CBAB7GOD.cjs → chunk-6BJ7XHRH.cjs} +2 -2
  58. package/dist/{chunk-CBAB7GOD.cjs.map → chunk-6BJ7XHRH.cjs.map} +1 -1
  59. package/dist/{chunk-3RW5EMSB.js → chunk-6GOLI2EY.js} +22 -9
  60. package/dist/chunk-6GOLI2EY.js.map +1 -0
  61. package/dist/{chunk-4RXG622P.cjs → chunk-6J4NRNT2.cjs} +600 -37
  62. package/dist/chunk-6J4NRNT2.cjs.map +1 -0
  63. package/dist/{chunk-J7O6WENZ.cjs → chunk-6TBWJV35.js} +5 -5
  64. package/dist/chunk-6TBWJV35.js.map +1 -0
  65. package/dist/chunk-6XCINXZ7.cjs +194 -0
  66. package/dist/chunk-6XCINXZ7.cjs.map +1 -0
  67. package/dist/{chunk-MDKPL2R2.js → chunk-7ZADRRDW.js} +5 -4
  68. package/dist/chunk-7ZADRRDW.js.map +1 -0
  69. package/dist/{chunk-DSNPWVIG.cjs → chunk-AF74UXR5.cjs} +4 -3
  70. package/dist/chunk-AF74UXR5.cjs.map +1 -0
  71. package/dist/{chunk-W3DD3XP5.js → chunk-APMPOYPI.js} +334 -138
  72. package/dist/chunk-APMPOYPI.js.map +1 -0
  73. package/dist/{chunk-LRSB62Z6.cjs → chunk-AQAIS7FH.cjs} +15 -8
  74. package/dist/chunk-AQAIS7FH.cjs.map +1 -0
  75. package/dist/chunk-BWYU7D33.js +192 -0
  76. package/dist/chunk-BWYU7D33.js.map +1 -0
  77. package/dist/{chunk-KEXGB7FK.cjs → chunk-DGV2FWB4.cjs} +7 -7
  78. package/dist/{chunk-KEXGB7FK.cjs.map → chunk-DGV2FWB4.cjs.map} +1 -1
  79. package/dist/{chunk-WTYNK7Q4.js → chunk-DXMSVGJ6.js} +599 -36
  80. package/dist/chunk-DXMSVGJ6.js.map +1 -0
  81. package/dist/{chunk-Y63IFHEZ.cjs → chunk-EOPEDKLG.cjs} +4 -4
  82. package/dist/chunk-EOPEDKLG.cjs.map +1 -0
  83. package/dist/{chunk-NZAXAFI3.js → chunk-F2GAJSBI.js} +3 -3
  84. package/dist/{chunk-NZAXAFI3.js.map → chunk-F2GAJSBI.js.map} +1 -1
  85. package/dist/{chunk-KIZIOFZC.js → chunk-FYP3AT6W.js} +17 -3
  86. package/dist/chunk-FYP3AT6W.js.map +1 -0
  87. package/dist/{chunk-ZCVTH3CH.cjs → chunk-HNHZGFZY.cjs} +5 -4
  88. package/dist/chunk-HNHZGFZY.cjs.map +1 -0
  89. package/dist/{chunk-BMAFVZ2D.cjs → chunk-IWTMMUQY.cjs} +4 -4
  90. package/dist/{chunk-BMAFVZ2D.cjs.map → chunk-IWTMMUQY.cjs.map} +1 -1
  91. package/dist/{chunk-D6EDHNGV.js → chunk-KZLP6TPJ.js} +69 -28
  92. package/dist/chunk-KZLP6TPJ.js.map +1 -0
  93. package/dist/{chunk-5WXEYDFI.cjs → chunk-LDWBLENZ.cjs} +51 -38
  94. package/dist/chunk-LDWBLENZ.cjs.map +1 -0
  95. package/dist/{chunk-HGNRQ3OG.js → chunk-LEZIKVRQ.js} +15 -8
  96. package/dist/chunk-LEZIKVRQ.js.map +1 -0
  97. package/dist/{chunk-S6URFGCZ.js → chunk-LSHPJWM5.js} +3 -3
  98. package/dist/{chunk-S6URFGCZ.js.map → chunk-LSHPJWM5.js.map} +1 -1
  99. package/dist/{chunk-E7K4FTLN.cjs → chunk-NHNXIYDG.cjs} +18 -2
  100. package/dist/chunk-NHNXIYDG.cjs.map +1 -0
  101. package/dist/{chunk-U7VECK2G.js → chunk-NIUEWICQ.js} +145 -19
  102. package/dist/chunk-NIUEWICQ.js.map +1 -0
  103. package/dist/{chunk-2NVBZKZI.cjs → chunk-NN3NOFRU.cjs} +11744 -9526
  104. package/dist/chunk-NN3NOFRU.cjs.map +1 -0
  105. package/dist/{chunk-KJ2SW6VA.js → chunk-NRUZYMHE.js} +4 -3
  106. package/dist/chunk-NRUZYMHE.js.map +1 -0
  107. package/dist/{chunk-IWB65P37.cjs → chunk-OIMB2SNZ.cjs} +155 -29
  108. package/dist/chunk-OIMB2SNZ.cjs.map +1 -0
  109. package/dist/{chunk-IWQDBVJK.js → chunk-OPALPWAM.js} +47 -8
  110. package/dist/chunk-OPALPWAM.js.map +1 -0
  111. package/dist/{chunk-X7JMA3IY.js → chunk-PSCMWPLC.js} +2 -2
  112. package/dist/{chunk-X7JMA3IY.js.map → chunk-PSCMWPLC.js.map} +1 -1
  113. package/dist/{chunk-S6OEQHEI.cjs → chunk-QGWNF2QJ.cjs} +59 -50
  114. package/dist/chunk-QGWNF2QJ.cjs.map +1 -0
  115. package/dist/{chunk-VZC4BWWH.cjs → chunk-RHTV5C5D.cjs} +19 -19
  116. package/dist/chunk-RHTV5C5D.cjs.map +1 -0
  117. package/dist/{chunk-HBJPYQRN.cjs → chunk-RTROJFEU.cjs} +78 -41
  118. package/dist/chunk-RTROJFEU.cjs.map +1 -0
  119. package/dist/chunk-S5FPOCQF.cjs +518 -0
  120. package/dist/chunk-S5FPOCQF.cjs.map +1 -0
  121. package/dist/{chunk-O6NA3Z43.cjs → chunk-SQAX4OW6.cjs} +167 -12
  122. package/dist/chunk-SQAX4OW6.cjs.map +1 -0
  123. package/dist/{chunk-IHJDOC3A.js → chunk-T2UNO766.js} +16 -7
  124. package/dist/chunk-T2UNO766.js.map +1 -0
  125. package/dist/{chunk-FVNT7VTO.js → chunk-TARWUQG6.js} +243 -166
  126. package/dist/chunk-TARWUQG6.js.map +1 -0
  127. package/dist/{chunk-76K3IYWM.js → chunk-TS7B26US.js} +3 -3
  128. package/dist/{chunk-76K3IYWM.js.map → chunk-TS7B26US.js.map} +1 -1
  129. package/dist/{chunk-Y6ROD72V.cjs → chunk-UIGRFDO6.cjs} +4 -4
  130. package/dist/{chunk-Y6ROD72V.cjs.map → chunk-UIGRFDO6.cjs.map} +1 -1
  131. package/dist/{chunk-GRBGQ2GE.js → chunk-UVHSM2GU.cjs} +9 -3
  132. package/dist/chunk-UVHSM2GU.cjs.map +1 -0
  133. package/dist/{chunk-VSM3NLUX.cjs → chunk-VRFSEZBA.cjs} +334 -138
  134. package/dist/chunk-VRFSEZBA.cjs.map +1 -0
  135. package/dist/{chunk-JXESKY4A.js → chunk-WDRA4WKG.js} +163 -9
  136. package/dist/chunk-WDRA4WKG.js.map +1 -0
  137. package/dist/{chunk-RXDJL5QT.js → chunk-WMAMOYRR.js} +14 -14
  138. package/dist/chunk-WMAMOYRR.js.map +1 -0
  139. package/dist/{chunk-2OTDXX73.js → chunk-XY337TTF.js} +24 -10
  140. package/dist/chunk-XY337TTF.js.map +1 -0
  141. package/dist/{chunk-4IKJAKCD.cjs → chunk-Y24HI6ND.cjs} +108 -23
  142. package/dist/chunk-Y24HI6ND.cjs.map +1 -0
  143. package/dist/deployer/index.cjs +2 -2
  144. package/dist/deployer/index.js +1 -1
  145. package/dist/di/index.cjs +10 -2
  146. package/dist/di/index.d.ts +1 -1
  147. package/dist/di/index.d.ts.map +1 -1
  148. package/dist/di/index.js +1 -1
  149. package/dist/evals/base.d.ts +10 -2
  150. package/dist/evals/base.d.ts.map +1 -1
  151. package/dist/evals/base.test-utils.d.ts +25 -25
  152. package/dist/evals/index.cjs +9 -9
  153. package/dist/evals/index.js +2 -2
  154. package/dist/evals/scoreTraces/index.cjs +5 -5
  155. package/dist/evals/scoreTraces/index.js +2 -2
  156. package/dist/evals/types.d.ts +8 -8
  157. package/dist/index.cjs +2 -2
  158. package/dist/index.js +1 -1
  159. package/dist/integration/index.cjs +2 -2
  160. package/dist/integration/index.js +1 -1
  161. package/dist/llm/index.cjs +18 -14
  162. package/dist/llm/index.d.ts +2 -1
  163. package/dist/llm/index.d.ts.map +1 -1
  164. package/dist/llm/index.js +5 -5
  165. package/dist/llm/model/aisdk/v5/model.d.ts.map +1 -1
  166. package/dist/llm/model/gateway-resolver.d.ts.map +1 -1
  167. package/dist/llm/model/gateways/azure.d.ts +36 -0
  168. package/dist/llm/model/gateways/azure.d.ts.map +1 -0
  169. package/dist/llm/model/gateways/base.d.ts +3 -6
  170. package/dist/llm/model/gateways/base.d.ts.map +1 -1
  171. package/dist/llm/model/gateways/index.d.ts +4 -1
  172. package/dist/llm/model/gateways/index.d.ts.map +1 -1
  173. package/dist/llm/model/gateways/models-dev.d.ts +2 -2
  174. package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
  175. package/dist/llm/model/gateways/netlify.d.ts +2 -2
  176. package/dist/llm/model/gateways/netlify.d.ts.map +1 -1
  177. package/dist/llm/model/model.d.ts.map +1 -1
  178. package/dist/llm/model/model.loop.d.ts +1 -1
  179. package/dist/llm/model/model.loop.d.ts.map +1 -1
  180. package/dist/llm/model/provider-registry.d.ts.map +1 -1
  181. package/dist/llm/model/provider-types.generated.d.ts +245 -12
  182. package/dist/llm/model/registry-generator.d.ts +12 -0
  183. package/dist/llm/model/registry-generator.d.ts.map +1 -1
  184. package/dist/llm/model/router.d.ts.map +1 -1
  185. package/dist/logger/constants.d.ts +1 -0
  186. package/dist/logger/constants.d.ts.map +1 -1
  187. package/dist/logger/index.cjs +11 -11
  188. package/dist/logger/index.js +2 -2
  189. package/dist/logger/transport.d.ts +1 -1
  190. package/dist/logger/transport.d.ts.map +1 -1
  191. package/dist/loop/index.cjs +2 -2
  192. package/dist/loop/index.js +1 -1
  193. package/dist/loop/loop.d.ts.map +1 -1
  194. package/dist/loop/network/index.d.ts +2 -2
  195. package/dist/loop/network/index.d.ts.map +1 -1
  196. package/dist/loop/test-utils/fullStream.d.ts.map +1 -1
  197. package/dist/loop/test-utils/generateText.d.ts.map +1 -1
  198. package/dist/loop/test-utils/resultObject.d.ts.map +1 -1
  199. package/dist/loop/test-utils/streamObject.d.ts.map +1 -1
  200. package/dist/loop/types.d.ts +13 -2
  201. package/dist/loop/types.d.ts.map +1 -1
  202. package/dist/loop/workflows/agentic-execution/index.d.ts +96 -96
  203. package/dist/loop/workflows/agentic-execution/index.d.ts.map +1 -1
  204. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +65 -65
  205. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
  206. package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +32 -32
  207. package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts.map +1 -1
  208. package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts +1 -1
  209. package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
  210. package/dist/loop/workflows/agentic-loop/index.d.ts +97 -97
  211. package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
  212. package/dist/loop/workflows/schema.d.ts +32 -32
  213. package/dist/loop/workflows/stream.d.ts +1 -1
  214. package/dist/loop/workflows/stream.d.ts.map +1 -1
  215. package/dist/mastra/index.cjs +2 -2
  216. package/dist/mastra/index.d.ts +64 -9
  217. package/dist/mastra/index.d.ts.map +1 -1
  218. package/dist/mastra/index.js +1 -1
  219. package/dist/mcp/index.cjs +4 -4
  220. package/dist/mcp/index.cjs.map +1 -1
  221. package/dist/mcp/index.d.ts +4 -4
  222. package/dist/mcp/index.d.ts.map +1 -1
  223. package/dist/mcp/index.js +2 -2
  224. package/dist/mcp/index.js.map +1 -1
  225. package/dist/mcp/types.d.ts +2 -2
  226. package/dist/mcp/types.d.ts.map +1 -1
  227. package/dist/memory/index.cjs +21 -327
  228. package/dist/memory/index.cjs.map +1 -1
  229. package/dist/memory/index.js +1 -327
  230. package/dist/memory/index.js.map +1 -1
  231. package/dist/memory/memory.d.ts +22 -18
  232. package/dist/memory/memory.d.ts.map +1 -1
  233. package/dist/memory/mock.d.ts +15 -14
  234. package/dist/memory/mock.d.ts.map +1 -1
  235. package/dist/memory/types.d.ts +69 -11
  236. package/dist/memory/types.d.ts.map +1 -1
  237. package/dist/models-dev-F6MTIYTO.js +3 -0
  238. package/dist/{models-dev-6PRLJKVZ.js.map → models-dev-F6MTIYTO.js.map} +1 -1
  239. package/dist/models-dev-XIVR5EJV.cjs +12 -0
  240. package/dist/{models-dev-WHMI5G6Y.cjs.map → models-dev-XIVR5EJV.cjs.map} +1 -1
  241. package/dist/netlify-C2YBIK7A.js +3 -0
  242. package/dist/{netlify-EBQ6YUC6.js.map → netlify-C2YBIK7A.js.map} +1 -1
  243. package/dist/netlify-XWROOTP4.cjs +12 -0
  244. package/dist/{netlify-46I3SNNV.cjs.map → netlify-XWROOTP4.cjs.map} +1 -1
  245. package/dist/observability/index.cjs +16 -8
  246. package/dist/observability/index.js +1 -1
  247. package/dist/observability/types/tracing.d.ts +165 -3
  248. package/dist/observability/types/tracing.d.ts.map +1 -1
  249. package/dist/observability/utils.d.ts +47 -1
  250. package/dist/observability/utils.d.ts.map +1 -1
  251. package/dist/processors/index.cjs +35 -11
  252. package/dist/processors/index.d.ts +101 -23
  253. package/dist/processors/index.d.ts.map +1 -1
  254. package/dist/processors/index.js +1 -1
  255. package/dist/processors/memory/index.d.ts +7 -0
  256. package/dist/processors/memory/index.d.ts.map +1 -0
  257. package/dist/processors/memory/message-history.d.ts +43 -0
  258. package/dist/processors/memory/message-history.d.ts.map +1 -0
  259. package/dist/processors/memory/semantic-recall.d.ts +152 -0
  260. package/dist/processors/memory/semantic-recall.d.ts.map +1 -0
  261. package/dist/processors/memory/working-memory.d.ts +65 -0
  262. package/dist/processors/memory/working-memory.d.ts.map +1 -0
  263. package/dist/processors/processors/batch-parts.d.ts +1 -1
  264. package/dist/processors/processors/batch-parts.d.ts.map +1 -1
  265. package/dist/processors/processors/index.d.ts +2 -1
  266. package/dist/processors/processors/index.d.ts.map +1 -1
  267. package/dist/processors/processors/language-detector.d.ts +15 -1
  268. package/dist/processors/processors/language-detector.d.ts.map +1 -1
  269. package/dist/processors/processors/moderation.d.ts +15 -1
  270. package/dist/processors/processors/moderation.d.ts.map +1 -1
  271. package/dist/processors/processors/pii-detector.d.ts +15 -1
  272. package/dist/processors/processors/pii-detector.d.ts.map +1 -1
  273. package/dist/processors/processors/prompt-injection-detector.d.ts +15 -1
  274. package/dist/processors/processors/prompt-injection-detector.d.ts.map +1 -1
  275. package/dist/processors/processors/structured-output.d.ts +3 -2
  276. package/dist/processors/processors/structured-output.d.ts.map +1 -1
  277. package/dist/processors/processors/system-prompt-scrubber.d.ts +1 -1
  278. package/dist/processors/processors/system-prompt-scrubber.d.ts.map +1 -1
  279. package/dist/processors/processors/token-limiter.d.ts +22 -12
  280. package/dist/processors/processors/token-limiter.d.ts.map +1 -1
  281. package/dist/processors/processors/tool-call-filter.d.ts +28 -0
  282. package/dist/processors/processors/tool-call-filter.d.ts.map +1 -0
  283. package/dist/processors/processors/unicode-normalizer.d.ts +1 -1
  284. package/dist/processors/processors/unicode-normalizer.d.ts.map +1 -1
  285. package/dist/processors/runner.d.ts +35 -4
  286. package/dist/processors/runner.d.ts.map +1 -1
  287. package/dist/provider-registry-BXX7CA3H.cjs +40 -0
  288. package/dist/{provider-registry-RP2W4B24.cjs.map → provider-registry-BXX7CA3H.cjs.map} +1 -1
  289. package/dist/provider-registry-GRYJWVEM.js +3 -0
  290. package/dist/{provider-registry-HDG6UMUC.js.map → provider-registry-GRYJWVEM.js.map} +1 -1
  291. package/dist/provider-registry.json +547 -25
  292. package/dist/{registry-generator-JPCV47SC.cjs → registry-generator-34SC4TAU.cjs} +21 -6
  293. package/dist/registry-generator-34SC4TAU.cjs.map +1 -0
  294. package/dist/{registry-generator-XD4FPZTU.js → registry-generator-UMTNPBJX.js} +21 -7
  295. package/dist/registry-generator-UMTNPBJX.js.map +1 -0
  296. package/dist/relevance/index.cjs +2 -2
  297. package/dist/relevance/index.js +1 -1
  298. package/dist/request-context/index.cjs +10 -2
  299. package/dist/request-context/index.d.ts +26 -0
  300. package/dist/request-context/index.d.ts.map +1 -1
  301. package/dist/request-context/index.js +1 -1
  302. package/dist/server/base.d.ts +51 -0
  303. package/dist/server/base.d.ts.map +1 -0
  304. package/dist/server/composite-auth.d.ts +9 -0
  305. package/dist/server/composite-auth.d.ts.map +1 -0
  306. package/dist/server/index.cjs +112 -2
  307. package/dist/server/index.cjs.map +1 -1
  308. package/dist/server/index.d.ts +4 -0
  309. package/dist/server/index.d.ts.map +1 -1
  310. package/dist/server/index.js +109 -2
  311. package/dist/server/index.js.map +1 -1
  312. package/dist/server/simple-auth.d.ts +27 -0
  313. package/dist/server/simple-auth.d.ts.map +1 -0
  314. package/dist/storage/domains/memory/inmemory.d.ts.map +1 -1
  315. package/dist/storage/index.cjs +37 -29
  316. package/dist/storage/index.js +1 -1
  317. package/dist/storage/types.d.ts +1 -1
  318. package/dist/storage/types.d.ts.map +1 -1
  319. package/dist/storage/utils.d.ts +44 -0
  320. package/dist/storage/utils.d.ts.map +1 -1
  321. package/dist/stream/MastraAgentNetworkStream.d.ts +1 -1
  322. package/dist/stream/MastraAgentNetworkStream.d.ts.map +1 -1
  323. package/dist/stream/MastraWorkflowStream.d.ts +1 -1
  324. package/dist/stream/MastraWorkflowStream.d.ts.map +1 -1
  325. package/dist/stream/RunOutput.d.ts +2 -2
  326. package/dist/stream/RunOutput.d.ts.map +1 -1
  327. package/dist/stream/aisdk/v5/output.d.ts +1 -1
  328. package/dist/stream/aisdk/v5/output.d.ts.map +1 -1
  329. package/dist/stream/aisdk/v5/transform.d.ts.map +1 -1
  330. package/dist/stream/base/base.d.ts +1 -1
  331. package/dist/stream/base/base.d.ts.map +1 -1
  332. package/dist/stream/base/output-format-handlers.d.ts +1 -1
  333. package/dist/stream/base/output-format-handlers.d.ts.map +1 -1
  334. package/dist/stream/base/output.d.ts +1 -1
  335. package/dist/stream/base/output.d.ts.map +1 -1
  336. package/dist/stream/index.cjs +11 -11
  337. package/dist/stream/index.js +2 -2
  338. package/dist/stream/types.d.ts +9 -2
  339. package/dist/stream/types.d.ts.map +1 -1
  340. package/dist/test-utils/llm-mock.cjs +36 -2
  341. package/dist/test-utils/llm-mock.cjs.map +1 -1
  342. package/dist/test-utils/llm-mock.d.ts +3 -0
  343. package/dist/test-utils/llm-mock.d.ts.map +1 -1
  344. package/dist/test-utils/llm-mock.js +32 -2
  345. package/dist/test-utils/llm-mock.js.map +1 -1
  346. package/dist/tools/index.cjs +6 -6
  347. package/dist/tools/index.js +2 -2
  348. package/dist/tools/is-vercel-tool.cjs +2 -2
  349. package/dist/tools/is-vercel-tool.js +1 -1
  350. package/dist/tools/stream.d.ts +2 -1
  351. package/dist/tools/stream.d.ts.map +1 -1
  352. package/dist/tools/tool-builder/builder.d.ts +2 -0
  353. package/dist/tools/tool-builder/builder.d.ts.map +1 -1
  354. package/dist/tools/tool.d.ts +19 -6
  355. package/dist/tools/tool.d.ts.map +1 -1
  356. package/dist/tools/types.d.ts +28 -3
  357. package/dist/tools/types.d.ts.map +1 -1
  358. package/dist/tools/validation.d.ts +14 -2
  359. package/dist/tools/validation.d.ts.map +1 -1
  360. package/dist/tts/index.cjs +2 -2
  361. package/dist/tts/index.js +1 -1
  362. package/dist/utils.cjs +22 -22
  363. package/dist/utils.d.ts +2 -2
  364. package/dist/utils.d.ts.map +1 -1
  365. package/dist/utils.js +1 -1
  366. package/dist/vector/filter/index.cjs +7 -189
  367. package/dist/vector/filter/index.cjs.map +1 -1
  368. package/dist/vector/filter/index.js +1 -190
  369. package/dist/vector/filter/index.js.map +1 -1
  370. package/dist/vector/index.cjs +7 -2
  371. package/dist/vector/index.cjs.map +1 -1
  372. package/dist/vector/index.d.ts +1 -0
  373. package/dist/vector/index.d.ts.map +1 -1
  374. package/dist/vector/index.js +2 -1
  375. package/dist/vector/index.js.map +1 -1
  376. package/dist/vector/types.d.ts +86 -3
  377. package/dist/vector/types.d.ts.map +1 -1
  378. package/dist/vector/vector.d.ts +39 -2
  379. package/dist/vector/vector.d.ts.map +1 -1
  380. package/dist/voice/index.cjs +6 -6
  381. package/dist/voice/index.js +1 -1
  382. package/dist/workflows/default.d.ts +176 -281
  383. package/dist/workflows/default.d.ts.map +1 -1
  384. package/dist/workflows/evented/index.cjs +10 -10
  385. package/dist/workflows/evented/index.js +1 -1
  386. package/dist/workflows/evented/step-executor.d.ts +1 -1
  387. package/dist/workflows/evented/step-executor.d.ts.map +1 -1
  388. package/dist/workflows/execution-engine.d.ts +4 -2
  389. package/dist/workflows/execution-engine.d.ts.map +1 -1
  390. package/dist/workflows/handlers/control-flow.d.ts +135 -0
  391. package/dist/workflows/handlers/control-flow.d.ts.map +1 -0
  392. package/dist/workflows/handlers/entry.d.ts +45 -0
  393. package/dist/workflows/handlers/entry.d.ts.map +1 -0
  394. package/dist/workflows/handlers/sleep.d.ts +62 -0
  395. package/dist/workflows/handlers/sleep.d.ts.map +1 -0
  396. package/dist/workflows/handlers/step.d.ts +60 -0
  397. package/dist/workflows/handlers/step.d.ts.map +1 -0
  398. package/dist/workflows/index.cjs +23 -19
  399. package/dist/workflows/index.js +1 -1
  400. package/dist/workflows/step.d.ts +1 -0
  401. package/dist/workflows/step.d.ts.map +1 -1
  402. package/dist/workflows/types.d.ts +159 -5
  403. package/dist/workflows/types.d.ts.map +1 -1
  404. package/dist/workflows/utils.d.ts +7 -0
  405. package/dist/workflows/utils.d.ts.map +1 -1
  406. package/dist/workflows/workflow.d.ts +12 -8
  407. package/dist/workflows/workflow.d.ts.map +1 -1
  408. package/package.json +12 -10
  409. package/src/llm/model/provider-types.generated.d.ts +245 -12
  410. package/dist/chunk-2NVBZKZI.cjs.map +0 -1
  411. package/dist/chunk-2OTDXX73.js.map +0 -1
  412. package/dist/chunk-3PSWNGBF.js +0 -3
  413. package/dist/chunk-3PSWNGBF.js.map +0 -1
  414. package/dist/chunk-3RW5EMSB.js.map +0 -1
  415. package/dist/chunk-3W5RQCCY.cjs +0 -440
  416. package/dist/chunk-3W5RQCCY.cjs.map +0 -1
  417. package/dist/chunk-436FFEF6.js +0 -34
  418. package/dist/chunk-436FFEF6.js.map +0 -1
  419. package/dist/chunk-4IKJAKCD.cjs.map +0 -1
  420. package/dist/chunk-4RXG622P.cjs.map +0 -1
  421. package/dist/chunk-5WXEYDFI.cjs.map +0 -1
  422. package/dist/chunk-CYVNOIXS.cjs.map +0 -1
  423. package/dist/chunk-D6EDHNGV.js.map +0 -1
  424. package/dist/chunk-DSNPWVIG.cjs.map +0 -1
  425. package/dist/chunk-E7K4FTLN.cjs.map +0 -1
  426. package/dist/chunk-FVNT7VTO.js.map +0 -1
  427. package/dist/chunk-GRBGQ2GE.js.map +0 -1
  428. package/dist/chunk-HBJPYQRN.cjs.map +0 -1
  429. package/dist/chunk-HGNRQ3OG.js.map +0 -1
  430. package/dist/chunk-IHJDOC3A.js.map +0 -1
  431. package/dist/chunk-IWB65P37.cjs.map +0 -1
  432. package/dist/chunk-IWQDBVJK.js.map +0 -1
  433. package/dist/chunk-J7O6WENZ.cjs.map +0 -1
  434. package/dist/chunk-JXESKY4A.js.map +0 -1
  435. package/dist/chunk-KEURQGCQ.js.map +0 -1
  436. package/dist/chunk-KIZIOFZC.js.map +0 -1
  437. package/dist/chunk-KJ2SW6VA.js.map +0 -1
  438. package/dist/chunk-LRSB62Z6.cjs.map +0 -1
  439. package/dist/chunk-MDKPL2R2.js.map +0 -1
  440. package/dist/chunk-O6NA3Z43.cjs.map +0 -1
  441. package/dist/chunk-PE3V7GUL.cjs +0 -4
  442. package/dist/chunk-PE3V7GUL.cjs.map +0 -1
  443. package/dist/chunk-RXDJL5QT.js.map +0 -1
  444. package/dist/chunk-S6OEQHEI.cjs.map +0 -1
  445. package/dist/chunk-TQTAMPSC.js.map +0 -1
  446. package/dist/chunk-U7VECK2G.js.map +0 -1
  447. package/dist/chunk-V3VLOOSW.cjs +0 -36
  448. package/dist/chunk-V3VLOOSW.cjs.map +0 -1
  449. package/dist/chunk-VSM3NLUX.cjs.map +0 -1
  450. package/dist/chunk-VZC4BWWH.cjs.map +0 -1
  451. package/dist/chunk-W3DD3XP5.js.map +0 -1
  452. package/dist/chunk-WQSGX6XA.cjs.map +0 -1
  453. package/dist/chunk-WTYNK7Q4.js.map +0 -1
  454. package/dist/chunk-XXBWX7DT.js.map +0 -1
  455. package/dist/chunk-Y63IFHEZ.cjs.map +0 -1
  456. package/dist/chunk-ZCVTH3CH.cjs.map +0 -1
  457. package/dist/models-dev-6PRLJKVZ.js +0 -3
  458. package/dist/models-dev-WHMI5G6Y.cjs +0 -12
  459. package/dist/netlify-46I3SNNV.cjs +0 -12
  460. package/dist/netlify-EBQ6YUC6.js +0 -3
  461. package/dist/provider-registry-HDG6UMUC.js +0 -3
  462. package/dist/provider-registry-RP2W4B24.cjs +0 -40
  463. package/dist/registry-generator-JPCV47SC.cjs.map +0 -1
  464. package/dist/registry-generator-XD4FPZTU.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import type { WritableStream } from 'stream/web';
1
+ import type { WritableStream } from 'node:stream/web';
2
2
  import type { ToolSet } from 'ai-v5';
3
3
  import type { OutputSchema } from '../../../stream/base/schema.js';
4
4
  import type { ChunkType } from '../../../stream/types.js';
@@ -69,8 +69,8 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
69
69
  steps: any[];
70
70
  text?: string | undefined;
71
71
  reasoning?: any[] | undefined;
72
- files?: any[] | undefined;
73
72
  sources?: any[] | undefined;
73
+ files?: any[] | undefined;
74
74
  toolCalls?: any[] | undefined;
75
75
  toolResults?: any[] | undefined;
76
76
  reasoningText?: string | undefined;
@@ -89,8 +89,8 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
89
89
  steps: any[];
90
90
  text?: string | undefined;
91
91
  reasoning?: any[] | undefined;
92
- files?: any[] | undefined;
93
92
  sources?: any[] | undefined;
93
+ files?: any[] | undefined;
94
94
  toolCalls?: any[] | undefined;
95
95
  toolResults?: any[] | undefined;
96
96
  reasoningText?: string | undefined;
@@ -206,6 +206,20 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
206
206
  } | undefined;
207
207
  }>;
208
208
  }, "strip", import("zod").ZodTypeAny, {
209
+ metadata: {
210
+ id?: string | undefined;
211
+ providerMetadata?: Record<string, any> | undefined;
212
+ modelId?: string | undefined;
213
+ model?: string | undefined;
214
+ headers?: Record<string, string> | undefined;
215
+ request?: Record<string, any> | undefined;
216
+ timestamp?: Date | undefined;
217
+ modelMetadata?: {
218
+ modelId: string;
219
+ modelVersion: string;
220
+ modelProvider: string;
221
+ } | undefined;
222
+ };
209
223
  output: {
210
224
  usage: {
211
225
  inputTokens: number;
@@ -217,8 +231,8 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
217
231
  steps: any[];
218
232
  text?: string | undefined;
219
233
  reasoning?: any[] | undefined;
220
- files?: any[] | undefined;
221
234
  sources?: any[] | undefined;
235
+ files?: any[] | undefined;
222
236
  toolCalls?: any[] | undefined;
223
237
  toolResults?: any[] | undefined;
224
238
  reasoningText?: string | undefined;
@@ -233,20 +247,6 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
233
247
  all: any[];
234
248
  nonUser: any[];
235
249
  };
236
- metadata: {
237
- id?: string | undefined;
238
- providerMetadata?: Record<string, any> | undefined;
239
- modelId?: string | undefined;
240
- model?: string | undefined;
241
- headers?: Record<string, string> | undefined;
242
- request?: Record<string, any> | undefined;
243
- timestamp?: Date | undefined;
244
- modelMetadata?: {
245
- modelId: string;
246
- modelVersion: string;
247
- modelProvider: string;
248
- } | undefined;
249
- };
250
250
  stepResult: {
251
251
  reason: string;
252
252
  isContinued: boolean;
@@ -264,6 +264,20 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
264
264
  } | undefined;
265
265
  };
266
266
  }, {
267
+ metadata: {
268
+ id?: string | undefined;
269
+ providerMetadata?: Record<string, any> | undefined;
270
+ modelId?: string | undefined;
271
+ model?: string | undefined;
272
+ headers?: Record<string, string> | undefined;
273
+ request?: Record<string, any> | undefined;
274
+ timestamp?: Date | undefined;
275
+ modelMetadata?: {
276
+ modelId: string;
277
+ modelVersion: string;
278
+ modelProvider: string;
279
+ } | undefined;
280
+ };
267
281
  output: {
268
282
  usage: {
269
283
  inputTokens: number;
@@ -275,8 +289,8 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
275
289
  steps: any[];
276
290
  text?: string | undefined;
277
291
  reasoning?: any[] | undefined;
278
- files?: any[] | undefined;
279
292
  sources?: any[] | undefined;
293
+ files?: any[] | undefined;
280
294
  toolCalls?: any[] | undefined;
281
295
  toolResults?: any[] | undefined;
282
296
  reasoningText?: string | undefined;
@@ -291,20 +305,6 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
291
305
  all: any[];
292
306
  nonUser: any[];
293
307
  };
294
- metadata: {
295
- id?: string | undefined;
296
- providerMetadata?: Record<string, any> | undefined;
297
- modelId?: string | undefined;
298
- model?: string | undefined;
299
- headers?: Record<string, string> | undefined;
300
- request?: Record<string, any> | undefined;
301
- timestamp?: Date | undefined;
302
- modelMetadata?: {
303
- modelId: string;
304
- modelVersion: string;
305
- modelProvider: string;
306
- } | undefined;
307
- };
308
308
  stepResult: {
309
309
  reason: string;
310
310
  isContinued: boolean;
@@ -379,8 +379,8 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
379
379
  steps: any[];
380
380
  text?: string | undefined;
381
381
  reasoning?: any[] | undefined;
382
- files?: any[] | undefined;
383
382
  sources?: any[] | undefined;
383
+ files?: any[] | undefined;
384
384
  toolCalls?: any[] | undefined;
385
385
  toolResults?: any[] | undefined;
386
386
  reasoningText?: string | undefined;
@@ -399,8 +399,8 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
399
399
  steps: any[];
400
400
  text?: string | undefined;
401
401
  reasoning?: any[] | undefined;
402
- files?: any[] | undefined;
403
402
  sources?: any[] | undefined;
403
+ files?: any[] | undefined;
404
404
  toolCalls?: any[] | undefined;
405
405
  toolResults?: any[] | undefined;
406
406
  reasoningText?: string | undefined;
@@ -516,6 +516,20 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
516
516
  } | undefined;
517
517
  }>;
518
518
  }, "strip", import("zod").ZodTypeAny, {
519
+ metadata: {
520
+ id?: string | undefined;
521
+ providerMetadata?: Record<string, any> | undefined;
522
+ modelId?: string | undefined;
523
+ model?: string | undefined;
524
+ headers?: Record<string, string> | undefined;
525
+ request?: Record<string, any> | undefined;
526
+ timestamp?: Date | undefined;
527
+ modelMetadata?: {
528
+ modelId: string;
529
+ modelVersion: string;
530
+ modelProvider: string;
531
+ } | undefined;
532
+ };
519
533
  output: {
520
534
  usage: {
521
535
  inputTokens: number;
@@ -527,8 +541,8 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
527
541
  steps: any[];
528
542
  text?: string | undefined;
529
543
  reasoning?: any[] | undefined;
530
- files?: any[] | undefined;
531
544
  sources?: any[] | undefined;
545
+ files?: any[] | undefined;
532
546
  toolCalls?: any[] | undefined;
533
547
  toolResults?: any[] | undefined;
534
548
  reasoningText?: string | undefined;
@@ -543,20 +557,6 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
543
557
  all: any[];
544
558
  nonUser: any[];
545
559
  };
546
- metadata: {
547
- id?: string | undefined;
548
- providerMetadata?: Record<string, any> | undefined;
549
- modelId?: string | undefined;
550
- model?: string | undefined;
551
- headers?: Record<string, string> | undefined;
552
- request?: Record<string, any> | undefined;
553
- timestamp?: Date | undefined;
554
- modelMetadata?: {
555
- modelId: string;
556
- modelVersion: string;
557
- modelProvider: string;
558
- } | undefined;
559
- };
560
560
  stepResult: {
561
561
  reason: string;
562
562
  isContinued: boolean;
@@ -574,6 +574,20 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
574
574
  } | undefined;
575
575
  };
576
576
  }, {
577
+ metadata: {
578
+ id?: string | undefined;
579
+ providerMetadata?: Record<string, any> | undefined;
580
+ modelId?: string | undefined;
581
+ model?: string | undefined;
582
+ headers?: Record<string, string> | undefined;
583
+ request?: Record<string, any> | undefined;
584
+ timestamp?: Date | undefined;
585
+ modelMetadata?: {
586
+ modelId: string;
587
+ modelVersion: string;
588
+ modelProvider: string;
589
+ } | undefined;
590
+ };
577
591
  output: {
578
592
  usage: {
579
593
  inputTokens: number;
@@ -585,8 +599,8 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
585
599
  steps: any[];
586
600
  text?: string | undefined;
587
601
  reasoning?: any[] | undefined;
588
- files?: any[] | undefined;
589
602
  sources?: any[] | undefined;
603
+ files?: any[] | undefined;
590
604
  toolCalls?: any[] | undefined;
591
605
  toolResults?: any[] | undefined;
592
606
  reasoningText?: string | undefined;
@@ -601,20 +615,6 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
601
615
  all: any[];
602
616
  nonUser: any[];
603
617
  };
604
- metadata: {
605
- id?: string | undefined;
606
- providerMetadata?: Record<string, any> | undefined;
607
- modelId?: string | undefined;
608
- model?: string | undefined;
609
- headers?: Record<string, string> | undefined;
610
- request?: Record<string, any> | undefined;
611
- timestamp?: Date | undefined;
612
- modelMetadata?: {
613
- modelId: string;
614
- modelVersion: string;
615
- modelProvider: string;
616
- } | undefined;
617
- };
618
618
  stepResult: {
619
619
  reason: string;
620
620
  isContinued: boolean;
@@ -689,8 +689,8 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
689
689
  steps: any[];
690
690
  text?: string | undefined;
691
691
  reasoning?: any[] | undefined;
692
- files?: any[] | undefined;
693
692
  sources?: any[] | undefined;
693
+ files?: any[] | undefined;
694
694
  toolCalls?: any[] | undefined;
695
695
  toolResults?: any[] | undefined;
696
696
  reasoningText?: string | undefined;
@@ -709,8 +709,8 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
709
709
  steps: any[];
710
710
  text?: string | undefined;
711
711
  reasoning?: any[] | undefined;
712
- files?: any[] | undefined;
713
712
  sources?: any[] | undefined;
713
+ files?: any[] | undefined;
714
714
  toolCalls?: any[] | undefined;
715
715
  toolResults?: any[] | undefined;
716
716
  reasoningText?: string | undefined;
@@ -826,6 +826,20 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
826
826
  } | undefined;
827
827
  }>;
828
828
  }, "strip", import("zod").ZodTypeAny, {
829
+ metadata: {
830
+ id?: string | undefined;
831
+ providerMetadata?: Record<string, any> | undefined;
832
+ modelId?: string | undefined;
833
+ model?: string | undefined;
834
+ headers?: Record<string, string> | undefined;
835
+ request?: Record<string, any> | undefined;
836
+ timestamp?: Date | undefined;
837
+ modelMetadata?: {
838
+ modelId: string;
839
+ modelVersion: string;
840
+ modelProvider: string;
841
+ } | undefined;
842
+ };
829
843
  output: {
830
844
  usage: {
831
845
  inputTokens: number;
@@ -837,8 +851,8 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
837
851
  steps: any[];
838
852
  text?: string | undefined;
839
853
  reasoning?: any[] | undefined;
840
- files?: any[] | undefined;
841
854
  sources?: any[] | undefined;
855
+ files?: any[] | undefined;
842
856
  toolCalls?: any[] | undefined;
843
857
  toolResults?: any[] | undefined;
844
858
  reasoningText?: string | undefined;
@@ -853,20 +867,6 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
853
867
  all: any[];
854
868
  nonUser: any[];
855
869
  };
856
- metadata: {
857
- id?: string | undefined;
858
- providerMetadata?: Record<string, any> | undefined;
859
- modelId?: string | undefined;
860
- model?: string | undefined;
861
- headers?: Record<string, string> | undefined;
862
- request?: Record<string, any> | undefined;
863
- timestamp?: Date | undefined;
864
- modelMetadata?: {
865
- modelId: string;
866
- modelVersion: string;
867
- modelProvider: string;
868
- } | undefined;
869
- };
870
870
  stepResult: {
871
871
  reason: string;
872
872
  isContinued: boolean;
@@ -884,6 +884,20 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
884
884
  } | undefined;
885
885
  };
886
886
  }, {
887
+ metadata: {
888
+ id?: string | undefined;
889
+ providerMetadata?: Record<string, any> | undefined;
890
+ modelId?: string | undefined;
891
+ model?: string | undefined;
892
+ headers?: Record<string, string> | undefined;
893
+ request?: Record<string, any> | undefined;
894
+ timestamp?: Date | undefined;
895
+ modelMetadata?: {
896
+ modelId: string;
897
+ modelVersion: string;
898
+ modelProvider: string;
899
+ } | undefined;
900
+ };
887
901
  output: {
888
902
  usage: {
889
903
  inputTokens: number;
@@ -895,8 +909,8 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
895
909
  steps: any[];
896
910
  text?: string | undefined;
897
911
  reasoning?: any[] | undefined;
898
- files?: any[] | undefined;
899
912
  sources?: any[] | undefined;
913
+ files?: any[] | undefined;
900
914
  toolCalls?: any[] | undefined;
901
915
  toolResults?: any[] | undefined;
902
916
  reasoningText?: string | undefined;
@@ -911,20 +925,6 @@ export declare function createAgenticLoopWorkflow<Tools extends ToolSet = ToolSe
911
925
  all: any[];
912
926
  nonUser: any[];
913
927
  };
914
- metadata: {
915
- id?: string | undefined;
916
- providerMetadata?: Record<string, any> | undefined;
917
- modelId?: string | undefined;
918
- model?: string | undefined;
919
- headers?: Record<string, string> | undefined;
920
- request?: Record<string, any> | undefined;
921
- timestamp?: Date | undefined;
922
- modelMetadata?: {
923
- modelId: string;
924
- modelVersion: string;
925
- modelProvider: string;
926
- } | undefined;
927
- };
928
928
  stepResult: {
929
929
  reason: string;
930
930
  isContinued: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/loop/workflows/agentic-loop/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAc,OAAO,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAM3C,UAAU,iBAAiB,CAAC,KAAK,SAAS,OAAO,GAAG,OAAO,EAAE,MAAM,SAAS,YAAY,GAAG,SAAS,CAClG,SAAQ,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;IAC9B,UAAU,EAAE,+BAA+B,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/D,MAAM,EAAE,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;CAC3C;AAED,wBAAgB,yBAAyB,CAAC,KAAK,SAAS,OAAO,GAAG,OAAO,EAAE,MAAM,SAAS,YAAY,GAAG,SAAS,EAChH,MAAM,EAAE,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuHzC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/loop/workflows/agentic-loop/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAc,OAAO,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAM3C,UAAU,iBAAiB,CAAC,KAAK,SAAS,OAAO,GAAG,OAAO,EAAE,MAAM,SAAS,YAAY,GAAG,SAAS,CAClG,SAAQ,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;IAC9B,UAAU,EAAE,+BAA+B,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/D,MAAM,EAAE,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;CAC3C;AAED,wBAAgB,yBAAyB,CAAC,KAAK,SAAS,OAAO,GAAG,OAAO,EAAE,MAAM,SAAS,YAAY,GAAG,SAAS,EAChH,MAAM,EAAE,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuHzC"}
@@ -171,8 +171,8 @@ export declare const llmIterationOutputSchema: z.ZodObject<{
171
171
  steps: any[];
172
172
  text?: string | undefined;
173
173
  reasoning?: any[] | undefined;
174
- files?: any[] | undefined;
175
174
  sources?: any[] | undefined;
175
+ files?: any[] | undefined;
176
176
  toolCalls?: any[] | undefined;
177
177
  toolResults?: any[] | undefined;
178
178
  reasoningText?: string | undefined;
@@ -191,8 +191,8 @@ export declare const llmIterationOutputSchema: z.ZodObject<{
191
191
  steps: any[];
192
192
  text?: string | undefined;
193
193
  reasoning?: any[] | undefined;
194
- files?: any[] | undefined;
195
194
  sources?: any[] | undefined;
195
+ files?: any[] | undefined;
196
196
  toolCalls?: any[] | undefined;
197
197
  toolResults?: any[] | undefined;
198
198
  reasoningText?: string | undefined;
@@ -308,6 +308,20 @@ export declare const llmIterationOutputSchema: z.ZodObject<{
308
308
  } | undefined;
309
309
  }>;
310
310
  }, "strip", z.ZodTypeAny, {
311
+ metadata: {
312
+ id?: string | undefined;
313
+ providerMetadata?: Record<string, any> | undefined;
314
+ modelId?: string | undefined;
315
+ model?: string | undefined;
316
+ headers?: Record<string, string> | undefined;
317
+ request?: Record<string, any> | undefined;
318
+ timestamp?: Date | undefined;
319
+ modelMetadata?: {
320
+ modelId: string;
321
+ modelVersion: string;
322
+ modelProvider: string;
323
+ } | undefined;
324
+ };
311
325
  output: {
312
326
  usage: {
313
327
  inputTokens: number;
@@ -319,8 +333,8 @@ export declare const llmIterationOutputSchema: z.ZodObject<{
319
333
  steps: any[];
320
334
  text?: string | undefined;
321
335
  reasoning?: any[] | undefined;
322
- files?: any[] | undefined;
323
336
  sources?: any[] | undefined;
337
+ files?: any[] | undefined;
324
338
  toolCalls?: any[] | undefined;
325
339
  toolResults?: any[] | undefined;
326
340
  reasoningText?: string | undefined;
@@ -335,20 +349,6 @@ export declare const llmIterationOutputSchema: z.ZodObject<{
335
349
  all: any[];
336
350
  nonUser: any[];
337
351
  };
338
- metadata: {
339
- id?: string | undefined;
340
- providerMetadata?: Record<string, any> | undefined;
341
- modelId?: string | undefined;
342
- model?: string | undefined;
343
- headers?: Record<string, string> | undefined;
344
- request?: Record<string, any> | undefined;
345
- timestamp?: Date | undefined;
346
- modelMetadata?: {
347
- modelId: string;
348
- modelVersion: string;
349
- modelProvider: string;
350
- } | undefined;
351
- };
352
352
  stepResult: {
353
353
  reason: string;
354
354
  isContinued: boolean;
@@ -366,6 +366,20 @@ export declare const llmIterationOutputSchema: z.ZodObject<{
366
366
  } | undefined;
367
367
  };
368
368
  }, {
369
+ metadata: {
370
+ id?: string | undefined;
371
+ providerMetadata?: Record<string, any> | undefined;
372
+ modelId?: string | undefined;
373
+ model?: string | undefined;
374
+ headers?: Record<string, string> | undefined;
375
+ request?: Record<string, any> | undefined;
376
+ timestamp?: Date | undefined;
377
+ modelMetadata?: {
378
+ modelId: string;
379
+ modelVersion: string;
380
+ modelProvider: string;
381
+ } | undefined;
382
+ };
369
383
  output: {
370
384
  usage: {
371
385
  inputTokens: number;
@@ -377,8 +391,8 @@ export declare const llmIterationOutputSchema: z.ZodObject<{
377
391
  steps: any[];
378
392
  text?: string | undefined;
379
393
  reasoning?: any[] | undefined;
380
- files?: any[] | undefined;
381
394
  sources?: any[] | undefined;
395
+ files?: any[] | undefined;
382
396
  toolCalls?: any[] | undefined;
383
397
  toolResults?: any[] | undefined;
384
398
  reasoningText?: string | undefined;
@@ -393,20 +407,6 @@ export declare const llmIterationOutputSchema: z.ZodObject<{
393
407
  all: any[];
394
408
  nonUser: any[];
395
409
  };
396
- metadata: {
397
- id?: string | undefined;
398
- providerMetadata?: Record<string, any> | undefined;
399
- modelId?: string | undefined;
400
- model?: string | undefined;
401
- headers?: Record<string, string> | undefined;
402
- request?: Record<string, any> | undefined;
403
- timestamp?: Date | undefined;
404
- modelMetadata?: {
405
- modelId: string;
406
- modelVersion: string;
407
- modelProvider: string;
408
- } | undefined;
409
- };
410
410
  stepResult: {
411
411
  reason: string;
412
412
  isContinued: boolean;
@@ -1,4 +1,4 @@
1
- import { ReadableStream } from 'stream/web';
1
+ import { ReadableStream } from 'node:stream/web';
2
2
  import type { ToolSet } from 'ai-v5';
3
3
  import type { OutputSchema } from '../../stream/base/schema.js';
4
4
  import type { ChunkType } from '../../stream/types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../src/loop/workflows/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAkB,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGxC;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,+BAA+B,CAAC,GAAG,CAAC,GAAG,OAAO,CAE1F;AAED,wBAAgB,kBAAkB,CAChC,KAAK,SAAS,OAAO,GAAG,OAAO,EAC/B,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,EACA,aAAa,EACb,mBAAmB,EACnB,MAAM,EACN,UAAU,EACV,aAAa,EACb,SAAS,EACT,SAAS,EACT,KAAK,EACL,WAAW,EACX,cAAc,EACd,WAAW,EACX,OAAO,EACP,UAAU,EACV,GAAG,IAAI,EACR,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,qCA8GxB"}
1
+ {"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../src/loop/workflows/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAkB,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGxC;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,+BAA+B,CAAC,GAAG,CAAC,GAAG,OAAO,CAE1F;AAED,wBAAgB,kBAAkB,CAChC,KAAK,SAAS,OAAO,GAAG,OAAO,EAC/B,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,EACA,aAAa,EACb,mBAAmB,EACnB,MAAM,EACN,UAAU,EACV,aAAa,EACb,SAAS,EACT,SAAS,EACT,KAAK,EACL,WAAW,EACX,cAAc,EACd,WAAW,EACX,OAAO,EACP,UAAU,EACV,GAAG,IAAI,EACR,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,qCA8GxB"}
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkIWB65P37_cjs = require('../chunk-IWB65P37.cjs');
3
+ var chunkOIMB2SNZ_cjs = require('../chunk-OIMB2SNZ.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Mastra", {
8
8
  enumerable: true,
9
- get: function () { return chunkIWB65P37_cjs.Mastra; }
9
+ get: function () { return chunkOIMB2SNZ_cjs.Mastra; }
10
10
  });
11
11
  //# sourceMappingURL=index.cjs.map
12
12
  //# sourceMappingURL=index.cjs.map
@@ -11,6 +11,7 @@ import type { IMastraLogger } from '../logger/index.js';
11
11
  import type { MCPServerBase } from '../mcp/index.js';
12
12
  import type { ObservabilityEntrypoint } from '../observability/index.js';
13
13
  import type { Processor } from '../processors/index.js';
14
+ import type { MastraServerBase } from '../server/base.js';
14
15
  import type { Middleware, ServerConfig } from '../server/types.js';
15
16
  import type { MastraStorage, WorkflowRuns } from '../storage/index.js';
16
17
  import type { ToolAction } from '../tools/index.js';
@@ -49,7 +50,7 @@ import type { Workflow } from '../workflows/index.js';
49
50
  * });
50
51
  * ```
51
52
  */
52
- export interface Config<TAgents extends Record<string, Agent<any>> = Record<string, Agent<any>>, TWorkflows extends Record<string, Workflow<any, any, any, any, any, any>> = Record<string, Workflow<any, any, any, any, any, any>>, TVectors extends Record<string, MastraVector<any>> = Record<string, MastraVector<any>>, TTTS extends Record<string, MastraTTS> = Record<string, MastraTTS>, TLogger extends IMastraLogger = IMastraLogger, TMCPServers extends Record<string, MCPServerBase> = Record<string, MCPServerBase>, TScorers extends Record<string, MastraScorer<any, any, any, any>> = Record<string, MastraScorer<any, any, any, any>>, TTools extends Record<string, ToolAction<any, any, any, any>> = Record<string, ToolAction<any, any, any, any>>, TProcessors extends Record<string, Processor> = Record<string, Processor>> {
53
+ export interface Config<TAgents extends Record<string, Agent<any>> = Record<string, Agent<any>>, TWorkflows extends Record<string, Workflow<any, any, any, any, any, any>> = Record<string, Workflow<any, any, any, any, any, any>>, TVectors extends Record<string, MastraVector<any>> = Record<string, MastraVector<any>>, TTTS extends Record<string, MastraTTS> = Record<string, MastraTTS>, TLogger extends IMastraLogger = IMastraLogger, TMCPServers extends Record<string, MCPServerBase<any>> = Record<string, MCPServerBase<any>>, TScorers extends Record<string, MastraScorer<any, any, any, any>> = Record<string, MastraScorer<any, any, any, any>>, TTools extends Record<string, ToolAction<any, any, any, any, any, any>> = Record<string, ToolAction<any, any, any, any, any, any>>, TProcessors extends Record<string, Processor<any>> = Record<string, Processor<any>>> {
53
54
  /**
54
55
  * Agents are autonomous systems that can make decisions and take actions.
55
56
  */
@@ -178,7 +179,7 @@ export interface Config<TAgents extends Record<string, Agent<any>> = Record<stri
178
179
  * });
179
180
  * ```
180
181
  */
181
- export declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string, Agent<any>>, TWorkflows extends Record<string, Workflow<any, any, any, any, any, any>> = Record<string, Workflow<any, any, any, any, any, any>>, TVectors extends Record<string, MastraVector<any>> = Record<string, MastraVector<any>>, TTTS extends Record<string, MastraTTS> = Record<string, MastraTTS>, TLogger extends IMastraLogger = IMastraLogger, TMCPServers extends Record<string, MCPServerBase> = Record<string, MCPServerBase>, TScorers extends Record<string, MastraScorer<any, any, any, any>> = Record<string, MastraScorer<any, any, any, any>>, TTools extends Record<string, ToolAction<any, any, any, any>> = Record<string, ToolAction<any, any, any, any>>, TProcessors extends Record<string, Processor> = Record<string, Processor>> {
182
+ export declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<string, Agent<any>>, TWorkflows extends Record<string, Workflow<any, any, any, any, any, any>> = Record<string, Workflow<any, any, any, any, any, any>>, TVectors extends Record<string, MastraVector<any>> = Record<string, MastraVector<any>>, TTTS extends Record<string, MastraTTS> = Record<string, MastraTTS>, TLogger extends IMastraLogger = IMastraLogger, TMCPServers extends Record<string, MCPServerBase<any>> = Record<string, MCPServerBase<any>>, TScorers extends Record<string, MastraScorer<any, any, any, any>> = Record<string, MastraScorer<any, any, any, any>>, TTools extends Record<string, ToolAction<any, any, any, any, any, any>> = Record<string, ToolAction<any, any, any, any, any, any>>, TProcessors extends Record<string, Processor<any>> = Record<string, Processor<any>>> {
182
183
  #private;
183
184
  get pubsub(): PubSub;
184
185
  /**
@@ -301,7 +302,7 @@ export declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<
301
302
  * const sameAgent = mastra.getAgentById(assistant.id);
302
303
  * ```
303
304
  */
304
- getAgentById(id: string): Agent;
305
+ getAgentById<TAgentName extends keyof TAgents>(id: TAgents[TAgentName]['id']): TAgents[TAgentName];
305
306
  /**
306
307
  * Returns all registered agents as a record keyed by their names.
307
308
  *
@@ -402,7 +403,7 @@ export declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<
402
403
  * const vectorStore = mastra.getVectorById('chroma-123');
403
404
  * ```
404
405
  */
405
- getVectorById(id: string): MastraVector;
406
+ getVectorById<TVectorName extends keyof TVectors>(id: TVectors[TVectorName]['id']): TVectors[TVectorName];
406
407
  /**
407
408
  * Returns all registered vector stores as a record keyed by their names.
408
409
  *
@@ -532,7 +533,7 @@ export declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<
532
533
  * console.log(sameWorkflow.name); // "process-data"
533
534
  * ```
534
535
  */
535
- getWorkflowById(id: string): Workflow;
536
+ getWorkflowById<TWorkflowName extends keyof TWorkflows>(id: TWorkflows[TWorkflowName]['id']): TWorkflows[TWorkflowName];
536
537
  listActiveWorkflowRuns(): Promise<WorkflowRuns>;
537
538
  restartAllActiveWorkflowRuns(): Promise<void>;
538
539
  /**
@@ -645,7 +646,7 @@ export declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<
645
646
  * });
646
647
  * ```
647
648
  */
648
- getScorerById(id: string): MastraScorer<any, any, any, any>;
649
+ getScorerById<TScorerName extends keyof TScorers>(id: TScorers[TScorerName]['id']): TScorers[TScorerName];
649
650
  /**
650
651
  * Retrieves a specific tool by registration key.
651
652
  *
@@ -680,7 +681,7 @@ export declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<
680
681
  * const tool = mastra.getToolById('calculator-tool-id');
681
682
  * ```
682
683
  */
683
- getToolById(id: string): ToolAction<any, any, any, any>;
684
+ getToolById<TToolName extends keyof TTools>(id: TTools[TToolName]['id']): TTools[TToolName];
684
685
  /**
685
686
  * Lists all configured tools.
686
687
  *
@@ -755,7 +756,7 @@ export declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<
755
756
  * const processor = mastra.getProcessorById('validator-processor-id');
756
757
  * ```
757
758
  */
758
- getProcessorById(id: string): Processor;
759
+ getProcessorById<TProcessorName extends keyof TProcessors>(id: TProcessors[TProcessorName]['id']): TProcessors[TProcessorName];
759
760
  /**
760
761
  * Lists all configured processors.
761
762
  *
@@ -935,6 +936,60 @@ export declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<
935
936
  getServerCache(): MastraServerCache;
936
937
  setServerMiddleware(serverMiddleware: Middleware | Middleware[]): void;
937
938
  getServer(): ServerConfig | undefined;
939
+ /**
940
+ * Sets the server adapter for this Mastra instance.
941
+ *
942
+ * The server adapter provides access to the underlying server app (e.g., Hono, Express)
943
+ * and allows users to call routes directly via `app.fetch()` instead of making HTTP requests.
944
+ *
945
+ * This is typically called by `createHonoServer` or similar factory functions during
946
+ * server initialization.
947
+ *
948
+ * @param adapter - The server adapter instance (e.g., MastraServer from @mastra/hono or @mastra/express)
949
+ *
950
+ * @example
951
+ * ```typescript
952
+ * const app = new Hono();
953
+ * const adapter = new MastraServer({ app, mastra });
954
+ * mastra.setMastraServer(adapter);
955
+ * ```
956
+ */
957
+ setMastraServer(adapter: MastraServerBase): void;
958
+ /**
959
+ * Gets the server adapter for this Mastra instance.
960
+ *
961
+ * @returns The server adapter, or undefined if not set
962
+ *
963
+ * @example
964
+ * ```typescript
965
+ * const adapter = mastra.getMastraServer();
966
+ * if (adapter) {
967
+ * const app = adapter.getApp<Hono>();
968
+ * }
969
+ * ```
970
+ */
971
+ getMastraServer(): MastraServerBase | undefined;
972
+ /**
973
+ * Gets the server app from the server adapter.
974
+ *
975
+ * This is a convenience method that calls `getMastraServer()?.getApp<T>()`.
976
+ * Use this to access the underlying server framework's app instance (e.g., Hono, Express)
977
+ * for direct operations like calling routes via `app.fetch()`.
978
+ *
979
+ * @template T - The expected type of the app (e.g., Hono, Express Application)
980
+ * @returns The server app, or undefined if no adapter is set
981
+ *
982
+ * @example
983
+ * ```typescript
984
+ * // After createHonoServer() is called:
985
+ * const app = mastra.getServerApp<Hono>();
986
+ *
987
+ * // Call routes directly without HTTP overhead
988
+ * const response = await app?.fetch(new Request('http://localhost/health'));
989
+ * const data = await response?.json();
990
+ * ```
991
+ */
992
+ getServerApp<T = unknown>(): T | undefined;
938
993
  getBundlerConfig(): BundlerConfig | undefined;
939
994
  listLogsByRunId({ runId, transportId, fromDate, toDate, logLevel, filters, page, perPage, }: {
940
995
  runId: string;
@@ -1050,7 +1105,7 @@ export declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<
1050
1105
  * }
1051
1106
  * ```
1052
1107
  */
1053
- getMCPServerById(serverId: string, version?: string): MCPServerBase | undefined;
1108
+ getMCPServerById<TMCPServerName extends keyof TMCPServers>(serverId: TMCPServers[TMCPServerName]['id'], version?: string): TMCPServers[TMCPServerName] | undefined;
1054
1109
  addTopicListener(topic: string, listener: (event: any) => Promise<void>): Promise<void>;
1055
1110
  removeTopicListener(topic: string, listener: (event: any) => Promise<void>): Promise<void>;
1056
1111
  startEventEngine(): Promise<void>;