@mastra/core 1.87.0-alpha.10 → 1.87.0-alpha.11

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 (368) hide show
  1. package/dist/_types/@internal_core@0.1.4/dist/knowledge-compat/index.d.ts +49 -0
  2. package/dist/agent/durable/index.cjs +1 -1
  3. package/dist/agent/durable/index.js +1 -1
  4. package/dist/agent/index.cjs +2 -2
  5. package/dist/agent/index.js +2 -2
  6. package/dist/agent-builder/ee/index.cjs +1 -1
  7. package/dist/agent-builder/ee/index.js +1 -1
  8. package/dist/agent-controller/index.cjs +1 -1
  9. package/dist/agent-controller/index.js +1 -1
  10. package/dist/agent-controller/session.d.ts +11 -1
  11. package/dist/{agent-controller--gKWI81G.js → agent-controller-BrRzZy4-.js} +21 -12
  12. package/dist/{agent-controller-BolLBwDm.cjs → agent-controller-DKI-d-np.cjs} +21 -12
  13. package/dist/background-tasks/index.cjs +1 -1
  14. package/dist/background-tasks/index.js +1 -1
  15. package/dist/{background-tasks-CgzXjBfE.js → background-tasks-CDP3Pgeu.js} +1 -1
  16. package/dist/{background-tasks-DYtlijQ1.cjs → background-tasks-CDgdfRmB.cjs} +1 -1
  17. package/dist/browser/index.cjs +1 -1
  18. package/dist/browser/index.js +1 -1
  19. package/dist/{builder-Dz-g-9CZ.cjs → builder-Bs4CtyqT.cjs} +2 -2
  20. package/dist/{builder-emNPaIaC.js → builder-DuT0Iqb5.js} +2 -2
  21. package/dist/capabilities/302ai.json +201 -201
  22. package/dist/capabilities/abliteratedllm.json +38 -38
  23. package/dist/capabilities/abliteration-ai.json +4 -4
  24. package/dist/capabilities/above.json +19 -19
  25. package/dist/capabilities/adaption.json +13 -13
  26. package/dist/capabilities/adzuki.json +30 -30
  27. package/dist/capabilities/agentrouter.json +12 -12
  28. package/dist/capabilities/agnes.json +2 -2
  29. package/dist/capabilities/ai-router.json +4 -4
  30. package/dist/capabilities/aiand.json +23 -23
  31. package/dist/capabilities/aigrow.json +9 -9
  32. package/dist/capabilities/aimlapi.json +153 -153
  33. package/dist/capabilities/aipg.json +2 -2
  34. package/dist/capabilities/aixy.json +22 -22
  35. package/dist/capabilities/aki-io.json +10 -10
  36. package/dist/capabilities/alibaba-cn.json +99 -99
  37. package/dist/capabilities/alibaba-coding-plan-cn.json +6 -6
  38. package/dist/capabilities/alibaba-coding-plan.json +6 -6
  39. package/dist/capabilities/alibaba-token-plan-cn.json +51 -51
  40. package/dist/capabilities/alibaba-token-plan.json +52 -52
  41. package/dist/capabilities/alibaba.json +73 -73
  42. package/dist/capabilities/ambient.json +17 -17
  43. package/dist/capabilities/amd.json +10 -10
  44. package/dist/capabilities/anthropic.json +41 -41
  45. package/dist/capabilities/anyapi.json +47 -47
  46. package/dist/capabilities/apiko.json +4 -4
  47. package/dist/capabilities/arcee.json +11 -11
  48. package/dist/capabilities/augure.json +6 -6
  49. package/dist/capabilities/auriko.json +18 -18
  50. package/dist/capabilities/bailing.json +4 -4
  51. package/dist/capabilities/baseten.json +33 -33
  52. package/dist/capabilities/bee.json +5 -5
  53. package/dist/capabilities/berget.json +6 -6
  54. package/dist/capabilities/bothub.json +10 -10
  55. package/dist/capabilities/boundless.json +34 -34
  56. package/dist/capabilities/bumo.json +43 -43
  57. package/dist/capabilities/byteplus.json +31 -31
  58. package/dist/capabilities/cheapaimodel.json +5 -5
  59. package/dist/capabilities/cheapest-token.json +27 -27
  60. package/dist/capabilities/chutes.json +10 -10
  61. package/dist/capabilities/clarifai.json +2 -2
  62. package/dist/capabilities/cline-pass.json +37 -37
  63. package/dist/capabilities/cloudcode.json +8 -8
  64. package/dist/capabilities/cloudferro-sherlock.json +4 -4
  65. package/dist/capabilities/cloudflare-workers-ai.json +17 -17
  66. package/dist/capabilities/commandcode.json +151 -151
  67. package/dist/capabilities/concentrate.json +277 -269
  68. package/dist/capabilities/cortecs.json +108 -108
  69. package/dist/capabilities/crossmodel.json +172 -172
  70. package/dist/capabilities/crusoe.json +16 -16
  71. package/dist/capabilities/daoxe.json +8 -8
  72. package/dist/capabilities/databricks.json +128 -128
  73. package/dist/capabilities/deepinfra.json +97 -91
  74. package/dist/capabilities/deepseek.json +3 -3
  75. package/dist/capabilities/digitalocean.json +113 -113
  76. package/dist/capabilities/dothoosh.json +23 -23
  77. package/dist/capabilities/doubleword.json +27 -27
  78. package/dist/capabilities/edenai.json +279 -279
  79. package/dist/capabilities/empiriolabs.json +160 -160
  80. package/dist/capabilities/engy.json +20 -20
  81. package/dist/capabilities/entrim.json +8 -8
  82. package/dist/capabilities/evroc.json +18 -18
  83. package/dist/capabilities/ezkielyna.json +11 -11
  84. package/dist/capabilities/fastrouter.json +87 -87
  85. package/dist/capabilities/fireworks-ai.json +83 -83
  86. package/dist/capabilities/freemodel.json +19 -19
  87. package/dist/capabilities/friendli.json +7 -7
  88. package/dist/capabilities/frogbot.json +88 -88
  89. package/dist/capabilities/gisoo.json +18 -18
  90. package/dist/capabilities/gmicloud.json +20 -20
  91. package/dist/capabilities/google.json +55 -55
  92. package/dist/capabilities/graphn.json +6 -6
  93. package/dist/capabilities/greenpt.json +34 -34
  94. package/dist/capabilities/helicone.json +81 -81
  95. package/dist/capabilities/hetzner.json +5 -5
  96. package/dist/capabilities/hopper.json +2 -2
  97. package/dist/capabilities/hostinger-router.json +10 -10
  98. package/dist/capabilities/hpc-ai.json +11 -11
  99. package/dist/capabilities/huawei-maas.json +15 -15
  100. package/dist/capabilities/hubris.json +31 -31
  101. package/dist/capabilities/huggingface.json +93 -85
  102. package/dist/capabilities/humain.json +2 -2
  103. package/dist/capabilities/hyper.json +27 -27
  104. package/dist/capabilities/impossibl.json +165 -165
  105. package/dist/capabilities/inception.json +3 -3
  106. package/dist/capabilities/inceptron.json +8 -8
  107. package/dist/capabilities/inco.json +5 -5
  108. package/dist/capabilities/infer.json +13 -13
  109. package/dist/capabilities/inferall.json +6 -6
  110. package/dist/capabilities/inference-coop.json +15 -15
  111. package/dist/capabilities/inferenceapis.json +20 -20
  112. package/dist/capabilities/inferris.json +3 -3
  113. package/dist/capabilities/infersia.json +8 -8
  114. package/dist/capabilities/infomaniak.json +4 -4
  115. package/dist/capabilities/io-net.json +5 -5
  116. package/dist/capabilities/iteracompute.json +29 -29
  117. package/dist/capabilities/jad-ai.json +3 -3
  118. package/dist/capabilities/jalapeno.json +11 -11
  119. package/dist/capabilities/jiekou.json +61 -61
  120. package/dist/capabilities/joingonka.json +4 -4
  121. package/dist/capabilities/jzstoken.json +57 -57
  122. package/dist/capabilities/keln.json +23 -23
  123. package/dist/capabilities/kenari.json +121 -121
  124. package/dist/capabilities/kilo.json +615 -615
  125. package/dist/capabilities/kimi-code-plan-cn.json +6 -6
  126. package/dist/capabilities/kimi-code-plan-global.json +6 -6
  127. package/dist/capabilities/kitani.json +4 -4
  128. package/dist/capabilities/klavo.json +13 -13
  129. package/dist/capabilities/korouter.json +29 -29
  130. package/dist/capabilities/kunavo.json +2 -2
  131. package/dist/capabilities/liquid.json +10 -10
  132. package/dist/capabilities/lithosai.json +3 -3
  133. package/dist/capabilities/llmgateway-providers.json +926 -926
  134. package/dist/capabilities/llmgateway.json +330 -330
  135. package/dist/capabilities/llmtr.json +26 -26
  136. package/dist/capabilities/logits.json +2 -2
  137. package/dist/capabilities/longcat.json +2 -2
  138. package/dist/capabilities/lowrouter.json +65 -65
  139. package/dist/capabilities/lyceum.json +8 -8
  140. package/dist/capabilities/melious.json +9 -9
  141. package/dist/capabilities/merge-gateway.json +269 -269
  142. package/dist/capabilities/meta.json +8 -8
  143. package/dist/capabilities/mistral.json +19 -19
  144. package/dist/capabilities/mixlayer.json +4 -4
  145. package/dist/capabilities/modal.json +11 -11
  146. package/dist/capabilities/model-oracle-ai.json +24 -24
  147. package/dist/capabilities/modelis.json +23 -23
  148. package/dist/capabilities/modelscope.json +2 -2
  149. package/dist/capabilities/modular.json +13 -13
  150. package/dist/capabilities/moneo.json +8 -8
  151. package/dist/capabilities/moonshotai-cn.json +6 -6
  152. package/dist/capabilities/moonshotai.json +6 -6
  153. package/dist/capabilities/morph.json +15 -15
  154. package/dist/capabilities/munito-eu.json +8 -8
  155. package/dist/capabilities/munito.json +10 -10
  156. package/dist/capabilities/nan.json +28 -28
  157. package/dist/capabilities/nano-gpt.json +578 -578
  158. package/dist/capabilities/nearai.json +106 -106
  159. package/dist/capabilities/nebius.json +32 -32
  160. package/dist/capabilities/neon.json +121 -121
  161. package/dist/capabilities/neuralwatt.json +40 -40
  162. package/dist/capabilities/nokeep.json +4 -4
  163. package/dist/capabilities/novita-ai.json +148 -148
  164. package/dist/capabilities/nvidia.json +44 -44
  165. package/dist/capabilities/oathbreaker.json +5 -5
  166. package/dist/capabilities/obscurify.json +24 -24
  167. package/dist/capabilities/oci.json +6 -6
  168. package/dist/capabilities/ofox.json +349 -349
  169. package/dist/capabilities/ollama-cloud.json +54 -54
  170. package/dist/capabilities/openai.json +59 -59
  171. package/dist/capabilities/opencode-go.json +84 -84
  172. package/dist/capabilities/openrouter.json +538 -539
  173. package/dist/capabilities/opper.json +25 -25
  174. package/dist/capabilities/orcarouter.json +206 -206
  175. package/dist/capabilities/outerlabs.json +28 -28
  176. package/dist/capabilities/ovhcloud.json +19 -19
  177. package/dist/capabilities/pareto.json +5 -5
  178. package/dist/capabilities/pendra.json +4 -4
  179. package/dist/capabilities/perplexity-agent.json +62 -62
  180. package/dist/capabilities/phala.json +20 -20
  181. package/dist/capabilities/pioneer.json +32 -32
  182. package/dist/capabilities/poe.json +131 -131
  183. package/dist/capabilities/poolside.json +2 -2
  184. package/dist/capabilities/powerspring.json +11 -11
  185. package/dist/capabilities/primalabs.json +7 -7
  186. package/dist/capabilities/prime.json +112 -112
  187. package/dist/capabilities/privatemode-ai.json +11 -11
  188. package/dist/capabilities/proxystacks.json +6 -6
  189. package/dist/capabilities/qiniu-ai.json +14 -14
  190. package/dist/capabilities/refuseless.json +10 -10
  191. package/dist/capabilities/regolo-ai.json +5 -5
  192. package/dist/capabilities/requesty.json +259 -200
  193. package/dist/capabilities/ruapi.json +16 -16
  194. package/dist/capabilities/runcrate.json +15 -15
  195. package/dist/capabilities/runinfra.json +19 -19
  196. package/dist/capabilities/sakana.json +7 -7
  197. package/dist/capabilities/sandbase.json +21 -21
  198. package/dist/capabilities/sarvam.json +11 -11
  199. package/dist/capabilities/scaleway.json +16 -16
  200. package/dist/capabilities/scnet-token-plan.json +10 -10
  201. package/dist/capabilities/scx-ai.json +21 -21
  202. package/dist/capabilities/sensenova.json +15 -15
  203. package/dist/capabilities/siliconflow-cn.json +58 -58
  204. package/dist/capabilities/siliconflow.json +61 -61
  205. package/dist/capabilities/snowflake-cortex.json +18 -18
  206. package/dist/capabilities/sokkan.json +5 -5
  207. package/dist/capabilities/sparrowcodes.json +20 -20
  208. package/dist/capabilities/standardcompute.json +95 -95
  209. package/dist/capabilities/steadyrouter.json +33 -33
  210. package/dist/capabilities/stepfun-ai-step-plan.json +4 -4
  211. package/dist/capabilities/stepfun-ai.json +4 -4
  212. package/dist/capabilities/stepfun-step-plan.json +4 -4
  213. package/dist/capabilities/stepfun.json +4 -4
  214. package/dist/capabilities/stepping-stone.json +17 -17
  215. package/dist/capabilities/superbot-gg.json +4 -4
  216. package/dist/capabilities/synthetic.json +11 -11
  217. package/dist/capabilities/synthorai.json +23 -23
  218. package/dist/capabilities/teamorouter.json +22 -22
  219. package/dist/capabilities/teapot-router.json +15 -15
  220. package/dist/capabilities/tencent-token-plan-intl.json +22 -22
  221. package/dist/capabilities/tencent-token-plan.json +43 -43
  222. package/dist/capabilities/tencent-tokenhub.json +47 -47
  223. package/dist/capabilities/tensorx.json +37 -37
  224. package/dist/capabilities/tenstorrent.json +8 -8
  225. package/dist/capabilities/the-grid-ai.json +30 -30
  226. package/dist/capabilities/thinkingmachines.json +78 -78
  227. package/dist/capabilities/tinfoil.json +9 -9
  228. package/dist/capabilities/togetherai.json +55 -55
  229. package/dist/capabilities/tokengo.json +19 -19
  230. package/dist/capabilities/tokenify.json +2 -2
  231. package/dist/capabilities/trustedrouter.json +6 -6
  232. package/dist/capabilities/trustedtokens.json +17 -17
  233. package/dist/capabilities/umans-ai-coding-plan.json +14 -14
  234. package/dist/capabilities/umans-ai.json +10 -10
  235. package/dist/capabilities/uncensuredai.json +4 -4
  236. package/dist/capabilities/unrestricted.json +6 -6
  237. package/dist/capabilities/uplinkswitch.json +21 -21
  238. package/dist/capabilities/upstage.json +6 -6
  239. package/dist/capabilities/vancine.json +16 -16
  240. package/dist/capabilities/vercel.json +578 -578
  241. package/dist/capabilities/vivgrid.json +86 -86
  242. package/dist/capabilities/volcengine-coding-plan.json +26 -26
  243. package/dist/capabilities/volcengine.json +23 -23
  244. package/dist/capabilities/vultr.json +34 -34
  245. package/dist/capabilities/wafer.ai.json +17 -17
  246. package/dist/capabilities/wallaby.json +2 -2
  247. package/dist/capabilities/wally.json +13 -13
  248. package/dist/capabilities/wandb.json +21 -21
  249. package/dist/capabilities/watt.json +26 -26
  250. package/dist/capabilities/xai.json +6 -6
  251. package/dist/capabilities/xiaomi-token-plan-ams.json +2 -2
  252. package/dist/capabilities/xiaomi-token-plan-cn.json +2 -2
  253. package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -2
  254. package/dist/capabilities/xiaomi.json +3 -3
  255. package/dist/capabilities/xpersona.json +12 -12
  256. package/dist/capabilities/xxapi.json +28 -28
  257. package/dist/capabilities/zai-coding-plan.json +18 -18
  258. package/dist/capabilities/zai.json +30 -30
  259. package/dist/capabilities/zenifra.json +31 -31
  260. package/dist/capabilities/zenmux.json +202 -202
  261. package/dist/capabilities/zerogpu.json +8 -8
  262. package/dist/capabilities/zhipuai-coding-plan.json +6 -6
  263. package/dist/capabilities/zhipuai.json +28 -28
  264. package/dist/capabilities/zro.json +4 -4
  265. package/dist/channels/index.cjs +2 -2
  266. package/dist/channels/index.js +2 -2
  267. package/dist/{channels-BVnDIsZS.cjs → channels-Bkd_v8M1.cjs} +1 -1
  268. package/dist/{channels-CndspFXP.js → channels-CkRMEIQ6.js} +1 -1
  269. package/dist/coding-agent/index.cjs +1 -1
  270. package/dist/coding-agent/index.js +1 -1
  271. package/dist/datasets/index.cjs +2 -2
  272. package/dist/datasets/index.js +2 -2
  273. package/dist/docs/SKILL.md +1 -1
  274. package/dist/docs/assets/SOURCE_MAP.json +570 -570
  275. package/dist/docs/references/reference-agent-controller-session.md +29 -1
  276. package/dist/evals/index.cjs +1 -1
  277. package/dist/evals/index.js +1 -1
  278. package/dist/evals/scoreTraces/index.cjs +1 -1
  279. package/dist/evals/scoreTraces/index.js +1 -1
  280. package/dist/harness/index.cjs +1 -1
  281. package/dist/harness/index.js +1 -1
  282. package/dist/index.cjs +1 -1
  283. package/dist/index.js +1 -1
  284. package/dist/knowledge/importers/overlay.d.ts +138 -0
  285. package/dist/knowledge/importers/sink.d.ts +6 -0
  286. package/dist/knowledge/importers/types.d.ts +5 -0
  287. package/dist/knowledge/index.cjs +1412 -139
  288. package/dist/knowledge/index.js +1412 -139
  289. package/dist/knowledge/links.d.ts +27 -0
  290. package/dist/llm/index.cjs +3 -3
  291. package/dist/llm/index.js +3 -3
  292. package/dist/llm/model/provider-types.generated.d.ts +7619 -7605
  293. package/dist/{llm-B1semiTO.cjs → llm-DAw2eouV.cjs} +2 -2
  294. package/dist/{llm-CytL7cpw.js → llm-DFT5EKp4.js} +2 -2
  295. package/dist/loop/index.cjs +2 -2
  296. package/dist/loop/index.js +2 -2
  297. package/dist/{manager-DnTzA9GL.js → manager-DiDnvKLM.js} +2 -2
  298. package/dist/{manager-BwyfS4ha.cjs → manager-hxzEe4U5.cjs} +2 -2
  299. package/dist/mastra/index.cjs +1 -1
  300. package/dist/mastra/index.js +1 -1
  301. package/dist/{mastra-Dj35Lj_J.cjs → mastra-1diaq68N.cjs} +16 -16
  302. package/dist/{mastra-DTkZPpch.js → mastra-BPaPxG5t.js} +16 -16
  303. package/dist/memory/index.cjs +2 -2
  304. package/dist/memory/index.js +2 -2
  305. package/dist/{model-DyQ07rPH.js → model-CUBZjm0T.js} +1 -1
  306. package/dist/{model-eDfetuno.cjs → model-DSMHJM3c.cjs} +1 -1
  307. package/dist/{netlify-BC4v7Ufv.cjs → netlify-C21T9ozJ.cjs} +1 -1
  308. package/dist/{netlify-BUvdxfHe.js → netlify-D1BKjns0.js} +1 -1
  309. package/dist/notifications/index.cjs +1 -1
  310. package/dist/notifications/index.js +1 -1
  311. package/dist/processor-provider/index.cjs +1 -1
  312. package/dist/processor-provider/index.js +1 -1
  313. package/dist/processors/index.cjs +2 -2
  314. package/dist/processors/index.js +2 -2
  315. package/dist/{provider-registry-CP_5SNiw.js → provider-registry-BAlFFX5o.js} +22725 -22697
  316. package/dist/{provider-registry-Bn01gq9y.cjs → provider-registry-ChojUVJa.cjs} +22725 -22697
  317. package/dist/provider-registry.json +22472 -22444
  318. package/dist/{registry-generator-CDPyxbzt.js → registry-generator-BbWSH6W4.js} +1 -1
  319. package/dist/{registry-generator-CNFKGRFQ.cjs → registry-generator-CAUL9Hek.cjs} +1 -1
  320. package/dist/{rehydrate-DExpzlNS.cjs → rehydrate-0xSq47n9.cjs} +2 -2
  321. package/dist/{rehydrate-CnGNY2zq.js → rehydrate-CzUnNFU6.js} +2 -2
  322. package/dist/relevance/index.cjs +2 -2
  323. package/dist/relevance/index.js +2 -2
  324. package/dist/{run-registry-CibQoN6K.cjs → run-registry-CrTsH9iL.cjs} +403 -11
  325. package/dist/{run-registry-BL_kKvFE.js → run-registry-DJT02z_9.js} +380 -12
  326. package/dist/storage/domains/knowledge/base.d.ts +86 -1
  327. package/dist/storage/domains/knowledge/importers-inmemory.d.ts +9 -0
  328. package/dist/storage/domains/knowledge/importers.d.ts +31 -0
  329. package/dist/storage/domains/knowledge/inmemory.d.ts +7 -0
  330. package/dist/storage/domains/knowledge/pages-inmemory.d.ts +31 -1
  331. package/dist/storage/domains/knowledge/pages.d.ts +74 -0
  332. package/dist/storage/index.cjs +2 -2
  333. package/dist/storage/index.js +2 -2
  334. package/dist/storage/types.d.ts +6 -0
  335. package/dist/stream/index.cjs +2 -2
  336. package/dist/stream/index.js +2 -2
  337. package/dist/{stream-1DGoEkG2.js → stream-CG9OooRx.js} +1 -1
  338. package/dist/{stream-D_7tMaJe.cjs → stream-CMKRczs4.cjs} +1 -1
  339. package/dist/test-utils/llm-mock.cjs +1 -1
  340. package/dist/test-utils/llm-mock.js +1 -1
  341. package/dist/tool-loop-agent/index.cjs +1 -1
  342. package/dist/tool-loop-agent/index.js +1 -1
  343. package/dist/{tool-loop-agent-CLB1r3X3.cjs → tool-loop-agent-14o3Z1qo.cjs} +3 -3
  344. package/dist/{tool-loop-agent-BXya_RYj.js → tool-loop-agent-Bi6z_q7o.js} +3 -3
  345. package/dist/{utils-B-KOMA_Q.cjs → utils-DkvbP8EA.cjs} +1 -1
  346. package/dist/{utils-C55ZdVaj.js → utils-Fag7YDBU.js} +1 -1
  347. package/dist/utils.cjs +1 -1
  348. package/dist/utils.js +1 -1
  349. package/dist/{validate-CmZhnsmX.cjs → validate-Bhrlve2E.cjs} +1 -1
  350. package/dist/{validate-BDfYr72F.js → validate-DLER0nlQ.js} +1 -1
  351. package/dist/vector/index.cjs +1 -1
  352. package/dist/vector/index.js +1 -1
  353. package/dist/worker/index.cjs +1 -1
  354. package/dist/worker/index.js +1 -1
  355. package/dist/{worker-D2B-x7Le.cjs → worker-0gczpztM.cjs} +2 -2
  356. package/dist/{worker-BoybIUTI.cjs → worker-BwJyrFQN.cjs} +2 -2
  357. package/dist/{worker-BG1rw_dg.js → worker-D-em3hyS.js} +2 -2
  358. package/dist/{worker-CuK2RaC0.js → worker-leYV1Y91.js} +2 -2
  359. package/dist/{workflow-CTKqeRXU.cjs → workflow-DWdcEcxw.cjs} +3 -3
  360. package/dist/{workflow-Bt09PcH1.js → workflow-FikHVwog.js} +3 -3
  361. package/dist/workflows/builder/index.cjs +1 -1
  362. package/dist/workflows/builder/index.js +1 -1
  363. package/dist/workflows/evented/index.cjs +1 -1
  364. package/dist/workflows/evented/index.js +1 -1
  365. package/dist/workflows/index.cjs +4 -4
  366. package/dist/workflows/index.js +4 -4
  367. package/package.json +8 -8
  368. package/src/llm/model/provider-types.generated.d.ts +7619 -7605
