@mastra/core 1.86.0-alpha.7 → 1.86.0-alpha.9

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 (509) hide show
  1. package/dist/_types/@internal_core@0.1.4/dist/knowledge-compat/index.d.ts +363 -0
  2. package/dist/a2a/index.cjs +1 -1
  3. package/dist/a2a/index.js +1 -1
  4. package/dist/agent/agent.d.ts +72 -1
  5. package/dist/agent/agent.types.d.ts +30 -2
  6. package/dist/agent/durable/create-evented-agent.d.ts +6 -0
  7. package/dist/agent/durable/durable-agent.d.ts +1 -15
  8. package/dist/agent/durable/index.cjs +7 -26
  9. package/dist/agent/durable/index.js +7 -26
  10. package/dist/agent/durable/preparation.d.ts +2 -0
  11. package/dist/agent/durable/utils/resolve-runtime.d.ts +9 -0
  12. package/dist/agent/durable/workflows/durable-loop-builder.d.ts +4 -0
  13. package/dist/agent/durable/workflows/finalize-run.d.ts +3 -1
  14. package/dist/agent/durable/workflows/steps/llm-execution.d.ts +1 -0
  15. package/dist/agent/index.cjs +3 -3
  16. package/dist/agent/index.js +3 -3
  17. package/dist/agent/message-list/index.cjs +1 -1
  18. package/dist/agent/message-list/index.js +1 -1
  19. package/dist/agent/message-list/message-list.d.ts +11 -0
  20. package/dist/agent/message-list/utils/provider-compat.d.ts +1 -0
  21. package/dist/agent/request-context-snapshot.d.ts +1 -1
  22. package/dist/agent/streams/types.d.ts +10 -0
  23. package/dist/agent/thread-stream-runtime.d.ts +5 -0
  24. package/dist/agent/types.d.ts +25 -0
  25. package/dist/agent-builder/ee/index.cjs +1 -1
  26. package/dist/agent-builder/ee/index.js +1 -1
  27. package/dist/agent-controller/index.cjs +1 -1
  28. package/dist/agent-controller/index.js +1 -1
  29. package/dist/{agent-controller-K5vHtqfO.cjs → agent-controller-CrQ9OF80.cjs} +8 -8
  30. package/dist/{agent-controller-Cf3_IuY8.js → agent-controller-SSlKzE6A.js} +8 -8
  31. package/dist/background-tasks/index.cjs +1 -1
  32. package/dist/background-tasks/index.js +1 -1
  33. package/dist/{background-tasks-DqnQMfuf.cjs → background-tasks-BDrYBis-.cjs} +5 -3
  34. package/dist/{background-tasks-BgpX1P_s.js → background-tasks-BnJfNLFo.js} +5 -3
  35. package/dist/browser/index.cjs +2 -2
  36. package/dist/browser/index.js +2 -2
  37. package/dist/{builder-x295GDL6.js → builder-Cl-0BWkh.js} +2 -2
  38. package/dist/{builder-D8Osghdo.cjs → builder-Cw8u3pPl.cjs} +2 -2
  39. package/dist/capabilities/302ai.json +192 -192
  40. package/dist/capabilities/abliteratedllm.json +34 -34
  41. package/dist/capabilities/abliteration-ai.json +11 -11
  42. package/dist/capabilities/above.json +17 -17
  43. package/dist/capabilities/adaption.json +12 -12
  44. package/dist/capabilities/adzuki.json +30 -30
  45. package/dist/capabilities/agentrouter.json +10 -10
  46. package/dist/capabilities/agnes.json +4 -4
  47. package/dist/capabilities/ai-router.json +9 -9
  48. package/dist/capabilities/aiand.json +19 -11
  49. package/dist/capabilities/aigrow.json +11 -11
  50. package/dist/capabilities/aimlapi.json +146 -149
  51. package/dist/capabilities/aipg.json +2 -2
  52. package/dist/capabilities/aixy.json +14 -14
  53. package/dist/capabilities/aki-io.json +11 -11
  54. package/dist/capabilities/alibaba-cn.json +128 -109
  55. package/dist/capabilities/alibaba-coding-plan-cn.json +7 -19
  56. package/dist/capabilities/alibaba-coding-plan.json +7 -19
  57. package/dist/capabilities/alibaba-token-plan-cn.json +49 -67
  58. package/dist/capabilities/alibaba-token-plan.json +51 -69
  59. package/dist/capabilities/alibaba.json +71 -118
  60. package/dist/capabilities/ambient.json +14 -14
  61. package/dist/capabilities/amd.json +11 -11
  62. package/dist/capabilities/anthropic.json +48 -48
  63. package/dist/capabilities/anyapi.json +18 -18
  64. package/dist/capabilities/apiko.json +2 -2
  65. package/dist/capabilities/arcee.json +10 -10
  66. package/dist/capabilities/augure.json +6 -6
  67. package/dist/capabilities/auriko.json +20 -20
  68. package/dist/capabilities/bailing.json +5 -5
  69. package/dist/capabilities/baseten.json +46 -16
  70. package/dist/capabilities/bee.json +5 -5
  71. package/dist/capabilities/berget.json +4 -4
  72. package/dist/capabilities/bothub.json +16 -16
  73. package/dist/capabilities/boundless.json +36 -36
  74. package/dist/capabilities/bumo.json +40 -40
  75. package/dist/capabilities/byteplus.json +32 -32
  76. package/dist/capabilities/cerebras.json +4 -4
  77. package/dist/capabilities/cheapaimodel.json +5 -5
  78. package/dist/capabilities/cheapest-token.json +24 -24
  79. package/dist/capabilities/chutes.json +9 -9
  80. package/dist/capabilities/cline-pass.json +37 -37
  81. package/dist/capabilities/cloudcode.json +4 -4
  82. package/dist/capabilities/cloudflare-workers-ai.json +24 -24
  83. package/dist/capabilities/commandcode.json +152 -152
  84. package/dist/capabilities/concentrate.json +290 -266
  85. package/dist/capabilities/cortecs.json +105 -105
  86. package/dist/capabilities/crossmodel.json +160 -160
  87. package/dist/capabilities/crusoe.json +10 -10
  88. package/dist/capabilities/daoxe.json +7 -7
  89. package/dist/capabilities/databricks.json +318 -62
  90. package/dist/capabilities/deepinfra.json +73 -129
  91. package/dist/capabilities/deepseek.json +2 -2
  92. package/dist/capabilities/digitalocean.json +114 -114
  93. package/dist/capabilities/dothoosh.json +28 -28
  94. package/dist/capabilities/doubleword.json +24 -24
  95. package/dist/capabilities/edenai.json +458 -458
  96. package/dist/capabilities/empiriolabs.json +166 -166
  97. package/dist/capabilities/engy.json +20 -20
  98. package/dist/capabilities/evroc.json +8 -8
  99. package/dist/capabilities/ezkielyna.json +8 -8
  100. package/dist/capabilities/fastrouter.json +85 -85
  101. package/dist/capabilities/fireworks-ai.json +107 -44
  102. package/dist/capabilities/freemodel.json +23 -23
  103. package/dist/capabilities/friendli.json +9 -9
  104. package/dist/capabilities/frogbot.json +94 -94
  105. package/dist/capabilities/gisoo.json +16 -16
  106. package/dist/capabilities/gmicloud.json +17 -17
  107. package/dist/capabilities/google.json +57 -57
  108. package/dist/capabilities/graphn.json +10 -10
  109. package/dist/capabilities/greenpt.json +36 -36
  110. package/dist/capabilities/groq.json +2 -2
  111. package/dist/capabilities/helicone.json +68 -68
  112. package/dist/capabilities/hopper.json +2 -2
  113. package/dist/capabilities/hostinger-router.json +12 -12
  114. package/dist/capabilities/hpc-ai.json +13 -13
  115. package/dist/capabilities/huawei-maas.json +17 -17
  116. package/dist/capabilities/hubris.json +30 -30
  117. package/dist/capabilities/huggingface.json +193 -37
  118. package/dist/capabilities/hyper.json +23 -23
  119. package/dist/capabilities/impossibl.json +140 -140
  120. package/dist/capabilities/inception.json +2 -2
  121. package/dist/capabilities/inceptron.json +4 -4
  122. package/dist/capabilities/inco.json +3 -3
  123. package/dist/capabilities/infer.json +15 -15
  124. package/dist/capabilities/inferall.json +10 -10
  125. package/dist/capabilities/inference-coop.json +9 -9
  126. package/dist/capabilities/inferenceapis.json +9 -9
  127. package/dist/capabilities/inferris.json +3 -3
  128. package/dist/capabilities/infersia.json +2 -2
  129. package/dist/capabilities/inferx.json +3 -3
  130. package/dist/capabilities/infomaniak.json +4 -4
  131. package/dist/capabilities/io-net.json +2 -2
  132. package/dist/capabilities/isoquant.json +4 -4
  133. package/dist/capabilities/iteracompute.json +60 -60
  134. package/dist/capabilities/jad-ai.json +3 -3
  135. package/dist/capabilities/jalapeno.json +12 -12
  136. package/dist/capabilities/jiekou.json +63 -63
  137. package/dist/capabilities/jzstoken.json +50 -50
  138. package/dist/capabilities/keln.json +14 -21
  139. package/dist/capabilities/kenari.json +123 -120
  140. package/dist/capabilities/kilo.json +622 -647
  141. package/dist/capabilities/kimi-code-plan-cn.json +5 -5
  142. package/dist/capabilities/kimi-code-plan-global.json +5 -5
  143. package/dist/capabilities/kitani.json +6 -6
  144. package/dist/capabilities/klavo.json +18 -18
  145. package/dist/capabilities/korouter.json +29 -29
  146. package/dist/capabilities/kunavo.json +10 -10
  147. package/dist/capabilities/liquid.json +11 -11
  148. package/dist/capabilities/lithosai.json +2 -2
  149. package/dist/capabilities/llmgateway-providers.json +932 -905
  150. package/dist/capabilities/llmgateway.json +336 -336
  151. package/dist/capabilities/llmtr.json +22 -22
  152. package/dist/capabilities/logits.json +2 -2
  153. package/dist/capabilities/longcat.json +2 -7
  154. package/dist/capabilities/lowrouter.json +54 -54
  155. package/dist/capabilities/lyceum.json +12 -12
  156. package/dist/capabilities/melious.json +13 -13
  157. package/dist/capabilities/merge-gateway.json +260 -260
  158. package/dist/capabilities/meta.json +7 -7
  159. package/dist/capabilities/mistral.json +20 -20
  160. package/dist/capabilities/mixlayer.json +4 -4
  161. package/dist/capabilities/modal.json +10 -10
  162. package/dist/capabilities/model-oracle-ai.json +25 -25
  163. package/dist/capabilities/modelis.json +20 -20
  164. package/dist/capabilities/modular.json +6 -6
  165. package/dist/capabilities/moneo.json +16 -16
  166. package/dist/capabilities/moonshotai-cn.json +7 -7
  167. package/dist/capabilities/moonshotai.json +7 -7
  168. package/dist/capabilities/morph.json +11 -11
  169. package/dist/capabilities/munito-eu.json +6 -6
  170. package/dist/capabilities/munito.json +6 -6
  171. package/dist/capabilities/nan.json +27 -27
  172. package/dist/capabilities/nano-gpt.json +578 -578
  173. package/dist/capabilities/nearai.json +84 -84
  174. package/dist/capabilities/nebius.json +37 -28
  175. package/dist/capabilities/neon.json +126 -126
  176. package/dist/capabilities/neuralwatt.json +41 -41
  177. package/dist/capabilities/nokeep.json +4 -4
  178. package/dist/capabilities/novita-ai.json +154 -154
  179. package/dist/capabilities/nvidia.json +35 -35
  180. package/dist/capabilities/oathbreaker.json +2 -2
  181. package/dist/capabilities/obscurify.json +32 -32
  182. package/dist/capabilities/oci.json +7 -7
  183. package/dist/capabilities/ofox.json +357 -357
  184. package/dist/capabilities/ollama-cloud.json +56 -56
  185. package/dist/capabilities/openai.json +51 -51
  186. package/dist/capabilities/opencode-go.json +85 -84
  187. package/dist/capabilities/openrouter.json +542 -567
  188. package/dist/capabilities/opper.json +30 -24
  189. package/dist/capabilities/orcarouter.json +236 -236
  190. package/dist/capabilities/outerlabs.json +32 -32
  191. package/dist/capabilities/ovhcloud.json +7 -7
  192. package/dist/capabilities/pareto.json +6 -6
  193. package/dist/capabilities/pendra.json +4 -4
  194. package/dist/capabilities/perplexity-agent.json +61 -61
  195. package/dist/capabilities/phala.json +34 -34
  196. package/dist/capabilities/pioneer.json +30 -30
  197. package/dist/capabilities/poe.json +136 -136
  198. package/dist/capabilities/powerspring.json +13 -13
  199. package/dist/capabilities/primalabs.json +10 -10
  200. package/dist/capabilities/prime.json +124 -107
  201. package/dist/capabilities/privatemode-ai.json +14 -14
  202. package/dist/capabilities/proxystacks.json +6 -6
  203. package/dist/capabilities/qiniu-ai.json +16 -16
  204. package/dist/capabilities/refuseless.json +6 -6
  205. package/dist/capabilities/regolo-ai.json +6 -6
  206. package/dist/capabilities/requesty.json +172 -172
  207. package/dist/capabilities/ruapi.json +17 -17
  208. package/dist/capabilities/runcrate.json +5 -5
  209. package/dist/capabilities/runinfra.json +13 -13
  210. package/dist/capabilities/sakana.json +6 -6
  211. package/dist/capabilities/sambanova.json +9 -9
  212. package/dist/capabilities/sandbase.json +27 -27
  213. package/dist/capabilities/sarvam.json +12 -12
  214. package/dist/capabilities/scaleway.json +14 -14
  215. package/dist/capabilities/scnet-token-plan.json +9 -9
  216. package/dist/capabilities/scx-ai.json +26 -26
  217. package/dist/capabilities/sensenova.json +12 -12
  218. package/dist/capabilities/siliconflow-cn.json +49 -49
  219. package/dist/capabilities/siliconflow.json +46 -46
  220. package/dist/capabilities/snowflake-cortex.json +20 -20
  221. package/dist/capabilities/sokkan.json +7 -7
  222. package/dist/capabilities/sparrowcodes.json +25 -25
  223. package/dist/capabilities/standardcompute.json +102 -102
  224. package/dist/capabilities/steadyrouter.json +40 -40
  225. package/dist/capabilities/stepfun-ai-step-plan.json +6 -6
  226. package/dist/capabilities/stepfun-ai.json +15 -8
  227. package/dist/capabilities/stepfun-step-plan.json +15 -8
  228. package/dist/capabilities/stepfun.json +15 -8
  229. package/dist/capabilities/stepping-stone.json +16 -16
  230. package/dist/capabilities/synthetic.json +13 -13
  231. package/dist/capabilities/synthorai.json +19 -19
  232. package/dist/capabilities/teamorouter.json +24 -24
  233. package/dist/capabilities/teapot-router.json +13 -13
  234. package/dist/capabilities/tencent-coding-plan.json +1 -23
  235. package/dist/capabilities/tencent-token-plan.json +60 -23
  236. package/dist/capabilities/tencent-tokenhub.json +182 -7
  237. package/dist/capabilities/tensorx.json +50 -50
  238. package/dist/capabilities/tenstorrent.json +6 -6
  239. package/dist/capabilities/the-grid-ai.json +28 -28
  240. package/dist/capabilities/thinkingmachines.json +72 -55
  241. package/dist/capabilities/tinfoil.json +13 -13
  242. package/dist/capabilities/toapis.json +2 -2
  243. package/dist/capabilities/togetherai.json +54 -83
  244. package/dist/capabilities/tokengo.json +25 -25
  245. package/dist/capabilities/tokenify.json +9 -9
  246. package/dist/capabilities/trustedrouter.json +4 -4
  247. package/dist/capabilities/trustedtokens.json +17 -17
  248. package/dist/capabilities/umans-ai-coding-plan.json +13 -13
  249. package/dist/capabilities/umans-ai.json +10 -10
  250. package/dist/capabilities/unrestricted.json +6 -6
  251. package/dist/capabilities/uplinkswitch.json +21 -21
  252. package/dist/capabilities/upstage.json +4 -4
  253. package/dist/capabilities/vancine.json +23 -23
  254. package/dist/capabilities/vercel.json +540 -527
  255. package/dist/capabilities/vivgrid.json +80 -80
  256. package/dist/capabilities/volcengine-coding-plan.json +24 -54
  257. package/dist/capabilities/volcengine.json +55 -60
  258. package/dist/capabilities/vultr.json +24 -24
  259. package/dist/capabilities/wafer.ai.json +19 -19
  260. package/dist/capabilities/wallaby.json +5 -5
  261. package/dist/capabilities/wally.json +11 -11
  262. package/dist/capabilities/wandb.json +21 -21
  263. package/dist/capabilities/watt.json +24 -24
  264. package/dist/capabilities/xai.json +7 -7
  265. package/dist/capabilities/xiaomi-token-plan-ams.json +2 -12
  266. package/dist/capabilities/xiaomi-token-plan-cn.json +2 -12
  267. package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -12
  268. package/dist/capabilities/xiaomi.json +3 -25
  269. package/dist/capabilities/xpersona.json +13 -13
  270. package/dist/capabilities/xxapi.json +31 -31
  271. package/dist/capabilities/zai-coding-plan.json +18 -18
  272. package/dist/capabilities/zai.json +49 -26
  273. package/dist/capabilities/zenifra.json +26 -26
  274. package/dist/capabilities/zenmux.json +205 -205
  275. package/dist/capabilities/zerogpu.json +11 -11
  276. package/dist/capabilities/zhipuai-coding-plan.json +6 -6
  277. package/dist/capabilities/zhipuai.json +39 -24
  278. package/dist/capabilities/zro.json +6 -6
  279. package/dist/channels/index.cjs +2 -2
  280. package/dist/channels/index.js +2 -2
  281. package/dist/{channels-Dx4jiXeK.js → channels-Cz1y3W6u.js} +1 -1
  282. package/dist/{channels-q6qnuRNV.cjs → channels-DQg4v_gm.cjs} +1 -1
  283. package/dist/coding-agent/index.cjs +2 -2
  284. package/dist/coding-agent/index.js +2 -2
  285. package/dist/datasets/dataset.d.ts +13 -6
  286. package/dist/datasets/experiment/durable.d.ts +16 -0
  287. package/dist/datasets/experiment/index.d.ts +2 -1
  288. package/dist/datasets/experiment/item.d.ts +26 -4
  289. package/dist/datasets/experiment/retries.d.ts +18 -0
  290. package/dist/datasets/experiment/types.d.ts +18 -0
  291. package/dist/datasets/experiment/workflow-id.d.ts +7 -0
  292. package/dist/datasets/experiment/workflow.d.ts +74 -0
  293. package/dist/datasets/index.cjs +3 -2
  294. package/dist/datasets/index.d.ts +2 -1
  295. package/dist/datasets/index.js +3 -3
  296. package/dist/docs/SKILL.md +4 -3
  297. package/dist/docs/assets/SOURCE_MAP.json +928 -903
  298. package/dist/docs/references/docs-deployment-workers.md +1 -1
  299. package/dist/docs/references/docs-evals-experiments.md +29 -1
  300. package/dist/docs/references/docs-harness-background-tasks.md +4 -1
  301. package/dist/docs/references/docs-harness-durable-agents.md +9 -5
  302. package/dist/docs/references/docs-knowledge-agents-and-tools.md +1 -0
  303. package/dist/docs/references/docs-knowledge-importers.md +195 -0
  304. package/dist/docs/references/docs-knowledge-load-your-content.md +2 -2
  305. package/dist/docs/references/docs-knowledge-overview.md +1 -1
  306. package/dist/docs/references/docs-mastra-platform-observability-overview.md +1 -1
  307. package/dist/docs/references/docs-sandbox-filesystem.md +1 -1
  308. package/dist/docs/references/docs-server-pubsub.md +51 -8
  309. package/dist/docs/references/docs-signals-running-across-processes.md +2 -0
  310. package/dist/docs/references/docs-signals-thread-streams.md +1 -1
  311. package/dist/docs/references/docs-studio-auth.md +54 -7
  312. package/dist/docs/references/docs-workflows-overview.md +1 -1
  313. package/dist/docs/references/docs-workflows-scheduled-workflows.md +1 -1
  314. package/dist/docs/references/integrations-auth-clerk.md +48 -4
  315. package/dist/docs/references/integrations-channels-slack.md +4 -2
  316. package/dist/docs/references/integrations.md +6 -0
  317. package/dist/docs/references/reference-agents-agent.md +3 -1
  318. package/dist/docs/references/reference-agents-channels.md +116 -27
  319. package/dist/docs/references/reference-agents-durable-agent.md +12 -4
  320. package/dist/docs/references/reference-auth-clerk.md +21 -1
  321. package/dist/docs/references/reference-datasets-runExperimentItem.md +13 -1
  322. package/dist/docs/references/reference-datasets-startExperimentAsync.md +3 -1
  323. package/dist/docs/references/reference-editor-mastra-editor.md +3 -1
  324. package/dist/docs/references/reference-knowledge-knowledge-class.md +13 -6
  325. package/dist/docs/references/reference-knowledge-knowledge-tools.md +43 -20
  326. package/dist/docs/references/reference-memory-observational-memory.md +2 -2
  327. package/dist/docs/references/reference-processors-moderation-processor.md +2 -2
  328. package/dist/docs/references/reference-pubsub-base.md +5 -1
  329. package/dist/docs/references/reference-pubsub-event-emitter.md +2 -0
  330. package/dist/docs/references/reference-pubsub-redis-streams.md +1 -1
  331. package/dist/docs/references/reference-pubsub-unix-socket-pubsub.md +2 -0
  332. package/dist/docs/references/reference-streaming-ChunkType.md +3 -3
  333. package/dist/docs/references/reference-workers-overview.md +1 -1
  334. package/dist/docs/references/reference-workflows-run-methods-start.md +23 -0
  335. package/dist/docs/references/reference-workflows-run-methods-timeTravel.md +4 -0
  336. package/dist/docs/references/reference-workflows-run.md +1 -1
  337. package/dist/docs/references/reference-workspace-local-sandbox.md +2 -0
  338. package/dist/error/index.cjs +1 -1
  339. package/dist/error/index.js +1 -1
  340. package/dist/{error-C9d_24w-.js → error-BLwEXqOK.js} +2 -2
  341. package/dist/{error-BRQf2ku0.cjs → error-BdEvO8za.cjs} +2 -2
  342. package/dist/evals/index.cjs +1 -1
  343. package/dist/evals/index.js +1 -1
  344. package/dist/evals/scoreTraces/index.cjs +1 -1
  345. package/dist/evals/scoreTraces/index.js +1 -1
  346. package/dist/events/caching-pubsub.d.ts +1 -0
  347. package/dist/events/event-emitter/index.d.ts +12 -5
  348. package/dist/events/index.cjs +15 -1
  349. package/dist/events/index.js +15 -1
  350. package/dist/events/pubsub.d.ts +29 -0
  351. package/dist/events/reach.d.ts +11 -0
  352. package/dist/events/unix-socket-pubsub.d.ts +14 -0
  353. package/dist/features/index.cjs +1 -0
  354. package/dist/features/index.js +1 -0
  355. package/dist/{filesystem-B5X-5G0x.js → filesystem-B8ad6kAW.js} +1 -1
  356. package/dist/{filesystem-BDSpwBke.cjs → filesystem-BB5YWXH-.cjs} +1 -1
  357. package/dist/{filesystem-DzM9pcQ8.js → filesystem-BDHUxbHn.js} +1 -1
  358. package/dist/{filesystem-B0AZrbj8.cjs → filesystem-BP5yz5LG.cjs} +1 -1
  359. package/dist/{filesystem-BsdkC311.js → filesystem-B_afSgYk.js} +1 -1
  360. package/dist/{filesystem-C-cyJfi1.cjs → filesystem-BaOJOc-V.cjs} +1 -1
  361. package/dist/{filesystem-B3s0WRud.js → filesystem-BhYgU8qg.js} +1 -1
  362. package/dist/{filesystem-DzfqVTO_.js → filesystem-CLBVmR5j.js} +1 -1
  363. package/dist/{filesystem-CEbD_77-.cjs → filesystem-Cgxc2a_-.cjs} +1 -1
  364. package/dist/{filesystem-Cv79mHRk.js → filesystem-ClBOBoDc.js} +1 -1
  365. package/dist/{filesystem-DsCQiBl2.cjs → filesystem-DVVecqZt.cjs} +1 -1
  366. package/dist/{filesystem-CUAgLugE.cjs → filesystem-Fpsu7e24.cjs} +1 -1
  367. package/dist/{filesystem-versioned-Bijb_p9l.js → filesystem-versioned-BL1ojJLo.js} +1 -1
  368. package/dist/{filesystem-versioned-DZGyPbNC.cjs → filesystem-versioned-BavRtYWJ.cjs} +1 -1
  369. package/dist/harness/index.cjs +1 -1
  370. package/dist/harness/index.js +1 -1
  371. package/dist/index.cjs +1 -1
  372. package/dist/index.js +1 -1
  373. package/dist/knowledge/config.d.ts +10 -0
  374. package/dist/knowledge/host-writes.d.ts +10 -0
  375. package/dist/knowledge/importers/conformance.d.ts +25 -0
  376. package/dist/knowledge/importers/define.d.ts +204 -0
  377. package/dist/knowledge/importers/host.d.ts +143 -0
  378. package/dist/knowledge/importers/index.d.ts +12 -0
  379. package/dist/knowledge/importers/local-host.d.ts +106 -0
  380. package/dist/knowledge/importers/manifest.d.ts +25 -0
  381. package/dist/knowledge/importers/runner.d.ts +61 -0
  382. package/dist/knowledge/importers/sink.d.ts +105 -0
  383. package/dist/knowledge/importers/types.d.ts +144 -0
  384. package/dist/knowledge/index.cjs +2715 -8
  385. package/dist/knowledge/index.d.ts +54 -4
  386. package/dist/knowledge/index.js +2692 -9
  387. package/dist/knowledge/instructions.d.ts +1 -1
  388. package/dist/knowledge/links.d.ts +8 -0
  389. package/dist/knowledge/pinned-state-processor.d.ts +5 -0
  390. package/dist/knowledge/pinned.d.ts +4 -1
  391. package/dist/knowledge/scope-runtime.d.ts +10 -0
  392. package/dist/llm/index.cjs +3 -3
  393. package/dist/llm/index.js +3 -3
  394. package/dist/llm/model/provider-types.generated.d.ts +7812 -7831
  395. package/dist/llm/model/shared.types.d.ts +31 -0
  396. package/dist/{llm-CsQuqKPc.cjs → llm-8Av3mSjD.cjs} +2 -2
  397. package/dist/{llm-DnXK3Pmw.js → llm-B5A5cwJr.js} +2 -2
  398. package/dist/loop/index.cjs +2 -2
  399. package/dist/loop/index.js +2 -2
  400. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +2 -2
  401. package/dist/{manager-BsghM-UL.js → manager-DfWQCJUK.js} +460 -94
  402. package/dist/{manager-DwFnIrI6.cjs → manager-sv35JY-z.cjs} +476 -92
  403. package/dist/mastra/index.cjs +1 -1
  404. package/dist/mastra/index.d.ts +13 -0
  405. package/dist/mastra/index.js +1 -1
  406. package/dist/mastra/resolve-agent.d.ts +3 -1
  407. package/dist/{mastra-B8i1UDZs.js → mastra-CigBrT7X.js} +32 -23
  408. package/dist/{mastra-Cn5NC6Es.cjs → mastra-D4hvfuxX.cjs} +34 -25
  409. package/dist/memory/index.cjs +3 -3
  410. package/dist/memory/index.js +3 -3
  411. package/dist/{message-list-DPXPXvin.cjs → message-list-Cj0Sq_JP.cjs} +63 -8
  412. package/dist/{message-list-DEuRl82K.js → message-list-KRbg-TnI.js} +63 -8
  413. package/dist/{model-CNPfry_X.cjs → model-BK93CMtl.cjs} +1 -1
  414. package/dist/{model-CsOcWMUt.js → model-CYtXw861.js} +1 -1
  415. package/dist/{netlify-C-83Fxus.cjs → netlify-BAnn3ouY.cjs} +1 -1
  416. package/dist/{netlify-C-OpNSGp.js → netlify-CuI1ZrwR.js} +1 -1
  417. package/dist/notifications/index.cjs +1 -1
  418. package/dist/notifications/index.js +1 -1
  419. package/dist/{output-helpers-JL-HeCbT.cjs → output-helpers-1Zu4Vt9C.cjs} +68 -25
  420. package/dist/{output-helpers-D4II19No.js → output-helpers-CedRCE17.js} +69 -26
  421. package/dist/processor-provider/index.cjs +1 -1
  422. package/dist/processor-provider/index.js +1 -1
  423. package/dist/processors/abort-signal-scope.d.ts +6 -0
  424. package/dist/processors/index.cjs +2 -2
  425. package/dist/processors/index.js +2 -2
  426. package/dist/{provider-registry-9O-H9osy.cjs → provider-registry-BwuI_IpT.cjs} +21690 -21811
  427. package/dist/{provider-registry-RZ8EgSe8.js → provider-registry-CmQLzLF_.js} +21690 -21811
  428. package/dist/provider-registry.json +22113 -22215
  429. package/dist/{registry-generator-e8sltJls.js → registry-generator-C17V4WfG.js} +1 -1
  430. package/dist/{registry-generator-DxCX-FiO.cjs → registry-generator-C_0ae7Ce.cjs} +1 -1
  431. package/dist/{rehydrate-B-wrAN7C.cjs → rehydrate-CDQ4dOYj.cjs} +2 -2
  432. package/dist/{rehydrate-D3fPgJwp.js → rehydrate-PnaVawGX.js} +2 -2
  433. package/dist/relevance/index.cjs +2 -2
  434. package/dist/relevance/index.js +2 -2
  435. package/dist/{run-registry-5_LQBGn_.cjs → run-registry-BmckDVBk.cjs} +1698 -497
  436. package/dist/{run-registry-DC03XLeZ.js → run-registry-BwEcwYlU.js} +1614 -467
  437. package/dist/{source-DDwx-87N.cjs → source-BVOi8Xhp.cjs} +1 -1
  438. package/dist/{source-Did_2XQc.js → source-fNa6u1kH.js} +1 -1
  439. package/dist/storage/domains/agents/index.cjs +1 -1
  440. package/dist/storage/domains/agents/index.js +1 -1
  441. package/dist/storage/domains/knowledge/base.d.ts +72 -0
  442. package/dist/storage/domains/knowledge/importers-inmemory.d.ts +146 -0
  443. package/dist/storage/domains/knowledge/importers.d.ts +287 -0
  444. package/dist/storage/domains/knowledge/index.d.ts +1 -0
  445. package/dist/storage/domains/knowledge/inmemory.d.ts +12 -0
  446. package/dist/storage/domains/knowledge/pages-inmemory.d.ts +12 -1
  447. package/dist/storage/domains/knowledge/pages.d.ts +25 -7
  448. package/dist/storage/domains/mcp-clients/index.cjs +1 -1
  449. package/dist/storage/domains/mcp-clients/index.js +1 -1
  450. package/dist/storage/domains/mcp-servers/index.cjs +1 -1
  451. package/dist/storage/domains/mcp-servers/index.js +1 -1
  452. package/dist/storage/domains/prompt-blocks/index.cjs +1 -1
  453. package/dist/storage/domains/prompt-blocks/index.js +1 -1
  454. package/dist/storage/domains/scorer-definitions/index.cjs +1 -1
  455. package/dist/storage/domains/scorer-definitions/index.js +1 -1
  456. package/dist/storage/domains/skills/index.cjs +1 -1
  457. package/dist/storage/domains/skills/index.js +1 -1
  458. package/dist/storage/domains/workspaces/index.cjs +1 -1
  459. package/dist/storage/domains/workspaces/index.js +1 -1
  460. package/dist/storage/index.cjs +15 -10
  461. package/dist/storage/index.js +11 -11
  462. package/dist/stream/base/output.d.ts +59 -15
  463. package/dist/stream/index.cjs +2 -2
  464. package/dist/stream/index.js +2 -2
  465. package/dist/stream/types.d.ts +24 -2
  466. package/dist/{stream-4aNIw_TQ.cjs → stream-0kdqBOOn.cjs} +64 -9
  467. package/dist/{stream-CJUm6EAH.js → stream-D1y9GzoD.js} +29 -10
  468. package/dist/test-utils/llm-mock.cjs +1 -1
  469. package/dist/test-utils/llm-mock.js +1 -1
  470. package/dist/tool-loop-agent/index.cjs +1 -1
  471. package/dist/tool-loop-agent/index.js +1 -1
  472. package/dist/{tool-loop-agent-FEEwHfmg.js → tool-loop-agent-BdjWGVIb.js} +4 -4
  473. package/dist/{tool-loop-agent-Dn0QCB9n.cjs → tool-loop-agent-kWaZAT6Q.cjs} +4 -4
  474. package/dist/tools/types.d.ts +27 -1
  475. package/dist/{utils-DY01hxVd.cjs → utils-BKUCaZ12.cjs} +1 -1
  476. package/dist/{utils-Bd_y1_a-.js → utils-GHY3hmLx.js} +1 -1
  477. package/dist/utils.cjs +1 -1
  478. package/dist/utils.js +1 -1
  479. package/dist/{validate-CX0yQo_q.js → validate-CB-q-R2F.js} +1 -1
  480. package/dist/{validate-CuB_1Zd3.cjs → validate-De92squ7.cjs} +1 -1
  481. package/dist/vector/index.cjs +2 -2
  482. package/dist/vector/index.js +2 -2
  483. package/dist/worker/index.cjs +1 -1
  484. package/dist/worker/index.js +1 -1
  485. package/dist/{worker-CbaSmip-.cjs → worker-BbWPQuPR.cjs} +2 -2
  486. package/dist/{worker-B80xkcKG.js → worker-C3u_xzY2.js} +2 -2
  487. package/dist/{worker-GsGIxPMa.cjs → worker-CAKvQj9_.cjs} +2 -2
  488. package/dist/{worker-DSEfMPmq.js → worker-Kwm8EKcj.js} +2 -2
  489. package/dist/{workflow-CnBPXTpv.cjs → workflow-CSjXeNcR.cjs} +4 -4
  490. package/dist/{workflow-CZHY_C85.js → workflow-CVmI1Sw-.js} +4 -4
  491. package/dist/workflows/builder/index.cjs +1 -1
  492. package/dist/workflows/builder/index.js +1 -1
  493. package/dist/workflows/evented/index.cjs +1 -1
  494. package/dist/workflows/evented/index.js +1 -1
  495. package/dist/workflows/evented/setup-warning.d.ts +18 -0
  496. package/dist/workflows/evented/workflow-event-processor/run-status.d.ts +37 -0
  497. package/dist/workflows/evented/workflow.d.ts +10 -0
  498. package/dist/workflows/index.cjs +4 -4
  499. package/dist/workflows/index.js +4 -4
  500. package/dist/workflows/workflow.d.ts +6 -1
  501. package/dist/workspace/filesystem/filesystem.d.ts +5 -0
  502. package/dist/workspace/index.cjs +1 -1
  503. package/dist/workspace/index.js +1 -1
  504. package/dist/workspace/sandbox/local-sandbox.d.ts +16 -7
  505. package/dist/workspace/sandbox/native-sandbox/types.d.ts +11 -1
  506. package/dist/{workspace-D7TIleIt.js → workspace-DY2Nxiyi.js} +235 -34
  507. package/dist/{workspace-D2drutNg.cjs → workspace-X2RHJZU9.cjs} +235 -34
  508. package/package.json +7 -7
  509. package/src/llm/model/provider-types.generated.d.ts +7812 -7831
