@mastra/core 1.86.0-alpha.7 → 1.86.0-alpha.9
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_core@0.1.4/dist/knowledge-compat/index.d.ts +363 -0
- package/dist/a2a/index.cjs +1 -1
- package/dist/a2a/index.js +1 -1
- package/dist/agent/agent.d.ts +72 -1
- package/dist/agent/agent.types.d.ts +30 -2
- package/dist/agent/durable/create-evented-agent.d.ts +6 -0
- package/dist/agent/durable/durable-agent.d.ts +1 -15
- package/dist/agent/durable/index.cjs +7 -26
- package/dist/agent/durable/index.js +7 -26
- package/dist/agent/durable/preparation.d.ts +2 -0
- package/dist/agent/durable/utils/resolve-runtime.d.ts +9 -0
- package/dist/agent/durable/workflows/durable-loop-builder.d.ts +4 -0
- package/dist/agent/durable/workflows/finalize-run.d.ts +3 -1
- package/dist/agent/durable/workflows/steps/llm-execution.d.ts +1 -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/message-list.d.ts +11 -0
- package/dist/agent/message-list/utils/provider-compat.d.ts +1 -0
- package/dist/agent/request-context-snapshot.d.ts +1 -1
- package/dist/agent/streams/types.d.ts +10 -0
- package/dist/agent/thread-stream-runtime.d.ts +5 -0
- package/dist/agent/types.d.ts +25 -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-K5vHtqfO.cjs → agent-controller-CrQ9OF80.cjs} +8 -8
- package/dist/{agent-controller-Cf3_IuY8.js → agent-controller-SSlKzE6A.js} +8 -8
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-DqnQMfuf.cjs → background-tasks-BDrYBis-.cjs} +5 -3
- package/dist/{background-tasks-BgpX1P_s.js → background-tasks-BnJfNLFo.js} +5 -3
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.js +2 -2
- package/dist/{builder-x295GDL6.js → builder-Cl-0BWkh.js} +2 -2
- package/dist/{builder-D8Osghdo.cjs → builder-Cw8u3pPl.cjs} +2 -2
- package/dist/capabilities/302ai.json +192 -192
- package/dist/capabilities/abliteratedllm.json +34 -34
- package/dist/capabilities/abliteration-ai.json +11 -11
- package/dist/capabilities/above.json +17 -17
- package/dist/capabilities/adaption.json +12 -12
- package/dist/capabilities/adzuki.json +30 -30
- package/dist/capabilities/agentrouter.json +10 -10
- package/dist/capabilities/agnes.json +4 -4
- package/dist/capabilities/ai-router.json +9 -9
- package/dist/capabilities/aiand.json +19 -11
- package/dist/capabilities/aigrow.json +11 -11
- package/dist/capabilities/aimlapi.json +146 -149
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +14 -14
- package/dist/capabilities/aki-io.json +11 -11
- package/dist/capabilities/alibaba-cn.json +128 -109
- package/dist/capabilities/alibaba-coding-plan-cn.json +7 -19
- package/dist/capabilities/alibaba-coding-plan.json +7 -19
- package/dist/capabilities/alibaba-token-plan-cn.json +49 -67
- package/dist/capabilities/alibaba-token-plan.json +51 -69
- package/dist/capabilities/alibaba.json +71 -118
- package/dist/capabilities/ambient.json +14 -14
- package/dist/capabilities/amd.json +11 -11
- package/dist/capabilities/anthropic.json +48 -48
- package/dist/capabilities/anyapi.json +18 -18
- package/dist/capabilities/apiko.json +2 -2
- package/dist/capabilities/arcee.json +10 -10
- package/dist/capabilities/augure.json +6 -6
- package/dist/capabilities/auriko.json +20 -20
- package/dist/capabilities/bailing.json +5 -5
- package/dist/capabilities/baseten.json +46 -16
- package/dist/capabilities/bee.json +5 -5
- package/dist/capabilities/berget.json +4 -4
- package/dist/capabilities/bothub.json +16 -16
- package/dist/capabilities/boundless.json +36 -36
- package/dist/capabilities/bumo.json +40 -40
- package/dist/capabilities/byteplus.json +32 -32
- package/dist/capabilities/cerebras.json +4 -4
- package/dist/capabilities/cheapaimodel.json +5 -5
- package/dist/capabilities/cheapest-token.json +24 -24
- package/dist/capabilities/chutes.json +9 -9
- package/dist/capabilities/cline-pass.json +37 -37
- package/dist/capabilities/cloudcode.json +4 -4
- package/dist/capabilities/cloudflare-workers-ai.json +24 -24
- package/dist/capabilities/commandcode.json +152 -152
- package/dist/capabilities/concentrate.json +290 -266
- package/dist/capabilities/cortecs.json +105 -105
- package/dist/capabilities/crossmodel.json +160 -160
- package/dist/capabilities/crusoe.json +10 -10
- package/dist/capabilities/daoxe.json +7 -7
- package/dist/capabilities/databricks.json +318 -62
- package/dist/capabilities/deepinfra.json +73 -129
- package/dist/capabilities/deepseek.json +2 -2
- package/dist/capabilities/digitalocean.json +114 -114
- package/dist/capabilities/dothoosh.json +28 -28
- package/dist/capabilities/doubleword.json +24 -24
- package/dist/capabilities/edenai.json +458 -458
- package/dist/capabilities/empiriolabs.json +166 -166
- package/dist/capabilities/engy.json +20 -20
- package/dist/capabilities/evroc.json +8 -8
- package/dist/capabilities/ezkielyna.json +8 -8
- package/dist/capabilities/fastrouter.json +85 -85
- package/dist/capabilities/fireworks-ai.json +107 -44
- package/dist/capabilities/freemodel.json +23 -23
- package/dist/capabilities/friendli.json +9 -9
- package/dist/capabilities/frogbot.json +94 -94
- package/dist/capabilities/gisoo.json +16 -16
- package/dist/capabilities/gmicloud.json +17 -17
- package/dist/capabilities/google.json +57 -57
- package/dist/capabilities/graphn.json +10 -10
- package/dist/capabilities/greenpt.json +36 -36
- package/dist/capabilities/groq.json +2 -2
- package/dist/capabilities/helicone.json +68 -68
- package/dist/capabilities/hopper.json +2 -2
- package/dist/capabilities/hostinger-router.json +12 -12
- package/dist/capabilities/hpc-ai.json +13 -13
- package/dist/capabilities/huawei-maas.json +17 -17
- package/dist/capabilities/hubris.json +30 -30
- package/dist/capabilities/huggingface.json +193 -37
- package/dist/capabilities/hyper.json +23 -23
- package/dist/capabilities/impossibl.json +140 -140
- package/dist/capabilities/inception.json +2 -2
- package/dist/capabilities/inceptron.json +4 -4
- package/dist/capabilities/inco.json +3 -3
- package/dist/capabilities/infer.json +15 -15
- package/dist/capabilities/inferall.json +10 -10
- package/dist/capabilities/inference-coop.json +9 -9
- package/dist/capabilities/inferenceapis.json +9 -9
- package/dist/capabilities/inferris.json +3 -3
- package/dist/capabilities/infersia.json +2 -2
- package/dist/capabilities/inferx.json +3 -3
- package/dist/capabilities/infomaniak.json +4 -4
- package/dist/capabilities/io-net.json +2 -2
- package/dist/capabilities/isoquant.json +4 -4
- package/dist/capabilities/iteracompute.json +60 -60
- package/dist/capabilities/jad-ai.json +3 -3
- package/dist/capabilities/jalapeno.json +12 -12
- package/dist/capabilities/jiekou.json +63 -63
- package/dist/capabilities/jzstoken.json +50 -50
- package/dist/capabilities/keln.json +14 -21
- package/dist/capabilities/kenari.json +123 -120
- package/dist/capabilities/kilo.json +622 -647
- package/dist/capabilities/kimi-code-plan-cn.json +5 -5
- package/dist/capabilities/kimi-code-plan-global.json +5 -5
- package/dist/capabilities/kitani.json +6 -6
- package/dist/capabilities/klavo.json +18 -18
- package/dist/capabilities/korouter.json +29 -29
- package/dist/capabilities/kunavo.json +10 -10
- package/dist/capabilities/liquid.json +11 -11
- package/dist/capabilities/lithosai.json +2 -2
- package/dist/capabilities/llmgateway-providers.json +932 -905
- package/dist/capabilities/llmgateway.json +336 -336
- package/dist/capabilities/llmtr.json +22 -22
- package/dist/capabilities/logits.json +2 -2
- package/dist/capabilities/longcat.json +2 -7
- package/dist/capabilities/lowrouter.json +54 -54
- package/dist/capabilities/lyceum.json +12 -12
- package/dist/capabilities/melious.json +13 -13
- package/dist/capabilities/merge-gateway.json +260 -260
- package/dist/capabilities/meta.json +7 -7
- package/dist/capabilities/mistral.json +20 -20
- package/dist/capabilities/mixlayer.json +4 -4
- package/dist/capabilities/modal.json +10 -10
- package/dist/capabilities/model-oracle-ai.json +25 -25
- package/dist/capabilities/modelis.json +20 -20
- package/dist/capabilities/modular.json +6 -6
- package/dist/capabilities/moneo.json +16 -16
- package/dist/capabilities/moonshotai-cn.json +7 -7
- package/dist/capabilities/moonshotai.json +7 -7
- package/dist/capabilities/morph.json +11 -11
- package/dist/capabilities/munito-eu.json +6 -6
- package/dist/capabilities/munito.json +6 -6
- package/dist/capabilities/nan.json +27 -27
- package/dist/capabilities/nano-gpt.json +578 -578
- package/dist/capabilities/nearai.json +84 -84
- package/dist/capabilities/nebius.json +37 -28
- package/dist/capabilities/neon.json +126 -126
- package/dist/capabilities/neuralwatt.json +41 -41
- package/dist/capabilities/nokeep.json +4 -4
- package/dist/capabilities/novita-ai.json +154 -154
- package/dist/capabilities/nvidia.json +35 -35
- package/dist/capabilities/oathbreaker.json +2 -2
- package/dist/capabilities/obscurify.json +32 -32
- package/dist/capabilities/oci.json +7 -7
- package/dist/capabilities/ofox.json +357 -357
- package/dist/capabilities/ollama-cloud.json +56 -56
- package/dist/capabilities/openai.json +51 -51
- package/dist/capabilities/opencode-go.json +85 -84
- package/dist/capabilities/openrouter.json +542 -567
- package/dist/capabilities/opper.json +30 -24
- package/dist/capabilities/orcarouter.json +236 -236
- package/dist/capabilities/outerlabs.json +32 -32
- package/dist/capabilities/ovhcloud.json +7 -7
- package/dist/capabilities/pareto.json +6 -6
- package/dist/capabilities/pendra.json +4 -4
- package/dist/capabilities/perplexity-agent.json +61 -61
- package/dist/capabilities/phala.json +34 -34
- package/dist/capabilities/pioneer.json +30 -30
- package/dist/capabilities/poe.json +136 -136
- package/dist/capabilities/powerspring.json +13 -13
- package/dist/capabilities/primalabs.json +10 -10
- package/dist/capabilities/prime.json +124 -107
- package/dist/capabilities/privatemode-ai.json +14 -14
- package/dist/capabilities/proxystacks.json +6 -6
- package/dist/capabilities/qiniu-ai.json +16 -16
- package/dist/capabilities/refuseless.json +6 -6
- package/dist/capabilities/regolo-ai.json +6 -6
- package/dist/capabilities/requesty.json +172 -172
- package/dist/capabilities/ruapi.json +17 -17
- package/dist/capabilities/runcrate.json +5 -5
- package/dist/capabilities/runinfra.json +13 -13
- package/dist/capabilities/sakana.json +6 -6
- package/dist/capabilities/sambanova.json +9 -9
- package/dist/capabilities/sandbase.json +27 -27
- package/dist/capabilities/sarvam.json +12 -12
- package/dist/capabilities/scaleway.json +14 -14
- package/dist/capabilities/scnet-token-plan.json +9 -9
- package/dist/capabilities/scx-ai.json +26 -26
- package/dist/capabilities/sensenova.json +12 -12
- package/dist/capabilities/siliconflow-cn.json +49 -49
- package/dist/capabilities/siliconflow.json +46 -46
- package/dist/capabilities/snowflake-cortex.json +20 -20
- package/dist/capabilities/sokkan.json +7 -7
- package/dist/capabilities/sparrowcodes.json +25 -25
- package/dist/capabilities/standardcompute.json +102 -102
- package/dist/capabilities/steadyrouter.json +40 -40
- package/dist/capabilities/stepfun-ai-step-plan.json +6 -6
- package/dist/capabilities/stepfun-ai.json +15 -8
- package/dist/capabilities/stepfun-step-plan.json +15 -8
- package/dist/capabilities/stepfun.json +15 -8
- package/dist/capabilities/stepping-stone.json +16 -16
- package/dist/capabilities/synthetic.json +13 -13
- package/dist/capabilities/synthorai.json +19 -19
- package/dist/capabilities/teamorouter.json +24 -24
- package/dist/capabilities/teapot-router.json +13 -13
- package/dist/capabilities/tencent-coding-plan.json +1 -23
- package/dist/capabilities/tencent-token-plan.json +60 -23
- package/dist/capabilities/tencent-tokenhub.json +182 -7
- package/dist/capabilities/tensorx.json +50 -50
- package/dist/capabilities/tenstorrent.json +6 -6
- package/dist/capabilities/the-grid-ai.json +28 -28
- package/dist/capabilities/thinkingmachines.json +72 -55
- package/dist/capabilities/tinfoil.json +13 -13
- package/dist/capabilities/toapis.json +2 -2
- package/dist/capabilities/togetherai.json +54 -83
- package/dist/capabilities/tokengo.json +25 -25
- package/dist/capabilities/tokenify.json +9 -9
- package/dist/capabilities/trustedrouter.json +4 -4
- package/dist/capabilities/trustedtokens.json +17 -17
- package/dist/capabilities/umans-ai-coding-plan.json +13 -13
- package/dist/capabilities/umans-ai.json +10 -10
- package/dist/capabilities/unrestricted.json +6 -6
- package/dist/capabilities/uplinkswitch.json +21 -21
- package/dist/capabilities/upstage.json +4 -4
- package/dist/capabilities/vancine.json +23 -23
- package/dist/capabilities/vercel.json +540 -527
- package/dist/capabilities/vivgrid.json +80 -80
- package/dist/capabilities/volcengine-coding-plan.json +24 -54
- package/dist/capabilities/volcengine.json +55 -60
- package/dist/capabilities/vultr.json +24 -24
- 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 +24 -24
- package/dist/capabilities/xai.json +7 -7
- package/dist/capabilities/xiaomi-token-plan-ams.json +2 -12
- package/dist/capabilities/xiaomi-token-plan-cn.json +2 -12
- package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -12
- package/dist/capabilities/xiaomi.json +3 -25
- package/dist/capabilities/xpersona.json +13 -13
- package/dist/capabilities/xxapi.json +31 -31
- package/dist/capabilities/zai-coding-plan.json +18 -18
- package/dist/capabilities/zai.json +49 -26
- package/dist/capabilities/zenifra.json +26 -26
- package/dist/capabilities/zenmux.json +205 -205
- package/dist/capabilities/zerogpu.json +11 -11
- package/dist/capabilities/zhipuai-coding-plan.json +6 -6
- package/dist/capabilities/zhipuai.json +39 -24
- package/dist/capabilities/zro.json +6 -6
- package/dist/channels/index.cjs +2 -2
- package/dist/channels/index.js +2 -2
- package/dist/{channels-Dx4jiXeK.js → channels-Cz1y3W6u.js} +1 -1
- package/dist/{channels-q6qnuRNV.cjs → channels-DQg4v_gm.cjs} +1 -1
- package/dist/coding-agent/index.cjs +2 -2
- package/dist/coding-agent/index.js +2 -2
- package/dist/datasets/dataset.d.ts +13 -6
- package/dist/datasets/experiment/durable.d.ts +16 -0
- package/dist/datasets/experiment/index.d.ts +2 -1
- package/dist/datasets/experiment/item.d.ts +26 -4
- package/dist/datasets/experiment/retries.d.ts +18 -0
- package/dist/datasets/experiment/types.d.ts +18 -0
- package/dist/datasets/experiment/workflow-id.d.ts +7 -0
- package/dist/datasets/experiment/workflow.d.ts +74 -0
- package/dist/datasets/index.cjs +3 -2
- package/dist/datasets/index.d.ts +2 -1
- package/dist/datasets/index.js +3 -3
- package/dist/docs/SKILL.md +4 -3
- package/dist/docs/assets/SOURCE_MAP.json +928 -903
- package/dist/docs/references/docs-deployment-workers.md +1 -1
- package/dist/docs/references/docs-evals-experiments.md +29 -1
- package/dist/docs/references/docs-harness-background-tasks.md +4 -1
- package/dist/docs/references/docs-harness-durable-agents.md +9 -5
- package/dist/docs/references/docs-knowledge-agents-and-tools.md +1 -0
- package/dist/docs/references/docs-knowledge-importers.md +195 -0
- package/dist/docs/references/docs-knowledge-load-your-content.md +2 -2
- package/dist/docs/references/docs-knowledge-overview.md +1 -1
- package/dist/docs/references/docs-mastra-platform-observability-overview.md +1 -1
- package/dist/docs/references/docs-sandbox-filesystem.md +1 -1
- package/dist/docs/references/docs-server-pubsub.md +51 -8
- package/dist/docs/references/docs-signals-running-across-processes.md +2 -0
- package/dist/docs/references/docs-signals-thread-streams.md +1 -1
- package/dist/docs/references/docs-studio-auth.md +54 -7
- package/dist/docs/references/docs-workflows-overview.md +1 -1
- package/dist/docs/references/docs-workflows-scheduled-workflows.md +1 -1
- package/dist/docs/references/integrations-auth-clerk.md +48 -4
- package/dist/docs/references/integrations-channels-slack.md +4 -2
- package/dist/docs/references/integrations.md +6 -0
- package/dist/docs/references/reference-agents-agent.md +3 -1
- package/dist/docs/references/reference-agents-channels.md +116 -27
- package/dist/docs/references/reference-agents-durable-agent.md +12 -4
- package/dist/docs/references/reference-auth-clerk.md +21 -1
- package/dist/docs/references/reference-datasets-runExperimentItem.md +13 -1
- package/dist/docs/references/reference-datasets-startExperimentAsync.md +3 -1
- package/dist/docs/references/reference-editor-mastra-editor.md +3 -1
- package/dist/docs/references/reference-knowledge-knowledge-class.md +13 -6
- package/dist/docs/references/reference-knowledge-knowledge-tools.md +43 -20
- package/dist/docs/references/reference-memory-observational-memory.md +2 -2
- package/dist/docs/references/reference-processors-moderation-processor.md +2 -2
- package/dist/docs/references/reference-pubsub-base.md +5 -1
- package/dist/docs/references/reference-pubsub-event-emitter.md +2 -0
- package/dist/docs/references/reference-pubsub-redis-streams.md +1 -1
- package/dist/docs/references/reference-pubsub-unix-socket-pubsub.md +2 -0
- package/dist/docs/references/reference-streaming-ChunkType.md +3 -3
- package/dist/docs/references/reference-workers-overview.md +1 -1
- package/dist/docs/references/reference-workflows-run-methods-start.md +23 -0
- package/dist/docs/references/reference-workflows-run-methods-timeTravel.md +4 -0
- package/dist/docs/references/reference-workflows-run.md +1 -1
- package/dist/docs/references/reference-workspace-local-sandbox.md +2 -0
- package/dist/error/index.cjs +1 -1
- package/dist/error/index.js +1 -1
- package/dist/{error-C9d_24w-.js → error-BLwEXqOK.js} +2 -2
- package/dist/{error-BRQf2ku0.cjs → error-BdEvO8za.cjs} +2 -2
- 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 +1 -0
- package/dist/events/event-emitter/index.d.ts +12 -5
- package/dist/events/index.cjs +15 -1
- package/dist/events/index.js +15 -1
- package/dist/events/pubsub.d.ts +29 -0
- package/dist/events/reach.d.ts +11 -0
- package/dist/events/unix-socket-pubsub.d.ts +14 -0
- package/dist/features/index.cjs +1 -0
- package/dist/features/index.js +1 -0
- package/dist/{filesystem-B5X-5G0x.js → filesystem-B8ad6kAW.js} +1 -1
- package/dist/{filesystem-BDSpwBke.cjs → filesystem-BB5YWXH-.cjs} +1 -1
- package/dist/{filesystem-DzM9pcQ8.js → filesystem-BDHUxbHn.js} +1 -1
- package/dist/{filesystem-B0AZrbj8.cjs → filesystem-BP5yz5LG.cjs} +1 -1
- package/dist/{filesystem-BsdkC311.js → filesystem-B_afSgYk.js} +1 -1
- package/dist/{filesystem-C-cyJfi1.cjs → filesystem-BaOJOc-V.cjs} +1 -1
- package/dist/{filesystem-B3s0WRud.js → filesystem-BhYgU8qg.js} +1 -1
- package/dist/{filesystem-DzfqVTO_.js → filesystem-CLBVmR5j.js} +1 -1
- package/dist/{filesystem-CEbD_77-.cjs → filesystem-Cgxc2a_-.cjs} +1 -1
- package/dist/{filesystem-Cv79mHRk.js → filesystem-ClBOBoDc.js} +1 -1
- package/dist/{filesystem-DsCQiBl2.cjs → filesystem-DVVecqZt.cjs} +1 -1
- package/dist/{filesystem-CUAgLugE.cjs → filesystem-Fpsu7e24.cjs} +1 -1
- package/dist/{filesystem-versioned-Bijb_p9l.js → filesystem-versioned-BL1ojJLo.js} +1 -1
- package/dist/{filesystem-versioned-DZGyPbNC.cjs → filesystem-versioned-BavRtYWJ.cjs} +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/config.d.ts +10 -0
- package/dist/knowledge/host-writes.d.ts +10 -0
- package/dist/knowledge/importers/conformance.d.ts +25 -0
- package/dist/knowledge/importers/define.d.ts +204 -0
- package/dist/knowledge/importers/host.d.ts +143 -0
- package/dist/knowledge/importers/index.d.ts +12 -0
- package/dist/knowledge/importers/local-host.d.ts +106 -0
- package/dist/knowledge/importers/manifest.d.ts +25 -0
- package/dist/knowledge/importers/runner.d.ts +61 -0
- package/dist/knowledge/importers/sink.d.ts +105 -0
- package/dist/knowledge/importers/types.d.ts +144 -0
- package/dist/knowledge/index.cjs +2715 -8
- package/dist/knowledge/index.d.ts +54 -4
- package/dist/knowledge/index.js +2692 -9
- package/dist/knowledge/instructions.d.ts +1 -1
- package/dist/knowledge/links.d.ts +8 -0
- package/dist/knowledge/pinned-state-processor.d.ts +5 -0
- package/dist/knowledge/pinned.d.ts +4 -1
- package/dist/knowledge/scope-runtime.d.ts +10 -0
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/provider-types.generated.d.ts +7812 -7831
- package/dist/llm/model/shared.types.d.ts +31 -0
- package/dist/{llm-CsQuqKPc.cjs → llm-8Av3mSjD.cjs} +2 -2
- package/dist/{llm-DnXK3Pmw.js → llm-B5A5cwJr.js} +2 -2
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +2 -2
- package/dist/{manager-BsghM-UL.js → manager-DfWQCJUK.js} +460 -94
- package/dist/{manager-DwFnIrI6.cjs → manager-sv35JY-z.cjs} +476 -92
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.d.ts +13 -0
- package/dist/mastra/index.js +1 -1
- package/dist/mastra/resolve-agent.d.ts +3 -1
- package/dist/{mastra-B8i1UDZs.js → mastra-CigBrT7X.js} +32 -23
- package/dist/{mastra-Cn5NC6Es.cjs → mastra-D4hvfuxX.cjs} +34 -25
- package/dist/memory/index.cjs +3 -3
- package/dist/memory/index.js +3 -3
- package/dist/{message-list-DPXPXvin.cjs → message-list-Cj0Sq_JP.cjs} +63 -8
- package/dist/{message-list-DEuRl82K.js → message-list-KRbg-TnI.js} +63 -8
- package/dist/{model-CNPfry_X.cjs → model-BK93CMtl.cjs} +1 -1
- package/dist/{model-CsOcWMUt.js → model-CYtXw861.js} +1 -1
- package/dist/{netlify-C-83Fxus.cjs → netlify-BAnn3ouY.cjs} +1 -1
- package/dist/{netlify-C-OpNSGp.js → netlify-CuI1ZrwR.js} +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{output-helpers-JL-HeCbT.cjs → output-helpers-1Zu4Vt9C.cjs} +68 -25
- package/dist/{output-helpers-D4II19No.js → output-helpers-CedRCE17.js} +69 -26
- package/dist/processor-provider/index.cjs +1 -1
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/abort-signal-scope.d.ts +6 -0
- package/dist/processors/index.cjs +2 -2
- package/dist/processors/index.js +2 -2
- package/dist/{provider-registry-9O-H9osy.cjs → provider-registry-BwuI_IpT.cjs} +21690 -21811
- package/dist/{provider-registry-RZ8EgSe8.js → provider-registry-CmQLzLF_.js} +21690 -21811
- package/dist/provider-registry.json +22113 -22215
- package/dist/{registry-generator-e8sltJls.js → registry-generator-C17V4WfG.js} +1 -1
- package/dist/{registry-generator-DxCX-FiO.cjs → registry-generator-C_0ae7Ce.cjs} +1 -1
- package/dist/{rehydrate-B-wrAN7C.cjs → rehydrate-CDQ4dOYj.cjs} +2 -2
- package/dist/{rehydrate-D3fPgJwp.js → rehydrate-PnaVawGX.js} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/{run-registry-5_LQBGn_.cjs → run-registry-BmckDVBk.cjs} +1698 -497
- package/dist/{run-registry-DC03XLeZ.js → run-registry-BwEcwYlU.js} +1614 -467
- package/dist/{source-DDwx-87N.cjs → source-BVOi8Xhp.cjs} +1 -1
- package/dist/{source-Did_2XQc.js → source-fNa6u1kH.js} +1 -1
- package/dist/storage/domains/agents/index.cjs +1 -1
- package/dist/storage/domains/agents/index.js +1 -1
- package/dist/storage/domains/knowledge/base.d.ts +72 -0
- package/dist/storage/domains/knowledge/importers-inmemory.d.ts +146 -0
- package/dist/storage/domains/knowledge/importers.d.ts +287 -0
- package/dist/storage/domains/knowledge/index.d.ts +1 -0
- package/dist/storage/domains/knowledge/inmemory.d.ts +12 -0
- package/dist/storage/domains/knowledge/pages-inmemory.d.ts +12 -1
- package/dist/storage/domains/knowledge/pages.d.ts +25 -7
- package/dist/storage/domains/mcp-clients/index.cjs +1 -1
- package/dist/storage/domains/mcp-clients/index.js +1 -1
- package/dist/storage/domains/mcp-servers/index.cjs +1 -1
- package/dist/storage/domains/mcp-servers/index.js +1 -1
- package/dist/storage/domains/prompt-blocks/index.cjs +1 -1
- package/dist/storage/domains/prompt-blocks/index.js +1 -1
- package/dist/storage/domains/scorer-definitions/index.cjs +1 -1
- package/dist/storage/domains/scorer-definitions/index.js +1 -1
- package/dist/storage/domains/skills/index.cjs +1 -1
- package/dist/storage/domains/skills/index.js +1 -1
- package/dist/storage/domains/workspaces/index.cjs +1 -1
- package/dist/storage/domains/workspaces/index.js +1 -1
- package/dist/storage/index.cjs +15 -10
- package/dist/storage/index.js +11 -11
- package/dist/stream/base/output.d.ts +59 -15
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/stream/types.d.ts +24 -2
- package/dist/{stream-4aNIw_TQ.cjs → stream-0kdqBOOn.cjs} +64 -9
- package/dist/{stream-CJUm6EAH.js → stream-D1y9GzoD.js} +29 -10
- 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-FEEwHfmg.js → tool-loop-agent-BdjWGVIb.js} +4 -4
- package/dist/{tool-loop-agent-Dn0QCB9n.cjs → tool-loop-agent-kWaZAT6Q.cjs} +4 -4
- package/dist/tools/types.d.ts +27 -1
- package/dist/{utils-DY01hxVd.cjs → utils-BKUCaZ12.cjs} +1 -1
- package/dist/{utils-Bd_y1_a-.js → utils-GHY3hmLx.js} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-CX0yQo_q.js → validate-CB-q-R2F.js} +1 -1
- package/dist/{validate-CuB_1Zd3.cjs → validate-De92squ7.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-CbaSmip-.cjs → worker-BbWPQuPR.cjs} +2 -2
- package/dist/{worker-B80xkcKG.js → worker-C3u_xzY2.js} +2 -2
- package/dist/{worker-GsGIxPMa.cjs → worker-CAKvQj9_.cjs} +2 -2
- package/dist/{worker-DSEfMPmq.js → worker-Kwm8EKcj.js} +2 -2
- package/dist/{workflow-CnBPXTpv.cjs → workflow-CSjXeNcR.cjs} +4 -4
- package/dist/{workflow-CZHY_C85.js → workflow-CVmI1Sw-.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 +18 -0
- package/dist/workflows/evented/workflow-event-processor/run-status.d.ts +37 -0
- package/dist/workflows/evented/workflow.d.ts +10 -0
- package/dist/workflows/index.cjs +4 -4
- package/dist/workflows/index.js +4 -4
- package/dist/workflows/workflow.d.ts +6 -1
- package/dist/workspace/filesystem/filesystem.d.ts +5 -0
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/sandbox/local-sandbox.d.ts +16 -7
- package/dist/workspace/sandbox/native-sandbox/types.d.ts +11 -1
- package/dist/{workspace-D7TIleIt.js → workspace-DY2Nxiyi.js} +235 -34
- package/dist/{workspace-D2drutNg.cjs → workspace-X2RHJZU9.cjs} +235 -34
- package/package.json +7 -7
- package/src/llm/model/provider-types.generated.d.ts +7812 -7831
|
@@ -4,7 +4,7 @@ import { i as MastraError, n as ErrorDomain, t as ErrorCategory } from "./error-
|
|
|
4
4
|
import { n as executeWithContextSync, t as executeWithContext } from "./utils-DU_pU5SK.js";
|
|
5
5
|
import { S as resolveObservabilityContext } from "./observability-D7RNOAPx.js";
|
|
6
6
|
import { isStandardSchemaWithJSON, standardSchemaToJSONSchema, toStandardSchema } from "./schema/index.js";
|
|
7
|
-
import { i as delay, u as isZodType$1 } from "./utils-
|
|
7
|
+
import { i as delay, u as isZodType$1 } from "./utils-GHY3hmLx.js";
|
|
8
8
|
import { i as isZodArray, t as getZodDef } from "./zod-utils-BDDS_mxU.js";
|
|
9
9
|
import { AnthropicSchemaCompatLayer, DeepSeekSchemaCompatLayer, GoogleSchemaCompatLayer, MetaSchemaCompatLayer, OpenAIReasoningSchemaCompatLayer, OpenAISchemaCompatLayer, applyCompatLayer, jsonSchema } from "@mastra/schema-compat";
|
|
10
10
|
// src/stream/aisdk/v4/usage.ts
|
|
@@ -20709,7 +20709,7 @@ function createOpenRouter(options = {}) {
|
|
|
20709
20709
|
}
|
|
20710
20710
|
createOpenRouter({ compatibility: "strict" });
|
|
20711
20711
|
// src/llm/model/gateways/constants.ts
|
|
20712
|
-
const MASTRA_USER_AGENT = `mastra/1.86.0-alpha.
|
|
20712
|
+
const MASTRA_USER_AGENT = `mastra/1.86.0-alpha.9`;
|
|
20713
20713
|
const PROVIDERS_WITH_INSTALLED_PACKAGES = [
|
|
20714
20714
|
"anthropic",
|
|
20715
20715
|
"cerebras",
|
|
@@ -20708,7 +20708,7 @@ function createOpenRouter(options = {}) {
|
|
|
20708
20708
|
}
|
|
20709
20709
|
createOpenRouter({ compatibility: "strict" });
|
|
20710
20710
|
// src/llm/model/gateways/constants.ts
|
|
20711
|
-
const MASTRA_USER_AGENT = `mastra/1.86.0-alpha.
|
|
20711
|
+
const MASTRA_USER_AGENT = `mastra/1.86.0-alpha.9`;
|
|
20712
20712
|
const PROVIDERS_WITH_INSTALLED_PACKAGES = [
|
|
20713
20713
|
"anthropic",
|
|
20714
20714
|
"cerebras",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_run_registry = require("../run-registry-
|
|
2
|
+
const require_run_registry = require("../run-registry-BmckDVBk.cjs");
|
|
3
3
|
const require_tool = require("../tool-CYlT2UA-.cjs");
|
|
4
4
|
let zod_v4 = require("zod/v4");
|
|
5
5
|
// src/notifications/tool.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Br as
|
|
1
|
+
import { Br as dispatchDueNotifications, Gr as notificationSummaryContents, Hr as createNotificationSummarySignal, Jr as readNotificationRoutingRequirement, Kr as notificationSummarySignalMetadata, Qr as resolveNotificationDeliveryDecision, Rr as InMemoryNotificationsStorage, Ur as notificationSignalAttributes, Vr as createNotificationSignal, Wr as notificationSignalMetadata, Xr as defaultNotificationDeliveryDecision, Yr as MAX_NOTIFICATION_DELIVERY_ATTEMPTS, Zr as resolveDeliveryFailureUpdate, qr as summarizeNotifications, zr as NotificationsStorage } from "../run-registry-BwEcwYlU.js";
|
|
2
2
|
import { r as createTool } from "../tool-Z3bykc1m.js";
|
|
3
3
|
import { z } from "zod/v4";
|
|
4
4
|
// src/notifications/tool.ts
|
|
@@ -2,7 +2,42 @@ const require_rolldown_runtime = require("./rolldown-runtime-BrhgMLW6.cjs");
|
|
|
2
2
|
const require_error_count = require("./error-count-DeDpeWU2.cjs");
|
|
3
3
|
let events = require("events");
|
|
4
4
|
events = require_rolldown_runtime.__toESM(events, 1);
|
|
5
|
+
// src/events/acking-callback.ts
|
|
6
|
+
/**
|
|
7
|
+
* Adapt an event-only handler into an `EventCallback` that acknowledges every
|
|
8
|
+
* delivery.
|
|
9
|
+
*
|
|
10
|
+
* Handlers that only need the event cannot honour the `EventCallback` contract
|
|
11
|
+
* themselves: on a durable backend (Redis consumer groups, GCP Pub/Sub) every
|
|
12
|
+
* delivery — including the ones a handler inspects and filters out — has to be
|
|
13
|
+
* acked, or it stays in the subscription's pending set and is redelivered.
|
|
14
|
+
* Wrapping is the only way an event-only handler can satisfy that.
|
|
15
|
+
*
|
|
16
|
+
* A throwing handler leaves the delivery unacked and rejects the callback, which
|
|
17
|
+
* a backend that honours redelivery treats as a nack.
|
|
18
|
+
*/
|
|
19
|
+
function withAck(handler) {
|
|
20
|
+
return async (event, ack) => {
|
|
21
|
+
await handler(event);
|
|
22
|
+
await ack?.();
|
|
23
|
+
};
|
|
24
|
+
}
|
|
5
25
|
// src/events/pubsub.ts
|
|
26
|
+
/**
|
|
27
|
+
* The event bus behind workflow execution, streams, signals, background tasks
|
|
28
|
+
* and schedules.
|
|
29
|
+
*
|
|
30
|
+
* Mastra decides how to behave from the capability getters below
|
|
31
|
+
* (`deliversAcrossProcesses`, `redeliversUnacked`, `supportedModes`, ...), never
|
|
32
|
+
* from which transport class the instance is. An implementation states what its
|
|
33
|
+
* transport does by overriding them.
|
|
34
|
+
*
|
|
35
|
+
* Evented workflows and evented agents can run on any implementation inside one
|
|
36
|
+
* process. Running them on several processes needs a pubsub that redelivers
|
|
37
|
+
* unacknowledged events and a workflows store with step guards.
|
|
38
|
+
*
|
|
39
|
+
* @see https://mastra.ai/docs/server/pubsub#evented-workflows-and-agents
|
|
40
|
+
*/
|
|
6
41
|
var PubSub = class {
|
|
7
42
|
/**
|
|
8
43
|
* Delete all retained state for a topic (cached history, persistent stream
|
|
@@ -79,6 +114,19 @@ var PubSub = class {
|
|
|
79
114
|
return false;
|
|
80
115
|
}
|
|
81
116
|
/**
|
|
117
|
+
* Whether an event published here can reach a subscriber in another process.
|
|
118
|
+
* Defaults to `true`, so an implementation is treated as a shared transport
|
|
119
|
+
* unless it says otherwise: runs are fenced against other processes, and
|
|
120
|
+
* shutdown detaches from the evented runs other processes may still execute
|
|
121
|
+
* instead of stopping them.
|
|
122
|
+
*
|
|
123
|
+
* Return `false` only when every subscriber lives in the publishing process.
|
|
124
|
+
* Mastra then skips that cross-process coordination.
|
|
125
|
+
*/
|
|
126
|
+
get deliversAcrossProcesses() {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
82
130
|
* Whether a message delivered to a consumer that neither acks nor nacks it
|
|
83
131
|
* (for example because its process died) is delivered again to a consumer of
|
|
84
132
|
* the same group once the broker considers it abandoned. Defaults to `false`.
|
|
@@ -88,6 +136,9 @@ var PubSub = class {
|
|
|
88
136
|
* pass restarts the run. The broker's abandonment threshold must be at least
|
|
89
137
|
* 30 s, the evented step fence a dead worker leaves behind; a redelivery that
|
|
90
138
|
* arrives before the fence expires is dropped as a duplicate.
|
|
139
|
+
*
|
|
140
|
+
* Evented workflows and agents that run on several processes need `true`
|
|
141
|
+
* here. Without it, no other worker picks up the step a stopped worker held.
|
|
91
142
|
*/
|
|
92
143
|
get redeliversUnacked() {
|
|
93
144
|
return false;
|
|
@@ -469,12 +520,17 @@ var AckHandleBuffer = class {
|
|
|
469
520
|
const NOOP_ACK = async () => {};
|
|
470
521
|
/**
|
|
471
522
|
* The default pubsub: delivers events inside the process that published them.
|
|
523
|
+
* It needs no external service, and nothing it holds outlives the process.
|
|
524
|
+
*
|
|
525
|
+
* Evented workflows and evented agents run on it in one process: local
|
|
526
|
+
* development, tests, and a single server. It is not a transport for running
|
|
527
|
+
* them on several instances. Each instance has its own emitter, so an event
|
|
528
|
+
* never reaches another instance, and instances that share one storage each
|
|
529
|
+
* treat the others' runs as their own to recover. Use a pubsub that redelivers
|
|
530
|
+
* unacknowledged events for that.
|
|
472
531
|
*
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
* treats the others' runs as its own to recover. A multi-instance evented
|
|
476
|
-
* deployment needs a broker such as Redis Streams, Valkey Streams or Google
|
|
477
|
-
* Cloud Pub/Sub.
|
|
532
|
+
* The leases, consumer groups and nack redelivery here coordinate subscribers
|
|
533
|
+
* of this one process. They give no guarantee across processes.
|
|
478
534
|
*/
|
|
479
535
|
var EventEmitterPubSub = class extends PubSub {
|
|
480
536
|
get supportedModes() {
|
|
@@ -489,6 +545,10 @@ var EventEmitterPubSub = class extends PubSub {
|
|
|
489
545
|
get supportsNativeBatching() {
|
|
490
546
|
return true;
|
|
491
547
|
}
|
|
548
|
+
/** Every subscriber is a listener on this process's emitter. */
|
|
549
|
+
get deliversAcrossProcesses() {
|
|
550
|
+
return false;
|
|
551
|
+
}
|
|
492
552
|
/**
|
|
493
553
|
* Ack and nack are no-ops here: a message lives only in the process that
|
|
494
554
|
* published it, so nothing redelivers it once that process stops.
|
|
@@ -767,26 +827,6 @@ var EventEmitterPubSub = class extends PubSub {
|
|
|
767
827
|
return Promise.resolve(true);
|
|
768
828
|
}
|
|
769
829
|
};
|
|
770
|
-
// src/events/acking-callback.ts
|
|
771
|
-
/**
|
|
772
|
-
* Adapt an event-only handler into an `EventCallback` that acknowledges every
|
|
773
|
-
* delivery.
|
|
774
|
-
*
|
|
775
|
-
* Handlers that only need the event cannot honour the `EventCallback` contract
|
|
776
|
-
* themselves: on a durable backend (Redis consumer groups, GCP Pub/Sub) every
|
|
777
|
-
* delivery — including the ones a handler inspects and filters out — has to be
|
|
778
|
-
* acked, or it stays in the subscription's pending set and is redelivered.
|
|
779
|
-
* Wrapping is the only way an event-only handler can satisfy that.
|
|
780
|
-
*
|
|
781
|
-
* A throwing handler leaves the delivery unacked and rejects the callback, which
|
|
782
|
-
* a backend that honours redelivery treats as a nack.
|
|
783
|
-
*/
|
|
784
|
-
function withAck(handler) {
|
|
785
|
-
return async (event, ack) => {
|
|
786
|
-
await handler(event);
|
|
787
|
-
await ack?.();
|
|
788
|
-
};
|
|
789
|
-
}
|
|
790
830
|
// src/stream/strip-model-snapshots.ts
|
|
791
831
|
/**
|
|
792
832
|
* Removes the model request/history snapshots that agent `step-start`,
|
|
@@ -1083,6 +1123,9 @@ var CachingPubSub = class extends PubSub {
|
|
|
1083
1123
|
get supportsOffsets() {
|
|
1084
1124
|
return true;
|
|
1085
1125
|
}
|
|
1126
|
+
get deliversAcrossProcesses() {
|
|
1127
|
+
return this.inner.deliversAcrossProcesses;
|
|
1128
|
+
}
|
|
1086
1129
|
get redeliversUnacked() {
|
|
1087
1130
|
return this.inner.redeliversUnacked;
|
|
1088
1131
|
}
|
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
import { i as setSpanErrorOrigin, n as getSpanErrorOrigin } from "./error-count-BH-rJW7q.js";
|
|
2
2
|
import EventEmitter$1 from "events";
|
|
3
|
+
// src/events/acking-callback.ts
|
|
4
|
+
/**
|
|
5
|
+
* Adapt an event-only handler into an `EventCallback` that acknowledges every
|
|
6
|
+
* delivery.
|
|
7
|
+
*
|
|
8
|
+
* Handlers that only need the event cannot honour the `EventCallback` contract
|
|
9
|
+
* themselves: on a durable backend (Redis consumer groups, GCP Pub/Sub) every
|
|
10
|
+
* delivery — including the ones a handler inspects and filters out — has to be
|
|
11
|
+
* acked, or it stays in the subscription's pending set and is redelivered.
|
|
12
|
+
* Wrapping is the only way an event-only handler can satisfy that.
|
|
13
|
+
*
|
|
14
|
+
* A throwing handler leaves the delivery unacked and rejects the callback, which
|
|
15
|
+
* a backend that honours redelivery treats as a nack.
|
|
16
|
+
*/
|
|
17
|
+
function withAck(handler) {
|
|
18
|
+
return async (event, ack) => {
|
|
19
|
+
await handler(event);
|
|
20
|
+
await ack?.();
|
|
21
|
+
};
|
|
22
|
+
}
|
|
3
23
|
// src/events/pubsub.ts
|
|
24
|
+
/**
|
|
25
|
+
* The event bus behind workflow execution, streams, signals, background tasks
|
|
26
|
+
* and schedules.
|
|
27
|
+
*
|
|
28
|
+
* Mastra decides how to behave from the capability getters below
|
|
29
|
+
* (`deliversAcrossProcesses`, `redeliversUnacked`, `supportedModes`, ...), never
|
|
30
|
+
* from which transport class the instance is. An implementation states what its
|
|
31
|
+
* transport does by overriding them.
|
|
32
|
+
*
|
|
33
|
+
* Evented workflows and evented agents can run on any implementation inside one
|
|
34
|
+
* process. Running them on several processes needs a pubsub that redelivers
|
|
35
|
+
* unacknowledged events and a workflows store with step guards.
|
|
36
|
+
*
|
|
37
|
+
* @see https://mastra.ai/docs/server/pubsub#evented-workflows-and-agents
|
|
38
|
+
*/
|
|
4
39
|
var PubSub = class {
|
|
5
40
|
/**
|
|
6
41
|
* Delete all retained state for a topic (cached history, persistent stream
|
|
@@ -77,6 +112,19 @@ var PubSub = class {
|
|
|
77
112
|
return false;
|
|
78
113
|
}
|
|
79
114
|
/**
|
|
115
|
+
* Whether an event published here can reach a subscriber in another process.
|
|
116
|
+
* Defaults to `true`, so an implementation is treated as a shared transport
|
|
117
|
+
* unless it says otherwise: runs are fenced against other processes, and
|
|
118
|
+
* shutdown detaches from the evented runs other processes may still execute
|
|
119
|
+
* instead of stopping them.
|
|
120
|
+
*
|
|
121
|
+
* Return `false` only when every subscriber lives in the publishing process.
|
|
122
|
+
* Mastra then skips that cross-process coordination.
|
|
123
|
+
*/
|
|
124
|
+
get deliversAcrossProcesses() {
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
80
128
|
* Whether a message delivered to a consumer that neither acks nor nacks it
|
|
81
129
|
* (for example because its process died) is delivered again to a consumer of
|
|
82
130
|
* the same group once the broker considers it abandoned. Defaults to `false`.
|
|
@@ -86,6 +134,9 @@ var PubSub = class {
|
|
|
86
134
|
* pass restarts the run. The broker's abandonment threshold must be at least
|
|
87
135
|
* 30 s, the evented step fence a dead worker leaves behind; a redelivery that
|
|
88
136
|
* arrives before the fence expires is dropped as a duplicate.
|
|
137
|
+
*
|
|
138
|
+
* Evented workflows and agents that run on several processes need `true`
|
|
139
|
+
* here. Without it, no other worker picks up the step a stopped worker held.
|
|
89
140
|
*/
|
|
90
141
|
get redeliversUnacked() {
|
|
91
142
|
return false;
|
|
@@ -467,12 +518,17 @@ var AckHandleBuffer = class {
|
|
|
467
518
|
const NOOP_ACK = async () => {};
|
|
468
519
|
/**
|
|
469
520
|
* The default pubsub: delivers events inside the process that published them.
|
|
521
|
+
* It needs no external service, and nothing it holds outlives the process.
|
|
522
|
+
*
|
|
523
|
+
* Evented workflows and evented agents run on it in one process: local
|
|
524
|
+
* development, tests, and a single server. It is not a transport for running
|
|
525
|
+
* them on several instances. Each instance has its own emitter, so an event
|
|
526
|
+
* never reaches another instance, and instances that share one storage each
|
|
527
|
+
* treat the others' runs as their own to recover. Use a pubsub that redelivers
|
|
528
|
+
* unacknowledged events for that.
|
|
470
529
|
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
* treats the others' runs as its own to recover. A multi-instance evented
|
|
474
|
-
* deployment needs a broker such as Redis Streams, Valkey Streams or Google
|
|
475
|
-
* Cloud Pub/Sub.
|
|
530
|
+
* The leases, consumer groups and nack redelivery here coordinate subscribers
|
|
531
|
+
* of this one process. They give no guarantee across processes.
|
|
476
532
|
*/
|
|
477
533
|
var EventEmitterPubSub = class extends PubSub {
|
|
478
534
|
get supportedModes() {
|
|
@@ -487,6 +543,10 @@ var EventEmitterPubSub = class extends PubSub {
|
|
|
487
543
|
get supportsNativeBatching() {
|
|
488
544
|
return true;
|
|
489
545
|
}
|
|
546
|
+
/** Every subscriber is a listener on this process's emitter. */
|
|
547
|
+
get deliversAcrossProcesses() {
|
|
548
|
+
return false;
|
|
549
|
+
}
|
|
490
550
|
/**
|
|
491
551
|
* Ack and nack are no-ops here: a message lives only in the process that
|
|
492
552
|
* published it, so nothing redelivers it once that process stops.
|
|
@@ -765,26 +825,6 @@ var EventEmitterPubSub = class extends PubSub {
|
|
|
765
825
|
return Promise.resolve(true);
|
|
766
826
|
}
|
|
767
827
|
};
|
|
768
|
-
// src/events/acking-callback.ts
|
|
769
|
-
/**
|
|
770
|
-
* Adapt an event-only handler into an `EventCallback` that acknowledges every
|
|
771
|
-
* delivery.
|
|
772
|
-
*
|
|
773
|
-
* Handlers that only need the event cannot honour the `EventCallback` contract
|
|
774
|
-
* themselves: on a durable backend (Redis consumer groups, GCP Pub/Sub) every
|
|
775
|
-
* delivery — including the ones a handler inspects and filters out — has to be
|
|
776
|
-
* acked, or it stays in the subscription's pending set and is redelivered.
|
|
777
|
-
* Wrapping is the only way an event-only handler can satisfy that.
|
|
778
|
-
*
|
|
779
|
-
* A throwing handler leaves the delivery unacked and rejects the callback, which
|
|
780
|
-
* a backend that honours redelivery treats as a nack.
|
|
781
|
-
*/
|
|
782
|
-
function withAck(handler) {
|
|
783
|
-
return async (event, ack) => {
|
|
784
|
-
await handler(event);
|
|
785
|
-
await ack?.();
|
|
786
|
-
};
|
|
787
|
-
}
|
|
788
828
|
// src/stream/strip-model-snapshots.ts
|
|
789
829
|
/**
|
|
790
830
|
* Removes the model request/history snapshots that agent `step-start`,
|
|
@@ -1081,6 +1121,9 @@ var CachingPubSub = class extends PubSub {
|
|
|
1081
1121
|
get supportsOffsets() {
|
|
1082
1122
|
return true;
|
|
1083
1123
|
}
|
|
1124
|
+
get deliversAcrossProcesses() {
|
|
1125
|
+
return this.inner.deliversAcrossProcesses;
|
|
1126
|
+
}
|
|
1084
1127
|
get redeliversUnacked() {
|
|
1085
1128
|
return this.inner.redeliversUnacked;
|
|
1086
1129
|
}
|
|
@@ -1538,4 +1581,4 @@ var DefaultStepResult = class {
|
|
|
1538
1581
|
return this.toolResults.filter((toolResult) => toolResult.dynamic === true);
|
|
1539
1582
|
}
|
|
1540
1583
|
};
|
|
1541
|
-
export {
|
|
1584
|
+
export { PubSub as _, rehydrateError as a, RUN_LOG_TTL_MS as c, toCachedLogFrame as d, slimNestedAgentChunks as f, NoopLeaseProvider as g, EventEmitterPubSub as h, withCaching as i, cachedLogTtlMs as l, stripModelSnapshots as m, PublisherQueueLimitError as n, serializeError as o, slimProgressChunk as p, CachingPubSub as r, RUN_LOCAL_TOPIC_PREFIXES as s, DefaultStepResult as t, isRunLocalTopic as u, isLeaseProvider as v, withAck as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_run_registry = require("../run-registry-
|
|
2
|
+
const require_run_registry = require("../run-registry-BmckDVBk.cjs");
|
|
3
3
|
let zod_v4 = require("zod/v4");
|
|
4
4
|
// src/processor-provider/types.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Xo as ToolCallFilter, cs as BatchPartsProcessor, es as SystemPromptScrubber, fs as LanguageDetector, gs as UnicodeNormalizer, hs as ModerationProcessor, ms as PromptInjectionDetector, ps as PIIDetector, ts as TokenLimiterProcessor } from "../run-registry-BwEcwYlU.js";
|
|
2
2
|
import { z } from "zod/v4";
|
|
3
3
|
// src/processor-provider/types.ts
|
|
4
4
|
/**
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The caller's abort signal for a processor workflow run. Held in the run scope
|
|
3
|
+
* rather than the step payload: a serializing pubsub would encode the signal as `{}`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const PROCESSOR_ABORT_SIGNAL: import("../mastra/run-scope").RunScopeKey<AbortSignal>;
|
|
6
|
+
//# sourceMappingURL=abort-signal-scope.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
2
|
+
const require_run_registry = require("../run-registry-BmckDVBk.cjs");
|
|
3
|
+
const require_stream = require("../stream-0kdqBOOn.cjs");
|
|
4
4
|
exports.AgentsMDInjector = require_run_registry.AgentsMDInjector;
|
|
5
5
|
exports.BaseProcessor = require_run_registry.BaseProcessor;
|
|
6
6
|
exports.BatchPartsProcessor = require_run_registry.BatchPartsProcessor;
|
package/dist/processors/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { $o as TokenCostControl, Al as ProcessorOutputStepPhaseSchema, Bo as DEFAULT_RESPONSE_CACHE_TTL_SECONDS, Cl as MessageContentSchema, Cs as StreamErrorRetryProcessor, Dl as ProcessorMessageContentSchema, El as ProcessorInputStepPhaseSchema, Es as PrefillErrorHandler, Fl as ReasoningPartSchema, Gn as MemoryInputFilter, Go as SkillSearchProcessor, Ho as ResponseCache, Il as SourcePartSchema, Jn as WorkingMemory, Jo as ToolSearchProcessor, Kn as SemanticRecall, Ko as SkillsProcessor, Ll as StepStartPartSchema, Ml as ProcessorStepInputSchema, Nl as ProcessorStepOutputSchema, Ol as ProcessorMessageSchema, Pl as ProcessorStepSchema, Qo as CostGuardProcessor, Rl as TextPartSchema, Ro as createBackgroundWorkSignalProcessor, Sl as ImagePartSchema, Ss as FILE_UPLOAD_ERROR_CODES, Tl as ProcessorInputPhaseSchema, Ts as isRetryableOpenAIResponsesStreamError, Uo as buildResponseCacheKey, Vo as RESPONSE_CACHE_CONTEXT_KEY, Wn as BaseProcessor, Wo as WorkspaceInstructionsProcessor, Xo as ToolCallFilter, Yn as MessageHistory, Yo as AgentsMDInjector, Zo as RegexFilterProcessor, _s as STABILITY_ERROR_PROCESSOR_IDS, bs as UnsupportedFileHandler, cs as BatchPartsProcessor, ds as StructuredOutputProcessor, es as SystemPromptScrubber, fs as LanguageDetector, gs as UnicodeNormalizer, hs as ModerationProcessor, jl as ProcessorOutputStreamPhaseSchema, kl as ProcessorOutputResultPhaseSchema, ls as ModelSelectionProcessor, ms as PromptInjectionDetector, ps as PIIDetector, qn as globalEmbeddingCache, qo as formatSkillsCatalog, ts as TokenLimiterProcessor, us as ClassifierProcessor, vs as defaultStabilityErrorProcessors, wl as MessagePartSchema, ws as isBadRequestError, xl as FilePartSchema, xs as FileUploadProcessor, ys as isMalformedFunctionCallError, zl as ToolInvocationPartSchema, zo as CyberRefusalHandler } from "../run-registry-BwEcwYlU.js";
|
|
2
|
+
import { B as ProviderHistoryCompat, G as REPROCESS_PART_KEY, H as cerebrasStripReasoningContent, M as ProcessorState, U as openaiOrphanItemId, V as anthropicToolIdFormat, cn as isProcessorWorkflow, j as ProcessorRunner, rt as createProcessorSendSignal } from "../stream-D1y9GzoD.js";
|
|
3
3
|
export { AgentsMDInjector, BaseProcessor, BatchPartsProcessor, ClassifierProcessor, CostGuardProcessor, CyberRefusalHandler, DEFAULT_RESPONSE_CACHE_TTL_SECONDS, FILE_UPLOAD_ERROR_CODES, FilePartSchema, FileUploadProcessor, ImagePartSchema, LanguageDetector, MemoryInputFilter, MessageContentSchema, MessageHistory, MessagePartSchema, ModelSelectionProcessor, ModerationProcessor, PIIDetector, PrefillErrorHandler, ProcessorInputPhaseSchema, ProcessorInputStepPhaseSchema, ProcessorMessageContentSchema, ProcessorMessageSchema, ProcessorOutputResultPhaseSchema, ProcessorOutputStepPhaseSchema, ProcessorOutputStreamPhaseSchema, ProcessorRunner, ProcessorState, ProcessorStepInputSchema, ProcessorStepOutputSchema, ProcessorStepSchema, PromptInjectionDetector, ProviderHistoryCompat, REPROCESS_PART_KEY, RESPONSE_CACHE_CONTEXT_KEY, ReasoningPartSchema, RegexFilterProcessor, ResponseCache, STABILITY_ERROR_PROCESSOR_IDS, SemanticRecall, SkillSearchProcessor, SkillsProcessor, SourcePartSchema, StepStartPartSchema, StreamErrorRetryProcessor, StructuredOutputProcessor, SystemPromptScrubber, TextPartSchema, TokenCostControl, TokenLimiterProcessor as TokenLimiter, TokenLimiterProcessor, ToolCallFilter, ToolInvocationPartSchema, ToolSearchProcessor, UnicodeNormalizer, UnsupportedFileHandler, WorkingMemory, WorkspaceInstructionsProcessor, anthropicToolIdFormat, buildResponseCacheKey, cerebrasStripReasoningContent, createBackgroundWorkSignalProcessor, createProcessorSendSignal, defaultStabilityErrorProcessors, formatSkillsCatalog, globalEmbeddingCache, isBadRequestError, isMalformedFunctionCallError, isProcessorWorkflow, isRetryableOpenAIResponsesStreamError, openaiOrphanItemId };
|