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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (509) hide show
  1. package/dist/_types/@internal_core@0.1.4/dist/knowledge-compat/index.d.ts +363 -0
  2. package/dist/a2a/index.cjs +1 -1
  3. package/dist/a2a/index.js +1 -1
  4. package/dist/agent/agent.d.ts +72 -1
  5. package/dist/agent/agent.types.d.ts +30 -2
  6. package/dist/agent/durable/create-evented-agent.d.ts +6 -0
  7. package/dist/agent/durable/durable-agent.d.ts +1 -15
  8. package/dist/agent/durable/index.cjs +7 -26
  9. package/dist/agent/durable/index.js +7 -26
  10. package/dist/agent/durable/preparation.d.ts +2 -0
  11. package/dist/agent/durable/utils/resolve-runtime.d.ts +9 -0
  12. package/dist/agent/durable/workflows/durable-loop-builder.d.ts +4 -0
  13. package/dist/agent/durable/workflows/finalize-run.d.ts +3 -1
  14. package/dist/agent/durable/workflows/steps/llm-execution.d.ts +1 -0
  15. package/dist/agent/index.cjs +3 -3
  16. package/dist/agent/index.js +3 -3
  17. package/dist/agent/message-list/index.cjs +1 -1
  18. package/dist/agent/message-list/index.js +1 -1
  19. package/dist/agent/message-list/message-list.d.ts +11 -0
  20. package/dist/agent/message-list/utils/provider-compat.d.ts +1 -0
  21. package/dist/agent/request-context-snapshot.d.ts +1 -1
  22. package/dist/agent/streams/types.d.ts +10 -0
  23. package/dist/agent/thread-stream-runtime.d.ts +5 -0
  24. package/dist/agent/types.d.ts +25 -0
  25. package/dist/agent-builder/ee/index.cjs +1 -1
  26. package/dist/agent-builder/ee/index.js +1 -1
  27. package/dist/agent-controller/index.cjs +1 -1
  28. package/dist/agent-controller/index.js +1 -1
  29. package/dist/{agent-controller-K5vHtqfO.cjs → agent-controller-CrQ9OF80.cjs} +8 -8
  30. package/dist/{agent-controller-Cf3_IuY8.js → agent-controller-SSlKzE6A.js} +8 -8
  31. package/dist/background-tasks/index.cjs +1 -1
  32. package/dist/background-tasks/index.js +1 -1
  33. package/dist/{background-tasks-DqnQMfuf.cjs → background-tasks-BDrYBis-.cjs} +5 -3
  34. package/dist/{background-tasks-BgpX1P_s.js → background-tasks-BnJfNLFo.js} +5 -3
  35. package/dist/browser/index.cjs +2 -2
  36. package/dist/browser/index.js +2 -2
  37. package/dist/{builder-x295GDL6.js → builder-Cl-0BWkh.js} +2 -2
  38. package/dist/{builder-D8Osghdo.cjs → builder-Cw8u3pPl.cjs} +2 -2
  39. package/dist/capabilities/302ai.json +192 -192
  40. package/dist/capabilities/abliteratedllm.json +34 -34
  41. package/dist/capabilities/abliteration-ai.json +11 -11
  42. package/dist/capabilities/above.json +17 -17
  43. package/dist/capabilities/adaption.json +12 -12
  44. package/dist/capabilities/adzuki.json +30 -30
  45. package/dist/capabilities/agentrouter.json +10 -10
  46. package/dist/capabilities/agnes.json +4 -4
  47. package/dist/capabilities/ai-router.json +9 -9
  48. package/dist/capabilities/aiand.json +19 -11
  49. package/dist/capabilities/aigrow.json +11 -11
  50. package/dist/capabilities/aimlapi.json +146 -149
  51. package/dist/capabilities/aipg.json +2 -2
  52. package/dist/capabilities/aixy.json +14 -14
  53. package/dist/capabilities/aki-io.json +11 -11
  54. package/dist/capabilities/alibaba-cn.json +128 -109
  55. package/dist/capabilities/alibaba-coding-plan-cn.json +7 -19
  56. package/dist/capabilities/alibaba-coding-plan.json +7 -19
  57. package/dist/capabilities/alibaba-token-plan-cn.json +49 -67
  58. package/dist/capabilities/alibaba-token-plan.json +51 -69
  59. package/dist/capabilities/alibaba.json +71 -118
  60. package/dist/capabilities/ambient.json +14 -14
  61. package/dist/capabilities/amd.json +11 -11
  62. package/dist/capabilities/anthropic.json +48 -48
  63. package/dist/capabilities/anyapi.json +18 -18
  64. package/dist/capabilities/apiko.json +2 -2
  65. package/dist/capabilities/arcee.json +10 -10
  66. package/dist/capabilities/augure.json +6 -6
  67. package/dist/capabilities/auriko.json +20 -20
  68. package/dist/capabilities/bailing.json +5 -5
  69. package/dist/capabilities/baseten.json +46 -16
  70. package/dist/capabilities/bee.json +5 -5
  71. package/dist/capabilities/berget.json +4 -4
  72. package/dist/capabilities/bothub.json +16 -16
  73. package/dist/capabilities/boundless.json +36 -36
  74. package/dist/capabilities/bumo.json +40 -40
  75. package/dist/capabilities/byteplus.json +32 -32
  76. package/dist/capabilities/cerebras.json +4 -4
  77. package/dist/capabilities/cheapaimodel.json +5 -5
  78. package/dist/capabilities/cheapest-token.json +24 -24
  79. package/dist/capabilities/chutes.json +9 -9
  80. package/dist/capabilities/cline-pass.json +37 -37
  81. package/dist/capabilities/cloudcode.json +4 -4
  82. package/dist/capabilities/cloudflare-workers-ai.json +24 -24
  83. package/dist/capabilities/commandcode.json +152 -152
  84. package/dist/capabilities/concentrate.json +290 -266
  85. package/dist/capabilities/cortecs.json +105 -105
  86. package/dist/capabilities/crossmodel.json +160 -160
  87. package/dist/capabilities/crusoe.json +10 -10
  88. package/dist/capabilities/daoxe.json +7 -7
  89. package/dist/capabilities/databricks.json +318 -62
  90. package/dist/capabilities/deepinfra.json +73 -129
  91. package/dist/capabilities/deepseek.json +2 -2
  92. package/dist/capabilities/digitalocean.json +114 -114
  93. package/dist/capabilities/dothoosh.json +28 -28
  94. package/dist/capabilities/doubleword.json +24 -24
  95. package/dist/capabilities/edenai.json +458 -458
  96. package/dist/capabilities/empiriolabs.json +166 -166
  97. package/dist/capabilities/engy.json +20 -20
  98. package/dist/capabilities/evroc.json +8 -8
  99. package/dist/capabilities/ezkielyna.json +8 -8
  100. package/dist/capabilities/fastrouter.json +85 -85
  101. package/dist/capabilities/fireworks-ai.json +107 -44
  102. package/dist/capabilities/freemodel.json +23 -23
  103. package/dist/capabilities/friendli.json +9 -9
  104. package/dist/capabilities/frogbot.json +94 -94
  105. package/dist/capabilities/gisoo.json +16 -16
  106. package/dist/capabilities/gmicloud.json +17 -17
  107. package/dist/capabilities/google.json +57 -57
  108. package/dist/capabilities/graphn.json +10 -10
  109. package/dist/capabilities/greenpt.json +36 -36
  110. package/dist/capabilities/groq.json +2 -2
  111. package/dist/capabilities/helicone.json +68 -68
  112. package/dist/capabilities/hopper.json +2 -2
  113. package/dist/capabilities/hostinger-router.json +12 -12
  114. package/dist/capabilities/hpc-ai.json +13 -13
  115. package/dist/capabilities/huawei-maas.json +17 -17
  116. package/dist/capabilities/hubris.json +30 -30
  117. package/dist/capabilities/huggingface.json +193 -37
  118. package/dist/capabilities/hyper.json +23 -23
  119. package/dist/capabilities/impossibl.json +140 -140
  120. package/dist/capabilities/inception.json +2 -2
  121. package/dist/capabilities/inceptron.json +4 -4
  122. package/dist/capabilities/inco.json +3 -3
  123. package/dist/capabilities/infer.json +15 -15
  124. package/dist/capabilities/inferall.json +10 -10
  125. package/dist/capabilities/inference-coop.json +9 -9
  126. package/dist/capabilities/inferenceapis.json +9 -9
  127. package/dist/capabilities/inferris.json +3 -3
  128. package/dist/capabilities/infersia.json +2 -2
  129. package/dist/capabilities/inferx.json +3 -3
  130. package/dist/capabilities/infomaniak.json +4 -4
  131. package/dist/capabilities/io-net.json +2 -2
  132. package/dist/capabilities/isoquant.json +4 -4
  133. package/dist/capabilities/iteracompute.json +60 -60
  134. package/dist/capabilities/jad-ai.json +3 -3
  135. package/dist/capabilities/jalapeno.json +12 -12
  136. package/dist/capabilities/jiekou.json +63 -63
  137. package/dist/capabilities/jzstoken.json +50 -50
  138. package/dist/capabilities/keln.json +14 -21
  139. package/dist/capabilities/kenari.json +123 -120
  140. package/dist/capabilities/kilo.json +622 -647
  141. package/dist/capabilities/kimi-code-plan-cn.json +5 -5
  142. package/dist/capabilities/kimi-code-plan-global.json +5 -5
  143. package/dist/capabilities/kitani.json +6 -6
  144. package/dist/capabilities/klavo.json +18 -18
  145. package/dist/capabilities/korouter.json +29 -29
  146. package/dist/capabilities/kunavo.json +10 -10
  147. package/dist/capabilities/liquid.json +11 -11
  148. package/dist/capabilities/lithosai.json +2 -2
  149. package/dist/capabilities/llmgateway-providers.json +932 -905
  150. package/dist/capabilities/llmgateway.json +336 -336
  151. package/dist/capabilities/llmtr.json +22 -22
  152. package/dist/capabilities/logits.json +2 -2
  153. package/dist/capabilities/longcat.json +2 -7
  154. package/dist/capabilities/lowrouter.json +54 -54
  155. package/dist/capabilities/lyceum.json +12 -12
  156. package/dist/capabilities/melious.json +13 -13
  157. package/dist/capabilities/merge-gateway.json +260 -260
  158. package/dist/capabilities/meta.json +7 -7
  159. package/dist/capabilities/mistral.json +20 -20
  160. package/dist/capabilities/mixlayer.json +4 -4
  161. package/dist/capabilities/modal.json +10 -10
  162. package/dist/capabilities/model-oracle-ai.json +25 -25
  163. package/dist/capabilities/modelis.json +20 -20
  164. package/dist/capabilities/modular.json +6 -6
  165. package/dist/capabilities/moneo.json +16 -16
  166. package/dist/capabilities/moonshotai-cn.json +7 -7
  167. package/dist/capabilities/moonshotai.json +7 -7
  168. package/dist/capabilities/morph.json +11 -11
  169. package/dist/capabilities/munito-eu.json +6 -6
  170. package/dist/capabilities/munito.json +6 -6
  171. package/dist/capabilities/nan.json +27 -27
  172. package/dist/capabilities/nano-gpt.json +578 -578
  173. package/dist/capabilities/nearai.json +84 -84
  174. package/dist/capabilities/nebius.json +37 -28
  175. package/dist/capabilities/neon.json +126 -126
  176. package/dist/capabilities/neuralwatt.json +41 -41
  177. package/dist/capabilities/nokeep.json +4 -4
  178. package/dist/capabilities/novita-ai.json +154 -154
  179. package/dist/capabilities/nvidia.json +35 -35
  180. package/dist/capabilities/oathbreaker.json +2 -2
  181. package/dist/capabilities/obscurify.json +32 -32
  182. package/dist/capabilities/oci.json +7 -7
  183. package/dist/capabilities/ofox.json +357 -357
  184. package/dist/capabilities/ollama-cloud.json +56 -56
  185. package/dist/capabilities/openai.json +51 -51
  186. package/dist/capabilities/opencode-go.json +85 -84
  187. package/dist/capabilities/openrouter.json +542 -567
  188. package/dist/capabilities/opper.json +30 -24
  189. package/dist/capabilities/orcarouter.json +236 -236
  190. package/dist/capabilities/outerlabs.json +32 -32
  191. package/dist/capabilities/ovhcloud.json +7 -7
  192. package/dist/capabilities/pareto.json +6 -6
  193. package/dist/capabilities/pendra.json +4 -4
  194. package/dist/capabilities/perplexity-agent.json +61 -61
  195. package/dist/capabilities/phala.json +34 -34
  196. package/dist/capabilities/pioneer.json +30 -30
  197. package/dist/capabilities/poe.json +136 -136
  198. package/dist/capabilities/powerspring.json +13 -13
  199. package/dist/capabilities/primalabs.json +10 -10
  200. package/dist/capabilities/prime.json +124 -107
  201. package/dist/capabilities/privatemode-ai.json +14 -14
  202. package/dist/capabilities/proxystacks.json +6 -6
  203. package/dist/capabilities/qiniu-ai.json +16 -16
  204. package/dist/capabilities/refuseless.json +6 -6
  205. package/dist/capabilities/regolo-ai.json +6 -6
  206. package/dist/capabilities/requesty.json +172 -172
  207. package/dist/capabilities/ruapi.json +17 -17
  208. package/dist/capabilities/runcrate.json +5 -5
  209. package/dist/capabilities/runinfra.json +13 -13
  210. package/dist/capabilities/sakana.json +6 -6
  211. package/dist/capabilities/sambanova.json +9 -9
  212. package/dist/capabilities/sandbase.json +27 -27
  213. package/dist/capabilities/sarvam.json +12 -12
  214. package/dist/capabilities/scaleway.json +14 -14
  215. package/dist/capabilities/scnet-token-plan.json +9 -9
  216. package/dist/capabilities/scx-ai.json +26 -26
  217. package/dist/capabilities/sensenova.json +12 -12
  218. package/dist/capabilities/siliconflow-cn.json +49 -49
  219. package/dist/capabilities/siliconflow.json +46 -46
  220. package/dist/capabilities/snowflake-cortex.json +20 -20
  221. package/dist/capabilities/sokkan.json +7 -7
  222. package/dist/capabilities/sparrowcodes.json +25 -25
  223. package/dist/capabilities/standardcompute.json +102 -102
  224. package/dist/capabilities/steadyrouter.json +40 -40
  225. package/dist/capabilities/stepfun-ai-step-plan.json +6 -6
  226. package/dist/capabilities/stepfun-ai.json +15 -8
  227. package/dist/capabilities/stepfun-step-plan.json +15 -8
  228. package/dist/capabilities/stepfun.json +15 -8
  229. package/dist/capabilities/stepping-stone.json +16 -16
  230. package/dist/capabilities/synthetic.json +13 -13
  231. package/dist/capabilities/synthorai.json +19 -19
  232. package/dist/capabilities/teamorouter.json +24 -24
  233. package/dist/capabilities/teapot-router.json +13 -13
  234. package/dist/capabilities/tencent-coding-plan.json +1 -23
  235. package/dist/capabilities/tencent-token-plan.json +60 -23
  236. package/dist/capabilities/tencent-tokenhub.json +182 -7
  237. package/dist/capabilities/tensorx.json +50 -50
  238. package/dist/capabilities/tenstorrent.json +6 -6
  239. package/dist/capabilities/the-grid-ai.json +28 -28
  240. package/dist/capabilities/thinkingmachines.json +72 -55
  241. package/dist/capabilities/tinfoil.json +13 -13
  242. package/dist/capabilities/toapis.json +2 -2
  243. package/dist/capabilities/togetherai.json +54 -83
  244. package/dist/capabilities/tokengo.json +25 -25
  245. package/dist/capabilities/tokenify.json +9 -9
  246. package/dist/capabilities/trustedrouter.json +4 -4
  247. package/dist/capabilities/trustedtokens.json +17 -17
  248. package/dist/capabilities/umans-ai-coding-plan.json +13 -13
  249. package/dist/capabilities/umans-ai.json +10 -10
  250. package/dist/capabilities/unrestricted.json +6 -6
  251. package/dist/capabilities/uplinkswitch.json +21 -21
  252. package/dist/capabilities/upstage.json +4 -4
  253. package/dist/capabilities/vancine.json +23 -23
  254. package/dist/capabilities/vercel.json +540 -527
  255. package/dist/capabilities/vivgrid.json +80 -80
  256. package/dist/capabilities/volcengine-coding-plan.json +24 -54
  257. package/dist/capabilities/volcengine.json +55 -60
  258. package/dist/capabilities/vultr.json +24 -24
  259. package/dist/capabilities/wafer.ai.json +19 -19
  260. package/dist/capabilities/wallaby.json +5 -5
  261. package/dist/capabilities/wally.json +11 -11
  262. package/dist/capabilities/wandb.json +21 -21
  263. package/dist/capabilities/watt.json +24 -24
  264. package/dist/capabilities/xai.json +7 -7
  265. package/dist/capabilities/xiaomi-token-plan-ams.json +2 -12
  266. package/dist/capabilities/xiaomi-token-plan-cn.json +2 -12
  267. package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -12
  268. package/dist/capabilities/xiaomi.json +3 -25
  269. package/dist/capabilities/xpersona.json +13 -13
  270. package/dist/capabilities/xxapi.json +31 -31
  271. package/dist/capabilities/zai-coding-plan.json +18 -18
  272. package/dist/capabilities/zai.json +49 -26
  273. package/dist/capabilities/zenifra.json +26 -26
  274. package/dist/capabilities/zenmux.json +205 -205
  275. package/dist/capabilities/zerogpu.json +11 -11
  276. package/dist/capabilities/zhipuai-coding-plan.json +6 -6
  277. package/dist/capabilities/zhipuai.json +39 -24
  278. package/dist/capabilities/zro.json +6 -6
  279. package/dist/channels/index.cjs +2 -2
  280. package/dist/channels/index.js +2 -2
  281. package/dist/{channels-Dx4jiXeK.js → channels-Cz1y3W6u.js} +1 -1
  282. package/dist/{channels-q6qnuRNV.cjs → channels-DQg4v_gm.cjs} +1 -1
  283. package/dist/coding-agent/index.cjs +2 -2
  284. package/dist/coding-agent/index.js +2 -2
  285. package/dist/datasets/dataset.d.ts +13 -6
  286. package/dist/datasets/experiment/durable.d.ts +16 -0
  287. package/dist/datasets/experiment/index.d.ts +2 -1
  288. package/dist/datasets/experiment/item.d.ts +26 -4
  289. package/dist/datasets/experiment/retries.d.ts +18 -0
  290. package/dist/datasets/experiment/types.d.ts +18 -0
  291. package/dist/datasets/experiment/workflow-id.d.ts +7 -0
  292. package/dist/datasets/experiment/workflow.d.ts +74 -0
  293. package/dist/datasets/index.cjs +3 -2
  294. package/dist/datasets/index.d.ts +2 -1
  295. package/dist/datasets/index.js +3 -3
  296. package/dist/docs/SKILL.md +4 -3
  297. package/dist/docs/assets/SOURCE_MAP.json +928 -903
  298. package/dist/docs/references/docs-deployment-workers.md +1 -1
  299. package/dist/docs/references/docs-evals-experiments.md +29 -1
  300. package/dist/docs/references/docs-harness-background-tasks.md +4 -1
  301. package/dist/docs/references/docs-harness-durable-agents.md +9 -5
  302. package/dist/docs/references/docs-knowledge-agents-and-tools.md +1 -0
  303. package/dist/docs/references/docs-knowledge-importers.md +195 -0
  304. package/dist/docs/references/docs-knowledge-load-your-content.md +2 -2
  305. package/dist/docs/references/docs-knowledge-overview.md +1 -1
  306. package/dist/docs/references/docs-mastra-platform-observability-overview.md +1 -1
  307. package/dist/docs/references/docs-sandbox-filesystem.md +1 -1
  308. package/dist/docs/references/docs-server-pubsub.md +51 -8
  309. package/dist/docs/references/docs-signals-running-across-processes.md +2 -0
  310. package/dist/docs/references/docs-signals-thread-streams.md +1 -1
  311. package/dist/docs/references/docs-studio-auth.md +54 -7
  312. package/dist/docs/references/docs-workflows-overview.md +1 -1
  313. package/dist/docs/references/docs-workflows-scheduled-workflows.md +1 -1
  314. package/dist/docs/references/integrations-auth-clerk.md +48 -4
  315. package/dist/docs/references/integrations-channels-slack.md +4 -2
  316. package/dist/docs/references/integrations.md +6 -0
  317. package/dist/docs/references/reference-agents-agent.md +3 -1
  318. package/dist/docs/references/reference-agents-channels.md +116 -27
  319. package/dist/docs/references/reference-agents-durable-agent.md +12 -4
  320. package/dist/docs/references/reference-auth-clerk.md +21 -1
  321. package/dist/docs/references/reference-datasets-runExperimentItem.md +13 -1
  322. package/dist/docs/references/reference-datasets-startExperimentAsync.md +3 -1
  323. package/dist/docs/references/reference-editor-mastra-editor.md +3 -1
  324. package/dist/docs/references/reference-knowledge-knowledge-class.md +13 -6
  325. package/dist/docs/references/reference-knowledge-knowledge-tools.md +43 -20
  326. package/dist/docs/references/reference-memory-observational-memory.md +2 -2
  327. package/dist/docs/references/reference-processors-moderation-processor.md +2 -2
  328. package/dist/docs/references/reference-pubsub-base.md +5 -1
  329. package/dist/docs/references/reference-pubsub-event-emitter.md +2 -0
  330. package/dist/docs/references/reference-pubsub-redis-streams.md +1 -1
  331. package/dist/docs/references/reference-pubsub-unix-socket-pubsub.md +2 -0
  332. package/dist/docs/references/reference-streaming-ChunkType.md +3 -3
  333. package/dist/docs/references/reference-workers-overview.md +1 -1
  334. package/dist/docs/references/reference-workflows-run-methods-start.md +23 -0
  335. package/dist/docs/references/reference-workflows-run-methods-timeTravel.md +4 -0
  336. package/dist/docs/references/reference-workflows-run.md +1 -1
  337. package/dist/docs/references/reference-workspace-local-sandbox.md +2 -0
  338. package/dist/error/index.cjs +1 -1
  339. package/dist/error/index.js +1 -1
  340. package/dist/{error-C9d_24w-.js → error-BLwEXqOK.js} +2 -2
  341. package/dist/{error-BRQf2ku0.cjs → error-BdEvO8za.cjs} +2 -2
  342. package/dist/evals/index.cjs +1 -1
  343. package/dist/evals/index.js +1 -1
  344. package/dist/evals/scoreTraces/index.cjs +1 -1
  345. package/dist/evals/scoreTraces/index.js +1 -1
  346. package/dist/events/caching-pubsub.d.ts +1 -0
  347. package/dist/events/event-emitter/index.d.ts +12 -5
  348. package/dist/events/index.cjs +15 -1
  349. package/dist/events/index.js +15 -1
  350. package/dist/events/pubsub.d.ts +29 -0
  351. package/dist/events/reach.d.ts +11 -0
  352. package/dist/events/unix-socket-pubsub.d.ts +14 -0
  353. package/dist/features/index.cjs +1 -0
  354. package/dist/features/index.js +1 -0
  355. package/dist/{filesystem-B5X-5G0x.js → filesystem-B8ad6kAW.js} +1 -1
  356. package/dist/{filesystem-BDSpwBke.cjs → filesystem-BB5YWXH-.cjs} +1 -1
  357. package/dist/{filesystem-DzM9pcQ8.js → filesystem-BDHUxbHn.js} +1 -1
  358. package/dist/{filesystem-B0AZrbj8.cjs → filesystem-BP5yz5LG.cjs} +1 -1
  359. package/dist/{filesystem-BsdkC311.js → filesystem-B_afSgYk.js} +1 -1
  360. package/dist/{filesystem-C-cyJfi1.cjs → filesystem-BaOJOc-V.cjs} +1 -1
  361. package/dist/{filesystem-B3s0WRud.js → filesystem-BhYgU8qg.js} +1 -1
  362. package/dist/{filesystem-DzfqVTO_.js → filesystem-CLBVmR5j.js} +1 -1
  363. package/dist/{filesystem-CEbD_77-.cjs → filesystem-Cgxc2a_-.cjs} +1 -1
  364. package/dist/{filesystem-Cv79mHRk.js → filesystem-ClBOBoDc.js} +1 -1
  365. package/dist/{filesystem-DsCQiBl2.cjs → filesystem-DVVecqZt.cjs} +1 -1
  366. package/dist/{filesystem-CUAgLugE.cjs → filesystem-Fpsu7e24.cjs} +1 -1
  367. package/dist/{filesystem-versioned-Bijb_p9l.js → filesystem-versioned-BL1ojJLo.js} +1 -1
  368. package/dist/{filesystem-versioned-DZGyPbNC.cjs → filesystem-versioned-BavRtYWJ.cjs} +1 -1
  369. package/dist/harness/index.cjs +1 -1
  370. package/dist/harness/index.js +1 -1
  371. package/dist/index.cjs +1 -1
  372. package/dist/index.js +1 -1
  373. package/dist/knowledge/config.d.ts +10 -0
  374. package/dist/knowledge/host-writes.d.ts +10 -0
  375. package/dist/knowledge/importers/conformance.d.ts +25 -0
  376. package/dist/knowledge/importers/define.d.ts +204 -0
  377. package/dist/knowledge/importers/host.d.ts +143 -0
  378. package/dist/knowledge/importers/index.d.ts +12 -0
  379. package/dist/knowledge/importers/local-host.d.ts +106 -0
  380. package/dist/knowledge/importers/manifest.d.ts +25 -0
  381. package/dist/knowledge/importers/runner.d.ts +61 -0
  382. package/dist/knowledge/importers/sink.d.ts +105 -0
  383. package/dist/knowledge/importers/types.d.ts +144 -0
  384. package/dist/knowledge/index.cjs +2715 -8
  385. package/dist/knowledge/index.d.ts +54 -4
  386. package/dist/knowledge/index.js +2692 -9
  387. package/dist/knowledge/instructions.d.ts +1 -1
  388. package/dist/knowledge/links.d.ts +8 -0
  389. package/dist/knowledge/pinned-state-processor.d.ts +5 -0
  390. package/dist/knowledge/pinned.d.ts +4 -1
  391. package/dist/knowledge/scope-runtime.d.ts +10 -0
  392. package/dist/llm/index.cjs +3 -3
  393. package/dist/llm/index.js +3 -3
  394. package/dist/llm/model/provider-types.generated.d.ts +7812 -7831
  395. package/dist/llm/model/shared.types.d.ts +31 -0
  396. package/dist/{llm-CsQuqKPc.cjs → llm-8Av3mSjD.cjs} +2 -2
  397. package/dist/{llm-DnXK3Pmw.js → llm-B5A5cwJr.js} +2 -2
  398. package/dist/loop/index.cjs +2 -2
  399. package/dist/loop/index.js +2 -2
  400. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +2 -2
  401. package/dist/{manager-BsghM-UL.js → manager-DfWQCJUK.js} +460 -94
  402. package/dist/{manager-DwFnIrI6.cjs → manager-sv35JY-z.cjs} +476 -92
  403. package/dist/mastra/index.cjs +1 -1
  404. package/dist/mastra/index.d.ts +13 -0
  405. package/dist/mastra/index.js +1 -1
  406. package/dist/mastra/resolve-agent.d.ts +3 -1
  407. package/dist/{mastra-B8i1UDZs.js → mastra-CigBrT7X.js} +32 -23
  408. package/dist/{mastra-Cn5NC6Es.cjs → mastra-D4hvfuxX.cjs} +34 -25
  409. package/dist/memory/index.cjs +3 -3
  410. package/dist/memory/index.js +3 -3
  411. package/dist/{message-list-DPXPXvin.cjs → message-list-Cj0Sq_JP.cjs} +63 -8
  412. package/dist/{message-list-DEuRl82K.js → message-list-KRbg-TnI.js} +63 -8
  413. package/dist/{model-CNPfry_X.cjs → model-BK93CMtl.cjs} +1 -1
  414. package/dist/{model-CsOcWMUt.js → model-CYtXw861.js} +1 -1
  415. package/dist/{netlify-C-83Fxus.cjs → netlify-BAnn3ouY.cjs} +1 -1
  416. package/dist/{netlify-C-OpNSGp.js → netlify-CuI1ZrwR.js} +1 -1
  417. package/dist/notifications/index.cjs +1 -1
  418. package/dist/notifications/index.js +1 -1
  419. package/dist/{output-helpers-JL-HeCbT.cjs → output-helpers-1Zu4Vt9C.cjs} +68 -25
  420. package/dist/{output-helpers-D4II19No.js → output-helpers-CedRCE17.js} +69 -26
  421. package/dist/processor-provider/index.cjs +1 -1
  422. package/dist/processor-provider/index.js +1 -1
  423. package/dist/processors/abort-signal-scope.d.ts +6 -0
  424. package/dist/processors/index.cjs +2 -2
  425. package/dist/processors/index.js +2 -2
  426. package/dist/{provider-registry-9O-H9osy.cjs → provider-registry-BwuI_IpT.cjs} +21690 -21811
  427. package/dist/{provider-registry-RZ8EgSe8.js → provider-registry-CmQLzLF_.js} +21690 -21811
  428. package/dist/provider-registry.json +22113 -22215
  429. package/dist/{registry-generator-e8sltJls.js → registry-generator-C17V4WfG.js} +1 -1
  430. package/dist/{registry-generator-DxCX-FiO.cjs → registry-generator-C_0ae7Ce.cjs} +1 -1
  431. package/dist/{rehydrate-B-wrAN7C.cjs → rehydrate-CDQ4dOYj.cjs} +2 -2
  432. package/dist/{rehydrate-D3fPgJwp.js → rehydrate-PnaVawGX.js} +2 -2
  433. package/dist/relevance/index.cjs +2 -2
  434. package/dist/relevance/index.js +2 -2
  435. package/dist/{run-registry-5_LQBGn_.cjs → run-registry-BmckDVBk.cjs} +1698 -497
  436. package/dist/{run-registry-DC03XLeZ.js → run-registry-BwEcwYlU.js} +1614 -467
  437. package/dist/{source-DDwx-87N.cjs → source-BVOi8Xhp.cjs} +1 -1
  438. package/dist/{source-Did_2XQc.js → source-fNa6u1kH.js} +1 -1
  439. package/dist/storage/domains/agents/index.cjs +1 -1
  440. package/dist/storage/domains/agents/index.js +1 -1
  441. package/dist/storage/domains/knowledge/base.d.ts +72 -0
  442. package/dist/storage/domains/knowledge/importers-inmemory.d.ts +146 -0
  443. package/dist/storage/domains/knowledge/importers.d.ts +287 -0
  444. package/dist/storage/domains/knowledge/index.d.ts +1 -0
  445. package/dist/storage/domains/knowledge/inmemory.d.ts +12 -0
  446. package/dist/storage/domains/knowledge/pages-inmemory.d.ts +12 -1
  447. package/dist/storage/domains/knowledge/pages.d.ts +25 -7
  448. package/dist/storage/domains/mcp-clients/index.cjs +1 -1
  449. package/dist/storage/domains/mcp-clients/index.js +1 -1
  450. package/dist/storage/domains/mcp-servers/index.cjs +1 -1
  451. package/dist/storage/domains/mcp-servers/index.js +1 -1
  452. package/dist/storage/domains/prompt-blocks/index.cjs +1 -1
  453. package/dist/storage/domains/prompt-blocks/index.js +1 -1
  454. package/dist/storage/domains/scorer-definitions/index.cjs +1 -1
  455. package/dist/storage/domains/scorer-definitions/index.js +1 -1
  456. package/dist/storage/domains/skills/index.cjs +1 -1
  457. package/dist/storage/domains/skills/index.js +1 -1
  458. package/dist/storage/domains/workspaces/index.cjs +1 -1
  459. package/dist/storage/domains/workspaces/index.js +1 -1
  460. package/dist/storage/index.cjs +15 -10
  461. package/dist/storage/index.js +11 -11
  462. package/dist/stream/base/output.d.ts +59 -15
  463. package/dist/stream/index.cjs +2 -2
  464. package/dist/stream/index.js +2 -2
  465. package/dist/stream/types.d.ts +24 -2
  466. package/dist/{stream-4aNIw_TQ.cjs → stream-0kdqBOOn.cjs} +64 -9
  467. package/dist/{stream-CJUm6EAH.js → stream-D1y9GzoD.js} +29 -10
  468. package/dist/test-utils/llm-mock.cjs +1 -1
  469. package/dist/test-utils/llm-mock.js +1 -1
  470. package/dist/tool-loop-agent/index.cjs +1 -1
  471. package/dist/tool-loop-agent/index.js +1 -1
  472. package/dist/{tool-loop-agent-FEEwHfmg.js → tool-loop-agent-BdjWGVIb.js} +4 -4
  473. package/dist/{tool-loop-agent-Dn0QCB9n.cjs → tool-loop-agent-kWaZAT6Q.cjs} +4 -4
  474. package/dist/tools/types.d.ts +27 -1
  475. package/dist/{utils-DY01hxVd.cjs → utils-BKUCaZ12.cjs} +1 -1
  476. package/dist/{utils-Bd_y1_a-.js → utils-GHY3hmLx.js} +1 -1
  477. package/dist/utils.cjs +1 -1
  478. package/dist/utils.js +1 -1
  479. package/dist/{validate-CX0yQo_q.js → validate-CB-q-R2F.js} +1 -1
  480. package/dist/{validate-CuB_1Zd3.cjs → validate-De92squ7.cjs} +1 -1
  481. package/dist/vector/index.cjs +2 -2
  482. package/dist/vector/index.js +2 -2
  483. package/dist/worker/index.cjs +1 -1
  484. package/dist/worker/index.js +1 -1
  485. package/dist/{worker-CbaSmip-.cjs → worker-BbWPQuPR.cjs} +2 -2
  486. package/dist/{worker-B80xkcKG.js → worker-C3u_xzY2.js} +2 -2
  487. package/dist/{worker-GsGIxPMa.cjs → worker-CAKvQj9_.cjs} +2 -2
  488. package/dist/{worker-DSEfMPmq.js → worker-Kwm8EKcj.js} +2 -2
  489. package/dist/{workflow-CnBPXTpv.cjs → workflow-CSjXeNcR.cjs} +4 -4
  490. package/dist/{workflow-CZHY_C85.js → workflow-CVmI1Sw-.js} +4 -4
  491. package/dist/workflows/builder/index.cjs +1 -1
  492. package/dist/workflows/builder/index.js +1 -1
  493. package/dist/workflows/evented/index.cjs +1 -1
  494. package/dist/workflows/evented/index.js +1 -1
  495. package/dist/workflows/evented/setup-warning.d.ts +18 -0
  496. package/dist/workflows/evented/workflow-event-processor/run-status.d.ts +37 -0
  497. package/dist/workflows/evented/workflow.d.ts +10 -0
  498. package/dist/workflows/index.cjs +4 -4
  499. package/dist/workflows/index.js +4 -4
  500. package/dist/workflows/workflow.d.ts +6 -1
  501. package/dist/workspace/filesystem/filesystem.d.ts +5 -0
  502. package/dist/workspace/index.cjs +1 -1
  503. package/dist/workspace/index.js +1 -1
  504. package/dist/workspace/sandbox/local-sandbox.d.ts +16 -7
  505. package/dist/workspace/sandbox/native-sandbox/types.d.ts +11 -1
  506. package/dist/{workspace-D7TIleIt.js → workspace-DY2Nxiyi.js} +235 -34
  507. package/dist/{workspace-D2drutNg.cjs → workspace-X2RHJZU9.cjs} +235 -34
  508. package/package.json +7 -7
  509. package/src/llm/model/provider-types.generated.d.ts +7812 -7831
