@mastra/core 1.87.0-alpha.17 → 1.87.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_types/@internal_ai-v6@0.0.99/dist/index.d.ts +2075 -123
- package/dist/_types/@internal_core@0.1.4/dist/knowledge-compat/index.d.ts +30 -3
- package/dist/agent/agent.d.ts +2 -4
- package/dist/agent/agent.types.d.ts +1 -0
- package/dist/agent/durable/index.cjs +86 -86
- package/dist/agent/durable/index.js +2 -2
- package/dist/agent/durable/run-registry.d.ts +54 -25
- package/dist/agent/index.cjs +16 -16
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.js +3 -3
- package/dist/agent/scopes.d.ts +8 -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 +8 -1
- package/dist/agent-controller/index.cjs +3 -3
- package/dist/agent-controller/index.js +3 -3
- package/dist/agent-controller/session.d.ts +16 -0
- package/dist/{agent-controller-cqcUP-xy.cjs → agent-controller-DzOEhUjR.cjs} +55 -35
- package/dist/{agent-controller-ChZ3qcXE.js → agent-controller-lBdNfcFi.js} +31 -11
- 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 +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-CH_gzJwc.js → background-tasks-DAu4WaCb.js} +1 -1
- package/dist/{background-tasks-BIk1TRPw.cjs → background-tasks-DOmQdBVn.cjs} +1 -1
- package/dist/browser/index.cjs +4 -4
- package/dist/browser/index.js +4 -4
- package/dist/{builder-ZAUhFqtD.cjs → builder-BFcVEbX0.cjs} +3 -3
- package/dist/{builder-v01k8_0x.js → builder-DHFtMW8D.js} +2 -2
- package/dist/capabilities/302ai.json +198 -198
- package/dist/capabilities/abacus.json +2 -96
- package/dist/capabilities/abliteratedllm.json +36 -36
- package/dist/capabilities/abliteration-ai.json +11 -11
- package/dist/capabilities/above.json +19 -19
- package/dist/capabilities/adaption.json +11 -11
- package/dist/capabilities/adzuki.json +32 -32
- package/dist/capabilities/agentrouter.json +12 -12
- package/dist/capabilities/agnes.json +4 -4
- package/dist/capabilities/ai-router.json +5 -5
- package/dist/capabilities/aiand.json +25 -25
- package/dist/capabilities/aigrow.json +13 -13
- package/dist/capabilities/aimlapi.json +144 -144
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +24 -24
- package/dist/capabilities/aki-io.json +12 -12
- package/dist/capabilities/alibaba-cn.json +81 -126
- package/dist/capabilities/alibaba-coding-plan-cn.json +4 -4
- package/dist/capabilities/alibaba-coding-plan.json +4 -4
- package/dist/capabilities/alibaba-token-plan-cn.json +57 -53
- package/dist/capabilities/alibaba-token-plan.json +57 -53
- package/dist/capabilities/alibaba.json +76 -71
- package/dist/capabilities/ambient.json +14 -32
- package/dist/capabilities/amd-tokenlab.json +41 -0
- package/dist/capabilities/amd.json +8 -8
- package/dist/capabilities/anthropic.json +32 -56
- package/dist/capabilities/anyapi.json +47 -47
- package/dist/capabilities/apiko.json +5 -5
- package/dist/capabilities/arcee.json +5 -5
- package/dist/capabilities/augure.json +4 -4
- package/dist/capabilities/auriko.json +15 -15
- package/dist/capabilities/bailing.json +3 -3
- package/dist/capabilities/baseten.json +35 -35
- package/dist/capabilities/bee.json +5 -5
- package/dist/capabilities/berget.json +2 -35
- package/dist/capabilities/bothub.json +14 -14
- package/dist/capabilities/boundless.json +39 -39
- package/dist/capabilities/bumo.json +40 -40
- package/dist/capabilities/byteplus.json +28 -28
- package/dist/capabilities/cheapest-token.json +31 -31
- package/dist/capabilities/chutes.json +48 -17
- package/dist/capabilities/cline-pass.json +32 -45
- package/dist/capabilities/cloudcode.json +8 -8
- package/dist/capabilities/cloudferro-sherlock.json +4 -4
- package/dist/capabilities/cloudflare-workers-ai.json +17 -17
- package/dist/capabilities/commandcode.json +141 -156
- package/dist/capabilities/concentrate.json +289 -289
- package/dist/capabilities/cortecs.json +103 -103
- package/dist/capabilities/crossmodel.json +194 -194
- package/dist/capabilities/crusoe.json +18 -18
- package/dist/capabilities/daoxe.json +9 -9
- package/dist/capabilities/databricks.json +128 -128
- package/dist/capabilities/deepinfra.json +98 -94
- package/dist/capabilities/deepseek.json +4 -4
- package/dist/capabilities/digitalocean.json +114 -114
- package/dist/capabilities/dinference.json +1 -2
- package/dist/capabilities/dothoosh.json +26 -26
- package/dist/capabilities/doubleword.json +23 -23
- package/dist/capabilities/edenai.json +285 -285
- package/dist/capabilities/empiriolabs.json +176 -167
- package/dist/capabilities/engy.json +16 -16
- package/dist/capabilities/entrim.json +8 -8
- package/dist/capabilities/evroc.json +15 -15
- package/dist/capabilities/ezkielyna.json +10 -10
- package/dist/capabilities/fastrouter.json +93 -97
- package/dist/capabilities/fireworks-ai.json +85 -85
- package/dist/capabilities/fortytwo.json +4 -4
- package/dist/capabilities/freemodel.json +7 -51
- package/dist/capabilities/friendli.json +8 -8
- package/dist/capabilities/frogbot.json +95 -103
- package/dist/capabilities/gisoo.json +15 -15
- package/dist/capabilities/gmicloud.json +21 -21
- package/dist/capabilities/google.json +55 -55
- package/dist/capabilities/graphn.json +10 -10
- package/dist/capabilities/greenpt.json +35 -35
- package/dist/capabilities/groq.json +7 -20
- package/dist/capabilities/helicone.json +84 -86
- package/dist/capabilities/hetzner.json +4 -4
- package/dist/capabilities/hopper.json +2 -2
- package/dist/capabilities/hostinger-router.json +5 -5
- package/dist/capabilities/hpc-ai.json +8 -24
- package/dist/capabilities/huawei-maas.json +13 -13
- package/dist/capabilities/hubris.json +30 -30
- package/dist/capabilities/huggingface.json +86 -101
- package/dist/capabilities/hyper.json +24 -24
- package/dist/capabilities/impossibl.json +152 -199
- package/dist/capabilities/inceptron.json +8 -8
- package/dist/capabilities/inco.json +4 -21
- package/dist/capabilities/infer.json +16 -16
- package/dist/capabilities/inferall.json +2 -18
- package/dist/capabilities/inference-coop.json +6 -6
- package/dist/capabilities/inference.json +2 -11
- package/dist/capabilities/inferenceapis.json +24 -24
- package/dist/capabilities/infersia.json +13 -13
- package/dist/capabilities/inferx.json +3 -3
- package/dist/capabilities/infomaniak.json +3 -3
- package/dist/capabilities/io-net.json +6 -16
- package/dist/capabilities/isoquant.json +4 -4
- package/dist/capabilities/iteracompute.json +42 -80
- package/dist/capabilities/jalapeno.json +11 -11
- package/dist/capabilities/jiekou.json +19 -167
- package/dist/capabilities/joingonka.json +4 -4
- package/dist/capabilities/jzstoken.json +54 -54
- package/dist/capabilities/keln.json +23 -23
- package/dist/capabilities/kenari.json +122 -130
- package/dist/capabilities/kilo.json +649 -647
- package/dist/capabilities/kimi-code-plan-cn.json +7 -7
- package/dist/capabilities/kimi-code-plan-global.json +7 -7
- package/dist/capabilities/kitani.json +4 -4
- package/dist/capabilities/klavo.json +24 -24
- package/dist/capabilities/korouter.json +32 -32
- package/dist/capabilities/kunavo.json +7 -7
- package/dist/capabilities/liquid.json +8 -8
- package/dist/capabilities/lithosai.json +3 -3
- package/dist/capabilities/llmgateway-providers.json +885 -893
- package/dist/capabilities/llmgateway.json +340 -340
- package/dist/capabilities/llmtr.json +16 -54
- package/dist/capabilities/lowrouter.json +61 -61
- package/dist/capabilities/lyceum.json +14 -14
- package/dist/capabilities/meganova.json +0 -1
- package/dist/capabilities/melious.json +14 -14
- package/dist/capabilities/merge-gateway.json +292 -292
- package/dist/capabilities/meta.json +11 -11
- package/dist/capabilities/minimax-cn-coding-plan.json +2 -2
- package/dist/capabilities/minimax-cn.json +5 -5
- package/dist/capabilities/minimax-coding-plan.json +2 -2
- package/dist/capabilities/minimax.json +5 -5
- package/dist/capabilities/mistral.json +15 -31
- package/dist/capabilities/mixlayer.json +5 -5
- package/dist/capabilities/moark.json +0 -2
- package/dist/capabilities/modal.json +8 -8
- package/dist/capabilities/model-oracle-ai.json +19 -27
- package/dist/capabilities/modelis.json +14 -14
- package/dist/capabilities/modelscope.json +2 -2
- package/dist/capabilities/modular.json +11 -11
- package/dist/capabilities/moneo.json +7 -38
- package/dist/capabilities/moonshotai-cn.json +7 -7
- package/dist/capabilities/moonshotai.json +7 -7
- package/dist/capabilities/morph.json +13 -13
- package/dist/capabilities/munito-eu.json +8 -8
- package/dist/capabilities/munito.json +10 -10
- package/dist/capabilities/nan.json +31 -31
- package/dist/capabilities/nano-gpt.json +581 -603
- package/dist/capabilities/nearai.json +119 -119
- package/dist/capabilities/nebius.json +30 -31
- package/dist/capabilities/neon.json +132 -132
- package/dist/capabilities/neuralwatt.json +41 -41
- package/dist/capabilities/nokeep.json +5 -5
- package/dist/capabilities/novita-ai.json +113 -227
- package/dist/capabilities/nvidia.json +14 -82
- package/dist/capabilities/oathbreaker.json +2 -2
- package/dist/capabilities/obscurify.json +28 -28
- package/dist/capabilities/oci.json +4 -4
- package/dist/capabilities/ofox.json +270 -270
- package/dist/capabilities/ollama-cloud.json +53 -53
- package/dist/capabilities/openai.json +57 -57
- package/dist/capabilities/opencode-go.json +88 -90
- package/dist/capabilities/openreason.json +5 -5
- package/dist/capabilities/openrouter.json +574 -563
- package/dist/capabilities/opper.json +29 -34
- package/dist/capabilities/orcarouter.json +307 -367
- package/dist/capabilities/outerlabs.json +30 -30
- package/dist/capabilities/ovhcloud.json +19 -19
- package/dist/capabilities/pareto.json +2 -7
- package/dist/capabilities/perplexity-agent.json +47 -102
- package/dist/capabilities/perplexity.json +2 -2
- package/dist/capabilities/phala.json +35 -35
- package/dist/capabilities/pioneer.json +5 -122
- package/dist/capabilities/poe.json +130 -130
- package/dist/capabilities/poolside.json +2 -2
- package/dist/capabilities/powerspring.json +14 -14
- package/dist/capabilities/primalabs.json +12 -12
- package/dist/capabilities/prime.json +123 -115
- package/dist/capabilities/privatemode-ai.json +8 -36
- package/dist/capabilities/proxystacks.json +5 -5
- package/dist/capabilities/qihang-ai.json +3 -15
- package/dist/capabilities/qiniu-ai.json +13 -87
- package/dist/capabilities/refuseless.json +7 -14
- package/dist/capabilities/regolo-ai.json +9 -13
- package/dist/capabilities/requesty.json +202 -202
- package/dist/capabilities/routing-run.json +3 -40
- package/dist/capabilities/ruapi.json +21 -21
- package/dist/capabilities/runcrate.json +10 -10
- package/dist/capabilities/runinfra.json +16 -16
- package/dist/capabilities/sakana.json +3 -3
- package/dist/capabilities/sambanova.json +9 -9
- package/dist/capabilities/sandbase.json +20 -20
- package/dist/capabilities/sarvam.json +22 -13
- package/dist/capabilities/scaleway.json +18 -18
- package/dist/capabilities/scnet-token-plan.json +7 -7
- package/dist/capabilities/scx-ai.json +16 -32
- package/dist/capabilities/sensenova.json +12 -12
- package/dist/capabilities/siliconflow-cn.json +45 -97
- package/dist/capabilities/siliconflow.json +53 -53
- package/dist/capabilities/snowflake-cortex.json +26 -26
- package/dist/capabilities/sokkan.json +8 -20
- package/dist/capabilities/sparrowcodes.json +21 -21
- package/dist/capabilities/stackit.json +1 -2
- package/dist/capabilities/standardcompute.json +84 -120
- package/dist/capabilities/steadyrouter.json +41 -41
- package/dist/capabilities/stepfun-ai-step-plan.json +8 -8
- package/dist/capabilities/stepfun-ai.json +8 -8
- package/dist/capabilities/stepfun-step-plan.json +8 -8
- package/dist/capabilities/stepfun.json +8 -8
- package/dist/capabilities/stepping-stone.json +15 -15
- package/dist/capabilities/subconscious.json +2 -2
- package/dist/capabilities/superbot-gg.json +4 -4
- package/dist/capabilities/synthetic.json +8 -17
- package/dist/capabilities/synthorai.json +21 -21
- package/dist/capabilities/teamorouter.json +23 -23
- package/dist/capabilities/teapot-router.json +10 -10
- package/dist/capabilities/tencent-token-plan-intl.json +25 -25
- package/dist/capabilities/tencent-token-plan.json +38 -38
- package/dist/capabilities/tencent-tokenhub.json +46 -46
- package/dist/capabilities/tensorx.json +48 -48
- package/dist/capabilities/tenstorrent.json +4 -4
- package/dist/capabilities/the-grid-ai.json +29 -29
- package/dist/capabilities/thinkingmachines.json +71 -71
- package/dist/capabilities/tinfoil.json +8 -8
- package/dist/capabilities/toapis.json +3 -3
- package/dist/capabilities/togetherai.json +42 -42
- package/dist/capabilities/tokengo.json +21 -21
- package/dist/capabilities/tokenify.json +2 -2
- package/dist/capabilities/trustedrouter.json +5 -5
- package/dist/capabilities/trustedtokens.json +15 -15
- package/dist/capabilities/umans-ai-coding-plan.json +16 -16
- package/dist/capabilities/umans-ai.json +13 -13
- package/dist/capabilities/uncensuredai.json +4 -4
- package/dist/capabilities/unorouter.json +1 -22
- package/dist/capabilities/unrestricted.json +4 -20
- package/dist/capabilities/uplinkswitch.json +21 -21
- package/dist/capabilities/upstage.json +3 -15
- package/dist/capabilities/vancine.json +20 -20
- package/dist/capabilities/vercel.json +551 -551
- package/dist/capabilities/vivgrid.json +51 -131
- package/dist/capabilities/volcengine-coding-plan.json +29 -29
- package/dist/capabilities/volcengine.json +27 -27
- package/dist/capabilities/vultr.json +14 -67
- package/dist/capabilities/wafer.ai.json +17 -17
- package/dist/capabilities/wallaby.json +2 -2
- package/dist/capabilities/wally.json +12 -12
- package/dist/capabilities/wandb.json +21 -21
- package/dist/capabilities/watt.json +22 -22
- package/dist/capabilities/xai.json +5 -5
- package/dist/capabilities/xiaomi-token-plan-ams.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-cn.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -2
- package/dist/capabilities/xiaomi.json +2 -2
- package/dist/capabilities/xpersona.json +13 -13
- package/dist/capabilities/xxapi.json +30 -30
- package/dist/capabilities/zai-coding-plan.json +17 -17
- package/dist/capabilities/zai.json +31 -31
- package/dist/capabilities/zenifra.json +26 -26
- package/dist/capabilities/zenmux.json +190 -233
- package/dist/capabilities/zerogpu.json +8 -8
- package/dist/capabilities/zhipuai-coding-plan.json +3 -14
- package/dist/capabilities/zhipuai.json +30 -30
- package/dist/capabilities/zro.json +6 -6
- package/dist/channels/index.cjs +24 -24
- package/dist/channels/index.js +2 -2
- package/dist/{channels-B7lf5BnT.js → channels-BBwgs50q.js} +2 -2
- package/dist/{channels-CAA8MkDQ.cjs → channels-CbhgGgQD.cjs} +6 -6
- package/dist/coding-agent/index.cjs +7 -7
- package/dist/coding-agent/index.js +4 -4
- package/dist/{constants-CFO8w780.cjs → constants-B2FVV_2e.cjs} +1 -1
- package/dist/{constants-CUv0mU2y.js → constants-Dro9fuhk.js} +1 -1
- package/dist/datasets/index.cjs +9 -9
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1147 -1142
- package/dist/docs/references/docs-agents-overview.md +9 -0
- package/dist/docs/references/docs-deployment-workers.md +1 -1
- package/dist/docs/references/docs-harness-background-tasks.md +8 -5
- package/dist/docs/references/docs-harness-durable-agents.md +1 -0
- package/dist/docs/references/docs-knowledge-search.md +1 -1
- package/dist/docs/references/docs-server-pubsub.md +1 -1
- package/dist/docs/references/docs-skills.md +4 -1
- package/dist/docs/references/docs-workflows-overview.md +2 -0
- package/dist/docs/references/reference-agent-controller-session.md +19 -0
- package/dist/docs/references/reference-agents-createSkill.md +20 -1
- package/dist/docs/references/reference-knowledge-knowledge-tools.md +1 -2
- package/dist/docs/references/reference-observability-metrics-metrics-context.md +63 -3
- package/dist/docs/references/reference-pubsub-base.md +1 -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-templates-overview.md +31 -1
- package/dist/docs/references/reference-workflows-run-methods-restart.md +2 -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 +1 -1
- package/dist/events/index.js +1 -1
- package/dist/events/pubsub.d.ts +1 -3
- package/dist/{run-registry-bm6b6mwQ.js → execution-fence-B8yV_n51.js} +62508 -62052
- package/dist/{run-registry-BaVTwGKh.cjs → execution-fence-fqV6FGdV.cjs} +63621 -63153
- 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/index.cjs +163 -153
- package/dist/knowledge/index.js +18 -8
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/gateways/opencode-session-header.d.ts +28 -0
- package/dist/llm/model/provider-types.generated.d.ts +7412 -7795
- package/dist/llm/model/resolve-model.d.ts +1 -0
- package/dist/llm/model/shared.types.d.ts +1 -0
- package/dist/{llm-CGl_FZsb.cjs → llm-B7ul27Ay.cjs} +32 -14
- package/dist/{llm-B5OxUmL4.js → llm-Cy3WZXgA.js} +32 -14
- package/dist/loop/index.cjs +15 -15
- package/dist/loop/index.js +2 -2
- package/dist/loop/server.cjs +1 -1
- package/dist/loop/server.js +1 -1
- package/dist/{manager-BuPZ97U6.cjs → manager-CY-RzZJL.cjs} +21 -19
- package/dist/{manager-R_QVoiy9.js → manager-Dsub5fyz.js} +9 -7
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.d.ts +33 -4
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-CHYi4Woq.cjs → mastra-DXQUuwFl.cjs} +116 -67
- package/dist/{mastra-Cl5EC-jR.js → mastra-yjoYfTS5.js} +76 -27
- package/dist/memory/index.cjs +24 -24
- package/dist/memory/index.js +2 -2
- package/dist/memory/mock.d.ts +2 -3
- package/dist/{model-WmKuSHa8.cjs → model-BARBpXDN.cjs} +2 -2
- package/dist/{model-BNIR9RSw.js → model-DauH8JTo.js} +2 -2
- package/dist/{netlify-D4orVt-5.js → netlify-BNBtKR4Q.js} +86 -4
- package/dist/{netlify-C_6KLad8.cjs → netlify-DGsETiFB.cjs} +97 -3
- 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-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/{provider-registry-CkHZ7heH.js → provider-registry-CfHy4Zhw.js} +21401 -22401
- package/dist/{provider-registry-DH7XbpHT.cjs → provider-registry-Y6tbfFhH.cjs} +21401 -22401
- package/dist/provider-registry.json +21940 -22961
- package/dist/{registry-generator-Dn8HU1Jz.cjs → registry-generator-BEJ0APNc.cjs} +1 -1
- package/dist/{registry-generator-CAXpGkmM.js → registry-generator-DJiQAI8V.js} +1 -1
- package/dist/{rehydrate-DZyZNbaq.cjs → rehydrate-4Sl7D3kO.cjs} +14 -14
- package/dist/{rehydrate-Cy7-QPU-.js → rehydrate-Da4_E_N8.js} +2 -2
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +2 -2
- 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 +3 -3
- package/dist/signals/index.js +3 -3
- package/dist/{signals-CbmgVwL-.cjs → signals-BwDXGqxc.cjs} +2 -2
- package/dist/{signals-Clupx3jz.js → signals-TznxWfM3.js} +2 -2
- 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-DYZMfjv3.js → source-B3He4_mz.js} +1 -1
- package/dist/{source-BC8Et5qZ.cjs → source-C_nWbqI0.cjs} +1 -1
- 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 +1 -1
- package/dist/storage/domains/knowledge/pages.d.ts +8 -1
- package/dist/storage/domains/memory/base.d.ts +19 -9
- package/dist/storage/domains/memory/inmemory.d.ts +4 -1
- package/dist/storage/domains/memory/queue-thread.d.ts +7 -1
- package/dist/storage/domains/workflows/base.d.ts +18 -5
- package/dist/storage/domains/workflows/inmemory.d.ts +3 -5
- package/dist/storage/domains/workflows/journal.d.ts +16 -1
- package/dist/storage/index.cjs +187 -186
- package/dist/storage/index.js +6 -6
- 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 +1 -0
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-B9dswdIM.js → stream-BFhCDJvz.js} +18 -8
- package/dist/{stream-CbG7k93m.cjs → stream-CZy8XA_q.cjs} +23 -7
- 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/{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-BnlPROel.cjs → tool-loop-agent-DifR6VLI.cjs} +4 -4
- package/dist/{tool-loop-agent-BmlzhMxc.js → tool-loop-agent-SOpIJRws.js} +3 -3
- package/dist/{toolchecks-DrsZdc3S.js → toolchecks-CRAfUe9H.js} +1 -1
- package/dist/{toolchecks-MFU48cit.cjs → toolchecks-DbBsQGHW.cjs} +1 -1
- package/dist/tools/index.cjs +5 -5
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +5 -5
- 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-BEYxowf0.cjs → tools-C2q0ougI.cjs} +1 -1
- package/dist/{tools-tPy2FwMI.js → tools-ybbz1YKg.js} +1 -1
- package/dist/{utils-N_OPw-9g.cjs → utils-BjFntMW_.cjs} +6 -5
- package/dist/{utils-BU8lpEZ4.js → utils-DN_kWhH6.js} +6 -5
- package/dist/utils.cjs +3 -3
- package/dist/utils.js +3 -3
- package/dist/{validate-BvxwUPNa.cjs → validate-CBQ0dMBb.cjs} +1 -1
- package/dist/{validate-BANPY3pi.js → validate-KIBMWuyc.js} +1 -1
- package/dist/vector/index.cjs +8 -8
- package/dist/vector/index.js +1 -1
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/{worker-BpVWGM6Q.js → worker-Bqg7bsxX.js} +8 -3
- package/dist/{worker-E2MdhICW.cjs → worker-CJ_JYSy0.cjs} +3 -3
- package/dist/{worker-B3s2DjXP.cjs → worker-Ct6E5_2p.cjs} +16 -11
- package/dist/{worker-CZ_07SOb.js → worker-DVM_pvH7.js} +2 -2
- package/dist/{workflow-BrcVks0j.js → workflow-BmShpn3p.js} +4 -4
- package/dist/{workflow-BuPW86ke.cjs → workflow-DEAvg0pI.cjs} +8 -8
- package/dist/workflows/builder/index.cjs +1 -1
- package/dist/workflows/builder/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/evented/workflow-event-processor/index.d.ts +0 -2
- package/dist/workflows/evented/workflow.d.ts +2 -1
- package/dist/workflows/index.cjs +54 -54
- package/dist/workflows/index.js +4 -4
- package/dist/workflows/run-storage.d.ts +16 -1
- package/dist/workflows/types.d.ts +10 -0
- package/dist/workflows/workflow.d.ts +3 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/{workspace-CzzrnE6Q.cjs → workspace-BQD4tcQi.cjs} +3 -3
- package/dist/{workspace-Ct2kAiDv.js → workspace-sqcfdZRR.js} +2 -2
- package/package.json +7 -6
- 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 +7412 -7795
- package/dist/{observability-B0R_D1PZ.cjs → observability-VaoaeadK.cjs} +647 -647
|
@@ -346,15 +346,42 @@ 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).
|
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.
|
|
@@ -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';
|
|
@@ -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-fqV6FGdV.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 {
|
|
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-B8yV_n51.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 */
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TTLCache } from '@isaacs/ttlcache';
|
|
2
1
|
import type { MastraScorer } from '../../evals/base.js';
|
|
3
2
|
import type { MastraLanguageModel } from '../../llm/model/shared.types.js';
|
|
4
3
|
import type { Mastra } from '../../mastra/index.js';
|
|
@@ -8,21 +7,15 @@ import type { MessageList } from '../message-list/index.js';
|
|
|
8
7
|
import type { SaveQueueManager } from '../save-queue/index.js';
|
|
9
8
|
import type { RunRegistryEntry } from './types.js';
|
|
10
9
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* Entries are keyed by runId (which are unique UUIDs).
|
|
16
|
-
*
|
|
17
|
-
* Uses TTLCache to prevent unbounded memory growth: entries auto-expire
|
|
18
|
-
* (refreshed on access) and the registry is hard-capped at 1000 concurrent
|
|
19
|
-
* entries.
|
|
10
|
+
* How long a run's entries stay registered without being read. Every read
|
|
11
|
+
* refreshes the TTL, and the registry is hard-capped at 1000 concurrent runs,
|
|
12
|
+
* which bounds memory growth.
|
|
20
13
|
*
|
|
21
14
|
* The TTL is a crash/leak safety net, NOT an activity timeout. A run that is
|
|
22
15
|
* actively executing — waiting on a tool, a sub-agent, or a model call — can
|
|
23
16
|
* go arbitrarily long without anything reading its entry, and disposal is
|
|
24
17
|
* destructive (it force-closes the run's stream and drops the live model and
|
|
25
|
-
* tools). Such runs hold their
|
|
18
|
+
* tools). Such runs hold their entries alive explicitly via `markRunActive`.
|
|
26
19
|
*/
|
|
27
20
|
export declare const RUN_REGISTRY_TTL_MS: number;
|
|
28
21
|
/**
|
|
@@ -31,17 +24,48 @@ export declare const RUN_REGISTRY_TTL_MS: number;
|
|
|
31
24
|
* harmless.
|
|
32
25
|
*/
|
|
33
26
|
export declare const RUN_REGISTRY_HEARTBEAT_MS: number;
|
|
34
|
-
export declare const globalRunRegistry: TTLCache<string, RunRegistryEntry>;
|
|
35
27
|
/**
|
|
36
|
-
*
|
|
28
|
+
* Process-wide registry for accessing run entries from workflow steps.
|
|
29
|
+
* This is necessary because workflow steps don't have direct access to
|
|
30
|
+
* the DurableAgent instance's registry.
|
|
31
|
+
*
|
|
32
|
+
* Entries are keyed by runId and Mastra instance. Several instances in one
|
|
33
|
+
* process can hold an entry for the same run: the instance that started it
|
|
34
|
+
* keeps its live entry, and a sibling executing some of its steps keeps the
|
|
35
|
+
* state it rebuilt from storage, as a worker in another process would. An
|
|
36
|
+
* instance never sees another instance's entry, so a runId reused by another
|
|
37
|
+
* instance cannot read or overwrite the earlier run's state either.
|
|
37
38
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* ownerless entry (a placeholder or rehydrated entry) is claimed by the first
|
|
43
|
-
* scoped reader, so a later instance reusing the runId cannot adopt it.
|
|
39
|
+
* Workflow steps read through `getRunRegistryEntry(runId, mastra)`. Reads
|
|
40
|
+
* without an instance keep the single-instance behavior integrations and tests
|
|
41
|
+
* rely on: they see the entry written without an instance, or the run's only
|
|
42
|
+
* entry.
|
|
44
43
|
*/
|
|
44
|
+
export declare const globalRunRegistry: {
|
|
45
|
+
ttl: number;
|
|
46
|
+
/**
|
|
47
|
+
* The entry `mastra` holds for the run. An entry written without an instance
|
|
48
|
+
* is claimed by the first instance that reads it, so a later instance reusing
|
|
49
|
+
* the runId cannot adopt it.
|
|
50
|
+
*/
|
|
51
|
+
get(runId: string, mastra?: Mastra): RunRegistryEntry | undefined;
|
|
52
|
+
has(runId: string, mastra?: Mastra): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Store the entry `mastra` (by default `entry.mastra`) holds for the run and
|
|
55
|
+
* restart the run's TTL. It replaces an entry written without an instance,
|
|
56
|
+
* which that instance has now claimed, but no other instance's entry.
|
|
57
|
+
*/
|
|
58
|
+
set(runId: string, entry: RunRegistryEntry, mastra?: Mastra | undefined): void;
|
|
59
|
+
/** Remove the entry `get(runId, mastra)` returns and run its cleanup. */
|
|
60
|
+
delete(runId: string, mastra?: Mastra): boolean;
|
|
61
|
+
/** Remove every entry, running each one's cleanup. */
|
|
62
|
+
clear(): void;
|
|
63
|
+
/** The runIds with at least one entry. */
|
|
64
|
+
keys(): IterableIterator<string>;
|
|
65
|
+
/** Every instance's entries. */
|
|
66
|
+
values(): IterableIterator<RunRegistryEntry>;
|
|
67
|
+
};
|
|
68
|
+
/** Read the entry `mastra` holds for a run, as seen from a workflow step running under it. */
|
|
45
69
|
export declare function getRunRegistryEntry(runId: string, mastra: Mastra | undefined): RunRegistryEntry | undefined;
|
|
46
70
|
/**
|
|
47
71
|
* Request-context key that identifies a run segment on engines whose steps carry no Core execution
|
|
@@ -56,13 +80,16 @@ export declare function getStepSegment(runId: string, stepContext: RequestContex
|
|
|
56
80
|
* here still belongs to the previous caller and must not be reused for the new execution.
|
|
57
81
|
*/
|
|
58
82
|
export declare function getLiveRunRequestContext(entry: RunRegistryEntry | undefined, runId: string | undefined, stepContext: RequestContext | undefined, executionId?: string): RequestContext<unknown> | undefined;
|
|
83
|
+
/** Publish the entry `mastra` holds for `runId`. Other instances' entries for the run are untouched. */
|
|
84
|
+
export declare function setRunRegistryEntry(runId: string, entry: RunRegistryEntry, mastra: Mastra | undefined): void;
|
|
85
|
+
/** Remove the entry `mastra` holds for `runId`, leaving other instances' entries alone. */
|
|
86
|
+
export declare function deleteRunRegistryEntry(runId: string, mastra: Mastra | undefined): void;
|
|
59
87
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
88
|
+
* The Mastra instances in this process whose entry for the run holds the fence
|
|
89
|
+
* of `executionId`. Usually one; every match is returned so callers can pick
|
|
90
|
+
* the instance on their own pubsub.
|
|
62
91
|
*/
|
|
63
|
-
export declare function
|
|
64
|
-
/** Remove `runId`'s entry only if it belongs to `mastra` (or has no owner). */
|
|
65
|
-
export declare function deleteRunRegistryEntry(runId: string, mastra: Mastra | undefined): void;
|
|
92
|
+
export declare function getExecutingInstances(runId: string, executionId: string): Mastra[];
|
|
66
93
|
export declare function setRunScorerInstances(runId: string, scorers: Record<string, MastraScorer>, mastra: Mastra | undefined): void;
|
|
67
94
|
/** Remove and return the run's scorer instances, unless another Mastra owns them. */
|
|
68
95
|
export declare function takeRunScorerInstances(runId: string, mastra: Mastra | undefined): Record<string, MastraScorer> | undefined;
|
|
@@ -114,11 +141,13 @@ export declare function abandonDurableAgentExecutions(mastra: Mastra): Promise<v
|
|
|
114
141
|
* End a run's root spans (MODEL_GENERATION then AGENT_RUN) with an error so the trace
|
|
115
142
|
* still exports — stores persist only span-end events. After a resume the fresh resume
|
|
116
143
|
* spans are the active root, so prefer them. Ending an already-ended span is a no-op,
|
|
117
|
-
* so the duplicate error paths (workflow failure + emitError) are safe.
|
|
144
|
+
* so the duplicate error paths (workflow failure + emitError) are safe. `mastra` selects
|
|
145
|
+
* the spans of the instance's entry. Never throws.
|
|
118
146
|
*/
|
|
119
147
|
export declare function endRunSpansWithError(runId: string, error: Error, options?: {
|
|
120
148
|
endSpan?: boolean;
|
|
121
149
|
endStep?: boolean;
|
|
150
|
+
mastra?: Mastra;
|
|
122
151
|
}): void;
|
|
123
152
|
/**
|
|
124
153
|
* Registry for per-run non-serializable state.
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
2
|
+
const require_stream = require("../stream-CZy8XA_q.cjs");
|
|
3
|
+
const require_execution_fence = require("../execution-fence-fqV6FGdV.cjs");
|
|
4
4
|
const require_message_list = require("../message-list-C0F2sDNC.cjs");
|
|
5
5
|
const require_signals = require("../signals-CWxAMEmE.cjs");
|
|
6
6
|
const require_to_prompt = require("../to-prompt-CG-LyaBY.cjs");
|
|
7
7
|
const require_schedules = require("../schedules-BZS8McF7.cjs");
|
|
8
|
-
const require_signal_provider = require("../signal-provider-
|
|
9
|
-
exports.AGENT_RESUME_CLAIM_STALE_MS =
|
|
8
|
+
const require_signal_provider = require("../signal-provider-D9gbevHN.cjs");
|
|
9
|
+
exports.AGENT_RESUME_CLAIM_STALE_MS = require_execution_fence.AGENT_RESUME_CLAIM_STALE_MS;
|
|
10
10
|
exports.AGENT_SCHEDULE_PREFIX = require_schedules.AGENT_SCHEDULE_PREFIX;
|
|
11
|
-
exports.Agent =
|
|
12
|
-
exports.DEFAULT_TOOL_DECLINE_REASON =
|
|
13
|
-
exports.MAX_FS_SUBAGENT_DEPTH =
|
|
11
|
+
exports.Agent = require_execution_fence.Agent;
|
|
12
|
+
exports.DEFAULT_TOOL_DECLINE_REASON = require_execution_fence.DEFAULT_TOOL_DECLINE_REASON;
|
|
13
|
+
exports.MAX_FS_SUBAGENT_DEPTH = require_execution_fence.MAX_FS_SUBAGENT_DEPTH;
|
|
14
14
|
exports.MessageList = require_message_list.MessageList;
|
|
15
15
|
exports.ScheduleInputSchema = require_schedules.ScheduleInputSchema;
|
|
16
16
|
exports.ScheduleOutputSchema = require_schedules.ScheduleOutputSchema;
|
|
@@ -20,29 +20,29 @@ exports.TripWire = require_stream.TripWire;
|
|
|
20
20
|
exports.TypeDetector = require_message_list.TypeDetector;
|
|
21
21
|
exports.WORKFLOW_SCHEDULE_PREFIX = require_schedules.WORKFLOW_SCHEDULE_PREFIX;
|
|
22
22
|
exports.WebhookSignalProvider = require_signal_provider.WebhookSignalProvider;
|
|
23
|
-
exports.agentConfig =
|
|
24
|
-
exports.agentInstructions =
|
|
23
|
+
exports.agentConfig = require_execution_fence.agentConfig;
|
|
24
|
+
exports.agentInstructions = require_execution_fence.agentInstructions;
|
|
25
25
|
exports.aiV5ModelMessageToV2PromptMessage = require_to_prompt.aiV5ModelMessageToV2PromptMessage;
|
|
26
|
-
exports.assembleAgentFromFsEntry =
|
|
26
|
+
exports.assembleAgentFromFsEntry = require_execution_fence.assembleAgentFromFsEntry;
|
|
27
27
|
exports.convertMessages = require_message_list.convertMessages;
|
|
28
28
|
exports.createMessageSignal = require_signals.createMessageSignal;
|
|
29
29
|
exports.createSignal = require_signals.createSignal;
|
|
30
30
|
exports.dataPartToSignal = require_signals.dataPartToSignal;
|
|
31
31
|
exports.defineSchedule = require_schedules.defineSchedule;
|
|
32
|
-
exports.getGoalActivityDurationMs =
|
|
32
|
+
exports.getGoalActivityDurationMs = require_execution_fence.getGoalActivityDurationMs;
|
|
33
33
|
exports.getMessageAuthor = require_signals.getMessageAuthor;
|
|
34
|
-
exports.hasResumableStreams =
|
|
35
|
-
exports.isAgentCompatible =
|
|
34
|
+
exports.hasResumableStreams = require_execution_fence.hasResumableStreams;
|
|
35
|
+
exports.isAgentCompatible = require_execution_fence.isAgentCompatible;
|
|
36
36
|
exports.isCreatedAgentSignal = require_signals.isCreatedAgentSignal;
|
|
37
|
-
exports.isDurableAgentLike =
|
|
37
|
+
exports.isDurableAgentLike = require_execution_fence.isDurableAgentLike;
|
|
38
38
|
exports.isMastraSignalMessage = require_signals.isMastraSignalMessage;
|
|
39
39
|
exports.isSignalProvider = require_signal_provider.isSignalProvider;
|
|
40
40
|
exports.isSupportedLanguageModel = require_stream.isSupportedLanguageModel;
|
|
41
41
|
exports.isTransientSignalMessage = require_signals.isTransientSignalMessage;
|
|
42
42
|
exports.isUserAuthoredMessage = require_signals.isUserAuthoredMessage;
|
|
43
43
|
exports.mastraDBMessageToSignal = require_signals.mastraDBMessageToSignal;
|
|
44
|
-
exports.mergeAgentPersona =
|
|
45
|
-
exports.resolveDeclineReason =
|
|
44
|
+
exports.mergeAgentPersona = require_execution_fence.mergeAgentPersona;
|
|
45
|
+
exports.resolveDeclineReason = require_execution_fence.resolveDeclineReason;
|
|
46
46
|
exports.resolveDeliveryAttributes = require_signals.resolveDeliveryAttributes;
|
|
47
47
|
exports.resolveSuspendedToolRunId = require_stream.resolveSuspendedToolRunId;
|
|
48
48
|
exports.resolveThreadIdFromArgs = require_stream.resolveThreadIdFromArgs;
|
package/dist/agent/index.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
|
export { TripWire } from './trip-wire.js';
|
|
2
3
|
export { MessageList, convertMessages, aiV5ModelMessageToV2PromptMessage, TypeDetector } from './message-list/index.js';
|
|
3
4
|
export type { OutputFormat } from './message-list/index.js';
|
package/dist/agent/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { dn as resolveSuspendedToolRunId, fn as resolveThreadIdFromArgs, hn as tryStreamWithJsonFallback, l as TripWire, mn as tryGenerateWithJsonFallback, pn as supportedLanguageModelSpecifications, un as isSupportedLanguageModel } from "../stream-BFhCDJvz.js";
|
|
2
|
+
import { C as mergeAgentPersona, Hl as isDurableAgentLike, S as MAX_FS_SUBAGENT_DEPTH, T as Agent, Ts as getGoalActivityDurationMs, Vl as hasResumableStreams, b as agentInstructions, bt as resolveDeclineReason, cu as isAgentCompatible, w as AGENT_RESUME_CLAIM_STALE_MS, x as assembleAgentFromFsEntry, y as agentConfig, yt as DEFAULT_TOOL_DECLINE_REASON } from "../execution-fence-B8yV_n51.js";
|
|
3
3
|
import { Q as TypeDetector, n as MessageList, t as convertMessages } from "../message-list-RgFlLrxG.js";
|
|
4
4
|
import { a as isCreatedAgentSignal, c as isUserAuthoredMessage, d as signalSpanAttributes, f as signalToDataPartFormat, h as signalToXmlMarkup, i as getMessageAuthor, l as mastraDBMessageToSignal, m as signalToMessage, n as createSignal, o as isMastraSignalMessage, p as signalToMastraDBMessage, r as dataPartToSignal, s as isTransientSignalMessage, t as createMessageSignal, u as resolveDeliveryAttributes } from "../signals-CqR_iWkg.js";
|
|
5
5
|
import { n as aiV5ModelMessageToV2PromptMessage } from "../to-prompt-CMlVGYxC.js";
|
|
6
6
|
import { d as ScheduleInputSchema, f as ScheduleOutputSchema, i as toWorkflowSchedule, n as toAgentSchedule, p as WORKFLOW_SCHEDULE_PREFIX, r as toScheduleView, s as defineSchedule, t as Schedules, u as AGENT_SCHEDULE_PREFIX } from "../schedules-DZfSx-7P.js";
|
|
7
|
-
import { i as isSignalProvider, n as WebhookSignalProvider, r as SignalProvider } from "../signal-provider-
|
|
7
|
+
import { i as isSignalProvider, n as WebhookSignalProvider, r as SignalProvider } from "../signal-provider-B_mfW-J4.js";
|
|
8
8
|
export { AGENT_RESUME_CLAIM_STALE_MS, AGENT_SCHEDULE_PREFIX, Agent, DEFAULT_TOOL_DECLINE_REASON, MAX_FS_SUBAGENT_DEPTH, MessageList, ScheduleInputSchema, ScheduleOutputSchema, Schedules, SignalProvider, TripWire, TypeDetector, WORKFLOW_SCHEDULE_PREFIX, WebhookSignalProvider, agentConfig, agentInstructions, aiV5ModelMessageToV2PromptMessage, assembleAgentFromFsEntry, convertMessages, createMessageSignal, createSignal, dataPartToSignal, defineSchedule, getGoalActivityDurationMs, getMessageAuthor, hasResumableStreams, isAgentCompatible, isCreatedAgentSignal, isDurableAgentLike, isMastraSignalMessage, isSignalProvider, isSupportedLanguageModel, isTransientSignalMessage, isUserAuthoredMessage, mastraDBMessageToSignal, mergeAgentPersona, resolveDeclineReason, resolveDeliveryAttributes, resolveSuspendedToolRunId, resolveThreadIdFromArgs, signalSpanAttributes, signalToDataPartFormat, signalToMastraDBMessage, signalToMessage, signalToXmlMarkup, supportedLanguageModelSpecifications, toAgentSchedule, toScheduleView, toWorkflowSchedule, tryGenerateWithJsonFallback, tryStreamWithJsonFallback };
|
package/dist/agent/scopes.d.ts
CHANGED
|
@@ -104,6 +104,14 @@ export declare function incomingAgentScopes(input: {
|
|
|
104
104
|
defaultScopes?: readonly string[];
|
|
105
105
|
mastra?: ResolveAgentScopesInput['mastra'];
|
|
106
106
|
}): string[];
|
|
107
|
+
/**
|
|
108
|
+
* Rejects a Memory identity that cannot be encoded as a well-formed URI. The message never
|
|
109
|
+
* interpolates the malformed value, so it stays safe to log and echo back to a client.
|
|
110
|
+
*
|
|
111
|
+
* Exported only for `thread-stream-topic` to guard direct runtime identities at the single
|
|
112
|
+
* thread-key constructor; it is module-internal and is not part of the package's public API.
|
|
113
|
+
*/
|
|
114
|
+
export declare function assertWellFormedMemoryId(field: 'threadId' | 'resourceId', value: string | undefined): void;
|
|
107
115
|
/**
|
|
108
116
|
* Resolves the scopes an agent run acts with, and the Memory resource/thread they imply.
|
|
109
117
|
*
|
package/dist/agent/types.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 { GenerateTextOnStepFinishCallback } from '../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js';
|
|
2
3
|
import type { ProviderDefinedTool } from '../_types/@internal_external-types@0.0.102/dist/index.js';
|
|
3
4
|
import type { JSONSchema7 } from 'json-schema';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_provider_registry = require("../../provider-registry-
|
|
2
|
+
const require_provider_registry = require("../../provider-registry-Y6tbfFhH.cjs");
|
|
3
3
|
// src/agent-builder/ee/types.ts
|
|
4
4
|
/**
|
|
5
5
|
* Default-on values for {@link AgentFeatures}. `browser` is defaulted
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getRegisteredProviders, o as isProviderRegistered, u as parseModelString } from "../../provider-registry-
|
|
1
|
+
import { a as getRegisteredProviders, o as isProviderRegistered, u as parseModelString } from "../../provider-registry-CfHy4Zhw.js";
|
|
2
2
|
// src/agent-builder/ee/types.ts
|
|
3
3
|
/**
|
|
4
4
|
* Default-on values for {@link AgentFeatures}. `browser` is defaulted
|
|
@@ -116,8 +116,9 @@ export declare class AgentController<TState = {}> {
|
|
|
116
116
|
* @param resourceId - Memory resource to bind this session to. Defaults to the controller `resourceId` or `id`.
|
|
117
117
|
* @param createInitialThread - Create a thread when no existing thread matches. Defaults to true.
|
|
118
118
|
* @param resumeOnly - Only return a live session or recover one from a stored thread; never start a new conversation.
|
|
119
|
+
* @param resumeLatestThread - Bind the most recent matching thread when no `threadId` is given. Defaults to true.
|
|
119
120
|
*/
|
|
120
|
-
createSession({ resourceId, ownerId, id, tags, threadId, createInitialThread, resumeOnly, workspace, browser, requestContext, }?: {
|
|
121
|
+
createSession({ resourceId, ownerId, id, tags, threadId, createInitialThread, resumeOnly, resumeLatestThread, workspace, browser, requestContext, }?: {
|
|
121
122
|
resourceId?: string;
|
|
122
123
|
id?: string;
|
|
123
124
|
ownerId?: string;
|
|
@@ -141,6 +142,12 @@ export declare class AgentController<TState = {}> {
|
|
|
141
142
|
* caller never asked for.
|
|
142
143
|
*/
|
|
143
144
|
resumeOnly?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Bind the most recent thread in this session's scope when no `threadId` is given. Set false to start
|
|
147
|
+
* a new conversation instead: a new thread, or none until first use when `createInitialThread` is false.
|
|
148
|
+
* Applies only when the session is created; a live session keeps its current thread.
|
|
149
|
+
*/
|
|
150
|
+
resumeLatestThread?: boolean;
|
|
144
151
|
workspace?: Workspace;
|
|
145
152
|
browser?: MastraBrowser;
|
|
146
153
|
requestContext?: RequestContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_state_processor = require("../state-processor-
|
|
3
|
-
const require_tools = require("../tools-
|
|
4
|
-
const require_agent_controller = require("../agent-controller-
|
|
2
|
+
const require_state_processor = require("../state-processor-DaSmhVUX.cjs");
|
|
3
|
+
const require_tools = require("../tools-C2q0ougI.cjs");
|
|
4
|
+
const require_agent_controller = require("../agent-controller-DzOEhUjR.cjs");
|
|
5
5
|
exports.AgentController = require_agent_controller.AgentController;
|
|
6
6
|
exports.MODEL_PERSISTENCE_VERSION = require_agent_controller.MODEL_PERSISTENCE_VERSION;
|
|
7
7
|
exports.MODEL_PERSISTENCE_VERSION_KEY = require_agent_controller.MODEL_PERSISTENCE_VERSION_KEY;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as taskCheckTool, h as taskWriteTool, m as taskUpdateTool, o as assignTaskIds, p as taskCompleteTool } from "../state-processor-
|
|
2
|
-
import { s as askUserTool, t as submitPlanTool } from "../tools-
|
|
3
|
-
import { a as Session, c as defaultDisplayState, d as SessionStartupCancelledError, f as isSessionNotStartedError, i as MODEL_PERSISTENCE_VERSION_KEY, l as defaultOMProgressState, n as parseSubagentMeta, o as getSuspensionAddressKey, p as isSessionStartupCancelledError, r as MODEL_PERSISTENCE_VERSION, s as migratePersistedModelSelection, t as AgentController, u as SessionNotStartedError } from "../agent-controller-
|
|
1
|
+
import { f as taskCheckTool, h as taskWriteTool, m as taskUpdateTool, o as assignTaskIds, p as taskCompleteTool } from "../state-processor-B_KsS82m.js";
|
|
2
|
+
import { s as askUserTool, t as submitPlanTool } from "../tools-ybbz1YKg.js";
|
|
3
|
+
import { a as Session, c as defaultDisplayState, d as SessionStartupCancelledError, f as isSessionNotStartedError, i as MODEL_PERSISTENCE_VERSION_KEY, l as defaultOMProgressState, n as parseSubagentMeta, o as getSuspensionAddressKey, p as isSessionStartupCancelledError, r as MODEL_PERSISTENCE_VERSION, s as migratePersistedModelSelection, t as AgentController, u as SessionNotStartedError } from "../agent-controller-lBdNfcFi.js";
|
|
4
4
|
export { AgentController, MODEL_PERSISTENCE_VERSION, MODEL_PERSISTENCE_VERSION_KEY, Session, SessionNotStartedError, SessionStartupCancelledError, askUserTool, assignTaskIds, defaultDisplayState, defaultOMProgressState, getSuspensionAddressKey, isSessionNotStartedError, isSessionStartupCancelledError, migratePersistedModelSelection, parseSubagentMeta, submitPlanTool, taskCheckTool, taskCompleteTool, taskUpdateTool, taskWriteTool };
|