@mastra/core 1.87.0-alpha.2 → 1.87.0-alpha.4

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 (417) hide show
  1. package/dist/_types/@ai-sdk_openai@4.0.106/dist/index.d.ts +2034 -0
  2. package/dist/_types/@ai-sdk_openai@4.0.106/package.json +1 -0
  3. package/dist/a2a/index.cjs +1 -1
  4. package/dist/a2a/index.js +1 -1
  5. package/dist/agent/durable/index.cjs +1 -1
  6. package/dist/agent/durable/index.js +1 -1
  7. package/dist/agent/durable/run-message-refs.d.ts +3 -2
  8. package/dist/agent/index.cjs +4 -4
  9. package/dist/agent/index.js +4 -4
  10. package/dist/agent/message-list/adapters/AIV5Adapter.d.ts +15 -1
  11. package/dist/agent/message-list/index.cjs +2 -2
  12. package/dist/agent/message-list/index.js +2 -2
  13. package/dist/agent/message-list/state/types.d.ts +5 -1
  14. package/dist/agent/message-list/types.d.ts +1 -1
  15. package/dist/agent/message-list/utils/provider-compat.d.ts +9 -1
  16. package/dist/agent-builder/ee/index.cjs +1 -1
  17. package/dist/agent-builder/ee/index.js +1 -1
  18. package/dist/agent-controller/index.cjs +2 -2
  19. package/dist/agent-controller/index.js +2 -2
  20. package/dist/{agent-controller-v64JbuDa.cjs → agent-controller-CqcyudV6.cjs} +8 -8
  21. package/dist/{agent-controller-Dc58ARqw.js → agent-controller-VBMIPr6h.js} +8 -8
  22. package/dist/background-tasks/index.cjs +1 -1
  23. package/dist/background-tasks/index.js +1 -1
  24. package/dist/{background-tasks-E-Jjxks4.js → background-tasks-1tyymY2H.js} +1 -1
  25. package/dist/{background-tasks-DgiQNKh7.cjs → background-tasks-FOaQ1LsS.cjs} +1 -1
  26. package/dist/browser/index.cjs +2 -2
  27. package/dist/browser/index.js +2 -2
  28. package/dist/{builder-Dh175HnQ.js → builder-CUbE9d87.js} +2 -2
  29. package/dist/{builder-Dfp6Ckjr.cjs → builder-MLhVrFJw.cjs} +2 -2
  30. package/dist/capabilities/302ai.json +203 -203
  31. package/dist/capabilities/abliteratedllm.json +33 -33
  32. package/dist/capabilities/abliteration-ai.json +9 -9
  33. package/dist/capabilities/above.json +18 -18
  34. package/dist/capabilities/adaption.json +16 -16
  35. package/dist/capabilities/adzuki.json +20 -20
  36. package/dist/capabilities/agentrouter.json +11 -11
  37. package/dist/capabilities/agnes.json +3 -3
  38. package/dist/capabilities/ai-router.json +5 -5
  39. package/dist/capabilities/aiand.json +17 -17
  40. package/dist/capabilities/aigrow.json +11 -11
  41. package/dist/capabilities/aimlapi.json +153 -156
  42. package/dist/capabilities/aipg.json +2 -2
  43. package/dist/capabilities/aixy.json +14 -14
  44. package/dist/capabilities/aki-io.json +15 -15
  45. package/dist/capabilities/alibaba-cn.json +98 -98
  46. package/dist/capabilities/alibaba-coding-plan-cn.json +5 -5
  47. package/dist/capabilities/alibaba-coding-plan.json +5 -5
  48. package/dist/capabilities/alibaba-token-plan-cn.json +55 -55
  49. package/dist/capabilities/alibaba-token-plan.json +54 -54
  50. package/dist/capabilities/alibaba.json +67 -67
  51. package/dist/capabilities/ambient.json +19 -12
  52. package/dist/capabilities/amd.json +6 -6
  53. package/dist/capabilities/anthropic.json +47 -47
  54. package/dist/capabilities/anyapi.json +15 -15
  55. package/dist/capabilities/apiko.json +5 -5
  56. package/dist/capabilities/arcee.json +7 -7
  57. package/dist/capabilities/augure.json +6 -6
  58. package/dist/capabilities/auriko.json +19 -19
  59. package/dist/capabilities/bailing.json +5 -5
  60. package/dist/capabilities/baseten.json +25 -25
  61. package/dist/capabilities/bee.json +4 -4
  62. package/dist/capabilities/bothub.json +11 -11
  63. package/dist/capabilities/boundless.json +39 -39
  64. package/dist/capabilities/bumo.json +40 -40
  65. package/dist/capabilities/byteplus.json +29 -29
  66. package/dist/capabilities/cheapaimodel.json +10 -10
  67. package/dist/capabilities/cheapest-token.json +28 -28
  68. package/dist/capabilities/chutes.json +7 -7
  69. package/dist/capabilities/clarifai.json +2 -2
  70. package/dist/capabilities/cline-pass.json +39 -39
  71. package/dist/capabilities/cloudcode.json +10 -10
  72. package/dist/capabilities/cloudflare-workers-ai.json +13 -13
  73. package/dist/capabilities/commandcode.json +143 -143
  74. package/dist/capabilities/concentrate.json +279 -276
  75. package/dist/capabilities/cortecs.json +105 -105
  76. package/dist/capabilities/crossmodel.json +191 -191
  77. package/dist/capabilities/crusoe.json +10 -10
  78. package/dist/capabilities/daoxe.json +9 -9
  79. package/dist/capabilities/databricks.json +124 -124
  80. package/dist/capabilities/deepinfra.json +93 -84
  81. package/dist/capabilities/deepseek.json +3 -3
  82. package/dist/capabilities/digitalocean.json +114 -114
  83. package/dist/capabilities/dothoosh.json +30 -30
  84. package/dist/capabilities/doubleword.json +22 -22
  85. package/dist/capabilities/edenai.json +279 -288
  86. package/dist/capabilities/empiriolabs.json +166 -166
  87. package/dist/capabilities/engy.json +22 -22
  88. package/dist/capabilities/evroc.json +11 -11
  89. package/dist/capabilities/ezkielyna.json +10 -10
  90. package/dist/capabilities/fastrouter.json +85 -85
  91. package/dist/capabilities/fireworks-ai.json +130 -69
  92. package/dist/capabilities/freemodel.json +18 -18
  93. package/dist/capabilities/frogbot.json +93 -93
  94. package/dist/capabilities/gisoo.json +20 -20
  95. package/dist/capabilities/gmicloud.json +17 -17
  96. package/dist/capabilities/google.json +54 -54
  97. package/dist/capabilities/graphn.json +15 -15
  98. package/dist/capabilities/greenpt.json +36 -36
  99. package/dist/capabilities/groq.json +6 -6
  100. package/dist/capabilities/helicone.json +83 -83
  101. package/dist/capabilities/hostinger-router.json +8 -8
  102. package/dist/capabilities/hpc-ai.json +8 -8
  103. package/dist/capabilities/huawei-maas.json +12 -12
  104. package/dist/capabilities/hubris.json +33 -33
  105. package/dist/capabilities/huggingface.json +118 -78
  106. package/dist/capabilities/hyper.json +25 -33
  107. package/dist/capabilities/impossibl.json +162 -162
  108. package/dist/capabilities/inception.json +2 -2
  109. package/dist/capabilities/inceptron.json +4 -4
  110. package/dist/capabilities/inco.json +4 -4
  111. package/dist/capabilities/infer.json +15 -15
  112. package/dist/capabilities/inferall.json +7 -7
  113. package/dist/capabilities/inference-coop.json +15 -15
  114. package/dist/capabilities/inferenceapis.json +14 -14
  115. package/dist/capabilities/inferris.json +4 -4
  116. package/dist/capabilities/infersia.json +13 -13
  117. package/dist/capabilities/inferx.json +2 -2
  118. package/dist/capabilities/infomaniak.json +4 -4
  119. package/dist/capabilities/io-net.json +2 -2
  120. package/dist/capabilities/iteracompute.json +53 -53
  121. package/dist/capabilities/jad-ai.json +3 -3
  122. package/dist/capabilities/jalapeno.json +12 -12
  123. package/dist/capabilities/jiekou.json +61 -61
  124. package/dist/capabilities/jzstoken.json +45 -45
  125. package/dist/capabilities/keln.json +16 -16
  126. package/dist/capabilities/kenari.json +123 -131
  127. package/dist/capabilities/kilo.json +615 -612
  128. package/dist/capabilities/kimi-code-plan-cn.json +5 -5
  129. package/dist/capabilities/kimi-code-plan-global.json +5 -5
  130. package/dist/capabilities/kitani.json +2 -2
  131. package/dist/capabilities/klavo.json +19 -19
  132. package/dist/capabilities/korouter.json +36 -36
  133. package/dist/capabilities/kunavo.json +6 -6
  134. package/dist/capabilities/liquid.json +11 -11
  135. package/dist/capabilities/lithosai.json +2 -2
  136. package/dist/capabilities/llmgateway-providers.json +957 -909
  137. package/dist/capabilities/llmgateway.json +335 -335
  138. package/dist/capabilities/llmtr.json +25 -25
  139. package/dist/capabilities/lowrouter.json +58 -58
  140. package/dist/capabilities/lyceum.json +4 -4
  141. package/dist/capabilities/melious.json +10 -10
  142. package/dist/capabilities/merge-gateway.json +289 -289
  143. package/dist/capabilities/meta.json +7 -7
  144. package/dist/capabilities/minimax-cn-coding-plan.json +5 -5
  145. package/dist/capabilities/minimax-cn.json +5 -5
  146. package/dist/capabilities/minimax-coding-plan.json +5 -5
  147. package/dist/capabilities/minimax.json +5 -5
  148. package/dist/capabilities/mistral.json +19 -19
  149. package/dist/capabilities/mixlayer.json +5 -5
  150. package/dist/capabilities/modal.json +11 -11
  151. package/dist/capabilities/model-oracle-ai.json +23 -23
  152. package/dist/capabilities/modelis.json +18 -18
  153. package/dist/capabilities/modular.json +7 -7
  154. package/dist/capabilities/moneo.json +12 -12
  155. package/dist/capabilities/morph.json +15 -15
  156. package/dist/capabilities/munito-eu.json +4 -4
  157. package/dist/capabilities/munito.json +4 -4
  158. package/dist/capabilities/nan.json +23 -23
  159. package/dist/capabilities/nano-gpt.json +592 -576
  160. package/dist/capabilities/nearai.json +97 -97
  161. package/dist/capabilities/nebius.json +24 -24
  162. package/dist/capabilities/neon.json +132 -132
  163. package/dist/capabilities/neuralwatt.json +41 -41
  164. package/dist/capabilities/nokeep.json +4 -4
  165. package/dist/capabilities/novita-ai.json +115 -115
  166. package/dist/capabilities/nvidia.json +31 -31
  167. package/dist/capabilities/obscurify.json +31 -31
  168. package/dist/capabilities/oci.json +6 -6
  169. package/dist/capabilities/ofox.json +356 -356
  170. package/dist/capabilities/ollama-cloud.json +57 -57
  171. package/dist/capabilities/openai.json +57 -57
  172. package/dist/capabilities/opencode-go.json +86 -86
  173. package/dist/capabilities/openreason.json +4 -4
  174. package/dist/capabilities/openrouter.json +537 -526
  175. package/dist/capabilities/opper.json +26 -26
  176. package/dist/capabilities/orcarouter.json +223 -223
  177. package/dist/capabilities/outerlabs.json +25 -25
  178. package/dist/capabilities/ovhcloud.json +21 -21
  179. package/dist/capabilities/pareto.json +5 -5
  180. package/dist/capabilities/perplexity-agent.json +65 -65
  181. package/dist/capabilities/phala.json +30 -30
  182. package/dist/capabilities/pioneer.json +32 -32
  183. package/dist/capabilities/poe.json +129 -129
  184. package/dist/capabilities/powerspring.json +14 -14
  185. package/dist/capabilities/primalabs.json +9 -9
  186. package/dist/capabilities/prime.json +125 -124
  187. package/dist/capabilities/privatemode-ai.json +11 -11
  188. package/dist/capabilities/proxystacks.json +6 -6
  189. package/dist/capabilities/qiniu-ai.json +14 -14
  190. package/dist/capabilities/refuseless.json +5 -5
  191. package/dist/capabilities/regolo-ai.json +10 -10
  192. package/dist/capabilities/requesty.json +169 -192
  193. package/dist/capabilities/ruapi.json +19 -19
  194. package/dist/capabilities/runcrate.json +5 -5
  195. package/dist/capabilities/runinfra.json +9 -9
  196. package/dist/capabilities/sakana.json +7 -7
  197. package/dist/capabilities/sambanova.json +9 -9
  198. package/dist/capabilities/sandbase.json +25 -25
  199. package/dist/capabilities/sarvam.json +9 -9
  200. package/dist/capabilities/scaleway.json +19 -19
  201. package/dist/capabilities/scnet-token-plan.json +10 -10
  202. package/dist/capabilities/scx-ai.json +29 -29
  203. package/dist/capabilities/sensenova.json +15 -15
  204. package/dist/capabilities/siliconflow-cn.json +45 -45
  205. package/dist/capabilities/siliconflow.json +45 -45
  206. package/dist/capabilities/snowflake-cortex.json +18 -18
  207. package/dist/capabilities/sokkan.json +7 -7
  208. package/dist/capabilities/sparrowcodes.json +23 -23
  209. package/dist/capabilities/standardcompute.json +94 -94
  210. package/dist/capabilities/steadyrouter.json +42 -42
  211. package/dist/capabilities/stepfun-ai-step-plan.json +4 -4
  212. package/dist/capabilities/stepfun-ai.json +4 -4
  213. package/dist/capabilities/stepfun-step-plan.json +4 -4
  214. package/dist/capabilities/stepfun.json +4 -4
  215. package/dist/capabilities/stepping-stone.json +18 -18
  216. package/dist/capabilities/synthetic.json +11 -11
  217. package/dist/capabilities/synthorai.json +27 -27
  218. package/dist/capabilities/teamorouter.json +19 -19
  219. package/dist/capabilities/teapot-router.json +10 -10
  220. package/dist/capabilities/tencent-token-plan.json +37 -37
  221. package/dist/capabilities/tencent-tokenhub.json +52 -37
  222. package/dist/capabilities/tensorx.json +38 -38
  223. package/dist/capabilities/tenstorrent.json +4 -4
  224. package/dist/capabilities/the-grid-ai.json +29 -29
  225. package/dist/capabilities/thinkingmachines.json +77 -77
  226. package/dist/capabilities/tinfoil.json +10 -10
  227. package/dist/capabilities/toapis.json +3 -3
  228. package/dist/capabilities/togetherai.json +47 -47
  229. package/dist/capabilities/tokengo.json +20 -20
  230. package/dist/capabilities/tokenify.json +3 -3
  231. package/dist/capabilities/trustedrouter.json +7 -7
  232. package/dist/capabilities/trustedtokens.json +15 -15
  233. package/dist/capabilities/umans-ai-coding-plan.json +11 -11
  234. package/dist/capabilities/umans-ai.json +10 -10
  235. package/dist/capabilities/uncensuredai.json +5 -5
  236. package/dist/capabilities/unrestricted.json +6 -6
  237. package/dist/capabilities/uplinkswitch.json +20 -20
  238. package/dist/capabilities/upstage.json +8 -8
  239. package/dist/capabilities/vancine.json +23 -23
  240. package/dist/capabilities/vercel.json +581 -581
  241. package/dist/capabilities/vivgrid.json +80 -80
  242. package/dist/capabilities/volcengine-coding-plan.json +26 -26
  243. package/dist/capabilities/volcengine.json +24 -24
  244. package/dist/capabilities/vultr.json +34 -34
  245. package/dist/capabilities/wafer.ai.json +16 -16
  246. package/dist/capabilities/wally.json +11 -11
  247. package/dist/capabilities/wandb.json +20 -20
  248. package/dist/capabilities/watt.json +19 -19
  249. package/dist/capabilities/xai.json +6 -6
  250. package/dist/capabilities/xiaomi.json +3 -3
  251. package/dist/capabilities/xpersona.json +11 -11
  252. package/dist/capabilities/xxapi.json +26 -26
  253. package/dist/capabilities/zai-coding-plan.json +18 -18
  254. package/dist/capabilities/zai.json +33 -33
  255. package/dist/capabilities/zenifra.json +33 -33
  256. package/dist/capabilities/zenmux.json +186 -186
  257. package/dist/capabilities/zerogpu.json +11 -11
  258. package/dist/capabilities/zhipuai-coding-plan.json +8 -8
  259. package/dist/capabilities/zhipuai.json +32 -32
  260. package/dist/capabilities/zro.json +6 -6
  261. package/dist/channels/agent-channels.d.ts +22 -0
  262. package/dist/channels/index.cjs +2 -2
  263. package/dist/channels/index.js +2 -2
  264. package/dist/channels/output-processor.d.ts +12 -0
  265. package/dist/channels/state-adapter.d.ts +3 -1
  266. package/dist/channels/stream-helpers.d.ts +17 -0
  267. package/dist/{channels-BZL9RT2i.cjs → channels-CZ0iY2yh.cjs} +1 -1
  268. package/dist/{channels-0AO7PMJF.js → channels-hBppCRhl.js} +1 -1
  269. package/dist/coding-agent/index.cjs +2 -2
  270. package/dist/coding-agent/index.js +2 -2
  271. package/dist/datasets/index.cjs +2 -2
  272. package/dist/datasets/index.js +2 -2
  273. package/dist/docs/SKILL.md +2 -1
  274. package/dist/docs/assets/SOURCE_MAP.json +797 -797
  275. package/dist/docs/references/docs-agents-networks.md +1 -1
  276. package/dist/docs/references/docs-agents-tools.md +6 -0
  277. package/dist/docs/references/docs-auth-simple-auth.md +8 -8
  278. package/dist/docs/references/docs-evals-custom-scorers.md +1 -1
  279. package/dist/docs/references/docs-mastra-platform-observability-overview.md +3 -189
  280. package/dist/docs/references/docs-memory-message-history.md +25 -0
  281. package/dist/docs/references/docs-sandbox-lsp.md +5 -6
  282. package/dist/docs/references/docs-sandbox-overview.md +20 -0
  283. package/dist/docs/references/docs-sandbox-skills.md +2 -0
  284. package/dist/docs/references/docs-signals-sending-signals.md +1 -1
  285. package/dist/docs/references/reference-agent-controller-session.md +1 -1
  286. package/dist/docs/references/reference-agents-generate.md +1 -1
  287. package/dist/docs/references/reference-agents-network.md +1 -1
  288. package/dist/docs/references/reference-configuration.md +8 -8
  289. package/dist/docs/references/reference-core-getWorkspaceById.md +37 -0
  290. package/dist/docs/references/reference-evals-create-scorer.md +5 -5
  291. package/dist/docs/references/reference-evals-run-evals.md +1 -1
  292. package/dist/docs/references/reference-manual-install.md +1 -1
  293. package/dist/docs/references/reference-memory-observational-memory.md +8 -0
  294. package/dist/docs/references/reference-observability-tracing-interfaces.md +10 -6
  295. package/dist/docs/references/reference-processors-processor-interface.md +3 -2
  296. package/dist/docs/references/reference-processors-system-prompt-scrubber.md +1 -1
  297. package/dist/docs/references/reference-pubsub-base.md +5 -3
  298. package/dist/docs/references/reference-pubsub-caching-pubsub.md +3 -1
  299. package/dist/docs/references/reference-storage-overview.md +1 -1
  300. package/dist/docs/references/reference-storage-retention.md +20 -20
  301. package/dist/docs/references/reference-tools-vector-query-tool.md +8 -0
  302. package/dist/docs/references/reference-voice-overview.md +11 -26
  303. package/dist/docs/references/reference-voice-speech-to-speech.md +1 -1
  304. package/dist/docs/references/reference-voice-voice.listen.md +1 -0
  305. package/dist/docs/references/reference-voice-voice.speak.md +1 -3
  306. package/dist/docs/references/reference-workspace-factory-sandbox.md +6 -6
  307. package/dist/docs/references/reference-workspace-sandbox.md +14 -0
  308. package/dist/docs/references/reference.md +1 -0
  309. package/dist/evals/index.cjs +1 -1
  310. package/dist/evals/index.js +1 -1
  311. package/dist/evals/scoreTraces/index.cjs +1 -1
  312. package/dist/evals/scoreTraces/index.js +1 -1
  313. package/dist/harness/index.cjs +2 -2
  314. package/dist/harness/index.js +2 -2
  315. package/dist/index.cjs +1 -1
  316. package/dist/index.js +1 -1
  317. package/dist/knowledge/index.cjs +1 -1
  318. package/dist/knowledge/index.js +1 -1
  319. package/dist/llm/index.cjs +3 -3
  320. package/dist/llm/index.js +3 -3
  321. package/dist/llm/model/base.types.d.ts +3 -1
  322. package/dist/llm/model/mastra-gateway-provider-tools.d.ts +9 -6
  323. package/dist/llm/model/model.d.ts +1 -1
  324. package/dist/llm/model/model.loop.d.ts +1 -1
  325. package/dist/llm/model/model.loop.types.d.ts +3 -1
  326. package/dist/llm/model/provider-options.d.ts +4 -3
  327. package/dist/llm/model/provider-types.generated.d.ts +7581 -7556
  328. package/dist/{llm-B46V7Mi7.js → llm-CsQOELh9.js} +38 -78
  329. package/dist/{llm-B4AeSFvV.cjs → llm-D6N-WJwo.cjs} +38 -78
  330. package/dist/loop/index.cjs +2 -2
  331. package/dist/loop/index.js +2 -2
  332. package/dist/{manager-BwDxA1Nn.cjs → manager-CtsjlKP7.cjs} +2 -2
  333. package/dist/{manager-BRAvwB9b.js → manager-DBVDNjO2.js} +2 -2
  334. package/dist/mastra/index.cjs +1 -1
  335. package/dist/mastra/index.js +1 -1
  336. package/dist/{mastra-DBhdD172.cjs → mastra-B60fJsMe.cjs} +16 -16
  337. package/dist/{mastra-CIx6qEq2.js → mastra-Bkpe1lBu.js} +16 -16
  338. package/dist/memory/index.cjs +3 -3
  339. package/dist/memory/index.js +3 -3
  340. package/dist/{message-list-wI71UGxk.js → message-list-BGm1DCiG.js} +230 -129
  341. package/dist/{message-list-DfN9mWeN.cjs → message-list-vR3uLAHL.cjs} +230 -129
  342. package/dist/{model-CYhAa5qO.cjs → model-CAbL0zRc.cjs} +4 -3
  343. package/dist/{model-CJMsDU8w.js → model-Da_pawSI.js} +4 -3
  344. package/dist/{netlify-C9aJA6Cv.js → netlify-CW26UJrG.js} +41361 -30464
  345. package/dist/{netlify-Bw7Vd58y.cjs → netlify-hasf5dLA.cjs} +41364 -30461
  346. package/dist/notifications/index.cjs +1 -1
  347. package/dist/notifications/index.js +1 -1
  348. package/dist/observability/types/tracing.d.ts +1 -1
  349. package/dist/processor-provider/index.cjs +1 -1
  350. package/dist/processor-provider/index.js +1 -1
  351. package/dist/processors/index.cjs +2 -2
  352. package/dist/processors/index.js +2 -2
  353. package/dist/{provider-registry-Bn_7VvZ8.cjs → provider-registry-CeV5wjlF.cjs} +21019 -20909
  354. package/dist/{provider-registry-DOfYSEju.js → provider-registry-DnVkqIBw.js} +21020 -20910
  355. package/dist/provider-registry.json +21425 -21369
  356. package/dist/{registry-generator-Cw594Ttt.js → registry-generator-DSR56u5H.js} +1 -1
  357. package/dist/{registry-generator-BnK5Npgr.cjs → registry-generator-G4PZCqrS.cjs} +1 -1
  358. package/dist/{rehydrate-BWnd_TEx.cjs → rehydrate-BLJ-q_V6.cjs} +2 -2
  359. package/dist/{rehydrate-Dgqkw7Py.js → rehydrate-zXo3Wo60.js} +2 -2
  360. package/dist/relevance/index.cjs +2 -2
  361. package/dist/relevance/index.js +2 -2
  362. package/dist/{run-registry-DhOKJtlb.js → run-registry-Cl2QbXgN.js} +189 -62
  363. package/dist/{run-registry-lLRc7EE6.cjs → run-registry-oixTpWpa.cjs} +190 -63
  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-C8HKG3qC.js → stream-DUUfwH38.js} +3 -3
  369. package/dist/{stream-BIDts1fZ.cjs → stream-DaZh0apo.cjs} +3 -3
  370. package/dist/test-utils/llm-mock.cjs +1 -1
  371. package/dist/test-utils/llm-mock.js +1 -1
  372. package/dist/{to-prompt-B9eZo2U5.cjs → to-prompt-CG-LyaBY.cjs} +9 -0
  373. package/dist/{to-prompt-BsDtVXrf.js → to-prompt-CMlVGYxC.js} +9 -0
  374. package/dist/tool-loop-agent/index.cjs +1 -1
  375. package/dist/tool-loop-agent/index.js +1 -1
  376. package/dist/{tool-loop-agent-DM5V_0XS.js → tool-loop-agent-C4NvGYnM.js} +4 -4
  377. package/dist/{tool-loop-agent-PEY5a1R6.cjs → tool-loop-agent-DDowWQyO.cjs} +4 -4
  378. package/dist/tools/index.cjs +1 -1
  379. package/dist/tools/index.js +1 -1
  380. package/dist/{tools-CDfyMpzN.js → tools-DDfA_ES4.js} +113 -31
  381. package/dist/{tools-CGF5Ik6j.cjs → tools-n9lqzDNe.cjs} +113 -31
  382. package/dist/{utils-DcnKVK34.js → utils-CVN-336o.js} +1 -1
  383. package/dist/{utils-CxMSu_wc.cjs → utils-CmNJO2xP.cjs} +1 -1
  384. package/dist/utils.cjs +1 -1
  385. package/dist/utils.js +1 -1
  386. package/dist/{validate-Dn750ciE.js → validate-CgNNzqgp.js} +1 -1
  387. package/dist/{validate-RVKgazCf.cjs → validate-LpK3-p_O.cjs} +1 -1
  388. package/dist/vector/index.cjs +2 -2
  389. package/dist/vector/index.js +2 -2
  390. package/dist/worker/index.cjs +1 -1
  391. package/dist/worker/index.js +1 -1
  392. package/dist/{worker-Dx0ZHMGX.cjs → worker-6qR81hZZ.cjs} +2 -2
  393. package/dist/{worker-CFPu9qwV.cjs → worker-BN2odJzu.cjs} +2 -2
  394. package/dist/{worker-DJPAdazC.js → worker-BdPUoHXa.js} +2 -2
  395. package/dist/{worker-SDi9jbP5.js → worker-ChoZX7rg.js} +2 -2
  396. package/dist/{workflow-DkBqNn7X.js → workflow-D2MsV-JA.js} +3 -3
  397. package/dist/{workflow-ZFOz_365.cjs → workflow-ww-N09bR.cjs} +3 -3
  398. package/dist/workflows/builder/index.cjs +1 -1
  399. package/dist/workflows/builder/index.js +1 -1
  400. package/dist/workflows/evented/index.cjs +1 -1
  401. package/dist/workflows/evented/index.js +1 -1
  402. package/dist/workflows/index.cjs +4 -4
  403. package/dist/workflows/index.js +4 -4
  404. package/dist/workflows/step.d.ts +2 -0
  405. package/dist/workflows/workflow.d.ts +2 -0
  406. package/dist/workspace/index.cjs +3 -1
  407. package/dist/workspace/index.d.ts +1 -1
  408. package/dist/workspace/index.js +2 -2
  409. package/dist/workspace/lsp/manager.d.ts +19 -4
  410. package/dist/workspace/sandbox/mastra-sandbox.d.ts +17 -0
  411. package/dist/workspace/tools/index.d.ts +1 -0
  412. package/dist/workspace/tools/media.d.ts +20 -1
  413. package/dist/workspace/tools/recreate-sandbox.d.ts +24 -0
  414. package/dist/{workspace-DY2Nxiyi.js → workspace-BK9ltbSa.js} +270 -105
  415. package/dist/{workspace-X2RHJZU9.cjs → workspace-Pv3J8K0c.cjs} +281 -104
  416. package/package.json +6 -6
  417. package/src/llm/model/provider-types.generated.d.ts +7581 -7556
