@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-BrhgMLW6.cjs");
|
|
2
|
-
const require_netlify = require("./netlify-
|
|
2
|
+
const require_netlify = require("./netlify-DGsETiFB.cjs");
|
|
3
3
|
let path = require("path");
|
|
4
4
|
path = require_rolldown_runtime.__toESM(path, 1);
|
|
5
5
|
let fs_promises = require("fs/promises");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as getGatewayId, v as shouldEnableGateway, y as getCapabilityFileName } from "./netlify-BNBtKR4Q.js";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import fs from "fs/promises";
|
|
4
4
|
// src/llm/model/registry-generator.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_execution_fence = require("./execution-fence-fqV6FGdV.cjs");
|
|
2
2
|
const require_predicate_index = require("./predicate/index.cjs");
|
|
3
|
-
const require_validate = require("./validate-
|
|
3
|
+
const require_validate = require("./validate-CBQ0dMBb.cjs");
|
|
4
4
|
let _mastra_schema_compat_schema = require("@mastra/schema-compat/schema");
|
|
5
5
|
// src/workflows/dynamic/serialize.ts
|
|
6
6
|
/**
|
|
@@ -92,7 +92,7 @@ function serializeEntry(entry) {
|
|
|
92
92
|
}
|
|
93
93
|
case "loop": {
|
|
94
94
|
const predicate = entry.predicate;
|
|
95
|
-
if (!predicate || typeof predicate !== "object") throw new Error(`Loop step "${
|
|
95
|
+
if (!predicate || typeof predicate !== "object") throw new Error(`Loop step "${require_execution_fence.getSingleStepEntryId(entry.step)}" cannot be stored: closure predicates do not round-trip. Use the declarative form ({ predicate: {...} }).`);
|
|
96
96
|
return {
|
|
97
97
|
type: "loop",
|
|
98
98
|
...entryOptionFields(entry),
|
|
@@ -284,7 +284,7 @@ async function rehydrateWorkflow(def, mastra, opts) {
|
|
|
284
284
|
stateSchema,
|
|
285
285
|
requestContextSchema
|
|
286
286
|
};
|
|
287
|
-
const factory = opts?.engineType === "evented" ?
|
|
287
|
+
const factory = opts?.engineType === "evented" ? require_execution_fence.createEventedWorkflow : require_execution_fence.createWorkflow;
|
|
288
288
|
let wf;
|
|
289
289
|
if (def.schedule === void 0) wf = factory(baseParams);
|
|
290
290
|
else try {
|
|
@@ -374,7 +374,7 @@ function applyGraphEntry(wf, entry, mastra, schemaOpts) {
|
|
|
374
374
|
}
|
|
375
375
|
case "workflow": {
|
|
376
376
|
const nested = assertWorkflowExists(mastra, entry.workflowId);
|
|
377
|
-
wf.then(entry.id && entry.id !== nested.id ?
|
|
377
|
+
wf.then(entry.id && entry.id !== nested.id ? require_execution_fence.cloneWorkflow(nested, { id: entry.id }) : nested);
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
380
|
case "conditional": {
|
|
@@ -382,14 +382,14 @@ function applyGraphEntry(wf, entry, mastra, schemaOpts) {
|
|
|
382
382
|
if (!predicates || predicates.length !== entry.steps.length || predicates.some((p) => !p)) throw new Error(`Cannot rehydrate conditional step: missing or mismatched predicates. Only declarative predicate branches round-trip.`);
|
|
383
383
|
const steps = entry.steps.map((s) => rehydrateSingleEntry(s, mastra, schemaOpts));
|
|
384
384
|
const serializedConditions = entry.serializedConditions ?? steps.map((s, i) => ({
|
|
385
|
-
id: `${
|
|
385
|
+
id: `${require_execution_fence.getSingleStepEntryId(s)}-condition`,
|
|
386
386
|
fn: require_predicate_index.derivePredicateLabel(predicates[i])
|
|
387
387
|
}));
|
|
388
388
|
const live = {
|
|
389
389
|
type: "conditional",
|
|
390
390
|
...entryOptionFields(entry),
|
|
391
391
|
steps,
|
|
392
|
-
conditions: predicates.map((p) =>
|
|
392
|
+
conditions: predicates.map((p) => require_execution_fence.predicateToCondition(p)),
|
|
393
393
|
serializedConditions,
|
|
394
394
|
predicates
|
|
395
395
|
};
|
|
@@ -404,14 +404,14 @@ function applyGraphEntry(wf, entry, mastra, schemaOpts) {
|
|
|
404
404
|
if (!predicate || loopType !== "dowhile" && loopType !== "dountil") throw new Error(`Cannot rehydrate loop step: missing declarative predicate or loopType. Only declarative predicate loops round-trip.`);
|
|
405
405
|
const step = rehydrateSingleEntry(entry.step, mastra, schemaOpts);
|
|
406
406
|
const serializedCondition = entry.serializedCondition ?? {
|
|
407
|
-
id: `${
|
|
407
|
+
id: `${require_execution_fence.getSingleStepEntryId(step)}-condition`,
|
|
408
408
|
fn: require_predicate_index.derivePredicateLabel(predicate)
|
|
409
409
|
};
|
|
410
410
|
const live = {
|
|
411
411
|
type: "loop",
|
|
412
412
|
...entryOptionFields(entry),
|
|
413
413
|
step,
|
|
414
|
-
condition:
|
|
414
|
+
condition: require_execution_fence.predicateToCondition(predicate),
|
|
415
415
|
loopType,
|
|
416
416
|
serializedCondition,
|
|
417
417
|
predicate
|
|
@@ -500,12 +500,12 @@ function rehydrateSingleEntry(entry, mastra, schemaOpts) {
|
|
|
500
500
|
const agent = tryGetAgentById(mastra, id);
|
|
501
501
|
if (agent) return {
|
|
502
502
|
type: "step",
|
|
503
|
-
step:
|
|
503
|
+
step: require_execution_fence.createStepFromAgent(agent)
|
|
504
504
|
};
|
|
505
505
|
const tool = tryGetToolById(mastra, id);
|
|
506
506
|
if (tool) return {
|
|
507
507
|
type: "step",
|
|
508
|
-
step:
|
|
508
|
+
step: require_execution_fence.createStepFromTool(tool)
|
|
509
509
|
};
|
|
510
510
|
throw new Error(`Dynamic workflow references step "${id}" which is not registered as an agent or tool on this Mastra instance.`);
|
|
511
511
|
}
|
|
@@ -513,7 +513,7 @@ function rehydrateSingleEntry(entry, mastra, schemaOpts) {
|
|
|
513
513
|
const nested = assertWorkflowExists(mastra, entry.workflowId);
|
|
514
514
|
return {
|
|
515
515
|
type: "step",
|
|
516
|
-
step: entry.id && entry.id !== nested.id ?
|
|
516
|
+
step: entry.id && entry.id !== nested.id ? require_execution_fence.cloneWorkflow(nested, { id: entry.id }) : nested
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
519
|
case "mapping": throw new Error(`mapping entries cannot appear inside .parallel(), .branch(), or .foreach(); they must be top-level.`);
|
|
@@ -536,11 +536,11 @@ function rehydrateMapConfig(cfg, mastra) {
|
|
|
536
536
|
else if ("initData" in source && typeof source.initData === "string") {
|
|
537
537
|
const wf = mastra.getWorkflow?.(source.initData);
|
|
538
538
|
if (!wf) throw new Error(`Mapping references unknown workflow init-data "${source.initData}".`);
|
|
539
|
-
out[key] =
|
|
539
|
+
out[key] = require_execution_fence.mapVariable({
|
|
540
540
|
initData: wf,
|
|
541
541
|
path: source.path
|
|
542
542
|
});
|
|
543
|
-
} else if ("step" in source) out[key] =
|
|
543
|
+
} else if ("step" in source) out[key] = require_execution_fence.mapVariable({
|
|
544
544
|
step: source.step,
|
|
545
545
|
path: source.path
|
|
546
546
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ds as createEventedWorkflow, Es as cloneWorkflow, Ic as mapVariable, Lc as predicateToCondition, Os as createWorkflow, al as createStepFromTool, rl as createStepFromAgent, yl as getSingleStepEntryId } from "./execution-fence-B8yV_n51.js";
|
|
2
2
|
import { derivePredicateLabel } from "./predicate/index.js";
|
|
3
|
-
import { a as jsonSchemaToZod, l as parseMapConfig } from "./validate-
|
|
3
|
+
import { a as jsonSchemaToZod, l as parseMapConfig } from "./validate-KIBMWuyc.js";
|
|
4
4
|
import { standardSchemaToJSONSchema, toStandardSchema } from "./schema/index.js";
|
|
5
5
|
// src/workflows/dynamic/serialize.ts
|
|
6
6
|
/**
|
package/dist/relevance/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const require_stream = require("../stream-
|
|
2
|
+
const require_execution_fence = require("../execution-fence-fqV6FGdV.cjs");
|
|
3
|
+
const require_stream = require("../stream-CZy8XA_q.cjs");
|
|
4
4
|
// src/relevance/relevance-score-provider.ts
|
|
5
5
|
function createSimilarityPrompt(query, text) {
|
|
6
6
|
return `Rate the semantic similarity between the following the query and the text on a scale from 0 to 1 (decimals allowed), where 1 means exactly the same meaning and 0 means completely different:
|
|
@@ -15,7 +15,7 @@ Relevance score (0-1):`;
|
|
|
15
15
|
var MastraAgentRelevanceScorer = class {
|
|
16
16
|
agent;
|
|
17
17
|
constructor(name, model) {
|
|
18
|
-
this.agent = new
|
|
18
|
+
this.agent = new require_execution_fence.Agent({
|
|
19
19
|
id: `relevance-scorer-${name}`,
|
|
20
20
|
name: `Relevance Scorer ${name}`,
|
|
21
21
|
instructions: `You are a specialized agent for evaluating the relevance of text to queries.
|
package/dist/relevance/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { un as isSupportedLanguageModel } from "../stream-
|
|
1
|
+
import { T as Agent } from "../execution-fence-B8yV_n51.js";
|
|
2
|
+
import { un as isSupportedLanguageModel } from "../stream-BFhCDJvz.js";
|
|
3
3
|
// src/relevance/relevance-score-provider.ts
|
|
4
4
|
function createSimilarityPrompt(query, text) {
|
|
5
5
|
return `Rate the semantic similarity between the following the query and the text on a scale from 0 to 1 (decimals allowed), where 1 means exactly the same meaning and 0 means completely different:
|
package/dist/signals/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_signals = require("../signals-CWxAMEmE.cjs");
|
|
3
|
-
const require_state_processor = require("../state-processor-
|
|
4
|
-
const require_signal_provider = require("../signal-provider-
|
|
5
|
-
const require_signals$1 = require("../signals-
|
|
3
|
+
const require_state_processor = require("../state-processor-DaSmhVUX.cjs");
|
|
4
|
+
const require_signal_provider = require("../signal-provider-D9gbevHN.cjs");
|
|
5
|
+
const require_signals$1 = require("../signals-BwDXGqxc.cjs");
|
|
6
6
|
exports.GoalSignalProvider = require_signal_provider.GoalSignalProvider;
|
|
7
7
|
exports.SignalProvider = require_signal_provider.SignalProvider;
|
|
8
8
|
exports.TaskSignalProvider = require_signals$1.TaskSignalProvider;
|
package/dist/signals/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as isCreatedAgentSignal, l as mastraDBMessageToSignal, n as createSignal } from "../signals-CqR_iWkg.js";
|
|
2
|
-
import { o as assignTaskIds } from "../state-processor-
|
|
3
|
-
import { i as isSignalProvider, n as WebhookSignalProvider, r as SignalProvider, t as GoalSignalProvider } from "../signal-provider-
|
|
4
|
-
import { n as TaskSignalProvider, t as TimeSignalProvider } from "../signals-
|
|
2
|
+
import { o as assignTaskIds } from "../state-processor-B_KsS82m.js";
|
|
3
|
+
import { i as isSignalProvider, n as WebhookSignalProvider, r as SignalProvider, t as GoalSignalProvider } from "../signal-provider-B_mfW-J4.js";
|
|
4
|
+
import { n as TaskSignalProvider, t as TimeSignalProvider } from "../signals-TznxWfM3.js";
|
|
5
5
|
export { GoalSignalProvider, SignalProvider, TaskSignalProvider, TimeSignalProvider, WebhookSignalProvider, assignTaskIds, createSignal, isCreatedAgentSignal, isSignalProvider, mastraDBMessageToSignal };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_signal_provider = require("./signal-provider-
|
|
2
|
-
const require_state_processor = require("./state-processor-
|
|
1
|
+
const require_signal_provider = require("./signal-provider-D9gbevHN.cjs");
|
|
2
|
+
const require_state_processor = require("./state-processor-DaSmhVUX.cjs");
|
|
3
3
|
const require_signals = require("./signals-CWxAMEmE.cjs");
|
|
4
4
|
// src/signals/task-signal-provider.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as SignalProvider } from "./signal-provider-
|
|
2
|
-
import { f as taskCheckTool, h as taskWriteTool, m as taskUpdateTool, n as TaskStateProcessor, p as taskCompleteTool } from "./state-processor-
|
|
1
|
+
import { r as SignalProvider } from "./signal-provider-B_mfW-J4.js";
|
|
2
|
+
import { f as taskCheckTool, h as taskWriteTool, m as taskUpdateTool, n as TaskStateProcessor, p as taskCompleteTool } from "./state-processor-B_KsS82m.js";
|
|
3
3
|
import { c as isUserAuthoredMessage } from "./signals-CqR_iWkg.js";
|
|
4
4
|
// src/signals/task-signal-provider.ts
|
|
5
5
|
/**
|
package/dist/skills/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_agent_skills_resolver = require("../agent-skills-resolver-
|
|
2
|
+
const require_agent_skills_resolver = require("../agent-skills-resolver-2d8k7ioj.cjs");
|
|
3
3
|
const require_workspace_skills = require("../workspace-skills-BcquhPDn.cjs");
|
|
4
4
|
exports.InlineSkillSource = require_agent_skills_resolver.InlineSkillSource;
|
|
5
5
|
exports.SKILL_LIMITS = require_workspace_skills.SKILL_LIMITS;
|
package/dist/skills/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as isInlineSkill, i as createSkill, n as resolveAgentSkills, r as InlineSkillSource, t as mergeWorkspaceSkills } from "../agent-skills-resolver-
|
|
1
|
+
import { a as isInlineSkill, i as createSkill, n as resolveAgentSkills, r as InlineSkillSource, t as mergeWorkspaceSkills } from "../agent-skills-resolver-D2HktP6Y.js";
|
|
2
2
|
import { i as SKILL_LIMITS, o as validateSkillContent, s as validateSkillMetadata } from "../workspace-skills-38OY32_b.js";
|
|
3
3
|
export { InlineSkillSource, SKILL_LIMITS, createSkill, isInlineSkill, mergeWorkspaceSkills, resolveAgentSkills, validateSkillContent, validateSkillMetadata };
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
* Directory layout emulation:
|
|
8
8
|
* Each inline skill appears as a directory at `inline/<name>/` with:
|
|
9
9
|
* - SKILL.md (generated from the skill's metadata + instructions)
|
|
10
|
-
* - references/<
|
|
10
|
+
* - references/<path> (from the skill's `references` map)
|
|
11
|
+
* - scripts/<path> (from the skill's `scripts` map)
|
|
12
|
+
* - assets/<path> (from the skill's `assets` map)
|
|
13
|
+
*
|
|
14
|
+
* Keys containing `/` become nested directories.
|
|
11
15
|
*/
|
|
12
16
|
import type { SkillSource, SkillSourceEntry, SkillSourceStat } from '../workspace/skills/skill-source.js';
|
|
13
17
|
import type { InlineSkill } from './types.js';
|
package/dist/skills/types.d.ts
CHANGED
|
@@ -38,6 +38,17 @@ export interface InlineSkillInput {
|
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
40
|
references?: Record<string, string>;
|
|
41
|
+
/**
|
|
42
|
+
* Optional bundled script files, keyed by path relative to `scripts/`.
|
|
43
|
+
* Served in-memory via skill_read as `scripts/<path>`.
|
|
44
|
+
*/
|
|
45
|
+
scripts?: Record<string, string>;
|
|
46
|
+
/**
|
|
47
|
+
* Optional bundled asset files, keyed by path relative to `assets/`.
|
|
48
|
+
* Values can be text or binary content; supported images and PDFs are
|
|
49
|
+
* returned to the model as media by skill_read.
|
|
50
|
+
*/
|
|
51
|
+
assets?: Record<string, string | Uint8Array>;
|
|
41
52
|
}
|
|
42
53
|
/**
|
|
43
54
|
* A fully resolved inline skill — the output of `createSkill()`.
|
|
@@ -46,8 +57,12 @@ export interface InlineSkillInput {
|
|
|
46
57
|
export interface InlineSkill extends Skill {
|
|
47
58
|
/** Marker to distinguish inline skills from filesystem-discovered skills */
|
|
48
59
|
readonly __inline: true;
|
|
49
|
-
/** Bundled reference file contents (keyed by relative
|
|
60
|
+
/** Bundled reference file contents (keyed by path relative to `references/`) */
|
|
50
61
|
readonly __referenceContents: Record<string, string>;
|
|
62
|
+
/** Bundled script file contents (keyed by path relative to `scripts/`); absent on skills from earlier versions */
|
|
63
|
+
readonly __scriptContents?: Record<string, string>;
|
|
64
|
+
/** Bundled asset file contents (keyed by path relative to `assets/`); absent on skills from earlier versions */
|
|
65
|
+
readonly __assetContents?: Record<string, string | Uint8Array>;
|
|
51
66
|
}
|
|
52
67
|
/**
|
|
53
68
|
* A single skill input: either a path string (resolved from disk) or an inline skill.
|
|
@@ -248,7 +248,7 @@ var InMemoryAgentsStorage = class extends AgentsStorage {
|
|
|
248
248
|
var InMemoryDB = class {
|
|
249
249
|
threads = /* @__PURE__ */ new Map();
|
|
250
250
|
/**
|
|
251
|
-
* Message rows. A row under `pendingQueueThreadId(T)` or `
|
|
251
|
+
* Message rows. A row under `pendingQueueThreadId(T)`, `takenQueueThreadId(T)` or `queuedQueueThreadId(T)` is an agent
|
|
252
252
|
* signal queued for thread T, not part of any thread.
|
|
253
253
|
*/
|
|
254
254
|
messages = /* @__PURE__ */ new Map();
|
|
@@ -248,7 +248,7 @@ var InMemoryAgentsStorage = class extends AgentsStorage {
|
|
|
248
248
|
var InMemoryDB = class {
|
|
249
249
|
threads = /* @__PURE__ */ new Map();
|
|
250
250
|
/**
|
|
251
|
-
* Message rows. A row under `pendingQueueThreadId(T)` or `
|
|
251
|
+
* Message rows. A row under `pendingQueueThreadId(T)`, `takenQueueThreadId(T)` or `queuedQueueThreadId(T)` is an agent
|
|
252
252
|
* signal queued for thread T, not part of any thread.
|
|
253
253
|
*/
|
|
254
254
|
messages = /* @__PURE__ */ new Map();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_constants = require("../constants-
|
|
2
|
+
const require_constants = require("../constants-B2FVV_2e.cjs");
|
|
3
3
|
exports.AGENTS_SCHEMA = require_constants.AGENTS_SCHEMA;
|
|
4
4
|
exports.AGENT_VERSIONS_SCHEMA = require_constants.AGENT_VERSIONS_SCHEMA;
|
|
5
5
|
exports.DATASETS_SCHEMA = require_constants.DATASETS_SCHEMA;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as AGENTS_SCHEMA, n as AGENT_VERSIONS_SCHEMA, r as DATASETS_SCHEMA, i as DATASET_ITEMS_SCHEMA, a as DATASET_VERSIONS_SCHEMA, o as EXPERIMENTS_SCHEMA, s as EXPERIMENT_RESULTS_SCHEMA, c as FAVORITES_SCHEMA, l as HARNESS_SESSIONS_SCHEMA, u as KNOWLEDGE_ACCESS_STATE_SCHEMA, d as KNOWLEDGE_ACTIVITY_SCHEMA, f as KNOWLEDGE_CURSORS_SCHEMA, p as KNOWLEDGE_IMPORT_RUNS_SCHEMA, m as KNOWLEDGE_IMPORT_STATE_SCHEMA, h as KNOWLEDGE_MENTIONS_SCHEMA, g as KNOWLEDGE_NODES_SCHEMA, _ as KNOWLEDGE_NODE_ADDRESSES_SCHEMA, v as KNOWLEDGE_NODE_SCOPES_SCHEMA, y as KNOWLEDGE_PROPOSALS_SCHEMA, b as KNOWLEDGE_RECORDS_SCHEMA, x as KNOWLEDGE_RECORD_SCOPES_SCHEMA, S as KNOWLEDGE_SCOPE_ADDRESSES_SCHEMA, C as KNOWLEDGE_SCOPE_GRANTS_SCHEMA, w as KNOWLEDGE_SEMANTIC_OUTBOX_SCHEMA, T as KNOWLEDGE_TABLE_NAMES, E as KNOWLEDGE_V2_ACTIVITY_SCHEMA, D as KNOWLEDGE_V2_MENTIONS_SCHEMA, O as KNOWLEDGE_V2_NODES_SCHEMA, k as KNOWLEDGE_V2_RECORDS_SCHEMA, A as MCP_CLIENTS_SCHEMA, j as MCP_CLIENT_VERSIONS_SCHEMA, M as MCP_SERVERS_SCHEMA, N as MCP_SERVER_VERSIONS_SCHEMA, P as MEMORY_RUN_FENCES_SCHEMA, F as NOTIFICATIONS_SCHEMA, I as OBSERVATIONAL_MEMORY_SCHEMA, L as OBSERVATIONAL_MEMORY_TABLE_SCHEMA, R as OLD_SPAN_SCHEMA, z as PROMPT_BLOCKS_SCHEMA, B as PROMPT_BLOCK_VERSIONS_SCHEMA, V as RUN_FENCING_TABLE_SCHEMAS, H as SCORERS_SCHEMA, U as SCORER_DEFINITIONS_SCHEMA, W as SCORER_DEFINITION_VERSIONS_SCHEMA, G as SKILLS_SCHEMA, K as SKILL_BLOBS_SCHEMA, q as SKILL_VERSIONS_SCHEMA, J as SPAN_SCHEMA, Y as TABLE_AGENTS, X as TABLE_AGENT_VERSIONS, Z as TABLE_BACKGROUND_TASKS, Q as TABLE_CHANNEL_CONFIG, $ as TABLE_CHANNEL_INSTALLATIONS, et as TABLE_CONFIGS, tt as TABLE_DATASETS, nt as TABLE_DATASET_ITEMS, rt as TABLE_DATASET_VERSIONS, it as TABLE_EXPERIMENTS, at as TABLE_EXPERIMENT_RESULTS, ot as TABLE_FAVORITES, st as TABLE_HARNESS_SESSIONS, ct as TABLE_KNOWLEDGE_ACCESS_STATE, lt as TABLE_KNOWLEDGE_ACTIVITY, ut as TABLE_KNOWLEDGE_CURSORS, dt as TABLE_KNOWLEDGE_IMPORT_RUNS, ft as TABLE_KNOWLEDGE_IMPORT_STATE, pt as TABLE_KNOWLEDGE_MENTIONS, mt as TABLE_KNOWLEDGE_NODES, ht as TABLE_KNOWLEDGE_NODE_ADDRESSES, gt as TABLE_KNOWLEDGE_NODE_SCOPES, _t as TABLE_KNOWLEDGE_PROPOSALS, vt as TABLE_KNOWLEDGE_RECORDS, yt as TABLE_KNOWLEDGE_RECORD_SCOPES, bt as TABLE_KNOWLEDGE_SCOPE_ADDRESSES, xt as TABLE_KNOWLEDGE_SCOPE_GRANTS, St as TABLE_KNOWLEDGE_SEMANTIC_OUTBOX, Ct as TABLE_MCP_CLIENTS, wt as TABLE_MCP_CLIENT_VERSIONS, Tt as TABLE_MCP_SERVERS, Et as TABLE_MCP_SERVER_VERSIONS, Dt as TABLE_MEMORY_RUN_FENCES, Ot as TABLE_MESSAGES, kt as TABLE_NOTIFICATIONS, At as TABLE_OBSERVATIONAL_MEMORY, jt as TABLE_PROMPT_BLOCKS, Mt as TABLE_PROMPT_BLOCK_VERSIONS, Nt as TABLE_RESOURCES, Pt as TABLE_SCHEDULES, Ft as TABLE_SCHEDULE_TRIGGERS, It as TABLE_SCHEMAS, Lt as TABLE_SCORERS, Rt as TABLE_SCORER_DEFINITIONS, zt as TABLE_SCORER_DEFINITION_VERSIONS, Bt as TABLE_SKILLS, Vt as TABLE_SKILL_BLOBS, Ht as TABLE_SKILL_VERSIONS, Ut as TABLE_SPANS, Wt as TABLE_THREADS, Gt as TABLE_THREAD_STATE, Kt as TABLE_TOOL_PROVIDER_CONNECTIONS, qt as TABLE_TRACES, Jt as TABLE_WORKFLOW_DEFINITIONS, Yt as TABLE_WORKFLOW_RUNS, Xt as TABLE_WORKFLOW_RUN_ENTRIES, Zt as TABLE_WORKFLOW_RUN_OWNERS, Qt as TABLE_WORKFLOW_SNAPSHOT, $t as TABLE_WORKSPACES, en as TABLE_WORKSPACE_VERSIONS, tn as THREAD_STATE_SCHEMA, nn as TOOL_PROVIDER_CONNECTIONS_SCHEMA, rn as WORKFLOW_DEFINITIONS_SCHEMA, in as WORKFLOW_RUNS_SCHEMA, an as WORKFLOW_RUN_ENTRIES_SCHEMA, on as WORKFLOW_RUN_JOURNAL_TABLE_CONFIGS, sn as WORKFLOW_RUN_OWNERS_SCHEMA, cn as WORKSPACES_SCHEMA, ln as WORKSPACE_VERSIONS_SCHEMA } from "../constants-
|
|
1
|
+
export { t as AGENTS_SCHEMA, n as AGENT_VERSIONS_SCHEMA, r as DATASETS_SCHEMA, i as DATASET_ITEMS_SCHEMA, a as DATASET_VERSIONS_SCHEMA, o as EXPERIMENTS_SCHEMA, s as EXPERIMENT_RESULTS_SCHEMA, c as FAVORITES_SCHEMA, l as HARNESS_SESSIONS_SCHEMA, u as KNOWLEDGE_ACCESS_STATE_SCHEMA, d as KNOWLEDGE_ACTIVITY_SCHEMA, f as KNOWLEDGE_CURSORS_SCHEMA, p as KNOWLEDGE_IMPORT_RUNS_SCHEMA, m as KNOWLEDGE_IMPORT_STATE_SCHEMA, h as KNOWLEDGE_MENTIONS_SCHEMA, g as KNOWLEDGE_NODES_SCHEMA, _ as KNOWLEDGE_NODE_ADDRESSES_SCHEMA, v as KNOWLEDGE_NODE_SCOPES_SCHEMA, y as KNOWLEDGE_PROPOSALS_SCHEMA, b as KNOWLEDGE_RECORDS_SCHEMA, x as KNOWLEDGE_RECORD_SCOPES_SCHEMA, S as KNOWLEDGE_SCOPE_ADDRESSES_SCHEMA, C as KNOWLEDGE_SCOPE_GRANTS_SCHEMA, w as KNOWLEDGE_SEMANTIC_OUTBOX_SCHEMA, T as KNOWLEDGE_TABLE_NAMES, E as KNOWLEDGE_V2_ACTIVITY_SCHEMA, D as KNOWLEDGE_V2_MENTIONS_SCHEMA, O as KNOWLEDGE_V2_NODES_SCHEMA, k as KNOWLEDGE_V2_RECORDS_SCHEMA, A as MCP_CLIENTS_SCHEMA, j as MCP_CLIENT_VERSIONS_SCHEMA, M as MCP_SERVERS_SCHEMA, N as MCP_SERVER_VERSIONS_SCHEMA, P as MEMORY_RUN_FENCES_SCHEMA, F as NOTIFICATIONS_SCHEMA, I as OBSERVATIONAL_MEMORY_SCHEMA, L as OBSERVATIONAL_MEMORY_TABLE_SCHEMA, R as OLD_SPAN_SCHEMA, z as PROMPT_BLOCKS_SCHEMA, B as PROMPT_BLOCK_VERSIONS_SCHEMA, V as RUN_FENCING_TABLE_SCHEMAS, H as SCORERS_SCHEMA, U as SCORER_DEFINITIONS_SCHEMA, W as SCORER_DEFINITION_VERSIONS_SCHEMA, G as SKILLS_SCHEMA, K as SKILL_BLOBS_SCHEMA, q as SKILL_VERSIONS_SCHEMA, J as SPAN_SCHEMA, Y as TABLE_AGENTS, X as TABLE_AGENT_VERSIONS, Z as TABLE_BACKGROUND_TASKS, Q as TABLE_CHANNEL_CONFIG, $ as TABLE_CHANNEL_INSTALLATIONS, et as TABLE_CONFIGS, tt as TABLE_DATASETS, nt as TABLE_DATASET_ITEMS, rt as TABLE_DATASET_VERSIONS, it as TABLE_EXPERIMENTS, at as TABLE_EXPERIMENT_RESULTS, ot as TABLE_FAVORITES, st as TABLE_HARNESS_SESSIONS, ct as TABLE_KNOWLEDGE_ACCESS_STATE, lt as TABLE_KNOWLEDGE_ACTIVITY, ut as TABLE_KNOWLEDGE_CURSORS, dt as TABLE_KNOWLEDGE_IMPORT_RUNS, ft as TABLE_KNOWLEDGE_IMPORT_STATE, pt as TABLE_KNOWLEDGE_MENTIONS, mt as TABLE_KNOWLEDGE_NODES, ht as TABLE_KNOWLEDGE_NODE_ADDRESSES, gt as TABLE_KNOWLEDGE_NODE_SCOPES, _t as TABLE_KNOWLEDGE_PROPOSALS, vt as TABLE_KNOWLEDGE_RECORDS, yt as TABLE_KNOWLEDGE_RECORD_SCOPES, bt as TABLE_KNOWLEDGE_SCOPE_ADDRESSES, xt as TABLE_KNOWLEDGE_SCOPE_GRANTS, St as TABLE_KNOWLEDGE_SEMANTIC_OUTBOX, Ct as TABLE_MCP_CLIENTS, wt as TABLE_MCP_CLIENT_VERSIONS, Tt as TABLE_MCP_SERVERS, Et as TABLE_MCP_SERVER_VERSIONS, Dt as TABLE_MEMORY_RUN_FENCES, Ot as TABLE_MESSAGES, kt as TABLE_NOTIFICATIONS, At as TABLE_OBSERVATIONAL_MEMORY, jt as TABLE_PROMPT_BLOCKS, Mt as TABLE_PROMPT_BLOCK_VERSIONS, Nt as TABLE_RESOURCES, Pt as TABLE_SCHEDULES, Ft as TABLE_SCHEDULE_TRIGGERS, It as TABLE_SCHEMAS, Lt as TABLE_SCORERS, Rt as TABLE_SCORER_DEFINITIONS, zt as TABLE_SCORER_DEFINITION_VERSIONS, Bt as TABLE_SKILLS, Vt as TABLE_SKILL_BLOBS, Ht as TABLE_SKILL_VERSIONS, Ut as TABLE_SPANS, Wt as TABLE_THREADS, Gt as TABLE_THREAD_STATE, Kt as TABLE_TOOL_PROVIDER_CONNECTIONS, qt as TABLE_TRACES, Jt as TABLE_WORKFLOW_DEFINITIONS, Yt as TABLE_WORKFLOW_RUNS, Xt as TABLE_WORKFLOW_RUN_ENTRIES, Zt as TABLE_WORKFLOW_RUN_OWNERS, Qt as TABLE_WORKFLOW_SNAPSHOT, $t as TABLE_WORKSPACES, en as TABLE_WORKSPACE_VERSIONS, tn as THREAD_STATE_SCHEMA, nn as TOOL_PROVIDER_CONNECTIONS_SCHEMA, rn as WORKFLOW_DEFINITIONS_SCHEMA, in as WORKFLOW_RUNS_SCHEMA, an as WORKFLOW_RUN_ENTRIES_SCHEMA, on as WORKFLOW_RUN_JOURNAL_TABLE_CONFIGS, sn as WORKFLOW_RUN_OWNERS_SCHEMA, cn as WORKSPACES_SCHEMA, ln as WORKSPACE_VERSIONS_SCHEMA } from "../constants-Dro9fuhk.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_source = require("../../../source-
|
|
2
|
+
const require_source = require("../../../source-C_nWbqI0.cjs");
|
|
3
3
|
exports.AgentsStorage = require_source.AgentsStorage;
|
|
4
4
|
exports.FilesystemAgentsStorage = require_source.FilesystemAgentsStorage;
|
|
5
5
|
exports.InMemoryAgentsStorage = require_source.InMemoryAgentsStorage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as AgentsStorage, n as FilesystemAgentsStorage, i as InMemoryAgentsStorage, t as SourceAgentsSourceControl } from "../../../source-
|
|
1
|
+
export { a as AgentsStorage, n as FilesystemAgentsStorage, i as InMemoryAgentsStorage, t as SourceAgentsSourceControl } from "../../../source-B3He4_mz.js";
|
|
@@ -26,7 +26,7 @@ import type { WorkspaceVersion } from './workspaces/index.js';
|
|
|
26
26
|
export declare class InMemoryDB {
|
|
27
27
|
readonly threads: Map<string, StorageThreadType>;
|
|
28
28
|
/**
|
|
29
|
-
* Message rows. A row under `pendingQueueThreadId(T)` or `
|
|
29
|
+
* Message rows. A row under `pendingQueueThreadId(T)`, `takenQueueThreadId(T)` or `queuedQueueThreadId(T)` is an agent
|
|
30
30
|
* signal queued for thread T, not part of any thread.
|
|
31
31
|
*/
|
|
32
32
|
readonly messages: Map<string, StorageMessageType>;
|
|
@@ -829,7 +829,14 @@ export interface KnowledgePageStore {
|
|
|
829
829
|
* and the limit. The query is split on whitespace into lowercased, deduplicated words (an empty
|
|
830
830
|
* query returns nothing); each word matches as a case-insensitive substring. A page hits when at
|
|
831
831
|
* least one word appears in its name, description or body; a note hits when at least one word
|
|
832
|
-
* appears in its text. Scope pages are never returned. Pages are ranked
|
|
832
|
+
* appears in its text. Scope pages are never returned. Pages and notes are ranked together in one
|
|
833
|
+
* list: pages whose canonical name contains the whole query (trimmed, lowercased, whitespace runs
|
|
834
|
+
* collapsed to one space) first, then every other hit by score, where each matched word adds its
|
|
835
|
+
* rarity weight (its BM25 inverse document frequency over the readable pages and visible notes in
|
|
836
|
+
* the searched scopes, times 1000, rounded, at least 1; a rare word outweighs common ones); then most
|
|
837
|
+
* words matched; then points (each matched word earns 3 if it is in the name, else 2 if in the
|
|
838
|
+
* description, else 1 if in the body or a note's text); then newest `updatedAt`; then pages before
|
|
839
|
+
* notes; then id ascending. Truncated to `limit`. No quoting or operators.
|
|
833
840
|
*/
|
|
834
841
|
searchPages(input: SearchKnowledgePagesInput): Promise<KnowledgePageSearchHit[]>;
|
|
835
842
|
/**
|
|
@@ -34,8 +34,8 @@ export declare abstract class MemoryStorage extends StorageDomain {
|
|
|
34
34
|
* Whether this adapter keeps pending agent signals in the messages table and
|
|
35
35
|
* implements `setSignalRun`, `getSignalRun`, `enqueuePendingSignal`,
|
|
36
36
|
* `claimPendingSignals`, `closeSignalRun`, `cancelPendingSignals` and
|
|
37
|
-
* `listPendingSignals
|
|
38
|
-
* conformance suite.
|
|
37
|
+
* `listPendingSignals`, including `queued: true` on `enqueuePendingSignal`.
|
|
38
|
+
* Adapters that set it must pass the pending-signals conformance suite.
|
|
39
39
|
* @experimental
|
|
40
40
|
*/
|
|
41
41
|
readonly supportsPendingSignals?: boolean;
|
|
@@ -185,7 +185,10 @@ export declare abstract class MemoryStorage extends StorageDomain {
|
|
|
185
185
|
}): Promise<void>;
|
|
186
186
|
/**
|
|
187
187
|
* Record `runId` as the thread's signal run, replacing any previous one.
|
|
188
|
-
*
|
|
188
|
+
* When the recorded run is not `runId`, none included, the thread's queued
|
|
189
|
+
* rows move to pending, since the run they waited for is gone. Recording
|
|
190
|
+
* the same run again leaves them queued. Changes no message.
|
|
191
|
+
* Records nothing when the thread does not exist.
|
|
189
192
|
* @experimental
|
|
190
193
|
*/
|
|
191
194
|
setSignalRun(_args: {
|
|
@@ -208,18 +211,24 @@ export declare abstract class MemoryStorage extends StorageDomain {
|
|
|
208
211
|
* differs from the message's;
|
|
209
212
|
* - `run-closed` when the thread's signal run is not `toRunId`.
|
|
210
213
|
*
|
|
211
|
-
* Without `toRunId` the thread
|
|
214
|
+
* Without `toRunId` the thread need not exist, and is read only for `queued`. The row
|
|
212
215
|
* belongs to whichever run becomes the signal run of a thread with that id.
|
|
213
216
|
*
|
|
214
217
|
* Then, when a row with the message's id exists under any thread id,
|
|
215
218
|
* nothing is written. Otherwise the row is inserted as pending with the
|
|
216
219
|
* message's `createdAt` and without its `resourceId`. Both cases answer
|
|
217
220
|
* `accepted`.
|
|
221
|
+
*
|
|
222
|
+
* With `queued`, the row is inserted as queued when the thread has a
|
|
223
|
+
* signal run, and as pending otherwise. A queued row is not claimed; it
|
|
224
|
+
* moves to pending when that run closes or another run replaces it, so it
|
|
225
|
+
* waits for the run in flight to end.
|
|
218
226
|
* @experimental
|
|
219
227
|
*/
|
|
220
228
|
enqueuePendingSignal(_args: {
|
|
221
229
|
message: MastraDBMessage;
|
|
222
230
|
toRunId?: string;
|
|
231
|
+
queued?: boolean;
|
|
223
232
|
}): Promise<PendingSignalEnqueueResult>;
|
|
224
233
|
/**
|
|
225
234
|
* When the thread's signal run is `runId`: move the thread's pending rows
|
|
@@ -238,8 +247,8 @@ export declare abstract class MemoryStorage extends StorageDomain {
|
|
|
238
247
|
}): Promise<MastraDBMessage[]>;
|
|
239
248
|
/**
|
|
240
249
|
* Delete the thread's taken rows whose id is in `consumedIds`. Then, if the
|
|
241
|
-
* thread's signal run is still `runId`, move its other taken rows
|
|
242
|
-
* pending and clear the signal run. A close that comes after another run
|
|
250
|
+
* thread's signal run is still `runId`, move its other taken rows and its
|
|
251
|
+
* queued rows to pending and clear the signal run. A close that comes after another run
|
|
243
252
|
* became the signal run deletes only what it consumed and leaves the other
|
|
244
253
|
* taken rows to that run. Pending rows and messages are untouched. The
|
|
245
254
|
* delete goes by id, so repeating a close changes nothing while no consumed
|
|
@@ -252,8 +261,8 @@ export declare abstract class MemoryStorage extends StorageDomain {
|
|
|
252
261
|
consumedIds: string[];
|
|
253
262
|
}): Promise<void>;
|
|
254
263
|
/**
|
|
255
|
-
* Delete the thread's pending rows named in `ids`. Taken rows,
|
|
256
|
-
* unknown ids are skipped. Returns the ids deleted, in the order given.
|
|
264
|
+
* Delete the thread's pending and queued rows named in `ids`. Taken rows,
|
|
265
|
+
* messages and unknown ids are skipped. Returns the ids deleted, in the order given.
|
|
257
266
|
*
|
|
258
267
|
* With `forRunId`, the caller acts for that run: when the thread's signal
|
|
259
268
|
* run is another run, nothing is deleted and nothing is returned. When it
|
|
@@ -267,7 +276,8 @@ export declare abstract class MemoryStorage extends StorageDomain {
|
|
|
267
276
|
forRunId?: string;
|
|
268
277
|
}): Promise<string[]>;
|
|
269
278
|
/**
|
|
270
|
-
* The thread's pending rows. Without a thread row, they carry no
|
|
279
|
+
* The thread's pending and queued rows. Without a thread row, they carry no
|
|
280
|
+
* `resourceId`.
|
|
271
281
|
* @experimental
|
|
272
282
|
*/
|
|
273
283
|
listPendingSignals(_args: {
|
|
@@ -87,9 +87,10 @@ export declare class InMemoryMemory extends MemoryStorage {
|
|
|
87
87
|
getSignalRun({ threadId }: {
|
|
88
88
|
threadId: string;
|
|
89
89
|
}): Promise<string | null>;
|
|
90
|
-
enqueuePendingSignal({ message, toRunId, }: {
|
|
90
|
+
enqueuePendingSignal({ message, toRunId, queued, }: {
|
|
91
91
|
message: MastraDBMessage;
|
|
92
92
|
toRunId?: string;
|
|
93
|
+
queued?: boolean;
|
|
93
94
|
}): Promise<PendingSignalEnqueueResult>;
|
|
94
95
|
claimPendingSignals({ threadId, runId, consumedIds, }: {
|
|
95
96
|
threadId: string;
|
|
@@ -109,6 +110,8 @@ export declare class InMemoryMemory extends MemoryStorage {
|
|
|
109
110
|
listPendingSignals({ threadId }: {
|
|
110
111
|
threadId: string;
|
|
111
112
|
}): Promise<MastraDBMessage[]>;
|
|
113
|
+
/** Moves the thread's queued rows to pending. */
|
|
114
|
+
private releaseQueuedRows;
|
|
112
115
|
/** The rows under the thread's pending and taken ids. */
|
|
113
116
|
private signalRowsOf;
|
|
114
117
|
/** Rows as the thread's messages, carrying the thread's current resource. */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* The prefix is reserved without a migration and nothing checks for a collision at `init()`. A
|
|
7
7
|
* thread stored earlier under an id with the prefix is rejected by the entry points, and messages
|
|
8
|
-
* stored under `pendingQueueThreadId(T)` or `
|
|
8
|
+
* stored under `pendingQueueThreadId(T)`, `takenQueueThreadId(T)` or `queuedQueueThreadId(T)` count as T's queue, so
|
|
9
9
|
* `deleteThread(T)` deletes them. The prefix is namespaced so that no existing id is expected to
|
|
10
10
|
* collide.
|
|
11
11
|
* @experimental
|
|
@@ -22,6 +22,12 @@ export declare function pendingQueueThreadId(threadId: string): string;
|
|
|
22
22
|
* @experimental
|
|
23
23
|
*/
|
|
24
24
|
export declare function takenQueueThreadId(threadId: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* The thread id that holds the signals sent to `threadId` with `queued`, which wait for the run
|
|
27
|
+
* in flight to end before they become pending.
|
|
28
|
+
* @experimental
|
|
29
|
+
*/
|
|
30
|
+
export declare function queuedQueueThreadId(threadId: string): string;
|
|
25
31
|
/**
|
|
26
32
|
* Whether `threadId` is one of the reserved queue thread ids.
|
|
27
33
|
* @experimental
|
|
@@ -3,7 +3,7 @@ import type { ClaimRunOwnershipInput, ClaimRunOwnershipResult, RenewRunOwnership
|
|
|
3
3
|
import type { UpdateWorkflowStateOptions, WorkflowRun, WorkflowRuns, StorageListWorkflowRunsInput } from '../../types.js';
|
|
4
4
|
import type { WorkflowStepStartGuard, WorkflowStepCompletionGuard } from '../../workflow-step-guard.js';
|
|
5
5
|
import { StorageDomain } from '../base.js';
|
|
6
|
-
import type { StateRef, StateVersion, StoredStateColumns, StoredWorkflowRun, StoredWorkflowRunHeader, WorkflowRunAppendHeader, WorkflowRunHeader } from './journal.js';
|
|
6
|
+
import type { StateRef, StateVersion, StoredStateColumns, StoredWorkflowRun, StoredWorkflowRunHeader, WorkflowRunAppendHeader, WorkflowRunAppendResult, WorkflowRunHeader } from './journal.js';
|
|
7
7
|
import type { StatePatchOp } from './state-patch.js';
|
|
8
8
|
export declare abstract class WorkflowsStorage extends StorageDomain {
|
|
9
9
|
constructor();
|
|
@@ -39,6 +39,13 @@ export declare abstract class WorkflowsStorage extends StorageDomain {
|
|
|
39
39
|
* @experimental
|
|
40
40
|
*/
|
|
41
41
|
supportsRunJournal(): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether `appendWorkflowRunEntries` applies a `headerPatch` in the same write as the append.
|
|
44
|
+
* Callers check it before passing one: an adapter written before the option existed ignores it.
|
|
45
|
+
* Without it, append first and then call `updateWorkflowRunHeader`, as two writes.
|
|
46
|
+
* @experimental
|
|
47
|
+
*/
|
|
48
|
+
supportsAppendHeaderPatch(): boolean;
|
|
42
49
|
/**
|
|
43
50
|
* Claim a run for an execution. Succeeds when the run has no live owner, or
|
|
44
51
|
* when `force` is set, and increments the run's generation. Lease expiry is
|
|
@@ -222,6 +229,15 @@ export declare abstract class WorkflowsStorage extends StorageDomain {
|
|
|
222
229
|
* marked `__continuationStarted`, and the run's state and request context stay as stored. With
|
|
223
230
|
* `startGuard.previousStep`, that step's result is written too when it's still the one the
|
|
224
231
|
* guard's event started, as `updateWorkflowResults` does.
|
|
232
|
+
*
|
|
233
|
+
* `headerPatch` (on stores whose `supportsAppendHeaderPatch()` is true, header-less appends only)
|
|
234
|
+
* patches the stored header in the same write, as `updateWorkflowRunHeader` would right after the
|
|
235
|
+
* append: only when the header's status matches the patch's `expectedStatus`, checked under the
|
|
236
|
+
* same lock as the guards, with `requestContext` merged into the patched header. The entries are
|
|
237
|
+
* appended either way. The result then says whether the patch was applied (`headerApplied`) and
|
|
238
|
+
* holds the header as stored after the write (`header`). A rejection by the guards or the fence
|
|
239
|
+
* (thrown) or by the append's own `expectedStatus` (null) writes neither, and so does a run that
|
|
240
|
+
* isn't stored (null).
|
|
225
241
|
* @experimental
|
|
226
242
|
*/
|
|
227
243
|
appendWorkflowRunEntries(_args: {
|
|
@@ -236,10 +252,7 @@ export declare abstract class WorkflowsStorage extends StorageDomain {
|
|
|
236
252
|
expectedStatus?: WorkflowRunStatus | WorkflowRunStatus[];
|
|
237
253
|
startGuard?: WorkflowStepStartGuard;
|
|
238
254
|
completionGuard?: WorkflowStepCompletionGuard;
|
|
239
|
-
} & WorkflowRunAppendHeader): Promise<
|
|
240
|
-
lastSeq: number;
|
|
241
|
-
runToken?: string;
|
|
242
|
-
} | null>;
|
|
255
|
+
} & WorkflowRunAppendHeader): Promise<WorkflowRunAppendResult | null>;
|
|
243
256
|
/**
|
|
244
257
|
* Merge `result` into a storage v2 run's latest entry for `stepId` (per element for array
|
|
245
258
|
* outputs, as `mergeStepResult` does), and append the merged result, then `statePatch` when
|
|
@@ -3,7 +3,7 @@ import type { ClaimRunOwnershipInput, ClaimRunOwnershipResult, RenewRunOwnership
|
|
|
3
3
|
import type { WorkflowRun, WorkflowRuns, StorageListWorkflowRunsInput, UpdateWorkflowStateOptions } from '../../types.js';
|
|
4
4
|
import type { InMemoryDB } from '../inmemory-db.js';
|
|
5
5
|
import { WorkflowsStorage } from './base.js';
|
|
6
|
-
import type { StateRef, StateVersion, StoredWorkflowRun, StoredWorkflowRunHeader, WorkflowRunAppendHeader, WorkflowRunHeader } from './journal.js';
|
|
6
|
+
import type { StateRef, StateVersion, StoredWorkflowRun, StoredWorkflowRunHeader, WorkflowRunAppendHeader, WorkflowRunAppendResult, WorkflowRunHeader } from './journal.js';
|
|
7
7
|
import type { StatePatchOp } from './state-patch.js';
|
|
8
8
|
/**
|
|
9
9
|
* Deep-clone in-memory workflow state.
|
|
@@ -38,6 +38,7 @@ export declare class WorkflowsInMemory extends WorkflowsStorage {
|
|
|
38
38
|
});
|
|
39
39
|
supportsConcurrentUpdates(): boolean;
|
|
40
40
|
supportsRunJournal(): boolean;
|
|
41
|
+
supportsAppendHeaderPatch(): boolean;
|
|
41
42
|
supportsGuardedSnapshotWrites(): boolean;
|
|
42
43
|
dangerouslyClearAll(): Promise<void>;
|
|
43
44
|
private getWorkflowKey;
|
|
@@ -161,10 +162,7 @@ export declare class WorkflowsInMemory extends WorkflowsStorage {
|
|
|
161
162
|
startStateSeq?: number;
|
|
162
163
|
fence?: RunFence;
|
|
163
164
|
expectedStatus?: WorkflowRunStatus | WorkflowRunStatus[];
|
|
164
|
-
} & WorkflowRunAppendHeader): Promise<
|
|
165
|
-
lastSeq: number;
|
|
166
|
-
runToken?: string;
|
|
167
|
-
} | null>;
|
|
165
|
+
} & WorkflowRunAppendHeader): Promise<WorkflowRunAppendResult | null>;
|
|
168
166
|
mergeWorkflowRunStepResult({ workflowName, runId, stepId, result, requestContext, statePatch, fence, }: {
|
|
169
167
|
workflowName: string;
|
|
170
168
|
runId: string;
|