@mastra/core 1.87.0 → 1.88.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_types/@internal_ai-v6@0.0.100/dist/index.d.ts +97 -2049
- package/dist/agent/agent.d.ts +10 -2
- package/dist/agent/durable/create-evented-agent.d.ts +2 -1
- package/dist/agent/durable/execution-engine.d.ts +4 -2
- package/dist/agent/durable/index.cjs +3 -2
- package/dist/agent/durable/index.js +3 -2
- package/dist/agent/durable/segment-spans.d.ts +7 -0
- package/dist/agent/durable/stored-signal-drain.d.ts +1 -1
- package/dist/agent/durable/types.d.ts +6 -0
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.js +2 -2
- package/dist/agent/request-context-snapshot.d.ts +5 -0
- package/dist/agent/thread-stream-runtime.d.ts +26 -4
- 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-vUU_atR-.js → agent-controller-CQDCmsFD.js} +15 -9
- package/dist/{agent-controller-DckvJ7bq.cjs → agent-controller-NQKYmY0W.cjs} +15 -9
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-HAzB0JtC.js → background-tasks-B7UygDdO.js} +1 -1
- package/dist/{background-tasks-By_1e9Gf.cjs → background-tasks-CeARf1DK.cjs} +1 -1
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/{builder-CmtDqFLe.js → builder-CpAEmMdR.js} +2 -2
- package/dist/{builder-Dx8GMhFn.cjs → builder-Dmf04g9P.cjs} +2 -2
- package/dist/capabilities/302ai.json +196 -196
- package/dist/capabilities/abliteratedllm.json +33 -33
- package/dist/capabilities/abliteration-ai.json +9 -9
- package/dist/capabilities/above.json +13 -13
- package/dist/capabilities/adaption.json +7 -7
- package/dist/capabilities/adzuki.json +20 -20
- package/dist/capabilities/agentrouter.json +10 -10
- package/dist/capabilities/agnes.json +2 -2
- package/dist/capabilities/ai-router.json +6 -6
- package/dist/capabilities/aiand.json +27 -18
- package/dist/capabilities/aigrow.json +14 -14
- package/dist/capabilities/aimlapi.json +146 -146
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +17 -17
- package/dist/capabilities/aki-io.json +14 -14
- package/dist/capabilities/alibaba-cn.json +94 -94
- package/dist/capabilities/alibaba-coding-plan-cn.json +5 -5
- package/dist/capabilities/alibaba-coding-plan.json +5 -5
- package/dist/capabilities/alibaba-token-plan-cn.json +50 -50
- package/dist/capabilities/alibaba-token-plan.json +53 -53
- package/dist/capabilities/alibaba.json +71 -71
- package/dist/capabilities/ambient.json +8 -8
- package/dist/capabilities/amd-tokenlab.json +4 -4
- package/dist/capabilities/amd.json +11 -11
- package/dist/capabilities/anthropic.json +36 -36
- package/dist/capabilities/anyapi.json +18 -18
- package/dist/capabilities/apiko.json +2 -2
- package/dist/capabilities/arcee.json +9 -9
- package/dist/capabilities/augure.json +5 -5
- package/dist/capabilities/auriko.json +23 -23
- package/dist/capabilities/bailing.json +5 -5
- package/dist/capabilities/baseten.json +47 -38
- package/dist/capabilities/bee.json +5 -5
- package/dist/capabilities/bothub.json +14 -14
- package/dist/capabilities/boundless.json +37 -37
- package/dist/capabilities/bumo.json +40 -40
- package/dist/capabilities/byteplus.json +22 -22
- package/dist/capabilities/cerebras.json +4 -4
- package/dist/capabilities/cheapaimodel.json +10 -10
- package/dist/capabilities/cheapest-token.json +25 -25
- package/dist/capabilities/chutes.json +34 -32
- package/dist/capabilities/cline-pass.json +29 -29
- package/dist/capabilities/cloudcode.json +7 -7
- package/dist/capabilities/cloudflare-workers-ai.json +15 -15
- package/dist/capabilities/commandcode.json +146 -146
- package/dist/capabilities/concentrate.json +286 -277
- package/dist/capabilities/cortecs.json +109 -109
- package/dist/capabilities/crossmodel.json +194 -194
- package/dist/capabilities/crusoe.json +13 -13
- package/dist/capabilities/daoxe.json +7 -7
- package/dist/capabilities/databricks.json +128 -120
- package/dist/capabilities/deepinfra.json +102 -102
- package/dist/capabilities/deepseek.json +4 -4
- package/dist/capabilities/digitalocean.json +113 -114
- package/dist/capabilities/dothoosh.json +29 -29
- package/dist/capabilities/doubleword.json +26 -26
- package/dist/capabilities/edenai.json +287 -278
- package/dist/capabilities/empiriolabs.json +169 -169
- package/dist/capabilities/engy.json +24 -18
- package/dist/capabilities/entrim.json +6 -6
- package/dist/capabilities/evroc.json +13 -13
- package/dist/capabilities/ezkielyna.json +9 -9
- package/dist/capabilities/fastrouter.json +79 -79
- package/dist/capabilities/fireworks-ai.json +92 -92
- package/dist/capabilities/freemodel.json +10 -10
- package/dist/capabilities/friendli.json +26 -5
- package/dist/capabilities/frogbot.json +97 -97
- package/dist/capabilities/gisoo.json +19 -19
- package/dist/capabilities/gmicloud.json +7 -7
- package/dist/capabilities/google.json +53 -53
- package/dist/capabilities/graphn.json +14 -14
- package/dist/capabilities/greenpt.json +34 -34
- package/dist/capabilities/groq.json +4 -4
- package/dist/capabilities/helicone.json +88 -88
- package/dist/capabilities/hetzner.json +4 -4
- package/dist/capabilities/hostinger-router.json +10 -10
- package/dist/capabilities/hpc-ai.json +2 -2
- package/dist/capabilities/huawei-maas.json +15 -15
- package/dist/capabilities/hubris.json +28 -28
- package/dist/capabilities/huggingface.json +87 -85
- package/dist/capabilities/hyper.json +24 -24
- package/dist/capabilities/impossibl.json +114 -114
- package/dist/capabilities/inception.json +3 -3
- package/dist/capabilities/inceptron.json +8 -8
- package/dist/capabilities/inco.json +2 -2
- package/dist/capabilities/infer.json +17 -17
- package/dist/capabilities/inferall.json +5 -5
- package/dist/capabilities/inference-coop.json +2 -2
- package/dist/capabilities/inferenceapis.json +27 -27
- package/dist/capabilities/inferris.json +3 -3
- package/dist/capabilities/infersia.json +11 -11
- package/dist/capabilities/infomaniak.json +2 -2
- package/dist/capabilities/io-net.json +2 -2
- package/dist/capabilities/iteracompute.json +38 -38
- package/dist/capabilities/jalapeno.json +10 -10
- package/dist/capabilities/jiekou.json +34 -34
- package/dist/capabilities/joingonka.json +4 -4
- package/dist/capabilities/jzstoken.json +49 -49
- package/dist/capabilities/keln.json +24 -24
- package/dist/capabilities/kenari.json +122 -137
- package/dist/capabilities/kilo.json +615 -614
- package/dist/capabilities/kimchi.json +14 -14
- 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 +6 -6
- package/dist/capabilities/klavo.json +20 -20
- package/dist/capabilities/korouter.json +35 -35
- package/dist/capabilities/kunavo.json +10 -10
- package/dist/capabilities/liquid.json +9 -9
- package/dist/capabilities/lithosai.json +2 -2
- package/dist/capabilities/llmgateway-providers.json +959 -923
- package/dist/capabilities/llmgateway.json +349 -340
- package/dist/capabilities/llmtr.json +29 -29
- package/dist/capabilities/logits.json +2 -2
- package/dist/capabilities/lowrouter.json +53 -53
- package/dist/capabilities/lyceum.json +12 -12
- package/dist/capabilities/melious.json +9 -9
- package/dist/capabilities/merge-gateway.json +271 -263
- package/dist/capabilities/meta.json +11 -11
- 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 +16 -16
- package/dist/capabilities/mixlayer.json +4 -4
- package/dist/capabilities/modal.json +11 -11
- package/dist/capabilities/model-oracle-ai.json +19 -19
- package/dist/capabilities/modelis.json +16 -16
- package/dist/capabilities/modular.json +5 -5
- package/dist/capabilities/moneo.json +10 -10
- package/dist/capabilities/moonshotai-cn.json +6 -6
- package/dist/capabilities/moonshotai.json +6 -6
- package/dist/capabilities/morph.json +18 -18
- package/dist/capabilities/munito-eu.json +8 -8
- package/dist/capabilities/munito.json +10 -10
- package/dist/capabilities/nan.json +33 -33
- package/dist/capabilities/nano-gpt.json +557 -567
- package/dist/capabilities/nearai.json +77 -77
- package/dist/capabilities/nebius.json +42 -34
- package/dist/capabilities/neon.json +127 -127
- package/dist/capabilities/neuralwatt.json +37 -37
- package/dist/capabilities/nokeep.json +4 -4
- package/dist/capabilities/novita-ai.json +115 -115
- package/dist/capabilities/nvidia.json +17 -17
- package/dist/capabilities/oathbreaker.json +5 -5
- package/dist/capabilities/obscurify.json +29 -29
- package/dist/capabilities/oci.json +6 -6
- package/dist/capabilities/ofox.json +265 -265
- package/dist/capabilities/ollama-cloud.json +52 -52
- package/dist/capabilities/openai.json +58 -61
- package/dist/capabilities/opencode-go.json +90 -90
- package/dist/capabilities/openreason.json +6 -6
- package/dist/capabilities/openrouter.json +550 -548
- package/dist/capabilities/opper.json +26 -26
- package/dist/capabilities/orcarouter.json +310 -294
- package/dist/capabilities/outerlabs.json +29 -29
- package/dist/capabilities/ovhcloud.json +22 -22
- package/dist/capabilities/pareto.json +4 -4
- package/dist/capabilities/perplexity-agent.json +69 -69
- package/dist/capabilities/perplexity.json +2 -2
- package/dist/capabilities/phala.json +30 -30
- package/dist/capabilities/poe.json +111 -111
- package/dist/capabilities/poolside.json +2 -2
- package/dist/capabilities/powerspring.json +9 -9
- package/dist/capabilities/primalabs.json +11 -11
- package/dist/capabilities/prime.json +127 -119
- package/dist/capabilities/privatemode-ai.json +6 -6
- package/dist/capabilities/proxystacks.json +3 -3
- package/dist/capabilities/qiniu-ai.json +13 -13
- package/dist/capabilities/refuseless.json +5 -5
- package/dist/capabilities/regolo-ai.json +10 -10
- package/dist/capabilities/requesty.json +200 -200
- package/dist/capabilities/ruapi.json +20 -20
- package/dist/capabilities/runcrate.json +13 -13
- package/dist/capabilities/runinfra.json +19 -19
- package/dist/capabilities/sakana.json +5 -5
- package/dist/capabilities/sambanova.json +9 -9
- package/dist/capabilities/sandbase.json +22 -22
- package/dist/capabilities/sarvam.json +14 -14
- package/dist/capabilities/scaleway.json +17 -17
- package/dist/capabilities/scnet-token-plan.json +8 -8
- package/dist/capabilities/scx-ai.json +22 -22
- package/dist/capabilities/sensenova.json +11 -11
- package/dist/capabilities/siliconflow-cn.json +59 -59
- package/dist/capabilities/siliconflow.json +57 -57
- package/dist/capabilities/snowflake-cortex.json +19 -19
- package/dist/capabilities/sokkan.json +10 -10
- package/dist/capabilities/sparrowcodes.json +20 -20
- package/dist/capabilities/standardcompute.json +85 -85
- package/dist/capabilities/steadyrouter.json +40 -40
- 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 +18 -18
- package/dist/capabilities/superbot-gg.json +4 -4
- package/dist/capabilities/synthetic.json +12 -12
- package/dist/capabilities/synthorai.json +21 -21
- package/dist/capabilities/teamorouter.json +17 -17
- package/dist/capabilities/teapot-router.json +13 -13
- package/dist/capabilities/tencent-token-plan-intl.json +22 -22
- package/dist/capabilities/tencent-token-plan.json +42 -42
- package/dist/capabilities/tencent-tokenhub.json +44 -44
- package/dist/capabilities/tensorx.json +43 -43
- package/dist/capabilities/tenstorrent.json +2 -2
- package/dist/capabilities/the-grid-ai.json +30 -30
- 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 +54 -54
- package/dist/capabilities/tokengo.json +23 -23
- package/dist/capabilities/tokenharbor.json +217 -217
- package/dist/capabilities/tokenify.json +9 -9
- package/dist/capabilities/trustedrouter.json +6 -6
- package/dist/capabilities/trustedtokens.json +12 -12
- package/dist/capabilities/umans-ai-coding-plan.json +17 -17
- package/dist/capabilities/umans-ai.json +11 -11
- package/dist/capabilities/uncensuredai.json +5 -5
- package/dist/capabilities/unrestricted.json +4 -4
- package/dist/capabilities/uplinkswitch.json +20 -20
- package/dist/capabilities/upstage.json +2 -2
- package/dist/capabilities/vancine.json +20 -20
- package/dist/capabilities/vercel.json +580 -571
- package/dist/capabilities/vivgrid.json +61 -61
- package/dist/capabilities/volcengine-coding-plan.json +26 -26
- package/dist/capabilities/volcengine.json +24 -24
- package/dist/capabilities/vultr.json +15 -15
- package/dist/capabilities/wafer.ai.json +19 -19
- package/dist/capabilities/wallaby.json +5 -5
- package/dist/capabilities/wally.json +11 -11
- package/dist/capabilities/wandb.json +21 -21
- package/dist/capabilities/watt.json +19 -19
- package/dist/capabilities/xai.json +2 -2
- package/dist/capabilities/xpersona.json +13 -13
- package/dist/capabilities/xxapi.json +27 -27
- package/dist/capabilities/zai-coding-plan.json +11 -11
- package/dist/capabilities/zai.json +32 -32
- package/dist/capabilities/zenifra.json +27 -27
- package/dist/capabilities/zenmux.json +178 -178
- package/dist/capabilities/zerogpu.json +12 -12
- package/dist/capabilities/zhipuai-coding-plan.json +3 -3
- package/dist/capabilities/zhipuai.json +28 -28
- package/dist/capabilities/zro.json +7 -7
- package/dist/channels/index.cjs +2 -2
- package/dist/channels/index.js +2 -2
- package/dist/{channels-DChC1kXm.js → channels-BQ--aLCA.js} +1 -1
- package/dist/{channels-BamLzaJG.cjs → channels-CTCBsS5M.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 +804 -804
- package/dist/docs/references/docs-agents-human-in-the-loop.md +1 -1
- package/dist/docs/references/docs-agents-resumable-streams.md +3 -3
- package/dist/docs/references/docs-channels.md +8 -2
- package/dist/docs/references/docs-deployment-workers.md +10 -4
- package/dist/docs/references/docs-harness-durable-agents.md +17 -15
- package/dist/docs/references/docs-server-mcp.md +68 -0
- package/dist/docs/references/docs-server-pubsub.md +25 -16
- package/dist/docs/references/docs-signals-running-across-processes.md +9 -3
- package/dist/docs/references/docs-signals-sending-signals.md +1 -1
- package/dist/docs/references/docs-workflows-overview.md +3 -3
- package/dist/docs/references/reference-agents-agent.md +3 -1
- package/dist/docs/references/reference-agents-durable-agent.md +3 -3
- package/dist/docs/references/reference-configuration.md +60 -0
- package/dist/docs/references/reference-pubsub-base.md +1 -1
- package/dist/docs/references/reference-pubsub-caching-pubsub.md +1 -1
- package/dist/docs/references/reference-pubsub-google-cloud-pubsub.md +13 -7
- package/dist/docs/references/reference-pubsub-lease-provider.md +4 -0
- package/dist/docs/references/reference-pubsub-redis-streams.md +18 -9
- package/dist/docs/references/reference-pubsub-valkey-streams.md +25 -7
- 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/caching-pubsub.d.ts +3 -11
- package/dist/events/index.cjs +1 -1
- package/dist/events/index.js +1 -1
- package/dist/events/pubsub.d.ts +2 -1
- package/dist/{execution-fence-BBKnrhWR.cjs → execution-fence-C8Q0wWkG.cjs} +841 -219
- package/dist/{execution-fence--VdnD7p4.js → execution-fence-DGFyUV5h.js} +841 -219
- 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 +7689 -7673
- package/dist/llm/reasoning/account-switch.d.ts +50 -0
- package/dist/llm/reasoning/index.cjs +65 -0
- package/dist/llm/reasoning/index.d.ts +1 -0
- package/dist/llm/reasoning/index.js +61 -1
- package/dist/{llm-DknPJDW6.cjs → llm-RIAYOAtD.cjs} +2 -2
- package/dist/{llm-ccA_1Q-H.js → llm-YNjDFSui.js} +2 -2
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/loop/suspended-run-auto-resume.d.ts +15 -0
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts +1 -1
- package/dist/{manager-DWX6-Cx4.js → manager-DZhtdV6Q.js} +2 -2
- package/dist/{manager-D9F0i7O2.cjs → manager-Y-jYcS7T.cjs} +2 -2
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.d.ts +35 -11
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-BzWL4xI8.cjs → mastra-B2-HBq1-.cjs} +108 -20
- package/dist/{mastra-oUDN81l8.js → mastra-BJ54VxOO.js} +108 -20
- package/dist/memory/index.cjs +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/{model-BwxfS6T_.js → model-cS3d5rmF.js} +1 -1
- package/dist/{model-BnD7SPlA.cjs → model-lzZPXaEV.cjs} +1 -1
- package/dist/{netlify-CS0VDbb9.cjs → netlify-1lti1j4Z.cjs} +1 -1
- package/dist/{netlify-DcY9gHCJ.js → netlify-ClBjc0Xg.js} +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{output-helpers-k2-48ssH.js → output-helpers-D-qplq22.js} +13 -15
- package/dist/{output-helpers-By5FbLpp.cjs → output-helpers-D4O_oFne.cjs} +12 -14
- 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-OggbU6OE.cjs → provider-registry-C6jd3Uxi.cjs} +21565 -21544
- package/dist/{provider-registry-BvbEoScB.js → provider-registry-C_XQJvu2.js} +21565 -21544
- package/dist/provider-registry.json +22006 -21980
- package/dist/{registry-generator-CDaf48a6.cjs → registry-generator-BYdAlox6.cjs} +1 -1
- package/dist/{registry-generator-BFOQQHyt.js → registry-generator-DBrTbThj.js} +1 -1
- package/dist/{rehydrate-CFoKaNlm.js → rehydrate-4xHubfOY.js} +2 -2
- package/dist/{rehydrate-QeS0NjGw.cjs → rehydrate-BtwY0ima.cjs} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/{scheduler-0ShtMM1I.js → scheduler-D1qdie5k.js} +4 -2
- package/dist/{scheduler-CMjK0LoQ.cjs → scheduler-DE5lcHJA.cjs} +4 -2
- package/dist/server/index.d.ts +1 -1
- package/dist/server/types.d.ts +57 -0
- package/dist/storage/domains/memory/base.d.ts +6 -1
- 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-CNqAlDJF.cjs → stream-DqKDB3nL.cjs} +1 -1
- package/dist/{stream-D2rv1Ut1.js → stream-H_wVxqdK.js} +1 -1
- 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-Dusqj7-j.cjs → tool-loop-agent-D4gSdYuN.cjs} +3 -3
- package/dist/{tool-loop-agent-CFsOjueT.js → tool-loop-agent-DvZcOxWe.js} +3 -3
- package/dist/{utils-CIuOHPoS.cjs → utils-Dd4m7z13.cjs} +1 -1
- package/dist/{utils-DLnCt6E9.js → utils-h5k_ChdS.js} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-ShLcQTA5.js → validate-DQB9spZ1.js} +1 -1
- package/dist/{validate-1zReLtWc.cjs → validate-u6_TUYSo.cjs} +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.d.ts +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/worker/workers/orchestration-worker.d.ts +13 -0
- package/dist/{worker-CQ8rTJwQ.cjs → worker-0F7Nukyf.cjs} +2 -2
- package/dist/{worker-BPNrwCFs.cjs → worker-D-cq8McN.cjs} +117 -32
- package/dist/{worker-ngt-F1Iv.js → worker-DWOK2M_5.js} +117 -32
- package/dist/{worker-CKcQcPl8.js → worker-DmUkyJY_.js} +2 -2
- package/dist/{workflow-B_e5wMmz.cjs → workflow-DXE15e-w.cjs} +4 -4
- package/dist/{workflow-XDIVRsu4.js → workflow-DamOke3z.js} +4 -4
- 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/evented/setup-warning.d.ts +20 -0
- package/dist/workflows/index.cjs +5 -5
- package/dist/workflows/index.js +5 -5
- package/dist/workflows/scheduler/types.d.ts +3 -0
- package/dist/workspace/tools/media.d.ts +2 -2
- package/package.json +7 -7
- package/src/llm/model/provider-types.generated.d.ts +7689 -7673
package/dist/agent/agent.d.ts
CHANGED
|
@@ -1680,8 +1680,16 @@ TRequestContext extends Record<string, any> | unknown = any, TEditor extends Age
|
|
|
1680
1680
|
* @internal Used by the server's run abort route.
|
|
1681
1681
|
*/
|
|
1682
1682
|
__abortRunAcknowledged(runId: string): Promise<boolean>;
|
|
1683
|
-
/**
|
|
1684
|
-
|
|
1683
|
+
/**
|
|
1684
|
+
* @internal Close the stored signals of a parked run that an abort requested by another process releases here.
|
|
1685
|
+
* With `exclusiveOfResume`, the close holds the run's execution claim from its snapshot read through its commit, as
|
|
1686
|
+
* a resume segment does. A resume that starts meanwhile waits for it, instead of consuming a signal that the close,
|
|
1687
|
+
* working from the snapshot it read before, would then return to pending. Resolves `false` while another
|
|
1688
|
+
* execution holds the run.
|
|
1689
|
+
*/
|
|
1690
|
+
__closeParkedRunSignals(runId: string, options?: {
|
|
1691
|
+
exclusiveOfResume?: boolean;
|
|
1692
|
+
}): Promise<boolean> | undefined;
|
|
1685
1693
|
sendMessage<OUTPUT = TOutput>(message: AgentMessageInput, target: SendAgentMessageOptions<OUTPUT>): SendAgentMessageResult<OUTPUT>;
|
|
1686
1694
|
queueMessage<OUTPUT = TOutput>(message: AgentMessageInput, target: QueueAgentMessageOptions<OUTPUT>): QueueAgentMessageResult<OUTPUT>;
|
|
1687
1695
|
/**
|
|
@@ -92,7 +92,8 @@ export interface CreateEventedAgentOptions<TAgentId extends string = string, TTo
|
|
|
92
92
|
*
|
|
93
93
|
* In one process it runs on any pubsub, including the default one. Running its
|
|
94
94
|
* steps on several processes needs a pubsub that redelivers unacknowledged
|
|
95
|
-
* events
|
|
95
|
+
* events, a workflows store with step guards, and a server cache (`cache` on
|
|
96
|
+
* `Mastra`) that every process shares.
|
|
96
97
|
*
|
|
97
98
|
* @see https://mastra.ai/docs/server/pubsub#evented-workflows-and-agents
|
|
98
99
|
*
|
|
@@ -101,8 +101,10 @@ export declare class DefaultAgentExecutionEngine {
|
|
|
101
101
|
* Close the stored signals of a parked run that was aborted. Call it before
|
|
102
102
|
* the snapshot is deleted and before the abort terminal is published.
|
|
103
103
|
* Returns nothing to wait for when this engine's runs never store signals.
|
|
104
|
+
* Resolves `false` when the run was left open: its committed state could not
|
|
105
|
+
* be determined yet, or the close did not commit.
|
|
104
106
|
*/
|
|
105
|
-
closeParkedRunSignals(_runId: string): Promise<
|
|
107
|
+
closeParkedRunSignals(_runId: string): Promise<boolean> | undefined;
|
|
106
108
|
/**
|
|
107
109
|
* Publish the abort terminal for a parked run this call just canceled. The bus is
|
|
108
110
|
* shared, so observers on every server close now, whichever server later refuses
|
|
@@ -355,7 +357,7 @@ export declare class EventedAgentExecutionEngine extends DefaultAgentExecutionEn
|
|
|
355
357
|
#private;
|
|
356
358
|
get executionMode(): 'blocking' | 'background';
|
|
357
359
|
get suspendPersistedOnReturn(): boolean;
|
|
358
|
-
closeParkedRunSignals(runId: string): Promise<
|
|
360
|
+
closeParkedRunSignals(runId: string): Promise<boolean> | undefined;
|
|
359
361
|
get executesStepsLocally(): boolean;
|
|
360
362
|
prepareExecution(pubsub: PubSub | undefined, fence: ExecutionFence | undefined, workflowEngine: 'default' | 'evented', logger: IMastraLogger, guardrailLogger: IMastraLogger | undefined): {
|
|
361
363
|
sharedExecution: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_execution_fence = require("../../execution-fence-
|
|
2
|
+
const require_execution_fence = require("../../execution-fence-C8Q0wWkG.cjs");
|
|
3
3
|
const require_observability = require("../../observability-VaoaeadK.cjs");
|
|
4
4
|
// src/agent/durable/durable-agent.ts
|
|
5
5
|
var DurableAgent = class extends require_execution_fence.Agent {
|
|
@@ -606,7 +606,8 @@ function isEventedAgentClass(obj) {
|
|
|
606
606
|
*
|
|
607
607
|
* In one process it runs on any pubsub, including the default one. Running its
|
|
608
608
|
* steps on several processes needs a pubsub that redelivers unacknowledged
|
|
609
|
-
* events
|
|
609
|
+
* events, a workflows store with step guards, and a server cache (`cache` on
|
|
610
|
+
* `Mastra`) that every process shares.
|
|
610
611
|
*
|
|
611
612
|
* @see https://mastra.ai/docs/server/pubsub#evented-workflows-and-agents
|
|
612
613
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as modelConfigSchema, A as detachFullStreamOnEnd, B as serializeToolsMetadata, Bs as emitChunkEvent, Cc as AgentControlEventTypes, D as prepareForDurableExecution, E as normalizeResumeGenerateArgs, F as createDurableToolCallStep, G as resolveDurableToolCallConcurrency, Gs as emitSuspendedEvent, Hs as emitFinishEvent, I as createWorkflowInput, J as createBaseIterationStateUpdate, Js as resolveInternalState, K as buildStepRecord, Ks as diffResponseMessages, L as serializeDurableOptions, M as createDurableGoalStep, N as createDurableIsTaskCompleteStep, O as applyReservedMemoryContextKeys, P as createDurableLLMMappingStep, Pt as validateModelTimeoutSettings, Q as durableAgenticOutputSchema, Qs as toolRequiresApproval, R as serializeDurableState, Rs as createDurableAgentStream, Sc as AGENT_STREAM_TOPIC, T as Agent, Us as emitStepFinishEvent, V as createDurableLLMExecutionStep, Vs as emitErrorEvent, W as createDurableBackgroundTaskCheckStep, Ws as emitStepStartEvent, X as baseDurableAgenticInputSchema, Xs as resolveRuntimeDependencies, Y as accumulatedUsageSchema, Ys as resolveModel, Z as baseIterationStateSchema, Zs as resolveTool, _c as segmentSpanData, _t as untilIdleHandlesBackgroundTask, ac as endRunSpansWithError, at as runResumeDurableStreamUntilIdle, bc as DurableStepIds, cc as getRunRegistryEntry, ct as readRunDeadline, dc as setRunRegistryEntry, dt as requestAcknowledgedAbort, ec as DURABLE_CONTEXT_SEGMENT_KEY, et as modelListEntrySchema, fc as takeRunScorerInstances, ft as subscribeToAbortRequests, gc as segmentEndedBySuspension, gt as getScopeStreamSlot, hc as liveSegmentSpan, ht as getRunStreamSlot, i as agentThreadStreamRuntime, ic as deleteRunRegistryEntry, it as runDurableStreamUntilIdle, j as createDurableAgenticWorkflow, k as persistDurableRunInput, lc as globalRunRegistry, lt as AgentStreamBus, mc as endFailedSegmentSpans, nc as RunRegistry, nt as runDurableFinishSideEffects, ot as RUN_DEADLINE_KEY, pc as carrySegmentSpans, pt as createRunAbortController, q as calculateAccumulatedUsage, qs as rebuildRunToolsFromMastra, rt as loadRunStoredMessages, st as ensureRemoteAbortListener, t as __resetExecutionFencesForTests, tc as ExtendedRunRegistry, tt as executeDurableAgentScorers, ut as publishAbortRequest, vc as DURABLE_STOP_WHEN_ERROR_ID, vt as pruneAgentLoopSnapshot, wc as AgentStreamEventTypes, xc as AGENT_CONTROL_TOPIC, yc as DurableAgentDefaults, z as serializeModelConfig, zs as emitAbortEvent } from "../../execution-fence
|
|
1
|
+
import { $ as modelConfigSchema, A as detachFullStreamOnEnd, B as serializeToolsMetadata, Bs as emitChunkEvent, Cc as AgentControlEventTypes, D as prepareForDurableExecution, E as normalizeResumeGenerateArgs, F as createDurableToolCallStep, G as resolveDurableToolCallConcurrency, Gs as emitSuspendedEvent, Hs as emitFinishEvent, I as createWorkflowInput, J as createBaseIterationStateUpdate, Js as resolveInternalState, K as buildStepRecord, Ks as diffResponseMessages, L as serializeDurableOptions, M as createDurableGoalStep, N as createDurableIsTaskCompleteStep, O as applyReservedMemoryContextKeys, P as createDurableLLMMappingStep, Pt as validateModelTimeoutSettings, Q as durableAgenticOutputSchema, Qs as toolRequiresApproval, R as serializeDurableState, Rs as createDurableAgentStream, Sc as AGENT_STREAM_TOPIC, T as Agent, Us as emitStepFinishEvent, V as createDurableLLMExecutionStep, Vs as emitErrorEvent, W as createDurableBackgroundTaskCheckStep, Ws as emitStepStartEvent, X as baseDurableAgenticInputSchema, Xs as resolveRuntimeDependencies, Y as accumulatedUsageSchema, Ys as resolveModel, Z as baseIterationStateSchema, Zs as resolveTool, _c as segmentSpanData, _t as untilIdleHandlesBackgroundTask, ac as endRunSpansWithError, at as runResumeDurableStreamUntilIdle, bc as DurableStepIds, cc as getRunRegistryEntry, ct as readRunDeadline, dc as setRunRegistryEntry, dt as requestAcknowledgedAbort, ec as DURABLE_CONTEXT_SEGMENT_KEY, et as modelListEntrySchema, fc as takeRunScorerInstances, ft as subscribeToAbortRequests, gc as segmentEndedBySuspension, gt as getScopeStreamSlot, hc as liveSegmentSpan, ht as getRunStreamSlot, i as agentThreadStreamRuntime, ic as deleteRunRegistryEntry, it as runDurableStreamUntilIdle, j as createDurableAgenticWorkflow, k as persistDurableRunInput, lc as globalRunRegistry, lt as AgentStreamBus, mc as endFailedSegmentSpans, nc as RunRegistry, nt as runDurableFinishSideEffects, ot as RUN_DEADLINE_KEY, pc as carrySegmentSpans, pt as createRunAbortController, q as calculateAccumulatedUsage, qs as rebuildRunToolsFromMastra, rt as loadRunStoredMessages, st as ensureRemoteAbortListener, t as __resetExecutionFencesForTests, tc as ExtendedRunRegistry, tt as executeDurableAgentScorers, ut as publishAbortRequest, vc as DURABLE_STOP_WHEN_ERROR_ID, vt as pruneAgentLoopSnapshot, wc as AgentStreamEventTypes, xc as AGENT_CONTROL_TOPIC, yc as DurableAgentDefaults, z as serializeModelConfig, zs as emitAbortEvent } from "../../execution-fence-DGFyUV5h.js";
|
|
2
2
|
import { a as agentLoopTermination, o as executionFailureTermination } from "../../observability-DPDWibyH.js";
|
|
3
3
|
// src/agent/durable/durable-agent.ts
|
|
4
4
|
var DurableAgent = class extends Agent {
|
|
@@ -605,7 +605,8 @@ function isEventedAgentClass(obj) {
|
|
|
605
605
|
*
|
|
606
606
|
* In one process it runs on any pubsub, including the default one. Running its
|
|
607
607
|
* steps on several processes needs a pubsub that redelivers unacknowledged
|
|
608
|
-
* events
|
|
608
|
+
* events, a workflows store with step guards, and a server cache (`cache` on
|
|
609
|
+
* `Mastra`) that every process shares.
|
|
609
610
|
*
|
|
610
611
|
* @see https://mastra.ai/docs/server/pubsub#evented-workflows-and-agents
|
|
611
612
|
*
|
|
@@ -24,6 +24,13 @@ type CarrierTarget = Pick<RequestContext, 'getRaw' | 'setRaw'> | Record<string,
|
|
|
24
24
|
* caller's context cannot overwrite the parent's segment.
|
|
25
25
|
*/
|
|
26
26
|
export declare function carrySegmentSpans(target: CarrierTarget, runId: string, segment: SegmentSpanData | null): void;
|
|
27
|
+
/**
|
|
28
|
+
* Record the `autoResumeSuspendedTools` a resumed execution of `runId` runs with on the request context it hands the
|
|
29
|
+
* engine, which carries it to every step of the segment wherever it runs. (#30190)
|
|
30
|
+
*/
|
|
31
|
+
export declare function carrySegmentAutoResume(requestContext: RequestContext, runId: string, value: boolean): void;
|
|
32
|
+
/** The `autoResumeSuspendedTools` a resume carried for the current execution of `runId`, if any. */
|
|
33
|
+
export declare function segmentAutoResume(requestContext: Pick<RequestContext, 'getRaw'> | undefined, runId: string): boolean | undefined;
|
|
27
34
|
/**
|
|
28
35
|
* The pair the current execution reports under: the one a resume or recovery carried for `runId`,
|
|
29
36
|
* else the run's first pair from `state` (the workflow input or the loop state). A carried `null`
|
|
@@ -57,7 +57,7 @@ export declare function closeStoredSignalRun({ mastra, runId, input, requestCont
|
|
|
57
57
|
state: unknown | (() => unknown);
|
|
58
58
|
/** Set by the close of the run's total deadline. */
|
|
59
59
|
deadline?: boolean;
|
|
60
|
-
}): Promise<
|
|
60
|
+
}): Promise<boolean> | undefined;
|
|
61
61
|
export type StoredSignalDrain = {
|
|
62
62
|
signals: CreatedAgentSignal[];
|
|
63
63
|
/** Workflow state to save together with the transcript that holds `signals`. */
|
|
@@ -782,6 +782,12 @@ export interface RunRegistryEntry {
|
|
|
782
782
|
* registered on the Mastra instance instead of trusting the entry.
|
|
783
783
|
*/
|
|
784
784
|
isPlaceholder?: boolean;
|
|
785
|
+
/**
|
|
786
|
+
* The `autoResumeSuspendedTools` the run's current segment executes with, set when a resume runs it. Absent until
|
|
787
|
+
* then: the run executes with the value in its workflow input. Each suspension persists it, so a resume in another
|
|
788
|
+
* process that leaves the option out keeps the latest one. (#30190)
|
|
789
|
+
*/
|
|
790
|
+
autoResumeSuspendedTools?: boolean;
|
|
785
791
|
/**
|
|
786
792
|
* Resolved tools with execute functions.
|
|
787
793
|
*
|
package/dist/agent/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_execution_fence = require("../execution-fence-
|
|
2
|
+
const require_stream = require("../stream-DqKDB3nL.cjs");
|
|
3
|
+
const require_execution_fence = require("../execution-fence-C8Q0wWkG.cjs");
|
|
4
4
|
const require_message_list = require("../message-list-C0F2sDNC.cjs");
|
|
5
5
|
const require_signals = require("../signals-CWxAMEmE.cjs");
|
|
6
6
|
const require_to_prompt = require("../to-prompt-CG-LyaBY.cjs");
|
package/dist/agent/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { dn as resolveSuspendedToolRunId, fn as resolveThreadIdFromArgs, hn as tryStreamWithJsonFallback, l as TripWire, mn as tryGenerateWithJsonFallback, pn as supportedLanguageModelSpecifications, un as isSupportedLanguageModel } from "../stream-
|
|
2
|
-
import { C as mergeAgentPersona, Hl as isDurableAgentLike, S as MAX_FS_SUBAGENT_DEPTH, T as Agent, Ts as getGoalActivityDurationMs, Vl as hasResumableStreams, b as agentInstructions, bt as resolveDeclineReason, cu as isAgentCompatible, w as AGENT_RESUME_CLAIM_STALE_MS, x as assembleAgentFromFsEntry, y as agentConfig, yt as DEFAULT_TOOL_DECLINE_REASON } from "../execution-fence
|
|
1
|
+
import { dn as resolveSuspendedToolRunId, fn as resolveThreadIdFromArgs, hn as tryStreamWithJsonFallback, l as TripWire, mn as tryGenerateWithJsonFallback, pn as supportedLanguageModelSpecifications, un as isSupportedLanguageModel } from "../stream-H_wVxqdK.js";
|
|
2
|
+
import { C as mergeAgentPersona, Hl as isDurableAgentLike, S as MAX_FS_SUBAGENT_DEPTH, T as Agent, Ts as getGoalActivityDurationMs, Vl as hasResumableStreams, b as agentInstructions, bt as resolveDeclineReason, cu as isAgentCompatible, w as AGENT_RESUME_CLAIM_STALE_MS, x as assembleAgentFromFsEntry, y as agentConfig, yt as DEFAULT_TOOL_DECLINE_REASON } from "../execution-fence-DGFyUV5h.js";
|
|
3
3
|
import { Q as TypeDetector, n as MessageList, t as convertMessages } from "../message-list-RgFlLrxG.js";
|
|
4
4
|
import { a as isCreatedAgentSignal, c as isUserAuthoredMessage, d as signalSpanAttributes, f as signalToDataPartFormat, h as signalToXmlMarkup, i as getMessageAuthor, l as mastraDBMessageToSignal, m as signalToMessage, n as createSignal, o as isMastraSignalMessage, p as signalToMastraDBMessage, r as dataPartToSignal, s as isTransientSignalMessage, t as createMessageSignal, u as resolveDeliveryAttributes } from "../signals-CqR_iWkg.js";
|
|
5
5
|
import { n as aiV5ModelMessageToV2PromptMessage } from "../to-prompt-CMlVGYxC.js";
|
|
@@ -10,6 +10,11 @@ export declare const MASTRA_DURABLE_EXECUTIONS_KEY = "mastra__durableExecutions"
|
|
|
10
10
|
* resumed or recovered execution reports under (see `durable/segment-spans.ts`).
|
|
11
11
|
*/
|
|
12
12
|
export declare const MASTRA_DURABLE_SEGMENTS_KEY = "mastra__durableSegments";
|
|
13
|
+
/**
|
|
14
|
+
* Reserved request-context key carrying `Record<runId, boolean>`: the `autoResumeSuspendedTools` a resumed execution
|
|
15
|
+
* runs with, so a step that suspends persists it on whichever worker runs the step. (#30190)
|
|
16
|
+
*/
|
|
17
|
+
export declare const MASTRA_DURABLE_AUTO_RESUME_KEY = "mastra__durableAutoResume";
|
|
13
18
|
/**
|
|
14
19
|
* JSON-safe snapshot of `requestContext.entries()`, for a run that continues
|
|
15
20
|
* somewhere the live context can't follow: a durable step, or a claimed
|
|
@@ -63,8 +63,20 @@ type AgentThreadRunRecord<OUTPUT = unknown> = {
|
|
|
63
63
|
segmentAbortController?: AbortController;
|
|
64
64
|
/** This process read the record's own `run-registered` back from the thread topic. */
|
|
65
65
|
registrationSeen?: boolean;
|
|
66
|
-
/** Another process registered the run after this record did, so it executes the run now. */
|
|
67
|
-
registeredElsewhere?:
|
|
66
|
+
/** Another process registered the run after this record did, so it executes the run now: that registration's stream. */
|
|
67
|
+
registeredElsewhere?: string;
|
|
68
|
+
/** Resumes of this parked run that are still setting up; queued input is theirs, see {@link AgentThreadStreamRuntime.holdParkedRunForResume}. */
|
|
69
|
+
resumeHolds?: number;
|
|
70
|
+
/**
|
|
71
|
+
* A resume this record doesn't follow ran the run and left it parked again, so the record's suspension and options
|
|
72
|
+
* may be stale: queued input never releases it. A resume that registers replaces the record. (#30190)
|
|
73
|
+
*/
|
|
74
|
+
resumedUntracked?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Another process holds queued work behind this run (`queued-input-waiting`). Kept until the run is released, so a
|
|
77
|
+
* notice that arrives while a resume holds the run still counts once the hold ends. (#30190, #32093)
|
|
78
|
+
*/
|
|
79
|
+
queuedInputElsewhere?: boolean;
|
|
68
80
|
/**
|
|
69
81
|
* This record's retake gave up while its handoff was still in flight, so that handoff may yet install the run id
|
|
70
82
|
* on a lease nothing here renews. Ending must leave such a lease to expire rather than release a successor's.
|
|
@@ -257,7 +269,7 @@ export declare class AgentThreadStreamRuntime {
|
|
|
257
269
|
abortRun(runId: string, pubsub?: PubSub, options?: {
|
|
258
270
|
fenceResume?: boolean;
|
|
259
271
|
/** Closes the stored signals of a parked run this call releases; only called for a storage-backed run. */
|
|
260
|
-
closeStoredRun?: (runId: string) => Promise<
|
|
272
|
+
closeStoredRun?: (runId: string) => Promise<unknown> | undefined;
|
|
261
273
|
}): boolean;
|
|
262
274
|
/**
|
|
263
275
|
* A run parked on a tool suspension: its active segment ended (so it was
|
|
@@ -266,6 +278,16 @@ export declare class AgentThreadStreamRuntime {
|
|
|
266
278
|
*/
|
|
267
279
|
/** Whether `runId` is parked on a tool suspension in this process. */
|
|
268
280
|
isRunParked(runId: string, pubsub?: PubSub): boolean;
|
|
281
|
+
/**
|
|
282
|
+
* Holds a parked run for a resume that is setting up, so input queued meanwhile stays the resumed run's next model
|
|
283
|
+
* input, as it was before parked runs were released for queued input, instead of starting a turn beside the resumed
|
|
284
|
+
* tool. The returned function ends the hold; if the run is still parked then, for example because the resume
|
|
285
|
+
* failed, queued input starts the next turn, unless `startQueuedTurn` is false: a caller whose resume this record
|
|
286
|
+
* doesn't follow, and that left the run parked again, marks the record so queued input keeps waiting. (#30190)
|
|
287
|
+
*/
|
|
288
|
+
holdParkedRunForResume(runId: string, pubsub?: PubSub): (options?: {
|
|
289
|
+
startQueuedTurn?: boolean;
|
|
290
|
+
}) => void;
|
|
269
291
|
getActiveThreadRunId(options: AgentThreadIdentityOptions, pubsub?: PubSub): string | undefined;
|
|
270
292
|
/** Same predicate as {@link getActiveThreadRunId}, over every tracked thread. */
|
|
271
293
|
listActiveThreadRuns(pubsub?: PubSub): ActiveThreadRun[];
|
|
@@ -302,7 +324,7 @@ export declare class AgentThreadStreamRuntime {
|
|
|
302
324
|
* waits for the current stream to suspend or finish.
|
|
303
325
|
*/
|
|
304
326
|
queueStreamResume<OUTPUT>(runId: string, resume: () => Promise<MastraModelOutput<OUTPUT>>, pubsub?: PubSub): Promise<MastraModelOutput<OUTPUT>>;
|
|
305
|
-
abortThread(options: AgentAbortThreadOptions, pubsub?: PubSub, closeStoredRun?: (runId: string) => Promise<
|
|
327
|
+
abortThread(options: AgentAbortThreadOptions, pubsub?: PubSub, closeStoredRun?: (runId: string) => Promise<unknown> | undefined): boolean;
|
|
306
328
|
/** @internal */
|
|
307
329
|
resetForTests(): void;
|
|
308
330
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_provider_registry = require("../../provider-registry-
|
|
2
|
+
const require_provider_registry = require("../../provider-registry-C6jd3Uxi.cjs");
|
|
3
3
|
// src/agent-builder/ee/types.ts
|
|
4
4
|
/**
|
|
5
5
|
* Default-on values for {@link AgentFeatures}. `browser` is defaulted
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getRegisteredProviders, o as isProviderRegistered, u as parseModelString } from "../../provider-registry-
|
|
1
|
+
import { a as getRegisteredProviders, o as isProviderRegistered, u as parseModelString } from "../../provider-registry-C_XQJvu2.js";
|
|
2
2
|
// src/agent-builder/ee/types.ts
|
|
3
3
|
/**
|
|
4
4
|
* Default-on values for {@link AgentFeatures}. `browser` is defaulted
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_state_processor = require("../state-processor-DaSmhVUX.cjs");
|
|
3
3
|
const require_tools = require("../tools-DZoVfKPl.cjs");
|
|
4
|
-
const require_agent_controller = require("../agent-controller-
|
|
4
|
+
const require_agent_controller = require("../agent-controller-NQKYmY0W.cjs");
|
|
5
5
|
exports.AgentController = require_agent_controller.AgentController;
|
|
6
6
|
exports.MODEL_PERSISTENCE_VERSION = require_agent_controller.MODEL_PERSISTENCE_VERSION;
|
|
7
7
|
exports.MODEL_PERSISTENCE_VERSION_KEY = require_agent_controller.MODEL_PERSISTENCE_VERSION_KEY;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { f as taskCheckTool, h as taskWriteTool, m as taskUpdateTool, o as assignTaskIds, p as taskCompleteTool } from "../state-processor-B_KsS82m.js";
|
|
2
2
|
import { o as askUserTool, t as submitPlanTool } from "../tools-FwJyNoyg.js";
|
|
3
|
-
import { a as Session, c as defaultDisplayState, d as SessionStartupCancelledError, f as isSessionNotStartedError, i as MODEL_PERSISTENCE_VERSION_KEY, l as defaultOMProgressState, n as parseSubagentMeta, o as getSuspensionAddressKey, p as isSessionStartupCancelledError, r as MODEL_PERSISTENCE_VERSION, s as migratePersistedModelSelection, t as AgentController, u as SessionNotStartedError } from "../agent-controller-
|
|
3
|
+
import { a as Session, c as defaultDisplayState, d as SessionStartupCancelledError, f as isSessionNotStartedError, i as MODEL_PERSISTENCE_VERSION_KEY, l as defaultOMProgressState, n as parseSubagentMeta, o as getSuspensionAddressKey, p as isSessionStartupCancelledError, r as MODEL_PERSISTENCE_VERSION, s as migratePersistedModelSelection, t as AgentController, u as SessionNotStartedError } from "../agent-controller-CQDCmsFD.js";
|
|
4
4
|
export { AgentController, MODEL_PERSISTENCE_VERSION, MODEL_PERSISTENCE_VERSION_KEY, Session, SessionNotStartedError, SessionStartupCancelledError, askUserTool, assignTaskIds, defaultDisplayState, defaultOMProgressState, getSuspensionAddressKey, isSessionNotStartedError, isSessionStartupCancelledError, migratePersistedModelSelection, parseSubagentMeta, submitPlanTool, taskCheckTool, taskCompleteTool, taskUpdateTool, taskWriteTool };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Ca as validateStorageMetadataFilter, H as MessagePartSpans, T as Agent, U as isSpanChunk, Xr as InMemoryMemory, a as AGENTIC_EXECUTION_WORKFLOW_ID, bc as DurableStepIds, i as agentThreadStreamRuntime, kn as CHAT_CHANNEL_RENDER_CONTEXT_KEY, lu as CONTROLLER_RUN_BINDING_KEY, o as AGENTIC_LOOP_WORKFLOW_ID, r as AgentThreadLeaseLostError, s as describeNonSuccessFinishReason, uu as restoredWorkerControllerContexts, xt as getServerSideFallbackInfo } from "./execution-fence
|
|
1
|
+
import { Ca as validateStorageMetadataFilter, H as MessagePartSpans, T as Agent, U as isSpanChunk, Xr as InMemoryMemory, a as AGENTIC_EXECUTION_WORKFLOW_ID, bc as DurableStepIds, i as agentThreadStreamRuntime, kn as CHAT_CHANNEL_RENDER_CONTEXT_KEY, lu as CONTROLLER_RUN_BINDING_KEY, o as AGENTIC_LOOP_WORKFLOW_ID, r as AgentThreadLeaseLostError, s as describeNonSuccessFinishReason, uu as restoredWorkerControllerContexts, xt as getServerSideFallbackInfo } from "./execution-fence-DGFyUV5h.js";
|
|
2
2
|
import { n as MessageList } from "./message-list-RgFlLrxG.js";
|
|
3
3
|
import { c as isUserAuthoredMessage, n as createSignal, u as resolveDeliveryAttributes } from "./signals-CqR_iWkg.js";
|
|
4
4
|
import { i as MastraFGAPermissions } from "./ee-iTj2bRDt-By_B9ngH.js";
|
|
5
|
-
import { a as AgentControllerChannels } from "./channels-
|
|
6
|
-
import { a as ModelRouterLanguageModel, l as defaultGateways, s as GatewayManager } from "./llm-
|
|
7
|
-
import { t as Mastra } from "./mastra-
|
|
8
|
-
import { qt as TITLE_PINNED_THREAD_METADATA_KEY, zn as createRunScopeKey } from "./stream-
|
|
5
|
+
import { a as AgentControllerChannels } from "./channels-BQ--aLCA.js";
|
|
6
|
+
import { a as ModelRouterLanguageModel, l as defaultGateways, s as GatewayManager } from "./llm-YNjDFSui.js";
|
|
7
|
+
import { t as Mastra } from "./mastra-BJ54VxOO.js";
|
|
8
|
+
import { qt as TITLE_PINNED_THREAD_METADATA_KEY, zn as createRunScopeKey } from "./stream-H_wVxqdK.js";
|
|
9
9
|
import { c as MASTRA_THREAD_ID_KEY, i as MASTRA_MESSAGE_AUTHOR_KEY, o as MASTRA_RESOURCE_ID_KEY, u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
10
10
|
import { n as resolveDynamicArgument } from "./dynamic-argument-BzPK3qPN.js";
|
|
11
11
|
import { i as MastraError, o as getErrorFromUnknown } from "./error-oh2DLsP2.js";
|
|
12
12
|
import { toStandardSchema } from "./schema/index.js";
|
|
13
13
|
import { safeStringify } from "./utils/safe-stringify.js";
|
|
14
14
|
import { c as Workspace, h as createWorkspaceTools } from "./workspace-sqcfdZRR.js";
|
|
15
|
-
import { S as isLeaseProvider } from "./output-helpers-
|
|
15
|
+
import { S as isLeaseProvider } from "./output-helpers-D-qplq22.js";
|
|
16
16
|
import { omEventFromChunk } from "./memory/om-events/index.js";
|
|
17
17
|
import { o as askUserTool, t as submitPlanTool } from "./tools-FwJyNoyg.js";
|
|
18
18
|
import { n as hasTransformedToolPayload, t as getTransformedToolPayload } from "./payload-transform-Dj3HUeD4.js";
|
|
@@ -5480,16 +5480,17 @@ var Session = class {
|
|
|
5480
5480
|
if (error instanceof MastraError && error.id === "AGENT_LIST_SUSPENDED_RUNS_NO_STORAGE") return;
|
|
5481
5481
|
throw error;
|
|
5482
5482
|
}
|
|
5483
|
+
if (this.thread.getId() !== threadId) return;
|
|
5483
5484
|
for (const run of runs) for (const call of run.toolCalls) {
|
|
5484
5485
|
const { toolCallId, toolName } = call;
|
|
5485
5486
|
if (!call.requiresApproval || !toolCallId || !toolName) continue;
|
|
5486
5487
|
const key = address(run.runId, toolCallId);
|
|
5487
5488
|
if (handled.has(key) || this.#answeredParkedApprovals.has(key)) continue;
|
|
5489
|
+
if (this.thread.getId() !== threadId) return;
|
|
5488
5490
|
const policy = this.resolveToolApproval(toolName, threadId);
|
|
5489
5491
|
if (policy === "ask") continue;
|
|
5490
5492
|
if (policy === "allow" && !this.#savedRulesAllow(toolName)) continue;
|
|
5491
5493
|
handled.add(key);
|
|
5492
|
-
this.#answeredParkedApprovals.add(key);
|
|
5493
5494
|
const identity = {
|
|
5494
5495
|
toolCallId,
|
|
5495
5496
|
runId: run.runId,
|
|
@@ -5497,8 +5498,13 @@ var Session = class {
|
|
|
5497
5498
|
resourceId: this.identity.getResourceId(),
|
|
5498
5499
|
requestContext: this.#parkedApprovalsRequestContext
|
|
5499
5500
|
};
|
|
5500
|
-
|
|
5501
|
-
|
|
5501
|
+
try {
|
|
5502
|
+
if (policy === "allow") await this.approveToolCall(identity);
|
|
5503
|
+
else await this.declineToolCall(identity);
|
|
5504
|
+
this.#answeredParkedApprovals.add(key);
|
|
5505
|
+
} catch (error) {
|
|
5506
|
+
console.error("Re-checking a parked tool approval against the current policy failed:", error);
|
|
5507
|
+
}
|
|
5502
5508
|
}
|
|
5503
5509
|
}
|
|
5504
5510
|
/**
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
const require_execution_fence = require("./execution-fence-
|
|
1
|
+
const require_execution_fence = require("./execution-fence-C8Q0wWkG.cjs");
|
|
2
2
|
const require_message_list = require("./message-list-C0F2sDNC.cjs");
|
|
3
3
|
const require_signals = require("./signals-CWxAMEmE.cjs");
|
|
4
4
|
const require_ee_iTj2bRDt = require("./ee-iTj2bRDt-D3-QLGDF.cjs");
|
|
5
|
-
const require_channels = require("./channels-
|
|
6
|
-
const require_llm = require("./llm-
|
|
7
|
-
const require_mastra = require("./mastra-
|
|
8
|
-
const require_stream = require("./stream-
|
|
5
|
+
const require_channels = require("./channels-CTCBsS5M.cjs");
|
|
6
|
+
const require_llm = require("./llm-RIAYOAtD.cjs");
|
|
7
|
+
const require_mastra = require("./mastra-B2-HBq1-.cjs");
|
|
8
|
+
const require_stream = require("./stream-DqKDB3nL.cjs");
|
|
9
9
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
10
10
|
const require_dynamic_argument = require("./dynamic-argument-CUc1BBOS.cjs");
|
|
11
11
|
const require_error = require("./error-D90lJ6M7.cjs");
|
|
12
12
|
const require_utils_safe_stringify = require("./utils/safe-stringify.cjs");
|
|
13
13
|
const require_workspace = require("./workspace-BQD4tcQi.cjs");
|
|
14
|
-
const require_output_helpers = require("./output-helpers-
|
|
14
|
+
const require_output_helpers = require("./output-helpers-D4O_oFne.cjs");
|
|
15
15
|
const require_memory_om_events_index = require("./memory/om-events/index.cjs");
|
|
16
16
|
const require_tools = require("./tools-DZoVfKPl.cjs");
|
|
17
17
|
const require_payload_transform = require("./payload-transform-CWgnsO9w.cjs");
|
|
@@ -5480,16 +5480,17 @@ var Session = class {
|
|
|
5480
5480
|
if (error instanceof require_error.MastraError && error.id === "AGENT_LIST_SUSPENDED_RUNS_NO_STORAGE") return;
|
|
5481
5481
|
throw error;
|
|
5482
5482
|
}
|
|
5483
|
+
if (this.thread.getId() !== threadId) return;
|
|
5483
5484
|
for (const run of runs) for (const call of run.toolCalls) {
|
|
5484
5485
|
const { toolCallId, toolName } = call;
|
|
5485
5486
|
if (!call.requiresApproval || !toolCallId || !toolName) continue;
|
|
5486
5487
|
const key = address(run.runId, toolCallId);
|
|
5487
5488
|
if (handled.has(key) || this.#answeredParkedApprovals.has(key)) continue;
|
|
5489
|
+
if (this.thread.getId() !== threadId) return;
|
|
5488
5490
|
const policy = this.resolveToolApproval(toolName, threadId);
|
|
5489
5491
|
if (policy === "ask") continue;
|
|
5490
5492
|
if (policy === "allow" && !this.#savedRulesAllow(toolName)) continue;
|
|
5491
5493
|
handled.add(key);
|
|
5492
|
-
this.#answeredParkedApprovals.add(key);
|
|
5493
5494
|
const identity = {
|
|
5494
5495
|
toolCallId,
|
|
5495
5496
|
runId: run.runId,
|
|
@@ -5497,8 +5498,13 @@ var Session = class {
|
|
|
5497
5498
|
resourceId: this.identity.getResourceId(),
|
|
5498
5499
|
requestContext: this.#parkedApprovalsRequestContext
|
|
5499
5500
|
};
|
|
5500
|
-
|
|
5501
|
-
|
|
5501
|
+
try {
|
|
5502
|
+
if (policy === "allow") await this.approveToolCall(identity);
|
|
5503
|
+
else await this.declineToolCall(identity);
|
|
5504
|
+
this.#answeredParkedApprovals.add(key);
|
|
5505
|
+
} catch (error) {
|
|
5506
|
+
console.error("Re-checking a parked tool approval against the current policy failed:", error);
|
|
5507
|
+
}
|
|
5502
5508
|
}
|
|
5503
5509
|
}
|
|
5504
5510
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_background_tasks = require("../background-tasks-
|
|
2
|
+
const require_background_tasks = require("../background-tasks-CeARf1DK.cjs");
|
|
3
3
|
exports.BACKGROUND_TASK_WORKFLOW_ID = require_background_tasks.BACKGROUND_TASK_WORKFLOW_ID;
|
|
4
4
|
exports.BackgroundTaskManager = require_background_tasks.BackgroundTaskManager;
|
|
5
5
|
exports.backgroundOverrideJsonSchema = require_background_tasks.backgroundOverrideJsonSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { u as BACKGROUND_TASK_WORKFLOW_ID, l as BackgroundTaskManager, n as backgroundOverrideJsonSchema, r as backgroundOverrideZodSchema, c as createBackgroundTask, t as generateBackgroundTaskSystemPrompt, i as isModelBackgroundOverrideAllowed, a as isToolBackgroundEligible, o as resolveBackgroundConfig } from "../background-tasks-
|
|
1
|
+
export { u as BACKGROUND_TASK_WORKFLOW_ID, l as BackgroundTaskManager, n as backgroundOverrideJsonSchema, r as backgroundOverrideZodSchema, c as createBackgroundTask, t as generateBackgroundTaskSystemPrompt, i as isModelBackgroundOverrideAllowed, a as isToolBackgroundEligible, o as resolveBackgroundConfig } from "../background-tasks-B7UygDdO.js";
|
|
@@ -249,7 +249,7 @@ var BackgroundTaskManager = class {
|
|
|
249
249
|
if (handled) await ack?.();
|
|
250
250
|
};
|
|
251
251
|
if (this.#mastra) {
|
|
252
|
-
const { buildBackgroundTaskWorkflow } = await import("./workflow-
|
|
252
|
+
const { buildBackgroundTaskWorkflow } = await import("./workflow-DamOke3z.js");
|
|
253
253
|
const workflow = buildBackgroundTaskWorkflow(this);
|
|
254
254
|
if (!this.#mastra.__hasInternalWorkflow("__background-task")) this.#mastra.__registerInternalWorkflow(workflow);
|
|
255
255
|
}
|
|
@@ -249,7 +249,7 @@ var BackgroundTaskManager = class {
|
|
|
249
249
|
if (handled) await ack?.();
|
|
250
250
|
};
|
|
251
251
|
if (this.#mastra) {
|
|
252
|
-
const { buildBackgroundTaskWorkflow } = await Promise.resolve().then(() => require("./workflow-
|
|
252
|
+
const { buildBackgroundTaskWorkflow } = await Promise.resolve().then(() => require("./workflow-DXE15e-w.cjs"));
|
|
253
253
|
const workflow = buildBackgroundTaskWorkflow(this);
|
|
254
254
|
if (!this.#mastra.__hasInternalWorkflow("__background-task")) this.#mastra.__registerInternalWorkflow(workflow);
|
|
255
255
|
}
|
package/dist/browser/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_logger = require("../logger-CvzZYuJd.cjs");
|
|
4
|
-
const require_stream = require("../stream-
|
|
4
|
+
const require_stream = require("../stream-DqKDB3nL.cjs");
|
|
5
5
|
const require_tool = require("../tool-Dn9WSDVn.cjs");
|
|
6
6
|
const require_workspace = require("../workspace-BQD4tcQi.cjs");
|
|
7
7
|
let os = require("os");
|
package/dist/browser/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as MastraBase } from "../base-CKLWBhDo.js";
|
|
2
2
|
import { a as RegisteredLogger } from "../logger-BwbmRqfc.js";
|
|
3
|
-
import { Zt as parseMemoryRequestContext, ln as isProcessorWorkflow } from "../stream-
|
|
3
|
+
import { Zt as parseMemoryRequestContext, ln as isProcessorWorkflow } from "../stream-H_wVxqdK.js";
|
|
4
4
|
import { r as createTool } from "../tool-DIFduuTw.js";
|
|
5
5
|
import { D as BrowserCliHandler, O as browserCliHandler } from "../workspace-sqcfdZRR.js";
|
|
6
6
|
import { hostname } from "os";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as validateDynamicWorkflow, s as inferGraphSchemas, u as schemaCompatibility } from "./validate-
|
|
1
|
+
import { n as validateDynamicWorkflow, s as inferGraphSchemas, u as schemaCompatibility } from "./validate-DQB9spZ1.js";
|
|
2
2
|
import { _ as validateCron } from "./schedules-DZfSx-7P.js";
|
|
3
|
-
import { T as Agent } from "./execution-fence
|
|
3
|
+
import { T as Agent } from "./execution-fence-DGFyUV5h.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
// src/workflows/builder/authoring-playbook.ts
|
|
6
6
|
const WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS = `# Persisted workflow authoring contract
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_validate = require("./validate-
|
|
1
|
+
const require_validate = require("./validate-u6_TUYSo.cjs");
|
|
2
2
|
const require_schedules = require("./schedules-BZS8McF7.cjs");
|
|
3
|
-
const require_execution_fence = require("./execution-fence-
|
|
3
|
+
const require_execution_fence = require("./execution-fence-C8Q0wWkG.cjs");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
// src/workflows/builder/authoring-playbook.ts
|
|
6
6
|
const WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS = `# Persisted workflow authoring contract
|