@@ -4,18 +4,18 @@ const require_base = require("./base-BIzR1D3_.cjs");
4
4
  const require_observability = require("./observability-B0R_D1PZ.cjs");
5
5
  const require_error = require("./error-D90lJ6M7.cjs");
6
6
  const require_error$1 = require("./error-L1V4uUbd.cjs");
7
- const require_stream = require("./stream-BIDts1fZ.cjs");
7
+ const require_stream = require("./stream-DaZh0apo.cjs");
8
8
  const require_request_context = require("./request-context-D9RXYCy8.cjs");
9
9
  const require_output_helpers = require("./output-helpers-DgsH4aTb.cjs");
10
- const require_message_list = require("./message-list-DfN9mWeN.cjs");
10
+ const require_message_list = require("./message-list-vR3uLAHL.cjs");
11
11
  const require_storage = require("./storage-CfG0I2aF.cjs");
12
12
  const require_utils = require("./utils-D-eNsgDM.cjs");
13
13
  const require_error_count = require("./error-count-DeDpeWU2.cjs");
14
- const require_llm = require("./llm-B4AeSFvV.cjs");
14
+ const require_llm = require("./llm-D6N-WJwo.cjs");
15
15
  const require_payload_transform = require("./payload-transform-CWgnsO9w.cjs");
