@mastra/core 1.87.0 → 1.88.0-alpha.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 (404) hide show
  1. package/dist/_types/@internal_ai-v6@0.0.100/dist/index.d.ts +97 -2049
  2. package/dist/agent/agent.d.ts +10 -2
  3. package/dist/agent/durable/create-evented-agent.d.ts +2 -1
  4. package/dist/agent/durable/execution-engine.d.ts +4 -2
  5. package/dist/agent/durable/index.cjs +3 -2
  6. package/dist/agent/durable/index.js +3 -2
  7. package/dist/agent/durable/segment-spans.d.ts +7 -0
  8. package/dist/agent/durable/stored-signal-drain.d.ts +1 -1
  9. package/dist/agent/durable/types.d.ts +6 -0
  10. package/dist/agent/index.cjs +2 -2
  11. package/dist/agent/index.js +2 -2
  12. package/dist/agent/request-context-snapshot.d.ts +5 -0
  13. package/dist/agent/thread-stream-runtime.d.ts +26 -4
  14. package/dist/agent-builder/ee/index.cjs +1 -1
  15. package/dist/agent-builder/ee/index.js +1 -1
  16. package/dist/agent-controller/index.cjs +1 -1
  17. package/dist/agent-controller/index.js +1 -1
  18. package/dist/{agent-controller-vUU_atR-.js → agent-controller-CQDCmsFD.js} +15 -9
  19. package/dist/{agent-controller-DckvJ7bq.cjs → agent-controller-NQKYmY0W.cjs} +15 -9
  20. package/dist/background-tasks/index.cjs +1 -1
  21. package/dist/background-tasks/index.js +1 -1
  22. package/dist/{background-tasks-HAzB0JtC.js → background-tasks-B7UygDdO.js} +1 -1
  23. package/dist/{background-tasks-By_1e9Gf.cjs → background-tasks-CeARf1DK.cjs} +1 -1
  24. package/dist/browser/index.cjs +1 -1
  25. package/dist/browser/index.js +1 -1
  26. package/dist/{builder-CmtDqFLe.js → builder-CpAEmMdR.js} +2 -2
  27. package/dist/{builder-Dx8GMhFn.cjs → builder-Dmf04g9P.cjs} +2 -2
  28. package/dist/capabilities/302ai.json +196 -196
  29. package/dist/capabilities/abliteratedllm.json +33 -33
  30. package/dist/capabilities/abliteration-ai.json +9 -9
  31. package/dist/capabilities/above.json +13 -13
  32. package/dist/capabilities/adaption.json +7 -7
  33. package/dist/capabilities/adzuki.json +20 -20
  34. package/dist/capabilities/agentrouter.json +10 -10
  35. package/dist/capabilities/agnes.json +2 -2
  36. package/dist/capabilities/ai-router.json +6 -6
  37. package/dist/capabilities/aiand.json +27 -18
  38. package/dist/capabilities/aigrow.json +14 -14
  39. package/dist/capabilities/aimlapi.json +146 -146
  40. package/dist/capabilities/aipg.json +2 -2
  41. package/dist/capabilities/aixy.json +17 -17
  42. package/dist/capabilities/aki-io.json +14 -14
  43. package/dist/capabilities/alibaba-cn.json +94 -94
  44. package/dist/capabilities/alibaba-coding-plan-cn.json +5 -5
  45. package/dist/capabilities/alibaba-coding-plan.json +5 -5
  46. package/dist/capabilities/alibaba-token-plan-cn.json +50 -50
  47. package/dist/capabilities/alibaba-token-plan.json +53 -53
  48. package/dist/capabilities/alibaba.json +71 -71
  49. package/dist/capabilities/ambient.json +8 -8
  50. package/dist/capabilities/amd-tokenlab.json +4 -4
  51. package/dist/capabilities/amd.json +11 -11
  52. package/dist/capabilities/anthropic.json +36 -36
  53. package/dist/capabilities/anyapi.json +18 -18
  54. package/dist/capabilities/apiko.json +2 -2
  55. package/dist/capabilities/arcee.json +9 -9
  56. package/dist/capabilities/augure.json +5 -5
  57. package/dist/capabilities/auriko.json +23 -23
  58. package/dist/capabilities/bailing.json +5 -5
  59. package/dist/capabilities/baseten.json +47 -38
  60. package/dist/capabilities/bee.json +5 -5
  61. package/dist/capabilities/bothub.json +14 -14
  62. package/dist/capabilities/boundless.json +37 -37
  63. package/dist/capabilities/bumo.json +40 -40
  64. package/dist/capabilities/byteplus.json +22 -22
  65. package/dist/capabilities/cerebras.json +4 -4
  66. package/dist/capabilities/cheapaimodel.json +10 -10
  67. package/dist/capabilities/cheapest-token.json +25 -25
  68. package/dist/capabilities/chutes.json +34 -32
  69. package/dist/capabilities/cline-pass.json +29 -29
  70. package/dist/capabilities/cloudcode.json +7 -7
  71. package/dist/capabilities/cloudflare-workers-ai.json +15 -15
  72. package/dist/capabilities/commandcode.json +146 -146
  73. package/dist/capabilities/concentrate.json +286 -277
  74. package/dist/capabilities/cortecs.json +109 -109
  75. package/dist/capabilities/crossmodel.json +194 -194
  76. package/dist/capabilities/crusoe.json +13 -13
  77. package/dist/capabilities/daoxe.json +7 -7
  78. package/dist/capabilities/databricks.json +128 -120
  79. package/dist/capabilities/deepinfra.json +102 -102
  80. package/dist/capabilities/deepseek.json +4 -4
  81. package/dist/capabilities/digitalocean.json +113 -114
  82. package/dist/capabilities/dothoosh.json +29 -29
  83. package/dist/capabilities/doubleword.json +26 -26
  84. package/dist/capabilities/edenai.json +287 -278
  85. package/dist/capabilities/empiriolabs.json +169 -169
  86. package/dist/capabilities/engy.json +24 -18
  87. package/dist/capabilities/entrim.json +6 -6
  88. package/dist/capabilities/evroc.json +13 -13
  89. package/dist/capabilities/ezkielyna.json +9 -9
  90. package/dist/capabilities/fastrouter.json +79 -79
  91. package/dist/capabilities/fireworks-ai.json +92 -92
  92. package/dist/capabilities/freemodel.json +10 -10
  93. package/dist/capabilities/friendli.json +26 -5
  94. package/dist/capabilities/frogbot.json +97 -97
  95. package/dist/capabilities/gisoo.json +19 -19
  96. package/dist/capabilities/gmicloud.json +7 -7
  97. package/dist/capabilities/google.json +53 -53
  98. package/dist/capabilities/graphn.json +14 -14
  99. package/dist/capabilities/greenpt.json +34 -34
  100. package/dist/capabilities/groq.json +4 -4
  101. package/dist/capabilities/helicone.json +88 -88
  102. package/dist/capabilities/hetzner.json +4 -4
  103. package/dist/capabilities/hostinger-router.json +10 -10
  104. package/dist/capabilities/hpc-ai.json +2 -2
  105. package/dist/capabilities/huawei-maas.json +15 -15
  106. package/dist/capabilities/hubris.json +28 -28
  107. package/dist/capabilities/huggingface.json +87 -85
  108. package/dist/capabilities/hyper.json +24 -24
  109. package/dist/capabilities/impossibl.json +114 -114
  110. package/dist/capabilities/inception.json +3 -3
  111. package/dist/capabilities/inceptron.json +8 -8
  112. package/dist/capabilities/inco.json +2 -2
  113. package/dist/capabilities/infer.json +17 -17
  114. package/dist/capabilities/inferall.json +5 -5
  115. package/dist/capabilities/inference-coop.json +2 -2
  116. package/dist/capabilities/inferenceapis.json +27 -27
  117. package/dist/capabilities/inferris.json +3 -3
  118. package/dist/capabilities/infersia.json +11 -11
  119. package/dist/capabilities/infomaniak.json +2 -2
  120. package/dist/capabilities/io-net.json +2 -2
  121. package/dist/capabilities/iteracompute.json +38 -38
  122. package/dist/capabilities/jalapeno.json +10 -10
  123. package/dist/capabilities/jiekou.json +34 -34
  124. package/dist/capabilities/joingonka.json +4 -4
  125. package/dist/capabilities/jzstoken.json +49 -49
  126. package/dist/capabilities/keln.json +24 -24
  127. package/dist/capabilities/kenari.json +122 -137
  128. package/dist/capabilities/kilo.json +615 -614
  129. package/dist/capabilities/kimchi.json +14 -14
  130. package/dist/capabilities/kimi-code-plan-cn.json +9 -9
  131. package/dist/capabilities/kimi-code-plan-global.json +9 -9
  132. package/dist/capabilities/kitani.json +6 -6
  133. package/dist/capabilities/klavo.json +20 -20
  134. package/dist/capabilities/korouter.json +35 -35
  135. package/dist/capabilities/kunavo.json +10 -10
  136. package/dist/capabilities/liquid.json +9 -9
  137. package/dist/capabilities/lithosai.json +2 -2
  138. package/dist/capabilities/llmgateway-providers.json +959 -923
  139. package/dist/capabilities/llmgateway.json +349 -340
  140. package/dist/capabilities/llmtr.json +29 -29
  141. package/dist/capabilities/logits.json +2 -2
  142. package/dist/capabilities/lowrouter.json +53 -53
  143. package/dist/capabilities/lyceum.json +12 -12
  144. package/dist/capabilities/melious.json +9 -9
  145. package/dist/capabilities/merge-gateway.json +271 -263
  146. package/dist/capabilities/meta.json +11 -11
  147. package/dist/capabilities/minimax-cn-coding-plan.json +5 -5
  148. package/dist/capabilities/minimax-cn.json +5 -5
  149. package/dist/capabilities/minimax-coding-plan.json +5 -5
  150. package/dist/capabilities/minimax.json +5 -5
  151. package/dist/capabilities/mistral.json +16 -16
  152. package/dist/capabilities/mixlayer.json +4 -4
  153. package/dist/capabilities/modal.json +11 -11
  154. package/dist/capabilities/model-oracle-ai.json +19 -19
  155. package/dist/capabilities/modelis.json +16 -16
  156. package/dist/capabilities/modular.json +5 -5
  157. package/dist/capabilities/moneo.json +10 -10
  158. package/dist/capabilities/moonshotai-cn.json +6 -6
  159. package/dist/capabilities/moonshotai.json +6 -6
  160. package/dist/capabilities/morph.json +18 -18
  161. package/dist/capabilities/munito-eu.json +8 -8
  162. package/dist/capabilities/munito.json +10 -10
  163. package/dist/capabilities/nan.json +33 -33
  164. package/dist/capabilities/nano-gpt.json +557 -567
  165. package/dist/capabilities/nearai.json +77 -77
  166. package/dist/capabilities/nebius.json +42 -34
  167. package/dist/capabilities/neon.json +127 -127
  168. package/dist/capabilities/neuralwatt.json +37 -37
  169. package/dist/capabilities/nokeep.json +4 -4
  170. package/dist/capabilities/novita-ai.json +115 -115
  171. package/dist/capabilities/nvidia.json +17 -17
  172. package/dist/capabilities/oathbreaker.json +5 -5
  173. package/dist/capabilities/obscurify.json +29 -29
  174. package/dist/capabilities/oci.json +6 -6
  175. package/dist/capabilities/ofox.json +265 -265
  176. package/dist/capabilities/ollama-cloud.json +52 -52
  177. package/dist/capabilities/openai.json +58 -61
  178. package/dist/capabilities/opencode-go.json +90 -90
  179. package/dist/capabilities/openreason.json +6 -6
  180. package/dist/capabilities/openrouter.json +550 -548
  181. package/dist/capabilities/opper.json +26 -26
  182. package/dist/capabilities/orcarouter.json +310 -294
  183. package/dist/capabilities/outerlabs.json +29 -29
  184. package/dist/capabilities/ovhcloud.json +22 -22
  185. package/dist/capabilities/pareto.json +4 -4
  186. package/dist/capabilities/perplexity-agent.json +69 -69
  187. package/dist/capabilities/perplexity.json +2 -2
  188. package/dist/capabilities/phala.json +30 -30
  189. package/dist/capabilities/poe.json +111 -111
  190. package/dist/capabilities/poolside.json +2 -2
  191. package/dist/capabilities/powerspring.json +9 -9
  192. package/dist/capabilities/primalabs.json +11 -11
  193. package/dist/capabilities/prime.json +127 -119
  194. package/dist/capabilities/privatemode-ai.json +6 -6
  195. package/dist/capabilities/proxystacks.json +3 -3
  196. package/dist/capabilities/qiniu-ai.json +13 -13
  197. package/dist/capabilities/refuseless.json +5 -5
  198. package/dist/capabilities/regolo-ai.json +10 -10
  199. package/dist/capabilities/requesty.json +200 -200
  200. package/dist/capabilities/ruapi.json +20 -20
  201. package/dist/capabilities/runcrate.json +13 -13
  202. package/dist/capabilities/runinfra.json +19 -19
  203. package/dist/capabilities/sakana.json +5 -5
  204. package/dist/capabilities/sambanova.json +9 -9
  205. package/dist/capabilities/sandbase.json +22 -22
  206. package/dist/capabilities/sarvam.json +14 -14
  207. package/dist/capabilities/scaleway.json +17 -17
  208. package/dist/capabilities/scnet-token-plan.json +8 -8
  209. package/dist/capabilities/scx-ai.json +22 -22
  210. package/dist/capabilities/sensenova.json +11 -11
  211. package/dist/capabilities/siliconflow-cn.json +59 -59
  212. package/dist/capabilities/siliconflow.json +57 -57
  213. package/dist/capabilities/snowflake-cortex.json +19 -19
  214. package/dist/capabilities/sokkan.json +10 -10
  215. package/dist/capabilities/sparrowcodes.json +20 -20
  216. package/dist/capabilities/standardcompute.json +85 -85
  217. package/dist/capabilities/steadyrouter.json +40 -40
  218. package/dist/capabilities/stepfun-ai-step-plan.json +5 -5
  219. package/dist/capabilities/stepfun-ai.json +5 -5
  220. package/dist/capabilities/stepfun-step-plan.json +5 -5
  221. package/dist/capabilities/stepfun.json +5 -5
  222. package/dist/capabilities/stepping-stone.json +18 -18
  223. package/dist/capabilities/superbot-gg.json +4 -4
  224. package/dist/capabilities/synthetic.json +12 -12
  225. package/dist/capabilities/synthorai.json +21 -21
  226. package/dist/capabilities/teamorouter.json +17 -17
  227. package/dist/capabilities/teapot-router.json +13 -13
  228. package/dist/capabilities/tencent-token-plan-intl.json +22 -22
  229. package/dist/capabilities/tencent-token-plan.json +42 -42
  230. package/dist/capabilities/tencent-tokenhub.json +44 -44
  231. package/dist/capabilities/tensorx.json +43 -43
  232. package/dist/capabilities/tenstorrent.json +2 -2
  233. package/dist/capabilities/the-grid-ai.json +30 -30
  234. package/dist/capabilities/thinkingmachines.json +78 -78
  235. package/dist/capabilities/tinfoil.json +13 -13
  236. package/dist/capabilities/toapis.json +2 -2
  237. package/dist/capabilities/togetherai.json +54 -54
  238. package/dist/capabilities/tokengo.json +23 -23
  239. package/dist/capabilities/tokenharbor.json +217 -217
  240. package/dist/capabilities/tokenify.json +9 -9
  241. package/dist/capabilities/trustedrouter.json +6 -6
  242. package/dist/capabilities/trustedtokens.json +12 -12
  243. package/dist/capabilities/umans-ai-coding-plan.json +17 -17
  244. package/dist/capabilities/umans-ai.json +11 -11
  245. package/dist/capabilities/uncensuredai.json +5 -5
  246. package/dist/capabilities/unrestricted.json +4 -4
  247. package/dist/capabilities/uplinkswitch.json +20 -20
  248. package/dist/capabilities/upstage.json +2 -2
  249. package/dist/capabilities/vancine.json +20 -20
  250. package/dist/capabilities/vercel.json +580 -571
  251. package/dist/capabilities/vivgrid.json +61 -61
  252. package/dist/capabilities/volcengine-coding-plan.json +26 -26
  253. package/dist/capabilities/volcengine.json +24 -24
  254. package/dist/capabilities/vultr.json +15 -15
  255. package/dist/capabilities/wafer.ai.json +19 -19
  256. package/dist/capabilities/wallaby.json +5 -5
  257. package/dist/capabilities/wally.json +11 -11
  258. package/dist/capabilities/wandb.json +21 -21
  259. package/dist/capabilities/watt.json +19 -19
  260. package/dist/capabilities/xai.json +2 -2
  261. package/dist/capabilities/xpersona.json +13 -13
  262. package/dist/capabilities/xxapi.json +27 -27
  263. package/dist/capabilities/zai-coding-plan.json +11 -11
  264. package/dist/capabilities/zai.json +32 -32
  265. package/dist/capabilities/zenifra.json +27 -27
  266. package/dist/capabilities/zenmux.json +178 -178
  267. package/dist/capabilities/zerogpu.json +12 -12
  268. package/dist/capabilities/zhipuai-coding-plan.json +3 -3
  269. package/dist/capabilities/zhipuai.json +28 -28
  270. package/dist/capabilities/zro.json +7 -7
  271. package/dist/channels/index.cjs +2 -2
  272. package/dist/channels/index.js +2 -2
  273. package/dist/{channels-DChC1kXm.js → channels-BQ--aLCA.js} +1 -1
  274. package/dist/{channels-BamLzaJG.cjs → channels-CTCBsS5M.cjs} +1 -1
  275. package/dist/coding-agent/index.cjs +1 -1
  276. package/dist/coding-agent/index.js +1 -1
  277. package/dist/datasets/index.cjs +2 -2
  278. package/dist/datasets/index.js +2 -2
  279. package/dist/docs/SKILL.md +1 -1
  280. package/dist/docs/assets/SOURCE_MAP.json +804 -804
  281. package/dist/docs/references/docs-agents-human-in-the-loop.md +1 -1
  282. package/dist/docs/references/docs-agents-resumable-streams.md +3 -3
  283. package/dist/docs/references/docs-channels.md +8 -2
  284. package/dist/docs/references/docs-deployment-workers.md +10 -4
  285. package/dist/docs/references/docs-harness-durable-agents.md +17 -15
  286. package/dist/docs/references/docs-server-mcp.md +68 -0
  287. package/dist/docs/references/docs-server-pubsub.md +25 -16
  288. package/dist/docs/references/docs-signals-running-across-processes.md +9 -3
  289. package/dist/docs/references/docs-signals-sending-signals.md +1 -1
  290. package/dist/docs/references/docs-workflows-overview.md +3 -3
  291. package/dist/docs/references/reference-agents-agent.md +3 -1
  292. package/dist/docs/references/reference-agents-durable-agent.md +3 -3
  293. package/dist/docs/references/reference-configuration.md +60 -0
  294. package/dist/docs/references/reference-pubsub-base.md +1 -1
  295. package/dist/docs/references/reference-pubsub-caching-pubsub.md +1 -1
  296. package/dist/docs/references/reference-pubsub-google-cloud-pubsub.md +13 -7
  297. package/dist/docs/references/reference-pubsub-lease-provider.md +4 -0
  298. package/dist/docs/references/reference-pubsub-redis-streams.md +18 -9
  299. package/dist/docs/references/reference-pubsub-valkey-streams.md +25 -7
  300. package/dist/evals/index.cjs +1 -1
  301. package/dist/evals/index.js +1 -1
  302. package/dist/evals/scoreTraces/index.cjs +1 -1
  303. package/dist/evals/scoreTraces/index.js +1 -1
  304. package/dist/events/caching-pubsub.d.ts +3 -11
  305. package/dist/events/index.cjs +1 -1
  306. package/dist/events/index.js +1 -1
  307. package/dist/events/pubsub.d.ts +2 -1
  308. package/dist/{execution-fence-BBKnrhWR.cjs → execution-fence-C8Q0wWkG.cjs} +841 -219
  309. package/dist/{execution-fence--VdnD7p4.js → execution-fence-DGFyUV5h.js} +841 -219
  310. package/dist/harness/index.cjs +1 -1
  311. package/dist/harness/index.js +1 -1
  312. package/dist/index.cjs +1 -1
  313. package/dist/index.js +1 -1
  314. package/dist/knowledge/index.cjs +1 -1
  315. package/dist/knowledge/index.js +1 -1
  316. package/dist/llm/index.cjs +3 -3
  317. package/dist/llm/index.js +3 -3
  318. package/dist/llm/model/provider-types.generated.d.ts +7689 -7673
  319. package/dist/llm/reasoning/account-switch.d.ts +50 -0
  320. package/dist/llm/reasoning/index.cjs +65 -0
  321. package/dist/llm/reasoning/index.d.ts +1 -0
  322. package/dist/llm/reasoning/index.js +61 -1
  323. package/dist/{llm-DknPJDW6.cjs → llm-RIAYOAtD.cjs} +2 -2
  324. package/dist/{llm-ccA_1Q-H.js → llm-YNjDFSui.js} +2 -2
  325. package/dist/loop/index.cjs +2 -2
  326. package/dist/loop/index.js +2 -2
  327. package/dist/loop/suspended-run-auto-resume.d.ts +15 -0
  328. package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts +1 -1
  329. package/dist/{manager-DWX6-Cx4.js → manager-DZhtdV6Q.js} +2 -2
  330. package/dist/{manager-D9F0i7O2.cjs → manager-Y-jYcS7T.cjs} +2 -2
  331. package/dist/mastra/index.cjs +1 -1
  332. package/dist/mastra/index.d.ts +35 -11
  333. package/dist/mastra/index.js +1 -1
  334. package/dist/{mastra-BzWL4xI8.cjs → mastra-B2-HBq1-.cjs} +108 -20
  335. package/dist/{mastra-oUDN81l8.js → mastra-BJ54VxOO.js} +108 -20
  336. package/dist/memory/index.cjs +2 -2
  337. package/dist/memory/index.js +2 -2
  338. package/dist/{model-BwxfS6T_.js → model-cS3d5rmF.js} +1 -1
  339. package/dist/{model-BnD7SPlA.cjs → model-lzZPXaEV.cjs} +1 -1
  340. package/dist/{netlify-CS0VDbb9.cjs → netlify-1lti1j4Z.cjs} +1 -1
  341. package/dist/{netlify-DcY9gHCJ.js → netlify-ClBjc0Xg.js} +1 -1
  342. package/dist/notifications/index.cjs +1 -1
  343. package/dist/notifications/index.js +1 -1
  344. package/dist/{output-helpers-k2-48ssH.js → output-helpers-D-qplq22.js} +13 -15
  345. package/dist/{output-helpers-By5FbLpp.cjs → output-helpers-D4O_oFne.cjs} +12 -14
  346. package/dist/processor-provider/index.cjs +1 -1
  347. package/dist/processor-provider/index.js +1 -1
  348. package/dist/processors/index.cjs +2 -2
  349. package/dist/processors/index.js +2 -2
  350. package/dist/{provider-registry-OggbU6OE.cjs → provider-registry-C6jd3Uxi.cjs} +21565 -21544
  351. package/dist/{provider-registry-BvbEoScB.js → provider-registry-C_XQJvu2.js} +21565 -21544
  352. package/dist/provider-registry.json +22006 -21980
  353. package/dist/{registry-generator-CDaf48a6.cjs → registry-generator-BYdAlox6.cjs} +1 -1
  354. package/dist/{registry-generator-BFOQQHyt.js → registry-generator-DBrTbThj.js} +1 -1
  355. package/dist/{rehydrate-CFoKaNlm.js → rehydrate-4xHubfOY.js} +2 -2
  356. package/dist/{rehydrate-QeS0NjGw.cjs → rehydrate-BtwY0ima.cjs} +2 -2
  357. package/dist/relevance/index.cjs +2 -2
  358. package/dist/relevance/index.js +2 -2
  359. package/dist/{scheduler-0ShtMM1I.js → scheduler-D1qdie5k.js} +4 -2
  360. package/dist/{scheduler-CMjK0LoQ.cjs → scheduler-DE5lcHJA.cjs} +4 -2
  361. package/dist/server/index.d.ts +1 -1
  362. package/dist/server/types.d.ts +57 -0
  363. package/dist/storage/domains/memory/base.d.ts +6 -1
  364. package/dist/storage/index.cjs +2 -2
  365. package/dist/storage/index.js +2 -2
  366. package/dist/stream/index.cjs +2 -2
  367. package/dist/stream/index.js +2 -2
  368. package/dist/{stream-CNqAlDJF.cjs → stream-DqKDB3nL.cjs} +1 -1
  369. package/dist/{stream-D2rv1Ut1.js → stream-H_wVxqdK.js} +1 -1
  370. package/dist/test-utils/llm-mock.cjs +1 -1
  371. package/dist/test-utils/llm-mock.js +1 -1
  372. package/dist/tool-loop-agent/index.cjs +1 -1
  373. package/dist/tool-loop-agent/index.js +1 -1
  374. package/dist/{tool-loop-agent-Dusqj7-j.cjs → tool-loop-agent-D4gSdYuN.cjs} +3 -3
  375. package/dist/{tool-loop-agent-CFsOjueT.js → tool-loop-agent-DvZcOxWe.js} +3 -3
  376. package/dist/{utils-CIuOHPoS.cjs → utils-Dd4m7z13.cjs} +1 -1
  377. package/dist/{utils-DLnCt6E9.js → utils-h5k_ChdS.js} +1 -1
  378. package/dist/utils.cjs +1 -1
  379. package/dist/utils.js +1 -1
  380. package/dist/{validate-ShLcQTA5.js → validate-DQB9spZ1.js} +1 -1
  381. package/dist/{validate-1zReLtWc.cjs → validate-u6_TUYSo.cjs} +1 -1
  382. package/dist/vector/index.cjs +1 -1
  383. package/dist/vector/index.js +1 -1
  384. package/dist/worker/index.cjs +1 -1
  385. package/dist/worker/index.d.ts +1 -1
  386. package/dist/worker/index.js +1 -1
  387. package/dist/worker/workers/orchestration-worker.d.ts +13 -0
  388. package/dist/{worker-CQ8rTJwQ.cjs → worker-0F7Nukyf.cjs} +2 -2
  389. package/dist/{worker-BPNrwCFs.cjs → worker-D-cq8McN.cjs} +117 -32
  390. package/dist/{worker-ngt-F1Iv.js → worker-DWOK2M_5.js} +117 -32
  391. package/dist/{worker-CKcQcPl8.js → worker-DmUkyJY_.js} +2 -2
  392. package/dist/{workflow-B_e5wMmz.cjs → workflow-DXE15e-w.cjs} +4 -4
  393. package/dist/{workflow-XDIVRsu4.js → workflow-DamOke3z.js} +4 -4
  394. package/dist/workflows/builder/index.cjs +1 -1
  395. package/dist/workflows/builder/index.js +1 -1
  396. package/dist/workflows/evented/index.cjs +1 -1
  397. package/dist/workflows/evented/index.js +1 -1
  398. package/dist/workflows/evented/setup-warning.d.ts +20 -0
  399. package/dist/workflows/index.cjs +5 -5
  400. package/dist/workflows/index.js +5 -5
  401. package/dist/workflows/scheduler/types.d.ts +3 -0
  402. package/dist/workspace/tools/media.d.ts +2 -2
  403. package/package.json +7 -7
  404. package/src/llm/model/provider-types.generated.d.ts +7689 -7673
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BrhgMLW6.cjs");
2
- const require_netlify = require("./netlify-CS0VDbb9.cjs");
2
+ const require_netlify = require("./netlify-1lti1j4Z.cjs");
3
3
  let path = require("path");
