@mastra/core 1.87.0-alpha.2 → 1.87.0-alpha.20
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/@ai-sdk_openai@4.0.106/dist/index.d.ts +2034 -0
- package/dist/_types/@ai-sdk_openai@4.0.106/package.json +1 -0
- package/dist/_types/@internal_ai-v6@0.0.99/dist/index.d.ts +2075 -123
- package/dist/_types/@internal_core@0.1.4/dist/knowledge-compat/index.d.ts +79 -3
- package/dist/a2a/index.cjs +1 -1
- package/dist/a2a/index.js +1 -1
- package/dist/agent/active-run-signal-queues.d.ts +49 -0
- package/dist/agent/agent.d.ts +22 -6
- package/dist/agent/agent.types.d.ts +1 -0
- package/dist/agent/durable/abort-transport.d.ts +1 -1
- package/dist/agent/durable/durable-agent.d.ts +1 -0
- package/dist/agent/durable/execution-engine.d.ts +12 -0
- package/dist/agent/durable/index.cjs +86 -86
- package/dist/agent/durable/index.js +2 -2
- package/dist/agent/durable/preparation.d.ts +17 -0
- package/dist/agent/durable/run-message-refs.d.ts +3 -2
- package/dist/agent/durable/run-registry.d.ts +56 -25
- package/dist/agent/durable/stored-signal-drain.d.ts +100 -0
- package/dist/agent/durable/types.d.ts +43 -0
- package/dist/agent/durable/utils/resolve-runtime.d.ts +16 -0
- package/dist/agent/durable/utils/serialize-state.d.ts +1 -0
- package/dist/agent/durable/workflows/create-durable-agentic-workflow.d.ts +1 -0
- package/dist/agent/durable/workflows/durable-loop-builder.d.ts +5 -0
- package/dist/agent/durable/workflows/finalize-run.d.ts +7 -1
- package/dist/agent/durable/workflows/shared/message-list-state.d.ts +6 -2
- package/dist/agent/durable/workflows/shared/schemas.d.ts +2 -0
- package/dist/agent/durable/workflows/steps/llm-execution.d.ts +1 -0
- package/dist/agent/index.cjs +18 -17
- package/dist/agent/index.d.ts +3 -0
- package/dist/agent/index.js +6 -6
- package/dist/agent/merge-persona.d.ts +15 -0
- package/dist/agent/message-list/adapters/AIV5Adapter.d.ts +15 -1
- package/dist/agent/message-list/index.cjs +2 -2
- package/dist/agent/message-list/index.js +2 -2
- package/dist/agent/message-list/state/MessageStateManager.d.ts +5 -0
- package/dist/agent/message-list/state/types.d.ts +5 -1
- package/dist/agent/message-list/types.d.ts +1 -1
- package/dist/agent/message-list/utils/provider-compat.d.ts +9 -1
- package/dist/agent/scopes.d.ts +8 -0
- package/dist/agent/signals.d.ts +7 -3
- package/dist/agent/stored-run-signals.d.ts +93 -0
- package/dist/agent/stored-signals.d.ts +40 -0
- package/dist/agent/streams/abort-transport.d.ts +10 -1
- package/dist/agent/streams/constants.d.ts +9 -0
- package/dist/agent/streams/publisher.d.ts +3 -1
- package/dist/agent/thread-stream-runtime.d.ts +46 -4
- package/dist/agent/tool-name.d.ts +21 -0
- package/dist/agent/types.d.ts +1 -0
- package/dist/agent-builder/ee/index.cjs +1 -1
- package/dist/agent-builder/ee/index.js +1 -1
- package/dist/agent-controller/agent-controller.d.ts +14 -1
- package/dist/agent-controller/index.cjs +3 -3
- package/dist/agent-controller/index.js +3 -3
- package/dist/agent-controller/session.d.ts +38 -1
- package/dist/agent-controller/types.d.ts +6 -0
- package/dist/agent-controller/worker-run-binding.d.ts +15 -0
- package/dist/{agent-controller-Dc58ARqw.js → agent-controller-D2d_qiJr.js} +159 -217
- package/dist/{agent-controller-v64JbuDa.cjs → agent-controller-WTjY0HJM.cjs} +181 -239
- package/dist/{agent-skills-resolver-BMoCDoaK.cjs → agent-skills-resolver-2d8k7ioj.cjs} +134 -109
- package/dist/{agent-skills-resolver-CUEIMDbx.js → agent-skills-resolver-D2HktP6Y.js} +134 -109
- package/dist/background-tasks/index.cjs +2 -1
- package/dist/background-tasks/index.d.ts +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/background-tasks/manager.d.ts +3 -1
- package/dist/background-tasks/resolve-config.d.ts +30 -1
- package/dist/background-tasks/system-prompt.d.ts +8 -2
- package/dist/background-tasks/types.d.ts +47 -1
- package/dist/background-tasks/workflow-id.d.ts +42 -0
- package/dist/{background-tasks-E-Jjxks4.js → background-tasks-CgspqU_S.js} +393 -59
- package/dist/{background-tasks-DgiQNKh7.cjs → background-tasks-DJ6x1bn-.cjs} +428 -58
- package/dist/browser/index.cjs +17 -8
- package/dist/browser/index.js +17 -8
- package/dist/browser/processor.d.ts +1 -0
- package/dist/{builder-Dfp6Ckjr.cjs → builder-B2P49nT9.cjs} +3 -3
- package/dist/{builder-Dh175HnQ.js → builder-MymUxyDK.js} +2 -2
- package/dist/capabilities/302ai.json +203 -203
- package/dist/capabilities/abacus.json +2 -96
- package/dist/capabilities/abliteratedllm.json +39 -30
- package/dist/capabilities/abliteration-ai.json +9 -9
- package/dist/capabilities/above.json +18 -18
- package/dist/capabilities/adaption.json +16 -16
- package/dist/capabilities/adzuki.json +20 -20
- package/dist/capabilities/agentrouter.json +11 -11
- package/dist/capabilities/agnes.json +3 -3
- package/dist/capabilities/ai-router.json +5 -5
- package/dist/capabilities/aiand.json +10 -27
- package/dist/capabilities/aigrow.json +11 -11
- package/dist/capabilities/aimlapi.json +153 -158
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +14 -14
- package/dist/capabilities/aki-io.json +15 -15
- package/dist/capabilities/alibaba-cn.json +117 -120
- package/dist/capabilities/alibaba-coding-plan-cn.json +5 -10
- package/dist/capabilities/alibaba-coding-plan.json +5 -10
- package/dist/capabilities/alibaba-token-plan-cn.json +60 -56
- package/dist/capabilities/alibaba-token-plan.json +59 -55
- package/dist/capabilities/alibaba.json +122 -57
- package/dist/capabilities/ambient.json +17 -28
- package/dist/capabilities/amd-tokenlab.json +41 -0
- package/dist/capabilities/amd.json +6 -6
- package/dist/capabilities/anthropic.json +33 -57
- package/dist/capabilities/anyapi.json +15 -15
- package/dist/capabilities/apiko.json +5 -5
- package/dist/capabilities/arcee.json +7 -7
- package/dist/capabilities/augure.json +6 -6
- package/dist/capabilities/auriko.json +19 -19
- package/dist/capabilities/bailing.json +5 -5
- package/dist/capabilities/baseten.json +25 -25
- package/dist/capabilities/bee.json +4 -4
- package/dist/capabilities/berget.json +4 -24
- package/dist/capabilities/bothub.json +11 -11
- package/dist/capabilities/boundless.json +39 -39
- package/dist/capabilities/bumo.json +40 -40
- package/dist/capabilities/byteplus.json +29 -29
- package/dist/capabilities/cheapaimodel.json +10 -10
- package/dist/capabilities/cheapest-token.json +28 -28
- package/dist/capabilities/chutes.json +83 -4
- package/dist/capabilities/claudinio.json +10 -1
- package/dist/capabilities/cline-pass.json +33 -46
- package/dist/capabilities/cloudcode.json +12 -19
- package/dist/capabilities/cloudflare-workers-ai.json +13 -13
- package/dist/capabilities/commandcode.json +137 -152
- package/dist/capabilities/concentrate.json +282 -291
- package/dist/capabilities/cortecs.json +105 -105
- package/dist/capabilities/crossmodel.json +191 -191
- package/dist/capabilities/crusoe.json +37 -8
- package/dist/capabilities/daoxe.json +9 -9
- package/dist/capabilities/databricks.json +124 -124
- package/dist/capabilities/deepinfra.json +107 -88
- package/dist/capabilities/deepseek.json +3 -3
- package/dist/capabilities/digitalocean.json +114 -114
- package/dist/capabilities/dinference.json +1 -2
- package/dist/capabilities/dothoosh.json +30 -30
- package/dist/capabilities/doubleword.json +22 -22
- package/dist/capabilities/edenai.json +279 -291
- package/dist/capabilities/empiriolabs.json +177 -163
- package/dist/capabilities/engy.json +22 -22
- package/dist/capabilities/evroc.json +11 -11
- package/dist/capabilities/ezkielyna.json +10 -10
- package/dist/capabilities/fastrouter.json +85 -89
- package/dist/capabilities/fireworks-ai.json +130 -69
- package/dist/capabilities/fortytwo.json +9 -3
- package/dist/capabilities/freemodel.json +5 -49
- package/dist/capabilities/frogbot.json +94 -102
- package/dist/capabilities/gisoo.json +20 -20
- package/dist/capabilities/gmicloud.json +17 -17
- package/dist/capabilities/google.json +54 -54
- package/dist/capabilities/graphn.json +15 -15
- package/dist/capabilities/greenpt.json +36 -36
- package/dist/capabilities/groq.json +4 -17
- package/dist/capabilities/helicone.json +83 -85
- package/dist/capabilities/hetzner.json +35 -3
- package/dist/capabilities/hostinger-router.json +6 -13
- package/dist/capabilities/hpc-ai.json +9 -25
- package/dist/capabilities/huawei-maas.json +12 -12
- package/dist/capabilities/hubris.json +33 -33
- package/dist/capabilities/huggingface.json +105 -155
- package/dist/capabilities/hyper.json +25 -33
- package/dist/capabilities/impossibl.json +147 -194
- package/dist/capabilities/inception.json +2 -2
- package/dist/capabilities/inceptron.json +4 -4
- package/dist/capabilities/inco.json +4 -21
- package/dist/capabilities/infer.json +18 -18
- package/dist/capabilities/inferall.json +2 -18
- package/dist/capabilities/inference-coop.json +15 -15
- package/dist/capabilities/inference.json +2 -11
- package/dist/capabilities/inferenceapis.json +14 -14
- package/dist/capabilities/inferris.json +4 -4
- package/dist/capabilities/infersia.json +13 -13
- package/dist/capabilities/inferx.json +2 -2
- package/dist/capabilities/infomaniak.json +4 -4
- package/dist/capabilities/io-net.json +3 -13
- package/dist/capabilities/iteracompute.json +43 -81
- package/dist/capabilities/jalapeno.json +12 -12
- package/dist/capabilities/jiekou.json +23 -171
- package/dist/capabilities/jzstoken.json +47 -48
- package/dist/capabilities/keln.json +16 -16
- package/dist/capabilities/kenari.json +142 -126
- package/dist/capabilities/kilo.json +636 -656
- 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 +2 -2
- package/dist/capabilities/klavo.json +19 -19
- package/dist/capabilities/korouter.json +36 -36
- package/dist/capabilities/kunavo.json +6 -6
- package/dist/capabilities/liquid.json +11 -11
- package/dist/capabilities/lithosai.json +2 -2
- package/dist/capabilities/llmgateway-providers.json +929 -912
- package/dist/capabilities/llmgateway.json +344 -335
- package/dist/capabilities/llmtr.json +16 -54
- package/dist/capabilities/lowrouter.json +58 -58
- package/dist/capabilities/lyceum.json +12 -4
- package/dist/capabilities/meganova.json +0 -1
- package/dist/capabilities/melious.json +10 -10
- package/dist/capabilities/merge-gateway.json +296 -289
- package/dist/capabilities/meta.json +7 -7
- package/dist/capabilities/minimax-cn-coding-plan.json +5 -5
- package/dist/capabilities/minimax-cn.json +5 -5
- package/dist/capabilities/minimax-coding-plan.json +5 -5
- package/dist/capabilities/minimax.json +5 -5
- package/dist/capabilities/mistral.json +14 -30
- package/dist/capabilities/mixlayer.json +5 -5
- package/dist/capabilities/moark.json +0 -2
- package/dist/capabilities/modal.json +11 -11
- package/dist/capabilities/model-oracle-ai.json +23 -31
- package/dist/capabilities/modelis.json +18 -18
- package/dist/capabilities/modular.json +30 -8
- package/dist/capabilities/moneo.json +5 -36
- package/dist/capabilities/morph.json +15 -15
- package/dist/capabilities/munito-eu.json +4 -4
- package/dist/capabilities/munito.json +4 -4
- package/dist/capabilities/nan.json +23 -23
- package/dist/capabilities/nano-gpt.json +602 -595
- package/dist/capabilities/nearai.json +97 -97
- package/dist/capabilities/nebius.json +24 -25
- package/dist/capabilities/neon.json +132 -132
- package/dist/capabilities/neuralwatt.json +41 -41
- package/dist/capabilities/nokeep.json +4 -4
- package/dist/capabilities/novita-ai.json +90 -204
- package/dist/capabilities/nvidia.json +28 -69
- package/dist/capabilities/oathbreaker.json +24 -1
- package/dist/capabilities/obscurify.json +31 -31
- package/dist/capabilities/oci.json +6 -6
- package/dist/capabilities/ofox.json +219 -583
- package/dist/capabilities/ollama-cloud.json +57 -57
- package/dist/capabilities/openai.json +57 -57
- package/dist/capabilities/opencode-go.json +97 -89
- package/dist/capabilities/openreason.json +4 -4
- package/dist/capabilities/openrouter.json +555 -564
- package/dist/capabilities/opper.json +26 -31
- package/dist/capabilities/orcarouter.json +409 -210
- package/dist/capabilities/outerlabs.json +25 -25
- package/dist/capabilities/ovhcloud.json +21 -22
- package/dist/capabilities/pareto.json +2 -7
- package/dist/capabilities/perplexity-agent.json +50 -105
- package/dist/capabilities/phala.json +30 -30
- package/dist/capabilities/pioneer.json +3 -120
- package/dist/capabilities/poe.json +129 -129
- package/dist/capabilities/powerspring.json +14 -14
- package/dist/capabilities/primalabs.json +9 -9
- package/dist/capabilities/prime.json +139 -121
- package/dist/capabilities/privatemode-ai.json +12 -40
- package/dist/capabilities/proxystacks.json +6 -6
- package/dist/capabilities/qihang-ai.json +3 -15
- package/dist/capabilities/qiniu-ai.json +13 -87
- package/dist/capabilities/refuseless.json +4 -11
- package/dist/capabilities/regolo-ai.json +10 -14
- package/dist/capabilities/requesty.json +439 -183
- package/dist/capabilities/routing-run.json +3 -40
- package/dist/capabilities/ruapi.json +36 -20
- package/dist/capabilities/runcrate.json +5 -5
- package/dist/capabilities/runinfra.json +9 -9
- package/dist/capabilities/sakana.json +7 -7
- package/dist/capabilities/sambanova.json +9 -9
- package/dist/capabilities/sandbase.json +25 -25
- package/dist/capabilities/sarvam.json +18 -9
- package/dist/capabilities/scaleway.json +19 -19
- package/dist/capabilities/scnet-token-plan.json +10 -10
- package/dist/capabilities/scx-ai.json +24 -40
- package/dist/capabilities/sensenova.json +15 -15
- package/dist/capabilities/siliconflow-cn.json +43 -77
- package/dist/capabilities/siliconflow.json +45 -45
- package/dist/capabilities/snowflake-cortex.json +18 -18
- package/dist/capabilities/sokkan.json +7 -19
- package/dist/capabilities/sparrowcodes.json +23 -23
- package/dist/capabilities/stackit.json +1 -2
- package/dist/capabilities/standardcompute.json +79 -115
- package/dist/capabilities/steadyrouter.json +42 -42
- package/dist/capabilities/stepfun-ai-step-plan.json +13 -7
- package/dist/capabilities/stepfun-ai.json +20 -6
- package/dist/capabilities/stepfun-step-plan.json +13 -6
- package/dist/capabilities/stepfun.json +20 -6
- package/dist/capabilities/stepping-stone.json +18 -18
- package/dist/capabilities/synthetic.json +8 -17
- package/dist/capabilities/synthorai.json +27 -27
- package/dist/capabilities/teamorouter.json +19 -19
- package/dist/capabilities/teapot-router.json +10 -10
- package/dist/capabilities/tencent-token-plan-intl.json +126 -0
- package/dist/capabilities/tencent-token-plan.json +37 -37
- package/dist/capabilities/tencent-tokenhub.json +52 -37
- package/dist/capabilities/tensorx.json +38 -38
- package/dist/capabilities/tenstorrent.json +4 -4
- package/dist/capabilities/the-grid-ai.json +29 -29
- package/dist/capabilities/thinkingmachines.json +77 -77
- package/dist/capabilities/tinfoil.json +10 -10
- package/dist/capabilities/toapis.json +3 -3
- package/dist/capabilities/togetherai.json +45 -53
- package/dist/capabilities/tokengo.json +20 -20
- package/dist/capabilities/tokenify.json +3 -3
- package/dist/capabilities/tokenwatt.json +10 -2
- package/dist/capabilities/trustedrouter.json +7 -7
- package/dist/capabilities/trustedtokens.json +15 -15
- package/dist/capabilities/umans-ai-coding-plan.json +11 -11
- package/dist/capabilities/umans-ai.json +10 -10
- package/dist/capabilities/uncensuredai.json +5 -5
- package/dist/capabilities/unorouter.json +1 -22
- package/dist/capabilities/unrestricted.json +8 -24
- package/dist/capabilities/uplinkswitch.json +20 -20
- package/dist/capabilities/upstage.json +1 -13
- package/dist/capabilities/vancine.json +23 -23
- package/dist/capabilities/vercel.json +593 -563
- package/dist/capabilities/verda.json +8 -1
- package/dist/capabilities/vivgrid.json +56 -127
- package/dist/capabilities/volcengine-coding-plan.json +26 -26
- package/dist/capabilities/volcengine.json +25 -24
- package/dist/capabilities/vultr.json +14 -67
- package/dist/capabilities/wafer.ai.json +16 -16
- package/dist/capabilities/wally.json +11 -11
- package/dist/capabilities/wandb.json +20 -20
- package/dist/capabilities/watt.json +19 -19
- package/dist/capabilities/xai.json +6 -6
- package/dist/capabilities/xiaomi.json +3 -3
- package/dist/capabilities/xpersona.json +11 -11
- package/dist/capabilities/xxapi.json +26 -26
- package/dist/capabilities/zai-coding-plan.json +18 -18
- package/dist/capabilities/zai.json +33 -33
- package/dist/capabilities/zenifra.json +33 -33
- package/dist/capabilities/zenmux.json +171 -214
- package/dist/capabilities/zerogpu.json +11 -11
- package/dist/capabilities/zhipuai-coding-plan.json +6 -17
- package/dist/capabilities/zhipuai.json +32 -32
- package/dist/capabilities/zro.json +6 -6
- package/dist/channels/agent-channels.d.ts +22 -0
- package/dist/channels/index.cjs +24 -24
- package/dist/channels/index.js +2 -2
- package/dist/channels/output-processor.d.ts +12 -0
- package/dist/channels/reply-tool.d.ts +5 -1
- package/dist/channels/state-adapter.d.ts +3 -1
- package/dist/channels/stream-helpers.d.ts +17 -0
- package/dist/{channels-BZL9RT2i.cjs → channels-CKRPQRmF.cjs} +6 -6
- package/dist/{channels-0AO7PMJF.js → channels-nnBeh58G.js} +2 -2
- package/dist/coding-agent/index.cjs +7 -7
- package/dist/coding-agent/index.js +4 -4
- package/dist/{constants-B9ZDvXZ4.cjs → constants-B2FVV_2e.cjs} +13 -1
- package/dist/{constants-BmdTvEYN.js → constants-Dro9fuhk.js} +13 -1
- package/dist/datasets/experiment/scorer.d.ts +16 -5
- package/dist/datasets/index.cjs +9 -9
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +3 -1
- package/dist/docs/assets/SOURCE_MAP.json +1289 -1234
- package/dist/docs/references/docs-agents-code-mode.md +38 -2
- package/dist/docs/references/docs-agents-human-in-the-loop.md +2 -2
- package/dist/docs/references/docs-agents-networks.md +2 -2
- package/dist/docs/references/docs-agents-overview.md +15 -6
- package/dist/docs/references/docs-agents-processors.md +9 -9
- package/dist/docs/references/docs-agents-resumable-streams.md +2 -2
- package/dist/docs/references/docs-agents-structured-output.md +6 -6
- package/dist/docs/references/docs-agents-tools.md +15 -9
- package/dist/docs/references/docs-auth-simple-auth.md +8 -8
- package/dist/docs/references/docs-browser.md +4 -2
- package/dist/docs/references/docs-channels.md +5 -5
- package/dist/docs/references/docs-classifier.md +1 -1
- package/dist/docs/references/docs-connections-a2a.md +1 -1
- package/dist/docs/references/docs-connections-acp.md +2 -2
- package/dist/docs/references/docs-connections-overview.md +1 -1
- package/dist/docs/references/docs-connections-sdk-agents.md +6 -6
- package/dist/docs/references/docs-deployment-workers.md +2 -2
- package/dist/docs/references/docs-develop.md +1 -1
- package/dist/docs/references/docs-evals-custom-scorers.md +2 -2
- package/dist/docs/references/docs-evals-multi-turn.md +2 -2
- package/dist/docs/references/docs-guides-build-an-eval-loop.md +2 -2
- package/dist/docs/references/docs-guides-context-engineering.md +3 -3
- package/dist/docs/references/docs-guides-streaming.md +1 -1
- package/dist/docs/references/docs-harness-agent-controller.md +6 -3
- package/dist/docs/references/docs-harness-background-tasks.md +48 -7
- package/dist/docs/references/docs-harness-durable-agents.md +6 -5
- package/dist/docs/references/docs-harness-goals.md +2 -2
- package/dist/docs/references/docs-harness-schedules.md +35 -1
- package/dist/docs/references/docs-knowledge-agents-and-tools.md +4 -2
- package/dist/docs/references/docs-knowledge-importers.md +22 -1
- package/dist/docs/references/docs-knowledge-overview.md +1 -1
- package/dist/docs/references/docs-knowledge-scopes-and-access.md +1 -1
- package/dist/docs/references/docs-knowledge-search.md +1 -1
- package/dist/docs/references/docs-mastra-platform-observability-overview.md +3 -189
- package/dist/docs/references/docs-memory-memory-processors.md +8 -8
- package/dist/docs/references/docs-memory-message-history.md +28 -3
- package/dist/docs/references/docs-memory-observational-memory.md +1 -1
- package/dist/docs/references/docs-memory-semantic-recall.md +2 -2
- package/dist/docs/references/docs-memory-working-memory.md +3 -2
- package/dist/docs/references/docs-sandbox-lsp.md +5 -6
- package/dist/docs/references/docs-sandbox-overview.md +21 -1
- package/dist/docs/references/docs-sandbox-skills.md +3 -1
- package/dist/docs/references/docs-server-mastra-client.md +1 -1
- package/dist/docs/references/docs-server-mcp.md +23 -0
- package/dist/docs/references/docs-server-pubsub.md +22 -2
- package/dist/docs/references/docs-server-request-context.md +4 -4
- package/dist/docs/references/docs-signals-notifications.md +2 -2
- package/dist/docs/references/docs-signals-overview.md +1 -1
- package/dist/docs/references/docs-signals-running-across-processes.md +3 -0
- package/dist/docs/references/docs-signals-sending-signals.md +20 -7
- package/dist/docs/references/docs-signals-signal-providers.md +18 -2
- package/dist/docs/references/docs-signals-state-signals.md +1 -0
- package/dist/docs/references/docs-signals-thread-streams.md +12 -0
- package/dist/docs/references/docs-skills.md +8 -5
- package/dist/docs/references/docs-storage.md +12 -12
- package/dist/docs/references/docs-studio-editor.md +2 -2
- package/dist/docs/references/docs-subagents.md +26 -3
- package/dist/docs/references/docs-workflows-overview.md +2 -0
- package/dist/docs/references/integrations-agentic-ui-copilotkit.md +1 -1
- package/dist/docs/references/integrations-agentic-ui-openui.md +1 -1
- package/dist/docs/references/integrations-channels-discord.md +1 -1
- package/dist/docs/references/integrations-channels-github.md +1 -1
- package/dist/docs/references/integrations-channels-imessage.md +2 -2
- package/dist/docs/references/integrations-channels-ring.md +2 -2
- package/dist/docs/references/integrations-channels-slack.md +1 -1
- package/dist/docs/references/integrations-channels-teams.md +1 -1
- package/dist/docs/references/integrations-channels-telegram.md +1 -1
- package/dist/docs/references/integrations-channels-whatsapp.md +1 -1
- package/dist/docs/references/integrations-tools-firecrawl.md +1 -1
- package/dist/docs/references/integrations.md +1 -0
- package/dist/docs/references/reference-acp-acp-agent.md +1 -1
- package/dist/docs/references/reference-acp-create-acp-tool.md +1 -1
- package/dist/docs/references/reference-agent-controller-agent-controller-class.md +3 -1
- package/dist/docs/references/reference-agent-controller-session.md +55 -8
- package/dist/docs/references/reference-agents-agent.md +40 -14
- package/dist/docs/references/reference-agents-channels.md +11 -11
- package/dist/docs/references/reference-agents-createSkill.md +20 -1
- package/dist/docs/references/reference-agents-durable-agent.md +2 -2
- package/dist/docs/references/reference-agents-generate.md +1 -1
- package/dist/docs/references/reference-agents-getLLM.md +2 -2
- package/dist/docs/references/reference-agents-getMetadata.md +2 -2
- package/dist/docs/references/reference-agents-network.md +3 -3
- package/dist/docs/references/reference-browser-mastra-browser.md +1 -1
- package/dist/docs/references/reference-channels-thread-link.md +1 -1
- package/dist/docs/references/reference-classifier-classifier.md +2 -0
- package/dist/docs/references/reference-coding-agent-build-base-prompt.md +1 -1
- package/dist/docs/references/reference-coding-agent-create-coding-agent.md +7 -7
- package/dist/docs/references/reference-configuration.md +15 -14
- package/dist/docs/references/reference-core-getAgentById.md +1 -1
- package/dist/docs/references/reference-core-getWorkspaceById.md +37 -0
- package/dist/docs/references/reference-core-mastra-model-gateway.md +1 -1
- package/dist/docs/references/reference-datasets-startExperiment.md +1 -1
- package/dist/docs/references/reference-editor-mastra-editor.md +2 -2
- package/dist/docs/references/reference-evals-create-scorer.md +5 -5
- package/dist/docs/references/reference-evals-run-evals.md +1 -1
- package/dist/docs/references/reference-file-based-agents-config.md +3 -3
- package/dist/docs/references/reference-file-based-agents-schedules.md +1 -1
- package/dist/docs/references/reference-file-based-agents-subagents.md +3 -3
- package/dist/docs/references/reference-file-based-agents-workspace.md +1 -1
- package/dist/docs/references/reference-knowledge-knowledge-class.md +12 -0
- package/dist/docs/references/reference-knowledge-knowledge-tools.md +4 -5
- package/dist/docs/references/reference-knowledge-limits.md +16 -16
- package/dist/docs/references/reference-manual-install.md +2 -2
- package/dist/docs/references/reference-memory-memory-class.md +3 -3
- package/dist/docs/references/reference-memory-observational-memory.md +15 -3
- package/dist/docs/references/reference-observability-metrics-metrics-context.md +63 -3
- package/dist/docs/references/reference-observability-tracing-bridges-datadog.md +12 -11
- package/dist/docs/references/reference-observability-tracing-configuration.md +2 -2
- package/dist/docs/references/reference-observability-tracing-exporters-datadog.md +14 -12
- package/dist/docs/references/reference-observability-tracing-interfaces.md +10 -6
- package/dist/docs/references/reference-processors-batch-parts-processor.md +1 -1
- package/dist/docs/references/reference-processors-classifier-processor.md +2 -2
- package/dist/docs/references/reference-processors-cyber-refusal-handler.md +1 -1
- package/dist/docs/references/reference-processors-language-detector.md +1 -1
- package/dist/docs/references/reference-processors-message-history-processor.md +1 -1
- package/dist/docs/references/reference-processors-model-selection-processor.md +3 -3
- package/dist/docs/references/reference-processors-moderation-processor.md +4 -4
- package/dist/docs/references/reference-processors-pii-detector.md +2 -2
- package/dist/docs/references/reference-processors-prefill-error-handler.md +2 -2
- package/dist/docs/references/reference-processors-processor-interface.md +22 -10
- package/dist/docs/references/reference-processors-prompt-injection-detector.md +1 -1
- package/dist/docs/references/reference-processors-provider-history-compat.md +1 -1
- package/dist/docs/references/reference-processors-response-cache.md +1 -1
- package/dist/docs/references/reference-processors-semantic-recall-processor.md +1 -1
- package/dist/docs/references/reference-processors-skill-search-processor.md +1 -1
- package/dist/docs/references/reference-processors-skills-processor.md +1 -1
- package/dist/docs/references/reference-processors-stream-error-retry-processor.md +3 -3
- package/dist/docs/references/reference-processors-system-prompt-scrubber.md +2 -2
- package/dist/docs/references/reference-processors-token-limiter-processor.md +3 -3
- package/dist/docs/references/reference-processors-tool-call-filter.md +2 -2
- package/dist/docs/references/reference-processors-tool-search-processor.md +6 -6
- package/dist/docs/references/reference-processors-unicode-normalizer.md +1 -1
- package/dist/docs/references/reference-processors-working-memory-processor.md +1 -1
- package/dist/docs/references/reference-pubsub-base.md +6 -4
- package/dist/docs/references/reference-pubsub-caching-pubsub.md +3 -1
- package/dist/docs/references/reference-pubsub-redis-streams.md +3 -5
- package/dist/docs/references/reference-pubsub-valkey-streams.md +2 -2
- package/dist/docs/references/reference-rag-chunking-and-embedding.md +1 -1
- package/dist/docs/references/reference-rag-graph-rag-guide.md +2 -2
- package/dist/docs/references/reference-rag-retrieval.md +13 -13
- package/dist/docs/references/reference-signals-create-notification-inbox-tool.md +1 -1
- package/dist/docs/references/reference-signals-time-signal-provider.md +137 -0
- package/dist/docs/references/reference-storage-composite.md +4 -0
- package/dist/docs/references/reference-storage-overview.md +30 -30
- package/dist/docs/references/reference-storage-retention.md +20 -20
- package/dist/docs/references/reference-templates-overview.md +31 -1
- package/dist/docs/references/reference-tools-create-code-mode.md +23 -1
- package/dist/docs/references/reference-tools-vector-query-tool.md +11 -3
- package/dist/docs/references/reference-voice-overview.md +39 -54
- package/dist/docs/references/reference-voice-speech-to-speech.md +11 -11
- package/dist/docs/references/reference-voice-speech-to-text.md +1 -1
- package/dist/docs/references/reference-voice-text-to-speech.md +1 -1
- package/dist/docs/references/reference-voice-voice.addInstructions.md +1 -1
- package/dist/docs/references/reference-voice-voice.listen.md +2 -1
- package/dist/docs/references/reference-voice-voice.speak.md +1 -3
- package/dist/docs/references/reference-workers-overview.md +3 -1
- package/dist/docs/references/reference-workflows-run-methods-restart.md +2 -0
- package/dist/docs/references/reference-workflows-step.md +1 -1
- package/dist/docs/references/reference-workflows-workflow-methods-map.md +1 -1
- package/dist/docs/references/reference-workflows-workflow.md +1 -1
- package/dist/docs/references/reference-workspace-factory-sandbox.md +8 -6
- package/dist/docs/references/reference-workspace-local-filesystem.md +1 -1
- package/dist/docs/references/reference-workspace-local-sandbox.md +1 -1
- package/dist/docs/references/reference-workspace-sandbox.md +14 -0
- package/dist/docs/references/reference.md +3 -0
- package/dist/evals/index.cjs +13 -13
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +4 -4
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/events/index.cjs +2 -2
- package/dist/events/index.js +2 -2
- package/dist/events/pubsub.d.ts +1 -3
- package/dist/{run-registry-lLRc7EE6.cjs → execution-fence-CKFtgb2u.cjs} +13789 -9619
- package/dist/{run-registry-DhOKJtlb.js → execution-fence-DTrAehtv.js} +14769 -10677
- package/dist/harness/index.cjs +3 -3
- package/dist/harness/index.js +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/integration/index.cjs +1 -1
- package/dist/integration/index.js +1 -1
- package/dist/knowledge/agent-scopes.d.ts +17 -0
- package/dist/knowledge/declarations.d.ts +2 -0
- package/dist/knowledge/held-scopes-state-processor.d.ts +50 -0
- package/dist/knowledge/importers/overlay.d.ts +170 -0
- package/dist/knowledge/importers/sink.d.ts +17 -1
- package/dist/knowledge/importers/types.d.ts +16 -0
- package/dist/knowledge/index.cjs +2156 -290
- package/dist/knowledge/index.d.ts +18 -2
- package/dist/knowledge/index.js +2043 -179
- package/dist/knowledge/links.d.ts +27 -0
- package/dist/knowledge/page-tools.d.ts +25 -0
- package/dist/knowledge/pinned-state-processor.d.ts +2 -2
- package/dist/knowledge/run.d.ts +5 -0
- package/dist/knowledge/scope-runtime.d.ts +6 -0
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/base.types.d.ts +3 -1
- package/dist/llm/model/gateways/opencode-session-header.d.ts +28 -0
- package/dist/llm/model/mastra-gateway-provider-tools.d.ts +9 -6
- package/dist/llm/model/model.d.ts +1 -1
- package/dist/llm/model/model.loop.d.ts +1 -1
- package/dist/llm/model/model.loop.types.d.ts +3 -1
- package/dist/llm/model/provider-options.d.ts +4 -3
- package/dist/llm/model/provider-types.generated.d.ts +7184 -7514
- package/dist/llm/model/resolve-model.d.ts +1 -0
- package/dist/llm/model/shared.types.d.ts +1 -0
- package/dist/llm/reasoning/anthropic-thinking.d.ts +5 -0
- package/dist/llm/reasoning/gemini-thinking.d.ts +24 -0
- package/dist/llm/reasoning/index.cjs +389 -0
- package/dist/llm/reasoning/index.d.ts +8 -0
- package/dist/llm/reasoning/index.js +362 -0
- package/dist/llm/reasoning/model-fallback.d.ts +75 -0
- package/dist/llm/reasoning/model-ids.d.ts +5 -0
- package/dist/llm/reasoning/thinking-provider-options.d.ts +10 -0
- package/dist/llm/reasoning/thinking-request.d.ts +14 -0
- package/dist/llm/reasoning/thinking.d.ts +37 -0
- package/dist/{llm-B46V7Mi7.js → llm-B6EYEbYf.js} +68 -90
- package/dist/{llm-B4AeSFvV.cjs → llm-P6sWWNc6.cjs} +68 -90
- package/dist/loop/index.cjs +15 -15
- package/dist/loop/index.js +2 -2
- package/dist/loop/loop-runtime.d.ts +1 -1
- package/dist/loop/server.cjs +1 -1
- package/dist/loop/server.js +1 -1
- package/dist/loop/shared/signal-outcome.d.ts +1 -1
- package/dist/loop/shared/steps/signal-drain-core.d.ts +9 -3
- package/dist/{manager-BRAvwB9b.js → manager-BvnXZAFj.js} +112 -39
- package/dist/{manager-BwDxA1Nn.cjs → manager-tQrH4_MZ.cjs} +124 -51
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.d.ts +35 -4
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-CIx6qEq2.js → mastra-BhPympcg.js} +84 -28
- package/dist/{mastra-DBhdD172.cjs → mastra-CtL0diD6.cjs} +124 -68
- package/dist/memory/index.cjs +25 -25
- package/dist/memory/index.js +3 -3
- package/dist/memory/mock.d.ts +2 -3
- package/dist/memory/om-events/index.cjs +189 -0
- package/dist/memory/om-events/index.d.ts +17 -0
- package/dist/memory/om-events/index.js +188 -0
- package/dist/{message-list-DfN9mWeN.cjs → message-list-C0F2sDNC.cjs} +233 -131
- package/dist/{message-list-wI71UGxk.js → message-list-RgFlLrxG.js} +233 -131
- package/dist/{model-CYhAa5qO.cjs → model-Cy0Z_3FQ.cjs} +5 -4
- package/dist/{model-CJMsDU8w.js → model-D2XwLRQi.js} +5 -4
- package/dist/{netlify-Bw7Vd58y.cjs → netlify-DgHrsLpJ.cjs} +41446 -30449
- package/dist/{netlify-C9aJA6Cv.js → netlify-d2fyniAS.js} +31257 -20278
- package/dist/notifications/index.cjs +18 -18
- package/dist/notifications/index.js +2 -2
- package/dist/observability/index.cjs +1 -1
- package/dist/observability/index.js +1 -1
- package/dist/observability/types/tracing.d.ts +1 -1
- package/dist/{observability-D7RNOAPx.js → observability-DPDWibyH.js} +648 -648
- package/dist/{output-helpers-DgsH4aTb.cjs → output-helpers-By5FbLpp.cjs} +71 -73
- package/dist/{output-helpers-CVzhy1Y0.js → output-helpers-k2-48ssH.js} +72 -74
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +65 -65
- package/dist/processors/index.js +2 -2
- package/dist/processors/processors/tool-search.d.ts +2 -2
- package/dist/processors/runner.d.ts +12 -0
- package/dist/{provider-registry-DOfYSEju.js → provider-registry-B9UP28b4.js} +20113 -21015
- package/dist/{provider-registry-Bn_7VvZ8.cjs → provider-registry-Brcz84P1.cjs} +20113 -21015
- package/dist/provider-registry.json +21135 -22118
- package/dist/{registry-generator-Cw594Ttt.js → registry-generator-BDZrKvMb.js} +1 -1
- package/dist/{registry-generator-BnK5Npgr.cjs → registry-generator-DSvbAYar.cjs} +1 -1
- package/dist/{rehydrate-Dgqkw7Py.js → rehydrate-Cme19iOk.js} +2 -2
- package/dist/{rehydrate-BWnd_TEx.cjs → rehydrate-vAlkgCKL.cjs} +14 -14
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +2 -2
- package/dist/{scheduler-B-VZUvv_.js → scheduler-0ShtMM1I.js} +71 -21
- package/dist/{scheduler-D00X03jQ.cjs → scheduler-CMjK0LoQ.cjs} +82 -20
- package/dist/server/types.d.ts +6 -0
- package/dist/{signal-provider-BslnAjWG.js → signal-provider-B_mfW-J4.js} +1 -1
- package/dist/{signal-provider-BFAvh_AJ.cjs → signal-provider-D9gbevHN.cjs} +1 -1
- package/dist/signals/index.cjs +4 -3
- package/dist/signals/index.d.ts +1 -0
- package/dist/signals/index.js +4 -4
- package/dist/signals/time-signal-provider.d.ts +70 -0
- package/dist/signals-BwDXGqxc.cjs +358 -0
- package/dist/signals-TznxWfM3.js +347 -0
- package/dist/skills/create-skill.d.ts +3 -0
- package/dist/skills/index.cjs +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/inline-skill-source.d.ts +5 -1
- package/dist/skills/types.d.ts +16 -1
- package/dist/{source-fNa6u1kH.js → source-B3He4_mz.js} +7 -0
- package/dist/{source-BVOi8Xhp.cjs → source-C_nWbqI0.cjs} +7 -0
- package/dist/{state-processor-B9kxpM53.js → state-processor-B_KsS82m.js} +1 -1
- package/dist/{state-processor-kRNZ38Nf.cjs → state-processor-DaSmhVUX.cjs} +1 -1
- 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/inmemory-db.d.ts +6 -0
- package/dist/storage/domains/knowledge/base.d.ts +155 -5
- package/dist/storage/domains/knowledge/importers-inmemory.d.ts +10 -0
- package/dist/storage/domains/knowledge/importers.d.ts +39 -0
- package/dist/storage/domains/knowledge/inmemory.d.ts +12 -0
- package/dist/storage/domains/knowledge/pages-inmemory.d.ts +54 -12
- package/dist/storage/domains/knowledge/pages.d.ts +90 -1
- package/dist/storage/domains/memory/base.d.ts +117 -0
- package/dist/storage/domains/memory/index.d.ts +1 -0
- package/dist/storage/domains/memory/inmemory.d.ts +39 -0
- package/dist/storage/domains/memory/queue-thread.d.ts +42 -0
- package/dist/storage/domains/schedules/base.d.ts +31 -2
- package/dist/storage/domains/schedules/inmemory.d.ts +9 -2
- package/dist/storage/domains/workflows/base.d.ts +32 -5
- package/dist/storage/domains/workflows/inmemory.d.ts +7 -6
- package/dist/storage/domains/workflows/journal.d.ts +16 -1
- package/dist/storage/index.cjs +192 -186
- package/dist/storage/index.js +6 -6
- package/dist/storage/types.d.ts +14 -0
- package/dist/storage/workflow-snapshot.d.ts +4 -0
- package/dist/storage/workflow-step-guard.d.ts +5 -0
- package/dist/stream/base/output.d.ts +8 -0
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-BIDts1fZ.cjs → stream-B9y9VYqr.cjs} +179 -22
- package/dist/{stream-C8HKG3qC.js → stream-DSVk0bct.js} +138 -23
- package/dist/telemetry/index.cjs +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/test-utils/llm-mock.cjs +1 -1
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/{to-prompt-B9eZo2U5.cjs → to-prompt-CG-LyaBY.cjs} +9 -0
- package/dist/{to-prompt-BsDtVXrf.js → to-prompt-CMlVGYxC.js} +9 -0
- package/dist/{tool-Z3bykc1m.js → tool-DIFduuTw.js} +2 -5
- package/dist/{tool-CYlT2UA-.cjs → tool-Dn9WSDVn.cjs} +2 -5
- package/dist/tool-loop-agent/index.cjs +1 -1
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/{tool-loop-agent-PEY5a1R6.cjs → tool-loop-agent-C3wj9NhP.cjs} +5 -5
- package/dist/{tool-loop-agent-DM5V_0XS.js → tool-loop-agent-e2Bi-mrf.js} +4 -4
- package/dist/{toolchecks-DrsZdc3S.js → toolchecks-CRAfUe9H.js} +1 -1
- package/dist/{toolchecks-MFU48cit.cjs → toolchecks-DbBsQGHW.cjs} +1 -1
- package/dist/tools/code-mode/index.d.ts +2 -0
- package/dist/tools/code-mode/log-collector.d.ts +49 -0
- package/dist/tools/code-mode/types.d.ts +71 -0
- package/dist/tools/index.cjs +7 -5
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +6 -6
- package/dist/tools/is-vercel-tool.cjs +1 -1
- package/dist/tools/is-vercel-tool.js +1 -1
- package/dist/tools/tool.d.ts +2 -4
- package/dist/tools/types.d.ts +1 -0
- package/dist/{tools-CGF5Ik6j.cjs → tools-C2q0ougI.cjs} +430 -62
- package/dist/{tools-CDfyMpzN.js → tools-ybbz1YKg.js} +419 -63
- package/dist/{utils-CxMSu_wc.cjs → utils-B87rm4F-.cjs} +12 -10
- package/dist/{utils-DcnKVK34.js → utils-DCDsj1CG.js} +12 -10
- package/dist/utils.cjs +3 -3
- package/dist/utils.js +3 -3
- package/dist/{validate-RVKgazCf.cjs → validate-XPZLQRoc.cjs} +1 -1
- package/dist/{validate-Dn750ciE.js → validate-_e8OoEh5.js} +1 -1
- package/dist/vector/index.cjs +9 -9
- package/dist/vector/index.js +2 -2
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/worker/workers/orchestration-worker.d.ts +1 -0
- package/dist/{worker-SDi9jbP5.js → worker-BAstsOqw.js} +12 -7
- package/dist/{worker-CFPu9qwV.cjs → worker-CGWclXz3.cjs} +25 -14
- package/dist/{worker-DJPAdazC.js → worker-DvI9J9Qw.js} +2 -2
- package/dist/{worker-Dx0ZHMGX.cjs → worker-DzMDk--h.cjs} +3 -3
- package/dist/{workflow-ZFOz_365.cjs → workflow-BFF2mNDa.cjs} +30 -38
- package/dist/{workflow-DkBqNn7X.js → workflow-DcpI9eNC.js} +26 -34
- package/dist/workflows/builder/index.cjs +1 -1
- package/dist/workflows/builder/index.js +1 -1
- package/dist/workflows/evented/execution-engine.d.ts +3 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/evented/setup-warning.d.ts +11 -0
- package/dist/workflows/evented/workflow-event-processor/index.d.ts +10 -4
- package/dist/workflows/evented/workflow-event-processor/loop.d.ts +1 -1
- package/dist/workflows/evented/workflow-event-processor/parallel.d.ts +2 -2
- package/dist/workflows/evented/workflow-event-processor/sleep.d.ts +2 -2
- package/dist/workflows/evented/workflow.d.ts +8 -3
- package/dist/workflows/handlers/entry.d.ts +8 -0
- package/dist/workflows/index.cjs +57 -55
- package/dist/workflows/index.js +6 -6
- package/dist/workflows/run-storage.d.ts +27 -3
- package/dist/workflows/scheduler/claim.d.ts +51 -0
- package/dist/workflows/scheduler/index.d.ts +2 -0
- package/dist/workflows/step.d.ts +2 -0
- package/dist/workflows/types.d.ts +16 -0
- package/dist/workflows/workflow.d.ts +90 -11
- package/dist/workspace/filesystem/local-filesystem.d.ts +13 -0
- package/dist/workspace/index.cjs +3 -1
- package/dist/workspace/index.d.ts +1 -1
- package/dist/workspace/index.js +2 -2
- package/dist/workspace/lsp/manager.d.ts +19 -4
- package/dist/workspace/sandbox/local-sandbox.d.ts +11 -0
- package/dist/workspace/sandbox/mastra-sandbox.d.ts +17 -0
- package/dist/workspace/sandbox/sandbox.d.ts +2 -0
- package/dist/workspace/sandbox/teardown-context.d.ts +74 -0
- package/dist/workspace/tools/index.d.ts +1 -0
- package/dist/workspace/tools/media.d.ts +20 -1
- package/dist/workspace/tools/recreate-sandbox.d.ts +24 -0
- package/dist/{workspace-X2RHJZU9.cjs → workspace-BQD4tcQi.cjs} +614 -135
- package/dist/{workspace-DY2Nxiyi.js → workspace-sqcfdZRR.js} +602 -135
- package/llm/reasoning.d.ts +1 -0
- package/memory/om-events.d.ts +1 -0
- package/package.json +29 -8
- package/skills/mastra/SKILL.md +171 -0
- package/skills/mastra/references/common-errors.md +557 -0
- package/skills/mastra/references/core-concepts.md +21 -0
- package/skills/mastra/references/create-mastra.md +233 -0
- package/skills/mastra/references/embedded-docs.md +103 -0
- package/skills/mastra/references/feedback.md +69 -0
- package/skills/mastra/references/gateway.md +66 -0
- package/skills/mastra/references/mastra-api.md +222 -0
- package/skills/mastra/references/migration-guide.md +185 -0
- package/skills/mastra/references/model-selection.md +29 -0
- package/skills/mastra/references/platform.md +164 -0
- package/skills/mastra/references/remote-docs.md +193 -0
- package/skills/mastra/references/trace-query.md +150 -0
- package/skills/mastra/scripts/provider-registry.mjs +271 -0
- package/src/llm/model/provider-types.generated.d.ts +7184 -7514
- package/dist/capabilities/ai21.json +0 -4
- package/dist/capabilities/clarifai.json +0 -42
- package/dist/capabilities/jad-ai.json +0 -20
- package/dist/capabilities/llmtech.json +0 -16
- package/dist/signals-B1JSj-Ew.cjs +0 -58
- package/dist/signals-De9VnwL2.js +0 -53
- package/dist/{observability-B0R_D1PZ.cjs → observability-VaoaeadK.cjs} +647 -647
|
@@ -346,18 +346,94 @@ export declare const KNOWLEDGE_SEARCH_MAX_WORDS = 16;
|
|
|
346
346
|
export declare function knowledgeSearchWords(query: string): string[];
|
|
347
347
|
/**
|
|
348
348
|
* Points one matched search word earns on a page, by the best field it appears in: name, then
|
|
349
|
-
* description, then body
|
|
350
|
-
*
|
|
351
|
-
* match the same number of words.
|
|
349
|
+
* description, then body; a note's text counts like a body. They break ties between hits with the
|
|
350
|
+
* same {@link knowledgeSearchTermWeights} score and word count.
|
|
352
351
|
*/
|
|
353
352
|
export declare const KNOWLEDGE_SEARCH_WEIGHTS: {
|
|
354
353
|
readonly name: 3;
|
|
355
354
|
readonly description: 2;
|
|
356
355
|
readonly body: 1;
|
|
357
356
|
};
|
|
357
|
+
/**
|
|
358
|
+
* How much one matched search word counts, by how rare it is (r506): the BM25 inverse document
|
|
359
|
+
* frequency `ln(1 + (total - df + 0.5) / (df + 0.5))`, scaled by 1000 and rounded, at least 1.
|
|
360
|
+
* `total` is how many documents the search could return (readable pages and visible notes in its
|
|
361
|
+
* scope) and `df[i]` how many of them contain `words[i]`. Integers so every store sums and orders
|
|
362
|
+
* scores the same way, whether in SQL, MongoDB or JavaScript.
|
|
363
|
+
*/
|
|
364
|
+
export declare function knowledgeSearchTermWeights(df: readonly number[], total: number): number[];
|
|
365
|
+
/** One page or note hit with the keys {@link compareKnowledgeSearchHits} orders by. */
|
|
366
|
+
export interface KnowledgeSearchRank {
|
|
367
|
+
/** 0 for a page whose canonical name contains the whole query, else 1 (always 1 for a note). */
|
|
368
|
+
tier: number;
|
|
369
|
+
/** Sum of the matched words' {@link knowledgeSearchTermWeights}. */
|
|
370
|
+
score: number;
|
|
371
|
+
/** How many query words matched. */
|
|
372
|
+
matched: number;
|
|
373
|
+
/** Sum of the matched words' {@link KNOWLEDGE_SEARCH_WEIGHTS} by field. */
|
|
374
|
+
points: number;
|
|
375
|
+
updatedAt: Date;
|
|
376
|
+
type: 'page' | 'note';
|
|
377
|
+
id: string;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Keyword-search order, the same for pages and notes so they share one list: whole query in the name
|
|
381
|
+
* first, then highest score (rarer words count more), then most words matched, then most points, then
|
|
382
|
+
* newest, then pages before notes, then id in code point order.
|
|
383
|
+
*/
|
|
384
|
+
export declare function compareKnowledgeSearchHits(a: KnowledgeSearchRank, b: KnowledgeSearchRank): number;
|
|
358
385
|
/**
|
|
359
386
|
* Why `key` can't be a Knowledge page key, or undefined when it can. Keys are one path segment:
|
|
360
387
|
* non-empty, with no `/` (path separator), `#` (scope/path separator) or `%` (escape character).
|
|
361
388
|
*/
|
|
362
389
|
export declare function knowledgePageKeyProblem(key: string): string | undefined;
|
|
390
|
+
/** The fields of a batch page write (core's `KnowledgePageWrite`) the helpers below read. */
|
|
391
|
+
type KnowledgeBatchWrite = {
|
|
392
|
+
op: 'create' | 'update' | 'move' | 'delete' | 'add-note' | 'remove-note' | 'replace-links';
|
|
393
|
+
id?: string;
|
|
394
|
+
pageId?: string;
|
|
395
|
+
scopeId?: string;
|
|
396
|
+
expectedVersion?: number;
|
|
397
|
+
deletedBy?: string;
|
|
398
|
+
provenance?: {
|
|
399
|
+
author: string;
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
/**
|
|
403
|
+
* Throws unless the batch holds `applyPageWrites`' first rule: at most one create, one move and one
|
|
404
|
+
* delete per page, no create, update or move of a page the batch deletes, and at most one write
|
|
405
|
+
* per note (stores apply note removals before additions, so two writes of one note can't keep
|
|
406
|
+
* input order).
|
|
407
|
+
*/
|
|
408
|
+
export declare function assertKnowledgePageWritesBatchable(writes: readonly KnowledgeBatchWrite[]): void;
|
|
409
|
+
/**
|
|
410
|
+
* The stored version each versioned write (update, move, delete) must find when a store runs the
|
|
411
|
+
* batch's page-row writes in `order` (which must keep a page's create first and its updates in
|
|
412
|
+
* input order), so the batch ends as the writes would one by one. Null when the writes'
|
|
413
|
+
* `expectedVersion`s aren't consecutive per page: one by one, one of them would conflict.
|
|
414
|
+
*/
|
|
415
|
+
export declare function knowledgePageWriteVersions<W extends KnowledgeBatchWrite>(writes: readonly W[], order: readonly W[]): Map<W, number> | null;
|
|
416
|
+
/**
|
|
417
|
+
* The pages whose `updatedBy` would end wrong when a store runs the batch's page-row writes in
|
|
418
|
+
* `order`: those whose last update or move in input order isn't the last one the store runs. Each
|
|
419
|
+
* comes with the provenance the single writes would leave, for the store to set at the end (it
|
|
420
|
+
* doesn't change the version). Empty unless a page is both moved and updated.
|
|
421
|
+
*/
|
|
422
|
+
export declare function knowledgePageWriteLastWriters<W extends KnowledgeBatchWrite>(writes: readonly W[], order: readonly W[]): {
|
|
423
|
+
id: string;
|
|
424
|
+
provenance: {
|
|
425
|
+
author: string;
|
|
426
|
+
};
|
|
427
|
+
}[];
|
|
428
|
+
/** The activity row the single write would log for `write`, or null (`replace-links` logs none). */
|
|
429
|
+
export declare function knowledgePageWriteActivity(write: KnowledgeBatchWrite): {
|
|
430
|
+
action: 'page-created' | 'page-updated' | 'page-moved' | 'page-deleted' | 'note-added' | 'note-removed';
|
|
431
|
+
scopeId: string;
|
|
432
|
+
pageId: string;
|
|
433
|
+
noteId?: string;
|
|
434
|
+
provenance: {
|
|
435
|
+
author: string;
|
|
436
|
+
};
|
|
437
|
+
} | null;
|
|
438
|
+
export {};
|
|
363
439
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/a2a/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../rolldown-runtime-BrhgMLW6.cjs");
|
|
3
3
|
const require_client = require("../client-bbXoVR4g.cjs");
|
|
4
|
-
const require_message_list = require("../message-list-
|
|
4
|
+
const require_message_list = require("../message-list-C0F2sDNC.cjs");
|
|
5
5
|
const require_request_context = require("../request-context-D9RXYCy8.cjs");
|
|
6
6
|
const require_dynamic_argument = require("../dynamic-argument-CUc1BBOS.cjs");
|
|
7
7
|
let _a2a_js_sdk_v1 = require("@a2a-js/sdk-v1");
|
package/dist/a2a/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../rolldown-runtime-tIEjjQTE.js";
|
|
2
2
|
import { t as MastraA2AError } from "../client-BIxS0ecg.js";
|
|
3
|
-
import { n as MessageList, t as convertMessages } from "../message-list-
|
|
3
|
+
import { n as MessageList, t as convertMessages } from "../message-list-RgFlLrxG.js";
|
|
4
4
|
import { u as RequestContext } from "../request-context-COnZHt2-.js";
|
|
5
5
|
import { n as resolveDynamicArgument } from "../dynamic-argument-BzPK3qPN.js";
|
|
6
6
|
import { AgentCard, GetTaskRequest, Role, SendMessageRequest, SendMessageResponse, StreamResponse, SubscribeToTaskRequest, Task, TaskState } from "@a2a-js/sdk-v1";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { CreatedAgentSignal } from './signals.js';
|
|
2
|
+
type ActiveRunSignalScope = 'pending' | 'pre-run';
|
|
3
|
+
/**
|
|
4
|
+
* Signals waiting for a thread's active run, keyed by thread key.
|
|
5
|
+
*/
|
|
6
|
+
export declare function createActiveRunSignalQueues(): {
|
|
7
|
+
/** Appends to the thread's queue for `scope`. */
|
|
8
|
+
enqueue(scope: ActiveRunSignalScope, key: string, signal: CreatedAgentSignal): void;
|
|
9
|
+
/** Whether either of the thread's queues holds a signal with this id. */
|
|
10
|
+
includes(key: string, signalId: string): boolean;
|
|
11
|
+
/** Whether either of the thread's queues is non-empty. */
|
|
12
|
+
hasSignals(key: string): boolean;
|
|
13
|
+
/** Removes and returns the thread's whole queue for `scope`. */
|
|
14
|
+
take(scope: ActiveRunSignalScope, key: string): CreatedAgentSignal[];
|
|
15
|
+
/** The thread's queued signals, pre-run first, iterated without copying the queues. */
|
|
16
|
+
queued(key: string): Generator<CreatedAgentSignal>;
|
|
17
|
+
/** Passes each queued signal to `forward`, pre-run first, then drops the thread's queues. */
|
|
18
|
+
handOff(key: string, forward: (signal: CreatedAgentSignal, preRun: boolean) => void): void;
|
|
19
|
+
/** Puts pre-run signals a finished run never took in front of the thread's follow-ups. */
|
|
20
|
+
foldPreRunIntoPending(key: string): void;
|
|
21
|
+
/** Removes the oldest follow-up, dropping the queue once it is empty. */
|
|
22
|
+
takeNextPending(key: string): CreatedAgentSignal | undefined;
|
|
23
|
+
/** Puts a follow-up back at the front of the thread's queue. */
|
|
24
|
+
returnToFront(key: string, signal: CreatedAgentSignal): void;
|
|
25
|
+
/**
|
|
26
|
+
* Moves the remaining follow-ups in front of the thread's pre-run signals,
|
|
27
|
+
* for a follow-up run's first model request, and returns them.
|
|
28
|
+
*/
|
|
29
|
+
batchPendingIntoPreRun(key: string): CreatedAgentSignal[];
|
|
30
|
+
/**
|
|
31
|
+
* Requeues after a follow-up run failed to start: `signal`, then whatever
|
|
32
|
+
* was batched into its pre-run queue, then the follow-ups queued since.
|
|
33
|
+
*/
|
|
34
|
+
restoreAfterFailedStart(key: string, signal: CreatedAgentSignal | undefined): void;
|
|
35
|
+
/**
|
|
36
|
+
* Removes matching signals from both of the thread's queues and returns
|
|
37
|
+
* their ids, pre-run first. Each queue is replaced by a new array, or
|
|
38
|
+
* dropped when nothing is left.
|
|
39
|
+
*/
|
|
40
|
+
cancel(key: string, matches: (signal: CreatedAgentSignal) => boolean): string[];
|
|
41
|
+
/** Removes one pre-run signal in place, dropping the queue once it is empty. */
|
|
42
|
+
discardPreRunSignal(key: string, signalId: string): void;
|
|
43
|
+
/** Drops the thread's pre-run queue. */
|
|
44
|
+
discardPreRunQueue(key: string): void;
|
|
45
|
+
clear(): void;
|
|
46
|
+
};
|
|
47
|
+
export type ActiveRunSignalQueues = ReturnType<typeof createActiveRunSignalQueues>;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=active-run-signal-queues.d.ts.map
|
package/dist/agent/agent.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Docs for this @mastra/core version are bundled at node_modules/@mastra/core/dist/docs/SKILL.md. Read it before guessing APIs from these types. */
|
|
1
2
|
import type { UIMessage } from '../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js';
|
|
2
3
|
import type { StandardSchemaWithJSON } from '@mastra/schema-compat/schema';
|
|
3
4
|
import type { JSONSchema7 } from 'json-schema';
|
|
@@ -159,10 +160,7 @@ export interface AgentListSuspendedRunsResult {
|
|
|
159
160
|
* });
|
|
160
161
|
* ```
|
|
161
162
|
*
|
|
162
|
-
* @see
|
|
163
|
-
* `@mastra/core/package.json` with your project's resolver or package-manager
|
|
164
|
-
* tooling, then read `dist/docs/SKILL.md` from that package root and follow its
|
|
165
|
-
* reference links. Use package-manager tools for virtual or archived packages.
|
|
163
|
+
* @see Docs for this @mastra/core version are bundled at node_modules/@mastra/core/dist/docs/SKILL.md. Read it before guessing APIs from these types.
|
|
166
164
|
*
|
|
167
165
|
* @see [Agent documentation](https://mastra.ai/docs/agents/overview)
|
|
168
166
|
* if packaged docs are unavailable.
|
|
@@ -866,7 +864,8 @@ TRequestContext extends Record<string, any> | unknown = any, TEditor extends Age
|
|
|
866
864
|
getTracingPolicy(): TracingPolicy | undefined;
|
|
867
865
|
/**
|
|
868
866
|
* Gets the metadata for this agent, resolving function-based metadata if necessary.
|
|
869
|
-
* Metadata is a classification bag for clients
|
|
867
|
+
* Metadata is a classification bag for clients. The agent runtime reads only `metadata.persona`, to mint
|
|
868
|
+
* Knowledge persona scopes; it reads nothing else in metadata.
|
|
870
869
|
*
|
|
871
870
|
* @example
|
|
872
871
|
* ```typescript
|
|
@@ -1199,6 +1198,7 @@ TRequestContext extends Record<string, any> | unknown = any, TEditor extends Age
|
|
|
1199
1198
|
* @internal
|
|
1200
1199
|
*/
|
|
1201
1200
|
private listKnowledgeTools;
|
|
1201
|
+
private resolveKnowledgePersona;
|
|
1202
1202
|
/**
|
|
1203
1203
|
* Lists workspace tools if a workspace is configured.
|
|
1204
1204
|
* @internal
|
|
@@ -1680,6 +1680,8 @@ TRequestContext extends Record<string, any> | unknown = any, TEditor extends Age
|
|
|
1680
1680
|
* @internal Used by the server's run abort route.
|
|
1681
1681
|
*/
|
|
1682
1682
|
__abortRunAcknowledged(runId: string): Promise<boolean>;
|
|
1683
|
+
/** @internal Close the stored signals of a parked run that an abort requested by another process releases here. */
|
|
1684
|
+
__closeParkedRunSignals(runId: string): Promise<void> | undefined;
|
|
1683
1685
|
sendMessage<OUTPUT = TOutput>(message: AgentMessageInput, target: SendAgentMessageOptions<OUTPUT>): SendAgentMessageResult<OUTPUT>;
|
|
1684
1686
|
queueMessage<OUTPUT = TOutput>(message: AgentMessageInput, target: QueueAgentMessageOptions<OUTPUT>): QueueAgentMessageResult<OUTPUT>;
|
|
1685
1687
|
/**
|
|
@@ -1687,7 +1689,14 @@ TRequestContext extends Record<string, any> | unknown = any, TEditor extends Age
|
|
|
1687
1689
|
* the thread immediately when it is idle. Shares the queue used by `queueMessage()`.
|
|
1688
1690
|
*/
|
|
1689
1691
|
queueSignal<OUTPUT = TOutput>(signal: AgentSignal, target: QueueAgentSignalOptions<OUTPUT>): QueueAgentSignalResult<OUTPUT>;
|
|
1690
|
-
|
|
1692
|
+
/**
|
|
1693
|
+
* Cancels queued input of a thread: signals sent to its active run that no
|
|
1694
|
+
* model request took yet, and messages queued for its next run. Resolves
|
|
1695
|
+
* with every cancelled id once the cancellation settled, including signals
|
|
1696
|
+
* kept in memory storage. A signal a run already took into its transcript is
|
|
1697
|
+
* not cancelled.
|
|
1698
|
+
*/
|
|
1699
|
+
cancelQueuedMessages(target: CancelQueuedAgentMessagesOptions): Promise<CancelQueuedAgentMessagesResult>;
|
|
1691
1700
|
subscribeThreadEvents(scope: SubscribeAgentThreadEventsOptions, listener: AgentThreadEventListener): () => void;
|
|
1692
1701
|
sendStateSignal<OUTPUT = TOutput>(state: AgentStateSignalInput, target: SendAgentStateSignalOptions<OUTPUT>): Promise<SendAgentStateSignalResult<OUTPUT>>;
|
|
1693
1702
|
/**
|
|
@@ -2171,6 +2180,12 @@ TRequestContext extends Record<string, any> | unknown = any, TEditor extends Age
|
|
|
2171
2180
|
* segment that lost its lease without being replaced still reports its error
|
|
2172
2181
|
* but keeps the snapshots so the run stays recoverable.
|
|
2173
2182
|
*
|
|
2183
|
+
* A total deadline also closes the stored signals of a run that keeps them in
|
|
2184
|
+
* storage, with the signals of the transcript it saves. When the run's steps
|
|
2185
|
+
* execute in another process, this process holds no transcript of them and
|
|
2186
|
+
* saves only the turn's input, so the signals those steps took and memory
|
|
2187
|
+
* did not save yet are pending again for the thread's next run.
|
|
2188
|
+
*
|
|
2174
2189
|
* Never rejects: a pubsub that is already closing (for example during
|
|
2175
2190
|
* shutdown) must not turn a run's own failure into an unhandledRejection.
|
|
2176
2191
|
*
|
|
@@ -2179,6 +2194,7 @@ TRequestContext extends Record<string, any> | unknown = any, TEditor extends Age
|
|
|
2179
2194
|
protected settleExecution(runId: string, fence: ExecutionFence | undefined, outcome: {
|
|
2180
2195
|
status?: string;
|
|
2181
2196
|
error?: Error;
|
|
2197
|
+
state?: unknown;
|
|
2182
2198
|
}): Promise<void>;
|
|
2183
2199
|
private redeliverDeadlineError;
|
|
2184
2200
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Docs for this @mastra/core version are bundled at node_modules/@mastra/core/dist/docs/SKILL.md. Read it before guessing APIs from these types. */
|
|
1
2
|
import type { ModelMessage, ToolChoice } from '../_types/@internal_ai-sdk-v5@0.0.99/dist/index.js';
|
|
2
3
|
import type { ActorSignal } from '../auth/ee/index.js';
|
|
3
4
|
import type { WaitUntilFn } from '../channels/wait-until.js';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import type { PubSub } from '../../events/index.js';
|
|
16
16
|
import type { Mastra } from '../../mastra/index.js';
|
|
17
|
-
export { publishAbortRequest, requestAcknowledgedAbort, subscribeToAbortRequests } from '../streams/abort-transport.js';
|
|
17
|
+
export { publishAbortRequest, publishSignalAvailable, requestAcknowledgedAbort, subscribeToAbortRequests, } from '../streams/abort-transport.js';
|
|
18
18
|
/**
|
|
19
19
|
* Make the current process responsive to abort requests for `runId`.
|
|
20
20
|
*
|
|
@@ -345,6 +345,7 @@ export declare class DurableAgent<TAgentId extends string = string, TTools exten
|
|
|
345
345
|
runId: string;
|
|
346
346
|
agentId: string;
|
|
347
347
|
agentName?: string | undefined;
|
|
348
|
+
signalsStored?: boolean | undefined;
|
|
348
349
|
agentVersionId?: string | undefined;
|
|
349
350
|
messageListState: any;
|
|
350
351
|
toolsMetadata: any[];
|
|
@@ -20,6 +20,8 @@ export type ExecutionOutcome = {
|
|
|
20
20
|
owner: 'agent';
|
|
21
21
|
status?: string;
|
|
22
22
|
error?: Error;
|
|
23
|
+
/** The run's workflow state when it ended. */
|
|
24
|
+
state?: unknown;
|
|
23
25
|
} | {
|
|
24
26
|
owner: 'workers';
|
|
25
27
|
error?: Error;
|
|
@@ -95,6 +97,12 @@ export declare class DefaultAgentExecutionEngine {
|
|
|
95
97
|
* another server from resuming the run.
|
|
96
98
|
*/
|
|
97
99
|
cancelParkedRun(runId: string): Promise<boolean>;
|
|
100
|
+
/**
|
|
101
|
+
* Close the stored signals of a parked run that was aborted. Call it before
|
|
102
|
+
* the snapshot is deleted and before the abort terminal is published.
|
|
103
|
+
* Returns nothing to wait for when this engine's runs never store signals.
|
|
104
|
+
*/
|
|
105
|
+
closeParkedRunSignals(_runId: string): Promise<void> | undefined;
|
|
98
106
|
/**
|
|
99
107
|
* Publish the abort terminal for a parked run this call just canceled. The bus is
|
|
100
108
|
* shared, so observers on every server close now, whichever server later refuses
|
|
@@ -123,6 +131,7 @@ export declare class DefaultAgentExecutionEngine {
|
|
|
123
131
|
runId: string;
|
|
124
132
|
agentId: string;
|
|
125
133
|
agentName?: string | undefined;
|
|
134
|
+
signalsStored?: boolean | undefined;
|
|
126
135
|
agentVersionId?: string | undefined;
|
|
127
136
|
messageListState: any;
|
|
128
137
|
toolsMetadata: any[];
|
|
@@ -203,6 +212,7 @@ export declare class DefaultAgentExecutionEngine {
|
|
|
203
212
|
runId: string;
|
|
204
213
|
agentId: string;
|
|
205
214
|
agentName?: string | undefined;
|
|
215
|
+
signalsStored?: boolean | undefined;
|
|
206
216
|
agentVersionId?: string | undefined;
|
|
207
217
|
messageListState: any;
|
|
208
218
|
toolsMetadata: any[];
|
|
@@ -279,6 +289,7 @@ export declare class DefaultAgentExecutionEngine {
|
|
|
279
289
|
runId: string;
|
|
280
290
|
agentId: string;
|
|
281
291
|
agentName?: string | undefined;
|
|
292
|
+
signalsStored?: boolean | undefined;
|
|
282
293
|
agentVersionId?: string | undefined;
|
|
283
294
|
messageListState: any;
|
|
284
295
|
toolsMetadata: any[];
|
|
@@ -344,6 +355,7 @@ export declare class EventedAgentExecutionEngine extends DefaultAgentExecutionEn
|
|
|
344
355
|
#private;
|
|
345
356
|
get executionMode(): 'blocking' | 'background';
|
|
346
357
|
get suspendPersistedOnReturn(): boolean;
|
|
358
|
+
closeParkedRunSignals(runId: string): Promise<void> | undefined;
|
|
347
359
|
get executesStepsLocally(): boolean;
|
|
348
360
|
prepareExecution(pubsub: PubSub | undefined, fence: ExecutionFence | undefined, workflowEngine: 'default' | 'evented', logger: IMastraLogger, guardrailLogger: IMastraLogger | undefined): {
|
|
349
361
|
sharedExecution: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const require_observability = require("../../observability-
|
|
2
|
+
const require_execution_fence = require("../../execution-fence-CKFtgb2u.cjs");
|
|
3
|
+
const require_observability = require("../../observability-VaoaeadK.cjs");
|
|
4
4
|
// src/agent/durable/durable-agent.ts
|
|
5
|
-
var DurableAgent = class extends
|
|
5
|
+
var DurableAgent = class extends require_execution_fence.Agent {
|
|
6
6
|
/** Engine this wrapper class runs on, selected through the Agent's `durable` policy. @internal */
|
|
7
7
|
static executionEngine = "default";
|
|
8
8
|
get returnsDurableStreamResult() {
|
|
@@ -715,97 +715,97 @@ async function executeDurableToolCalls(ctx) {
|
|
|
715
715
|
}
|
|
716
716
|
return toolResults;
|
|
717
717
|
}
|
|
718
|
-
exports.AGENT_CONTROL_TOPIC =
|
|
719
|
-
exports.AGENT_STREAM_TOPIC =
|
|
720
|
-
exports.AgentControlEventTypes =
|
|
721
|
-
exports.AgentStreamBus =
|
|
722
|
-
exports.AgentStreamEventTypes =
|
|
723
|
-
exports.DURABLE_CONTEXT_SEGMENT_KEY =
|
|
724
|
-
exports.DURABLE_STOP_WHEN_ERROR_ID =
|
|
718
|
+
exports.AGENT_CONTROL_TOPIC = require_execution_fence.AGENT_CONTROL_TOPIC;
|
|
719
|
+
exports.AGENT_STREAM_TOPIC = require_execution_fence.AGENT_STREAM_TOPIC;
|
|
720
|
+
exports.AgentControlEventTypes = require_execution_fence.AgentControlEventTypes;
|
|
721
|
+
exports.AgentStreamBus = require_execution_fence.AgentStreamBus;
|
|
722
|
+
exports.AgentStreamEventTypes = require_execution_fence.AgentStreamEventTypes;
|
|
723
|
+
exports.DURABLE_CONTEXT_SEGMENT_KEY = require_execution_fence.DURABLE_CONTEXT_SEGMENT_KEY;
|
|
724
|
+
exports.DURABLE_STOP_WHEN_ERROR_ID = require_execution_fence.DURABLE_STOP_WHEN_ERROR_ID;
|
|
725
725
|
exports.DurableAgent = DurableAgent;
|
|
726
|
-
exports.DurableAgentDefaults =
|
|
727
|
-
exports.DurableStepIds =
|
|
726
|
+
exports.DurableAgentDefaults = require_execution_fence.DurableAgentDefaults;
|
|
727
|
+
exports.DurableStepIds = require_execution_fence.DurableStepIds;
|
|
728
728
|
exports.EventedAgent = EventedAgent;
|
|
729
|
-
exports.ExtendedRunRegistry =
|
|
730
|
-
exports.RUN_DEADLINE_KEY =
|
|
731
|
-
exports.RunRegistry =
|
|
732
|
-
exports.__resetExecutionFencesForTests =
|
|
733
|
-
exports.accumulatedUsageSchema =
|
|
729
|
+
exports.ExtendedRunRegistry = require_execution_fence.ExtendedRunRegistry;
|
|
730
|
+
exports.RUN_DEADLINE_KEY = require_execution_fence.RUN_DEADLINE_KEY;
|
|
731
|
+
exports.RunRegistry = require_execution_fence.RunRegistry;
|
|
732
|
+
exports.__resetExecutionFencesForTests = require_execution_fence.__resetExecutionFencesForTests;
|
|
733
|
+
exports.accumulatedUsageSchema = require_execution_fence.accumulatedUsageSchema;
|
|
734
734
|
exports.agentLoopTermination = require_observability.agentLoopTermination;
|
|
735
|
-
exports.agentThreadStreamRuntime =
|
|
736
|
-
exports.applyReservedMemoryContextKeys =
|
|
737
|
-
exports.baseDurableAgenticInputSchema =
|
|
738
|
-
exports.baseIterationStateSchema =
|
|
739
|
-
exports.buildStepRecord =
|
|
740
|
-
exports.calculateAccumulatedUsage =
|
|
741
|
-
exports.carrySegmentSpans =
|
|
742
|
-
exports.createBaseIterationStateUpdate =
|
|
735
|
+
exports.agentThreadStreamRuntime = require_execution_fence.agentThreadStreamRuntime;
|
|
736
|
+
exports.applyReservedMemoryContextKeys = require_execution_fence.applyReservedMemoryContextKeys;
|
|
737
|
+
exports.baseDurableAgenticInputSchema = require_execution_fence.baseDurableAgenticInputSchema;
|
|
738
|
+
exports.baseIterationStateSchema = require_execution_fence.baseIterationStateSchema;
|
|
739
|
+
exports.buildStepRecord = require_execution_fence.buildStepRecord;
|
|
740
|
+
exports.calculateAccumulatedUsage = require_execution_fence.calculateAccumulatedUsage;
|
|
741
|
+
exports.carrySegmentSpans = require_execution_fence.carrySegmentSpans;
|
|
742
|
+
exports.createBaseIterationStateUpdate = require_execution_fence.createBaseIterationStateUpdate;
|
|
743
743
|
exports.createDurableAgent = createDurableAgent;
|
|
744
|
-
exports.createDurableAgentStream =
|
|
745
|
-
exports.createDurableAgenticWorkflow =
|
|
746
|
-
exports.createDurableBackgroundTaskCheckStep =
|
|
747
|
-
exports.createDurableGoalStep =
|
|
748
|
-
exports.createDurableIsTaskCompleteStep =
|
|
749
|
-
exports.createDurableLLMExecutionStep =
|
|
750
|
-
exports.createDurableLLMMappingStep =
|
|
751
|
-
exports.createDurableToolCallStep =
|
|
744
|
+
exports.createDurableAgentStream = require_execution_fence.createDurableAgentStream;
|
|
745
|
+
exports.createDurableAgenticWorkflow = require_execution_fence.createDurableAgenticWorkflow;
|
|
746
|
+
exports.createDurableBackgroundTaskCheckStep = require_execution_fence.createDurableBackgroundTaskCheckStep;
|
|
747
|
+
exports.createDurableGoalStep = require_execution_fence.createDurableGoalStep;
|
|
748
|
+
exports.createDurableIsTaskCompleteStep = require_execution_fence.createDurableIsTaskCompleteStep;
|
|
749
|
+
exports.createDurableLLMExecutionStep = require_execution_fence.createDurableLLMExecutionStep;
|
|
750
|
+
exports.createDurableLLMMappingStep = require_execution_fence.createDurableLLMMappingStep;
|
|
751
|
+
exports.createDurableToolCallStep = require_execution_fence.createDurableToolCallStep;
|
|
752
752
|
exports.createEventedAgent = createEventedAgent;
|
|
753
|
-
exports.createRunAbortController =
|
|
754
|
-
exports.createWorkflowInput =
|
|
755
|
-
exports.deleteRunRegistryEntry =
|
|
756
|
-
exports.detachFullStreamOnEnd =
|
|
757
|
-
exports.diffResponseMessages =
|
|
758
|
-
exports.durableAgenticOutputSchema =
|
|
759
|
-
exports.emitAbortEvent =
|
|
760
|
-
exports.emitChunkEvent =
|
|
761
|
-
exports.emitErrorEvent =
|
|
762
|
-
exports.emitFinishEvent =
|
|
763
|
-
exports.emitStepFinishEvent =
|
|
764
|
-
exports.emitStepStartEvent =
|
|
765
|
-
exports.emitSuspendedEvent =
|
|
766
|
-
exports.endFailedSegmentSpans =
|
|
767
|
-
exports.endRunSpansWithError =
|
|
768
|
-
exports.ensureRemoteAbortListener =
|
|
769
|
-
exports.executeDurableAgentScorers =
|
|
753
|
+
exports.createRunAbortController = require_execution_fence.createRunAbortController;
|
|
754
|
+
exports.createWorkflowInput = require_execution_fence.createWorkflowInput;
|
|
755
|
+
exports.deleteRunRegistryEntry = require_execution_fence.deleteRunRegistryEntry;
|
|
756
|
+
exports.detachFullStreamOnEnd = require_execution_fence.detachFullStreamOnEnd;
|
|
757
|
+
exports.diffResponseMessages = require_execution_fence.diffResponseMessages;
|
|
758
|
+
exports.durableAgenticOutputSchema = require_execution_fence.durableAgenticOutputSchema;
|
|
759
|
+
exports.emitAbortEvent = require_execution_fence.emitAbortEvent;
|
|
760
|
+
exports.emitChunkEvent = require_execution_fence.emitChunkEvent;
|
|
761
|
+
exports.emitErrorEvent = require_execution_fence.emitErrorEvent;
|
|
762
|
+
exports.emitFinishEvent = require_execution_fence.emitFinishEvent;
|
|
763
|
+
exports.emitStepFinishEvent = require_execution_fence.emitStepFinishEvent;
|
|
764
|
+
exports.emitStepStartEvent = require_execution_fence.emitStepStartEvent;
|
|
765
|
+
exports.emitSuspendedEvent = require_execution_fence.emitSuspendedEvent;
|
|
766
|
+
exports.endFailedSegmentSpans = require_execution_fence.endFailedSegmentSpans;
|
|
767
|
+
exports.endRunSpansWithError = require_execution_fence.endRunSpansWithError;
|
|
768
|
+
exports.ensureRemoteAbortListener = require_execution_fence.ensureRemoteAbortListener;
|
|
769
|
+
exports.executeDurableAgentScorers = require_execution_fence.executeDurableAgentScorers;
|
|
770
770
|
exports.executeDurableToolCalls = executeDurableToolCalls;
|
|
771
771
|
exports.executionFailureTermination = require_observability.executionFailureTermination;
|
|
772
|
-
exports.getRunRegistryEntry =
|
|
773
|
-
exports.getRunStreamSlot =
|
|
774
|
-
exports.getScopeStreamSlot =
|
|
775
|
-
exports.globalRunRegistry =
|
|
772
|
+
exports.getRunRegistryEntry = require_execution_fence.getRunRegistryEntry;
|
|
773
|
+
exports.getRunStreamSlot = require_execution_fence.getRunStreamSlot;
|
|
774
|
+
exports.getScopeStreamSlot = require_execution_fence.getScopeStreamSlot;
|
|
775
|
+
exports.globalRunRegistry = require_execution_fence.globalRunRegistry;
|
|
776
776
|
exports.isDurableAgent = isDurableAgent;
|
|
777
777
|
exports.isEventedAgent = isEventedAgent;
|
|
778
778
|
exports.isEventedAgentClass = isEventedAgentClass;
|
|
779
779
|
exports.isLocalDurableAgent = isLocalDurableAgent;
|
|
780
|
-
exports.liveSegmentSpan =
|
|
781
|
-
exports.loadRunStoredMessages =
|
|
782
|
-
exports.modelConfigSchema =
|
|
783
|
-
exports.modelListEntrySchema =
|
|
784
|
-
exports.normalizeResumeGenerateArgs =
|
|
785
|
-
exports.persistDurableRunInput =
|
|
786
|
-
exports.prepareForDurableExecution =
|
|
787
|
-
exports.pruneAgentLoopSnapshot =
|
|
788
|
-
exports.publishAbortRequest =
|
|
789
|
-
exports.readRunDeadline =
|
|
790
|
-
exports.rebuildRunToolsFromMastra =
|
|
791
|
-
exports.requestAcknowledgedAbort =
|
|
792
|
-
exports.resolveDurableToolCallConcurrency =
|
|
793
|
-
exports.resolveInternalState =
|
|
794
|
-
exports.resolveModel =
|
|
795
|
-
exports.resolveRuntimeDependencies =
|
|
796
|
-
exports.resolveTool =
|
|
797
|
-
exports.runDurableFinishSideEffects =
|
|
798
|
-
exports.runDurableStreamUntilIdle =
|
|
799
|
-
exports.runResumeDurableStreamUntilIdle =
|
|
800
|
-
exports.segmentEndedBySuspension =
|
|
801
|
-
exports.segmentSpanData =
|
|
802
|
-
exports.serializeDurableOptions =
|
|
803
|
-
exports.serializeDurableState =
|
|
804
|
-
exports.serializeModelConfig =
|
|
805
|
-
exports.serializeToolsMetadata =
|
|
806
|
-
exports.setRunRegistryEntry =
|
|
807
|
-
exports.subscribeToAbortRequests =
|
|
808
|
-
exports.takeRunScorerInstances =
|
|
809
|
-
exports.toolRequiresApproval =
|
|
810
|
-
exports.untilIdleHandlesBackgroundTask =
|
|
811
|
-
exports.validateModelTimeoutSettings =
|
|
780
|
+
exports.liveSegmentSpan = require_execution_fence.liveSegmentSpan;
|
|
781
|
+
exports.loadRunStoredMessages = require_execution_fence.loadRunStoredMessages;
|
|
782
|
+
exports.modelConfigSchema = require_execution_fence.modelConfigSchema;
|
|
783
|
+
exports.modelListEntrySchema = require_execution_fence.modelListEntrySchema;
|
|
784
|
+
exports.normalizeResumeGenerateArgs = require_execution_fence.normalizeResumeGenerateArgs;
|
|
785
|
+
exports.persistDurableRunInput = require_execution_fence.persistDurableRunInput;
|
|
786
|
+
exports.prepareForDurableExecution = require_execution_fence.prepareForDurableExecution;
|
|
787
|
+
exports.pruneAgentLoopSnapshot = require_execution_fence.pruneAgentLoopSnapshot;
|
|
788
|
+
exports.publishAbortRequest = require_execution_fence.publishAbortRequest;
|
|
789
|
+
exports.readRunDeadline = require_execution_fence.readRunDeadline;
|
|
790
|
+
exports.rebuildRunToolsFromMastra = require_execution_fence.rebuildRunToolsFromMastra;
|
|
791
|
+
exports.requestAcknowledgedAbort = require_execution_fence.requestAcknowledgedAbort;
|
|
792
|
+
exports.resolveDurableToolCallConcurrency = require_execution_fence.resolveDurableToolCallConcurrency;
|
|
793
|
+
exports.resolveInternalState = require_execution_fence.resolveInternalState;
|
|
794
|
+
exports.resolveModel = require_execution_fence.resolveModel;
|
|
795
|
+
exports.resolveRuntimeDependencies = require_execution_fence.resolveRuntimeDependencies;
|
|
796
|
+
exports.resolveTool = require_execution_fence.resolveTool;
|
|
797
|
+
exports.runDurableFinishSideEffects = require_execution_fence.runDurableFinishSideEffects;
|
|
798
|
+
exports.runDurableStreamUntilIdle = require_execution_fence.runDurableStreamUntilIdle;
|
|
799
|
+
exports.runResumeDurableStreamUntilIdle = require_execution_fence.runResumeDurableStreamUntilIdle;
|
|
800
|
+
exports.segmentEndedBySuspension = require_execution_fence.segmentEndedBySuspension;
|
|
801
|
+
exports.segmentSpanData = require_execution_fence.segmentSpanData;
|
|
802
|
+
exports.serializeDurableOptions = require_execution_fence.serializeDurableOptions;
|
|
803
|
+
exports.serializeDurableState = require_execution_fence.serializeDurableState;
|
|
804
|
+
exports.serializeModelConfig = require_execution_fence.serializeModelConfig;
|
|
805
|
+
exports.serializeToolsMetadata = require_execution_fence.serializeToolsMetadata;
|
|
806
|
+
exports.setRunRegistryEntry = require_execution_fence.setRunRegistryEntry;
|
|
807
|
+
exports.subscribeToAbortRequests = require_execution_fence.subscribeToAbortRequests;
|
|
808
|
+
exports.takeRunScorerInstances = require_execution_fence.takeRunScorerInstances;
|
|
809
|
+
exports.toolRequiresApproval = require_execution_fence.toolRequiresApproval;
|
|
810
|
+
exports.untilIdleHandlesBackgroundTask = require_execution_fence.untilIdleHandlesBackgroundTask;
|
|
811
|
+
exports.validateModelTimeoutSettings = require_execution_fence.validateModelTimeoutSettings;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import {
|
|
1
|
+
import { $ as modelConfigSchema, A as detachFullStreamOnEnd, B as serializeToolsMetadata, Bs as emitChunkEvent, Cc as AgentControlEventTypes, D as prepareForDurableExecution, E as normalizeResumeGenerateArgs, F as createDurableToolCallStep, G as resolveDurableToolCallConcurrency, Gs as emitSuspendedEvent, Hs as emitFinishEvent, I as createWorkflowInput, J as createBaseIterationStateUpdate, Js as resolveInternalState, K as buildStepRecord, Ks as diffResponseMessages, L as serializeDurableOptions, M as createDurableGoalStep, N as createDurableIsTaskCompleteStep, O as applyReservedMemoryContextKeys, P as createDurableLLMMappingStep, Pt as validateModelTimeoutSettings, Q as durableAgenticOutputSchema, Qs as toolRequiresApproval, R as serializeDurableState, Rs as createDurableAgentStream, Sc as AGENT_STREAM_TOPIC, T as Agent, Us as emitStepFinishEvent, V as createDurableLLMExecutionStep, Vs as emitErrorEvent, W as createDurableBackgroundTaskCheckStep, Ws as emitStepStartEvent, X as baseDurableAgenticInputSchema, Xs as resolveRuntimeDependencies, Y as accumulatedUsageSchema, Ys as resolveModel, Z as baseIterationStateSchema, Zs as resolveTool, _c as segmentSpanData, _t as untilIdleHandlesBackgroundTask, ac as endRunSpansWithError, at as runResumeDurableStreamUntilIdle, bc as DurableStepIds, cc as getRunRegistryEntry, ct as readRunDeadline, dc as setRunRegistryEntry, dt as requestAcknowledgedAbort, ec as DURABLE_CONTEXT_SEGMENT_KEY, et as modelListEntrySchema, fc as takeRunScorerInstances, ft as subscribeToAbortRequests, gc as segmentEndedBySuspension, gt as getScopeStreamSlot, hc as liveSegmentSpan, ht as getRunStreamSlot, i as agentThreadStreamRuntime, ic as deleteRunRegistryEntry, it as runDurableStreamUntilIdle, j as createDurableAgenticWorkflow, k as persistDurableRunInput, lc as globalRunRegistry, lt as AgentStreamBus, mc as endFailedSegmentSpans, nc as RunRegistry, nt as runDurableFinishSideEffects, ot as RUN_DEADLINE_KEY, pc as carrySegmentSpans, pt as createRunAbortController, q as calculateAccumulatedUsage, qs as rebuildRunToolsFromMastra, rt as loadRunStoredMessages, st as ensureRemoteAbortListener, t as __resetExecutionFencesForTests, tc as ExtendedRunRegistry, tt as executeDurableAgentScorers, ut as publishAbortRequest, vc as DURABLE_STOP_WHEN_ERROR_ID, vt as pruneAgentLoopSnapshot, wc as AgentStreamEventTypes, xc as AGENT_CONTROL_TOPIC, yc as DurableAgentDefaults, z as serializeModelConfig, zs as emitAbortEvent } from "../../execution-fence-DTrAehtv.js";
|
|
2
|
+
import { a as agentLoopTermination, o as executionFailureTermination } from "../../observability-DPDWibyH.js";
|
|
3
3
|
// src/agent/durable/durable-agent.ts
|
|
4
4
|
var DurableAgent = class extends Agent {
|
|
5
5
|
/** Engine this wrapper class runs on, selected through the Agent's `durable` policy. @internal */
|
|
@@ -11,6 +11,8 @@ import type { DurableAgenticWorkflowInput, RunRegistryEntry } from './types.js';
|
|
|
11
11
|
export declare const SCOPES_ALREADY_APPLIED: unique symbol;
|
|
12
12
|
/** Carries the persisted spans a resume rebuilt from storage reattaches to into `prepare()`. */
|
|
13
13
|
export declare const RESUMED_SPAN_DATA: unique symbol;
|
|
14
|
+
/** Carries where a resume rebuilt from storage keeps its run's signals, as the run decided when it started. */
|
|
15
|
+
export declare const RESUMED_SIGNALS_STORED: unique symbol;
|
|
14
16
|
/**
|
|
15
17
|
* Result from the preparation phase
|
|
16
18
|
*/
|
|
@@ -91,6 +93,21 @@ export interface PreparationOptions<OUTPUT = undefined> {
|
|
|
91
93
|
* Falls back to `agent.name` if not provided.
|
|
92
94
|
*/
|
|
93
95
|
durableAgentName?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the run may keep signals sent to it in its memory storage: its
|
|
98
|
+
* agent runs on the evented engine and the run holds its thread. It does
|
|
99
|
+
* when the run also has memory, a thread and a resource, and that storage
|
|
100
|
+
* keeps pending signals; the run's input carries the outcome.
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
signalsStored?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* For a run rebuilt from storage, the outcome it started with, carried
|
|
106
|
+
* through `RESUMED_SIGNALS_STORED`. The run keeps it and leaves its thread's
|
|
107
|
+
* signal run as it is.
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
110
|
+
resumedSignalsStored?: boolean;
|
|
94
111
|
}
|
|
95
112
|
/**
|
|
96
113
|
* Prepare for durable agent execution.
|
|
@@ -7,8 +7,9 @@ export declare function releaseRunMessageRefs(runId: string | undefined): void;
|
|
|
7
7
|
/**
|
|
8
8
|
* A `SaveQueueManager` `onSaved` callback that records the rows a run saved,
|
|
9
9
|
* so its persisted transcript references them instead of repeating them. Only
|
|
10
|
-
* runs that store refs hold an entry (the
|
|
11
|
-
* for other runs, or landing after the
|
|
10
|
+
* runs that store refs hold an entry (created before the run saves its input,
|
|
11
|
+
* else by the transcript store), so saves for other runs, or landing after the
|
|
12
|
+
* run released its entry, are not kept.
|
|
12
13
|
*/
|
|
13
14
|
export declare function recordRunSavedMessages(runId: string): (rows: MastraDBMessage[]) => void;
|
|
14
15
|
//# sourceMappingURL=run-message-refs.d.ts.map
|