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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (459) hide show
  1. package/dist/_types/@internal_core@0.1.4/dist/knowledge-compat/index.d.ts +363 -0
  2. package/dist/a2a/index.cjs +1 -1
  3. package/dist/a2a/index.js +1 -1
  4. package/dist/agent/agent.d.ts +12 -0
  5. package/dist/agent/durable/index.cjs +1 -13
  6. package/dist/agent/durable/index.js +1 -13
  7. package/dist/agent/durable/preparation.d.ts +2 -0
  8. package/dist/agent/durable/utils/resolve-runtime.d.ts +9 -0
  9. package/dist/agent/durable/workflows/durable-loop-builder.d.ts +4 -0
  10. package/dist/agent/durable/workflows/finalize-run.d.ts +3 -1
  11. package/dist/agent/durable/workflows/steps/llm-execution.d.ts +1 -0
  12. package/dist/agent/index.cjs +3 -3
  13. package/dist/agent/index.js +3 -3
  14. package/dist/agent/message-list/index.cjs +1 -1
  15. package/dist/agent/message-list/index.js +1 -1
  16. package/dist/agent/message-list/message-list.d.ts +11 -0
  17. package/dist/agent/message-list/utils/provider-compat.d.ts +1 -0
  18. package/dist/agent/request-context-snapshot.d.ts +1 -1
  19. package/dist/agent/streams/types.d.ts +10 -0
  20. package/dist/agent/thread-stream-runtime.d.ts +5 -0
  21. package/dist/agent-builder/ee/index.cjs +1 -1
  22. package/dist/agent-builder/ee/index.js +1 -1
  23. package/dist/agent-controller/index.cjs +1 -1
  24. package/dist/agent-controller/index.js +1 -1
  25. package/dist/{agent-controller-DEPayioq.cjs → agent-controller-CrQ9OF80.cjs} +7 -7
  26. package/dist/{agent-controller-B7POPub5.js → agent-controller-SSlKzE6A.js} +7 -7
  27. package/dist/background-tasks/index.cjs +1 -1
  28. package/dist/background-tasks/index.js +1 -1
  29. package/dist/{background-tasks-7iftnRK_.cjs → background-tasks-BDrYBis-.cjs} +5 -3
  30. package/dist/{background-tasks-Cv1ecD6S.js → background-tasks-BnJfNLFo.js} +5 -3
  31. package/dist/browser/index.cjs +2 -2
  32. package/dist/browser/index.js +2 -2
  33. package/dist/{builder-Gg-xnX_E.js → builder-Cl-0BWkh.js} +2 -2
  34. package/dist/{builder-DuJBbQDH.cjs → builder-Cw8u3pPl.cjs} +2 -2
  35. package/dist/capabilities/302ai.json +204 -204
  36. package/dist/capabilities/abliteratedllm.json +30 -30
  37. package/dist/capabilities/above.json +21 -21
  38. package/dist/capabilities/adaption.json +15 -15
  39. package/dist/capabilities/adzuki.json +24 -24
  40. package/dist/capabilities/agentrouter.json +9 -9
  41. package/dist/capabilities/agnes.json +3 -3
  42. package/dist/capabilities/ai-router.json +8 -8
  43. package/dist/capabilities/aiand.json +31 -23
  44. package/dist/capabilities/aigrow.json +14 -14
  45. package/dist/capabilities/aimlapi.json +144 -147
  46. package/dist/capabilities/aipg.json +2 -2
  47. package/dist/capabilities/aixy.json +21 -21
  48. package/dist/capabilities/aki-io.json +10 -10
  49. package/dist/capabilities/alibaba-cn.json +136 -117
  50. package/dist/capabilities/alibaba-coding-plan-cn.json +7 -19
  51. package/dist/capabilities/alibaba-coding-plan.json +7 -19
  52. package/dist/capabilities/alibaba-token-plan-cn.json +49 -67
  53. package/dist/capabilities/alibaba-token-plan.json +50 -68
  54. package/dist/capabilities/alibaba.json +72 -119
  55. package/dist/capabilities/ambient.json +8 -8
  56. package/dist/capabilities/amd.json +10 -10
  57. package/dist/capabilities/anthropic.json +47 -47
  58. package/dist/capabilities/anyapi.json +19 -19
  59. package/dist/capabilities/apiko.json +5 -5
  60. package/dist/capabilities/arcee.json +11 -11
  61. package/dist/capabilities/augure.json +2 -2
  62. package/dist/capabilities/auriko.json +23 -23
  63. package/dist/capabilities/bailing.json +4 -4
  64. package/dist/capabilities/baseten.json +55 -25
  65. package/dist/capabilities/bee.json +4 -4
  66. package/dist/capabilities/berget.json +5 -5
  67. package/dist/capabilities/bothub.json +17 -17
  68. package/dist/capabilities/boundless.json +37 -37
  69. package/dist/capabilities/bumo.json +41 -41
  70. package/dist/capabilities/byteplus.json +26 -26
  71. package/dist/capabilities/cerebras.json +4 -4
  72. package/dist/capabilities/cheapaimodel.json +3 -3
  73. package/dist/capabilities/cheapest-token.json +30 -30
  74. package/dist/capabilities/chutes.json +10 -10
  75. package/dist/capabilities/cline-pass.json +39 -39
  76. package/dist/capabilities/cloudcode.json +9 -9
  77. package/dist/capabilities/cloudferro-sherlock.json +4 -4
  78. package/dist/capabilities/cloudflare-workers-ai.json +33 -33
  79. package/dist/capabilities/commandcode.json +139 -139
  80. package/dist/capabilities/concentrate.json +274 -274
  81. package/dist/capabilities/cortecs.json +108 -108
  82. package/dist/capabilities/crossmodel.json +189 -189
  83. package/dist/capabilities/crusoe.json +10 -10
  84. package/dist/capabilities/daoxe.json +9 -9
  85. package/dist/capabilities/databricks.json +315 -59
  86. package/dist/capabilities/deepinfra.json +90 -155
  87. package/dist/capabilities/deepseek.json +2 -2
  88. package/dist/capabilities/digitalocean.json +114 -114
  89. package/dist/capabilities/dothoosh.json +34 -34
  90. package/dist/capabilities/doubleword.json +28 -28
  91. package/dist/capabilities/edenai.json +433 -433
  92. package/dist/capabilities/empiriolabs.json +176 -176
  93. package/dist/capabilities/engy.json +17 -17
  94. package/dist/capabilities/entrim.json +6 -6
  95. package/dist/capabilities/evroc.json +13 -13
  96. package/dist/capabilities/ezkielyna.json +12 -12
  97. package/dist/capabilities/fastrouter.json +88 -88
  98. package/dist/capabilities/fireworks-ai.json +104 -41
  99. package/dist/capabilities/freemodel.json +20 -20
  100. package/dist/capabilities/friendli.json +9 -9
  101. package/dist/capabilities/frogbot.json +93 -93
  102. package/dist/capabilities/gisoo.json +19 -19
  103. package/dist/capabilities/gmicloud.json +21 -21
  104. package/dist/capabilities/google.json +55 -55
  105. package/dist/capabilities/graphn.json +11 -11
  106. package/dist/capabilities/greenpt.json +36 -36
  107. package/dist/capabilities/groq.json +9 -9
  108. package/dist/capabilities/helicone.json +83 -83
  109. package/dist/capabilities/hostinger-router.json +13 -13
  110. package/dist/capabilities/hpc-ai.json +8 -8
  111. package/dist/capabilities/huawei-maas.json +17 -17
  112. package/dist/capabilities/hubris.json +28 -28
  113. package/dist/capabilities/huggingface.json +200 -53
  114. package/dist/capabilities/humain.json +2 -2
  115. package/dist/capabilities/hyper.json +26 -26
  116. package/dist/capabilities/impossibl.json +127 -127
  117. package/dist/capabilities/inception.json +2 -2
  118. package/dist/capabilities/inceptron.json +8 -8
  119. package/dist/capabilities/inco.json +4 -4
  120. package/dist/capabilities/infer.json +14 -14
  121. package/dist/capabilities/inference-coop.json +15 -15
  122. package/dist/capabilities/inferenceapis.json +22 -22
  123. package/dist/capabilities/inferris.json +3 -3
  124. package/dist/capabilities/infersia.json +9 -9
  125. package/dist/capabilities/inferx.json +3 -3
  126. package/dist/capabilities/infomaniak.json +4 -4
  127. package/dist/capabilities/io-net.json +5 -5
  128. package/dist/capabilities/isoquant.json +4 -4
  129. package/dist/capabilities/iteracompute.json +51 -51
  130. package/dist/capabilities/jalapeno.json +12 -12
  131. package/dist/capabilities/jiekou.json +65 -65
  132. package/dist/capabilities/joingonka.json +4 -4
  133. package/dist/capabilities/jzstoken.json +54 -54
  134. package/dist/capabilities/keln.json +21 -28
  135. package/dist/capabilities/kenari.json +124 -121
  136. package/dist/capabilities/kilo.json +635 -636
  137. package/dist/capabilities/kimi-code-plan-cn.json +6 -6
  138. package/dist/capabilities/kimi-code-plan-global.json +6 -6
  139. package/dist/capabilities/kitani.json +4 -4
  140. package/dist/capabilities/klavo.json +13 -13
  141. package/dist/capabilities/korouter.json +31 -31
  142. package/dist/capabilities/kunavo.json +9 -9
  143. package/dist/capabilities/liquid.json +10 -10
  144. package/dist/capabilities/llmgateway-providers.json +909 -909
  145. package/dist/capabilities/llmgateway.json +333 -333
  146. package/dist/capabilities/llmtr.json +19 -19
  147. package/dist/capabilities/logits.json +2 -2
  148. package/dist/capabilities/longcat.json +1 -6
  149. package/dist/capabilities/lowrouter.json +52 -52
  150. package/dist/capabilities/lyceum.json +7 -7
  151. package/dist/capabilities/melious.json +16 -16
  152. package/dist/capabilities/merge-gateway.json +275 -275
  153. package/dist/capabilities/meta.json +9 -9
  154. package/dist/capabilities/minimax-cn-coding-plan.json +6 -6
  155. package/dist/capabilities/minimax-coding-plan.json +6 -6
  156. package/dist/capabilities/mistral.json +18 -18
  157. package/dist/capabilities/mixlayer.json +5 -5
  158. package/dist/capabilities/modal.json +13 -13
  159. package/dist/capabilities/model-oracle-ai.json +26 -26
  160. package/dist/capabilities/modelis.json +24 -24
  161. package/dist/capabilities/modelscope.json +2 -2
  162. package/dist/capabilities/modular.json +9 -9
  163. package/dist/capabilities/moneo.json +14 -14
  164. package/dist/capabilities/moonshotai-cn.json +6 -6
  165. package/dist/capabilities/moonshotai.json +6 -6
  166. package/dist/capabilities/morph.json +13 -13
  167. package/dist/capabilities/munito-eu.json +6 -6
  168. package/dist/capabilities/munito.json +10 -10
  169. package/dist/capabilities/nan.json +24 -24
  170. package/dist/capabilities/nano-gpt.json +577 -577
  171. package/dist/capabilities/nearai.json +82 -82
  172. package/dist/capabilities/nebius.json +29 -29
  173. package/dist/capabilities/neon.json +134 -134
  174. package/dist/capabilities/neuralwatt.json +43 -43
  175. package/dist/capabilities/nokeep.json +4 -4
  176. package/dist/capabilities/novita-ai.json +135 -135
  177. package/dist/capabilities/nvidia.json +38 -38
  178. package/dist/capabilities/oathbreaker.json +2 -2
  179. package/dist/capabilities/obscurify.json +26 -26
  180. package/dist/capabilities/oci.json +5 -5
  181. package/dist/capabilities/ofox.json +338 -338
  182. package/dist/capabilities/ollama-cloud.json +55 -55
  183. package/dist/capabilities/openai.json +48 -48
  184. package/dist/capabilities/opencode-go.json +81 -81
  185. package/dist/capabilities/openreason.json +5 -5
  186. package/dist/capabilities/openrouter.json +548 -563
  187. package/dist/capabilities/opper.json +23 -23
  188. package/dist/capabilities/orcarouter.json +212 -212
  189. package/dist/capabilities/outerlabs.json +30 -30
  190. package/dist/capabilities/ovhcloud.json +8 -8
  191. package/dist/capabilities/pareto.json +5 -5
  192. package/dist/capabilities/pendra.json +4 -4
  193. package/dist/capabilities/perplexity-agent.json +59 -59
  194. package/dist/capabilities/perplexity.json +2 -2
  195. package/dist/capabilities/phala.json +27 -27
  196. package/dist/capabilities/pioneer.json +24 -24
  197. package/dist/capabilities/poe.json +136 -136
  198. package/dist/capabilities/powerspring.json +14 -14
  199. package/dist/capabilities/primalabs.json +7 -7
  200. package/dist/capabilities/prime.json +108 -108
  201. package/dist/capabilities/privatemode-ai.json +12 -12
  202. package/dist/capabilities/proxystacks.json +6 -6
  203. package/dist/capabilities/qiniu-ai.json +15 -15
  204. package/dist/capabilities/refuseless.json +9 -9
  205. package/dist/capabilities/regolo-ai.json +6 -6
  206. package/dist/capabilities/requesty.json +171 -171
  207. package/dist/capabilities/ruapi.json +20 -20
  208. package/dist/capabilities/runcrate.json +16 -16
  209. package/dist/capabilities/runinfra.json +17 -17
  210. package/dist/capabilities/sakana.json +6 -6
  211. package/dist/capabilities/sambanova.json +6 -6
  212. package/dist/capabilities/sandbase.json +16 -16
  213. package/dist/capabilities/sarvam.json +12 -12
  214. package/dist/capabilities/scaleway.json +17 -17
  215. package/dist/capabilities/scnet-token-plan.json +8 -8
  216. package/dist/capabilities/scx-ai.json +29 -29
  217. package/dist/capabilities/sensenova.json +14 -14
  218. package/dist/capabilities/siliconflow-cn.json +61 -61
  219. package/dist/capabilities/siliconflow.json +57 -57
  220. package/dist/capabilities/snowflake-cortex.json +24 -24
  221. package/dist/capabilities/sokkan.json +10 -10
  222. package/dist/capabilities/sparrowcodes.json +24 -24
  223. package/dist/capabilities/standardcompute.json +89 -89
  224. package/dist/capabilities/steadyrouter.json +38 -38
  225. package/dist/capabilities/stepfun-ai-step-plan.json +7 -7
  226. package/dist/capabilities/stepfun-ai.json +16 -9
  227. package/dist/capabilities/stepfun-step-plan.json +16 -9
  228. package/dist/capabilities/stepfun.json +16 -9
  229. package/dist/capabilities/stepping-stone.json +18 -18
  230. package/dist/capabilities/subconscious.json +2 -2
  231. package/dist/capabilities/synthetic.json +12 -12
  232. package/dist/capabilities/synthorai.json +26 -26
  233. package/dist/capabilities/teamorouter.json +21 -21
  234. package/dist/capabilities/teapot-router.json +9 -9
  235. package/dist/capabilities/tencent-coding-plan.json +1 -23
  236. package/dist/capabilities/tencent-token-plan.json +57 -20
  237. package/dist/capabilities/tencent-tokenhub.json +182 -7
  238. package/dist/capabilities/tensorx.json +36 -36
  239. package/dist/capabilities/the-grid-ai.json +29 -29
  240. package/dist/capabilities/thinkingmachines.json +73 -56
  241. package/dist/capabilities/tinfoil.json +9 -9
  242. package/dist/capabilities/toapis.json +3 -3
  243. package/dist/capabilities/togetherai.json +61 -90
  244. package/dist/capabilities/tokengo.json +21 -21
  245. package/dist/capabilities/tokenify.json +9 -9
  246. package/dist/capabilities/trustedrouter.json +7 -7
  247. package/dist/capabilities/trustedtokens.json +14 -14
  248. package/dist/capabilities/umans-ai-coding-plan.json +13 -13
  249. package/dist/capabilities/umans-ai.json +10 -10
  250. package/dist/capabilities/uncensuredai.json +4 -4
  251. package/dist/capabilities/unrestricted.json +4 -4
  252. package/dist/capabilities/uplinkswitch.json +19 -19
  253. package/dist/capabilities/upstage.json +6 -6
  254. package/dist/capabilities/vancine.json +19 -19
  255. package/dist/capabilities/vercel.json +558 -537
  256. package/dist/capabilities/vivgrid.json +78 -78
  257. package/dist/capabilities/volcengine-coding-plan.json +26 -56
  258. package/dist/capabilities/volcengine.json +57 -62
  259. package/dist/capabilities/vultr.json +28 -28
  260. package/dist/capabilities/wafer.ai.json +18 -18
  261. package/dist/capabilities/wallaby.json +5 -5
  262. package/dist/capabilities/wally.json +14 -14
  263. package/dist/capabilities/wandb.json +20 -20
  264. package/dist/capabilities/watt.json +22 -22
  265. package/dist/capabilities/xai.json +4 -4
  266. package/dist/capabilities/xiaomi-token-plan-ams.json +2 -12
  267. package/dist/capabilities/xiaomi-token-plan-cn.json +2 -12
  268. package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -12
  269. package/dist/capabilities/xiaomi.json +3 -25
  270. package/dist/capabilities/xpersona.json +11 -11
  271. package/dist/capabilities/xxapi.json +27 -27
  272. package/dist/capabilities/zai-coding-plan.json +14 -14
  273. package/dist/capabilities/zai.json +47 -24
  274. package/dist/capabilities/zenifra.json +24 -24
  275. package/dist/capabilities/zenmux.json +185 -185
  276. package/dist/capabilities/zerogpu.json +12 -12
  277. package/dist/capabilities/zhipuai-coding-plan.json +8 -8
  278. package/dist/capabilities/zhipuai.json +35 -20
  279. package/dist/capabilities/zro.json +7 -7
  280. package/dist/channels/index.cjs +2 -2
  281. package/dist/channels/index.js +2 -2
  282. package/dist/{channels-BRVCOutx.js → channels-Cz1y3W6u.js} +1 -1
  283. package/dist/{channels-MjTA9bFp.cjs → channels-DQg4v_gm.cjs} +1 -1
  284. package/dist/coding-agent/index.cjs +2 -2
  285. package/dist/coding-agent/index.js +2 -2
  286. package/dist/datasets/index.cjs +2 -2
  287. package/dist/datasets/index.js +2 -2
  288. package/dist/docs/SKILL.md +3 -2
  289. package/dist/docs/assets/SOURCE_MAP.json +895 -870
  290. package/dist/docs/references/docs-harness-background-tasks.md +4 -1
  291. package/dist/docs/references/docs-knowledge-importers.md +195 -0
  292. package/dist/docs/references/docs-knowledge-load-your-content.md +1 -1
  293. package/dist/docs/references/docs-knowledge-overview.md +1 -1
  294. package/dist/docs/references/docs-sandbox-filesystem.md +1 -1
  295. package/dist/docs/references/docs-signals-thread-streams.md +1 -1
  296. package/dist/docs/references/docs-studio-auth.md +54 -7
  297. package/dist/docs/references/integrations-auth-clerk.md +48 -4
  298. package/dist/docs/references/reference-agents-agent.md +1 -1
  299. package/dist/docs/references/reference-agents-durable-agent.md +10 -4
  300. package/dist/docs/references/reference-auth-clerk.md +21 -1
  301. package/dist/docs/references/reference-knowledge-knowledge-class.md +11 -4
  302. package/dist/docs/references/reference-memory-observational-memory.md +2 -2
  303. package/dist/docs/references/reference-streaming-ChunkType.md +2 -2
  304. package/dist/docs/references/reference-workspace-local-sandbox.md +2 -0
  305. package/dist/error/index.cjs +1 -1
  306. package/dist/error/index.js +1 -1
  307. package/dist/{error-C9d_24w-.js → error-BLwEXqOK.js} +2 -2
  308. package/dist/{error-BRQf2ku0.cjs → error-BdEvO8za.cjs} +2 -2
  309. package/dist/evals/index.cjs +1 -1
  310. package/dist/evals/index.js +1 -1
  311. package/dist/evals/scoreTraces/index.cjs +1 -1
  312. package/dist/evals/scoreTraces/index.js +1 -1
  313. package/dist/features/index.cjs +1 -0
  314. package/dist/features/index.js +1 -0
  315. package/dist/{filesystem-B5X-5G0x.js → filesystem-B8ad6kAW.js} +1 -1
  316. package/dist/{filesystem-BDSpwBke.cjs → filesystem-BB5YWXH-.cjs} +1 -1
  317. package/dist/{filesystem-DzM9pcQ8.js → filesystem-BDHUxbHn.js} +1 -1
  318. package/dist/{filesystem-B0AZrbj8.cjs → filesystem-BP5yz5LG.cjs} +1 -1
  319. package/dist/{filesystem-BsdkC311.js → filesystem-B_afSgYk.js} +1 -1
  320. package/dist/{filesystem-C-cyJfi1.cjs → filesystem-BaOJOc-V.cjs} +1 -1
  321. package/dist/{filesystem-B3s0WRud.js → filesystem-BhYgU8qg.js} +1 -1
  322. package/dist/{filesystem-DzfqVTO_.js → filesystem-CLBVmR5j.js} +1 -1
  323. package/dist/{filesystem-CEbD_77-.cjs → filesystem-Cgxc2a_-.cjs} +1 -1
  324. package/dist/{filesystem-Cv79mHRk.js → filesystem-ClBOBoDc.js} +1 -1
  325. package/dist/{filesystem-DsCQiBl2.cjs → filesystem-DVVecqZt.cjs} +1 -1
  326. package/dist/{filesystem-CUAgLugE.cjs → filesystem-Fpsu7e24.cjs} +1 -1
  327. package/dist/{filesystem-versioned-Bijb_p9l.js → filesystem-versioned-BL1ojJLo.js} +1 -1
  328. package/dist/{filesystem-versioned-DZGyPbNC.cjs → filesystem-versioned-BavRtYWJ.cjs} +1 -1
  329. package/dist/harness/index.cjs +1 -1
  330. package/dist/harness/index.js +1 -1
  331. package/dist/index.cjs +1 -1
  332. package/dist/index.js +1 -1
  333. package/dist/knowledge/config.d.ts +10 -0
  334. package/dist/knowledge/host-writes.d.ts +10 -0
  335. package/dist/knowledge/importers/conformance.d.ts +25 -0
  336. package/dist/knowledge/importers/define.d.ts +204 -0
  337. package/dist/knowledge/importers/host.d.ts +143 -0
  338. package/dist/knowledge/importers/index.d.ts +12 -0
  339. package/dist/knowledge/importers/local-host.d.ts +106 -0
  340. package/dist/knowledge/importers/manifest.d.ts +25 -0
  341. package/dist/knowledge/importers/runner.d.ts +61 -0
  342. package/dist/knowledge/importers/sink.d.ts +105 -0
  343. package/dist/knowledge/importers/types.d.ts +144 -0
  344. package/dist/knowledge/index.cjs +2715 -8
  345. package/dist/knowledge/index.d.ts +54 -4
  346. package/dist/knowledge/index.js +2692 -9
  347. package/dist/knowledge/instructions.d.ts +1 -1
  348. package/dist/knowledge/links.d.ts +8 -0
  349. package/dist/knowledge/pinned-state-processor.d.ts +5 -0
  350. package/dist/knowledge/pinned.d.ts +4 -1
  351. package/dist/knowledge/scope-runtime.d.ts +10 -0
  352. package/dist/llm/index.cjs +3 -3
  353. package/dist/llm/index.js +3 -3
  354. package/dist/llm/model/provider-types.generated.d.ts +7705 -7727
  355. package/dist/{llm-DmUucguC.cjs → llm-8Av3mSjD.cjs} +2 -2
  356. package/dist/{llm-Djd8Qzi0.js → llm-B5A5cwJr.js} +2 -2
  357. package/dist/loop/index.cjs +2 -2
  358. package/dist/loop/index.js +2 -2
  359. package/dist/{manager-CO_Xz2zR.js → manager-DfWQCJUK.js} +2 -2
  360. package/dist/{manager-D27PkIPo.cjs → manager-sv35JY-z.cjs} +2 -2
  361. package/dist/mastra/index.cjs +1 -1
  362. package/dist/mastra/index.js +1 -1
  363. package/dist/mastra/resolve-agent.d.ts +3 -1
  364. package/dist/{mastra-Ch00nEAJ.js → mastra-CigBrT7X.js} +17 -23
  365. package/dist/{mastra-qsVWpOTi.cjs → mastra-D4hvfuxX.cjs} +19 -25
  366. package/dist/memory/index.cjs +3 -3
  367. package/dist/memory/index.js +3 -3
  368. package/dist/{message-list-DPXPXvin.cjs → message-list-Cj0Sq_JP.cjs} +63 -8
  369. package/dist/{message-list-DEuRl82K.js → message-list-KRbg-TnI.js} +63 -8
  370. package/dist/{model-Do6DTJoj.cjs → model-BK93CMtl.cjs} +1 -1
  371. package/dist/{model-CW-mfGYA.js → model-CYtXw861.js} +1 -1
  372. package/dist/{netlify-DU32SDT6.cjs → netlify-BAnn3ouY.cjs} +1 -1
  373. package/dist/{netlify-DZSAbdve.js → netlify-CuI1ZrwR.js} +1 -1
  374. package/dist/notifications/index.cjs +1 -1
  375. package/dist/notifications/index.js +1 -1
  376. package/dist/processor-provider/index.cjs +1 -1
  377. package/dist/processor-provider/index.js +1 -1
  378. package/dist/processors/abort-signal-scope.d.ts +6 -0
  379. package/dist/processors/index.cjs +2 -2
  380. package/dist/processors/index.js +2 -2
  381. package/dist/{provider-registry-zGezZVsL.cjs → provider-registry-BwuI_IpT.cjs} +21696 -21828
  382. package/dist/{provider-registry-deA0x-Gd.js → provider-registry-CmQLzLF_.js} +21696 -21828
  383. package/dist/provider-registry.json +22300 -22417
  384. package/dist/{registry-generator-VvBfOKAD.js → registry-generator-C17V4WfG.js} +1 -1
  385. package/dist/{registry-generator-BkQ1AxZn.cjs → registry-generator-C_0ae7Ce.cjs} +1 -1
  386. package/dist/{rehydrate-DDYFpQsV.cjs → rehydrate-CDQ4dOYj.cjs} +2 -2
  387. package/dist/{rehydrate-BjLV643n.js → rehydrate-PnaVawGX.js} +2 -2
  388. package/dist/relevance/index.cjs +2 -2
  389. package/dist/relevance/index.js +2 -2
  390. package/dist/{run-registry-5Suldxz3.cjs → run-registry-BmckDVBk.cjs} +1156 -403
  391. package/dist/{run-registry-CGRPldLH.js → run-registry-BwEcwYlU.js} +1103 -404
  392. package/dist/{source-DDwx-87N.cjs → source-BVOi8Xhp.cjs} +1 -1
  393. package/dist/{source-Did_2XQc.js → source-fNa6u1kH.js} +1 -1
  394. package/dist/storage/domains/agents/index.cjs +1 -1
  395. package/dist/storage/domains/agents/index.js +1 -1
  396. package/dist/storage/domains/knowledge/base.d.ts +67 -0
  397. package/dist/storage/domains/knowledge/importers-inmemory.d.ts +146 -0
  398. package/dist/storage/domains/knowledge/importers.d.ts +287 -0
  399. package/dist/storage/domains/knowledge/index.d.ts +1 -0
  400. package/dist/storage/domains/knowledge/inmemory.d.ts +11 -0
  401. package/dist/storage/domains/knowledge/pages-inmemory.d.ts +12 -1
  402. package/dist/storage/domains/knowledge/pages.d.ts +1 -0
  403. package/dist/storage/domains/mcp-clients/index.cjs +1 -1
  404. package/dist/storage/domains/mcp-clients/index.js +1 -1
  405. package/dist/storage/domains/mcp-servers/index.cjs +1 -1
  406. package/dist/storage/domains/mcp-servers/index.js +1 -1
  407. package/dist/storage/domains/prompt-blocks/index.cjs +1 -1
  408. package/dist/storage/domains/prompt-blocks/index.js +1 -1
  409. package/dist/storage/domains/scorer-definitions/index.cjs +1 -1
  410. package/dist/storage/domains/scorer-definitions/index.js +1 -1
  411. package/dist/storage/domains/skills/index.cjs +1 -1
  412. package/dist/storage/domains/skills/index.js +1 -1
  413. package/dist/storage/domains/workspaces/index.cjs +1 -1
  414. package/dist/storage/domains/workspaces/index.js +1 -1
  415. package/dist/storage/index.cjs +15 -10
  416. package/dist/storage/index.js +11 -11
  417. package/dist/stream/base/output.d.ts +17 -0
  418. package/dist/stream/index.cjs +2 -2
  419. package/dist/stream/index.js +2 -2
  420. package/dist/stream/types.d.ts +5 -2
  421. package/dist/{stream-Dvy_0o14.cjs → stream-0kdqBOOn.cjs} +64 -9
  422. package/dist/{stream-Dpwx0whf.js → stream-D1y9GzoD.js} +29 -10
  423. package/dist/test-utils/llm-mock.cjs +1 -1
  424. package/dist/test-utils/llm-mock.js +1 -1
  425. package/dist/tool-loop-agent/index.cjs +1 -1
  426. package/dist/tool-loop-agent/index.js +1 -1
  427. package/dist/{tool-loop-agent-PbWrEj1k.js → tool-loop-agent-BdjWGVIb.js} +4 -4
  428. package/dist/{tool-loop-agent-UxOv3FoK.cjs → tool-loop-agent-kWaZAT6Q.cjs} +4 -4
  429. package/dist/{utils-BbMTlyBO.cjs → utils-BKUCaZ12.cjs} +1 -1
  430. package/dist/{utils-BnNi1BYM.js → utils-GHY3hmLx.js} +1 -1
  431. package/dist/utils.cjs +1 -1
  432. package/dist/utils.js +1 -1
  433. package/dist/{validate-HSBcm96b.js → validate-CB-q-R2F.js} +1 -1
  434. package/dist/{validate-Skps-cM3.cjs → validate-De92squ7.cjs} +1 -1
  435. package/dist/vector/index.cjs +2 -2
  436. package/dist/vector/index.js +2 -2
  437. package/dist/worker/index.cjs +1 -1
  438. package/dist/worker/index.js +1 -1
  439. package/dist/{worker-BNS5A3qP.cjs → worker-BbWPQuPR.cjs} +2 -2
  440. package/dist/{worker-DehaD4qD.js → worker-C3u_xzY2.js} +2 -2
  441. package/dist/{worker-BE-0DyKL.cjs → worker-CAKvQj9_.cjs} +2 -2
  442. package/dist/{worker-BKrKHZzU.js → worker-Kwm8EKcj.js} +2 -2
  443. package/dist/{workflow-BjUTwaK9.cjs → workflow-CSjXeNcR.cjs} +3 -3
  444. package/dist/{workflow-Bvw6yDjc.js → workflow-CVmI1Sw-.js} +3 -3
  445. package/dist/workflows/builder/index.cjs +1 -1
  446. package/dist/workflows/builder/index.js +1 -1
  447. package/dist/workflows/evented/index.cjs +1 -1
  448. package/dist/workflows/evented/index.js +1 -1
  449. package/dist/workflows/index.cjs +4 -4
  450. package/dist/workflows/index.js +4 -4
  451. package/dist/workspace/filesystem/filesystem.d.ts +5 -0
  452. package/dist/workspace/index.cjs +1 -1
  453. package/dist/workspace/index.js +1 -1
  454. package/dist/workspace/sandbox/local-sandbox.d.ts +16 -7
  455. package/dist/workspace/sandbox/native-sandbox/types.d.ts +11 -1
  456. package/dist/{workspace-C05xDH60.js → workspace-DY2Nxiyi.js} +75 -27
  457. package/dist/{workspace-D1OzzlLw.cjs → workspace-X2RHJZU9.cjs} +75 -27
  458. package/package.json +3 -3
  459. package/src/llm/model/provider-types.generated.d.ts +7705 -7727
