@mastra/core 1.87.0-alpha.1 → 1.87.0-alpha.4
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/@ai-sdk_openai@4.0.106/dist/index.d.ts +2034 -0
- package/dist/_types/@ai-sdk_openai@4.0.106/package.json +1 -0
- package/dist/a2a/index.cjs +1 -1
- package/dist/a2a/index.js +1 -1
- package/dist/agent/durable/index.cjs +1 -1
- package/dist/agent/durable/index.js +1 -1
- package/dist/agent/durable/run-message-refs.d.ts +3 -2
- package/dist/agent/index.cjs +4 -4
- package/dist/agent/index.js +4 -4
- package/dist/agent/message-list/adapters/AIV5Adapter.d.ts +15 -1
- package/dist/agent/message-list/index.cjs +2 -2
- package/dist/agent/message-list/index.js +2 -2
- package/dist/agent/message-list/state/types.d.ts +5 -1
- package/dist/agent/message-list/types.d.ts +1 -1
- package/dist/agent/message-list/utils/provider-compat.d.ts +9 -1
- package/dist/agent-builder/ee/index.cjs +1 -1
- package/dist/agent-builder/ee/index.js +1 -1
- package/dist/agent-controller/index.cjs +2 -2
- package/dist/agent-controller/index.js +2 -2
- package/dist/{agent-controller-BTIxiD1u.cjs → agent-controller-CqcyudV6.cjs} +8 -8
- package/dist/{agent-controller-C1bK0CXm.js → agent-controller-VBMIPr6h.js} +8 -8
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-BbVsBghi.js → background-tasks-1tyymY2H.js} +1 -1
- package/dist/{background-tasks-CVl6e0Jo.cjs → background-tasks-FOaQ1LsS.cjs} +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.js +2 -2
- package/dist/{builder-C8XzrtBQ.js → builder-CUbE9d87.js} +2 -2
- package/dist/{builder-BRJPSTig.cjs → builder-MLhVrFJw.cjs} +2 -2
- package/dist/capabilities/302ai.json +203 -203
- package/dist/capabilities/abliteratedllm.json +33 -33
- package/dist/capabilities/abliteration-ai.json +9 -9
- package/dist/capabilities/above.json +18 -18
- package/dist/capabilities/adaption.json +16 -16
- package/dist/capabilities/adzuki.json +20 -20
- package/dist/capabilities/agentrouter.json +11 -11
- package/dist/capabilities/agnes.json +3 -3
- package/dist/capabilities/ai-router.json +5 -5
- package/dist/capabilities/aiand.json +17 -17
- package/dist/capabilities/aigrow.json +11 -11
- package/dist/capabilities/aimlapi.json +153 -156
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +14 -14
- package/dist/capabilities/aki-io.json +15 -15
- package/dist/capabilities/alibaba-cn.json +98 -98
- package/dist/capabilities/alibaba-coding-plan-cn.json +5 -5
- package/dist/capabilities/alibaba-coding-plan.json +5 -5
- package/dist/capabilities/alibaba-token-plan-cn.json +55 -55
- package/dist/capabilities/alibaba-token-plan.json +54 -54
- package/dist/capabilities/alibaba.json +67 -67
- package/dist/capabilities/ambient.json +19 -12
- package/dist/capabilities/amd.json +6 -6
- package/dist/capabilities/anthropic.json +47 -47
- package/dist/capabilities/anyapi.json +15 -15
- package/dist/capabilities/apiko.json +5 -5
- package/dist/capabilities/arcee.json +7 -7
- package/dist/capabilities/augure.json +6 -6
- package/dist/capabilities/auriko.json +19 -19
- package/dist/capabilities/bailing.json +5 -5
- package/dist/capabilities/baseten.json +25 -25
- package/dist/capabilities/bee.json +4 -4
- package/dist/capabilities/bothub.json +11 -11
- package/dist/capabilities/boundless.json +39 -39
- package/dist/capabilities/bumo.json +40 -40
- package/dist/capabilities/byteplus.json +29 -29
- package/dist/capabilities/cheapaimodel.json +10 -10
- package/dist/capabilities/cheapest-token.json +28 -28
- package/dist/capabilities/chutes.json +7 -7
- package/dist/capabilities/clarifai.json +2 -2
- package/dist/capabilities/cline-pass.json +39 -39
- package/dist/capabilities/cloudcode.json +10 -10
- package/dist/capabilities/cloudflare-workers-ai.json +13 -13
- package/dist/capabilities/commandcode.json +143 -143
- package/dist/capabilities/concentrate.json +279 -276
- package/dist/capabilities/cortecs.json +105 -105
- package/dist/capabilities/crossmodel.json +191 -191
- package/dist/capabilities/crusoe.json +10 -10
- package/dist/capabilities/daoxe.json +9 -9
- package/dist/capabilities/databricks.json +124 -124
- package/dist/capabilities/deepinfra.json +93 -84
- package/dist/capabilities/deepseek.json +3 -3
- package/dist/capabilities/digitalocean.json +114 -114
- package/dist/capabilities/dothoosh.json +30 -30
- package/dist/capabilities/doubleword.json +22 -22
- package/dist/capabilities/edenai.json +279 -288
- package/dist/capabilities/empiriolabs.json +166 -166
- package/dist/capabilities/engy.json +22 -22
- package/dist/capabilities/evroc.json +11 -11
- package/dist/capabilities/ezkielyna.json +10 -10
- package/dist/capabilities/fastrouter.json +85 -85
- package/dist/capabilities/fireworks-ai.json +130 -69
- package/dist/capabilities/freemodel.json +18 -18
- package/dist/capabilities/frogbot.json +93 -93
- package/dist/capabilities/gisoo.json +20 -20
- package/dist/capabilities/gmicloud.json +17 -17
- package/dist/capabilities/google.json +54 -54
- package/dist/capabilities/graphn.json +15 -15
- package/dist/capabilities/greenpt.json +36 -36
- package/dist/capabilities/groq.json +6 -6
- package/dist/capabilities/helicone.json +83 -83
- package/dist/capabilities/hostinger-router.json +8 -8
- package/dist/capabilities/hpc-ai.json +8 -8
- package/dist/capabilities/huawei-maas.json +12 -12
- package/dist/capabilities/hubris.json +33 -33
- package/dist/capabilities/huggingface.json +118 -78
- package/dist/capabilities/hyper.json +25 -33
- package/dist/capabilities/impossibl.json +162 -162
- package/dist/capabilities/inception.json +2 -2
- package/dist/capabilities/inceptron.json +4 -4
- package/dist/capabilities/inco.json +4 -4
- package/dist/capabilities/infer.json +15 -15
- package/dist/capabilities/inferall.json +7 -7
- package/dist/capabilities/inference-coop.json +15 -15
- package/dist/capabilities/inferenceapis.json +14 -14
- package/dist/capabilities/inferris.json +4 -4
- package/dist/capabilities/infersia.json +13 -13
- package/dist/capabilities/inferx.json +2 -2
- package/dist/capabilities/infomaniak.json +4 -4
- package/dist/capabilities/io-net.json +2 -2
- package/dist/capabilities/iteracompute.json +53 -53
- package/dist/capabilities/jad-ai.json +3 -3
- package/dist/capabilities/jalapeno.json +12 -12
- package/dist/capabilities/jiekou.json +61 -61
- package/dist/capabilities/jzstoken.json +45 -45
- package/dist/capabilities/keln.json +16 -16
- package/dist/capabilities/kenari.json +123 -131
- package/dist/capabilities/kilo.json +615 -612
- package/dist/capabilities/kimi-code-plan-cn.json +5 -5
- package/dist/capabilities/kimi-code-plan-global.json +5 -5
- package/dist/capabilities/kitani.json +2 -2
- package/dist/capabilities/klavo.json +19 -19
- package/dist/capabilities/korouter.json +36 -36
- package/dist/capabilities/kunavo.json +6 -6
- package/dist/capabilities/liquid.json +11 -11
- package/dist/capabilities/lithosai.json +2 -2
- package/dist/capabilities/llmgateway-providers.json +957 -909
- package/dist/capabilities/llmgateway.json +335 -335
- package/dist/capabilities/llmtr.json +25 -25
- package/dist/capabilities/lowrouter.json +58 -58
- package/dist/capabilities/lyceum.json +4 -4
- package/dist/capabilities/melious.json +10 -10
- package/dist/capabilities/merge-gateway.json +289 -289
- package/dist/capabilities/meta.json +7 -7
- package/dist/capabilities/minimax-cn-coding-plan.json +5 -5
- package/dist/capabilities/minimax-cn.json +5 -5
- package/dist/capabilities/minimax-coding-plan.json +5 -5
- package/dist/capabilities/minimax.json +5 -5
- package/dist/capabilities/mistral.json +19 -19
- package/dist/capabilities/mixlayer.json +5 -5
- package/dist/capabilities/modal.json +11 -11
- package/dist/capabilities/model-oracle-ai.json +23 -23
- package/dist/capabilities/modelis.json +18 -18
- package/dist/capabilities/modular.json +7 -7
- package/dist/capabilities/moneo.json +12 -12
- package/dist/capabilities/morph.json +15 -15
- package/dist/capabilities/munito-eu.json +4 -4
- package/dist/capabilities/munito.json +4 -4
- package/dist/capabilities/nan.json +23 -23
- package/dist/capabilities/nano-gpt.json +592 -576
- package/dist/capabilities/nearai.json +97 -97
- package/dist/capabilities/nebius.json +24 -24
- package/dist/capabilities/neon.json +132 -132
- package/dist/capabilities/neuralwatt.json +41 -41
- package/dist/capabilities/nokeep.json +4 -4
- package/dist/capabilities/novita-ai.json +115 -115
- package/dist/capabilities/nvidia.json +31 -31
- package/dist/capabilities/obscurify.json +31 -31
- package/dist/capabilities/oci.json +6 -6
- package/dist/capabilities/ofox.json +356 -356
- package/dist/capabilities/ollama-cloud.json +57 -57
- package/dist/capabilities/openai.json +57 -57
- package/dist/capabilities/opencode-go.json +86 -86
- package/dist/capabilities/openreason.json +4 -4
- package/dist/capabilities/openrouter.json +537 -526
- package/dist/capabilities/opper.json +26 -26
- package/dist/capabilities/orcarouter.json +223 -223
- package/dist/capabilities/outerlabs.json +25 -25
- package/dist/capabilities/ovhcloud.json +21 -21
- package/dist/capabilities/pareto.json +5 -5
- package/dist/capabilities/perplexity-agent.json +65 -65
- package/dist/capabilities/phala.json +30 -30
- package/dist/capabilities/pioneer.json +32 -32
- package/dist/capabilities/poe.json +129 -129
- package/dist/capabilities/powerspring.json +14 -14
- package/dist/capabilities/primalabs.json +9 -9
- package/dist/capabilities/prime.json +125 -124
- package/dist/capabilities/privatemode-ai.json +11 -11
- package/dist/capabilities/proxystacks.json +6 -6
- package/dist/capabilities/qiniu-ai.json +14 -14
- package/dist/capabilities/refuseless.json +5 -5
- package/dist/capabilities/regolo-ai.json +10 -10
- package/dist/capabilities/requesty.json +169 -192
- package/dist/capabilities/ruapi.json +19 -19
- package/dist/capabilities/runcrate.json +5 -5
- package/dist/capabilities/runinfra.json +9 -9
- package/dist/capabilities/sakana.json +7 -7
- package/dist/capabilities/sambanova.json +9 -9
- package/dist/capabilities/sandbase.json +25 -25
- package/dist/capabilities/sarvam.json +9 -9
- package/dist/capabilities/scaleway.json +19 -19
- package/dist/capabilities/scnet-token-plan.json +10 -10
- package/dist/capabilities/scx-ai.json +29 -29
- package/dist/capabilities/sensenova.json +15 -15
- package/dist/capabilities/siliconflow-cn.json +45 -45
- package/dist/capabilities/siliconflow.json +45 -45
- package/dist/capabilities/snowflake-cortex.json +18 -18
- package/dist/capabilities/sokkan.json +7 -7
- package/dist/capabilities/sparrowcodes.json +23 -23
- package/dist/capabilities/standardcompute.json +94 -94
- package/dist/capabilities/steadyrouter.json +42 -42
- package/dist/capabilities/stepfun-ai-step-plan.json +4 -4
- package/dist/capabilities/stepfun-ai.json +4 -4
- package/dist/capabilities/stepfun-step-plan.json +4 -4
- package/dist/capabilities/stepfun.json +4 -4
- package/dist/capabilities/stepping-stone.json +18 -18
- package/dist/capabilities/synthetic.json +11 -11
- package/dist/capabilities/synthorai.json +27 -27
- package/dist/capabilities/teamorouter.json +19 -19
- package/dist/capabilities/teapot-router.json +10 -10
- package/dist/capabilities/tencent-token-plan.json +37 -37
- package/dist/capabilities/tencent-tokenhub.json +52 -37
- package/dist/capabilities/tensorx.json +38 -38
- package/dist/capabilities/tenstorrent.json +4 -4
- package/dist/capabilities/the-grid-ai.json +29 -29
- package/dist/capabilities/thinkingmachines.json +77 -77
- package/dist/capabilities/tinfoil.json +10 -10
- package/dist/capabilities/toapis.json +3 -3
- package/dist/capabilities/togetherai.json +47 -47
- package/dist/capabilities/tokengo.json +20 -20
- package/dist/capabilities/tokenify.json +3 -3
- package/dist/capabilities/trustedrouter.json +7 -7
- package/dist/capabilities/trustedtokens.json +15 -15
- package/dist/capabilities/umans-ai-coding-plan.json +11 -11
- package/dist/capabilities/umans-ai.json +10 -10
- package/dist/capabilities/uncensuredai.json +5 -5
- package/dist/capabilities/unrestricted.json +6 -6
- package/dist/capabilities/uplinkswitch.json +20 -20
- package/dist/capabilities/upstage.json +8 -8
- package/dist/capabilities/vancine.json +23 -23
- package/dist/capabilities/vercel.json +581 -581
- package/dist/capabilities/vivgrid.json +80 -80
- package/dist/capabilities/volcengine-coding-plan.json +26 -26
- package/dist/capabilities/volcengine.json +24 -24
- package/dist/capabilities/vultr.json +34 -34
- package/dist/capabilities/wafer.ai.json +16 -16
- package/dist/capabilities/wally.json +11 -11
- package/dist/capabilities/wandb.json +20 -20
- package/dist/capabilities/watt.json +19 -19
- package/dist/capabilities/xai.json +6 -6
- package/dist/capabilities/xiaomi.json +3 -3
- package/dist/capabilities/xpersona.json +11 -11
- package/dist/capabilities/xxapi.json +26 -26
- package/dist/capabilities/zai-coding-plan.json +18 -18
- package/dist/capabilities/zai.json +33 -33
- package/dist/capabilities/zenifra.json +33 -33
- package/dist/capabilities/zenmux.json +186 -186
- package/dist/capabilities/zerogpu.json +11 -11
- package/dist/capabilities/zhipuai-coding-plan.json +8 -8
- package/dist/capabilities/zhipuai.json +32 -32
- package/dist/capabilities/zro.json +6 -6
- package/dist/channels/agent-channels.d.ts +22 -0
- package/dist/channels/index.cjs +2 -2
- package/dist/channels/index.js +2 -2
- package/dist/channels/output-processor.d.ts +12 -0
- package/dist/channels/state-adapter.d.ts +3 -1
- package/dist/channels/stream-helpers.d.ts +17 -0
- package/dist/{channels-Cl-pRrWB.cjs → channels-CZ0iY2yh.cjs} +1 -1
- package/dist/{channels-DegTNzaq.js → channels-hBppCRhl.js} +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 +2 -1
- package/dist/docs/assets/SOURCE_MAP.json +797 -797
- package/dist/docs/references/docs-agents-networks.md +1 -1
- package/dist/docs/references/docs-agents-tools.md +6 -0
- package/dist/docs/references/docs-auth-simple-auth.md +8 -8
- package/dist/docs/references/docs-evals-custom-scorers.md +1 -1
- package/dist/docs/references/docs-mastra-platform-observability-overview.md +3 -189
- package/dist/docs/references/docs-memory-message-history.md +25 -0
- package/dist/docs/references/docs-sandbox-lsp.md +5 -6
- package/dist/docs/references/docs-sandbox-overview.md +20 -0
- package/dist/docs/references/docs-sandbox-skills.md +2 -0
- package/dist/docs/references/docs-signals-sending-signals.md +1 -1
- package/dist/docs/references/reference-agent-controller-session.md +1 -1
- package/dist/docs/references/reference-agents-generate.md +1 -1
- package/dist/docs/references/reference-agents-network.md +1 -1
- package/dist/docs/references/reference-configuration.md +8 -8
- package/dist/docs/references/reference-core-getWorkspaceById.md +37 -0
- package/dist/docs/references/reference-evals-create-scorer.md +5 -5
- package/dist/docs/references/reference-evals-run-evals.md +1 -1
- package/dist/docs/references/reference-manual-install.md +1 -1
- package/dist/docs/references/reference-memory-observational-memory.md +8 -0
- package/dist/docs/references/reference-observability-tracing-interfaces.md +10 -6
- package/dist/docs/references/reference-processors-processor-interface.md +3 -2
- package/dist/docs/references/reference-processors-system-prompt-scrubber.md +1 -1
- package/dist/docs/references/reference-pubsub-base.md +5 -3
- package/dist/docs/references/reference-pubsub-caching-pubsub.md +3 -1
- package/dist/docs/references/reference-storage-overview.md +1 -1
- package/dist/docs/references/reference-storage-retention.md +20 -20
- package/dist/docs/references/reference-tools-vector-query-tool.md +8 -0
- package/dist/docs/references/reference-voice-overview.md +11 -26
- package/dist/docs/references/reference-voice-speech-to-speech.md +1 -1
- package/dist/docs/references/reference-voice-voice.listen.md +1 -0
- package/dist/docs/references/reference-voice-voice.speak.md +1 -3
- package/dist/docs/references/reference-workspace-factory-sandbox.md +6 -6
- package/dist/docs/references/reference-workspace-sandbox.md +14 -0
- package/dist/docs/references/reference.md +1 -0
- 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/harness/index.cjs +2 -2
- package/dist/harness/index.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/knowledge/importers/host.d.ts +7 -1
- package/dist/knowledge/importers/runner.d.ts +12 -0
- package/dist/knowledge/importers/types.d.ts +2 -0
- package/dist/knowledge/index.cjs +82 -6
- package/dist/knowledge/index.js +82 -6
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/base.types.d.ts +3 -1
- package/dist/llm/model/mastra-gateway-provider-tools.d.ts +9 -6
- package/dist/llm/model/model.d.ts +1 -1
- package/dist/llm/model/model.loop.d.ts +1 -1
- package/dist/llm/model/model.loop.types.d.ts +3 -1
- package/dist/llm/model/provider-options.d.ts +4 -3
- package/dist/llm/model/provider-types.generated.d.ts +7581 -7556
- package/dist/{llm-CMkzIFAk.js → llm-CsQOELh9.js} +38 -78
- package/dist/{llm-BKxlS9Kk.cjs → llm-D6N-WJwo.cjs} +38 -78
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/{manager-CasaT35Q.cjs → manager-CtsjlKP7.cjs} +2 -2
- package/dist/{manager-C-eQXmRq.js → manager-DBVDNjO2.js} +2 -2
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-C7Tj4U8c.cjs → mastra-B60fJsMe.cjs} +16 -16
- package/dist/{mastra-5EEmN3Ok.js → mastra-Bkpe1lBu.js} +16 -16
- package/dist/memory/index.cjs +3 -3
- package/dist/memory/index.js +3 -3
- package/dist/{message-list-wI71UGxk.js → message-list-BGm1DCiG.js} +230 -129
- package/dist/{message-list-DfN9mWeN.cjs → message-list-vR3uLAHL.cjs} +230 -129
- package/dist/{model-9HA-W0tg.cjs → model-CAbL0zRc.cjs} +4 -3
- package/dist/{model-DCLUL-8a.js → model-Da_pawSI.js} +4 -3
- package/dist/{netlify-DaWURNSU.js → netlify-CW26UJrG.js} +41361 -30464
- package/dist/{netlify-Cq3H-A9I.cjs → netlify-hasf5dLA.cjs} +41364 -30461
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/observability/types/tracing.d.ts +1 -1
- package/dist/processor-provider/index.cjs +1 -1
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +2 -2
- package/dist/processors/index.js +2 -2
- package/dist/{provider-registry-a649fS5r.cjs → provider-registry-CeV5wjlF.cjs} +21019 -20909
- package/dist/{provider-registry-DWixjFX7.js → provider-registry-DnVkqIBw.js} +21020 -20910
- package/dist/provider-registry.json +21425 -21369
- package/dist/{registry-generator-BYJC7p8M.js → registry-generator-DSR56u5H.js} +1 -1
- package/dist/{registry-generator-BuKC7UKd.cjs → registry-generator-G4PZCqrS.cjs} +1 -1
- package/dist/{rehydrate-DR2_WAz2.cjs → rehydrate-BLJ-q_V6.cjs} +2 -2
- package/dist/{rehydrate-DPhmASM6.js → rehydrate-zXo3Wo60.js} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/{run-registry-D3X7XvUL.js → run-registry-Cl2QbXgN.js} +189 -62
- package/dist/{run-registry-oUNF6szW.cjs → run-registry-oixTpWpa.cjs} +190 -63
- package/dist/storage/index.cjs +2 -2
- package/dist/storage/index.js +2 -2
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-DoZ6F41o.js → stream-DUUfwH38.js} +3 -3
- package/dist/{stream-DQC1vpvl.cjs → stream-DaZh0apo.cjs} +3 -3
- package/dist/test-utils/llm-mock.cjs +1 -1
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/{to-prompt-B9eZo2U5.cjs → to-prompt-CG-LyaBY.cjs} +9 -0
- package/dist/{to-prompt-BsDtVXrf.js → to-prompt-CMlVGYxC.js} +9 -0
- package/dist/tool-loop-agent/index.cjs +1 -1
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/{tool-loop-agent-C9YkvDRd.js → tool-loop-agent-C4NvGYnM.js} +4 -4
- package/dist/{tool-loop-agent-Cy4NDOMS.cjs → tool-loop-agent-DDowWQyO.cjs} +4 -4
- package/dist/tools/index.cjs +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/{tools-CDfyMpzN.js → tools-DDfA_ES4.js} +113 -31
- package/dist/{tools-CGF5Ik6j.cjs → tools-n9lqzDNe.cjs} +113 -31
- package/dist/{utils-9JyiKu5r.js → utils-CVN-336o.js} +1 -1
- package/dist/{utils-Bs2IYyOb.cjs → utils-CmNJO2xP.cjs} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-8j0phWFV.js → validate-CgNNzqgp.js} +1 -1
- package/dist/{validate-BE3mVxVy.cjs → validate-LpK3-p_O.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-DwdgU6E9.cjs → worker-6qR81hZZ.cjs} +2 -2
- package/dist/{worker-BiK1kfMa.cjs → worker-BN2odJzu.cjs} +2 -2
- package/dist/{worker-DIRdEwih.js → worker-BdPUoHXa.js} +2 -2
- package/dist/{worker-BfWFqSH2.js → worker-ChoZX7rg.js} +2 -2
- package/dist/{workflow-ni-keg2i.js → workflow-D2MsV-JA.js} +3 -3
- package/dist/{workflow-CxQMcTbT.cjs → workflow-ww-N09bR.cjs} +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/workflows/step.d.ts +2 -0
- package/dist/workflows/workflow.d.ts +2 -0
- package/dist/workspace/index.cjs +3 -1
- package/dist/workspace/index.d.ts +1 -1
- package/dist/workspace/index.js +2 -2
- package/dist/workspace/lsp/manager.d.ts +19 -4
- package/dist/workspace/sandbox/mastra-sandbox.d.ts +17 -0
- package/dist/workspace/tools/index.d.ts +1 -0
- package/dist/workspace/tools/media.d.ts +20 -1
- package/dist/workspace/tools/recreate-sandbox.d.ts +24 -0
- package/dist/{workspace-DY2Nxiyi.js → workspace-BK9ltbSa.js} +270 -105
- package/dist/{workspace-X2RHJZU9.cjs → workspace-Pv3J8K0c.cjs} +281 -104
- package/package.json +7 -7
- package/src/llm/model/provider-types.generated.d.ts +7581 -7556
package/dist/knowledge/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as MastraBase } from "../base-CKLWBhDo.js";
|
|
2
|
-
import { $t as knowledgeDeliveredPins, Ai as MAX_KNOWLEDGE_PAGE_BODY_LINKS, Bi as knowledgeLinkRefKey, Ci as parseKnowledgeWikilinks, Cn as knowledgeRunScopes, Di as KnowledgePageKeyConflictError, Dn as encodeKnowledgeScopeId, Ei as KnowledgePageHasChildrenError, En as decodeKnowledgeScopeId, Fi as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Gi as parseKnowledgePageRef, Hi as knowledgePinDepth, Ii as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Ki as KnowledgeInvalidCursorError, Li as assertKnowledgeNoteTextWithinBound, Mi as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, Ni as MAX_KNOWLEDGE_PAGE_LINKS, Oi as MAX_KNOWLEDGE_MOVE_PAGES, On as buildKnowledgeInstructions, Pi as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, Qt as PINNED_READ_MEMO_KEY, Ri as assertKnowledgePageDescriptionWithinBound, Si as inspectKnowledgeSchema, Sn as knowledgeMemoryScopes, Ti as KnowledgePageDepthError, Tn as strongerKnowledgeRole, Ui as knowledgePositionBetween, Uo as augmentWithInit, Vi as knowledgePagePath, Wi as knowledgeScopeReadable, Wo as getStorageSource, _i as KnowledgeStorage, _n as knowledgeAccessGrants, _r as knowledgeScopeKey, an as removeKnowledgeNote, bi as assertKnowledgeSchemaCompatible, bn as KnowledgeDeclarationError, br as knowledgeVisibleScopeKeys, ci as InMemoryKnowledgeStorage, cn as upsertKnowledgePage, cr as MAX_KNOWLEDGE_SCOPE_TAGS, di as KnowledgeImportersStorage, dn as KnowledgeLinkRefreshIncompleteError, dr as assertKnowledgeRecordTextWithinBound, en as buildKnowledgePageTools, fi as KNOWLEDGE_STORAGE_CONTRACT_VERSION, fn as knowledgeSubtree, fr as assertKnowledgeScopeWithinCeiling, gi as KnowledgeSchemaResetRequiredError, gn as updateKnowledgeLinks, gr as isKnowledgeScopeVisible, hi as KnowledgeNotFoundError, hn as syncKnowledgePageBodyLinks, hr as expandKnowledgeScope, in as moveKnowledgePage, ji as MAX_KNOWLEDGE_PAGE_DEPTH, ki as MAX_KNOWLEDGE_NOTE_TOKENS, li as KnowledgeImporterBindingConflictError, ln as KnowledgeSemanticIndex, lr as assertKnowledgeCeilingRaised, mi as KnowledgeConflictError, mn as reindexKnowledgeLinks, mr as createKnowledgeNodeCursor, nn as knowledgeRunPrincipals, on as removeKnowledgePage, or as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, pi as KNOWLEDGE_STORAGE_SCHEMA_VERSION, pn as refreshKnowledgeLinksTo, pr as canonicalizeKnowledgeScope, rn as addKnowledgeNote, sn as updateKnowledgeNote, sr as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, tn as KnowledgeRun, ui as KnowledgeImporterRunStateError, ur as assertKnowledgeDescriptionWithinBound, vi as KnowledgeTransactionDeadlineError, vn as knowledgeReadScopeFor, vr as knowledgeSemanticDocumentId, wi as KnowledgeMoveTooLargeError, wn as knowledgeScopeAddress, xi as createKnowledgeUlid, xn as compileKnowledgeScopes, xr as parseKnowledgeNodeCursor, yi as KnowledgeUnsupportedCapabilityError, yn as knowledgeRoleOn, yr as knowledgeSemanticIdempotencyKey, zi as canonicalKnowledgeName } from "../run-registry-
|
|
2
|
+
import { $t as knowledgeDeliveredPins, Ai as MAX_KNOWLEDGE_PAGE_BODY_LINKS, Bi as knowledgeLinkRefKey, Ci as parseKnowledgeWikilinks, Cn as knowledgeRunScopes, Di as KnowledgePageKeyConflictError, Dn as encodeKnowledgeScopeId, Ei as KnowledgePageHasChildrenError, En as decodeKnowledgeScopeId, Fi as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Gi as parseKnowledgePageRef, Hi as knowledgePinDepth, Ii as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Ki as KnowledgeInvalidCursorError, Li as assertKnowledgeNoteTextWithinBound, Mi as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, Ni as MAX_KNOWLEDGE_PAGE_LINKS, Oi as MAX_KNOWLEDGE_MOVE_PAGES, On as buildKnowledgeInstructions, Pi as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, Qt as PINNED_READ_MEMO_KEY, Ri as assertKnowledgePageDescriptionWithinBound, Si as inspectKnowledgeSchema, Sn as knowledgeMemoryScopes, Ti as KnowledgePageDepthError, Tn as strongerKnowledgeRole, Ui as knowledgePositionBetween, Uo as augmentWithInit, Vi as knowledgePagePath, Wi as knowledgeScopeReadable, Wo as getStorageSource, _i as KnowledgeStorage, _n as knowledgeAccessGrants, _r as knowledgeScopeKey, an as removeKnowledgeNote, bi as assertKnowledgeSchemaCompatible, bn as KnowledgeDeclarationError, br as knowledgeVisibleScopeKeys, ci as InMemoryKnowledgeStorage, cn as upsertKnowledgePage, cr as MAX_KNOWLEDGE_SCOPE_TAGS, di as KnowledgeImportersStorage, dn as KnowledgeLinkRefreshIncompleteError, dr as assertKnowledgeRecordTextWithinBound, en as buildKnowledgePageTools, fi as KNOWLEDGE_STORAGE_CONTRACT_VERSION, fn as knowledgeSubtree, fr as assertKnowledgeScopeWithinCeiling, gi as KnowledgeSchemaResetRequiredError, gn as updateKnowledgeLinks, gr as isKnowledgeScopeVisible, hi as KnowledgeNotFoundError, hn as syncKnowledgePageBodyLinks, hr as expandKnowledgeScope, in as moveKnowledgePage, ji as MAX_KNOWLEDGE_PAGE_DEPTH, ki as MAX_KNOWLEDGE_NOTE_TOKENS, li as KnowledgeImporterBindingConflictError, ln as KnowledgeSemanticIndex, lr as assertKnowledgeCeilingRaised, mi as KnowledgeConflictError, mn as reindexKnowledgeLinks, mr as createKnowledgeNodeCursor, nn as knowledgeRunPrincipals, on as removeKnowledgePage, or as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, pi as KNOWLEDGE_STORAGE_SCHEMA_VERSION, pn as refreshKnowledgeLinksTo, pr as canonicalizeKnowledgeScope, rn as addKnowledgeNote, sn as updateKnowledgeNote, sr as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, tn as KnowledgeRun, ui as KnowledgeImporterRunStateError, ur as assertKnowledgeDescriptionWithinBound, vi as KnowledgeTransactionDeadlineError, vn as knowledgeReadScopeFor, vr as knowledgeSemanticDocumentId, wi as KnowledgeMoveTooLargeError, wn as knowledgeScopeAddress, xi as createKnowledgeUlid, xn as compileKnowledgeScopes, xr as parseKnowledgeNodeCursor, yi as KnowledgeUnsupportedCapabilityError, yn as knowledgeRoleOn, yr as knowledgeSemanticIdempotencyKey, zi as canonicalKnowledgeName } from "../run-registry-Cl2QbXgN.js";
|
|
3
3
|
import { standardSchemaToJSONSchema, toStandardSchema } from "../schema/index.js";
|
|
4
4
|
import { i as createStandardSchemaIssuesError } from "../tool-Z3bykc1m.js";
|
|
5
5
|
import { randomUUID } from "crypto";
|
|
@@ -173,6 +173,7 @@ const KNOWLEDGE_IMPORTER_ERROR_CODES = [
|
|
|
173
173
|
"credential_missing",
|
|
174
174
|
"importer_missing_from_deploy",
|
|
175
175
|
"importer_error",
|
|
176
|
+
"flush_too_large",
|
|
176
177
|
"stopped",
|
|
177
178
|
"lease_expired",
|
|
178
179
|
"deadline_exceeded"
|
|
@@ -670,17 +671,22 @@ function sourceError(error) {
|
|
|
670
671
|
* @experimental
|
|
671
672
|
*/
|
|
672
673
|
async function runKnowledgeImport(options) {
|
|
673
|
-
const { host, budgetMs = 15e5, graceMs = 18e4, maxPasses = 200, bufferSize = 200, flushAfterMs = 3e4, heartbeatMs = 3e4, maxRetries = 8, hostCallTimeoutMs = 6e4, retryDelayMs = (attempt) => Math.min(250 * 2 ** attempt, 1e4) } = options;
|
|
674
|
+
const { host, budgetMs = 15e5, graceMs = 18e4, maxPasses = 200, bufferSize = 200, maxFlushBytes: ownMaxFlushBytes = Infinity, flushAfterMs = 3e4, heartbeatMs = 3e4, maxRetries = 8, hostCallTimeoutMs = 6e4, retryDelayMs = (attempt) => Math.min(250 * 2 ** attempt, 1e4) } = options;
|
|
674
675
|
if (!Number.isFinite(flushAfterMs) || flushAfterMs <= 0 || flushAfterMs > 2 ** 31 - 1) throw new TypeError(`flushAfterMs must be a positive number of milliseconds up to 2147483647, got ${flushAfterMs}`);
|
|
676
|
+
if (ownMaxFlushBytes !== Infinity && !(Number.isInteger(ownMaxFlushBytes) && ownMaxFlushBytes > 0)) throw new TypeError(`maxFlushBytes must be a positive whole number of bytes, got ${ownMaxFlushBytes}`);
|
|
675
677
|
const started = await within(host.startRun(options.bindingId, options.start), hostCallTimeoutMs, () => new KnowledgeImporterHostError("host call timed out"));
|
|
676
678
|
if (started.status === "skipped") return started;
|
|
677
679
|
const { runId, generation } = started;
|
|
680
|
+
const hostMaxFlushBytes = started.maxFlushBytes;
|
|
681
|
+
const maxFlushBytes = typeof hostMaxFlushBytes === "number" && Number.isInteger(hostMaxFlushBytes) && hostMaxFlushBytes > 0 ? Math.min(ownMaxFlushBytes, hostMaxFlushBytes) : ownMaxFlushBytes;
|
|
678
682
|
const startedAt = Date.now();
|
|
679
683
|
let lastSeq = started.lastSeq;
|
|
680
684
|
/** A flush sent but never acknowledged: it may have committed. */
|
|
681
685
|
let unsettledSeq;
|
|
682
686
|
let state = { ...started.state };
|
|
683
687
|
let buffer = [];
|
|
688
|
+
/** Encoded bytes of the ops in `buffer`, without the commas between them. */
|
|
689
|
+
let bufferBytes = 0;
|
|
684
690
|
let stop;
|
|
685
691
|
/** Armed while the buffer holds ops; sends them once the oldest has waited `flushAfterMs`. */
|
|
686
692
|
let flushTimer;
|
|
@@ -731,6 +737,7 @@ async function runKnowledgeImport(options) {
|
|
|
731
737
|
disarm();
|
|
732
738
|
const ops = buffer;
|
|
733
739
|
buffer = [];
|
|
740
|
+
bufferBytes = 0;
|
|
734
741
|
const next = flushing.then(async () => {
|
|
735
742
|
if (stop) throw stop;
|
|
736
743
|
if (ops.length === 0 && !staged && !settle) return;
|
|
@@ -755,6 +762,11 @@ async function runKnowledgeImport(options) {
|
|
|
755
762
|
digest,
|
|
756
763
|
...body
|
|
757
764
|
};
|
|
765
|
+
if (maxFlushBytes !== Infinity && encodedBytes(request) > maxFlushBytes) {
|
|
766
|
+
flushFailure = { code: "flush_too_large" };
|
|
767
|
+
halt("flush");
|
|
768
|
+
throw stop;
|
|
769
|
+
}
|
|
758
770
|
unsettledSeq = seq;
|
|
759
771
|
try {
|
|
760
772
|
const receipt = await withRetries(() => host.flush(request), "mutation");
|
|
@@ -779,14 +791,70 @@ async function runKnowledgeImport(options) {
|
|
|
779
791
|
flushing = next.catch(() => {});
|
|
780
792
|
return next;
|
|
781
793
|
}
|
|
782
|
-
|
|
794
|
+
/** The request around the ops, at the longest `seq` it can have; `ops` empty, no `state`. */
|
|
795
|
+
const envelopeBytes = encodedBytes({
|
|
796
|
+
runId,
|
|
797
|
+
generation,
|
|
798
|
+
seq: Number.MAX_SAFE_INTEGER,
|
|
799
|
+
digest: "0".repeat(64),
|
|
800
|
+
ops: []
|
|
801
|
+
});
|
|
802
|
+
/**
|
|
803
|
+
* The envelope at the shortest `seq` the next request can have. A request's `seq` is only known
|
|
804
|
+
* when it is sent, so splitting plans for the longest; refusing what can never fit uses the
|
|
805
|
+
* shortest, and the request as sent is measured again before it goes.
|
|
806
|
+
*/
|
|
807
|
+
const shortestEnvelopeBytes = () => envelopeBytes - String(Number.MAX_SAFE_INTEGER).length + String(lastSeq + 1).length;
|
|
808
|
+
/** Bytes of a request holding the buffer plus `extra` more ops' bytes over `more` ops, and a state. */
|
|
809
|
+
const requestBytes = (extra, more, stateBytes) => {
|
|
810
|
+
const count = buffer.length + more;
|
|
811
|
+
const commas = Math.max(count - 1, 0);
|
|
812
|
+
const state = stateBytes === void 0 ? 0 : 9 + stateBytes;
|
|
813
|
+
return envelopeBytes + bufferBytes + extra + commas + state;
|
|
814
|
+
};
|
|
815
|
+
/**
|
|
816
|
+
* Measures what the importer hands over and returns a copy decoded from that encoding, so a value
|
|
817
|
+
* the importer changes after handing it over can't outgrow its measured size. Anything
|
|
818
|
+
* unencodable or too big ends the run here.
|
|
819
|
+
*/
|
|
820
|
+
const measure = (value, alone) => {
|
|
821
|
+
let json;
|
|
822
|
+
let bytes;
|
|
823
|
+
try {
|
|
824
|
+
json = JSON.stringify(value);
|
|
825
|
+
bytes = new TextEncoder().encode(json).byteLength;
|
|
826
|
+
} catch (error) {
|
|
827
|
+
flushFailure = { code: "importer_error" };
|
|
828
|
+
halt("flush");
|
|
829
|
+
throw error;
|
|
830
|
+
}
|
|
831
|
+
if (alone(bytes) > maxFlushBytes) {
|
|
832
|
+
flushFailure = { code: "flush_too_large" };
|
|
833
|
+
halt("flush");
|
|
834
|
+
throw stop;
|
|
835
|
+
}
|
|
836
|
+
return {
|
|
837
|
+
bytes,
|
|
838
|
+
copy: JSON.parse(json)
|
|
839
|
+
};
|
|
840
|
+
};
|
|
841
|
+
const push = async (handed) => {
|
|
783
842
|
if (stop) throw stop;
|
|
843
|
+
let op = handed;
|
|
844
|
+
let sending;
|
|
845
|
+
if (maxFlushBytes !== Infinity) {
|
|
846
|
+
const { bytes, copy } = measure(handed, (opBytes) => shortestEnvelopeBytes() + opBytes);
|
|
847
|
+
op = copy;
|
|
848
|
+
if (buffer.length > 0 && requestBytes(bytes, 1) > maxFlushBytes) sending = flush();
|
|
849
|
+
bufferBytes += bytes;
|
|
850
|
+
}
|
|
784
851
|
buffer.push(op);
|
|
785
|
-
if (buffer.length
|
|
786
|
-
else if (!flushTimer) {
|
|
852
|
+
if (!flushTimer && buffer.length < bufferSize) {
|
|
787
853
|
flushTimer = setTimeout(() => flush().catch(() => {}), flushAfterMs);
|
|
788
854
|
flushTimer.unref?.();
|
|
789
855
|
}
|
|
856
|
+
if (sending) await sending;
|
|
857
|
+
if (buffer.length >= bufferSize) await flush();
|
|
790
858
|
};
|
|
791
859
|
const finish = async (request) => {
|
|
792
860
|
const result = await finishRun(host, {
|
|
@@ -850,7 +918,12 @@ async function runKnowledgeImport(options) {
|
|
|
850
918
|
get: async (key) => state[key],
|
|
851
919
|
set: async (key, value) => {
|
|
852
920
|
if (stop) throw stop;
|
|
853
|
-
|
|
921
|
+
const staged = { [key]: value };
|
|
922
|
+
if (maxFlushBytes !== Infinity) {
|
|
923
|
+
const { bytes } = measure(staged, (stateBytes) => shortestEnvelopeBytes() + 9 + stateBytes);
|
|
924
|
+
if (requestBytes(0, 0, bytes) > maxFlushBytes) flush().catch(() => {});
|
|
925
|
+
}
|
|
926
|
+
await flush(staged);
|
|
854
927
|
}
|
|
855
928
|
},
|
|
856
929
|
items: {
|
|
@@ -956,6 +1029,9 @@ async function finishRun(host, request, lastSeq, unsettledSeq, withRetries) {
|
|
|
956
1029
|
lastSeq
|
|
957
1030
|
};
|
|
958
1031
|
}
|
|
1032
|
+
function encodedBytes(value) {
|
|
1033
|
+
return new TextEncoder().encode(JSON.stringify(value)).byteLength;
|
|
1034
|
+
}
|
|
959
1035
|
// src/knowledge/importers/sink.ts
|
|
960
1036
|
/**
|
|
961
1037
|
* Applies one flush's ops to pages and the node map, on a transaction view. Pages are found by id
|
package/dist/llm/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_llm = require("../llm-
|
|
3
|
-
const require_netlify = require("../netlify-
|
|
4
|
-
const require_provider_registry = require("../provider-registry-
|
|
2
|
+
const require_llm = require("../llm-D6N-WJwo.cjs");
|
|
3
|
+
const require_netlify = require("../netlify-hasf5dLA.cjs");
|
|
4
|
+
const require_provider_registry = require("../provider-registry-CeV5wjlF.cjs");
|
|
5
5
|
exports.AzureOpenAIGateway = require_llm.AzureOpenAIGateway;
|
|
6
6
|
exports.EMBEDDING_MODELS = require_llm.EMBEDDING_MODELS;
|
|
7
7
|
exports.GATEWAY_AUTH_HEADER = require_netlify.GATEWAY_AUTH_HEADER;
|
package/dist/llm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ModelRouterLanguageModel, c as AzureOpenAIGateway, i as resolveModelConfig, l as defaultGateways, n as ModelRouterEmbeddingModel, r as resolveModelAuth, t as EMBEDDING_MODELS } from "../llm-
|
|
2
|
-
import {
|
|
3
|
-
import { c as modelSupportsStructuredOutput, f as MastraGateway, i as getProviderConfig, l as modelSupportsTemperature, n as PROVIDER_REGISTRY, r as getModelReasoningOptions, s as modelSupportsAttachments, t as GatewayRegistry, u as parseModelString } from "../provider-registry-
|
|
1
|
+
import { a as ModelRouterLanguageModel, c as AzureOpenAIGateway, i as resolveModelConfig, l as defaultGateways, n as ModelRouterEmbeddingModel, r as resolveModelAuth, t as EMBEDDING_MODELS } from "../llm-CsQOELh9.js";
|
|
2
|
+
import { l as GATEWAY_AUTH_HEADER, m as getGatewayId, p as findGatewayForModel, r as ModelsDevGateway, t as NetlifyGateway, y as MastraModelGateway } from "../netlify-CW26UJrG.js";
|
|
3
|
+
import { c as modelSupportsStructuredOutput, f as MastraGateway, i as getProviderConfig, l as modelSupportsTemperature, n as PROVIDER_REGISTRY, r as getModelReasoningOptions, s as modelSupportsAttachments, t as GatewayRegistry, u as parseModelString } from "../provider-registry-DnVkqIBw.js";
|
|
4
4
|
export { AzureOpenAIGateway, EMBEDDING_MODELS, GATEWAY_AUTH_HEADER, GatewayRegistry, MastraGateway, MastraModelGateway, ModelRouterEmbeddingModel, ModelRouterLanguageModel, ModelsDevGateway, NetlifyGateway, PROVIDER_REGISTRY, defaultGateways, findGatewayForModel, getGatewayId, getModelReasoningOptions, getProviderConfig, modelSupportsAttachments, modelSupportsStructuredOutput, modelSupportsTemperature, parseModelString, resolveModelAuth, resolveModelConfig };
|
|
@@ -2,7 +2,7 @@ import type { UIMessage, CoreMessage, GenerateTextResult as OriginalGenerateText
|
|
|
2
2
|
import type { JSONSchema7 } from 'json-schema';
|
|
3
3
|
import type { MessageList } from '../../agent/types.js';
|
|
4
4
|
import type { ScorerRunInputForAgent, ScorerRunOutputForAgent } from '../../evals/index.js';
|
|
5
|
-
import type { ObservabilityContext, TracingProperties } from '../../observability/index.js';
|
|
5
|
+
import type { ModelGenerationAttributes, ObservabilityContext, TracingProperties } from '../../observability/index.js';
|
|
6
6
|
import type { OutputProcessorOrWorkflow } from '../../processors/index.js';
|
|
7
7
|
import type { RequestContext } from '../../request-context/index.js';
|
|
8
8
|
import type { ZodSchema } from '../../schema/index.js';
|
|
@@ -59,6 +59,8 @@ type GenerateTextOptions<Tools extends ToolSet, Output extends ZodSchema | JSONS
|
|
|
59
59
|
export type GenerateTextWithMessagesArgs<Tools extends ToolSet, Output extends ZodSchema | JSONSchema7 | undefined = undefined> = {
|
|
60
60
|
messages: UIMessage[] | CoreMessage[];
|
|
61
61
|
output?: never;
|
|
62
|
+
/** What this call produces, when it is not part of the conversation. Recorded on the MODEL_GENERATION span. */
|
|
63
|
+
resultType?: ModelGenerationAttributes['resultType'];
|
|
62
64
|
} & GenerateTextOptions<Tools, Output>;
|
|
63
65
|
export type GenerateTextResult<Tools extends ToolSet, Output extends ZodSchema | JSONSchema7 | undefined = undefined> = Omit<OriginalGenerateTextResult<Tools, inferOutput<Output>>, 'experimental_output'> & {
|
|
64
66
|
object?: Output extends undefined ? never : inferOutput<Output>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
type GatewayTool = {
|
|
2
|
+
type: string;
|
|
3
|
+
id?: string;
|
|
4
|
+
args?: Record<string, unknown>;
|
|
5
|
+
};
|
|
6
6
|
/**
|
|
7
7
|
* The Mastra gateway's chat endpoint only runs `openrouter:*` server tools. Another provider's
|
|
8
8
|
* native tool is rejected with a 400 (OpenAI, xAI models) or dropped without an error (Anthropic,
|
|
@@ -11,5 +11,8 @@ export declare function isOpenRouterModel(model: {
|
|
|
11
11
|
* A native web search tool with no arguments is swapped for the gateway's web search, which works
|
|
12
12
|
* for every tool-calling model. Any other native tool fails here with an actionable message.
|
|
13
13
|
*/
|
|
14
|
-
export declare function prepareToolsForMastraGateway
|
|
14
|
+
export declare function prepareToolsForMastraGateway<T extends {
|
|
15
|
+
tools?: GatewayTool[];
|
|
16
|
+
}>(options: T, routerId: string): T;
|
|
17
|
+
export {};
|
|
15
18
|
//# sourceMappingURL=mastra-gateway-provider-tools.d.ts.map
|
|
@@ -19,7 +19,7 @@ export declare class MastraLLMV1 extends MastraBase {
|
|
|
19
19
|
getModelId(): string;
|
|
20
20
|
getModel(): LanguageModel;
|
|
21
21
|
private _applySchemaCompat;
|
|
22
|
-
__text<Tools extends ToolSet, Z extends ZodSchema | JSONSchema7 | undefined>({ runId, messages, maxSteps, tools, temperature, toolChoice, onStepFinish, experimental_output, threadId, resourceId, requestContext, ...rest }: GenerateTextWithMessagesArgs<Tools, Z>): Promise<GenerateTextResult<Tools, Z>>;
|
|
22
|
+
__text<Tools extends ToolSet, Z extends ZodSchema | JSONSchema7 | undefined>({ runId, messages, maxSteps, tools, temperature, toolChoice, onStepFinish, experimental_output, threadId, resourceId, requestContext, resultType, ...rest }: GenerateTextWithMessagesArgs<Tools, Z>): Promise<GenerateTextResult<Tools, Z>>;
|
|
23
23
|
__textObject<Z extends ZodSchema | JSONSchema7>({ messages, structuredOutput, runId, threadId, resourceId, requestContext, ...rest }: GenerateObjectWithMessagesArgs<Z>): Promise<GenerateObjectResult<Z>>;
|
|
24
24
|
__stream<Tools extends ToolSet, Z extends ZodSchema | JSONSchema7 | undefined = undefined>({ messages, onStepFinish, onFinish, maxSteps, tools, runId, temperature, toolChoice, experimental_output, threadId, resourceId, requestContext, ...rest }: StreamTextWithMessagesArgs<Tools, Z>): StreamTextResult<Tools, Z>;
|
|
25
25
|
__streamObject<T extends ZodSchema | JSONSchema7>({ messages, runId, requestContext, threadId, resourceId, onFinish, structuredOutput, ...rest }: StreamObjectWithMessagesArgs<T>): StreamObjectResult<T>;
|
|
@@ -20,6 +20,6 @@ export declare class MastraLLMVNext extends MastraBase {
|
|
|
20
20
|
getModel(): import("./shared.types").MastraLanguageModel;
|
|
21
21
|
getProviderOptions(): import("./shared.types").SharedProviderOptions | undefined;
|
|
22
22
|
convertToMessages(messages: string | string[] | ModelMessage[]): ModelMessage[];
|
|
23
|
-
stream<Tools extends ToolSet, OUTPUT = undefined>({ resumeContext, runId, stopWhen, maxSteps, tools, modelSettings, toolChoice, threadId, resourceId, structuredOutput, options, inputProcessors, llmRequestInputProcessors, outputProcessors, errorProcessors, hasConfiguredErrorProcessors, returnScorerData, providerOptions, messageList, requireToolApproval, toolCallConcurrency, eagerToolExecution, streamPublisher, _internal, onTracingTripwire, onTracingTerminalError, tracingScope, agentId, agentVersionId, resolvedScopes, agentName, toolCallId, requestContext, actor, mcp, methodType, includeRawChunks, experimentalTransform, hideSignals, autoResumeSuspendedTools, maxProcessorRetries, processorStates, activeTools, isTaskComplete, goal, onIterationComplete, workspace, agentRunSpan, agent, ...rest }: ModelLoopStreamArgs<Tools, OUTPUT>): MastraModelOutput<OUTPUT>;
|
|
23
|
+
stream<Tools extends ToolSet, OUTPUT = undefined>({ resumeContext, runId, stopWhen, maxSteps, tools, modelSettings, toolChoice, threadId, resourceId, structuredOutput, options, inputProcessors, llmRequestInputProcessors, outputProcessors, errorProcessors, hasConfiguredErrorProcessors, returnScorerData, providerOptions, messageList, requireToolApproval, toolCallConcurrency, eagerToolExecution, streamPublisher, _internal, onTracingTripwire, onTracingTerminalError, tracingScope, agentId, agentVersionId, resolvedScopes, agentName, toolCallId, requestContext, actor, mcp, methodType, includeRawChunks, experimentalTransform, hideSignals, autoResumeSuspendedTools, maxProcessorRetries, processorStates, activeTools, isTaskComplete, goal, onIterationComplete, workspace, agentRunSpan, agent, resultType, ...rest }: ModelLoopStreamArgs<Tools, OUTPUT>): MastraModelOutput<OUTPUT>;
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=model.loop.d.ts.map
|
|
@@ -2,7 +2,7 @@ import type { ToolSet, DeepPartial, streamText, StreamTextOnFinishCallback as Or
|
|
|
2
2
|
import type { JSONSchema7 } from 'json-schema';
|
|
3
3
|
import type { MessageList } from '../../agent/index.js';
|
|
4
4
|
import type { LoopOptions } from '../../loop/types.js';
|
|
5
|
-
import type { ObservabilityContext, Span, SpanType } from '../../observability/index.js';
|
|
5
|
+
import type { ModelGenerationAttributes, ObservabilityContext, Span, SpanType } from '../../observability/index.js';
|
|
6
6
|
import type { OutputProcessorOrWorkflow } from '../../processors/index.js';
|
|
7
7
|
import type { RequestContext } from '../../request-context/index.js';
|
|
8
8
|
import type { StandardSchemaWithJSON, ZodSchema } from '../../schema/index.js';
|
|
@@ -28,6 +28,8 @@ export type ModelLoopStreamArgs<TOOLS extends ToolSet, OUTPUT = undefined> = {
|
|
|
28
28
|
threadId?: string;
|
|
29
29
|
returnScorerData?: boolean;
|
|
30
30
|
messageList: MessageList;
|
|
31
|
+
/** What this call produces, when it is not part of the conversation. Recorded on the MODEL_GENERATION span. */
|
|
32
|
+
resultType?: ModelGenerationAttributes['resultType'];
|
|
31
33
|
} & ObservabilityContext & Omit<LoopOptions<TOOLS, OUTPUT>, 'models' | 'messageList' | 'onTracingTripwire'>;
|
|
32
34
|
export type ModelMethodType = 'generate' | 'stream';
|
|
33
35
|
//# sourceMappingURL=model.loop.types.d.ts.map
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
import type { AnthropicProviderOptions } from '../../_types/@ai-sdk_anthropic@3.0.137/dist/index.js';
|
|
8
8
|
import type { DeepSeekLanguageModelChatOptions } from '../../_types/@ai-sdk_deepseek@3.0.77/dist/index.js';
|
|
9
9
|
import type { GoogleGenerativeAIProviderOptions } from '../../_types/@ai-sdk_google@3.0.140/dist/index.js';
|
|
10
|
-
import type { OpenAIResponsesProviderOptions } from '../../_types/@ai-sdk_openai@3.0.135/dist/index.js';
|
|
10
|
+
import type { OpenAIResponsesProviderOptions as OpenAIResponsesProviderOptionsV6 } from '../../_types/@ai-sdk_openai@3.0.135/dist/index.js';
|
|
11
|
+
import type { OpenAIResponsesProviderOptions } from '../../_types/@ai-sdk_openai@4.0.106/dist/index.js';
|
|
11
12
|
import type { SharedV2ProviderOptions } from '../../_types/@ai-sdk_provider@2.0.5/dist/index.js';
|
|
12
13
|
import type { SharedV3ProviderOptions } from '../../_types/@ai-sdk_provider@3.0.19/dist/index.js';
|
|
13
14
|
import type { SharedV4ProviderOptions } from '../../_types/@ai-sdk_provider@4.0.38/dist/index.js';
|
|
@@ -59,7 +60,7 @@ export type AzureWebSocketOptions = Omit<ResponsesWebSocketOptions, 'url'> & {
|
|
|
59
60
|
*/
|
|
60
61
|
url?: string;
|
|
61
62
|
};
|
|
62
|
-
export type AzureProviderOptions =
|
|
63
|
+
export type AzureProviderOptions = OpenAIResponsesProviderOptionsV6 & {
|
|
63
64
|
/**
|
|
64
65
|
* Select the transport used for streaming responses.
|
|
65
66
|
* - `fetch` uses HTTP streaming.
|
|
@@ -94,7 +95,7 @@ export type DeepSeekProviderOptions = DeepSeekChatOptions;
|
|
|
94
95
|
* });
|
|
95
96
|
* ```
|
|
96
97
|
*/
|
|
97
|
-
export type ProviderOptions = (SharedV2ProviderOptions | SharedV3ProviderOptions) & {
|
|
98
|
+
export type ProviderOptions = (SharedV2ProviderOptions | SharedV3ProviderOptions | SharedV4ProviderOptions) & {
|
|
98
99
|
anthropic?: AnthropicProviderOptions & Record<string, any>;
|
|
99
100
|
deepseek?: DeepSeekProviderOptions & Record<string, any>;
|
|
100
101
|
google?: GoogleProviderOptions & Record<string, any>;
|