@mastra/core 1.9.0 → 1.10.0

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 (438) hide show
  1. package/CHANGELOG.md +202 -0
  2. package/dist/agent/agent.d.ts +22 -3
  3. package/dist/agent/agent.d.ts.map +1 -1
  4. package/dist/agent/index.cjs +13 -13
  5. package/dist/agent/index.js +2 -2
  6. package/dist/agent/message-list/index.cjs +18 -18
  7. package/dist/agent/message-list/index.js +1 -1
  8. package/dist/agent/message-list/message-list.d.ts.map +1 -1
  9. package/dist/{chunk-IOY7Y5GV.js → chunk-3VVNJPTO.js} +602 -187
  10. package/dist/chunk-3VVNJPTO.js.map +1 -0
  11. package/dist/{chunk-VDKWYUGC.cjs → chunk-5WBEMKE2.cjs} +7 -3
  12. package/dist/chunk-5WBEMKE2.cjs.map +1 -0
  13. package/dist/{chunk-H5S4PS44.cjs → chunk-76Q75VI4.cjs} +602 -187
  14. package/dist/chunk-76Q75VI4.cjs.map +1 -0
  15. package/dist/{chunk-ZBESCKPX.cjs → chunk-7AHCLTZZ.cjs} +1572 -36
  16. package/dist/chunk-7AHCLTZZ.cjs.map +1 -0
  17. package/dist/{chunk-SEKQJ447.js → chunk-ACAILOJE.js} +166 -68
  18. package/dist/chunk-ACAILOJE.js.map +1 -0
  19. package/dist/{chunk-YIJZBU54.cjs → chunk-BCSVBOAN.cjs} +240 -463
  20. package/dist/chunk-BCSVBOAN.cjs.map +1 -0
  21. package/dist/{chunk-ZVWVQ6MG.js → chunk-CY4ZWL2X.js} +8 -3
  22. package/dist/chunk-CY4ZWL2X.js.map +1 -0
  23. package/dist/{chunk-ET7GXCHS.js → chunk-DIKRJVK6.js} +5 -5
  24. package/dist/{chunk-ET7GXCHS.js.map → chunk-DIKRJVK6.js.map} +1 -1
  25. package/dist/{chunk-P6ZX7OKT.cjs → chunk-E6I5LBDM.cjs} +7 -7
  26. package/dist/{chunk-P6ZX7OKT.cjs.map → chunk-E6I5LBDM.cjs.map} +1 -1
  27. package/dist/{chunk-BFV3GSGS.js → chunk-FT5Q6XTK.js} +1546 -22
  28. package/dist/chunk-FT5Q6XTK.js.map +1 -0
  29. package/dist/{chunk-K54LFB4P.js → chunk-FXOWXS4O.js} +3 -3
  30. package/dist/{chunk-K54LFB4P.js.map → chunk-FXOWXS4O.js.map} +1 -1
  31. package/dist/{chunk-QNXY3J6B.cjs → chunk-GCRPNAAR.cjs} +22 -19
  32. package/dist/chunk-GCRPNAAR.cjs.map +1 -0
  33. package/dist/{chunk-5M3RMO7U.js → chunk-GTA5BKXZ.js} +8 -8
  34. package/dist/{chunk-5M3RMO7U.js.map → chunk-GTA5BKXZ.js.map} +1 -1
  35. package/dist/{chunk-G5R2755Q.cjs → chunk-HAIQ57YB.cjs} +53 -20
  36. package/dist/chunk-HAIQ57YB.cjs.map +1 -0
  37. package/dist/{chunk-3ZBLD2Y4.cjs → chunk-HH76UOJL.cjs} +2 -2
  38. package/dist/{chunk-3ZBLD2Y4.cjs.map → chunk-HH76UOJL.cjs.map} +1 -1
  39. package/dist/{chunk-HAGCXIBX.cjs → chunk-HNYQITSV.cjs} +9 -9
  40. package/dist/{chunk-HAGCXIBX.cjs.map → chunk-HNYQITSV.cjs.map} +1 -1
  41. package/dist/{chunk-GJTLWOKJ.js → chunk-HQA3IBLZ.js} +51 -18
  42. package/dist/chunk-HQA3IBLZ.js.map +1 -0
  43. package/dist/{chunk-4BXXAZ75.js → chunk-HQTHWVAK.js} +15 -7
  44. package/dist/chunk-HQTHWVAK.js.map +1 -0
  45. package/dist/{chunk-CCLV5CAA.js → chunk-JGOH7RWL.js} +7 -3
  46. package/dist/chunk-JGOH7RWL.js.map +1 -0
  47. package/dist/{chunk-Y6TGIUGL.js → chunk-LSF5WJ6G.js} +2 -2
  48. package/dist/{chunk-Y6TGIUGL.js.map → chunk-LSF5WJ6G.js.map} +1 -1
  49. package/dist/{chunk-D6HO5QAM.cjs → chunk-M26GEN4C.cjs} +14 -9
  50. package/dist/chunk-M26GEN4C.cjs.map +1 -0
  51. package/dist/{chunk-4P35AVPE.cjs → chunk-MEMYFFOL.cjs} +256 -157
  52. package/dist/chunk-MEMYFFOL.cjs.map +1 -0
  53. package/dist/{chunk-BQ355Z3O.js → chunk-NUZWQA4J.js} +4 -4
  54. package/dist/{chunk-BQ355Z3O.js.map → chunk-NUZWQA4J.js.map} +1 -1
  55. package/dist/{chunk-JIRB5LX4.js → chunk-OHX36YXF.js} +5 -3
  56. package/dist/chunk-OHX36YXF.js.map +1 -0
  57. package/dist/{chunk-PKORY4ZZ.cjs → chunk-OOTLMVNN.cjs} +107 -7
  58. package/dist/chunk-OOTLMVNN.cjs.map +1 -0
  59. package/dist/{chunk-D4M6E4OQ.cjs → chunk-OWZ6QT24.cjs} +16 -8
  60. package/dist/chunk-OWZ6QT24.cjs.map +1 -0
  61. package/dist/{chunk-6OHS6ZQ3.js → chunk-PDJCIONR.js} +8 -8
  62. package/dist/{chunk-6OHS6ZQ3.js.map → chunk-PDJCIONR.js.map} +1 -1
  63. package/dist/{chunk-WU2P7XOU.cjs → chunk-PP4G2TZZ.cjs} +20 -20
  64. package/dist/{chunk-WU2P7XOU.cjs.map → chunk-PP4G2TZZ.cjs.map} +1 -1
  65. package/dist/{chunk-VWAK25TU.js → chunk-SBBWRNZA.js} +10 -7
  66. package/dist/chunk-SBBWRNZA.js.map +1 -0
  67. package/dist/{chunk-TU4YMXOQ.js → chunk-TJIFNVPX.js} +6 -6
  68. package/dist/{chunk-TU4YMXOQ.js.map → chunk-TJIFNVPX.js.map} +1 -1
  69. package/dist/{chunk-V5YNS2QO.cjs → chunk-XJNQHPBJ.cjs} +15 -15
  70. package/dist/{chunk-V5YNS2QO.cjs.map → chunk-XJNQHPBJ.cjs.map} +1 -1
  71. package/dist/{chunk-MVYP55NA.js → chunk-YC6Z75K2.js} +113 -336
  72. package/dist/chunk-YC6Z75K2.js.map +1 -0
  73. package/dist/{chunk-3ZF7IC6Q.cjs → chunk-YZMSJKAK.cjs} +5 -3
  74. package/dist/chunk-YZMSJKAK.cjs.map +1 -0
  75. package/dist/{chunk-L3WDI7HP.cjs → chunk-Z2X5VTYJ.cjs} +65 -65
  76. package/dist/{chunk-L3WDI7HP.cjs.map → chunk-Z2X5VTYJ.cjs.map} +1 -1
  77. package/dist/{chunk-BN5MV2QK.cjs → chunk-Z52OAJ73.cjs} +4 -4
  78. package/dist/{chunk-BN5MV2QK.cjs.map → chunk-Z52OAJ73.cjs.map} +1 -1
  79. package/dist/{chunk-WYPSC6CO.js → chunk-ZBU6P4JV.js} +104 -4
  80. package/dist/chunk-ZBU6P4JV.js.map +1 -0
  81. package/dist/datasets/experiment/index.d.ts.map +1 -1
  82. package/dist/datasets/experiment/scorer.d.ts.map +1 -1
  83. package/dist/datasets/index.cjs +17 -17
  84. package/dist/datasets/index.js +2 -2
  85. package/dist/di/index.cjs +4 -4
  86. package/dist/di/index.js +1 -1
  87. package/dist/docs/SKILL.md +1 -1
  88. package/dist/docs/assets/SOURCE_MAP.json +443 -384
  89. package/dist/docs/references/docs-agents-agent-approval.md +61 -31
  90. package/dist/docs/references/docs-agents-supervisor-agents.md +1 -1
  91. package/dist/docs/references/docs-memory-observational-memory.md +9 -0
  92. package/dist/docs/references/docs-memory-semantic-recall.md +17 -1
  93. package/dist/docs/references/docs-workspace-skills.md +7 -5
  94. package/dist/docs/references/reference-agents-agent.md +20 -20
  95. package/dist/docs/references/reference-agents-generate.md +200 -66
  96. package/dist/docs/references/reference-agents-generateLegacy.md +77 -35
  97. package/dist/docs/references/reference-agents-getDefaultGenerateOptions.md +4 -6
  98. package/dist/docs/references/reference-agents-getDefaultOptions.md +4 -6
  99. package/dist/docs/references/reference-agents-getDefaultStreamOptions.md +4 -6
  100. package/dist/docs/references/reference-agents-getDescription.md +1 -1
  101. package/dist/docs/references/reference-agents-getInstructions.md +4 -6
  102. package/dist/docs/references/reference-agents-getLLM.md +6 -8
  103. package/dist/docs/references/reference-agents-getMemory.md +4 -6
  104. package/dist/docs/references/reference-agents-getModel.md +4 -6
  105. package/dist/docs/references/reference-agents-getTools.md +5 -7
  106. package/dist/docs/references/reference-agents-getVoice.md +4 -6
  107. package/dist/docs/references/reference-agents-listAgents.md +4 -6
  108. package/dist/docs/references/reference-agents-listScorers.md +4 -6
  109. package/dist/docs/references/reference-agents-listTools.md +4 -6
  110. package/dist/docs/references/reference-agents-listWorkflows.md +4 -6
  111. package/dist/docs/references/reference-agents-network.md +69 -23
  112. package/dist/docs/references/reference-ai-sdk-chat-route.md +7 -7
  113. package/dist/docs/references/reference-ai-sdk-network-route.md +3 -3
  114. package/dist/docs/references/reference-ai-sdk-to-ai-sdk-stream.md +9 -9
  115. package/dist/docs/references/reference-ai-sdk-with-mastra.md +12 -12
  116. package/dist/docs/references/reference-ai-sdk-workflow-route.md +3 -3
  117. package/dist/docs/references/reference-auth-auth0.md +6 -6
  118. package/dist/docs/references/reference-auth-clerk.md +5 -5
  119. package/dist/docs/references/reference-auth-firebase.md +7 -7
  120. package/dist/docs/references/reference-auth-jwt.md +1 -1
  121. package/dist/docs/references/reference-auth-supabase.md +4 -4
  122. package/dist/docs/references/reference-auth-workos.md +6 -6
  123. package/dist/docs/references/reference-core-addGateway.md +2 -2
  124. package/dist/docs/references/reference-core-getAgent.md +2 -2
  125. package/dist/docs/references/reference-core-getAgentById.md +2 -2
  126. package/dist/docs/references/reference-core-getDeployer.md +1 -1
  127. package/dist/docs/references/reference-core-getGateway.md +2 -2
  128. package/dist/docs/references/reference-core-getGatewayById.md +2 -2
  129. package/dist/docs/references/reference-core-getLogger.md +1 -1
  130. package/dist/docs/references/reference-core-getMCPServer.md +2 -2
  131. package/dist/docs/references/reference-core-getMCPServerById.md +3 -3
  132. package/dist/docs/references/reference-core-getMemory.md +2 -2
  133. package/dist/docs/references/reference-core-getScorer.md +2 -2
  134. package/dist/docs/references/reference-core-getScorerById.md +2 -2
  135. package/dist/docs/references/reference-core-getServer.md +1 -1
  136. package/dist/docs/references/reference-core-getStorage.md +1 -1
  137. package/dist/docs/references/reference-core-getStoredAgentById.md +18 -20
  138. package/dist/docs/references/reference-core-getTelemetry.md +1 -1
  139. package/dist/docs/references/reference-core-getVector.md +2 -2
  140. package/dist/docs/references/reference-core-getWorkflow.md +3 -3
  141. package/dist/docs/references/reference-core-listAgents.md +1 -1
  142. package/dist/docs/references/reference-core-listGateways.md +1 -1
  143. package/dist/docs/references/reference-core-listLogs.md +9 -11
  144. package/dist/docs/references/reference-core-listLogsByRunId.md +9 -9
  145. package/dist/docs/references/reference-core-listMCPServers.md +1 -1
  146. package/dist/docs/references/reference-core-listMemory.md +1 -1
  147. package/dist/docs/references/reference-core-listScorers.md +1 -1
  148. package/dist/docs/references/reference-core-listStoredAgents.md +9 -11
  149. package/dist/docs/references/reference-core-listVectors.md +1 -1
  150. package/dist/docs/references/reference-core-listWorkflows.md +2 -2
  151. package/dist/docs/references/reference-core-mastra-class.md +17 -17
  152. package/dist/docs/references/reference-core-mastra-model-gateway.md +15 -15
  153. package/dist/docs/references/reference-core-setLogger.md +2 -4
  154. package/dist/docs/references/reference-core-setStorage.md +1 -1
  155. package/dist/docs/references/reference-datasets-addItem.md +20 -4
  156. package/dist/docs/references/reference-datasets-addItems.md +8 -2
  157. package/dist/docs/references/reference-datasets-compareExperiments.md +15 -3
  158. package/dist/docs/references/reference-datasets-create.md +6 -6
  159. package/dist/docs/references/reference-datasets-dataset.md +1 -1
  160. package/dist/docs/references/reference-datasets-delete.md +2 -2
  161. package/dist/docs/references/reference-datasets-deleteExperiment.md +2 -2
  162. package/dist/docs/references/reference-datasets-deleteItem.md +2 -2
  163. package/dist/docs/references/reference-datasets-deleteItems.md +2 -2
  164. package/dist/docs/references/reference-datasets-get.md +2 -2
  165. package/dist/docs/references/reference-datasets-getDetails.md +9 -9
  166. package/dist/docs/references/reference-datasets-getExperiment.md +2 -2
  167. package/dist/docs/references/reference-datasets-getItem.md +3 -3
  168. package/dist/docs/references/reference-datasets-getItemHistory.md +22 -2
  169. package/dist/docs/references/reference-datasets-list.md +7 -3
  170. package/dist/docs/references/reference-datasets-listExperimentResults.md +34 -4
  171. package/dist/docs/references/reference-datasets-listExperiments.md +41 -3
  172. package/dist/docs/references/reference-datasets-listItems.md +18 -6
  173. package/dist/docs/references/reference-datasets-listVersions.md +23 -3
  174. package/dist/docs/references/reference-datasets-startExperiment.md +62 -12
  175. package/dist/docs/references/reference-datasets-startExperimentAsync.md +5 -1
  176. package/dist/docs/references/reference-datasets-update.md +6 -6
  177. package/dist/docs/references/reference-datasets-updateItem.md +5 -5
  178. package/dist/docs/references/reference-evals-answer-relevancy.md +11 -11
  179. package/dist/docs/references/reference-evals-answer-similarity.md +17 -19
  180. package/dist/docs/references/reference-evals-bias.md +10 -10
  181. package/dist/docs/references/reference-evals-completeness.md +3 -3
  182. package/dist/docs/references/reference-evals-content-similarity.md +6 -6
  183. package/dist/docs/references/reference-evals-context-precision.md +4 -4
  184. package/dist/docs/references/reference-evals-create-scorer.md +47 -49
  185. package/dist/docs/references/reference-evals-faithfulness.md +11 -11
  186. package/dist/docs/references/reference-evals-hallucination.md +17 -21
  187. package/dist/docs/references/reference-evals-keyword-coverage.md +4 -4
  188. package/dist/docs/references/reference-evals-mastra-scorer.md +14 -14
  189. package/dist/docs/references/reference-evals-run-evals.md +16 -16
  190. package/dist/docs/references/reference-evals-scorer-utils.md +3 -3
  191. package/dist/docs/references/reference-evals-textual-difference.md +3 -3
  192. package/dist/docs/references/reference-evals-tone-consistency.md +3 -3
  193. package/dist/docs/references/reference-evals-toxicity.md +8 -8
  194. package/dist/docs/references/reference-harness-harness-class.md +34 -42
  195. package/dist/docs/references/reference-logging-pino-logger.md +5 -5
  196. package/dist/docs/references/reference-memory-deleteMessages.md +2 -2
  197. package/dist/docs/references/reference-memory-memory-class.md +12 -14
  198. package/dist/docs/references/reference-memory-observational-memory.md +102 -94
  199. package/dist/docs/references/reference-observability-tracing-configuration.md +27 -10
  200. package/dist/docs/references/reference-observability-tracing-exporters-console-exporter.md +4 -7
  201. package/dist/docs/references/reference-processors-batch-parts-processor.md +8 -10
  202. package/dist/docs/references/reference-processors-language-detector.md +14 -16
  203. package/dist/docs/references/reference-processors-message-history-processor.md +7 -9
  204. package/dist/docs/references/reference-processors-moderation-processor.md +13 -15
  205. package/dist/docs/references/reference-processors-pii-detector.md +14 -16
  206. package/dist/docs/references/reference-processors-processor-interface.md +62 -62
  207. package/dist/docs/references/reference-processors-prompt-injection-detector.md +11 -13
  208. package/dist/docs/references/reference-processors-semantic-recall-processor.md +14 -16
  209. package/dist/docs/references/reference-processors-system-prompt-scrubber.md +12 -14
  210. package/dist/docs/references/reference-processors-token-limiter-processor.md +11 -13
  211. package/dist/docs/references/reference-processors-tool-call-filter.md +5 -7
  212. package/dist/docs/references/reference-processors-tool-search-processor.md +9 -11
  213. package/dist/docs/references/reference-processors-unicode-normalizer.md +8 -10
  214. package/dist/docs/references/reference-processors-working-memory-processor.md +14 -18
  215. package/dist/docs/references/reference-rag-database-config.md +11 -7
  216. package/dist/docs/references/reference-rag-embeddings.md +12 -12
  217. package/dist/docs/references/reference-server-mastra-server.md +10 -10
  218. package/dist/docs/references/reference-server-register-api-route.md +13 -13
  219. package/dist/docs/references/reference-storage-cloudflare-d1.md +5 -5
  220. package/dist/docs/references/reference-storage-composite.md +9 -9
  221. package/dist/docs/references/reference-storage-lance.md +3 -3
  222. package/dist/docs/references/reference-storage-libsql.md +2 -2
  223. package/dist/docs/references/reference-storage-mongodb.md +5 -5
  224. package/dist/docs/references/reference-storage-mssql.md +2 -2
  225. package/dist/docs/references/reference-storage-postgresql.md +25 -25
  226. package/dist/docs/references/reference-storage-upstash.md +3 -3
  227. package/dist/docs/references/reference-streaming-ChunkType.md +251 -59
  228. package/dist/docs/references/reference-streaming-agents-MastraModelOutput.md +86 -16
  229. package/dist/docs/references/reference-streaming-agents-streamLegacy.md +79 -39
  230. package/dist/docs/references/reference-streaming-workflows-resumeStream.md +18 -8
  231. package/dist/docs/references/reference-streaming-workflows-stream.md +21 -9
  232. package/dist/docs/references/reference-streaming-workflows-timeTravelStream.md +4 -4
  233. package/dist/docs/references/reference-tools-create-tool.md +25 -21
  234. package/dist/docs/references/reference-tools-graph-rag-tool.md +16 -18
  235. package/dist/docs/references/reference-tools-mcp-client.md +38 -27
  236. package/dist/docs/references/reference-tools-mcp-server.md +45 -45
  237. package/dist/docs/references/reference-tools-vector-query-tool.md +34 -22
  238. package/dist/docs/references/reference-vectors-libsql.md +31 -31
  239. package/dist/docs/references/reference-vectors-mongodb.md +32 -32
  240. package/dist/docs/references/reference-vectors-pg.md +60 -44
  241. package/dist/docs/references/reference-vectors-upstash.md +25 -25
  242. package/dist/docs/references/reference-voice-composite-voice.md +10 -10
  243. package/dist/docs/references/reference-voice-mastra-voice.md +20 -20
  244. package/dist/docs/references/reference-voice-voice.addInstructions.md +1 -1
  245. package/dist/docs/references/reference-voice-voice.addTools.md +1 -1
  246. package/dist/docs/references/reference-voice-voice.connect.md +3 -3
  247. package/dist/docs/references/reference-voice-voice.events.md +11 -11
  248. package/dist/docs/references/reference-voice-voice.listen.md +9 -9
  249. package/dist/docs/references/reference-voice-voice.on.md +2 -2
  250. package/dist/docs/references/reference-voice-voice.speak.md +11 -11
  251. package/dist/docs/references/reference-workflows-run-methods-cancel.md +2 -2
  252. package/dist/docs/references/reference-workflows-run-methods-restart.md +17 -5
  253. package/dist/docs/references/reference-workflows-run-methods-resume.md +23 -9
  254. package/dist/docs/references/reference-workflows-run-methods-start.md +22 -8
  255. package/dist/docs/references/reference-workflows-run-methods-startAsync.md +12 -6
  256. package/dist/docs/references/reference-workflows-run-methods-timeTravel.md +29 -13
  257. package/dist/docs/references/reference-workflows-run.md +12 -12
  258. package/dist/docs/references/reference-workflows-step.md +24 -26
  259. package/dist/docs/references/reference-workflows-workflow-methods-branch.md +2 -2
  260. package/dist/docs/references/reference-workflows-workflow-methods-commit.md +1 -1
  261. package/dist/docs/references/reference-workflows-workflow-methods-create-run.md +4 -4
  262. package/dist/docs/references/reference-workflows-workflow-methods-dountil.md +3 -3
  263. package/dist/docs/references/reference-workflows-workflow-methods-dowhile.md +3 -3
  264. package/dist/docs/references/reference-workflows-workflow-methods-foreach.md +9 -9
  265. package/dist/docs/references/reference-workflows-workflow-methods-map.md +2 -2
  266. package/dist/docs/references/reference-workflows-workflow-methods-parallel.md +2 -2
  267. package/dist/docs/references/reference-workflows-workflow-methods-sleep.md +2 -2
  268. package/dist/docs/references/reference-workflows-workflow-methods-sleepUntil.md +2 -2
  269. package/dist/docs/references/reference-workflows-workflow-methods-then.md +2 -2
  270. package/dist/docs/references/reference-workflows-workflow.md +40 -50
  271. package/dist/docs/references/reference-workspace-filesystem.md +22 -22
  272. package/dist/docs/references/reference-workspace-local-filesystem.md +35 -35
  273. package/dist/docs/references/reference-workspace-local-sandbox.md +26 -26
  274. package/dist/docs/references/reference-workspace-sandbox.md +8 -8
  275. package/dist/docs/references/reference-workspace-workspace-class.md +30 -34
  276. package/dist/editor/types.d.ts +1 -0
  277. package/dist/editor/types.d.ts.map +1 -1
  278. package/dist/evals/index.cjs +20 -20
  279. package/dist/evals/index.js +3 -3
  280. package/dist/evals/scoreTraces/index.cjs +5 -5
  281. package/dist/evals/scoreTraces/index.js +2 -2
  282. package/dist/harness/harness.d.ts.map +1 -1
  283. package/dist/harness/index.cjs +25 -21
  284. package/dist/harness/index.cjs.map +1 -1
  285. package/dist/harness/index.js +15 -11
  286. package/dist/harness/index.js.map +1 -1
  287. package/dist/index.cjs +2 -2
  288. package/dist/index.js +1 -1
  289. package/dist/integration/index.cjs +2 -2
  290. package/dist/integration/index.js +1 -1
  291. package/dist/llm/index.cjs +12 -12
  292. package/dist/llm/index.js +3 -3
  293. package/dist/llm/model/model.d.ts.map +1 -1
  294. package/dist/llm/model/model.loop.d.ts.map +1 -1
  295. package/dist/llm/model/provider-types.generated.d.ts +5 -1
  296. package/dist/loop/index.cjs +14 -14
  297. package/dist/loop/index.js +1 -1
  298. package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
  299. package/dist/mastra/index.cjs +2 -2
  300. package/dist/mastra/index.js +1 -1
  301. package/dist/memory/index.cjs +14 -14
  302. package/dist/memory/index.js +1 -1
  303. package/dist/models-dev-2FJK72J2.cjs +12 -0
  304. package/dist/{models-dev-UVWCKPA2.cjs.map → models-dev-2FJK72J2.cjs.map} +1 -1
  305. package/dist/models-dev-CMQG6EMO.js +3 -0
  306. package/dist/{models-dev-W3LXZTEB.js.map → models-dev-CMQG6EMO.js.map} +1 -1
  307. package/dist/processor-provider/index.cjs +10 -10
  308. package/dist/processor-provider/index.js +1 -1
  309. package/dist/processors/index.cjs +42 -42
  310. package/dist/processors/index.js +1 -1
  311. package/dist/processors/processors/skills.d.ts +9 -42
  312. package/dist/processors/processors/skills.d.ts.map +1 -1
  313. package/dist/provider-registry-EHOAWHFE.cjs +40 -0
  314. package/dist/{provider-registry-4HLP2JRR.cjs.map → provider-registry-EHOAWHFE.cjs.map} +1 -1
  315. package/dist/provider-registry-LVP6T63V.js +3 -0
  316. package/dist/{provider-registry-K3DWQSMH.js.map → provider-registry-LVP6T63V.js.map} +1 -1
  317. package/dist/provider-registry.json +12 -4
  318. package/dist/relevance/index.cjs +3 -3
  319. package/dist/relevance/index.js +1 -1
  320. package/dist/request-context/index.cjs +4 -4
  321. package/dist/request-context/index.d.ts.map +1 -1
  322. package/dist/request-context/index.js +1 -1
  323. package/dist/storage/base.d.ts +34 -1
  324. package/dist/storage/base.d.ts.map +1 -1
  325. package/dist/storage/constants.cjs +56 -56
  326. package/dist/storage/constants.js +1 -1
  327. package/dist/storage/domains/agents/filesystem.d.ts +28 -0
  328. package/dist/storage/domains/agents/filesystem.d.ts.map +1 -0
  329. package/dist/storage/domains/agents/index.d.ts +1 -0
  330. package/dist/storage/domains/agents/index.d.ts.map +1 -1
  331. package/dist/storage/domains/experiments/inmemory.d.ts.map +1 -1
  332. package/dist/storage/domains/mcp-clients/filesystem.d.ts +28 -0
  333. package/dist/storage/domains/mcp-clients/filesystem.d.ts.map +1 -0
  334. package/dist/storage/domains/mcp-clients/index.d.ts +1 -0
  335. package/dist/storage/domains/mcp-clients/index.d.ts.map +1 -1
  336. package/dist/storage/domains/mcp-servers/filesystem.d.ts +28 -0
  337. package/dist/storage/domains/mcp-servers/filesystem.d.ts.map +1 -0
  338. package/dist/storage/domains/mcp-servers/index.d.ts +1 -0
  339. package/dist/storage/domains/mcp-servers/index.d.ts.map +1 -1
  340. package/dist/storage/domains/prompt-blocks/filesystem.d.ts +28 -0
  341. package/dist/storage/domains/prompt-blocks/filesystem.d.ts.map +1 -0
  342. package/dist/storage/domains/prompt-blocks/index.d.ts +1 -0
  343. package/dist/storage/domains/prompt-blocks/index.d.ts.map +1 -1
  344. package/dist/storage/domains/scorer-definitions/filesystem.d.ts +28 -0
  345. package/dist/storage/domains/scorer-definitions/filesystem.d.ts.map +1 -0
  346. package/dist/storage/domains/scorer-definitions/index.d.ts +1 -0
  347. package/dist/storage/domains/scorer-definitions/index.d.ts.map +1 -1
  348. package/dist/storage/domains/skills/filesystem.d.ts +28 -0
  349. package/dist/storage/domains/skills/filesystem.d.ts.map +1 -0
  350. package/dist/storage/domains/skills/index.d.ts +1 -0
  351. package/dist/storage/domains/skills/index.d.ts.map +1 -1
  352. package/dist/storage/domains/workspaces/filesystem.d.ts +28 -0
  353. package/dist/storage/domains/workspaces/filesystem.d.ts.map +1 -0
  354. package/dist/storage/domains/workspaces/index.d.ts +1 -0
  355. package/dist/storage/domains/workspaces/index.d.ts.map +1 -1
  356. package/dist/storage/filesystem-db.d.ts +82 -0
  357. package/dist/storage/filesystem-db.d.ts.map +1 -0
  358. package/dist/storage/filesystem-versioned.d.ts +148 -0
  359. package/dist/storage/filesystem-versioned.d.ts.map +1 -0
  360. package/dist/storage/filesystem.d.ts +39 -0
  361. package/dist/storage/filesystem.d.ts.map +1 -0
  362. package/dist/storage/git-history.d.ts +68 -0
  363. package/dist/storage/git-history.d.ts.map +1 -0
  364. package/dist/storage/index.cjs +208 -160
  365. package/dist/storage/index.d.ts +4 -0
  366. package/dist/storage/index.d.ts.map +1 -1
  367. package/dist/storage/index.js +2 -2
  368. package/dist/storage/types.d.ts +1 -0
  369. package/dist/storage/types.d.ts.map +1 -1
  370. package/dist/stream/RunOutput.d.ts +1 -1
  371. package/dist/stream/aisdk/v5/output-helpers.d.ts +6 -6
  372. package/dist/stream/base/output.d.ts +3 -3
  373. package/dist/stream/base/schema.d.ts +1 -1
  374. package/dist/stream/index.cjs +11 -11
  375. package/dist/stream/index.js +2 -2
  376. package/dist/test-utils/llm-mock.cjs +4 -4
  377. package/dist/test-utils/llm-mock.js +1 -1
  378. package/dist/tool-loop-agent/index.cjs +4 -4
  379. package/dist/tool-loop-agent/index.js +1 -1
  380. package/dist/tools/index.cjs +6 -6
  381. package/dist/tools/index.js +1 -1
  382. package/dist/tools/is-vercel-tool.cjs +2 -2
  383. package/dist/tools/is-vercel-tool.js +1 -1
  384. package/dist/tools/tool-builder/builder.d.ts.map +1 -1
  385. package/dist/tools/tool.d.ts +6 -0
  386. package/dist/tools/tool.d.ts.map +1 -1
  387. package/dist/tools/types.d.ts +27 -0
  388. package/dist/tools/types.d.ts.map +1 -1
  389. package/dist/utils.cjs +23 -23
  390. package/dist/utils.js +1 -1
  391. package/dist/vector/index.cjs +9 -9
  392. package/dist/vector/index.js +2 -2
  393. package/dist/workflows/evented/index.cjs +10 -10
  394. package/dist/workflows/evented/index.js +1 -1
  395. package/dist/workflows/index.cjs +25 -25
  396. package/dist/workflows/index.js +1 -1
  397. package/dist/workspace/index.cjs +70 -66
  398. package/dist/workspace/index.d.ts +1 -0
  399. package/dist/workspace/index.d.ts.map +1 -1
  400. package/dist/workspace/index.js +1 -1
  401. package/dist/workspace/sandbox/execa.d.ts +9 -0
  402. package/dist/workspace/sandbox/execa.d.ts.map +1 -0
  403. package/dist/workspace/sandbox/local-process-manager.d.ts.map +1 -1
  404. package/dist/workspace/skills/index.d.ts +1 -0
  405. package/dist/workspace/skills/index.d.ts.map +1 -1
  406. package/dist/workspace/skills/tools.d.ts +36 -0
  407. package/dist/workspace/skills/tools.d.ts.map +1 -0
  408. package/dist/workspace/tools/execute-command.d.ts.map +1 -1
  409. package/dist/workspace/tools/output-helpers.d.ts +4 -3
  410. package/dist/workspace/tools/output-helpers.d.ts.map +1 -1
  411. package/package.json +9 -9
  412. package/src/llm/model/provider-types.generated.d.ts +5 -1
  413. package/dist/chunk-3ZF7IC6Q.cjs.map +0 -1
  414. package/dist/chunk-4BXXAZ75.js.map +0 -1
  415. package/dist/chunk-4P35AVPE.cjs.map +0 -1
  416. package/dist/chunk-BFV3GSGS.js.map +0 -1
  417. package/dist/chunk-CCLV5CAA.js.map +0 -1
  418. package/dist/chunk-D4M6E4OQ.cjs.map +0 -1
  419. package/dist/chunk-D6HO5QAM.cjs.map +0 -1
  420. package/dist/chunk-G5R2755Q.cjs.map +0 -1
  421. package/dist/chunk-GJTLWOKJ.js.map +0 -1
  422. package/dist/chunk-H5S4PS44.cjs.map +0 -1
  423. package/dist/chunk-IOY7Y5GV.js.map +0 -1
  424. package/dist/chunk-JIRB5LX4.js.map +0 -1
  425. package/dist/chunk-MVYP55NA.js.map +0 -1
  426. package/dist/chunk-PKORY4ZZ.cjs.map +0 -1
  427. package/dist/chunk-QNXY3J6B.cjs.map +0 -1
  428. package/dist/chunk-SEKQJ447.js.map +0 -1
  429. package/dist/chunk-VDKWYUGC.cjs.map +0 -1
  430. package/dist/chunk-VWAK25TU.js.map +0 -1
  431. package/dist/chunk-WYPSC6CO.js.map +0 -1
  432. package/dist/chunk-YIJZBU54.cjs.map +0 -1
  433. package/dist/chunk-ZBESCKPX.cjs.map +0 -1
  434. package/dist/chunk-ZVWVQ6MG.js.map +0 -1
  435. package/dist/models-dev-UVWCKPA2.cjs +0 -12
  436. package/dist/models-dev-W3LXZTEB.js +0 -3
  437. package/dist/provider-registry-4HLP2JRR.cjs +0 -40
  438. package/dist/provider-registry-K3DWQSMH.js +0 -3
