@mastra/core 1.87.0-alpha.18 → 1.87.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_types/@internal_ai-v6@0.0.99/dist/index.d.ts +2075 -123
- package/dist/_types/@internal_core@0.1.4/dist/knowledge-compat/index.d.ts +30 -3
- package/dist/agent/agent.d.ts +2 -4
- package/dist/agent/agent.types.d.ts +1 -0
- package/dist/agent/durable/index.cjs +86 -86
- package/dist/agent/durable/index.js +2 -2
- package/dist/agent/durable/run-registry.d.ts +54 -25
- package/dist/agent/index.cjs +16 -16
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.js +3 -3
- package/dist/agent/scopes.d.ts +8 -0
- package/dist/agent/types.d.ts +1 -0
- 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 +8 -1
- package/dist/agent-controller/index.cjs +3 -3
- package/dist/agent-controller/index.js +3 -3
- package/dist/{agent-controller-D_OKCLUP.cjs → agent-controller-DzOEhUjR.cjs} +39 -35
- package/dist/{agent-controller-UZNIM4h-.js → agent-controller-lBdNfcFi.js} +15 -11
- package/dist/{agent-skills-resolver-BMoCDoaK.cjs → agent-skills-resolver-2d8k7ioj.cjs} +134 -109
- package/dist/{agent-skills-resolver-CUEIMDbx.js → agent-skills-resolver-D2HktP6Y.js} +134 -109
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-CioDMzgY.js → background-tasks-DAu4WaCb.js} +1 -1
- package/dist/{background-tasks-CLWnX7SN.cjs → background-tasks-DOmQdBVn.cjs} +1 -1
- package/dist/browser/index.cjs +4 -4
- package/dist/browser/index.js +4 -4
- package/dist/{builder-BC4l-RN5.cjs → builder-BFcVEbX0.cjs} +3 -3
- package/dist/{builder-CQLqpQO_.js → builder-DHFtMW8D.js} +2 -2
- package/dist/capabilities/302ai.json +198 -198
- package/dist/capabilities/abacus.json +2 -96
- package/dist/capabilities/abliteratedllm.json +36 -36
- package/dist/capabilities/abliteration-ai.json +11 -11
- package/dist/capabilities/above.json +19 -19
- package/dist/capabilities/adaption.json +11 -11
- package/dist/capabilities/adzuki.json +32 -32
- package/dist/capabilities/agentrouter.json +12 -12
- package/dist/capabilities/agnes.json +4 -4
- package/dist/capabilities/ai-router.json +5 -5
- package/dist/capabilities/aiand.json +25 -25
- package/dist/capabilities/aigrow.json +13 -13
- package/dist/capabilities/aimlapi.json +144 -144
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +24 -24
- package/dist/capabilities/aki-io.json +12 -12
- package/dist/capabilities/alibaba-cn.json +81 -126
- package/dist/capabilities/alibaba-coding-plan-cn.json +4 -4
- package/dist/capabilities/alibaba-coding-plan.json +4 -4
- package/dist/capabilities/alibaba-token-plan-cn.json +57 -53
- package/dist/capabilities/alibaba-token-plan.json +57 -53
- package/dist/capabilities/alibaba.json +76 -71
- package/dist/capabilities/ambient.json +14 -32
- package/dist/capabilities/amd-tokenlab.json +41 -0
- package/dist/capabilities/amd.json +8 -8
- package/dist/capabilities/anthropic.json +32 -56
- package/dist/capabilities/anyapi.json +47 -47
- package/dist/capabilities/apiko.json +5 -5
- package/dist/capabilities/arcee.json +5 -5
- package/dist/capabilities/augure.json +4 -4
- package/dist/capabilities/auriko.json +15 -15
- package/dist/capabilities/bailing.json +3 -3
- package/dist/capabilities/baseten.json +35 -35
- package/dist/capabilities/bee.json +5 -5
- package/dist/capabilities/berget.json +2 -35
- package/dist/capabilities/bothub.json +14 -14
- package/dist/capabilities/boundless.json +39 -39
- package/dist/capabilities/bumo.json +40 -40
- package/dist/capabilities/byteplus.json +28 -28
- package/dist/capabilities/cheapest-token.json +31 -31
- package/dist/capabilities/chutes.json +48 -17
- package/dist/capabilities/cline-pass.json +32 -45
- package/dist/capabilities/cloudcode.json +8 -8
- package/dist/capabilities/cloudferro-sherlock.json +4 -4
- package/dist/capabilities/cloudflare-workers-ai.json +17 -17
- package/dist/capabilities/commandcode.json +141 -156
- package/dist/capabilities/concentrate.json +289 -289
- package/dist/capabilities/cortecs.json +103 -103
- package/dist/capabilities/crossmodel.json +194 -194
- package/dist/capabilities/crusoe.json +18 -18
- package/dist/capabilities/daoxe.json +9 -9
- package/dist/capabilities/databricks.json +128 -128
- package/dist/capabilities/deepinfra.json +98 -94
- package/dist/capabilities/deepseek.json +4 -4
- package/dist/capabilities/digitalocean.json +114 -114
- package/dist/capabilities/dinference.json +1 -2
- package/dist/capabilities/dothoosh.json +26 -26
- package/dist/capabilities/doubleword.json +23 -23
- package/dist/capabilities/edenai.json +285 -285
- package/dist/capabilities/empiriolabs.json +176 -167
- package/dist/capabilities/engy.json +16 -16
- package/dist/capabilities/entrim.json +8 -8
- package/dist/capabilities/evroc.json +15 -15
- package/dist/capabilities/ezkielyna.json +10 -10
- package/dist/capabilities/fastrouter.json +93 -97
- package/dist/capabilities/fireworks-ai.json +85 -85
- package/dist/capabilities/fortytwo.json +4 -4
- package/dist/capabilities/freemodel.json +7 -51
- package/dist/capabilities/friendli.json +8 -8
- package/dist/capabilities/frogbot.json +95 -103
- package/dist/capabilities/gisoo.json +15 -15
- package/dist/capabilities/gmicloud.json +21 -21
- package/dist/capabilities/google.json +55 -55
- package/dist/capabilities/graphn.json +10 -10
- package/dist/capabilities/greenpt.json +35 -35
- package/dist/capabilities/groq.json +7 -20
- package/dist/capabilities/helicone.json +84 -86
- package/dist/capabilities/hetzner.json +4 -4
- package/dist/capabilities/hopper.json +2 -2
- package/dist/capabilities/hostinger-router.json +5 -5
- package/dist/capabilities/hpc-ai.json +8 -24
- package/dist/capabilities/huawei-maas.json +13 -13
- package/dist/capabilities/hubris.json +30 -30
- package/dist/capabilities/huggingface.json +86 -101
- package/dist/capabilities/hyper.json +24 -24
- package/dist/capabilities/impossibl.json +152 -199
- package/dist/capabilities/inceptron.json +8 -8
- package/dist/capabilities/inco.json +4 -21
- package/dist/capabilities/infer.json +16 -16
- package/dist/capabilities/inferall.json +2 -18
- package/dist/capabilities/inference-coop.json +6 -6
- package/dist/capabilities/inference.json +2 -11
- package/dist/capabilities/inferenceapis.json +24 -24
- package/dist/capabilities/infersia.json +13 -13
- package/dist/capabilities/inferx.json +3 -3
- package/dist/capabilities/infomaniak.json +3 -3
- package/dist/capabilities/io-net.json +6 -16
- package/dist/capabilities/isoquant.json +4 -4
- package/dist/capabilities/iteracompute.json +42 -80
- package/dist/capabilities/jalapeno.json +11 -11
- package/dist/capabilities/jiekou.json +19 -167
- package/dist/capabilities/joingonka.json +4 -4
- package/dist/capabilities/jzstoken.json +54 -54
- package/dist/capabilities/keln.json +23 -23
- package/dist/capabilities/kenari.json +122 -130
- package/dist/capabilities/kilo.json +649 -647
- package/dist/capabilities/kimi-code-plan-cn.json +7 -7
- package/dist/capabilities/kimi-code-plan-global.json +7 -7
- package/dist/capabilities/kitani.json +4 -4
- package/dist/capabilities/klavo.json +24 -24
- package/dist/capabilities/korouter.json +32 -32
- package/dist/capabilities/kunavo.json +7 -7
- package/dist/capabilities/liquid.json +8 -8
- package/dist/capabilities/lithosai.json +3 -3
- package/dist/capabilities/llmgateway-providers.json +885 -893
- package/dist/capabilities/llmgateway.json +340 -340
- package/dist/capabilities/llmtr.json +16 -54
- package/dist/capabilities/lowrouter.json +61 -61
- package/dist/capabilities/lyceum.json +14 -14
- package/dist/capabilities/meganova.json +0 -1
- package/dist/capabilities/melious.json +14 -14
- package/dist/capabilities/merge-gateway.json +292 -292
- package/dist/capabilities/meta.json +11 -11
- package/dist/capabilities/minimax-cn-coding-plan.json +2 -2
- package/dist/capabilities/minimax-cn.json +5 -5
- package/dist/capabilities/minimax-coding-plan.json +2 -2
- package/dist/capabilities/minimax.json +5 -5
- package/dist/capabilities/mistral.json +15 -31
- package/dist/capabilities/mixlayer.json +5 -5
- package/dist/capabilities/moark.json +0 -2
- package/dist/capabilities/modal.json +8 -8
- package/dist/capabilities/model-oracle-ai.json +19 -27
- package/dist/capabilities/modelis.json +14 -14
- package/dist/capabilities/modelscope.json +2 -2
- package/dist/capabilities/modular.json +11 -11
- package/dist/capabilities/moneo.json +7 -38
- 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 +10 -10
- package/dist/capabilities/nan.json +31 -31
- package/dist/capabilities/nano-gpt.json +581 -603
- package/dist/capabilities/nearai.json +119 -119
- package/dist/capabilities/nebius.json +30 -31
- package/dist/capabilities/neon.json +132 -132
- package/dist/capabilities/neuralwatt.json +41 -41
- package/dist/capabilities/nokeep.json +5 -5
- package/dist/capabilities/novita-ai.json +113 -227
- package/dist/capabilities/nvidia.json +14 -82
- package/dist/capabilities/oathbreaker.json +2 -2
- package/dist/capabilities/obscurify.json +28 -28
- package/dist/capabilities/oci.json +4 -4
- package/dist/capabilities/ofox.json +270 -270
- package/dist/capabilities/ollama-cloud.json +53 -53
- package/dist/capabilities/openai.json +57 -57
- package/dist/capabilities/opencode-go.json +88 -90
- package/dist/capabilities/openreason.json +5 -5
- package/dist/capabilities/openrouter.json +574 -563
- package/dist/capabilities/opper.json +29 -34
- package/dist/capabilities/orcarouter.json +307 -367
- package/dist/capabilities/outerlabs.json +30 -30
- package/dist/capabilities/ovhcloud.json +19 -19
- package/dist/capabilities/pareto.json +2 -7
- package/dist/capabilities/perplexity-agent.json +47 -102
- package/dist/capabilities/perplexity.json +2 -2
- package/dist/capabilities/phala.json +35 -35
- package/dist/capabilities/pioneer.json +5 -122
- package/dist/capabilities/poe.json +130 -130
- package/dist/capabilities/poolside.json +2 -2
- package/dist/capabilities/powerspring.json +14 -14
- package/dist/capabilities/primalabs.json +12 -12
- package/dist/capabilities/prime.json +123 -115
- package/dist/capabilities/privatemode-ai.json +8 -36
- package/dist/capabilities/proxystacks.json +5 -5
- package/dist/capabilities/qihang-ai.json +3 -15
- package/dist/capabilities/qiniu-ai.json +13 -87
- package/dist/capabilities/refuseless.json +7 -14
- package/dist/capabilities/regolo-ai.json +9 -13
- package/dist/capabilities/requesty.json +202 -202
- package/dist/capabilities/routing-run.json +3 -40
- package/dist/capabilities/ruapi.json +21 -21
- package/dist/capabilities/runcrate.json +10 -10
- package/dist/capabilities/runinfra.json +16 -16
- package/dist/capabilities/sakana.json +3 -3
- package/dist/capabilities/sambanova.json +9 -9
- package/dist/capabilities/sandbase.json +20 -20
- package/dist/capabilities/sarvam.json +22 -13
- package/dist/capabilities/scaleway.json +18 -18
- package/dist/capabilities/scnet-token-plan.json +7 -7
- package/dist/capabilities/scx-ai.json +16 -32
- package/dist/capabilities/sensenova.json +12 -12
- package/dist/capabilities/siliconflow-cn.json +45 -97
- package/dist/capabilities/siliconflow.json +53 -53
- package/dist/capabilities/snowflake-cortex.json +26 -26
- package/dist/capabilities/sokkan.json +8 -20
- package/dist/capabilities/sparrowcodes.json +21 -21
- package/dist/capabilities/stackit.json +1 -2
- package/dist/capabilities/standardcompute.json +84 -120
- package/dist/capabilities/steadyrouter.json +41 -41
- package/dist/capabilities/stepfun-ai-step-plan.json +8 -8
- package/dist/capabilities/stepfun-ai.json +8 -8
- package/dist/capabilities/stepfun-step-plan.json +8 -8
- package/dist/capabilities/stepfun.json +8 -8
- package/dist/capabilities/stepping-stone.json +15 -15
- package/dist/capabilities/subconscious.json +2 -2
- package/dist/capabilities/superbot-gg.json +4 -4
- package/dist/capabilities/synthetic.json +8 -17
- package/dist/capabilities/synthorai.json +21 -21
- package/dist/capabilities/teamorouter.json +23 -23
- package/dist/capabilities/teapot-router.json +10 -10
- package/dist/capabilities/tencent-token-plan-intl.json +25 -25
- package/dist/capabilities/tencent-token-plan.json +38 -38
- package/dist/capabilities/tencent-tokenhub.json +46 -46
- package/dist/capabilities/tensorx.json +48 -48
- package/dist/capabilities/tenstorrent.json +4 -4
- package/dist/capabilities/the-grid-ai.json +29 -29
- package/dist/capabilities/thinkingmachines.json +71 -71
- package/dist/capabilities/tinfoil.json +8 -8
- package/dist/capabilities/toapis.json +3 -3
- package/dist/capabilities/togetherai.json +42 -42
- package/dist/capabilities/tokengo.json +21 -21
- package/dist/capabilities/tokenify.json +2 -2
- package/dist/capabilities/trustedrouter.json +5 -5
- package/dist/capabilities/trustedtokens.json +15 -15
- package/dist/capabilities/umans-ai-coding-plan.json +16 -16
- package/dist/capabilities/umans-ai.json +13 -13
- package/dist/capabilities/uncensuredai.json +4 -4
- package/dist/capabilities/unorouter.json +1 -22
- package/dist/capabilities/unrestricted.json +4 -20
- package/dist/capabilities/uplinkswitch.json +21 -21
- package/dist/capabilities/upstage.json +3 -15
- package/dist/capabilities/vancine.json +20 -20
- package/dist/capabilities/vercel.json +551 -551
- package/dist/capabilities/vivgrid.json +51 -131
- package/dist/capabilities/volcengine-coding-plan.json +29 -29
- package/dist/capabilities/volcengine.json +27 -27
- package/dist/capabilities/vultr.json +14 -67
- package/dist/capabilities/wafer.ai.json +17 -17
- package/dist/capabilities/wallaby.json +2 -2
- package/dist/capabilities/wally.json +12 -12
- package/dist/capabilities/wandb.json +21 -21
- package/dist/capabilities/watt.json +22 -22
- 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 +13 -13
- package/dist/capabilities/xxapi.json +30 -30
- package/dist/capabilities/zai-coding-plan.json +17 -17
- package/dist/capabilities/zai.json +31 -31
- package/dist/capabilities/zenifra.json +26 -26
- package/dist/capabilities/zenmux.json +190 -233
- package/dist/capabilities/zerogpu.json +8 -8
- package/dist/capabilities/zhipuai-coding-plan.json +3 -14
- package/dist/capabilities/zhipuai.json +30 -30
- package/dist/capabilities/zro.json +6 -6
- package/dist/channels/index.cjs +24 -24
- package/dist/channels/index.js +2 -2
- package/dist/{channels-Bemsws_d.js → channels-BBwgs50q.js} +2 -2
- package/dist/{channels-B7-KI9Ob.cjs → channels-CbhgGgQD.cjs} +6 -6
- package/dist/coding-agent/index.cjs +7 -7
- package/dist/coding-agent/index.js +4 -4
- package/dist/{constants-CFO8w780.cjs → constants-B2FVV_2e.cjs} +1 -1
- package/dist/{constants-CUv0mU2y.js → constants-Dro9fuhk.js} +1 -1
- package/dist/datasets/index.cjs +9 -9
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1147 -1142
- package/dist/docs/references/docs-agents-overview.md +9 -0
- package/dist/docs/references/docs-deployment-workers.md +1 -1
- package/dist/docs/references/docs-harness-background-tasks.md +8 -5
- package/dist/docs/references/docs-harness-durable-agents.md +1 -0
- package/dist/docs/references/docs-knowledge-search.md +1 -1
- package/dist/docs/references/docs-server-pubsub.md +1 -1
- package/dist/docs/references/docs-skills.md +4 -1
- package/dist/docs/references/docs-workflows-overview.md +2 -0
- package/dist/docs/references/reference-agents-createSkill.md +20 -1
- package/dist/docs/references/reference-knowledge-knowledge-tools.md +1 -2
- package/dist/docs/references/reference-observability-metrics-metrics-context.md +63 -3
- package/dist/docs/references/reference-pubsub-base.md +1 -1
- package/dist/docs/references/reference-pubsub-redis-streams.md +3 -5
- package/dist/docs/references/reference-pubsub-valkey-streams.md +2 -2
- package/dist/docs/references/reference-templates-overview.md +31 -1
- package/dist/docs/references/reference-workflows-run-methods-restart.md +2 -0
- package/dist/evals/index.cjs +13 -13
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +4 -4
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/events/index.cjs +1 -1
- package/dist/events/index.js +1 -1
- package/dist/events/pubsub.d.ts +1 -3
- package/dist/{run-registry-Cu9CK7AR.js → execution-fence-B8yV_n51.js} +62508 -62052
- package/dist/{run-registry-CXeR1Qso.cjs → execution-fence-fqV6FGdV.cjs} +63621 -63153
- package/dist/harness/index.cjs +3 -3
- package/dist/harness/index.js +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/integration/index.cjs +1 -1
- package/dist/integration/index.js +1 -1
- package/dist/knowledge/index.cjs +163 -153
- package/dist/knowledge/index.js +18 -8
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/gateways/opencode-session-header.d.ts +28 -0
- package/dist/llm/model/provider-types.generated.d.ts +7412 -7795
- package/dist/llm/model/resolve-model.d.ts +1 -0
- package/dist/llm/model/shared.types.d.ts +1 -0
- package/dist/{llm-ZA8oIVog.cjs → llm-B7ul27Ay.cjs} +32 -14
- package/dist/{llm-DCoDWje0.js → llm-Cy3WZXgA.js} +32 -14
- package/dist/loop/index.cjs +15 -15
- package/dist/loop/index.js +2 -2
- package/dist/loop/server.cjs +1 -1
- package/dist/loop/server.js +1 -1
- package/dist/{manager-oP6iB_H-.cjs → manager-CY-RzZJL.cjs} +21 -19
- package/dist/{manager-DSbR85XK.js → manager-Dsub5fyz.js} +9 -7
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.d.ts +33 -4
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-FEJ-anIN.cjs → mastra-DXQUuwFl.cjs} +116 -67
- package/dist/{mastra-RgFRZ_Az.js → mastra-yjoYfTS5.js} +76 -27
- package/dist/memory/index.cjs +24 -24
- package/dist/memory/index.js +2 -2
- package/dist/memory/mock.d.ts +2 -3
- package/dist/{model-opyZwnK3.cjs → model-BARBpXDN.cjs} +2 -2
- package/dist/{model-DSBVKOW8.js → model-DauH8JTo.js} +2 -2
- package/dist/{netlify-BqMGvc2s.js → netlify-BNBtKR4Q.js} +86 -4
- package/dist/{netlify-DzturPW3.cjs → netlify-DGsETiFB.cjs} +97 -3
- package/dist/notifications/index.cjs +18 -18
- package/dist/notifications/index.js +2 -2
- package/dist/observability/index.cjs +1 -1
- package/dist/observability/index.js +1 -1
- package/dist/{observability-D7RNOAPx.js → observability-DPDWibyH.js} +648 -648
- package/dist/{output-helpers-DgsH4aTb.cjs → output-helpers-By5FbLpp.cjs} +71 -73
- package/dist/{output-helpers-CVzhy1Y0.js → output-helpers-k2-48ssH.js} +72 -74
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +65 -65
- package/dist/processors/index.js +2 -2
- package/dist/{provider-registry-BcG2ooFa.js → provider-registry-CfHy4Zhw.js} +21401 -22401
- package/dist/{provider-registry-BZw14X9M.cjs → provider-registry-Y6tbfFhH.cjs} +21401 -22401
- package/dist/provider-registry.json +21940 -22961
- package/dist/{registry-generator-BrzPSCHS.cjs → registry-generator-BEJ0APNc.cjs} +1 -1
- package/dist/{registry-generator-CA4YBIHo.js → registry-generator-DJiQAI8V.js} +1 -1
- package/dist/{rehydrate-CfS6KkCr.cjs → rehydrate-4Sl7D3kO.cjs} +14 -14
- package/dist/{rehydrate-Chuw5IrY.js → rehydrate-Da4_E_N8.js} +2 -2
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +2 -2
- package/dist/{signal-provider-BslnAjWG.js → signal-provider-B_mfW-J4.js} +1 -1
- package/dist/{signal-provider-BFAvh_AJ.cjs → signal-provider-D9gbevHN.cjs} +1 -1
- package/dist/signals/index.cjs +3 -3
- package/dist/signals/index.js +3 -3
- package/dist/{signals-CbmgVwL-.cjs → signals-BwDXGqxc.cjs} +2 -2
- package/dist/{signals-Clupx3jz.js → signals-TznxWfM3.js} +2 -2
- package/dist/skills/create-skill.d.ts +3 -0
- package/dist/skills/index.cjs +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/inline-skill-source.d.ts +5 -1
- package/dist/skills/types.d.ts +16 -1
- package/dist/{source-DYZMfjv3.js → source-B3He4_mz.js} +1 -1
- package/dist/{source-BC8Et5qZ.cjs → source-C_nWbqI0.cjs} +1 -1
- package/dist/{state-processor-B9kxpM53.js → state-processor-B_KsS82m.js} +1 -1
- package/dist/{state-processor-kRNZ38Nf.cjs → state-processor-DaSmhVUX.cjs} +1 -1
- package/dist/storage/constants.cjs +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/agents/index.cjs +1 -1
- package/dist/storage/domains/agents/index.js +1 -1
- package/dist/storage/domains/inmemory-db.d.ts +1 -1
- package/dist/storage/domains/knowledge/pages.d.ts +8 -1
- package/dist/storage/domains/memory/base.d.ts +19 -9
- package/dist/storage/domains/memory/inmemory.d.ts +4 -1
- package/dist/storage/domains/memory/queue-thread.d.ts +7 -1
- package/dist/storage/domains/workflows/base.d.ts +18 -5
- package/dist/storage/domains/workflows/inmemory.d.ts +3 -5
- package/dist/storage/domains/workflows/journal.d.ts +16 -1
- package/dist/storage/index.cjs +187 -186
- package/dist/storage/index.js +6 -6
- package/dist/storage/workflow-snapshot.d.ts +4 -0
- package/dist/storage/workflow-step-guard.d.ts +5 -0
- package/dist/stream/base/output.d.ts +1 -0
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-DTpp9Tk-.js → stream-BFhCDJvz.js} +18 -8
- package/dist/{stream-CiXZtgym.cjs → stream-CZy8XA_q.cjs} +23 -7
- package/dist/telemetry/index.cjs +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/test-utils/llm-mock.cjs +1 -1
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/{tool-Z3bykc1m.js → tool-DIFduuTw.js} +2 -5
- package/dist/{tool-CYlT2UA-.cjs → tool-Dn9WSDVn.cjs} +2 -5
- package/dist/tool-loop-agent/index.cjs +1 -1
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/{tool-loop-agent-DtEg90Zj.cjs → tool-loop-agent-DifR6VLI.cjs} +4 -4
- package/dist/{tool-loop-agent-CqzgY98a.js → tool-loop-agent-SOpIJRws.js} +3 -3
- package/dist/{toolchecks-DrsZdc3S.js → toolchecks-CRAfUe9H.js} +1 -1
- package/dist/{toolchecks-MFU48cit.cjs → toolchecks-DbBsQGHW.cjs} +1 -1
- package/dist/tools/index.cjs +5 -5
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +5 -5
- package/dist/tools/is-vercel-tool.cjs +1 -1
- package/dist/tools/is-vercel-tool.js +1 -1
- package/dist/tools/tool.d.ts +2 -4
- package/dist/tools/types.d.ts +1 -0
- package/dist/{tools-BEYxowf0.cjs → tools-C2q0ougI.cjs} +1 -1
- package/dist/{tools-tPy2FwMI.js → tools-ybbz1YKg.js} +1 -1
- package/dist/{utils-B_y5EDSz.cjs → utils-BjFntMW_.cjs} +6 -5
- package/dist/{utils-tRzJ8Xfy.js → utils-DN_kWhH6.js} +6 -5
- package/dist/utils.cjs +3 -3
- package/dist/utils.js +3 -3
- package/dist/{validate-DpK_G9aa.cjs → validate-CBQ0dMBb.cjs} +1 -1
- package/dist/{validate-hFVBw9Sw.js → validate-KIBMWuyc.js} +1 -1
- package/dist/vector/index.cjs +8 -8
- package/dist/vector/index.js +1 -1
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/{worker-BFAw0uVe.js → worker-Bqg7bsxX.js} +8 -3
- package/dist/{worker-BhaB8pNL.cjs → worker-CJ_JYSy0.cjs} +3 -3
- package/dist/{worker-KkDudGwX.cjs → worker-Ct6E5_2p.cjs} +16 -11
- package/dist/{worker-m_uyOwiv.js → worker-DVM_pvH7.js} +2 -2
- package/dist/{workflow-Uroh6hlJ.js → workflow-BmShpn3p.js} +4 -4
- package/dist/{workflow-BwKfyvhR.cjs → workflow-DEAvg0pI.cjs} +8 -8
- package/dist/workflows/builder/index.cjs +1 -1
- package/dist/workflows/builder/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/evented/workflow-event-processor/index.d.ts +0 -2
- package/dist/workflows/evented/workflow.d.ts +2 -1
- package/dist/workflows/index.cjs +54 -54
- package/dist/workflows/index.js +4 -4
- package/dist/workflows/run-storage.d.ts +16 -1
- package/dist/workflows/types.d.ts +10 -0
- package/dist/workflows/workflow.d.ts +3 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/{workspace-CzzrnE6Q.cjs → workspace-BQD4tcQi.cjs} +3 -3
- package/dist/{workspace-Ct2kAiDv.js → workspace-sqcfdZRR.js} +2 -2
- package/package.json +9 -8
- package/skills/mastra/SKILL.md +171 -0
- package/skills/mastra/references/common-errors.md +557 -0
- package/skills/mastra/references/core-concepts.md +21 -0
- package/skills/mastra/references/create-mastra.md +233 -0
- package/skills/mastra/references/embedded-docs.md +103 -0
- package/skills/mastra/references/feedback.md +69 -0
- package/skills/mastra/references/gateway.md +66 -0
- package/skills/mastra/references/mastra-api.md +222 -0
- package/skills/mastra/references/migration-guide.md +185 -0
- package/skills/mastra/references/model-selection.md +29 -0
- package/skills/mastra/references/platform.md +164 -0
- package/skills/mastra/references/remote-docs.md +193 -0
- package/skills/mastra/references/trace-query.md +150 -0
- package/skills/mastra/scripts/provider-registry.mjs +271 -0
- package/src/llm/model/provider-types.generated.d.ts +7412 -7795
- package/dist/{observability-B0R_D1PZ.cjs → observability-VaoaeadK.cjs} +647 -647
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Docs for this @mastra/core version are bundled at node_modules/@mastra/core/dist/docs/SKILL.md. Read it before guessing APIs from these types. */
|
|
1
2
|
import type { Mastra } from '../../mastra/index.js';
|
|
2
3
|
import { RequestContext } from '../../request-context/index.js';
|
|
3
4
|
import type { DynamicArgument } from '../../types/index.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Docs for this @mastra/core version are bundled at node_modules/@mastra/core/dist/docs/SKILL.md. Read it before guessing APIs from these types. */
|
|
1
2
|
import type { LanguageModelV2, LanguageModelV2CallOptions, SharedV2ProviderOptions } from '../../_types/@ai-sdk_provider@2.0.5/dist/index.js';
|
|
2
3
|
import type { LanguageModelV3, LanguageModelV3CallOptions, SharedV3ProviderOptions } from '../../_types/@ai-sdk_provider@3.0.19/dist/index.js';
|
|
3
4
|
import type { LanguageModelV4, LanguageModelV4CallOptions, SharedV4ProviderOptions } from '../../_types/@ai-sdk_provider@4.0.38/dist/index.js';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-BrhgMLW6.cjs");
|
|
2
|
-
const require_netlify = require("./netlify-
|
|
2
|
+
const require_netlify = require("./netlify-DGsETiFB.cjs");
|
|
3
3
|
const require_model = require("./model-jBymoqGa.cjs");
|
|
4
4
|
const require_to_prompt = require("./to-prompt-CG-LyaBY.cjs");
|
|
5
5
|
const require_content = require("./content-CC0W1d5p.cjs");
|
|
6
|
-
const require_provider_registry = require("./provider-registry-
|
|
6
|
+
const require_provider_registry = require("./provider-registry-Y6tbfFhH.cjs");
|
|
7
7
|
const require_error = require("./error-D90lJ6M7.cjs");
|
|
8
8
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
9
9
|
const require_dynamic_argument = require("./dynamic-argument-CUc1BBOS.cjs");
|
|
10
10
|
const require_inmemory = require("./inmemory-Dc86VWGB.cjs");
|
|
11
11
|
let zod_v4 = require("zod/v4");
|
|
12
12
|
zod_v4 = require_rolldown_runtime.__toESM(zod_v4, 1);
|
|
13
|
-
let zod_v3 = require("zod/v3");
|
|
14
13
|
let crypto = require("crypto");
|
|
14
|
+
let zod_v3 = require("zod/v3");
|
|
15
15
|
let ws = require("ws");
|
|
16
16
|
ws = require_rolldown_runtime.__toESM(ws, 1);
|
|
17
17
|
// src/stream/types.ts
|
|
@@ -8691,6 +8691,19 @@ function mergeHeaders(baseHeaders, authHeaders) {
|
|
|
8691
8691
|
...authHeaders
|
|
8692
8692
|
};
|
|
8693
8693
|
}
|
|
8694
|
+
/**
|
|
8695
|
+
* Applies the OpenCode Go call-time session mapping to sanitized call options,
|
|
8696
|
+
* returning a shallow copy only when the headers actually change. The derived
|
|
8697
|
+
* session is only used on the options handed to the provider delegate - it is
|
|
8698
|
+
* never fed back into model resolution or the model cache key.
|
|
8699
|
+
*/
|
|
8700
|
+
function withOpencodeCallTimeSessionHeaders(providerId, modelHeaders, options) {
|
|
8701
|
+
const headers = require_netlify.applyOpencodeCallTimeSessionHeader(providerId, modelHeaders, options.headers);
|
|
8702
|
+
return headers === options.headers ? options : {
|
|
8703
|
+
...options,
|
|
8704
|
+
headers
|
|
8705
|
+
};
|
|
8706
|
+
}
|
|
8694
8707
|
var ModelRouterLanguageModel = class ModelRouterLanguageModel {
|
|
8695
8708
|
specificationVersion = "v2";
|
|
8696
8709
|
defaultObjectGenerationMode = "json";
|
|
@@ -8927,15 +8940,17 @@ var ModelRouterLanguageModel = class ModelRouterLanguageModel {
|
|
|
8927
8940
|
} }) };
|
|
8928
8941
|
}
|
|
8929
8942
|
const sanitizedOptions = this.stripUnsupportedSamplingParams(options);
|
|
8943
|
+
const modelHeaders = mergeHeaders(this.config.headers, auth.headers);
|
|
8930
8944
|
const model = await this.resolveLanguageModel({
|
|
8931
8945
|
apiKey: auth.apiKey ?? "",
|
|
8932
8946
|
auth,
|
|
8933
|
-
headers:
|
|
8947
|
+
headers: modelHeaders,
|
|
8934
8948
|
...resolved
|
|
8935
8949
|
});
|
|
8936
|
-
|
|
8937
|
-
if (
|
|
8938
|
-
return new
|
|
8950
|
+
const requestOptions = withOpencodeCallTimeSessionHeaders(resolved.providerId, modelHeaders, sanitizedOptions);
|
|
8951
|
+
if (isLanguageModelV4(model)) return new AISDKV7LanguageModel(model).doGenerate(requestOptions);
|
|
8952
|
+
if (isLanguageModelV3(model)) return new AISDKV6LanguageModel(model).doGenerate(requestOptions);
|
|
8953
|
+
return new require_model.AISDKV5LanguageModel(model).doGenerate(requestOptions);
|
|
8939
8954
|
}
|
|
8940
8955
|
async doStream(options) {
|
|
8941
8956
|
const resolved = this.#manager.resolveModelId(this.config.routerId);
|
|
@@ -8954,26 +8969,28 @@ var ModelRouterLanguageModel = class ModelRouterLanguageModel {
|
|
|
8954
8969
|
const sanitizedOptions = this.stripUnsupportedSamplingParams(options);
|
|
8955
8970
|
const { transport, websocket } = getOpenAITransport(sanitizedOptions.providerOptions, resolved.providerId);
|
|
8956
8971
|
const resolvedTransport = (transport === "auto" ? "websocket" : transport) === "websocket" && !this.config.url && (this.gatewayId === "models.dev" && OPENAI_WS_ALLOWLIST.has(this.provider) || this.gatewayId === "azure-openai") ? "websocket" : "fetch";
|
|
8972
|
+
const modelHeaders = mergeHeaders(this.config.headers, auth.headers);
|
|
8957
8973
|
const model = await this.resolveLanguageModel({
|
|
8958
8974
|
apiKey: auth.apiKey ?? "",
|
|
8959
8975
|
auth,
|
|
8960
|
-
headers:
|
|
8976
|
+
headers: modelHeaders,
|
|
8961
8977
|
transport: resolvedTransport,
|
|
8962
8978
|
responsesWebSocket: websocket,
|
|
8963
8979
|
...resolved
|
|
8964
8980
|
});
|
|
8981
|
+
const requestOptions = withOpencodeCallTimeSessionHeaders(resolved.providerId, modelHeaders, sanitizedOptions);
|
|
8965
8982
|
const streamTransport = this.#lastStreamTransport;
|
|
8966
8983
|
if (isLanguageModelV4(model)) {
|
|
8967
|
-
const streamResult = await new AISDKV7LanguageModel(model).doStream(
|
|
8984
|
+
const streamResult = await new AISDKV7LanguageModel(model).doStream(requestOptions);
|
|
8968
8985
|
attachModelStreamTransport(streamResult, streamTransport);
|
|
8969
8986
|
return streamResult;
|
|
8970
8987
|
}
|
|
8971
8988
|
if (isLanguageModelV3(model)) {
|
|
8972
|
-
const streamResult = await new AISDKV6LanguageModel(model).doStream(
|
|
8989
|
+
const streamResult = await new AISDKV6LanguageModel(model).doStream(requestOptions);
|
|
8973
8990
|
attachModelStreamTransport(streamResult, streamTransport);
|
|
8974
8991
|
return streamResult;
|
|
8975
8992
|
}
|
|
8976
|
-
const streamResult = await new require_model.AISDKV5LanguageModel(model).doStream(
|
|
8993
|
+
const streamResult = await new require_model.AISDKV5LanguageModel(model).doStream(requestOptions);
|
|
8977
8994
|
attachModelStreamTransport(streamResult, streamTransport);
|
|
8978
8995
|
return streamResult;
|
|
8979
8996
|
}
|
|
@@ -9019,16 +9036,17 @@ var ModelRouterLanguageModel = class ModelRouterLanguageModel {
|
|
|
9019
9036
|
});
|
|
9020
9037
|
return cache.modelInstances.get(key);
|
|
9021
9038
|
}
|
|
9039
|
+
const requestHeaders = require_netlify.applyOpencodeSessionHeader(providerId, headers);
|
|
9022
9040
|
if (this.config.url) {
|
|
9023
9041
|
const modelInstance = this.config.api === "responses" ? require_netlify.createOpenAI$1({
|
|
9024
9042
|
apiKey,
|
|
9025
9043
|
baseURL: this.config.url,
|
|
9026
|
-
headers
|
|
9044
|
+
headers: requestHeaders
|
|
9027
9045
|
}).responses(modelId) : require_netlify.createOpenAICompatible({
|
|
9028
9046
|
name: providerId,
|
|
9029
9047
|
apiKey,
|
|
9030
9048
|
baseURL: this.config.url,
|
|
9031
|
-
headers,
|
|
9049
|
+
headers: requestHeaders,
|
|
9032
9050
|
supportsStructuredOutputs: true
|
|
9033
9051
|
}).chatModel(modelId);
|
|
9034
9052
|
cache.modelInstances.set(key, modelInstance);
|
|
@@ -9063,7 +9081,7 @@ var ModelRouterLanguageModel = class ModelRouterLanguageModel {
|
|
|
9063
9081
|
modelId,
|
|
9064
9082
|
providerId,
|
|
9065
9083
|
apiKey,
|
|
9066
|
-
headers,
|
|
9084
|
+
headers: requestHeaders,
|
|
9067
9085
|
transport: resolvedTransport,
|
|
9068
9086
|
responsesWebSocket
|
|
9069
9087
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { S as
|
|
1
|
+
import { C as createOpenAICompatible, S as createOpenAI, _ as hasAuthCredentials, a as interpolateUrlTemplate, b as MASTRA_GATEWAY_STREAM_TRANSPORT, c as parseModelRouterId, f as MASTRA_USER_AGENT, g as getGatewayId, h as findGatewayForModel, l as createOpenAI$1, o as applyOpencodeCallTimeSessionHeader, r as ModelsDevGateway, s as applyOpencodeSessionHeader, t as NetlifyGateway, u as createGoogleGenerativeAI, v as shouldEnableGateway, w as EventSourceParserStream, x as MastraModelGateway } from "./netlify-BNBtKR4Q.js";
|
|
2
2
|
import { n as prepareAzureStrictToolSchemas, r as createStreamFromGenerateResult, t as AISDKV5LanguageModel } from "./model-DS-b2R-R.js";
|
|
3
3
|
import { i as aiV5PromptToAIV7Prompt, r as aiV5PromptToAIV6Prompt } from "./to-prompt-CMlVGYxC.js";
|
|
4
4
|
import { t as convertToDataContent } from "./content-CFBIylxS.js";
|
|
5
|
-
import { f as MastraGateway, l as modelSupportsTemperature, n as PROVIDER_REGISTRY, p as gatewayServesObservationalMemory, t as GatewayRegistry } from "./provider-registry-
|
|
5
|
+
import { f as MastraGateway, l as modelSupportsTemperature, n as PROVIDER_REGISTRY, p as gatewayServesObservationalMemory, t as GatewayRegistry } from "./provider-registry-CfHy4Zhw.js";
|
|
6
6
|
import { i as MastraError } from "./error-oh2DLsP2.js";
|
|
7
7
|
import { u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
8
8
|
import { n as resolveDynamicArgument } from "./dynamic-argument-BzPK3qPN.js";
|
|
9
9
|
import { t as InMemoryServerCache } from "./inmemory-BK3zLwvM.js";
|
|
10
10
|
import * as z4 from "zod/v4";
|
|
11
11
|
import { z } from "zod/v4";
|
|
12
|
-
import { ZodFirstPartyTypeKind } from "zod/v3";
|
|
13
12
|
import { createHmac } from "crypto";
|
|
13
|
+
import { ZodFirstPartyTypeKind } from "zod/v3";
|
|
14
14
|
import WebSocket from "ws";
|
|
15
15
|
// src/stream/types.ts
|
|
16
16
|
let ChunkFrom = /* @__PURE__ */ function(ChunkFrom) {
|
|
@@ -8689,6 +8689,19 @@ function mergeHeaders(baseHeaders, authHeaders) {
|
|
|
8689
8689
|
...authHeaders
|
|
8690
8690
|
};
|
|
8691
8691
|
}
|
|
8692
|
+
/**
|
|
8693
|
+
* Applies the OpenCode Go call-time session mapping to sanitized call options,
|
|
8694
|
+
* returning a shallow copy only when the headers actually change. The derived
|
|
8695
|
+
* session is only used on the options handed to the provider delegate - it is
|
|
8696
|
+
* never fed back into model resolution or the model cache key.
|
|
8697
|
+
*/
|
|
8698
|
+
function withOpencodeCallTimeSessionHeaders(providerId, modelHeaders, options) {
|
|
8699
|
+
const headers = applyOpencodeCallTimeSessionHeader(providerId, modelHeaders, options.headers);
|
|
8700
|
+
return headers === options.headers ? options : {
|
|
8701
|
+
...options,
|
|
8702
|
+
headers
|
|
8703
|
+
};
|
|
8704
|
+
}
|
|
8692
8705
|
var ModelRouterLanguageModel = class ModelRouterLanguageModel {
|
|
8693
8706
|
specificationVersion = "v2";
|
|
8694
8707
|
defaultObjectGenerationMode = "json";
|
|
@@ -8925,15 +8938,17 @@ var ModelRouterLanguageModel = class ModelRouterLanguageModel {
|
|
|
8925
8938
|
} }) };
|
|
8926
8939
|
}
|
|
8927
8940
|
const sanitizedOptions = this.stripUnsupportedSamplingParams(options);
|
|
8941
|
+
const modelHeaders = mergeHeaders(this.config.headers, auth.headers);
|
|
8928
8942
|
const model = await this.resolveLanguageModel({
|
|
8929
8943
|
apiKey: auth.apiKey ?? "",
|
|
8930
8944
|
auth,
|
|
8931
|
-
headers:
|
|
8945
|
+
headers: modelHeaders,
|
|
8932
8946
|
...resolved
|
|
8933
8947
|
});
|
|
8934
|
-
|
|
8935
|
-
if (
|
|
8936
|
-
return new
|
|
8948
|
+
const requestOptions = withOpencodeCallTimeSessionHeaders(resolved.providerId, modelHeaders, sanitizedOptions);
|
|
8949
|
+
if (isLanguageModelV4(model)) return new AISDKV7LanguageModel(model).doGenerate(requestOptions);
|
|
8950
|
+
if (isLanguageModelV3(model)) return new AISDKV6LanguageModel(model).doGenerate(requestOptions);
|
|
8951
|
+
return new AISDKV5LanguageModel(model).doGenerate(requestOptions);
|
|
8937
8952
|
}
|
|
8938
8953
|
async doStream(options) {
|
|
8939
8954
|
const resolved = this.#manager.resolveModelId(this.config.routerId);
|
|
@@ -8952,26 +8967,28 @@ var ModelRouterLanguageModel = class ModelRouterLanguageModel {
|
|
|
8952
8967
|
const sanitizedOptions = this.stripUnsupportedSamplingParams(options);
|
|
8953
8968
|
const { transport, websocket } = getOpenAITransport(sanitizedOptions.providerOptions, resolved.providerId);
|
|
8954
8969
|
const resolvedTransport = (transport === "auto" ? "websocket" : transport) === "websocket" && !this.config.url && (this.gatewayId === "models.dev" && OPENAI_WS_ALLOWLIST.has(this.provider) || this.gatewayId === "azure-openai") ? "websocket" : "fetch";
|
|
8970
|
+
const modelHeaders = mergeHeaders(this.config.headers, auth.headers);
|
|
8955
8971
|
const model = await this.resolveLanguageModel({
|
|
8956
8972
|
apiKey: auth.apiKey ?? "",
|
|
8957
8973
|
auth,
|
|
8958
|
-
headers:
|
|
8974
|
+
headers: modelHeaders,
|
|
8959
8975
|
transport: resolvedTransport,
|
|
8960
8976
|
responsesWebSocket: websocket,
|
|
8961
8977
|
...resolved
|
|
8962
8978
|
});
|
|
8979
|
+
const requestOptions = withOpencodeCallTimeSessionHeaders(resolved.providerId, modelHeaders, sanitizedOptions);
|
|
8963
8980
|
const streamTransport = this.#lastStreamTransport;
|
|
8964
8981
|
if (isLanguageModelV4(model)) {
|
|
8965
|
-
const streamResult = await new AISDKV7LanguageModel(model).doStream(
|
|
8982
|
+
const streamResult = await new AISDKV7LanguageModel(model).doStream(requestOptions);
|
|
8966
8983
|
attachModelStreamTransport(streamResult, streamTransport);
|
|
8967
8984
|
return streamResult;
|
|
8968
8985
|
}
|
|
8969
8986
|
if (isLanguageModelV3(model)) {
|
|
8970
|
-
const streamResult = await new AISDKV6LanguageModel(model).doStream(
|
|
8987
|
+
const streamResult = await new AISDKV6LanguageModel(model).doStream(requestOptions);
|
|
8971
8988
|
attachModelStreamTransport(streamResult, streamTransport);
|
|
8972
8989
|
return streamResult;
|
|
8973
8990
|
}
|
|
8974
|
-
const streamResult = await new AISDKV5LanguageModel(model).doStream(
|
|
8991
|
+
const streamResult = await new AISDKV5LanguageModel(model).doStream(requestOptions);
|
|
8975
8992
|
attachModelStreamTransport(streamResult, streamTransport);
|
|
8976
8993
|
return streamResult;
|
|
8977
8994
|
}
|
|
@@ -9017,16 +9034,17 @@ var ModelRouterLanguageModel = class ModelRouterLanguageModel {
|
|
|
9017
9034
|
});
|
|
9018
9035
|
return cache.modelInstances.get(key);
|
|
9019
9036
|
}
|
|
9037
|
+
const requestHeaders = applyOpencodeSessionHeader(providerId, headers);
|
|
9020
9038
|
if (this.config.url) {
|
|
9021
9039
|
const modelInstance = this.config.api === "responses" ? createOpenAI({
|
|
9022
9040
|
apiKey,
|
|
9023
9041
|
baseURL: this.config.url,
|
|
9024
|
-
headers
|
|
9042
|
+
headers: requestHeaders
|
|
9025
9043
|
}).responses(modelId) : createOpenAICompatible({
|
|
9026
9044
|
name: providerId,
|
|
9027
9045
|
apiKey,
|
|
9028
9046
|
baseURL: this.config.url,
|
|
9029
|
-
headers,
|
|
9047
|
+
headers: requestHeaders,
|
|
9030
9048
|
supportsStructuredOutputs: true
|
|
9031
9049
|
}).chatModel(modelId);
|
|
9032
9050
|
cache.modelInstances.set(key, modelInstance);
|
|
@@ -9061,7 +9079,7 @@ var ModelRouterLanguageModel = class ModelRouterLanguageModel {
|
|
|
9061
9079
|
modelId,
|
|
9062
9080
|
providerId,
|
|
9063
9081
|
apiKey,
|
|
9064
|
-
headers,
|
|
9082
|
+
headers: requestHeaders,
|
|
9065
9083
|
transport: resolvedTransport,
|
|
9066
9084
|
responsesWebSocket
|
|
9067
9085
|
});
|
package/dist/loop/index.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
2
|
+
const require_stream = require("../stream-CZy8XA_q.cjs");
|
|
3
|
+
const require_execution_fence = require("../execution-fence-fqV6FGdV.cjs");
|
|
4
4
|
exports.MastraTimeoutError = require_stream.MastraTimeoutError;
|
|
5
|
-
exports.createScorer =
|
|
5
|
+
exports.createScorer = require_execution_fence.createScorer;
|
|
6
6
|
exports.createTimeoutAbortSignal = require_stream.createTimeoutAbortSignal;
|
|
7
|
-
exports.formatCheckFeedback =
|
|
8
|
-
exports.formatCompletionFeedback =
|
|
9
|
-
exports.formatStreamCompletionFeedback =
|
|
10
|
-
exports.formatValidationFeedback =
|
|
11
|
-
exports.generateFinalResult =
|
|
12
|
-
exports.generateStructuredFinalResult =
|
|
7
|
+
exports.formatCheckFeedback = require_execution_fence.formatCheckFeedback;
|
|
8
|
+
exports.formatCompletionFeedback = require_execution_fence.formatCompletionFeedback;
|
|
9
|
+
exports.formatStreamCompletionFeedback = require_execution_fence.formatStreamCompletionFeedback;
|
|
10
|
+
exports.formatValidationFeedback = require_execution_fence.formatValidationFeedback;
|
|
11
|
+
exports.generateFinalResult = require_execution_fence.generateFinalResult;
|
|
12
|
+
exports.generateStructuredFinalResult = require_execution_fence.generateStructuredFinalResult;
|
|
13
13
|
exports.isMastraTimeoutError = require_stream.isMastraTimeoutError;
|
|
14
|
-
exports.loop =
|
|
15
|
-
exports.runChecks =
|
|
16
|
-
exports.runCompletionScorers =
|
|
17
|
-
exports.runDefaultCompletionCheck =
|
|
18
|
-
exports.runStreamCompletionScorers =
|
|
19
|
-
exports.runValidation =
|
|
14
|
+
exports.loop = require_execution_fence.loop;
|
|
15
|
+
exports.runChecks = require_execution_fence.runChecks;
|
|
16
|
+
exports.runCompletionScorers = require_execution_fence.runCompletionScorers;
|
|
17
|
+
exports.runDefaultCompletionCheck = require_execution_fence.runDefaultCompletionCheck;
|
|
18
|
+
exports.runStreamCompletionScorers = require_execution_fence.runStreamCompletionScorers;
|
|
19
|
+
exports.runValidation = require_execution_fence.runValidation;
|
package/dist/loop/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { An as isMastraTimeoutError, En as createTimeoutAbortSignal, Tn as MastraTimeoutError } from "../stream-BFhCDJvz.js";
|
|
2
|
+
import { At as runDefaultCompletionCheck, Ct as formatCompletionFeedback, Dt as generateStructuredFinalResult, Et as generateFinalResult, Mt as runValidation, Nt as loop, Ot as runChecks, St as formatCheckFeedback, Tt as formatValidationFeedback, h as createScorer, jt as runStreamCompletionScorers, kt as runCompletionScorers, wt as formatStreamCompletionFeedback } from "../execution-fence-B8yV_n51.js";
|
|
3
3
|
export { MastraTimeoutError, createScorer, createTimeoutAbortSignal, formatCheckFeedback, formatCompletionFeedback, formatStreamCompletionFeedback, formatValidationFeedback, generateFinalResult, generateStructuredFinalResult, isMastraTimeoutError, loop, runChecks, runCompletionScorers, runDefaultCompletionCheck, runStreamCompletionScorers, runValidation };
|
package/dist/loop/server.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("../rolldown-runtime-BrhgMLW6.cjs");
|
|
3
|
-
const require_tool = require("../tool-
|
|
3
|
+
const require_tool = require("../tool-Dn9WSDVn.cjs");
|
|
4
4
|
let zod_v4 = require("zod/v4");
|
|
5
5
|
let path = require("path");
|
|
6
6
|
path = require_rolldown_runtime.__toESM(path, 1);
|
package/dist/loop/server.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-BrhgMLW6.cjs");
|
|
2
|
-
const require_run_registry = require("./run-registry-CXeR1Qso.cjs");
|
|
3
|
-
const require_observability = require("./observability-B0R_D1PZ.cjs");
|
|
4
2
|
const require_error = require("./error-D90lJ6M7.cjs");
|
|
5
|
-
const require_stream = require("./stream-
|
|
3
|
+
const require_stream = require("./stream-CZy8XA_q.cjs");
|
|
4
|
+
const require_execution_fence = require("./execution-fence-fqV6FGdV.cjs");
|
|
6
5
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
6
|
+
const require_observability = require("./observability-VaoaeadK.cjs");
|
|
7
7
|
const require_storage = require("./storage-CfG0I2aF.cjs");
|
|
8
8
|
const require_utils = require("./utils-D-eNsgDM.cjs");
|
|
9
9
|
const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
|
|
10
|
-
const require_constants = require("./constants-
|
|
11
|
-
let zod = require("zod");
|
|
10
|
+
const require_constants = require("./constants-B2FVV_2e.cjs");
|
|
12
11
|
let _mastra_schema_compat = require("@mastra/schema-compat");
|
|
12
|
+
let zod = require("zod");
|
|
13
13
|
let _mastra_schema_compat_zod_to_json = require("@mastra/schema-compat/zod-to-json");
|
|
14
14
|
// src/datasets/experiment/workflow-id.ts
|
|
15
15
|
/**
|
|
@@ -143,7 +143,7 @@ async function failExperimentOnError(mastra, input, body) {
|
|
|
143
143
|
throw error;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
const prepareStep =
|
|
146
|
+
const prepareStep = require_execution_fence.createStep({
|
|
147
147
|
id: "prepare",
|
|
148
148
|
inputSchema: experimentWorkflowInputSchema,
|
|
149
149
|
outputSchema: zod.z.array(itemRefSchema),
|
|
@@ -192,7 +192,7 @@ const prepareStep = require_run_registry.createStep({
|
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
|
-
const runItemStep =
|
|
195
|
+
const runItemStep = require_execution_fence.createStep({
|
|
196
196
|
id: "runItem",
|
|
197
197
|
inputSchema: itemRefSchema,
|
|
198
198
|
outputSchema: itemOutcomeSchema,
|
|
@@ -216,7 +216,7 @@ const runItemStep = require_run_registry.createStep({
|
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
|
-
const finalizeStep =
|
|
219
|
+
const finalizeStep = require_execution_fence.createStep({
|
|
220
220
|
id: "finalize",
|
|
221
221
|
inputSchema: zod.z.array(itemOutcomeSchema),
|
|
222
222
|
outputSchema: zod.z.object({
|
|
@@ -246,7 +246,7 @@ const finalizeStep = require_run_registry.createStep({
|
|
|
246
246
|
* item, so a redelivered step converges), and `finalize` counts the rows.
|
|
247
247
|
*/
|
|
248
248
|
function buildExperimentWorkflow() {
|
|
249
|
-
return
|
|
249
|
+
return require_execution_fence.createWorkflow$1({
|
|
250
250
|
id: EXPERIMENT_WORKFLOW_ID,
|
|
251
251
|
inputSchema: experimentWorkflowInputSchema,
|
|
252
252
|
outputSchema: finalizeStep.outputSchema
|
|
@@ -694,6 +694,7 @@ async function executeAgent(agent, item, signal, requestContext, experimentId, v
|
|
|
694
694
|
},
|
|
695
695
|
error: null,
|
|
696
696
|
traceId,
|
|
697
|
+
spanId: result.spanId ?? null,
|
|
697
698
|
scorerInput: scoringData?.input,
|
|
698
699
|
scorerOutput: scoringData?.output,
|
|
699
700
|
...toolMockReport ? { toolMockReport } : {}
|
|
@@ -1175,7 +1176,7 @@ async function extractTrajectoryFromStorage(storage, traceId) {
|
|
|
1175
1176
|
}
|
|
1176
1177
|
/** Flush before the trace read, only when a trajectory scorer will read the trace. */
|
|
1177
1178
|
async function flushForTrajectoryScorers(mastra, scorers, traceId) {
|
|
1178
|
-
if (scorers.some((s) => s.type === "trajectory")) await
|
|
1179
|
+
if (scorers.some((s) => s.type === "trajectory")) await require_execution_fence.flushBeforeTraceRead(mastra, traceId);
|
|
1179
1180
|
}
|
|
1180
1181
|
/**
|
|
1181
1182
|
* Run all scorers for a single item result.
|
|
@@ -1215,7 +1216,7 @@ async function runScorersForItem(scorers, item, output, storage, runId, targetTy
|
|
|
1215
1216
|
return (await Promise.allSettled(scorers.map(async (scorer) => {
|
|
1216
1217
|
const { result, promptMetadata } = await runScorerSafe(scorer, item, output, scorerInput, scorerOutput, targetType, traceId, targetCorrelationContext, scorer.type === "trajectory" ? trajectoryOutput : void 0, workflowData, persistScores);
|
|
1217
1218
|
if (persistScores && storage && result.error === null && result.score !== null) try {
|
|
1218
|
-
await
|
|
1219
|
+
await require_execution_fence.validateAndSaveScore(storage, {
|
|
1219
1220
|
...stableScoreKey ? { id: `${stableScoreKey}:${scorer.id}` } : {},
|
|
1220
1221
|
scorerId: scorer.id,
|
|
1221
1222
|
score: result.score,
|
|
@@ -1228,6 +1229,7 @@ async function runScorersForItem(scorers, item, output, storage, runId, targetTy
|
|
|
1228
1229
|
source: "TEST",
|
|
1229
1230
|
runId,
|
|
1230
1231
|
traceId,
|
|
1232
|
+
...workflowData?.spanId ? { spanId: workflowData.spanId } : {},
|
|
1231
1233
|
scorer: {
|
|
1232
1234
|
id: scorer.id,
|
|
1233
1235
|
name: scorer.name,
|
|
@@ -1340,7 +1342,7 @@ async function runScorerSafe(scorer, item, output, scorerInput, scorerOutput, ta
|
|
|
1340
1342
|
promptMetadata
|
|
1341
1343
|
};
|
|
1342
1344
|
} catch (error) {
|
|
1343
|
-
if (error instanceof
|
|
1345
|
+
if (error instanceof require_execution_fence.ScorerRunError) {
|
|
1344
1346
|
const { score, reason, promptMetadata } = extractScorerRunFields(error.result);
|
|
1345
1347
|
return {
|
|
1346
1348
|
result: {
|
|
@@ -1435,7 +1437,7 @@ async function runStepScorersForItem(stepScorers, item, workflowData, storage, r
|
|
|
1435
1437
|
};
|
|
1436
1438
|
const { score, reason, notScorable } = extractScorerRunFields(scoreResult);
|
|
1437
1439
|
if (persistScores && storage && score !== null) try {
|
|
1438
|
-
await
|
|
1440
|
+
await require_execution_fence.validateAndSaveScore(storage, {
|
|
1439
1441
|
scorerId: scorer.id,
|
|
1440
1442
|
score,
|
|
1441
1443
|
reason: reason ?? void 0,
|
|
@@ -1476,7 +1478,7 @@ async function runStepScorersForItem(stepScorers, item, workflowData, storage, r
|
|
|
1476
1478
|
stepId
|
|
1477
1479
|
};
|
|
1478
1480
|
} catch (error) {
|
|
1479
|
-
if (error instanceof
|
|
1481
|
+
if (error instanceof require_execution_fence.ScorerRunError) {
|
|
1480
1482
|
const { score, reason } = extractScorerRunFields(error.result);
|
|
1481
1483
|
return {
|
|
1482
1484
|
scorerId: scorer.id,
|
|
@@ -1866,7 +1868,7 @@ async function executeExperimentItem(args) {
|
|
|
1866
1868
|
const completedAt = /* @__PURE__ */ new Date();
|
|
1867
1869
|
let scores = [];
|
|
1868
1870
|
if (!scorerConfigError) {
|
|
1869
|
-
const workflowData = execResult.stepResults || execResult.stepExecutionPath ? {
|
|
1871
|
+
const workflowData = execResult.stepResults || execResult.stepExecutionPath || execResult.spanId ? {
|
|
1870
1872
|
stepResults: execResult.stepResults,
|
|
1871
1873
|
stepExecutionPath: execResult.stepExecutionPath,
|
|
1872
1874
|
spanId: execResult.spanId
|
|
@@ -2269,7 +2271,7 @@ async function runExperiment(mastra, config) {
|
|
|
2269
2271
|
};
|
|
2270
2272
|
let itemScores = [];
|
|
2271
2273
|
if (!preflightError) {
|
|
2272
|
-
const workflowData = execResult.stepResults || execResult.stepExecutionPath ? {
|
|
2274
|
+
const workflowData = execResult.stepResults || execResult.stepExecutionPath || execResult.spanId ? {
|
|
2273
2275
|
stepResults: execResult.stepResults,
|
|
2274
2276
|
stepExecutionPath: execResult.stepExecutionPath,
|
|
2275
2277
|
spanId: execResult.spanId
|
|
@@ -3381,7 +3383,7 @@ var Dataset = class {
|
|
|
3381
3383
|
if (args.scores?.length) {
|
|
3382
3384
|
const storage = this.#mastra.getStorage();
|
|
3383
3385
|
if (storage) for (const score of args.scores) try {
|
|
3384
|
-
await
|
|
3386
|
+
await require_execution_fence.validateAndSaveScore(storage, {
|
|
3385
3387
|
id: experimentScoreId(args.experimentId, args.itemId, args.attempt ?? 0, score.scorerId),
|
|
3386
3388
|
scorerId: score.scorerId,
|
|
3387
3389
|
score: score.score,
|
|
@@ -3568,8 +3570,8 @@ var DatasetsManager = class {
|
|
|
3568
3570
|
let { inputSchema, groundTruthSchema, ...rest } = input;
|
|
3569
3571
|
if (inputSchema !== void 0 && (0, _mastra_schema_compat.isZodType)(inputSchema)) inputSchema = (0, _mastra_schema_compat_zod_to_json.zodToJsonSchema)(inputSchema);
|
|
3570
3572
|
if (groundTruthSchema !== void 0 && (0, _mastra_schema_compat.isZodType)(groundTruthSchema)) groundTruthSchema = (0, _mastra_schema_compat_zod_to_json.zodToJsonSchema)(groundTruthSchema);
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
+
require_execution_fence.assertSupportedPatterns(inputSchema);
|
|
3574
|
+
require_execution_fence.assertSupportedPatterns(groundTruthSchema);
|
|
3573
3575
|
const result = await store.createDataset({
|
|
3574
3576
|
...rest,
|
|
3575
3577
|
inputSchema,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-tIEjjQTE.js";
|
|
2
|
-
import { Qs as createWorkflow, Zs as createStep, ua as assertSupportedPatterns, w as ScorerRunError, x as validateAndSaveScore, y as flushBeforeTraceRead } from "./run-registry-Cu9CK7AR.js";
|
|
3
|
-
import { S as resolveObservabilityContext } from "./observability-D7RNOAPx.js";
|
|
4
2
|
import { i as MastraError } from "./error-oh2DLsP2.js";
|
|
5
|
-
import { ft as loadStepResults, un as isSupportedLanguageModel } from "./stream-
|
|
3
|
+
import { ft as loadStepResults, un as isSupportedLanguageModel } from "./stream-BFhCDJvz.js";
|
|
4
|
+
import { Ki as assertSupportedPatterns, Ns as createStep, Ps as createWorkflow, d as validateAndSaveScore, l as flushBeforeTraceRead, m as ScorerRunError } from "./execution-fence-B8yV_n51.js";
|
|
6
5
|
import { o as MASTRA_RESOURCE_ID_KEY, p as withoutLiveRequestKeys, u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
6
|
+
import { _ as resolveObservabilityContext } from "./observability-DPDWibyH.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-
|
|
11
|
-
import { z } from "zod";
|
|
10
|
+
import { Cr as extractTrajectory, Tr as extractWorkflowTrajectory, mn as BATCH_DELETE_TRACES_MAX_IDS, wr as extractTrajectoryFromTrace } from "./constants-Dro9fuhk.js";
|
|
12
11
|
import { isZodType } from "@mastra/schema-compat";
|
|
12
|
+
import { z } from "zod";
|
|
13
13
|
import { zodToJsonSchema } from "@mastra/schema-compat/zod-to-json";
|
|
14
14
|
// src/datasets/experiment/workflow-id.ts
|
|
15
15
|
/**
|
|
@@ -694,6 +694,7 @@ async function executeAgent(agent, item, signal, requestContext, experimentId, v
|
|
|
694
694
|
},
|
|
695
695
|
error: null,
|
|
696
696
|
traceId,
|
|
697
|
+
spanId: result.spanId ?? null,
|
|
697
698
|
scorerInput: scoringData?.input,
|
|
698
699
|
scorerOutput: scoringData?.output,
|
|
699
700
|
...toolMockReport ? { toolMockReport } : {}
|
|
@@ -1228,6 +1229,7 @@ async function runScorersForItem(scorers, item, output, storage, runId, targetTy
|
|
|
1228
1229
|
source: "TEST",
|
|
1229
1230
|
runId,
|
|
1230
1231
|
traceId,
|
|
1232
|
+
...workflowData?.spanId ? { spanId: workflowData.spanId } : {},
|
|
1231
1233
|
scorer: {
|
|
1232
1234
|
id: scorer.id,
|
|
1233
1235
|
name: scorer.name,
|
|
@@ -1866,7 +1868,7 @@ async function executeExperimentItem(args) {
|
|
|
1866
1868
|
const completedAt = /* @__PURE__ */ new Date();
|
|
1867
1869
|
let scores = [];
|
|
1868
1870
|
if (!scorerConfigError) {
|
|
1869
|
-
const workflowData = execResult.stepResults || execResult.stepExecutionPath ? {
|
|
1871
|
+
const workflowData = execResult.stepResults || execResult.stepExecutionPath || execResult.spanId ? {
|
|
1870
1872
|
stepResults: execResult.stepResults,
|
|
1871
1873
|
stepExecutionPath: execResult.stepExecutionPath,
|
|
1872
1874
|
spanId: execResult.spanId
|
|
@@ -2269,7 +2271,7 @@ async function runExperiment(mastra, config) {
|
|
|
2269
2271
|
};
|
|
2270
2272
|
let itemScores = [];
|
|
2271
2273
|
if (!preflightError) {
|
|
2272
|
-
const workflowData = execResult.stepResults || execResult.stepExecutionPath ? {
|
|
2274
|
+
const workflowData = execResult.stepResults || execResult.stepExecutionPath || execResult.spanId ? {
|
|
2273
2275
|
stepResults: execResult.stepResults,
|
|
2274
2276
|
stepExecutionPath: execResult.stepExecutionPath,
|
|
2275
2277
|
spanId: execResult.spanId
|
package/dist/mastra/index.cjs
CHANGED
package/dist/mastra/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Docs for this @mastra/core version are bundled at node_modules/@mastra/core/dist/docs/SKILL.md. Read it before guessing APIs from these types. */
|
|
1
2
|
import type { Agent } from '../agent/index.js';
|
|
2
3
|
import type { ExecutionEngineDefaults } from '../agent/streams/execution-policy.js';
|
|
3
4
|
import type { DurableAgentLike } from '../agent/types.js';
|
|
@@ -516,6 +517,13 @@ export interface WorkersConfig {
|
|
|
516
517
|
backgroundTasks: WorkersConfigSection;
|
|
517
518
|
custom: string[];
|
|
518
519
|
}
|
|
520
|
+
/** How an instance's workers report running a workflow event (see `handleWorkflowEvent`). */
|
|
521
|
+
type WorkflowEventResult = {
|
|
522
|
+
ok: true;
|
|
523
|
+
} | {
|
|
524
|
+
ok: false;
|
|
525
|
+
retry: boolean;
|
|
526
|
+
};
|
|
519
527
|
/**
|
|
520
528
|
* Registers and coordinates agents, workflows, storage, and other Mastra services.
|
|
521
529
|
*
|
|
@@ -529,10 +537,7 @@ export interface WorkersConfig {
|
|
|
529
537
|
* });
|
|
530
538
|
* ```
|
|
531
539
|
*
|
|
532
|
-
* @see
|
|
533
|
-
* `@mastra/core/package.json` with your project's resolver or package-manager
|
|
534
|
-
* tooling, then read `dist/docs/SKILL.md` from that package root and follow its
|
|
535
|
-
* reference links. Use package-manager tools for virtual or archived packages.
|
|
540
|
+
* @see Docs for this @mastra/core version are bundled at node_modules/@mastra/core/dist/docs/SKILL.md. Read it before guessing APIs from these types.
|
|
536
541
|
*
|
|
537
542
|
* @see [Mastra documentation](https://mastra.ai/reference/core/mastra-class)
|
|
538
543
|
* if packaged docs are unavailable.
|
|
@@ -2502,6 +2507,29 @@ export declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<
|
|
|
2502
2507
|
ok: false;
|
|
2503
2508
|
retry: boolean;
|
|
2504
2509
|
}>;
|
|
2510
|
+
/**
|
|
2511
|
+
* Registers how this instance's workers run a workflow event while they are
|
|
2512
|
+
* consuming. Returns a release that unregisters it unless it was replaced.
|
|
2513
|
+
*
|
|
2514
|
+
* @internal
|
|
2515
|
+
*/
|
|
2516
|
+
__registerWorkflowEventConsumer(consumer: (event: Event) => Promise<WorkflowEventResult>): () => void;
|
|
2517
|
+
/**
|
|
2518
|
+
* Hands a workflow event to the instance in this process that is executing
|
|
2519
|
+
* its durable-agent run, when that is another instance whose workers are
|
|
2520
|
+
* consuming. Returns undefined when the caller should process the event.
|
|
2521
|
+
*
|
|
2522
|
+
* Mastra instances sharing an in-process pubsub join the same consumer
|
|
2523
|
+
* group, so any of them can receive a step of a run another one started.
|
|
2524
|
+
* Only the instance that started the run holds its live state (memory,
|
|
2525
|
+
* request-scoped tools, abort controller, call-time hooks); a sibling would
|
|
2526
|
+
* have to rebuild it from storage like a worker in another process. An
|
|
2527
|
+
* instance on another pubsub never received the run's events, so it is not
|
|
2528
|
+
* handed any.
|
|
2529
|
+
*
|
|
2530
|
+
* @internal
|
|
2531
|
+
*/
|
|
2532
|
+
__delegateWorkflowEvent(event: Event): Promise<WorkflowEventResult> | undefined;
|
|
2505
2533
|
/**
|
|
2506
2534
|
* Initialize and start workers. If `name` is provided, starts only
|
|
2507
2535
|
* that worker. Otherwise starts all registered workers and subscribes
|
|
@@ -2770,4 +2798,5 @@ export declare class Mastra<TAgents extends Record<string, Agent<any>> = Record<
|
|
|
2770
2798
|
}): Promise<void>;
|
|
2771
2799
|
get serverCache(): MastraServerCache;
|
|
2772
2800
|
}
|
|
2801
|
+
export {};
|
|
2773
2802
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/mastra/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Mastra } from "../mastra-
|
|
1
|
+
export { t as Mastra } from "../mastra-yjoYfTS5.js";
|