4
4
  path = require_rolldown_runtime.__toESM(path, 1);
5
5
  let fs_promises = require("fs/promises");
@@ -1,4 +1,4 @@
1
- import { g as getGatewayId, v as shouldEnableGateway, y as getCapabilityFileName } from "./netlify-DcY9gHCJ.js";
1
+ import { g as getGatewayId, v as shouldEnableGateway, y as getCapabilityFileName } from "./netlify-ClBjc0Xg.js";
2
2
  import path from "path";
3
3
  import fs from "fs/promises";
4
4
  // src/llm/model/registry-generator.ts
@@ -1,6 +1,6 @@
1
- import { Ds as createEventedWorkflow, Es as cloneWorkflow, Ic as mapVariable, Lc as predicateToCondition, Os as createWorkflow, al as createStepFromTool, rl as createStepFromAgent, yl as getSingleStepEntryId } from "./execution-fence--VdnD7p4.js";
1
+ import { Ds as createEventedWorkflow, Es as cloneWorkflow, Ic as mapVariable, Lc as predicateToCondition, Os as createWorkflow, al as createStepFromTool, rl as createStepFromAgent, yl as getSingleStepEntryId } from "./execution-fence-DGFyUV5h.js";
2
2
  import { derivePredicateLabel } from "./predicate/index.js";