@@ -1,6 +1,6 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BrhgMLW6.cjs");
2
- const require_llm = require("./llm-CsQuqKPc.cjs");
3
- const require_message_list = require("./message-list-DPXPXvin.cjs");
2
+ const require_llm = require("./llm-8Av3mSjD.cjs");
3
+ const require_message_list = require("./message-list-Cj0Sq_JP.cjs");
4
4
  const require_observability = require("./observability-B0R_D1PZ.cjs");
5
5
  const require_base = require("./base-BIzR1D3_.cjs");
6
6
  const require_error = require("./error-D90lJ6M7.cjs");
@@ -2763,6 +2763,12 @@ function residentStepResults(steps) {
2763
2763
  async function loadStepResults(steps) {
2764
2764
  return typeof steps === "function" ? steps() : steps;
2765
2765
  }
2766
+ // src/processors/abort-signal-scope.ts
2767
+ /**
2768
+ * The caller's abort signal for a processor workflow run. Held in the run scope
2769
+ * rather than the step payload: a serializing pubsub would encode the signal as `{}`.
2770
+ */
2771
+ const PROCESSOR_ABORT_SIGNAL = createRunScopeKey("processor-abort-signal");
2766
2772
  // src/processors/send-signal.ts
2767
2773
  const PROCESSOR_LATE_SIGNAL_SINK = createRunScopeKey("processor-late-signal-sink");
2768
2774
  function createProcessorSendSignal(args) {
@@ -4440,8 +4446,9 @@ var ProcessorRunner = class ProcessorRunner {
4440
4446
  shouldPersistSnapshot: () => false,
4441
4447
  tracingPolicy: { internal: 1 }
4442
4448
  } : void 0);
4443
- const scope = this.lateSignalSink ? workflow.mastra?.__createRunScope(run.runId) : void 0;
4449
+ const scope = this.lateSignalSink || abortSignal ? workflow.mastra?.__createRunScope(run.runId) : void 0;
4444
4450
  if (this.lateSignalSink) scope?.set(PROCESSOR_LATE_SIGNAL_SINK, this.lateSignalSink);
4451
+ if (abortSignal) scope?.set(PROCESSOR_ABORT_SIGNAL, abortSignal);
4445
4452
  const result = await (async () => {
4446
4453
  try {
4447
4454
  return await run.start({
@@ -6968,6 +6975,7 @@ function partMatches(a, b) {
6968
6975
  if (a.type === "step-start") return Number(a.createdAt) === Number(b.createdAt);
6969
6976
  return true;
6970
6977
  }
6978
+ /** @internal */
6971
6979
  function findIterationOffsetInParts(parts, stepText) {
6972
6980
  if (!stepText) return void 0;
6973
6981
  let suffixText = "";
@@ -6992,12 +7000,14 @@ function findIterationPartOffset(messageList, message, stepText) {
6992
7000
  if (!stepText.endsWith(suffixText)) return void 0;
6993
7001
  }
6994
7002
  }
7003
+ /** @internal */
6995
7004
  function resolveMessageText(message) {
6996
7005
  const converted = require_message_list.convertMessages([message]).to("AIV4.Core");
6997
7006
  const convertedMessage = converted[converted.length - 1];
6998
7007
  return convertedMessage ? require_message_list.coreContentToString(convertedMessage.content) : "";
6999
7008
  }
7000
7009
  const stepPartIndex = Symbol("stepPartIndex");
7010
+ /** @internal */
7001
7011
  function findStepPartBoundaries(message, steps) {
7002
7012
  const parts = message?.content.parts;
7003
7013
  if (!parts) return void 0;
@@ -7017,9 +7027,11 @@ function findStepPartBoundaries(message, steps) {
7017
7027
  for (const [stepIndex] of steps.entries()) for (const part of parts.slice(offsets[stepIndex], offsets[stepIndex + 1])) if (part.type === "text") part[stepPartIndex] = stepIndex;
7018
7028
  return { offsets };
7019
7029
  }
7030
+ /** @internal */
7020
7031
  function clearStepPartIndexes(messages) {
7021
7032
  for (const message of messages) for (const part of message.content.parts) delete part[stepPartIndex];
7022
7033
  }
7034
+ /** @internal */
7023
7035
  function reconcileBufferedStepTexts(steps, processedText, processedMessage, stepPartBoundaries, originalText) {
7024
7036
  if (processedText === originalText) return;
7025
7037
  const processedParts = processedMessage?.content.parts;
@@ -7794,7 +7806,10 @@ var MastraModelOutput = class extends require_base.MastraBase {
7794
7806
  messages: messageList.get.response.aiV5.model(),
7795
7807
  uiMessages: messageList.get.response.aiV5.ui()
7796
7808
  };
7797
- } else if (self.#bufferedSteps.length > 0) response = { ...self.#bufferedSteps[self.#bufferedSteps.length - 1].response };
7809
+ } else if (self.#bufferedSteps.length > 0) {
7810
+ response = { ...self.#bufferedSteps[self.#bufferedSteps.length - 1].response };
7811
+ if (chunk.payload.messages?.nonUser) response.messages = chunk.payload.messages.nonUser;
7812
+ }
7798
7813
  if (self.#finishUsageIsTotal) {
7799
7814
  self.#usageCount.inputTokens = void 0;
7800
7815
  self.#usageCount.outputTokens = void 0;
@@ -7902,11 +7917,15 @@ var MastraModelOutput = class extends require_base.MastraBase {
7902
7917
  } else if (!self.#options.isLLMExecutionStep || self.#options.resolveFinalPromises) {
7903
7918
  let rewrittenText;
7904
7919
  if (chunk.payload.textRewritten === true && self.#status !== "canceled") {
7905
- const finalizedText = chunk.payload.output?.steps?.at(-1)?.text;
7906
- const lastStep = self.#bufferedSteps.at(-1);
7907
- if (lastStep && typeof finalizedText === "string") {
7908
- lastStep.text = finalizedText;
7909
- rewrittenText = finalizedText;
7920
+ const finalizedSteps = chunk.payload.output?.steps;
7921
+ if (finalizedSteps && self.#bufferedSteps.length && finalizedSteps.length >= self.#bufferedSteps.length) {
7922
+ const offset = finalizedSteps.length - self.#bufferedSteps.length;
7923
+ for (const [index, step] of self.#bufferedSteps.entries()) {
7924
+ const text = finalizedSteps[offset + index]?.text;
7925
+ if (typeof text === "string") step.text = text;
7926
+ }
7927
+ const output = chunk.payload.output;
7928
+ rewrittenText = "text" in output && typeof output.text === "string" ? output.text : finalizedSteps.at(-1)?.text;
7910
7929
  }
7911
7930
  }
7912
7931
  this.resolvePromises({
@@ -10307,6 +10326,12 @@ Object.defineProperty(exports, "OUTPUT_STREAM_HOOK_DURATION_KEY_PREFIX", {
10307
10326
  return OUTPUT_STREAM_HOOK_DURATION_KEY_PREFIX;
10308
10327
  }
10309
10328
  });
10329
+ Object.defineProperty(exports, "PROCESSOR_ABORT_SIGNAL", {
10330
+ enumerable: true,
10331
+ get: function() {
10332
+ return PROCESSOR_ABORT_SIGNAL;
10333
+ }
10334
+ });
10310
10335
  Object.defineProperty(exports, "PROCESSOR_LATE_SIGNAL_SINK", {
10311
10336
  enumerable: true,
10312
10337
  get: function() {
@@ -10415,6 +10440,12 @@ Object.defineProperty(exports, "cerebrasStripReasoningContent", {
10415
10440
  return cerebrasStripReasoningContent;
10416
10441
  }
10417
10442
  });
10443
+ Object.defineProperty(exports, "clearStepPartIndexes", {
10444
+ enumerable: true,
10445
+ get: function() {
10446
+ return clearStepPartIndexes;
10447
+ }
10448
+ });
10418
10449
  Object.defineProperty(exports, "collectMappingStepRefs", {
10419
10450
  enumerable: true,
10420
10451
  get: function() {
@@ -10541,12 +10572,24 @@ Object.defineProperty(exports, "escapeUnescapedControlCharsInJsonStrings", {
10541
10572
  return escapeUnescapedControlCharsInJsonStrings;
10542
10573
  }
10543
10574
  });
10575
+ Object.defineProperty(exports, "findIterationOffsetInParts", {
10576
+ enumerable: true,
10577
+ get: function() {
10578
+ return findIterationOffsetInParts;
10579
+ }
10580
+ });
10544
10581
  Object.defineProperty(exports, "findOwnModelStepSpan", {
10545
10582
  enumerable: true,
10546
10583
  get: function() {
10547
10584
  return findOwnModelStepSpan;
10548
10585
  }
10549
10586
  });
10587
+ Object.defineProperty(exports, "findStepPartBoundaries", {
10588
+ enumerable: true,
10589
+ get: function() {
10590
+ return findStepPartBoundaries;
10591
+ }
10592
+ });
10550
10593
  Object.defineProperty(exports, "getAbortReason", {
10551
10594
  enumerable: true,
10552
10595
  get: function() {
@@ -10793,6 +10836,12 @@ Object.defineProperty(exports, "readModelOutput", {
10793
10836
  return readModelOutput;
10794
10837
  }
10795
10838
  });
10839
+ Object.defineProperty(exports, "reconcileBufferedStepTexts", {
10840
+ enumerable: true,
10841
+ get: function() {
10842
+ return reconcileBufferedStepTexts;
10843
+ }
10844
+ });
10796
10845
  Object.defineProperty(exports, "removeTrailingAssistantGuardContinuations", {
10797
10846
  enumerable: true,
10798
10847
  get: function() {
@@ -10811,6 +10860,12 @@ Object.defineProperty(exports, "residentStepResultsLoader", {
10811
10860
  return residentStepResultsLoader;
10812
10861
  }
10813
10862
  });
10863
+ Object.defineProperty(exports, "resolveMessageText", {
10864
+ enumerable: true,
10865
+ get: function() {
10866
+ return resolveMessageText;
10867
+ }
10868
+ });
10814
10869
  Object.defineProperty(exports, "resolveModelOutputAfterToolResultProcessors", {
10815
10870
  enumerable: true,
10816
10871
  get: function() {
@@ -1,6 +1,6 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-tIEjjQTE.js";
2
- import { d as attachModelStreamTransport, f as isDataChunk, i as resolveModelConfig, p as readModelStreamTransport } from "./llm-DnXK3Pmw.js";
3
- import { B as getResponseProviderItemIdFromPart, G as RESPONSE_ITEM_ID_PROVIDERS, K as RESPONSE_RESULT_ITEM_ID_KEY, f as coreContentToString, n as MessageList, p as messagesAreEqual, t as convertMessages } from "./message-list-DEuRl82K.js";
2
+ import { d as attachModelStreamTransport, f as isDataChunk, i as resolveModelConfig, p as readModelStreamTransport } from "./llm-B5A5cwJr.js";
3
+ import { B as getResponseProviderItemIdFromPart, G as RESPONSE_ITEM_ID_PROVIDERS, K as RESPONSE_RESULT_ITEM_ID_KEY, f as coreContentToString, n as MessageList, p as messagesAreEqual, t as convertMessages } from "./message-list-KRbg-TnI.js";
4
4
  import { S as resolveObservabilityContext, x as createObservabilityContext } from "./observability-D7RNOAPx.js";
5
5
  import { t as MastraBase } from "./base-CKLWBhDo.js";
6
6
  import { i as MastraError, n as ErrorDomain, o as getErrorFromUnknown, t as ErrorCategory } from "./error-oh2DLsP2.js";
@@ -2762,6 +2762,12 @@ function residentStepResults(steps) {
2762
2762
  async function loadStepResults(steps) {
2763
2763
  return typeof steps === "function" ? steps() : steps;
2764
2764
  }
2765
+ // src/processors/abort-signal-scope.ts
2766
+ /**
2767
+ * The caller's abort signal for a processor workflow run. Held in the run scope
2768
+ * rather than the step payload: a serializing pubsub would encode the signal as `{}`.
2769
+ */
2770
+ const PROCESSOR_ABORT_SIGNAL = createRunScopeKey("processor-abort-signal");
2765
2771
  // src/processors/send-signal.ts
2766
2772
  const PROCESSOR_LATE_SIGNAL_SINK = createRunScopeKey("processor-late-signal-sink");
2767
2773
  function createProcessorSendSignal(args) {
@@ -4439,8 +4445,9 @@ var ProcessorRunner = class ProcessorRunner {
4439
4445
  shouldPersistSnapshot: () => false,
4440
4446
  tracingPolicy: { internal: 1 }
4441
4447
  } : void 0);
4442
- const scope = this.lateSignalSink ? workflow.mastra?.__createRunScope(run.runId) : void 0;
4448
+ const scope = this.lateSignalSink || abortSignal ? workflow.mastra?.__createRunScope(run.runId) : void 0;
4443
4449
  if (this.lateSignalSink) scope?.set(PROCESSOR_LATE_SIGNAL_SINK, this.lateSignalSink);
4450
+ if (abortSignal) scope?.set(PROCESSOR_ABORT_SIGNAL, abortSignal);
4444
4451
  const result = await (async () => {
4445
4452
  try {
4446
4453
  return await run.start({
@@ -6967,6 +6974,7 @@ function partMatches(a, b) {
6967
6974
  if (a.type === "step-start") return Number(a.createdAt) === Number(b.createdAt);
6968
6975
  return true;
6969
6976
  }
6977
+ /** @internal */
6970
6978
  function findIterationOffsetInParts(parts, stepText) {
6971
6979
  if (!stepText) return void 0;
6972
6980
  let suffixText = "";
@@ -6991,12 +6999,14 @@ function findIterationPartOffset(messageList, message, stepText) {
6991
6999
  if (!stepText.endsWith(suffixText)) return void 0;
6992
7000
  }
6993
7001
  }
7002
+ /** @internal */
6994
7003
  function resolveMessageText(message) {
6995
7004
  const converted = convertMessages([message]).to("AIV4.Core");
6996
7005
  const convertedMessage = converted[converted.length - 1];
6997
7006
  return convertedMessage ? coreContentToString(convertedMessage.content) : "";
6998
7007
  }
6999
7008
  const stepPartIndex = Symbol("stepPartIndex");
7009
+ /** @internal */
7000
7010
  function findStepPartBoundaries(message, steps) {
7001
7011
  const parts = message?.content.parts;
7002
7012
  if (!parts) return void 0;
@@ -7016,9 +7026,11 @@ function findStepPartBoundaries(message, steps) {
7016
7026
  for (const [stepIndex] of steps.entries()) for (const part of parts.slice(offsets[stepIndex], offsets[stepIndex + 1])) if (part.type === "text") part[stepPartIndex] = stepIndex;
7017
7027
  return { offsets };
7018
7028
  }
7029
+ /** @internal */
7019
7030
  function clearStepPartIndexes(messages) {
7020
7031
  for (const message of messages) for (const part of message.content.parts) delete part[stepPartIndex];
7021
7032
  }
7033
+ /** @internal */
7022
7034
  function reconcileBufferedStepTexts(steps, processedText, processedMessage, stepPartBoundaries, originalText) {
7023
7035
  if (processedText === originalText) return;
7024
7036
  const processedParts = processedMessage?.content.parts;
@@ -7793,7 +7805,10 @@ var MastraModelOutput = class extends MastraBase {
7793
7805
  messages: messageList.get.response.aiV5.model(),
7794
7806
  uiMessages: messageList.get.response.aiV5.ui()
7795
7807
  };
7796
- } else if (self.#bufferedSteps.length > 0) response = { ...self.#bufferedSteps[self.#bufferedSteps.length - 1].response };
7808
+ } else if (self.#bufferedSteps.length > 0) {
7809
+ response = { ...self.#bufferedSteps[self.#bufferedSteps.length - 1].response };
7810
+ if (chunk.payload.messages?.nonUser) response.messages = chunk.payload.messages.nonUser;
7811
+ }
7797
7812
  if (self.#finishUsageIsTotal) {
7798
7813
  self.#usageCount.inputTokens = void 0;
7799
7814
  self.#usageCount.outputTokens = void 0;
@@ -7901,11 +7916,15 @@ var MastraModelOutput = class extends MastraBase {
7901
7916
  } else if (!self.#options.isLLMExecutionStep || self.#options.resolveFinalPromises) {
7902
7917
  let rewrittenText;
7903
7918
  if (chunk.payload.textRewritten === true && self.#status !== "canceled") {
7904
- const finalizedText = chunk.payload.output?.steps?.at(-1)?.text;
7905
- const lastStep = self.#bufferedSteps.at(-1);
7906
- if (lastStep && typeof finalizedText === "string") {
7907
- lastStep.text = finalizedText;
7908
- rewrittenText = finalizedText;
7919
+ const finalizedSteps = chunk.payload.output?.steps;
7920
+ if (finalizedSteps && self.#bufferedSteps.length && finalizedSteps.length >= self.#bufferedSteps.length) {
7921
+ const offset = finalizedSteps.length - self.#bufferedSteps.length;
7922
+ for (const [index, step] of self.#bufferedSteps.entries()) {
7923
+ const text = finalizedSteps[offset + index]?.text;
7924
+ if (typeof text === "string") step.text = text;
7925
+ }
7926
+ const output = chunk.payload.output;
7927
+ rewrittenText = "text" in output && typeof output.text === "string" ? output.text : finalizedSteps.at(-1)?.text;
7909
7928
  }
7910
7929
  }
7911
7930
  this.resolvePromises({
@@ -10258,4 +10277,4 @@ function smoothStream({ delayInMs = 10, chunking = "word" } = {}) {
10258
10277
  }
10259
10278
  });
10260
10279
  }
10261
- export { RunJournal as $, withAgentWorkflowToolMarker as $t, findOwnModelStepSpan as A, materializeWorkflowRun as At, REPROCESS_PART_KEY as B, TITLE_PINNED_THREAD_METADATA_KEY as Bt, getResponseFormat as C, safeEnqueue as Cn, getSnapshotMemoryInfo as Ct, ProcessorState as D, isStateCheckpointDue as Dt, ProcessorRunner as E, createRunScopeKey as En, applyStateColumnsWrite as Et, ProviderHistoryCompat as F, unusedStateEntries as Ft, summarizeProcessorResultForSpan as G, setThreadOMMetadata as Gt, withoutHeldContent as H, isObservationalMemoryEnabled as Ht, anthropicToolIdFormat as I, applyStatePatch as It, resolveProcessorSpanAttributes as J, hasToolResultProcessor as Jt, summarizeProcessorToolsForSpan as K, commitToolResult as Kt, cerebrasStripReasoningContent as L, diffState as Lt, isTrailingAssistantGuardContinuation as M, stateBaseOf as Mt, needsTrailingAssistantGuard as N, stateColumnsWrite as Nt, endOutputStreamSpanAtStepEnd as O, latestStepResults as Ot, removeTrailingAssistantGuardContinuations as P, summarizeStepResult as Pt, createProcessorSendSignal as Q, snapshotToolResult as Qt, openaiOrphanItemId as R, diffStateAsJson as Rt, asJsonSchema as S, safeClose as Sn, getStepResultAsync as St, OUTPUT_STREAM_HOOK_DURATION_KEY_PREFIX as T, createRunScope as Tn, STEP_RESULT_SUMMARY_FIELDS as Tt, summarizeActiveToolsForSpan as U, isThreadTitlePinned as Ut, takeHeldParts as V, getThreadOMMetadata as Vt, summarizeProcessorModelForSpan as W, parseMemoryRequestContext as Wt, toProcessorSpanPhase as X, readModelOutput as Xt, resolveProcessorSpanName as Y, latestProcessedModelOutput as Yt, PROCESSOR_LATE_SIGNAL_SINK as Z, resolveModelOutputAfterToolResultProcessors as Zt, stampChunkProducedAt as _, isMastraTimeoutError as _n, resolveTemplate as _t, convertFullStreamChunkToMastra as a, resolveThreadIdFromArgs as an, loadStepResults as at, escapeUnescapedControlCharsInJsonStrings as b, convertFullStreamChunkToUIMessageStream as bn, validateTemplate as bt, WorkflowRunOutput as c, tryStreamWithJsonFallback as cn, residentStepResultsLoader as ct, MastraModelOutput as d, DEADLINE_SAVE_WAIT_MS as dn, collectMappingStepRefs as dt, normalizeModelOutput as en, buildStepResultAccessors as et, createDestructurableOutput as f, MastraTimeoutError as fn, collectPredicateStepRefs as ft, getChunkProducedAt as g, guardStreamWithAbort as gn, collectTemplateStepIds as gt, resolveProcessorWriterMessageId as h, guardStreamUntilMatch as hn, stepRefId as ht, withStreamCaching as i, resolveSuspendedToolRunId as in, lazyStepResults as it, runner_exports as j, pickStateKeys as jt, endOutputStreamSpanOutsideStep as k, materializeState as kt, TripWire as l, applyStateSignal as ln, storageV2StepResultAccessors as lt, resolveOutputMessageSkippingCompletionChecks as m, getAbortReason as mn, resolveStepOutputs as mt, createCachingTransformStream as n, isProcessorWorkflow as nn, hydrateStepResults as nt, convertMastraChunkToAISDKv5 as o, supportedLanguageModelSpecifications as on, loadedStepResults as ot, persistProcessorDataChunk as p, createTimeoutAbortSignal as pn, predicateReadsState as pt, summarizeToolChoiceForSpan as q, computeModelOutputProviderMetadata as qt, createReplayStream as r, isSupportedLanguageModel as rn, isStepResultStub as rt, MastraAgentNetworkStream as s, tryGenerateWithJsonFallback as sn, residentStepResults as st, smoothStream as t, validationErrorModelOutput as tn, getHydratedStepResult as tt, getModelOutputForTripwire as u, DEADLINE_SAVE_CLAIM_HOLD_MS as un, stubStepResult as ut, markChunkOutputProcessed as v, raceAgainstAbort as vn, templateReadsState as vt, isSignalChunkExcluded as w, safeError as wn, STATE_CHECKPOINT_PATCHES as wt, isStructuredOutputError as x, MastraModelInput as xn, getStepResult as xt, createOutputHandler as y, settledOrElapsed as yn, traverseMappingPath as yt, FLUSH_HELD_PARTS_KEY as z, patchState as zt };
10280
+ export { resolveProcessorSpanAttributes as $, computeModelOutputProviderMetadata as $t, OUTPUT_STREAM_HOOK_DURATION_KEY_PREFIX as A, safeError as An, STATE_CHECKPOINT_PATCHES as At, ProviderHistoryCompat as B, summarizeStepResult as Bt, markChunkOutputProcessed as C, isMastraTimeoutError as Cn, resolveTemplate as Ct, asJsonSchema as D, MastraModelInput as Dn, getStepResult as Dt, isStructuredOutputError as E, convertFullStreamChunkToUIMessageStream as En, validateTemplate as Et, findOwnModelStepSpan as F, materializeState as Ft, REPROCESS_PART_KEY as G, patchState as Gt, cerebrasStripReasoningContent as H, applyStatePatch as Ht, runner_exports as I, materializeWorkflowRun as It, summarizeActiveToolsForSpan as J, isObservationalMemoryEnabled as Jt, takeHeldParts as K, TITLE_PINNED_THREAD_METADATA_KEY as Kt, isTrailingAssistantGuardContinuation as L, pickStateKeys as Lt, ProcessorState as M, createRunScopeKey as Mn, applyStateColumnsWrite as Mt, endOutputStreamSpanAtStepEnd as N, isStateCheckpointDue as Nt, getResponseFormat as O, safeClose as On, getStepResultAsync as Ot, endOutputStreamSpanOutsideStep as P, latestStepResults as Pt, summarizeToolChoiceForSpan as Q, commitToolResult as Qt, needsTrailingAssistantGuard as R, stateBaseOf as Rt, stampChunkProducedAt as S, guardStreamWithAbort as Sn, collectTemplateStepIds as St, escapeUnescapedControlCharsInJsonStrings as T, settledOrElapsed as Tn, traverseMappingPath as Tt, openaiOrphanItemId as U, diffState as Ut, anthropicToolIdFormat as V, unusedStateEntries as Vt, FLUSH_HELD_PARTS_KEY as W, diffStateAsJson as Wt, summarizeProcessorResultForSpan as X, parseMemoryRequestContext as Xt, summarizeProcessorModelForSpan as Y, isThreadTitlePinned as Yt, summarizeProcessorToolsForSpan as Z, setThreadOMMetadata as Zt, reconcileBufferedStepTexts as _, DEADLINE_SAVE_WAIT_MS as _n, collectMappingStepRefs as _t, convertFullStreamChunkToMastra as a, withAgentWorkflowToolMarker as an, RunJournal as at, resolveProcessorWriterMessageId as b, getAbortReason as bn, resolveStepOutputs as bt, WorkflowRunOutput as c, isProcessorWorkflow as cn, hydrateStepResults as ct, MastraModelOutput as d, resolveThreadIdFromArgs as dn, loadStepResults as dt, hasToolResultProcessor as en, resolveProcessorSpanName as et, clearStepPartIndexes as f, supportedLanguageModelSpecifications as fn, loadedStepResults as ft, persistProcessorDataChunk as g, DEADLINE_SAVE_CLAIM_HOLD_MS as gn, stubStepResult as gt, findStepPartBoundaries as h, applyStateSignal as hn, storageV2StepResultAccessors as ht, withStreamCaching as i, snapshotToolResult as in, PROCESSOR_ABORT_SIGNAL as it, ProcessorRunner as j, createRunScope as jn, STEP_RESULT_SUMMARY_FIELDS as jt, isSignalChunkExcluded as k, safeEnqueue as kn, getSnapshotMemoryInfo as kt, TripWire as l, isSupportedLanguageModel as ln, isStepResultStub as lt, findIterationOffsetInParts as m, tryStreamWithJsonFallback as mn, residentStepResultsLoader as mt, createCachingTransformStream as n, readModelOutput as nn, PROCESSOR_LATE_SIGNAL_SINK as nt, convertMastraChunkToAISDKv5 as o, normalizeModelOutput as on, buildStepResultAccessors as ot, createDestructurableOutput as p, tryGenerateWithJsonFallback as pn, residentStepResults as pt, withoutHeldContent as q, getThreadOMMetadata as qt, createReplayStream as r, resolveModelOutputAfterToolResultProcessors as rn, createProcessorSendSignal as rt, MastraAgentNetworkStream as s, validationErrorModelOutput as sn, getHydratedStepResult as st, smoothStream as t, latestProcessedModelOutput as tn, toProcessorSpanPhase as tt, getModelOutputForTripwire as u, resolveSuspendedToolRunId as un, lazyStepResults as ut, resolveMessageText as v, MastraTimeoutError as vn, collectPredicateStepRefs as vt, createOutputHandler as w, raceAgainstAbort as wn, templateReadsState as wt, getChunkProducedAt as x, guardStreamUntilMatch as xn, stepRefId as xt, resolveOutputMessageSkippingCompletionChecks as y, createTimeoutAbortSignal as yn, predicateReadsState as yt, removeTrailingAssistantGuardContinuations as z, stateColumnsWrite as zt };
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("../rolldown-runtime-BrhgMLW6.cjs");
3
3
  const require_dist = require("../dist-CXeCeeW7.cjs");
4
- const require_model = require("../model-CNPfry_X.cjs");
4
+ const require_model = require("../model-BK93CMtl.cjs");
5
5
  const require_model$1 = require("../model-jBymoqGa.cjs");
6
6
  let stream = require("stream");
7
7
  let module$1 = require("module");
@@ -1,5 +1,5 @@
1
1
  import { o as simulateReadableStream } from "../dist-D3cKCUe-.js";
2
- import { t as MastraLLMV1 } from "../model-CsOcWMUt.js";
2
+ import { t as MastraLLMV1 } from "../model-CYtXw861.js";
3
3
  import { t as AISDKV5LanguageModel } from "../model-DS-b2R-R.js";
4
4
  import { createRequire } from "module";
5
5
  import { Readable } from "stream";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_tool_loop_agent = require("../tool-loop-agent-Dn0QCB9n.cjs");
2
+ const require_tool_loop_agent = require("../tool-loop-agent-kWaZAT6Q.cjs");
3
3
  exports.getSettings = require_tool_loop_agent.getSettings;
4
4
  exports.isToolLoopAgentLike = require_tool_loop_agent.isToolLoopAgentLike;
5
5
  exports.toolLoopAgentToMastraAgent = require_tool_loop_agent.toolLoopAgentToMastraAgent;
@@ -1 +1 @@
1
- export { n as getSettings, r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "../tool-loop-agent-FEEwHfmg.js";
1
+ export { n as getSettings, r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "../tool-loop-agent-BdjWGVIb.js";
@@ -1,8 +1,8 @@
1
1
  import { m as generateId } from "./dist-TPVqg8oV.js";
2
- import { P as Agent } from "./run-registry-DC03XLeZ.js";
3
- import { rn as isSupportedLanguageModel } from "./stream-CJUm6EAH.js";
4
- import { i as resolveModelConfig } from "./llm-DnXK3Pmw.js";
5
- import { N as ToolLoopAgent } from "./message-list-DEuRl82K.js";
2
+ import { N as Agent } from "./run-registry-BwEcwYlU.js";
3
+ import { ln as isSupportedLanguageModel } from "./stream-D1y9GzoD.js";
4
+ import { i as resolveModelConfig } from "./llm-B5A5cwJr.js";
5
+ import { N as ToolLoopAgent } from "./message-list-KRbg-TnI.js";
6
6
  // src/tool-loop-agent/utils.ts
7
7
  function isToolLoopAgentLike(obj) {
8
8
  if (!obj) return false;
@@ -1,8 +1,8 @@
1
1
  const require_dist = require("./dist-P2rjrlmj.cjs");
2
- const require_run_registry = require("./run-registry-5_LQBGn_.cjs");
3
- const require_stream = require("./stream-4aNIw_TQ.cjs");
4
- const require_llm = require("./llm-CsQuqKPc.cjs");
5
- const require_message_list = require("./message-list-DPXPXvin.cjs");
2
+ const require_run_registry = require("./run-registry-BmckDVBk.cjs");
3
+ const require_stream = require("./stream-0kdqBOOn.cjs");
4
+ const require_llm = require("./llm-8Av3mSjD.cjs");
5
+ const require_message_list = require("./message-list-Cj0Sq_JP.cjs");
6
6
  // src/tool-loop-agent/utils.ts
7
7
  function isToolLoopAgentLike(obj) {
8
8
  if (!obj) return false;
@@ -622,7 +622,33 @@ export type ToolExecuteCallContext<TContext> = Omit<TContext, 'observe'> & {
622
622
  export type ToolExecuteContext<TContext, TRequestContext extends Record<string, any> | unknown = unknown> = Omit<TContext, 'requestContext'> & {
623
623
  requestContext: RequestContext<TRequestContext>;
624
624
  };
625
- /** The `execute` callback signature used by `createTool` and `new Tool(...)`. */
625
+ /**
626
+ * The `execute` callback of `createTool({ execute })` / `new Tool(...)`: called as
627
+ * `execute(inputData, context)`.
628
+ *
629
+ * - `inputData`: the tool input, already validated against `inputSchema` (the callback is not
630
+ * called when validation fails; the caller gets a `ValidationError` instead). It is the
631
+ * input object itself, not wrapped in `{ context }`.
632
+ * - `context`: runtime context — `requestContext` (always present), `mastra`, `abortSignal`,
633
+ * `writer` (stream custom data), `workspace`, `observe`, and `agent` (`toolCallId`,
634
+ * `threadId`, `resourceId`, `suspend`, `resumeData`) when an agent runs the tool, or
635
+ * `workflow` when a workflow step does.
636
+ * - Return the tool output (validated against `outputSchema` when set).
637
+ *
638
+ * @example
639
+ * ```ts
640
+ * createTool({
641
+ * id: 'get-weather',
642
+ * description: 'Get the weather for a city',
643
+ * inputSchema: z.object({ city: z.string() }),
644
+ * execute: async ({ city }, { requestContext, abortSignal }) => {
645
+ * return { city, temperature: 21 };
646
+ * },
647
+ * });
648
+ * ```
649
+ *
650
+ * @see [createTool() reference](https://mastra.ai/reference/tools/create-tool)
651
+ */
626
652
  export type ToolExecuteFunction<TSchemaIn, TSchemaOut, TContext, TRequestContext extends Record<string, any> | unknown = unknown> = (inputData: TSchemaIn, context: ToolExecuteContext<TContext, TRequestContext>) => Promise<TSchemaOut | ValidationError | void>;
627
653
  export interface ToolAction<TSchemaIn, TSchemaOut, TSuspend = unknown, TResume = unknown, TContext extends ToolExecutionContext<TSuspend, TResume, any> = ToolExecutionContext<TSuspend, TResume>, TId extends string = string, TRequestContext extends Record<string, any> | unknown = unknown> {
628
654
  id: TId;
@@ -1,7 +1,7 @@
1
1
  const require_error = require("./error-D90lJ6M7.cjs");
2
2
  const require_tool = require("./tool-CYlT2UA-.cjs");
3
3
  const require_ee_iTj2bRDt = require("./ee-iTj2bRDt-D3-QLGDF.cjs");
4
- const require_background_tasks = require("./background-tasks-DqnQMfuf.cjs");
4
+ const require_background_tasks = require("./background-tasks-BDrYBis-.cjs");
5
5
  const require_base = require("./base-BIzR1D3_.cjs");
6
6
  const require_observability = require("./observability-B0R_D1PZ.cjs");
7
7
  const require_utils = require("./utils-D-eNsgDM.cjs");
@@ -1,7 +1,7 @@
1
1
  import { i as MastraError, n as ErrorDomain, o as getErrorFromUnknown, t as ErrorCategory } from "./error-oh2DLsP2.js";
2
2
  import { c as registerToolOutputValidationSchema, d as validateToolOutput, f as validateToolSuspendData, h as markBuilderValidatedInput, i as createStandardSchemaIssuesError, n as Tool, o as getValidationIssuePaths, p as createToolObserve, s as isValidationError, u as validateToolInput } from "./tool-Z3bykc1m.js";
3
3
  import { i as MastraFGAPermissions } from "./ee-iTj2bRDt-By_B9ngH.js";
4
- import { i as isToolBackgroundEligible, n as backgroundOverrideJsonSchema, r as backgroundOverrideZodSchema } from "./background-tasks-BgpX1P_s.js";
4
+ import { i as isToolBackgroundEligible, n as backgroundOverrideJsonSchema, r as backgroundOverrideZodSchema } from "./background-tasks-BnJfNLFo.js";
5
5
  import { t as MastraBase } from "./base-CKLWBhDo.js";
6
6
  import { O as executionFailureTermination, b as wrapMastra, x as createObservabilityContext } from "./observability-D7RNOAPx.js";
7
7
  import { a as getOrCreateSpan, t as executeWithContext } from "./utils-DU_pU5SK.js";
package/dist/utils.cjs CHANGED
@@ -4,7 +4,7 @@ const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
4
4
  const require_zod_utils = require("./zod-utils-Cl5jw5N_.cjs");
5
5
  const require_fetchWithRetry = require("./fetchWithRetry-f5k4p7_1.cjs");
6
6
  const require_dynamic_argument = require("./dynamic-argument-CUc1BBOS.cjs");
7
- const require_utils = require("./utils-DY01hxVd.cjs");
7
+ const require_utils = require("./utils-BKUCaZ12.cjs");
8
8
  exports.boundedStringify = require_utils_safe_stringify.boundedStringify;
9
9
  exports.checkEvalStorageFields = require_utils.checkEvalStorageFields;
10
10
  exports.createMastraProxy = require_utils.createMastraProxy;
package/dist/utils.js CHANGED
@@ -3,5 +3,5 @@ import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
3
3
  import { a as isZodObject, i as isZodArray, r as getZodTypeName, t as getZodDef } from "./zod-utils-BDDS_mxU.js";
4
4
  import { t as fetchWithRetry } from "./fetchWithRetry-DFSvpYDT.js";
5
5
  import { n as resolveDynamicArgument, t as getRequestUser } from "./dynamic-argument-BzPK3qPN.js";
6
- import { C as setNestedValue, S as selectFields, _ as parseSqlIdentifier, a as ensureToolProperties, b as removeUndefinedValues, c as isCoreMessage, d as makeCoreTool, f as makeCoreToolV5, g as parseFieldKey, h as omitKeys, i as delay, l as isUiMessage, m as maskStreamTags, n as createMastraProxy, o as generateEmptyFromSchema, p as makeProcessorCoreTool, r as deepMerge, s as getNestedValue, t as checkEvalStorageFields, u as isZodType, v as readPositiveIntEnv, x as resolveSerializedZodOutput, y as rebindProcessorTools } from "./utils-Bd_y1_a-.js";
6
+ import { C as setNestedValue, S as selectFields, _ as parseSqlIdentifier, a as ensureToolProperties, b as removeUndefinedValues, c as isCoreMessage, d as makeCoreTool, f as makeCoreToolV5, g as parseFieldKey, h as omitKeys, i as delay, l as isUiMessage, m as maskStreamTags, n as createMastraProxy, o as generateEmptyFromSchema, p as makeProcessorCoreTool, r as deepMerge, s as getNestedValue, t as checkEvalStorageFields, u as isZodType, v as readPositiveIntEnv, x as resolveSerializedZodOutput, y as rebindProcessorTools } from "./utils-GHY3hmLx.js";
7
7
  export { boundedStringify, checkEvalStorageFields, createMastraProxy, deepEqual, deepMerge, delay, ensureSerializable, ensureToolProperties, fetchWithRetry, generateEmptyFromSchema, getNestedValue, getRequestUser, getZodDef, getZodTypeName, isBoundedSerializable, isCoreMessage, isUiMessage, isZodArray, isZodObject, isZodType, makeCoreTool, makeCoreToolV5, makeProcessorCoreTool, maskStreamTags, omitKeys, parseFieldKey, parseSqlIdentifier, readPositiveIntEnv, rebindProcessorTools, removeUndefinedValues, resolveDynamicArgument, resolveSerializedZodOutput, safeStringify, selectFields, setNestedValue };
@@ -1,5 +1,5 @@
1
1
  import { standardSchemaToJSONSchema, toStandardSchema } from "./schema/index.js";
2
- import { bt as validateTemplate, gt as collectTemplateStepIds } from "./stream-CJUm6EAH.js";
2
+ import { Et as validateTemplate, St as collectTemplateStepIds } from "./stream-D1y9GzoD.js";
3
3
  import { z } from "zod";
4
4
  // src/workflows/dynamic/graph.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- const require_stream = require("./stream-4aNIw_TQ.cjs");
1
+ const require_stream = require("./stream-0kdqBOOn.cjs");
2
2
  let zod = require("zod");
3
3
  let _mastra_schema_compat_schema = require("@mastra/schema-compat/schema");
4
4
  // src/workflows/dynamic/graph.ts
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_base = require("../base-BIzR1D3_.cjs");
3
3
  const require_error = require("../error-D90lJ6M7.cjs");
4
- const require_run_registry = require("../run-registry-5_LQBGn_.cjs");
5
- const require_message_list = require("../message-list-DPXPXvin.cjs");
4
+ const require_run_registry = require("../run-registry-BmckDVBk.cjs");
5
+ const require_message_list = require("../message-list-Cj0Sq_JP.cjs");
6
6
  const require_dist = require("../dist-P2rjrlmj.cjs");
7
7
  const require_dist$1 = require("../dist-CXeCeeW7.cjs");
8
8
  const require_vector_filter_index = require("./filter/index.cjs");
@@ -1,7 +1,7 @@
1
1
  import { t as MastraBase } from "../base-CKLWBhDo.js";
2
2
  import { i as MastraError, n as ErrorDomain, t as ErrorCategory } from "../error-oh2DLsP2.js";
3
- import { ia as createVectorErrorId, un as embed$3 } from "../run-registry-DC03XLeZ.js";
4
- import { P as embed$2 } from "../message-list-DEuRl82K.js";
3
+ import { fa as createVectorErrorId, un as embed$3 } from "../run-registry-BwEcwYlU.js";
4
+ import { P as embed$2 } from "../message-list-KRbg-TnI.js";
5
5
  import { r as embed$1 } from "../dist-TPVqg8oV.js";
6
6
  import { n as embed } from "../dist-D3cKCUe-.js";
7
7
  import { BaseFilterTranslator } from "./filter/index.js";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_worker = require("../worker-GsGIxPMa.cjs");
2
+ const require_worker = require("../worker-CAKvQj9_.cjs");
3
3
  exports.BackgroundTaskWorker = require_worker.BackgroundTaskWorker;
4
4
  exports.HttpRemoteStrategy = require_worker.HttpRemoteStrategy;
5
5
  exports.InProcessStrategy = require_worker.InProcessStrategy;
@@ -1 +1 @@
1
- export { n as BackgroundTaskWorker, o as HttpRemoteStrategy, t as InProcessStrategy, c as MastraWorker, i as OrchestrationWorker, a as PullTransport, r as SchedulerWorker, s as StepExecutionError } from "../worker-B80xkcKG.js";
1
+ export { n as BackgroundTaskWorker, o as HttpRemoteStrategy, t as InProcessStrategy, c as MastraWorker, i as OrchestrationWorker, a as PullTransport, r as SchedulerWorker, s as StepExecutionError } from "../worker-C3u_xzY2.js";
@@ -1,6 +1,6 @@
1
- const require_run_registry = require("./run-registry-5_LQBGn_.cjs");
1
+ const require_run_registry = require("./run-registry-BmckDVBk.cjs");
2
2
  const require_request_context = require("./request-context-D9RXYCy8.cjs");
3
- const require_worker = require("./worker-GsGIxPMa.cjs");
3
+ const require_worker = require("./worker-CAKvQj9_.cjs");
4
4
  const require_schedules = require("./schedules-BZS8McF7.cjs");
5
5
  // src/schedules/worker.ts
6
6
  /** PubSub topic on which the scheduler publishes `agent-schedule.fire` events. */
@@ -1,6 +1,6 @@
1
- import { As as StepExecutor, cl as waitMs, ec as getNestedWorkflow, js as computeScheduleDefinitionHash, ks as WorkflowEventProcessor, sl as assertDrainTimeout, tc as getStepEntry, x as resolveAgentById } from "./run-registry-DC03XLeZ.js";
1
+ import { Ls as WorkflowEventProcessor, Rs as StepExecutor, cc as getNestedWorkflow, gl as waitMs, hl as assertDrainTimeout, lc as getStepEntry, vt as resolveAgentById, zs as computeScheduleDefinitionHash } from "./run-registry-BwEcwYlU.js";
2
2
  import { t as Scheduler } from "./scheduler-B-VZUvv_.js";
3
- import { s as BackgroundTaskManager } from "./background-tasks-BgpX1P_s.js";
3
+ import { s as BackgroundTaskManager } from "./background-tasks-BnJfNLFo.js";
4
4
  import { u as RequestContext } from "./request-context-COnZHt2-.js";
5
5
  // src/worker/worker.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- const require_run_registry = require("./run-registry-5_LQBGn_.cjs");
1
+ const require_run_registry = require("./run-registry-BmckDVBk.cjs");
2
2
  const require_scheduler = require("./scheduler-D00X03jQ.cjs");
3
- const require_background_tasks = require("./background-tasks-DqnQMfuf.cjs");
3
+ const require_background_tasks = require("./background-tasks-BDrYBis-.cjs");
4
4
  const require_request_context = require("./request-context-D9RXYCy8.cjs");
5
5
  // src/worker/worker.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { x as resolveAgentById } from "./run-registry-DC03XLeZ.js";
1
+ import { vt as resolveAgentById } from "./run-registry-BwEcwYlU.js";
2
2
  import { u as RequestContext } from "./request-context-COnZHt2-.js";
3
- import { a as PullTransport, c as MastraWorker } from "./worker-B80xkcKG.js";
3
+ import { a as PullTransport, c as MastraWorker } from "./worker-C3u_xzY2.js";
4
4
  import { l as parseFsAgentScheduleRowId } from "./schedules-DZfSx-7P.js";
5
5
  // src/schedules/worker.ts
6
6
  /** PubSub topic on which the scheduler publishes `agent-schedule.fire` events. */
@@ -1,8 +1,8 @@
1
- const require_stream = require("./stream-4aNIw_TQ.cjs");
1
+ const require_stream = require("./stream-0kdqBOOn.cjs");
2
2
  require("./utils-D-eNsgDM.cjs");
3
- const require_output_helpers = require("./output-helpers-JL-HeCbT.cjs");
4
- const require_run_registry = require("./run-registry-5_LQBGn_.cjs");
5
- const require_background_tasks = require("./background-tasks-DqnQMfuf.cjs");
3
+ const require_output_helpers = require("./output-helpers-1Zu4Vt9C.cjs");
4
+ const require_run_registry = require("./run-registry-BmckDVBk.cjs");
5
+ const require_background_tasks = require("./background-tasks-BDrYBis-.cjs");
6
6
  let zod = require("zod");
7
7
  // src/background-tasks/workflow.ts
8
8
  const inputSchema = zod.z.object({ taskId: zod.z.string() });
@@ -1,8 +1,8 @@
1
- import { in as resolveSuspendedToolRunId } from "./stream-CJUm6EAH.js";
1
+ import { un as resolveSuspendedToolRunId } from "./stream-D1y9GzoD.js";
2
2
  import "./utils-DU_pU5SK.js";
3
- import { p as slimProgressChunk } from "./output-helpers-D4II19No.js";
4
- import { Ss as createWorkflow, ac as createStep } from "./run-registry-DC03XLeZ.js";
5
- import { c as BACKGROUND_TASK_WORKFLOW_ID } from "./background-tasks-BgpX1P_s.js";
3
+ import { p as slimProgressChunk } from "./output-helpers-CedRCE17.js";
4
+ import { As as createWorkflow, pc as createStep } from "./run-registry-BwEcwYlU.js";
5
+ import { c as BACKGROUND_TASK_WORKFLOW_ID } from "./background-tasks-BnJfNLFo.js";
6
6
  import { z } from "zod";
7
7
  // src/background-tasks/workflow.ts
8
8
  const inputSchema = z.object({ taskId: z.string() });
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_builder = require("../../builder-D8Osghdo.cjs");
2
+ const require_builder = require("../../builder-Cw8u3pPl.cjs");
3
3
  exports.WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS = require_builder.WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS;
4
4
  exports.WORKFLOW_BUILDER_AUTHORING_PLAYBOOK = require_builder.WORKFLOW_BUILDER_AUTHORING_PLAYBOOK;
5
5
  exports.WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION = require_builder.WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION;
@@ -1 +1 @@
1
- export { U as WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS, W as WORKFLOW_BUILDER_AUTHORING_PLAYBOOK, i as WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION, t as WORKFLOW_BUILDER_SUPPORTED_STEP_TYPES, B as compareWorkflowBuilderSchemas, r as createWorkflowBuilderAgent, a as deleteStoredWorkflowResponseSchema, V as inspectWorkflowBuilderSchemas, o as listStoredWorkflowsResponseSchema, n as normalizeWorkflowBuilderDefinition, H as preflightWorkflowDefinition, s as storedWorkflowDefinitionSchema, c as upsertStoredWorkflowResponseSchema, l as workflowBuilderAgentEntryInputSchema, u as workflowBuilderAgentEntrySchema, d as workflowBuilderClassifierEntryInputSchema, f as workflowBuilderClassifierEntrySchema, p as workflowBuilderConditionalEntryInputSchema, m as workflowBuilderConditionalEntrySchema, h as workflowBuilderDefinitionInputSchema, g as workflowBuilderDefinitionSchema, _ as workflowBuilderForeachEntryInputSchema, v as workflowBuilderForeachEntrySchema, y as workflowBuilderGraphEntryInputSchema, b as workflowBuilderGraphEntrySchema, x as workflowBuilderLoopEntryInputSchema, S as workflowBuilderLoopEntrySchema, C as workflowBuilderMappingConfigSchema, w as workflowBuilderMappingDescriptorSchema, T as workflowBuilderMappingEntryInputSchema, E as workflowBuilderMappingEntrySchema, D as workflowBuilderNestedWorkflowEntryInputSchema, O as workflowBuilderNestedWorkflowEntrySchema, k as workflowBuilderParallelEntryInputSchema, A as workflowBuilderParallelEntrySchema, j as workflowBuilderPredicateSchema, M as workflowBuilderScheduleConfigSchema, N as workflowBuilderScheduleSchema, P as workflowBuilderSleepEntryInputSchema, F as workflowBuilderSleepEntrySchema, I as workflowBuilderSleepUntilEntryInputSchema, L as workflowBuilderSleepUntilEntrySchema, R as workflowBuilderToolEntryInputSchema, z as workflowBuilderToolEntrySchema } from "../../builder-x295GDL6.js";
1
+ export { U as WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS, W as WORKFLOW_BUILDER_AUTHORING_PLAYBOOK, i as WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION, t as WORKFLOW_BUILDER_SUPPORTED_STEP_TYPES, B as compareWorkflowBuilderSchemas, r as createWorkflowBuilderAgent, a as deleteStoredWorkflowResponseSchema, V as inspectWorkflowBuilderSchemas, o as listStoredWorkflowsResponseSchema, n as normalizeWorkflowBuilderDefinition, H as preflightWorkflowDefinition, s as storedWorkflowDefinitionSchema, c as upsertStoredWorkflowResponseSchema, l as workflowBuilderAgentEntryInputSchema, u as workflowBuilderAgentEntrySchema, d as workflowBuilderClassifierEntryInputSchema, f as workflowBuilderClassifierEntrySchema, p as workflowBuilderConditionalEntryInputSchema, m as workflowBuilderConditionalEntrySchema, h as workflowBuilderDefinitionInputSchema, g as workflowBuilderDefinitionSchema, _ as workflowBuilderForeachEntryInputSchema, v as workflowBuilderForeachEntrySchema, y as workflowBuilderGraphEntryInputSchema, b as workflowBuilderGraphEntrySchema, x as workflowBuilderLoopEntryInputSchema, S as workflowBuilderLoopEntrySchema, C as workflowBuilderMappingConfigSchema, w as workflowBuilderMappingDescriptorSchema, T as workflowBuilderMappingEntryInputSchema, E as workflowBuilderMappingEntrySchema, D as workflowBuilderNestedWorkflowEntryInputSchema, O as workflowBuilderNestedWorkflowEntrySchema, k as workflowBuilderParallelEntryInputSchema, A as workflowBuilderParallelEntrySchema, j as workflowBuilderPredicateSchema, M as workflowBuilderScheduleConfigSchema, N as workflowBuilderScheduleSchema, P as workflowBuilderSleepEntryInputSchema, F as workflowBuilderSleepEntrySchema, I as workflowBuilderSleepUntilEntryInputSchema, L as workflowBuilderSleepUntilEntrySchema, R as workflowBuilderToolEntryInputSchema, z as workflowBuilderToolEntrySchema } from "../../builder-Cl-0BWkh.js";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_run_registry = require("../../run-registry-5_LQBGn_.cjs");
2
+ const require_run_registry = require("../../run-registry-BmckDVBk.cjs");
3
3
  exports.EventedExecutionEngine = require_run_registry.EventedExecutionEngine;
4
4
  exports.EventedRun = require_run_registry.EventedRun;
5
5
  exports.EventedWorkflow = require_run_registry.EventedWorkflow;
@@ -1 +1 @@
1
- export { $s as EventedExecutionEngine, Cs as EventedRun, ws as EventedWorkflow, As as StepExecutor, ks as WorkflowEventProcessor, Ts as cloneStep, Es as cloneWorkflow, Ds as createStep, Os as createWorkflow } from "../../run-registry-DC03XLeZ.js";
1
+ export { sc as EventedExecutionEngine, js as EventedRun, Ms as EventedWorkflow, Rs as StepExecutor, Ls as WorkflowEventProcessor, Ns as cloneStep, Ps as cloneWorkflow, Fs as createStep, Is as createWorkflow } from "../../run-registry-BwEcwYlU.js";
@@ -0,0 +1,18 @@
1
+ import type { Mastra } from '../../mastra/index.js';
2
+ import type { WorkflowsStorage } from '../../storage/domains/workflows/base.js';
3
+ /**
4
+ * Evented runs spread over several processes need a pubsub that hands a stopped
5
+ * worker's event to another worker, and a store whose step guards let one
6
+ * delivery of a step commit. Logs once per Mastra instance when the pubsub
7
+ * reaches other processes and one of the two is missing.
8
+ *
9
+ * It judges the setup, not how many processes use it: Mastra can't count them.
10
+ * A pubsub that stays inside the process is left alone, since no other process
11
+ * can take part in its runs. `MASTRA_DISABLE_EVENTED_SETUP_WARNING=true`
12
+ * disables it for a shared transport used by one process.
13
+ *
14
+ * The message names no supported pubsub or store. The docs page it links to is
15
+ * the one place that lists them.
16
+ */
17
+ export declare function warnUnsupportedEventedSetup(mastra: Mastra, workflowsStore?: WorkflowsStorage): void;
18
+ //# sourceMappingURL=setup-warning.d.ts.map