@@ -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";
@@ -1467,21 +1467,80 @@ TRequestContext extends Record<string, any> | unknown = any, TEditor extends Age
1467
1467
  runId: string;
1468
1468
  reason?: string;
1469
1469
  }): Promise<MastraAgentNetworkStream<undefined>>;
1470
+ /**
1471
+ * Runs the agent to completion and resolves with a {@link FullOutput}: final `text`, every
1472
+ * step, all tool calls and results, usage, and `object` when `structuredOutput` is set.
1473
+ * Use `stream()` instead to consume output as it is produced.
1474
+ *
1475
+ * - `messages`: a string, a message object (`{ role, content }`, AI SDK UI/model messages
1476
+ * included), or an array mixing both.
1477
+ * - `options`: per-call {@link AgentExecutionOptionsBase} (`maxSteps`, `memory`,
1478
+ * `requestContext`, `modelSettings`, `toolChoice`, ...). They are merged over the
1479
+ * agent's `defaultOptions`.
1480
+ * - Tool calls loop until the model stops calling tools or the step limit is hit
1481
+ * (`maxSteps`; 5 steps when neither `maxSteps` nor `stopWhen` is set).
1482
+ * - Rejects with the run's error if the run fails.
1483
+ * - Tool data is wrapped in `payload`: read `result.toolCalls[i].payload.args` and
1484
+ * `result.toolResults[i].payload.result`.
1485
+ *
1486
+ * This overload: `structuredOutput.schema` is a schema such as a Zod object, so
1487
+ * `result.object` is typed from that schema.
1488
+ *
1489
+ * @example
1490
+ * ```ts
1491
+ * const result = await agent.generate('What is the weather in Paris?', { maxSteps: 3 });
1492
+ * console.log(result.text);
1493
+ * for (const call of result.toolCalls) console.log(call.payload.toolName, call.payload.args);
1494
+ * for (const res of result.toolResults) console.log(res.payload.toolName, res.payload.result);
1495
+ *
1496
+ * const { object } = await agent.generate('List three colors', {
1497
+ * structuredOutput: { schema: z.object({ colors: z.array(z.string()) }) },
1498
+ * });
1499
+ * ```
1500
+ *
1501
+ * @see [Agent.generate() reference](https://mastra.ai/reference/agents/generate)
1502
+ */
1470
1503
  generate<OUTPUT extends StandardSchemaWithJSON<any, any>, T extends InferStandardSchemaOutput<OUTPUT> = InferStandardSchemaOutput<OUTPUT>>(messages: MessageListInput, options: AgentExecutionOptionsBase<T> & {
1471
1504
  structuredOutput: PublicStructuredOutputOptions<T>;
1472
1505
  } & {
1473
1506
  model?: DynamicArgument<MastraModelConfig>;
1474
1507
  }): Promise<FullOutput<T>>;