@@ -0,0 +1,363 @@
1
+ export declare const KNOWLEDGE_STORAGE_CONTRACT_VERSION: 4;
2
+ export declare const KNOWLEDGE_STORAGE_SCHEMA_VERSION: 4;
3
+ export declare const TABLE_KNOWLEDGE_NODE_SCOPES = "mastra_knowledge_node_scopes";
4
+ export declare const TABLE_KNOWLEDGE_RECORD_SCOPES = "mastra_knowledge_record_scopes";
5
+ export declare const TABLE_KNOWLEDGE_SCOPE_GRANTS = "mastra_knowledge_scope_grants";
6
+ export declare const TABLE_KNOWLEDGE_ACCESS_STATE = "mastra_knowledge_access_state";
7
+ export declare const TABLE_KNOWLEDGE_SCOPE_ADDRESSES = "mastra_knowledge_scope_addresses";
8
+ export declare const TABLE_KNOWLEDGE_NODE_ADDRESSES = "mastra_knowledge_node_addresses";
9
+ export declare const TABLE_KNOWLEDGE_IMPORT_STATE = "mastra_knowledge_import_state";
10
+ export declare const TABLE_KNOWLEDGE_IMPORT_RUNS = "mastra_knowledge_import_runs";
11
+ export declare const TABLE_KNOWLEDGE_PROPOSALS = "mastra_knowledge_proposals";
12
+ export declare const KNOWLEDGE_TABLE_NAMES: readonly ["mastra_knowledge_nodes", "mastra_knowledge_records", "mastra_knowledge_mentions", "mastra_knowledge_activity", "mastra_knowledge_semantic_outbox", "mastra_knowledge_node_scopes", "mastra_knowledge_record_scopes", "mastra_knowledge_scope_grants", "mastra_knowledge_access_state", "mastra_knowledge_scope_addresses", "mastra_knowledge_node_addresses", "mastra_knowledge_import_state", "mastra_knowledge_import_runs", "mastra_knowledge_proposals"];
13
+ /** Knowledge v1 tables with no v2 equivalent; an explicit schema reset drops them. */
14
+ export declare const RETIRED_KNOWLEDGE_TABLE_NAMES: readonly ['mastra_knowledge_cursors'];
15
+ export declare const KNOWLEDGE_PAGES_CORE_FEATURE = "knowledge-pages";
16
+ export declare const KNOWLEDGE_PAGES_SCHEMA_VERSION: 4;
17
+ export declare const TABLE_KNOWLEDGE_PAGES = "mastra_knowledge_pages";
18
+ export declare const TABLE_KNOWLEDGE_NOTES = "mastra_knowledge_notes";
19
+ export declare const TABLE_KNOWLEDGE_NOTE_STAMPS = "mastra_knowledge_note_stamps";
20
+ /** Same name as the schema-2 table; schema 4 re-keys it to note → page. */
21
+ export declare const TABLE_KNOWLEDGE_PAGE_MENTIONS = "mastra_knowledge_mentions";
22
+ export declare const TABLE_KNOWLEDGE_PINS = "mastra_knowledge_pins";
23
+ /** Same name as schema 2; schema 4 re-keys it to scope/page/note. */
24
+ export declare const TABLE_KNOWLEDGE_PAGE_ACTIVITY = "mastra_knowledge_activity";
25
+ /** Holds `{ id: 'knowledge', schemaVersion: 4 }`, written when the schema-4 tables are created. */
26
+ export declare const TABLE_KNOWLEDGE_PAGES_STATE = "mastra_knowledge_access_state";
27
+ export declare const KNOWLEDGE_PAGES_TABLE_NAMES: readonly ["mastra_knowledge_pages", "mastra_knowledge_notes", "mastra_knowledge_note_stamps", "mastra_knowledge_mentions", "mastra_knowledge_pins", "mastra_knowledge_activity", "mastra_knowledge_access_state"];
28
+ /** Every Knowledge table any schema version created. Reset drops these and nothing else. */
29
+ export declare const KNOWLEDGE_RESETTABLE_TABLE_NAMES: readonly string[];
30
+ /** Schema-1/2 tables whose presence means the store needs a reset before schema 4 can run. */
31
+ export declare const LEGACY_KNOWLEDGE_TABLE_NAMES: ReadonlySet<string>;
32
+ /** Pages and scope pages. `scopeId` equals `id` on scope pages; `address`/`declaration` only on scope pages. */
33
+ export declare const KNOWLEDGE_PAGES_SCHEMA: {
34
+ readonly id: {
35
+ readonly type: 'text';
36
+ readonly nullable: false;
37
+ readonly primaryKey: true;
38
+ };
39
+ readonly scopeId: {
40
+ readonly type: 'text';
41
+ readonly nullable: false;
42
+ };
43
+ readonly parentId: {
44
+ readonly type: 'text';
45
+ readonly nullable: true;
46
+ };
47
+ readonly isScope: {
48
+ readonly type: 'boolean';
49
+ readonly nullable: false;
50
+ };
51
+ readonly address: {
52
+ readonly type: 'text';
53
+ readonly nullable: true;
54
+ };
55
+ readonly declaration: {
56
+ readonly type: 'text';
57
+ readonly nullable: true;
58
+ };
59
+ readonly key: {
60
+ readonly type: 'text';
61
+ readonly nullable: true;
62
+ };
63
+ readonly position: {
64
+ readonly type: 'text';
65
+ readonly nullable: false;
66
+ };
67
+ readonly name: {
68
+ readonly type: 'text';
69
+ readonly nullable: false;
70
+ };
71
+ readonly canonicalName: {
72
+ readonly type: 'text';
73
+ readonly nullable: false;
74
+ };
75
+ readonly description: {
76
+ readonly type: 'text';
77
+ readonly nullable: true;
78
+ };
79
+ readonly body: {
80
+ readonly type: 'text';
81
+ readonly nullable: true;
82
+ };
83
+ readonly version: {
84
+ readonly type: 'integer';
85
+ readonly nullable: false;
86
+ };
87
+ readonly mergedInto: {
88
+ readonly type: 'text';
89
+ readonly nullable: true;
90
+ };
91
+ readonly createdBy: {
92
+ readonly type: 'jsonb';
93
+ readonly nullable: false;
94
+ };
95
+ readonly updatedBy: {
96
+ readonly type: 'jsonb';
97
+ readonly nullable: false;
98
+ };
99
+ readonly createdAt: {
100
+ readonly type: 'timestamp';
101
+ readonly nullable: false;
102
+ };
103
+ readonly updatedAt: {
104
+ readonly type: 'timestamp';
105
+ readonly nullable: false;
106
+ };
107
+ readonly deletedAt: {
108
+ readonly type: 'timestamp';
109
+ readonly nullable: true;
110
+ };
111
+ readonly deletedBy: {
112
+ readonly type: 'text';
113
+ readonly nullable: true;
114
+ };
115
+ };
116
+ export declare const KNOWLEDGE_NOTES_SCHEMA: {
117
+ readonly id: {
118
+ readonly type: 'text';
119
+ readonly nullable: false;
120
+ readonly primaryKey: true;
121
+ };
122
+ readonly pageId: {
123
+ readonly type: 'text';
124
+ readonly nullable: false;
125
+ readonly references: {
126
+ readonly table: "mastra_knowledge_pages";
127
+ readonly column: 'id';
128
+ };
129
+ };
130
+ readonly text: {
131
+ readonly type: 'text';
132
+ readonly nullable: false;
133
+ };
134
+ readonly when: {
135
+ readonly type: 'timestamp';
136
+ readonly nullable: true;
137
+ };
138
+ readonly provenance: {
139
+ readonly type: 'jsonb';
140
+ readonly nullable: false;
141
+ };
142
+ readonly version: {
143
+ readonly type: 'integer';
144
+ readonly nullable: false;
145
+ };
146
+ readonly createdAt: {
147
+ readonly type: 'timestamp';
148
+ readonly nullable: false;
149
+ };
150
+ readonly updatedAt: {
151
+ readonly type: 'timestamp';
152
+ readonly nullable: false;
153
+ };
154
+ readonly deletedAt: {
155
+ readonly type: 'timestamp';
156
+ readonly nullable: true;
157
+ };
158
+ readonly deletedBy: {
159
+ readonly type: 'text';
160
+ readonly nullable: true;
161
+ };
162
+ };
163
+ /** One row per (note, stamp scope). Primary key is the pair. */
164
+ export declare const KNOWLEDGE_NOTE_STAMPS_SCHEMA: {
165
+ readonly noteId: {
166
+ readonly type: 'text';
167
+ readonly nullable: false;
168
+ readonly references: {
169
+ readonly table: "mastra_knowledge_notes";
170
+ readonly column: 'id';
171
+ };
172
+ };
173
+ readonly scopeId: {
174
+ readonly type: 'text';
175
+ readonly nullable: false;
176
+ readonly references: {
177
+ readonly table: "mastra_knowledge_pages";
178
+ readonly column: 'id';
179
+ };
180
+ };
181
+ };
182
+ /** One row per (note, mentioned page). Primary key is the pair. */
183
+ export declare const KNOWLEDGE_PAGE_MENTIONS_SCHEMA: {
184
+ readonly noteId: {
185
+ readonly type: 'text';
186
+ readonly nullable: false;
187
+ readonly references: {
188
+ readonly table: "mastra_knowledge_notes";
189
+ readonly column: 'id';
190
+ };
191
+ };
192
+ readonly pageId: {
193
+ readonly type: 'text';
194
+ readonly nullable: false;
195
+ readonly references: {
196
+ readonly table: "mastra_knowledge_pages";
197
+ readonly column: 'id';
198
+ };
199
+ };
200
+ };
201
+ /** `audience` is a JSON array of scope addresses (PG may store it as `text[]`, Mongo as an array). */
202
+ export declare const KNOWLEDGE_PINS_SCHEMA: {
203
+ readonly id: {
204
+ readonly type: 'text';
205
+ readonly nullable: false;
206
+ readonly primaryKey: true;
207
+ };
208
+ readonly pageId: {
209
+ readonly type: 'text';
210
+ readonly nullable: false;
211
+ readonly references: {
212
+ readonly table: "mastra_knowledge_pages";
213
+ readonly column: 'id';
214
+ };
215
+ };
216
+ readonly audience: {
217
+ readonly type: 'jsonb';
218
+ readonly nullable: false;
219
+ };
220
+ readonly createdBy: {
221
+ readonly type: 'text';
222
+ readonly nullable: false;
223
+ };
224
+ readonly createdAt: {
225
+ readonly type: 'timestamp';
226
+ readonly nullable: false;
227
+ };
228
+ readonly updatedAt: {
229
+ readonly type: 'timestamp';
230
+ readonly nullable: false;
231
+ };
232
+ };
233
+ export declare const KNOWLEDGE_PAGE_ACTIVITY_SCHEMA: {
234
+ readonly id: {
235
+ readonly type: 'text';
236
+ readonly nullable: false;
237
+ readonly primaryKey: true;
238
+ };
239
+ readonly action: {
240
+ readonly type: 'text';
241
+ readonly nullable: false;
242
+ };
243
+ readonly scopeId: {
244
+ readonly type: 'text';
245
+ readonly nullable: false;
246
+ };
247
+ readonly pageId: {
248
+ readonly type: 'text';
249
+ readonly nullable: false;
250
+ };
251
+ readonly noteId: {
252
+ readonly type: 'text';
253
+ readonly nullable: true;
254
+ };
255
+ readonly provenance: {
256
+ readonly type: 'jsonb';
257
+ readonly nullable: false;
258
+ };
259
+ readonly createdAt: {
260
+ readonly type: 'timestamp';
261
+ readonly nullable: false;
262
+ };
263
+ };
264
+ export declare const KNOWLEDGE_PAGES_STATE_SCHEMA: {
265
+ readonly id: {
266
+ readonly type: 'text';
267
+ readonly nullable: false;
268
+ readonly primaryKey: true;
269
+ };
270
+ readonly schemaVersion: {
271
+ readonly type: 'integer';
272
+ readonly nullable: false;
273
+ };
274
+ };
275
+ export type KnowledgePagesSchemaInspection = {
276
+ status: 'compatible';
277
+ schemaVersion: typeof KNOWLEDGE_PAGES_SCHEMA_VERSION;
278
+ } | {
279
+ status: 'uninitialized';
280
+ schemaVersion: null;
281
+ } | {
282
+ status: 'incompatible-reset-required';
283
+ schemaVersion: number | null;
284
+ reason: string;
285
+ };
286
+ /**
287
+ * Classifies what an adapter found before creating schema-4 tables. `tableNames` is every
288
+ * `mastra_knowledge_*` table present; `schemaVersion` is the state row's version, if any.
289
+ */
290
+ export declare function inspectKnowledgePagesSchema(snapshot: {
291
+ tableNames: readonly string[];
292
+ schemaVersion?: number;
293
+ }): KnowledgePagesSchemaInspection;
294
+ /**
295
+ * The old Knowledge tables an adapter drops on init, rows included: Knowledge before schema 4 was an
296
+ * experimental store with no migration. Every schema-1/2-only table present is dropped. The table
297
+ * names schema 4 reuses (mentions, activity, the state table) are dropped too, but only when an old
298
+ * table is present and no schema-4 state row exists, so they are old-shaped. Schema-4-only tables
299
+ * are never listed. On a schema-4 store this lists only tables an older process recreated during a
300
+ * rolling deploy. Drop order is safe for adapters that enforce references.
301
+ */
302
+ export declare function legacyKnowledgeTablesToDrop(snapshot: {
303
+ tableNames: readonly string[];
304
+ schemaVersion?: number;
305
+ }): string[];
306
+ /** Message for the error an adapter throws on `incompatible-reset-required`. */
307
+ export declare function knowledgePagesResetMessage(reason: string): string;
308
+ /**
309
+ * A list cursor the store cannot decode (malformed, or from another store or version). Defined
310
+ * here so every adapter can throw it on any core version; core re-exports it from
311
+ * `@mastra/core/storage`. Recognise it by `name`.
312
+ * @experimental
313
+ */
314
+ export declare class KnowledgeInvalidCursorError extends Error {
315
+ readonly cursor: string;
316
+ constructor(cursor: string);
317
+ }
318
+ /**
319
+ * The page-store runtime pieces adapters take from `@mastra/core/storage`. They are loaded through
320
+ * `createKnowledgePagesCoreLoader` instead of static imports so adapters keep loading on cores
321
+ * older than the `knowledge-pages` feature without raising their `@mastra/core` peer floor.
322
+ */
323
+ export interface KnowledgePagesCore {
324
+ assertKnowledgePageDescriptionWithinBound(description: string | undefined): void;
325
+ assertKnowledgeNoteTextWithinBound(text: string): void;
326
+ canonicalKnowledgeName(name: string): string;
327
+ knowledgePositionBetween(before?: string, after?: string): string;
328
+ MAX_KNOWLEDGE_MOVE_PAGES: number;
329
+ MAX_KNOWLEDGE_PAGE_DEPTH: number;
330
+ MAX_KNOWLEDGE_PAGE_LIST_LIMIT: number;
331
+ MAX_KNOWLEDGE_PAGE_LINKS: number;
332
+ KnowledgeMoveTooLargeError: new (pageId: string, pages: number) => Error;
333
+ KnowledgePageDepthError: new (pageId: string) => Error;
334
+ KnowledgePageHasChildrenError: new (pageId: string) => Error;
335
+ KnowledgePageKeyConflictError: new (key: string, parentId: string) => Error;
336
+ }
337
+ /** Loads core's page-store runtime once, after checking core advertises `knowledge-pages`. */
338
+ export declare function createKnowledgePagesCoreLoader(features: ReadonlySet<string>, loadStorageModule: () => Promise<unknown>): () => Promise<KnowledgePagesCore>;
339
+ /** Most words one keyword search uses; every word adds a substring check per page in each store. */
340
+ export declare const KNOWLEDGE_SEARCH_MAX_WORDS = 16;
341
+ /**
342
+ * Keyword-search words: the query split on whitespace, lowercased, deduplicated, keeping the first
343
+ * {@link KNOWLEDGE_SEARCH_MAX_WORDS}. A hit needs at least one of them (as a case-insensitive
344
+ * substring); an empty list means the search returns nothing.
345
+ */
346
+ export declare function knowledgeSearchWords(query: string): string[];
347
+ /**
348
+ * Points one matched search word earns on a page, by the best field it appears in: name, then
349
+ * description, then body. A page whose name contains the whole query ranks first; below that, pages
350
+ * rank by how many query words they match, and these points only break ties between pages that
351
+ * match the same number of words.
352
+ */
353
+ export declare const KNOWLEDGE_SEARCH_WEIGHTS: {
354
+ readonly name: 3;
355
+ readonly description: 2;
356
+ readonly body: 1;
357
+ };
358
+ /**
359
+ * Why `key` can't be a Knowledge page key, or undefined when it can. Keys are one path segment:
360
+ * non-empty, with no `/` (path separator), `#` (scope/path separator) or `%` (escape character).
361
+ */
362
+ export declare function knowledgePageKeyProblem(key: string): string | undefined;
363
+ //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../rolldown-runtime-BrhgMLW6.cjs");
3
3
  const require_client = require("../client-bbXoVR4g.cjs");
