@mastra/core 1.86.0-alpha.9 → 1.87.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 (726) hide show
  1. package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/aisdk/speech.d.ts +1 -1
  2. package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/aisdk/transcription.d.ts +1 -1
  3. package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/composite-voice.d.ts +1 -1
  4. package/dist/agent/agent-legacy.d.ts +1 -1
  5. package/dist/agent/agent.d.ts +3 -3
  6. package/dist/agent/agent.types.d.ts +1 -1
  7. package/dist/agent/durable/constants.d.ts +2 -0
  8. package/dist/agent/durable/durable-agent.d.ts +3 -3
  9. package/dist/agent/durable/evented-execution.d.ts +7 -0
  10. package/dist/agent/durable/execution-engine.d.ts +1 -0
  11. package/dist/agent/durable/execution-fence.d.ts +2 -0
  12. package/dist/agent/durable/index.cjs +3 -1
  13. package/dist/agent/durable/index.d.ts +1 -1
  14. package/dist/agent/durable/index.js +2 -2
  15. package/dist/agent/durable/run-registry.d.ts +2 -0
  16. package/dist/agent/durable/segment-spans.d.ts +54 -1
  17. package/dist/agent/durable/stream-adapter.d.ts +1 -1
  18. package/dist/agent/durable/types.d.ts +12 -2
  19. package/dist/agent/durable/workflows/durable-loop-builder.d.ts +57 -2
  20. package/dist/agent/durable/workflows/finalize-run.d.ts +2 -0
  21. package/dist/agent/durable/workflows/shared/index.d.ts +1 -1
  22. package/dist/agent/durable/workflows/shared/reported-cost.d.ts +7 -0
  23. package/dist/agent/durable/workflows/shared/schemas.d.ts +16 -1
  24. package/dist/agent/durable/workflows/shared/tool-call-concurrency.d.ts +6 -0
  25. package/dist/agent/durable/workflows/steps/llm-execution.d.ts +5 -0
  26. package/dist/agent/durable/workflows/steps/llm-mapping.d.ts +6 -0
  27. package/dist/agent/durable/workflows/steps/tool-call.d.ts +20 -0
  28. package/dist/agent/index.cjs +2 -2
  29. package/dist/agent/index.js +2 -2
  30. package/dist/agent/message-list/adapters/AIV4Adapter.d.ts +1 -1
  31. package/dist/agent/message-list/adapters/types.d.ts +1 -1
  32. package/dist/agent/message-list/cache/CacheKeyGenerator.d.ts +1 -1
  33. package/dist/agent/message-list/conversion/output-converter.d.ts +1 -1
  34. package/dist/agent/message-list/conversion/to-prompt.d.ts +1 -1
  35. package/dist/agent/message-list/conversion/utils.d.ts +1 -1
  36. package/dist/agent/message-list/detection/TypeDetector.d.ts +1 -1
  37. package/dist/agent/message-list/message-list.d.ts +2 -2
  38. package/dist/agent/message-list/prompt/attachments-to-parts.d.ts +1 -1
  39. package/dist/agent/message-list/prompt/convert-file.d.ts +1 -1
  40. package/dist/agent/message-list/prompt/data-content.d.ts +1 -1
  41. package/dist/agent/message-list/state/MessageStateManager.d.ts +1 -1
  42. package/dist/agent/message-list/state/types.d.ts +2 -2
  43. package/dist/agent/message-list/types.d.ts +9 -9
  44. package/dist/agent/message-list/utils/convert-messages.d.ts +3 -3
  45. package/dist/agent/message-list/utils/provider-compat.d.ts +1 -1
  46. package/dist/agent/request-context-snapshot.d.ts +3 -2
  47. package/dist/agent/signals.d.ts +1 -1
  48. package/dist/agent/streams/run-records.d.ts +9 -1
  49. package/dist/agent/types.d.ts +3 -3
  50. package/dist/agent/workflows/prepare-stream/run-scope-keys.d.ts +1 -1
  51. package/dist/agent-builder/ee/index.cjs +1 -1
  52. package/dist/agent-builder/ee/index.js +1 -1
  53. package/dist/agent-controller/index.cjs +1 -1
  54. package/dist/agent-controller/index.js +1 -1
  55. package/dist/agent-controller/session-run-engine.d.ts +5 -2
  56. package/dist/agent-controller/session.d.ts +2 -0
  57. package/dist/agent-controller/types.d.ts +23 -0
  58. package/dist/{agent-controller-SSlKzE6A.js → agent-controller-B8LoFdtu.js} +43 -13
  59. package/dist/{agent-controller-CrQ9OF80.cjs → agent-controller-DSnFynpa.cjs} +43 -13
  60. package/dist/auth/defaults/index.d.ts +2 -2
  61. package/dist/auth/defaults/session/cookie.d.ts +2 -2
  62. package/dist/auth/defaults/session/index.d.ts +2 -2
  63. package/dist/auth/defaults/session/memory.d.ts +2 -2
  64. package/dist/auth/ee/capabilities.d.ts +1 -1
  65. package/dist/auth/ee/defaults/index.d.ts +1 -1
  66. package/dist/auth/ee/defaults/rbac/index.d.ts +1 -1
  67. package/dist/auth/ee/defaults/rbac/static.d.ts +1 -1
  68. package/dist/auth/ee/defaults/roles.d.ts +1 -1
  69. package/dist/auth/ee/fga-check.d.ts +1 -1
  70. package/dist/auth/ee/index.d.ts +1 -1
  71. package/dist/auth/ee/interfaces/acl.d.ts +1 -1
  72. package/dist/auth/ee/interfaces/fga.d.ts +1 -1
  73. package/dist/auth/ee/interfaces/index.d.ts +1 -1
  74. package/dist/auth/ee/interfaces/permissions.generated.d.ts +1 -1
  75. package/dist/auth/ee/interfaces/rbac.d.ts +1 -1
  76. package/dist/auth/ee/interfaces/user.d.ts +1 -1
  77. package/dist/auth/ee/license.d.ts +1 -1
  78. package/dist/auth/index.d.ts +2 -2
  79. package/dist/auth/interfaces/credentials.d.ts +1 -1
  80. package/dist/auth/interfaces/index.d.ts +2 -2
  81. package/dist/auth/interfaces/session.d.ts +1 -1
  82. package/dist/auth/interfaces/sso.d.ts +1 -1
  83. package/dist/auth/interfaces/user.d.ts +1 -1
  84. package/dist/background-tasks/index.cjs +1 -1
  85. package/dist/background-tasks/index.js +1 -1
  86. package/dist/background-tasks/manager.d.ts +4 -1
  87. package/dist/{background-tasks-BDrYBis-.cjs → background-tasks-Ci5h0dhj.cjs} +139 -51
  88. package/dist/{background-tasks-BnJfNLFo.js → background-tasks-IW7M4iD2.js} +139 -51
  89. package/dist/browser/index.cjs +1 -1
  90. package/dist/browser/index.js +1 -1
  91. package/dist/{builder-Cw8u3pPl.cjs → builder-14Uptu8y.cjs} +2 -2
  92. package/dist/{builder-Cl-0BWkh.js → builder-DI2c2xjy.js} +2 -2
  93. package/dist/bundler/index.d.ts +2 -2
  94. package/dist/cache/base.d.ts +40 -10
  95. package/dist/cache/index.cjs +1 -1
  96. package/dist/cache/index.js +1 -1
  97. package/dist/capabilities/302ai.json +196 -196
  98. package/dist/capabilities/abliteratedllm.json +36 -36
  99. package/dist/capabilities/abliteration-ai.json +11 -11
  100. package/dist/capabilities/above.json +22 -22
  101. package/dist/capabilities/adaption.json +13 -13
  102. package/dist/capabilities/adzuki.json +28 -28
  103. package/dist/capabilities/agentrouter.json +9 -9
  104. package/dist/capabilities/agnes.json +4 -4
  105. package/dist/capabilities/ai-router.json +5 -5
  106. package/dist/capabilities/aiand.json +16 -16
  107. package/dist/capabilities/aigrow.json +14 -14
  108. package/dist/capabilities/aimlapi.json +146 -150
  109. package/dist/capabilities/aipg.json +2 -2
  110. package/dist/capabilities/aixy.json +9 -9
  111. package/dist/capabilities/aki-io.json +10 -10
  112. package/dist/capabilities/alibaba-cn.json +97 -97
  113. package/dist/capabilities/alibaba-coding-plan-cn.json +5 -5
  114. package/dist/capabilities/alibaba-coding-plan.json +5 -5
  115. package/dist/capabilities/alibaba-token-plan-cn.json +51 -51
  116. package/dist/capabilities/alibaba-token-plan.json +52 -52
  117. package/dist/capabilities/alibaba.json +69 -69
  118. package/dist/capabilities/ambient.json +15 -15
  119. package/dist/capabilities/amd.json +8 -8
  120. package/dist/capabilities/anthropic.json +49 -49
  121. package/dist/capabilities/anyapi.json +19 -19
  122. package/dist/capabilities/arcee.json +9 -9
  123. package/dist/capabilities/augure.json +4 -4
  124. package/dist/capabilities/auriko.json +21 -21
  125. package/dist/capabilities/bailing.json +4 -4
  126. package/dist/capabilities/baseten.json +28 -28
  127. package/dist/capabilities/bee.json +5 -5
  128. package/dist/capabilities/berget.json +4 -4
  129. package/dist/capabilities/bothub.json +14 -14
  130. package/dist/capabilities/boundless.json +39 -39
  131. package/dist/capabilities/bumo.json +42 -42
  132. package/dist/capabilities/byteplus.json +24 -24
  133. package/dist/capabilities/cheapaimodel.json +10 -10
  134. package/dist/capabilities/cheapest-token.json +29 -29
  135. package/dist/capabilities/chutes.json +10 -13
  136. package/dist/capabilities/cline-pass.json +37 -37
  137. package/dist/capabilities/cloudcode.json +10 -10
  138. package/dist/capabilities/cloudflare-workers-ai.json +12 -73
  139. package/dist/capabilities/commandcode.json +131 -131
  140. package/dist/capabilities/concentrate.json +272 -263
  141. package/dist/capabilities/cortecs.json +113 -113
  142. package/dist/capabilities/crossmodel.json +169 -169
  143. package/dist/capabilities/crusoe.json +10 -10
  144. package/dist/capabilities/daoxe.json +9 -9
  145. package/dist/capabilities/databricks.json +128 -128
  146. package/dist/capabilities/deepinfra.json +130 -67
  147. package/dist/capabilities/deepseek.json +4 -4
  148. package/dist/capabilities/digitalocean.json +112 -112
  149. package/dist/capabilities/dothoosh.json +29 -29
  150. package/dist/capabilities/doubleword.json +29 -29
  151. package/dist/capabilities/edenai.json +446 -453
  152. package/dist/capabilities/empiriolabs.json +164 -166
  153. package/dist/capabilities/engy.json +22 -22
  154. package/dist/capabilities/entrim.json +4 -4
  155. package/dist/capabilities/evroc.json +14 -14
  156. package/dist/capabilities/ezkielyna.json +10 -10
  157. package/dist/capabilities/fastrouter.json +79 -79
  158. package/dist/capabilities/fireworks-ai.json +92 -71
  159. package/dist/capabilities/freemodel.json +21 -21
  160. package/dist/capabilities/friendli.json +10 -10
  161. package/dist/capabilities/frogbot.json +87 -87
  162. package/dist/capabilities/gisoo.json +19 -19
  163. package/dist/capabilities/gmicloud.json +21 -21
  164. package/dist/capabilities/google.json +52 -52
  165. package/dist/capabilities/graphn.json +11 -11
  166. package/dist/capabilities/greenpt.json +35 -35
  167. package/dist/capabilities/groq.json +3 -3
  168. package/dist/capabilities/helicone.json +78 -78
  169. package/dist/capabilities/hostinger-router.json +13 -13
  170. package/dist/capabilities/hpc-ai.json +10 -10
  171. package/dist/capabilities/huawei-maas.json +17 -17
  172. package/dist/capabilities/hubris.json +25 -25
  173. package/dist/capabilities/huggingface.json +94 -84
  174. package/dist/capabilities/hyper.json +29 -29
  175. package/dist/capabilities/impossibl.json +148 -148
  176. package/dist/capabilities/inception.json +3 -3
  177. package/dist/capabilities/inceptron.json +6 -6
  178. package/dist/capabilities/inco.json +4 -4
  179. package/dist/capabilities/infer.json +10 -10
  180. package/dist/capabilities/inferall.json +5 -5
  181. package/dist/capabilities/inference-coop.json +15 -15
  182. package/dist/capabilities/inferenceapis.json +17 -17
  183. package/dist/capabilities/inferris.json +4 -4
  184. package/dist/capabilities/infersia.json +12 -12
  185. package/dist/capabilities/infomaniak.json +2 -2
  186. package/dist/capabilities/io-net.json +2 -2
  187. package/dist/capabilities/isoquant.json +4 -4
  188. package/dist/capabilities/iteracompute.json +58 -58
  189. package/dist/capabilities/jad-ai.json +2 -2
  190. package/dist/capabilities/jalapeno.json +11 -11
  191. package/dist/capabilities/jiekou.json +62 -62
  192. package/dist/capabilities/jzstoken.json +47 -47
  193. package/dist/capabilities/keln.json +21 -21
  194. package/dist/capabilities/kenari.json +123 -123
  195. package/dist/capabilities/kilo.json +631 -621
  196. package/dist/capabilities/kimi-code-plan-cn.json +6 -6
  197. package/dist/capabilities/kimi-code-plan-global.json +6 -6
  198. package/dist/capabilities/kitani.json +4 -4
  199. package/dist/capabilities/klavo.json +21 -21
  200. package/dist/capabilities/korouter.json +33 -33
  201. package/dist/capabilities/kunavo.json +5 -5
  202. package/dist/capabilities/liquid.json +12 -12
  203. package/dist/capabilities/lithosai.json +2 -2
  204. package/dist/capabilities/llmgateway-providers.json +903 -894
  205. package/dist/capabilities/llmgateway.json +344 -336
  206. package/dist/capabilities/llmtr.json +23 -23
  207. package/dist/capabilities/logits.json +2 -2
  208. package/dist/capabilities/longcat.json +2 -2
  209. package/dist/capabilities/lowrouter.json +46 -46
  210. package/dist/capabilities/lyceum.json +14 -14
  211. package/dist/capabilities/melious.json +15 -15
  212. package/dist/capabilities/merge-gateway.json +292 -292
  213. package/dist/capabilities/meta.json +11 -11
  214. package/dist/capabilities/minimax-cn-coding-plan.json +2 -2
  215. package/dist/capabilities/minimax-cn.json +5 -5
  216. package/dist/capabilities/minimax-coding-plan.json +2 -2
  217. package/dist/capabilities/minimax.json +5 -5
  218. package/dist/capabilities/mistral.json +21 -21
  219. package/dist/capabilities/mixlayer.json +4 -4
  220. package/dist/capabilities/modal.json +14 -14
  221. package/dist/capabilities/model-oracle-ai.json +23 -23
  222. package/dist/capabilities/modelis.json +22 -22
  223. package/dist/capabilities/modelscope.json +2 -2
  224. package/dist/capabilities/modular.json +7 -7
  225. package/dist/capabilities/moneo.json +11 -11
  226. package/dist/capabilities/moonshotai-cn.json +6 -6
  227. package/dist/capabilities/moonshotai.json +6 -6
  228. package/dist/capabilities/morph.json +13 -13
  229. package/dist/capabilities/munito.json +2 -2
  230. package/dist/capabilities/nan.json +28 -28
  231. package/dist/capabilities/nano-gpt.json +599 -564
  232. package/dist/capabilities/nearai.json +96 -96
  233. package/dist/capabilities/nebius.json +32 -32
  234. package/dist/capabilities/neon.json +120 -120
  235. package/dist/capabilities/neuralwatt.json +37 -37
  236. package/dist/capabilities/nokeep.json +4 -4
  237. package/dist/capabilities/novita-ai.json +154 -154
  238. package/dist/capabilities/nvidia.json +28 -60
  239. package/dist/capabilities/oathbreaker.json +2 -2
  240. package/dist/capabilities/obscurify.json +20 -20
  241. package/dist/capabilities/oci.json +17 -8
  242. package/dist/capabilities/ofox.json +317 -317
  243. package/dist/capabilities/ollama-cloud.json +56 -56
  244. package/dist/capabilities/openai.json +78 -46
  245. package/dist/capabilities/opencode-go.json +86 -86
  246. package/dist/capabilities/openreason.json +5 -5
  247. package/dist/capabilities/openrouter.json +535 -519
  248. package/dist/capabilities/opper.json +27 -27
  249. package/dist/capabilities/orcarouter.json +217 -217
  250. package/dist/capabilities/outerlabs.json +31 -31
  251. package/dist/capabilities/ovhcloud.json +58 -4
  252. package/dist/capabilities/pareto.json +5 -5
  253. package/dist/capabilities/pendra.json +4 -4
  254. package/dist/capabilities/perplexity-agent.json +62 -62
  255. package/dist/capabilities/phala.json +36 -36
  256. package/dist/capabilities/pioneer.json +27 -27
  257. package/dist/capabilities/poe.json +110 -110
  258. package/dist/capabilities/poolside.json +3 -3
  259. package/dist/capabilities/powerspring.json +11 -11
  260. package/dist/capabilities/primalabs.json +10 -10
  261. package/dist/capabilities/prime.json +127 -111
  262. package/dist/capabilities/privatemode-ai.json +11 -11
  263. package/dist/capabilities/proxystacks.json +7 -7
  264. package/dist/capabilities/qiniu-ai.json +15 -15
  265. package/dist/capabilities/refuseless.json +9 -9
  266. package/dist/capabilities/regolo-ai.json +6 -6
  267. package/dist/capabilities/requesty.json +170 -170
  268. package/dist/capabilities/ruapi.json +20 -20
  269. package/dist/capabilities/runcrate.json +10 -10
  270. package/dist/capabilities/runinfra.json +16 -16
  271. package/dist/capabilities/sakana.json +6 -6
  272. package/dist/capabilities/sambanova.json +6 -6
  273. package/dist/capabilities/sandbase.json +11 -11
  274. package/dist/capabilities/sarvam.json +10 -10
  275. package/dist/capabilities/scaleway.json +14 -14
  276. package/dist/capabilities/scnet-token-plan.json +14 -14
  277. package/dist/capabilities/scx-ai.json +26 -26
  278. package/dist/capabilities/sensenova.json +12 -12
  279. package/dist/capabilities/siliconflow-cn.json +50 -50
  280. package/dist/capabilities/siliconflow.json +55 -55
  281. package/dist/capabilities/snowflake-cortex.json +19 -19
  282. package/dist/capabilities/sokkan.json +7 -7
  283. package/dist/capabilities/sparrowcodes.json +17 -17
  284. package/dist/capabilities/standardcompute.json +98 -98
  285. package/dist/capabilities/steadyrouter.json +38 -38
  286. package/dist/capabilities/stepfun-ai-step-plan.json +6 -6
  287. package/dist/capabilities/stepfun-ai.json +5 -5
  288. package/dist/capabilities/stepfun-step-plan.json +5 -5
  289. package/dist/capabilities/stepfun.json +5 -5
  290. package/dist/capabilities/stepping-stone.json +17 -17
  291. package/dist/capabilities/subconscious.json +2 -2
  292. package/dist/capabilities/superbot-gg.json +4 -4
  293. package/dist/capabilities/synthetic.json +12 -12
  294. package/dist/capabilities/synthorai.json +22 -22
  295. package/dist/capabilities/teamorouter.json +24 -24
  296. package/dist/capabilities/teapot-router.json +12 -12
  297. package/dist/capabilities/tencent-token-plan.json +59 -35
  298. package/dist/capabilities/tencent-tokenhub.json +46 -46
  299. package/dist/capabilities/tensorx.json +47 -47
  300. package/dist/capabilities/tenstorrent.json +8 -8
  301. package/dist/capabilities/the-grid-ai.json +29 -29
  302. package/dist/capabilities/thinkingmachines.json +61 -61
  303. package/dist/capabilities/tinfoil.json +12 -12
  304. package/dist/capabilities/togetherai.json +62 -52
  305. package/dist/capabilities/tokengo.json +14 -14
  306. package/dist/capabilities/tokenify.json +9 -9
  307. package/dist/capabilities/trustedrouter.json +7 -7
  308. package/dist/capabilities/trustedtokens.json +15 -15
  309. package/dist/capabilities/umans-ai-coding-plan.json +16 -16
  310. package/dist/capabilities/umans-ai.json +13 -13
  311. package/dist/capabilities/uncensuredai.json +4 -4
  312. package/dist/capabilities/unrestricted.json +8 -8
  313. package/dist/capabilities/uplinkswitch.json +21 -21
  314. package/dist/capabilities/upstage.json +4 -4
  315. package/dist/capabilities/vancine.json +24 -24
  316. package/dist/capabilities/vercel.json +582 -582
  317. package/dist/capabilities/vivgrid.json +86 -86
  318. package/dist/capabilities/volcengine-coding-plan.json +23 -23
  319. package/dist/capabilities/volcengine.json +24 -24
  320. package/dist/capabilities/vultr.json +26 -26
  321. package/dist/capabilities/wafer.ai.json +16 -16
  322. package/dist/capabilities/wallaby.json +4 -4
  323. package/dist/capabilities/wally.json +11 -11
  324. package/dist/capabilities/wandb.json +21 -21
  325. package/dist/capabilities/watt.json +24 -24
  326. package/dist/capabilities/xai.json +6 -6
  327. package/dist/capabilities/xiaomi.json +2 -2
  328. package/dist/capabilities/xpersona.json +13 -13
  329. package/dist/capabilities/xxapi.json +28 -28
  330. package/dist/capabilities/zai-coding-plan.json +19 -19
  331. package/dist/capabilities/zai.json +26 -24
  332. package/dist/capabilities/zenifra.json +27 -27
  333. package/dist/capabilities/zenmux.json +172 -172
  334. package/dist/capabilities/zerogpu.json +8 -8
  335. package/dist/capabilities/zhipuai-coding-plan.json +7 -7
  336. package/dist/capabilities/zhipuai.json +23 -23
  337. package/dist/capabilities/zro.json +7 -7
  338. package/dist/channels/agent-channels.d.ts +2 -1
  339. package/dist/channels/formatting.d.ts +8 -0
  340. package/dist/channels/index.cjs +4 -2
  341. package/dist/channels/index.d.ts +1 -1
  342. package/dist/channels/index.js +3 -3
  343. package/dist/channels/types.d.ts +5 -3
  344. package/dist/{channels-Cz1y3W6u.js → channels-Wh32drgu.js} +1 -1
  345. package/dist/{channels-DQg4v_gm.cjs → channels-tVV_de9Q.cjs} +1 -1
  346. package/dist/coding-agent/index.cjs +1 -1
  347. package/dist/coding-agent/index.js +1 -1
  348. package/dist/datasets/index.cjs +2 -2
  349. package/dist/datasets/index.js +2 -2
  350. package/dist/deployer/index.d.ts +2 -2
  351. package/dist/docs/SKILL.md +1 -1
  352. package/dist/docs/assets/SOURCE_MAP.json +798 -798
  353. package/dist/docs/references/docs-agents-resumable-streams.md +15 -6
  354. package/dist/docs/references/docs-deployment-workers.md +3 -1
  355. package/dist/docs/references/docs-harness-background-tasks.md +4 -4
  356. package/dist/docs/references/docs-harness-durable-agents.md +39 -48
  357. package/dist/docs/references/docs-knowledge-importers.md +1 -1
  358. package/dist/docs/references/docs-mastra-platform-observability-overview.md +1 -1
  359. package/dist/docs/references/docs-sandbox-overview.md +1 -0
  360. package/dist/docs/references/docs-server-pubsub.md +1 -1
  361. package/dist/docs/references/docs-workflows-overview.md +67 -3
  362. package/dist/docs/references/integrations-agentic-ui-assistant-ui.md +2 -0
  363. package/dist/docs/references/integrations-frameworks-angular.md +39 -0
  364. package/dist/docs/references/integrations-frameworks-astro.md +5 -2
  365. package/dist/docs/references/integrations-frameworks-electron.md +40 -0
  366. package/dist/docs/references/integrations-frameworks-next-js.md +5 -2
  367. package/dist/docs/references/integrations-frameworks-nuxt.md +5 -2
  368. package/dist/docs/references/integrations-frameworks-sveltekit.md +5 -2
  369. package/dist/docs/references/integrations-frameworks-vite-react.md +40 -0
  370. package/dist/docs/references/integrations.md +3 -0
  371. package/dist/docs/references/reference-agent-controller-agent-controller-class.md +6 -0
  372. package/dist/docs/references/reference-agents-channels.md +1 -1
  373. package/dist/docs/references/reference-agents-durable-agent.md +3 -3
  374. package/dist/docs/references/reference-agents-generate.md +2 -0
  375. package/dist/docs/references/reference-configuration.md +1 -1
  376. package/dist/docs/references/reference-core-mastra-class.md +2 -0
  377. package/dist/docs/references/reference-knowledge-knowledge-class.md +1 -1
  378. package/dist/docs/references/reference-knowledge-knowledge-tools.md +11 -5
  379. package/dist/docs/references/reference-pubsub-caching-pubsub.md +2 -2
  380. package/dist/docs/references/reference-pubsub-redis-streams.md +2 -2
  381. package/dist/docs/references/reference-pubsub-valkey-streams.md +2 -2
  382. package/dist/docs/references/reference-workers-overview.md +2 -0
  383. package/dist/docs/references/reference-workflows-workflow-methods-create-run.md +2 -0
  384. package/dist/docs/references/reference-workflows-workflow.md +2 -0
  385. package/dist/docs/references/reference.md +1 -0
  386. package/dist/error/index.cjs +2 -1
  387. package/dist/error/index.d.ts +1 -1
  388. package/dist/error/index.js +2 -2
  389. package/dist/error/provider-error.d.ts +2 -1
  390. package/dist/{error-BLwEXqOK.js → error-BC9Au-22.js} +13 -1
  391. package/dist/{error-BdEvO8za.cjs → error-L1V4uUbd.cjs} +18 -0
  392. package/dist/evals/index.cjs +1 -1
  393. package/dist/evals/index.js +1 -1
  394. package/dist/evals/run/index.d.ts +1 -1
  395. package/dist/evals/scoreTraces/index.cjs +1 -1
  396. package/dist/evals/scoreTraces/index.js +1 -1
  397. package/dist/evals/types.d.ts +1 -1
  398. package/dist/events/caching-pubsub.d.ts +28 -0
  399. package/dist/events/index.cjs +4 -1
  400. package/dist/events/index.js +2 -2
  401. package/dist/events/topics.d.ts +55 -9
  402. package/dist/harness/index.cjs +1 -1
  403. package/dist/harness/index.js +1 -1
  404. package/dist/index.cjs +1 -1
  405. package/dist/index.js +1 -1
  406. package/dist/{inmemory-BDD0w8gx.js → inmemory-BK3zLwvM.js} +42 -12
  407. package/dist/{inmemory-fgR8sq-U.cjs → inmemory-Dc86VWGB.cjs} +42 -12
  408. package/dist/knowledge/changes.d.ts +17 -5
  409. package/dist/knowledge/importers/runner.d.ts +6 -0
  410. package/dist/knowledge/index.cjs +78 -16
  411. package/dist/knowledge/index.d.ts +2 -2
  412. package/dist/knowledge/index.js +78 -16
  413. package/dist/knowledge/search-snippet.d.ts +30 -0
  414. package/dist/llm/index.cjs +3 -3
  415. package/dist/llm/index.d.ts +2 -2
  416. package/dist/llm/index.js +3 -3
  417. package/dist/llm/model/aisdk/v4/model.d.ts +9 -9
  418. package/dist/llm/model/base.types.d.ts +2 -2
  419. package/dist/llm/model/embedding-router.d.ts +1 -1
  420. package/dist/llm/model/model-settings.d.ts +1 -1
  421. package/dist/llm/model/model.d.ts +1 -1
  422. package/dist/llm/model/model.loop.d.ts +1 -1
  423. package/dist/llm/model/model.loop.types.d.ts +1 -1
  424. package/dist/llm/model/provider-types.generated.d.ts +8011 -7996
  425. package/dist/llm/model/shared.types.d.ts +1 -1
  426. package/dist/{llm-B5A5cwJr.js → llm-B1zaFLYZ.js} +3 -3
  427. package/dist/{llm-8Av3mSjD.cjs → llm-BAiOsNAP.cjs} +3 -3
  428. package/dist/loop/index.cjs +2 -2
  429. package/dist/loop/index.js +2 -2
  430. package/dist/loop/loop-builder.d.ts +1 -1
  431. package/dist/loop/loop.d.ts +1 -1
  432. package/dist/loop/run-scope-keys.d.ts +1 -1
  433. package/dist/loop/shared/transcript-step.d.ts +1 -1
  434. package/dist/loop/types.d.ts +2 -2
  435. package/dist/loop/workflows/agentic-execution/background-task-check-step.d.ts +1 -1
  436. package/dist/loop/workflows/agentic-execution/build-messages-from-chunks.d.ts +1 -1
  437. package/dist/loop/workflows/agentic-execution/goal-step.d.ts +1 -1
  438. package/dist/loop/workflows/agentic-execution/index.d.ts +1 -1
  439. package/dist/loop/workflows/agentic-execution/is-task-complete-step.d.ts +1 -1
  440. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +1 -1
  441. package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +1 -1
  442. package/dist/loop/workflows/agentic-execution/tool-call-concurrency.d.ts +1 -1
  443. package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts +1 -1
  444. package/dist/loop/workflows/agentic-loop/index.d.ts +1 -1
  445. package/dist/loop/workflows/schema.d.ts +2 -2
  446. package/dist/loop/workflows/stream.d.ts +1 -1
  447. package/dist/{manager-sv35JY-z.cjs → manager-BVX9nVrM.cjs} +2 -2
  448. package/dist/{manager-DfWQCJUK.js → manager-ChK9GdGz.js} +2 -2
  449. package/dist/mastra/index.cjs +1 -1
  450. package/dist/mastra/index.js +1 -1
  451. package/dist/{mastra-CigBrT7X.js → mastra-CUGfgEpZ.js} +28 -18
  452. package/dist/{mastra-D4hvfuxX.cjs → mastra-HSmofHEJ.cjs} +28 -18
  453. package/dist/memory/index.cjs +2 -2
  454. package/dist/memory/index.js +2 -2
  455. package/dist/memory/memory.d.ts +1 -1
  456. package/dist/memory/types.d.ts +2 -2
  457. package/dist/{model-CYtXw861.js → model-C47BJRtR.js} +1 -1
  458. package/dist/{model-BK93CMtl.cjs → model-WahorgzJ.cjs} +1 -1
  459. package/dist/{netlify-CuI1ZrwR.js → netlify-CfDXkuLf.js} +2 -2
  460. package/dist/{netlify-BAnn3ouY.cjs → netlify-D99AnEhW.cjs} +2 -2
  461. package/dist/notifications/index.cjs +1 -1
  462. package/dist/notifications/index.js +1 -1
  463. package/dist/observability/index.cjs +1 -0
  464. package/dist/observability/index.d.ts +1 -1
  465. package/dist/observability/index.js +2 -2
  466. package/dist/{output-helpers-CedRCE17.js → output-helpers-CVzhy1Y0.js} +126 -56
  467. package/dist/{output-helpers-1Zu4Vt9C.cjs → output-helpers-DgsH4aTb.cjs} +143 -55
  468. package/dist/processor-provider/index.cjs +1 -1
  469. package/dist/processor-provider/index.js +1 -1
  470. package/dist/processors/index.cjs +2 -2
  471. package/dist/processors/index.d.ts +2 -2
  472. package/dist/processors/index.js +2 -2
  473. package/dist/processors/runner.d.ts +3 -1
  474. package/dist/processors/step-schema.d.ts +1 -1
  475. package/dist/{provider-registry-BwuI_IpT.cjs → provider-registry-CO1NVbO5.cjs} +22070 -22050
  476. package/dist/{provider-registry-CmQLzLF_.js → provider-registry-CR385GJ4.js} +22070 -22050
  477. package/dist/provider-registry.json +22239 -22226
  478. package/dist/{registry-generator-C17V4WfG.js → registry-generator-B3erRqYS.js} +1 -1
  479. package/dist/{registry-generator-C_0ae7Ce.cjs → registry-generator-Cvp34qcB.cjs} +1 -1
  480. package/dist/{rehydrate-PnaVawGX.js → rehydrate-CJBLrZxs.js} +2 -2
  481. package/dist/{rehydrate-CDQ4dOYj.cjs → rehydrate-Da4hNuaK.cjs} +2 -2
  482. package/dist/relevance/index.cjs +2 -2
  483. package/dist/relevance/index.js +2 -2
  484. package/dist/{run-registry-BwEcwYlU.js → run-registry-DdeEBsVW.js} +1639 -568
  485. package/dist/{run-registry-BmckDVBk.cjs → run-registry-TOOfO3hT.cjs} +1668 -567
  486. package/dist/server/auth.d.ts +3 -3
  487. package/dist/server/composite-auth.d.ts +1 -1
  488. package/dist/server/simple-auth.d.ts +1 -1
  489. package/dist/server/types.d.ts +1 -1
  490. package/dist/storage/domains/inmemory-db.d.ts +1 -0
  491. package/dist/storage/domains/knowledge/base.d.ts +5 -0
  492. package/dist/storage/domains/knowledge/inmemory.d.ts +1 -0
  493. package/dist/storage/domains/knowledge/pages-inmemory.d.ts +10 -2
  494. package/dist/storage/domains/knowledge/pages.d.ts +30 -0
  495. package/dist/storage/index.cjs +2 -2
  496. package/dist/storage/index.js +2 -2
  497. package/dist/storage/run-fencing.d.ts +5 -0
  498. package/dist/stream/RunOutput.d.ts +1 -1
  499. package/dist/stream/aisdk/v4/input.d.ts +1 -1
  500. package/dist/stream/aisdk/v5/compat/content.d.ts +1 -1
  501. package/dist/stream/aisdk/v5/compat/prepare-tools.d.ts +1 -1
  502. package/dist/stream/aisdk/v5/compat/ui-message.d.ts +1 -1
  503. package/dist/stream/aisdk/v5/compat/validation.d.ts +1 -1
  504. package/dist/stream/aisdk/v5/execute.d.ts +1 -1
  505. package/dist/stream/aisdk/v5/input.d.ts +1 -1
  506. package/dist/stream/aisdk/v5/output-helpers.d.ts +7 -7
  507. package/dist/stream/aisdk/v5/transform.d.ts +1 -1
  508. package/dist/stream/base/output.d.ts +4 -4
  509. package/dist/stream/base/schema.d.ts +1 -1
  510. package/dist/stream/index.cjs +2 -2
  511. package/dist/stream/index.js +2 -2
  512. package/dist/stream/types.d.ts +2 -2
  513. package/dist/{stream-D1y9GzoD.js → stream-C5PagEDs.js} +3 -3
  514. package/dist/{stream-0kdqBOOn.cjs → stream-DH7Qgz8l.cjs} +3 -3
  515. package/dist/test-utils/llm-mock.cjs +1 -1
  516. package/dist/test-utils/llm-mock.d.ts +3 -3
  517. package/dist/test-utils/llm-mock.js +1 -1
  518. package/dist/tool-loop-agent/index.cjs +1 -1
  519. package/dist/tool-loop-agent/index.js +1 -1
  520. package/dist/tool-loop-agent/utils.d.ts +1 -1
  521. package/dist/{tool-loop-agent-kWaZAT6Q.cjs → tool-loop-agent-CJTs4T8b.cjs} +3 -3
  522. package/dist/{tool-loop-agent-BdjWGVIb.js → tool-loop-agent-DVYJXlQJ.js} +3 -3
  523. package/dist/tools/builtin/web-search.d.ts +1 -1
  524. package/dist/tools/provider-tool-utils.d.ts +1 -1
  525. package/dist/tools/tool-builder/builder.d.ts +1 -1
  526. package/dist/tools/tool-title.d.ts +1 -1
  527. package/dist/tools/types.d.ts +1 -1
  528. package/dist/types/user.d.ts +1 -1
  529. package/dist/{utils-GHY3hmLx.js → utils-D8upuTwy.js} +1 -1
  530. package/dist/{utils-BKUCaZ12.cjs → utils-xJi_N6Tx.cjs} +1 -1
  531. package/dist/utils.cjs +1 -1
  532. package/dist/utils.d.ts +1 -1
  533. package/dist/utils.js +1 -1
  534. package/dist/{validate-De92squ7.cjs → validate-6eZ8Wssn.cjs} +1 -1
  535. package/dist/{validate-CB-q-R2F.js → validate-DTkW3Vlp.js} +1 -1
  536. package/dist/vector/embed.d.ts +4 -4
  537. package/dist/vector/index.cjs +1 -1
  538. package/dist/vector/index.js +1 -1
  539. package/dist/vector/vector.d.ts +4 -4
  540. package/dist/voice/aisdk/index.d.ts +1 -1
  541. package/dist/voice/aisdk/speech.d.ts +1 -1
  542. package/dist/voice/aisdk/transcription.d.ts +1 -1
  543. package/dist/voice/composite-voice.d.ts +1 -1
  544. package/dist/voice/default-voice.d.ts +1 -1
  545. package/dist/voice/index.d.ts +2 -2
  546. package/dist/voice/voice.d.ts +1 -1
  547. package/dist/worker/index.cjs +1 -1
  548. package/dist/worker/index.js +1 -1
  549. package/dist/{worker-CAKvQj9_.cjs → worker-24ORi-wV.cjs} +2 -2
  550. package/dist/{worker-BbWPQuPR.cjs → worker-BO3u_WjZ.cjs} +2 -2
  551. package/dist/{worker-C3u_xzY2.js → worker-DbcFkKJO.js} +2 -2
  552. package/dist/{worker-Kwm8EKcj.js → worker-Dqubrnf8.js} +2 -2
  553. package/dist/{workflow-CSjXeNcR.cjs → workflow-D5Fc5ieC.cjs} +4 -4
  554. package/dist/{workflow-CVmI1Sw-.js → workflow-wXOf72fO.js} +4 -4
  555. package/dist/workflows/builder/index.cjs +1 -1
  556. package/dist/workflows/builder/index.js +1 -1
  557. package/dist/workflows/evented/index.cjs +1 -1
  558. package/dist/workflows/evented/index.js +1 -1
  559. package/dist/workflows/index.cjs +4 -4
  560. package/dist/workflows/index.js +4 -4
  561. package/dist/workflows/run-ownership.d.ts +74 -8
  562. package/dist/workflows/types.d.ts +17 -1
  563. package/dist/workflows/workflow.d.ts +4 -0
  564. package/package.json +14 -14
  565. package/src/llm/model/provider-types.generated.d.ts +8011 -7996
  566. /package/dist/_types/{@internal_ai-sdk-v4@0.0.98 → @internal_ai-sdk-v4@0.0.99}/dist/index.d.ts +0 -0
  567. /package/dist/_types/{@internal_ai-sdk-v4@0.0.98 → @internal_ai-sdk-v4@0.0.99}/dist/test.d.ts +0 -0
  568. /package/dist/_types/{@internal_ai-sdk-v4@0.0.98 → @internal_ai-sdk-v4@0.0.99}/package.json +0 -0
  569. /package/dist/_types/{@internal_ai-sdk-v5@0.0.98 → @internal_ai-sdk-v5@0.0.99}/dist/index.d.ts +0 -0
  570. /package/dist/_types/{@internal_ai-sdk-v5@0.0.98 → @internal_ai-sdk-v5@0.0.99}/dist/test.d.ts +0 -0
  571. /package/dist/_types/{@internal_ai-sdk-v5@0.0.98 → @internal_ai-sdk-v5@0.0.99}/package.json +0 -0
  572. /package/dist/_types/{@internal_ai-v6@0.0.98 → @internal_ai-v6@0.0.99}/dist/index.d.ts +0 -0
  573. /package/dist/_types/{@internal_ai-v6@0.0.98 → @internal_ai-v6@0.0.99}/package.json +0 -0
  574. /package/dist/_types/{@internal_ai-v7@0.0.98 → @internal_ai-v7@0.0.99}/dist/index.d.ts +0 -0
  575. /package/dist/_types/{@internal_ai-v7@0.0.98 → @internal_ai-v7@0.0.99}/package.json +0 -0
  576. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/_types/@internal_core@0.1.4/dist/base/index.d.ts +0 -0
  577. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/_types/@internal_core@0.1.4/dist/index-Diz1p9N7.d.ts +0 -0
  578. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/capabilities.d.ts +0 -0
  579. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/defaults/index.d.ts +0 -0
  580. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/defaults/rbac/index.d.ts +0 -0
  581. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/defaults/rbac/static.d.ts +0 -0
  582. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/defaults/roles.d.ts +0 -0
  583. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/fga-check.d.ts +0 -0
  584. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/index.d.ts +0 -0
  585. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/acl.d.ts +0 -0
  586. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/fga.d.ts +0 -0
  587. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/index.d.ts +0 -0
  588. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/permissions.generated.d.ts +0 -0
  589. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/rbac.d.ts +0 -0
  590. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/user.d.ts +0 -0
  591. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/license.d.ts +0 -0
  592. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/index.d.ts +0 -0
  593. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/provider/index.d.ts +0 -0
  594. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/session/cookie.d.ts +0 -0
  595. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/session/index.d.ts +0 -0
  596. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/session/memory.d.ts +0 -0
  597. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/types/index.d.ts +0 -0
  598. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/package.json +0 -0
  599. /package/dist/_types/{@internal_deployer@0.0.4 → @internal_deployer@0.0.5}/dist/_types/@internal_core@0.1.4/dist/index-Diz1p9N7.d.ts +0 -0
  600. /package/dist/_types/{@internal_deployer@0.0.4 → @internal_deployer@0.0.5}/dist/_types/@internal_core@0.1.4/dist/logger/index.d.ts +0 -0
  601. /package/dist/_types/{@internal_deployer@0.0.4 → @internal_deployer@0.0.5}/dist/bundler.d.ts +0 -0
  602. /package/dist/_types/{@internal_deployer@0.0.4 → @internal_deployer@0.0.5}/dist/deployer.d.ts +0 -0
  603. /package/dist/_types/{@internal_deployer@0.0.4 → @internal_deployer@0.0.5}/dist/index.d.ts +0 -0
  604. /package/dist/_types/{@internal_deployer@0.0.4 → @internal_deployer@0.0.5}/package.json +0 -0
  605. /package/dist/_types/{@internal_external-types@0.0.101 → @internal_external-types@0.0.102}/dist/index.d.ts +0 -0
  606. /package/dist/_types/{@internal_external-types@0.0.101 → @internal_external-types@0.0.102}/package.json +0 -0
  607. /package/dist/_types/{@internal_voice@0.0.47/dist/_types/@internal_ai-sdk-v5@0.0.98 → @internal_voice@0.0.48/dist/_types/@internal_ai-sdk-v5@0.0.99}/dist/index.d.ts +0 -0
  608. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/@internal_core@0.1.4/dist/base/index.d.ts +0 -0
  609. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/@internal_core@0.1.4/dist/index-Diz1p9N7.d.ts +0 -0
  610. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/@internal_core@0.1.4/dist/request-context/index.d.ts +0 -0
  611. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/@internal_core@0.1.4/dist/types/index.d.ts +0 -0
  612. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/ZodError.d.ts +0 -0
  613. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/errors.d.ts +0 -0
  614. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/external.d.ts +0 -0
  615. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/helpers/enumUtil.d.ts +0 -0
  616. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/helpers/errorUtil.d.ts +0 -0
  617. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/helpers/parseUtil.d.ts +0 -0
  618. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/helpers/partialUtil.d.ts +0 -0
  619. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/helpers/typeAliases.d.ts +0 -0
  620. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/helpers/util.d.ts +0 -0
  621. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/index.d.ts +0 -0
  622. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/locales/en.d.ts +0 -0
  623. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/standard-schema.d.ts +0 -0
  624. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/types.d.ts +0 -0
  625. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/checks.d.ts +0 -0
  626. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/coerce.d.ts +0 -0
  627. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/compat.d.ts +0 -0
  628. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/deep-partial.d.ts +0 -0
  629. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/errors.d.ts +0 -0
  630. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/external.d.ts +0 -0
  631. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/from-json-schema.d.ts +0 -0
  632. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/in-out.d.ts +0 -0
  633. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/index.d.ts +0 -0
  634. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/iso.d.ts +0 -0
  635. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/parse.d.ts +0 -0
  636. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/schemas.d.ts +0 -0
  637. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/api.d.ts +0 -0
  638. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/checks.d.ts +0 -0
  639. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/compile.d.ts +0 -0
  640. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/core.d.ts +0 -0
  641. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/doc.d.ts +0 -0
  642. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/errors.d.ts +0 -0
  643. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/index.d.ts +0 -0
  644. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/json-schema-generator.d.ts +0 -0
  645. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/json-schema-processors.d.ts +0 -0
  646. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/json-schema.d.ts +0 -0
  647. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/memoizer.d.ts +0 -0
  648. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/parse.d.ts +0 -0
  649. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/regexes.d.ts +0 -0
  650. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/registries.d.ts +0 -0
  651. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/schemas.d.ts +0 -0
  652. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/standard-schema.d.ts +0 -0
  653. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/to-json-schema.d.ts +0 -0
  654. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/util.d.ts +0 -0
  655. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/versions.d.ts +0 -0
  656. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/index.d.cts +0 -0
  657. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ar.d.ts +0 -0
  658. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/az.d.ts +0 -0
  659. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/be.d.ts +0 -0
  660. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/bg.d.ts +0 -0
  661. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/bn.d.ts +0 -0
  662. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ca.d.ts +0 -0
  663. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ckb.d.ts +0 -0
  664. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/cs.d.ts +0 -0
  665. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/da.d.ts +0 -0
  666. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/de.d.ts +0 -0
  667. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/el.d.ts +0 -0
  668. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/en.d.ts +0 -0
  669. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/eo.d.ts +0 -0
  670. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/es.d.ts +0 -0
  671. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/fa.d.ts +0 -0
  672. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/fi.d.ts +0 -0
  673. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/fr-CA.d.ts +0 -0
  674. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/fr.d.ts +0 -0
  675. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/gu.d.ts +0 -0
  676. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/he.d.ts +0 -0
  677. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/hi.d.ts +0 -0
  678. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/hr.d.ts +0 -0
  679. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/hu.d.ts +0 -0
  680. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/hy.d.ts +0 -0
  681. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/id.d.ts +0 -0
  682. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/index.d.ts +0 -0
  683. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/is.d.ts +0 -0
  684. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/it.d.ts +0 -0
  685. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ja.d.ts +0 -0
  686. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ka.d.ts +0 -0
  687. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/kh.d.ts +0 -0
  688. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/km.d.ts +0 -0
  689. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/kn.d.ts +0 -0
  690. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ko.d.ts +0 -0
  691. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/lt.d.ts +0 -0
  692. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/mk.d.ts +0 -0
  693. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ms.d.ts +0 -0
  694. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ne.d.ts +0 -0
  695. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/nl.d.ts +0 -0
  696. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/nn.d.ts +0 -0
  697. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/no.d.ts +0 -0
  698. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ota.d.ts +0 -0
  699. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/pl.d.ts +0 -0
  700. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ps.d.ts +0 -0
  701. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/pt-BR.d.ts +0 -0
  702. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/pt.d.ts +0 -0
  703. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ro.d.ts +0 -0
  704. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ru.d.ts +0 -0
  705. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/sk.d.ts +0 -0
  706. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/sl.d.ts +0 -0
  707. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/sv.d.ts +0 -0
  708. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ta.d.ts +0 -0
  709. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/tg.d.ts +0 -0
  710. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/th.d.ts +0 -0
  711. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/tk.d.ts +0 -0
  712. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/tr.d.ts +0 -0
  713. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ua.d.ts +0 -0
  714. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/uk.d.ts +0 -0
  715. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ur.d.ts +0 -0
  716. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/uz.d.ts +0 -0
  717. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/vi.d.ts +0 -0
  718. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/yo.d.ts +0 -0
  719. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/zh-CN.d.ts +0 -0
  720. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/zh-TW.d.ts +0 -0
  721. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/index.d.ts +0 -0
  722. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/aisdk/index.d.ts +0 -0
  723. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/default-voice.d.ts +0 -0
  724. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/index.d.ts +0 -0
  725. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/voice.d.ts +0 -0
  726. /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/package.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_base = require("../base-BIzR1D3_.cjs");
