@mastra/core 1.87.0-alpha.2 → 1.87.0-alpha.5
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/agent-controller.d.ts +6 -0
- package/dist/agent-controller/index.cjs +2 -2
- package/dist/agent-controller/index.js +2 -2
- package/dist/agent-controller/worker-run-binding.d.ts +15 -0
- package/dist/{agent-controller-Dc58ARqw.js → agent-controller-CDwoELRq.js} +50 -8
- package/dist/{agent-controller-v64JbuDa.cjs → agent-controller-DEB1G03O.cjs} +50 -8
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-DgiQNKh7.cjs → background-tasks-B40g_Guf.cjs} +1 -1
- package/dist/{background-tasks-E-Jjxks4.js → background-tasks-CBp2178j.js} +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.js +2 -2
- package/dist/{builder-Dh175HnQ.js → builder-DTEXPju5.js} +2 -2
- package/dist/{builder-Dfp6Ckjr.cjs → builder-tuHJooMG.cjs} +2 -2
- package/dist/capabilities/302ai.json +191 -191
- package/dist/capabilities/abliteratedllm.json +39 -39
- package/dist/capabilities/abliteration-ai.json +10 -10
- package/dist/capabilities/above.json +20 -20
- package/dist/capabilities/adaption.json +15 -15
- package/dist/capabilities/adzuki.json +20 -20
- package/dist/capabilities/agentrouter.json +9 -9
- package/dist/capabilities/agnes.json +3 -3
- package/dist/capabilities/ai-router.json +6 -6
- package/dist/capabilities/aiand.json +25 -25
- package/dist/capabilities/aigrow.json +15 -15
- package/dist/capabilities/aimlapi.json +140 -143
- package/dist/capabilities/aixy.json +22 -22
- package/dist/capabilities/aki-io.json +12 -12
- package/dist/capabilities/alibaba-cn.json +98 -98
- package/dist/capabilities/alibaba-coding-plan-cn.json +3 -3
- package/dist/capabilities/alibaba-coding-plan.json +3 -3
- package/dist/capabilities/alibaba-token-plan-cn.json +48 -48
- package/dist/capabilities/alibaba-token-plan.json +51 -51
- package/dist/capabilities/alibaba.json +99 -65
- package/dist/capabilities/ambient.json +23 -16
- package/dist/capabilities/amd.json +7 -7
- package/dist/capabilities/anthropic.json +43 -43
- package/dist/capabilities/anyapi.json +13 -13
- package/dist/capabilities/apiko.json +2 -2
- package/dist/capabilities/arcee.json +9 -9
- package/dist/capabilities/augure.json +7 -7
- package/dist/capabilities/auriko.json +20 -20
- package/dist/capabilities/bailing.json +5 -5
- package/dist/capabilities/baseten.json +32 -32
- package/dist/capabilities/bee.json +3 -3
- package/dist/capabilities/berget.json +8 -8
- package/dist/capabilities/bothub.json +17 -17
- package/dist/capabilities/boundless.json +39 -39
- package/dist/capabilities/bumo.json +38 -38
- package/dist/capabilities/byteplus.json +32 -32
- package/dist/capabilities/cerebras.json +4 -4
- package/dist/capabilities/cheapaimodel.json +10 -10
- package/dist/capabilities/cheapest-token.json +30 -30
- package/dist/capabilities/chutes.json +10 -10
- package/dist/capabilities/clarifai.json +2 -2
- package/dist/capabilities/cline-pass.json +36 -36
- package/dist/capabilities/cloudcode.json +9 -9
- package/dist/capabilities/cloudflare-workers-ai.json +19 -19
- package/dist/capabilities/commandcode.json +145 -145
- package/dist/capabilities/concentrate.json +278 -295
- package/dist/capabilities/cortecs.json +109 -109
- package/dist/capabilities/crossmodel.json +200 -200
- package/dist/capabilities/crusoe.json +10 -10
- package/dist/capabilities/daoxe.json +6 -6
- package/dist/capabilities/databricks.json +124 -124
- package/dist/capabilities/deepinfra.json +98 -89
- package/dist/capabilities/deepseek.json +4 -4
- package/dist/capabilities/digitalocean.json +113 -113
- package/dist/capabilities/dothoosh.json +27 -27
- package/dist/capabilities/doubleword.json +23 -23
- package/dist/capabilities/edenai.json +283 -292
- package/dist/capabilities/empiriolabs.json +159 -159
- package/dist/capabilities/engy.json +23 -23
- package/dist/capabilities/entrim.json +2 -2
- package/dist/capabilities/evroc.json +16 -16
- package/dist/capabilities/ezkielyna.json +10 -10
- package/dist/capabilities/fastrouter.json +82 -82
- package/dist/capabilities/fireworks-ai.json +126 -65
- package/dist/capabilities/freemodel.json +15 -15
- package/dist/capabilities/friendli.json +8 -8
- package/dist/capabilities/frogbot.json +95 -95
- package/dist/capabilities/gisoo.json +15 -15
- package/dist/capabilities/gmicloud.json +13 -13
- package/dist/capabilities/google.json +54 -54
- package/dist/capabilities/graphn.json +16 -16
- package/dist/capabilities/greenpt.json +35 -35
- package/dist/capabilities/groq.json +9 -9
- package/dist/capabilities/helicone.json +84 -84
- package/dist/capabilities/hopper.json +2 -2
- package/dist/capabilities/hostinger-router.json +11 -11
- package/dist/capabilities/hpc-ai.json +7 -7
- package/dist/capabilities/huawei-maas.json +15 -15
- package/dist/capabilities/hubris.json +32 -32
- package/dist/capabilities/huggingface.json +118 -78
- package/dist/capabilities/hyper.json +20 -28
- package/dist/capabilities/impossibl.json +123 -123
- package/dist/capabilities/inception.json +3 -3
- package/dist/capabilities/inceptron.json +2 -2
- package/dist/capabilities/inco.json +5 -5
- package/dist/capabilities/infer.json +16 -16
- package/dist/capabilities/inferall.json +14 -14
- package/dist/capabilities/inference-coop.json +8 -8
- package/dist/capabilities/inferenceapis.json +15 -15
- package/dist/capabilities/inferris.json +2 -2
- package/dist/capabilities/infersia.json +9 -9
- 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/isoquant.json +4 -4
- package/dist/capabilities/iteracompute.json +54 -54
- package/dist/capabilities/jalapeno.json +11 -11
- package/dist/capabilities/jiekou.json +63 -63
- package/dist/capabilities/jzstoken.json +50 -50
- package/dist/capabilities/keln.json +18 -18
- package/dist/capabilities/kenari.json +118 -126
- package/dist/capabilities/kilo.json +632 -638
- package/dist/capabilities/kimi-code-plan-cn.json +5 -5
- package/dist/capabilities/kimi-code-plan-global.json +5 -5
- package/dist/capabilities/klavo.json +20 -20
- package/dist/capabilities/korouter.json +34 -34
- package/dist/capabilities/kunavo.json +10 -10
- package/dist/capabilities/liquid.json +13 -13
- package/dist/capabilities/lithosai.json +2 -2
- package/dist/capabilities/llmgateway-providers.json +973 -917
- package/dist/capabilities/llmgateway.json +333 -333
- package/dist/capabilities/llmtr.json +29 -29
- package/dist/capabilities/logits.json +2 -2
- package/dist/capabilities/lowrouter.json +54 -54
- package/dist/capabilities/lyceum.json +14 -14
- package/dist/capabilities/melious.json +15 -15
- package/dist/capabilities/merge-gateway.json +244 -244
- package/dist/capabilities/meta.json +8 -8
- 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 +17 -17
- package/dist/capabilities/mixlayer.json +2 -2
- package/dist/capabilities/modal.json +10 -10
- package/dist/capabilities/model-oracle-ai.json +25 -25
- 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 +7 -7
- package/dist/capabilities/moonshotai.json +7 -7
- package/dist/capabilities/morph.json +13 -13
- package/dist/capabilities/munito-eu.json +8 -8
- package/dist/capabilities/munito.json +8 -8
- package/dist/capabilities/nan.json +25 -25
- package/dist/capabilities/nano-gpt.json +573 -554
- package/dist/capabilities/nearai.json +89 -89
- package/dist/capabilities/nebius.json +30 -30
- package/dist/capabilities/neon.json +128 -128
- package/dist/capabilities/neuralwatt.json +41 -41
- package/dist/capabilities/novita-ai.json +171 -171
- package/dist/capabilities/nvidia.json +40 -40
- package/dist/capabilities/oathbreaker.json +2 -2
- package/dist/capabilities/obscurify.json +21 -21
- package/dist/capabilities/oci.json +10 -10
- package/dist/capabilities/ofox.json +375 -375
- package/dist/capabilities/ollama-cloud.json +51 -51
- package/dist/capabilities/openai.json +53 -53
- package/dist/capabilities/opencode-go.json +86 -86
- package/dist/capabilities/openreason.json +5 -5
- package/dist/capabilities/openrouter.json +557 -546
- package/dist/capabilities/opper.json +29 -29
- package/dist/capabilities/orcarouter.json +254 -254
- package/dist/capabilities/outerlabs.json +29 -29
- package/dist/capabilities/ovhcloud.json +23 -23
- package/dist/capabilities/pendra.json +4 -4
- package/dist/capabilities/perplexity-agent.json +55 -55
- package/dist/capabilities/perplexity.json +2 -2
- package/dist/capabilities/phala.json +34 -34
- package/dist/capabilities/pioneer.json +30 -30
- package/dist/capabilities/poe.json +126 -126
- package/dist/capabilities/powerspring.json +11 -11
- package/dist/capabilities/primalabs.json +10 -10
- package/dist/capabilities/prime.json +120 -119
- package/dist/capabilities/privatemode-ai.json +10 -10
- package/dist/capabilities/proxystacks.json +7 -7
- package/dist/capabilities/qiniu-ai.json +14 -14
- package/dist/capabilities/refuseless.json +9 -9
- package/dist/capabilities/regolo-ai.json +5 -5
- package/dist/capabilities/requesty.json +167 -190
- package/dist/capabilities/ruapi.json +17 -17
- package/dist/capabilities/runcrate.json +9 -9
- package/dist/capabilities/runinfra.json +10 -10
- package/dist/capabilities/sakana.json +6 -6
- package/dist/capabilities/sambanova.json +8 -8
- package/dist/capabilities/sandbase.json +21 -21
- package/dist/capabilities/sarvam.json +5 -5
- package/dist/capabilities/scaleway.json +18 -18
- package/dist/capabilities/scnet-token-plan.json +10 -10
- package/dist/capabilities/scx-ai.json +32 -32
- package/dist/capabilities/sensenova.json +14 -14
- package/dist/capabilities/siliconflow-cn.json +44 -44
- package/dist/capabilities/siliconflow.json +53 -53
- package/dist/capabilities/snowflake-cortex.json +22 -22
- package/dist/capabilities/sokkan.json +9 -9
- package/dist/capabilities/sparrowcodes.json +19 -19
- package/dist/capabilities/standardcompute.json +90 -90
- package/dist/capabilities/steadyrouter.json +42 -42
- package/dist/capabilities/stepfun-ai-step-plan.json +2 -2
- package/dist/capabilities/stepfun-ai.json +2 -2
- package/dist/capabilities/stepfun-step-plan.json +2 -2
- package/dist/capabilities/stepfun.json +2 -2
- package/dist/capabilities/stepping-stone.json +19 -19
- package/dist/capabilities/synthetic.json +10 -10
- package/dist/capabilities/synthorai.json +24 -24
- package/dist/capabilities/teamorouter.json +23 -23
- package/dist/capabilities/teapot-router.json +12 -12
- package/dist/capabilities/tencent-token-plan-intl.json +126 -0
- package/dist/capabilities/tencent-token-plan.json +39 -39
- package/dist/capabilities/tencent-tokenhub.json +56 -41
- package/dist/capabilities/tensorx.json +50 -50
- package/dist/capabilities/tenstorrent.json +6 -6
- package/dist/capabilities/the-grid-ai.json +33 -33
- package/dist/capabilities/thinkingmachines.json +77 -77
- package/dist/capabilities/tinfoil.json +12 -12
- package/dist/capabilities/toapis.json +2 -2
- package/dist/capabilities/togetherai.json +41 -41
- package/dist/capabilities/tokengo.json +22 -22
- package/dist/capabilities/tokenify.json +3 -3
- package/dist/capabilities/trustedrouter.json +7 -7
- package/dist/capabilities/trustedtokens.json +17 -17
- package/dist/capabilities/umans-ai-coding-plan.json +11 -11
- package/dist/capabilities/umans-ai.json +8 -8
- package/dist/capabilities/uncensuredai.json +5 -5
- package/dist/capabilities/unrestricted.json +4 -4
- package/dist/capabilities/uplinkswitch.json +21 -21
- package/dist/capabilities/upstage.json +6 -6
- package/dist/capabilities/vancine.json +24 -24
- package/dist/capabilities/vercel.json +582 -582
- package/dist/capabilities/vivgrid.json +86 -86
- package/dist/capabilities/volcengine-coding-plan.json +29 -29
- package/dist/capabilities/volcengine.json +23 -23
- package/dist/capabilities/vultr.json +27 -27
- package/dist/capabilities/wafer.ai.json +18 -18
- package/dist/capabilities/wallaby.json +2 -2
- package/dist/capabilities/wally.json +11 -11
- package/dist/capabilities/wandb.json +21 -21
- package/dist/capabilities/watt.json +20 -20
- package/dist/capabilities/xai.json +5 -5
- package/dist/capabilities/xiaomi-token-plan-ams.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-cn.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -2
- package/dist/capabilities/xiaomi.json +2 -2
- package/dist/capabilities/xpersona.json +10 -10
- package/dist/capabilities/xxapi.json +28 -28
- package/dist/capabilities/zai-coding-plan.json +18 -18
- package/dist/capabilities/zai.json +27 -27
- package/dist/capabilities/zenifra.json +26 -26
- package/dist/capabilities/zenmux.json +200 -200
- package/dist/capabilities/zerogpu.json +13 -13
- package/dist/capabilities/zhipuai-coding-plan.json +8 -8
- package/dist/capabilities/zhipuai.json +26 -26
- package/dist/capabilities/zro.json +7 -7
- 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-0AO7PMJF.js → channels-CC2Z4adP.js} +1 -1
- package/dist/{channels-BZL9RT2i.cjs → channels-Drxs9g13.cjs} +1 -1
- package/dist/coding-agent/index.cjs +2 -2
- package/dist/coding-agent/index.js +2 -2
- package/dist/{constants-B9ZDvXZ4.cjs → constants-Bou0hEgY.cjs} +4 -0
- package/dist/{constants-BmdTvEYN.js → constants-CFWgIaqA.js} +4 -0
- package/dist/datasets/experiment/scorer.d.ts +16 -5
- 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 +1032 -1032
- 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-knowledge-knowledge-tools.md +3 -3
- 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 +2 -2
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +2 -2
- package/dist/evals/scoreTraces/index.js +2 -2
- 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/index.cjs +51 -16
- package/dist/knowledge/index.js +51 -16
- package/dist/knowledge/page-tools.d.ts +9 -0
- package/dist/knowledge/scope-runtime.d.ts +6 -0
- 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 +7932 -7894
- package/dist/{llm-B4AeSFvV.cjs → llm-CbpBEabY.cjs} +38 -78
- package/dist/{llm-B46V7Mi7.js → llm-D3y8qOKL.js} +38 -78
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/{manager-BwDxA1Nn.cjs → manager-BOn6RJwA.cjs} +106 -35
- package/dist/{manager-BRAvwB9b.js → manager-elIuArZa.js} +106 -35
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-DBhdD172.cjs → mastra-CDQJWY6v.cjs} +16 -16
- package/dist/{mastra-CIx6qEq2.js → mastra-DQjco6Bt.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-CJMsDU8w.js → model-BjyU1L4I.js} +4 -3
- package/dist/{model-CYhAa5qO.cjs → model-C4aI7k-i.cjs} +4 -3
- package/dist/{netlify-Bw7Vd58y.cjs → netlify-BjuUEMrL.cjs} +41364 -30461
- package/dist/{netlify-C9aJA6Cv.js → netlify-BpB7PtZV.js} +41361 -30464
- 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-DOfYSEju.js → provider-registry-BjdxtGZZ.js} +22658 -22514
- package/dist/{provider-registry-Bn_7VvZ8.cjs → provider-registry-bkFdaY45.cjs} +22657 -22513
- package/dist/provider-registry.json +22617 -22527
- package/dist/{registry-generator-BnK5Npgr.cjs → registry-generator-BORKO0_T.cjs} +1 -1
- package/dist/{registry-generator-Cw594Ttt.js → registry-generator-CPF318Kc.js} +1 -1
- package/dist/{rehydrate-BWnd_TEx.cjs → rehydrate-Cps4MTph.cjs} +2 -2
- package/dist/{rehydrate-Dgqkw7Py.js → rehydrate-Cw2Id-Uz.js} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/{run-registry-lLRc7EE6.cjs → run-registry-BTFPEkXT.cjs} +368 -92
- package/dist/{run-registry-DhOKJtlb.js → run-registry-D5z2YVqJ.js} +356 -92
- package/dist/storage/constants.cjs +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/knowledge/base.d.ts +16 -1
- package/dist/storage/domains/knowledge/importers-inmemory.d.ts +1 -0
- package/dist/storage/domains/knowledge/importers.d.ts +8 -0
- package/dist/storage/domains/knowledge/inmemory.d.ts +1 -0
- package/dist/storage/domains/knowledge/pages-inmemory.d.ts +5 -1
- package/dist/storage/index.cjs +3 -3
- package/dist/storage/index.js +3 -3
- package/dist/storage/types.d.ts +8 -0
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-BIDts1fZ.cjs → stream-D1OnBHDi.cjs} +3 -3
- package/dist/{stream-C8HKG3qC.js → stream-DB5efioT.js} +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-DM5V_0XS.js → tool-loop-agent-DkhFVx0h.js} +4 -4
- package/dist/{tool-loop-agent-PEY5a1R6.cjs → tool-loop-agent-Ote8gJMn.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-DcnKVK34.js → utils-BTKpGHA6.js} +1 -1
- package/dist/{utils-CxMSu_wc.cjs → utils-Dl_UFejV.cjs} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-Dn750ciE.js → validate-D6fUqYGz.js} +1 -1
- package/dist/{validate-RVKgazCf.cjs → validate-DdDuQRoZ.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-Dx0ZHMGX.cjs → worker-B27B9RlK.cjs} +2 -2
- package/dist/{worker-SDi9jbP5.js → worker-Bo_hTQJC.js} +2 -2
- package/dist/{worker-DJPAdazC.js → worker-DC269pGx.js} +2 -2
- package/dist/{worker-CFPu9qwV.cjs → worker-mq-oiLa5.cjs} +2 -2
- package/dist/{workflow-ZFOz_365.cjs → workflow-D61dV4AC.cjs} +3 -3
- package/dist/{workflow-DkBqNn7X.js → workflow-D97r3h2-.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/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 +9 -9
- package/src/llm/model/provider-types.generated.d.ts +7932 -7894
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-D5z2YVqJ.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";
|
|
@@ -1212,20 +1212,24 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
1212
1212
|
const keyPath = async (page) => {
|
|
1213
1213
|
const keys = [];
|
|
1214
1214
|
const ids = [];
|
|
1215
|
-
|
|
1216
|
-
|
|
1215
|
+
if (page.isScope) return page.id === scope.id ? {
|
|
1216
|
+
keys,
|
|
1217
|
+
ids
|
|
1218
|
+
} : null;
|
|
1219
|
+
const parents = page.parentId ? await storage.getPageParents({
|
|
1220
|
+
parentId: page.parentId,
|
|
1221
|
+
read: "all"
|
|
1222
|
+
}) : [];
|
|
1223
|
+
for (const at of [page, ...parents]) {
|
|
1224
|
+
if (at.isScope) return at.id === scope.id ? {
|
|
1225
|
+
keys,
|
|
1226
|
+
ids
|
|
1227
|
+
} : null;
|
|
1217
1228
|
if (!live(at) || at.key === void 0) return null;
|
|
1218
1229
|
keys.unshift(at.key);
|
|
1219
1230
|
ids.unshift(at.id);
|
|
1220
|
-
at = at.parentId ? await storage.getPage({
|
|
1221
|
-
id: at.parentId,
|
|
1222
|
-
read: "all"
|
|
1223
|
-
}) : null;
|
|
1224
1231
|
}
|
|
1225
|
-
return
|
|
1226
|
-
keys,
|
|
1227
|
-
ids
|
|
1228
|
-
} : null;
|
|
1232
|
+
return null;
|
|
1229
1233
|
};
|
|
1230
1234
|
const sameKeys = (a, b) => a.length === b.length && a.every((key, i) => key === b[i]);
|
|
1231
1235
|
/**
|
|
@@ -1436,8 +1440,7 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
1436
1440
|
return node && !await gone(node) ? node : null;
|
|
1437
1441
|
};
|
|
1438
1442
|
const ref = (keys) => `${target.scope}#${keys.join("/")}`;
|
|
1439
|
-
const linkLine = async (link) => {
|
|
1440
|
-
const node = await importers.getNode(binding.id, link.sourceId);
|
|
1443
|
+
const linkLine = async (link, node) => {
|
|
1441
1444
|
const page = node ? await storage.getPage({
|
|
1442
1445
|
id: node.pageId,
|
|
1443
1446
|
read: "all"
|
|
@@ -1448,11 +1451,30 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
1448
1451
|
const renderLinks = async (links) => {
|
|
1449
1452
|
const lines = [];
|
|
1450
1453
|
const unresolved = [];
|
|
1454
|
+
const getNodes = async (sourceIds) => {
|
|
1455
|
+
if (!sourceIds.length) return [];
|
|
1456
|
+
if (importers.getNodes) return importers.getNodes(binding.id, sourceIds);
|
|
1457
|
+
const nodes = [];
|
|
1458
|
+
for (const sourceId of new Set(sourceIds)) {
|
|
1459
|
+
const node = await importers.getNode(binding.id, sourceId);
|
|
1460
|
+
if (node) nodes.push(node);
|
|
1461
|
+
}
|
|
1462
|
+
return nodes;
|
|
1463
|
+
};
|
|
1464
|
+
const read = async (sourceIds) => new Map((await getNodes(sourceIds)).map((node) => [node.sourceId, node]));
|
|
1465
|
+
const before = await read(links.map((link) => link.sourceId));
|
|
1466
|
+
const rendered = [];
|
|
1451
1467
|
for (const link of links) {
|
|
1452
|
-
const
|
|
1453
|
-
|
|
1454
|
-
|
|
1468
|
+
const node = before.get(link.sourceId);
|
|
1469
|
+
rendered.push({
|
|
1470
|
+
link,
|
|
1471
|
+
line: await linkLine(link, node),
|
|
1472
|
+
pageId: node?.pageId
|
|
1473
|
+
});
|
|
1455
1474
|
}
|
|
1475
|
+
const after = await read(rendered.filter((each) => each.line).map((each) => each.link.sourceId));
|
|
1476
|
+
for (const { link, line, pageId } of rendered) if (line && after.get(link.sourceId)?.pageId === pageId) lines.push(line);
|
|
1477
|
+
else unresolved.push(encodeLink(link));
|
|
1456
1478
|
return {
|
|
1457
1479
|
section: linkSection(lines),
|
|
1458
1480
|
unresolved
|
|
@@ -3399,6 +3421,19 @@ var KnowledgeScopeRuntime = class {
|
|
|
3399
3421
|
};
|
|
3400
3422
|
for (const address of addresses) await this.#materialize(address, principals, provenance, [], run);
|
|
3401
3423
|
}
|
|
3424
|
+
/**
|
|
3425
|
+
* The parent address a first write would place a not-yet-created scope under, as `#materialize`
|
|
3426
|
+
* chooses it: a template child's own parent, or the one held `belongsTo` candidate. Undefined when
|
|
3427
|
+
* the scope would stay unlinked.
|
|
3428
|
+
*/
|
|
3429
|
+
firstWriteParentAddress(address, principals) {
|
|
3430
|
+
const match = this.compiled.match(address);
|
|
3431
|
+
if (!match) return void 0;
|
|
3432
|
+
if (match.compiled.child) return address.slice(0, address.lastIndexOf("/"));
|
|
3433
|
+
if (!match.compiled.belongsTo) return void 0;
|
|
3434
|
+
const candidates = this.#belongsToCandidates(match, this.#held(principals));
|
|
3435
|
+
return candidates.length === 1 && candidates[0] !== address ? candidates[0] : void 0;
|
|
3436
|
+
}
|
|
3402
3437
|
/** The run's distinct principals grouped by declaration key, matched once. */
|
|
3403
3438
|
#held(principals) {
|
|
3404
3439
|
const held = /* @__PURE__ */ new Map();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { KnowledgePage, KnowledgeStorage } from '../storage/domains/knowledge/index.js';
|
|
2
2
|
import type { ToolAction } from '../tools/index.js';
|
|
3
|
+
import type { KnowledgeRole } from './declarations.js';
|
|
3
4
|
import { KnowledgeRun } from './run.js';
|
|
4
5
|
import type { KnowledgeScopeRuntime } from './scope-runtime.js';
|
|
5
6
|
import type { KnowledgeSemanticIndex } from './semantic.js';
|
|
@@ -24,6 +25,8 @@ export interface KnowledgePageToolGroups {
|
|
|
24
25
|
pins: boolean;
|
|
25
26
|
}
|
|
26
27
|
type Tools = Record<string, ToolAction<any, any, any>>;
|
|
28
|
+
/** What a run can do in a scope it holds: contributors and up can write, viewers only read. */
|
|
29
|
+
type HeldScopeAccess = 'write' | 'read' | 'none';
|
|
27
30
|
/** One entry of a `knowledge_list` result. */
|
|
28
31
|
export interface ListEntry {
|
|
29
32
|
ref: string;
|
|
@@ -34,6 +37,12 @@ export interface ListEntry {
|
|
|
34
37
|
/** Readable child pages, plus readable child scopes for a scope. */
|
|
35
38
|
children: number;
|
|
36
39
|
scope?: true;
|
|
40
|
+
/** Held scopes only (a listing without `from`): the run's role there, if any. */
|
|
41
|
+
role?: KnowledgeRole;
|
|
42
|
+
/** Held scopes only: what the run can do there. */
|
|
43
|
+
can?: HeldScopeAccess;
|
|
44
|
+
/** Held scopes only: no page there this run can read yet. */
|
|
45
|
+
empty?: true;
|
|
37
46
|
}
|
|
38
47
|
/** What {@link listKnowledgeTree} found: the entries in tree order, and where the listing stopped. */
|
|
39
48
|
export interface KnowledgeTreeListing {
|
|
@@ -77,5 +77,11 @@ export declare class KnowledgeScopeRuntime {
|
|
|
77
77
|
* `belongsTo` link, has its child scopes and declares no template pages; warnings fire as before.
|
|
78
78
|
*/
|
|
79
79
|
materializeScopes(addresses: readonly string[], principals: readonly string[], provenance: KnowledgeProvenance): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* The parent address a first write would place a not-yet-created scope under, as `#materialize`
|
|
82
|
+
* chooses it: a template child's own parent, or the one held `belongsTo` candidate. Undefined when
|
|
83
|
+
* the scope would stay unlinked.
|
|
84
|
+
*/
|
|
85
|
+
firstWriteParentAddress(address: string, principals: readonly string[]): string | undefined;
|
|
80
86
|
}
|
|
81
87
|
//# sourceMappingURL=scope-runtime.d.ts.map
|
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-CbpBEabY.cjs");
|
|
3
|
+
const require_netlify = require("../netlify-BjuUEMrL.cjs");
|
|
4
|
+
const require_provider_registry = require("../provider-registry-bkFdaY45.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-D3y8qOKL.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-BpB7PtZV.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-BjdxtGZZ.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>;
|