1508
+ /**
1509
+ * Runs the agent to completion with `structuredOutput`, typing `result.object` as `OUTPUT`.
1510
+ * See the first `generate()` overload for full behavior.
1511
+ *
1512
+ * @see [Agent.generate() reference](https://mastra.ai/reference/agents/generate)
1513
+ */
1475
1514
  generate<OUTPUT extends {}>(messages: MessageListInput, options: AgentExecutionOptionsBase<OUTPUT> & {
1476
1515
  structuredOutput: PublicStructuredOutputOptions<OUTPUT>;
1477
1516
  } & {
1478
1517
  model?: DynamicArgument<MastraModelConfig>;
1479
1518
  }): Promise<FullOutput<OUTPUT>>;
1519
+ /**
1520
+ * Runs the agent to completion with per-call options and no `structuredOutput`; resolves
1521
+ * with a {@link FullOutput} (`text`, `steps`, `toolCalls`, `toolResults`, `usage`, ...).
1522
+ * Tool data is under `payload`, e.g. `result.toolCalls[0].payload.args`.
1523
+ * See the first `generate()` overload for full behavior.
1524
+ *
1525
+ * @see [Agent.generate() reference](https://mastra.ai/reference/agents/generate)
1526
+ */
1480
1527
  generate(messages: MessageListInput, options: AgentExecutionOptionsBase<unknown> & {
1481
1528
  structuredOutput?: never;
1482
1529
  } & {
1483
1530
  model?: DynamicArgument<MastraModelConfig>;
1484
1531
  }): Promise<FullOutput<TOutput>>;