16
16
  const require_utils_safe_stringify = require("./utils/safe-stringify.cjs");
17
17
  const require_signals = require("./signals-CWxAMEmE.cjs");
18
- const require_to_prompt = require("./to-prompt-B9eZo2U5.cjs");
18
+ const require_to_prompt = require("./to-prompt-CG-LyaBY.cjs");
19
19
  const require_dist = require("./dist-P2rjrlmj.cjs");
20
20
  const require_dist$1 = require("./dist-CXeCeeW7.cjs");
21
21
  const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
@@ -23,13 +23,13 @@ const require_tool = require("./tool-CYlT2UA-.cjs");
23
23
  const require_toolchecks = require("./toolchecks-MFU48cit.cjs");
24
24
  const require_fetchWithRetry = require("./fetchWithRetry-f5k4p7_1.cjs");
25
25
  const require_model = require("./model-jBymoqGa.cjs");
26
- const require_provider_registry = require("./provider-registry-Bn_7VvZ8.cjs");
26
+ const require_provider_registry = require("./provider-registry-CeV5wjlF.cjs");
27
27
  const require_inmemory = require("./inmemory-Dc86VWGB.cjs");
28
28
  const require_dynamic_argument = require("./dynamic-argument-CUc1BBOS.cjs");
29
- const require_model$1 = require("./model-CYhAa5qO.cjs");
30
- const require_utils$1 = require("./utils-CxMSu_wc.cjs");
29
+ const require_model$1 = require("./model-CAbL0zRc.cjs");
30
+ const require_utils$1 = require("./utils-CmNJO2xP.cjs");
31
31
  const require_ee_iTj2bRDt = require("./ee-iTj2bRDt-D3-QLGDF.cjs");
