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