@@ -1,7 +1,7 @@
1
1
  import type { KnowledgeScopeDeclarations } from '../../../knowledge/declarations.js';
2
2
  import { StorageDomain } from '../base.js';
3
3
  import type { KnowledgeImportersStorage } from './importers.js';
4
- import type { KnowledgePage, KnowledgePageStore, KnowledgeReadScope } from './pages.js';
4
+ import type { KnowledgeNote, KnowledgePage, KnowledgePageStore, KnowledgePageWrite, KnowledgeReadScope } from './pages.js';
5
5
  /** @experimental Knowledge APIs are experimental and may change without notice. */
6
6
  export declare const KNOWLEDGE_STORAGE_CONTRACT_VERSION: 4;
7
7
  /** @experimental Knowledge APIs are experimental and may change without notice. */
@@ -188,6 +188,91 @@ export declare abstract class KnowledgeStorage extends StorageDomain implements
188
188
  read: KnowledgeReadScope;
189
189
  }): Promise<KnowledgePage[]>;
190
190
  getPageByPath(_input: Parameters<KnowledgePageStore['getPageByPath']>[0]): ReturnType<KnowledgePageStore['getPageByPath']>;
191
+ /**
192
+ * For each id, what {@link getPageParents} returns with `parentId: id`: that row and its
193
+ * ancestors, nearest first, deleted rows included. Every requested id is a key; a missing or
194
+ * unreadable one maps to `[]`.
195
+ *
196
+ * @experimental
197
+ */
198
+ getPageChains?(input: {
199
+ ids: string[];
200
+ read: KnowledgeReadScope;
201
+ }): Promise<Record<string, KnowledgePage[]>>;
202
+ /**
203
+ * For each path, what {@link getPageByPath} returns for it under `scopeId`, in input order.
204
+ *
205
+ * @experimental
206
+ */
207
+ getPagesByPaths?(input: {
208
+ scopeId: string;
209
+ paths: string[][];
210
+ read: KnowledgeReadScope;
211
+ }): Promise<(KnowledgePage | null)[]>;
212
+ /**
213
+ * For each parent, the position {@link createPage} places a new child after: the position of its
214
+ * last live child, or `null` with none. Every requested id is a key. Takes no read scope, like
215
+ * {@link createPage}: ask only for parents the caller may write under. A root (no parent) is not
216
+ * expressible; importers never create one.
217
+ *
218
+ * @experimental
219
+ */
220
+ getLastChildPositions?(input: {
221
+ parentIds: string[];
222
+ }): Promise<Record<string, string | null>>;
223
+ /**
224
+ * For each page, every note {@link listNotes} returns for it, unpaginated, oldest first.
225
+ * Every requested id is a key. Not bounded per page: ask only for pages whose notes you need.
226
+ *
227
+ * @experimental
228
+ */
229
+ listNotesByPages?(input: {
230
+ pageIds: string[];
231
+ read: KnowledgeReadScope;
232
+ }): Promise<Record<string, KnowledgeNote[]>>;
233
+ /**
234
+ * For each root, the live ordinary pages under it, the ones {@link lockSubtree} would lock (not the
235
+ * root, no scope pages, no deleted rows), unordered and not locked; `null` when it has more than
236
+ * `limit`. Every requested id is a key; a missing root maps to `[]`. Takes no read scope, like
237
+ * {@link lockSubtree}.
238
+ *
239
+ * @experimental
240
+ */
241
+ getPageSubtrees?(input: {
242
+ rootIds: string[];
243
+ limit: number;
244
+ }): Promise<Record<string, KnowledgePage[] | null>>;
245
+ /**
246
+ * For each name, what {@link findPagesByName} returns for it with the same `read`, `scopeId` and
247
+ * `limit` (the limit applies per name). Every requested name is a key, as given.
248
+ *
249
+ * @experimental
250
+ */
251
+ findPagesByNames?(input: {
252
+ names: string[];
253
+ read: KnowledgeReadScope;
254
+ scopeId?: string;
255
+ limit?: number;
256
+ }): Promise<Record<string, KnowledgePage[]>>;
257
+ /**
258
+ * Applies `writes` in one transaction with the end state, activity rows and versions of making
259
+ * the matching single writes one by one in input order. Activity rows are written in input order
260
+ * (`replace-links` writes none). The store checks only versions (a write whose page is missing,
261
+ * deleted or at another version throws) and key clashes, and the description and note token
262
+ * bounds; the caller has already made every other check the single writes make (live parent, no
263
+ * live children, depth and move limits, stamp scopes, mentions). A store may group the
264
+ * statements, so a batch must also hold:
265
+ * - at most one `create`, one `move` and one `delete` per page, and no `create`, `update` or `move` of a deleted one;
266
+ * - a `create` doesn't take a key that a `move` in the batch frees.
267
+ * - at most one `add-note` or `remove-note` per note.
268
+ * A batch that breaks the first rule throws before writing; one that breaks the second may throw.
269
+ * Any throw applies nothing, and the caller then rolls back and writes one by one.
270
+ *
271
+ * @experimental
272
+ */
273
+ applyPageWrites?(input: {
274
+ writes: KnowledgePageWrite[];
275
+ }): Promise<void>;
191
276
  findPagesByName(_input: Parameters<KnowledgePageStore['findPagesByName']>[0]): ReturnType<KnowledgePageStore['findPagesByName']>;
