@mastra/core 1.86.0-alpha.6 → 1.86.0-alpha.8
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/memory/index.d.ts +25 -0
- package/dist/agent/agent.d.ts +87 -12
- package/dist/agent/agent.types.d.ts +34 -2
- package/dist/agent/durable/create-durable-agent.d.ts +1 -1
- package/dist/agent/durable/create-evented-agent.d.ts +6 -0
- package/dist/agent/durable/durable-agent.d.ts +30 -514
- package/dist/agent/durable/durable-stream-until-idle.d.ts +2 -1
- package/dist/agent/durable/evented-agent.d.ts +2 -5
- package/dist/agent/durable/execution-engine.d.ts +20 -3
- package/dist/agent/durable/index.cjs +61 -6351
- package/dist/agent/durable/index.d.ts +3 -2
- package/dist/agent/durable/index.js +50 -6340
- package/dist/agent/durable/stream-adapter.d.ts +5 -5
- package/dist/agent/durable/types.d.ts +454 -3
- package/dist/agent/durable/workflows/durable-loop-builder.d.ts +7 -9
- package/dist/agent/helpers.d.ts +1 -1
- package/dist/agent/index.cjs +4 -4
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +4 -4
- package/dist/agent/streams/execution-capability.d.ts +3 -2
- package/dist/agent/streams/execution-policy.d.ts +1 -1
- package/dist/agent/streams/types.d.ts +3 -3
- package/dist/agent/types.d.ts +30 -5
- package/dist/agent-builder/ee/index.cjs +1 -1
- package/dist/agent-builder/ee/index.js +1 -1
- package/dist/agent-controller/index.cjs +2 -2
- package/dist/agent-controller/index.js +2 -2
- package/dist/{agent-controller-c4KbZ8DY.js → agent-controller-B7POPub5.js} +9 -9
- package/dist/{agent-controller-6ORqG6hK.cjs → agent-controller-DEPayioq.cjs} +9 -9
- package/dist/{agent-skills-resolver-BIeWsb01.cjs → agent-skills-resolver-BMoCDoaK.cjs} +1 -1
- package/dist/{agent-skills-resolver-k04IRam7.js → agent-skills-resolver-CUEIMDbx.js} +1 -1
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-Da0c3R-J.cjs → background-tasks-7iftnRK_.cjs} +1 -1
- package/dist/{background-tasks-CEglmAt7.js → background-tasks-Cv1ecD6S.js} +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.js +2 -2
- package/dist/{builder-DS826dWf.cjs → builder-DuJBbQDH.cjs} +3 -3
- package/dist/{builder-0V9N8S15.js → builder-Gg-xnX_E.js} +3 -3
- package/dist/capabilities/302ai.json +198 -198
- package/dist/capabilities/abliteratedllm.json +38 -38
- package/dist/capabilities/abliteration-ai.json +6 -6
- package/dist/capabilities/above.json +23 -23
- package/dist/capabilities/adaption.json +14 -14
- package/dist/capabilities/adzuki.json +22 -22
- package/dist/capabilities/agentrouter.json +7 -7
- package/dist/capabilities/agnes.json +2 -2
- package/dist/capabilities/ai-router.json +5 -5
- package/dist/capabilities/aiand.json +23 -23
- package/dist/capabilities/aigrow.json +15 -15
- package/dist/capabilities/aimlapi.json +143 -143
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +16 -16
- package/dist/capabilities/aki-io.json +12 -12
- package/dist/capabilities/alibaba-cn.json +84 -84
- 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 +51 -51
- package/dist/capabilities/alibaba-token-plan.json +52 -52
- package/dist/capabilities/alibaba.json +69 -69
- package/dist/capabilities/ambient.json +12 -12
- package/dist/capabilities/amd.json +10 -10
- package/dist/capabilities/anthropic.json +64 -40
- package/dist/capabilities/anyapi.json +12 -12
- package/dist/capabilities/apiko.json +5 -5
- package/dist/capabilities/arcee.json +7 -7
- package/dist/capabilities/augure.json +8 -8
- package/dist/capabilities/auriko.json +21 -21
- package/dist/capabilities/bailing.json +2 -2
- package/dist/capabilities/baseten.json +26 -26
- package/dist/capabilities/bee.json +4 -4
- package/dist/capabilities/berget.json +4 -4
- package/dist/capabilities/bothub.json +17 -17
- package/dist/capabilities/boundless.json +41 -41
- package/dist/capabilities/bumo.json +43 -43
- package/dist/capabilities/byteplus.json +31 -31
- package/dist/capabilities/cerebras.json +4 -4
- package/dist/capabilities/cheapaimodel.json +6 -6
- package/dist/capabilities/cheapest-token.json +32 -32
- package/dist/capabilities/chutes.json +10 -10
- package/dist/capabilities/cline-pass.json +43 -43
- package/dist/capabilities/cloudcode.json +8 -8
- package/dist/capabilities/cloudferro-sherlock.json +4 -4
- package/dist/capabilities/cloudflare-workers-ai.json +31 -31
- package/dist/capabilities/commandcode.json +151 -151
- package/dist/capabilities/concentrate.json +287 -263
- package/dist/capabilities/cortecs.json +106 -106
- package/dist/capabilities/crossmodel.json +189 -189
- package/dist/capabilities/crusoe.json +3 -3
- package/dist/capabilities/daoxe.json +9 -9
- package/dist/capabilities/databricks.json +62 -62
- package/dist/capabilities/deepinfra.json +97 -88
- package/dist/capabilities/deepseek.json +3 -3
- package/dist/capabilities/digitalocean.json +114 -114
- package/dist/capabilities/dothoosh.json +36 -36
- package/dist/capabilities/doubleword.json +29 -29
- package/dist/capabilities/edenai.json +443 -442
- package/dist/capabilities/empiriolabs.json +172 -172
- package/dist/capabilities/engy.json +20 -20
- package/dist/capabilities/entrim.json +8 -8
- package/dist/capabilities/evroc.json +15 -15
- package/dist/capabilities/ezkielyna.json +7 -7
- package/dist/capabilities/fastrouter.json +82 -82
- package/dist/capabilities/fireworks-ai.json +50 -50
- package/dist/capabilities/freemodel.json +24 -24
- package/dist/capabilities/friendli.json +6 -6
- package/dist/capabilities/frogbot.json +98 -98
- package/dist/capabilities/gisoo.json +20 -20
- package/dist/capabilities/gmicloud.json +14 -14
- package/dist/capabilities/google.json +60 -60
- package/dist/capabilities/graphn.json +12 -12
- package/dist/capabilities/greenpt.json +33 -33
- package/dist/capabilities/groq.json +9 -9
- package/dist/capabilities/helicone.json +81 -81
- package/dist/capabilities/hopper.json +2 -2
- package/dist/capabilities/hostinger-router.json +12 -12
- package/dist/capabilities/hpc-ai.json +10 -10
- package/dist/capabilities/huawei-maas.json +15 -15
- package/dist/capabilities/hubris.json +27 -27
- package/dist/capabilities/huggingface.json +59 -50
- package/dist/capabilities/humain.json +2 -2
- package/dist/capabilities/hyper.json +25 -25
- package/dist/capabilities/impossibl.json +140 -140
- package/dist/capabilities/inception.json +2 -2
- package/dist/capabilities/inceptron.json +8 -8
- package/dist/capabilities/inco.json +4 -4
- package/dist/capabilities/infer.json +14 -14
- package/dist/capabilities/inferall.json +7 -7
- package/dist/capabilities/inference-coop.json +15 -15
- package/dist/capabilities/inferenceapis.json +18 -18
- package/dist/capabilities/inferris.json +4 -4
- package/dist/capabilities/infersia.json +13 -13
- package/dist/capabilities/infomaniak.json +2 -2
- package/dist/capabilities/io-net.json +5 -5
- package/dist/capabilities/isoquant.json +4 -4
- package/dist/capabilities/iteracompute.json +54 -54
- package/dist/capabilities/jalapeno.json +12 -12
- package/dist/capabilities/jiekou.json +63 -63
- package/dist/capabilities/joingonka.json +4 -4
- package/dist/capabilities/jzstoken.json +56 -56
- package/dist/capabilities/keln.json +27 -27
- package/dist/capabilities/kenari.json +117 -111
- package/dist/capabilities/kilo.json +625 -649
- package/dist/capabilities/kimi-code-plan-cn.json +6 -6
- package/dist/capabilities/kimi-code-plan-global.json +6 -6
- package/dist/capabilities/kitani.json +6 -6
- package/dist/capabilities/klavo.json +21 -21
- package/dist/capabilities/korouter.json +33 -33
- package/dist/capabilities/kunavo.json +9 -9
- package/dist/capabilities/liquid.json +8 -8
- package/dist/capabilities/lithosai.json +3 -3
- package/dist/capabilities/llmgateway-providers.json +932 -905
- package/dist/capabilities/llmgateway.json +343 -343
- package/dist/capabilities/llmtr.json +25 -25
- package/dist/capabilities/longcat.json +2 -2
- package/dist/capabilities/lowrouter.json +48 -48
- package/dist/capabilities/lyceum.json +13 -13
- package/dist/capabilities/melious.json +13 -13
- package/dist/capabilities/merge-gateway.json +294 -294
- package/dist/capabilities/meta.json +10 -10
- package/dist/capabilities/minimax-cn-coding-plan.json +6 -6
- package/dist/capabilities/minimax-coding-plan.json +6 -6
- package/dist/capabilities/mistral.json +20 -20
- package/dist/capabilities/mixlayer.json +3 -3
- package/dist/capabilities/modal.json +14 -14
- package/dist/capabilities/model-oracle-ai.json +19 -19
- package/dist/capabilities/modelis.json +19 -19
- package/dist/capabilities/modular.json +5 -5
- package/dist/capabilities/moneo.json +17 -17
- package/dist/capabilities/moonshotai-cn.json +5 -5
- package/dist/capabilities/moonshotai.json +5 -5
- package/dist/capabilities/morph.json +14 -14
- package/dist/capabilities/munito-eu.json +8 -8
- package/dist/capabilities/munito.json +10 -10
- package/dist/capabilities/nan.json +28 -28
- package/dist/capabilities/nano-gpt.json +597 -567
- package/dist/capabilities/nearai.json +89 -89
- package/dist/capabilities/nebius.json +40 -31
- package/dist/capabilities/neon.json +135 -135
- package/dist/capabilities/neuralwatt.json +39 -39
- package/dist/capabilities/nokeep.json +2 -2
- package/dist/capabilities/novita-ai.json +158 -158
- package/dist/capabilities/nvidia.json +35 -35
- package/dist/capabilities/oathbreaker.json +2 -2
- package/dist/capabilities/obscurify.json +26 -26
- package/dist/capabilities/oci.json +6 -6
- package/dist/capabilities/ofox.json +352 -352
- package/dist/capabilities/ollama-cloud.json +52 -52
- package/dist/capabilities/openai.json +49 -56
- package/dist/capabilities/opencode-go.json +82 -81
- package/dist/capabilities/openreason.json +5 -5
- package/dist/capabilities/openrouter.json +557 -567
- package/dist/capabilities/opper.json +28 -22
- package/dist/capabilities/orcarouter.json +230 -230
- package/dist/capabilities/outerlabs.json +33 -33
- package/dist/capabilities/ovhcloud.json +6 -6
- package/dist/capabilities/pareto.json +6 -6
- package/dist/capabilities/perplexity-agent.json +58 -58
- package/dist/capabilities/perplexity.json +2 -2
- package/dist/capabilities/phala.json +22 -22
- package/dist/capabilities/pioneer.json +30 -30
- package/dist/capabilities/poe.json +122 -122
- package/dist/capabilities/poolside.json +3 -3
- package/dist/capabilities/powerspring.json +10 -10
- package/dist/capabilities/primalabs.json +8 -8
- package/dist/capabilities/prime.json +114 -97
- package/dist/capabilities/privatemode-ai.json +11 -11
- package/dist/capabilities/proxystacks.json +7 -7
- package/dist/capabilities/qiniu-ai.json +13 -13
- package/dist/capabilities/refuseless.json +7 -7
- package/dist/capabilities/regolo-ai.json +6 -6
- package/dist/capabilities/requesty.json +172 -189
- package/dist/capabilities/ruapi.json +18 -18
- package/dist/capabilities/runcrate.json +17 -17
- package/dist/capabilities/runinfra.json +16 -16
- package/dist/capabilities/sakana.json +6 -6
- package/dist/capabilities/sambanova.json +4 -4
- package/dist/capabilities/sandbase.json +24 -24
- package/dist/capabilities/sarvam.json +12 -12
- package/dist/capabilities/scaleway.json +19 -19
- package/dist/capabilities/scnet-token-plan.json +10 -10
- package/dist/capabilities/scx-ai.json +23 -23
- package/dist/capabilities/sensenova.json +14 -14
- package/dist/capabilities/siliconflow-cn.json +64 -64
- package/dist/capabilities/siliconflow.json +63 -63
- package/dist/capabilities/snowflake-cortex.json +23 -23
- package/dist/capabilities/sokkan.json +12 -12
- package/dist/capabilities/sparrowcodes.json +23 -23
- package/dist/capabilities/standardcompute.json +83 -83
- package/dist/capabilities/steadyrouter.json +39 -39
- 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 +16 -16
- package/dist/capabilities/superbot-gg.json +4 -4
- package/dist/capabilities/synthetic.json +14 -14
- package/dist/capabilities/synthorai.json +29 -29
- package/dist/capabilities/teamorouter.json +26 -26
- package/dist/capabilities/teapot-router.json +13 -13
- package/dist/capabilities/tencent-coding-plan.json +2 -2
- package/dist/capabilities/tencent-token-plan.json +30 -30
- package/dist/capabilities/tencent-tokenhub.json +8 -8
- package/dist/capabilities/tensorx.json +45 -45
- package/dist/capabilities/tenstorrent.json +8 -8
- package/dist/capabilities/the-grid-ai.json +35 -35
- package/dist/capabilities/thinkingmachines.json +59 -59
- package/dist/capabilities/tinfoil.json +5 -5
- package/dist/capabilities/toapis.json +2 -2
- package/dist/capabilities/togetherai.json +59 -59
- package/dist/capabilities/tokengo.json +24 -24
- package/dist/capabilities/tokenify.json +9 -9
- package/dist/capabilities/trustedrouter.json +5 -5
- package/dist/capabilities/trustedtokens.json +18 -18
- package/dist/capabilities/umans-ai-coding-plan.json +18 -18
- package/dist/capabilities/umans-ai.json +15 -15
- package/dist/capabilities/uncensuredai.json +4 -4
- package/dist/capabilities/unrestricted.json +4 -4
- package/dist/capabilities/uplinkswitch.json +21 -21
- package/dist/capabilities/upstage.json +7 -7
- package/dist/capabilities/vancine.json +20 -20
- package/dist/capabilities/vercel.json +568 -576
- package/dist/capabilities/vivgrid.json +78 -78
- package/dist/capabilities/volcengine-coding-plan.json +30 -30
- package/dist/capabilities/volcengine.json +35 -35
- package/dist/capabilities/vultr.json +27 -27
- package/dist/capabilities/wafer.ai.json +16 -16
- 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 +26 -26
- package/dist/capabilities/xai.json +7 -7
- package/dist/capabilities/xiaomi-token-plan-ams.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-cn.json +3 -3
- package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -2
- package/dist/capabilities/xiaomi.json +6 -6
- package/dist/capabilities/xpersona.json +12 -12
- package/dist/capabilities/xxapi.json +31 -31
- package/dist/capabilities/zai-coding-plan.json +13 -13
- package/dist/capabilities/zai.json +27 -27
- package/dist/capabilities/zenifra.json +27 -27
- package/dist/capabilities/zenmux.json +195 -195
- package/dist/capabilities/zerogpu.json +12 -12
- package/dist/capabilities/zhipuai-coding-plan.json +8 -8
- package/dist/capabilities/zhipuai.json +27 -27
- package/dist/capabilities/zro.json +6 -6
- package/dist/channels/agent-channels.d.ts +11 -0
- package/dist/channels/chat-tools.d.ts +156 -0
- package/dist/channels/index.cjs +7 -2
- package/dist/channels/index.d.ts +2 -0
- package/dist/channels/index.js +3 -3
- package/dist/{channels-C5DxhFRc.js → channels-BRVCOutx.js} +1 -1
- package/dist/{channels-B57qQolh.cjs → channels-MjTA9bFp.cjs} +1 -1
- package/dist/coding-agent/index.cjs +4 -4
- package/dist/coding-agent/index.js +4 -4
- package/dist/{constants-DaBkXs5H.cjs → constants-B9ZDvXZ4.cjs} +41 -0
- package/dist/{constants-BDHIyN28.js → constants-BmdTvEYN.js} +30 -1
- 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 +2 -2
- package/dist/docs/assets/SOURCE_MAP.json +1309 -1304
- 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-durable-agents.md +9 -5
- package/dist/docs/references/docs-knowledge-agents-and-tools.md +1 -0
- package/dist/docs/references/docs-knowledge-load-your-content.md +1 -1
- package/dist/docs/references/docs-mastra-platform-observability-overview.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-workflows-overview.md +1 -1
- package/dist/docs/references/docs-workflows-scheduled-workflows.md +1 -1
- 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 +146 -24
- package/dist/docs/references/reference-agents-durable-agent.md +28 -2
- 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 +2 -2
- package/dist/docs/references/reference-knowledge-knowledge-tools.md +43 -20
- 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 +1 -1
- 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/evals/index.cjs +2 -2
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +2 -2
- package/dist/evals/scoreTraces/index.js +2 -2
- 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/{filesystem-CUj0vclS.cjs → filesystem-B0AZrbj8.cjs} +1 -1
- package/dist/{filesystem-BBqrAmKK.js → filesystem-B3s0WRud.js} +1 -1
- package/dist/{filesystem-B_HACoLS.js → filesystem-B5X-5G0x.js} +1 -1
- package/dist/{filesystem-pZNvxjuW.cjs → filesystem-BDSpwBke.cjs} +1 -1
- package/dist/{filesystem-5Z777gYZ.js → filesystem-BsdkC311.js} +1 -1
- package/dist/{filesystem-BNHPgtjJ.cjs → filesystem-C-cyJfi1.cjs} +1 -1
- package/dist/{filesystem-U5o28b5w.cjs → filesystem-CEbD_77-.cjs} +1 -1
- package/dist/{filesystem-yHKEz2Pr.cjs → filesystem-CUAgLugE.cjs} +1 -1
- package/dist/{filesystem-Cb8iTPM-.js → filesystem-Cv79mHRk.js} +1 -1
- package/dist/{filesystem-DhiaddZe.cjs → filesystem-DsCQiBl2.cjs} +1 -1
- package/dist/{filesystem-DSYDB3ek.js → filesystem-DzM9pcQ8.js} +1 -1
- package/dist/{filesystem-gpIfFMed.js → filesystem-DzfqVTO_.js} +1 -1
- package/dist/{filesystem-versioned-CxbiSJF-.js → filesystem-versioned-Bijb_p9l.js} +44 -44
- package/dist/harness/index.cjs +2 -2
- package/dist/harness/index.js +2 -2
- 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 +7720 -7720
- package/dist/llm/model/shared.types.d.ts +31 -0
- package/dist/{llm-B0VtQDgT.js → llm-Djd8Qzi0.js} +2 -2
- package/dist/{llm-ByskI6z3.cjs → llm-DmUucguC.cjs} +2 -2
- package/dist/loop/base-loop-builder.d.ts +60 -0
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/loop/loop-builder.d.ts +10 -32
- package/dist/loop/workflows/agentic-execution/index.d.ts +1 -1
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +2 -2
- package/dist/loop/workflows/agentic-loop/index.d.ts +1 -1
- package/dist/{manager-C2RGNH68.js → manager-CO_Xz2zR.js} +461 -95
- package/dist/{manager-BJKx4lQf.cjs → manager-D27PkIPo.cjs} +477 -93
- 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-zUTq9ilk.js → mastra-Ch00nEAJ.js} +66 -25
- package/dist/{mastra-FXCeC5rF.cjs → mastra-qsVWpOTi.cjs} +66 -25
- package/dist/memory/index.cjs +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/{model-BTNRPDgQ.js → model-CW-mfGYA.js} +1 -1
- package/dist/{model-BmTFNo62.cjs → model-Do6DTJoj.cjs} +1 -1
- package/dist/{netlify-B_XdjYPY.cjs → netlify-DU32SDT6.cjs} +1 -1
- package/dist/{netlify-BCSVhO5q.js → netlify-DZSAbdve.js} +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{output-helpers-CncZ3y-g.cjs → output-helpers-1Zu4Vt9C.cjs} +112 -69
- package/dist/{output-helpers-RlvE2WPA.js → output-helpers-CedRCE17.js} +113 -70
- package/dist/processor-provider/index.cjs +1 -1
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +2 -2
- package/dist/processors/index.js +2 -2
- package/dist/processors/processors/pii-detector.d.ts +1 -0
- package/dist/{provider-registry-Ble43Wb4.js → provider-registry-deA0x-Gd.js} +21349 -21338
- package/dist/{provider-registry-D8O1G18A.cjs → provider-registry-zGezZVsL.cjs} +21349 -21338
- package/dist/provider-registry.json +21695 -21680
- package/dist/{registry-generator-BQ1noftK.cjs → registry-generator-BkQ1AxZn.cjs} +1 -1
- package/dist/{registry-generator-D1Zslex6.js → registry-generator-VvBfOKAD.js} +1 -1
- package/dist/{rehydrate-CgxEur9m.js → rehydrate-BjLV643n.js} +2 -2
- package/dist/{rehydrate-BiA_HUJH.cjs → rehydrate-DDYFpQsV.cjs} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/{run-registry-aomba2_Z.cjs → run-registry-5Suldxz3.cjs} +83965 -77543
- package/dist/{run-registry-BUFmc_78.js → run-registry-CGRPldLH.js} +84057 -77017
- package/dist/{scheduler-BuivoTeD.js → scheduler-B-VZUvv_.js} +1 -1
- package/dist/{scheduler-COSuIH7R.cjs → scheduler-D00X03jQ.cjs} +1 -1
- package/dist/schedules/index.cjs +1 -1
- package/dist/schedules/index.js +1 -1
- package/dist/{schedules-Dmu9qOgc.js → schedules-DZfSx-7P.js} +94 -94
- package/dist/{signal-provider-CicwpNwY.cjs → signal-provider-BFAvh_AJ.cjs} +1 -1
- package/dist/{signal-provider-BOtSN-_0.js → signal-provider-BslnAjWG.js} +1 -1
- package/dist/signals/index.cjs +3 -3
- package/dist/signals/index.js +3 -3
- package/dist/{signals-6EBDPHQX.cjs → signals-B1JSj-Ew.cjs} +2 -2
- package/dist/{signals-BH__LS8Y.js → signals-De9VnwL2.js} +2 -2
- package/dist/skills/index.cjs +2 -2
- package/dist/skills/index.js +2 -2
- package/dist/{source-8qxr6KJv.cjs → source-DDwx-87N.cjs} +1 -1
- package/dist/{source-DRqDgbCv.js → source-Did_2XQc.js} +1 -1
- package/dist/{state-processor-BRk8t1OR.js → state-processor-B9kxpM53.js} +140 -140
- package/dist/{state-processor-Bfs9LkY8.cjs → state-processor-kRNZ38Nf.cjs} +139 -139
- package/dist/storage/constants.cjs +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/agents/index.cjs +1 -1
- package/dist/storage/domains/agents/index.js +1 -1
- package/dist/storage/domains/knowledge/base.d.ts +5 -0
- package/dist/storage/domains/knowledge/inmemory.d.ts +1 -0
- package/dist/storage/domains/knowledge/pages.d.ts +24 -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/memory/base.d.ts +3 -1
- package/dist/storage/domains/memory/observational-memory-lifecycle.d.ts +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 +12 -11
- package/dist/storage/index.js +12 -12
- package/dist/storage/types.d.ts +13 -0
- package/dist/stream/base/output.d.ts +42 -15
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/stream/types.d.ts +19 -0
- package/dist/{stream-S_NC5v9e.js → stream-Dpwx0whf.js} +1 -1
- package/dist/{stream-DUrp3Fcy.cjs → stream-Dvy_0o14.cjs} +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-BhCzpGfr.js → tool-loop-agent-PbWrEj1k.js} +3 -3
- package/dist/{tool-loop-agent-DU0BiemT.cjs → tool-loop-agent-UxOv3FoK.cjs} +3 -3
- package/dist/tools/index.cjs +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/types.d.ts +27 -1
- package/dist/{utils-CeEt4K7t.cjs → utils-BbMTlyBO.cjs} +1 -1
- package/dist/{utils-DYIai19q.js → utils-BnNi1BYM.js} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-BRikrNhF.js → validate-HSBcm96b.js} +1 -1
- package/dist/{validate-BckgxuJ0.cjs → validate-Skps-cM3.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.js +1 -1
- package/dist/{worker-BfhUD77l.cjs → worker-BE-0DyKL.cjs} +3 -3
- package/dist/{worker-DcBfwJqD.js → worker-BKrKHZzU.js} +3 -3
- package/dist/{worker-D9WwmcJa.cjs → worker-BNS5A3qP.cjs} +3 -3
- package/dist/{worker-Du5ybt5o.js → worker-DehaD4qD.js} +3 -3
- package/dist/{workflow-BWV5m9Mx.cjs → workflow-BjUTwaK9.cjs} +4 -4
- package/dist/{workflow-jNWVBYDJ.js → workflow-Bvw6yDjc.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 +11 -1
- package/dist/workflows/index.cjs +6 -6
- package/dist/workflows/index.js +6 -6
- package/dist/workflows/workflow.d.ts +6 -1
- package/dist/workspace/index.cjs +2 -2
- package/dist/workspace/index.js +2 -2
- package/dist/{workspace-D7JRhn1Z.js → workspace-C05xDH60.js} +564 -411
- package/dist/{workspace-BQ2wZj5D.cjs → workspace-D1OzzlLw.cjs} +564 -411
- package/dist/{workspace-skills-CGiXfKzA.js → workspace-skills-38OY32_b.js} +531 -531
- package/package.json +6 -6
- package/src/llm/model/provider-types.generated.d.ts +7720 -7720
- package/dist/agent/durable/evented-execution-engine.d.ts +0 -20
- package/dist/{filesystem-versioned-D-OCaYSl.cjs → filesystem-versioned-DZGyPbNC.cjs} +43 -43
- package/dist/{schedules-qIHUKsj4.cjs → schedules-BZS8McF7.cjs} +93 -93
- package/dist/{workspace-skills-CUSjYHdi.cjs → workspace-skills-BcquhPDn.cjs} +530 -530
package/dist/stream/types.d.ts
CHANGED
|
@@ -158,12 +158,25 @@ export interface MastraMetadata {
|
|
|
158
158
|
workflowFullState?: ReadonlyJSONObject;
|
|
159
159
|
selectionReason?: string;
|
|
160
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Data of a tool call chunk: what the model asked to run. Found at `chunk.payload` for
|
|
163
|
+
* `tool-call` chunks, e.g. `result.toolCalls[i].payload` from `agent.generate()`.
|
|
164
|
+
*
|
|
165
|
+
* - `toolName` / `args`: the tool the model picked and the input it passed.
|
|
166
|
+
* - `toolCallId`: matches the `toolCallId` of the corresponding {@link ToolResultPayload}.
|
|
167
|
+
* - The tool's return value is not here; read it from the matching tool result's
|
|
168
|
+
* `payload.result` (`result.toolResults`).
|
|
169
|
+
*/
|
|
161
170
|
export interface ToolCallPayload<TArgs = unknown, TOutput = unknown> {
|
|
171
|
+
/** Unique ID for this call; the matching tool result has the same `toolCallId`. */
|
|
162
172
|
toolCallId: string;
|
|
173
|
+
/** Name (key) of the tool the model called. */
|
|
163
174
|
toolName: string;
|
|
175
|
+
/** Input the model passed to the tool. */
|
|
164
176
|
args?: TArgs & {
|
|
165
177
|
__mastraMetadata?: MastraMetadata;
|
|
166
178
|
};
|
|
179
|
+
/** True when the provider ran the tool itself (e.g. a provider-hosted search tool). */
|
|
167
180
|
providerExecuted?: boolean;
|
|
168
181
|
providerMetadata?: ProviderMetadata;
|
|
169
182
|
output?: TOutput;
|
|
@@ -182,9 +195,15 @@ export interface ToolCallPayload<TArgs = unknown, TOutput = unknown> {
|
|
|
182
195
|
*/
|
|
183
196
|
observability?: ClientObservabilityCarrier;
|
|
184
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* Data of a tool result chunk: what a tool returned. Found at `chunk.payload` for
|
|
200
|
+
* `tool-result` chunks, e.g. `result.toolResults[i].payload` from `agent.generate()`.
|
|
201
|
+
* `result` is the tool's return value; `toolCallId` links it to its {@link ToolCallPayload}.
|
|
202
|
+
*/
|
|
185
203
|
export interface ToolResultPayload<TResult = unknown, TArgs = unknown> {
|
|
186
204
|
toolCallId: string;
|
|
187
205
|
toolName: string;
|
|
206
|
+
/** The value the tool returned. */
|
|
188
207
|
result: TResult;
|
|
189
208
|
isError?: boolean;
|
|
190
209
|
providerExecuted?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-tIEjjQTE.js";
|
|
2
|
-
import { d as attachModelStreamTransport, f as isDataChunk, i as resolveModelConfig, p as readModelStreamTransport } from "./llm-
|
|
2
|
+
import { d as attachModelStreamTransport, f as isDataChunk, i as resolveModelConfig, p as readModelStreamTransport } from "./llm-Djd8Qzi0.js";
|
|
3
3
|
import { B as getResponseProviderItemIdFromPart, G as RESPONSE_ITEM_ID_PROVIDERS, K as RESPONSE_RESULT_ITEM_ID_KEY, f as coreContentToString, n as MessageList, p as messagesAreEqual, t as convertMessages } from "./message-list-DEuRl82K.js";
|
|
4
4
|
import { S as resolveObservabilityContext, x as createObservabilityContext } from "./observability-D7RNOAPx.js";
|
|
5
5
|
import { t as MastraBase } from "./base-CKLWBhDo.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-BrhgMLW6.cjs");
|
|
2
|
-
const require_llm = require("./llm-
|
|
2
|
+
const require_llm = require("./llm-DmUucguC.cjs");
|
|
3
3
|
const require_message_list = require("./message-list-DPXPXvin.cjs");
|
|
4
4
|
const require_observability = require("./observability-B0R_D1PZ.cjs");
|
|
5
5
|
const require_base = require("./base-BIzR1D3_.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("../rolldown-runtime-BrhgMLW6.cjs");
|
|
3
3
|
const require_dist = require("../dist-CXeCeeW7.cjs");
|
|
4
|
-
const require_model = require("../model-
|
|
4
|
+
const require_model = require("../model-Do6DTJoj.cjs");
|
|
5
5
|
const require_model$1 = require("../model-jBymoqGa.cjs");
|
|
6
6
|
let stream = require("stream");
|
|
7
7
|
let module$1 = require("module");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as simulateReadableStream } from "../dist-D3cKCUe-.js";
|
|
2
|
-
import { t as MastraLLMV1 } from "../model-
|
|
2
|
+
import { t as MastraLLMV1 } from "../model-CW-mfGYA.js";
|
|
3
3
|
import { t as AISDKV5LanguageModel } from "../model-DS-b2R-R.js";
|
|
4
4
|
import { createRequire } from "module";
|
|
5
5
|
import { Readable } from "stream";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_tool_loop_agent = require("../tool-loop-agent-
|
|
2
|
+
const require_tool_loop_agent = require("../tool-loop-agent-UxOv3FoK.cjs");
|
|
3
3
|
exports.getSettings = require_tool_loop_agent.getSettings;
|
|
4
4
|
exports.isToolLoopAgentLike = require_tool_loop_agent.isToolLoopAgentLike;
|
|
5
5
|
exports.toolLoopAgentToMastraAgent = require_tool_loop_agent.toolLoopAgentToMastraAgent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as getSettings, r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "../tool-loop-agent-
|
|
1
|
+
export { n as getSettings, r as isToolLoopAgentLike, t as toolLoopAgentToMastraAgent } from "../tool-loop-agent-PbWrEj1k.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { m as generateId } from "./dist-TPVqg8oV.js";
|
|
2
|
-
import {
|
|
3
|
-
import { rn as isSupportedLanguageModel } from "./stream-
|
|
4
|
-
import { i as resolveModelConfig } from "./llm-
|
|
2
|
+
import { P as Agent } from "./run-registry-CGRPldLH.js";
|
|
3
|
+
import { rn as isSupportedLanguageModel } from "./stream-Dpwx0whf.js";
|
|
4
|
+
import { i as resolveModelConfig } from "./llm-Djd8Qzi0.js";
|
|
5
5
|
import { N as ToolLoopAgent } from "./message-list-DEuRl82K.js";
|
|
6
6
|
// src/tool-loop-agent/utils.ts
|
|
7
7
|
function isToolLoopAgentLike(obj) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_dist = require("./dist-P2rjrlmj.cjs");
|
|
2
|
-
const require_run_registry = require("./run-registry-
|
|
3
|
-
const require_stream = require("./stream-
|
|
4
|
-
const require_llm = require("./llm-
|
|
2
|
+
const require_run_registry = require("./run-registry-5Suldxz3.cjs");
|
|
3
|
+
const require_stream = require("./stream-Dvy_0o14.cjs");
|
|
4
|
+
const require_llm = require("./llm-DmUucguC.cjs");
|
|
5
5
|
const require_message_list = require("./message-list-DPXPXvin.cjs");
|
|
6
6
|
// src/tool-loop-agent/utils.ts
|
|
7
7
|
function isToolLoopAgentLike(obj) {
|
package/dist/tools/index.cjs
CHANGED
|
@@ -3,8 +3,8 @@ const require_payload_transform = require("../payload-transform-CWgnsO9w.cjs");
|
|
|
3
3
|
const require_tool = require("../tool-CYlT2UA-.cjs");
|
|
4
4
|
const require_toolchecks = require("../toolchecks-MFU48cit.cjs");
|
|
5
5
|
const require_stream = require("../stream-BGbj9jAU.cjs");
|
|
6
|
+
const require_state_processor = require("../state-processor-kRNZ38Nf.cjs");
|
|
6
7
|
const require_tools = require("../tools-CGF5Ik6j.cjs");
|
|
7
|
-
const require_state_processor = require("../state-processor-Bfs9LkY8.cjs");
|
|
8
8
|
exports.DEFAULT_GOAL_JUDGE_PROMPT = require_state_processor.DEFAULT_GOAL_JUDGE_PROMPT;
|
|
9
9
|
exports.DEFAULT_GOAL_MAX_RUNS = require_state_processor.DEFAULT_GOAL_MAX_RUNS;
|
|
10
10
|
exports.FRAME_PREFIX = require_tools.FRAME_PREFIX;
|
package/dist/tools/index.js
CHANGED
|
@@ -2,6 +2,6 @@ import { n as hasTransformedToolPayload, t as getTransformedToolPayload } from "
|
|
|
2
2
|
import { d as validateToolOutput, m as noopObserve, n as Tool, o as getValidationIssuePaths, r as createTool, s as isValidationError, t as MASTRA_TOOL_MARKER, u as validateToolInput } from "../tool-Z3bykc1m.js";
|
|
3
3
|
import { c as isProviderDefinedTool, l as isProviderTool, u as isVercelTool } from "../toolchecks-DrsZdc3S.js";
|
|
4
4
|
import { t as ToolStream } from "../stream-D9JOykz7.js";
|
|
5
|
+
import { A as writeObjective, C as GOAL_STATE_TYPE, D as readObjective, E as getObjectiveFromRequestContext, O as resolveEffectiveGoalSettings, S as GOAL_STATE_ID, a as TASK_STATE_TYPE, c as formatTaskListResult, d as summarizeTaskCheck, f as taskCheckTool, h as taskWriteTool, i as TASKS_STATE_ID, k as resolveGoalStore, l as getTasksFromRequestContext, m as taskUpdateTool, n as TaskStateProcessor, o as assignTaskIds, p as taskCompleteTool, r as TASKS_REQUEST_CONTEXT_KEY, s as demoteExtraInProgress, t as GoalStateProcessor, u as hasMultipleInProgress, v as DEFAULT_GOAL_JUDGE_PROMPT, w as clearObjective, y as DEFAULT_GOAL_MAX_RUNS } from "../state-processor-B9kxpM53.js";
|
|
5
6
|
import { _ as jsonSchemaToTsString, a as webSearchTool, c as formatQuestionAnswer, d as StdioCodeModeTransport, f as FRAME_PREFIX, g as generateStubs, h as createCodeModeInstructions, l as createCodeMode, m as buildRunner, o as webFetchTool, p as buildProgramModule, s as askUserTool, t as submitPlanTool, u as createCodeModeTool, v as sanitizeToolId } from "../tools-CDfyMpzN.js";
|
|
6
|
-
import { A as taskWriteTool, C as formatTaskListResult, D as taskCheckTool, E as summarizeTaskCheck, O as taskCompleteTool, S as demoteExtraInProgress, T as hasMultipleInProgress, _ as TaskStateProcessor, a as DEFAULT_GOAL_MAX_RUNS, b as TASK_STATE_TYPE, c as GOAL_STATE_ID, f as getObjectiveFromRequestContext, g as writeObjective, h as resolveGoalStore, i as DEFAULT_GOAL_JUDGE_PROMPT, k as taskUpdateTool, l as GOAL_STATE_TYPE, m as resolveEffectiveGoalSettings, p as readObjective, t as GoalStateProcessor, u as clearObjective, v as TASKS_REQUEST_CONTEXT_KEY, w as getTasksFromRequestContext, x as assignTaskIds, y as TASKS_STATE_ID } from "../state-processor-BRk8t1OR.js";
|
|
7
7
|
export { DEFAULT_GOAL_JUDGE_PROMPT, DEFAULT_GOAL_MAX_RUNS, FRAME_PREFIX, GOAL_STATE_ID, GOAL_STATE_TYPE, GoalStateProcessor, MASTRA_TOOL_MARKER, StdioCodeModeTransport, TASKS_REQUEST_CONTEXT_KEY, TASKS_STATE_ID, TASK_STATE_TYPE, TaskStateProcessor, Tool, ToolStream, askUserTool, assignTaskIds, buildProgramModule, buildRunner, clearObjective, createCodeMode, createCodeModeInstructions, createCodeModeTool, createTool, demoteExtraInProgress, formatQuestionAnswer, formatTaskListResult, generateStubs, getObjectiveFromRequestContext, getTasksFromRequestContext, getTransformedToolPayload, getValidationIssuePaths, hasMultipleInProgress, hasTransformedToolPayload, isProviderDefinedTool, isProviderTool, isValidationError, isVercelTool, jsonSchemaToTsString, noopObserve, readObjective, resolveEffectiveGoalSettings, resolveGoalStore, sanitizeToolId, submitPlanTool, summarizeTaskCheck, taskCheckTool, taskCompleteTool, taskUpdateTool, taskWriteTool, validateToolInput, validateToolOutput, webFetchTool, webSearchTool, writeObjective };
|
package/dist/tools/types.d.ts
CHANGED
|
@@ -622,7 +622,33 @@ export type ToolExecuteCallContext<TContext> = Omit<TContext, 'observe'> & {
|
|
|
622
622
|
export type ToolExecuteContext<TContext, TRequestContext extends Record<string, any> | unknown = unknown> = Omit<TContext, 'requestContext'> & {
|
|
623
623
|
requestContext: RequestContext<TRequestContext>;
|
|
624
624
|
};
|
|
625
|
-
/**
|
|
625
|
+
/**
|
|
626
|
+
* The `execute` callback of `createTool({ execute })` / `new Tool(...)`: called as
|
|
627
|
+
* `execute(inputData, context)`.
|
|
628
|
+
*
|
|
629
|
+
* - `inputData`: the tool input, already validated against `inputSchema` (the callback is not
|
|
630
|
+
* called when validation fails; the caller gets a `ValidationError` instead). It is the
|
|
631
|
+
* input object itself, not wrapped in `{ context }`.
|
|
632
|
+
* - `context`: runtime context — `requestContext` (always present), `mastra`, `abortSignal`,
|
|
633
|
+
* `writer` (stream custom data), `workspace`, `observe`, and `agent` (`toolCallId`,
|
|
634
|
+
* `threadId`, `resourceId`, `suspend`, `resumeData`) when an agent runs the tool, or
|
|
635
|
+
* `workflow` when a workflow step does.
|
|
636
|
+
* - Return the tool output (validated against `outputSchema` when set).
|
|
637
|
+
*
|
|
638
|
+
* @example
|
|
639
|
+
* ```ts
|
|
640
|
+
* createTool({
|
|
641
|
+
* id: 'get-weather',
|
|
642
|
+
* description: 'Get the weather for a city',
|
|
643
|
+
* inputSchema: z.object({ city: z.string() }),
|
|
644
|
+
* execute: async ({ city }, { requestContext, abortSignal }) => {
|
|
645
|
+
* return { city, temperature: 21 };
|
|
646
|
+
* },
|
|
647
|
+
* });
|
|
648
|
+
* ```
|
|
649
|
+
*
|
|
650
|
+
* @see [createTool() reference](https://mastra.ai/reference/tools/create-tool)
|
|
651
|
+
*/
|
|
626
652
|
export type ToolExecuteFunction<TSchemaIn, TSchemaOut, TContext, TRequestContext extends Record<string, any> | unknown = unknown> = (inputData: TSchemaIn, context: ToolExecuteContext<TContext, TRequestContext>) => Promise<TSchemaOut | ValidationError | void>;
|
|
627
653
|
export interface ToolAction<TSchemaIn, TSchemaOut, TSuspend = unknown, TResume = unknown, TContext extends ToolExecutionContext<TSuspend, TResume, any> = ToolExecutionContext<TSuspend, TResume>, TId extends string = string, TRequestContext extends Record<string, any> | unknown = unknown> {
|
|
628
654
|
id: TId;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_error = require("./error-D90lJ6M7.cjs");
|
|
2
2
|
const require_tool = require("./tool-CYlT2UA-.cjs");
|
|
3
3
|
const require_ee_iTj2bRDt = require("./ee-iTj2bRDt-D3-QLGDF.cjs");
|
|
4
|
-
const require_background_tasks = require("./background-tasks-
|
|
4
|
+
const require_background_tasks = require("./background-tasks-7iftnRK_.cjs");
|
|
5
5
|
const require_base = require("./base-BIzR1D3_.cjs");
|
|
6
6
|
const require_observability = require("./observability-B0R_D1PZ.cjs");
|
|
7
7
|
const require_utils = require("./utils-D-eNsgDM.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as MastraError, n as ErrorDomain, o as getErrorFromUnknown, t as ErrorCategory } from "./error-oh2DLsP2.js";
|
|
2
2
|
import { c as registerToolOutputValidationSchema, d as validateToolOutput, f as validateToolSuspendData, h as markBuilderValidatedInput, i as createStandardSchemaIssuesError, n as Tool, o as getValidationIssuePaths, p as createToolObserve, s as isValidationError, u as validateToolInput } from "./tool-Z3bykc1m.js";
|
|
3
3
|
import { i as MastraFGAPermissions } from "./ee-iTj2bRDt-By_B9ngH.js";
|
|
4
|
-
import { i as isToolBackgroundEligible, n as backgroundOverrideJsonSchema, r as backgroundOverrideZodSchema } from "./background-tasks-
|
|
4
|
+
import { i as isToolBackgroundEligible, n as backgroundOverrideJsonSchema, r as backgroundOverrideZodSchema } from "./background-tasks-Cv1ecD6S.js";
|
|
5
5
|
import { t as MastraBase } from "./base-CKLWBhDo.js";
|
|
6
6
|
import { O as executionFailureTermination, b as wrapMastra, x as createObservabilityContext } from "./observability-D7RNOAPx.js";
|
|
7
7
|
import { a as getOrCreateSpan, t as executeWithContext } from "./utils-DU_pU5SK.js";
|
package/dist/utils.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
|
|
|
4
4
|
const require_zod_utils = require("./zod-utils-Cl5jw5N_.cjs");
|
|
5
5
|
const require_fetchWithRetry = require("./fetchWithRetry-f5k4p7_1.cjs");
|
|
6
6
|
const require_dynamic_argument = require("./dynamic-argument-CUc1BBOS.cjs");
|
|
7
|
-
const require_utils = require("./utils-
|
|
7
|
+
const require_utils = require("./utils-BbMTlyBO.cjs");
|
|
8
8
|
exports.boundedStringify = require_utils_safe_stringify.boundedStringify;
|
|
9
9
|
exports.checkEvalStorageFields = require_utils.checkEvalStorageFields;
|
|
10
10
|
exports.createMastraProxy = require_utils.createMastraProxy;
|
package/dist/utils.js
CHANGED
|
@@ -3,5 +3,5 @@ import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
|
|
|
3
3
|
import { a as isZodObject, i as isZodArray, r as getZodTypeName, t as getZodDef } from "./zod-utils-BDDS_mxU.js";
|
|
4
4
|
import { t as fetchWithRetry } from "./fetchWithRetry-DFSvpYDT.js";
|
|
5
5
|
import { n as resolveDynamicArgument, t as getRequestUser } from "./dynamic-argument-BzPK3qPN.js";
|
|
6
|
-
import { C as setNestedValue, S as selectFields, _ as parseSqlIdentifier, a as ensureToolProperties, b as removeUndefinedValues, c as isCoreMessage, d as makeCoreTool, f as makeCoreToolV5, g as parseFieldKey, h as omitKeys, i as delay, l as isUiMessage, m as maskStreamTags, n as createMastraProxy, o as generateEmptyFromSchema, p as makeProcessorCoreTool, r as deepMerge, s as getNestedValue, t as checkEvalStorageFields, u as isZodType, v as readPositiveIntEnv, x as resolveSerializedZodOutput, y as rebindProcessorTools } from "./utils-
|
|
6
|
+
import { C as setNestedValue, S as selectFields, _ as parseSqlIdentifier, a as ensureToolProperties, b as removeUndefinedValues, c as isCoreMessage, d as makeCoreTool, f as makeCoreToolV5, g as parseFieldKey, h as omitKeys, i as delay, l as isUiMessage, m as maskStreamTags, n as createMastraProxy, o as generateEmptyFromSchema, p as makeProcessorCoreTool, r as deepMerge, s as getNestedValue, t as checkEvalStorageFields, u as isZodType, v as readPositiveIntEnv, x as resolveSerializedZodOutput, y as rebindProcessorTools } from "./utils-BnNi1BYM.js";
|
|
7
7
|
export { boundedStringify, checkEvalStorageFields, createMastraProxy, deepEqual, deepMerge, delay, ensureSerializable, ensureToolProperties, fetchWithRetry, generateEmptyFromSchema, getNestedValue, getRequestUser, getZodDef, getZodTypeName, isBoundedSerializable, isCoreMessage, isUiMessage, isZodArray, isZodObject, isZodType, makeCoreTool, makeCoreToolV5, makeProcessorCoreTool, maskStreamTags, omitKeys, parseFieldKey, parseSqlIdentifier, readPositiveIntEnv, rebindProcessorTools, removeUndefinedValues, resolveDynamicArgument, resolveSerializedZodOutput, safeStringify, selectFields, setNestedValue };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { standardSchemaToJSONSchema, toStandardSchema } from "./schema/index.js";
|
|
2
|
-
import { bt as validateTemplate, gt as collectTemplateStepIds } from "./stream-
|
|
2
|
+
import { bt as validateTemplate, gt as collectTemplateStepIds } from "./stream-Dpwx0whf.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
// src/workflows/dynamic/graph.ts
|
|
5
5
|
/**
|
package/dist/vector/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_base = require("../base-BIzR1D3_.cjs");
|
|
3
3
|
const require_error = require("../error-D90lJ6M7.cjs");
|
|
4
|
-
const require_run_registry = require("../run-registry-
|
|
4
|
+
const require_run_registry = require("../run-registry-5Suldxz3.cjs");
|
|
5
5
|
const require_message_list = require("../message-list-DPXPXvin.cjs");
|
|
6
6
|
const require_dist = require("../dist-P2rjrlmj.cjs");
|
|
7
7
|
const require_dist$1 = require("../dist-CXeCeeW7.cjs");
|
package/dist/vector/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as MastraBase } from "../base-CKLWBhDo.js";
|
|
2
2
|
import { i as MastraError, n as ErrorDomain, t as ErrorCategory } from "../error-oh2DLsP2.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ia as createVectorErrorId, un as embed$3 } from "../run-registry-CGRPldLH.js";
|
|
4
4
|
import { P as embed$2 } from "../message-list-DEuRl82K.js";
|
|
5
5
|
import { r as embed$1 } from "../dist-TPVqg8oV.js";
|
|
6
6
|
import { n as embed } from "../dist-D3cKCUe-.js";
|
package/dist/worker/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_worker = require("../worker-
|
|
2
|
+
const require_worker = require("../worker-BE-0DyKL.cjs");
|
|
3
3
|
exports.BackgroundTaskWorker = require_worker.BackgroundTaskWorker;
|
|
4
4
|
exports.HttpRemoteStrategy = require_worker.HttpRemoteStrategy;
|
|
5
5
|
exports.InProcessStrategy = require_worker.InProcessStrategy;
|
package/dist/worker/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as BackgroundTaskWorker, o as HttpRemoteStrategy, t as InProcessStrategy, c as MastraWorker, i as OrchestrationWorker, a as PullTransport, r as SchedulerWorker, s as StepExecutionError } from "../worker-
|
|
1
|
+
export { n as BackgroundTaskWorker, o as HttpRemoteStrategy, t as InProcessStrategy, c as MastraWorker, i as OrchestrationWorker, a as PullTransport, r as SchedulerWorker, s as StepExecutionError } from "../worker-DehaD4qD.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_run_registry = require("./run-registry-
|
|
2
|
-
const require_scheduler = require("./scheduler-
|
|
3
|
-
const require_background_tasks = require("./background-tasks-
|
|
1
|
+
const require_run_registry = require("./run-registry-5Suldxz3.cjs");
|
|
2
|
+
const require_scheduler = require("./scheduler-D00X03jQ.cjs");
|
|
3
|
+
const require_background_tasks = require("./background-tasks-7iftnRK_.cjs");
|
|
4
4
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
5
5
|
// src/worker/worker.ts
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { x as resolveAgentById } from "./run-registry-CGRPldLH.js";
|
|
2
2
|
import { u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
3
|
-
import { a as PullTransport, c as MastraWorker } from "./worker-
|
|
4
|
-
import { l as parseFsAgentScheduleRowId } from "./schedules-
|
|
3
|
+
import { a as PullTransport, c as MastraWorker } from "./worker-DehaD4qD.js";
|
|
4
|
+
import { l as parseFsAgentScheduleRowId } from "./schedules-DZfSx-7P.js";
|
|
5
5
|
// src/schedules/worker.ts
|
|
6
6
|
/** PubSub topic on which the scheduler publishes `agent-schedule.fire` events. */
|
|
7
7
|
const TOPIC_AGENT_SCHEDULES = "agent-schedules";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_run_registry = require("./run-registry-
|
|
1
|
+
const require_run_registry = require("./run-registry-5Suldxz3.cjs");
|
|
2
2
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
3
|
-
const require_worker = require("./worker-
|
|
4
|
-
const require_schedules = require("./schedules-
|
|
3
|
+
const require_worker = require("./worker-BE-0DyKL.cjs");
|
|
4
|
+
const require_schedules = require("./schedules-BZS8McF7.cjs");
|
|
5
5
|
// src/schedules/worker.ts
|
|
6
6
|
/** PubSub topic on which the scheduler publishes `agent-schedule.fire` events. */
|
|
7
7
|
const TOPIC_AGENT_SCHEDULES = "agent-schedules";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as Scheduler } from "./scheduler-
|
|
3
|
-
import { s as BackgroundTaskManager } from "./background-tasks-
|
|
1
|
+
import { As as StepExecutor, cl as waitMs, ec as getNestedWorkflow, js as computeScheduleDefinitionHash, ks as WorkflowEventProcessor, sl as assertDrainTimeout, tc as getStepEntry, x as resolveAgentById } from "./run-registry-CGRPldLH.js";
|
|
2
|
+
import { t as Scheduler } from "./scheduler-B-VZUvv_.js";
|
|
3
|
+
import { s as BackgroundTaskManager } from "./background-tasks-Cv1ecD6S.js";
|
|
4
4
|
import { u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
5
5
|
// src/worker/worker.ts
|
|
6
6
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_stream = require("./stream-
|
|
1
|
+
const require_stream = require("./stream-Dvy_0o14.cjs");
|
|
2
2
|
require("./utils-D-eNsgDM.cjs");
|
|
3
|
-
const require_output_helpers = require("./output-helpers-
|
|
4
|
-
const require_run_registry = require("./run-registry-
|
|
5
|
-
const require_background_tasks = require("./background-tasks-
|
|
3
|
+
const require_output_helpers = require("./output-helpers-1Zu4Vt9C.cjs");
|
|
4
|
+
const require_run_registry = require("./run-registry-5Suldxz3.cjs");
|
|
5
|
+
const require_background_tasks = require("./background-tasks-7iftnRK_.cjs");
|
|
6
6
|
let zod = require("zod");
|
|
7
7
|
// src/background-tasks/workflow.ts
|
|
8
8
|
const inputSchema = zod.z.object({ taskId: zod.z.string() });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { in as resolveSuspendedToolRunId } from "./stream-
|
|
1
|
+
import { in as resolveSuspendedToolRunId } from "./stream-Dpwx0whf.js";
|
|
2
2
|
import "./utils-DU_pU5SK.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as BACKGROUND_TASK_WORKFLOW_ID } from "./background-tasks-
|
|
3
|
+
import { p as slimProgressChunk } from "./output-helpers-CedRCE17.js";
|
|
4
|
+
import { Ss as createWorkflow, ac as createStep } from "./run-registry-CGRPldLH.js";
|
|
5
|
+
import { c as BACKGROUND_TASK_WORKFLOW_ID } from "./background-tasks-Cv1ecD6S.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
// src/background-tasks/workflow.ts
|
|
8
8
|
const inputSchema = z.object({ taskId: z.string() });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_builder = require("../../builder-
|
|
2
|
+
const require_builder = require("../../builder-DuJBbQDH.cjs");
|
|
3
3
|
exports.WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS = require_builder.WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS;
|
|
4
4
|
exports.WORKFLOW_BUILDER_AUTHORING_PLAYBOOK = require_builder.WORKFLOW_BUILDER_AUTHORING_PLAYBOOK;
|
|
5
5
|
exports.WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION = require_builder.WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { U as WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS, W as WORKFLOW_BUILDER_AUTHORING_PLAYBOOK, i as WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION, t as WORKFLOW_BUILDER_SUPPORTED_STEP_TYPES, B as compareWorkflowBuilderSchemas, r as createWorkflowBuilderAgent, a as deleteStoredWorkflowResponseSchema, V as inspectWorkflowBuilderSchemas, o as listStoredWorkflowsResponseSchema, n as normalizeWorkflowBuilderDefinition, H as preflightWorkflowDefinition, s as storedWorkflowDefinitionSchema, c as upsertStoredWorkflowResponseSchema, l as workflowBuilderAgentEntryInputSchema, u as workflowBuilderAgentEntrySchema, d as workflowBuilderClassifierEntryInputSchema, f as workflowBuilderClassifierEntrySchema, p as workflowBuilderConditionalEntryInputSchema, m as workflowBuilderConditionalEntrySchema, h as workflowBuilderDefinitionInputSchema, g as workflowBuilderDefinitionSchema, _ as workflowBuilderForeachEntryInputSchema, v as workflowBuilderForeachEntrySchema, y as workflowBuilderGraphEntryInputSchema, b as workflowBuilderGraphEntrySchema, x as workflowBuilderLoopEntryInputSchema, S as workflowBuilderLoopEntrySchema, C as workflowBuilderMappingConfigSchema, w as workflowBuilderMappingDescriptorSchema, T as workflowBuilderMappingEntryInputSchema, E as workflowBuilderMappingEntrySchema, D as workflowBuilderNestedWorkflowEntryInputSchema, O as workflowBuilderNestedWorkflowEntrySchema, k as workflowBuilderParallelEntryInputSchema, A as workflowBuilderParallelEntrySchema, j as workflowBuilderPredicateSchema, M as workflowBuilderScheduleConfigSchema, N as workflowBuilderScheduleSchema, P as workflowBuilderSleepEntryInputSchema, F as workflowBuilderSleepEntrySchema, I as workflowBuilderSleepUntilEntryInputSchema, L as workflowBuilderSleepUntilEntrySchema, R as workflowBuilderToolEntryInputSchema, z as workflowBuilderToolEntrySchema } from "../../builder-
|
|
1
|
+
export { U as WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS, W as WORKFLOW_BUILDER_AUTHORING_PLAYBOOK, i as WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION, t as WORKFLOW_BUILDER_SUPPORTED_STEP_TYPES, B as compareWorkflowBuilderSchemas, r as createWorkflowBuilderAgent, a as deleteStoredWorkflowResponseSchema, V as inspectWorkflowBuilderSchemas, o as listStoredWorkflowsResponseSchema, n as normalizeWorkflowBuilderDefinition, H as preflightWorkflowDefinition, s as storedWorkflowDefinitionSchema, c as upsertStoredWorkflowResponseSchema, l as workflowBuilderAgentEntryInputSchema, u as workflowBuilderAgentEntrySchema, d as workflowBuilderClassifierEntryInputSchema, f as workflowBuilderClassifierEntrySchema, p as workflowBuilderConditionalEntryInputSchema, m as workflowBuilderConditionalEntrySchema, h as workflowBuilderDefinitionInputSchema, g as workflowBuilderDefinitionSchema, _ as workflowBuilderForeachEntryInputSchema, v as workflowBuilderForeachEntrySchema, y as workflowBuilderGraphEntryInputSchema, b as workflowBuilderGraphEntrySchema, x as workflowBuilderLoopEntryInputSchema, S as workflowBuilderLoopEntrySchema, C as workflowBuilderMappingConfigSchema, w as workflowBuilderMappingDescriptorSchema, T as workflowBuilderMappingEntryInputSchema, E as workflowBuilderMappingEntrySchema, D as workflowBuilderNestedWorkflowEntryInputSchema, O as workflowBuilderNestedWorkflowEntrySchema, k as workflowBuilderParallelEntryInputSchema, A as workflowBuilderParallelEntrySchema, j as workflowBuilderPredicateSchema, M as workflowBuilderScheduleConfigSchema, N as workflowBuilderScheduleSchema, P as workflowBuilderSleepEntryInputSchema, F as workflowBuilderSleepEntrySchema, I as workflowBuilderSleepUntilEntryInputSchema, L as workflowBuilderSleepUntilEntrySchema, R as workflowBuilderToolEntryInputSchema, z as workflowBuilderToolEntrySchema } from "../../builder-Gg-xnX_E.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_run_registry = require("../../run-registry-
|
|
2
|
+
const require_run_registry = require("../../run-registry-5Suldxz3.cjs");
|
|
3
3
|
exports.EventedExecutionEngine = require_run_registry.EventedExecutionEngine;
|
|
4
4
|
exports.EventedRun = require_run_registry.EventedRun;
|
|
5
5
|
exports.EventedWorkflow = require_run_registry.EventedWorkflow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { $s as EventedExecutionEngine, Cs as EventedRun, ws as EventedWorkflow, As as StepExecutor, ks as WorkflowEventProcessor, Ts as cloneStep, Es as cloneWorkflow, Ds as createStep, Os as createWorkflow } from "../../run-registry-CGRPldLH.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Mastra } from '../../mastra/index.js';
|
|
2
|
+
import type { WorkflowsStorage } from '../../storage/domains/workflows/base.js';
|
|
3
|
+
/**
|
|
4
|
+
* Evented runs spread over several processes need a pubsub that hands a stopped
|
|
5
|
+
* worker's event to another worker, and a store whose step guards let one
|
|
6
|
+
* delivery of a step commit. Logs once per Mastra instance when the pubsub
|
|
7
|
+
* reaches other processes and one of the two is missing.
|
|
8
|
+
*
|
|
9
|
+
* It judges the setup, not how many processes use it: Mastra can't count them.
|
|
10
|
+
* A pubsub that stays inside the process is left alone, since no other process
|
|
11
|
+
* can take part in its runs. `MASTRA_DISABLE_EVENTED_SETUP_WARNING=true`
|
|
12
|
+
* disables it for a shared transport used by one process.
|
|
13
|
+
*
|
|
14
|
+
* The message names no supported pubsub or store. The docs page it links to is
|
|
15
|
+
* the one place that lists them.
|
|
16
|
+
*/
|
|
17
|
+
export declare function warnUnsupportedEventedSetup(mastra: Mastra, workflowsStore?: WorkflowsStorage): void;
|
|
18
|
+
//# sourceMappingURL=setup-warning.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { WorkflowRunStatus } from '../../types.js';
|
|
2
|
+
/** The statuses of a run that has not ended yet. */
|
|
3
|
+
export declare const UNENDED_RUN_STATUSES: WorkflowRunStatus[];
|
|
4
|
+
/** Whether a run stored with `status` has ended. */
|
|
5
|
+
export declare function isEndedRunStatus(status: string | undefined): boolean;
|
|
6
|
+
type EndedRunStatus = 'success' | 'failed' | 'canceled' | 'tripwire';
|
|
7
|
+
/** Whether the stored run `run` has ended. */
|
|
8
|
+
export declare function hasRunEnded<T extends {
|
|
9
|
+
status?: string;
|
|
10
|
+
}>(run: T | null | undefined): run is T & {
|
|
11
|
+
status: EndedRunStatus;
|
|
12
|
+
};
|
|
13
|
+
/** Whether `executionPath` points past the last entry of `stepGraph`: a step run there ends the run. */
|
|
14
|
+
export declare function isPastLastEntry(stepGraph: readonly unknown[], executionPath: number[] | undefined): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether a step event is the one that ended the stored run `run`, which a worker still handles
|
|
17
|
+
* when the run has ended. Only a successful run has one: its worker stores the end before
|
|
18
|
+
* publishing it and may stop in between, and handling the event again publishes the end. The
|
|
19
|
+
* stored active path names it: the step end the run ended at, or the step run past the last entry.
|
|
20
|
+
* A failed run's end is stored by its own `workflow.fail`, which a redelivery of that event
|
|
21
|
+
* finishes.
|
|
22
|
+
*
|
|
23
|
+
* This can't tell an end that was stored and not published from one that was already handled, so
|
|
24
|
+
* a late copy of the event publishes the end again (and, for a nested run, hands it to the parent
|
|
25
|
+
* again).
|
|
26
|
+
*/
|
|
27
|
+
export declare function isRunEndingEvent(type: string, executionPath: number[] | undefined, run: {
|
|
28
|
+
status?: string;
|
|
29
|
+
activePaths?: number[];
|
|
30
|
+
}, stepGraph: readonly unknown[] | undefined): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Whether two execution paths name the same position in the step graph. A missing path matches
|
|
33
|
+
* only another missing path: a run stored without active paths was ended by an event without one.
|
|
34
|
+
*/
|
|
35
|
+
export declare function samePath(a: number[] | undefined, b: number[] | undefined): boolean;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=run-status.d.ts.map
|
|
@@ -8,7 +8,7 @@ import type { MastraScorers } from '../../evals/index.js';
|
|
|
8
8
|
import type { Mastra } from '../../mastra/index.js';
|
|
9
9
|
import type { TracingContext, TracingPolicy } from '../../observability/index.js';
|
|
10
10
|
import type { Processor } from '../../processors/index.js';
|
|
11
|
-
import { ProcessorStepOutputSchema, ProcessorStepSchema } from '../../processors/
|
|
11
|
+
import { ProcessorStepOutputSchema, ProcessorStepSchema } from '../../processors/step-schema.js';
|
|
12
12
|
import type { InferPublicSchema, InferStandardSchemaOutput, PublicSchema, StandardSchemaWithJSON } from '../../schema/index.js';
|
|
13
13
|
import { WorkflowRunOutput } from '../../stream/RunOutput.js';
|
|
14
14
|
import type { Tool } from '../../tools/tool.js';
|
|
@@ -98,6 +98,16 @@ export declare function createStep<TProcessorId extends string, TInput extends I
|
|
|
98
98
|
* This is a copy of first one, KEEP THIS IN SYNC!
|
|
99
99
|
*/
|
|
100
100
|
export declare function createStep<TStepId extends string, TStateSchema extends PublicSchema<any> | undefined, TInputSchema extends PublicSchema<any>, TOutputSchema extends PublicSchema<any>, TResumeSchema extends PublicSchema<any> | undefined = undefined, TSuspendSchema extends PublicSchema<any> | undefined = undefined>(params: StepParams<TStepId, TStateSchema, TInputSchema, TOutputSchema, TResumeSchema, TSuspendSchema>): Step<TStepId, TStateSchema extends PublicSchema<any> ? InferPublicSchema<TStateSchema> : unknown, InferPublicSchema<TInputSchema>, InferPublicSchema<TOutputSchema>, TResumeSchema extends PublicSchema<any> ? InferPublicSchema<TResumeSchema> : unknown, TSuspendSchema extends PublicSchema<any> ? InferPublicSchema<TSuspendSchema> : unknown, DefaultEngineType>;
|
|
101
|
+
/**
|
|
102
|
+
* Builds a workflow on the evented execution engine: each step is an event on
|
|
103
|
+
* the Mastra host's pubsub, so any worker can run the next one.
|
|
104
|
+
*
|
|
105
|
+
* In one process it runs on any pubsub, including the default one. Running it
|
|
106
|
+
* on several processes needs a pubsub that redelivers unacknowledged events and
|
|
107
|
+
* a workflows store with step guards.
|
|
108
|
+
*
|
|
109
|
+
* @see https://mastra.ai/docs/server/pubsub#evented-workflows-and-agents
|
|
110
|
+
*/
|
|
101
111
|
export declare function createWorkflow<TWorkflowId extends string = string, TInputSchema extends PublicSchema<any> = PublicSchema<any>, TOutputSchema extends PublicSchema<any> = PublicSchema<any>, TStateSchema extends PublicSchema<any> | undefined = undefined, TSteps extends Step<string, any, any, any, any, any, EventedEngineType>[] = Step<string, any, any, any, any, any, EventedEngineType>[], TRequestContextSchema extends PublicSchema<any> | undefined = undefined, TStorageVersion extends 1 | 2 = 1>(params: CreateWorkflowParams<TWorkflowId, TStateSchema, TInputSchema, TOutputSchema, TSteps, TRequestContextSchema, TStorageVersion>): EventedWorkflow<EventedEngineType, TSteps, TWorkflowId, InferSchemaOutput<TStateSchema>, InferPublicSchema<TInputSchema>, InferPublicSchema<TOutputSchema>, InferPublicSchema<TInputSchema>, TStorageVersion>;
|
|
102
112
|
export declare class EventedWorkflow<TEngineType = EventedEngineType, TSteps extends Step<string, any, any>[] = Step<string, any, any>[], TWorkflowId extends string = string, TState = unknown, TInput = unknown, TOutput = unknown, TPrevSchema = TInput, TStorageVersion extends 1 | 2 = any> extends Workflow<TEngineType, TSteps, TWorkflowId, TState, TInput, TOutput, TPrevSchema, unknown, TStorageVersion> {
|
|
103
113
|
constructor(params: WorkflowConfig<TWorkflowId, TState, TInput, TOutput, TSteps, unknown, TStorageVersion>);
|
package/dist/workflows/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_run_registry = require("../run-registry-
|
|
3
|
-
const require_stream = require("../stream-
|
|
2
|
+
const require_run_registry = require("../run-registry-5Suldxz3.cjs");
|
|
3
|
+
const require_stream = require("../stream-Dvy_0o14.cjs");
|
|
4
4
|
const require_predicate_index = require("../predicate/index.cjs");
|
|
5
|
-
const require_schedules = require("../schedules-
|
|
6
|
-
const require_scheduler = require("../scheduler-
|
|
7
|
-
const require_validate = require("../validate-
|
|
8
|
-
const require_rehydrate = require("../rehydrate-
|
|
5
|
+
const require_schedules = require("../schedules-BZS8McF7.cjs");
|
|
6
|
+
const require_scheduler = require("../scheduler-D00X03jQ.cjs");
|
|
7
|
+
const require_validate = require("../validate-Skps-cM3.cjs");
|
|
8
|
+
const require_rehydrate = require("../rehydrate-DDYFpQsV.cjs");
|
|
9
9
|
// src/workflows/state-reader.ts
|
|
10
10
|
const getStep = (state, stepId) => state.steps?.[stepId];
|
|
11
11
|
const getFirstStepResult = (step) => {
|
package/dist/workflows/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { St as getStepResultAsync, xt as getStepResult } from "../stream-
|
|
1
|
+
import { $c as validateStepInput, Ac as RESUME_SNAPSHOT_POLL_INTERVAL_MS, Bc as defineStateAccessors, Dc as createStepFromAgent, Ec as createMappingStep, Fc as cleanStepResult, Gc as hydrateSerializedStepErrors, Hc as getResumeLabelsByStepId, Ic as createDeprecationProxy, Jc as omitPriorCompletionFields, Kc as isEntryFinished, Lc as createRestartExecutionParams, Mc as abortableSleep, Nc as applyStateDelta, Oc as createStepFromClassifier, Pc as assertTimeTravelGraphMatchesSnapshot, Qc as setLongTimeout, Rc as createTimeTravelExecutionParams, Sc as ExecutionEngine, Ss as createWorkflow, Uc as getSingleStepEntryId, Vc as getRestartStartIndex, Wc as getStepIds, Xc as resolveForeachConcurrency, Yc as omitPriorSuspensionFields, Zc as runCountDeprecationMessage, ac as createStep, al as getEntryId, bs as cloneWorkflow, cc as predicateToCondition, el as validateStepRequestContext, ic as cloneStep, il as waitForSuspendedSnapshot, jc as RESUME_SNAPSHOT_WAIT_STATUSES, js as computeScheduleDefinitionHash, kc as createStepFromTool, lc as evaluatePredicate, ll as workflowTermination, nc as Run, nl as validateStepStateData, oc as isProcessor, ol as getEntryWorkflow, qc as isSingleStepEntry, rc as Workflow, rl as validateStepSuspendData, sc as mapVariable, tl as validateStepResumeData, vc as DefaultExecutionEngine, xs as createEventedWorkflow, zc as defineLazyWriter } from "../run-registry-CGRPldLH.js";
|
|
2
|
+
import { St as getStepResultAsync, xt as getStepResult } from "../stream-Dpwx0whf.js";
|
|
3
3
|
import { derivePredicateLabel, predicateSchema } from "../predicate/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import { n as WorkflowScheduler, t as Scheduler } from "../scheduler-
|
|
6
|
-
import { a as jsonSchemaToZod, c as analyzeMapConfig, d as toJsonSchemaOrUndefined, f as validateWorkflowRefs, h as forEachSingleStepEntryWithPath, i as validateWorkflowSchemas, l as parseMapConfig, m as forEachSingleStepEntry, n as validateDynamicWorkflow, o as validateStorableJsonSchema, p as collectNestedWorkflowIds, r as validateWorkflowStructure, s as inferGraphSchemas, t as assertValidDynamicWorkflow, u as schemaCompatibility } from "../validate-
|
|
7
|
-
import { n as entryOptionFields, r as toStorableGraph, t as rehydrateWorkflow } from "../rehydrate-
|
|
4
|
+
import { _ as validateCron, h as computeNextFireAt } from "../schedules-DZfSx-7P.js";
|
|
5
|
+
import { n as WorkflowScheduler, t as Scheduler } from "../scheduler-B-VZUvv_.js";
|
|
6
|
+
import { a as jsonSchemaToZod, c as analyzeMapConfig, d as toJsonSchemaOrUndefined, f as validateWorkflowRefs, h as forEachSingleStepEntryWithPath, i as validateWorkflowSchemas, l as parseMapConfig, m as forEachSingleStepEntry, n as validateDynamicWorkflow, o as validateStorableJsonSchema, p as collectNestedWorkflowIds, r as validateWorkflowStructure, s as inferGraphSchemas, t as assertValidDynamicWorkflow, u as schemaCompatibility } from "../validate-HSBcm96b.js";
|
|
7
|
+
import { n as entryOptionFields, r as toStorableGraph, t as rehydrateWorkflow } from "../rehydrate-BjLV643n.js";
|
|
8
8
|
// src/workflows/state-reader.ts
|
|
9
9
|
const getStep = (state, stepId) => state.steps?.[stepId];
|
|
10
10
|
const getFirstStepResult = (step) => {
|
|
@@ -430,12 +430,17 @@ export declare class Workflow<TEngineType = DefaultEngineType, TSteps extends St
|
|
|
430
430
|
protected takeNestedRun(): {
|
|
431
431
|
/** The parent run's storage version, which a new nested run takes. */
|
|
432
432
|
storageVersion: 1 | 2;
|
|
433
|
-
/**
|
|
433
|
+
/**
|
|
434
|
+
* Set when execute() may start the nested run: on a start, and on a restart, which starts it
|
|
435
|
+
* when it wasn't stored before. Unset on a resume.
|
|
436
|
+
*/
|
|
434
437
|
start?: {
|
|
435
438
|
input: TInput;
|
|
436
439
|
state: TState;
|
|
437
440
|
inheritedState?: StateBase;
|
|
438
441
|
};
|
|
442
|
+
/** Set by createRun() when it saved the run's first snapshot: the run wasn't stored before. */
|
|
443
|
+
inserted?: boolean;
|
|
439
444
|
} | undefined;
|
|
440
445
|
/**
|
|
441
446
|
* Resolves the storage version a createRun() call uses, and reads the stored run that call
|
package/dist/workspace/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_workspace = require("../workspace-
|
|
2
|
+
const require_workspace = require("../workspace-D1OzzlLw.cjs");
|
|
3
3
|
const require_errors = require("../errors-D5kMB1FQ.cjs");
|
|
4
|
-
const require_workspace_skills = require("../workspace-skills-
|
|
4
|
+
const require_workspace_skills = require("../workspace-skills-BcquhPDn.cjs");
|
|
5
5
|
exports.CompositeFilesystem = require_workspace.CompositeFilesystem;
|
|
6
6
|
exports.CompositeVersionedSkillSource = require_workspace.CompositeVersionedSkillSource;
|
|
7
7
|
exports.DEFAULT_TAIL_LINES = require_workspace.DEFAULT_TAIL_LINES;
|
package/dist/workspace/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as SandboxExecutionError, A as requireFilesystem, B as UnsupportedStdinCloseError, C as DEFAULT_TAIL_LINES, D as editFileTool, F as getRecommendedIsolation, G as validateSandboxFileMode, H as assertModesUnsupported, I as isIsolationAvailable, J as IsolationUnavailableError, K as MountManager, L as SandboxProcessManager, M as requireWorkspace, N as LocalSandbox, O as deleteFileTool, P as detectIsolation, Q as SandboxError, R as MastraSandbox, S as executeCommandTool, U as supportsComputer, V as MAX_SANDBOX_FILE_MODE, W as supportsNetworking, X as MountNotSupportedError, Y as MountError, Z as SandboxAbortError, _ as readFileTool, a as normalizeFactorySandboxSettings, at as LocalFilesystem, b as indexContentTool, c as formatSkillActivation, ct as callLifecycle, d as CompositeVersionedSkillSource, et as SandboxNotReadyError, f as VersionedSkillSource, g as searchTool, h as writeFileTool, i as isFactorySandbox, j as requireSandbox, k as applyPatchTool, l as collectSkillForPublish, lt as WORKSPACE_TOOLS, m as resolveToolConfig, n as FactorySandbox, nt as SandboxUnsupportedFeatureError, o as Workspace, ot as MastraFilesystem, p as createWorkspaceTools, q as FilesystemNotMountableError, r as describeFactorySandbox, s as createSkillTools, st as CompositeFilesystem, t as FACTORY_SANDBOX_BRAND, tt as SandboxTimeoutError, u as publishSkillFromSource, ut as WORKSPACE_TOOLS_PREFIX, v as mkdirTool, w as truncateOutput, x as fileStatTool, y as listFilesTool, z as ProcessHandle } from "../workspace-C05xDH60.js";
|
|
2
2
|
import { _ as WorkspaceError, a as FileReadRequiredError, b as WorkspaceReadOnlyError, c as FilesystemNotReadyError, d as PermissionError, f as SandboxFeatureNotSupportedError, g as UnsupportedGrepPatternError, h as StaleFileError, i as FileNotFoundError, l as IsDirectoryError, m as SearchNotAvailableError, n as DirectoryNotFoundError, o as FilesystemError, p as SandboxNotAvailableError, r as FileExistsError, s as FilesystemNotAvailableError, t as DirectoryNotEmptyError, u as NotDirectoryError, v as WorkspaceNotAvailableError, y as WorkspaceNotReadyError } from "../errors-CzFYpCHw.js";
|
|
3
|
-
import {
|
|
3
|
+
import { b as getMimeType, f as createGlobMatcher, h as matchGlob, l as LocalSkillSource, m as isGlobPattern, p as extractGlobBase } from "../workspace-skills-38OY32_b.js";
|
|
4
4
|
export { CompositeFilesystem, CompositeVersionedSkillSource, DEFAULT_TAIL_LINES, DirectoryNotEmptyError, DirectoryNotFoundError, FACTORY_SANDBOX_BRAND, FactorySandbox, FileExistsError, FileNotFoundError, FileReadRequiredError, FilesystemError, FilesystemNotAvailableError, FilesystemNotMountableError, FilesystemNotReadyError, IsDirectoryError, IsolationUnavailableError, LocalFilesystem, LocalSandbox, LocalSkillSource, MAX_SANDBOX_FILE_MODE, MastraFilesystem, MastraSandbox, MountError, MountManager, MountNotSupportedError, NotDirectoryError, PermissionError, ProcessHandle, SandboxAbortError, SandboxError, SandboxExecutionError, SandboxFeatureNotSupportedError, SandboxNotAvailableError, SandboxNotReadyError, SandboxProcessManager, SandboxTimeoutError, SandboxUnsupportedFeatureError, SearchNotAvailableError, StaleFileError, UnsupportedGrepPatternError, UnsupportedStdinCloseError, VersionedSkillSource, WORKSPACE_TOOLS, WORKSPACE_TOOLS_PREFIX, Workspace, WorkspaceError, WorkspaceNotAvailableError, WorkspaceNotReadyError, WorkspaceReadOnlyError, applyPatchTool, assertModesUnsupported, callLifecycle, collectSkillForPublish, createGlobMatcher, createSkillTools, createWorkspaceTools, deleteFileTool, describeFactorySandbox, detectIsolation, editFileTool, executeCommandTool, extractGlobBase, fileStatTool, formatSkillActivation, getMimeType, getRecommendedIsolation, indexContentTool, isFactorySandbox, isGlobPattern, isIsolationAvailable, listFilesTool, matchGlob, mkdirTool, normalizeFactorySandboxSettings, publishSkillFromSource, readFileTool, requireFilesystem, requireSandbox, requireWorkspace, resolveToolConfig, searchTool, supportsComputer, supportsNetworking, truncateOutput, validateSandboxFileMode, writeFileTool };
|