@mastra/core 1.87.0-alpha.5 → 1.87.0-alpha.7
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/agent/durable/index.cjs +1 -1
- package/dist/agent/durable/index.js +1 -1
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.js +2 -2
- package/dist/agent-builder/ee/index.cjs +1 -1
- package/dist/agent-builder/ee/index.js +1 -1
- package/dist/agent-controller/index.cjs +1 -1
- package/dist/agent-controller/index.js +1 -1
- package/dist/{agent-controller-CDwoELRq.js → agent-controller-GM-2_7C2.js} +5 -5
- package/dist/{agent-controller-DEB1G03O.cjs → agent-controller-QGBVBDRi.cjs} +5 -5
- package/dist/background-tasks/index.cjs +2 -1
- package/dist/background-tasks/index.d.ts +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/background-tasks/resolve-config.d.ts +30 -1
- package/dist/background-tasks/system-prompt.d.ts +8 -2
- package/dist/background-tasks/types.d.ts +47 -1
- package/dist/{background-tasks-B40g_Guf.cjs → background-tasks-C-3AqSKL.cjs} +167 -32
- package/dist/{background-tasks-CBp2178j.js → background-tasks-lHCVpHbm.js} +156 -33
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/{builder-DTEXPju5.js → builder-C9UYOrxv.js} +2 -2
- package/dist/{builder-tuHJooMG.cjs → builder-mGGr3IhH.cjs} +2 -2
- package/dist/capabilities/302ai.json +210 -210
- package/dist/capabilities/abliteratedllm.json +31 -31
- package/dist/capabilities/abliteration-ai.json +6 -6
- package/dist/capabilities/above.json +18 -18
- package/dist/capabilities/adaption.json +13 -13
- package/dist/capabilities/adzuki.json +30 -30
- package/dist/capabilities/agentrouter.json +11 -11
- package/dist/capabilities/agnes.json +3 -3
- package/dist/capabilities/ai-router.json +5 -5
- package/dist/capabilities/aiand.json +22 -22
- package/dist/capabilities/aigrow.json +11 -11
- package/dist/capabilities/aimlapi.json +147 -147
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +28 -28
- package/dist/capabilities/aki-io.json +13 -13
- package/dist/capabilities/alibaba-cn.json +98 -98
- 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 +47 -47
- package/dist/capabilities/alibaba-token-plan.json +50 -50
- package/dist/capabilities/alibaba.json +67 -67
- package/dist/capabilities/ambient.json +16 -16
- package/dist/capabilities/amd.json +11 -11
- package/dist/capabilities/anthropic.json +48 -48
- package/dist/capabilities/anyapi.json +48 -48
- package/dist/capabilities/apiko.json +4 -4
- package/dist/capabilities/arcee.json +10 -10
- package/dist/capabilities/augure.json +8 -8
- package/dist/capabilities/auriko.json +23 -23
- package/dist/capabilities/bailing.json +4 -4
- package/dist/capabilities/baseten.json +35 -35
- package/dist/capabilities/bee.json +2 -2
- package/dist/capabilities/berget.json +6 -6
- package/dist/capabilities/bothub.json +12 -12
- package/dist/capabilities/boundless.json +38 -38
- package/dist/capabilities/bumo.json +43 -43
- package/dist/capabilities/byteplus.json +24 -24
- package/dist/capabilities/cheapaimodel.json +8 -8
- package/dist/capabilities/cheapest-token.json +31 -31
- package/dist/capabilities/chutes.json +9 -9
- package/dist/capabilities/cline-pass.json +36 -36
- package/dist/capabilities/cloudcode.json +7 -7
- package/dist/capabilities/cloudferro-sherlock.json +4 -4
- package/dist/capabilities/cloudflare-workers-ai.json +17 -17
- package/dist/capabilities/commandcode.json +154 -154
- package/dist/capabilities/concentrate.json +283 -283
- package/dist/capabilities/cortecs.json +108 -108
- package/dist/capabilities/crossmodel.json +191 -191
- package/dist/capabilities/crusoe.json +10 -10
- package/dist/capabilities/daoxe.json +9 -9
- package/dist/capabilities/databricks.json +121 -121
- package/dist/capabilities/deepinfra.json +100 -100
- package/dist/capabilities/deepseek.json +3 -3
- package/dist/capabilities/digitalocean.json +109 -109
- package/dist/capabilities/dothoosh.json +29 -29
- package/dist/capabilities/doubleword.json +23 -23
- package/dist/capabilities/edenai.json +279 -286
- package/dist/capabilities/empiriolabs.json +174 -174
- package/dist/capabilities/engy.json +24 -24
- package/dist/capabilities/entrim.json +5 -5
- package/dist/capabilities/evroc.json +21 -21
- package/dist/capabilities/ezkielyna.json +9 -9
- package/dist/capabilities/fastrouter.json +88 -88
- package/dist/capabilities/fireworks-ai.json +98 -98
- package/dist/capabilities/freemodel.json +18 -18
- package/dist/capabilities/friendli.json +12 -12
- package/dist/capabilities/frogbot.json +99 -99
- package/dist/capabilities/gisoo.json +19 -19
- package/dist/capabilities/gmicloud.json +22 -22
- package/dist/capabilities/google.json +54 -54
- package/dist/capabilities/graphn.json +11 -11
- package/dist/capabilities/greenpt.json +34 -34
- package/dist/capabilities/groq.json +8 -8
- package/dist/capabilities/helicone.json +79 -79
- package/dist/capabilities/hostinger-router.json +14 -14
- package/dist/capabilities/hpc-ai.json +12 -12
- package/dist/capabilities/huawei-maas.json +9 -9
- package/dist/capabilities/hubris.json +29 -29
- package/dist/capabilities/huggingface.json +103 -103
- package/dist/capabilities/humain.json +2 -2
- package/dist/capabilities/hyper.json +22 -22
- package/dist/capabilities/impossibl.json +155 -155
- package/dist/capabilities/inception.json +2 -2
- package/dist/capabilities/inco.json +4 -4
- package/dist/capabilities/infer.json +13 -13
- package/dist/capabilities/inferall.json +14 -14
- package/dist/capabilities/inference-coop.json +11 -11
- package/dist/capabilities/inferenceapis.json +19 -19
- package/dist/capabilities/inferris.json +2 -2
- package/dist/capabilities/infersia.json +14 -14
- package/dist/capabilities/inferx.json +3 -3
- package/dist/capabilities/infomaniak.json +4 -4
- package/dist/capabilities/io-net.json +4 -4
- package/dist/capabilities/isoquant.json +4 -4
- package/dist/capabilities/iteracompute.json +54 -54
- package/dist/capabilities/jad-ai.json +3 -3
- package/dist/capabilities/jalapeno.json +10 -10
- package/dist/capabilities/jiekou.json +63 -63
- package/dist/capabilities/jzstoken.json +52 -52
- package/dist/capabilities/keln.json +20 -20
- package/dist/capabilities/kenari.json +124 -124
- package/dist/capabilities/kilo.json +637 -635
- package/dist/capabilities/kimi-code-plan-cn.json +9 -9
- package/dist/capabilities/kimi-code-plan-global.json +9 -9
- package/dist/capabilities/kitani.json +4 -4
- package/dist/capabilities/klavo.json +15 -15
- package/dist/capabilities/korouter.json +28 -28
- package/dist/capabilities/kunavo.json +10 -10
- package/dist/capabilities/liquid.json +12 -12
- package/dist/capabilities/lithosai.json +3 -3
- package/dist/capabilities/llmgateway-providers.json +946 -933
- package/dist/capabilities/llmgateway.json +339 -338
- package/dist/capabilities/llmtr.json +32 -32
- package/dist/capabilities/logits.json +2 -2
- package/dist/capabilities/lowrouter.json +64 -64
- package/dist/capabilities/lyceum.json +8 -8
- package/dist/capabilities/melious.json +14 -14
- package/dist/capabilities/merge-gateway.json +263 -263
- package/dist/capabilities/meta.json +10 -10
- 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 +5 -5
- package/dist/capabilities/modal.json +13 -13
- package/dist/capabilities/model-oracle-ai.json +26 -26
- package/dist/capabilities/modelis.json +20 -20
- package/dist/capabilities/modular.json +5 -5
- package/dist/capabilities/moneo.json +15 -15
- package/dist/capabilities/moonshotai-cn.json +3 -3
- package/dist/capabilities/moonshotai.json +3 -3
- package/dist/capabilities/morph.json +11 -11
- package/dist/capabilities/munito-eu.json +6 -6
- package/dist/capabilities/munito.json +8 -8
- package/dist/capabilities/nan.json +31 -31
- package/dist/capabilities/nano-gpt.json +596 -596
- package/dist/capabilities/nearai.json +96 -96
- package/dist/capabilities/nebius.json +30 -30
- package/dist/capabilities/neon.json +131 -131
- package/dist/capabilities/neuralwatt.json +36 -36
- package/dist/capabilities/nokeep.json +5 -5
- package/dist/capabilities/novita-ai.json +137 -137
- package/dist/capabilities/nvidia.json +38 -38
- package/dist/capabilities/obscurify.json +30 -30
- package/dist/capabilities/oci.json +4 -4
- package/dist/capabilities/ofox.json +424 -424
- package/dist/capabilities/ollama-cloud.json +62 -62
- package/dist/capabilities/openai.json +57 -57
- package/dist/capabilities/opencode-go.json +85 -85
- package/dist/capabilities/openreason.json +5 -5
- package/dist/capabilities/openrouter.json +560 -561
- package/dist/capabilities/opper.json +28 -28
- package/dist/capabilities/orcarouter.json +267 -267
- package/dist/capabilities/outerlabs.json +28 -28
- package/dist/capabilities/ovhcloud.json +23 -23
- package/dist/capabilities/pareto.json +5 -5
- package/dist/capabilities/pendra.json +4 -4
- package/dist/capabilities/perplexity-agent.json +65 -65
- package/dist/capabilities/perplexity.json +2 -2
- package/dist/capabilities/phala.json +20 -20
- package/dist/capabilities/pioneer.json +29 -29
- package/dist/capabilities/poe.json +138 -138
- package/dist/capabilities/powerspring.json +14 -14
- package/dist/capabilities/primalabs.json +12 -12
- package/dist/capabilities/prime.json +127 -118
- package/dist/capabilities/privatemode-ai.json +8 -8
- package/dist/capabilities/proxystacks.json +5 -5
- package/dist/capabilities/qiniu-ai.json +13 -13
- package/dist/capabilities/refuseless.json +8 -8
- package/dist/capabilities/regolo-ai.json +9 -9
- package/dist/capabilities/requesty.json +200 -166
- package/dist/capabilities/ruapi.json +19 -19
- package/dist/capabilities/runcrate.json +11 -11
- package/dist/capabilities/runinfra.json +17 -17
- package/dist/capabilities/sakana.json +5 -5
- package/dist/capabilities/sambanova.json +9 -9
- package/dist/capabilities/sandbase.json +26 -26
- package/dist/capabilities/sarvam.json +8 -8
- package/dist/capabilities/scaleway.json +16 -16
- package/dist/capabilities/scnet-token-plan.json +14 -14
- package/dist/capabilities/scx-ai.json +24 -24
- package/dist/capabilities/sensenova.json +10 -10
- package/dist/capabilities/siliconflow-cn.json +58 -58
- package/dist/capabilities/siliconflow.json +60 -60
- package/dist/capabilities/snowflake-cortex.json +24 -24
- package/dist/capabilities/sokkan.json +10 -10
- package/dist/capabilities/sparrowcodes.json +22 -22
- package/dist/capabilities/standardcompute.json +106 -106
- package/dist/capabilities/steadyrouter.json +42 -42
- package/dist/capabilities/stepfun-ai-step-plan.json +7 -7
- package/dist/capabilities/stepfun-ai.json +7 -7
- package/dist/capabilities/stepfun-step-plan.json +7 -7
- package/dist/capabilities/stepfun.json +7 -7
- package/dist/capabilities/stepping-stone.json +25 -25
- package/dist/capabilities/superbot-gg.json +4 -4
- package/dist/capabilities/synthetic.json +11 -11
- package/dist/capabilities/synthorai.json +24 -24
- package/dist/capabilities/teamorouter.json +24 -24
- package/dist/capabilities/teapot-router.json +9 -9
- package/dist/capabilities/tencent-token-plan-intl.json +21 -21
- package/dist/capabilities/tencent-token-plan.json +38 -38
- package/dist/capabilities/tencent-tokenhub.json +41 -41
- package/dist/capabilities/tensorx.json +38 -38
- package/dist/capabilities/tenstorrent.json +8 -8
- package/dist/capabilities/the-grid-ai.json +34 -34
- package/dist/capabilities/thinkingmachines.json +52 -52
- package/dist/capabilities/tinfoil.json +10 -10
- package/dist/capabilities/toapis.json +2 -2
- package/dist/capabilities/togetherai.json +47 -47
- package/dist/capabilities/tokengo.json +19 -19
- package/dist/capabilities/tokenify.json +2 -2
- package/dist/capabilities/trustedrouter.json +4 -4
- package/dist/capabilities/trustedtokens.json +16 -16
- package/dist/capabilities/umans-ai-coding-plan.json +13 -13
- package/dist/capabilities/umans-ai.json +9 -9
- package/dist/capabilities/uncensuredai.json +4 -4
- package/dist/capabilities/unrestricted.json +6 -6
- package/dist/capabilities/uplinkswitch.json +21 -21
- package/dist/capabilities/upstage.json +4 -4
- package/dist/capabilities/vancine.json +16 -16
- package/dist/capabilities/vercel.json +567 -565
- package/dist/capabilities/vivgrid.json +82 -82
- package/dist/capabilities/volcengine-coding-plan.json +23 -23
- package/dist/capabilities/volcengine.json +28 -28
- package/dist/capabilities/vultr.json +31 -31
- package/dist/capabilities/wafer.ai.json +19 -19
- package/dist/capabilities/wallaby.json +5 -5
- package/dist/capabilities/wally.json +12 -12
- package/dist/capabilities/wandb.json +20 -20
- package/dist/capabilities/watt.json +25 -25
- package/dist/capabilities/xai.json +4 -4
- 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 +27 -27
- package/dist/capabilities/zai-coding-plan.json +15 -15
- package/dist/capabilities/zai.json +31 -31
- package/dist/capabilities/zenifra.json +27 -27
- package/dist/capabilities/zenmux.json +207 -207
- package/dist/capabilities/zerogpu.json +11 -11
- package/dist/capabilities/zhipuai-coding-plan.json +7 -7
- package/dist/capabilities/zhipuai.json +30 -30
- package/dist/capabilities/zro.json +6 -6
- package/dist/channels/index.cjs +2 -2
- package/dist/channels/index.js +2 -2
- package/dist/{channels-CC2Z4adP.js → channels-CyJ0PpSg.js} +1 -1
- package/dist/{channels-Drxs9g13.cjs → channels-dBz-1Oy7.cjs} +1 -1
- package/dist/coding-agent/index.cjs +1 -1
- package/dist/coding-agent/index.js +1 -1
- package/dist/datasets/index.cjs +2 -2
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +487 -487
- package/dist/docs/references/docs-agents-code-mode.md +16 -0
- package/dist/docs/references/docs-harness-background-tasks.md +38 -0
- package/dist/evals/index.cjs +1 -1
- package/dist/evals/index.js +1 -1
- package/dist/evals/scoreTraces/index.cjs +1 -1
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/events/index.cjs +1 -1
- package/dist/events/index.js +1 -1
- package/dist/harness/index.cjs +1 -1
- package/dist/harness/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/knowledge/index.cjs +14 -4
- package/dist/knowledge/index.d.ts +6 -2
- package/dist/knowledge/index.js +14 -4
- package/dist/knowledge/pinned-state-processor.d.ts +2 -2
- package/dist/knowledge/run.d.ts +4 -0
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/provider-types.generated.d.ts +7998 -7998
- package/dist/{llm-CbpBEabY.cjs → llm-BiSuGioB.cjs} +2 -2
- package/dist/{llm-D3y8qOKL.js → llm-Du8yTHDN.js} +2 -2
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/{manager-BOn6RJwA.cjs → manager-Bd8By72w.cjs} +2 -2
- package/dist/{manager-elIuArZa.js → manager-CiKAT1GP.js} +2 -2
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-CDQJWY6v.cjs → mastra-BD1Hqrb2.cjs} +17 -17
- package/dist/{mastra-DQjco6Bt.js → mastra-GjJdwKF7.js} +17 -17
- package/dist/memory/index.cjs +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/{model-BjyU1L4I.js → model-Bvfq1yB9.js} +1 -1
- package/dist/{model-C4aI7k-i.cjs → model-CI05YYPx.cjs} +1 -1
- package/dist/{netlify-BpB7PtZV.js → netlify-DQ-v2Run.js} +1 -1
- package/dist/{netlify-BjuUEMrL.cjs → netlify-DkSS4nuo.cjs} +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/processor-provider/index.cjs +1 -1
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +2 -2
- package/dist/processors/index.js +2 -2
- package/dist/processors/runner.d.ts +12 -0
- package/dist/{provider-registry-BjdxtGZZ.js → provider-registry-D7D3C2RI.js} +21967 -21966
- package/dist/{provider-registry-bkFdaY45.cjs → provider-registry-K3a83H9-.cjs} +21967 -21966
- package/dist/provider-registry.json +23004 -23003
- package/dist/{registry-generator-CPF318Kc.js → registry-generator-BgHaZqDZ.js} +1 -1
- package/dist/{registry-generator-BORKO0_T.cjs → registry-generator-RfPwMlUl.cjs} +1 -1
- package/dist/{rehydrate-Cw2Id-Uz.js → rehydrate-C4-5kM6Z.js} +2 -2
- package/dist/{rehydrate-Cps4MTph.cjs → rehydrate-DwfzaTOg.cjs} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/{run-registry-BTFPEkXT.cjs → run-registry-BJa47sa2.cjs} +35 -14
- package/dist/{run-registry-D5z2YVqJ.js → run-registry-Bj_lW9M3.js} +30 -15
- package/dist/storage/index.cjs +2 -2
- package/dist/storage/index.js +2 -2
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-D1OnBHDi.cjs → stream-CWE0h7Yc.cjs} +35 -12
- package/dist/{stream-DB5efioT.js → stream-DaIpS6ky.js} +35 -12
- package/dist/test-utils/llm-mock.cjs +1 -1
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +1 -1
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/{tool-loop-agent-DkhFVx0h.js → tool-loop-agent-B12lpXBl.js} +3 -3
- package/dist/{tool-loop-agent-Ote8gJMn.cjs → tool-loop-agent-BGBhn5xS.cjs} +3 -3
- package/dist/{utils-Dl_UFejV.cjs → utils-CPOlvXFL.cjs} +7 -6
- package/dist/{utils-BTKpGHA6.js → utils-dueX8ECq.js} +7 -6
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-DdDuQRoZ.cjs → validate-DdirQd9u.cjs} +1 -1
- package/dist/{validate-D6fUqYGz.js → validate-x3wcpuT8.js} +1 -1
- package/dist/vector/index.cjs +1 -1
- package/dist/vector/index.js +1 -1
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/worker/workers/orchestration-worker.d.ts +1 -0
- package/dist/{worker-B27B9RlK.cjs → worker-CPZ3HqQn.cjs} +2 -2
- package/dist/{worker-DC269pGx.js → worker-CfMtR2cV.js} +2 -2
- package/dist/{worker-mq-oiLa5.cjs → worker-GrFJJ7Y0.cjs} +10 -4
- package/dist/{worker-Bo_hTQJC.js → worker-NYiueScR.js} +5 -5
- package/dist/{workflow-D61dV4AC.cjs → workflow-BNUED985.cjs} +3 -3
- package/dist/{workflow-D97r3h2-.js → workflow-BgAes9PI.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/package.json +7 -7
- package/src/llm/model/provider-types.generated.d.ts +7998 -7998
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-tIEjjQTE.js";
|
|
2
|
-
import { d as attachModelStreamTransport, f as isDataChunk, i as resolveModelConfig, p as readModelStreamTransport } from "./llm-
|
|
2
|
+
import { d as attachModelStreamTransport, f as isDataChunk, i as resolveModelConfig, p as readModelStreamTransport } from "./llm-Du8yTHDN.js";
|
|
3
3
|
import { B as getResponseProviderItemIdFromPart, G as RESPONSE_ITEM_ID_PROVIDERS, K as RESPONSE_RESULT_ITEM_ID_KEY, f as coreContentToString, n as MessageList, p as messagesAreEqual, t as convertMessages } from "./message-list-BGm1DCiG.js";
|
|
4
4
|
import { S as resolveObservabilityContext, x as createObservabilityContext } from "./observability-D7RNOAPx.js";
|
|
5
5
|
import { t as MastraBase } from "./base-CKLWBhDo.js";
|
|
@@ -4101,6 +4101,8 @@ function getProcessableResponseMessages(messageList) {
|
|
|
4101
4101
|
*/
|
|
4102
4102
|
var ProcessorState = class {
|
|
4103
4103
|
inputAccumulatedText = "";
|
|
4104
|
+
/** Stream parts that arrived before the current span opened. */
|
|
4105
|
+
inputChunkOffset = 0;
|
|
4104
4106
|
outputAccumulatedText = "";
|
|
4105
4107
|
outputChunkCount = 0;
|
|
4106
4108
|
customState = {};
|
|
@@ -4113,8 +4115,27 @@ var ProcessorState = class {
|
|
|
4113
4115
|
* share of that window.
|
|
4114
4116
|
*/
|
|
4115
4117
|
hookDurationMs = 0;
|
|
4118
|
+
/** Set when the run's `finish` chunk ended the span, so no later chunk opens another. */
|
|
4119
|
+
finished = false;
|
|
4116
4120
|
constructor(options) {
|
|
4117
|
-
|
|
4121
|
+
this.startSpan(options);
|
|
4122
|
+
}
|
|
4123
|
+
/**
|
|
4124
|
+
* Opens the output stream span. A state can be created before there is a
|
|
4125
|
+
* span to parent it (a data chunk sent before the first model step), so the
|
|
4126
|
+
* runner calls this again once the stream has one. The state lives for the
|
|
4127
|
+
* whole run, but each model step's stream ends the span when it closes, so
|
|
4128
|
+
* the runner also opens a new one when a later step's chunks arrive.
|
|
4129
|
+
*/
|
|
4130
|
+
startSpan(options) {
|
|
4131
|
+
if (this.span && !this.span.endTime || this.finished || !options?.createSpan || !options.processorName) return;
|
|
4132
|
+
if (this.span) {
|
|
4133
|
+
this.inputChunkOffset = this.streamParts.length;
|
|
4134
|
+
this.inputAccumulatedText = "";
|
|
4135
|
+
this.outputChunkCount = 0;
|
|
4136
|
+
this.outputAccumulatedText = "";
|
|
4137
|
+
this.hookDurationMs = 0;
|
|
4138
|
+
}
|
|
4118
4139
|
const processor = options.processor;
|
|
4119
4140
|
const currentSpan = options.tracingContext?.currentSpan;
|
|
4120
4141
|
const parentSpan = currentSpan?.findParent("agent_run") || currentSpan?.parent || currentSpan;
|
|
@@ -4137,7 +4158,7 @@ var ProcessorState = class {
|
|
|
4137
4158
|
if (part.type === "text-delta") this.inputAccumulatedText += part.payload.text;
|
|
4138
4159
|
this.streamParts.push(part);
|
|
4139
4160
|
if (this.span) this.span.input = {
|
|
4140
|
-
totalChunks: this.streamParts.length,
|
|
4161
|
+
totalChunks: this.streamParts.length - this.inputChunkOffset,
|
|
4141
4162
|
accumulatedText: this.inputAccumulatedText
|
|
4142
4163
|
};
|
|
4143
4164
|
}
|
|
@@ -4674,15 +4695,16 @@ var ProcessorRunner = class ProcessorRunner {
|
|
|
4674
4695
|
if (processor.processOutputStream && processedPart) {
|
|
4675
4696
|
let state = processorStates.get(processor.id);
|
|
4676
4697
|
if (!state) {
|
|
4677
|
-
state = new ProcessorState(
|
|
4678
|
-
processorName: processor.name ?? processor.id,
|
|
4679
|
-
...observabilityContext,
|
|
4680
|
-
processorIndex: index,
|
|
4681
|
-
createSpan: true,
|
|
4682
|
-
processor
|
|
4683
|
-
});
|
|
4698
|
+
state = new ProcessorState();
|
|
4684
4699
|
processorStates.set(processor.id, state);
|
|
4685
4700
|
}
|
|
4701
|
+
if ((!state.span || state.span.endTime) && observabilityContext?.tracingContext?.currentSpan) state.startSpan({
|
|
4702
|
+
processorName: processor.name ?? processor.id,
|
|
4703
|
+
...observabilityContext,
|
|
4704
|
+
processorIndex: index,
|
|
4705
|
+
createSpan: true,
|
|
4706
|
+
processor
|
|
4707
|
+
});
|
|
4686
4708
|
state.addInputPart(processedPart);
|
|
4687
4709
|
const hookStart = performance.now();
|
|
4688
4710
|
let result;
|
|
@@ -4735,8 +4757,9 @@ var ProcessorRunner = class ProcessorRunner {
|
|
|
4735
4757
|
throw error;
|
|
4736
4758
|
}
|
|
4737
4759
|
}
|
|
4738
|
-
if (isFinishChunk) {
|
|
4739
|
-
|
|
4760
|
+
if (isFinishChunk) for (const state of processorStates.values()) {
|
|
4761
|
+
state.finished = true;
|
|
4762
|
+
if (state.span) state.span.end({
|
|
4740
4763
|
output: state.getFinalOutput(),
|
|
4741
4764
|
attributes: state.getFinalAttributes()
|
|
4742
4765
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("../rolldown-runtime-BrhgMLW6.cjs");
|
|
3
3
|
const require_dist = require("../dist-CXeCeeW7.cjs");
|
|
4
|
-
const require_model = require("../model-
|
|
4
|
+
const require_model = require("../model-CI05YYPx.cjs");
|
|
5
5
|
const require_model$1 = require("../model-jBymoqGa.cjs");
|
|
6
6
|
let stream = require("stream");
|
|
7
7
|
let module$1 = require("module");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as simulateReadableStream } from "../dist-D3cKCUe-.js";
|
|
2
|
-
import { t as MastraLLMV1 } from "../model-
|
|
2
|
+
import { t as MastraLLMV1 } from "../model-Bvfq1yB9.js";
|
|
3
3
|
import { t as AISDKV5LanguageModel } from "../model-DS-b2R-R.js";
|
|
4
4
|
import { createRequire } from "module";
|
|
5
5
|
import { Readable } from "stream";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_tool_loop_agent = require("../tool-loop-agent-
|
|
2
|
+
const require_tool_loop_agent = require("../tool-loop-agent-BGBhn5xS.cjs");
|
|
3
3
|
exports.getSettings = require_tool_loop_agent.getSettings;
|
|
4
4
|
exports.isToolLoopAgentLike = require_tool_loop_agent.isToolLoopAgentLike;
|
|
5
5
|
exports.toolLoopAgentToMastraAgent = require_tool_loop_agent.toolLoopAgentToMastraAgent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as getSettings, r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "../tool-loop-agent-
|
|
1
|
+
export { n as getSettings, r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "../tool-loop-agent-B12lpXBl.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { m as generateId } from "./dist-TPVqg8oV.js";
|
|
2
|
-
import { P as Agent } from "./run-registry-
|
|
3
|
-
import { ln as isSupportedLanguageModel } from "./stream-
|
|
4
|
-
import { i as resolveModelConfig } from "./llm-
|
|
2
|
+
import { P as Agent } from "./run-registry-Bj_lW9M3.js";
|
|
3
|
+
import { ln as isSupportedLanguageModel } from "./stream-DaIpS6ky.js";
|
|
4
|
+
import { i as resolveModelConfig } from "./llm-Du8yTHDN.js";
|
|
5
5
|
import { N as ToolLoopAgent } from "./message-list-BGm1DCiG.js";
|
|
6
6
|
// src/tool-loop-agent/utils.ts
|
|
7
7
|
function isToolLoopAgentLike(obj) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_dist = require("./dist-P2rjrlmj.cjs");
|
|
2
|
-
const require_run_registry = require("./run-registry-
|
|
3
|
-
const require_stream = require("./stream-
|
|
4
|
-
const require_llm = require("./llm-
|
|
2
|
+
const require_run_registry = require("./run-registry-BJa47sa2.cjs");
|
|
3
|
+
const require_stream = require("./stream-CWE0h7Yc.cjs");
|
|
4
|
+
const require_llm = require("./llm-BiSuGioB.cjs");
|
|
5
5
|
const require_message_list = require("./message-list-vR3uLAHL.cjs");
|
|
6
6
|
// src/tool-loop-agent/utils.ts
|
|
7
7
|
function isToolLoopAgentLike(obj) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_error = require("./error-D90lJ6M7.cjs");
|
|
2
2
|
const require_tool = require("./tool-CYlT2UA-.cjs");
|
|
3
3
|
const require_ee_iTj2bRDt = require("./ee-iTj2bRDt-D3-QLGDF.cjs");
|
|
4
|
-
const require_background_tasks = require("./background-tasks-
|
|
4
|
+
const require_background_tasks = require("./background-tasks-C-3AqSKL.cjs");
|
|
5
5
|
const require_base = require("./base-BIzR1D3_.cjs");
|
|
6
6
|
const require_observability = require("./observability-B0R_D1PZ.cjs");
|
|
7
7
|
const require_utils = require("./utils-D-eNsgDM.cjs");
|
|
@@ -664,20 +664,21 @@ var CoreToolBuilder = class extends require_base.MastraBase {
|
|
|
664
664
|
this.originalTool = input.originalTool;
|
|
665
665
|
this.options = input.options;
|
|
666
666
|
this.logType = input.logType;
|
|
667
|
-
const
|
|
667
|
+
const backgroundConfigInput = {
|
|
668
668
|
toolName: this.options.name,
|
|
669
669
|
toolConfig: this.options.backgroundConfig,
|
|
670
670
|
agentConfig: this.options.agentBackgroundConfig
|
|
671
|
-
}
|
|
671
|
+
};
|
|
672
|
+
const injectBackgroundOverride = !!input.backgroundTaskEnabled && require_background_tasks.isToolBackgroundEligible(backgroundConfigInput) && require_background_tasks.isModelBackgroundOverrideAllowed(backgroundConfigInput);
|
|
672
673
|
this.isResumableTool = Boolean(input.autoResumeSuspendedTools || this.originalTool.id?.startsWith("agent-") || this.originalTool.id?.startsWith("workflow-"));
|
|
673
674
|
if (!require_toolchecks.isVercelTool(this.originalTool) && !require_toolchecks.isProviderDefinedTool(this.originalTool)) {
|
|
674
|
-
if (
|
|
675
|
+
if (injectBackgroundOverride || this.isResumableTool) {
|
|
675
676
|
let schema = this.originalTool.inputSchema;
|
|
676
677
|
if (typeof schema === "function" && !(0, _mastra_schema_compat_schema.isStandardSchemaWithJSON)(schema)) schema = schema();
|
|
677
678
|
if (!schema) schema = zod_v4.z.object({});
|
|
678
679
|
if (require_zod_utils.isZodObject(schema) && isZodV4Schema(schema)) {
|
|
679
680
|
let nextSchema = schema;
|
|
680
|
-
if (
|
|
681
|
+
if (injectBackgroundOverride) nextSchema = require_zod_utils.safeExtendZodObject(nextSchema, { _background: require_background_tasks.backgroundOverrideZodSchema });
|
|
681
682
|
if (this.isResumableTool) nextSchema = require_zod_utils.safeExtendZodObject(nextSchema, resumeFieldsZodShape);
|
|
682
683
|
this.injectedInputSchema = (0, _mastra_schema_compat_schema.toStandardSchema)(nextSchema);
|
|
683
684
|
} else {
|
|
@@ -686,7 +687,7 @@ var CoreToolBuilder = class extends require_base.MastraBase {
|
|
|
686
687
|
if (jsonSchema && typeof jsonSchema === "object" && jsonSchema.type === "object") {
|
|
687
688
|
const properties = { ...jsonSchema.properties ?? {} };
|
|
688
689
|
const injectedKeys = [];
|
|
689
|
-
if (
|
|
690
|
+
if (injectBackgroundOverride) {
|
|
690
691
|
properties._background = require_background_tasks.backgroundOverrideJsonSchema;
|
|
691
692
|
injectedKeys.push("_background");
|
|
692
693
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as MastraError, n as ErrorDomain, o as getErrorFromUnknown, t as ErrorCategory } from "./error-oh2DLsP2.js";
|
|
2
2
|
import { c as registerToolOutputValidationSchema, d as validateToolOutput, f as validateToolSuspendData, h as markBuilderValidatedInput, i as createStandardSchemaIssuesError, n as Tool, o as getValidationIssuePaths, p as createToolObserve, s as isValidationError, u as validateToolInput } from "./tool-Z3bykc1m.js";
|
|
3
3
|
import { i as MastraFGAPermissions } from "./ee-iTj2bRDt-By_B9ngH.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as isToolBackgroundEligible, i as isModelBackgroundOverrideAllowed, n as backgroundOverrideJsonSchema, r as backgroundOverrideZodSchema } from "./background-tasks-lHCVpHbm.js";
|
|
5
5
|
import { t as MastraBase } from "./base-CKLWBhDo.js";
|
|
6
6
|
import { O as executionFailureTermination, b as wrapMastra, x as createObservabilityContext } from "./observability-D7RNOAPx.js";
|
|
7
7
|
import { a as getOrCreateSpan, t as executeWithContext } from "./utils-DU_pU5SK.js";
|
|
@@ -664,20 +664,21 @@ var CoreToolBuilder = class extends MastraBase {
|
|
|
664
664
|
this.originalTool = input.originalTool;
|
|
665
665
|
this.options = input.options;
|
|
666
666
|
this.logType = input.logType;
|
|
667
|
-
const
|
|
667
|
+
const backgroundConfigInput = {
|
|
668
668
|
toolName: this.options.name,
|
|
669
669
|
toolConfig: this.options.backgroundConfig,
|
|
670
670
|
agentConfig: this.options.agentBackgroundConfig
|
|
671
|
-
}
|
|
671
|
+
};
|
|
672
|
+
const injectBackgroundOverride = !!input.backgroundTaskEnabled && isToolBackgroundEligible(backgroundConfigInput) && isModelBackgroundOverrideAllowed(backgroundConfigInput);
|
|
672
673
|
this.isResumableTool = Boolean(input.autoResumeSuspendedTools || this.originalTool.id?.startsWith("agent-") || this.originalTool.id?.startsWith("workflow-"));
|
|
673
674
|
if (!isVercelTool(this.originalTool) && !isProviderDefinedTool(this.originalTool)) {
|
|
674
|
-
if (
|
|
675
|
+
if (injectBackgroundOverride || this.isResumableTool) {
|
|
675
676
|
let schema = this.originalTool.inputSchema;
|
|
676
677
|
if (typeof schema === "function" && !isStandardSchemaWithJSON(schema)) schema = schema();
|
|
677
678
|
if (!schema) schema = z.object({});
|
|
678
679
|
if (isZodObject(schema) && isZodV4Schema(schema)) {
|
|
679
680
|
let nextSchema = schema;
|
|
680
|
-
if (
|
|
681
|
+
if (injectBackgroundOverride) nextSchema = safeExtendZodObject(nextSchema, { _background: backgroundOverrideZodSchema });
|
|
681
682
|
if (this.isResumableTool) nextSchema = safeExtendZodObject(nextSchema, resumeFieldsZodShape);
|
|
682
683
|
this.injectedInputSchema = toStandardSchema(nextSchema);
|
|
683
684
|
} else {
|
|
@@ -686,7 +687,7 @@ var CoreToolBuilder = class extends MastraBase {
|
|
|
686
687
|
if (jsonSchema && typeof jsonSchema === "object" && jsonSchema.type === "object") {
|
|
687
688
|
const properties = { ...jsonSchema.properties ?? {} };
|
|
688
689
|
const injectedKeys = [];
|
|
689
|
-
if (
|
|
690
|
+
if (injectBackgroundOverride) {
|
|
690
691
|
properties._background = backgroundOverrideJsonSchema;
|
|
691
692
|
injectedKeys.push("_background");
|
|
692
693
|
}
|
package/dist/utils.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
|
|
|
4
4
|
const require_zod_utils = require("./zod-utils-Cl5jw5N_.cjs");
|
|
5
5
|
const require_fetchWithRetry = require("./fetchWithRetry-f5k4p7_1.cjs");
|
|
6
6
|
const require_dynamic_argument = require("./dynamic-argument-CUc1BBOS.cjs");
|
|
7
|
-
const require_utils = require("./utils-
|
|
7
|
+
const require_utils = require("./utils-CPOlvXFL.cjs");
|
|
8
8
|
exports.boundedStringify = require_utils_safe_stringify.boundedStringify;
|
|
9
9
|
exports.checkEvalStorageFields = require_utils.checkEvalStorageFields;
|
|
10
10
|
exports.createMastraProxy = require_utils.createMastraProxy;
|
package/dist/utils.js
CHANGED
|
@@ -3,5 +3,5 @@ import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
|
|
|
3
3
|
import { a as isZodObject, i as isZodArray, r as getZodTypeName, t as getZodDef } from "./zod-utils-BDDS_mxU.js";
|
|
4
4
|
import { t as fetchWithRetry } from "./fetchWithRetry-DFSvpYDT.js";
|
|
5
5
|
import { n as resolveDynamicArgument, t as getRequestUser } from "./dynamic-argument-BzPK3qPN.js";
|
|
6
|
-
import { C as setNestedValue, S as selectFields, _ as parseSqlIdentifier, a as ensureToolProperties, b as removeUndefinedValues, c as isCoreMessage, d as makeCoreTool, f as makeCoreToolV5, g as parseFieldKey, h as omitKeys, i as delay, l as isUiMessage, m as maskStreamTags, n as createMastraProxy, o as generateEmptyFromSchema, p as makeProcessorCoreTool, r as deepMerge, s as getNestedValue, t as checkEvalStorageFields, u as isZodType, v as readPositiveIntEnv, x as resolveSerializedZodOutput, y as rebindProcessorTools } from "./utils-
|
|
6
|
+
import { C as setNestedValue, S as selectFields, _ as parseSqlIdentifier, a as ensureToolProperties, b as removeUndefinedValues, c as isCoreMessage, d as makeCoreTool, f as makeCoreToolV5, g as parseFieldKey, h as omitKeys, i as delay, l as isUiMessage, m as maskStreamTags, n as createMastraProxy, o as generateEmptyFromSchema, p as makeProcessorCoreTool, r as deepMerge, s as getNestedValue, t as checkEvalStorageFields, u as isZodType, v as readPositiveIntEnv, x as resolveSerializedZodOutput, y as rebindProcessorTools } from "./utils-dueX8ECq.js";
|
|
7
7
|
export { boundedStringify, checkEvalStorageFields, createMastraProxy, deepEqual, deepMerge, delay, ensureSerializable, ensureToolProperties, fetchWithRetry, generateEmptyFromSchema, getNestedValue, getRequestUser, getZodDef, getZodTypeName, isBoundedSerializable, isCoreMessage, isUiMessage, isZodArray, isZodObject, isZodType, makeCoreTool, makeCoreToolV5, makeProcessorCoreTool, maskStreamTags, omitKeys, parseFieldKey, parseSqlIdentifier, readPositiveIntEnv, rebindProcessorTools, removeUndefinedValues, resolveDynamicArgument, resolveSerializedZodOutput, safeStringify, selectFields, setNestedValue };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { standardSchemaToJSONSchema, toStandardSchema } from "./schema/index.js";
|
|
2
|
-
import { Et as validateTemplate, St as collectTemplateStepIds } from "./stream-
|
|
2
|
+
import { Et as validateTemplate, St as collectTemplateStepIds } from "./stream-DaIpS6ky.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
// src/workflows/dynamic/graph.ts
|
|
5
5
|
/**
|
package/dist/vector/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_base = require("../base-BIzR1D3_.cjs");
|
|
3
3
|
const require_error = require("../error-D90lJ6M7.cjs");
|
|
4
|
-
const require_run_registry = require("../run-registry-
|
|
4
|
+
const require_run_registry = require("../run-registry-BJa47sa2.cjs");
|
|
5
5
|
const require_message_list = require("../message-list-vR3uLAHL.cjs");
|
|
6
6
|
const require_dist = require("../dist-P2rjrlmj.cjs");
|
|
7
7
|
const require_dist$1 = require("../dist-CXeCeeW7.cjs");
|
package/dist/vector/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as MastraBase } from "../base-CKLWBhDo.js";
|
|
2
2
|
import { i as MastraError, n as ErrorDomain, t as ErrorCategory } from "../error-oh2DLsP2.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ba as createVectorErrorId, dn as embed$3 } from "../run-registry-Bj_lW9M3.js";
|
|
4
4
|
import { P as embed$2 } from "../message-list-BGm1DCiG.js";
|
|
5
5
|
import { r as embed$1 } from "../dist-TPVqg8oV.js";
|
|
6
6
|
import { n as embed } from "../dist-D3cKCUe-.js";
|
package/dist/worker/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_worker = require("../worker-
|
|
2
|
+
const require_worker = require("../worker-GrFJJ7Y0.cjs");
|
|
3
3
|
exports.BackgroundTaskWorker = require_worker.BackgroundTaskWorker;
|
|
4
4
|
exports.HttpRemoteStrategy = require_worker.HttpRemoteStrategy;
|
|
5
5
|
exports.InProcessStrategy = require_worker.InProcessStrategy;
|
package/dist/worker/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as BackgroundTaskWorker,
|
|
1
|
+
export { n as BackgroundTaskWorker, s as HttpRemoteStrategy, t as InProcessStrategy, l as MastraWorker, a as OrchestrationWorker, o as PullTransport, r as SchedulerWorker, c as StepExecutionError } from "../worker-NYiueScR.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_run_registry = require("./run-registry-
|
|
1
|
+
const require_run_registry = require("./run-registry-BJa47sa2.cjs");
|
|
2
2
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
3
|
-
const require_worker = require("./worker-
|
|
3
|
+
const require_worker = require("./worker-GrFJJ7Y0.cjs");
|
|
4
4
|
const require_schedules = require("./schedules-BZS8McF7.cjs");
|
|
5
5
|
// src/schedules/worker.ts
|
|
6
6
|
/** PubSub topic on which the scheduler publishes `agent-schedule.fire` events. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { yt as resolveAgentById } from "./run-registry-
|
|
1
|
+
import { yt as resolveAgentById } from "./run-registry-Bj_lW9M3.js";
|
|
2
2
|
import { u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
3
|
-
import {
|
|
3
|
+
import { l as MastraWorker, o as PullTransport } from "./worker-NYiueScR.js";
|
|
4
4
|
import { l as parseFsAgentScheduleRowId } from "./schedules-DZfSx-7P.js";
|
|
5
5
|
// src/schedules/worker.ts
|
|
6
6
|
/** PubSub topic on which the scheduler publishes `agent-schedule.fire` events. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_run_registry = require("./run-registry-
|
|
1
|
+
const require_run_registry = require("./run-registry-BJa47sa2.cjs");
|
|
2
2
|
const require_scheduler = require("./scheduler-D00X03jQ.cjs");
|
|
3
|
-
const require_background_tasks = require("./background-tasks-
|
|
3
|
+
const require_background_tasks = require("./background-tasks-C-3AqSKL.cjs");
|
|
4
4
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
5
5
|
// src/worker/worker.ts
|
|
6
6
|
/**
|
|
@@ -193,7 +193,7 @@ var PullTransport = class {
|
|
|
193
193
|
}
|
|
194
194
|
};
|
|
195
195
|
// src/worker/workers/orchestration-worker.ts
|
|
196
|
-
const
|
|
196
|
+
const ORCHESTRATION_GROUP = "mastra-orchestration";
|
|
197
197
|
const DEFAULT_LEASE_RENEW_INTERVAL_MS = 1e4;
|
|
198
198
|
/**
|
|
199
199
|
* Processes workflow events (step.run, step.end, start, cancel, etc.)
|
|
@@ -233,7 +233,7 @@ var OrchestrationWorker = class extends MastraWorker {
|
|
|
233
233
|
async start() {
|
|
234
234
|
if (this.#running) return;
|
|
235
235
|
if (!this.deps) throw new Error("OrchestrationWorker: call init() before start()");
|
|
236
|
-
const group = this.#config.group ??
|
|
236
|
+
const group = this.#config.group ?? "mastra-orchestration";
|
|
237
237
|
this.#transport = new PullTransport({
|
|
238
238
|
pubsub: this.deps.pubsub,
|
|
239
239
|
group,
|
|
@@ -570,6 +570,12 @@ Object.defineProperty(exports, "MastraWorker", {
|
|
|
570
570
|
return MastraWorker;
|
|
571
571
|
}
|
|
572
572
|
});
|
|
573
|
+
Object.defineProperty(exports, "ORCHESTRATION_GROUP", {
|
|
574
|
+
enumerable: true,
|
|
575
|
+
get: function() {
|
|
576
|
+
return ORCHESTRATION_GROUP;
|
|
577
|
+
}
|
|
578
|
+
});
|
|
573
579
|
Object.defineProperty(exports, "OrchestrationWorker", {
|
|
574
580
|
enumerable: true,
|
|
575
581
|
get: function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dl as waitMs, El as assertDrainTimeout, Gs as WorkflowEventProcessor, Ks as StepExecutor, qs as computeScheduleDefinitionHash, vc as getNestedWorkflow, yc as getStepEntry, yt as resolveAgentById } from "./run-registry-Bj_lW9M3.js";
|
|
2
2
|
import { t as Scheduler } from "./scheduler-B-VZUvv_.js";
|
|
3
|
-
import {
|
|
3
|
+
import { l as BackgroundTaskManager } from "./background-tasks-lHCVpHbm.js";
|
|
4
4
|
import { u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
5
5
|
// src/worker/worker.ts
|
|
6
6
|
/**
|
|
@@ -193,7 +193,7 @@ var PullTransport = class {
|
|
|
193
193
|
}
|
|
194
194
|
};
|
|
195
195
|
// src/worker/workers/orchestration-worker.ts
|
|
196
|
-
const
|
|
196
|
+
const ORCHESTRATION_GROUP = "mastra-orchestration";
|
|
197
197
|
const DEFAULT_LEASE_RENEW_INTERVAL_MS = 1e4;
|
|
198
198
|
/**
|
|
199
199
|
* Processes workflow events (step.run, step.end, start, cancel, etc.)
|
|
@@ -233,7 +233,7 @@ var OrchestrationWorker = class extends MastraWorker {
|
|
|
233
233
|
async start() {
|
|
234
234
|
if (this.#running) return;
|
|
235
235
|
if (!this.deps) throw new Error("OrchestrationWorker: call init() before start()");
|
|
236
|
-
const group = this.#config.group ??
|
|
236
|
+
const group = this.#config.group ?? "mastra-orchestration";
|
|
237
237
|
this.#transport = new PullTransport({
|
|
238
238
|
pubsub: this.deps.pubsub,
|
|
239
239
|
group,
|
|
@@ -546,4 +546,4 @@ function resolveNestedWorkflow(mastra, workflowId, parentWorkflow) {
|
|
|
546
546
|
const workflow = getNestedWorkflow(mastra, parentWorkflow);
|
|
547
547
|
return workflow?.id === workflowId ? workflow : null;
|
|
548
548
|
}
|
|
549
|
-
export {
|
|
549
|
+
export { OrchestrationWorker as a, StepExecutionError as c, ORCHESTRATION_GROUP as i, MastraWorker as l, BackgroundTaskWorker as n, PullTransport as o, SchedulerWorker as r, HttpRemoteStrategy as s, InProcessStrategy as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_stream = require("./stream-
|
|
1
|
+
const require_stream = require("./stream-CWE0h7Yc.cjs");
|
|
2
2
|
require("./utils-D-eNsgDM.cjs");
|
|
3
3
|
const require_output_helpers = require("./output-helpers-DgsH4aTb.cjs");
|
|
4
|
-
const require_run_registry = require("./run-registry-
|
|
5
|
-
const require_background_tasks = require("./background-tasks-
|
|
4
|
+
const require_run_registry = require("./run-registry-BJa47sa2.cjs");
|
|
5
|
+
const require_background_tasks = require("./background-tasks-C-3AqSKL.cjs");
|
|
6
6
|
let zod = require("zod");
|
|
7
7
|
// src/background-tasks/workflow.ts
|
|
8
8
|
const inputSchema = zod.z.object({ taskId: zod.z.string() });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { un as resolveSuspendedToolRunId } from "./stream-
|
|
1
|
+
import { un as resolveSuspendedToolRunId } from "./stream-DaIpS6ky.js";
|
|
2
2
|
import "./utils-DU_pU5SK.js";
|
|
3
3
|
import { m as slimProgressChunk } from "./output-helpers-CVzhy1Y0.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Cc as createStep, Rs as createWorkflow } from "./run-registry-Bj_lW9M3.js";
|
|
5
|
+
import { u as BACKGROUND_TASK_WORKFLOW_ID } from "./background-tasks-lHCVpHbm.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
// src/background-tasks/workflow.ts
|
|
8
8
|
const inputSchema = z.object({ taskId: z.string() });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_builder = require("../../builder-
|
|
2
|
+
const require_builder = require("../../builder-mGGr3IhH.cjs");
|
|
3
3
|
exports.WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS = require_builder.WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS;
|
|
4
4
|
exports.WORKFLOW_BUILDER_AUTHORING_PLAYBOOK = require_builder.WORKFLOW_BUILDER_AUTHORING_PLAYBOOK;
|
|
5
5
|
exports.WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION = require_builder.WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { U as WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS, W as WORKFLOW_BUILDER_AUTHORING_PLAYBOOK, i as WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION, t as WORKFLOW_BUILDER_SUPPORTED_STEP_TYPES, B as compareWorkflowBuilderSchemas, r as createWorkflowBuilderAgent, a as deleteStoredWorkflowResponseSchema, V as inspectWorkflowBuilderSchemas, o as listStoredWorkflowsResponseSchema, n as normalizeWorkflowBuilderDefinition, H as preflightWorkflowDefinition, s as storedWorkflowDefinitionSchema, c as upsertStoredWorkflowResponseSchema, l as workflowBuilderAgentEntryInputSchema, u as workflowBuilderAgentEntrySchema, d as workflowBuilderClassifierEntryInputSchema, f as workflowBuilderClassifierEntrySchema, p as workflowBuilderConditionalEntryInputSchema, m as workflowBuilderConditionalEntrySchema, h as workflowBuilderDefinitionInputSchema, g as workflowBuilderDefinitionSchema, _ as workflowBuilderForeachEntryInputSchema, v as workflowBuilderForeachEntrySchema, y as workflowBuilderGraphEntryInputSchema, b as workflowBuilderGraphEntrySchema, x as workflowBuilderLoopEntryInputSchema, S as workflowBuilderLoopEntrySchema, C as workflowBuilderMappingConfigSchema, w as workflowBuilderMappingDescriptorSchema, T as workflowBuilderMappingEntryInputSchema, E as workflowBuilderMappingEntrySchema, D as workflowBuilderNestedWorkflowEntryInputSchema, O as workflowBuilderNestedWorkflowEntrySchema, k as workflowBuilderParallelEntryInputSchema, A as workflowBuilderParallelEntrySchema, j as workflowBuilderPredicateSchema, M as workflowBuilderScheduleConfigSchema, N as workflowBuilderScheduleSchema, P as workflowBuilderSleepEntryInputSchema, F as workflowBuilderSleepEntrySchema, I as workflowBuilderSleepUntilEntryInputSchema, L as workflowBuilderSleepUntilEntrySchema, R as workflowBuilderToolEntryInputSchema, z as workflowBuilderToolEntrySchema } from "../../builder-
|
|
1
|
+
export { U as WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS, W as WORKFLOW_BUILDER_AUTHORING_PLAYBOOK, i as WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION, t as WORKFLOW_BUILDER_SUPPORTED_STEP_TYPES, B as compareWorkflowBuilderSchemas, r as createWorkflowBuilderAgent, a as deleteStoredWorkflowResponseSchema, V as inspectWorkflowBuilderSchemas, o as listStoredWorkflowsResponseSchema, n as normalizeWorkflowBuilderDefinition, H as preflightWorkflowDefinition, s as storedWorkflowDefinitionSchema, c as upsertStoredWorkflowResponseSchema, l as workflowBuilderAgentEntryInputSchema, u as workflowBuilderAgentEntrySchema, d as workflowBuilderClassifierEntryInputSchema, f as workflowBuilderClassifierEntrySchema, p as workflowBuilderConditionalEntryInputSchema, m as workflowBuilderConditionalEntrySchema, h as workflowBuilderDefinitionInputSchema, g as workflowBuilderDefinitionSchema, _ as workflowBuilderForeachEntryInputSchema, v as workflowBuilderForeachEntrySchema, y as workflowBuilderGraphEntryInputSchema, b as workflowBuilderGraphEntrySchema, x as workflowBuilderLoopEntryInputSchema, S as workflowBuilderLoopEntrySchema, C as workflowBuilderMappingConfigSchema, w as workflowBuilderMappingDescriptorSchema, T as workflowBuilderMappingEntryInputSchema, E as workflowBuilderMappingEntrySchema, D as workflowBuilderNestedWorkflowEntryInputSchema, O as workflowBuilderNestedWorkflowEntrySchema, k as workflowBuilderParallelEntryInputSchema, A as workflowBuilderParallelEntrySchema, j as workflowBuilderPredicateSchema, M as workflowBuilderScheduleConfigSchema, N as workflowBuilderScheduleSchema, P as workflowBuilderSleepEntryInputSchema, F as workflowBuilderSleepEntrySchema, I as workflowBuilderSleepUntilEntryInputSchema, L as workflowBuilderSleepUntilEntrySchema, R as workflowBuilderToolEntryInputSchema, z as workflowBuilderToolEntrySchema } from "../../builder-C9UYOrxv.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_run_registry = require("../../run-registry-
|
|
2
|
+
const require_run_registry = require("../../run-registry-BJa47sa2.cjs");
|
|
3
3
|
exports.EventedExecutionEngine = require_run_registry.EventedExecutionEngine;
|
|
4
4
|
exports.EventedRun = require_run_registry.EventedRun;
|
|
5
5
|
exports.EventedWorkflow = require_run_registry.EventedWorkflow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { _c as EventedExecutionEngine, zs as EventedRun, Bs as EventedWorkflow, Ks as StepExecutor, Gs as WorkflowEventProcessor, Vs as cloneStep, Hs as cloneWorkflow, Us as createStep, Ws as createWorkflow } from "../../run-registry-Bj_lW9M3.js";
|
package/dist/workflows/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_run_registry = require("../run-registry-
|
|
3
|
-
const require_stream = require("../stream-
|
|
2
|
+
const require_run_registry = require("../run-registry-BJa47sa2.cjs");
|
|
3
|
+
const require_stream = require("../stream-CWE0h7Yc.cjs");
|
|
4
4
|
const require_predicate_index = require("../predicate/index.cjs");
|
|
5
5
|
const require_schedules = require("../schedules-BZS8McF7.cjs");
|
|
6
6
|
const require_scheduler = require("../scheduler-D00X03jQ.cjs");
|
|
7
|
-
const require_validate = require("../validate-
|
|
8
|
-
const require_rehydrate = require("../rehydrate-
|
|
7
|
+
const require_validate = require("../validate-DdirQd9u.cjs");
|
|
8
|
+
const require_rehydrate = require("../rehydrate-DwfzaTOg.cjs");
|
|
9
9
|
// src/workflows/state-reader.ts
|
|
10
10
|
const getStep = (state, stepId) => state.steps?.[stepId];
|
|
11
11
|
const getFirstStepResult = (step) => {
|
package/dist/workflows/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $c as
|
|
2
|
-
import { Dt as getStepResult, Ot as getStepResultAsync } from "../stream-
|
|
1
|
+
import { $c as assertTimeTravelGraphMatchesSnapshot, Cc as createStep, Cl as waitForSuspendedSnapshot, Dc as evaluatePredicate, Ec as predicateToCondition, Gc as createMappingStep, Is as cloneWorkflow, Jc as createStepFromTool, Kc as createStepFromAgent, Ls as createEventedWorkflow, Nc as DefaultExecutionEngine, Ol as workflowTermination, Qc as applyStateDelta, Rs as createWorkflow, Sc as cloneStep, Sl as validateStepSuspendData, Tc as mapVariable, Tl as getEntryWorkflow, Vc as ExecutionEngine, Xc as RESUME_SNAPSHOT_WAIT_STATUSES, Yc as RESUME_SNAPSHOT_POLL_INTERVAL_MS, Zc as abortableSleep, _l as setLongTimeout, al as defineStateAccessors, bc as Run, bl as validateStepResumeData, cl as getSingleStepEntryId, dl as isEntryFinished, el as cleanStepResult, fl as isSingleStepEntry, gl as runCountDeprecationMessage, hl as resolveForeachConcurrency, il as defineLazyWriter, ll as getStepIds, ml as omitPriorSuspensionFields, nl as createRestartExecutionParams, ol as getRestartStartIndex, pl as omitPriorCompletionFields, qc as createStepFromClassifier, qs as computeScheduleDefinitionHash, rl as createTimeTravelExecutionParams, sl as getResumeLabelsByStepId, tl as createDeprecationProxy, ul as hydrateSerializedStepErrors, vl as validateStepInput, wc as isProcessor, wl as getEntryId, xc as Workflow, xl as validateStepStateData, yl as validateStepRequestContext } from "../run-registry-Bj_lW9M3.js";
|
|
2
|
+
import { Dt as getStepResult, Ot as getStepResultAsync } from "../stream-DaIpS6ky.js";
|
|
3
3
|
import { derivePredicateLabel, predicateSchema } from "../predicate/index.js";
|
|
4
4
|
import { _ as validateCron, h as computeNextFireAt } from "../schedules-DZfSx-7P.js";
|
|
5
5
|
import { n as WorkflowScheduler, t as Scheduler } from "../scheduler-B-VZUvv_.js";
|
|
6
|
-
import { a as jsonSchemaToZod, c as analyzeMapConfig, d as toJsonSchemaOrUndefined, f as validateWorkflowRefs, h as forEachSingleStepEntryWithPath, i as validateWorkflowSchemas, l as parseMapConfig, m as forEachSingleStepEntry, n as validateDynamicWorkflow, o as validateStorableJsonSchema, p as collectNestedWorkflowIds, r as validateWorkflowStructure, s as inferGraphSchemas, t as assertValidDynamicWorkflow, u as schemaCompatibility } from "../validate-
|
|
7
|
-
import { n as entryOptionFields, r as toStorableGraph, t as rehydrateWorkflow } from "../rehydrate-
|
|
6
|
+
import { a as jsonSchemaToZod, c as analyzeMapConfig, d as toJsonSchemaOrUndefined, f as validateWorkflowRefs, h as forEachSingleStepEntryWithPath, i as validateWorkflowSchemas, l as parseMapConfig, m as forEachSingleStepEntry, n as validateDynamicWorkflow, o as validateStorableJsonSchema, p as collectNestedWorkflowIds, r as validateWorkflowStructure, s as inferGraphSchemas, t as assertValidDynamicWorkflow, u as schemaCompatibility } from "../validate-x3wcpuT8.js";
|
|
7
|
+
import { n as entryOptionFields, r as toStorableGraph, t as rehydrateWorkflow } from "../rehydrate-C4-5kM6Z.js";
|
|
8
8
|
// src/workflows/state-reader.ts
|
|
9
9
|
const getStep = (state, stepId) => state.steps?.[stepId];
|
|
10
10
|
const getFirstStepResult = (step) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/core",
|
|
3
|
-
"version": "1.87.0-alpha.
|
|
3
|
+
"version": "1.87.0-alpha.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -966,19 +966,19 @@
|
|
|
966
966
|
"vscode-languageserver-protocol": "^3.18.5",
|
|
967
967
|
"zod": "^4.6.7",
|
|
968
968
|
"zod-v3": "npm:zod@3.25.76",
|
|
969
|
+
"@internal/ai-v6": "0.0.99",
|
|
970
|
+
"@internal/ai-v7": "0.0.99",
|
|
969
971
|
"@internal/ai-sdk-v4": "0.0.99",
|
|
970
972
|
"@internal/ai-sdk-v5": "0.0.99",
|
|
971
973
|
"@internal/auth": "0.0.40",
|
|
972
974
|
"@internal/core": "0.1.4",
|
|
973
|
-
"@internal/
|
|
975
|
+
"@internal/deployer": "0.0.5",
|
|
974
976
|
"@internal/lint": "0.0.152",
|
|
975
|
-
"@internal/external-types": "0.0.102",
|
|
976
977
|
"@internal/llm-recorder": "0.0.88",
|
|
977
|
-
"@internal/
|
|
978
|
+
"@internal/external-types": "0.0.102",
|
|
978
979
|
"@internal/types-builder": "0.0.127",
|
|
979
|
-
"@internal/
|
|
980
|
-
"@internal/
|
|
981
|
-
"@internal/voice": "0.0.48"
|
|
980
|
+
"@internal/voice": "0.0.48",
|
|
981
|
+
"@internal/test-utils": "0.0.88"
|
|
982
982
|
},
|
|
983
983
|
"engines": {
|
|
984
984
|
"node": ">=22.13.0"
|