3
- const require_run_registry = require("../run-registry-BmckDVBk.cjs");
3
+ const require_run_registry = require("../run-registry-TOOfO3hT.cjs");
4
4
  const require_tool = require("../tool-CYlT2UA-.cjs");
5
5
  let crypto = require("crypto");
6
6
  let _mastra_schema_compat_schema = require("@mastra/schema-compat/schema");
@@ -79,15 +79,55 @@ const MOVED_PAGE = {
79
79
  mergePages: (input) => input.sourceId
80
80
  };
81
81
  /**
82
- * Wraps `storage` so each page-store write in {@link WRITES} calls `emit` after it resolves. Every
83
- * other member passes through, bound to the real store so adapters' private fields keep working.
84
- * Nothing extra happens while `listening()` is false. Describing or emitting an event never fails a
85
- * write that committed: errors go to `onError`.
82
+ * A view {@link emitKnowledgeChanges} returned answers this key with the store it wraps, so helpers
83
+ * that find a view by identity (`pgKnowledgeTransactionClient`) can look through it. `Symbol.for`, so
84
+ * a store package reads it without importing a newer core.
86
85
  */
87
- function emitKnowledgeChanges(storage, emit, listening, onError) {
86
+ const UNWRAP = Symbol.for("mastra.knowledge.unwrap");
87
+ /** The adapter's own store or transaction view under one {@link emitKnowledgeChanges} returned. Writes through it emit nothing. */
88
+ function unwrapKnowledgeStorage(storage) {
89
+ return storage[UNWRAP] ?? storage;
90
+ }
91
+ /**
92
+ * Wraps `storage` so each page-store write in {@link WRITES} calls `emit` after it resolves. Writes
93
+ * on a `transaction` view are held until that transaction commits and dropped if it rolls back; a
94
+ * nested `transaction` hands its writes to the outer one when it succeeds. While a nested
95
+ * transaction is open, writes through any view of that transaction chain belong to the innermost
96
+ * one (they run inside its savepoint), so they are kept or dropped with it. A chain tracks one
97
+ * innermost transaction, so concurrent nested transactions opened in the same chain are not
98
+ * supported: their events would cross. Every other member passes
99
+ * through, bound to the real store so adapters' private fields keep working. Nothing extra happens
100
+ * while `listening()` is false. Describing or emitting an event never fails a write that committed:
101
+ * errors go to `onError`.
102
+ */
103
+ function emitKnowledgeChanges(storage, emit, listening, onError, chain) {
104
+ const report = (change) => (chain ? chain.report : emit)(change);
88
105
  return new Proxy(storage, { get(target, property) {
106
+ if (property === UNWRAP) return target;
89
107
  const value = Reflect.get(target, property, target);
90
108
  if (typeof value !== "function") return value;
109
+ if (property === "transaction") return async (operation, ...rest) => {
110
+ let held = [];
111
+ const hold = (change) => void held.push(change);
112
+ const shared = chain ?? { report: hold };
113
+ const outer = shared.report;
114
+ let result;
115
+ try {
116
+ result = await value.call(target, (tx) => {
117
+ held = [];
118
+ shared.report = hold;
119
+ return operation(emitKnowledgeChanges(tx, hold, listening, onError, shared));
120
+ }, ...rest);
121
+ } finally {
122
+ shared.report = outer;
123
+ }
124
+ for (const change of held) try {
125
+ report(change);
126
+ } catch (error) {
127
+ onError(error);
128
+ }
129
+ return result;
130
+ };
91
131
  const describe = typeof property === "string" ? WRITES[property] : void 0;
92
132
  if (!describe) return value.bind(target);
93
133
  const moved = typeof property === "string" ? MOVED_PAGE[property] : void 0;
@@ -105,7 +145,7 @@ function emitKnowledgeChanges(storage, emit, listening, onError) {
105
145
  if (!listening()) return result;
106
146
  try {
107
147
  const change = describe(result, input, fromScopeId);
108
- if (change) emit(change);
148
+ if (change) report(change);
109
149
  } catch (error) {
110
150
  onError(error);
111
151
  }
@@ -631,7 +671,8 @@ function sourceError(error) {
631
671
  * @experimental
632
672
  */
633
673
  async function runKnowledgeImport(options) {
634
- const { host, budgetMs = 15e5, graceMs = 18e4, maxPasses = 200, bufferSize = 200, heartbeatMs = 3e4, maxRetries = 8, hostCallTimeoutMs = 6e4, retryDelayMs = (attempt) => Math.min(250 * 2 ** attempt, 1e4) } = options;
674
+ const { host, budgetMs = 15e5, graceMs = 18e4, maxPasses = 200, bufferSize = 200, flushAfterMs = 3e4, heartbeatMs = 3e4, maxRetries = 8, hostCallTimeoutMs = 6e4, retryDelayMs = (attempt) => Math.min(250 * 2 ** attempt, 1e4) } = options;
675
+ if (!Number.isFinite(flushAfterMs) || flushAfterMs <= 0 || flushAfterMs > 2 ** 31 - 1) throw new TypeError(`flushAfterMs must be a positive number of milliseconds up to 2147483647, got ${flushAfterMs}`);
635
676
  const started = await within(host.startRun(options.bindingId, options.start), hostCallTimeoutMs, () => new KnowledgeImporterHostError("host call timed out"));
636
677
  if (started.status === "skipped") return started;
637
678
  const { runId, generation } = started;
@@ -642,7 +683,14 @@ async function runKnowledgeImport(options) {
642
683
  let state = { ...started.state };
643
684
  let buffer = [];
644
685
  let stop;
645
- let hostFailure;
686
+ /** Armed while the buffer holds ops; sends them once the oldest has waited `flushAfterMs`. */
687
+ let flushTimer;
688
+ const disarm = () => {
689
+ clearTimeout(flushTimer);
690
+ flushTimer = void 0;
691
+ };
692
+ /** Why a flush ended the run. Every later flush is refused, so no cursor is saved past its ops. */
693
+ let flushFailure;
646
694
  const controller = new AbortController();
647
695
  let deadlineHit;
648
696
  /** Settles at the hard deadline; never otherwise. */
@@ -653,6 +701,7 @@ async function runKnowledgeImport(options) {
653
701
  const halt = (reason) => {
654
702
  if (reason === "stopped") deadlineHit();
655
703
  stop ??= new RunStop(reason);
704
+ disarm();
656
705
  controller.abort(stop);
657
706
  wake();
658
707
  };
@@ -680,6 +729,7 @@ async function runKnowledgeImport(options) {
680
729
  let flushing = Promise.resolve();
681
730
  /** `settle` sends an empty flush, which only runs the host's next settle slice. */
682
731
  function flush(staged, settle = false) {
732
+ disarm();
683
733
  const ops = buffer;
684
734
  buffer = [];
685
735
  const next = flushing.then(async () => {
@@ -690,7 +740,14 @@ async function runKnowledgeImport(options) {
690
740
  ...staged ? { state: staged } : {}
691
741
  };
692
742
  const seq = lastSeq + 1;
693
- const digest = await knowledgeImporterFlushDigest(body);
743
+ let digest;
744
+ try {
745
+ digest = await knowledgeImporterFlushDigest(body);
746
+ } catch (error) {
747
+ flushFailure = { code: "importer_error" };
748
+ halt("flush");
749
+ throw error;
750
+ }
694
751
  if (stop) throw stop;
695
752
  const request = {
696
753
  runId,
@@ -706,11 +763,11 @@ async function runKnowledgeImport(options) {
706
763
  refused.push(...receipt.refused.slice(0, MAX_RECEIPT_REFUSALS - refused.length));
707
764
  } catch (error) {
708
765
  if (!isRetryable(error)) unsettledSeq = void 0;
709
- hostFailure = {
766
+ flushFailure = {
710
767
  code: "importer_error",
711
768
  retryable: isRetryable(error)
712
769
  };
713
- halt("host");
770
+ halt("flush");
714
771
  throw stop;
715
772
  }
716
773
  unsettledSeq = void 0;
@@ -727,6 +784,10 @@ async function runKnowledgeImport(options) {
727
784
  if (stop) throw stop;
728
785
  buffer.push(op);
729
786
  if (buffer.length >= bufferSize) await flush();
787
+ else if (!flushTimer) {
788
+ flushTimer = setTimeout(() => flush().catch(() => {}), flushAfterMs);
789
+ flushTimer.unref?.();
790
+ }
730
791
  };
731
792
  const finish = async (request) => {
732
793
  const result = await finishRun(host, {
@@ -844,6 +905,7 @@ async function runKnowledgeImport(options) {
844
905
  }
845
906
  } finally {
846
907
  clearInterval(heartbeat);
908
+ disarm();
847
909
  }
848
910
  if (!stop || stop.reason !== "stopped") await Promise.race([flushing, deadlinePassed]);
849
911
  clearTimeout(hardStop);
@@ -856,7 +918,7 @@ async function runKnowledgeImport(options) {
856
918
  backlog: false,
857
919
  error: { code: "stopped" }
858
920
  });
859
- const error = stop?.reason === "host" ? hostFailure : failure;
921
+ const error = stop?.reason === "flush" ? flushFailure : failure;
860
922
  if (error) return finish({
861
923
  outcome: "failed",
862
924
  backlog: false,
@@ -2382,7 +2444,7 @@ function createLocalKnowledgeImporterHost(writer, options) {
2382
2444
  });
2383
2445
  await reclaimStaleRuns(importers, binding.id);
2384
2446
  if (start?.admit) try {
2385
- await start.admit(tx);
2447
+ await start.admit(unwrapKnowledgeStorage(tx));
2386
2448
  } catch (error) {
2387
2449
  throw new AdmitRefusal(error);
2388
2450
  }
@@ -4292,8 +4354,8 @@ var Knowledge = class extends require_base.MastraBase {
4292
4354
  }
4293
4355
  /**
4294
4356
  * Calls `listener` after each committed write made through this instance's store
4295
- * (`getStorage()`): tool writes, host writes and scope creation. Writes made on a store obtained
4296
- * some other way aren't seen. Events carry ids, not content and not access: anything that relays
4357
+ * (`getStorage()`): tool writes, host writes, importer runs and scope creation. Writes in a
4358
+ * transaction are reported once it commits. Writes made on a store obtained some other way aren't seen. Events carry ids, not content and not access: anything that relays
4297
4359
  * them to people must re-read each page under that person's read scope. Returns an unsubscribe.
4298
4360
  */
4299
4361
  onChange(listener) {
@@ -222,8 +222,8 @@ export declare class Knowledge extends MastraBase {
222
222
  getStorage(): Promise<KnowledgeStorage>;
223
223
  /**
224
224
  * Calls `listener` after each committed write made through this instance's store
225
- * (`getStorage()`): tool writes, host writes and scope creation. Writes made on a store obtained
226
- * some other way aren't seen. Events carry ids, not content and not access: anything that relays
225
+ * (`getStorage()`): tool writes, host writes, importer runs and scope creation. Writes in a
226
+ * transaction are reported once it commits. Writes made on a store obtained some other way aren't seen. Events carry ids, not content and not access: anything that relays
227
227
  * them to people must re-read each page under that person's read scope. Returns an unsubscribe.
228
228
  */
229
229
  onChange(listener: KnowledgeChangeListener): () => void;
@@ -1,5 +1,5 @@
1
1
  import { t as MastraBase } from "../base-CKLWBhDo.js";
2
- import { $n as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, $t as knowledgeDeliveredPins, Ai as assertKnowledgeNoteTextWithinBound, Ci as MAX_KNOWLEDGE_PAGE_BODY_LINKS, Cn as knowledgeRunScopes, Di as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, Dn as encodeKnowledgeScopeId, Ei as MAX_KNOWLEDGE_PAGE_LINKS, En as decodeKnowledgeScopeId, Fi as knowledgePinDepth, Ii as knowledgePositionBetween, Io as augmentWithInit, Li as knowledgeScopeReadable, Lo as getStorageSource, Mi as canonicalKnowledgeName, Ni as knowledgeLinkRefKey, Oi as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, On as buildKnowledgeInstructions, Pi as knowledgePagePath, Qt as PINNED_READ_MEMO_KEY, Ri as parseKnowledgePageRef, Si as MAX_KNOWLEDGE_NOTE_TOKENS, Sn as knowledgeMemoryScopes, Ti as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, Tn as strongerKnowledgeRole, _i as KnowledgeMoveTooLargeError, _n as knowledgeAccessGrants, ai as KNOWLEDGE_STORAGE_CONTRACT_VERSION, an as removeKnowledgeNote, ar as assertKnowledgeScopeWithinCeiling, bi as KnowledgePageKeyConflictError, bn as KnowledgeDeclarationError, ci as KnowledgeNotFoundError, cn as upsertKnowledgePage, cr as expandKnowledgeScope, di as KnowledgeTransactionDeadlineError, dn as KnowledgeLinkRefreshIncompleteError, dr as knowledgeSemanticDocumentId, en as buildKnowledgePageTools, er as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, fi as KnowledgeUnsupportedCapabilityError, fn as knowledgeSubtree, fr as knowledgeSemanticIdempotencyKey, gi as parseKnowledgeWikilinks, gn as updateKnowledgeLinks, hi as inspectKnowledgeSchema, hn as syncKnowledgePageBodyLinks, ii as KnowledgeImportersStorage, in as moveKnowledgePage, ir as assertKnowledgeRecordTextWithinBound, ji as assertKnowledgePageDescriptionWithinBound, ki as MAX_KNOWLEDGE_PIN_LIST_DEPTH, li as KnowledgeSchemaResetRequiredError, ln as KnowledgeSemanticIndex, lr as isKnowledgeScopeVisible, mi as createKnowledgeUlid, mn as reindexKnowledgeLinks, mr as parseKnowledgeNodeCursor, ni as KnowledgeImporterBindingConflictError, nn as knowledgeRunPrincipals, nr as assertKnowledgeCeilingRaised, oi as KNOWLEDGE_STORAGE_SCHEMA_VERSION, on as removeKnowledgePage, or as canonicalizeKnowledgeScope, pi as assertKnowledgeSchemaCompatible, pn as refreshKnowledgeLinksTo, pr as knowledgeVisibleScopeKeys, ri as KnowledgeImporterRunStateError, rn as addKnowledgeNote, rr as assertKnowledgeDescriptionWithinBound, si as KnowledgeConflictError, sn as updateKnowledgeNote, sr as createKnowledgeNodeCursor, ti as InMemoryKnowledgeStorage, tn as KnowledgeRun, tr as MAX_KNOWLEDGE_SCOPE_TAGS, ui as KnowledgeStorage, ur as knowledgeScopeKey, vi as KnowledgePageDepthError, vn as knowledgeReadScopeFor, wi as MAX_KNOWLEDGE_PAGE_DEPTH, wn as knowledgeScopeAddress, xi as MAX_KNOWLEDGE_MOVE_PAGES, xn as compileKnowledgeScopes, yi as KnowledgePageHasChildrenError, yn as knowledgeRoleOn, zi as KnowledgeInvalidCursorError } from "../run-registry-BwEcwYlU.js";
2
+ import { Ai as MAX_KNOWLEDGE_PAGE_LINKS, An as buildKnowledgeInstructions, Bi as knowledgePositionBetween, Bo as augmentWithInit, Ci as KnowledgePageHasChildrenError, Cn as compileKnowledgeScopes, Di as MAX_KNOWLEDGE_PAGE_BODY_LINKS, Dn as strongerKnowledgeRole, Ei as MAX_KNOWLEDGE_NOTE_TOKENS, En as knowledgeScopeAddress, Fi as assertKnowledgePageDescriptionWithinBound, Hi as parseKnowledgePageRef, Ii as canonicalKnowledgeName, Li as knowledgeLinkRefKey, Mi as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Ni as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Oi as MAX_KNOWLEDGE_PAGE_DEPTH, On as decodeKnowledgeScopeId, Pi as assertKnowledgeNoteTextWithinBound, Ri as knowledgePagePath, Si as KnowledgePageDepthError, Sn as KnowledgeDeclarationError, Ti as MAX_KNOWLEDGE_MOVE_PAGES, Tn as knowledgeRunScopes, Ui as KnowledgeInvalidCursorError, Vi as knowledgeScopeReadable, Vo as getStorageSource, _i as assertKnowledgeSchemaCompatible, _n as syncKnowledgePageBodyLinks, _r as knowledgeVisibleScopeKeys, ai as InMemoryKnowledgeStorage, an as addKnowledgeNote, ar as MAX_KNOWLEDGE_SCOPE_TAGS, bi as parseKnowledgeWikilinks, bn as knowledgeReadScopeFor, ci as KnowledgeImportersStorage, cn as removeKnowledgePage, cr as assertKnowledgeRecordTextWithinBound, di as KnowledgeConflictError, dn as KnowledgeSemanticIndex, dr as createKnowledgeNodeCursor, en as PINNED_READ_MEMO_KEY, fi as KnowledgeNotFoundError, fr as expandKnowledgeScope, gi as KnowledgeUnsupportedCapabilityError, gn as reindexKnowledgeLinks, gr as knowledgeSemanticIdempotencyKey, hi as KnowledgeTransactionDeadlineError, hn as refreshKnowledgeLinksTo, hr as knowledgeSemanticDocumentId, in as knowledgeRunPrincipals, ir as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, ji as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, ki as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, kn as encodeKnowledgeScopeId, li as KNOWLEDGE_STORAGE_CONTRACT_VERSION, ln as updateKnowledgeNote, lr as assertKnowledgeScopeWithinCeiling, mi as KnowledgeStorage, mn as knowledgeSubtree, mr as knowledgeScopeKey, nn as buildKnowledgePageTools, oi as KnowledgeImporterBindingConflictError, on as moveKnowledgePage, or as assertKnowledgeCeilingRaised, pi as KnowledgeSchemaResetRequiredError, pn as KnowledgeLinkRefreshIncompleteError, pr as isKnowledgeScopeVisible, rn as KnowledgeRun, rr as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, si as KnowledgeImporterRunStateError, sn as removeKnowledgeNote, sr as assertKnowledgeDescriptionWithinBound, tn as knowledgeDeliveredPins, ui as KNOWLEDGE_STORAGE_SCHEMA_VERSION, un as upsertKnowledgePage, ur as canonicalizeKnowledgeScope, vi as createKnowledgeUlid, vn as updateKnowledgeLinks, vr as parseKnowledgeNodeCursor, wi as KnowledgePageKeyConflictError, wn as knowledgeMemoryScopes, xi as KnowledgeMoveTooLargeError, xn as knowledgeRoleOn, yi as inspectKnowledgeSchema, yn as knowledgeAccessGrants, zi as knowledgePinDepth } from "../run-registry-DdeEBsVW.js";
3
3
  import { standardSchemaToJSONSchema, toStandardSchema } from "../schema/index.js";
4
4
  import { i as createStandardSchemaIssuesError } from "../tool-Z3bykc1m.js";
5
5
  import { randomUUID } from "crypto";
@@ -78,15 +78,55 @@ const MOVED_PAGE = {
78
78
  mergePages: (input) => input.sourceId
79
79
  };
80
80
  /**
81
- * Wraps `storage` so each page-store write in {@link WRITES} calls `emit` after it resolves. Every
82
- * other member passes through, bound to the real store so adapters' private fields keep working.
83
- * Nothing extra happens while `listening()` is false. Describing or emitting an event never fails a
84
- * write that committed: errors go to `onError`.
81
+ * A view {@link emitKnowledgeChanges} returned answers this key with the store it wraps, so helpers
82
+ * that find a view by identity (`pgKnowledgeTransactionClient`) can look through it. `Symbol.for`, so
83
+ * a store package reads it without importing a newer core.
85
84
  */
86
- function emitKnowledgeChanges(storage, emit, listening, onError) {
85
+ const UNWRAP = Symbol.for("mastra.knowledge.unwrap");
86
+ /** The adapter's own store or transaction view under one {@link emitKnowledgeChanges} returned. Writes through it emit nothing. */
87
+ function unwrapKnowledgeStorage(storage) {
88
+ return storage[UNWRAP] ?? storage;
89
+ }
90
+ /**
91
+ * Wraps `storage` so each page-store write in {@link WRITES} calls `emit` after it resolves. Writes
92
+ * on a `transaction` view are held until that transaction commits and dropped if it rolls back; a
93
+ * nested `transaction` hands its writes to the outer one when it succeeds. While a nested
94
+ * transaction is open, writes through any view of that transaction chain belong to the innermost
95
+ * one (they run inside its savepoint), so they are kept or dropped with it. A chain tracks one
96
+ * innermost transaction, so concurrent nested transactions opened in the same chain are not
97
+ * supported: their events would cross. Every other member passes
98
+ * through, bound to the real store so adapters' private fields keep working. Nothing extra happens
99
+ * while `listening()` is false. Describing or emitting an event never fails a write that committed:
100
+ * errors go to `onError`.
101
+ */
102
+ function emitKnowledgeChanges(storage, emit, listening, onError, chain) {
103
+ const report = (change) => (chain ? chain.report : emit)(change);
87
104
  return new Proxy(storage, { get(target, property) {
105
+ if (property === UNWRAP) return target;
88
106
  const value = Reflect.get(target, property, target);
89
107
  if (typeof value !== "function") return value;
108
+ if (property === "transaction") return async (operation, ...rest) => {
109
+ let held = [];
110
+ const hold = (change) => void held.push(change);
111
+ const shared = chain ?? { report: hold };
112
+ const outer = shared.report;
113
+ let result;
114
+ try {
115
+ result = await value.call(target, (tx) => {
116
+ held = [];
117
+ shared.report = hold;
118
+ return operation(emitKnowledgeChanges(tx, hold, listening, onError, shared));
119
+ }, ...rest);
120
+ } finally {
121
+ shared.report = outer;
122
+ }
123
+ for (const change of held) try {
124
+ report(change);
125
+ } catch (error) {
126
+ onError(error);
127
+ }
128
+ return result;
129
+ };
90
130
  const describe = typeof property === "string" ? WRITES[property] : void 0;
91
131
  if (!describe) return value.bind(target);
92
132
  const moved = typeof property === "string" ? MOVED_PAGE[property] : void 0;
@@ -104,7 +144,7 @@ function emitKnowledgeChanges(storage, emit, listening, onError) {
104
144
  if (!listening()) return result;
105
145
  try {
106
146
  const change = describe(result, input, fromScopeId);
107
- if (change) emit(change);
147
+ if (change) report(change);
108
148
  } catch (error) {
109
149
  onError(error);
110
150
  }
@@ -630,7 +670,8 @@ function sourceError(error) {
630
670
  * @experimental
631
671
  */
632
672
  async function runKnowledgeImport(options) {
633
- const { host, budgetMs = 15e5, graceMs = 18e4, maxPasses = 200, bufferSize = 200, heartbeatMs = 3e4, maxRetries = 8, hostCallTimeoutMs = 6e4, retryDelayMs = (attempt) => Math.min(250 * 2 ** attempt, 1e4) } = options;
673
+ const { host, budgetMs = 15e5, graceMs = 18e4, maxPasses = 200, bufferSize = 200, flushAfterMs = 3e4, heartbeatMs = 3e4, maxRetries = 8, hostCallTimeoutMs = 6e4, retryDelayMs = (attempt) => Math.min(250 * 2 ** attempt, 1e4) } = options;
674
+ if (!Number.isFinite(flushAfterMs) || flushAfterMs <= 0 || flushAfterMs > 2 ** 31 - 1) throw new TypeError(`flushAfterMs must be a positive number of milliseconds up to 2147483647, got ${flushAfterMs}`);
634
675
  const started = await within(host.startRun(options.bindingId, options.start), hostCallTimeoutMs, () => new KnowledgeImporterHostError("host call timed out"));
635
676
  if (started.status === "skipped") return started;
636
677
  const { runId, generation } = started;
@@ -641,7 +682,14 @@ async function runKnowledgeImport(options) {
641
682
  let state = { ...started.state };
642
683
  let buffer = [];
643
684
  let stop;
644
- let hostFailure;
685
+ /** Armed while the buffer holds ops; sends them once the oldest has waited `flushAfterMs`. */
686
+ let flushTimer;
687
+ const disarm = () => {
688
+ clearTimeout(flushTimer);
689
+ flushTimer = void 0;
690
+ };
691
+ /** Why a flush ended the run. Every later flush is refused, so no cursor is saved past its ops. */
692
+ let flushFailure;
645
693
  const controller = new AbortController();
646
694
  let deadlineHit;
647
695
  /** Settles at the hard deadline; never otherwise. */
@@ -652,6 +700,7 @@ async function runKnowledgeImport(options) {
652
700
  const halt = (reason) => {
653
701
  if (reason === "stopped") deadlineHit();
654
702
  stop ??= new RunStop(reason);
703
+ disarm();
655
704
  controller.abort(stop);
656
705
  wake();
657
706
  };
@@ -679,6 +728,7 @@ async function runKnowledgeImport(options) {
679
728
  let flushing = Promise.resolve();
680
729
  /** `settle` sends an empty flush, which only runs the host's next settle slice. */
681
730
  function flush(staged, settle = false) {
731
+ disarm();
682
732
  const ops = buffer;
683
733
  buffer = [];
684
734
  const next = flushing.then(async () => {
@@ -689,7 +739,14 @@ async function runKnowledgeImport(options) {
689
739
  ...staged ? { state: staged } : {}
690
740
  };
691
741
  const seq = lastSeq + 1;
692
- const digest = await knowledgeImporterFlushDigest(body);
742
+ let digest;
743
+ try {
744
+ digest = await knowledgeImporterFlushDigest(body);
745
+ } catch (error) {
746
+ flushFailure = { code: "importer_error" };
747
+ halt("flush");
748
+ throw error;
749
+ }
693
750
  if (stop) throw stop;
694
751
  const request = {
695
752
  runId,
@@ -705,11 +762,11 @@ async function runKnowledgeImport(options) {
705
762
  refused.push(...receipt.refused.slice(0, MAX_RECEIPT_REFUSALS - refused.length));
706
763
  } catch (error) {
707
764
  if (!isRetryable(error)) unsettledSeq = void 0;
708
- hostFailure = {
765
+ flushFailure = {
709
766
  code: "importer_error",
710
767
  retryable: isRetryable(error)
711
768
  };
712
- halt("host");
769
+ halt("flush");
713
770
  throw stop;
714
771
  }
715
772
  unsettledSeq = void 0;
@@ -726,6 +783,10 @@ async function runKnowledgeImport(options) {
726
783
  if (stop) throw stop;
727
784
  buffer.push(op);
728
785
  if (buffer.length >= bufferSize) await flush();
786
+ else if (!flushTimer) {
787
+ flushTimer = setTimeout(() => flush().catch(() => {}), flushAfterMs);
788
+ flushTimer.unref?.();
789
+ }
729
790
  };
730
791
  const finish = async (request) => {
731
792
  const result = await finishRun(host, {
@@ -843,6 +904,7 @@ async function runKnowledgeImport(options) {
843
904
  }
844
905
  } finally {
845
906
  clearInterval(heartbeat);
907
+ disarm();
846
908
  }
847
909
  if (!stop || stop.reason !== "stopped") await Promise.race([flushing, deadlinePassed]);
848
910
  clearTimeout(hardStop);
@@ -855,7 +917,7 @@ async function runKnowledgeImport(options) {
855
917
  backlog: false,
856
918
  error: { code: "stopped" }
857
919
  });
858
- const error = stop?.reason === "host" ? hostFailure : failure;
920
+ const error = stop?.reason === "flush" ? flushFailure : failure;
859
921
  if (error) return finish({
860
922
  outcome: "failed",
861
923
  backlog: false,
@@ -2381,7 +2443,7 @@ function createLocalKnowledgeImporterHost(writer, options) {
2381
2443
  });
2382
2444
  await reclaimStaleRuns(importers, binding.id);
2383
2445
  if (start?.admit) try {
2384
- await start.admit(tx);
2446
+ await start.admit(unwrapKnowledgeStorage(tx));
2385
2447
  } catch (error) {
2386
2448
  throw new AdmitRefusal(error);
2387
2449
  }
@@ -4291,8 +4353,8 @@ var Knowledge = class extends MastraBase {
4291
4353
  }
4292
4354
  /**
4293
4355
  * Calls `listener` after each committed write made through this instance's store
4294
- * (`getStorage()`): tool writes, host writes and scope creation. Writes made on a store obtained
4295
- * some other way aren't seen. Events carry ids, not content and not access: anything that relays
4356
+ * (`getStorage()`): tool writes, host writes, importer runs and scope creation. Writes in a
4357
+ * transaction are reported once it commits. Writes made on a store obtained some other way aren't seen. Events carry ids, not content and not access: anything that relays
4296
4358
  * them to people must re-read each page under that person's read scope. Returns an unsubscribe.
4297
4359
  */
4298
4360
  onChange(listener) {
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Most estimated tokens of body text a search hit's excerpt shows, before the `…` markers and the
3
+ * heading line. Counted with the same estimator as `knowledge_read`'s budget.
4
+ */
5
+ export declare const KNOWLEDGE_SNIPPET_TOKENS = 60;
6
+ /**
7
+ * The words `knowledge_search` searches for: keyword search has no quoting, so quote marks become
8
+ * spaces (`"refund" policy` searches `refund policy`).
9
+ */
10
+ export declare function knowledgeSearchQuery(query: string): string;
11
+ /** A search hit's view of a page body: an excerpt around the matched words, and where the matches are. */
12
+ export interface KnowledgeBodyHit {
13
+ /** An excerpt of {@link KNOWLEDGE_SNIPPET_TOKENS} tokens, every line numbered as `knowledge_read` numbers lines, with the heading it sits under first when that is out of view. */
14
+ snippet: string;
15
+ /** The line (as `knowledge_read` numbers lines) of the match the excerpt is centred on. */
16
+ line: number;
17
+ /** How many lines contain a matched word. */
18
+ matchingLines: number;
19
+ }
20
+ /**
21
+ * Where `body` matches the query words, or `undefined` when it contains none of them. Uses the same
22
+ * words and the same rule as keyword search (case-insensitive substrings: a body matches exactly
23
+ * when `body.toLowerCase()` contains the word). Each word's first {@link OCCURRENCES_PER_WORD}
24
+ * occurrences anchor candidate windows of {@link KNOWLEDGE_SNIPPET_TOKENS} tokens; the window
25
+ * holding the most distinct words wins, earliest on ties. Lines are counted over the whole body.
26
+ * Cost: a scan per word and one lowercase copy of the body, except for ASCII words in a body with
27
+ * no `İ` or `ſ`, which are matched without lowercasing; offsets are mapped only for actual matches.
28
+ */
29
+ export declare function knowledgeBodyHit(body: string | undefined, query: string): KnowledgeBodyHit | undefined;
30
+ //# sourceMappingURL=search-snippet.d.ts.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_llm = require("../llm-8Av3mSjD.cjs");
3
- const require_netlify = require("../netlify-BAnn3ouY.cjs");
4
- const require_provider_registry = require("../provider-registry-BwuI_IpT.cjs");
2
+ const require_llm = require("../llm-BAiOsNAP.cjs");
3
+ const require_netlify = require("../netlify-D99AnEhW.cjs");
4
+ const require_provider_registry = require("../provider-registry-CO1NVbO5.cjs");
5
5
  exports.AzureOpenAIGateway = require_llm.AzureOpenAIGateway;
6
6
  exports.EMBEDDING_MODELS = require_llm.EMBEDDING_MODELS;
7
7
  exports.GATEWAY_AUTH_HEADER = require_netlify.GATEWAY_AUTH_HEADER;
@@ -1,5 +1,5 @@
1
- import type { EmbedManyResult as AiEmbedManyResult, EmbedResult as AiEmbedResult, CoreAssistantMessage as AiCoreAssistantMessage, CoreMessage as AiCoreMessage, CoreSystemMessage as AiCoreSystemMessage, CoreToolMessage as AiCoreToolMessage, CoreUserMessage as AiCoreUserMessage, UIMessage, streamText, streamObject, generateText, generateObject, StreamTextOnFinishCallback, StreamObjectOnFinishCallback } from '../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js';
2
- import type { SystemModelMessage } from '../_types/@internal_ai-sdk-v5@0.0.98/dist/index.js';
1
+ import type { EmbedManyResult as AiEmbedManyResult, EmbedResult as AiEmbedResult, CoreAssistantMessage as AiCoreAssistantMessage, CoreMessage as AiCoreMessage, CoreSystemMessage as AiCoreSystemMessage, CoreToolMessage as AiCoreToolMessage, CoreUserMessage as AiCoreUserMessage, UIMessage, streamText, streamObject, generateText, generateObject, StreamTextOnFinishCallback, StreamObjectOnFinishCallback } from '../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js';
2
+ import type { SystemModelMessage } from '../_types/@internal_ai-sdk-v5@0.0.99/dist/index.js';
3
3
  import type { ObservabilityContext } from '../observability/index.js';
4
4
  import type { RequestContext } from '../request-context/index.js';
5
5
  import type { Run } from '../run/types.js';
package/dist/llm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as ModelRouterLanguageModel, c as AzureOpenAIGateway, i as resolveModelConfig, l as defaultGateways, n as ModelRouterEmbeddingModel, r as resolveModelAuth, t as EMBEDDING_MODELS } from "../llm-B5A5cwJr.js";
2
- import { c as GATEWAY_AUTH_HEADER, f as findGatewayForModel, p as getGatewayId, r as ModelsDevGateway, t as NetlifyGateway, v as MastraModelGateway } from "../netlify-CuI1ZrwR.js";
3
- import { c as modelSupportsStructuredOutput, f as MastraGateway, i as getProviderConfig, l as modelSupportsTemperature, n as PROVIDER_REGISTRY, r as getModelReasoningOptions, s as modelSupportsAttachments, t as GatewayRegistry, u as parseModelString } from "../provider-registry-CmQLzLF_.js";
1
+ import { a as ModelRouterLanguageModel, c as AzureOpenAIGateway, i as resolveModelConfig, l as defaultGateways, n as ModelRouterEmbeddingModel, r as resolveModelAuth, t as EMBEDDING_MODELS } from "../llm-B1zaFLYZ.js";
2
+ import { c as GATEWAY_AUTH_HEADER, f as findGatewayForModel, p as getGatewayId, r as ModelsDevGateway, t as NetlifyGateway, v as MastraModelGateway } from "../netlify-CfDXkuLf.js";
3
+ import { c as modelSupportsStructuredOutput, f as MastraGateway, i as getProviderConfig, l as modelSupportsTemperature, n as PROVIDER_REGISTRY, r as getModelReasoningOptions, s as modelSupportsAttachments, t as GatewayRegistry, u as parseModelString } from "../provider-registry-CR385GJ4.js";
4
4
  export { AzureOpenAIGateway, EMBEDDING_MODELS, GATEWAY_AUTH_HEADER, GatewayRegistry, MastraGateway, MastraModelGateway, ModelRouterEmbeddingModel, ModelRouterLanguageModel, ModelsDevGateway, NetlifyGateway, PROVIDER_REGISTRY, defaultGateways, findGatewayForModel, getGatewayId, getModelReasoningOptions, getProviderConfig, modelSupportsAttachments, modelSupportsStructuredOutput, modelSupportsTemperature, parseModelString, resolveModelAuth, resolveModelConfig };
@@ -1,4 +1,4 @@
1
- import type { LanguageModelV1, LanguageModelV1CallOptions } from '../../../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js';
1
+ import type { LanguageModelV1, LanguageModelV1CallOptions } from '../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js';
2
2
  /**
3
3
  * Wrapper class for AI SDK v4 (LanguageModelV1) legacy models.
4
4
  *
@@ -34,8 +34,8 @@ export declare class AISDKV4LegacyLanguageModel implements LanguageModelV1 {
34
34
  data: string | Uint8Array;
35
35
  mimeType: string;
36
36
  }>;
37
- toolCalls?: Array<import("../../../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js").LanguageModelV1FunctionToolCall>;
38
- finishReason: import("../../../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js").LanguageModelV1FinishReason;
37
+ toolCalls?: Array<import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1FunctionToolCall>;
38
+ finishReason: import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1FinishReason;
39
39
  usage: {
40
40
  promptTokens: number;
41
41
  completionTokens: number;
@@ -56,13 +56,13 @@ export declare class AISDKV4LegacyLanguageModel implements LanguageModelV1 {
56
56
  timestamp?: Date;
57
57
  modelId?: string;
58
58
  };
59
- warnings?: import("../../../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js").LanguageModelV1CallWarning[];
60
- providerMetadata?: import("../../../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js").LanguageModelV1ProviderMetadata;
61
- sources?: import("../../../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js").LanguageModelV1Source[];
62
- logprobs?: import("../../../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js").LanguageModelV1LogProbs;
59
+ warnings?: import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1CallWarning[];
60
+ providerMetadata?: import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1ProviderMetadata;
61
+ sources?: import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1Source[];
62
+ logprobs?: import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1LogProbs;
63
63
  }>;
64
64
  doStream(options: LanguageModelV1CallOptions): PromiseLike<{
65
- stream: ReadableStream<import("../../../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js").LanguageModelV1StreamPart>;
65
+ stream: ReadableStream<import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1StreamPart>;
66
66
  rawCall: {
67
67
  rawPrompt: unknown;
68
68
  rawSettings: Record<string, unknown>;
@@ -73,7 +73,7 @@ export declare class AISDKV4LegacyLanguageModel implements LanguageModelV1 {
73
73
  request?: {
74
74
  body?: string;
75
75
  };
76
- warnings?: Array<import("../../../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js").LanguageModelV1CallWarning>;
76
+ warnings?: Array<import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1CallWarning>;
77
77
  }>;
78
78
  /**
79
79
  * Custom serialization for tracing/observability spans.
@@ -1,4 +1,4 @@
1
- import type { UIMessage, CoreMessage, GenerateTextResult as OriginalGenerateTextResult, GenerateObjectResult as OriginalGenerateObjectResult, StreamTextResult as OriginalStreamTextResult, StreamObjectResult as OriginalStreamObjectResult, generateText, generateObject, streamText, streamObject, StreamObjectOnFinishCallback as OriginalStreamObjectOnFinishCallback, StreamTextOnFinishCallback as OriginalStreamTextOnFinishCallback, StreamTextOnStepFinishCallback as OriginalStreamTextOnStepFinishCallback, GenerateTextOnStepFinishCallback as OriginalGenerateTextOnStepFinishCallback, Tool, ToolSet, DeepPartial } from '../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js';
1
+ import type { UIMessage, CoreMessage, GenerateTextResult as OriginalGenerateTextResult, GenerateObjectResult as OriginalGenerateObjectResult, StreamTextResult as OriginalStreamTextResult, StreamObjectResult as OriginalStreamObjectResult, generateText, generateObject, streamText, streamObject, StreamObjectOnFinishCallback as OriginalStreamObjectOnFinishCallback, StreamTextOnFinishCallback as OriginalStreamTextOnFinishCallback, StreamTextOnStepFinishCallback as OriginalStreamTextOnStepFinishCallback, GenerateTextOnStepFinishCallback as OriginalGenerateTextOnStepFinishCallback, Tool, ToolSet, DeepPartial } from '../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js';
2
2
  import type { JSONSchema7 } from 'json-schema';
3
3
  import type { MessageList } from '../../agent/types.js';
4
4
  import type { ScorerRunInputForAgent, ScorerRunOutputForAgent } from '../../evals/index.js';
@@ -7,7 +7,7 @@ import type { OutputProcessorOrWorkflow } from '../../processors/index.js';
7
7
  import type { RequestContext } from '../../request-context/index.js';
8
8
  import type { ZodSchema } from '../../schema/index.js';
9
9
  import type { inferOutput, ScoringProperties, TripwireProperties } from './shared.types.js';
10
- export type { ToolSet } from '../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js';
10
+ export type { ToolSet } from '../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js';
11
11
  type MastraCustomLLMOptions = ObservabilityContext & {
12
12
  tools?: Record<string, Tool>;
13
13
  threadId?: string;
@@ -1,4 +1,4 @@
1
- import type { EmbeddingModel } from '../../_types/@internal_ai-sdk-v5@0.0.98/dist/index.js';
1
+ import type { EmbeddingModel } from '../../_types/@internal_ai-sdk-v5@0.0.99/dist/index.js';
2
2
  type EmbeddingModelV2<VALUE> = Exclude<EmbeddingModel<VALUE>, string>;
3
3
  import type { OpenAICompatibleConfig } from './shared.types.js';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import type { CallSettings } from '../../_types/@internal_ai-sdk-v5@0.0.98/dist/index.js';
1
+ import type { CallSettings } from '../../_types/@internal_ai-sdk-v5@0.0.99/dist/index.js';
2
2
  import type { ReasoningLevel } from '../../loop/types.js';
3
3
  /**
4
4
  * Time-based execution budget for an agent run.
@@ -1,4 +1,4 @@
1
- import type { CoreMessage, LanguageModelV1 as LanguageModel } from '../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js';
1
+ import type { CoreMessage, LanguageModelV1 as LanguageModel } from '../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js';
2
2
  import type { JSONSchema7 } from '@mastra/schema-compat';
3
3
  import type { MastraPrimitives } from '../../action/index.js';
4
4
  import { MastraBase } from '../../base.js';
@@ -1,4 +1,4 @@
1
- import type { ModelMessage, ToolSet } from '../../_types/@internal_ai-sdk-v5@0.0.98/dist/index.js';
1
+ import type { ModelMessage, ToolSet } from '../../_types/@internal_ai-sdk-v5@0.0.99/dist/index.js';
2
2
  import type { MastraPrimitives } from '../../action/index.js';
3
3
  import { MastraBase } from '../../base.js';
4
4
  import type { Mastra } from '../../mastra/index.js';
@@ -1,4 +1,4 @@
1
- import type { ToolSet, DeepPartial, streamText, StreamTextOnFinishCallback as OriginalStreamTextOnFinishCallback, StreamTextOnStepFinishCallback as OriginalStreamTextOnStepFinishCallback, ModelMessage, UIMessage } from '../../_types/@internal_ai-sdk-v5@0.0.98/dist/index.js';
1
+ import type { ToolSet, DeepPartial, streamText, StreamTextOnFinishCallback as OriginalStreamTextOnFinishCallback, StreamTextOnStepFinishCallback as OriginalStreamTextOnStepFinishCallback, ModelMessage, UIMessage } from '../../_types/@internal_ai-sdk-v5@0.0.99/dist/index.js';
2
2
  import type { JSONSchema7 } from 'json-schema';
3
3
  import type { MessageList } from '../../agent/index.js';
4
4
  import type { LoopOptions } from '../../loop/types.js';