@@ -10,11 +10,13 @@ await agent.getDefaultOptions()
10
10
 
11
11
  ## Parameters
12
12
 
13
- **options?:** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
13
+ **options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
14
+
15
+ **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
14
16
 
15
17
  ## Returns
16
18
 
17
- **defaultOptions:** (`AgentExecutionOptions<Output> | Promise<AgentExecutionOptions<Output>>`): The default streaming options configured for the agent, either as a direct object or a promise that resolves to the options.
19
+ **defaultOptions** (`AgentExecutionOptions<Output> | Promise<AgentExecutionOptions<Output>>`): The default streaming options configured for the agent, either as a direct object or a promise that resolves to the options.
18
20
 
19
21
  ## Extended usage example
20
22
 
@@ -24,10 +26,6 @@ await agent.getDefaultOptions({
24
26
  })
25
27
  ```
26
28
 
27
- ### Options parameters
28
-
29
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information. (Default: `new RequestContext()`)
30
-
31
29
  ## Related
32
30
 
33
31
  - [Streaming with agents](https://mastra.ai/docs/streaming/overview)
@@ -12,11 +12,13 @@ await agent.getDefaultStreamOptionsLegacy()
12
12
 
13
13
  ## Parameters
14
14
 
15
- **options?:** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
15
+ **options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
16
+
17
+ **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
16
18
 
17
19
  ## Returns
18
20
 
19
- **defaultOptions:** (`AgentStreamOptions | Promise<AgentStreamOptions>`): The default vNext streaming options configured for the agent, either as a direct object or a promise that resolves to the options.
21
+ **defaultOptions** (`AgentStreamOptions | Promise<AgentStreamOptions>`): The default vNext streaming options configured for the agent, either as a direct object or a promise that resolves to the options.
20
22
 
21
23
  ## Extended usage example
22
24
 
@@ -26,10 +28,6 @@ await agent.getDefaultStreamOptionsLegacy({
26
28
  })
27
29
  ```