192
277
  listChildPages(_input: Parameters<KnowledgePageStore['listChildPages']>[0]): ReturnType<KnowledgePageStore['listChildPages']>;
193
278
  listPages(_input: Parameters<KnowledgePageStore['listPages']>[0]): ReturnType<KnowledgePageStore['listPages']>;
@@ -102,8 +102,16 @@ export declare class InMemoryKnowledgeImportersStorage extends KnowledgeImporter
102
102
  getNode(bindingId: string, sourceId: string): Promise<KnowledgeImporterNodeRecord | null>;
103
103
  getNodes(bindingId: string, sourceIds: string[]): Promise<KnowledgeImporterNodeRecord[]>;
104
104
  getNodeByPage(pageId: string): Promise<KnowledgeImporterNodeRecord | null>;
105
+ getNodesByPages(pageIds: string[]): Promise<KnowledgeImporterNodeRecord[]>;
105
106
  saveNode(node: Omit<KnowledgeImporterNodeRecord, 'updatedAt'>): Promise<void>;
106
107
  deleteNode(bindingId: string, sourceId: string): Promise<void>;
108
+ writeNodes(input: {
109
+ deletes: {
110
+ bindingId: string;
111
+ sourceId: string;
112
+ }[];
113
+ saves: Omit<KnowledgeImporterNodeRecord, 'updatedAt'>[];
114
+ }): Promise<void>;
107
115
  listNodes(bindingId: string, options?: {
108
116
  after?: string;
109
117
  limit?: number;
@@ -118,6 +126,7 @@ export declare class InMemoryKnowledgeImportersStorage extends KnowledgeImporter
118
126
  getState(bindingId: string): Promise<Record<string, string>>;
119
127
  setState(bindingId: string, state: Record<string, string>): Promise<void>;
120
128
  recordRunChange(change: KnowledgeImporterRunChangeRecord): Promise<void>;
129
+ recordRunChanges(changes: KnowledgeImporterRunChangeRecord[]): Promise<void>;
121
130
  listRunChanges(runId: string, options?: {
122
131
  after?: string;
123
132
  limit?: number;
@@ -243,9 +243,32 @@ export declare abstract class KnowledgeImportersStorage {
243
243
  */
244
244
  getNodes?(bindingId: string, sourceIds: string[]): Promise<KnowledgeImporterNodeRecord[]>;
245
245
  abstract getNodeByPage(pageId: string): Promise<KnowledgeImporterNodeRecord | null>;
246
+ /**
247
+ * The nodes of `pageIds`, of any binding, each as {@link getNodeByPage} returns it, in no
248
+ * particular order; pages without one are left out and duplicates count once. Optional: an
249
+ * importer flush reads in batches only when the store implements it.
250
+ *
251
+ * @experimental
252
+ */
253
+ getNodesByPages?(pageIds: string[]): Promise<KnowledgeImporterNodeRecord[]>;
246
254
  /** Insert or replace by `(bindingId, sourceId)`. A page already mapped to another node throws. */
247
255
  abstract saveNode(node: Omit<KnowledgeImporterNodeRecord, 'updatedAt'>): Promise<void>;
248
256
  abstract deleteNode(bindingId: string, sourceId: string): Promise<void>;
257
+ /**
258
+ * Deletes `deletes`, then saves `saves` as {@link saveNode} would one by one, in one transaction.
259
+ * A key in `saves` more than once keeps its last record. A page mapped to a node that is neither
260
+ * deleted nor saved here throws, as does a page two records in `saves` map to. Optional: an
261
+ * importer flush writes in batches only when the store implements it.
262
+ *
263
+ * @experimental
264
+ */
265
+ writeNodes?(input: {
266
+ deletes: {
267
+ bindingId: string;
268
+ sourceId: string;
269
+ }[];
270
+ saves: Omit<KnowledgeImporterNodeRecord, 'updatedAt'>[];
271
+ }): Promise<void>;
249
272
  /** Ordered by sourceId (byte order). `unsettled: true` lists only nodes with `unsettled` set. */
250
273
  abstract listNodes(bindingId: string, options?: {
251
274
  after?: string;
@@ -268,6 +291,14 @@ export declare abstract class KnowledgeImportersStorage {
268
291
  abstract setState(bindingId: string, state: Record<string, string>): Promise<void>;
269
292
  /** Insert or replace by `(runId, sourceId)`. */
270
293
  abstract recordRunChange(change: KnowledgeImporterRunChangeRecord): Promise<void>;
294
+ /**
295
+ * Records `changes` as {@link recordRunChange} would one by one, in one transaction: a key recorded
296
+ * again keeps its place and takes the last record. Optional: an importer flush records its changes
297
+ * in one batch only when the store implements it.
298
+ *
299
+ * @experimental
300
+ */
301
+ recordRunChanges?(changes: KnowledgeImporterRunChangeRecord[]): Promise<void>;
271
302
  /** In the order they were recorded. */
272
303
  abstract listRunChanges(runId: string, options?: {
273
304
  after?: string;
@@ -11,10 +11,17 @@ export declare class InMemoryKnowledgeStorage extends KnowledgeStorage {
11
11
  countChildScopes(input: Parameters<KnowledgePageStore['countChildScopes']>[0]): ReturnType<KnowledgePageStore['countChildScopes']>;
12
12
  getPage(input: Parameters<KnowledgePageStore['getPage']>[0]): ReturnType<KnowledgePageStore['getPage']>;
13
13
  getPageParents(input: Parameters<KnowledgeStorage['getPageParents']>[0]): ReturnType<KnowledgeStorage['getPageParents']>;
14
+ getPageChains(input: Parameters<NonNullable<KnowledgeStorage['getPageChains']>>[0]): ReturnType<NonNullable<KnowledgeStorage['getPageChains']>>;
15
+ getPagesByPaths(input: Parameters<NonNullable<KnowledgeStorage['getPagesByPaths']>>[0]): ReturnType<NonNullable<KnowledgeStorage['getPagesByPaths']>>;
16
+ getLastChildPositions(input: Parameters<NonNullable<KnowledgeStorage['getLastChildPositions']>>[0]): ReturnType<NonNullable<KnowledgeStorage['getLastChildPositions']>>;
17
+ getPageSubtrees(input: Parameters<NonNullable<KnowledgeStorage['getPageSubtrees']>>[0]): ReturnType<NonNullable<KnowledgeStorage['getPageSubtrees']>>;
18
+ listNotesByPages(input: Parameters<NonNullable<KnowledgeStorage['listNotesByPages']>>[0]): ReturnType<NonNullable<KnowledgeStorage['listNotesByPages']>>;
19
+ applyPageWrites(input: Parameters<NonNullable<KnowledgeStorage['applyPageWrites']>>[0]): ReturnType<NonNullable<KnowledgeStorage['applyPageWrites']>>;
14
20
  listScopeDeclarations(): ReturnType<KnowledgePageStore['listScopeDeclarations']>;
15
21
  renameScopeDeclaration(input: Parameters<KnowledgePageStore['renameScopeDeclaration']>[0]): ReturnType<KnowledgePageStore['renameScopeDeclaration']>;
16
22
  getPages(input: Parameters<KnowledgePageStore['getPages']>[0]): ReturnType<KnowledgePageStore['getPages']>;
17
23
  getPageByPath(input: Parameters<KnowledgePageStore['getPageByPath']>[0]): ReturnType<KnowledgePageStore['getPageByPath']>;
24
+ findPagesByNames(input: Parameters<NonNullable<KnowledgeStorage['findPagesByNames']>>[0]): ReturnType<NonNullable<KnowledgeStorage['findPagesByNames']>>;
18
25
  findPagesByName(input: Parameters<KnowledgePageStore['findPagesByName']>[0]): ReturnType<KnowledgePageStore['findPagesByName']>;
19
26
  listChildPages(input: Parameters<KnowledgePageStore['listChildPages']>[0]): ReturnType<KnowledgePageStore['listChildPages']>;
20
27
  listPages(input: Parameters<KnowledgePageStore['listPages']>[0]): ReturnType<KnowledgePageStore['listPages']>;
@@ -1,4 +1,4 @@
1
- import type { KnowledgeNote, KnowledgePage, KnowledgePageActivityAction, KnowledgePageActivityEvent, KnowledgePageBodyLink, KnowledgePageLinkCounts, KnowledgePageLinkEdge, KnowledgePageSearchHit, KnowledgePageStore, KnowledgePin, KnowledgePinKind, KnowledgeProvenance, KnowledgeReadScope } from './pages.js';
1
+ import type { KnowledgeNote, KnowledgePage, KnowledgePageActivityAction, KnowledgePageActivityEvent, KnowledgePageBodyLink, KnowledgePageLinkCounts, KnowledgePageLinkEdge, KnowledgePageSearchHit, KnowledgePageStore, KnowledgePageWrite, KnowledgePin, KnowledgePinKind, KnowledgeProvenance, KnowledgeReadScope } from './pages.js';
2
2
  type Store = KnowledgePageStore;
3
3
  /**
4
4
  * In-memory schema-4 page store: the reference implementation of {@link KnowledgePageStore} that the
@@ -46,7 +46,33 @@ export declare class InMemoryKnowledgePageStore implements KnowledgePageStore {
46
46
  }): Promise<KnowledgePage[]>;
47
47
  getPages(input: Parameters<Store['getPages']>[0]): Promise<KnowledgePage[]>;
48
48
  getPageByPath(input: Parameters<Store['getPageByPath']>[0]): Promise<KnowledgePage | null>;
49
+ getPageChains(input: {
50
+ ids: string[];
51
+ read: KnowledgeReadScope;
52
+ }): Promise<Record<string, KnowledgePage[]>>;
53
+ getPagesByPaths(input: {
54
+ scopeId: string;
55
+ paths: string[][];
56
+ read: KnowledgeReadScope;
57
+ }): Promise<(KnowledgePage | null)[]>;
58
+ getLastChildPositions(input: {
59
+ parentIds: string[];
60
+ }): Promise<Record<string, string | null>>;
61
+ getPageSubtrees(input: {
62
+ rootIds: string[];
63
+ limit: number;
64
+ }): Promise<Record<string, KnowledgePage[] | null>>;
65
+ listNotesByPages(input: {
66
+ pageIds: string[];
67
+ read: KnowledgeReadScope;
68
+ }): Promise<Record<string, KnowledgeNote[]>>;
49
69
  findPagesByName(input: Parameters<Store['findPagesByName']>[0]): Promise<KnowledgePage[]>;
70
+ findPagesByNames(input: {
71
+ names: string[];
72
+ read: Parameters<Store['findPagesByName']>[0]['read'];
73
+ scopeId?: string;
74
+ limit?: number;
75
+ }): Promise<Record<string, KnowledgePage[]>>;
50
76
  listChildPages(input: Parameters<Store['listChildPages']>[0]): Promise<{
51
77
  pages: KnowledgePage[];
52
78
  nextCursor?: string | undefined;
@@ -63,6 +89,10 @@ export declare class InMemoryKnowledgePageStore implements KnowledgePageStore {
63
89
  pages: KnowledgePage[];
64
90
  nextCursor?: string | undefined;
65
91
  }>;
92
+ /** The single writes, one by one in input order; all undone if one fails. */
93
+ applyPageWrites(input: {
94
+ writes: KnowledgePageWrite[];
95
+ }): Promise<void>;
66
96
  createPage(input: Parameters<Store['createPage']>[0]): Promise<KnowledgePage>;
67
97
  updatePage(input: Parameters<Store['updatePage']>[0]): Promise<KnowledgePage>;
68
98
  movePage(input: Parameters<Store['movePage']>[0]): Promise<KnowledgePage>;
@@ -460,6 +460,80 @@ export interface AddKnowledgeNoteInput {
460
460
  mentions: string[];
461
461
  provenance: KnowledgeProvenance;
462
462
  }
463
+ /**
464
+ * One write in {@link KnowledgeStorage.applyPageWrites}, with everything the matching single write
465
+ * would work out for itself (scope, depth, position, ids) already decided by the caller, so the store
466
+ * applies it without reading. `scopeId` is the page's scope as of input order (a store may group
467
+ * the statements, so the stored scope can differ when its statement runs); `expectedVersion` is the
468
+ * page's version as of input order, counting earlier writes to it in the same batch.
469
+ *
470
+ * @experimental
471
+ */
472
+ export type KnowledgePageWrite = {
473
+ op: 'create';
474
+ id: string;
475
+ scopeId: string;
476
+ parentId: string;
477
+ key?: string;
478
+ name: string;
479
+ description?: string;
480
+ body?: string;
481
+ position: string;
482
+ depth: number;
483
+ provenance: KnowledgeProvenance;
484
+ } | {
485
+ op: 'update';
486
+ id: string;
487
+ scopeId: string;
488
+ expectedVersion: number;
489
+ name?: string;
490
+ /** Empty string clears it. */
491
+ description?: string;
492
+ body?: string;
493
+ provenance: KnowledgeProvenance;
494
+ } | {
495
+ /**
496
+ * Moves the page under `parentId`, and its subtree (deleted rows included) with it, as
497
+ * {@link KnowledgePageStore.movePage}: descendants keep their depth relative to it and take its scope.
498
+ */
499
+ op: 'move';
500
+ id: string;
501
+ fromScopeId: string;
502
+ expectedVersion: number;
503
+ parentId: string;
504
+ scopeId: string;
505
+ depth: number;
506
+ position: string;
507
+ provenance: KnowledgeProvenance;
508
+ } | {
509
+ op: 'delete';
510
+ id: string;
511
+ scopeId: string;
512
+ expectedVersion: number;
513
+ deletedBy: string;
514
+ } | {
515
+ op: 'add-note';
516
+ id: string;
517
+ pageId: string;
518
+ scopeId: string;
519
+ text: string;
520
+ when?: Date;
521
+ /** Non-empty; scope page ids. */
522
+ stampScopeIds: string[];
523
+ mentions: string[];
524
+ provenance: KnowledgeProvenance;
525
+ } | {
526
+ op: 'remove-note';
527
+ id: string;
528
+ pageId: string;
529
+ scopeId: string;
530
+ deletedBy: string;
531
+ provenance: KnowledgeProvenance;
532
+ } | {
533
+ op: 'replace-links';
534
+ pageId: string;
535
+ links: KnowledgePageBodyLink[];
536
+ };
463
537
  /** @experimental */
464
538
  export interface SearchKnowledgePagesInput {
465
539
  query: string;
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_run_registry = require("../run-registry-CibQoN6K.cjs");
2
+ const require_run_registry = require("../run-registry-CrTsH9iL.cjs");
3
3
  const require_observability = require("../observability-B0R_D1PZ.cjs");
4
- const require_stream = require("../stream-D_7tMaJe.cjs");
4
+ const require_stream = require("../stream-CMKRczs4.cjs");
5
5
  const require_storage = require("../storage-CfG0I2aF.cjs");
6
6
  const require_constants = require("../constants-Bou0hEgY.cjs");
7
7
  const require_filesystem_versioned = require("../filesystem-versioned-BavRtYWJ.cjs");
@@ -1,6 +1,6 @@
1
- import { $a as SPAN_QUERY_MAX_CURSOR_BYTES, $i as HarnessStorage, Aa as jsonValueEquals, Ai as KnowledgePageDepthError, Ao as ObservabilityInMemory, Ar as createGitHubSourceControlProviderFromEnv, Ba as tracePageIdSchema, Bi as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Br as mergeWorkflowStepResult, Ca as createStoreErrorId, Ci as KnowledgeTransactionDeadlineError, Co as buildMetricRecord, Cr as knowledgeSemanticDocumentId, Da as getDefaultValue, Di as inspectKnowledgeSchema, Do as getStringOrNull, Dr as StoreOperationsInMemory, Ea as filterByDateRange, Ei as createKnowledgeUlid, Eo as getObjectOrNull, Er as parseKnowledgeNodeCursor, Fa as transformRow, Fi as MAX_KNOWLEDGE_PAGE_BODY_LINKS, Fr as WorkflowsInMemory, Ga as THREAD_QUERY_MAX_LIMIT, Gi as knowledgeLinkRefKey, Gr as ScoresInMemory, Ha as tracePageRequestSchema, Hi as assertKnowledgeNoteTextWithinBound, Hr as WorkflowDefinitionsStorage, Ia as transformScoreRow, Ii as MAX_KNOWLEDGE_PAGE_DEPTH, Ir as cloneRunData, Ja as threadQueryIdentitySchema, Ji as knowledgePositionBetween, Jr as SchedulesStorage, Ka as encodeThreadQueryCursor, Ki as knowledgePagePath, Kr as ScoresStorage, La as validateStorageMetadataFilter, Li as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, Lr as WorkflowsStorage, Ma as safelyParseJSON, Mi as KnowledgePageKeyConflictError, Mo as FactoryStorage, Mr as FilesystemDB, Na as serializeDate, Ni as MAX_KNOWLEDGE_MOVE_PAGES, No as FactoryStorageDomain, Nr as InMemoryStore, Oa as getSqlType, Oi as parseKnowledgeWikilinks, Oo as serializeSpanAttributes, Or as StoreOperations, Pa as storageMessageMatchesMetadataFilter, Pi as MAX_KNOWLEDGE_NOTE_TOKENS, Po as UniqueViolationError, Pr as MockStore, Qa as SPAN_QUERY_MAX_COST_METRICS, Qi as InMemoryHarness, Qr as dispatchDueNotifications, Ra as TracePageError, Ri as MAX_KNOWLEDGE_PAGE_LINKS, Rr as createEmptyWorkflowSnapshot, Sa as createStorageErrorId, Si as KnowledgeStorage, So as buildLogRecord, Sr as knowledgeScopeKey, Ta as ensureDate, Ti as assertKnowledgeSchemaCompatible, To as buildUpdateSpanRecord, Tr as knowledgeVisibleScopeKeys, Ua as tracePageResponseSchema, Ui as assertKnowledgePageDescriptionWithinBound, Ur as InMemoryToolProviderConnectionsStorage, Va as tracePageNodeSchema, Vi as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Vr as InMemoryWorkflowDefinitionsStorage, Wa as THREAD_QUERY_DEFAULT_LIMIT, Wi as canonicalKnowledgeName, Wr as ToolProviderConnectionsStorage, Xa as threadQueryResponseSchema, Xi as parseKnowledgePageRef, Xr as InMemoryNotificationsStorage, Ya as threadQueryRequestSchema, Yi as knowledgeScopeReadable, Yr as normalizeScheduleTarget, Za as threadQueryRowSchema, Zi as KnowledgeInvalidCursorError, Zr as NotificationsStorage, _a as BackgroundTasksStorage, _i as KNOWLEDGE_STORAGE_CONTRACT_VERSION, _o as getTraceQueryDeltaWatermark, _r as assertKnowledgeScopeWithinCeiling, ao as encodeSpanQueryCursor, au as RUN_FENCE_CONFLICT_ERROR_ID, ba as retentionCutoffMs, bi as KnowledgeNotFoundError, bo as buildCreateSpanRecord, br as expandKnowledgeScope, co as resolveSpanQueryCost, cu as coverNestedRun, di as InMemoryMemory, do as spanQueryIdentitySchema, dr as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, du as matchesRunFence, ea as ExperimentsInMemory, eo as SPAN_QUERY_MAX_LIMIT, fa as InMemoryChannelsStorage, fi as MemoryStorage, fo as spanQueryRequestSchema, fr as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, fu as resolveRunFence, ga as BackgroundTasksInMemory, gi as KnowledgeImportersStorage, go as encodeTraceQueryDeltaCursor, gr as assertKnowledgeRecordTextWithinBound, ha as BlobStore, hi as KnowledgeImporterRunStateError, ho as encodeTraceQueryCursor, hr as assertKnowledgeDescriptionWithinBound, hu as setRunFenceContext, ia as DatasetItemIdentityConflictError, io as createSpanQueryPreview, iu as isWorkflowStepConflictError, ja as parseDuration, ji as KnowledgePageHasChildrenError, jo as ObservabilityStorage, jr as FilesystemStore, ka as hasErrorCode, ki as KnowledgeMoveTooLargeError, ko as toEntityType, kr as GitHubSourceControlProvider, lo as spanQueryCostSchema, lu as currentRunGeneration, ma as InMemoryBlobStore, mi as KnowledgeImporterBindingConflictError, mo as spanQueryRowSchema, mr as assertKnowledgeCeilingRaised, mu as runOutsideRunFenceScope, na as DatasetsInMemory, no as SPAN_QUERY_ORDER_FIELDS, nu as WorkflowStepConflictError, oo as parseSpanQueryRequest, ou as RUN_FENCING_NOT_SUPPORTED_ERROR_ID, pa as ChannelsStorage, pi as InMemoryKnowledgeStorage, po as spanQueryResponseSchema, pr as MAX_KNOWLEDGE_SCOPE_TAGS, pu as runFencingNotSupportedError, qa as planThreadRowsQuery, qi as knowledgePinDepth, qr as InMemorySchedulesStorage, ra as DatasetsStorage, ro as buildSpanQueryResponse, ru as assertWorkflowStepGuard, so as planSpanQuery, su as RunFenceConflictError, ta as ExperimentsStorage, to as SPAN_QUERY_MAX_PREVIEW_CHARACTERS, uo as spanQueryIdentityKey, uu as isRunFenceConflictError, va as executeRetentionPrune, vi as KNOWLEDGE_STORAGE_SCHEMA_VERSION, vo as planThreadQuery, vr as canonicalizeKnowledgeScope, wa as createVectorErrorId, wi as KnowledgeUnsupportedCapabilityError, wo as buildScoreRecord, wr as knowledgeSemanticIdempotencyKey, xa as runRetentionBatches, xi as KnowledgeSchemaResetRequiredError, xo as buildFeedbackRecord, xr as isKnowledgeScopeVisible, ya as resolveRetentionTargets, yi as KnowledgeConflictError, yo as planTraceQuery, yr as createKnowledgeNodeCursor, za as readTracePage, zi as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, zr as mergeStepResult } from "../run-registry-BL_kKvFE.js";
1
+ import { $a as threadQueryRequestSchema, $i as parseKnowledgePageRef, $r as InMemoryNotificationsStorage, Aa as filterByDateRange, Ai as inspectKnowledgeSchema, Ao as getObjectOrNull, Ar as StoreOperationsInMemory, Ba as transformScoreRow, Bi as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, Br as WorkflowsStorage, Ca as resolveRetentionTargets, Ci as KnowledgeNotFoundError, Co as planTraceQuery, Cr as expandKnowledgeScope, Da as createStoreErrorId, Di as KnowledgeUnsupportedCapabilityError, Do as buildMetricRecord, Dr as knowledgeSemanticIdempotencyKey, Ea as createStorageErrorId, Ei as KnowledgeTransactionDeadlineError, Eo as buildLogRecord, Er as knowledgeSemanticDocumentId, Fa as parseDuration, Fi as KnowledgePageKeyConflictError, Fo as ObservabilityStorage, Fr as FilesystemDB, Ga as tracePageNodeSchema, Gi as assertKnowledgeNoteTextWithinBound, Gr as WorkflowDefinitionsStorage, Ha as TracePageError, Hi as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, Hr as mergeStepResult, Ia as safelyParseJSON, Ii as MAX_KNOWLEDGE_MOVE_PAGES, Io as FactoryStorage, Ir as InMemoryStore, Ja as THREAD_QUERY_DEFAULT_LIMIT, Ji as knowledgeLinkRefKey, Jr as ScoresInMemory, Ka as tracePageRequestSchema, Ki as assertKnowledgePageDescriptionWithinBound, Kr as InMemoryToolProviderConnectionsStorage, La as serializeDate, Li as MAX_KNOWLEDGE_NOTE_TOKENS, Lo as FactoryStorageDomain, Lr as MockStore, Ma as getSqlType, Mi as KnowledgeMoveTooLargeError, Mo as serializeSpanAttributes, Mr as GitHubSourceControlProvider, Na as hasErrorCode, Ni as KnowledgePageDepthError, No as toEntityType, Nr as createGitHubSourceControlProviderFromEnv, Oa as createVectorErrorId, Oi as assertKnowledgeSchemaCompatible, Oo as buildScoreRecord, Or as knowledgeVisibleScopeKeys, Pa as jsonValueEquals, Pi as KnowledgePageHasChildrenError, Po as ObservabilityInMemory, Pr as FilesystemStore, Qa as threadQueryIdentitySchema, Qi as knowledgeScopeReadable, Qr as normalizeScheduleTarget, Ra as storageMessageMatchesMetadataFilter, Ri as MAX_KNOWLEDGE_PAGE_BODY_LINKS, Ro as UniqueViolationError, Rr as WorkflowsInMemory, Sa as executeRetentionPrune, Si as KnowledgeConflictError, So as planThreadQuery, Sr as createKnowledgeNodeCursor, Ta as runRetentionBatches, Ti as KnowledgeStorage, To as buildFeedbackRecord, Tr as knowledgeScopeKey, Ua as readTracePage, Ui as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Ur as mergeWorkflowStepResult, Va as validateStorageMetadataFilter, Vi as MAX_KNOWLEDGE_PAGE_LINKS, Vr as createEmptyWorkflowSnapshot, Wa as tracePageIdSchema, Wi as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Wr as InMemoryWorkflowDefinitionsStorage, Xa as encodeThreadQueryCursor, Xi as knowledgePinDepth, Xr as InMemorySchedulesStorage, Ya as THREAD_QUERY_MAX_LIMIT, Yi as knowledgePagePath, Yr as ScoresStorage, Za as planThreadRowsQuery, Zi as knowledgePositionBetween, Zr as SchedulesStorage, _a as ChannelsStorage, _i as KnowledgeImporterBindingConflictError, _o as spanQueryResponseSchema, _r as assertKnowledgeCeilingRaised, _u as runFencingNotSupportedError, aa as ExperimentsStorage, ao as SPAN_QUERY_MAX_PREVIEW_CHARACTERS, ba as BackgroundTasksInMemory, bi as KNOWLEDGE_STORAGE_CONTRACT_VERSION, bo as encodeTraceQueryDeltaCursor, br as assertKnowledgeScopeWithinCeiling, ca as DatasetItemIdentityConflictError, co as createSpanQueryPreview, cu as isWorkflowStepConflictError, do as planSpanQuery, du as RunFenceConflictError, ea as KnowledgeInvalidCursorError, ei as NotificationsStorage, eo as threadQueryResponseSchema, fo as resolveSpanQueryCost, fu as coverNestedRun, ga as InMemoryChannelsStorage, gi as InMemoryKnowledgeStorage, go as spanQueryRequestSchema, gr as MAX_KNOWLEDGE_SCOPE_TAGS, gu as resolveRunFence, hi as MemoryStorage, ho as spanQueryIdentitySchema, hr as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, hu as matchesRunFence, ia as ExperimentsInMemory, io as SPAN_QUERY_MAX_LIMIT, ja as getDefaultValue, ji as parseKnowledgeWikilinks, jo as getStringOrNull, jr as StoreOperations, ka as ensureDate, ki as createKnowledgeUlid, ko as buildUpdateSpanRecord, kr as parseKnowledgeNodeCursor, lo as encodeSpanQueryCursor, lu as RUN_FENCE_CONFLICT_ERROR_ID, mi as InMemoryMemory, mo as spanQueryIdentityKey, mr as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, mu as isRunFenceConflictError, na as InMemoryHarness, no as SPAN_QUERY_MAX_COST_METRICS, oa as DatasetsInMemory, oo as SPAN_QUERY_ORDER_FIELDS, ou as WorkflowStepConflictError, po as spanQueryCostSchema, pu as currentRunGeneration, qa as tracePageResponseSchema, qi as canonicalKnowledgeName, qr as ToolProviderConnectionsStorage, ra as HarnessStorage, ro as SPAN_QUERY_MAX_CURSOR_BYTES, sa as DatasetsStorage, so as buildSpanQueryResponse, su as assertWorkflowStepGuard, ti as dispatchDueNotifications, to as threadQueryRowSchema, uo as parseSpanQueryRequest, uu as RUN_FENCING_NOT_SUPPORTED_ERROR_ID, va as InMemoryBlobStore, vi as KnowledgeImporterRunStateError, vo as spanQueryRowSchema, vr as assertKnowledgeDescriptionWithinBound, vu as runOutsideRunFenceScope, wa as retentionCutoffMs, wi as KnowledgeSchemaResetRequiredError, wo as buildCreateSpanRecord, wr as isKnowledgeScopeVisible, xa as BackgroundTasksStorage, xi as KNOWLEDGE_STORAGE_SCHEMA_VERSION, xo as getTraceQueryDeltaWatermark, xr as canonicalizeKnowledgeScope, ya as BlobStore, yi as KnowledgeImportersStorage, yo as encodeTraceQueryCursor, yr as assertKnowledgeRecordTextWithinBound, yu as setRunFenceContext, za as transformRow, zi as MAX_KNOWLEDGE_PAGE_DEPTH, zr as cloneRunData } from "../run-registry-DJT02z_9.js";
2
2
  import { a as PREVIEW_MAX_LENGTH } from "../observability-D7RNOAPx.js";
3
- import { At as STATE_CHECKPOINT_PATCHES, Bt as summarizeStepResult, Ft as materializeState, Ht as applyStatePatch, It as materializeWorkflowRun, Lt as pickStateKeys, Mt as applyStateColumnsWrite, Nt as isStateCheckpointDue, Pt as latestStepResults, Rt as stateBaseOf, Ut as diffState, Vt as unusedStateEntries, jt as STEP_RESULT_SUMMARY_FIELDS, kt as getSnapshotMemoryInfo, zt as stateColumnsWrite } from "../stream-1DGoEkG2.js";
3
+ import { At as STATE_CHECKPOINT_PATCHES, Bt as summarizeStepResult, Ft as materializeState, Ht as applyStatePatch, It as materializeWorkflowRun, Lt as pickStateKeys, Mt as applyStateColumnsWrite, Nt as isStateCheckpointDue, Pt as latestStepResults, Rt as stateBaseOf, Ut as diffState, Vt as unusedStateEntries, jt as STEP_RESULT_SUMMARY_FIELDS, kt as getSnapshotMemoryInfo, zt as stateColumnsWrite } from "../stream-CG9OooRx.js";
4
4
  import { $ as getFeedbackAggregateArgsSchema, $t as metricsFilterSchema, A as deleteScoresResponseSchema, An as tagsField, At as getServiceNamesResponseSchema, B as experimentIdField, Bt as listScoresArgsSchema, C as dateRangeSchema, Cn as scoresOrderBySchema, Ct as getScoreBreakdownArgsSchema, D as deleteFeedbackArgsSchema, Dn as sourceField, Dt as getScoreTimeSeriesArgsSchema, E as defaultPaginationArgs, En as sortDirectionSchema, Et as getScorePercentilesResponseSchema, F as entityIdField, Fn as userIdField, Ft as listLogsArgsSchema, G as feedbackRecordSchema, Gt as logsFilterSchema, H as feedbackInputSchema, Ht as logLevelSchema, I as entityNameField, It as listLogsResponseSchema, J as getEntityNamesResponseSchema, Jt as metadataField, K as feedbackReviewStatusSchema, Kt as logsOrderByFieldSchema, L as entityTypeField, Lt as listMetricsArgsSchema, M as deltaInfoSchema, Mn as traceIdField, Mt as getTagsResponseSchema, N as deltaLimitSchema, Nn as updateFeedbackReviewStatusArgsSchema, Nt as listFeedbackArgsSchema, O as deleteFeedbackResponseSchema, On as spanContextFields, Ot as getScoreTimeSeriesResponseSchema, P as distinctColumnSchema, Pn as updatedAtField, Pt as listFeedbackResponseSchema, Q as getEnvironmentsResponseSchema, Qt as metricsAggregationSchema, R as environmentField, Rt as listMetricsResponseSchema, S as createdAtField, Sn as scoresOrderByFieldSchema, St as getScoreAggregateResponseSchema, T as defaultDeltaLimit, Tn as sessionIdField, Tt as getScorePercentilesArgsSchema, U as feedbackOrderByFieldSchema, Ut as logRecordInputSchema, V as feedbackFilterSchema, Vt as listScoresResponseSchema, W as feedbackOrderBySchema, Wt as logRecordSchema, X as getEntityTypesResponseSchema, Xt as metricRecordSchema, Y as getEntityTypesArgsSchema, Yt as metricInputSchema, Z as getEnvironmentsArgsSchema, Zt as metricTypeSchema, _ as createMetricRecordSchema, _n as runIdField, _t as getMetricPercentilesArgsSchema, a as batchCreateFeedbackArgsSchema, an as paginationInfoSchema, at as getFeedbackTimeSeriesArgsSchema, b as createScoreRecordSchema, bn as scoreRecordSchema, bt as getMetricTimeSeriesResponseSchema, c as batchCreateScoresArgsSchema, cn as parentEntityTypeField, ct as getMetricAggregateResponseSchema, d as contextFields, dn as requestIdField, dt as getMetricLabelKeysArgsSchema, en as metricsOrderByFieldSchema, et as getFeedbackAggregateResponseSchema, f as createFeedbackArgsSchema, ft as getMetricLabelKeysResponseSchema, g as createLogRecordSchema, gn as rootEntityTypeField, gt as getMetricNamesResponseSchema, h as createFeedbackResponseSchema, hn as rootEntityNameField, ht as getMetricNamesArgsSchema, i as aggregationTypeSchema, in as paginationArgsSchema, it as getFeedbackPercentilesResponseSchema, j as deltaCursorSchema, jn as threadIdField, jt as getTagsArgsSchema, k as deleteScoresArgsSchema, kn as spanIdField, kt as getServiceNamesArgsSchema, l as commonFilterFields, ln as refineObservabilityListMode, lt as getMetricBreakdownArgsSchema, m as createFeedbackRecordSchema, mn as rootEntityIdField, mt as getMetricLabelValuesResponseSchema, n as METRIC_DISTINCT_COLUMNS, nn as normalizeObservabilityListArgs, nt as getFeedbackBreakdownResponseSchema, o as batchCreateLogsArgsSchema, on as parentEntityIdField, ot as getFeedbackTimeSeriesResponseSchema, p as createFeedbackBodySchema, pn as resourceIdField, pt as getMetricLabelValuesArgsSchema, q as getEntityNamesArgsSchema, qt as logsOrderBySchema, r as aggregationIntervalSchema, rn as organizationIdField, rt as getFeedbackPercentilesArgsSchema, s as batchCreateMetricsArgsSchema, sn as parentEntityNameField, st as getMetricAggregateArgsSchema, t as EntityType, tn as metricsOrderBySchema, tt as getFeedbackBreakdownArgsSchema, u as comparePeriodSchema, un as replaceFeedbackBodySchema, ut as getMetricBreakdownResponseSchema, v as createScoreArgsSchema, vn as scopeField, vt as getMetricPercentilesResponseSchema, w as dbTimestamps, wn as serviceNameField, wt as getScoreBreakdownResponseSchema, x as createScoreResponseSchema, xn as scoresFilterSchema, xt as getScoreAggregateArgsSchema, y as createScoreBodySchema, yn as scoreInputSchema, yt as getMetricTimeSeriesArgsSchema, z as executionSourceField, zt as listModeSchema } from "../storage-Cc50aQAp.js";
5
5
  import { $ as TABLE_CHANNEL_INSTALLATIONS, $n as listTracesLightResponseSchema, $t as TABLE_WORKSPACES, A as MCP_CLIENTS_SCHEMA, An as computeTraceStatus, At as TABLE_OBSERVATIONAL_MEMORY, B as PROMPT_BLOCK_VERSIONS_SCHEMA, Bn as getSpansArgsSchema, Bt as TABLE_SKILLS, C as KNOWLEDGE_SCOPE_GRANTS_SCHEMA, Cn as branchesFilterSchema, Ct as TABLE_MCP_CLIENTS, D as KNOWLEDGE_V2_MENTIONS_SCHEMA, Dn as buildPreview, Dt as TABLE_MEMORY_RUN_FENCES, E as KNOWLEDGE_V2_ACTIVITY_SCHEMA, En as buildInputPreview, Et as TABLE_MCP_SERVER_VERSIONS, F as NOTIFICATIONS_SCHEMA, Fn as getBranchResponseSchema, Ft as TABLE_SCHEDULE_TRIGGERS, G as SKILLS_SCHEMA, Gn as getTraceLightResponseSchema, Gt as TABLE_THREAD_STATE, H as SCORERS_SCHEMA, Hn as getStringAttribute, Ht as TABLE_SKILL_VERSIONS, I as OBSERVATIONAL_MEMORY_SCHEMA, In as getRootSpanArgsSchema, It as TABLE_SCHEMAS, J as SPAN_SCHEMA, Jn as lightSpanRecordSchema, Jt as TABLE_WORKFLOW_DEFINITIONS, K as SKILL_BLOBS_SCHEMA, Kn as getTraceResponseSchema, Kt as TABLE_TOOL_PROVIDER_CONNECTIONS, L as OBSERVATIONAL_MEMORY_TABLE_SCHEMA, Ln as getRootSpanResponseSchema, Lt as TABLE_SCORERS, M as MCP_SERVERS_SCHEMA, Mn as createSpanRecordSchema, Mt as TABLE_PROMPT_BLOCK_VERSIONS, N as MCP_SERVER_VERSIONS_SCHEMA, Nn as extractBranchSpans, Nt as TABLE_RESOURCES, O as KNOWLEDGE_V2_NODES_SCHEMA, On as buildPreviewFromJson, Ot as TABLE_MESSAGES, P as MEMORY_RUN_FENCES_SCHEMA, Pn as getBranchArgsSchema, Pt as TABLE_SCHEDULES, Q as TABLE_CHANNEL_CONFIG, Qn as listTracesArgsSchema, Qt as TABLE_WORKFLOW_SNAPSHOT, R as OLD_SPAN_SCHEMA, Rn as getSpanArgsSchema, Rt as TABLE_SCORER_DEFINITIONS, S as KNOWLEDGE_SCOPE_ADDRESSES_SCHEMA, Sn as batchUpdateSpansArgsSchema, St as TABLE_KNOWLEDGE_SEMANTIC_OUTBOX, T as KNOWLEDGE_TABLE_NAMES, Tn as branchesOrderBySchema, Tt as TABLE_MCP_SERVERS, U as SCORER_DEFINITIONS_SCHEMA, Un as getStructureResponseSchema, Ut as TABLE_SPANS, V as RUN_FENCING_TABLE_SCHEMAS, Vn as getSpansResponseSchema, Vt as TABLE_SKILL_BLOBS, W as SCORER_DEFINITION_VERSIONS_SCHEMA, Wn as getTraceArgsSchema, Wt as TABLE_THREADS, X as TABLE_AGENT_VERSIONS, Xn as listBranchesResponseSchema, Xt as TABLE_WORKFLOW_RUN_ENTRIES, Y as TABLE_AGENTS, Yn as listBranchesArgsSchema, Yt as TABLE_WORKFLOW_RUNS, Z as TABLE_BACKGROUND_TASKS, Zn as listScoresBySpanResponseSchema, Zt as TABLE_WORKFLOW_RUN_OWNERS, _ as KNOWLEDGE_NODE_ADDRESSES_SCHEMA, _n as INPUT_PREVIEW_MAX_LENGTH, _r as isAppendOnlySince, _t as TABLE_KNOWLEDGE_PROPOSALS, a as DATASET_VERSIONS_SCHEMA, an as WORKFLOW_RUN_ENTRIES_SCHEMA, ar as spanRecordSchema, at as TABLE_EXPERIMENT_RESULTS, b as KNOWLEDGE_RECORDS_SCHEMA, bn as batchDeleteTracesArgsSchema, br as maxObservationCursor, bt as TABLE_KNOWLEDGE_SCOPE_ADDRESSES, c as FAVORITES_SCHEMA, cn as WORKSPACES_SCHEMA, cr as toTraceSpans, ct as TABLE_KNOWLEDGE_ACCESS_STATE, d as KNOWLEDGE_ACTIVITY_SCHEMA, dn as STORAGE_VISIBILITY_VALUES, dr as tracesOrderByFieldSchema, dt as TABLE_KNOWLEDGE_IMPORT_RUNS, en as TABLE_WORKSPACE_VERSIONS, er as listTracesResponseSchema, et as TABLE_CONFIGS, f as KNOWLEDGE_CURSORS_SCHEMA, fn as buildStorageSchema, fr as tracesOrderBySchema, ft as TABLE_KNOWLEDGE_IMPORT_STATE, g as KNOWLEDGE_NODES_SCHEMA, gn as BRANCH_SPAN_TYPE_SET, gr as compareObservationalMemoryHeadOrder, gt as TABLE_KNOWLEDGE_NODE_SCOPES, h as KNOWLEDGE_MENTIONS_SCHEMA, hn as BRANCH_SPAN_TYPES, hr as assertActiveObservationsApplied, ht as TABLE_KNOWLEDGE_NODE_ADDRESSES, i as DATASET_ITEMS_SCHEMA, in as WORKFLOW_RUNS_SCHEMA, ir as spanIdsSchema, it as TABLE_EXPERIMENTS, j as MCP_CLIENT_VERSIONS_SCHEMA, jn as createSpanArgsSchema, jt as TABLE_PROMPT_BLOCKS, k as KNOWLEDGE_V2_RECORDS_SCHEMA, kn as buildStoredPreview, kt as TABLE_NOTIFICATIONS, l as HARNESS_SESSIONS_SCHEMA, ln as WORKSPACE_VERSIONS_SCHEMA, lr as traceSpanSchema, lt as TABLE_KNOWLEDGE_ACTIVITY, m as KNOWLEDGE_IMPORT_STATE_SCHEMA, mn as BATCH_DELETE_TRACES_MAX_IDS, mr as updateSpanRecordSchema, mt as TABLE_KNOWLEDGE_NODES, n as AGENT_VERSIONS_SCHEMA, nn as TOOL_PROVIDER_CONNECTIONS_SCHEMA, nr as scoreTracesResponseSchema, nt as TABLE_DATASET_ITEMS, o as EXPERIMENTS_SCHEMA, on as WORKFLOW_RUN_JOURNAL_TABLE_CONFIGS, or as toLightSpanRecord, ot as TABLE_FAVORITES, p as KNOWLEDGE_IMPORT_RUNS_SCHEMA, pn as matchesExpectedWorkflowStatus, pr as updateSpanArgsSchema, pt as TABLE_KNOWLEDGE_MENTIONS, q as SKILL_VERSIONS_SCHEMA, qn as isPreviewTruncated, qt as TABLE_TRACES, r as DATASETS_SCHEMA, rn as WORKFLOW_DEFINITIONS_SCHEMA, rr as spanIds, rt as TABLE_DATASET_VERSIONS, s as EXPERIMENT_RESULTS_SCHEMA, sn as WORKFLOW_RUN_OWNERS_SCHEMA, sr as toTraceSpan, st as TABLE_HARNESS_SESSIONS, t as AGENTS_SCHEMA, tn as THREAD_STATE_SCHEMA, tr as scoreTracesRequestSchema, tt as TABLE_DATASETS, u as KNOWLEDGE_ACCESS_STATE_SCHEMA, un as STORAGE_FAVORITE_ENTITY_TYPES, ur as tracesFilterSchema, ut as TABLE_KNOWLEDGE_CURSORS, v as KNOWLEDGE_NODE_SCOPES_SCHEMA, vn as TraceStatus, vr as isBufferedChunkCoveredByCursor, vt as TABLE_KNOWLEDGE_RECORDS, w as KNOWLEDGE_SEMANTIC_OUTBOX_SCHEMA, wn as branchesOrderByFieldSchema, wt as TABLE_MCP_CLIENT_VERSIONS, x as KNOWLEDGE_RECORD_SCOPES_SCHEMA, xn as batchDeleteTracesResponseSchema, xr as planReflectionGenerationText, xt as TABLE_KNOWLEDGE_SCOPE_GRANTS, y as KNOWLEDGE_PROPOSALS_SCHEMA, yn as batchCreateSpansArgsSchema, yr as isBufferedReflectionUnchangedSince, yt as TABLE_KNOWLEDGE_RECORD_SCOPES, z as PROMPT_BLOCKS_SCHEMA, zn as getSpanResponseSchema, zt as TABLE_SCORER_DEFINITION_VERSIONS } from "../constants-CFWgIaqA.js";
6
6
  import { _ as ThreadStateStorage, a as GitHistory, c as DOMAIN_KEYS, d as MastraStorage, f as calculatePagination, g as InMemoryThreadStateStorage, h as resolveListOrderBy, i as getSourceControlEntityFilePath, l as EDITOR_DOMAINS, m as normalizePerPage, n as SOURCE_CONTROL_AGENTS_DIR, o as VersionedStorageDomain, p as compareByField, r as getSourceAgentFilePath, s as StorageDomain, t as FilesystemVersionedHelpers, u as MastraCompositeStore } from "../filesystem-versioned-BL1ojJLo.js";
@@ -249,6 +249,12 @@ export type StorageCloneThreadInput = {
249
249
  options?: {
250
250
  /** Maximum number of messages to copy (from most recent) */
251
251
  messageLimit?: number;
252
+ /**
253
+ * With observational memory, `Memory` copies only the messages after the observations (the ones
254
+ * still in the context window) instead of every message. Can't be combined with `messageLimit`
255
+ * or `messageFilter`.
256
+ */
257
+ contextWindowOnly?: boolean;
252
258
  /** Filter messages by date range or specific IDs */
253
259
  messageFilter?: {
254
260
  /** Only include messages created on or after this date */
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_stream = require("../stream-D_7tMaJe.cjs");
3
- const require_llm = require("../llm-B1semiTO.cjs");
2
+ const require_stream = require("../stream-CMKRczs4.cjs");
3
+ const require_llm = require("../llm-DAw2eouV.cjs");
4
4
  const require_file = require("../file-BEndQUN1.cjs");
5
5
  exports.ChunkFrom = require_llm.ChunkFrom;
6
6
  exports.DefaultGeneratedFile = require_file.DefaultGeneratedFile;
@@ -1,4 +1,4 @@
1
- import { En as convertFullStreamChunkToUIMessageStream, a as convertFullStreamChunkToMastra, c as WorkflowRunOutput, d as MastraModelOutput, i as withStreamCaching, n as createCachingTransformStream, o as convertMastraChunkToAISDKv5, r as createReplayStream, s as MastraAgentNetworkStream, t as smoothStream } from "../stream-1DGoEkG2.js";
2
- import { u as ChunkFrom } from "../llm-CytL7cpw.js";
1
+ import { En as convertFullStreamChunkToUIMessageStream, a as convertFullStreamChunkToMastra, c as WorkflowRunOutput, d as MastraModelOutput, i as withStreamCaching, n as createCachingTransformStream, o as convertMastraChunkToAISDKv5, r as createReplayStream, s as MastraAgentNetworkStream, t as smoothStream } from "../stream-CG9OooRx.js";
2
+ import { u as ChunkFrom } from "../llm-DFT5EKp4.js";
3
3
  import { n as DefaultGeneratedFileWithType, t as DefaultGeneratedFile } from "../file-DGZrR5f7.js";
4
4
  export { ChunkFrom, DefaultGeneratedFile, DefaultGeneratedFileWithType, MastraAgentNetworkStream, MastraModelOutput, WorkflowRunOutput, convertFullStreamChunkToMastra, convertFullStreamChunkToUIMessageStream, convertMastraChunkToAISDKv5, createCachingTransformStream, createReplayStream, smoothStream, withStreamCaching };
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-tIEjjQTE.js";
2
- import { d as attachModelStreamTransport, f as isDataChunk, i as resolveModelConfig, p as readModelStreamTransport } from "./llm-CytL7cpw.js";
2
+ import { d as attachModelStreamTransport, f as isDataChunk, i as resolveModelConfig, p as readModelStreamTransport } from "./llm-DFT5EKp4.js";
3
3
  import { B as getResponseProviderItemIdFromPart, G as RESPONSE_ITEM_ID_PROVIDERS, K as RESPONSE_RESULT_ITEM_ID_KEY, f as coreContentToString, n as MessageList, p as messagesAreEqual, t as convertMessages } from "./message-list-BGm1DCiG.js";
4
4
  import { S as resolveObservabilityContext, x as createObservabilityContext } from "./observability-D7RNOAPx.js";
5
5
  import { t as MastraBase } from "./base-CKLWBhDo.js";
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BrhgMLW6.cjs");
2
- const require_llm = require("./llm-B1semiTO.cjs");
2
+ const require_llm = require("./llm-DAw2eouV.cjs");
3
3
  const require_message_list = require("./message-list-vR3uLAHL.cjs");
4
4
  const require_observability = require("./observability-B0R_D1PZ.cjs");
5
5
  const require_base = require("./base-BIzR1D3_.cjs");
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("../rolldown-runtime-BrhgMLW6.cjs");
3
3
  const require_dist = require("../dist-CXeCeeW7.cjs");
4
- const require_model = require("../model-eDfetuno.cjs");
4
+ const require_model = require("../model-DSMHJM3c.cjs");
5
5
  const require_model$1 = require("../model-jBymoqGa.cjs");
6
6
  let stream = require("stream");
7
7
  let module$1 = require("module");
@@ -1,5 +1,5 @@
1
1
  import { o as simulateReadableStream } from "../dist-D3cKCUe-.js";
2
- import { t as MastraLLMV1 } from "../model-DyQ07rPH.js";
2
+ import { t as MastraLLMV1 } from "../model-CUBZjm0T.js";
3
3
  import { t as AISDKV5LanguageModel } from "../model-DS-b2R-R.js";
4
4
  import { createRequire } from "module";
5
5
  import { Readable } from "stream";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_tool_loop_agent = require("../tool-loop-agent-CLB1r3X3.cjs");
2
+ const require_tool_loop_agent = require("../tool-loop-agent-14o3Z1qo.cjs");
3
3
  exports.getSettings = require_tool_loop_agent.getSettings;
4
4
  exports.isToolLoopAgentLike = require_tool_loop_agent.isToolLoopAgentLike;
5
5
  exports.toolLoopAgentToMastraAgent = require_tool_loop_agent.toolLoopAgentToMastraAgent;
@@ -1 +1 @@
1
- export { n as getSettings, r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "../tool-loop-agent-BXya_RYj.js";
1
+ export { n as getSettings, r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "../tool-loop-agent-Bi6z_q7o.js";
@@ -1,7 +1,7 @@
1
1
  const require_dist = require("./dist-P2rjrlmj.cjs");
2
- const require_run_registry = require("./run-registry-CibQoN6K.cjs");
3
- const require_stream = require("./stream-D_7tMaJe.cjs");
4
- const require_llm = require("./llm-B1semiTO.cjs");
2
+ const require_run_registry = require("./run-registry-CrTsH9iL.cjs");
3
+ const require_stream = require("./stream-CMKRczs4.cjs");
4
+ const require_llm = require("./llm-DAw2eouV.cjs");
5
5
  const require_message_list = require("./message-list-vR3uLAHL.cjs");
6
6
  // src/tool-loop-agent/utils.ts
7
7
  function isToolLoopAgentLike(obj) {
@@ -1,7 +1,7 @@
1
1
  import { m as generateId } from "./dist-TPVqg8oV.js";
2
- import { F as Agent } from "./run-registry-BL_kKvFE.js";
3
- import { ln as isSupportedLanguageModel } from "./stream-1DGoEkG2.js";
4
- import { i as resolveModelConfig } from "./llm-CytL7cpw.js";
2
+ import { F as Agent } from "./run-registry-DJT02z_9.js";
3
+ import { ln as isSupportedLanguageModel } from "./stream-CG9OooRx.js";
4
+ import { i as resolveModelConfig } from "./llm-DFT5EKp4.js";
5
5
  import { N as ToolLoopAgent } from "./message-list-BGm1DCiG.js";
6
6
  // src/tool-loop-agent/utils.ts
7
7
  function isToolLoopAgentLike(obj) {
@@ -1,7 +1,7 @@
1
1
  const require_error = require("./error-D90lJ6M7.cjs");
2
2
  const require_tool = require("./tool-CYlT2UA-.cjs");
3
3
  const require_ee_iTj2bRDt = require("./ee-iTj2bRDt-D3-QLGDF.cjs");
4
- const require_background_tasks = require("./background-tasks-DYtlijQ1.cjs");
4
+ const require_background_tasks = require("./background-tasks-CDgdfRmB.cjs");
5
5
  const require_base = require("./base-BIzR1D3_.cjs");
6
6
  const require_observability = require("./observability-B0R_D1PZ.cjs");
7
7
  const require_utils = require("./utils-D-eNsgDM.cjs");
@@ -1,7 +1,7 @@
1
1
  import { i as MastraError, n as ErrorDomain, o as getErrorFromUnknown, t as ErrorCategory } from "./error-oh2DLsP2.js";
2
2
  import { c as registerToolOutputValidationSchema, d as validateToolOutput, f as validateToolSuspendData, h as markBuilderValidatedInput, i as createStandardSchemaIssuesError, n as Tool, o as getValidationIssuePaths, p as createToolObserve, s as isValidationError, u as validateToolInput } from "./tool-Z3bykc1m.js";
3
3
  import { i as MastraFGAPermissions } from "./ee-iTj2bRDt-By_B9ngH.js";
4
- import { a as isToolBackgroundEligible, i as isModelBackgroundOverrideAllowed, n as backgroundOverrideJsonSchema, r as backgroundOverrideZodSchema } from "./background-tasks-CgzXjBfE.js";
4
+ import { a as isToolBackgroundEligible, i as isModelBackgroundOverrideAllowed, n as backgroundOverrideJsonSchema, r as backgroundOverrideZodSchema } from "./background-tasks-CDP3Pgeu.js";
5
5
  import { t as MastraBase } from "./base-CKLWBhDo.js";
6
6
  import { O as executionFailureTermination, b as wrapMastra, x as createObservabilityContext } from "./observability-D7RNOAPx.js";
7
7
  import { a as getOrCreateSpan, t as executeWithContext } from "./utils-DU_pU5SK.js";
package/dist/utils.cjs CHANGED
@@ -4,7 +4,7 @@ const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
4
4
  const require_zod_utils = require("./zod-utils-Cl5jw5N_.cjs");
5
5
  const require_fetchWithRetry = require("./fetchWithRetry-f5k4p7_1.cjs");
6
6
  const require_dynamic_argument = require("./dynamic-argument-CUc1BBOS.cjs");
7
- const require_utils = require("./utils-B-KOMA_Q.cjs");
7
+ const require_utils = require("./utils-DkvbP8EA.cjs");
8
8
  exports.boundedStringify = require_utils_safe_stringify.boundedStringify;
9
9
  exports.checkEvalStorageFields = require_utils.checkEvalStorageFields;
10
10
  exports.createMastraProxy = require_utils.createMastraProxy;
package/dist/utils.js CHANGED
@@ -3,5 +3,5 @@ import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
3
3
  import { a as isZodObject, i as isZodArray, r as getZodTypeName, t as getZodDef } from "./zod-utils-BDDS_mxU.js";
4
4
  import { t as fetchWithRetry } from "./fetchWithRetry-DFSvpYDT.js";
5
5
  import { n as resolveDynamicArgument, t as getRequestUser } from "./dynamic-argument-BzPK3qPN.js";
6
- import { C as setNestedValue, S as selectFields, _ as parseSqlIdentifier, a as ensureToolProperties, b as removeUndefinedValues, c as isCoreMessage, d as makeCoreTool, f as makeCoreToolV5, g as parseFieldKey, h as omitKeys, i as delay, l as isUiMessage, m as maskStreamTags, n as createMastraProxy, o as generateEmptyFromSchema, p as makeProcessorCoreTool, r as deepMerge, s as getNestedValue, t as checkEvalStorageFields, u as isZodType, v as readPositiveIntEnv, x as resolveSerializedZodOutput, y as rebindProcessorTools } from "./utils-C55ZdVaj.js";
6
+ import { C as setNestedValue, S as selectFields, _ as parseSqlIdentifier, a as ensureToolProperties, b as removeUndefinedValues, c as isCoreMessage, d as makeCoreTool, f as makeCoreToolV5, g as parseFieldKey, h as omitKeys, i as delay, l as isUiMessage, m as maskStreamTags, n as createMastraProxy, o as generateEmptyFromSchema, p as makeProcessorCoreTool, r as deepMerge, s as getNestedValue, t as checkEvalStorageFields, u as isZodType, v as readPositiveIntEnv, x as resolveSerializedZodOutput, y as rebindProcessorTools } from "./utils-Fag7YDBU.js";
7
7
  export { boundedStringify, checkEvalStorageFields, createMastraProxy, deepEqual, deepMerge, delay, ensureSerializable, ensureToolProperties, fetchWithRetry, generateEmptyFromSchema, getNestedValue, getRequestUser, getZodDef, getZodTypeName, isBoundedSerializable, isCoreMessage, isUiMessage, isZodArray, isZodObject, isZodType, makeCoreTool, makeCoreToolV5, makeProcessorCoreTool, maskStreamTags, omitKeys, parseFieldKey, parseSqlIdentifier, readPositiveIntEnv, rebindProcessorTools, removeUndefinedValues, resolveDynamicArgument, resolveSerializedZodOutput, safeStringify, selectFields, setNestedValue };
@@ -1,4 +1,4 @@
1
- const require_stream = require("./stream-D_7tMaJe.cjs");
1
+ const require_stream = require("./stream-CMKRczs4.cjs");
2
2
  let zod = require("zod");
3
3
  let _mastra_schema_compat_schema = require("@mastra/schema-compat/schema");
4
4
  // src/workflows/dynamic/graph.ts
@@ -1,5 +1,5 @@
1
1
  import { standardSchemaToJSONSchema, toStandardSchema } from "./schema/index.js";
2
- import { Et as validateTemplate, St as collectTemplateStepIds } from "./stream-1DGoEkG2.js";
2
+ import { Et as validateTemplate, St as collectTemplateStepIds } from "./stream-CG9OooRx.js";
3
3
  import { z } from "zod";
4
4
  // src/workflows/dynamic/graph.ts
5
5
  /**
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_base = require("../base-BIzR1D3_.cjs");
3
3
  const require_error = require("../error-D90lJ6M7.cjs");
4
- const require_run_registry = require("../run-registry-CibQoN6K.cjs");
4
+ const require_run_registry = require("../run-registry-CrTsH9iL.cjs");
5
5
  const require_message_list = require("../message-list-vR3uLAHL.cjs");
6
6
  const require_dist = require("../dist-P2rjrlmj.cjs");
7
7
  const require_dist$1 = require("../dist-CXeCeeW7.cjs");
@@ -1,6 +1,6 @@
1
1
  import { t as MastraBase } from "../base-CKLWBhDo.js";
2
2
  import { i as MastraError, n as ErrorDomain, t as ErrorCategory } from "../error-oh2DLsP2.js";
3
- import { hn as embed$3, wa as createVectorErrorId } from "../run-registry-BL_kKvFE.js";
3
+ import { Oa as createVectorErrorId, hn as embed$3 } from "../run-registry-DJT02z_9.js";
4
4
  import { P as embed$2 } from "../message-list-BGm1DCiG.js";
5
5
  import { r as embed$1 } from "../dist-TPVqg8oV.js";
6
6
  import { n as embed } from "../dist-D3cKCUe-.js";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_worker = require("../worker-BoybIUTI.cjs");
2
+ const require_worker = require("../worker-BwJyrFQN.cjs");
3
3
  exports.BackgroundTaskWorker = require_worker.BackgroundTaskWorker;
4
4
  exports.HttpRemoteStrategy = require_worker.HttpRemoteStrategy;
5
5
  exports.InProcessStrategy = require_worker.InProcessStrategy;
@@ -1 +1 @@
1
- export { n as BackgroundTaskWorker, s as HttpRemoteStrategy, t as InProcessStrategy, l as MastraWorker, a as OrchestrationWorker, o as PullTransport, r as SchedulerWorker, c as StepExecutionError } from "../worker-BG1rw_dg.js";
1
+ export { n as BackgroundTaskWorker, s as HttpRemoteStrategy, t as InProcessStrategy, l as MastraWorker, a as OrchestrationWorker, o as PullTransport, r as SchedulerWorker, c as StepExecutionError } from "../worker-D-em3hyS.js";
@@ -1,6 +1,6 @@
1
- const require_run_registry = require("./run-registry-CibQoN6K.cjs");
1
+ const require_run_registry = require("./run-registry-CrTsH9iL.cjs");
2
2
  const require_request_context = require("./request-context-D9RXYCy8.cjs");
3
- const require_worker = require("./worker-BoybIUTI.cjs");
3
+ const require_worker = require("./worker-BwJyrFQN.cjs");
4
4
  const require_schedules = require("./schedules-BZS8McF7.cjs");
5
5
  // src/schedules/worker.ts
6
6
  /** PubSub topic on which the scheduler publishes `agent-schedule.fire` events. */
@@ -1,6 +1,6 @@
1
- const require_run_registry = require("./run-registry-CibQoN6K.cjs");
1
+ const require_run_registry = require("./run-registry-CrTsH9iL.cjs");
2
2
  const require_scheduler = require("./scheduler-D00X03jQ.cjs");
3
- const require_background_tasks = require("./background-tasks-DYtlijQ1.cjs");
3
+ const require_background_tasks = require("./background-tasks-CDgdfRmB.cjs");
4
4
  const require_request_context = require("./request-context-D9RXYCy8.cjs");
5
5
  // src/worker/worker.ts
6
6
  /**