32
- const require_background_tasks = require("./background-tasks-DgiQNKh7.cjs");
32
+ const require_background_tasks = require("./background-tasks-FOaQ1LsS.cjs");
33
33
  const require_stream$1 = require("./stream-BGbj9jAU.cjs");
34
34
  const require_predicate_index = require("./predicate/index.cjs");
35
35
  const require_classifier_index = require("./classifier/index.cjs");
@@ -41,8 +41,8 @@ const require_state_processor = require("./state-processor-kRNZ38Nf.cjs");
41
41
  const require_constants = require("./constants-B9ZDvXZ4.cjs");
42
42
  const require_signal_provider = require("./signal-provider-BFAvh_AJ.cjs");
43
43
  const require_slugify = require("./slugify-B_WzG9IY.cjs");
44
- const require_workspace = require("./workspace-X2RHJZU9.cjs");
45
- const require_tools = require("./tools-CGF5Ik6j.cjs");
44
+ const require_workspace = require("./workspace-Pv3J8K0c.cjs");
45
+ const require_tools = require("./tools-n9lqzDNe.cjs");
46
46
  const require_workspace_skills = require("./workspace-skills-BcquhPDn.cjs");
47
47
  const require_filesystem_versioned = require("./filesystem-versioned-BavRtYWJ.cjs");
48
48
  const require_features_index = require("./features/index.cjs");
@@ -65,12 +65,12 @@ let stream_web = require("stream/web");
65
65
  let _ai_sdk_provider_utils_v6 = require("@ai-sdk/provider-utils-v6");
66
66
  let zod = require("zod");
67
67
  let crypto$1 = require("crypto");
68
- let _mastra_schema_compat = require("@mastra/schema-compat");
69
- let fs = require("fs");
70
- let path = require("path");
71
68
  let zod_v4_core = require("zod/v4/core");
72
69
  let zod_v4_locales_en_js = require("zod/v4/locales/en.js");
73
70
  zod_v4_locales_en_js = require_rolldown_runtime.__toESM(zod_v4_locales_en_js, 1);
71
+ let _mastra_schema_compat = require("@mastra/schema-compat");
72
+ let fs = require("fs");
73
+ let path = require("path");
74
74
  let _mastra_schema_compat_json_to_zod = require("@mastra/schema-compat/json-to-zod");
75
75
  let async_hooks = require("async_hooks");
76
76
  let fastq = require("fastq");
@@ -7617,6 +7617,7 @@ function createStepFromProcessor$1(processor) {
7617
7617
  };
7618
7618
  const step = {
7619
7619
  id: `processor:${processor.id}`,
7620
+ processorId: processor.id,
7620
7621
  description: processor.name ?? `Processor ${processor.id}`,
7621
7622
  inputSchema: (0, _mastra_schema_compat_schema.toStandardSchema)(ProcessorStepInputSchema),
7622
7623
  outputSchema: (0, _mastra_schema_compat_schema.toStandardSchema)(ProcessorStepOutputSchema),
@@ -8262,7 +8263,8 @@ function cloneStep$1(step, opts) {
8262
8263
  retries: step.retries,
8263
8264
  scorers: step.scorers,
8264
8265
  component: step.component,
8265
- metadata: step.metadata
8266
+ metadata: step.metadata,
8267
+ processorId: step.processorId
8266
8268
  };
8267
8269
  }
8268
8270
  /**
@@ -12000,6 +12002,7 @@ function snapshotRequestContextEntries(requestContext, onEntryOmitted) {
12000
12002
  if (key === "mastra__versions") continue;
12001
12003
  if (key === "mastra__durableExecutions") continue;
12002
12004
  if (key === "mastra__durableSegments") continue;
12005
+ if (key === "__mastra_chat_channel_render") continue;
12003
12006
  const json = require_utils_safe_stringify.boundedStringify(value);
12004
12007
  if (json === void 0) {
12005
12008
  onEntryOmitted?.();
@@ -21341,7 +21344,8 @@ function cloneStep(step, opts) {
21341
21344
  retries: step.retries,
21342
21345
  scorers: step.scorers,
21343
21346
  metadata: step.metadata,
21344
- component: step.component
21347
+ component: step.component,
21348
+ processorId: step.processorId
21345
21349
  };
21346
21350
  }
21347
21351
  function isToolStep(input) {
@@ -21601,6 +21605,7 @@ function createStepFromProcessor(processor) {
21601
21605
  };
21602
21606
  return {
21603
21607
  id: `processor:${processor.id}`,
21608
+ processorId: processor.id,
21604
21609
  description: processor.name ?? `Processor ${processor.id}`,
21605
21610
  inputSchema: (0, _mastra_schema_compat_schema.toStandardSchema)(ProcessorStepSchema),
21606
21611
  outputSchema: (0, _mastra_schema_compat_schema.toStandardSchema)(ProcessorStepOutputSchema),
@@ -27750,12 +27755,14 @@ async function partitionMessages(messagesDescending, limits, tokenCounter, initi
27750
27755
  if (maxTokens !== void 0 && !tokenCounter) throw new Error("A token counter is required to load token-limited message history");
27751
27756
  let messageCount = 0;
27752
27757
  let tokenCount = initialTokens;
27758
+ let loadedTokens = initialTokens;
27753
27759
  let reachedLimit = false;
27754
27760
  let overflowReason;
27755
27761
  const retainedIds = /* @__PURE__ */ new Set();