4
- const require_message_list = require("../message-list-DPXPXvin.cjs");
4
+ const require_message_list = require("../message-list-Cj0Sq_JP.cjs");
5
5
  const require_request_context = require("../request-context-D9RXYCy8.cjs");
6
6
  const require_dynamic_argument = require("../dynamic-argument-CUc1BBOS.cjs");
7
7
  let _a2a_js_sdk_v1 = require("@a2a-js/sdk-v1");
package/dist/a2a/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "../rolldown-runtime-tIEjjQTE.js";
2
2
  import { t as MastraA2AError } from "../client-BIxS0ecg.js";
3
- import { n as MessageList, t as convertMessages } from "../message-list-DEuRl82K.js";
3
+ import { n as MessageList, t as convertMessages } from "../message-list-KRbg-TnI.js";
4
4
  import { u as RequestContext } from "../request-context-COnZHt2-.js";
5
5
  import { n as resolveDynamicArgument } from "../dynamic-argument-BzPK3qPN.js";
6
6
  import { AgentCard, GetTaskRequest, Role, SendMessageRequest, SendMessageResponse, StreamResponse, SubscribeToTaskRequest, Task, TaskState } from "@a2a-js/sdk-v1";
@@ -1596,6 +1596,18 @@ TRequestContext extends Record<string, any> | unknown = any, TEditor extends Age
1596
1596
  discoverThreadPeers(options?: DiscoverAgentThreadPeersOptions): Promise<AgentThreadPeerAdvertisement[]>;
