@mastra/core 1.87.0-alpha.11 → 1.87.0-alpha.12
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/a2a/index.cjs +1 -1
- package/dist/a2a/index.js +1 -1
- package/dist/agent/durable/index.cjs +1 -1
- package/dist/agent/durable/index.js +1 -1
- package/dist/agent/durable/run-registry.d.ts +2 -0
- package/dist/agent/durable/types.d.ts +6 -0
- package/dist/agent/durable/utils/resolve-runtime.d.ts +5 -0
- package/dist/agent/index.cjs +3 -3
- package/dist/agent/index.js +3 -3
- package/dist/agent/message-list/index.cjs +1 -1
- package/dist/agent/message-list/index.js +1 -1
- package/dist/agent/message-list/state/MessageStateManager.d.ts +5 -0
- 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-DKI-d-np.cjs → agent-controller-BcN7r3yI.cjs} +24 -197
- package/dist/{agent-controller-BrRzZy4-.js → agent-controller-DfeTRuBc.js} +24 -197
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-CDP3Pgeu.js → background-tasks-BcU--rXL.js} +1 -1
- package/dist/{background-tasks-CDgdfRmB.cjs → background-tasks-DRUHnQOk.cjs} +1 -1
- package/dist/browser/index.cjs +15 -6
- package/dist/browser/index.js +15 -6
- package/dist/browser/processor.d.ts +1 -0
- package/dist/{builder-Bs4CtyqT.cjs → builder-Bufqrcz3.cjs} +2 -2
- package/dist/{builder-DuT0Iqb5.js → builder-TuIc5l7X.js} +2 -2
- package/dist/capabilities/302ai.json +204 -204
- package/dist/capabilities/abliteratedllm.json +33 -33
- package/dist/capabilities/abliteration-ai.json +9 -9
- package/dist/capabilities/above.json +18 -18
- package/dist/capabilities/adaption.json +11 -11
- package/dist/capabilities/adzuki.json +20 -20
- 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 +19 -19
- package/dist/capabilities/aigrow.json +12 -12
- package/dist/capabilities/aimlapi.json +141 -141
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +21 -21
- package/dist/capabilities/aki-io.json +16 -16
- package/dist/capabilities/alibaba-cn.json +97 -97
- package/dist/capabilities/alibaba-coding-plan-cn.json +6 -6
- package/dist/capabilities/alibaba-coding-plan.json +6 -6
- package/dist/capabilities/alibaba-token-plan-cn.json +51 -51
- package/dist/capabilities/alibaba-token-plan.json +51 -51
- package/dist/capabilities/alibaba.json +67 -67
- package/dist/capabilities/ambient.json +14 -14
- package/dist/capabilities/amd.json +10 -10
- package/dist/capabilities/anthropic.json +49 -49
- package/dist/capabilities/anyapi.json +18 -18
- package/dist/capabilities/apiko.json +4 -4
- package/dist/capabilities/arcee.json +7 -7
- package/dist/capabilities/augure.json +2 -2
- package/dist/capabilities/auriko.json +21 -21
- package/dist/capabilities/bailing.json +3 -3
- package/dist/capabilities/baseten.json +31 -31
- package/dist/capabilities/bee.json +4 -4
- package/dist/capabilities/berget.json +8 -8
- package/dist/capabilities/bothub.json +15 -15
- package/dist/capabilities/boundless.json +40 -40
- package/dist/capabilities/bumo.json +45 -45
- package/dist/capabilities/byteplus.json +26 -26
- package/dist/capabilities/cerebras.json +4 -4
- package/dist/capabilities/cheapaimodel.json +10 -10
- package/dist/capabilities/cheapest-token.json +30 -30
- package/dist/capabilities/chutes.json +8 -8
- package/dist/capabilities/clarifai.json +2 -2
- package/dist/capabilities/cline-pass.json +35 -35
- package/dist/capabilities/cloudcode.json +10 -10
- package/dist/capabilities/cloudflare-workers-ai.json +13 -13
- package/dist/capabilities/commandcode.json +150 -150
- package/dist/capabilities/concentrate.json +289 -289
- package/dist/capabilities/cortecs.json +106 -106
- package/dist/capabilities/crossmodel.json +196 -196
- package/dist/capabilities/crusoe.json +12 -12
- package/dist/capabilities/daoxe.json +9 -9
- package/dist/capabilities/databricks.json +134 -134
- package/dist/capabilities/deepinfra.json +100 -100
- package/dist/capabilities/deepseek.json +4 -4
- package/dist/capabilities/digitalocean.json +114 -114
- package/dist/capabilities/dothoosh.json +31 -31
- package/dist/capabilities/doubleword.json +30 -30
- package/dist/capabilities/edenai.json +282 -282
- package/dist/capabilities/empiriolabs.json +168 -168
- package/dist/capabilities/engy.json +22 -22
- package/dist/capabilities/entrim.json +4 -4
- package/dist/capabilities/evroc.json +16 -16
- package/dist/capabilities/ezkielyna.json +13 -13
- package/dist/capabilities/fastrouter.json +69 -69
- package/dist/capabilities/fireworks-ai.json +91 -91
- package/dist/capabilities/fortytwo.json +4 -4
- package/dist/capabilities/freemodel.json +24 -24
- package/dist/capabilities/friendli.json +6 -6
- package/dist/capabilities/frogbot.json +100 -100
- package/dist/capabilities/gisoo.json +18 -18
- package/dist/capabilities/gmicloud.json +8 -8
- package/dist/capabilities/google.json +48 -48
- package/dist/capabilities/graphn.json +10 -10
- package/dist/capabilities/greenpt.json +35 -35
- package/dist/capabilities/groq.json +9 -9
- package/dist/capabilities/helicone.json +87 -87
- package/dist/capabilities/hopper.json +2 -2
- package/dist/capabilities/hostinger-router.json +4 -4
- package/dist/capabilities/hpc-ai.json +5 -5
- package/dist/capabilities/huawei-maas.json +15 -15
- package/dist/capabilities/hubris.json +26 -26
- package/dist/capabilities/huggingface.json +87 -87
- package/dist/capabilities/hyper.json +22 -22
- package/dist/capabilities/impossibl.json +137 -137
- package/dist/capabilities/inception.json +3 -3
- package/dist/capabilities/inco.json +4 -4
- package/dist/capabilities/infer.json +16 -16
- package/dist/capabilities/inferall.json +8 -8
- package/dist/capabilities/inference-coop.json +15 -15
- package/dist/capabilities/inferenceapis.json +15 -15
- package/dist/capabilities/inferris.json +2 -2
- package/dist/capabilities/infersia.json +9 -9
- package/dist/capabilities/inferx.json +3 -3
- package/dist/capabilities/infomaniak.json +4 -4
- package/dist/capabilities/isoquant.json +4 -4
- package/dist/capabilities/iteracompute.json +61 -61
- package/dist/capabilities/jad-ai.json +2 -2
- package/dist/capabilities/jalapeno.json +11 -11
- package/dist/capabilities/jiekou.json +67 -67
- package/dist/capabilities/jzstoken.json +40 -40
- package/dist/capabilities/keln.json +19 -19
- package/dist/capabilities/kenari.json +127 -119
- package/dist/capabilities/kilo.json +615 -615
- 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 +2 -2
- package/dist/capabilities/klavo.json +22 -22
- package/dist/capabilities/korouter.json +28 -28
- package/dist/capabilities/kunavo.json +8 -8
- package/dist/capabilities/liquid.json +12 -12
- package/dist/capabilities/lithosai.json +2 -2
- package/dist/capabilities/llmgateway-providers.json +935 -935
- package/dist/capabilities/llmgateway.json +343 -343
- package/dist/capabilities/llmtr.json +30 -30
- package/dist/capabilities/lowrouter.json +48 -48
- package/dist/capabilities/lyceum.json +12 -12
- package/dist/capabilities/melious.json +13 -13
- package/dist/capabilities/merge-gateway.json +300 -300
- package/dist/capabilities/meta.json +7 -7
- package/dist/capabilities/mistral.json +13 -13
- package/dist/capabilities/mixlayer.json +5 -5
- package/dist/capabilities/modal.json +8 -8
- package/dist/capabilities/model-oracle-ai.json +19 -19
- package/dist/capabilities/modelis.json +20 -20
- package/dist/capabilities/modelscope.json +2 -2
- package/dist/capabilities/modular.json +13 -13
- package/dist/capabilities/moneo.json +16 -16
- package/dist/capabilities/moonshotai-cn.json +5 -5
- package/dist/capabilities/moonshotai.json +5 -5
- package/dist/capabilities/morph.json +16 -16
- package/dist/capabilities/munito-eu.json +4 -4
- package/dist/capabilities/munito.json +6 -6
- package/dist/capabilities/nan.json +28 -28
- package/dist/capabilities/nano-gpt.json +579 -578
- package/dist/capabilities/nearai.json +88 -88
- package/dist/capabilities/nebius.json +30 -30
- package/dist/capabilities/neon.json +128 -128
- package/dist/capabilities/neuralwatt.json +43 -43
- package/dist/capabilities/nokeep.json +4 -4
- package/dist/capabilities/novita-ai.json +148 -148
- package/dist/capabilities/nvidia.json +40 -40
- package/dist/capabilities/oathbreaker.json +4 -4
- package/dist/capabilities/obscurify.json +22 -22
- package/dist/capabilities/oci.json +6 -6
- package/dist/capabilities/ofox.json +337 -337
- package/dist/capabilities/ollama-cloud.json +58 -58
- package/dist/capabilities/openai.json +57 -57
- package/dist/capabilities/opencode-go.json +88 -88
- package/dist/capabilities/openreason.json +5 -5
- package/dist/capabilities/openrouter.json +519 -519
- package/dist/capabilities/opper.json +30 -30
- package/dist/capabilities/orcarouter.json +236 -236
- package/dist/capabilities/outerlabs.json +30 -30
- package/dist/capabilities/ovhcloud.json +21 -21
- package/dist/capabilities/perplexity-agent.json +59 -59
- package/dist/capabilities/phala.json +30 -30
- package/dist/capabilities/pioneer.json +29 -29
- package/dist/capabilities/poe.json +115 -115
- package/dist/capabilities/poolside.json +3 -3
- package/dist/capabilities/powerspring.json +12 -12
- package/dist/capabilities/primalabs.json +9 -9
- package/dist/capabilities/prime.json +106 -106
- package/dist/capabilities/privatemode-ai.json +14 -14
- package/dist/capabilities/proxystacks.json +6 -6
- package/dist/capabilities/qiniu-ai.json +15 -15
- package/dist/capabilities/refuseless.json +6 -6
- package/dist/capabilities/regolo-ai.json +6 -6
- package/dist/capabilities/requesty.json +203 -203
- package/dist/capabilities/ruapi.json +22 -22
- package/dist/capabilities/runcrate.json +7 -7
- package/dist/capabilities/runinfra.json +15 -15
- package/dist/capabilities/sakana.json +5 -5
- package/dist/capabilities/sambanova.json +6 -6
- package/dist/capabilities/sandbase.json +11 -11
- package/dist/capabilities/sarvam.json +6 -6
- package/dist/capabilities/scaleway.json +16 -16
- package/dist/capabilities/scnet-token-plan.json +13 -13
- package/dist/capabilities/scx-ai.json +29 -29
- package/dist/capabilities/sensenova.json +12 -12
- package/dist/capabilities/siliconflow-cn.json +62 -62
- package/dist/capabilities/siliconflow.json +48 -48
- package/dist/capabilities/snowflake-cortex.json +24 -24
- package/dist/capabilities/sokkan.json +9 -9
- package/dist/capabilities/sparrowcodes.json +21 -21
- package/dist/capabilities/standardcompute.json +97 -97
- package/dist/capabilities/steadyrouter.json +36 -36
- package/dist/capabilities/stepfun-ai-step-plan.json +5 -5
- package/dist/capabilities/stepfun-ai.json +5 -5
- package/dist/capabilities/stepfun-step-plan.json +5 -5
- package/dist/capabilities/stepfun.json +5 -5
- package/dist/capabilities/stepping-stone.json +22 -22
- package/dist/capabilities/subconscious.json +2 -2
- package/dist/capabilities/synthetic.json +6 -6
- package/dist/capabilities/synthorai.json +25 -25
- package/dist/capabilities/teamorouter.json +19 -19
- package/dist/capabilities/teapot-router.json +15 -15
- package/dist/capabilities/tencent-token-plan-intl.json +20 -20
- package/dist/capabilities/tencent-token-plan.json +36 -36
- package/dist/capabilities/tencent-tokenhub.json +40 -40
- package/dist/capabilities/tensorx.json +51 -51
- package/dist/capabilities/the-grid-ai.json +39 -39
- package/dist/capabilities/thinkingmachines.json +78 -78
- package/dist/capabilities/tinfoil.json +13 -13
- package/dist/capabilities/toapis.json +2 -2
- package/dist/capabilities/togetherai.json +44 -44
- package/dist/capabilities/tokengo.json +18 -18
- package/dist/capabilities/tokenify.json +8 -8
- package/dist/capabilities/trustedrouter.json +7 -7
- package/dist/capabilities/trustedtokens.json +19 -19
- package/dist/capabilities/umans-ai-coding-plan.json +14 -14
- package/dist/capabilities/umans-ai.json +12 -12
- package/dist/capabilities/unrestricted.json +6 -6
- package/dist/capabilities/uplinkswitch.json +18 -18
- package/dist/capabilities/upstage.json +6 -6
- package/dist/capabilities/vancine.json +21 -21
- package/dist/capabilities/vercel.json +536 -536
- package/dist/capabilities/vivgrid.json +79 -79
- package/dist/capabilities/volcengine-coding-plan.json +29 -29
- package/dist/capabilities/volcengine.json +27 -27
- package/dist/capabilities/vultr.json +28 -28
- package/dist/capabilities/wafer.ai.json +15 -15
- package/dist/capabilities/wally.json +11 -11
- package/dist/capabilities/wandb.json +21 -21
- package/dist/capabilities/watt.json +25 -25
- package/dist/capabilities/xai.json +6 -6
- 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 +3 -3
- package/dist/capabilities/xpersona.json +12 -12
- package/dist/capabilities/xxapi.json +31 -31
- package/dist/capabilities/zai-coding-plan.json +18 -18
- package/dist/capabilities/zai.json +32 -32
- package/dist/capabilities/zenifra.json +29 -29
- package/dist/capabilities/zenmux.json +186 -186
- package/dist/capabilities/zerogpu.json +6 -6
- package/dist/capabilities/zhipuai-coding-plan.json +8 -8
- package/dist/capabilities/zhipuai.json +31 -31
- package/dist/capabilities/zro.json +7 -7
- package/dist/channels/index.cjs +2 -2
- package/dist/channels/index.js +2 -2
- package/dist/{channels-CkRMEIQ6.js → channels-Cdsqdajh.js} +1 -1
- package/dist/{channels-Bkd_v8M1.cjs → channels-MsOnUvU6.cjs} +1 -1
- package/dist/coding-agent/index.cjs +2 -2
- package/dist/coding-agent/index.js +2 -2
- package/dist/datasets/index.cjs +2 -2
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +515 -515
- package/dist/docs/references/reference-memory-observational-memory.md +4 -0
- package/dist/docs/references/reference.md +1 -0
- package/dist/evals/index.cjs +1 -1
- package/dist/evals/index.js +1 -1
- package/dist/evals/scoreTraces/index.cjs +1 -1
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/harness/index.cjs +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 +1 -1
- package/dist/knowledge/index.js +1 -1
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/provider-types.generated.d.ts +7225 -7224
- package/dist/llm/reasoning/anthropic-thinking.d.ts +5 -0
- package/dist/llm/reasoning/gemini-thinking.d.ts +24 -0
- package/dist/llm/reasoning/index.cjs +389 -0
- package/dist/llm/reasoning/index.d.ts +8 -0
- package/dist/llm/reasoning/index.js +362 -0
- package/dist/llm/reasoning/model-fallback.d.ts +75 -0
- package/dist/llm/reasoning/model-ids.d.ts +5 -0
- package/dist/llm/reasoning/thinking-provider-options.d.ts +10 -0
- package/dist/llm/reasoning/thinking-request.d.ts +14 -0
- package/dist/llm/reasoning/thinking.d.ts +37 -0
- package/dist/{llm-DAw2eouV.cjs → llm-CS6YY_IV.cjs} +2 -2
- package/dist/{llm-DFT5EKp4.js → llm-zjtMQn7M.js} +2 -2
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/{manager-hxzEe4U5.cjs → manager-BU_lY6kl.cjs} +2 -2
- package/dist/{manager-DiDnvKLM.js → manager-Do0MENhH.js} +2 -2
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.d.ts +2 -0
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-BPaPxG5t.js → mastra-C-1zIyS5.js} +22 -16
- package/dist/{mastra-1diaq68N.cjs → mastra-DYVjsXTO.cjs} +22 -16
- package/dist/memory/index.cjs +3 -3
- package/dist/memory/index.js +3 -3
- package/dist/memory/om-events/index.cjs +189 -0
- package/dist/memory/om-events/index.d.ts +17 -0
- package/dist/memory/om-events/index.js +188 -0
- package/dist/{message-list-vR3uLAHL.cjs → message-list-C0F2sDNC.cjs} +3 -2
- package/dist/{message-list-BGm1DCiG.js → message-list-RgFlLrxG.js} +3 -2
- package/dist/{model-DSMHJM3c.cjs → model-DGFc1hw3.cjs} +1 -1
- package/dist/{model-CUBZjm0T.js → model-DIzIjDej.js} +1 -1
- package/dist/{netlify-D1BKjns0.js → netlify-B9mLgxJs.js} +1 -1
- package/dist/{netlify-C21T9ozJ.cjs → netlify-CyL6FNsw.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/{provider-registry-BAlFFX5o.js → provider-registry-DdQoO_jd.js} +22673 -22670
- package/dist/{provider-registry-ChojUVJa.cjs → provider-registry-g9m_fyV8.cjs} +22673 -22670
- package/dist/provider-registry.json +22961 -22958
- package/dist/{registry-generator-CAUL9Hek.cjs → registry-generator-At8J4ZOR.cjs} +1 -1
- package/dist/{registry-generator-BbWSH6W4.js → registry-generator-CX6Ev697.js} +1 -1
- package/dist/{rehydrate-0xSq47n9.cjs → rehydrate-BzD6UX8f.cjs} +2 -2
- package/dist/{rehydrate-CzUnNFU6.js → rehydrate-DEDxsr6E.js} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/{run-registry-DJT02z_9.js → run-registry-D22IF5SK.js} +61 -21
- package/dist/{run-registry-CrTsH9iL.cjs → run-registry-PiQTSx2Y.cjs} +61 -21
- package/dist/storage/index.cjs +2 -2
- package/dist/storage/index.js +2 -2
- package/dist/stream/base/output.d.ts +7 -0
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-CMKRczs4.cjs → stream-BbPZavop.cjs} +36 -4
- package/dist/{stream-CG9OooRx.js → stream-CoQTdzLm.js} +31 -5
- 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-14o3Z1qo.cjs → tool-loop-agent-8lyD6O4o.cjs} +4 -4
- package/dist/{tool-loop-agent-Bi6z_q7o.js → tool-loop-agent-DhQkNDaR.js} +4 -4
- package/dist/{utils-Fag7YDBU.js → utils-B-3lET9S.js} +1 -1
- package/dist/{utils-DkvbP8EA.cjs → utils-DtmyBuBT.cjs} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-DLER0nlQ.js → validate-CO4rWYyH.js} +1 -1
- package/dist/{validate-Bhrlve2E.cjs → validate-vucjWXcz.cjs} +1 -1
- package/dist/vector/index.cjs +2 -2
- package/dist/vector/index.js +2 -2
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/{worker-leYV1Y91.js → worker-B6CpapAF.js} +2 -2
- package/dist/{worker-BwJyrFQN.cjs → worker-BgifMkOw.cjs} +2 -2
- package/dist/{worker-D-em3hyS.js → worker-CCpSrXBY.js} +2 -2
- package/dist/{worker-0gczpztM.cjs → worker-eUT7GgQ9.cjs} +2 -2
- package/dist/{workflow-FikHVwog.js → workflow-B4Tn58DD.js} +3 -3
- package/dist/{workflow-DWdcEcxw.cjs → workflow-BJSrGEEL.cjs} +3 -3
- package/dist/workflows/builder/index.cjs +1 -1
- package/dist/workflows/builder/index.js +1 -1
- package/dist/workflows/evented/index.cjs +1 -1
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +4 -4
- package/dist/workflows/index.js +4 -4
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/sandbox/local-sandbox.d.ts +11 -0
- package/dist/workspace/sandbox/sandbox.d.ts +2 -0
- package/dist/{workspace-C8Zo5_qK.cjs → workspace-C5lXteRU.cjs} +174 -12
- package/dist/{workspace-DOAil8mG.js → workspace-CnmmMou8.js} +174 -12
- package/llm/reasoning.d.ts +1 -0
- package/memory/om-events.d.ts +1 -0
- package/package.json +28 -8
- package/src/llm/model/provider-types.generated.d.ts +7225 -7224
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-BrhgMLW6.cjs");
|
|
2
|
-
const require_netlify = require("./netlify-
|
|
2
|
+
const require_netlify = require("./netlify-CyL6FNsw.cjs");
|
|
3
3
|
let path = require("path");
|
|
4
4
|
path = require_rolldown_runtime.__toESM(path, 1);
|
|
5
5
|
let fs_promises = require("fs/promises");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as getCapabilityFileName, g as shouldEnableGateway, m as getGatewayId } from "./netlify-
|
|
1
|
+
import { _ as getCapabilityFileName, g as shouldEnableGateway, m as getGatewayId } from "./netlify-B9mLgxJs.js";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import fs from "fs/promises";
|
|
4
4
|
// src/llm/model/registry-generator.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_run_registry = require("./run-registry-
|
|
1
|
+
const require_run_registry = require("./run-registry-PiQTSx2Y.cjs");
|
|
2
2
|
const require_predicate_index = require("./predicate/index.cjs");
|
|
3
|
-
const require_validate = require("./validate-
|
|
3
|
+
const require_validate = require("./validate-vucjWXcz.cjs");
|
|
4
4
|
let _mastra_schema_compat_schema = require("@mastra/schema-compat/schema");
|
|
5
5
|
// src/workflows/dynamic/serialize.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Gs as createEventedWorkflow, Ks as createWorkflow, Nc as mapVariable, Pc as predicateToCondition, Ws as cloneWorkflow, el as createStepFromAgent, gl as getSingleStepEntryId, nl as createStepFromTool } from "./run-registry-
|
|
1
|
+
import { Gs as createEventedWorkflow, Ks as createWorkflow, Nc as mapVariable, Pc as predicateToCondition, Ws as cloneWorkflow, el as createStepFromAgent, gl as getSingleStepEntryId, nl as createStepFromTool } from "./run-registry-D22IF5SK.js";
|
|
2
2
|
import { derivePredicateLabel } from "./predicate/index.js";
|
|
3
|
-
import { a as jsonSchemaToZod, l as parseMapConfig } from "./validate-
|
|
3
|
+
import { a as jsonSchemaToZod, l as parseMapConfig } from "./validate-CO4rWYyH.js";
|
|
4
4
|
import { standardSchemaToJSONSchema, toStandardSchema } from "./schema/index.js";
|
|
5
5
|
// src/workflows/dynamic/serialize.ts
|
|
6
6
|
/**
|
package/dist/relevance/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-PiQTSx2Y.cjs");
|
|
3
|
+
const require_stream = require("../stream-BbPZavop.cjs");
|
|
4
4
|
// src/relevance/relevance-score-provider.ts
|
|
5
5
|
function createSimilarityPrompt(query, text) {
|
|
6
6
|
return `Rate the semantic similarity between the following the query and the text on a scale from 0 to 1 (decimals allowed), where 1 means exactly the same meaning and 0 means completely different:
|
package/dist/relevance/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as Agent } from "../run-registry-
|
|
2
|
-
import {
|
|
1
|
+
import { F as Agent } from "../run-registry-D22IF5SK.js";
|
|
2
|
+
import { un as isSupportedLanguageModel } from "../stream-CoQTdzLm.js";
|
|
3
3
|
// src/relevance/relevance-score-provider.ts
|
|
4
4
|
function createSimilarityPrompt(query, text) {
|
|
5
5
|
return `Rate the semantic similarity between the following the query and the text on a scale from 0 to 1 (decimals allowed), where 1 means exactly the same meaning and 0 means completely different:
|
|
@@ -4,14 +4,14 @@ import { t as MastraBase } from "./base-CKLWBhDo.js";
|
|
|
4
4
|
import { A as compactStopReasonContext, D as agentLoopTermination, O as executionFailureTermination, S as resolveObservabilityContext, b as wrapMastra, i as subtractReportedUsage, k as tripwireTermination, n as extractUsageMetrics, r as isUsageIncomplete, t as calculateObservedUsage, x as createObservabilityContext, y as unwrapMastraTracingProxy } from "./observability-D7RNOAPx.js";
|
|
5
5
|
import { a as MastraNonRetryableError, i as MastraError, n as ErrorDomain, o as getErrorFromUnknown, t as ErrorCategory } from "./error-oh2DLsP2.js";
|
|
6
6
|
import { a as classifyProviderError, l as describeProviderError, t as recordTerminalErrorMessage, u as readProviderErrorDetails } from "./error-BC9Au-22.js";
|
|
7
|
-
import { $ as
|
|
7
|
+
import { $ as summarizeToolChoiceForSpan, $t as commitToolResult, A as isSignalChunkExcluded, An as safeEnqueue, At as getSnapshotMemoryInfo, B as removeTrailingAssistantGuardContinuations, Bt as stateColumnsWrite, C as stampChunkProducedAt, Cn as guardStreamWithAbort, D as isStructuredOutputError, Dt as validateTemplate, E as escapeUnescapedControlCharsInJsonStrings, En as settledOrElapsed, Et as traverseMappingPath, F as endOutputStreamSpanOutsideStep, Ft as latestStepResults, G as FLUSH_HELD_PARTS_KEY, Gt as diffStateAsJson, Ht as unusedStateEntries, I as findOwnModelStepSpan, It as materializeState, J as withoutHeldContent, K as REPROCESS_PART_KEY, Kt as patchState, Lt as materializeWorkflowRun, M as ProcessorRunner, Mn as createRunScope, N as ProcessorState, Nn as createRunScopeKey, Nt as applyStateColumnsWrite, O as asJsonSchema, On as MastraModelInput, Ot as getStepResult, P as endOutputStreamSpanAtStepEnd, Pt as isStateCheckpointDue, Q as summarizeProcessorToolsForSpan, R as isTrailingAssistantGuardContinuation, Rt as pickStateKeys, S as getChunkProducedAt, Sn as guardStreamUntilMatch, St as stepRefId, T as createOutputHandler, Tn as raceAgainstAbort, Tt as templateReadsState, Ut as applyStatePatch, V as ProviderHistoryCompat, Vt as summarizeStepResult, X as summarizeProcessorModelForSpan, Y as summarizeActiveToolsForSpan, Yt as isObservationalMemoryEnabled$1, Z as summarizeProcessorResultForSpan, Zt as parseMemoryRequestContext, _ as persistProcessorDataChunk, _n as DEADLINE_SAVE_CLAIM_HOLD_MS, _t as stubStepResult, a as convertFullStreamChunkToMastra, an as snapshotToolResult, at as PROCESSOR_ABORT_SIGNAL, b as resolveOutputMessageSkippingCompletionChecks, bn as createTimeoutAbortSignal, bt as predicateReadsState, c as WorkflowRunOutput, cn as validationErrorModelOutput, ct as getHydratedStepResult, d as MastraModelOutput, dn as resolveSuspendedToolRunId, dt as lazyStepResults, en as computeModelOutputProviderMetadata, et as resolveProcessorSpanAttributes, f as clearStepPartIndexes, fn as resolveThreadIdFromArgs, ft as loadStepResults, g as isFeedbackContinuation, gn as applyStateSignal, gt as storageV2StepResultAccessors, h as findStepPartBoundaries, hn as tryStreamWithJsonFallback, ht as residentStepResultsLoader, in as resolveModelOutputAfterToolResultProcessors, it as createProcessorSendSignal, j as OUTPUT_STREAM_HOOK_DURATION_KEY_PREFIX, jn as safeError, k as getResponseFormat, kn as safeClose, kt as getStepResultAsync, l as TripWire, ln as isProcessorWorkflow, lt as hydrateStepResults, m as findIterationOffsetInParts, mn as tryGenerateWithJsonFallback, mt as residentStepResults, nn as latestProcessedModelOutput, nt as toProcessorSpanPhase, on as withAgentWorkflowToolMarker, ot as RunJournal, p as createDestructurableOutput, pn as supportedLanguageModelSpecifications, pt as loadedStepResults, q as takeHeldParts, rn as readModelOutput, rt as PROCESSOR_LATE_SIGNAL_SINK, s as MastraAgentNetworkStream, sn as normalizeModelOutput, st as buildStepResultAccessors, tn as hasToolResultProcessor, tt as resolveProcessorSpanName, u as getModelOutputForTripwire, un as isSupportedLanguageModel, ut as isStepResultStub, v as reconcileBufferedStepTexts, vn as DEADLINE_SAVE_WAIT_MS, vt as collectMappingStepRefs, w as markChunkOutputProcessed, wn as isMastraTimeoutError, wt as resolveTemplate, x as resolveProcessorWriterMessageId, xn as getAbortReason, xt as resolveStepOutputs, y as resolveMessageText, yn as MastraTimeoutError, yt as collectPredicateStepRefs, z as needsTrailingAssistantGuard, zt as stateBaseOf } from "./stream-CoQTdzLm.js";
|
|
8
8
|
import { c as MASTRA_THREAD_ID_KEY, d as isReservedRequestContextKey, f as mergeVersionOverrides$1, l as MASTRA_VERSIONS_KEY, n as MASTRA_AUTH_TOKEN_KEY, o as MASTRA_RESOURCE_ID_KEY, p as withoutLiveRequestKeys, r as MASTRA_INHERITED_MEMORY_KEY, s as MASTRA_SCOPES_KEY, t as MASTRA_CONTINUATION_TOOL_CALL_IDS_KEY, u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
9
9
|
import { S as withAck, _ as serializeError$1, h as stripModelSnapshots, n as PublisherQueueLimitError, p as slimNestedAgentChunks, r as CachingPubSub, t as DefaultStepResult, u as isRunLocalTopic, v as EventEmitterPubSub, x as isLeaseProvider, y as NoopLeaseProvider } from "./output-helpers-CVzhy1Y0.js";
|
|
10
|
-
import { A as stableStringify$1, E as removeWorkingMemoryTags, P as embed$3, Z as preserveResponseItemIdsOnMerge, a as isTerminalToolInvocationState, c as withUnavailableAttachmentUrls, d as aiV5UIMessagesToAIV5ModelMessages, f as coreContentToString, i as isClientToolInvocationUpdate, l as isDownloadAssetsError, m as filterMessagesForPersistence, n as MessageList, ot as normalizeToolOutput, p as messagesAreEqual, r as advancesToolInvocationState, s as unavailableAttachmentPlaceholder, t as convertMessages, u as MessageMerger } from "./message-list-
|
|
10
|
+
import { A as stableStringify$1, E as removeWorkingMemoryTags, P as embed$3, Z as preserveResponseItemIdsOnMerge, a as isTerminalToolInvocationState, c as withUnavailableAttachmentUrls, d as aiV5UIMessagesToAIV5ModelMessages, f as coreContentToString, i as isClientToolInvocationUpdate, l as isDownloadAssetsError, m as filterMessagesForPersistence, n as MessageList, ot as normalizeToolOutput, p as messagesAreEqual, r as advancesToolInvocationState, s as unavailableAttachmentPlaceholder, t as convertMessages, u as MessageMerger } from "./message-list-RgFlLrxG.js";
|
|
11
11
|
import { Bt as listScoresArgsSchema, Ft as listLogsArgsSchema, Lt as listMetricsArgsSchema, Nt as listFeedbackArgsSchema, t as EntityType } from "./storage-Cc50aQAp.js";
|
|
12
12
|
import { a as getOrCreateSpan, f as resolveCurrentSpan, l as getTimeToFirstChunkMs, n as executeWithContextSync, o as getResumeTracingContext, p as resolveExportedSpanId, s as getRootExportSpan, t as executeWithContext, u as getWorkflowResumeTracingContext } from "./utils-DU_pU5SK.js";
|
|
13
13
|
import { i as setSpanErrorOrigin, n as getSpanErrorOrigin } from "./error-count-BH-rJW7q.js";
|
|
14
|
-
import { a as ModelRouterLanguageModel, d as attachModelStreamTransport, f as isDataChunk, i as resolveModelConfig, n as ModelRouterEmbeddingModel, o as resolveApiProviderId, p as readModelStreamTransport } from "./llm-
|
|
14
|
+
import { a as ModelRouterLanguageModel, d as attachModelStreamTransport, f as isDataChunk, i as resolveModelConfig, n as ModelRouterEmbeddingModel, o as resolveApiProviderId, p as readModelStreamTransport } from "./llm-zjtMQn7M.js";
|
|
15
15
|
import { a as withToolPayloadTransformMetadata, i as transformToolPayloadForTargets, n as hasTransformedToolPayload, o as withToolPayloadTransformProviderMetadata, r as normalizeToolPayloadTransformPolicy, t as getTransformedToolPayload } from "./payload-transform-Dj3HUeD4.js";
|
|
16
16
|
import { boundedStringify, ensureSerializable, safeStringify } from "./utils/safe-stringify.js";
|
|
17
17
|
import { d as signalSpanAttributes, h as signalToXmlMarkup, l as mastraDBMessageToSignal, n as createSignal, o as isMastraSignalMessage, s as isTransientSignalMessage, u as resolveDeliveryAttributes } from "./signals-CqR_iWkg.js";
|
|
@@ -24,13 +24,13 @@ import { _ as getRequestContextInputValues, a as getModelFacingValidationError,
|
|
|
24
24
|
import { a as isApprovalExempt, c as isProviderDefinedTool, d as markAgentWorkflowTool, f as markApprovalExempt, l as isProviderTool, n as getNeedsApprovalFn, o as isBuiltBeforeApproval, r as getProviderToolName, s as isMastraTool, t as getBeforeApprovalFn } from "./toolchecks-DrsZdc3S.js";
|
|
25
25
|
import { a as waitDelay, i as getRetryAfterMs, n as DEFAULT_MAX_RETRY_AFTER_MS, r as clampDelayMs } from "./fetchWithRetry-DFSvpYDT.js";
|
|
26
26
|
import { i as hasFreeFormObject } from "./model-DS-b2R-R.js";
|
|
27
|
-
import { c as modelSupportsStructuredOutput, l as modelSupportsTemperature } from "./provider-registry-
|
|
27
|
+
import { c as modelSupportsStructuredOutput, l as modelSupportsTemperature } from "./provider-registry-DdQoO_jd.js";
|
|
28
28
|
import { t as InMemoryServerCache } from "./inmemory-BK3zLwvM.js";
|
|
29
29
|
import { n as resolveDynamicArgument, t as getRequestUser } from "./dynamic-argument-BzPK3qPN.js";
|
|
30
|
-
import { t as MastraLLMV1 } from "./model-
|
|
31
|
-
import { A as eagerToolCallDidNotExecute, D as EagerToolExecutionCoordinator, E as EAGER_TOOL_EXECUTION_MARKER, F as hasRunningRunStep, I as isRunStepActive, L as setRunLeaseFence, M as isEagerlyExecutableToolCall, N as TOOL_ABORT_NOTICE, O as EagerToolExecutionNotRun, P as clearRunLeaseFence, R as startRunStep, S as selectFields, T as EAGER_TOOL_BAILOUT, a as ensureToolProperties, b as removeUndefinedValues, d as makeCoreTool, i as delay$1, j as eagerToolCallSuspensionIntent, k as eagerToolCallAlreadyAnnouncedInput, n as createMastraProxy, o as generateEmptyFromSchema, p as makeProcessorCoreTool, r as deepMerge$1, v as readPositiveIntEnv, w as EAGER_TOOL_ABORT_SIGNAL, y as rebindProcessorTools, z as whenRunStepsSettle } from "./utils-
|
|
30
|
+
import { t as MastraLLMV1 } from "./model-DIzIjDej.js";
|
|
31
|
+
import { A as eagerToolCallDidNotExecute, D as EagerToolExecutionCoordinator, E as EAGER_TOOL_EXECUTION_MARKER, F as hasRunningRunStep, I as isRunStepActive, L as setRunLeaseFence, M as isEagerlyExecutableToolCall, N as TOOL_ABORT_NOTICE, O as EagerToolExecutionNotRun, P as clearRunLeaseFence, R as startRunStep, S as selectFields, T as EAGER_TOOL_BAILOUT, a as ensureToolProperties, b as removeUndefinedValues, d as makeCoreTool, i as delay$1, j as eagerToolCallSuspensionIntent, k as eagerToolCallAlreadyAnnouncedInput, n as createMastraProxy, o as generateEmptyFromSchema, p as makeProcessorCoreTool, r as deepMerge$1, v as readPositiveIntEnv, w as EAGER_TOOL_ABORT_SIGNAL, y as rebindProcessorTools, z as whenRunStepsSettle } from "./utils-B-3lET9S.js";
|
|
32
32
|
import { h as getWorkflowFGAResourceId, i as MastraFGAPermissions, y as requireFGA } from "./ee-iTj2bRDt-By_B9ngH.js";
|
|
33
|
-
import { c as createBackgroundTask, o as resolveBackgroundConfig, s as sanitizeToolArguments, t as generateBackgroundTaskSystemPrompt } from "./background-tasks-
|
|
33
|
+
import { c as createBackgroundTask, o as resolveBackgroundConfig, s as sanitizeToolArguments, t as generateBackgroundTaskSystemPrompt } from "./background-tasks-BcU--rXL.js";
|
|
34
34
|
import { t as ToolStream } from "./stream-D9JOykz7.js";
|
|
35
35
|
import { MISSING, collectInvalidPredicatePaths, createPredicateEvaluator, derivePredicateLabel, normalizePredicatePath, walk } from "./predicate/index.js";
|
|
36
36
|
import { Classifier } from "./classifier/index.js";
|
|
@@ -42,7 +42,7 @@ import { A as writeObjective, D as readObjective, O as resolveEffectiveGoalSetti
|
|
|
42
42
|
import { An as computeTraceStatus, Cr as extractTrajectory, Dr as saveScorePayloadSchema, It as TABLE_SCHEMAS, Lt as TABLE_SCORERS, Nn as extractBranchSpans, Pn as getBranchArgsSchema, Qn as listTracesArgsSchema, Sr as withBufferedReflectionVerified, Tr as extractWorkflowTrajectory, Yn as listBranchesArgsSchema, _r as isAppendOnlySince, ar as spanRecordSchema, br as maxObservationCursor, cr as toTraceSpans, gn as BRANCH_SPAN_TYPE_SET, gr as compareObservationalMemoryHeadOrder, hr as assertActiveObservationsApplied, or as toLightSpanRecord, pn as matchesExpectedWorkflowStatus, qn as isPreviewTruncated, sr as toTraceSpan, vn as TraceStatus, vr as isBufferedChunkCoveredByCursor, wr as extractTrajectoryFromTrace, xr as planReflectionGenerationText, yr as isBufferedReflectionUnchangedSince } from "./constants-CFWgIaqA.js";
|
|
43
43
|
import { t as GoalSignalProvider } from "./signal-provider-BslnAjWG.js";
|
|
44
44
|
import { t as slugify } from "./slugify-BUNmb-Ga.js";
|
|
45
|
-
import { F as LocalSandbox, at as evaluateReadRecord, c as Workspace, dt as WORKSPACE_TOOLS, g as resolveToolConfig, gt as shellQuote, h as createWorkspaceTools, ht as sliceByTokens, l as createSkillTools, lt as CompositeFilesystem, mt as estimateTokenCount, ot as normalizeReadTrackerPath, pt as sliceByTokensSafe, st as LocalFilesystem } from "./workspace-
|
|
45
|
+
import { F as LocalSandbox, at as evaluateReadRecord, c as Workspace, dt as WORKSPACE_TOOLS, g as resolveToolConfig, gt as shellQuote, h as createWorkspaceTools, ht as sliceByTokens, l as createSkillTools, lt as CompositeFilesystem, mt as estimateTokenCount, ot as normalizeReadTrackerPath, pt as sliceByTokensSafe, st as LocalFilesystem } from "./workspace-CnmmMou8.js";
|
|
46
46
|
import { i as normalizeWebSearchProvider, n as createWebSearchProviderTool, r as isWebSearchTool } from "./tools-tPy2FwMI.js";
|
|
47
47
|
import { D as BM25Index, O as tokenize } from "./workspace-skills-38OY32_b.js";
|
|
48
48
|
import { f as calculatePagination, g as InMemoryThreadStateStorage, h as resolveListOrderBy, m as normalizePerPage, p as compareByField, s as StorageDomain, u as MastraCompositeStore } from "./filesystem-versioned-BL1ojJLo.js";
|
|
@@ -74457,6 +74457,25 @@ function makeSaveQueueManager(memory, runId, mastra) {
|
|
|
74457
74457
|
onSaved: recordRunSavedMessages(runId)
|
|
74458
74458
|
});
|
|
74459
74459
|
}
|
|
74460
|
+
/** Rebuild a hydrated entry's starting tools for the caller of the segment now running. */
|
|
74461
|
+
async function rebuildToolsForSegment(mastra, entry, { runId, agentId, input, requestContext }) {
|
|
74462
|
+
const resolved = await resolveRunAgent(mastra, agentId, runId, input.agentVersionId);
|
|
74463
|
+
entry.baseTools = await (isDurableAgentLike(resolved) && resolved.agent !== resolved ? resolved.agent : resolved).getToolsForExecution({
|
|
74464
|
+
runId,
|
|
74465
|
+
threadId: input.state.threadId,
|
|
74466
|
+
resourceId: input.state.resourceId,
|
|
74467
|
+
requestContext,
|
|
74468
|
+
memoryConfig: input.state.memoryConfig,
|
|
74469
|
+
autoResumeSuspendedTools: input.options?.autoResumeSuspendedTools,
|
|
74470
|
+
clientTools: input.options?.clientTools,
|
|
74471
|
+
delegation: entry.delegation,
|
|
74472
|
+
methodType: entry.methodType ?? "stream",
|
|
74473
|
+
backgroundTaskEnabled: Boolean(entry.backgroundTaskManager),
|
|
74474
|
+
backgroundTaskPolicy: input.options?.backgroundTaskPolicy,
|
|
74475
|
+
model: entry.model
|
|
74476
|
+
});
|
|
74477
|
+
return entry.baseTools;
|
|
74478
|
+
}
|
|
74460
74479
|
/**
|
|
74461
74480
|
* The run's `requestContextEntries` as handed to scorers (`customContext`), with
|
|
74462
74481
|
* the signed-in user taken from the live run-level context rather than the
|
|
@@ -74596,10 +74615,23 @@ async function resolveRuntimeDependencies(options) {
|
|
|
74596
74615
|
let errorProcessors = globalEntry?.errorProcessors;
|
|
74597
74616
|
let processorStates = globalEntry?.processorStates;
|
|
74598
74617
|
let rehydratedFromMastra = false;
|
|
74618
|
+
let toolsSegment;
|
|
74599
74619
|
let rebuiltAgent;
|
|
74600
74620
|
let backgroundTasks;
|
|
74601
|
-
if (hasHydratedEntry)
|
|
74602
|
-
|
|
74621
|
+
if (hasHydratedEntry) {
|
|
74622
|
+
logger?.debug?.(`[DurableAgent:${agentId}] Using model and tools from global registry for run ${runId}`);
|
|
74623
|
+
const { stepSegment } = options;
|
|
74624
|
+
if (!globalEntry || stepSegment === void 0) {} else if (globalEntry.toolsSegment === void 0) globalEntry.toolsSegment = stepSegment;
|
|
74625
|
+
else if (globalEntry.toolsSegment !== stepSegment && mastra) {
|
|
74626
|
+
tools = await rebuildToolsForSegment(mastra, globalEntry, {
|
|
74627
|
+
runId,
|
|
74628
|
+
agentId,
|
|
74629
|
+
input,
|
|
74630
|
+
requestContext: restoreRequestContext(input.requestContextEntries, options.requestContext)
|
|
74631
|
+
});
|
|
74632
|
+
globalEntry.toolsSegment = stepSegment;
|
|
74633
|
+
}
|
|
74634
|
+
} else if (mastra) try {
|
|
74603
74635
|
const agent = await resolveRunAgent(mastra, agentId, runId, input.agentVersionId);
|
|
74604
74636
|
rebuiltAgent = isDurableAgentLike(agent) && agent.agent !== agent ? agent.agent : agent;
|
|
74605
74637
|
const resolveRequestContext = restoreRequestContext(input.requestContextEntries, options.requestContext);
|
|
@@ -74642,6 +74674,7 @@ async function resolveRuntimeDependencies(options) {
|
|
|
74642
74674
|
errorProcessors = rebuiltProcessors.errorProcessors;
|
|
74643
74675
|
processorStates = rebuiltProcessors.processorStates;
|
|
74644
74676
|
rehydratedFromMastra = true;
|
|
74677
|
+
toolsSegment = options.stepSegment;
|
|
74645
74678
|
} catch (error) {
|
|
74646
74679
|
if (error instanceof DurableProcessorRebuildError || error instanceof DurableAgentNotFoundError) throw error;
|
|
74647
74680
|
if ((input.options?.toolsetToolNames?.length ?? 0) > 0) throw error;
|
|
@@ -74658,6 +74691,7 @@ async function resolveRuntimeDependencies(options) {
|
|
|
74658
74691
|
const rebuilt = {
|
|
74659
74692
|
isPlaceholder: false,
|
|
74660
74693
|
tools,
|
|
74694
|
+
toolsSegment,
|
|
74661
74695
|
model,
|
|
74662
74696
|
modelList,
|
|
74663
74697
|
workspace,
|
|
@@ -75350,11 +75384,7 @@ async function runDurableFinishSideEffects({ runId, initData, messageListState,
|
|
|
75350
75384
|
});
|
|
75351
75385
|
const steps = outputResult?.steps;
|
|
75352
75386
|
const lastStep = steps?.at(-1);
|
|
75353
|
-
const
|
|
75354
|
-
const reply = steps && steps.length > 1 && responses.some((msg) => {
|
|
75355
|
-
const result = msg.content.metadata?.completionResult;
|
|
75356
|
-
return result && typeof result === "object" && "suppressFeedback" in result && result.suppressFeedback === true;
|
|
75357
|
-
}) ? resolveOutputMessageSkippingCompletionChecks(messageList) : void 0;
|
|
75387
|
+
const reply = isFeedbackContinuation(messageList, steps) ? resolveOutputMessageSkippingCompletionChecks(messageList) : void 0;
|
|
75358
75388
|
const parts = reply?.content.parts;
|
|
75359
75389
|
const offset = parts ? findIterationOffsetInParts(parts, lastStep?.text) : void 0;
|
|
75360
75390
|
const split = reply && offset !== void 0 ? messageList.splitResponseMessageAtPartOffset(reply.id, offset) : void 0;
|
|
@@ -77594,6 +77624,7 @@ function createDurableLLMExecutionStep(_options) {
|
|
|
77594
77624
|
messageListState: await readMessageListState(params, typedInput)
|
|
77595
77625
|
},
|
|
77596
77626
|
requestContext,
|
|
77627
|
+
stepSegment: getStepSegment(runId, params.requestContext),
|
|
77597
77628
|
logger
|
|
77598
77629
|
});
|
|
77599
77630
|
const storeStepTranscript = () => {
|
|
@@ -83439,6 +83470,7 @@ var DurableAgenticLoopBuilder = class extends BaseAgenticLoopBuilder {
|
|
|
83439
83470
|
}],
|
|
83440
83471
|
metadata: {
|
|
83441
83472
|
mode: "stream",
|
|
83473
|
+
iterationFeedback: true,
|
|
83442
83474
|
completionResult: { suppressFeedback: true }
|
|
83443
83475
|
},
|
|
83444
83476
|
format: 2
|
|
@@ -84938,7 +84970,7 @@ async function prepareForDurableExecution(options) {
|
|
|
84938
84970
|
});
|
|
84939
84971
|
let tripwireData;
|
|
84940
84972
|
if (inputProcessors.length > 0) try {
|
|
84941
|
-
const { ProcessorRunner } = await import("./stream-
|
|
84973
|
+
const { ProcessorRunner } = await import("./stream-CoQTdzLm.js").then((n) => n.L);
|
|
84942
84974
|
await new ProcessorRunner({
|
|
84943
84975
|
inputProcessors,
|
|
84944
84976
|
outputProcessors,
|
|
@@ -96212,8 +96244,7 @@ var Agent = class Agent extends MastraBase {
|
|
|
96212
96244
|
scopes: Array.isArray(snapshotScopes) ? snapshotScopes : void 0
|
|
96213
96245
|
};
|
|
96214
96246
|
const carriedEntries = entry.requestContext ? Object.entries(withoutLiveRequestKeys(Object.fromEntries(entry.requestContext.entries()))) : void 0;
|
|
96215
|
-
|
|
96216
|
-
let resumeRequestContext = droppedStartingUser ? new RequestContext(carriedEntries) : entry.requestContext;
|
|
96247
|
+
let resumeRequestContext = carriedEntries !== void 0 && carriedEntries.length < entry.requestContext.size() ? new RequestContext(carriedEntries) : entry.requestContext;
|
|
96217
96248
|
if (options?.requestContext) {
|
|
96218
96249
|
resumeRequestContext = options.requestContext;
|
|
96219
96250
|
for (const [key, value] of carriedEntries ?? []) {
|
|
@@ -96323,7 +96354,7 @@ var Agent = class Agent extends MastraBase {
|
|
|
96323
96354
|
await executionFence.settle(async () => {});
|
|
96324
96355
|
throw error;
|
|
96325
96356
|
}
|
|
96326
|
-
if (!coldSnapshot
|
|
96357
|
+
if (!coldSnapshot) try {
|
|
96327
96358
|
const requestTools = await this.agentForExecution.getToolsForExecution({
|
|
96328
96359
|
toolsets: resolvedOptions.toolsets,
|
|
96329
96360
|
clientTools: resolvedOptions.clientTools,
|
|
@@ -96348,7 +96379,7 @@ var Agent = class Agent extends MastraBase {
|
|
|
96348
96379
|
for (const reg of /* @__PURE__ */ new Set([entry, getRunRegistryEntry(runId, this.#mastra)])) {
|
|
96349
96380
|
if (!reg) continue;
|
|
96350
96381
|
reg.tools = rebindProcessorTools(refresh(reg.tools ?? {}, reg.requestTools), resumeRequestContext);
|
|
96351
|
-
|
|
96382
|
+
reg.baseTools = requestTools;
|
|
96352
96383
|
reg.requestTools = {
|
|
96353
96384
|
...reg.requestTools,
|
|
96354
96385
|
...requestTools
|
|
@@ -96356,13 +96387,16 @@ var Agent = class Agent extends MastraBase {
|
|
|
96356
96387
|
if (options?.delegation) reg.delegation = resolvedOptions.delegation;
|
|
96357
96388
|
}
|
|
96358
96389
|
} catch (error) {
|
|
96359
|
-
this.#mastra?.getLogger?.()?.
|
|
96390
|
+
this.#mastra?.getLogger?.()?.error?.(`[DurableAgent] resume(${runId}) tool resolution failed: ${error}`);
|
|
96391
|
+
await executionFence.settle(async () => {});
|
|
96392
|
+
throw error;
|
|
96360
96393
|
}
|
|
96361
96394
|
setExecutionClaim(resumeRequestContext, runId, executionFence.claim);
|
|
96362
96395
|
for (const reg of [entry, getRunRegistryEntry(runId, this.#mastra)]) {
|
|
96363
96396
|
if (!reg) continue;
|
|
96364
96397
|
reg.executionFence = executionFence;
|
|
96365
96398
|
reg.resumeToolCallId = resolvedOptions.toolCallId;
|
|
96399
|
+
if (!coldSnapshot) reg.toolsSegment = void 0;
|
|
96366
96400
|
}
|
|
96367
96401
|
const { controller: abortController, detach: detachExternalAbort } = createRunAbortController(resolvedOptions.abortSignal);
|
|
96368
96402
|
if (agentThreadStreamRuntime.isRunAborted(runId, this.getPubSub())) abortController.abort();
|
|
@@ -105108,6 +105142,7 @@ var AgenticLoopBuilder = class extends BaseAgenticLoopBuilder {
|
|
|
105108
105142
|
}],
|
|
105109
105143
|
metadata: {
|
|
105110
105144
|
mode: "stream",
|
|
105145
|
+
iterationFeedback: true,
|
|
105111
105146
|
completionResult: { suppressFeedback: true }
|
|
105112
105147
|
},
|
|
105113
105148
|
format: 2
|
|
@@ -111327,6 +111362,11 @@ function getRunRegistryEntry(runId, mastra) {
|
|
|
111327
111362
|
* claim (Inngest). The engine stores the same value on the registry entry it seeds for the segment.
|
|
111328
111363
|
*/
|
|
111329
111364
|
const DURABLE_CONTEXT_SEGMENT_KEY = "__mastra_durableContextSegment";
|
|
111365
|
+
/** The run segment a step belongs to: its Core execution claim, or the engine's segment id. */
|
|
111366
|
+
function getStepSegment(runId, stepContext) {
|
|
111367
|
+
const segment = getExecutionClaim(stepContext, runId)?.executionId ?? stepContext?.get("__mastra_durableContextSegment");
|
|
111368
|
+
return typeof segment === "string" ? segment : void 0;
|
|
111369
|
+
}
|
|
111330
111370
|
/**
|
|
111331
111371
|
* The registry's live request context, when it belongs to the execution running this step. Once
|
|
111332
111372
|
* another process claims the run (for example an approval from another host), the context cached
|
|
@@ -4,14 +4,14 @@ const require_base = require("./base-BIzR1D3_.cjs");
|
|
|
4
4
|
const require_observability = require("./observability-B0R_D1PZ.cjs");
|
|
5
5
|
const require_error = require("./error-D90lJ6M7.cjs");
|
|
6
6
|
const require_error$1 = require("./error-L1V4uUbd.cjs");
|
|
7
|
-
const require_stream = require("./stream-
|
|
7
|
+
const require_stream = require("./stream-BbPZavop.cjs");
|
|
8
8
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
9
9
|
const require_output_helpers = require("./output-helpers-DgsH4aTb.cjs");
|
|
10
|
-
const require_message_list = require("./message-list-
|
|
10
|
+
const require_message_list = require("./message-list-C0F2sDNC.cjs");
|
|
11
11
|
const require_storage = require("./storage-CfG0I2aF.cjs");
|
|
12
12
|
const require_utils = require("./utils-D-eNsgDM.cjs");
|
|
13
13
|
const require_error_count = require("./error-count-DeDpeWU2.cjs");
|
|
14
|
-
const require_llm = require("./llm-
|
|
14
|
+
const require_llm = require("./llm-CS6YY_IV.cjs");
|
|
15
15
|
const require_payload_transform = require("./payload-transform-CWgnsO9w.cjs");
|
|
16
16
|
const require_utils_safe_stringify = require("./utils/safe-stringify.cjs");
|
|
17
17
|
const require_signals = require("./signals-CWxAMEmE.cjs");
|
|
@@ -23,13 +23,13 @@ const require_tool = require("./tool-CYlT2UA-.cjs");
|
|
|
23
23
|
const require_toolchecks = require("./toolchecks-MFU48cit.cjs");
|
|
24
24
|
const require_fetchWithRetry = require("./fetchWithRetry-f5k4p7_1.cjs");
|
|
25
25
|
const require_model = require("./model-jBymoqGa.cjs");
|
|
26
|
-
const require_provider_registry = require("./provider-registry-
|
|
26
|
+
const require_provider_registry = require("./provider-registry-g9m_fyV8.cjs");
|
|
27
27
|
const require_inmemory = require("./inmemory-Dc86VWGB.cjs");
|
|
28
28
|
const require_dynamic_argument = require("./dynamic-argument-CUc1BBOS.cjs");
|
|
29
|
-
const require_model$1 = require("./model-
|
|
30
|
-
const require_utils$1 = require("./utils-
|
|
29
|
+
const require_model$1 = require("./model-DGFc1hw3.cjs");
|
|
30
|
+
const require_utils$1 = require("./utils-DtmyBuBT.cjs");
|
|
31
31
|
const require_ee_iTj2bRDt = require("./ee-iTj2bRDt-D3-QLGDF.cjs");
|
|
32
|
-
const require_background_tasks = require("./background-tasks-
|
|
32
|
+
const require_background_tasks = require("./background-tasks-DRUHnQOk.cjs");
|
|
33
33
|
const require_stream$1 = require("./stream-BGbj9jAU.cjs");
|
|
34
34
|
const require_predicate_index = require("./predicate/index.cjs");
|
|
35
35
|
const require_classifier_index = require("./classifier/index.cjs");
|
|
@@ -41,7 +41,7 @@ const require_state_processor = require("./state-processor-kRNZ38Nf.cjs");
|
|
|
41
41
|
const require_constants = require("./constants-Bou0hEgY.cjs");
|
|
42
42
|
const require_signal_provider = require("./signal-provider-BFAvh_AJ.cjs");
|
|
43
43
|
const require_slugify = require("./slugify-B_WzG9IY.cjs");
|
|
44
|
-
const require_workspace = require("./workspace-
|
|
44
|
+
const require_workspace = require("./workspace-C5lXteRU.cjs");
|
|
45
45
|
const require_tools = require("./tools-BEYxowf0.cjs");
|
|
46
46
|
const require_workspace_skills = require("./workspace-skills-BcquhPDn.cjs");
|
|
47
47
|
const require_filesystem_versioned = require("./filesystem-versioned-BavRtYWJ.cjs");
|
|
@@ -74463,6 +74463,25 @@ function makeSaveQueueManager(memory, runId, mastra) {
|
|
|
74463
74463
|
onSaved: recordRunSavedMessages(runId)
|
|
74464
74464
|
});
|
|
74465
74465
|
}
|
|
74466
|
+
/** Rebuild a hydrated entry's starting tools for the caller of the segment now running. */
|
|
74467
|
+
async function rebuildToolsForSegment(mastra, entry, { runId, agentId, input, requestContext }) {
|
|
74468
|
+
const resolved = await resolveRunAgent(mastra, agentId, runId, input.agentVersionId);
|
|
74469
|
+
entry.baseTools = await (isDurableAgentLike(resolved) && resolved.agent !== resolved ? resolved.agent : resolved).getToolsForExecution({
|
|
74470
|
+
runId,
|
|
74471
|
+
threadId: input.state.threadId,
|
|
74472
|
+
resourceId: input.state.resourceId,
|
|
74473
|
+
requestContext,
|
|
74474
|
+
memoryConfig: input.state.memoryConfig,
|
|
74475
|
+
autoResumeSuspendedTools: input.options?.autoResumeSuspendedTools,
|
|
74476
|
+
clientTools: input.options?.clientTools,
|
|
74477
|
+
delegation: entry.delegation,
|
|
74478
|
+
methodType: entry.methodType ?? "stream",
|
|
74479
|
+
backgroundTaskEnabled: Boolean(entry.backgroundTaskManager),
|
|
74480
|
+
backgroundTaskPolicy: input.options?.backgroundTaskPolicy,
|
|
74481
|
+
model: entry.model
|
|
74482
|
+
});
|
|
74483
|
+
return entry.baseTools;
|
|
74484
|
+
}
|
|
74466
74485
|
/**
|
|
74467
74486
|
* The run's `requestContextEntries` as handed to scorers (`customContext`), with
|
|
74468
74487
|
* the signed-in user taken from the live run-level context rather than the
|
|
@@ -74602,10 +74621,23 @@ async function resolveRuntimeDependencies(options) {
|
|
|
74602
74621
|
let errorProcessors = globalEntry?.errorProcessors;
|
|
74603
74622
|
let processorStates = globalEntry?.processorStates;
|
|
74604
74623
|
let rehydratedFromMastra = false;
|
|
74624
|
+
let toolsSegment;
|
|
74605
74625
|
let rebuiltAgent;
|
|
74606
74626
|
let backgroundTasks;
|
|
74607
|
-
if (hasHydratedEntry)
|
|
74608
|
-
|
|
74627
|
+
if (hasHydratedEntry) {
|
|
74628
|
+
logger?.debug?.(`[DurableAgent:${agentId}] Using model and tools from global registry for run ${runId}`);
|
|
74629
|
+
const { stepSegment } = options;
|
|
74630
|
+
if (!globalEntry || stepSegment === void 0) {} else if (globalEntry.toolsSegment === void 0) globalEntry.toolsSegment = stepSegment;
|
|
74631
|
+
else if (globalEntry.toolsSegment !== stepSegment && mastra) {
|
|
74632
|
+
tools = await rebuildToolsForSegment(mastra, globalEntry, {
|
|
74633
|
+
runId,
|
|
74634
|
+
agentId,
|
|
74635
|
+
input,
|
|
74636
|
+
requestContext: restoreRequestContext(input.requestContextEntries, options.requestContext)
|
|
74637
|
+
});
|
|
74638
|
+
globalEntry.toolsSegment = stepSegment;
|
|
74639
|
+
}
|
|
74640
|
+
} else if (mastra) try {
|
|
74609
74641
|
const agent = await resolveRunAgent(mastra, agentId, runId, input.agentVersionId);
|
|
74610
74642
|
rebuiltAgent = isDurableAgentLike(agent) && agent.agent !== agent ? agent.agent : agent;
|
|
74611
74643
|
const resolveRequestContext = restoreRequestContext(input.requestContextEntries, options.requestContext);
|
|
@@ -74648,6 +74680,7 @@ async function resolveRuntimeDependencies(options) {
|
|
|
74648
74680
|
errorProcessors = rebuiltProcessors.errorProcessors;
|
|
74649
74681
|
processorStates = rebuiltProcessors.processorStates;
|
|
74650
74682
|
rehydratedFromMastra = true;
|
|
74683
|
+
toolsSegment = options.stepSegment;
|
|
74651
74684
|
} catch (error) {
|
|
74652
74685
|
if (error instanceof DurableProcessorRebuildError || error instanceof DurableAgentNotFoundError) throw error;
|
|
74653
74686
|
if ((input.options?.toolsetToolNames?.length ?? 0) > 0) throw error;
|
|
@@ -74664,6 +74697,7 @@ async function resolveRuntimeDependencies(options) {
|
|
|
74664
74697
|
const rebuilt = {
|
|
74665
74698
|
isPlaceholder: false,
|
|
74666
74699
|
tools,
|
|
74700
|
+
toolsSegment,
|
|
74667
74701
|
model,
|
|
74668
74702
|
modelList,
|
|
74669
74703
|
workspace,
|
|
@@ -75356,11 +75390,7 @@ async function runDurableFinishSideEffects({ runId, initData, messageListState,
|
|
|
75356
75390
|
});
|
|
75357
75391
|
const steps = outputResult?.steps;
|
|
75358
75392
|
const lastStep = steps?.at(-1);
|
|
75359
|
-
const
|
|
75360
|
-
const reply = steps && steps.length > 1 && responses.some((msg) => {
|
|
75361
|
-
const result = msg.content.metadata?.completionResult;
|
|
75362
|
-
return result && typeof result === "object" && "suppressFeedback" in result && result.suppressFeedback === true;
|
|
75363
|
-
}) ? require_stream.resolveOutputMessageSkippingCompletionChecks(messageList) : void 0;
|
|
75393
|
+
const reply = require_stream.isFeedbackContinuation(messageList, steps) ? require_stream.resolveOutputMessageSkippingCompletionChecks(messageList) : void 0;
|
|
75364
75394
|
const parts = reply?.content.parts;
|
|
75365
75395
|
const offset = parts ? require_stream.findIterationOffsetInParts(parts, lastStep?.text) : void 0;
|
|
75366
75396
|
const split = reply && offset !== void 0 ? messageList.splitResponseMessageAtPartOffset(reply.id, offset) : void 0;
|
|
@@ -77600,6 +77630,7 @@ function createDurableLLMExecutionStep(_options) {
|
|
|
77600
77630
|
messageListState: await readMessageListState(params, typedInput)
|
|
77601
77631
|
},
|
|
77602
77632
|
requestContext,
|
|
77633
|
+
stepSegment: getStepSegment(runId, params.requestContext),
|
|
77603
77634
|
logger
|
|
77604
77635
|
});
|
|
77605
77636
|
const storeStepTranscript = () => {
|
|
@@ -83445,6 +83476,7 @@ var DurableAgenticLoopBuilder = class extends BaseAgenticLoopBuilder {
|
|
|
83445
83476
|
}],
|
|
83446
83477
|
metadata: {
|
|
83447
83478
|
mode: "stream",
|
|
83479
|
+
iterationFeedback: true,
|
|
83448
83480
|
completionResult: { suppressFeedback: true }
|
|
83449
83481
|
},
|
|
83450
83482
|
format: 2
|
|
@@ -84944,7 +84976,7 @@ async function prepareForDurableExecution(options) {
|
|
|
84944
84976
|
});
|
|
84945
84977
|
let tripwireData;
|
|
84946
84978
|
if (inputProcessors.length > 0) try {
|
|
84947
|
-
const { ProcessorRunner } = await Promise.resolve().then(() => require("./stream-
|
|
84979
|
+
const { ProcessorRunner } = await Promise.resolve().then(() => require("./stream-BbPZavop.cjs")).then((n) => n.runner_exports);
|
|
84948
84980
|
await new ProcessorRunner({
|
|
84949
84981
|
inputProcessors,
|
|
84950
84982
|
outputProcessors,
|
|
@@ -96218,8 +96250,7 @@ var Agent = class Agent extends require_base.MastraBase {
|
|
|
96218
96250
|
scopes: Array.isArray(snapshotScopes) ? snapshotScopes : void 0
|
|
96219
96251
|
};
|
|
96220
96252
|
const carriedEntries = entry.requestContext ? Object.entries(require_request_context.withoutLiveRequestKeys(Object.fromEntries(entry.requestContext.entries()))) : void 0;
|
|
96221
|
-
|
|
96222
|
-
let resumeRequestContext = droppedStartingUser ? new require_request_context.RequestContext(carriedEntries) : entry.requestContext;
|
|
96253
|
+
let resumeRequestContext = carriedEntries !== void 0 && carriedEntries.length < entry.requestContext.size() ? new require_request_context.RequestContext(carriedEntries) : entry.requestContext;
|
|
96223
96254
|
if (options?.requestContext) {
|
|
96224
96255
|
resumeRequestContext = options.requestContext;
|
|
96225
96256
|
for (const [key, value] of carriedEntries ?? []) {
|
|
@@ -96329,7 +96360,7 @@ var Agent = class Agent extends require_base.MastraBase {
|
|
|
96329
96360
|
await executionFence.settle(async () => {});
|
|
96330
96361
|
throw error;
|
|
96331
96362
|
}
|
|
96332
|
-
if (!coldSnapshot
|
|
96363
|
+
if (!coldSnapshot) try {
|
|
96333
96364
|
const requestTools = await this.agentForExecution.getToolsForExecution({
|
|
96334
96365
|
toolsets: resolvedOptions.toolsets,
|
|
96335
96366
|
clientTools: resolvedOptions.clientTools,
|
|
@@ -96354,7 +96385,7 @@ var Agent = class Agent extends require_base.MastraBase {
|
|
|
96354
96385
|
for (const reg of /* @__PURE__ */ new Set([entry, getRunRegistryEntry(runId, this.#mastra)])) {
|
|
96355
96386
|
if (!reg) continue;
|
|
96356
96387
|
reg.tools = require_utils$1.rebindProcessorTools(refresh(reg.tools ?? {}, reg.requestTools), resumeRequestContext);
|
|
96357
|
-
|
|
96388
|
+
reg.baseTools = requestTools;
|
|
96358
96389
|
reg.requestTools = {
|
|
96359
96390
|
...reg.requestTools,
|
|
96360
96391
|
...requestTools
|
|
@@ -96362,13 +96393,16 @@ var Agent = class Agent extends require_base.MastraBase {
|
|
|
96362
96393
|
if (options?.delegation) reg.delegation = resolvedOptions.delegation;
|
|
96363
96394
|
}
|
|
96364
96395
|
} catch (error) {
|
|
96365
|
-
this.#mastra?.getLogger?.()?.
|
|
96396
|
+
this.#mastra?.getLogger?.()?.error?.(`[DurableAgent] resume(${runId}) tool resolution failed: ${error}`);
|
|
96397
|
+
await executionFence.settle(async () => {});
|
|
96398
|
+
throw error;
|
|
96366
96399
|
}
|
|
96367
96400
|
setExecutionClaim(resumeRequestContext, runId, executionFence.claim);
|
|
96368
96401
|
for (const reg of [entry, getRunRegistryEntry(runId, this.#mastra)]) {
|
|
96369
96402
|
if (!reg) continue;
|
|
96370
96403
|
reg.executionFence = executionFence;
|
|
96371
96404
|
reg.resumeToolCallId = resolvedOptions.toolCallId;
|
|
96405
|
+
if (!coldSnapshot) reg.toolsSegment = void 0;
|
|
96372
96406
|
}
|
|
96373
96407
|
const { controller: abortController, detach: detachExternalAbort } = createRunAbortController(resolvedOptions.abortSignal);
|
|
96374
96408
|
if (agentThreadStreamRuntime.isRunAborted(runId, this.getPubSub())) abortController.abort();
|
|
@@ -105114,6 +105148,7 @@ var AgenticLoopBuilder = class extends BaseAgenticLoopBuilder {
|
|
|
105114
105148
|
}],
|
|
105115
105149
|
metadata: {
|
|
105116
105150
|
mode: "stream",
|
|
105151
|
+
iterationFeedback: true,
|
|
105117
105152
|
completionResult: { suppressFeedback: true }
|
|
105118
105153
|
},
|
|
105119
105154
|
format: 2
|
|
@@ -111333,6 +111368,11 @@ function getRunRegistryEntry(runId, mastra) {
|
|
|
111333
111368
|
* claim (Inngest). The engine stores the same value on the registry entry it seeds for the segment.
|
|
111334
111369
|
*/
|
|
111335
111370
|
const DURABLE_CONTEXT_SEGMENT_KEY = "__mastra_durableContextSegment";
|
|
111371
|
+
/** The run segment a step belongs to: its Core execution claim, or the engine's segment id. */
|
|
111372
|
+
function getStepSegment(runId, stepContext) {
|
|
111373
|
+
const segment = getExecutionClaim(stepContext, runId)?.executionId ?? stepContext?.get("__mastra_durableContextSegment");
|
|
111374
|
+
return typeof segment === "string" ? segment : void 0;
|
|
111375
|
+
}
|
|
111336
111376
|
/**
|
|
111337
111377
|
* The registry's live request context, when it belongs to the execution running this step. Once
|
|
111338
111378
|
* another process claims the run (for example an approval from another host), the context cached
|
package/dist/storage/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-PiQTSx2Y.cjs");
|
|
3
3
|
const require_observability = require("../observability-B0R_D1PZ.cjs");
|
|
4
|
-
const require_stream = require("../stream-
|
|
4
|
+
const require_stream = require("../stream-BbPZavop.cjs");
|
|
5
5
|
const require_storage = require("../storage-CfG0I2aF.cjs");
|
|
6
6
|
const require_constants = require("../constants-Bou0hEgY.cjs");
|
|
7
7
|
const require_filesystem_versioned = require("../filesystem-versioned-BavRtYWJ.cjs");
|
package/dist/storage/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $a as threadQueryRequestSchema, $i as parseKnowledgePageRef, $r as InMemoryNotificationsStorage, Aa as filterByDateRange, Ai as inspectKnowledgeSchema, Ao as getObjectOrNull, Ar as StoreOperationsInMemory, Ba as transformScoreRow, Bi as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, Br as WorkflowsStorage, Ca as resolveRetentionTargets, Ci as KnowledgeNotFoundError, Co as planTraceQuery, Cr as expandKnowledgeScope, Da as createStoreErrorId, Di as KnowledgeUnsupportedCapabilityError, Do as buildMetricRecord, Dr as knowledgeSemanticIdempotencyKey, Ea as createStorageErrorId, Ei as KnowledgeTransactionDeadlineError, Eo as buildLogRecord, Er as knowledgeSemanticDocumentId, Fa as parseDuration, Fi as KnowledgePageKeyConflictError, Fo as ObservabilityStorage, Fr as FilesystemDB, Ga as tracePageNodeSchema, Gi as assertKnowledgeNoteTextWithinBound, Gr as WorkflowDefinitionsStorage, Ha as TracePageError, Hi as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, Hr as mergeStepResult, Ia as safelyParseJSON, Ii as MAX_KNOWLEDGE_MOVE_PAGES, Io as FactoryStorage, Ir as InMemoryStore, Ja as THREAD_QUERY_DEFAULT_LIMIT, Ji as knowledgeLinkRefKey, Jr as ScoresInMemory, Ka as tracePageRequestSchema, Ki as assertKnowledgePageDescriptionWithinBound, Kr as InMemoryToolProviderConnectionsStorage, La as serializeDate, Li as MAX_KNOWLEDGE_NOTE_TOKENS, Lo as FactoryStorageDomain, Lr as MockStore, Ma as getSqlType, Mi as KnowledgeMoveTooLargeError, Mo as serializeSpanAttributes, Mr as GitHubSourceControlProvider, Na as hasErrorCode, Ni as KnowledgePageDepthError, No as toEntityType, Nr as createGitHubSourceControlProviderFromEnv, Oa as createVectorErrorId, Oi as assertKnowledgeSchemaCompatible, Oo as buildScoreRecord, Or as knowledgeVisibleScopeKeys, Pa as jsonValueEquals, Pi as KnowledgePageHasChildrenError, Po as ObservabilityInMemory, Pr as FilesystemStore, Qa as threadQueryIdentitySchema, Qi as knowledgeScopeReadable, Qr as normalizeScheduleTarget, Ra as storageMessageMatchesMetadataFilter, Ri as MAX_KNOWLEDGE_PAGE_BODY_LINKS, Ro as UniqueViolationError, Rr as WorkflowsInMemory, Sa as executeRetentionPrune, Si as KnowledgeConflictError, So as planThreadQuery, Sr as createKnowledgeNodeCursor, Ta as runRetentionBatches, Ti as KnowledgeStorage, To as buildFeedbackRecord, Tr as knowledgeScopeKey, Ua as readTracePage, Ui as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Ur as mergeWorkflowStepResult, Va as validateStorageMetadataFilter, Vi as MAX_KNOWLEDGE_PAGE_LINKS, Vr as createEmptyWorkflowSnapshot, Wa as tracePageIdSchema, Wi as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Wr as InMemoryWorkflowDefinitionsStorage, Xa as encodeThreadQueryCursor, Xi as knowledgePinDepth, Xr as InMemorySchedulesStorage, Ya as THREAD_QUERY_MAX_LIMIT, Yi as knowledgePagePath, Yr as ScoresStorage, Za as planThreadRowsQuery, Zi as knowledgePositionBetween, Zr as SchedulesStorage, _a as ChannelsStorage, _i as KnowledgeImporterBindingConflictError, _o as spanQueryResponseSchema, _r as assertKnowledgeCeilingRaised, _u as runFencingNotSupportedError, aa as ExperimentsStorage, ao as SPAN_QUERY_MAX_PREVIEW_CHARACTERS, ba as BackgroundTasksInMemory, bi as KNOWLEDGE_STORAGE_CONTRACT_VERSION, bo as encodeTraceQueryDeltaCursor, br as assertKnowledgeScopeWithinCeiling, ca as DatasetItemIdentityConflictError, co as createSpanQueryPreview, cu as isWorkflowStepConflictError, do as planSpanQuery, du as RunFenceConflictError, ea as KnowledgeInvalidCursorError, ei as NotificationsStorage, eo as threadQueryResponseSchema, fo as resolveSpanQueryCost, fu as coverNestedRun, ga as InMemoryChannelsStorage, gi as InMemoryKnowledgeStorage, go as spanQueryRequestSchema, gr as MAX_KNOWLEDGE_SCOPE_TAGS, gu as resolveRunFence, hi as MemoryStorage, ho as spanQueryIdentitySchema, hr as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, hu as matchesRunFence, ia as ExperimentsInMemory, io as SPAN_QUERY_MAX_LIMIT, ja as getDefaultValue, ji as parseKnowledgeWikilinks, jo as getStringOrNull, jr as StoreOperations, ka as ensureDate, ki as createKnowledgeUlid, ko as buildUpdateSpanRecord, kr as parseKnowledgeNodeCursor, lo as encodeSpanQueryCursor, lu as RUN_FENCE_CONFLICT_ERROR_ID, mi as InMemoryMemory, mo as spanQueryIdentityKey, mr as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, mu as isRunFenceConflictError, na as InMemoryHarness, no as SPAN_QUERY_MAX_COST_METRICS, oa as DatasetsInMemory, oo as SPAN_QUERY_ORDER_FIELDS, ou as WorkflowStepConflictError, po as spanQueryCostSchema, pu as currentRunGeneration, qa as tracePageResponseSchema, qi as canonicalKnowledgeName, qr as ToolProviderConnectionsStorage, ra as HarnessStorage, ro as SPAN_QUERY_MAX_CURSOR_BYTES, sa as DatasetsStorage, so as buildSpanQueryResponse, su as assertWorkflowStepGuard, ti as dispatchDueNotifications, to as threadQueryRowSchema, uo as parseSpanQueryRequest, uu as RUN_FENCING_NOT_SUPPORTED_ERROR_ID, va as InMemoryBlobStore, vi as KnowledgeImporterRunStateError, vo as spanQueryRowSchema, vr as assertKnowledgeDescriptionWithinBound, vu as runOutsideRunFenceScope, wa as retentionCutoffMs, wi as KnowledgeSchemaResetRequiredError, wo as buildCreateSpanRecord, wr as isKnowledgeScopeVisible, xa as BackgroundTasksStorage, xi as KNOWLEDGE_STORAGE_SCHEMA_VERSION, xo as getTraceQueryDeltaWatermark, xr as canonicalizeKnowledgeScope, ya as BlobStore, yi as KnowledgeImportersStorage, yo as encodeTraceQueryCursor, yr as assertKnowledgeRecordTextWithinBound, yu as setRunFenceContext, za as transformRow, zi as MAX_KNOWLEDGE_PAGE_DEPTH, zr as cloneRunData } from "../run-registry-
|
|
1
|
+
import { $a as threadQueryRequestSchema, $i as parseKnowledgePageRef, $r as InMemoryNotificationsStorage, Aa as filterByDateRange, Ai as inspectKnowledgeSchema, Ao as getObjectOrNull, Ar as StoreOperationsInMemory, Ba as transformScoreRow, Bi as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, Br as WorkflowsStorage, Ca as resolveRetentionTargets, Ci as KnowledgeNotFoundError, Co as planTraceQuery, Cr as expandKnowledgeScope, Da as createStoreErrorId, Di as KnowledgeUnsupportedCapabilityError, Do as buildMetricRecord, Dr as knowledgeSemanticIdempotencyKey, Ea as createStorageErrorId, Ei as KnowledgeTransactionDeadlineError, Eo as buildLogRecord, Er as knowledgeSemanticDocumentId, Fa as parseDuration, Fi as KnowledgePageKeyConflictError, Fo as ObservabilityStorage, Fr as FilesystemDB, Ga as tracePageNodeSchema, Gi as assertKnowledgeNoteTextWithinBound, Gr as WorkflowDefinitionsStorage, Ha as TracePageError, Hi as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, Hr as mergeStepResult, Ia as safelyParseJSON, Ii as MAX_KNOWLEDGE_MOVE_PAGES, Io as FactoryStorage, Ir as InMemoryStore, Ja as THREAD_QUERY_DEFAULT_LIMIT, Ji as knowledgeLinkRefKey, Jr as ScoresInMemory, Ka as tracePageRequestSchema, Ki as assertKnowledgePageDescriptionWithinBound, Kr as InMemoryToolProviderConnectionsStorage, La as serializeDate, Li as MAX_KNOWLEDGE_NOTE_TOKENS, Lo as FactoryStorageDomain, Lr as MockStore, Ma as getSqlType, Mi as KnowledgeMoveTooLargeError, Mo as serializeSpanAttributes, Mr as GitHubSourceControlProvider, Na as hasErrorCode, Ni as KnowledgePageDepthError, No as toEntityType, Nr as createGitHubSourceControlProviderFromEnv, Oa as createVectorErrorId, Oi as assertKnowledgeSchemaCompatible, Oo as buildScoreRecord, Or as knowledgeVisibleScopeKeys, Pa as jsonValueEquals, Pi as KnowledgePageHasChildrenError, Po as ObservabilityInMemory, Pr as FilesystemStore, Qa as threadQueryIdentitySchema, Qi as knowledgeScopeReadable, Qr as normalizeScheduleTarget, Ra as storageMessageMatchesMetadataFilter, Ri as MAX_KNOWLEDGE_PAGE_BODY_LINKS, Ro as UniqueViolationError, Rr as WorkflowsInMemory, Sa as executeRetentionPrune, Si as KnowledgeConflictError, So as planThreadQuery, Sr as createKnowledgeNodeCursor, Ta as runRetentionBatches, Ti as KnowledgeStorage, To as buildFeedbackRecord, Tr as knowledgeScopeKey, Ua as readTracePage, Ui as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Ur as mergeWorkflowStepResult, Va as validateStorageMetadataFilter, Vi as MAX_KNOWLEDGE_PAGE_LINKS, Vr as createEmptyWorkflowSnapshot, Wa as tracePageIdSchema, Wi as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Wr as InMemoryWorkflowDefinitionsStorage, Xa as encodeThreadQueryCursor, Xi as knowledgePinDepth, Xr as InMemorySchedulesStorage, Ya as THREAD_QUERY_MAX_LIMIT, Yi as knowledgePagePath, Yr as ScoresStorage, Za as planThreadRowsQuery, Zi as knowledgePositionBetween, Zr as SchedulesStorage, _a as ChannelsStorage, _i as KnowledgeImporterBindingConflictError, _o as spanQueryResponseSchema, _r as assertKnowledgeCeilingRaised, _u as runFencingNotSupportedError, aa as ExperimentsStorage, ao as SPAN_QUERY_MAX_PREVIEW_CHARACTERS, ba as BackgroundTasksInMemory, bi as KNOWLEDGE_STORAGE_CONTRACT_VERSION, bo as encodeTraceQueryDeltaCursor, br as assertKnowledgeScopeWithinCeiling, ca as DatasetItemIdentityConflictError, co as createSpanQueryPreview, cu as isWorkflowStepConflictError, do as planSpanQuery, du as RunFenceConflictError, ea as KnowledgeInvalidCursorError, ei as NotificationsStorage, eo as threadQueryResponseSchema, fo as resolveSpanQueryCost, fu as coverNestedRun, ga as InMemoryChannelsStorage, gi as InMemoryKnowledgeStorage, go as spanQueryRequestSchema, gr as MAX_KNOWLEDGE_SCOPE_TAGS, gu as resolveRunFence, hi as MemoryStorage, ho as spanQueryIdentitySchema, hr as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, hu as matchesRunFence, ia as ExperimentsInMemory, io as SPAN_QUERY_MAX_LIMIT, ja as getDefaultValue, ji as parseKnowledgeWikilinks, jo as getStringOrNull, jr as StoreOperations, ka as ensureDate, ki as createKnowledgeUlid, ko as buildUpdateSpanRecord, kr as parseKnowledgeNodeCursor, lo as encodeSpanQueryCursor, lu as RUN_FENCE_CONFLICT_ERROR_ID, mi as InMemoryMemory, mo as spanQueryIdentityKey, mr as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, mu as isRunFenceConflictError, na as InMemoryHarness, no as SPAN_QUERY_MAX_COST_METRICS, oa as DatasetsInMemory, oo as SPAN_QUERY_ORDER_FIELDS, ou as WorkflowStepConflictError, po as spanQueryCostSchema, pu as currentRunGeneration, qa as tracePageResponseSchema, qi as canonicalKnowledgeName, qr as ToolProviderConnectionsStorage, ra as HarnessStorage, ro as SPAN_QUERY_MAX_CURSOR_BYTES, sa as DatasetsStorage, so as buildSpanQueryResponse, su as assertWorkflowStepGuard, ti as dispatchDueNotifications, to as threadQueryRowSchema, uo as parseSpanQueryRequest, uu as RUN_FENCING_NOT_SUPPORTED_ERROR_ID, va as InMemoryBlobStore, vi as KnowledgeImporterRunStateError, vo as spanQueryRowSchema, vr as assertKnowledgeDescriptionWithinBound, vu as runOutsideRunFenceScope, wa as retentionCutoffMs, wi as KnowledgeSchemaResetRequiredError, wo as buildCreateSpanRecord, wr as isKnowledgeScopeVisible, xa as BackgroundTasksStorage, xi as KNOWLEDGE_STORAGE_SCHEMA_VERSION, xo as getTraceQueryDeltaWatermark, xr as canonicalizeKnowledgeScope, ya as BlobStore, yi as KnowledgeImportersStorage, yo as encodeTraceQueryCursor, yr as assertKnowledgeRecordTextWithinBound, yu as setRunFenceContext, za as transformRow, zi as MAX_KNOWLEDGE_PAGE_DEPTH, zr as cloneRunData } from "../run-registry-D22IF5SK.js";
|
|
2
2
|
import { a as PREVIEW_MAX_LENGTH } from "../observability-D7RNOAPx.js";
|
|
3
|
-
import { At as
|
|
3
|
+
import { At as getSnapshotMemoryInfo, Bt as stateColumnsWrite, Ft as latestStepResults, Ht as unusedStateEntries, It as materializeState, Lt as materializeWorkflowRun, Mt as STEP_RESULT_SUMMARY_FIELDS, Nt as applyStateColumnsWrite, Pt as isStateCheckpointDue, Rt as pickStateKeys, Ut as applyStatePatch, Vt as summarizeStepResult, Wt as diffState, jt as STATE_CHECKPOINT_PATCHES, zt as stateBaseOf } from "../stream-CoQTdzLm.js";
|
|
4
4
|
import { $ as getFeedbackAggregateArgsSchema, $t as metricsFilterSchema, A as deleteScoresResponseSchema, An as tagsField, At as getServiceNamesResponseSchema, B as experimentIdField, Bt as listScoresArgsSchema, C as dateRangeSchema, Cn as scoresOrderBySchema, Ct as getScoreBreakdownArgsSchema, D as deleteFeedbackArgsSchema, Dn as sourceField, Dt as getScoreTimeSeriesArgsSchema, E as defaultPaginationArgs, En as sortDirectionSchema, Et as getScorePercentilesResponseSchema, F as entityIdField, Fn as userIdField, Ft as listLogsArgsSchema, G as feedbackRecordSchema, Gt as logsFilterSchema, H as feedbackInputSchema, Ht as logLevelSchema, I as entityNameField, It as listLogsResponseSchema, J as getEntityNamesResponseSchema, Jt as metadataField, K as feedbackReviewStatusSchema, Kt as logsOrderByFieldSchema, L as entityTypeField, Lt as listMetricsArgsSchema, M as deltaInfoSchema, Mn as traceIdField, Mt as getTagsResponseSchema, N as deltaLimitSchema, Nn as updateFeedbackReviewStatusArgsSchema, Nt as listFeedbackArgsSchema, O as deleteFeedbackResponseSchema, On as spanContextFields, Ot as getScoreTimeSeriesResponseSchema, P as distinctColumnSchema, Pn as updatedAtField, Pt as listFeedbackResponseSchema, Q as getEnvironmentsResponseSchema, Qt as metricsAggregationSchema, R as environmentField, Rt as listMetricsResponseSchema, S as createdAtField, Sn as scoresOrderByFieldSchema, St as getScoreAggregateResponseSchema, T as defaultDeltaLimit, Tn as sessionIdField, Tt as getScorePercentilesArgsSchema, U as feedbackOrderByFieldSchema, Ut as logRecordInputSchema, V as feedbackFilterSchema, Vt as listScoresResponseSchema, W as feedbackOrderBySchema, Wt as logRecordSchema, X as getEntityTypesResponseSchema, Xt as metricRecordSchema, Y as getEntityTypesArgsSchema, Yt as metricInputSchema, Z as getEnvironmentsArgsSchema, Zt as metricTypeSchema, _ as createMetricRecordSchema, _n as runIdField, _t as getMetricPercentilesArgsSchema, a as batchCreateFeedbackArgsSchema, an as paginationInfoSchema, at as getFeedbackTimeSeriesArgsSchema, b as createScoreRecordSchema, bn as scoreRecordSchema, bt as getMetricTimeSeriesResponseSchema, c as batchCreateScoresArgsSchema, cn as parentEntityTypeField, ct as getMetricAggregateResponseSchema, d as contextFields, dn as requestIdField, dt as getMetricLabelKeysArgsSchema, en as metricsOrderByFieldSchema, et as getFeedbackAggregateResponseSchema, f as createFeedbackArgsSchema, ft as getMetricLabelKeysResponseSchema, g as createLogRecordSchema, gn as rootEntityTypeField, gt as getMetricNamesResponseSchema, h as createFeedbackResponseSchema, hn as rootEntityNameField, ht as getMetricNamesArgsSchema, i as aggregationTypeSchema, in as paginationArgsSchema, it as getFeedbackPercentilesResponseSchema, j as deltaCursorSchema, jn as threadIdField, jt as getTagsArgsSchema, k as deleteScoresArgsSchema, kn as spanIdField, kt as getServiceNamesArgsSchema, l as commonFilterFields, ln as refineObservabilityListMode, lt as getMetricBreakdownArgsSchema, m as createFeedbackRecordSchema, mn as rootEntityIdField, mt as getMetricLabelValuesResponseSchema, n as METRIC_DISTINCT_COLUMNS, nn as normalizeObservabilityListArgs, nt as getFeedbackBreakdownResponseSchema, o as batchCreateLogsArgsSchema, on as parentEntityIdField, ot as getFeedbackTimeSeriesResponseSchema, p as createFeedbackBodySchema, pn as resourceIdField, pt as getMetricLabelValuesArgsSchema, q as getEntityNamesArgsSchema, qt as logsOrderBySchema, r as aggregationIntervalSchema, rn as organizationIdField, rt as getFeedbackPercentilesArgsSchema, s as batchCreateMetricsArgsSchema, sn as parentEntityNameField, st as getMetricAggregateArgsSchema, t as EntityType, tn as metricsOrderBySchema, tt as getFeedbackBreakdownArgsSchema, u as comparePeriodSchema, un as replaceFeedbackBodySchema, ut as getMetricBreakdownResponseSchema, v as createScoreArgsSchema, vn as scopeField, vt as getMetricPercentilesResponseSchema, w as dbTimestamps, wn as serviceNameField, wt as getScoreBreakdownResponseSchema, x as createScoreResponseSchema, xn as scoresFilterSchema, xt as getScoreAggregateArgsSchema, y as createScoreBodySchema, yn as scoreInputSchema, yt as getMetricTimeSeriesArgsSchema, z as executionSourceField, zt as listModeSchema } from "../storage-Cc50aQAp.js";
|
|
5
5
|
import { $ as TABLE_CHANNEL_INSTALLATIONS, $n as listTracesLightResponseSchema, $t as TABLE_WORKSPACES, A as MCP_CLIENTS_SCHEMA, An as computeTraceStatus, At as TABLE_OBSERVATIONAL_MEMORY, B as PROMPT_BLOCK_VERSIONS_SCHEMA, Bn as getSpansArgsSchema, Bt as TABLE_SKILLS, C as KNOWLEDGE_SCOPE_GRANTS_SCHEMA, Cn as branchesFilterSchema, Ct as TABLE_MCP_CLIENTS, D as KNOWLEDGE_V2_MENTIONS_SCHEMA, Dn as buildPreview, Dt as TABLE_MEMORY_RUN_FENCES, E as KNOWLEDGE_V2_ACTIVITY_SCHEMA, En as buildInputPreview, Et as TABLE_MCP_SERVER_VERSIONS, F as NOTIFICATIONS_SCHEMA, Fn as getBranchResponseSchema, Ft as TABLE_SCHEDULE_TRIGGERS, G as SKILLS_SCHEMA, Gn as getTraceLightResponseSchema, Gt as TABLE_THREAD_STATE, H as SCORERS_SCHEMA, Hn as getStringAttribute, Ht as TABLE_SKILL_VERSIONS, I as OBSERVATIONAL_MEMORY_SCHEMA, In as getRootSpanArgsSchema, It as TABLE_SCHEMAS, J as SPAN_SCHEMA, Jn as lightSpanRecordSchema, Jt as TABLE_WORKFLOW_DEFINITIONS, K as SKILL_BLOBS_SCHEMA, Kn as getTraceResponseSchema, Kt as TABLE_TOOL_PROVIDER_CONNECTIONS, L as OBSERVATIONAL_MEMORY_TABLE_SCHEMA, Ln as getRootSpanResponseSchema, Lt as TABLE_SCORERS, M as MCP_SERVERS_SCHEMA, Mn as createSpanRecordSchema, Mt as TABLE_PROMPT_BLOCK_VERSIONS, N as MCP_SERVER_VERSIONS_SCHEMA, Nn as extractBranchSpans, Nt as TABLE_RESOURCES, O as KNOWLEDGE_V2_NODES_SCHEMA, On as buildPreviewFromJson, Ot as TABLE_MESSAGES, P as MEMORY_RUN_FENCES_SCHEMA, Pn as getBranchArgsSchema, Pt as TABLE_SCHEDULES, Q as TABLE_CHANNEL_CONFIG, Qn as listTracesArgsSchema, Qt as TABLE_WORKFLOW_SNAPSHOT, R as OLD_SPAN_SCHEMA, Rn as getSpanArgsSchema, Rt as TABLE_SCORER_DEFINITIONS, S as KNOWLEDGE_SCOPE_ADDRESSES_SCHEMA, Sn as batchUpdateSpansArgsSchema, St as TABLE_KNOWLEDGE_SEMANTIC_OUTBOX, T as KNOWLEDGE_TABLE_NAMES, Tn as branchesOrderBySchema, Tt as TABLE_MCP_SERVERS, U as SCORER_DEFINITIONS_SCHEMA, Un as getStructureResponseSchema, Ut as TABLE_SPANS, V as RUN_FENCING_TABLE_SCHEMAS, Vn as getSpansResponseSchema, Vt as TABLE_SKILL_BLOBS, W as SCORER_DEFINITION_VERSIONS_SCHEMA, Wn as getTraceArgsSchema, Wt as TABLE_THREADS, X as TABLE_AGENT_VERSIONS, Xn as listBranchesResponseSchema, Xt as TABLE_WORKFLOW_RUN_ENTRIES, Y as TABLE_AGENTS, Yn as listBranchesArgsSchema, Yt as TABLE_WORKFLOW_RUNS, Z as TABLE_BACKGROUND_TASKS, Zn as listScoresBySpanResponseSchema, Zt as TABLE_WORKFLOW_RUN_OWNERS, _ as KNOWLEDGE_NODE_ADDRESSES_SCHEMA, _n as INPUT_PREVIEW_MAX_LENGTH, _r as isAppendOnlySince, _t as TABLE_KNOWLEDGE_PROPOSALS, a as DATASET_VERSIONS_SCHEMA, an as WORKFLOW_RUN_ENTRIES_SCHEMA, ar as spanRecordSchema, at as TABLE_EXPERIMENT_RESULTS, b as KNOWLEDGE_RECORDS_SCHEMA, bn as batchDeleteTracesArgsSchema, br as maxObservationCursor, bt as TABLE_KNOWLEDGE_SCOPE_ADDRESSES, c as FAVORITES_SCHEMA, cn as WORKSPACES_SCHEMA, cr as toTraceSpans, ct as TABLE_KNOWLEDGE_ACCESS_STATE, d as KNOWLEDGE_ACTIVITY_SCHEMA, dn as STORAGE_VISIBILITY_VALUES, dr as tracesOrderByFieldSchema, dt as TABLE_KNOWLEDGE_IMPORT_RUNS, en as TABLE_WORKSPACE_VERSIONS, er as listTracesResponseSchema, et as TABLE_CONFIGS, f as KNOWLEDGE_CURSORS_SCHEMA, fn as buildStorageSchema, fr as tracesOrderBySchema, ft as TABLE_KNOWLEDGE_IMPORT_STATE, g as KNOWLEDGE_NODES_SCHEMA, gn as BRANCH_SPAN_TYPE_SET, gr as compareObservationalMemoryHeadOrder, gt as TABLE_KNOWLEDGE_NODE_SCOPES, h as KNOWLEDGE_MENTIONS_SCHEMA, hn as BRANCH_SPAN_TYPES, hr as assertActiveObservationsApplied, ht as TABLE_KNOWLEDGE_NODE_ADDRESSES, i as DATASET_ITEMS_SCHEMA, in as WORKFLOW_RUNS_SCHEMA, ir as spanIdsSchema, it as TABLE_EXPERIMENTS, j as MCP_CLIENT_VERSIONS_SCHEMA, jn as createSpanArgsSchema, jt as TABLE_PROMPT_BLOCKS, k as KNOWLEDGE_V2_RECORDS_SCHEMA, kn as buildStoredPreview, kt as TABLE_NOTIFICATIONS, l as HARNESS_SESSIONS_SCHEMA, ln as WORKSPACE_VERSIONS_SCHEMA, lr as traceSpanSchema, lt as TABLE_KNOWLEDGE_ACTIVITY, m as KNOWLEDGE_IMPORT_STATE_SCHEMA, mn as BATCH_DELETE_TRACES_MAX_IDS, mr as updateSpanRecordSchema, mt as TABLE_KNOWLEDGE_NODES, n as AGENT_VERSIONS_SCHEMA, nn as TOOL_PROVIDER_CONNECTIONS_SCHEMA, nr as scoreTracesResponseSchema, nt as TABLE_DATASET_ITEMS, o as EXPERIMENTS_SCHEMA, on as WORKFLOW_RUN_JOURNAL_TABLE_CONFIGS, or as toLightSpanRecord, ot as TABLE_FAVORITES, p as KNOWLEDGE_IMPORT_RUNS_SCHEMA, pn as matchesExpectedWorkflowStatus, pr as updateSpanArgsSchema, pt as TABLE_KNOWLEDGE_MENTIONS, q as SKILL_VERSIONS_SCHEMA, qn as isPreviewTruncated, qt as TABLE_TRACES, r as DATASETS_SCHEMA, rn as WORKFLOW_DEFINITIONS_SCHEMA, rr as spanIds, rt as TABLE_DATASET_VERSIONS, s as EXPERIMENT_RESULTS_SCHEMA, sn as WORKFLOW_RUN_OWNERS_SCHEMA, sr as toTraceSpan, st as TABLE_HARNESS_SESSIONS, t as AGENTS_SCHEMA, tn as THREAD_STATE_SCHEMA, tr as scoreTracesRequestSchema, tt as TABLE_DATASETS, u as KNOWLEDGE_ACCESS_STATE_SCHEMA, un as STORAGE_FAVORITE_ENTITY_TYPES, ur as tracesFilterSchema, ut as TABLE_KNOWLEDGE_CURSORS, v as KNOWLEDGE_NODE_SCOPES_SCHEMA, vn as TraceStatus, vr as isBufferedChunkCoveredByCursor, vt as TABLE_KNOWLEDGE_RECORDS, w as KNOWLEDGE_SEMANTIC_OUTBOX_SCHEMA, wn as branchesOrderByFieldSchema, wt as TABLE_MCP_CLIENT_VERSIONS, x as KNOWLEDGE_RECORD_SCOPES_SCHEMA, xn as batchDeleteTracesResponseSchema, xr as planReflectionGenerationText, xt as TABLE_KNOWLEDGE_SCOPE_GRANTS, y as KNOWLEDGE_PROPOSALS_SCHEMA, yn as batchCreateSpansArgsSchema, yr as isBufferedReflectionUnchangedSince, yt as TABLE_KNOWLEDGE_RECORD_SCOPES, z as PROMPT_BLOCKS_SCHEMA, zn as getSpanResponseSchema, zt as TABLE_SCORER_DEFINITION_VERSIONS } from "../constants-CFWgIaqA.js";
|
|
6
6
|
import { _ as ThreadStateStorage, a as GitHistory, c as DOMAIN_KEYS, d as MastraStorage, f as calculatePagination, g as InMemoryThreadStateStorage, h as resolveListOrderBy, i as getSourceControlEntityFilePath, l as EDITOR_DOMAINS, m as normalizePerPage, n as SOURCE_CONTROL_AGENTS_DIR, o as VersionedStorageDomain, p as compareByField, r as getSourceAgentFilePath, s as StorageDomain, t as FilesystemVersionedHelpers, u as MastraCompositeStore } from "../filesystem-versioned-BL1ojJLo.js";
|
|
@@ -166,6 +166,13 @@ export declare function resolveProcessorWriterMessageId(messageList: MessageList
|
|
|
166
166
|
* A single entry of a stored message's part array.
|
|
167
167
|
*/
|
|
168
168
|
type StepMessagePart = MastraDBMessage['content']['parts'][number];
|
|
169
|
+
/**
|
|
170
|
+
* @internal
|
|
171
|
+
* True when the run looped on its own response through a feedback continuation
|
|
172
|
+
* (`onIterationComplete` feedback). Only then does the response message hold earlier
|
|
173
|
+
* iterations that output processors must not see again.
|
|
174
|
+
*/
|
|
175
|
+
export declare function isFeedbackContinuation(messageList: MessageList, steps: readonly unknown[] | undefined): boolean;
|
|
169
176
|
/** @internal */
|
|
170
177
|
export declare function findIterationOffsetInParts(parts: StepMessagePart[], stepText: string | undefined): number | undefined;
|
|
171
178
|
/** @internal */
|
package/dist/stream/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_stream = require("../stream-
|
|
3
|
-
const require_llm = require("../llm-
|
|
2
|
+
const require_stream = require("../stream-BbPZavop.cjs");
|
|
3
|
+
const require_llm = require("../llm-CS6YY_IV.cjs");
|
|
4
4
|
const require_file = require("../file-BEndQUN1.cjs");
|
|
5
5
|
exports.ChunkFrom = require_llm.ChunkFrom;
|
|
6
6
|
exports.DefaultGeneratedFile = require_file.DefaultGeneratedFile;
|
package/dist/stream/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as ChunkFrom } from "../llm-
|
|
1
|
+
import { Dn as convertFullStreamChunkToUIMessageStream, a as convertFullStreamChunkToMastra, c as WorkflowRunOutput, d as MastraModelOutput, i as withStreamCaching, n as createCachingTransformStream, o as convertMastraChunkToAISDKv5, r as createReplayStream, s as MastraAgentNetworkStream, t as smoothStream } from "../stream-CoQTdzLm.js";
|
|
2
|
+
import { u as ChunkFrom } from "../llm-zjtMQn7M.js";
|
|
3
3
|
import { n as DefaultGeneratedFileWithType, t as DefaultGeneratedFile } from "../file-DGZrR5f7.js";
|
|
4
4
|
export { ChunkFrom, DefaultGeneratedFile, DefaultGeneratedFileWithType, MastraAgentNetworkStream, MastraModelOutput, WorkflowRunOutput, convertFullStreamChunkToMastra, convertFullStreamChunkToUIMessageStream, convertMastraChunkToAISDKv5, createCachingTransformStream, createReplayStream, smoothStream, withStreamCaching };
|