3
- import { a as jsonSchemaToZod, l as parseMapConfig } from "./validate-ShLcQTA5.js";
3
+ import { a as jsonSchemaToZod, l as parseMapConfig } from "./validate-DQB9spZ1.js";
4
4
  import { standardSchemaToJSONSchema, toStandardSchema } from "./schema/index.js";
5
5
  // src/workflows/dynamic/serialize.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- const require_execution_fence = require("./execution-fence-BBKnrhWR.cjs");
1
+ const require_execution_fence = require("./execution-fence-C8Q0wWkG.cjs");
2
2
  const require_predicate_index = require("./predicate/index.cjs");
3
- const require_validate = require("./validate-1zReLtWc.cjs");
3
+ const require_validate = require("./validate-u6_TUYSo.cjs");
4
4
  let _mastra_schema_compat_schema = require("@mastra/schema-compat/schema");
5
5
  // src/workflows/dynamic/serialize.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_execution_fence = require("../execution-fence-BBKnrhWR.cjs");
3
- const require_stream = require("../stream-CNqAlDJF.cjs");
2
+ const require_execution_fence = require("../execution-fence-C8Q0wWkG.cjs");
3
+ const require_stream = require("../stream-DqKDB3nL.cjs");
4
4
  // src/relevance/relevance-score-provider.ts