1597
1597
  getActiveThreadRunId(options: AgentThreadIdentityOptions): string | undefined;
1598
1598
  listActiveThreadRuns(): ActiveThreadRun[];
1599
+ /**
1600
+ * The resource and thread that a `runId`-only `sendSignal`, `sendMessage` or `queueMessage`
1601
+ * target resolves to, or undefined when this process doesn't track the run. Servers use it to
1602
+ * check that a caller owns the run before sending to it. Core rejects a target whose `resourceId` doesn't own
1603
+ * its `runId`, but that is a consistency check, not authorization: Core doesn't know who is calling and trusts a
1604
+ * `runId`-only target. Callers that take `runId` from untrusted input must authenticate the caller and compare
1605
+ * this owner with the caller's trusted resource before sending.
1606
+ */
1607
+ getThreadRunTarget(runId: string): {
1608
+ resourceId?: string;
1609
+ threadId: string;
1610
+ } | undefined;
1599
1611
  /**
1600
1612
  * Lists suspended agent runs from workflow snapshot storage — runs waiting on
1601
1613
  * a tool-call approval (`requireApproval` / `requireToolApproval`) or on a
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_run_registry = require("../../run-registry-5Suldxz3.cjs");
2
+ const require_run_registry = require("../../run-registry-BmckDVBk.cjs");
3
3
  const require_observability = require("../../observability-B0R_D1PZ.cjs");
4
4
  // src/agent/durable/durable-agent.ts
5
5
  var DurableAgent = class extends require_run_registry.Agent {
@@ -398,23 +398,11 @@ var DurableAgent = class extends require_run_registry.Agent {
398
398
  return this.#storageVersion === 2;
399
399
  }
400
400
  /**
401
- * Warns once when `storageVersion: 2` is set but the registered store can't
402
- * store version 2 runs. The loop workflow's `autoStorageVersion` then stores
403
- * new runs as version 1. An agent with no registered store isn't warned.
404
- */
405
- #warnIfStorageVersionUnsupported() {
406
- if (this.#storageVersion !== 2) return;
407
- const storage = this.#mastra?.getStorage();
408
- const workflowsStore = storage?.stores?.workflows;
409
- if (workflowsStore && !workflowsStore.supportsRunJournal()) this.guardrailLogger?.warn(`DurableAgent '${this.id}' sets storageVersion: 2, which ${storage?.name ?? "the configured"} storage doesn't support yet; storing new runs as version 1.`);
410
- }
411
- /**
412
401
  * Get the workflow instance for direct execution.
413
402
  * Lazily creates the workflow and registers Mastra on it (needed for
414
403
  * getAgentById in execution steps).
415
404
  */