1532
+ /**
1533
+ * Runs the agent to completion using its `defaultOptions`; resolves with a {@link FullOutput}.
1534
+ * `messages` is a string, a message object, or an array of either.
1535
+ * See the first `generate()` overload for full behavior.
1536
+ *
1537
+ * @example
1538
+ * ```ts
1539
+ * const { text } = await agent.generate('Hello!');
1540
+ * ```
1541
+ *
1542
+ * @see [Agent.generate() reference](https://mastra.ai/reference/agents/generate)
1543
+ */
1485
1544
  generate<OUTPUT = TOutput>(messages: MessageListInput): Promise<FullOutput<OUTPUT>>;
1486
1545
  subscribeToThread<OUTPUT = TOutput>(options: AgentSubscribeToThreadOptions & {
1487
1546
  withRunStatus: true;
@@ -1537,6 +1596,18 @@ TRequestContext extends Record<string, any> | unknown = any, TEditor extends Age
1537
1596
  discoverThreadPeers(options?: DiscoverAgentThreadPeersOptions): Promise<AgentThreadPeerAdvertisement[]>;
1538
1597
  getActiveThreadRunId(options: AgentThreadIdentityOptions): string | undefined;
1539
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;
1540
1611
  /**
1541
1612
  * Lists suspended agent runs from workflow snapshot storage — runs waiting on
1542
1613
  * a tool-call approval (`requireApproval` / `requireToolApproval`) or on a
@@ -2326,7 +2397,7 @@ TRequestContext extends Record<string, any> | unknown = any, TEditor extends Age
2326
2397
  *
2327
2398
  * @internal
2328
2399
  */
2329
- protected subscribeToDurableRunStream(runId: string, options: {
2400
+ __subscribeToRunStream(runId: string, options: {
2330
2401
  offset?: number;
2331
2402
  onComplete?: () => void;
2332
2403
  }, onEvent: (event: AgentStreamEvent) => void): Promise<() => Promise<void>>;
@@ -513,6 +513,26 @@ export type MultiPrimitiveExecutionOptions<OUTPUT = undefined> = NetworkOptions<
513
513
  * Public-facing network options that accept PublicSchema types.
514
514
  */
515
515
  export type PublicNetworkOptions<OUTPUT = undefined> = NetworkOptions<OUTPUT>;
516
+ /**
517
+ * Per-call options for `agent.generate(messages, options)` and `agent.stream(messages, options)`.
518
+ * Merged over the agent's `defaultOptions`; per-call values win.
519
+ *
520
+ * Most used: `maxSteps` (tool-call loop limit, 5 when unset), `memory` (`{ thread, resource }`),
521
+ * `requestContext`, `instructions` (override), `modelSettings` (`temperature`, `maxOutputTokens`, ...),
522
+ * `toolChoice`, `activeTools`, `abortSignal`, `onStepFinish`, `onFinish`. `structuredOutput` is
523
+ * accepted alongside these by `generate()` / `stream()`.
524
+ *
525
+ * @example
526
+ * ```ts
527
+ * await agent.generate('Plan my day', {
528
+ * maxSteps: 10,
529
+ * memory: { thread: 'thread-1', resource: 'user-1' },
530
+ * modelSettings: { temperature: 0.2 },
531
+ * });
532
+ * ```
533
+ *
534
+ * @see [Agent.generate() reference](https://mastra.ai/reference/agents/generate)
535
+ */
516
536
  export type AgentExecutionOptionsBase<OUTPUT> = {
517
537
  /**
518
538
  * Signal chunks to hide from this caller's stream: true hides all recognized signals,
@@ -578,9 +598,17 @@ export type AgentExecutionOptionsBase<OUTPUT> = {
578
598
  * Merged on top of Mastra instance-level versions and propagated via requestContext.
579
599
  */
580
600
  versions?: VersionOverrides;
581
- /** Maximum number of steps to run */
601
+ /**
602
+ * Maximum number of model steps in this run. A step is one model call plus the tools it
603
+ * calls, so this bounds the tool-call loop. Overrides the agent's `defaultOptions.maxSteps`.
604
+ * When neither `maxSteps` nor `stopWhen` is set, the run stops after 5 steps. When both are
605
+ * set, the run stops at whichever is reached first.
606
+ */
582
607
  maxSteps?: number;
583
- /** Conditions for stopping execution (e.g., step count, token limit) */
608
+ /**
609
+ * Custom stop condition(s): a function (or array of functions) of `{ steps }` returning
610
+ * whether to stop. Combined with `maxSteps` when both are set.
611
+ */
584
612
  stopWhen?: LoopOptions['stopWhen'];
585
613
  /** Provider-specific options passed to the language model */
586
614
  providerOptions?: ProviderOptions;
@@ -90,6 +90,12 @@ export interface CreateEventedAgentOptions<TAgentId extends string = string, TTo
90
90
  * death: over the same storage, a fresh process can resume in-flight runs via
91
91
  * `recover(runId)` / `recoverActiveRuns()`.
92
92
  *
93
+ * In one process it runs on any pubsub, including the default one. Running its
94
+ * steps on several processes needs a pubsub that redelivers unacknowledged
95
+ * events and a workflows store with step guards.
96
+ *
97
+ * @see https://mastra.ai/docs/server/pubsub#evented-workflows-and-agents
98
+ *
93
99
  * @param options - Configuration options
94
100
  * @returns An EventedAgent instance (register it on a `Mastra` host before use)
95
101
  *
@@ -11,7 +11,7 @@ import type { MessageListInput } from '../message-list/index.js';
11
11
  import type { AgentStreamBus } from '../streams/bus.js';
12
12
  import type { AgentDurableOption, ToolsInput } from '../types.js';
13
13
  import type { ExtendedRunRegistry } from './run-registry.js';
14
- import type { AgentAbortEventData, DurableAgentConfig, DurableAgentStreamOptions, DurableAgentStreamResult, AgentStreamEvent, DurableAgentStepFinishResult, AgentSuspendedEventData } from './types.js';
14
+ import type { AgentAbortEventData, DurableAgentConfig, DurableAgentStreamOptions, DurableAgentStreamResult, DurableAgentStepFinishResult, AgentSuspendedEventData } from './types.js';
15
15
  import type { createDurableAgenticWorkflow } from './workflows/index.js';
16
16
  export interface DurableAgent<TAgentId extends string = string, TTools extends ToolsInput = ToolsInput, TOutput = undefined> {
17
17
  stream(messages: MessageListInput, options?: DurableAgentStreamOptions<TOutput>): Promise<DurableAgentStreamResult<TOutput>>;
@@ -329,20 +329,6 @@ export declare class DurableAgent<TAgentId extends string = string, TTools exten
329
329
  __fork(): Agent<TAgentId, TTools, TOutput>;
330
330
  /** Whether new runs opt into journal storage. @internal */
331
331
  protected get storesRunsInJournal(): boolean;
332
- /**
333
- * Subscribe to a run's raw AgentStreamEvents, filtering out events from
334
- * executions that lost ownership and takeover markers. Callers must map
335
- * these events to the public frame contract produced by stream-adapter.ts's
336
- * createDurableAgentStream before sending them to clients; raw event
337
- * envelopes are not public stream frames. Resolves once subscribed, with
338
- * a function that unsubscribes.
339
- *
340
- * @internal
341
- */
342
- __subscribeToRunStream(runId: string, options: {
343
- offset?: number;
344
- onComplete?: () => void;
345
- }, onEvent: (event: AgentStreamEvent) => void): Promise<() => Promise<void>>;
346
332
  /**
347
333
  * Get the workflow instance for direct execution.
348
334
  * Lazily creates the workflow and registers Mastra on it (needed for
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_run_registry = require("../../run-registry-5_LQBGn_.cjs");
2
+ const require_run_registry = require("../../run-registry-BmckDVBk.cjs");
3
3
  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,36 +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
- * Subscribe to a run's raw AgentStreamEvents, filtering out events from
413
- * executions that lost ownership and takeover markers. Callers must map
414
- * these events to the public frame contract produced by stream-adapter.ts's
415
- * createDurableAgentStream before sending them to clients; raw event
416
- * envelopes are not public stream frames. Resolves once subscribed, with
417
- * a function that unsubscribes.
418
- *
419
- * @internal
420
- */
421
- __subscribeToRunStream(runId, options, onEvent) {
422
- return this.subscribeToDurableRunStream(runId, options, onEvent);
423
- }
424
- /**
425
401
  * Get the workflow instance for direct execution.
426
402
  * Lazily creates the workflow and registers Mastra on it (needed for
427
403
  * getAgentById in execution steps).
428
404
  */
429
405
  getWorkflow() {
430
- if (!this.executionEngine.workflow) this.#warnIfStorageVersionUnsupported();
431
406
  return this.executionEngine.workflow ?? this.executionEngine.getWorkflow({
432
407
  maxSteps: this.#maxSteps,
433
408
  workflowEngine: this.workflowEngine,
@@ -629,6 +604,12 @@ function isEventedAgentClass(obj) {
629
604
  * death: over the same storage, a fresh process can resume in-flight runs via
630
605
  * `recover(runId)` / `recoverActiveRuns()`.
631
606
  *
607
+ * In one process it runs on any pubsub, including the default one. Running its
608
+ * steps on several processes needs a pubsub that redelivers unacknowledged
609
+ * events and a workflows store with step guards.
610
+ *
611
+ * @see https://mastra.ai/docs/server/pubsub#evented-workflows-and-agents
612
+ *
632
613
  * @param options - Configuration options
633
614
  * @returns An EventedAgent instance (register it on a `Mastra` host before use)
634
615
  *