27756
27762
  for (const group of groupLinkedToolMessages(messagesDescending)) {
27757
27763
  let groupTokens = 0;
27758
27764
  if (tokenCounter) for (const message of group) groupTokens += await tokenCounter.countMessage(message);
27765
+ loadedTokens += groupTokens;
27759
27766
  const exceedsMessageLimit = limits.maxMessages !== void 0 && messageCount + group.length > limits.maxMessages;
27760
27767
  const exceedsTokenLimit = maxTokens !== void 0 && tokenCount + groupTokens > maxTokens;
27761
27768
  if (reachedLimit || exceedsMessageLimit || exceedsTokenLimit) {
@@ -27770,7 +27777,8 @@ async function partitionMessages(messagesDescending, limits, tokenCounter, initi
27770
27777
  return {
27771
27778
  messages: messagesDescending.filter((message) => retainedIds.has(message.id)).reverse(),
27772
27779
  overflow: messagesDescending.filter((message) => !retainedIds.has(message.id)).reverse(),
27773
- overflowReason
27780
+ overflowReason,
27781
+ loadedTokens
27774
27782
  };
27775
27783
  }
27776
27784
  function laterDate(left, right) {
@@ -27832,15 +27840,15 @@ async function loadMessageHistory(args) {
27832
27840
  const newestOverflow = partitioned.overflow.at(-1);
27833
27841
  if (newestOverflow) cutoffTimestamp = newestOverflow.createdAt.getTime();
27834
27842
  const oldestTimestamp = result.messages.at(-1)?.createdAt.getTime();
27835
- const crossedCutoff = cutoffTimestamp !== void 0 && oldestTimestamp !== void 0 && oldestTimestamp < cutoffTimestamp;
27843
+ const crossedCutoff = cutoffTimestamp !== void 0 && oldestTimestamp !== void 0 && oldestTimestamp < cutoffTimestamp && (!args.includeOverflow || partitioned.overflowReason !== "tokens" || partitioned.loadedTokens > (args.maxTokens ?? 0));
27836
27844
  const reachedBoundary = args.boundary !== void 0 && oldestTimestamp !== void 0 && oldestTimestamp < new Date(args.boundary.createdAt).getTime();
27837
- if (!result.hasMore || crossedCutoff || reachedBoundary || result.messages.length === 0) return args.includeOverflow && partitioned.overflowReason === "tokens" ? partitioned : {
27845
+ if (!result.hasMore || crossedCutoff || reachedBoundary || result.messages.length === 0) return {
27838
27846
  messages: partitioned.messages,
27839
- overflow: []
27847
+ overflow: args.includeOverflow && partitioned.overflowReason === "tokens" ? partitioned.overflow : []
27840
27848
  };
27841
- if (oldestTimestamp === void 0) return args.includeOverflow && partitioned.overflowReason === "tokens" ? partitioned : {
27849
+ if (oldestTimestamp === void 0) return {
27842
27850
  messages: partitioned.messages,
27843
- overflow: []
27851
+ overflow: args.includeOverflow && partitioned.overflowReason === "tokens" ? partitioned.overflow : []
27844
27852
  };
27845
27853
  if (end?.getTime() === oldestTimestamp && added === 0) page++;
27846
27854
  else {
@@ -47890,6 +47898,32 @@ function chunkToFallbackMessage(chunk) {
47890
47898
  if (chunk.type === "plan_update") return chunk.title && chunk.title.length > 0 ? chunk.title : null;
47891
47899
  return null;
47892
47900
  }
47901
+ /** Whitespace plus the meaningful joiners ZWNJ (U+200C) and ZWJ (U+200D). */
47902
+ const EDGE_PADDING = /[\s\u200C\u200D]/;
47903
+ /**
47904
+ * Sanitize a buffered channel reply before posting.
47905
+ *
47906
+ * Zero-width space (U+200B) and the byte-order mark (U+FEFF) are invisible
47907
+ * padding and are removed everywhere. Whitespace and the joiners ZWNJ
47908
+ * (U+200C) / ZWJ (U+200D) are trimmed only at the edges, so internal joiners
47909
+ * in compound emoji (🏄🏼‍♂️, 👨‍👩‍👧) and scripts such as Persian (می‌خواهم)
47910
+ * survive — the bug behind #31205. Invisible-only input collapses to '' so
47911
+ * callers skip posting it entirely.
47912
+ *
47913
+ * The edge trim is a single-pass scan rather than
47914
+ * `.replace(/^[\s\u200C\u200D]+|[\s\u200C\u200D]+$/g, '')`: that anchored
47915
+ * alternation backtracks quadratically over a long interior run of the class
47916
+ * (a 300k-character run of model-controlled output took ~80s), while this
47917
+ * scan is O(n).
47918
+ */
47919
+ function cleanBufferedText(input) {
47920
+ const stripped = input.replace(/[\u200B\uFEFF]/g, "");
47921
+ let start = 0;
47922
+ let end = stripped.length;
47923
+ while (start < end && EDGE_PADDING.test(stripped.charAt(start))) start++;
47924
+ while (end > start && EDGE_PADDING.test(stripped.charAt(end - 1))) end--;
47925
+ return start === 0 && end === stripped.length ? stripped : stripped.slice(start, end);
47926
+ }
47893
47927
  // src/channels/chat-driver-static.ts
47894
47928
  /**
47895
47929
  * Static (non-streaming) driver: consumes `AgentChunkType<any>` chunks and
@@ -47934,7 +47968,7 @@ async function runStaticDriver({ stream, chatThread, adapter, toolDisplay, toolD
47934
47968
  let textBuffer = "";
47935
47969
  const toolMessageIds = /* @__PURE__ */ new Map();
47936
47970
  const flushText = async () => {
47937
- const cleaned = textBuffer.replace(/[\u200B-\u200D\uFEFF]/g, "").trim();
47971
+ const cleaned = cleanBufferedText(textBuffer);
47938
47972
  if (cleaned) try {
47939
47973
  await chatThread.post(textFormat === "plain" ? cleaned : { markdown: cleaned });
47940
47974
  } catch (e) {
@@ -48269,7 +48303,7 @@ async function runStreamingDriver({ stream, chatThread, adapter, toolDisplay, to
48269
48303
  if (closed) break;
48270
48304
  await waitForNext();
48271
48305
  }
48272
- const cleaned = fallback.replace(/[\u200B-\u200D\uFEFF]/g, "").trim();
48306
+ const cleaned = cleanBufferedText(fallback);
48273
48307
  if (cleaned) try {
48274
48308
  await chatThread.post(textFormat === "plain" ? cleaned : { markdown: cleaned });
48275
48309
  } catch (postErr) {
@@ -48752,6 +48786,20 @@ const TEXT_CHUNK_TYPES = /* @__PURE__ */ new Set([
48752
48786
  /** Key the processor reads off `requestContext` to locate its render deps. */
48753
48787
  const CHAT_CHANNEL_RENDER_CONTEXT_KEY = "__mastra_chat_channel_render";
48754
48788
  /**
48789
+ * Whether a `requestContext` entry is a live render context rather than the
48790
+ * method-less husk a JSON snapshot round-trip leaves behind (issue #31310).
48791
+ * `wrapStream` is the first method the session calls, so its presence is the
48792
+ * signal that the object is usable.
48793
+ *
48794
+ * Every reader that treats a stashed render context as a live object (the
48795
+ * output processor, `resolveChannelRenderContext`, `AgentChannels.resolveRunRender`
48796
+ * and the generative-UI processor) guards with this, so a husk on a replica's
48797
+ * restored `requestContext` always falls through to a rebuild from the thread.
48798
+ */
48799
+ function isUsableRenderContext(value) {
48800
+ return typeof value === "object" && value !== null && typeof value.wrapStream === "function";
48801
+ }
48802
+ /**
48755
48803
  * Single-producer / single-consumer async queue. The processor pushes chunks
48756
48804
  * synchronously from `processOutputStream`; the driver consumes them via the
48757
48805
  * async iterable. `close()` ends the iteration after pending items are drained.
@@ -48885,7 +48933,7 @@ var ChatChannelOutputProcessor = class {
48885
48933
  async #resolveRenderContext(state, requestContext) {
48886
48934
  if (state.render !== void 0) return state.render;
48887
48935
  const fromRequest = requestContext?.get(CHAT_CHANNEL_RENDER_CONTEXT_KEY);
48888
- if (fromRequest) {
48936
+ if (isUsableRenderContext(fromRequest)) {
48889
48937
  state.render = fromRequest;
48890
48938
  return fromRequest;
48891
48939
  }
@@ -49058,7 +49106,7 @@ var ChatChannelGenerativeUIProcessor = class {
49058
49106
  }
49059
49107
  async #resolve(requestContext, state) {
49060
49108
  const inbound = requestContext?.get(CHAT_CHANNEL_RENDER_CONTEXT_KEY);
49061
- if (inbound) return inbound;
49109
+ if (isUsableRenderContext(inbound)) return inbound;
49062
49110
  if (state && "render" in state) return state.render ?? void 0;
49063
49111
  const threadId = require_stream.parseMemoryRequestContext(requestContext)?.thread?.id;
49064
49112
  const render = threadId && this.#channels ? await this.#channels.buildRenderContextForThread(threadId) : null;
@@ -49212,6 +49260,8 @@ async function headContentType(url, logger) {
49212
49260
  }
49213
49261
  }
49214
49262
  // src/channels/processor.ts
49263
+ /** Per-run `state` key caching a thread's display mode recovered without a render context. */
49264
+ const RECOVERED_DISPLAY_KEY = "threadTextHidden";
49215
49265
  /**
49216
49266
  * Input processor that injects channel context (platform, bot identity, DM vs.
49217
49267
  * public-channel guidance) into the agent's system prompt on every step.
@@ -49245,19 +49295,37 @@ var ChatChannelProcessor = class {
49245
49295
  }
49246
49296
  async #resolve(requestContext, state) {
49247
49297
  const channel = requestContext?.get("channel");
49248
- if (channel) return {
49249
- channel,
49250
- textHidden: (requestContext?.get(CHAT_CHANNEL_RENDER_CONTEXT_KEY))?.textDisplay === "hidden"
49251
- };
49298
+ if (channel) {
49299
+ const render = requestContext?.get(CHAT_CHANNEL_RENDER_CONTEXT_KEY);
49300
+ return {
49301
+ channel,
49302
+ textHidden: isUsableRenderContext(render) ? render.textDisplay === "hidden" : await this.#recoverTextHidden(requestContext, state)
49303
+ };
49304
+ }
49252
49305
  if (state && "thread" in state) return state.thread ?? void 0;
49306
+ const resolved = await this.#resolveThread(requestContext);
49307
+ if (state) state.thread = resolved;
49308
+ return resolved ?? void 0;
49309
+ }
49310
+ /** The channel-backed context of the run's memory thread, or `null` when it has none. */
49311
+ async #resolveThread(requestContext) {
49253
49312
  const threadId = require_stream.parseMemoryRequestContext(requestContext)?.thread?.id;
49254
49313
  const found = threadId && this.#channels ? await this.#channels.buildChannelContextForThread(threadId) : null;
49255
- const resolved = found ? {
49314
+ return found ? {
49256
49315
  channel: found.channel,
49257
49316
  textHidden: found.render.textDisplay === "hidden"
49258
49317
  } : null;
49259
- if (state) state.thread = resolved;
49260
- return resolved ?? void 0;
49318
+ }
49319
+ /**
49320
+ * Display mode of a channel-backed thread whose render context is no longer on the
49321
+ * restored request context. Cached per run like the thread lookup above, so later
49322
+ * steps of the same run read the thread once.
49323
+ */
49324
+ async #recoverTextHidden(requestContext, state) {
49325
+ if (state && RECOVERED_DISPLAY_KEY in state) return state[RECOVERED_DISPLAY_KEY] === true;
49326
+ const textHidden = (await this.#resolveThread(requestContext))?.textHidden ?? false;
49327
+ if (state) state[RECOVERED_DISPLAY_KEY] = textHidden;
49328
+ return textHidden;
49261
49329
  }
49262
49330
  };
49263
49331
  function channelLines(ctx, textHidden, tools) {
@@ -49780,15 +49848,17 @@ var ChannelReplyModeProcessor = class {
49780
49848
  var MastraStateAdapter = class {
49781
49849
  memoryStore;
49782
49850
  getOwnerId;
49851
+ logger;
49783
49852
  connected = false;
49784
49853
  connectPromise = null;
49785
49854
  cache = /* @__PURE__ */ new Map();
49786
49855
  locks = /* @__PURE__ */ new Map();
49787
49856
  lists = /* @__PURE__ */ new Map();
49788
49857
  queues = /* @__PURE__ */ new Map();
49789
- constructor(memoryStore, getOwnerId) {
49858
+ constructor(memoryStore, getOwnerId, logger) {
49790
49859
  this.memoryStore = memoryStore;
49791
49860
  this.getOwnerId = getOwnerId;
49861
+ this.logger = logger;
49792
49862
  }
49793
49863
  async connect() {
49794
49864
  if (this.connected) return;
@@ -49807,7 +49877,10 @@ var MastraStateAdapter = class {
49807
49877
  }
49808
49878
  async subscribe(threadId) {
49809
49879
  const thread = await this.findThreadByExternalId(threadId);
49810
- if (!thread) return;
49880
+ if (!thread) {
49881
+ this.logger?.warn(`subscribe(${threadId}) ignored: no Mastra thread is mapped to this chat thread. Use AgentChannels.subscribeThread() for threads the bot started itself.`);
49882
+ return;
49883
+ }
49811
49884
  await this.memoryStore.patchThread({
49812
49885
  id: thread.id,
49813
49886
  metadata: {
@@ -50199,7 +50272,7 @@ function formatLegacyHistoryBlock(history, chatThread, platform) {
50199
50272
  async function resolveChannelRenderContext(requestContext, channels) {
50200
50273
  if (!requestContext) return void 0;
50201
50274
  const stashed = requestContext.get(CHAT_CHANNEL_RENDER_CONTEXT_KEY);
50202
- if (stashed) return stashed;
50275
+ if (isUsableRenderContext(stashed)) return stashed;
50203
50276
  const threadId = requestContext.get("controller")?.threadId ?? require_stream.parseMemoryRequestContext(requestContext)?.thread?.id;
50204
50277
  if (!threadId) return void 0;
50205
50278
  return await channels?.()?.buildRenderContextForThread(threadId) ?? void 0;
@@ -50643,7 +50716,7 @@ var AgentChannels = class {
50643
50716
  const storage = mastra.getStorage();
50644
50717
  const memoryStore = storage ? await storage.getStore("memory") : void 0;
50645
50718
  if (!memoryStore) throw new Error("Channels require storage to be configured on the Mastra instance. Configure a storage provider like LibSQLStore.");
50646
- this.stateAdapter = new MastraStateAdapter(memoryStore, () => this.getOwnerId());
50719
+ this.stateAdapter = new MastraStateAdapter(memoryStore, () => this.getOwnerId(), this.logger);
50647
50720
  this.log("info", "Using MastraStateAdapter (subscriptions persist across restarts)");
50648
50721
  }
50649
50722
  const { Chat, Message: ChatMessage, ThreadImpl } = await getChatModule();
@@ -50871,25 +50944,30 @@ var AgentChannels = class {
50871
50944
  runId = stashed.runId;
50872
50945
  toolName = stashed.toolName;
50873
50946
  toolArgs = stashed.args;
50874
- } else {
50947
+ }
50948
+ if (!requesterId) {
50875
50949
  const { result: lookup } = await this.lookupPersistedApproval({
50876
50950
  mastra,
50877
50951
  card,
50878
50952
  platform
50879
50953
  });
50880
- if (lookup.status === "answered") {
50881
- this.log("info", "Tool approval already answered", actionEventContext);
50882
- return;
50954
+ if (!stashed?.runId) {
50955
+ if (lookup.status === "answered") {
50956
+ this.log("info", "Tool approval already answered", actionEventContext);
50957
+ return;
50958
+ }
50959
+ if (lookup.status === "pending") {
50960
+ runId = lookup.runId;
50961
+ toolName = lookup.toolName;
50962
+ toolArgs = lookup.args;
50963
+ }
50883
50964
  }
50884
50965
  if (lookup.status === "pending") {
50885
- runId = lookup.runId;
50886
- toolName = lookup.toolName;
50887
- toolArgs = lookup.args;
50888
- if (adapterConfig?.toolApprovers !== "anyone" && !requesterId && lookup.authors.length > 1) {
50966
+ if (adapterConfig?.toolApprovers !== "anyone" && lookup.authors.length > 1) {
50889
50967
  this.log("info", "Ignoring tool approval action: requester is ambiguous", actionEventContext);
50890
50968
  return;
50891
50969
  }
50892
- requesterId ??= lookup.authors[0];
50970
+ requesterId = lookup.authors[0];
50893
50971
  }
50894
50972
  }
50895
50973
  if (!runId) {
@@ -51194,7 +51272,7 @@ var AgentChannels = class {
51194
51272
  */
51195
51273
  async resolveRunRender(requestContext, state) {
51196
51274
  const inbound = requestContext?.get(CHAT_CHANNEL_RENDER_CONTEXT_KEY);
51197
- if (inbound) return inbound;
51275
+ if (isUsableRenderContext(inbound)) return inbound;
51198
51276
  if (state && "render" in state) return state.render ?? void 0;
51199
51277
  const render = await resolveChannelRenderContext(requestContext, () => this);
51200
51278
  if (state) state.render = render ?? null;
@@ -51223,8 +51301,8 @@ var AgentChannels = class {
51223
51301
  const has = (id) => configuredProcessors.some((p) => !require_stream.isProcessorWorkflow(p) && p.id === id);
51224
51302
  const processors = [];
51225
51303
  if (Object.values(this.adapterConfigs).some((cfg) => cfg.threadLink) && !has(THREAD_LINK_PROCESSOR_ID)) processors.push(new ChannelThreadLinkProcessor((requestContext) => {
51226
- const render = requestContext.get(CHAT_CHANNEL_RENDER_CONTEXT_KEY);
51227
- return render && threadLinkOptions(this.adapterConfigs[render.platform]?.threadLink);
51304
+ const platform = requestContext.get("channel")?.platform ?? requestContext.get("__mastra_chat_channel_render")?.platform;
51305
+ return platform ? threadLinkOptions(this.adapterConfigs[platform]?.threadLink) : void 0;
51228
51306
  }));
51229
51307
  if (!has("chat-channel-render")) processors.push(new ChatChannelOutputProcessor(this));
51230
51308
  if (this.replyModeEnabled && !has(REPLY_STREAM_PROCESSOR_ID)) processors.push(new ChannelReplyStreamProcessor((requestContext) => this.resolveRunRender(requestContext)));
@@ -52406,6 +52484,36 @@ var AgentChannels = class {
52406
52484
  };
52407
52485
  }
52408
52486
  /**
52487
+ * Map a chat thread to a Mastra thread (creating the mapping if needed) and
52488
+ * subscribe to it, so follow-up replies reach the agent without a mention.
52489
+ *
52490
+ * Use this for threads the bot started itself, e.g. a scheduled digest posted
52491
+ * to Slack. Inbound messages create the mapping automatically, but a thread
52492
+ * the bot opened has none until someone mentions it. An existing mapping is
52493
+ * reused and keeps its original owner.
52494
+ *
52495
+ * @example
52496
+ * ```ts
52497
+ * const sent = await channel.post('Daily digest');
52498
+ * await agent.getChannels()!.subscribeThread({ thread: sent.thread, resourceId: 'digest-bot' });
52499
+ * ```
52500
+ */
52501
+ async subscribeThread({ thread, resourceId, threadId }) {
52502
+ const mastra = this.getMastra();
52503
+ if (!mastra) throw new Error("subscribeThread requires the agent to be registered with a Mastra instance.");
52504
+ await this.initialize(mastra);
52505
+ const mastraThread = await this.getOrCreateThread({
52506
+ externalThreadId: thread.id,
52507
+ channelId: thread.channelId,
52508
+ platform: thread.adapter.name,
52509
+ resourceId,
52510
+ threadId: threadId ? () => threadId : void 0,
52511
+ mastra
52512
+ });
52513
+ await this.stateAdapter.subscribe(thread.id);
52514
+ return mastraThread;
52515
+ }
52516
+ /**
52409
52517
  * Resolves an existing Mastra thread for the given external IDs, or creates one.
52410
52518
  */
52411
52519
  async getOrCreateThread({ externalThreadId, channelId, platform, resourceId, threadId, onCreate, mastra }) {
@@ -67193,7 +67301,7 @@ var MastraLLMVNext = class extends require_base.MastraBase {
67193
67301
  content: messages
67194
67302
  }];
67195
67303
  }
67196
- stream({ resumeContext, runId, stopWhen, maxSteps, tools = {}, modelSettings, toolChoice = "auto", threadId, resourceId, structuredOutput, options, inputProcessors, llmRequestInputProcessors, outputProcessors, errorProcessors, hasConfiguredErrorProcessors, returnScorerData, providerOptions, messageList, requireToolApproval, toolCallConcurrency, eagerToolExecution, streamPublisher, _internal, onTracingTripwire, onTracingTerminalError, tracingScope = require_stream.createRunScope(), agentId, agentVersionId, resolvedScopes, agentName, toolCallId, requestContext, actor, mcp, methodType, includeRawChunks, experimentalTransform, hideSignals, autoResumeSuspendedTools, maxProcessorRetries, processorStates, activeTools, isTaskComplete, goal, onIterationComplete, workspace, agentRunSpan, agent, ...rest }) {
67304
+ stream({ resumeContext, runId, stopWhen, maxSteps, tools = {}, modelSettings, toolChoice = "auto", threadId, resourceId, structuredOutput, options, inputProcessors, llmRequestInputProcessors, outputProcessors, errorProcessors, hasConfiguredErrorProcessors, returnScorerData, providerOptions, messageList, requireToolApproval, toolCallConcurrency, eagerToolExecution, streamPublisher, _internal, onTracingTripwire, onTracingTerminalError, tracingScope = require_stream.createRunScope(), agentId, agentVersionId, resolvedScopes, agentName, toolCallId, requestContext, actor, mcp, methodType, includeRawChunks, experimentalTransform, hideSignals, autoResumeSuspendedTools, maxProcessorRetries, processorStates, activeTools, isTaskComplete, goal, onIterationComplete, workspace, agentRunSpan, agent, resultType, ...rest }) {
67197
67305
  const observabilityContext = require_observability.resolveObservabilityContext(rest);
67198
67306
  let stopWhenToUse;
67199
67307
  if (maxSteps && typeof maxSteps === "number") {
@@ -67219,7 +67327,8 @@ var MastraLLMVNext = class extends require_base.MastraBase {
67219
67327
  provider: firstModel.provider,
67220
67328
  streaming: true,
67221
67329
  parameters: modelSettings,
67222
- ...toolDefinitions ? { tools: toolDefinitions } : {}
67330
+ ...toolDefinitions ? { tools: toolDefinitions } : {},
67331
+ ...resultType ? { resultType } : {}
67223
67332
  },
67224
67333
  metadata: {
67225
67334
  runId,
@@ -73571,8 +73680,9 @@ function releaseRunMessageRefs(runId) {
73571
73680
  /**
73572
73681
  * A `SaveQueueManager` `onSaved` callback that records the rows a run saved,
73573
73682
  * so its persisted transcript references them instead of repeating them. Only
73574
- * runs that store refs hold an entry (the transcript store creates it), so saves
73575
- * for other runs, or landing after the run released its entry, are not kept.
73683
+ * runs that store refs hold an entry (created before the run saves its input,
73684
+ * else by the transcript store), so saves for other runs, or landing after the
73685
+ * run released its entry, are not kept.
73576
73686
  */
73577
73687
  function recordRunSavedMessages(runId) {
73578
73688
  return (rows) => {
@@ -76391,6 +76501,15 @@ function buildMessagesFromChunks({ chunks, messageId, responseModelMetadata, too
76391
76501
  });
76392
76502
  break;
76393
76503
  }
76504
+ case "custom": {
76505
+ const p = chunk.payload;
76506
+ parts.push({
76507
+ type: "custom",
76508
+ kind: p.kind,
76509
+ ...p.providerMetadata ? { providerMetadata: p.providerMetadata } : {}
76510
+ });
76511
+ break;
76512
+ }
76394
76513
  case "tool-call": {
76395
76514
  const p = chunk.payload;
76396
76515
  const toolDef = tools?.[p.toolName] || findProviderToolByName(tools, p.toolName);
@@ -83725,15 +83844,21 @@ async function persistDurableRunInput(runId, workflowInput, mastra, beforeSave)
83725
83844
  await beforeSave();
83726
83845
  }
83727
83846
  const inputCopy = entry.messageList.clone();
83728
- await entry.saveQueueManager.flushMessages(inputCopy, state.threadId, state.memoryConfig, {
83729
- throwOnError: true,
83730
- beforePersist: () => assertExecutionOwned({
83731
- runId,
83732
- agentId: workflowInput.agentId,
83733
- mastra,
83734
- requestContext
83735
- })
83736
- });
83847
+ if (state.fixedMemory) getRunMessageRefs(runId);
83848
+ try {
83849
+ await entry.saveQueueManager.flushMessages(inputCopy, state.threadId, state.memoryConfig, {
83850
+ throwOnError: true,
83851
+ beforePersist: () => assertExecutionOwned({
83852
+ runId,
83853
+ agentId: workflowInput.agentId,
83854
+ mastra,
83855
+ requestContext
83856
+ })
83857
+ });
83858
+ } catch (error) {
83859
+ if (state.fixedMemory) releaseRunMessageRefs(runId);
83860
+ throw error;
83861
+ }
83737
83862
  const embedded = entry.messageList.getEmbeddedMessages();
83738
83863
  for (const [messageId, textHash] of inputCopy.getEmbeddedMessages()) embedded.set(messageId, textHash);
83739
83864
  }
@@ -84060,7 +84185,7 @@ async function prepareForDurableExecution(options) {
84060
84185
  });
84061
84186
  let tripwireData;
84062
84187
  if (inputProcessors.length > 0) try {
84063
- const { ProcessorRunner } = await Promise.resolve().then(() => require("./stream-BIDts1fZ.cjs")).then((n) => n.runner_exports);
84188
+ const { ProcessorRunner } = await Promise.resolve().then(() => require("./stream-DaZh0apo.cjs")).then((n) => n.runner_exports);
84064
84189
  await new ProcessorRunner({
84065
84190
  inputProcessors,
84066
84191
  outputProcessors,
@@ -88525,11 +88650,13 @@ var Agent = class Agent extends require_base.MastraBase {
88525
88650
  ...observabilityContext,
88526
88651
  messageList,
88527
88652
  agentId: this.id,
88528
- agentName: this.name
88653
+ agentName: this.name,
88654
+ resultType: "title_generation"
88529
88655
  }).text;
88530
88656
  } else text = (await llm.__text({
88531
88657
  requestContext,
88532
88658
  ...observabilityContext,
88659
+ resultType: "title_generation",
88533
88660
  messages: [{
88534
88661
  role: "system",
88535
88662
  content: systemInstructions
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_run_registry = require("../run-registry-lLRc7EE6.cjs");
2
+ const require_run_registry = require("../run-registry-oixTpWpa.cjs");
3
3
  const require_observability = require("../observability-B0R_D1PZ.cjs");
4
- const require_stream = require("../stream-BIDts1fZ.cjs");
4
+ const require_stream = require("../stream-DaZh0apo.cjs");
5
5
  const require_storage = require("../storage-CfG0I2aF.cjs");
6
6
  const require_constants = require("../constants-B9ZDvXZ4.cjs");
7
7
  const require_filesystem_versioned = require("../filesystem-versioned-BavRtYWJ.cjs");
@@ -1,6 +1,6 @@
1
- import { $a as createSpanQueryPreview, $i as DatasetItemIdentityConflictError, $l as RUN_FENCING_NOT_SUPPORTED_ERROR_ID, Aa as transformRow, Ai as MAX_KNOWLEDGE_PAGE_BODY_LINKS, Ar as WorkflowsInMemory, Ba as THREAD_QUERY_MAX_LIMIT, Bi as knowledgeLinkRefKey, Br as ScoresInMemory, Ca as getSqlType, Ci as parseKnowledgeWikilinks, Co as serializeSpanAttributes, Cr as StoreOperations, Da as safelyParseJSON, Di as KnowledgePageKeyConflictError, Do as FactoryStorage, Dr as FilesystemDB, Ea as parseDuration, Ei as KnowledgePageHasChildrenError, Eo as ObservabilityStorage, Er as FilesystemStore, Fa as tracePageIdSchema, Fi as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Fr as mergeWorkflowStepResult, Ga as threadQueryResponseSchema, Gi as parseKnowledgePageRef, Gr as InMemoryNotificationsStorage, Ha as planThreadRowsQuery, Hi as knowledgePinDepth, Hr as InMemorySchedulesStorage, Ia as tracePageNodeSchema, Ii as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Ir as InMemoryWorkflowDefinitionsStorage, Ja as SPAN_QUERY_MAX_CURSOR_BYTES, Ji as HarnessStorage, Ka as threadQueryRowSchema, Ki as KnowledgeInvalidCursorError, Kr as NotificationsStorage, La as tracePageRequestSchema, Li as assertKnowledgeNoteTextWithinBound, Lr as WorkflowDefinitionsStorage, Ma as validateStorageMetadataFilter, Mi as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, Mr as WorkflowsStorage, Na as TracePageError, Ni as MAX_KNOWLEDGE_PAGE_LINKS, Nr as createEmptyWorkflowSnapshot, Oa as serializeDate, Oi as MAX_KNOWLEDGE_MOVE_PAGES, Oo as FactoryStorageDomain, Or as InMemoryStore, Pa as readTracePage, Pi as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, Pr as mergeStepResult, Qa as buildSpanQueryResponse, Qi as DatasetsStorage, Ql as RUN_FENCE_CONFLICT_ERROR_ID, Ra as tracePageResponseSchema, Ri as assertKnowledgePageDescriptionWithinBound, Rr as InMemoryToolProviderConnectionsStorage, Sa as getDefaultValue, Si as inspectKnowledgeSchema, So as getStringOrNull, Sr as StoreOperationsInMemory, Ta as jsonValueEquals, Ti as KnowledgePageDepthError, To as ObservabilityInMemory, Tr as createGitHubSourceControlProviderFromEnv, Ua as threadQueryIdentitySchema, Ui as knowledgePositionBetween, Ur as SchedulesStorage, Va as encodeThreadQueryCursor, Vi as knowledgePagePath, Vr as ScoresStorage, Wa as threadQueryRequestSchema, Wi as knowledgeScopeReadable, Wr as normalizeScheduleTarget, Xa as SPAN_QUERY_MAX_PREVIEW_CHARACTERS, Xi as ExperimentsStorage, Xl as assertWorkflowStepGuard, Ya as SPAN_QUERY_MAX_LIMIT, Yi as ExperimentsInMemory, Yl as WorkflowStepConflictError, Za as SPAN_QUERY_ORDER_FIELDS, Zi as DatasetsInMemory, Zl as isWorkflowStepConflictError, _a as createStorageErrorId, _i as KnowledgeStorage, _o as buildLogRecord, _r as knowledgeScopeKey, ao as spanQueryIdentityKey, au as resolveRunFence, ba as ensureDate, bi as assertKnowledgeSchemaCompatible, bo as buildUpdateSpanRecord, br as knowledgeVisibleScopeKeys, ca as ChannelsStorage, ci as InMemoryKnowledgeStorage, co as spanQueryResponseSchema, cr as MAX_KNOWLEDGE_SCOPE_TAGS, cu as setRunFenceContext, da as BackgroundTasksInMemory, di as KnowledgeImportersStorage, do as encodeTraceQueryDeltaCursor, dr as assertKnowledgeRecordTextWithinBound, eo as encodeSpanQueryCursor, eu as RunFenceConflictError, fa as BackgroundTasksStorage, fi as KNOWLEDGE_STORAGE_CONTRACT_VERSION, fo as getTraceQueryDeltaWatermark, fr as assertKnowledgeScopeWithinCeiling, ga as runRetentionBatches, gi as KnowledgeSchemaResetRequiredError, go as buildFeedbackRecord, gr as isKnowledgeScopeVisible, ha as retentionCutoffMs, hi as KnowledgeNotFoundError, ho as buildCreateSpanRecord, hr as expandKnowledgeScope, io as spanQueryCostSchema, iu as matchesRunFence, ja as transformScoreRow, ji as MAX_KNOWLEDGE_PAGE_DEPTH, jr as cloneRunData, ka as storageMessageMatchesMetadataFilter, ki as MAX_KNOWLEDGE_NOTE_TOKENS, ko as UniqueViolationError, kr as MockStore, la as InMemoryBlobStore, li as KnowledgeImporterBindingConflictError, lo as spanQueryRowSchema, lr as assertKnowledgeCeilingRaised, ma as resolveRetentionTargets, mi as KnowledgeConflictError, mo as planTraceQuery, mr as createKnowledgeNodeCursor, no as planSpanQuery, nu as currentRunGeneration, oi as InMemoryMemory, oo as spanQueryIdentitySchema, or as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, ou as runFencingNotSupportedError, pa as executeRetentionPrune, pi as KNOWLEDGE_STORAGE_SCHEMA_VERSION, po as planThreadQuery, pr as canonicalizeKnowledgeScope, qa as SPAN_QUERY_MAX_COST_METRICS, qi as InMemoryHarness, qr as dispatchDueNotifications, ro as resolveSpanQueryCost, ru as isRunFenceConflictError, sa as InMemoryChannelsStorage, si as MemoryStorage, so as spanQueryRequestSchema, sr as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, su as runOutsideRunFenceScope, to as parseSpanQueryRequest, tu as coverNestedRun, ua as BlobStore, ui as KnowledgeImporterRunStateError, uo as encodeTraceQueryCursor, ur as assertKnowledgeDescriptionWithinBound, va as createStoreErrorId, vi as KnowledgeTransactionDeadlineError, vo as buildMetricRecord, vr as knowledgeSemanticDocumentId, wa as hasErrorCode, wi as KnowledgeMoveTooLargeError, wo as toEntityType, wr as GitHubSourceControlProvider, xa as filterByDateRange, xi as createKnowledgeUlid, xo as getObjectOrNull, xr as parseKnowledgeNodeCursor, ya as createVectorErrorId, yi as KnowledgeUnsupportedCapabilityError, yo as buildScoreRecord, yr as knowledgeSemanticIdempotencyKey, za as THREAD_QUERY_DEFAULT_LIMIT, zi as canonicalKnowledgeName, zr as ToolProviderConnectionsStorage } from "../run-registry-DhOKJtlb.js";
1
+ import { $a as createSpanQueryPreview, $i as DatasetItemIdentityConflictError, $l as RUN_FENCING_NOT_SUPPORTED_ERROR_ID, Aa as transformRow, Ai as MAX_KNOWLEDGE_PAGE_BODY_LINKS, Ar as WorkflowsInMemory, Ba as THREAD_QUERY_MAX_LIMIT, Bi as knowledgeLinkRefKey, Br as ScoresInMemory, Ca as getSqlType, Ci as parseKnowledgeWikilinks, Co as serializeSpanAttributes, Cr as StoreOperations, Da as safelyParseJSON, Di as KnowledgePageKeyConflictError, Do as FactoryStorage, Dr as FilesystemDB, Ea as parseDuration, Ei as KnowledgePageHasChildrenError, Eo as ObservabilityStorage, Er as FilesystemStore, Fa as tracePageIdSchema, Fi as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Fr as mergeWorkflowStepResult, Ga as threadQueryResponseSchema, Gi as parseKnowledgePageRef, Gr as InMemoryNotificationsStorage, Ha as planThreadRowsQuery, Hi as knowledgePinDepth, Hr as InMemorySchedulesStorage, Ia as tracePageNodeSchema, Ii as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Ir as InMemoryWorkflowDefinitionsStorage, Ja as SPAN_QUERY_MAX_CURSOR_BYTES, Ji as HarnessStorage, Ka as threadQueryRowSchema, Ki as KnowledgeInvalidCursorError, Kr as NotificationsStorage, La as tracePageRequestSchema, Li as assertKnowledgeNoteTextWithinBound, Lr as WorkflowDefinitionsStorage, Ma as validateStorageMetadataFilter, Mi as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, Mr as WorkflowsStorage, Na as TracePageError, Ni as MAX_KNOWLEDGE_PAGE_LINKS, Nr as createEmptyWorkflowSnapshot, Oa as serializeDate, Oi as MAX_KNOWLEDGE_MOVE_PAGES, Oo as FactoryStorageDomain, Or as InMemoryStore, Pa as readTracePage, Pi as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, Pr as mergeStepResult, Qa as buildSpanQueryResponse, Qi as DatasetsStorage, Ql as RUN_FENCE_CONFLICT_ERROR_ID, Ra as tracePageResponseSchema, Ri as assertKnowledgePageDescriptionWithinBound, Rr as InMemoryToolProviderConnectionsStorage, Sa as getDefaultValue, Si as inspectKnowledgeSchema, So as getStringOrNull, Sr as StoreOperationsInMemory, Ta as jsonValueEquals, Ti as KnowledgePageDepthError, To as ObservabilityInMemory, Tr as createGitHubSourceControlProviderFromEnv, Ua as threadQueryIdentitySchema, Ui as knowledgePositionBetween, Ur as SchedulesStorage, Va as encodeThreadQueryCursor, Vi as knowledgePagePath, Vr as ScoresStorage, Wa as threadQueryRequestSchema, Wi as knowledgeScopeReadable, Wr as normalizeScheduleTarget, Xa as SPAN_QUERY_MAX_PREVIEW_CHARACTERS, Xi as ExperimentsStorage, Xl as assertWorkflowStepGuard, Ya as SPAN_QUERY_MAX_LIMIT, Yi as ExperimentsInMemory, Yl as WorkflowStepConflictError, Za as SPAN_QUERY_ORDER_FIELDS, Zi as DatasetsInMemory, Zl as isWorkflowStepConflictError, _a as createStorageErrorId, _i as KnowledgeStorage, _o as buildLogRecord, _r as knowledgeScopeKey, ao as spanQueryIdentityKey, au as resolveRunFence, ba as ensureDate, bi as assertKnowledgeSchemaCompatible, bo as buildUpdateSpanRecord, br as knowledgeVisibleScopeKeys, ca as ChannelsStorage, ci as InMemoryKnowledgeStorage, co as spanQueryResponseSchema, cr as MAX_KNOWLEDGE_SCOPE_TAGS, cu as setRunFenceContext, da as BackgroundTasksInMemory, di as KnowledgeImportersStorage, do as encodeTraceQueryDeltaCursor, dr as assertKnowledgeRecordTextWithinBound, eo as encodeSpanQueryCursor, eu as RunFenceConflictError, fa as BackgroundTasksStorage, fi as KNOWLEDGE_STORAGE_CONTRACT_VERSION, fo as getTraceQueryDeltaWatermark, fr as assertKnowledgeScopeWithinCeiling, ga as runRetentionBatches, gi as KnowledgeSchemaResetRequiredError, go as buildFeedbackRecord, gr as isKnowledgeScopeVisible, ha as retentionCutoffMs, hi as KnowledgeNotFoundError, ho as buildCreateSpanRecord, hr as expandKnowledgeScope, io as spanQueryCostSchema, iu as matchesRunFence, ja as transformScoreRow, ji as MAX_KNOWLEDGE_PAGE_DEPTH, jr as cloneRunData, ka as storageMessageMatchesMetadataFilter, ki as MAX_KNOWLEDGE_NOTE_TOKENS, ko as UniqueViolationError, kr as MockStore, la as InMemoryBlobStore, li as KnowledgeImporterBindingConflictError, lo as spanQueryRowSchema, lr as assertKnowledgeCeilingRaised, ma as resolveRetentionTargets, mi as KnowledgeConflictError, mo as planTraceQuery, mr as createKnowledgeNodeCursor, no as planSpanQuery, nu as currentRunGeneration, oi as InMemoryMemory, oo as spanQueryIdentitySchema, or as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, ou as runFencingNotSupportedError, pa as executeRetentionPrune, pi as KNOWLEDGE_STORAGE_SCHEMA_VERSION, po as planThreadQuery, pr as canonicalizeKnowledgeScope, qa as SPAN_QUERY_MAX_COST_METRICS, qi as InMemoryHarness, qr as dispatchDueNotifications, ro as resolveSpanQueryCost, ru as isRunFenceConflictError, sa as InMemoryChannelsStorage, si as MemoryStorage, so as spanQueryRequestSchema, sr as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, su as runOutsideRunFenceScope, to as parseSpanQueryRequest, tu as coverNestedRun, ua as BlobStore, ui as KnowledgeImporterRunStateError, uo as encodeTraceQueryCursor, ur as assertKnowledgeDescriptionWithinBound, va as createStoreErrorId, vi as KnowledgeTransactionDeadlineError, vo as buildMetricRecord, vr as knowledgeSemanticDocumentId, wa as hasErrorCode, wi as KnowledgeMoveTooLargeError, wo as toEntityType, wr as GitHubSourceControlProvider, xa as filterByDateRange, xi as createKnowledgeUlid, xo as getObjectOrNull, xr as parseKnowledgeNodeCursor, ya as createVectorErrorId, yi as KnowledgeUnsupportedCapabilityError, yo as buildScoreRecord, yr as knowledgeSemanticIdempotencyKey, za as THREAD_QUERY_DEFAULT_LIMIT, zi as canonicalKnowledgeName, zr as ToolProviderConnectionsStorage } from "../run-registry-Cl2QbXgN.js";
2
2
  import { a as PREVIEW_MAX_LENGTH } from "../observability-D7RNOAPx.js";
3
- import { At as STATE_CHECKPOINT_PATCHES, Bt as summarizeStepResult, Ft as materializeState, Ht as applyStatePatch, It as materializeWorkflowRun, Lt as pickStateKeys, Mt as applyStateColumnsWrite, Nt as isStateCheckpointDue, Pt as latestStepResults, Rt as stateBaseOf, Ut as diffState, Vt as unusedStateEntries, jt as STEP_RESULT_SUMMARY_FIELDS, kt as getSnapshotMemoryInfo, zt as stateColumnsWrite } from "../stream-C8HKG3qC.js";
3
+ import { At as STATE_CHECKPOINT_PATCHES, Bt as summarizeStepResult, Ft as materializeState, Ht as applyStatePatch, It as materializeWorkflowRun, Lt as pickStateKeys, Mt as applyStateColumnsWrite, Nt as isStateCheckpointDue, Pt as latestStepResults, Rt as stateBaseOf, Ut as diffState, Vt as unusedStateEntries, jt as STEP_RESULT_SUMMARY_FIELDS, kt as getSnapshotMemoryInfo, zt as stateColumnsWrite } from "../stream-DUUfwH38.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-BmdTvEYN.js";
6
6
  import { _ as ThreadStateStorage, a as GitHistory, c as DOMAIN_KEYS, d as MastraStorage, f as calculatePagination, g as InMemoryThreadStateStorage, h as resolveListOrderBy, i as getSourceControlEntityFilePath, l as EDITOR_DOMAINS, m as normalizePerPage, n as SOURCE_CONTROL_AGENTS_DIR, o as VersionedStorageDomain, p as compareByField, r as getSourceAgentFilePath, s as StorageDomain, t as FilesystemVersionedHelpers, u as MastraCompositeStore } from "../filesystem-versioned-BL1ojJLo.js";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_stream = require("../stream-BIDts1fZ.cjs");
3
- const require_llm = require("../llm-B4AeSFvV.cjs");
2
+ const require_stream = require("../stream-DaZh0apo.cjs");
3
+ const require_llm = require("../llm-D6N-WJwo.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 { En 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-C8HKG3qC.js";
2
- import { u as ChunkFrom } from "../llm-B46V7Mi7.js";
1
+ import { En 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-DUUfwH38.js";
2
+ import { u as ChunkFrom } from "../llm-CsQOELh9.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,13 +1,13 @@
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-B46V7Mi7.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-wI71UGxk.js";
2
+ import { d as attachModelStreamTransport, f as isDataChunk, i as resolveModelConfig, p as readModelStreamTransport } from "./llm-CsQOELh9.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-BGm1DCiG.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";
7
7
  import { s as getRootExportSpan, t as executeWithContext } from "./utils-DU_pU5SK.js";
8
8
  import { l as mastraDBMessageToSignal, n as createSignal } from "./signals-CqR_iWkg.js";
9
9
  import { c as parsePartialJson, d as JSONParseError, f as TypeValidationError, o as isDeepEqualData, t as NoObjectGeneratedError, u as APICallError } from "./dist-TPVqg8oV.js";
10
- import { a as sanitizeToolName } from "./to-prompt-BsDtVXrf.js";
10
+ import { a as sanitizeToolName } from "./to-prompt-CMlVGYxC.js";
11
11
  import { t as EntityType } from "./storage-Cc50aQAp.js";
12
12
  import { i as isAgentWorkflowTool } from "./toolchecks-DrsZdc3S.js";
13
13
  import { s as isValidationError } from "./tool-Z3bykc1m.js";