416
405
  getWorkflow() {
417
- if (!this.executionEngine.workflow) this.#warnIfStorageVersionUnsupported();
418
406
  return this.executionEngine.workflow ?? this.executionEngine.getWorkflow({
419
407
  maxSteps: this.#maxSteps,
420
408
  workflowEngine: this.workflowEngine,
@@ -1,4 +1,4 @@
1
- import { $ as createDurableBackgroundTaskCheckStep, At as readRunDeadline, B as createDurableAgenticWorkflow, Bs as emitFinishEvent, Ct as runDurableStreamUntilIdle, Dt as DurableStepIds, Et as DurableAgentDefaults, F as normalizeResumeGenerateArgs, Fs as __resetExecutionFencesForTests, Ft as pruneAgentLoopSnapshot, G as createWorkflowInput, Gs as publishAbortRequest, H as createDurableIsTaskCompleteStep, Hs as emitStepStartEvent, I as prepareForDurableExecution, Is as diffResponseMessages, J as serializeModelConfig, Js as createRunAbortController, K as serializeDurableOptions, Ks as requestAcknowledgedAbort, L as applyReservedMemoryContextKeys, Ls as emitAbortEvent, Mt as getRunStreamSlot, Nt as getScopeStreamSlot, Ot as RUN_DEADLINE_KEY, P as Agent, Pt as untilIdleHandlesBackgroundTask, Qs as AgentStreamEventTypes, R as persistDurableRunInput, Rs as emitChunkEvent, St as createDurableAgentStream, Tt as DURABLE_STOP_WHEN_ERROR_ID, U as createDurableLLMMappingStep, Us as emitSuspendedEvent, V as createDurableGoalStep, Vs as emitStepFinishEvent, W as createDurableToolCallStep, Ws as AgentStreamBus, X as createDurableLLMExecutionStep, Xs as AGENT_STREAM_TOPIC, Y as serializeToolsMetadata, Ys as AGENT_CONTROL_TOPIC, Zs as AgentControlEventTypes, Zt as validateModelTimeoutSettings, _t as resolveTool, a as endRunSpansWithError, at as baseDurableAgenticInputSchema, bt as liveSegmentSpan, c as globalRunRegistry, ct as modelConfigSchema, d as takeRunScorerInstances, dt as runDurableFinishSideEffects, et as resolveDurableToolCallConcurrency, ft as loadRunStoredMessages, gt as resolveRuntimeDependencies, ht as resolveModel, i as deleteRunRegistryEntry, it as accumulatedUsageSchema, kt as ensureRemoteAbortListener, lt as modelListEntrySchema, mt as resolveInternalState, n as RunRegistry, nt as calculateAccumulatedUsage, ot as baseIterationStateSchema, p as agentThreadStreamRuntime, pt as rebuildRunToolsFromMastra, q as serializeDurableState, qs as subscribeToAbortRequests, rt as createBaseIterationStateUpdate, s as getRunRegistryEntry, st as durableAgenticOutputSchema, t as ExtendedRunRegistry, tt as buildStepRecord, u as setRunRegistryEntry, ut as executeDurableAgentScorers, vt as toolRequiresApproval, wt as runResumeDurableStreamUntilIdle, xt as segmentSpanData, yt as carrySegmentSpans, z as detachFullStreamOnEnd, zs as emitErrorEvent } from "../../run-registry-CGRPldLH.js";
1
+ import { $ as resolveDurableToolCallConcurrency, $s as publishAbortRequest, At as readRunDeadline, B as createDurableGoalStep, Ct as runDurableStreamUntilIdle, Dt as DurableStepIds, Et as DurableAgentDefaults, F as prepareForDurableExecution, Ft as pruneAgentLoopSnapshot, G as serializeDurableOptions, Gs as emitAbortEvent, H as createDurableLLMMappingStep, I as applyReservedMemoryContextKeys, J as serializeToolsMetadata, Js as emitFinishEvent, K as serializeDurableState, Ks as emitChunkEvent, L as persistDurableRunInput, Mt as getRunStreamSlot, N as Agent, Nt as getScopeStreamSlot, Ot as RUN_DEADLINE_KEY, P as normalizeResumeGenerateArgs, Pt as untilIdleHandlesBackgroundTask, Q as createDurableBackgroundTaskCheckStep, Qs as AgentStreamBus, R as detachFullStreamOnEnd, St as createDurableAgentStream, Tt as DURABLE_STOP_WHEN_ERROR_ID, U as createDurableToolCallStep, Us as __resetExecutionFencesForTests, V as createDurableIsTaskCompleteStep, W as createWorkflowInput, Ws as diffResponseMessages, Xs as emitStepStartEvent, Y as createDurableLLMExecutionStep, Ys as emitStepFinishEvent, Zs as emitSuspendedEvent, Zt as validateModelTimeoutSettings, _t as toolRequiresApproval, a as endRunSpansWithError, ac as AgentControlEventTypes, at as baseIterationStateSchema, bt as liveSegmentSpan, c as globalRunRegistry, ct as modelListEntrySchema, d as takeRunScorerInstances, dt as loadRunStoredMessages, ec as requestAcknowledgedAbort, et as buildStepRecord, ft as rebuildRunToolsFromMastra, gt as resolveTool, ht as resolveRuntimeDependencies, i as deleteRunRegistryEntry, ic as AGENT_STREAM_TOPIC, it as baseDurableAgenticInputSchema, kt as ensureRemoteAbortListener, lt as executeDurableAgentScorers, mt as resolveModel, n as RunRegistry, nc as createRunAbortController, nt as createBaseIterationStateUpdate, oc as AgentStreamEventTypes, ot as durableAgenticOutputSchema, p as agentThreadStreamRuntime, pt as resolveInternalState, q as serializeModelConfig, qs as emitErrorEvent, rc as AGENT_CONTROL_TOPIC, rt as accumulatedUsageSchema, s as getRunRegistryEntry, st as modelConfigSchema, t as ExtendedRunRegistry, tc as subscribeToAbortRequests, tt as calculateAccumulatedUsage, u as setRunRegistryEntry, ut as runDurableFinishSideEffects, wt as runResumeDurableStreamUntilIdle, xt as segmentSpanData, yt as carrySegmentSpans, z as createDurableAgenticWorkflow } from "../../run-registry-BwEcwYlU.js";
2
2
  import { D as agentLoopTermination, O as executionFailureTermination } from "../../observability-D7RNOAPx.js";
3
3
  // src/agent/durable/durable-agent.ts
4
4
  var DurableAgent = class extends Agent {
@@ -397,23 +397,11 @@ var DurableAgent = class extends Agent {
397
397
  return this.#storageVersion === 2;
398
398
  }
399
399
  /**
400
- * Warns once when `storageVersion: 2` is set but the registered store can't
401
- * store version 2 runs. The loop workflow's `autoStorageVersion` then stores
402
- * new runs as version 1. An agent with no registered store isn't warned.
403
- */
404
- #warnIfStorageVersionUnsupported() {
405
- if (this.#storageVersion !== 2) return;
406
- const storage = this.#mastra?.getStorage();
407
- const workflowsStore = storage?.stores?.workflows;
408
- if (workflowsStore && !workflowsStore.supportsRunJournal()) this.guardrailLogger?.warn(`DurableAgent '${this.id}' sets storageVersion: 2, which ${storage?.name ?? "the configured"} storage doesn't support yet; storing new runs as version 1.`);
409
- }
410
- /**
411
400
  * Get the workflow instance for direct execution.
412
401
  * Lazily creates the workflow and registers Mastra on it (needed for
413
402
  * getAgentById in execution steps).
414
403
  */
415
404
  getWorkflow() {
416
- if (!this.executionEngine.workflow) this.#warnIfStorageVersionUnsupported();
417
405
  return this.executionEngine.workflow ?? this.executionEngine.getWorkflow({
418
406
  maxSteps: this.#maxSteps,
419
407
  workflowEngine: this.workflowEngine,
@@ -71,6 +71,8 @@ export interface PreparationOptions<OUTPUT = undefined> {
71
71
  runId?: string;
72
72
  /** Request context */
73
73
  requestContext?: RequestContext;
74
+ /** @internal Called when a non-reserved context entry cannot be snapshotted. */
75
+ onRequestContextEntryOmitted?: () => void;
74
76
  /** Logger */
75
77
  logger?: IMastraLogger;
76
78
  /** Mastra instance (for version overrides, background tasks, etc.) */
@@ -81,6 +81,14 @@ export declare function restoreCustomContext(entries?: Record<string, unknown>,
81
81
  export declare class DurableProcessorRebuildError extends Error {
82
82
  constructor(agentId: string, cause: unknown);
83
83
  }
84
+ /**
85
+ * The process running a step could not find the run's agent in its registry
86
+ * or editor. Running on would execute the step with no tools, memory or
87
+ * processors, so the step fails instead.
88
+ */
89
+ export declare class DurableAgentNotFoundError extends Error {
90
+ constructor(agentId: string, runId: string, cause?: unknown);
91
+ }
84
92
  /**
85
93
  * Resolve all runtime dependencies needed for durable step execution.
86
94
  *
@@ -141,6 +149,7 @@ export declare function rebuildRunToolsFromMastra(options: {
141
149
  mastra?: Mastra;
142
150
  runId: string;
143
151
  agentId: string;
152
+ agentVersionId?: string;
144
153
  state: SerializableDurableState;
145
154
  options?: SerializableDurableOptions;
146
155
  /** JSON-safe request-context snapshot from the workflow input (see preparation.ts). */
@@ -125,6 +125,7 @@ export declare class DurableAgenticLoopBuilder extends BaseAgenticLoopBuilder {
125
125
  protected llmExecutionStep(): import("../../../workflows").Step<"durable-llm-execution", unknown, {
126
126
  runId: string;
127
127
  agentId: string;
128
+ agentVersionId?: string | undefined;
128
129
  agentName?: string | undefined;
129
130
  messageListState: any;
130
131
  initialUntaggedSystemMessages?: any[] | undefined;
@@ -415,6 +416,7 @@ export declare class DurableAgenticLoopBuilder extends BaseAgenticLoopBuilder {
415
416
  tracingStopCause?: "delegation" | "feedback_complete" | "iteration_hook" | "max_steps" | "model_finished" | "stop_condition" | undefined;
416
417
  tracingTermination?: import("../../../observability").SpanTermination | undefined;
417
418
  tracingDelegationFailure?: import("../../../observability").SpanTermination | undefined;
419
+ agentVersionId?: string | undefined;
418
420
  modelList?: any[] | undefined;
419
421
  }, {
420
422
  runId: string;
@@ -466,6 +468,7 @@ export declare class DurableAgenticLoopBuilder extends BaseAgenticLoopBuilder {
466
468
  tracingStopCause?: "delegation" | "feedback_complete" | "iteration_hook" | "max_steps" | "model_finished" | "stop_condition" | undefined;
467
469
  tracingTermination?: import("../../../observability").SpanTermination | undefined;
468
470
  tracingDelegationFailure?: import("../../../observability").SpanTermination | undefined;
471
+ agentVersionId?: string | undefined;
469
472
  modelList?: any[] | undefined;
470
473
  }, {
471
474
  runId: string;
@@ -517,6 +520,7 @@ export declare class DurableAgenticLoopBuilder extends BaseAgenticLoopBuilder {
517
520
  tracingStopCause?: "delegation" | "feedback_complete" | "iteration_hook" | "max_steps" | "model_finished" | "stop_condition" | undefined;
518
521
  tracingTermination?: import("../../../observability").SpanTermination | undefined;
519
522
  tracingDelegationFailure?: import("../../../observability").SpanTermination | undefined;
523
+ agentVersionId?: string | undefined;
520
524
  modelList?: any[] | undefined;
521
525
  }, unknown, 1>;
522
526
  /**
@@ -7,7 +7,7 @@ import { RequestContext } from '../../../request-context/index.js';
7
7
  import type { ChunkType } from '../../../stream/types.js';
8
8
  import type { Agent } from '../../agent.js';
9
9
  import type { SerializedMessageListState } from '../../message-list/state/index.js';
10
- import type { DurableAgenticWorkflowInput, RunRegistryEntry } from '../types.js';
10
+ import type { AgentFinishEventData, DurableAgenticWorkflowInput, RunRegistryEntry } from '../types.js';
11
11
  type GenerateThreadTitleArgs = Parameters<NonNullable<RunRegistryEntry['generateThreadTitle']>>[0];
12
12
  type AnyAgent = Agent<any, any, any, any>;
13
13
  export interface DurableFinishSideEffectsOptions {
@@ -27,6 +27,8 @@ export interface DurableFinishSideEffectsOptions {
27
27
  }
28
28
  export interface DurableFinishSideEffectsResult {
29
29
  messageListState: SerializedMessageListState;
30
+ finishMessages?: AgentFinishEventData['messages'];
31
+ rewrittenStepTexts?: string[];
30
32
  outputText: string;
31
33
  /**
32
34
  * True when processOutputResult changed `outputText`, including emptying it. Only then should
@@ -22,6 +22,7 @@ export interface DurableLLMExecutionStepOptions {
22
22
  export declare function createDurableLLMExecutionStep(_options?: DurableLLMExecutionStepOptions): import("../../../../workflows").Step<"durable-llm-execution", unknown, {
23
23
  runId: string;
24
24
  agentId: string;
25
+ agentVersionId?: string | undefined;
25
26
  agentName?: string | undefined;
26
27
  messageListState: any;
27
28
  initialUntaggedSystemMessages?: any[] | undefined;
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_run_registry = require("../run-registry-5Suldxz3.cjs");
3
- const require_stream = require("../stream-Dvy_0o14.cjs");
4
- const require_message_list = require("../message-list-DPXPXvin.cjs");
2
+ const require_run_registry = require("../run-registry-BmckDVBk.cjs");
3
+ const require_stream = require("../stream-0kdqBOOn.cjs");
4
+ const require_message_list = require("../message-list-Cj0Sq_JP.cjs");
5
5
  const require_signals = require("../signals-CWxAMEmE.cjs");
6
6
  const require_to_prompt = require("../to-prompt-B9eZo2U5.cjs");
7
7
  const require_schedules = require("../schedules-BZS8McF7.cjs");
@@ -1,6 +1,6 @@
1
- import { A as agentInstructions, It as DEFAULT_TOOL_DECLINE_REASON, Lt as resolveDeclineReason, M as MAX_FS_SUBAGENT_DEPTH, N as AGENT_RESUME_CLAIM_STALE_MS, P as Agent, dl as isDurableAgentLike, j as assembleAgentFromFsEntry, jl as isAgentCompatible, k as agentConfig, ul as hasResumableStreams, ys as getGoalActivityDurationMs } from "../run-registry-CGRPldLH.js";
2
- import { an as resolveThreadIdFromArgs, cn as tryStreamWithJsonFallback, in as resolveSuspendedToolRunId, l as TripWire, on as supportedLanguageModelSpecifications, rn as isSupportedLanguageModel, sn as tryGenerateWithJsonFallback } from "../stream-Dpwx0whf.js";
3
- import { Q as TypeDetector, n as MessageList, t as convertMessages } from "../message-list-DEuRl82K.js";
1
+ import { A as assembleAgentFromFsEntry, Bl as isAgentCompatible, Ds as getGoalActivityDurationMs, It as DEFAULT_TOOL_DECLINE_REASON, Lt as resolveDeclineReason, M as AGENT_RESUME_CLAIM_STALE_MS, N as Agent, O as agentConfig, bl as isDurableAgentLike, j as MAX_FS_SUBAGENT_DEPTH, k as agentInstructions, yl as hasResumableStreams } from "../run-registry-BwEcwYlU.js";
2
+ import { dn as resolveThreadIdFromArgs, fn as supportedLanguageModelSpecifications, l as TripWire, ln as isSupportedLanguageModel, mn as tryStreamWithJsonFallback, pn as tryGenerateWithJsonFallback, un as resolveSuspendedToolRunId } from "../stream-D1y9GzoD.js";
3
+ import { Q as TypeDetector, n as MessageList, t as convertMessages } from "../message-list-KRbg-TnI.js";
4
4
  import { a as isCreatedAgentSignal, c as isUserAuthoredMessage, d as signalSpanAttributes, f as signalToDataPartFormat, h as signalToXmlMarkup, i as getMessageAuthor, l as mastraDBMessageToSignal, m as signalToMessage, n as createSignal, o as isMastraSignalMessage, p as signalToMastraDBMessage, r as dataPartToSignal, s as isTransientSignalMessage, t as createMessageSignal, u as resolveDeliveryAttributes } from "../signals-CqR_iWkg.js";
5
5
  import { n as aiV5ModelMessageToV2PromptMessage } from "../to-prompt-BsDtVXrf.js";
6
6
  import { d as ScheduleInputSchema, f as ScheduleOutputSchema, i as toWorkflowSchedule, n as toAgentSchedule, p as WORKFLOW_SCHEDULE_PREFIX, r as toScheduleView, s as defineSchedule, t as Schedules, u as AGENT_SCHEDULE_PREFIX } from "../schedules-DZfSx-7P.js";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_message_list = require("../../message-list-DPXPXvin.cjs");
2
+ const require_message_list = require("../../message-list-Cj0Sq_JP.cjs");
3
3
  const require_to_prompt = require("../../to-prompt-B9eZo2U5.cjs");
4
4
  exports.AIV4Adapter = require_message_list.AIV4Adapter;
5
5
  exports.AIV5Adapter = require_message_list.AIV5Adapter;
@@ -1,3 +1,3 @@
1
- import { B as getResponseProviderItemIdFromPart, F as AIV4Adapter, H as hasResponseProviderItemId, I as dropCrossProviderExecutedParts, J as getResponseProviderItemIds, L as ensureAnthropicCompatibleMessages, M as AIV5Adapter, Q as TypeDetector, R as findToolCallArgs, U as pairOrphanedToolCalls, V as hasOpenAIReasoningItemId, W as sanitizeOrphanedToolPairs, X as getResponseProviderItemKeys, Y as getResponseProviderItemKey, f as coreContentToString, j as AIV6Adapter, k as CacheKeyGenerator, n as MessageList, o as MessageStateManager, p as messagesAreEqual, q as getResponseProviderItemId, t as convertMessages, u as MessageMerger, z as getOpenAIReasoningItemId } from "../../message-list-DEuRl82K.js";
1
+ import { B as getResponseProviderItemIdFromPart, F as AIV4Adapter, H as hasResponseProviderItemId, I as dropCrossProviderExecutedParts, J as getResponseProviderItemIds, L as ensureAnthropicCompatibleMessages, M as AIV5Adapter, Q as TypeDetector, R as findToolCallArgs, U as pairOrphanedToolCalls, V as hasOpenAIReasoningItemId, W as sanitizeOrphanedToolPairs, X as getResponseProviderItemKeys, Y as getResponseProviderItemKey, f as coreContentToString, j as AIV6Adapter, k as CacheKeyGenerator, n as MessageList, o as MessageStateManager, p as messagesAreEqual, q as getResponseProviderItemId, t as convertMessages, u as MessageMerger, z as getOpenAIReasoningItemId } from "../../message-list-KRbg-TnI.js";
2
2
  import { n as aiV5ModelMessageToV2PromptMessage, t as aiV4CoreMessageToV1PromptMessage } from "../../to-prompt-BsDtVXrf.js";
3
3
  export { AIV4Adapter, AIV5Adapter, AIV6Adapter, CacheKeyGenerator, MessageList, MessageMerger, MessageStateManager, TypeDetector, aiV4CoreMessageToV1PromptMessage, aiV5ModelMessageToV2PromptMessage, convertMessages, coreContentToString, dropCrossProviderExecutedParts, ensureAnthropicCompatibleMessages, findToolCallArgs, getOpenAIReasoningItemId, getResponseProviderItemId, getResponseProviderItemIdFromPart, getResponseProviderItemIds, getResponseProviderItemKey, getResponseProviderItemKeys, hasOpenAIReasoningItemId, hasResponseProviderItemId, messagesAreEqual, pairOrphanedToolCalls, sanitizeOrphanedToolPairs };
@@ -429,6 +429,17 @@ export declare class MessageList {
429
429
  messageId: string;
430
430
  urls: string[];
431
431
  }[];
432
+ /**
433
+ * Mark a message already in this list as changed after it was loaded, so the next save writes it
434
+ * again through the normal whole-message save. It is not reported as new input, output or source.
435
+ * Messages that are not in the list are ignored.
436
+ */
437
+ markForResave(message: MastraDBMessage): void;
438
+ /**
439
+ * The messages marked with {@link markForResave} and not yet drained. For save paths that read the
440
+ * list instead of draining it; they pick these up next to the new input and response.
441
+ */
442
+ getMessagesToResave(): MastraDBMessage[];
432
443
  drainUnsavedMessages(): MastraDBMessage[];
433
444
  /**
434
445
  * Same as {@link drainUnsavedMessages}, plus `restore`, which marks the drained
@@ -111,6 +111,7 @@ export declare function getResponseProviderItemIdFromPart(part: unknown): {
111
111
  provider: ResponseItemIdProvider;
112
112
  itemId: string;
113
113
  } | undefined;
114
+ export declare function createToolCallArgsLookup(messages: MastraDBMessage[]): (toolCallId: string) => Record<string, unknown>;
114
115
  /**
115
116
  * Finds the tool call args for a given toolCallId by searching through messages.
116
117
  * This is used to reconstruct the input field when converting tool-result parts to StaticToolResult.
@@ -17,7 +17,7 @@ export declare const MASTRA_DURABLE_SEGMENTS_KEY = "mastra__durableSegments";
17
17
  * round-trip are skipped so a single non-serializable value can't break the
18
18
  * snapshot.
19
19
  */
20
- export declare function snapshotRequestContextEntries(requestContext: RequestContext | undefined): Record<string, unknown> | undefined;
20
+ export declare function snapshotRequestContextEntries(requestContext: RequestContext | undefined, onEntryOmitted?: () => void): Record<string, unknown> | undefined;
21
21
  /**
22
22
  * Restore a RequestContext from a `snapshotRequestContextEntries` snapshot.
23
23
  *