28
30
 
29
- ### Options parameters
30
-
31
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information. (Default: `new RequestContext()`)
32
-
33
31
  ## Related
34
32
 
35
33
  - [Streaming with agents](https://mastra.ai/docs/streaming/overview)
@@ -14,7 +14,7 @@ This method takes no parameters.
14
14
 
15
15
  ## Returns
16
16
 
17
- **description:** (`string`): The description of the agent, or an empty string if no description was configured.
17
+ **description** (`string`): The description of the agent, or an empty string if no description was configured.
18
18
 
19
19
  ## Related
20
20
 
@@ -10,11 +10,13 @@ await agent.getInstructions()
10
10
 
11
11
  ## Parameters
12
12
 
13
- **options?:** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
13
+ **options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
14
+
15
+ **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
14
16
 
15
17
  ## Returns
16
18
 
17
- **instructions:** (`SystemMessage | Promise<SystemMessage>`): The instructions configured for the agent. SystemMessage can be: string | string\[] | CoreSystemMessage | CoreSystemMessage\[] | SystemModelMessage | SystemModelMessage\[]. Returns either directly or as a promise that resolves to the instructions.
19
+ **instructions** (`SystemMessage | Promise<SystemMessage>`): The instructions configured for the agent. SystemMessage can be: string | string\[] | CoreSystemMessage | CoreSystemMessage\[] | SystemModelMessage | SystemModelMessage\[]. Returns either directly or as a promise that resolves to the instructions.
18
20
 
19
21
  ## Extended usage example
20
22
 
@@ -24,10 +26,6 @@ await agent.getInstructions({
24
26
  })
25
27
  ```
26
28
 
27
- ### Options parameters
28
-
29
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information. (Default: `undefined`)
30
-
31
29
  ## Related
32
30
 
33
31
  - [Agents overview](https://mastra.ai/docs/agents/overview)
@@ -10,11 +10,15 @@ await agent.getLLM()
10
10
 
11
11
  ## Parameters
12
12
 
13
- **options?:** (`{ requestContext?: RequestContext; model?: MastraLanguageModel | DynamicArgument<MastraLanguageModel> }`): Optional configuration object containing request context and optional model override. (Default: `{}`)
13
+ **options** (`{ requestContext?: RequestContext; model?: MastraLanguageModel | DynamicArgument<MastraLanguageModel> }`): Optional configuration object containing request context and optional model override. (Default: `{}`)
14
+
15
+ **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
16
+
17
+ **options.model** (`MastraLanguageModel | DynamicArgument<MastraLanguageModel>`): Optional model override. If provided, this model will be used used instead of the agent's configured model.
14
18
 
15
19
  ## Returns
16
20
 
17
- **llm:** (`MastraLLMV1 | Promise<MastraLLMV1>`): The language model instance configured for the agent, either as a direct instance or a promise that resolves to the LLM.
21
+ **llm** (`MastraLLMV1 | Promise<MastraLLMV1>`): The language model instance configured for the agent, either as a direct instance or a promise that resolves to the LLM.
18
22
 
19
23
  ## Extended usage example
20
24
 
@@ -25,12 +29,6 @@ await agent.getLLM({
25
29
  })
26
30
  ```
27
31
 
28
- ### Options parameters
29
-
30
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information. (Default: `new RequestContext()`)
31
-
32
- **model?:** (`MastraLanguageModel | DynamicArgument<MastraLanguageModel>`): Optional model override. If provided, this model will be used used instead of the agent's configured model.
33
-
34
32
  ## Related
35
33
 
36
34
  - [Agents overview](https://mastra.ai/docs/agents/overview)
@@ -10,11 +10,13 @@ await agent.getMemory()
10
10
 
11
11
  ## Parameters
12
12
 
13
- **options?:** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
13
+ **options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
14
+
15
+ **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
14
16
 
15
17
  ## Returns
16
18
 
17
- **memory:** (`Promise<MastraMemory | undefined>`): A promise that resolves to the memory system configured for the agent, or undefined if no memory system is configured.
19
+ **memory** (`Promise<MastraMemory | undefined>`): A promise that resolves to the memory system configured for the agent, or undefined if no memory system is configured.
18
20
 
19
21
  ## Extended usage example
20
22
 
@@ -24,10 +26,6 @@ await agent.getMemory({
24
26
  })
25
27
  ```
26
28
 
27
- ### Options parameters
28
-
29
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information. (Default: `new RequestContext()`)
30
-
31
29
  ## Related
32
30
 
33
31
  - [Agent memory](https://mastra.ai/docs/agents/agent-memory)
@@ -10,11 +10,13 @@ await agent.getModel()
10
10
 
11
11
  ## Parameters
12
12
 
13
- **{ requestContext = new RequestContext() }?:** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `new RequestContext()`)
13
+ **options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
14
+
15
+ **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
14
16
 
15
17
  ## Returns
16
18
 
17
- **model:** (`MastraLanguageModel | Promise<MastraLanguageModel>`): The language model configured for the agent, either as a direct instance or a promise that resolves to the model.
19
+ **model** (`MastraLanguageModel | Promise<MastraLanguageModel>`): The language model configured for the agent, either as a direct instance or a promise that resolves to the model.
18
20
 
19
21
  ## Extended usage example
20
22
 
@@ -24,10 +26,6 @@ await agent.getModel({
24
26
  })
25
27
  ```
26
28
 
27
- ### Options parameters
28
-
29
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information. (Default: `undefined`)
30
-
31
29
  ## Related
32
30
 
33
31
  - [Agents overview](https://mastra.ai/docs/agents/overview)
@@ -10,11 +10,13 @@ await agent.getTools()
10
10
 
11
11
  ## Parameters
12
12
 
13
- **options?:** (`{ requestContext?: RequestContext }`): Optional configuration object containing runtime context. (Default: `{}`)
13
+ **options** (`{ requestContext?: RequestContext }`): Optional configuration object containing runtime context. (Default: `{}`)
14
+
15
+ **options.requestContext** (`RequestContext`): Runtime context for dependency injection and contextual information.
14
16
 
15
17
  ## Returns
16
18
 
17
- **tools:** (`TTools | Promise<TTools>`): The tools configured for the agent, either as a direct object or a promise that resolves to the tools.
19
+ **tools** (`TTools | Promise<TTools>`): The tools configured for the agent, either as a direct object or a promise that resolves to the tools.
18
20
 
19
21
  ## Extended usage example
20
22
 
@@ -22,8 +24,4 @@ await agent.getTools()
22
24
  await agent.getTools({
23
25
  requestContext: new RequestContext(),
24
26
  })
25
- ```
26
-
27
- ### Options parameters
28
-
29
- **requestContext?:** (`RequestContext`): Runtime context for dependency injection and contextual information. (Default: `new RequestContext()`)
27
+ ```
@@ -10,11 +10,13 @@ await agent.getVoice()
10
10
 
11
11
  ## Parameters
12
12
 
13
- **options?:** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
13
+ **options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
14
+
15
+ **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
14
16
 
15
17
  ## Returns
16
18
 
17
- **voice:** (`Promise<MastraVoice>`): A promise that resolves to the voice provider configured for the agent, or a default voice provider if none was configured.
19
+ **voice** (`Promise<MastraVoice>`): A promise that resolves to the voice provider configured for the agent, or a default voice provider if none was configured.
18
20
 
19
21
  ## Extended usage example
20
22
 
@@ -24,10 +26,6 @@ await agent.getVoice({
24
26
  })
25
27
  ```
26
28
 
27
- ### Options parameters
28
-
29
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information. (Default: `new RequestContext()`)
30
-
31
29
  ## Related
32
30
 
33
31
  - [Adding voice to agents](https://mastra.ai/docs/agents/adding-voice)
@@ -10,11 +10,13 @@ await agent.listAgents()
10
10
 
11
11
  ## Parameters
12
12
 
13
- **options?:** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
13
+ **options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
14
+
15
+ **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
14
16
 
15
17
  ## Returns
16
18
 
17
- **agents:** (`Promise<Record<string, Agent>>`): A promise that resolves to a record of agent names to their corresponding Agent instances.
19
+ **agents** (`Promise<Record<string, Agent>>`): A promise that resolves to a record of agent names to their corresponding Agent instances.
18
20
 
19
21
  ## Extended usage example
20
22
 
@@ -26,10 +28,6 @@ await agent.listAgents({
26
28
  })
27
29
  ```
28
30
 
29
- ### Options parameters
30
-
31
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information. (Default: `new RequestContext()`)
32
-
33
31
  ## Related
34
32
 
35
33
  - [Agents overview](https://mastra.ai/docs/agents/overview)
@@ -10,11 +10,13 @@ await agent.listScorers()
10
10
 
11
11
  ## Parameters
12
12
 
13
- **options?:** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
13
+ **options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
14
+
15
+ **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
14
16
 
15
17
  ## Returns
16
18
 
17
- **scorers:** (`MastraScorers | Promise<MastraScorers>`): The scoring configuration configured for the agent, either as a direct object or a promise that resolves to the scorers.
19
+ **scorers** (`MastraScorers | Promise<MastraScorers>`): The scoring configuration configured for the agent, either as a direct object or a promise that resolves to the scorers.
18
20
 
19
21
  ## Extended usage example
20
22
 
@@ -24,10 +26,6 @@ await agent.listScorers({
24
26
  })
25
27
  ```
26
28
 
27
- ### Options parameters
28
-
29
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information. (Default: `new RequestContext()`)
30
-
31
29
  ## Related
32
30
 
33
31
  - [Agents overview](https://mastra.ai/docs/agents/overview)
@@ -10,11 +10,13 @@ await agent.listTools()
10
10
 
11
11
  ## Parameters
12
12
 
13
- **options?:** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
13
+ **options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
14
+
15
+ **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
14
16
 
15
17
  ## Returns
16
18
 
17
- **tools:** (`TTools | Promise<TTools>`): The tools configured for the agent, either as a direct object or a promise that resolves to the tools.
19
+ **tools** (`TTools | Promise<TTools>`): The tools configured for the agent, either as a direct object or a promise that resolves to the tools.
18
20
 
19
21
  ## Extended usage example
20
22
 
@@ -24,10 +26,6 @@ await agent.listTools({
24
26
  })
25
27
  ```
26
28
 
27
- ### Options parameters
28
-
29
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information. (Default: `new RequestContext()`)
30
-
31
29
  ## Related
32
30
 
33
31
  - [Using tools with agents](https://mastra.ai/docs/agents/using-tools)
@@ -10,11 +10,13 @@ await agent.listWorkflows()
10
10
 
11
11
  ## Parameters
12
12
 
13
- **options?:** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
13
+ **options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`)
14
+
15
+ **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
14
16
 
15
17
  ## Returns
16
18
 
17
- **workflows:** (`Promise<Record<string, Workflow>>`): A promise that resolves to a record of workflow names to their corresponding Workflow instances.
19
+ **workflows** (`Promise<Record<string, Workflow>>`): A promise that resolves to a record of workflow names to their corresponding Workflow instances.
18
20
 
19
21
  ## Extended usage example
20
22
 
@@ -24,10 +26,6 @@ await agent.listWorkflows({
24
26
  })
25
27
  ```
26
28
 
27
- ### Options parameters
28
-
29
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information. (Default: `new RequestContext()`)
30
-
31
29
  ## Related
32
30
 
33
31
  - [Agents overview](https://mastra.ai/docs/agents/overview)
@@ -36,53 +36,99 @@ await agent.network(`
36
36
 
37
37
  ## Parameters
38
38
 
39
- **messages:** (`string | string[] | CoreMessage[] | AiMessageType[] | UIMessageWithMetadata[]`): The messages to send to the agent. Can be a single string, array of strings, or structured message objects.
39
+ **messages** (`string | string[] | CoreMessage[] | AiMessageType[] | UIMessageWithMetadata[]`): The messages to send to the agent. Can be a single string, array of strings, or structured message objects.
40
40
 
41
- **options?:** (`MultiPrimitiveExecutionOptions`): Optional configuration for the network process.
41
+ **options** (`MultiPrimitiveExecutionOptions`): Optional configuration for the network process.
42
42
 
43
- ### Options
43
+ **options.maxSteps** (`number`): Maximum number of steps to run during execution.
44
44
 
45
- **maxSteps?:** (`number`): Maximum number of steps to run during execution.
45
+ **options.abortSignal** (`AbortSignal`): Signal to abort the network execution. When aborted, the network stops routing, cancels any in-progress sub-agent, tool, or workflow execution, and skips saving partial results to memory.
46
46
 
47
- **abortSignal?:** (`AbortSignal`): Signal to abort the network execution. When aborted, the network stops routing, cancels any in-progress sub-agent, tool, or workflow execution, and skips saving partial results to memory.
47
+ **options.onAbort** (`(event: { primitiveType: string; primitiveId: string; iteration: number }) => void | Promise<void>`): Callback fired when the network is aborted. Receives an event with the type and ID of the primitive that was executing when the abort occurred.
48
48
 
49
- **onAbort?:** (`(event: { primitiveType: string; primitiveId: string; iteration: number }) => void | Promise<void>`): Callback fired when the network is aborted. Receives an event with the type and ID of the primitive that was executing when the abort occurred.
49
+ **options.memory** (`object`): Configuration for memory. This is the preferred way to manage memory.
50
50
 
51
- **memory?:** (`object`): thread:string | { id: string; metadata?: Record\<string, any>, title?: string }The conversation thread, as a string ID or an object with an \`id\` and optional \`metadata\`.resource:stringIdentifier for the user or resource associated with the thread.options?:MemoryConfigConfiguration for memory behavior, like message history and semantic recall.
51
+ **options.memory.thread** (`string | { id: string; metadata?: Record<string, any>, title?: string }`): The conversation thread, as a string ID or an object with an \`id\` and optional \`metadata\`.
52
52
 
53
- **tracingContext?:** (`TracingContext`): currentSpan?:SpanCurrent span for creating child spans and adding metadata. Use this to create custom child spans or update span attributes during execution.
53
+ **options.memory.resource** (`string`): Identifier for the user or resource associated with the thread.
54
54
 
55
- **tracingOptions?:** (`TracingOptions`): metadata?:Record\<string, any>Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.requestContextKeys?:string\[]Additional RequestContext keys to extract as metadata for this trace. Supports dot notation for nested values (e.g., 'user.id').traceId?:stringTrace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.parentSpanId?:stringParent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.tags?:string\[]Tags to apply to this trace. String labels for categorizing and filtering traces.
55
+ **options.memory.options** (`MemoryConfig`): Configuration for memory behavior, like message history and semantic recall.
56
56
 
57
- **telemetry?:** (`TelemetrySettings`): isEnabled?:booleanEnable or disable telemetry. Disabled by default while experimental.recordInputs?:booleanEnable or disable input recording. Enabled by default. You might want to disable input recording to avoid recording sensitive information.recordOutputs?:booleanEnable or disable output recording. Enabled by default. You might want to disable output recording to avoid recording sensitive information.functionId?:stringIdentifier for this function. Used to group telemetry data by function.
57
+ **options.tracingContext** (`TracingContext`): Tracing context for creating child spans and adding metadata. Automatically injected when using Mastra's tracing system.
58
58
 
59
- **modelSettings?:** (`CallSettings`): temperature?:numberControls randomness in generation (0-2). Higher values make output more random.maxOutputTokens?:numberMaximum number of tokens to generate in the response. Note: Use maxOutputTokens (not maxTokens) as per AI SDK v5 convention.maxRetries?:numberMaximum number of retry attempts for failed requests.topP?:numberNucleus sampling parameter (0-1). Controls diversity of generated text.topK?:numberTop-k sampling parameter. Limits vocabulary to k most likely tokens.presencePenalty?:numberPenalty for token presence (-2 to 2). Reduces repetition.frequencyPenalty?:numberPenalty for token frequency (-2 to 2). Reduces repetition of frequent tokens.stopSequences?:string\[]Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated.
59
+ **options.tracingContext.currentSpan** (`Span`): Current span for creating child spans and adding metadata. Use this to create custom child spans or update span attributes during execution.
60
60
 
61
- **structuredOutput?:** (`StructuredOutputOptions`): schema:ZodSchema | JSONSchema7The schema to validate the output against. Can be a Zod schema or JSON Schema.model?:MastraModelConfigModel to use for generating the structured output. Defaults to the agent's model.instructions?:stringCustom instructions for generating the structured output.
61
+ **options.tracingOptions** (`TracingOptions`): Options for Tracing configuration.
62
62
 
63
- **runId?:** (`string`): Unique ID for this generation run. Useful for tracking and debugging purposes.
63
+ **options.tracingOptions.metadata** (`Record<string, any>`): Metadata to add to the root trace span. Useful for adding custom attributes like user IDs, session IDs, or feature flags.
64
64
 
65
- **requestContext?:** (`RequestContext`): Request Context for dependency injection and contextual information.
65
+ **options.tracingOptions.requestContextKeys** (`string[]`): Additional RequestContext keys to extract as metadata for this trace. Supports dot notation for nested values (e.g., 'user.id').
66
66
 
67
- **traceId?:** (`string`): The trace ID associated with this execution when Tracing is enabled. Use this to correlate logs and debug execution flow.
67
+ **options.tracingOptions.traceId** (`string`): Trace ID to use for this execution (1-32 hexadecimal characters). If provided, this trace will be part of the specified trace.
68
68
 
69
- **onStepFinish?:** (`(event: any) => Promise<void> | void`): Callback fired after each LLM step within a sub-agent execution. Receives step details including finish reason and token usage.
69
+ **options.tracingOptions.parentSpanId** (`string`): Parent span ID to use for this execution (1-16 hexadecimal characters). If provided, the root span will be created as a child of this span.
70
70
 
71
- **onError?:** (`({ error }: { error: Error | string }) => Promise<void> | void`): Callback fired when an error occurs during sub-agent execution.
71
+ **options.tracingOptions.tags** (`string[]`): Tags to apply to this trace. String labels for categorizing and filtering traces.
72
+
73
+ **options.telemetry** (`TelemetrySettings`): Settings for OTLP telemetry collection during streaming (not Tracing).
74
+
75
+ **options.telemetry.isEnabled** (`boolean`): Enable or disable telemetry. Disabled by default while experimental.
76
+
77
+ **options.telemetry.recordInputs** (`boolean`): Enable or disable input recording. Enabled by default. You might want to disable input recording to avoid recording sensitive information.
78
+
79
+ **options.telemetry.recordOutputs** (`boolean`): Enable or disable output recording. Enabled by default. You might want to disable output recording to avoid recording sensitive information.
80
+
81
+ **options.telemetry.functionId** (`string`): Identifier for this function. Used to group telemetry data by function.
82
+
83
+ **options.modelSettings** (`CallSettings`): Model-specific settings like temperature, maxOutputTokens, topP, etc. These settings control how the language model generates responses.
84
+
85
+ **options.modelSettings.temperature** (`number`): Controls randomness in generation (0-2). Higher values make output more random.
86
+
87
+ **options.modelSettings.maxOutputTokens** (`number`): Maximum number of tokens to generate in the response. Note: Use maxOutputTokens (not maxTokens) as per AI SDK v5 convention.
88
+
89
+ **options.modelSettings.maxRetries** (`number`): Maximum number of retry attempts for failed requests.
90
+
91
+ **options.modelSettings.topP** (`number`): Nucleus sampling parameter (0-1). Controls diversity of generated text.
92
+
93
+ **options.modelSettings.topK** (`number`): Top-k sampling parameter. Limits vocabulary to k most likely tokens.
94
+
95
+ **options.modelSettings.presencePenalty** (`number`): Penalty for token presence (-2 to 2). Reduces repetition.
96
+
97
+ **options.modelSettings.frequencyPenalty** (`number`): Penalty for token frequency (-2 to 2). Reduces repetition of frequent tokens.
98
+
99
+ **options.modelSettings.stopSequences** (`string[]`): Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated.
100
+
101
+ **options.structuredOutput** (`StructuredOutputOptions`): Configuration for generating a typed structured output from the network result.
102
+
103
+ **options.structuredOutput.schema** (`ZodSchema | JSONSchema7`): The schema to validate the output against. Can be a Zod schema or JSON Schema.
104
+
105
+ **options.structuredOutput.model** (`MastraModelConfig`): Model to use for generating the structured output. Defaults to the agent's model.
106
+
107
+ **options.structuredOutput.instructions** (`string`): Custom instructions for generating the structured output.
108
+
109
+ **options.runId** (`string`): Unique ID for this generation run. Useful for tracking and debugging purposes.
110
+
111
+ **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information.
112
+
113
+ **options.traceId** (`string`): The trace ID associated with this execution when Tracing is enabled. Use this to correlate logs and debug execution flow.
114
+
115
+ **options.onStepFinish** (`(event: any) => Promise<void> | void`): Callback fired after each LLM step within a sub-agent execution. Receives step details including finish reason and token usage.
116
+
117
+ **options.onError** (`({ error }: { error: Error | string }) => Promise<void> | void`): Callback fired when an error occurs during sub-agent execution.
72
118
 
73
119
  ## Returns
74
120
 
75
- **stream:** (`MastraAgentNetworkStream<NetworkChunkType>`): A custom stream that extends ReadableStream\<NetworkChunkType> with additional network-specific properties
121
+ **stream** (`MastraAgentNetworkStream<NetworkChunkType>`): A custom stream that extends ReadableStream\<NetworkChunkType> with additional network-specific properties
76
122
 
77
- **status:** (`Promise<RunStatus>`): A promise that resolves to the current workflow run status
123
+ **status** (`Promise<RunStatus>`): A promise that resolves to the current workflow run status
78
124
 
79
- **result:** (`Promise<WorkflowResult<TState, TOutput, TSteps>>`): A promise that resolves to the final workflow result
125
+ **result** (`Promise<WorkflowResult<TState, TOutput, TSteps>>`): A promise that resolves to the final workflow result
80
126
 
81
- **usage:** (`Promise<{ promptTokens: number; completionTokens: number; totalTokens: number }>`): A promise that resolves to token usage statistics
127
+ **usage** (`Promise<{ promptTokens: number; completionTokens: number; totalTokens: number }>`): A promise that resolves to token usage statistics
82
128
 
83
- **object:** (`Promise<OUTPUT | undefined>`): A promise that resolves to the structured output object. Only available when structuredOutput option is provided. Resolves to undefined if no schema was specified.
129
+ **object** (`Promise<OUTPUT | undefined>`): A promise that resolves to the structured output object. Only available when structuredOutput option is provided. Resolves to undefined if no schema was specified.
84
130
 
85
- **objectStream:** (`ReadableStream<Partial<OUTPUT>>`): A stream of partial objects during structured output generation. Useful for streaming partial results as they're being generated.
131
+ **objectStream** (`ReadableStream<Partial<OUTPUT>>`): A stream of partial objects during structured output generation. Useful for streaming partial results as they're being generated.
86
132
 
87
133
  ## Structured Output
88
134
 
@@ -43,19 +43,19 @@ export const mastra = new Mastra({
43
43
 
44
44
  ## Parameters
45
45
 
46
- **path:** (`string`): The route path (e.g., \`/chat\` or \`/chat/:agentId\`). Include \`:agentId\` for dynamic agent routing. (Default: `'/chat/:agentId'`)
46
+ **path** (`string`): The route path (e.g., \`/chat\` or \`/chat/:agentId\`). Include \`:agentId\` for dynamic agent routing. (Default: `'/chat/:agentId'`)
47
47
 
48
- **agent?:** (`string`): The ID of the agent to use for this chat route. Required if the path doesn't include \`:agentId\`.
48
+ **agent** (`string`): The ID of the agent to use for this chat route. Required if the path doesn't include \`:agentId\`.
49
49
 
50
- **defaultOptions?:** (`AgentExecutionOptions`): Default options passed to agent execution. These can include instructions, memory configuration, maxSteps, and other execution settings.
50
+ **defaultOptions** (`AgentExecutionOptions`): Default options passed to agent execution. These can include instructions, memory configuration, maxSteps, and other execution settings.
51
51
 
52
- **sendStart?:** (`boolean`): Whether to send start events in the stream. (Default: `true`)
52
+ **sendStart** (`boolean`): Whether to send start events in the stream. (Default: `true`)
53
53
 
54
- **sendFinish?:** (`boolean`): Whether to send finish events in the stream. (Default: `true`)
54
+ **sendFinish** (`boolean`): Whether to send finish events in the stream. (Default: `true`)
55
55
 
56
- **sendReasoning?:** (`boolean`): Whether to include reasoning steps in the stream. (Default: `false`)
56
+ **sendReasoning** (`boolean`): Whether to include reasoning steps in the stream. (Default: `false`)
57
57
 
58
- **sendSources?:** (`boolean`): Whether to include source citations in the stream. (Default: `false`)
58
+ **sendSources** (`boolean`): Whether to include source citations in the stream. (Default: `false`)
59
59
 
60
60
  ## Additional configuration
61
61
 
@@ -43,11 +43,11 @@ export const mastra = new Mastra({
43
43
 
44
44
  ## Parameters
45
45
 
46
- **path:** (`string`): The route path (e.g., \`/network\` or \`/network/:agentId\`). Include \`:agentId\` for dynamic agent routing. (Default: `'/network/:agentId'`)
46
+ **path** (`string`): The route path (e.g., \`/network\` or \`/network/:agentId\`). Include \`:agentId\` for dynamic agent routing. (Default: `'/network/:agentId'`)
47
47
 
48
- **agent?:** (`string`): The ID of the routing agent to use for this network route. Required if the path doesn't include \`:agentId\`.
48
+ **agent** (`string`): The ID of the routing agent to use for this network route. Required if the path doesn't include \`:agentId\`.
49
49
 
50
- **defaultOptions?:** (`AgentExecutionOptions`): Default options passed to agent execution. These can include instructions, memory configuration, maxSteps, and other execution settings.
50
+ **defaultOptions** (`AgentExecutionOptions`): Default options passed to agent execution. These can include instructions, memory configuration, maxSteps, and other execution settings.
51
51
 
52
52
  ## Additional configuration
53
53
 
@@ -45,23 +45,23 @@ The first parameter is the Mastra stream to convert. It can be one of:
45
45
 
46
46
  The second parameter is an options object:
47
47
 
48
- **from:** (`'agent' | 'network' | 'workflow'`): The type of Mastra stream being converted. (Default: `'agent'`)
48
+ **from** (`'agent' | 'network' | 'workflow'`): The type of Mastra stream being converted. (Default: `'agent'`)
49
49
 
50
- **lastMessageId?:** (`string`): (Agent only) The ID of the last message in the conversation.
50
+ **lastMessageId** (`string`): (Agent only) The ID of the last message in the conversation.
51
51
 
52
- **sendStart?:** (`boolean`): (Agent only) Whether to send start events in the stream. (Default: `true`)
52
+ **sendStart** (`boolean`): (Agent only) Whether to send start events in the stream. (Default: `true`)
53
53
 
54
- **sendFinish?:** (`boolean`): (Agent only) Whether to send finish events in the stream. (Default: `true`)
54
+ **sendFinish** (`boolean`): (Agent only) Whether to send finish events in the stream. (Default: `true`)
55
55
 
56
- **sendReasoning?:** (`boolean`): (Agent only) Whether to include reasoning-delta chunks in the stream. Set to true to stream reasoning content from models that support extended thinking. (Default: `false`)
56
+ **sendReasoning** (`boolean`): (Agent only) Whether to include reasoning-delta chunks in the stream. Set to true to stream reasoning content from models that support extended thinking. (Default: `false`)
57
57
 
58
- **sendSources?:** (`boolean`): (Agent only) Whether to include source citations in the output. (Default: `false`)
58
+ **sendSources** (`boolean`): (Agent only) Whether to include source citations in the output. (Default: `false`)
59
59
 
60
- **includeTextStreamParts?:** (`boolean`): (Workflow only) Whether to include text stream parts in the output. (Default: `true`)
60
+ **includeTextStreamParts** (`boolean`): (Workflow only) Whether to include text stream parts in the output. (Default: `true`)
61
61
 
62
- **messageMetadata?:** (`(options: { part: UIMessageStreamPart }) => Record<string, unknown> | undefined`): (Agent only) A function that receives the current stream part and returns metadata to attach to start and finish chunks.
62
+ **messageMetadata** (`(options: { part: UIMessageStreamPart }) => Record<string, unknown> | undefined`): (Agent only) A function that receives the current stream part and returns metadata to attach to start and finish chunks.
63
63
 
64
- **onError?:** (`(error: unknown) => string`): (Agent only) A function to handle errors during stream conversion. Receives the error and should return a string representation.
64
+ **onError** (`(error: unknown) => string`): (Agent only) A function to handle errors during stream conversion. Receives the error and should return a string representation.
65
65
 
66
66
  ## Examples
67
67
 
@@ -30,29 +30,29 @@ const { text } = await generateText({
30
30
 
31
31
  ## Parameters
32
32
 
33
- **model:** (`LanguageModelV2`): Any AI SDK language model (e.g., \`openai('gpt-4o')\`, \`anthropic('claude-3-opus')\`).
33
+ **model** (`LanguageModelV2`): Any AI SDK language model (e.g., \`openai('gpt-4o')\`, \`anthropic('claude-3-opus')\`).
34
34
 
35
- **options?:** (`WithMastraOptions`): Configuration object for processors and memory.
35
+ **options** (`WithMastraOptions`): Configuration object for processors and memory.
36
36
 
37
- **options.inputProcessors?:** (`InputProcessor[]`): Input processors to run before the LLM call.
37
+ **options.inputProcessors** (`InputProcessor[]`): Input processors to run before the LLM call.
38
38
 
39
- **options.outputProcessors?:** (`OutputProcessor[]`): Output processors to run on the LLM response.
39
+ **options.outputProcessors** (`OutputProcessor[]`): Output processors to run on the LLM response.
40
40
 
41
- **options.memory?:** (`WithMastraMemoryOptions`): Memory configuration - enables automatic message history persistence.
41
+ **options.memory** (`WithMastraMemoryOptions`): Memory configuration - enables automatic message history persistence.
42
42
 
43
- **options.memory.storage:** (`MemoryStorage`): Memory storage domain for message persistence. Get it from a composite store using \`await storage.getStore('memory')\`.
43
+ **options.memory.storage** (`MemoryStorage`): Memory storage domain for message persistence. Get it from a composite store using \`await storage.getStore('memory')\`.
44
44
 
45
- **options.memory.threadId:** (`string`): Thread ID for conversation persistence.
45
+ **options.memory.threadId** (`string`): Thread ID for conversation persistence.
46
46
 
47
- **options.memory.resourceId?:** (`string`): Resource ID (user/session identifier).
47
+ **options.memory.resourceId** (`string`): Resource ID (user/session identifier).
48
48
 
49
- **options.memory.lastMessages?:** (`number | false`): Number of recent messages to retrieve, or false to disable.
49
+ **options.memory.lastMessages** (`number | false`): Number of recent messages to retrieve, or false to disable.
50
50
 
51
- **options.memory.semanticRecall?:** (`WithMastraSemanticRecallOptions`): Semantic recall configuration (RAG-based memory retrieval).
51
+ **options.memory.semanticRecall** (`WithMastraSemanticRecallOptions`): Semantic recall configuration (RAG-based memory retrieval).
52
52
 
53
- **options.memory.workingMemory?:** (`MemoryConfig['workingMemory']`): Working memory configuration (persistent user data).
53
+ **options.memory.workingMemory** (`MemoryConfig['workingMemory']`): Working memory configuration (persistent user data).
54
54
 
55
- **options.memory.readOnly?:** (`boolean`): Read-only mode - prevents saving new messages.
55
+ **options.memory.readOnly** (`boolean`): Read-only mode - prevents saving new messages.
56
56
 
57
57
  ## Returns
58
58
 
@@ -47,11 +47,11 @@ export const mastra = new Mastra({
47
47
 
48
48
  ## Parameters
49
49
 
50
- **path?:** (`string`): The route path (e.g., \`/workflow\` or \`/workflow/:workflowId\`). Include \`:workflowId\` for dynamic workflow routing. (Default: `'/api/workflows/:workflowId/stream'`)
50
+ **path** (`string`): The route path (e.g., \`/workflow\` or \`/workflow/:workflowId\`). Include \`:workflowId\` for dynamic workflow routing. (Default: `'/api/workflows/:workflowId/stream'`)
51
51
 
52
- **workflow?:** (`string`): Fixed workflow ID when not using dynamic routing. (Default: `undefined`)
52
+ **workflow** (`string`): Fixed workflow ID when not using dynamic routing. (Default: `undefined`)
53
53
 
54
- **includeTextStreamParts?:** (`boolean`): Whether to include text stream parts in the output. (Default: `true`)
54
+ **includeTextStreamParts** (`boolean`): Whether to include text stream parts in the output. (Default: `true`)
55
55
 
56
56
  ## Additional configuration
57
57