5
5
  function createSimilarityPrompt(query, text) {
6
6
  return `Rate the semantic similarity between the following the query and the text on a scale from 0 to 1 (decimals allowed), where 1 means exactly the same meaning and 0 means completely different:
@@ -1,5 +1,5 @@
1
- import { T as Agent } from "../execution-fence--VdnD7p4.js";
2
- import { un as isSupportedLanguageModel } from "../stream-D2rv1Ut1.js";
1
+ import { T as Agent } from "../execution-fence-DGFyUV5h.js";
2
+ import { un as isSupportedLanguageModel } from "../stream-H_wVxqdK.js";
3
3
  // src/relevance/relevance-score-provider.ts
4
4
  function createSimilarityPrompt(query, text) {
5
5
  return `Rate the semantic similarity between the following the query and the text on a scale from 0 to 1 (decimals allowed), where 1 means exactly the same meaning and 0 means completely different:
@@ -491,7 +491,7 @@ var Scheduler = class extends MastraBase {
491
491
  case "workflow": {
492
492
  const { workflowId, inputData, initialState, requestContext, resourceId, definitionHash } = schedule.target;
493
493
  const localOnly = this.#config.canExecuteLocally?.() === true;
494
- await this.#pubsub.publish(TOPIC_WORKFLOWS, {
494
+ const event = {
495
495
  type: "workflow.start",
496
496
  runId: claimId,
497
497
  data: {
@@ -511,7 +511,9 @@ var Scheduler = class extends MastraBase {
511
511
  triggerKind: "schedule-fire"
512
512
  }
513
513
  }
514
- }, localOnly ? { localOnly: true } : void 0);
514
+ };
515
+ if (localOnly && this.#config.publishLocalWorkflowStart) await this.#config.publishLocalWorkflowStart(event);
516
+ else await this.#pubsub.publish(TOPIC_WORKFLOWS, event, localOnly ? { localOnly: true } : void 0);
515
517
  return;
516
518
  }
517
519
  case "agent":
@@ -491,7 +491,7 @@ var Scheduler = class extends require_base.MastraBase {
491
491
  case "workflow": {
492
492
  const { workflowId, inputData, initialState, requestContext, resourceId, definitionHash } = schedule.target;
493
493
  const localOnly = this.#config.canExecuteLocally?.() === true;
494
- await this.#pubsub.publish(TOPIC_WORKFLOWS, {
494
+ const event = {
495
495
  type: "workflow.start",
496
496
  runId: claimId,
497
497
  data: {
@@ -511,7 +511,9 @@ var Scheduler = class extends require_base.MastraBase {
511
511
  triggerKind: "schedule-fire"
512
512
  }
513
513
  }
514
- }, localOnly ? { localOnly: true } : void 0);
514
+ };
515
+ if (localOnly && this.#config.publishLocalWorkflowStart) await this.#config.publishLocalWorkflowStart(event);
516
+ else await this.#pubsub.publish(TOPIC_WORKFLOWS, event, localOnly ? { localOnly: true } : void 0);
515
517
  return;
516
518
  }
517
519
  case "agent":
@@ -1,7 +1,7 @@
1
1
  import type { Mastra } from '../mastra/index.js';
2
2
  import type { RequestContext } from '../request-context/index.js';
3
3
  import type { ApiRoute, ApiRouteHandler, CorsOptions, MastraAuthConfig, Methods, Handler, MiddlewareHandler, DescribeRouteOptions } from './types.js';
4
- export type { MastraAuthConfig, A2AAgentCardSigningConfig, A2AConfig, ContextWithMastra, CorsOptions, ApiRoute, ApiRouteHandler, HttpLoggingConfig, ValidationErrorContext, ValidationErrorResponse, ValidationErrorHook, StudioConfig, Middleware, Handler, MiddlewareHandler, DescribeRouteOptions, ServerConfig, ServerConfigInput, ApiRouteInput, ServerMCPConfig, ServerMCPPrimitiveFilter, ServerMCPOAuthConfig, MastraMCPToolset, } from './types.js';
4
+ export type { MastraAuthConfig, A2AAgentCardSigningConfig, A2AConfig, ContextWithMastra, CorsOptions, ApiRoute, ApiRouteHandler, HttpLoggingConfig, ValidationErrorContext, ValidationErrorResponse, ValidationErrorHook, StudioConfig, Middleware, Handler, MiddlewareHandler, DescribeRouteOptions, ServerConfig, ServerConfigInput, ApiRouteInput, ServerMCPConfig, ServerMCPPrimitiveFilter, ServerMCPOAuthConfig, ServerMCPCardConfig, MastraMCPToolset, } from './types.js';
5
5
  export { MastraAuthProvider, normalizeMastraUser, isSSOProvider, isSessionProvider, isUserProvider, isCredentialsProvider, isOrganizationsProvider, isAuthHttpHandler, hasAuthInit, } from './auth.js';
6
6
  export type { IMastraAuthProvider, MastraAuthOAuthMetadata, MastraAuthProviderOptions, AuthInitContext, IAuthHttpHandler, IAuthInit, ICredentialsProvider, IOrganizationsProvider, ISessionProvider, ISSOProvider, IUserProvider, } from './auth.js';
7
7
  export type { HonoRequestLike, MastraAuthRequest } from './request-types.js';
@@ -278,6 +278,50 @@ export type ServerMCPConfig = {
278
278
  * `/.well-known/oauth-protected-resource` when `server.auth` is configured.
279
279
  */
280
280
  oauth?: ServerMCPOAuthConfig;
281
+ /**
282
+ * MCP Server Card (SEP-2127) served without auth at `<path>/server-card` while the endpoint is served: public
283
+ * metadata (name, version, description, endpoint URL, protocol versions) that lets clients and registries discover
284
+ * the server before connecting. Fields default to `serverInfo` and the endpoint; set them here to override.
285
+ * `false` stops serving it.
286
+ * @experimental The Server Card extension is experimental; its shape may change.
287
+ */
288
+ card?: ServerMCPCardConfig | false;
289
+ };
290
+ /** Overrides for the built-in MCP endpoint's Server Card. */
291
+ export type ServerMCPCardConfig = {
292
+ /**
293
+ * Reverse-DNS name with exactly one slash. Defaults to the endpoint host in reverse-DNS order and `mastra`, such as
294
+ * `com.example.api/mastra` for `https://api.example.com/api/mcp`.
295
+ * @example 'com.example/assistant'
296
+ */
297
+ name?: string;
298
+ /** Display name, 1-100 characters. Defaults to `serverInfo.title`, then `serverInfo.name`. */
299
+ title?: string;
300
+ /** 1-100 characters. */
301
+ description?: string;
302
+ /** Homepage or documentation URL. */
303
+ websiteUrl?: string;
304
+ /** Where the server's source code lives. */
305
+ repository?: {
306
+ url: string;
307
+ source: string;
308
+ subfolder?: string;
309
+ id?: string;
310
+ };
311
+ /** Icons clients can show for the server. */
312
+ icons?: {
313
+ src: string;
314
+ mimeType?: string;
315
+ sizes?: string[];
316
+ theme?: 'light' | 'dark';
317
+ }[];
318
+ /**
319
+ * Public URL of the MCP endpoint, as an absolute http(s) URL (not a template). Defaults to `oauth.resource`, then
320
+ * to the URL the card was requested under.
321
+ * Set it behind a proxy so the card names the public URL and shared caches can store it.
322
+ * @example 'https://api.example.com/api/mcp'
323
+ */
324
+ url?: string;
281
325
  };
282
326
  export type ServerMCPOAuthConfig = {
283
327
  /** Authorization servers that issue tokens for this endpoint. Defaults to the auth provider's `getOAuthMetadata()`. */
@@ -360,6 +404,19 @@ export type ServerConfig = {
360
404
  * @default 5000
361
405
  */
362
406
  drainTimeout?: number;
407
+ /**
408
+ * How Mastra shutdown drains evented workflow runs after SIGINT/SIGTERM.
409
+ * `'run'` keeps taking workflow events while it waits for in-flight runs to
410
+ * finish. `'step'` stops taking workflow events once the HTTP drain is over,
411
+ * finishes the steps this process is executing, and leaves the next steps
412
+ * to another process on the same pubsub. It still waits, up to
413
+ * `drainTimeout`, for the runs it started to finish there, so the process
414
+ * doesn't exit sooner. Use `'step'` for rolling deploys where another
415
+ * instance is running during the shutdown. Supported on Redis Streams and
416
+ * Valkey Streams.
417
+ * @default 'run'
418
+ */
419
+ drain?: 'run' | 'step';
363
420
  /**
364
421
  * Whether the generated server installs its own SIGINT/SIGTERM handlers
365
422
  * (drain in-flight requests + `mastra.shutdown()` + `process.exit`). Set
@@ -246,7 +246,12 @@ export declare abstract class MemoryStorage extends StorageDomain {
246
246
  consumedIds: string[];
247
247
  }): Promise<MastraDBMessage[]>;
248
248
  /**
249
- * Delete the thread's taken rows whose id is in `consumedIds`. Then, if the
249
+ * Delete the thread's taken rows whose id is in `consumedIds`. A consumed
250
+ * id never names a queued row: a run consumes a row by claiming it or by
251
+ * starting with it, a claim never returns a queued row, and a run that
252
+ * keeps its signals here named itself the signal run through
253
+ * `setSignalRun` before it started, which made the thread's queued rows
254
+ * pending. Then, if the
250
255
  * thread's signal run is still `runId`, move its other taken rows and its
251
256
  * queued rows to pending and clear the signal run. A close that comes after another run
252
257
  * became the signal run deletes only what it consumed and leaves the other
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_stream = require("../stream-CNqAlDJF.cjs");
3
- const require_execution_fence = require("../execution-fence-BBKnrhWR.cjs");
2
+ const require_stream = require("../stream-DqKDB3nL.cjs");
3
+ const require_execution_fence = require("../execution-fence-C8Q0wWkG.cjs");
4
4
  const require_observability = require("../observability-VaoaeadK.cjs");
5
5
  const require_storage = require("../storage-CfG0I2aF.cjs");
6
6
  const require_constants = require("../constants-B2FVV_2e.cjs");
@@ -1,5 +1,5 @@
1
- import { At as getSnapshotMemoryInfo, Bt as stateColumnsWrite, Ft as latestStepResults, Ht as unusedStateEntries, It as materializeState, Lt as materializeWorkflowRun, Mt as STEP_RESULT_SUMMARY_FIELDS, Nt as applyStateColumnsWrite, Pt as isStateCheckpointDue, Rt as pickStateKeys, Sn as takenQueueThreadId, Ut as applyStatePatch, Vt as summarizeStepResult, Wt as diffState, _n as QUEUE_THREAD_PREFIX, bn as pendingQueueThreadId, jt as STATE_CHECKPOINT_PATCHES, vn as assertNotQueueThreadId, xn as queuedQueueThreadId, yn as isQueueThreadId, zt as stateBaseOf } from "../stream-D2rv1Ut1.js";
2
- import { $a as spanQueryResponseSchema, $i as ChannelsStorage, $n as assertKnowledgeCeilingRaised, $r as KnowledgeImporterBindingConflictError, Aa as THREAD_QUERY_DEFAULT_LIMIT, Ai as knowledgeLinkRefKey, Ar as ScoresInMemory, Ba as SPAN_QUERY_MAX_LIMIT, Bi as ExperimentsInMemory, Ca as validateStorageMetadataFilter, Ci as MAX_KNOWLEDGE_PAGE_LINKS, Cr as createEmptyWorkflowSnapshot, Da as tracePageNodeSchema, Dc as isWorkflowStepConflictError, Di as assertKnowledgeNoteTextWithinBound, Dr as WorkflowDefinitionsStorage, Ea as tracePageIdSchema, Ec as assertWorkflowStepGuard, Ei as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Er as InMemoryWorkflowDefinitionsStorage, Fa as threadQueryRequestSchema, Fi as parseKnowledgePageRef, Fr as InMemoryNotificationsStorage, Ga as encodeSpanQueryCursor, Ha as SPAN_QUERY_ORDER_FIELDS, Hi as DatasetsInMemory, Ia as threadQueryResponseSchema, Ii as KnowledgeInvalidCursorError, Ir as NotificationsStorage, Ja as resolveSpanQueryCost, Ka as parseSpanQueryRequest, La as threadQueryRowSchema, Lr as dispatchDueNotifications, Ma as encodeThreadQueryCursor, Mi as knowledgePinDepth, Mr as InMemorySchedulesStorage, Na as planThreadRowsQuery, Ni as knowledgePositionBetween, Nr as SchedulesStorage, Oa as tracePageRequestSchema, Oi as assertKnowledgePageDescriptionWithinBound, Or as InMemoryToolProviderConnectionsStorage, Pa as threadQueryIdentitySchema, Pi as knowledgeScopeReadable, Pr as normalizeScheduleTarget, Qa as spanQueryRequestSchema, Qi as InMemoryChannelsStorage, Qn as MAX_KNOWLEDGE_SCOPE_TAGS, Qr as InMemoryKnowledgeStorage, Ra as SPAN_QUERY_MAX_COST_METRICS, Ri as InMemoryHarness, Sa as transformScoreRow, Si as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, Sr as WorkflowsStorage, Ta as readTracePage, Tc as WorkflowStepConflictError, Ti as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Tr as mergeWorkflowStepResult, Ua as buildSpanQueryResponse, Ui as DatasetsStorage, Va as SPAN_QUERY_MAX_PREVIEW_CHARACTERS, Vi as ExperimentsStorage, Wa as createSpanQueryPreview, Wi as DatasetItemIdentityConflictError, Xa as spanQueryIdentityKey, Xn as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, Xr as InMemoryMemory, Ya as spanQueryCostSchema, Za as spanQueryIdentitySchema, Zn as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, Zr as MemoryStorage, _a as parseDuration, _i as KnowledgePageKeyConflictError, _o as ObservabilityStorage, _r as FilesystemDB, _u as matchesRunFence, aa as resolveRetentionTargets, ai as KnowledgeNotFoundError, ao as planTraceQuery, ar as expandKnowledgeScope, ba as storageMessageMatchesMetadataFilter, bi as MAX_KNOWLEDGE_PAGE_BODY_LINKS, bo as UniqueViolationError, br as WorkflowsInMemory, bu as runOutsideRunFenceScope, ca as createStorageErrorId, ci as KnowledgeTransactionDeadlineError, co as buildLogRecord, cr as knowledgeSemanticDocumentId, da as ensureDate, di as createKnowledgeUlid, do as buildUpdateSpanRecord, dr as parseKnowledgeNodeCursor, du as RUN_FENCE_CONFLICT_ERROR_ID, ea as InMemoryBlobStore, ei as KnowledgeImporterRunStateError, eo as spanQueryRowSchema, er as assertKnowledgeDescriptionWithinBound, fa as filterByDateRange, fi as inspectKnowledgeSchema, fo as getObjectOrNull, fr as StoreOperationsInMemory, fu as RUN_FENCING_NOT_SUPPORTED_ERROR_ID, ga as jsonValueEquals, gi as KnowledgePageHasChildrenError, go as ObservabilityInMemory, gr as FilesystemStore, gu as isRunFenceConflictError, ha as hasErrorCode, hi as KnowledgePageDepthError, ho as toEntityType, hr as createGitHubSourceControlProviderFromEnv, hu as currentRunGeneration, ia as executeRetentionPrune, ii as KnowledgeConflictError, io as planThreadQuery, ir as createKnowledgeNodeCursor, ja as THREAD_QUERY_MAX_LIMIT, ji as knowledgePagePath, jr as ScoresStorage, ka as tracePageResponseSchema, ki as canonicalKnowledgeName, kr as ToolProviderConnectionsStorage, la as createStoreErrorId, li as KnowledgeUnsupportedCapabilityError, lo as buildMetricRecord, lr as knowledgeSemanticIdempotencyKey, ma as getSqlType, mi as KnowledgeMoveTooLargeError, mo as serializeSpanAttributes, mr as GitHubSourceControlProvider, mu as coverNestedRun, na as BackgroundTasksInMemory, ni as KNOWLEDGE_STORAGE_CONTRACT_VERSION, no as encodeTraceQueryDeltaCursor, nr as assertKnowledgeScopeWithinCeiling, oa as retentionCutoffMs, oi as KnowledgeSchemaResetRequiredError, oo as buildCreateSpanRecord, or as isKnowledgeScopeVisible, pa as getDefaultValue, pi as parseKnowledgeWikilinks, po as getStringOrNull, pr as StoreOperations, pu as RunFenceConflictError, qa as planSpanQuery, ra as BackgroundTasksStorage, ri as KNOWLEDGE_STORAGE_SCHEMA_VERSION, ro as getTraceQueryDeltaWatermark, rr as canonicalizeKnowledgeScope, sa as runRetentionBatches, si as KnowledgeStorage, so as buildFeedbackRecord, sr as knowledgeScopeKey, ta as BlobStore, ti as KnowledgeImportersStorage, to as encodeTraceQueryCursor, tr as assertKnowledgeRecordTextWithinBound, ua as createVectorErrorId, ui as assertKnowledgeSchemaCompatible, uo as buildScoreRecord, ur as knowledgeVisibleScopeKeys, va as safelyParseJSON, vi as MAX_KNOWLEDGE_MOVE_PAGES, vo as FactoryStorage, vr as InMemoryStore, vu as resolveRunFence, wa as TracePageError, wi as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, wr as mergeStepResult, xa as transformRow, xi as MAX_KNOWLEDGE_PAGE_DEPTH, xr as cloneRunData, xu as setRunFenceContext, ya as serializeDate, yi as MAX_KNOWLEDGE_NOTE_TOKENS, yo as FactoryStorageDomain, yr as MockStore, yu as runFencingNotSupportedError, za as SPAN_QUERY_MAX_CURSOR_BYTES, zi as HarnessStorage } from "../execution-fence--VdnD7p4.js";
1
+ import { At as getSnapshotMemoryInfo, Bt as stateColumnsWrite, Ft as latestStepResults, Ht as unusedStateEntries, It as materializeState, Lt as materializeWorkflowRun, Mt as STEP_RESULT_SUMMARY_FIELDS, Nt as applyStateColumnsWrite, Pt as isStateCheckpointDue, Rt as pickStateKeys, Sn as takenQueueThreadId, Ut as applyStatePatch, Vt as summarizeStepResult, Wt as diffState, _n as QUEUE_THREAD_PREFIX, bn as pendingQueueThreadId, jt as STATE_CHECKPOINT_PATCHES, vn as assertNotQueueThreadId, xn as queuedQueueThreadId, yn as isQueueThreadId, zt as stateBaseOf } from "../stream-H_wVxqdK.js";
2
+ import { $a as spanQueryResponseSchema, $i as ChannelsStorage, $n as assertKnowledgeCeilingRaised, $r as KnowledgeImporterBindingConflictError, Aa as THREAD_QUERY_DEFAULT_LIMIT, Ai as knowledgeLinkRefKey, Ar as ScoresInMemory, Ba as SPAN_QUERY_MAX_LIMIT, Bi as ExperimentsInMemory, Ca as validateStorageMetadataFilter, Ci as MAX_KNOWLEDGE_PAGE_LINKS, Cr as createEmptyWorkflowSnapshot, Da as tracePageNodeSchema, Dc as isWorkflowStepConflictError, Di as assertKnowledgeNoteTextWithinBound, Dr as WorkflowDefinitionsStorage, Ea as tracePageIdSchema, Ec as assertWorkflowStepGuard, Ei as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Er as InMemoryWorkflowDefinitionsStorage, Fa as threadQueryRequestSchema, Fi as parseKnowledgePageRef, Fr as InMemoryNotificationsStorage, Ga as encodeSpanQueryCursor, Ha as SPAN_QUERY_ORDER_FIELDS, Hi as DatasetsInMemory, Ia as threadQueryResponseSchema, Ii as KnowledgeInvalidCursorError, Ir as NotificationsStorage, Ja as resolveSpanQueryCost, Ka as parseSpanQueryRequest, La as threadQueryRowSchema, Lr as dispatchDueNotifications, Ma as encodeThreadQueryCursor, Mi as knowledgePinDepth, Mr as InMemorySchedulesStorage, Na as planThreadRowsQuery, Ni as knowledgePositionBetween, Nr as SchedulesStorage, Oa as tracePageRequestSchema, Oi as assertKnowledgePageDescriptionWithinBound, Or as InMemoryToolProviderConnectionsStorage, Pa as threadQueryIdentitySchema, Pi as knowledgeScopeReadable, Pr as normalizeScheduleTarget, Qa as spanQueryRequestSchema, Qi as InMemoryChannelsStorage, Qn as MAX_KNOWLEDGE_SCOPE_TAGS, Qr as InMemoryKnowledgeStorage, Ra as SPAN_QUERY_MAX_COST_METRICS, Ri as InMemoryHarness, Sa as transformScoreRow, Si as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, Sr as WorkflowsStorage, Ta as readTracePage, Tc as WorkflowStepConflictError, Ti as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Tr as mergeWorkflowStepResult, Ua as buildSpanQueryResponse, Ui as DatasetsStorage, Va as SPAN_QUERY_MAX_PREVIEW_CHARACTERS, Vi as ExperimentsStorage, Wa as createSpanQueryPreview, Wi as DatasetItemIdentityConflictError, Xa as spanQueryIdentityKey, Xn as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, Xr as InMemoryMemory, Ya as spanQueryCostSchema, Za as spanQueryIdentitySchema, Zn as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, Zr as MemoryStorage, _a as parseDuration, _i as KnowledgePageKeyConflictError, _o as ObservabilityStorage, _r as FilesystemDB, _u as matchesRunFence, aa as resolveRetentionTargets, ai as KnowledgeNotFoundError, ao as planTraceQuery, ar as expandKnowledgeScope, ba as storageMessageMatchesMetadataFilter, bi as MAX_KNOWLEDGE_PAGE_BODY_LINKS, bo as UniqueViolationError, br as WorkflowsInMemory, bu as runOutsideRunFenceScope, ca as createStorageErrorId, ci as KnowledgeTransactionDeadlineError, co as buildLogRecord, cr as knowledgeSemanticDocumentId, da as ensureDate, di as createKnowledgeUlid, do as buildUpdateSpanRecord, dr as parseKnowledgeNodeCursor, du as RUN_FENCE_CONFLICT_ERROR_ID, ea as InMemoryBlobStore, ei as KnowledgeImporterRunStateError, eo as spanQueryRowSchema, er as assertKnowledgeDescriptionWithinBound, fa as filterByDateRange, fi as inspectKnowledgeSchema, fo as getObjectOrNull, fr as StoreOperationsInMemory, fu as RUN_FENCING_NOT_SUPPORTED_ERROR_ID, ga as jsonValueEquals, gi as KnowledgePageHasChildrenError, go as ObservabilityInMemory, gr as FilesystemStore, gu as isRunFenceConflictError, ha as hasErrorCode, hi as KnowledgePageDepthError, ho as toEntityType, hr as createGitHubSourceControlProviderFromEnv, hu as currentRunGeneration, ia as executeRetentionPrune, ii as KnowledgeConflictError, io as planThreadQuery, ir as createKnowledgeNodeCursor, ja as THREAD_QUERY_MAX_LIMIT, ji as knowledgePagePath, jr as ScoresStorage, ka as tracePageResponseSchema, ki as canonicalKnowledgeName, kr as ToolProviderConnectionsStorage, la as createStoreErrorId, li as KnowledgeUnsupportedCapabilityError, lo as buildMetricRecord, lr as knowledgeSemanticIdempotencyKey, ma as getSqlType, mi as KnowledgeMoveTooLargeError, mo as serializeSpanAttributes, mr as GitHubSourceControlProvider, mu as coverNestedRun, na as BackgroundTasksInMemory, ni as KNOWLEDGE_STORAGE_CONTRACT_VERSION, no as encodeTraceQueryDeltaCursor, nr as assertKnowledgeScopeWithinCeiling, oa as retentionCutoffMs, oi as KnowledgeSchemaResetRequiredError, oo as buildCreateSpanRecord, or as isKnowledgeScopeVisible, pa as getDefaultValue, pi as parseKnowledgeWikilinks, po as getStringOrNull, pr as StoreOperations, pu as RunFenceConflictError, qa as planSpanQuery, ra as BackgroundTasksStorage, ri as KNOWLEDGE_STORAGE_SCHEMA_VERSION, ro as getTraceQueryDeltaWatermark, rr as canonicalizeKnowledgeScope, sa as runRetentionBatches, si as KnowledgeStorage, so as buildFeedbackRecord, sr as knowledgeScopeKey, ta as BlobStore, ti as KnowledgeImportersStorage, to as encodeTraceQueryCursor, tr as assertKnowledgeRecordTextWithinBound, ua as createVectorErrorId, ui as assertKnowledgeSchemaCompatible, uo as buildScoreRecord, ur as knowledgeVisibleScopeKeys, va as safelyParseJSON, vi as MAX_KNOWLEDGE_MOVE_PAGES, vo as FactoryStorage, vr as InMemoryStore, vu as resolveRunFence, wa as TracePageError, wi as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, wr as mergeStepResult, xa as transformRow, xi as MAX_KNOWLEDGE_PAGE_DEPTH, xr as cloneRunData, xu as setRunFenceContext, ya as serializeDate, yi as MAX_KNOWLEDGE_NOTE_TOKENS, yo as FactoryStorageDomain, yr as MockStore, yu as runFencingNotSupportedError, za as SPAN_QUERY_MAX_CURSOR_BYTES, zi as HarnessStorage } from "../execution-fence-DGFyUV5h.js";
3
3
  import { l as PREVIEW_MAX_LENGTH } from "../observability-DPDWibyH.js";
4
4
  import { $ as getFeedbackAggregateArgsSchema, $t as metricsFilterSchema, A as deleteScoresResponseSchema, An as tagsField, At as getServiceNamesResponseSchema, B as experimentIdField, Bt as listScoresArgsSchema, C as dateRangeSchema, Cn as scoresOrderBySchema, Ct as getScoreBreakdownArgsSchema, D as deleteFeedbackArgsSchema, Dn as sourceField, Dt as getScoreTimeSeriesArgsSchema, E as defaultPaginationArgs, En as sortDirectionSchema, Et as getScorePercentilesResponseSchema, F as entityIdField, Fn as userIdField, Ft as listLogsArgsSchema, G as feedbackRecordSchema, Gt as logsFilterSchema, H as feedbackInputSchema, Ht as logLevelSchema, I as entityNameField, It as listLogsResponseSchema, J as getEntityNamesResponseSchema, Jt as metadataField, K as feedbackReviewStatusSchema, Kt as logsOrderByFieldSchema, L as entityTypeField, Lt as listMetricsArgsSchema, M as deltaInfoSchema, Mn as traceIdField, Mt as getTagsResponseSchema, N as deltaLimitSchema, Nn as updateFeedbackReviewStatusArgsSchema, Nt as listFeedbackArgsSchema, O as deleteFeedbackResponseSchema, On as spanContextFields, Ot as getScoreTimeSeriesResponseSchema, P as distinctColumnSchema, Pn as updatedAtField, Pt as listFeedbackResponseSchema, Q as getEnvironmentsResponseSchema, Qt as metricsAggregationSchema, R as environmentField, Rt as listMetricsResponseSchema, S as createdAtField, Sn as scoresOrderByFieldSchema, St as getScoreAggregateResponseSchema, T as defaultDeltaLimit, Tn as sessionIdField, Tt as getScorePercentilesArgsSchema, U as feedbackOrderByFieldSchema, Ut as logRecordInputSchema, V as feedbackFilterSchema, Vt as listScoresResponseSchema, W as feedbackOrderBySchema, Wt as logRecordSchema, X as getEntityTypesResponseSchema, Xt as metricRecordSchema, Y as getEntityTypesArgsSchema, Yt as metricInputSchema, Z as getEnvironmentsArgsSchema, Zt as metricTypeSchema, _ as createMetricRecordSchema, _n as runIdField, _t as getMetricPercentilesArgsSchema, a as batchCreateFeedbackArgsSchema, an as paginationInfoSchema, at as getFeedbackTimeSeriesArgsSchema, b as createScoreRecordSchema, bn as scoreRecordSchema, bt as getMetricTimeSeriesResponseSchema, c as batchCreateScoresArgsSchema, cn as parentEntityTypeField, ct as getMetricAggregateResponseSchema, d as contextFields, dn as requestIdField, dt as getMetricLabelKeysArgsSchema, en as metricsOrderByFieldSchema, et as getFeedbackAggregateResponseSchema, f as createFeedbackArgsSchema, ft as getMetricLabelKeysResponseSchema, g as createLogRecordSchema, gn as rootEntityTypeField, gt as getMetricNamesResponseSchema, h as createFeedbackResponseSchema, hn as rootEntityNameField, ht as getMetricNamesArgsSchema, i as aggregationTypeSchema, in as paginationArgsSchema, it as getFeedbackPercentilesResponseSchema, j as deltaCursorSchema, jn as threadIdField, jt as getTagsArgsSchema, k as deleteScoresArgsSchema, kn as spanIdField, kt as getServiceNamesArgsSchema, l as commonFilterFields, ln as refineObservabilityListMode, lt as getMetricBreakdownArgsSchema, m as createFeedbackRecordSchema, mn as rootEntityIdField, mt as getMetricLabelValuesResponseSchema, n as METRIC_DISTINCT_COLUMNS, nn as normalizeObservabilityListArgs, nt as getFeedbackBreakdownResponseSchema, o as batchCreateLogsArgsSchema, on as parentEntityIdField, ot as getFeedbackTimeSeriesResponseSchema, p as createFeedbackBodySchema, pn as resourceIdField, pt as getMetricLabelValuesArgsSchema, q as getEntityNamesArgsSchema, qt as logsOrderBySchema, r as aggregationIntervalSchema, rn as organizationIdField, rt as getFeedbackPercentilesArgsSchema, s as batchCreateMetricsArgsSchema, sn as parentEntityNameField, st as getMetricAggregateArgsSchema, t as EntityType, tn as metricsOrderBySchema, tt as getFeedbackBreakdownArgsSchema, u as comparePeriodSchema, un as replaceFeedbackBodySchema, ut as getMetricBreakdownResponseSchema, v as createScoreArgsSchema, vn as scopeField, vt as getMetricPercentilesResponseSchema, w as dbTimestamps, wn as serviceNameField, wt as getScoreBreakdownResponseSchema, x as createScoreResponseSchema, xn as scoresFilterSchema, xt as getScoreAggregateArgsSchema, y as createScoreBodySchema, yn as scoreInputSchema, yt as getMetricTimeSeriesArgsSchema, z as executionSourceField, zt as listModeSchema } from "../storage-Cc50aQAp.js";
5
5
  import { $ as TABLE_CHANNEL_INSTALLATIONS, $n as listTracesLightResponseSchema, $t as TABLE_WORKSPACES, A as MCP_CLIENTS_SCHEMA, An as computeTraceStatus, At as TABLE_OBSERVATIONAL_MEMORY, B as PROMPT_BLOCK_VERSIONS_SCHEMA, Bn as getSpansArgsSchema, Bt as TABLE_SKILLS, C as KNOWLEDGE_SCOPE_GRANTS_SCHEMA, Cn as branchesFilterSchema, Ct as TABLE_MCP_CLIENTS, D as KNOWLEDGE_V2_MENTIONS_SCHEMA, Dn as buildPreview, Dt as TABLE_MEMORY_RUN_FENCES, E as KNOWLEDGE_V2_ACTIVITY_SCHEMA, En as buildInputPreview, Et as TABLE_MCP_SERVER_VERSIONS, F as NOTIFICATIONS_SCHEMA, Fn as getBranchResponseSchema, Ft as TABLE_SCHEDULE_TRIGGERS, G as SKILLS_SCHEMA, Gn as getTraceLightResponseSchema, Gt as TABLE_THREAD_STATE, H as SCORERS_SCHEMA, Hn as getStringAttribute, Ht as TABLE_SKILL_VERSIONS, I as OBSERVATIONAL_MEMORY_SCHEMA, In as getRootSpanArgsSchema, It as TABLE_SCHEMAS, J as SPAN_SCHEMA, Jn as lightSpanRecordSchema, Jt as TABLE_WORKFLOW_DEFINITIONS, K as SKILL_BLOBS_SCHEMA, Kn as getTraceResponseSchema, Kt as TABLE_TOOL_PROVIDER_CONNECTIONS, L as OBSERVATIONAL_MEMORY_TABLE_SCHEMA, Ln as getRootSpanResponseSchema, Lt as TABLE_SCORERS, M as MCP_SERVERS_SCHEMA, Mn as createSpanRecordSchema, Mt as TABLE_PROMPT_BLOCK_VERSIONS, N as MCP_SERVER_VERSIONS_SCHEMA, Nn as extractBranchSpans, Nt as TABLE_RESOURCES, O as KNOWLEDGE_V2_NODES_SCHEMA, On as buildPreviewFromJson, Ot as TABLE_MESSAGES, P as MEMORY_RUN_FENCES_SCHEMA, Pn as getBranchArgsSchema, Pt as TABLE_SCHEDULES, Q as TABLE_CHANNEL_CONFIG, Qn as listTracesArgsSchema, Qt as TABLE_WORKFLOW_SNAPSHOT, R as OLD_SPAN_SCHEMA, Rn as getSpanArgsSchema, Rt as TABLE_SCORER_DEFINITIONS, S as KNOWLEDGE_SCOPE_ADDRESSES_SCHEMA, Sn as batchUpdateSpansArgsSchema, St as TABLE_KNOWLEDGE_SEMANTIC_OUTBOX, T as KNOWLEDGE_TABLE_NAMES, Tn as branchesOrderBySchema, Tt as TABLE_MCP_SERVERS, U as SCORER_DEFINITIONS_SCHEMA, Un as getStructureResponseSchema, Ut as TABLE_SPANS, V as RUN_FENCING_TABLE_SCHEMAS, Vn as getSpansResponseSchema, Vt as TABLE_SKILL_BLOBS, W as SCORER_DEFINITION_VERSIONS_SCHEMA, Wn as getTraceArgsSchema, Wt as TABLE_THREADS, X as TABLE_AGENT_VERSIONS, Xn as listBranchesResponseSchema, Xt as TABLE_WORKFLOW_RUN_ENTRIES, Y as TABLE_AGENTS, Yn as listBranchesArgsSchema, Yt as TABLE_WORKFLOW_RUNS, Z as TABLE_BACKGROUND_TASKS, Zn as listScoresBySpanResponseSchema, Zt as TABLE_WORKFLOW_RUN_OWNERS, _ as KNOWLEDGE_NODE_ADDRESSES_SCHEMA, _n as INPUT_PREVIEW_MAX_LENGTH, _r as isAppendOnlySince, _t as TABLE_KNOWLEDGE_PROPOSALS, a as DATASET_VERSIONS_SCHEMA, an as WORKFLOW_RUN_ENTRIES_SCHEMA, ar as spanRecordSchema, at as TABLE_EXPERIMENT_RESULTS, b as KNOWLEDGE_RECORDS_SCHEMA, bn as batchDeleteTracesArgsSchema, br as maxObservationCursor, bt as TABLE_KNOWLEDGE_SCOPE_ADDRESSES, c as FAVORITES_SCHEMA, cn as WORKSPACES_SCHEMA, cr as toTraceSpans, ct as TABLE_KNOWLEDGE_ACCESS_STATE, d as KNOWLEDGE_ACTIVITY_SCHEMA, dn as STORAGE_VISIBILITY_VALUES, dr as tracesOrderByFieldSchema, dt as TABLE_KNOWLEDGE_IMPORT_RUNS, en as TABLE_WORKSPACE_VERSIONS, er as listTracesResponseSchema, et as TABLE_CONFIGS, f as KNOWLEDGE_CURSORS_SCHEMA, fn as buildStorageSchema, fr as tracesOrderBySchema, ft as TABLE_KNOWLEDGE_IMPORT_STATE, g as KNOWLEDGE_NODES_SCHEMA, gn as BRANCH_SPAN_TYPE_SET, gr as compareObservationalMemoryHeadOrder, gt as TABLE_KNOWLEDGE_NODE_SCOPES, h as KNOWLEDGE_MENTIONS_SCHEMA, hn as BRANCH_SPAN_TYPES, hr as assertActiveObservationsApplied, ht as TABLE_KNOWLEDGE_NODE_ADDRESSES, i as DATASET_ITEMS_SCHEMA, in as WORKFLOW_RUNS_SCHEMA, ir as spanIdsSchema, it as TABLE_EXPERIMENTS, j as MCP_CLIENT_VERSIONS_SCHEMA, jn as createSpanArgsSchema, jt as TABLE_PROMPT_BLOCKS, k as KNOWLEDGE_V2_RECORDS_SCHEMA, kn as buildStoredPreview, kt as TABLE_NOTIFICATIONS, l as HARNESS_SESSIONS_SCHEMA, ln as WORKSPACE_VERSIONS_SCHEMA, lr as traceSpanSchema, lt as TABLE_KNOWLEDGE_ACTIVITY, m as KNOWLEDGE_IMPORT_STATE_SCHEMA, mn as BATCH_DELETE_TRACES_MAX_IDS, mr as updateSpanRecordSchema, mt as TABLE_KNOWLEDGE_NODES, n as AGENT_VERSIONS_SCHEMA, nn as TOOL_PROVIDER_CONNECTIONS_SCHEMA, nr as scoreTracesResponseSchema, nt as TABLE_DATASET_ITEMS, o as EXPERIMENTS_SCHEMA, on as WORKFLOW_RUN_JOURNAL_TABLE_CONFIGS, or as toLightSpanRecord, ot as TABLE_FAVORITES, p as KNOWLEDGE_IMPORT_RUNS_SCHEMA, pn as matchesExpectedWorkflowStatus, pr as updateSpanArgsSchema, pt as TABLE_KNOWLEDGE_MENTIONS, q as SKILL_VERSIONS_SCHEMA, qn as isPreviewTruncated, qt as TABLE_TRACES, r as DATASETS_SCHEMA, rn as WORKFLOW_DEFINITIONS_SCHEMA, rr as spanIds, rt as TABLE_DATASET_VERSIONS, s as EXPERIMENT_RESULTS_SCHEMA, sn as WORKFLOW_RUN_OWNERS_SCHEMA, sr as toTraceSpan, st as TABLE_HARNESS_SESSIONS, t as AGENTS_SCHEMA, tn as THREAD_STATE_SCHEMA, tr as scoreTracesRequestSchema, tt as TABLE_DATASETS, u as KNOWLEDGE_ACCESS_STATE_SCHEMA, un as STORAGE_FAVORITE_ENTITY_TYPES, ur as tracesFilterSchema, ut as TABLE_KNOWLEDGE_CURSORS, v as KNOWLEDGE_NODE_SCOPES_SCHEMA, vn as TraceStatus, vr as isBufferedChunkCoveredByCursor, vt as TABLE_KNOWLEDGE_RECORDS, w as KNOWLEDGE_SEMANTIC_OUTBOX_SCHEMA, wn as branchesOrderByFieldSchema, wt as TABLE_MCP_CLIENT_VERSIONS, x as KNOWLEDGE_RECORD_SCOPES_SCHEMA, xn as batchDeleteTracesResponseSchema, xr as planReflectionGenerationText, xt as TABLE_KNOWLEDGE_SCOPE_GRANTS, y as KNOWLEDGE_PROPOSALS_SCHEMA, yn as batchCreateSpansArgsSchema, yr as isBufferedReflectionUnchangedSince, yt as TABLE_KNOWLEDGE_RECORD_SCOPES, z as PROMPT_BLOCKS_SCHEMA, zn as getSpanResponseSchema, zt as TABLE_SCORER_DEFINITION_VERSIONS } from "../constants-Dro9fuhk.js";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_stream = require("../stream-CNqAlDJF.cjs");
3
- const require_llm = require("../llm-DknPJDW6.cjs");
2
+ const require_stream = require("../stream-DqKDB3nL.cjs");
3
+ const require_llm = require("../llm-RIAYOAtD.cjs");
4
4
  const require_file = require("../file-BEndQUN1.cjs");
5
5
  exports.ChunkFrom = require_llm.ChunkFrom;
6
6
  exports.DefaultGeneratedFile = require_file.DefaultGeneratedFile;
@@ -1,4 +1,4 @@
1
- import { Nn as convertFullStreamChunkToUIMessageStream, a as convertFullStreamChunkToMastra, c as WorkflowRunOutput, d as MastraModelOutput, i as withStreamCaching, n as createCachingTransformStream, o as convertMastraChunkToAISDKv5, r as createReplayStream, s as MastraAgentNetworkStream, t as smoothStream } from "../stream-D2rv1Ut1.js";
2
- import { u as ChunkFrom } from "../llm-ccA_1Q-H.js";
1
+ import { Nn as convertFullStreamChunkToUIMessageStream, a as convertFullStreamChunkToMastra, c as WorkflowRunOutput, d as MastraModelOutput, i as withStreamCaching, n as createCachingTransformStream, o as convertMastraChunkToAISDKv5, r as createReplayStream, s as MastraAgentNetworkStream, t as smoothStream } from "../stream-H_wVxqdK.js";
2
+ import { u as ChunkFrom } from "../llm-YNjDFSui.js";
3
3
  import { n as DefaultGeneratedFileWithType, t as DefaultGeneratedFile } from "../file-DGZrR5f7.js";
4
4
  export { ChunkFrom, DefaultGeneratedFile, DefaultGeneratedFileWithType, MastraAgentNetworkStream, MastraModelOutput, WorkflowRunOutput, convertFullStreamChunkToMastra, convertFullStreamChunkToUIMessageStream, convertMastraChunkToAISDKv5, createCachingTransformStream, createReplayStream, smoothStream, withStreamCaching };
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BrhgMLW6.cjs");
2
- const require_llm = require("./llm-DknPJDW6.cjs");
2
+ const require_llm = require("./llm-RIAYOAtD.cjs");
3
3
  const require_message_list = require("./message-list-C0F2sDNC.cjs");
4
4
  const require_observability = require("./observability-VaoaeadK.cjs");
5
5
  const require_base = require("./base-BIzR1D3_.cjs");
@@ -1,5 +1,5 @@
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-ccA_1Q-H.js";
2
+ import { d as attachModelStreamTransport, f as isDataChunk, i as resolveModelConfig, p as readModelStreamTransport } from "./llm-YNjDFSui.js";
3
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-RgFlLrxG.js";
4
4
  import { _ as resolveObservabilityContext, g as createObservabilityContext } from "./observability-DPDWibyH.js";
5
5
  import { t as MastraBase } from "./base-CKLWBhDo.js";
@@ -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-BnD7SPlA.cjs");
4
+ const require_model = require("../model-lzZPXaEV.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-BwxfS6T_.js";
2
+ import { t as MastraLLMV1 } from "../model-cS3d5rmF.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-Dusqj7-j.cjs");
2
+ const require_tool_loop_agent = require("../tool-loop-agent-D4gSdYuN.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-CFsOjueT.js";
1
+ export { n as getSettings, r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "../tool-loop-agent-DvZcOxWe.js";
@@ -1,7 +1,7 @@
1
1
  const require_dist = require("./dist-P2rjrlmj.cjs");
2
- const require_execution_fence = require("./execution-fence-BBKnrhWR.cjs");
3
- const require_stream = require("./stream-CNqAlDJF.cjs");
4
- const require_llm = require("./llm-DknPJDW6.cjs");
2
+ const require_execution_fence = require("./execution-fence-C8Q0wWkG.cjs");
3
+ const require_stream = require("./stream-DqKDB3nL.cjs");
4
+ const require_llm = require("./llm-RIAYOAtD.cjs");
5
5
  const require_message_list = require("./message-list-C0F2sDNC.cjs");
6
6
  // src/tool-loop-agent/utils.ts
7
7
  function isToolLoopAgentLike(obj) {
@@ -1,7 +1,7 @@
1
1
  import { m as generateId } from "./dist-TPVqg8oV.js";
2
- import { T as Agent } from "./execution-fence--VdnD7p4.js";
3
- import { un as isSupportedLanguageModel } from "./stream-D2rv1Ut1.js";
4
- import { i as resolveModelConfig } from "./llm-ccA_1Q-H.js";
2
+ import { T as Agent } from "./execution-fence-DGFyUV5h.js";
3
+ import { un as isSupportedLanguageModel } from "./stream-H_wVxqdK.js";
4
+ import { i as resolveModelConfig } from "./llm-YNjDFSui.js";
5
5
  import { N as ToolLoopAgent } from "./message-list-RgFlLrxG.js";
6
6
  // src/tool-loop-agent/utils.ts
7
7
  function isToolLoopAgentLike(obj) {
@@ -1,7 +1,7 @@
1
1
  const require_error = require("./error-D90lJ6M7.cjs");
2
2
  const require_tool = require("./tool-Dn9WSDVn.cjs");
3
3
  const require_ee_iTj2bRDt = require("./ee-iTj2bRDt-D3-QLGDF.cjs");
4
- const require_background_tasks = require("./background-tasks-By_1e9Gf.cjs");
4
+ const require_background_tasks = require("./background-tasks-CeARf1DK.cjs");
5
5
  const require_base = require("./base-BIzR1D3_.cjs");
6
6
  const require_observability = require("./observability-VaoaeadK.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-DIFduuTw.js";
3
3
  import { i as MastraFGAPermissions } from "./ee-iTj2bRDt-By_B9ngH.js";
4
- import { a as isToolBackgroundEligible, i as isModelBackgroundOverrideAllowed, n as backgroundOverrideJsonSchema, r as backgroundOverrideZodSchema } from "./background-tasks-HAzB0JtC.js";
4
+ import { a as isToolBackgroundEligible, i as isModelBackgroundOverrideAllowed, n as backgroundOverrideJsonSchema, r as backgroundOverrideZodSchema } from "./background-tasks-B7UygDdO.js";
5
5
  import { t as MastraBase } from "./base-CKLWBhDo.js";
6
6
  import { g as createObservabilityContext, h as wrapMastra, o as executionFailureTermination } from "./observability-DPDWibyH.js";
7
7
  import { a as getOrCreateSpan, t as executeWithContext } from "./utils-DU_pU5SK.js";
package/dist/utils.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_zod_utils = require("./zod-utils-Cl5jw5N_.cjs");
3
- const require_utils = require("./utils-CIuOHPoS.cjs");
3
+ const require_utils = require("./utils-Dd4m7z13.cjs");
4
4
  const require_fetchWithRetry = require("./fetchWithRetry-f5k4p7_1.cjs");
5
5
  const require_utils_safe_stringify = require("./utils/safe-stringify.cjs");
6
6
  const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
package/dist/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as isZodObject, i as isZodArray, r as getZodTypeName, t as getZodDef } from "./zod-utils-BDDS_mxU.js";
2
- 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-DLnCt6E9.js";
2
+ 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-h5k_ChdS.js";
3
3
  import { t as fetchWithRetry } from "./fetchWithRetry-DFSvpYDT.js";
4
4
  import { boundedStringify, ensureSerializable, isBoundedSerializable, safeStringify } from "./utils/safe-stringify.js";
5
5
  import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
@@ -1,5 +1,5 @@
1
1
  import { standardSchemaToJSONSchema, toStandardSchema } from "./schema/index.js";
2
- import { Ct as collectTemplateStepIds, Dt as validateTemplate } from "./stream-D2rv1Ut1.js";
2
+ import { Ct as collectTemplateStepIds, Dt as validateTemplate } from "./stream-H_wVxqdK.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-CNqAlDJF.cjs");
1
+ const require_stream = require("./stream-DqKDB3nL.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,7 +1,7 @@
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_execution_fence = require("../execution-fence-BBKnrhWR.cjs");
4
+ const require_execution_fence = require("../execution-fence-C8Q0wWkG.cjs");
5
5
  const require_message_list = require("../message-list-C0F2sDNC.cjs");
6
6
  const require_dist = require("../dist-P2rjrlmj.cjs");
7
7
  const require_dist$1 = require("../dist-CXeCeeW7.cjs");
@@ -1,6 +1,6 @@
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 { Zt as embed$3, ua as createVectorErrorId } from "../execution-fence--VdnD7p4.js";
3
+ import { Zt as embed$3, ua as createVectorErrorId } from "../execution-fence-DGFyUV5h.js";
4
4
  import { P as embed$2 } from "../message-list-RgFlLrxG.js";
5
5
  import { r as embed$1 } from "../dist-TPVqg8oV.js";
6
6
  import { n as embed } from "../dist-D3cKCUe-.js";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_worker = require("../worker-BPNrwCFs.cjs");
2
+ const require_worker = require("../worker-D-cq8McN.cjs");
3
3
  exports.BackgroundTaskWorker = require_worker.BackgroundTaskWorker;
4
4
  exports.HttpRemoteStrategy = require_worker.HttpRemoteStrategy;
5
5
  exports.InProcessStrategy = require_worker.InProcessStrategy;
@@ -1,7 +1,7 @@
1
1
  export { MastraWorker } from './worker.js';
2
2
  export type { WorkerDeps, WorkerStopOptions } from './worker.js';
3
3
  export { OrchestrationWorker } from './workers/orchestration-worker.js';
4
- export type { OrchestrationWorkerConfig } from './workers/orchestration-worker.js';
4
+ export type { OrchestrationWorkerConfig, ResolvedMastra } from './workers/orchestration-worker.js';
5
5
  export { SchedulerWorker } from './workers/scheduler-worker.js';
6
6
  export { BackgroundTaskWorker } from './workers/background-task-worker.js';
7
7
  export type { BackgroundTaskWorkerConfig } from './workers/background-task-worker.js';
@@ -1 +1 @@
1
- export { n as BackgroundTaskWorker, s as HttpRemoteStrategy, t as InProcessStrategy, l as MastraWorker, a as OrchestrationWorker, o as PullTransport, r as SchedulerWorker, c as StepExecutionError } from "../worker-ngt-F1Iv.js";
1
+ export { n as BackgroundTaskWorker, s as HttpRemoteStrategy, t as InProcessStrategy, l as MastraWorker, a as OrchestrationWorker, o as PullTransport, r as SchedulerWorker, c as StepExecutionError } from "../worker-DWOK2M_5.js";
@@ -1,3 +1,5 @@
1
+ import type { Event } from '../../events/types.js';
2
+ import type { Mastra } from '../../mastra/index.js';
1
3
  import { MastraWorker } from '../worker.js';
2
4
  import type { WorkerDeps, WorkerStopOptions } from '../worker.js';
3
5
  export declare const ORCHESTRATION_GROUP = "mastra-orchestration";
@@ -8,6 +10,17 @@ export interface OrchestrationWorkerConfig {
8
10
  * being handled, for PubSub backends that support it. Defaults to 10000.
9
11
  */
10
12
  leaseRenewIntervalMs?: number;
13
+ /**
14
+ * Picks the Mastra instance that handles an event, for a worker that serves
15
+ * many instances from one stream (e.g. one per tenant). `release` runs once the
16
+ * event is handled. Returning `undefined` drops the event: no instance can run it.
17
+ * A rejection redelivers it. Without this, every event runs on the worker's own Mastra.
18
+ */
19
+ resolveMastra?: (event: Event) => Promise<ResolvedMastra | undefined>;
20
+ }
21
+ export interface ResolvedMastra {
22
+ mastra: Mastra;
23
+ release?: () => void | Promise<void>;
11
24
  }
12
25
  /**
13
26
  * Processes workflow events (step.run, step.end, start, cancel, etc.)
@@ -1,6 +1,6 @@
1
- const require_execution_fence = require("./execution-fence-BBKnrhWR.cjs");
1
+ const require_execution_fence = require("./execution-fence-C8Q0wWkG.cjs");
2
2
  const require_request_context = require("./request-context-D9RXYCy8.cjs");
3
- const require_worker = require("./worker-BPNrwCFs.cjs");
3
+ const require_worker = require("./worker-D-cq8McN.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. */