@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
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-tIEjjQTE.js";
|
|
2
|
-
import { Hs as createStep, Us as createWorkflow, ta as assertSupportedPatterns, w as ScorerRunError, x as validateAndSaveScore, y as flushBeforeTraceRead } from "./run-registry-
|
|
2
|
+
import { Hs as createStep, Us as createWorkflow, ta as assertSupportedPatterns, w as ScorerRunError, x as validateAndSaveScore, y as flushBeforeTraceRead } from "./run-registry-D5z2YVqJ.js";
|
|
3
3
|
import { S as resolveObservabilityContext } from "./observability-D7RNOAPx.js";
|
|
4
4
|
import { i as MastraError } from "./error-oh2DLsP2.js";
|
|
5
|
-
import { dt as loadStepResults, ln as isSupportedLanguageModel } from "./stream-
|
|
5
|
+
import { dt as loadStepResults, ln as isSupportedLanguageModel } from "./stream-DB5efioT.js";
|
|
6
6
|
import { o as MASTRA_RESOURCE_ID_KEY, p as withoutLiveRequestKeys, u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
7
7
|
import { t as EntityType } from "./storage-Cc50aQAp.js";
|
|
8
8
|
import { a as getOrCreateSpan } from "./utils-DU_pU5SK.js";
|
|
9
9
|
import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
|
|
10
|
-
import { Cr as extractTrajectory, Tr as extractWorkflowTrajectory, mn as BATCH_DELETE_TRACES_MAX_IDS, wr as extractTrajectoryFromTrace } from "./constants-
|
|
10
|
+
import { Cr as extractTrajectory, Tr as extractWorkflowTrajectory, mn as BATCH_DELETE_TRACES_MAX_IDS, wr as extractTrajectoryFromTrace } from "./constants-CFWgIaqA.js";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { isZodType } from "@mastra/schema-compat";
|
|
13
13
|
import { zodToJsonSchema } from "@mastra/schema-compat/zod-to-json";
|
|
@@ -1023,22 +1023,40 @@ function resolveScorers(mastra, scorers) {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
const EXPERIMENT_ITEM_SCORER_NOT_FOUND = "EXPERIMENT_ITEM_SCORER_NOT_FOUND";
|
|
1025
1025
|
const EXPERIMENT_SCORER_NOT_FOUND = "EXPERIMENT_SCORER_NOT_FOUND";
|
|
1026
|
+
/** Version ids of scorers built from a pinned stored version, recorded on their score rows. */
|
|
1027
|
+
const pinnedScorerVersionIds = /* @__PURE__ */ new WeakMap();
|
|
1026
1028
|
/**
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1029
|
-
|
|
1030
|
-
|
|
1029
|
+
* Build a stored scorer at a specific version without registering it, so a
|
|
1030
|
+
* pinned (possibly older) version never replaces the current one in Mastra's registry.
|
|
1031
|
+
*/
|
|
1032
|
+
async function loadPinnedScorer(mastra, scorerId, versionId) {
|
|
1033
|
+
const editor = mastra.getEditor?.();
|
|
1034
|
+
const store = await mastra.getStorage()?.getStore("scorerDefinitions");
|
|
1035
|
+
if (!editor || !store) return null;
|
|
1036
|
+
const definition = await store.getByIdResolved(scorerId, { versionId });
|
|
1037
|
+
if (definition?.resolvedVersionId !== versionId) return null;
|
|
1038
|
+
const scorer = editor.scorer.resolve(definition);
|
|
1039
|
+
if (scorer) pinnedScorerVersionIds.set(scorer, versionId);
|
|
1040
|
+
return scorer;
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* Create a run-scoped scorer resolver. Instances pass through. String ids
|
|
1044
|
+
* pinned in `scorerVersions` load that stored version; other ids are looked up
|
|
1045
|
+
* in Mastra's registry, then loaded as stored scorers through the editor (which
|
|
1046
|
+
* registers them). Resolutions, including misses, are cached so concurrent items
|
|
1047
|
+
* load a stored scorer at most once per run.
|
|
1031
1048
|
*
|
|
1032
1049
|
* Only a scorer that doesn't exist is reported in `missingIds`. A failed lookup
|
|
1033
1050
|
* (for example, storage being unavailable) rejects with its own error and isn't
|
|
1034
1051
|
* cached, so it isn't mistaken for a bad scorer ID.
|
|
1035
1052
|
*/
|
|
1036
|
-
function createScorerResolver(mastra) {
|
|
1053
|
+
function createScorerResolver(mastra, scorerVersions) {
|
|
1037
1054
|
const resolutionCache = /* @__PURE__ */ new Map();
|
|
1038
1055
|
const resolveById = (scorerId) => {
|
|
1039
1056
|
const cached = resolutionCache.get(scorerId);
|
|
1040
1057
|
if (cached) return cached;
|
|
1041
|
-
const
|
|
1058
|
+
const pinnedVersionId = scorerVersions && Object.hasOwn(scorerVersions, scorerId) ? scorerVersions[scorerId] : void 0;
|
|
1059
|
+
const resolution = pinnedVersionId ? loadPinnedScorer(mastra, scorerId, pinnedVersionId) : (async () => {
|
|
1042
1060
|
let scorer = getItemScorerById(mastra, scorerId);
|
|
1043
1061
|
if (scorer) return scorer;
|
|
1044
1062
|
const editor = mastra.getEditor?.();
|
|
@@ -1074,6 +1092,23 @@ function createScorerResolver(mastra) {
|
|
|
1074
1092
|
};
|
|
1075
1093
|
}
|
|
1076
1094
|
/**
|
|
1095
|
+
* Pin the current version of every stored scorer among `scorerIds`, so all
|
|
1096
|
+
* items of an experiment are scored by the same definition even if the stored
|
|
1097
|
+
* scorer is edited mid-run. Ids served by a code scorer are not pinned.
|
|
1098
|
+
*/
|
|
1099
|
+
async function pinStoredScorerVersions(mastra, scorerIds) {
|
|
1100
|
+
const store = mastra.getEditor?.() ? await mastra.getStorage()?.getStore("scorerDefinitions") : void 0;
|
|
1101
|
+
if (!store) return null;
|
|
1102
|
+
const pins = {};
|
|
1103
|
+
for (const scorerId of new Set(scorerIds)) {
|
|
1104
|
+
const registered = getItemScorerById(mastra, scorerId);
|
|
1105
|
+
if (registered && registered.source !== "stored") continue;
|
|
1106
|
+
const definition = await store.getByIdResolved(scorerId);
|
|
1107
|
+
if (definition?.resolvedVersionId) pins[scorerId] = definition.resolvedVersionId;
|
|
1108
|
+
}
|
|
1109
|
+
return Object.keys(pins).length > 0 ? pins : null;
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1077
1112
|
* The item error for scorer ids that can't be resolved during a run (e.g. a
|
|
1078
1113
|
* stored scorer deleted after the experiment started). `null` when none are missing.
|
|
1079
1114
|
*/
|
|
@@ -1105,13 +1140,17 @@ function flattenScorerConfig(scorers) {
|
|
|
1105
1140
|
steps: "steps" in scorers && scorers.steps || void 0
|
|
1106
1141
|
};
|
|
1107
1142
|
}
|
|
1143
|
+
/** Every scorer id in a run-level `scorers` config, including workflow step scorers. */
|
|
1144
|
+
function runLevelScorerIds(scorers) {
|
|
1145
|
+
const { flat, steps } = flattenScorerConfig(scorers);
|
|
1146
|
+
return [...flat, ...Object.values(steps ?? {}).flat()].filter((scorer) => typeof scorer === "string");
|
|
1147
|
+
}
|
|
1108
1148
|
/**
|
|
1109
1149
|
* Throw {@link EXPERIMENT_SCORER_NOT_FOUND} when any run-level scorer id can't
|
|
1110
1150
|
* be resolved, so a typo or deleted stored scorer fails before an experiment is created.
|
|
1111
1151
|
*/
|
|
1112
1152
|
async function assertExperimentScorersExist(mastra, scorers) {
|
|
1113
|
-
const
|
|
1114
|
-
const ids = [...flat, ...Object.values(steps ?? {}).flat()].filter((scorer) => typeof scorer === "string");
|
|
1153
|
+
const ids = runLevelScorerIds(scorers);
|
|
1115
1154
|
if (ids.length === 0) return;
|
|
1116
1155
|
const { missingIds } = await createScorerResolver(mastra)(ids);
|
|
1117
1156
|
if (missingIds.length > 0) throw experimentScorerNotFoundError(missingIds);
|
|
@@ -1193,7 +1232,8 @@ async function runScorersForItem(scorers, item, output, storage, runId, targetTy
|
|
|
1193
1232
|
id: scorer.id,
|
|
1194
1233
|
name: scorer.name,
|
|
1195
1234
|
description: scorer.description ?? "",
|
|
1196
|
-
hasJudge: !!scorer.judge
|
|
1235
|
+
hasJudge: !!scorer.judge,
|
|
1236
|
+
...pinnedScorerVersionIds.has(scorer) ? { versionId: pinnedScorerVersionIds.get(scorer) } : {}
|
|
1197
1237
|
},
|
|
1198
1238
|
entity: {
|
|
1199
1239
|
id: targetId,
|
|
@@ -1414,7 +1454,8 @@ async function runStepScorersForItem(stepScorers, item, workflowData, storage, r
|
|
|
1414
1454
|
id: scorer.id,
|
|
1415
1455
|
name: scorer.name,
|
|
1416
1456
|
description: scorer.description ?? "",
|
|
1417
|
-
hasJudge: !!scorer.judge
|
|
1457
|
+
hasJudge: !!scorer.judge,
|
|
1458
|
+
...pinnedScorerVersionIds.has(scorer) ? { versionId: pinnedScorerVersionIds.get(scorer) } : {}
|
|
1418
1459
|
},
|
|
1419
1460
|
entity: {
|
|
1420
1461
|
id: targetId,
|
|
@@ -1774,7 +1815,7 @@ async function executeExperimentItem(args) {
|
|
|
1774
1815
|
domain: "STORAGE",
|
|
1775
1816
|
category: "USER"
|
|
1776
1817
|
});
|
|
1777
|
-
const resolveScorerEntries = createScorerResolver(mastra);
|
|
1818
|
+
const resolveScorerEntries = createScorerResolver(mastra, experiment.scorerVersions);
|
|
1778
1819
|
let scorers;
|
|
1779
1820
|
let scorerConfigError = null;
|
|
1780
1821
|
if (item.scorerIds !== void 0 && experiment.scorerIds == null) {
|
|
@@ -2062,13 +2103,20 @@ async function runExperiment(mastra, config) {
|
|
|
2062
2103
|
if (targetType !== "agent" && itemsWithToolMocks > 0) mastra.getLogger()?.warn(`Experiment target is "${config.task ? "task" : targetType}" but ${itemsWithToolMocks} of ${items.length} dataset items declare toolMocks. Tool mocks only apply to agent targets and will be ignored.`);
|
|
2063
2104
|
const hasRunLevelScorers = scorerInput !== void 0;
|
|
2064
2105
|
const { flat: flatScorerInput, steps: stepsConfigInput } = flattenScorerConfig(scorerInput);
|
|
2065
|
-
|
|
2106
|
+
let scorerVersions = null;
|
|
2107
|
+
let resolveScorerEntries;
|
|
2066
2108
|
let runLevelScorers = [];
|
|
2067
2109
|
let runLevelStepScorers = {};
|
|
2068
2110
|
let datasetScorers = [];
|
|
2069
2111
|
let runLevelMissingIds = [];
|
|
2070
2112
|
let datasetMissingIds = [];
|
|
2071
2113
|
try {
|
|
2114
|
+
scorerVersions = providedExperimentId ? (await experimentsStore?.getExperimentById({ id: experimentId }))?.scorerVersions ?? null : await pinStoredScorerVersions(mastra, [
|
|
2115
|
+
...runLevelScorerIds(scorerInput),
|
|
2116
|
+
...datasetRecord?.scorerIds ?? [],
|
|
2117
|
+
...items.flatMap((item) => item.scorerIds ?? [])
|
|
2118
|
+
]);
|
|
2119
|
+
resolveScorerEntries = createScorerResolver(mastra, scorerVersions);
|
|
2072
2120
|
if (hasRunLevelScorers) {
|
|
2073
2121
|
const resolution = await resolveScorerEntries(flatScorerInput);
|
|
2074
2122
|
const stepResolutions = await Promise.all(Object.entries(stepsConfigInput ?? {}).map(async ([stepId, entries]) => [stepId, await resolveScorerEntries(entries)]));
|
|
@@ -2103,6 +2151,7 @@ async function runExperiment(mastra, config) {
|
|
|
2103
2151
|
targetId: targetId ?? "inline",
|
|
2104
2152
|
totalItems: items.length,
|
|
2105
2153
|
agentVersion,
|
|
2154
|
+
scorerVersions,
|
|
2106
2155
|
organizationId: datasetRecord?.organizationId ?? null,
|
|
2107
2156
|
projectId: datasetRecord?.projectId ?? null
|
|
2108
2157
|
});
|
|
@@ -2602,6 +2651,22 @@ var Dataset = class {
|
|
|
2602
2651
|
return pagination.total;
|
|
2603
2652
|
}
|
|
2604
2653
|
/**
|
|
2654
|
+
* Pin the current version of every stored scorer the experiment can use:
|
|
2655
|
+
* run-level, dataset-level and item-level ids at the experiment's dataset version.
|
|
2656
|
+
*/
|
|
2657
|
+
async #pinScorerVersions(scorers, dataset, version) {
|
|
2658
|
+
if (!this.#mastra.getEditor?.()) return null;
|
|
2659
|
+
const items = await (await this.#getDatasetsStore()).getItemsByVersion({
|
|
2660
|
+
datasetId: this.id,
|
|
2661
|
+
version
|
|
2662
|
+
});
|
|
2663
|
+
return pinStoredScorerVersions(this.#mastra, [
|
|
2664
|
+
...runLevelScorerIds(scorers),
|
|
2665
|
+
...dataset.scorerIds ?? [],
|
|
2666
|
+
...items.flatMap((item) => item.scorerIds ?? [])
|
|
2667
|
+
]);
|
|
2668
|
+
}
|
|
2669
|
+
/**
|
|
2605
2670
|
* Get the full dataset record from storage.
|
|
2606
2671
|
*/
|
|
2607
2672
|
async getDetails() {
|
|
@@ -2818,26 +2883,30 @@ var Dataset = class {
|
|
|
2818
2883
|
category: "USER"
|
|
2819
2884
|
});
|
|
2820
2885
|
const experimentId = crypto.randomUUID();
|
|
2821
|
-
if (experimentsStore)
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2886
|
+
if (experimentsStore) {
|
|
2887
|
+
const scorerVersions = await this.#pinScorerVersions(config.scorers, dataset, targetVersion);
|
|
2888
|
+
await experimentsStore.createExperiment({
|
|
2889
|
+
id: experimentId,
|
|
2890
|
+
datasetId: this.id,
|
|
2891
|
+
datasetVersion: targetVersion,
|
|
2892
|
+
targetType: config.targetType ?? "agent",
|
|
2893
|
+
targetId: config.targetId ?? "inline",
|
|
2894
|
+
totalItems,
|
|
2895
|
+
name: config.name,
|
|
2896
|
+
description: config.description,
|
|
2897
|
+
metadata: withAgentModelMetadata(config.metadata, config.agentModel),
|
|
2898
|
+
provenance: config.provenance,
|
|
2899
|
+
experimentSetId: config.grouping?.experimentSetId,
|
|
2900
|
+
comparisonId: config.grouping?.comparisonId,
|
|
2901
|
+
variantId: config.grouping?.variantId,
|
|
2902
|
+
trialIndex: config.grouping?.trialIndex,
|
|
2903
|
+
agentVersion: config.agentVersion,
|
|
2904
|
+
organizationId: dataset.organizationId ?? null,
|
|
2905
|
+
projectId: dataset.projectId ?? null,
|
|
2906
|
+
...durableRun ? { scorerIds: durableRun.scorerIds ?? null } : {},
|
|
2907
|
+
scorerVersions
|
|
2908
|
+
});
|
|
2909
|
+
}
|
|
2841
2910
|
if (durableRun) {
|
|
2842
2911
|
try {
|
|
2843
2912
|
await this.#mastra.__ensureExperimentWorkflow();
|
|
@@ -3115,6 +3184,7 @@ var Dataset = class {
|
|
|
3115
3184
|
category: "USER"
|
|
3116
3185
|
});
|
|
3117
3186
|
const experimentId = args?.id ?? crypto.randomUUID();
|
|
3187
|
+
const scorerVersions = await this.#pinScorerVersions(args?.scorers, dataset, targetVersion);
|
|
3118
3188
|
try {
|
|
3119
3189
|
await experimentsStore.createExperiment({
|
|
3120
3190
|
id: experimentId,
|
|
@@ -3123,6 +3193,7 @@ var Dataset = class {
|
|
|
3123
3193
|
targetType: args?.targetType ?? null,
|
|
3124
3194
|
targetId: args?.targetId ?? null,
|
|
3125
3195
|
scorerIds: args?.scorers?.length ? args.scorers : null,
|
|
3196
|
+
scorerVersions,
|
|
3126
3197
|
totalItems,
|
|
3127
3198
|
name: args?.name,
|
|
3128
3199
|
description: args?.description,
|
package/dist/mastra/index.cjs
CHANGED
package/dist/mastra/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Mastra } from "../mastra-
|
|
1
|
+
export { t as Mastra } from "../mastra-DQjco6Bt.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const require_run_registry = require("./run-registry-
|
|
2
|
-
const require_background_tasks = require("./background-tasks-
|
|
1
|
+
const require_run_registry = require("./run-registry-BTFPEkXT.cjs");
|
|
2
|
+
const require_background_tasks = require("./background-tasks-B40g_Guf.cjs");
|
|
3
3
|
const require_inmemory = require("./inmemory-Dc86VWGB.cjs");
|
|
4
|
-
const require_manager = require("./manager-
|
|
4
|
+
const require_manager = require("./manager-BOn6RJwA.cjs");
|
|
5
5
|
const require_error = require("./error-D90lJ6M7.cjs");
|
|
6
6
|
const require_output_helpers = require("./output-helpers-DgsH4aTb.cjs");
|
|
7
7
|
const require_hooks = require("./hooks-D7VDBETj.cjs");
|
|
8
8
|
const require_license_index = require("./license/index.cjs");
|
|
9
|
-
const require_netlify = require("./netlify-
|
|
10
|
-
const require_llm = require("./llm-
|
|
9
|
+
const require_netlify = require("./netlify-BjuUEMrL.cjs");
|
|
10
|
+
const require_llm = require("./llm-CbpBEabY.cjs");
|
|
11
11
|
const require_logger = require("./logger-CvzZYuJd.cjs");
|
|
12
12
|
const require_logger_index = require("./logger/index.cjs");
|
|
13
13
|
const require_schedules = require("./schedules-BZS8McF7.cjs");
|
|
@@ -16,14 +16,14 @@ const require_observability_context_storage = require("./observability/context-s
|
|
|
16
16
|
const require_utils = require("./utils-D-eNsgDM.cjs");
|
|
17
17
|
const require_source = require("./source-BVOi8Xhp.cjs");
|
|
18
18
|
const require_feature_telemetry = require("./feature-telemetry-Cw0L1tHo.cjs");
|
|
19
|
-
const require_tool_loop_agent = require("./tool-loop-agent-
|
|
19
|
+
const require_tool_loop_agent = require("./tool-loop-agent-Ote8gJMn.cjs");
|
|
20
20
|
const require_payload_transform = require("./payload-transform-CWgnsO9w.cjs");
|
|
21
|
-
const require_utils$1 = require("./utils-
|
|
22
|
-
const require_worker = require("./worker-
|
|
23
|
-
const require_builder = require("./builder-
|
|
24
|
-
const require_validate = require("./validate-
|
|
25
|
-
const require_rehydrate = require("./rehydrate-
|
|
26
|
-
const require_stream = require("./stream-
|
|
21
|
+
const require_utils$1 = require("./utils-Dl_UFejV.cjs");
|
|
22
|
+
const require_worker = require("./worker-mq-oiLa5.cjs");
|
|
23
|
+
const require_builder = require("./builder-tuHJooMG.cjs");
|
|
24
|
+
const require_validate = require("./validate-DdDuQRoZ.cjs");
|
|
25
|
+
const require_rehydrate = require("./rehydrate-Cps4MTph.cjs");
|
|
26
|
+
const require_stream = require("./stream-D1OnBHDi.cjs");
|
|
27
27
|
let zod_v4 = require("zod/v4");
|
|
28
28
|
// src/notifications/workflow.ts
|
|
29
29
|
const NOTIFICATION_DISPATCH_WORKFLOW_ID = "__mastra_notification_dispatcher";
|
|
@@ -2868,7 +2868,7 @@ var Mastra = class Mastra {
|
|
|
2868
2868
|
*/
|
|
2869
2869
|
async __ensureExperimentWorkflow() {
|
|
2870
2870
|
if (this.__hasInternalWorkflow("__mastra-experiment")) return;
|
|
2871
|
-
const { buildExperimentWorkflow } = await Promise.resolve().then(() => require("./manager-
|
|
2871
|
+
const { buildExperimentWorkflow } = await Promise.resolve().then(() => require("./manager-BOn6RJwA.cjs")).then((n) => n.workflow_exports);
|
|
2872
2872
|
if (this.__hasInternalWorkflow("__mastra-experiment")) return;
|
|
2873
2873
|
this.__registerInternalWorkflow(buildExperimentWorkflow(), void 0, { distributed: true });
|
|
2874
2874
|
}
|
|
@@ -5069,7 +5069,7 @@ var Mastra = class Mastra {
|
|
|
5069
5069
|
if (!this.#workerFilter || this.#workerFilter.has("agent-schedule")) {
|
|
5070
5070
|
let agentScheduleWorker = this.#findAgentScheduleWorker();
|
|
5071
5071
|
if (!agentScheduleWorker) {
|
|
5072
|
-
const { AgentScheduleWorker } = await Promise.resolve().then(() => require("./worker-
|
|
5072
|
+
const { AgentScheduleWorker } = await Promise.resolve().then(() => require("./worker-B27B9RlK.cjs"));
|
|
5073
5073
|
agentScheduleWorker = new AgentScheduleWorker();
|
|
5074
5074
|
agentScheduleWorker.__registerMastra(this);
|
|
5075
5075
|
this.#workers.push(agentScheduleWorker);
|
|
@@ -5709,7 +5709,7 @@ var Mastra = class Mastra {
|
|
|
5709
5709
|
this.#workers.push(sw);
|
|
5710
5710
|
}
|
|
5711
5711
|
if (!this.#findAgentScheduleWorker()) {
|
|
5712
|
-
const { AgentScheduleWorker } = await Promise.resolve().then(() => require("./worker-
|
|
5712
|
+
const { AgentScheduleWorker } = await Promise.resolve().then(() => require("./worker-B27B9RlK.cjs"));
|
|
5713
5713
|
const asw = new AgentScheduleWorker();
|
|
5714
5714
|
asw.__registerMastra(this);
|
|
5715
5715
|
this.#workers.push(asw);
|
|
@@ -6154,7 +6154,7 @@ var Mastra = class Mastra {
|
|
|
6154
6154
|
#syncGatewayRegistry() {
|
|
6155
6155
|
try {
|
|
6156
6156
|
if (process.env.MASTRA_DEV !== "true" && process.env.MASTRA_DEV !== "1") return;
|
|
6157
|
-
Promise.resolve().then(() => require("./provider-registry-
|
|
6157
|
+
Promise.resolve().then(() => require("./provider-registry-bkFdaY45.cjs")).then((n) => n.provider_registry_exports).then(async ({ GatewayRegistry }) => {
|
|
6158
6158
|
const registry = GatewayRegistry.getInstance();
|
|
6159
6159
|
const customGateways = Object.values(this.#gateways || {});
|
|
6160
6160
|
registry.registerCustomGateways(customGateways);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as BackgroundTaskManager } from "./background-tasks-
|
|
1
|
+
import { Ac as nestedRunRecoveryAction, Al as isDurableAgentLike, Ar as WorkflowsInMemory, Dc as cancelNestedRun, El as waitMs, Hc as normalizeConcurrency, Hs as createStep, Ic as WORKFLOW_RUN_LEASE_TTL_MS, Ks as computeScheduleDefinitionHash, Lc as renewWorkflowLease, Oc as createNestedRunParentStatusLookup, Ol as hasDurableExecution, Or as InMemoryStore, Rc as repeatAfterSettled, Tl as assertDrainTimeout, Uc as runWithConcurrency, Uo as augmentWithInit, Us as createWorkflow, Vc as createConcurrencyLimiter, Wo as getStorageSource, Ws as WorkflowEventProcessor, b as createOnScorerHook, da as BackgroundTasksInMemory, i as abandonDurableAgentExecutions, jc as nestedRunStatusOf, jt as __registerMastraCtor, kc as nestedRunParentOf, kn as AgentChannels, lu as runOutsideRunFenceScope, m as agentThreadStreamRuntime, qr as dispatchDueNotifications, s as getActiveDurableAgentWorkflowExecutions, u as isDurableAgentExecutionDetached, zc as runFenceConflictOf } from "./run-registry-D5z2YVqJ.js";
|
|
2
|
+
import { s as BackgroundTaskManager } from "./background-tasks-CBp2178j.js";
|
|
3
3
|
import { t as InMemoryServerCache } from "./inmemory-BK3zLwvM.js";
|
|
4
|
-
import { t as DatasetsManager } from "./manager-
|
|
4
|
+
import { t as DatasetsManager } from "./manager-elIuArZa.js";
|
|
5
5
|
import { i as MastraError, n as ErrorDomain, t as ErrorCategory } from "./error-oh2DLsP2.js";
|
|
6
6
|
import { u as isRunLocalTopic, v as EventEmitterPubSub } from "./output-helpers-CVzhy1Y0.js";
|
|
7
7
|
import { a as registerHook, r as deregisterHook } from "./hooks-Bth8Cjpj.js";
|
|
8
8
|
import { LicenseClient } from "./license/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import { l as defaultGateways } from "./llm-
|
|
9
|
+
import { m as getGatewayId } from "./netlify-BpB7PtZV.js";
|
|
10
|
+
import { l as defaultGateways } from "./llm-D3y8qOKL.js";
|
|
11
11
|
import { l as isAdaptableLogger, n as LogLevel, t as ConsoleLogger, u as noopLogger } from "./logger-BwbmRqfc.js";
|
|
12
12
|
import { DualLogger, createExportSuppressedLogger, isObservabilityExportSuppressed, resolveTraceFields } from "./logger/index.js";
|
|
13
13
|
import { c as fsAgentScheduleRowId, g as toEpochMs, h as computeNextFireAt, l as parseFsAgentScheduleRowId, m as computeNextFire, t as Schedules } from "./schedules-DZfSx-7P.js";
|
|
@@ -16,14 +16,14 @@ import { initContextStorage } from "./observability/context-storage.js";
|
|
|
16
16
|
import { f as resolveCurrentSpan } from "./utils-DU_pU5SK.js";
|
|
17
17
|
import { r as InMemoryDB } from "./source-fNa6u1kH.js";
|
|
18
18
|
import { r as trackFeatureUsage } from "./feature-telemetry-DdR8J_5o.js";
|
|
19
|
-
import { r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "./tool-loop-agent-
|
|
19
|
+
import { r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "./tool-loop-agent-DkhFVx0h.js";
|
|
20
20
|
import { r as normalizeToolPayloadTransformPolicy } from "./payload-transform-Dj3HUeD4.js";
|
|
21
|
-
import { v as readPositiveIntEnv } from "./utils-
|
|
22
|
-
import { i as OrchestrationWorker, n as BackgroundTaskWorker, r as SchedulerWorker } from "./worker-
|
|
23
|
-
import { n as normalizeWorkflowBuilderDefinition } from "./builder-
|
|
24
|
-
import { d as toJsonSchemaOrUndefined, p as collectNestedWorkflowIds, t as assertValidDynamicWorkflow } from "./validate-
|
|
25
|
-
import { t as rehydrateWorkflow } from "./rehydrate-
|
|
26
|
-
import { jn as createRunScope } from "./stream-
|
|
21
|
+
import { v as readPositiveIntEnv } from "./utils-BTKpGHA6.js";
|
|
22
|
+
import { i as OrchestrationWorker, n as BackgroundTaskWorker, r as SchedulerWorker } from "./worker-Bo_hTQJC.js";
|
|
23
|
+
import { n as normalizeWorkflowBuilderDefinition } from "./builder-DTEXPju5.js";
|
|
24
|
+
import { d as toJsonSchemaOrUndefined, p as collectNestedWorkflowIds, t as assertValidDynamicWorkflow } from "./validate-D6fUqYGz.js";
|
|
25
|
+
import { t as rehydrateWorkflow } from "./rehydrate-Cw2Id-Uz.js";
|
|
26
|
+
import { jn as createRunScope } from "./stream-DB5efioT.js";
|
|
27
27
|
import { z } from "zod/v4";
|
|
28
28
|
// src/notifications/workflow.ts
|
|
29
29
|
const NOTIFICATION_DISPATCH_WORKFLOW_ID = "__mastra_notification_dispatcher";
|
|
@@ -2868,7 +2868,7 @@ var Mastra = class Mastra {
|
|
|
2868
2868
|
*/
|
|
2869
2869
|
async __ensureExperimentWorkflow() {
|
|
2870
2870
|
if (this.__hasInternalWorkflow("__mastra-experiment")) return;
|
|
2871
|
-
const { buildExperimentWorkflow } = await import("./manager-
|
|
2871
|
+
const { buildExperimentWorkflow } = await import("./manager-elIuArZa.js").then((n) => n.b);
|
|
2872
2872
|
if (this.__hasInternalWorkflow("__mastra-experiment")) return;
|
|
2873
2873
|
this.__registerInternalWorkflow(buildExperimentWorkflow(), void 0, { distributed: true });
|
|
2874
2874
|
}
|
|
@@ -5069,7 +5069,7 @@ var Mastra = class Mastra {
|
|
|
5069
5069
|
if (!this.#workerFilter || this.#workerFilter.has("agent-schedule")) {
|
|
5070
5070
|
let agentScheduleWorker = this.#findAgentScheduleWorker();
|
|
5071
5071
|
if (!agentScheduleWorker) {
|
|
5072
|
-
const { AgentScheduleWorker } = await import("./worker-
|
|
5072
|
+
const { AgentScheduleWorker } = await import("./worker-DC269pGx.js");
|
|
5073
5073
|
agentScheduleWorker = new AgentScheduleWorker();
|
|
5074
5074
|
agentScheduleWorker.__registerMastra(this);
|
|
5075
5075
|
this.#workers.push(agentScheduleWorker);
|
|
@@ -5709,7 +5709,7 @@ var Mastra = class Mastra {
|
|
|
5709
5709
|
this.#workers.push(sw);
|
|
5710
5710
|
}
|
|
5711
5711
|
if (!this.#findAgentScheduleWorker()) {
|
|
5712
|
-
const { AgentScheduleWorker } = await import("./worker-
|
|
5712
|
+
const { AgentScheduleWorker } = await import("./worker-DC269pGx.js");
|
|
5713
5713
|
const asw = new AgentScheduleWorker();
|
|
5714
5714
|
asw.__registerMastra(this);
|
|
5715
5715
|
this.#workers.push(asw);
|
|
@@ -6154,7 +6154,7 @@ var Mastra = class Mastra {
|
|
|
6154
6154
|
#syncGatewayRegistry() {
|
|
6155
6155
|
try {
|
|
6156
6156
|
if (process.env.MASTRA_DEV !== "true" && process.env.MASTRA_DEV !== "1") return;
|
|
6157
|
-
import("./provider-registry-
|
|
6157
|
+
import("./provider-registry-BjdxtGZZ.js").then((n) => n.d).then(async ({ GatewayRegistry }) => {
|
|
6158
6158
|
const registry = GatewayRegistry.getInstance();
|
|
6159
6159
|
const customGateways = Object.values(this.#gateways || {});
|
|
6160
6160
|
registry.registerCustomGateways(customGateways);
|
package/dist/memory/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_run_registry = require("../run-registry-
|
|
3
|
-
const require_stream = require("../stream-
|
|
4
|
-
const require_message_list = require("../message-list-
|
|
2
|
+
const require_run_registry = require("../run-registry-BTFPEkXT.cjs");
|
|
3
|
+
const require_stream = require("../stream-D1OnBHDi.cjs");
|
|
4
|
+
const require_message_list = require("../message-list-vR3uLAHL.cjs");
|
|
5
5
|
exports.AUTHORED_USER_TURN = require_message_list.AUTHORED_USER_TURN;
|
|
6
6
|
exports.DEFAULT_MESSAGE_EMBEDDING_MAX_CHUNK_CHARS = require_run_registry.DEFAULT_MESSAGE_EMBEDDING_MAX_CHUNK_CHARS;
|
|
7
7
|
exports.MESSAGE_EMBEDDING_CHARS_PER_TOKEN = require_run_registry.MESSAGE_EMBEDDING_CHARS_PER_TOKEN;
|
package/dist/memory/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ao as DEFAULT_MESSAGE_EMBEDDING_MAX_CHUNK_CHARS, Bo as memoryDefaultOptions, Fo as messageVectorId, Ho as isSystemReminderMessage, Io as resolveMaxChunkChars, Lo as upsertMessageVectors, Mo as buildMessageEmbeddingRows, No as chunkMessageText, Po as extractMessageEmbeddingText, Ro as MastraMemory, Vo as filterSystemReminderMessages, ar as MockMemory, ds as advanceMemoryTokenBoundary, fs as getMemoryTokenBoundary, ir as getMemoryRunState, jo as MESSAGE_EMBEDDING_CHARS_PER_TOKEN, ls as groupLinkedToolMessages, ms as normalizeMessageHistoryConfig, ps as isAfterMemoryTokenBoundary, rr as MemoryRunState, us as loadMessageHistory, zo as MemoryProcessor } from "../run-registry-
|
|
2
|
-
import { Jt as isObservationalMemoryEnabled, Kt as TITLE_PINNED_THREAD_METADATA_KEY, Xt as parseMemoryRequestContext, Yt as isThreadTitlePinned, Zt as setThreadOMMetadata, qt as getThreadOMMetadata } from "../stream-
|
|
3
|
-
import { $ as AUTHORED_USER_TURN, C as extractWorkingMemoryTags, D as removeWorkingMemoryToolInvocationParts, E as removeWorkingMemoryTags, O as removeWorkingMemoryToolInvocations, S as extractWorkingMemoryContent, T as removeSystemReminderTags, _ as SYSTEM_REMINDER_START_TAG, at as stripClientAuthoredTurnMarks, b as WORKING_MEMORY_START_TAG, et as asUserTurn, g as SYSTEM_REMINDER_END_TAG, h as SET_WORKING_MEMORY_TOOL_NAME, it as sealUserTurnMessage, nt as messageDeclaresAuthoredTurn, rt as sealTurnMarkup, tt as escapeTurnMarkup, v as UPDATE_WORKING_MEMORY_TOOL_NAME, w as isWorkingMemoryToolName, x as WORKING_MEMORY_TOOL_NAMES, y as WORKING_MEMORY_END_TAG } from "../message-list-
|
|
1
|
+
import { Ao as DEFAULT_MESSAGE_EMBEDDING_MAX_CHUNK_CHARS, Bo as memoryDefaultOptions, Fo as messageVectorId, Ho as isSystemReminderMessage, Io as resolveMaxChunkChars, Lo as upsertMessageVectors, Mo as buildMessageEmbeddingRows, No as chunkMessageText, Po as extractMessageEmbeddingText, Ro as MastraMemory, Vo as filterSystemReminderMessages, ar as MockMemory, ds as advanceMemoryTokenBoundary, fs as getMemoryTokenBoundary, ir as getMemoryRunState, jo as MESSAGE_EMBEDDING_CHARS_PER_TOKEN, ls as groupLinkedToolMessages, ms as normalizeMessageHistoryConfig, ps as isAfterMemoryTokenBoundary, rr as MemoryRunState, us as loadMessageHistory, zo as MemoryProcessor } from "../run-registry-D5z2YVqJ.js";
|
|
2
|
+
import { Jt as isObservationalMemoryEnabled, Kt as TITLE_PINNED_THREAD_METADATA_KEY, Xt as parseMemoryRequestContext, Yt as isThreadTitlePinned, Zt as setThreadOMMetadata, qt as getThreadOMMetadata } from "../stream-DB5efioT.js";
|
|
3
|
+
import { $ as AUTHORED_USER_TURN, C as extractWorkingMemoryTags, D as removeWorkingMemoryToolInvocationParts, E as removeWorkingMemoryTags, O as removeWorkingMemoryToolInvocations, S as extractWorkingMemoryContent, T as removeSystemReminderTags, _ as SYSTEM_REMINDER_START_TAG, at as stripClientAuthoredTurnMarks, b as WORKING_MEMORY_START_TAG, et as asUserTurn, g as SYSTEM_REMINDER_END_TAG, h as SET_WORKING_MEMORY_TOOL_NAME, it as sealUserTurnMessage, nt as messageDeclaresAuthoredTurn, rt as sealTurnMarkup, tt as escapeTurnMarkup, v as UPDATE_WORKING_MEMORY_TOOL_NAME, w as isWorkingMemoryToolName, x as WORKING_MEMORY_TOOL_NAMES, y as WORKING_MEMORY_END_TAG } from "../message-list-BGm1DCiG.js";
|
|
4
4
|
export { AUTHORED_USER_TURN, DEFAULT_MESSAGE_EMBEDDING_MAX_CHUNK_CHARS, MESSAGE_EMBEDDING_CHARS_PER_TOKEN, MastraMemory, MemoryProcessor, MemoryRunState, MockMemory, SET_WORKING_MEMORY_TOOL_NAME, SYSTEM_REMINDER_END_TAG, SYSTEM_REMINDER_START_TAG, TITLE_PINNED_THREAD_METADATA_KEY, UPDATE_WORKING_MEMORY_TOOL_NAME, WORKING_MEMORY_END_TAG, WORKING_MEMORY_START_TAG, WORKING_MEMORY_TOOL_NAMES, advanceMemoryTokenBoundary, asUserTurn, buildMessageEmbeddingRows, chunkMessageText, escapeTurnMarkup, extractMessageEmbeddingText, extractWorkingMemoryContent, extractWorkingMemoryTags, filterSystemReminderMessages, getMemoryRunState, getMemoryTokenBoundary, getThreadOMMetadata, groupLinkedToolMessages, isAfterMemoryTokenBoundary, isObservationalMemoryEnabled, isSystemReminderMessage, isThreadTitlePinned, isWorkingMemoryToolName, loadMessageHistory, memoryDefaultOptions, messageDeclaresAuthoredTurn, messageVectorId, normalizeMessageHistoryConfig, parseMemoryRequestContext, removeSystemReminderTags, removeWorkingMemoryTags, removeWorkingMemoryToolInvocationParts, removeWorkingMemoryToolInvocations, resolveMaxChunkChars, sealTurnMarkup, sealUserTurnMessage, setThreadOMMetadata, stripClientAuthoredTurnMarks, upsertMessageVectors };
|