@mastra/core 1.86.0-alpha.9 → 1.87.0-alpha.0
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_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/aisdk/speech.d.ts +1 -1
- package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/aisdk/transcription.d.ts +1 -1
- package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/composite-voice.d.ts +1 -1
- package/dist/agent/agent-legacy.d.ts +1 -1
- package/dist/agent/agent.d.ts +3 -3
- package/dist/agent/agent.types.d.ts +1 -1
- package/dist/agent/durable/constants.d.ts +2 -0
- package/dist/agent/durable/durable-agent.d.ts +3 -3
- package/dist/agent/durable/evented-execution.d.ts +7 -0
- package/dist/agent/durable/execution-engine.d.ts +1 -0
- package/dist/agent/durable/execution-fence.d.ts +2 -0
- package/dist/agent/durable/index.cjs +3 -1
- package/dist/agent/durable/index.d.ts +1 -1
- package/dist/agent/durable/index.js +2 -2
- package/dist/agent/durable/run-registry.d.ts +2 -0
- package/dist/agent/durable/segment-spans.d.ts +54 -1
- package/dist/agent/durable/stream-adapter.d.ts +1 -1
- package/dist/agent/durable/types.d.ts +12 -2
- package/dist/agent/durable/workflows/durable-loop-builder.d.ts +57 -2
- package/dist/agent/durable/workflows/finalize-run.d.ts +2 -0
- package/dist/agent/durable/workflows/shared/index.d.ts +1 -1
- package/dist/agent/durable/workflows/shared/reported-cost.d.ts +7 -0
- package/dist/agent/durable/workflows/shared/schemas.d.ts +16 -1
- package/dist/agent/durable/workflows/shared/tool-call-concurrency.d.ts +6 -0
- package/dist/agent/durable/workflows/steps/llm-execution.d.ts +5 -0
- package/dist/agent/durable/workflows/steps/llm-mapping.d.ts +6 -0
- package/dist/agent/durable/workflows/steps/tool-call.d.ts +20 -0
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/adapters/AIV4Adapter.d.ts +1 -1
- package/dist/agent/message-list/adapters/types.d.ts +1 -1
- package/dist/agent/message-list/cache/CacheKeyGenerator.d.ts +1 -1
- package/dist/agent/message-list/conversion/output-converter.d.ts +1 -1
- package/dist/agent/message-list/conversion/to-prompt.d.ts +1 -1
- package/dist/agent/message-list/conversion/utils.d.ts +1 -1
- package/dist/agent/message-list/detection/TypeDetector.d.ts +1 -1
- package/dist/agent/message-list/message-list.d.ts +2 -2
- package/dist/agent/message-list/prompt/attachments-to-parts.d.ts +1 -1
- package/dist/agent/message-list/prompt/convert-file.d.ts +1 -1
- package/dist/agent/message-list/prompt/data-content.d.ts +1 -1
- package/dist/agent/message-list/state/MessageStateManager.d.ts +1 -1
- package/dist/agent/message-list/state/types.d.ts +2 -2
- package/dist/agent/message-list/types.d.ts +9 -9
- package/dist/agent/message-list/utils/convert-messages.d.ts +3 -3
- package/dist/agent/message-list/utils/provider-compat.d.ts +1 -1
- package/dist/agent/request-context-snapshot.d.ts +3 -2
- package/dist/agent/signals.d.ts +1 -1
- package/dist/agent/streams/run-records.d.ts +9 -1
- package/dist/agent/types.d.ts +3 -3
- package/dist/agent/workflows/prepare-stream/run-scope-keys.d.ts +1 -1
- package/dist/agent-builder/ee/index.cjs +1 -1
- package/dist/agent-builder/ee/index.js +1 -1
- package/dist/agent-controller/index.cjs +1 -1
- package/dist/agent-controller/index.js +1 -1
- package/dist/agent-controller/session-run-engine.d.ts +5 -2
- package/dist/agent-controller/session.d.ts +2 -0
- package/dist/agent-controller/types.d.ts +23 -0
- package/dist/{agent-controller-SSlKzE6A.js → agent-controller-B8LoFdtu.js} +43 -13
- package/dist/{agent-controller-CrQ9OF80.cjs → agent-controller-DSnFynpa.cjs} +43 -13
- package/dist/auth/defaults/index.d.ts +2 -2
- package/dist/auth/defaults/session/cookie.d.ts +2 -2
- package/dist/auth/defaults/session/index.d.ts +2 -2
- package/dist/auth/defaults/session/memory.d.ts +2 -2
- package/dist/auth/ee/capabilities.d.ts +1 -1
- package/dist/auth/ee/defaults/index.d.ts +1 -1
- package/dist/auth/ee/defaults/rbac/index.d.ts +1 -1
- package/dist/auth/ee/defaults/rbac/static.d.ts +1 -1
- package/dist/auth/ee/defaults/roles.d.ts +1 -1
- package/dist/auth/ee/fga-check.d.ts +1 -1
- package/dist/auth/ee/index.d.ts +1 -1
- package/dist/auth/ee/interfaces/acl.d.ts +1 -1
- package/dist/auth/ee/interfaces/fga.d.ts +1 -1
- package/dist/auth/ee/interfaces/index.d.ts +1 -1
- package/dist/auth/ee/interfaces/permissions.generated.d.ts +1 -1
- package/dist/auth/ee/interfaces/rbac.d.ts +1 -1
- package/dist/auth/ee/interfaces/user.d.ts +1 -1
- package/dist/auth/ee/license.d.ts +1 -1
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/interfaces/credentials.d.ts +1 -1
- package/dist/auth/interfaces/index.d.ts +2 -2
- package/dist/auth/interfaces/session.d.ts +1 -1
- package/dist/auth/interfaces/sso.d.ts +1 -1
- package/dist/auth/interfaces/user.d.ts +1 -1
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/background-tasks/manager.d.ts +4 -1
- package/dist/{background-tasks-BDrYBis-.cjs → background-tasks-Ci5h0dhj.cjs} +139 -51
- package/dist/{background-tasks-BnJfNLFo.js → background-tasks-IW7M4iD2.js} +139 -51
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/{builder-Cw8u3pPl.cjs → builder-14Uptu8y.cjs} +2 -2
- package/dist/{builder-Cl-0BWkh.js → builder-DI2c2xjy.js} +2 -2
- package/dist/bundler/index.d.ts +2 -2
- package/dist/cache/base.d.ts +40 -10
- package/dist/cache/index.cjs +1 -1
- package/dist/cache/index.js +1 -1
- package/dist/capabilities/302ai.json +196 -196
- package/dist/capabilities/abliteratedllm.json +36 -36
- package/dist/capabilities/abliteration-ai.json +11 -11
- package/dist/capabilities/above.json +22 -22
- package/dist/capabilities/adaption.json +13 -13
- package/dist/capabilities/adzuki.json +28 -28
- package/dist/capabilities/agentrouter.json +9 -9
- package/dist/capabilities/agnes.json +4 -4
- package/dist/capabilities/ai-router.json +5 -5
- package/dist/capabilities/aiand.json +16 -16
- package/dist/capabilities/aigrow.json +14 -14
- package/dist/capabilities/aimlapi.json +146 -150
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +9 -9
- package/dist/capabilities/aki-io.json +10 -10
- package/dist/capabilities/alibaba-cn.json +97 -97
- package/dist/capabilities/alibaba-coding-plan-cn.json +5 -5
- package/dist/capabilities/alibaba-coding-plan.json +5 -5
- package/dist/capabilities/alibaba-token-plan-cn.json +51 -51
- package/dist/capabilities/alibaba-token-plan.json +52 -52
- package/dist/capabilities/alibaba.json +69 -69
- package/dist/capabilities/ambient.json +15 -15
- package/dist/capabilities/amd.json +8 -8
- package/dist/capabilities/anthropic.json +49 -49
- package/dist/capabilities/anyapi.json +19 -19
- package/dist/capabilities/arcee.json +9 -9
- package/dist/capabilities/augure.json +4 -4
- package/dist/capabilities/auriko.json +21 -21
- package/dist/capabilities/bailing.json +4 -4
- package/dist/capabilities/baseten.json +28 -28
- package/dist/capabilities/bee.json +5 -5
- package/dist/capabilities/berget.json +4 -4
- package/dist/capabilities/bothub.json +14 -14
- package/dist/capabilities/boundless.json +39 -39
- package/dist/capabilities/bumo.json +42 -42
- package/dist/capabilities/byteplus.json +24 -24
- package/dist/capabilities/cheapaimodel.json +10 -10
- package/dist/capabilities/cheapest-token.json +29 -29
- package/dist/capabilities/chutes.json +10 -13
- package/dist/capabilities/cline-pass.json +37 -37
- package/dist/capabilities/cloudcode.json +10 -10
- package/dist/capabilities/cloudflare-workers-ai.json +12 -73
- package/dist/capabilities/commandcode.json +131 -131
- package/dist/capabilities/concentrate.json +272 -263
- package/dist/capabilities/cortecs.json +113 -113
- package/dist/capabilities/crossmodel.json +169 -169
- package/dist/capabilities/crusoe.json +10 -10
- package/dist/capabilities/daoxe.json +9 -9
- package/dist/capabilities/databricks.json +128 -128
- package/dist/capabilities/deepinfra.json +130 -67
- package/dist/capabilities/deepseek.json +4 -4
- package/dist/capabilities/digitalocean.json +112 -112
- package/dist/capabilities/dothoosh.json +29 -29
- package/dist/capabilities/doubleword.json +29 -29
- package/dist/capabilities/edenai.json +446 -453
- package/dist/capabilities/empiriolabs.json +164 -166
- package/dist/capabilities/engy.json +22 -22
- package/dist/capabilities/entrim.json +4 -4
- package/dist/capabilities/evroc.json +14 -14
- package/dist/capabilities/ezkielyna.json +10 -10
- package/dist/capabilities/fastrouter.json +79 -79
- package/dist/capabilities/fireworks-ai.json +92 -71
- package/dist/capabilities/freemodel.json +21 -21
- package/dist/capabilities/friendli.json +10 -10
- package/dist/capabilities/frogbot.json +87 -87
- package/dist/capabilities/gisoo.json +19 -19
- package/dist/capabilities/gmicloud.json +21 -21
- package/dist/capabilities/google.json +52 -52
- package/dist/capabilities/graphn.json +11 -11
- package/dist/capabilities/greenpt.json +35 -35
- package/dist/capabilities/groq.json +3 -3
- package/dist/capabilities/helicone.json +78 -78
- package/dist/capabilities/hostinger-router.json +13 -13
- package/dist/capabilities/hpc-ai.json +10 -10
- package/dist/capabilities/huawei-maas.json +17 -17
- package/dist/capabilities/hubris.json +25 -25
- package/dist/capabilities/huggingface.json +94 -84
- package/dist/capabilities/hyper.json +29 -29
- package/dist/capabilities/impossibl.json +148 -148
- package/dist/capabilities/inception.json +3 -3
- package/dist/capabilities/inceptron.json +6 -6
- package/dist/capabilities/inco.json +4 -4
- package/dist/capabilities/infer.json +10 -10
- package/dist/capabilities/inferall.json +5 -5
- package/dist/capabilities/inference-coop.json +15 -15
- package/dist/capabilities/inferenceapis.json +17 -17
- package/dist/capabilities/inferris.json +4 -4
- package/dist/capabilities/infersia.json +12 -12
- package/dist/capabilities/infomaniak.json +2 -2
- package/dist/capabilities/io-net.json +2 -2
- package/dist/capabilities/isoquant.json +4 -4
- package/dist/capabilities/iteracompute.json +58 -58
- package/dist/capabilities/jad-ai.json +2 -2
- package/dist/capabilities/jalapeno.json +11 -11
- package/dist/capabilities/jiekou.json +62 -62
- package/dist/capabilities/jzstoken.json +47 -47
- package/dist/capabilities/keln.json +21 -21
- package/dist/capabilities/kenari.json +123 -123
- package/dist/capabilities/kilo.json +631 -621
- package/dist/capabilities/kimi-code-plan-cn.json +6 -6
- package/dist/capabilities/kimi-code-plan-global.json +6 -6
- package/dist/capabilities/kitani.json +4 -4
- package/dist/capabilities/klavo.json +21 -21
- package/dist/capabilities/korouter.json +33 -33
- package/dist/capabilities/kunavo.json +5 -5
- package/dist/capabilities/liquid.json +12 -12
- package/dist/capabilities/lithosai.json +2 -2
- package/dist/capabilities/llmgateway-providers.json +903 -894
- package/dist/capabilities/llmgateway.json +344 -336
- package/dist/capabilities/llmtr.json +23 -23
- package/dist/capabilities/logits.json +2 -2
- package/dist/capabilities/longcat.json +2 -2
- package/dist/capabilities/lowrouter.json +46 -46
- package/dist/capabilities/lyceum.json +14 -14
- package/dist/capabilities/melious.json +15 -15
- 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 +21 -21
- package/dist/capabilities/mixlayer.json +4 -4
- package/dist/capabilities/modal.json +14 -14
- package/dist/capabilities/model-oracle-ai.json +23 -23
- package/dist/capabilities/modelis.json +22 -22
- package/dist/capabilities/modelscope.json +2 -2
- package/dist/capabilities/modular.json +7 -7
- package/dist/capabilities/moneo.json +11 -11
- package/dist/capabilities/moonshotai-cn.json +6 -6
- package/dist/capabilities/moonshotai.json +6 -6
- package/dist/capabilities/morph.json +13 -13
- package/dist/capabilities/munito.json +2 -2
- package/dist/capabilities/nan.json +28 -28
- package/dist/capabilities/nano-gpt.json +599 -564
- package/dist/capabilities/nearai.json +96 -96
- package/dist/capabilities/nebius.json +32 -32
- package/dist/capabilities/neon.json +120 -120
- package/dist/capabilities/neuralwatt.json +37 -37
- package/dist/capabilities/nokeep.json +4 -4
- package/dist/capabilities/novita-ai.json +154 -154
- package/dist/capabilities/nvidia.json +28 -60
- package/dist/capabilities/oathbreaker.json +2 -2
- package/dist/capabilities/obscurify.json +20 -20
- package/dist/capabilities/oci.json +17 -8
- package/dist/capabilities/ofox.json +317 -317
- package/dist/capabilities/ollama-cloud.json +56 -56
- package/dist/capabilities/openai.json +78 -46
- package/dist/capabilities/opencode-go.json +86 -86
- package/dist/capabilities/openreason.json +5 -5
- package/dist/capabilities/openrouter.json +535 -519
- package/dist/capabilities/opper.json +27 -27
- package/dist/capabilities/orcarouter.json +217 -217
- package/dist/capabilities/outerlabs.json +31 -31
- package/dist/capabilities/ovhcloud.json +58 -4
- package/dist/capabilities/pareto.json +5 -5
- package/dist/capabilities/pendra.json +4 -4
- package/dist/capabilities/perplexity-agent.json +62 -62
- package/dist/capabilities/phala.json +36 -36
- package/dist/capabilities/pioneer.json +27 -27
- package/dist/capabilities/poe.json +110 -110
- package/dist/capabilities/poolside.json +3 -3
- package/dist/capabilities/powerspring.json +11 -11
- package/dist/capabilities/primalabs.json +10 -10
- package/dist/capabilities/prime.json +127 -111
- package/dist/capabilities/privatemode-ai.json +11 -11
- package/dist/capabilities/proxystacks.json +7 -7
- package/dist/capabilities/qiniu-ai.json +15 -15
- package/dist/capabilities/refuseless.json +9 -9
- package/dist/capabilities/regolo-ai.json +6 -6
- package/dist/capabilities/requesty.json +170 -170
- package/dist/capabilities/ruapi.json +20 -20
- package/dist/capabilities/runcrate.json +10 -10
- package/dist/capabilities/runinfra.json +16 -16
- package/dist/capabilities/sakana.json +6 -6
- package/dist/capabilities/sambanova.json +6 -6
- package/dist/capabilities/sandbase.json +11 -11
- package/dist/capabilities/sarvam.json +10 -10
- package/dist/capabilities/scaleway.json +14 -14
- package/dist/capabilities/scnet-token-plan.json +14 -14
- package/dist/capabilities/scx-ai.json +26 -26
- package/dist/capabilities/sensenova.json +12 -12
- package/dist/capabilities/siliconflow-cn.json +50 -50
- package/dist/capabilities/siliconflow.json +55 -55
- package/dist/capabilities/snowflake-cortex.json +19 -19
- package/dist/capabilities/sokkan.json +7 -7
- package/dist/capabilities/sparrowcodes.json +17 -17
- package/dist/capabilities/standardcompute.json +98 -98
- package/dist/capabilities/steadyrouter.json +38 -38
- package/dist/capabilities/stepfun-ai-step-plan.json +6 -6
- package/dist/capabilities/stepfun-ai.json +5 -5
- package/dist/capabilities/stepfun-step-plan.json +5 -5
- package/dist/capabilities/stepfun.json +5 -5
- package/dist/capabilities/stepping-stone.json +17 -17
- package/dist/capabilities/subconscious.json +2 -2
- package/dist/capabilities/superbot-gg.json +4 -4
- package/dist/capabilities/synthetic.json +12 -12
- package/dist/capabilities/synthorai.json +22 -22
- package/dist/capabilities/teamorouter.json +24 -24
- package/dist/capabilities/teapot-router.json +12 -12
- package/dist/capabilities/tencent-token-plan.json +59 -35
- package/dist/capabilities/tencent-tokenhub.json +46 -46
- package/dist/capabilities/tensorx.json +47 -47
- package/dist/capabilities/tenstorrent.json +8 -8
- package/dist/capabilities/the-grid-ai.json +29 -29
- package/dist/capabilities/thinkingmachines.json +61 -61
- package/dist/capabilities/tinfoil.json +12 -12
- package/dist/capabilities/togetherai.json +62 -52
- package/dist/capabilities/tokengo.json +14 -14
- package/dist/capabilities/tokenify.json +9 -9
- package/dist/capabilities/trustedrouter.json +7 -7
- 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/unrestricted.json +8 -8
- package/dist/capabilities/uplinkswitch.json +21 -21
- package/dist/capabilities/upstage.json +4 -4
- package/dist/capabilities/vancine.json +24 -24
- package/dist/capabilities/vercel.json +582 -582
- package/dist/capabilities/vivgrid.json +86 -86
- package/dist/capabilities/volcengine-coding-plan.json +23 -23
- package/dist/capabilities/volcengine.json +24 -24
- package/dist/capabilities/vultr.json +26 -26
- package/dist/capabilities/wafer.ai.json +16 -16
- package/dist/capabilities/wallaby.json +4 -4
- package/dist/capabilities/wally.json +11 -11
- package/dist/capabilities/wandb.json +21 -21
- package/dist/capabilities/watt.json +24 -24
- package/dist/capabilities/xai.json +6 -6
- package/dist/capabilities/xiaomi.json +2 -2
- package/dist/capabilities/xpersona.json +13 -13
- package/dist/capabilities/xxapi.json +28 -28
- package/dist/capabilities/zai-coding-plan.json +19 -19
- package/dist/capabilities/zai.json +26 -24
- package/dist/capabilities/zenifra.json +27 -27
- package/dist/capabilities/zenmux.json +172 -172
- package/dist/capabilities/zerogpu.json +8 -8
- package/dist/capabilities/zhipuai-coding-plan.json +7 -7
- package/dist/capabilities/zhipuai.json +23 -23
- package/dist/capabilities/zro.json +7 -7
- package/dist/channels/agent-channels.d.ts +2 -1
- package/dist/channels/formatting.d.ts +8 -0
- package/dist/channels/index.cjs +4 -2
- package/dist/channels/index.d.ts +1 -1
- package/dist/channels/index.js +3 -3
- package/dist/channels/types.d.ts +5 -3
- package/dist/{channels-Cz1y3W6u.js → channels-Wh32drgu.js} +1 -1
- package/dist/{channels-DQg4v_gm.cjs → channels-tVV_de9Q.cjs} +1 -1
- package/dist/coding-agent/index.cjs +1 -1
- package/dist/coding-agent/index.js +1 -1
- package/dist/datasets/index.cjs +2 -2
- package/dist/datasets/index.js +2 -2
- package/dist/deployer/index.d.ts +2 -2
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +798 -798
- package/dist/docs/references/docs-agents-resumable-streams.md +15 -6
- package/dist/docs/references/docs-deployment-workers.md +3 -1
- package/dist/docs/references/docs-harness-background-tasks.md +4 -4
- package/dist/docs/references/docs-harness-durable-agents.md +39 -48
- package/dist/docs/references/docs-knowledge-importers.md +1 -1
- package/dist/docs/references/docs-mastra-platform-observability-overview.md +1 -1
- package/dist/docs/references/docs-sandbox-overview.md +1 -0
- package/dist/docs/references/docs-server-pubsub.md +1 -1
- package/dist/docs/references/docs-workflows-overview.md +67 -3
- package/dist/docs/references/integrations-agentic-ui-assistant-ui.md +2 -0
- package/dist/docs/references/integrations-frameworks-angular.md +39 -0
- package/dist/docs/references/integrations-frameworks-astro.md +5 -2
- package/dist/docs/references/integrations-frameworks-electron.md +40 -0
- package/dist/docs/references/integrations-frameworks-next-js.md +5 -2
- package/dist/docs/references/integrations-frameworks-nuxt.md +5 -2
- package/dist/docs/references/integrations-frameworks-sveltekit.md +5 -2
- package/dist/docs/references/integrations-frameworks-vite-react.md +40 -0
- package/dist/docs/references/integrations.md +3 -0
- package/dist/docs/references/reference-agent-controller-agent-controller-class.md +6 -0
- package/dist/docs/references/reference-agents-channels.md +1 -1
- package/dist/docs/references/reference-agents-durable-agent.md +3 -3
- package/dist/docs/references/reference-agents-generate.md +2 -0
- package/dist/docs/references/reference-configuration.md +1 -1
- package/dist/docs/references/reference-core-mastra-class.md +2 -0
- package/dist/docs/references/reference-knowledge-knowledge-class.md +1 -1
- package/dist/docs/references/reference-knowledge-knowledge-tools.md +11 -5
- package/dist/docs/references/reference-pubsub-caching-pubsub.md +2 -2
- package/dist/docs/references/reference-pubsub-redis-streams.md +2 -2
- package/dist/docs/references/reference-pubsub-valkey-streams.md +2 -2
- package/dist/docs/references/reference-workers-overview.md +2 -0
- package/dist/docs/references/reference-workflows-workflow-methods-create-run.md +2 -0
- package/dist/docs/references/reference-workflows-workflow.md +2 -0
- package/dist/docs/references/reference.md +1 -0
- package/dist/error/index.cjs +2 -1
- package/dist/error/index.d.ts +1 -1
- package/dist/error/index.js +2 -2
- package/dist/error/provider-error.d.ts +2 -1
- package/dist/{error-BLwEXqOK.js → error-BC9Au-22.js} +13 -1
- package/dist/{error-BdEvO8za.cjs → error-L1V4uUbd.cjs} +18 -0
- package/dist/evals/index.cjs +1 -1
- package/dist/evals/index.js +1 -1
- package/dist/evals/run/index.d.ts +1 -1
- package/dist/evals/scoreTraces/index.cjs +1 -1
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/evals/types.d.ts +1 -1
- package/dist/events/caching-pubsub.d.ts +28 -0
- package/dist/events/index.cjs +4 -1
- package/dist/events/index.js +2 -2
- package/dist/events/topics.d.ts +55 -9
- package/dist/harness/index.cjs +1 -1
- package/dist/harness/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{inmemory-BDD0w8gx.js → inmemory-BK3zLwvM.js} +42 -12
- package/dist/{inmemory-fgR8sq-U.cjs → inmemory-Dc86VWGB.cjs} +42 -12
- package/dist/knowledge/changes.d.ts +17 -5
- package/dist/knowledge/importers/runner.d.ts +6 -0
- package/dist/knowledge/index.cjs +78 -16
- package/dist/knowledge/index.d.ts +2 -2
- package/dist/knowledge/index.js +78 -16
- package/dist/knowledge/search-snippet.d.ts +30 -0
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.d.ts +2 -2
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/aisdk/v4/model.d.ts +9 -9
- package/dist/llm/model/base.types.d.ts +2 -2
- package/dist/llm/model/embedding-router.d.ts +1 -1
- package/dist/llm/model/model-settings.d.ts +1 -1
- package/dist/llm/model/model.d.ts +1 -1
- package/dist/llm/model/model.loop.d.ts +1 -1
- package/dist/llm/model/model.loop.types.d.ts +1 -1
- package/dist/llm/model/provider-types.generated.d.ts +8011 -7996
- package/dist/llm/model/shared.types.d.ts +1 -1
- package/dist/{llm-B5A5cwJr.js → llm-B1zaFLYZ.js} +3 -3
- package/dist/{llm-8Av3mSjD.cjs → llm-BAiOsNAP.cjs} +3 -3
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/loop/loop-builder.d.ts +1 -1
- package/dist/loop/loop.d.ts +1 -1
- package/dist/loop/run-scope-keys.d.ts +1 -1
- package/dist/loop/shared/transcript-step.d.ts +1 -1
- package/dist/loop/types.d.ts +2 -2
- package/dist/loop/workflows/agentic-execution/background-task-check-step.d.ts +1 -1
- package/dist/loop/workflows/agentic-execution/build-messages-from-chunks.d.ts +1 -1
- package/dist/loop/workflows/agentic-execution/goal-step.d.ts +1 -1
- package/dist/loop/workflows/agentic-execution/index.d.ts +1 -1
- package/dist/loop/workflows/agentic-execution/is-task-complete-step.d.ts +1 -1
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +1 -1
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +1 -1
- package/dist/loop/workflows/agentic-execution/tool-call-concurrency.d.ts +1 -1
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts +1 -1
- package/dist/loop/workflows/agentic-loop/index.d.ts +1 -1
- package/dist/loop/workflows/schema.d.ts +2 -2
- package/dist/loop/workflows/stream.d.ts +1 -1
- package/dist/{manager-sv35JY-z.cjs → manager-BVX9nVrM.cjs} +2 -2
- package/dist/{manager-DfWQCJUK.js → manager-ChK9GdGz.js} +2 -2
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-CigBrT7X.js → mastra-CUGfgEpZ.js} +28 -18
- package/dist/{mastra-D4hvfuxX.cjs → mastra-HSmofHEJ.cjs} +28 -18
- package/dist/memory/index.cjs +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/memory/memory.d.ts +1 -1
- package/dist/memory/types.d.ts +2 -2
- package/dist/{model-CYtXw861.js → model-C47BJRtR.js} +1 -1
- package/dist/{model-BK93CMtl.cjs → model-WahorgzJ.cjs} +1 -1
- package/dist/{netlify-CuI1ZrwR.js → netlify-CfDXkuLf.js} +2 -2
- package/dist/{netlify-BAnn3ouY.cjs → netlify-D99AnEhW.cjs} +2 -2
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/observability/index.cjs +1 -0
- package/dist/observability/index.d.ts +1 -1
- package/dist/observability/index.js +2 -2
- package/dist/{output-helpers-CedRCE17.js → output-helpers-CVzhy1Y0.js} +126 -56
- package/dist/{output-helpers-1Zu4Vt9C.cjs → output-helpers-DgsH4aTb.cjs} +143 -55
- package/dist/processor-provider/index.cjs +1 -1
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +2 -2
- package/dist/processors/index.d.ts +2 -2
- package/dist/processors/index.js +2 -2
- package/dist/processors/runner.d.ts +3 -1
- package/dist/processors/step-schema.d.ts +1 -1
- package/dist/{provider-registry-BwuI_IpT.cjs → provider-registry-CO1NVbO5.cjs} +22070 -22050
- package/dist/{provider-registry-CmQLzLF_.js → provider-registry-CR385GJ4.js} +22070 -22050
- package/dist/provider-registry.json +22239 -22226
- package/dist/{registry-generator-C17V4WfG.js → registry-generator-B3erRqYS.js} +1 -1
- package/dist/{registry-generator-C_0ae7Ce.cjs → registry-generator-Cvp34qcB.cjs} +1 -1
- package/dist/{rehydrate-PnaVawGX.js → rehydrate-CJBLrZxs.js} +2 -2
- package/dist/{rehydrate-CDQ4dOYj.cjs → rehydrate-Da4hNuaK.cjs} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/{run-registry-BwEcwYlU.js → run-registry-DdeEBsVW.js} +1639 -568
- package/dist/{run-registry-BmckDVBk.cjs → run-registry-TOOfO3hT.cjs} +1668 -567
- package/dist/server/auth.d.ts +3 -3
- package/dist/server/composite-auth.d.ts +1 -1
- package/dist/server/simple-auth.d.ts +1 -1
- package/dist/server/types.d.ts +1 -1
- package/dist/storage/domains/inmemory-db.d.ts +1 -0
- package/dist/storage/domains/knowledge/base.d.ts +5 -0
- package/dist/storage/domains/knowledge/inmemory.d.ts +1 -0
- package/dist/storage/domains/knowledge/pages-inmemory.d.ts +10 -2
- package/dist/storage/domains/knowledge/pages.d.ts +30 -0
- package/dist/storage/index.cjs +2 -2
- package/dist/storage/index.js +2 -2
- package/dist/storage/run-fencing.d.ts +5 -0
- package/dist/stream/RunOutput.d.ts +1 -1
- package/dist/stream/aisdk/v4/input.d.ts +1 -1
- package/dist/stream/aisdk/v5/compat/content.d.ts +1 -1
- package/dist/stream/aisdk/v5/compat/prepare-tools.d.ts +1 -1
- package/dist/stream/aisdk/v5/compat/ui-message.d.ts +1 -1
- package/dist/stream/aisdk/v5/compat/validation.d.ts +1 -1
- package/dist/stream/aisdk/v5/execute.d.ts +1 -1
- package/dist/stream/aisdk/v5/input.d.ts +1 -1
- package/dist/stream/aisdk/v5/output-helpers.d.ts +7 -7
- package/dist/stream/aisdk/v5/transform.d.ts +1 -1
- package/dist/stream/base/output.d.ts +4 -4
- package/dist/stream/base/schema.d.ts +1 -1
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/stream/types.d.ts +2 -2
- package/dist/{stream-D1y9GzoD.js → stream-C5PagEDs.js} +3 -3
- package/dist/{stream-0kdqBOOn.cjs → stream-DH7Qgz8l.cjs} +3 -3
- package/dist/test-utils/llm-mock.cjs +1 -1
- package/dist/test-utils/llm-mock.d.ts +3 -3
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +1 -1
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/tool-loop-agent/utils.d.ts +1 -1
- package/dist/{tool-loop-agent-kWaZAT6Q.cjs → tool-loop-agent-CJTs4T8b.cjs} +3 -3
- package/dist/{tool-loop-agent-BdjWGVIb.js → tool-loop-agent-DVYJXlQJ.js} +3 -3
- package/dist/tools/builtin/web-search.d.ts +1 -1
- package/dist/tools/provider-tool-utils.d.ts +1 -1
- package/dist/tools/tool-builder/builder.d.ts +1 -1
- package/dist/tools/tool-title.d.ts +1 -1
- package/dist/tools/types.d.ts +1 -1
- package/dist/types/user.d.ts +1 -1
- package/dist/{utils-GHY3hmLx.js → utils-D8upuTwy.js} +1 -1
- package/dist/{utils-BKUCaZ12.cjs → utils-xJi_N6Tx.cjs} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-De92squ7.cjs → validate-6eZ8Wssn.cjs} +1 -1
- package/dist/{validate-CB-q-R2F.js → validate-DTkW3Vlp.js} +1 -1
- package/dist/vector/embed.d.ts +4 -4
- package/dist/vector/index.cjs +1 -1
- package/dist/vector/index.js +1 -1
- package/dist/vector/vector.d.ts +4 -4
- package/dist/voice/aisdk/index.d.ts +1 -1
- package/dist/voice/aisdk/speech.d.ts +1 -1
- package/dist/voice/aisdk/transcription.d.ts +1 -1
- package/dist/voice/composite-voice.d.ts +1 -1
- package/dist/voice/default-voice.d.ts +1 -1
- package/dist/voice/index.d.ts +2 -2
- package/dist/voice/voice.d.ts +1 -1
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/{worker-CAKvQj9_.cjs → worker-24ORi-wV.cjs} +2 -2
- package/dist/{worker-BbWPQuPR.cjs → worker-BO3u_WjZ.cjs} +2 -2
- package/dist/{worker-C3u_xzY2.js → worker-DbcFkKJO.js} +2 -2
- package/dist/{worker-Kwm8EKcj.js → worker-Dqubrnf8.js} +2 -2
- package/dist/{workflow-CSjXeNcR.cjs → workflow-D5Fc5ieC.cjs} +4 -4
- package/dist/{workflow-CVmI1Sw-.js → workflow-wXOf72fO.js} +4 -4
- package/dist/workflows/builder/index.cjs +1 -1
- package/dist/workflows/builder/index.js +1 -1
- package/dist/workflows/evented/index.cjs +1 -1
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +4 -4
- package/dist/workflows/index.js +4 -4
- package/dist/workflows/run-ownership.d.ts +74 -8
- package/dist/workflows/types.d.ts +17 -1
- package/dist/workflows/workflow.d.ts +4 -0
- package/package.json +14 -14
- package/src/llm/model/provider-types.generated.d.ts +8011 -7996
- /package/dist/_types/{@internal_ai-sdk-v4@0.0.98 → @internal_ai-sdk-v4@0.0.99}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_ai-sdk-v4@0.0.98 → @internal_ai-sdk-v4@0.0.99}/dist/test.d.ts +0 -0
- /package/dist/_types/{@internal_ai-sdk-v4@0.0.98 → @internal_ai-sdk-v4@0.0.99}/package.json +0 -0
- /package/dist/_types/{@internal_ai-sdk-v5@0.0.98 → @internal_ai-sdk-v5@0.0.99}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_ai-sdk-v5@0.0.98 → @internal_ai-sdk-v5@0.0.99}/dist/test.d.ts +0 -0
- /package/dist/_types/{@internal_ai-sdk-v5@0.0.98 → @internal_ai-sdk-v5@0.0.99}/package.json +0 -0
- /package/dist/_types/{@internal_ai-v6@0.0.98 → @internal_ai-v6@0.0.99}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_ai-v6@0.0.98 → @internal_ai-v6@0.0.99}/package.json +0 -0
- /package/dist/_types/{@internal_ai-v7@0.0.98 → @internal_ai-v7@0.0.99}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_ai-v7@0.0.98 → @internal_ai-v7@0.0.99}/package.json +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/_types/@internal_core@0.1.4/dist/base/index.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/_types/@internal_core@0.1.4/dist/index-Diz1p9N7.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/capabilities.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/defaults/index.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/defaults/rbac/index.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/defaults/rbac/static.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/defaults/roles.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/fga-check.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/index.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/acl.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/fga.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/index.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/permissions.generated.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/rbac.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/user.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/license.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/provider/index.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/session/cookie.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/session/index.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/session/memory.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/types/index.d.ts +0 -0
- /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/package.json +0 -0
- /package/dist/_types/{@internal_deployer@0.0.4 → @internal_deployer@0.0.5}/dist/_types/@internal_core@0.1.4/dist/index-Diz1p9N7.d.ts +0 -0
- /package/dist/_types/{@internal_deployer@0.0.4 → @internal_deployer@0.0.5}/dist/_types/@internal_core@0.1.4/dist/logger/index.d.ts +0 -0
- /package/dist/_types/{@internal_deployer@0.0.4 → @internal_deployer@0.0.5}/dist/bundler.d.ts +0 -0
- /package/dist/_types/{@internal_deployer@0.0.4 → @internal_deployer@0.0.5}/dist/deployer.d.ts +0 -0
- /package/dist/_types/{@internal_deployer@0.0.4 → @internal_deployer@0.0.5}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_deployer@0.0.4 → @internal_deployer@0.0.5}/package.json +0 -0
- /package/dist/_types/{@internal_external-types@0.0.101 → @internal_external-types@0.0.102}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_external-types@0.0.101 → @internal_external-types@0.0.102}/package.json +0 -0
- /package/dist/_types/{@internal_voice@0.0.47/dist/_types/@internal_ai-sdk-v5@0.0.98 → @internal_voice@0.0.48/dist/_types/@internal_ai-sdk-v5@0.0.99}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/@internal_core@0.1.4/dist/base/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/@internal_core@0.1.4/dist/index-Diz1p9N7.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/@internal_core@0.1.4/dist/request-context/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/@internal_core@0.1.4/dist/types/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/ZodError.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/errors.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/external.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/helpers/enumUtil.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/helpers/errorUtil.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/helpers/parseUtil.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/helpers/partialUtil.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/helpers/typeAliases.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/helpers/util.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/locales/en.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/standard-schema.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v3/types.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/checks.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/coerce.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/compat.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/deep-partial.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/errors.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/external.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/from-json-schema.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/in-out.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/iso.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/parse.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/classic/schemas.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/api.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/checks.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/compile.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/core.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/doc.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/errors.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/json-schema-generator.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/json-schema-processors.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/json-schema.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/memoizer.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/parse.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/regexes.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/registries.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/schemas.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/standard-schema.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/to-json-schema.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/util.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/core/versions.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/index.d.cts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ar.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/az.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/be.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/bg.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/bn.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ca.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ckb.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/cs.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/da.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/de.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/el.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/en.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/eo.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/es.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/fa.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/fi.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/fr-CA.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/fr.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/gu.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/he.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/hi.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/hr.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/hu.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/hy.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/id.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/is.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/it.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ja.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ka.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/kh.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/km.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/kn.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ko.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/lt.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/mk.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ms.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ne.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/nl.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/nn.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/no.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ota.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/pl.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ps.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/pt-BR.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/pt.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ro.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ru.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/sk.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/sl.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/sv.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ta.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/tg.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/th.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/tk.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/tr.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ua.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/uk.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/ur.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/uz.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/vi.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/yo.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/zh-CN.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/_types/zod@4.6.7/v4/locales/zh-TW.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/aisdk/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/default-voice.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/dist/voice/voice.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.47 → @internal_voice@0.0.48}/package.json +0 -0
package/dist/knowledge/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_base = require("../base-BIzR1D3_.cjs");
|
|
3
|
-
const require_run_registry = require("../run-registry-
|
|
3
|
+
const require_run_registry = require("../run-registry-TOOfO3hT.cjs");
|
|
4
4
|
const require_tool = require("../tool-CYlT2UA-.cjs");
|
|
5
5
|
let crypto = require("crypto");
|
|
6
6
|
let _mastra_schema_compat_schema = require("@mastra/schema-compat/schema");
|
|
@@ -79,15 +79,55 @@ const MOVED_PAGE = {
|
|
|
79
79
|
mergePages: (input) => input.sourceId
|
|
80
80
|
};
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* write that committed: errors go to `onError`.
|
|
82
|
+
* A view {@link emitKnowledgeChanges} returned answers this key with the store it wraps, so helpers
|
|
83
|
+
* that find a view by identity (`pgKnowledgeTransactionClient`) can look through it. `Symbol.for`, so
|
|
84
|
+
* a store package reads it without importing a newer core.
|
|
86
85
|
*/
|
|
87
|
-
|
|
86
|
+
const UNWRAP = Symbol.for("mastra.knowledge.unwrap");
|
|
87
|
+
/** The adapter's own store or transaction view under one {@link emitKnowledgeChanges} returned. Writes through it emit nothing. */
|
|
88
|
+
function unwrapKnowledgeStorage(storage) {
|
|
89
|
+
return storage[UNWRAP] ?? storage;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Wraps `storage` so each page-store write in {@link WRITES} calls `emit` after it resolves. Writes
|
|
93
|
+
* on a `transaction` view are held until that transaction commits and dropped if it rolls back; a
|
|
94
|
+
* nested `transaction` hands its writes to the outer one when it succeeds. While a nested
|
|
95
|
+
* transaction is open, writes through any view of that transaction chain belong to the innermost
|
|
96
|
+
* one (they run inside its savepoint), so they are kept or dropped with it. A chain tracks one
|
|
97
|
+
* innermost transaction, so concurrent nested transactions opened in the same chain are not
|
|
98
|
+
* supported: their events would cross. Every other member passes
|
|
99
|
+
* through, bound to the real store so adapters' private fields keep working. Nothing extra happens
|
|
100
|
+
* while `listening()` is false. Describing or emitting an event never fails a write that committed:
|
|
101
|
+
* errors go to `onError`.
|
|
102
|
+
*/
|
|
103
|
+
function emitKnowledgeChanges(storage, emit, listening, onError, chain) {
|
|
104
|
+
const report = (change) => (chain ? chain.report : emit)(change);
|
|
88
105
|
return new Proxy(storage, { get(target, property) {
|
|
106
|
+
if (property === UNWRAP) return target;
|
|
89
107
|
const value = Reflect.get(target, property, target);
|
|
90
108
|
if (typeof value !== "function") return value;
|
|
109
|
+
if (property === "transaction") return async (operation, ...rest) => {
|
|
110
|
+
let held = [];
|
|
111
|
+
const hold = (change) => void held.push(change);
|
|
112
|
+
const shared = chain ?? { report: hold };
|
|
113
|
+
const outer = shared.report;
|
|
114
|
+
let result;
|
|
115
|
+
try {
|
|
116
|
+
result = await value.call(target, (tx) => {
|
|
117
|
+
held = [];
|
|
118
|
+
shared.report = hold;
|
|
119
|
+
return operation(emitKnowledgeChanges(tx, hold, listening, onError, shared));
|
|
120
|
+
}, ...rest);
|
|
121
|
+
} finally {
|
|
122
|
+
shared.report = outer;
|
|
123
|
+
}
|
|
124
|
+
for (const change of held) try {
|
|
125
|
+
report(change);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
onError(error);
|
|
128
|
+
}
|
|
129
|
+
return result;
|
|
130
|
+
};
|
|
91
131
|
const describe = typeof property === "string" ? WRITES[property] : void 0;
|
|
92
132
|
if (!describe) return value.bind(target);
|
|
93
133
|
const moved = typeof property === "string" ? MOVED_PAGE[property] : void 0;
|
|
@@ -105,7 +145,7 @@ function emitKnowledgeChanges(storage, emit, listening, onError) {
|
|
|
105
145
|
if (!listening()) return result;
|
|
106
146
|
try {
|
|
107
147
|
const change = describe(result, input, fromScopeId);
|
|
108
|
-
if (change)
|
|
148
|
+
if (change) report(change);
|
|
109
149
|
} catch (error) {
|
|
110
150
|
onError(error);
|
|
111
151
|
}
|
|
@@ -631,7 +671,8 @@ function sourceError(error) {
|
|
|
631
671
|
* @experimental
|
|
632
672
|
*/
|
|
633
673
|
async function runKnowledgeImport(options) {
|
|
634
|
-
const { host, budgetMs = 15e5, graceMs = 18e4, maxPasses = 200, bufferSize = 200, heartbeatMs = 3e4, maxRetries = 8, hostCallTimeoutMs = 6e4, retryDelayMs = (attempt) => Math.min(250 * 2 ** attempt, 1e4) } = options;
|
|
674
|
+
const { host, budgetMs = 15e5, graceMs = 18e4, maxPasses = 200, bufferSize = 200, flushAfterMs = 3e4, heartbeatMs = 3e4, maxRetries = 8, hostCallTimeoutMs = 6e4, retryDelayMs = (attempt) => Math.min(250 * 2 ** attempt, 1e4) } = options;
|
|
675
|
+
if (!Number.isFinite(flushAfterMs) || flushAfterMs <= 0 || flushAfterMs > 2 ** 31 - 1) throw new TypeError(`flushAfterMs must be a positive number of milliseconds up to 2147483647, got ${flushAfterMs}`);
|
|
635
676
|
const started = await within(host.startRun(options.bindingId, options.start), hostCallTimeoutMs, () => new KnowledgeImporterHostError("host call timed out"));
|
|
636
677
|
if (started.status === "skipped") return started;
|
|
637
678
|
const { runId, generation } = started;
|
|
@@ -642,7 +683,14 @@ async function runKnowledgeImport(options) {
|
|
|
642
683
|
let state = { ...started.state };
|
|
643
684
|
let buffer = [];
|
|
644
685
|
let stop;
|
|
645
|
-
|
|
686
|
+
/** Armed while the buffer holds ops; sends them once the oldest has waited `flushAfterMs`. */
|
|
687
|
+
let flushTimer;
|
|
688
|
+
const disarm = () => {
|
|
689
|
+
clearTimeout(flushTimer);
|
|
690
|
+
flushTimer = void 0;
|
|
691
|
+
};
|
|
692
|
+
/** Why a flush ended the run. Every later flush is refused, so no cursor is saved past its ops. */
|
|
693
|
+
let flushFailure;
|
|
646
694
|
const controller = new AbortController();
|
|
647
695
|
let deadlineHit;
|
|
648
696
|
/** Settles at the hard deadline; never otherwise. */
|
|
@@ -653,6 +701,7 @@ async function runKnowledgeImport(options) {
|
|
|
653
701
|
const halt = (reason) => {
|
|
654
702
|
if (reason === "stopped") deadlineHit();
|
|
655
703
|
stop ??= new RunStop(reason);
|
|
704
|
+
disarm();
|
|
656
705
|
controller.abort(stop);
|
|
657
706
|
wake();
|
|
658
707
|
};
|
|
@@ -680,6 +729,7 @@ async function runKnowledgeImport(options) {
|
|
|
680
729
|
let flushing = Promise.resolve();
|
|
681
730
|
/** `settle` sends an empty flush, which only runs the host's next settle slice. */
|
|
682
731
|
function flush(staged, settle = false) {
|
|
732
|
+
disarm();
|
|
683
733
|
const ops = buffer;
|
|
684
734
|
buffer = [];
|
|
685
735
|
const next = flushing.then(async () => {
|
|
@@ -690,7 +740,14 @@ async function runKnowledgeImport(options) {
|
|
|
690
740
|
...staged ? { state: staged } : {}
|
|
691
741
|
};
|
|
692
742
|
const seq = lastSeq + 1;
|
|
693
|
-
|
|
743
|
+
let digest;
|
|
744
|
+
try {
|
|
745
|
+
digest = await knowledgeImporterFlushDigest(body);
|
|
746
|
+
} catch (error) {
|
|
747
|
+
flushFailure = { code: "importer_error" };
|
|
748
|
+
halt("flush");
|
|
749
|
+
throw error;
|
|
750
|
+
}
|
|
694
751
|
if (stop) throw stop;
|
|
695
752
|
const request = {
|
|
696
753
|
runId,
|
|
@@ -706,11 +763,11 @@ async function runKnowledgeImport(options) {
|
|
|
706
763
|
refused.push(...receipt.refused.slice(0, MAX_RECEIPT_REFUSALS - refused.length));
|
|
707
764
|
} catch (error) {
|
|
708
765
|
if (!isRetryable(error)) unsettledSeq = void 0;
|
|
709
|
-
|
|
766
|
+
flushFailure = {
|
|
710
767
|
code: "importer_error",
|
|
711
768
|
retryable: isRetryable(error)
|
|
712
769
|
};
|
|
713
|
-
halt("
|
|
770
|
+
halt("flush");
|
|
714
771
|
throw stop;
|
|
715
772
|
}
|
|
716
773
|
unsettledSeq = void 0;
|
|
@@ -727,6 +784,10 @@ async function runKnowledgeImport(options) {
|
|
|
727
784
|
if (stop) throw stop;
|
|
728
785
|
buffer.push(op);
|
|
729
786
|
if (buffer.length >= bufferSize) await flush();
|
|
787
|
+
else if (!flushTimer) {
|
|
788
|
+
flushTimer = setTimeout(() => flush().catch(() => {}), flushAfterMs);
|
|
789
|
+
flushTimer.unref?.();
|
|
790
|
+
}
|
|
730
791
|
};
|
|
731
792
|
const finish = async (request) => {
|
|
732
793
|
const result = await finishRun(host, {
|
|
@@ -844,6 +905,7 @@ async function runKnowledgeImport(options) {
|
|
|
844
905
|
}
|
|
845
906
|
} finally {
|
|
846
907
|
clearInterval(heartbeat);
|
|
908
|
+
disarm();
|
|
847
909
|
}
|
|
848
910
|
if (!stop || stop.reason !== "stopped") await Promise.race([flushing, deadlinePassed]);
|
|
849
911
|
clearTimeout(hardStop);
|
|
@@ -856,7 +918,7 @@ async function runKnowledgeImport(options) {
|
|
|
856
918
|
backlog: false,
|
|
857
919
|
error: { code: "stopped" }
|
|
858
920
|
});
|
|
859
|
-
const error = stop?.reason === "
|
|
921
|
+
const error = stop?.reason === "flush" ? flushFailure : failure;
|
|
860
922
|
if (error) return finish({
|
|
861
923
|
outcome: "failed",
|
|
862
924
|
backlog: false,
|
|
@@ -2382,7 +2444,7 @@ function createLocalKnowledgeImporterHost(writer, options) {
|
|
|
2382
2444
|
});
|
|
2383
2445
|
await reclaimStaleRuns(importers, binding.id);
|
|
2384
2446
|
if (start?.admit) try {
|
|
2385
|
-
await start.admit(tx);
|
|
2447
|
+
await start.admit(unwrapKnowledgeStorage(tx));
|
|
2386
2448
|
} catch (error) {
|
|
2387
2449
|
throw new AdmitRefusal(error);
|
|
2388
2450
|
}
|
|
@@ -4292,8 +4354,8 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
4292
4354
|
}
|
|
4293
4355
|
/**
|
|
4294
4356
|
* Calls `listener` after each committed write made through this instance's store
|
|
4295
|
-
* (`getStorage()`): tool writes, host writes and scope creation. Writes
|
|
4296
|
-
* some other way aren't seen. Events carry ids, not content and not access: anything that relays
|
|
4357
|
+
* (`getStorage()`): tool writes, host writes, importer runs and scope creation. Writes in a
|
|
4358
|
+
* transaction are reported once it commits. Writes made on a store obtained some other way aren't seen. Events carry ids, not content and not access: anything that relays
|
|
4297
4359
|
* them to people must re-read each page under that person's read scope. Returns an unsubscribe.
|
|
4298
4360
|
*/
|
|
4299
4361
|
onChange(listener) {
|
|
@@ -222,8 +222,8 @@ export declare class Knowledge extends MastraBase {
|
|
|
222
222
|
getStorage(): Promise<KnowledgeStorage>;
|
|
223
223
|
/**
|
|
224
224
|
* Calls `listener` after each committed write made through this instance's store
|
|
225
|
-
* (`getStorage()`): tool writes, host writes and scope creation. Writes
|
|
226
|
-
* some other way aren't seen. Events carry ids, not content and not access: anything that relays
|
|
225
|
+
* (`getStorage()`): tool writes, host writes, importer runs and scope creation. Writes in a
|
|
226
|
+
* transaction are reported once it commits. Writes made on a store obtained some other way aren't seen. Events carry ids, not content and not access: anything that relays
|
|
227
227
|
* them to people must re-read each page under that person's read scope. Returns an unsubscribe.
|
|
228
228
|
*/
|
|
229
229
|
onChange(listener: KnowledgeChangeListener): () => void;
|
package/dist/knowledge/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as MastraBase } from "../base-CKLWBhDo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Ai as MAX_KNOWLEDGE_PAGE_LINKS, An as buildKnowledgeInstructions, Bi as knowledgePositionBetween, Bo as augmentWithInit, Ci as KnowledgePageHasChildrenError, Cn as compileKnowledgeScopes, Di as MAX_KNOWLEDGE_PAGE_BODY_LINKS, Dn as strongerKnowledgeRole, Ei as MAX_KNOWLEDGE_NOTE_TOKENS, En as knowledgeScopeAddress, Fi as assertKnowledgePageDescriptionWithinBound, Hi as parseKnowledgePageRef, Ii as canonicalKnowledgeName, Li as knowledgeLinkRefKey, Mi as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Ni as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Oi as MAX_KNOWLEDGE_PAGE_DEPTH, On as decodeKnowledgeScopeId, Pi as assertKnowledgeNoteTextWithinBound, Ri as knowledgePagePath, Si as KnowledgePageDepthError, Sn as KnowledgeDeclarationError, Ti as MAX_KNOWLEDGE_MOVE_PAGES, Tn as knowledgeRunScopes, Ui as KnowledgeInvalidCursorError, Vi as knowledgeScopeReadable, Vo as getStorageSource, _i as assertKnowledgeSchemaCompatible, _n as syncKnowledgePageBodyLinks, _r as knowledgeVisibleScopeKeys, ai as InMemoryKnowledgeStorage, an as addKnowledgeNote, ar as MAX_KNOWLEDGE_SCOPE_TAGS, bi as parseKnowledgeWikilinks, bn as knowledgeReadScopeFor, ci as KnowledgeImportersStorage, cn as removeKnowledgePage, cr as assertKnowledgeRecordTextWithinBound, di as KnowledgeConflictError, dn as KnowledgeSemanticIndex, dr as createKnowledgeNodeCursor, en as PINNED_READ_MEMO_KEY, fi as KnowledgeNotFoundError, fr as expandKnowledgeScope, gi as KnowledgeUnsupportedCapabilityError, gn as reindexKnowledgeLinks, gr as knowledgeSemanticIdempotencyKey, hi as KnowledgeTransactionDeadlineError, hn as refreshKnowledgeLinksTo, hr as knowledgeSemanticDocumentId, in as knowledgeRunPrincipals, ir as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, ji as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, ki as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, kn as encodeKnowledgeScopeId, li as KNOWLEDGE_STORAGE_CONTRACT_VERSION, ln as updateKnowledgeNote, lr as assertKnowledgeScopeWithinCeiling, mi as KnowledgeStorage, mn as knowledgeSubtree, mr as knowledgeScopeKey, nn as buildKnowledgePageTools, oi as KnowledgeImporterBindingConflictError, on as moveKnowledgePage, or as assertKnowledgeCeilingRaised, pi as KnowledgeSchemaResetRequiredError, pn as KnowledgeLinkRefreshIncompleteError, pr as isKnowledgeScopeVisible, rn as KnowledgeRun, rr as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, si as KnowledgeImporterRunStateError, sn as removeKnowledgeNote, sr as assertKnowledgeDescriptionWithinBound, tn as knowledgeDeliveredPins, ui as KNOWLEDGE_STORAGE_SCHEMA_VERSION, un as upsertKnowledgePage, ur as canonicalizeKnowledgeScope, vi as createKnowledgeUlid, vn as updateKnowledgeLinks, vr as parseKnowledgeNodeCursor, wi as KnowledgePageKeyConflictError, wn as knowledgeMemoryScopes, xi as KnowledgeMoveTooLargeError, xn as knowledgeRoleOn, yi as inspectKnowledgeSchema, yn as knowledgeAccessGrants, zi as knowledgePinDepth } from "../run-registry-DdeEBsVW.js";
|
|
3
3
|
import { standardSchemaToJSONSchema, toStandardSchema } from "../schema/index.js";
|
|
4
4
|
import { i as createStandardSchemaIssuesError } from "../tool-Z3bykc1m.js";
|
|
5
5
|
import { randomUUID } from "crypto";
|
|
@@ -78,15 +78,55 @@ const MOVED_PAGE = {
|
|
|
78
78
|
mergePages: (input) => input.sourceId
|
|
79
79
|
};
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* write that committed: errors go to `onError`.
|
|
81
|
+
* A view {@link emitKnowledgeChanges} returned answers this key with the store it wraps, so helpers
|
|
82
|
+
* that find a view by identity (`pgKnowledgeTransactionClient`) can look through it. `Symbol.for`, so
|
|
83
|
+
* a store package reads it without importing a newer core.
|
|
85
84
|
*/
|
|
86
|
-
|
|
85
|
+
const UNWRAP = Symbol.for("mastra.knowledge.unwrap");
|
|
86
|
+
/** The adapter's own store or transaction view under one {@link emitKnowledgeChanges} returned. Writes through it emit nothing. */
|
|
87
|
+
function unwrapKnowledgeStorage(storage) {
|
|
88
|
+
return storage[UNWRAP] ?? storage;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Wraps `storage` so each page-store write in {@link WRITES} calls `emit` after it resolves. Writes
|
|
92
|
+
* on a `transaction` view are held until that transaction commits and dropped if it rolls back; a
|
|
93
|
+
* nested `transaction` hands its writes to the outer one when it succeeds. While a nested
|
|
94
|
+
* transaction is open, writes through any view of that transaction chain belong to the innermost
|
|
95
|
+
* one (they run inside its savepoint), so they are kept or dropped with it. A chain tracks one
|
|
96
|
+
* innermost transaction, so concurrent nested transactions opened in the same chain are not
|
|
97
|
+
* supported: their events would cross. Every other member passes
|
|
98
|
+
* through, bound to the real store so adapters' private fields keep working. Nothing extra happens
|
|
99
|
+
* while `listening()` is false. Describing or emitting an event never fails a write that committed:
|
|
100
|
+
* errors go to `onError`.
|
|
101
|
+
*/
|
|
102
|
+
function emitKnowledgeChanges(storage, emit, listening, onError, chain) {
|
|
103
|
+
const report = (change) => (chain ? chain.report : emit)(change);
|
|
87
104
|
return new Proxy(storage, { get(target, property) {
|
|
105
|
+
if (property === UNWRAP) return target;
|
|
88
106
|
const value = Reflect.get(target, property, target);
|
|
89
107
|
if (typeof value !== "function") return value;
|
|
108
|
+
if (property === "transaction") return async (operation, ...rest) => {
|
|
109
|
+
let held = [];
|
|
110
|
+
const hold = (change) => void held.push(change);
|
|
111
|
+
const shared = chain ?? { report: hold };
|
|
112
|
+
const outer = shared.report;
|
|
113
|
+
let result;
|
|
114
|
+
try {
|
|
115
|
+
result = await value.call(target, (tx) => {
|
|
116
|
+
held = [];
|
|
117
|
+
shared.report = hold;
|
|
118
|
+
return operation(emitKnowledgeChanges(tx, hold, listening, onError, shared));
|
|
119
|
+
}, ...rest);
|
|
120
|
+
} finally {
|
|
121
|
+
shared.report = outer;
|
|
122
|
+
}
|
|
123
|
+
for (const change of held) try {
|
|
124
|
+
report(change);
|
|
125
|
+
} catch (error) {
|
|
126
|
+
onError(error);
|
|
127
|
+
}
|
|
128
|
+
return result;
|
|
129
|
+
};
|
|
90
130
|
const describe = typeof property === "string" ? WRITES[property] : void 0;
|
|
91
131
|
if (!describe) return value.bind(target);
|
|
92
132
|
const moved = typeof property === "string" ? MOVED_PAGE[property] : void 0;
|
|
@@ -104,7 +144,7 @@ function emitKnowledgeChanges(storage, emit, listening, onError) {
|
|
|
104
144
|
if (!listening()) return result;
|
|
105
145
|
try {
|
|
106
146
|
const change = describe(result, input, fromScopeId);
|
|
107
|
-
if (change)
|
|
147
|
+
if (change) report(change);
|
|
108
148
|
} catch (error) {
|
|
109
149
|
onError(error);
|
|
110
150
|
}
|
|
@@ -630,7 +670,8 @@ function sourceError(error) {
|
|
|
630
670
|
* @experimental
|
|
631
671
|
*/
|
|
632
672
|
async function runKnowledgeImport(options) {
|
|
633
|
-
const { host, budgetMs = 15e5, graceMs = 18e4, maxPasses = 200, bufferSize = 200, heartbeatMs = 3e4, maxRetries = 8, hostCallTimeoutMs = 6e4, retryDelayMs = (attempt) => Math.min(250 * 2 ** attempt, 1e4) } = options;
|
|
673
|
+
const { host, budgetMs = 15e5, graceMs = 18e4, maxPasses = 200, bufferSize = 200, flushAfterMs = 3e4, heartbeatMs = 3e4, maxRetries = 8, hostCallTimeoutMs = 6e4, retryDelayMs = (attempt) => Math.min(250 * 2 ** attempt, 1e4) } = options;
|
|
674
|
+
if (!Number.isFinite(flushAfterMs) || flushAfterMs <= 0 || flushAfterMs > 2 ** 31 - 1) throw new TypeError(`flushAfterMs must be a positive number of milliseconds up to 2147483647, got ${flushAfterMs}`);
|
|
634
675
|
const started = await within(host.startRun(options.bindingId, options.start), hostCallTimeoutMs, () => new KnowledgeImporterHostError("host call timed out"));
|
|
635
676
|
if (started.status === "skipped") return started;
|
|
636
677
|
const { runId, generation } = started;
|
|
@@ -641,7 +682,14 @@ async function runKnowledgeImport(options) {
|
|
|
641
682
|
let state = { ...started.state };
|
|
642
683
|
let buffer = [];
|
|
643
684
|
let stop;
|
|
644
|
-
|
|
685
|
+
/** Armed while the buffer holds ops; sends them once the oldest has waited `flushAfterMs`. */
|
|
686
|
+
let flushTimer;
|
|
687
|
+
const disarm = () => {
|
|
688
|
+
clearTimeout(flushTimer);
|
|
689
|
+
flushTimer = void 0;
|
|
690
|
+
};
|
|
691
|
+
/** Why a flush ended the run. Every later flush is refused, so no cursor is saved past its ops. */
|
|
692
|
+
let flushFailure;
|
|
645
693
|
const controller = new AbortController();
|
|
646
694
|
let deadlineHit;
|
|
647
695
|
/** Settles at the hard deadline; never otherwise. */
|
|
@@ -652,6 +700,7 @@ async function runKnowledgeImport(options) {
|
|
|
652
700
|
const halt = (reason) => {
|
|
653
701
|
if (reason === "stopped") deadlineHit();
|
|
654
702
|
stop ??= new RunStop(reason);
|
|
703
|
+
disarm();
|
|
655
704
|
controller.abort(stop);
|
|
656
705
|
wake();
|
|
657
706
|
};
|
|
@@ -679,6 +728,7 @@ async function runKnowledgeImport(options) {
|
|
|
679
728
|
let flushing = Promise.resolve();
|
|
680
729
|
/** `settle` sends an empty flush, which only runs the host's next settle slice. */
|
|
681
730
|
function flush(staged, settle = false) {
|
|
731
|
+
disarm();
|
|
682
732
|
const ops = buffer;
|
|
683
733
|
buffer = [];
|
|
684
734
|
const next = flushing.then(async () => {
|
|
@@ -689,7 +739,14 @@ async function runKnowledgeImport(options) {
|
|
|
689
739
|
...staged ? { state: staged } : {}
|
|
690
740
|
};
|
|
691
741
|
const seq = lastSeq + 1;
|
|
692
|
-
|
|
742
|
+
let digest;
|
|
743
|
+
try {
|
|
744
|
+
digest = await knowledgeImporterFlushDigest(body);
|
|
745
|
+
} catch (error) {
|
|
746
|
+
flushFailure = { code: "importer_error" };
|
|
747
|
+
halt("flush");
|
|
748
|
+
throw error;
|
|
749
|
+
}
|
|
693
750
|
if (stop) throw stop;
|
|
694
751
|
const request = {
|
|
695
752
|
runId,
|
|
@@ -705,11 +762,11 @@ async function runKnowledgeImport(options) {
|
|
|
705
762
|
refused.push(...receipt.refused.slice(0, MAX_RECEIPT_REFUSALS - refused.length));
|
|
706
763
|
} catch (error) {
|
|
707
764
|
if (!isRetryable(error)) unsettledSeq = void 0;
|
|
708
|
-
|
|
765
|
+
flushFailure = {
|
|
709
766
|
code: "importer_error",
|
|
710
767
|
retryable: isRetryable(error)
|
|
711
768
|
};
|
|
712
|
-
halt("
|
|
769
|
+
halt("flush");
|
|
713
770
|
throw stop;
|
|
714
771
|
}
|
|
715
772
|
unsettledSeq = void 0;
|
|
@@ -726,6 +783,10 @@ async function runKnowledgeImport(options) {
|
|
|
726
783
|
if (stop) throw stop;
|
|
727
784
|
buffer.push(op);
|
|
728
785
|
if (buffer.length >= bufferSize) await flush();
|
|
786
|
+
else if (!flushTimer) {
|
|
787
|
+
flushTimer = setTimeout(() => flush().catch(() => {}), flushAfterMs);
|
|
788
|
+
flushTimer.unref?.();
|
|
789
|
+
}
|
|
729
790
|
};
|
|
730
791
|
const finish = async (request) => {
|
|
731
792
|
const result = await finishRun(host, {
|
|
@@ -843,6 +904,7 @@ async function runKnowledgeImport(options) {
|
|
|
843
904
|
}
|
|
844
905
|
} finally {
|
|
845
906
|
clearInterval(heartbeat);
|
|
907
|
+
disarm();
|
|
846
908
|
}
|
|
847
909
|
if (!stop || stop.reason !== "stopped") await Promise.race([flushing, deadlinePassed]);
|
|
848
910
|
clearTimeout(hardStop);
|
|
@@ -855,7 +917,7 @@ async function runKnowledgeImport(options) {
|
|
|
855
917
|
backlog: false,
|
|
856
918
|
error: { code: "stopped" }
|
|
857
919
|
});
|
|
858
|
-
const error = stop?.reason === "
|
|
920
|
+
const error = stop?.reason === "flush" ? flushFailure : failure;
|
|
859
921
|
if (error) return finish({
|
|
860
922
|
outcome: "failed",
|
|
861
923
|
backlog: false,
|
|
@@ -2381,7 +2443,7 @@ function createLocalKnowledgeImporterHost(writer, options) {
|
|
|
2381
2443
|
});
|
|
2382
2444
|
await reclaimStaleRuns(importers, binding.id);
|
|
2383
2445
|
if (start?.admit) try {
|
|
2384
|
-
await start.admit(tx);
|
|
2446
|
+
await start.admit(unwrapKnowledgeStorage(tx));
|
|
2385
2447
|
} catch (error) {
|
|
2386
2448
|
throw new AdmitRefusal(error);
|
|
2387
2449
|
}
|
|
@@ -4291,8 +4353,8 @@ var Knowledge = class extends MastraBase {
|
|
|
4291
4353
|
}
|
|
4292
4354
|
/**
|
|
4293
4355
|
* Calls `listener` after each committed write made through this instance's store
|
|
4294
|
-
* (`getStorage()`): tool writes, host writes and scope creation. Writes
|
|
4295
|
-
* some other way aren't seen. Events carry ids, not content and not access: anything that relays
|
|
4356
|
+
* (`getStorage()`): tool writes, host writes, importer runs and scope creation. Writes in a
|
|
4357
|
+
* transaction are reported once it commits. Writes made on a store obtained some other way aren't seen. Events carry ids, not content and not access: anything that relays
|
|
4296
4358
|
* them to people must re-read each page under that person's read scope. Returns an unsubscribe.
|
|
4297
4359
|
*/
|
|
4298
4360
|
onChange(listener) {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Most estimated tokens of body text a search hit's excerpt shows, before the `…` markers and the
|
|
3
|
+
* heading line. Counted with the same estimator as `knowledge_read`'s budget.
|
|
4
|
+
*/
|
|
5
|
+
export declare const KNOWLEDGE_SNIPPET_TOKENS = 60;
|
|
6
|
+
/**
|
|
7
|
+
* The words `knowledge_search` searches for: keyword search has no quoting, so quote marks become
|
|
8
|
+
* spaces (`"refund" policy` searches `refund policy`).
|
|
9
|
+
*/
|
|
10
|
+
export declare function knowledgeSearchQuery(query: string): string;
|
|
11
|
+
/** A search hit's view of a page body: an excerpt around the matched words, and where the matches are. */
|
|
12
|
+
export interface KnowledgeBodyHit {
|
|
13
|
+
/** An excerpt of {@link KNOWLEDGE_SNIPPET_TOKENS} tokens, every line numbered as `knowledge_read` numbers lines, with the heading it sits under first when that is out of view. */
|
|
14
|
+
snippet: string;
|
|
15
|
+
/** The line (as `knowledge_read` numbers lines) of the match the excerpt is centred on. */
|
|
16
|
+
line: number;
|
|
17
|
+
/** How many lines contain a matched word. */
|
|
18
|
+
matchingLines: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Where `body` matches the query words, or `undefined` when it contains none of them. Uses the same
|
|
22
|
+
* words and the same rule as keyword search (case-insensitive substrings: a body matches exactly
|
|
23
|
+
* when `body.toLowerCase()` contains the word). Each word's first {@link OCCURRENCES_PER_WORD}
|
|
24
|
+
* occurrences anchor candidate windows of {@link KNOWLEDGE_SNIPPET_TOKENS} tokens; the window
|
|
25
|
+
* holding the most distinct words wins, earliest on ties. Lines are counted over the whole body.
|
|
26
|
+
* Cost: a scan per word and one lowercase copy of the body, except for ASCII words in a body with
|
|
27
|
+
* no `İ` or `ſ`, which are matched without lowercasing; offsets are mapped only for actual matches.
|
|
28
|
+
*/
|
|
29
|
+
export declare function knowledgeBodyHit(body: string | undefined, query: string): KnowledgeBodyHit | undefined;
|
|
30
|
+
//# sourceMappingURL=search-snippet.d.ts.map
|
package/dist/llm/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_llm = require("../llm-
|
|
3
|
-
const require_netlify = require("../netlify-
|
|
4
|
-
const require_provider_registry = require("../provider-registry-
|
|
2
|
+
const require_llm = require("../llm-BAiOsNAP.cjs");
|
|
3
|
+
const require_netlify = require("../netlify-D99AnEhW.cjs");
|
|
4
|
+
const require_provider_registry = require("../provider-registry-CO1NVbO5.cjs");
|
|
5
5
|
exports.AzureOpenAIGateway = require_llm.AzureOpenAIGateway;
|
|
6
6
|
exports.EMBEDDING_MODELS = require_llm.EMBEDDING_MODELS;
|
|
7
7
|
exports.GATEWAY_AUTH_HEADER = require_netlify.GATEWAY_AUTH_HEADER;
|
package/dist/llm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { EmbedManyResult as AiEmbedManyResult, EmbedResult as AiEmbedResult, CoreAssistantMessage as AiCoreAssistantMessage, CoreMessage as AiCoreMessage, CoreSystemMessage as AiCoreSystemMessage, CoreToolMessage as AiCoreToolMessage, CoreUserMessage as AiCoreUserMessage, UIMessage, streamText, streamObject, generateText, generateObject, StreamTextOnFinishCallback, StreamObjectOnFinishCallback } from '../_types/@internal_ai-sdk-v4@0.0.
|
|
2
|
-
import type { SystemModelMessage } from '../_types/@internal_ai-sdk-v5@0.0.
|
|
1
|
+
import type { EmbedManyResult as AiEmbedManyResult, EmbedResult as AiEmbedResult, CoreAssistantMessage as AiCoreAssistantMessage, CoreMessage as AiCoreMessage, CoreSystemMessage as AiCoreSystemMessage, CoreToolMessage as AiCoreToolMessage, CoreUserMessage as AiCoreUserMessage, UIMessage, streamText, streamObject, generateText, generateObject, StreamTextOnFinishCallback, StreamObjectOnFinishCallback } from '../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js';
|
|
2
|
+
import type { SystemModelMessage } from '../_types/@internal_ai-sdk-v5@0.0.99/dist/index.js';
|
|
3
3
|
import type { ObservabilityContext } from '../observability/index.js';
|
|
4
4
|
import type { RequestContext } from '../request-context/index.js';
|
|
5
5
|
import type { Run } from '../run/types.js';
|
package/dist/llm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ModelRouterLanguageModel, c as AzureOpenAIGateway, i as resolveModelConfig, l as defaultGateways, n as ModelRouterEmbeddingModel, r as resolveModelAuth, t as EMBEDDING_MODELS } from "../llm-
|
|
2
|
-
import { c as GATEWAY_AUTH_HEADER, f as findGatewayForModel, p as getGatewayId, r as ModelsDevGateway, t as NetlifyGateway, v as MastraModelGateway } from "../netlify-
|
|
3
|
-
import { c as modelSupportsStructuredOutput, f as MastraGateway, i as getProviderConfig, l as modelSupportsTemperature, n as PROVIDER_REGISTRY, r as getModelReasoningOptions, s as modelSupportsAttachments, t as GatewayRegistry, u as parseModelString } from "../provider-registry-
|
|
1
|
+
import { a as ModelRouterLanguageModel, c as AzureOpenAIGateway, i as resolveModelConfig, l as defaultGateways, n as ModelRouterEmbeddingModel, r as resolveModelAuth, t as EMBEDDING_MODELS } from "../llm-B1zaFLYZ.js";
|
|
2
|
+
import { c as GATEWAY_AUTH_HEADER, f as findGatewayForModel, p as getGatewayId, r as ModelsDevGateway, t as NetlifyGateway, v as MastraModelGateway } from "../netlify-CfDXkuLf.js";
|
|
3
|
+
import { c as modelSupportsStructuredOutput, f as MastraGateway, i as getProviderConfig, l as modelSupportsTemperature, n as PROVIDER_REGISTRY, r as getModelReasoningOptions, s as modelSupportsAttachments, t as GatewayRegistry, u as parseModelString } from "../provider-registry-CR385GJ4.js";
|
|
4
4
|
export { AzureOpenAIGateway, EMBEDDING_MODELS, GATEWAY_AUTH_HEADER, GatewayRegistry, MastraGateway, MastraModelGateway, ModelRouterEmbeddingModel, ModelRouterLanguageModel, ModelsDevGateway, NetlifyGateway, PROVIDER_REGISTRY, defaultGateways, findGatewayForModel, getGatewayId, getModelReasoningOptions, getProviderConfig, modelSupportsAttachments, modelSupportsStructuredOutput, modelSupportsTemperature, parseModelString, resolveModelAuth, resolveModelConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LanguageModelV1, LanguageModelV1CallOptions } from '../../../../_types/@internal_ai-sdk-v4@0.0.
|
|
1
|
+
import type { LanguageModelV1, LanguageModelV1CallOptions } from '../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Wrapper class for AI SDK v4 (LanguageModelV1) legacy models.
|
|
4
4
|
*
|
|
@@ -34,8 +34,8 @@ export declare class AISDKV4LegacyLanguageModel implements LanguageModelV1 {
|
|
|
34
34
|
data: string | Uint8Array;
|
|
35
35
|
mimeType: string;
|
|
36
36
|
}>;
|
|
37
|
-
toolCalls?: Array<import("../../../../_types/@internal_ai-sdk-v4@0.0.
|
|
38
|
-
finishReason: import("../../../../_types/@internal_ai-sdk-v4@0.0.
|
|
37
|
+
toolCalls?: Array<import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1FunctionToolCall>;
|
|
38
|
+
finishReason: import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1FinishReason;
|
|
39
39
|
usage: {
|
|
40
40
|
promptTokens: number;
|
|
41
41
|
completionTokens: number;
|
|
@@ -56,13 +56,13 @@ export declare class AISDKV4LegacyLanguageModel implements LanguageModelV1 {
|
|
|
56
56
|
timestamp?: Date;
|
|
57
57
|
modelId?: string;
|
|
58
58
|
};
|
|
59
|
-
warnings?: import("../../../../_types/@internal_ai-sdk-v4@0.0.
|
|
60
|
-
providerMetadata?: import("../../../../_types/@internal_ai-sdk-v4@0.0.
|
|
61
|
-
sources?: import("../../../../_types/@internal_ai-sdk-v4@0.0.
|
|
62
|
-
logprobs?: import("../../../../_types/@internal_ai-sdk-v4@0.0.
|
|
59
|
+
warnings?: import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1CallWarning[];
|
|
60
|
+
providerMetadata?: import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1ProviderMetadata;
|
|
61
|
+
sources?: import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1Source[];
|
|
62
|
+
logprobs?: import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1LogProbs;
|
|
63
63
|
}>;
|
|
64
64
|
doStream(options: LanguageModelV1CallOptions): PromiseLike<{
|
|
65
|
-
stream: ReadableStream<import("../../../../_types/@internal_ai-sdk-v4@0.0.
|
|
65
|
+
stream: ReadableStream<import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1StreamPart>;
|
|
66
66
|
rawCall: {
|
|
67
67
|
rawPrompt: unknown;
|
|
68
68
|
rawSettings: Record<string, unknown>;
|
|
@@ -73,7 +73,7 @@ export declare class AISDKV4LegacyLanguageModel implements LanguageModelV1 {
|
|
|
73
73
|
request?: {
|
|
74
74
|
body?: string;
|
|
75
75
|
};
|
|
76
|
-
warnings?: Array<import("../../../../_types/@internal_ai-sdk-v4@0.0.
|
|
76
|
+
warnings?: Array<import("../../../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js").LanguageModelV1CallWarning>;
|
|
77
77
|
}>;
|
|
78
78
|
/**
|
|
79
79
|
* Custom serialization for tracing/observability spans.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UIMessage, CoreMessage, GenerateTextResult as OriginalGenerateTextResult, GenerateObjectResult as OriginalGenerateObjectResult, StreamTextResult as OriginalStreamTextResult, StreamObjectResult as OriginalStreamObjectResult, generateText, generateObject, streamText, streamObject, StreamObjectOnFinishCallback as OriginalStreamObjectOnFinishCallback, StreamTextOnFinishCallback as OriginalStreamTextOnFinishCallback, StreamTextOnStepFinishCallback as OriginalStreamTextOnStepFinishCallback, GenerateTextOnStepFinishCallback as OriginalGenerateTextOnStepFinishCallback, Tool, ToolSet, DeepPartial } from '../../_types/@internal_ai-sdk-v4@0.0.
|
|
1
|
+
import type { UIMessage, CoreMessage, GenerateTextResult as OriginalGenerateTextResult, GenerateObjectResult as OriginalGenerateObjectResult, StreamTextResult as OriginalStreamTextResult, StreamObjectResult as OriginalStreamObjectResult, generateText, generateObject, streamText, streamObject, StreamObjectOnFinishCallback as OriginalStreamObjectOnFinishCallback, StreamTextOnFinishCallback as OriginalStreamTextOnFinishCallback, StreamTextOnStepFinishCallback as OriginalStreamTextOnStepFinishCallback, GenerateTextOnStepFinishCallback as OriginalGenerateTextOnStepFinishCallback, Tool, ToolSet, DeepPartial } from '../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js';
|
|
2
2
|
import type { JSONSchema7 } from 'json-schema';
|
|
3
3
|
import type { MessageList } from '../../agent/types.js';
|
|
4
4
|
import type { ScorerRunInputForAgent, ScorerRunOutputForAgent } from '../../evals/index.js';
|
|
@@ -7,7 +7,7 @@ import type { OutputProcessorOrWorkflow } from '../../processors/index.js';
|
|
|
7
7
|
import type { RequestContext } from '../../request-context/index.js';
|
|
8
8
|
import type { ZodSchema } from '../../schema/index.js';
|
|
9
9
|
import type { inferOutput, ScoringProperties, TripwireProperties } from './shared.types.js';
|
|
10
|
-
export type { ToolSet } from '../../_types/@internal_ai-sdk-v4@0.0.
|
|
10
|
+
export type { ToolSet } from '../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js';
|
|
11
11
|
type MastraCustomLLMOptions = ObservabilityContext & {
|
|
12
12
|
tools?: Record<string, Tool>;
|
|
13
13
|
threadId?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EmbeddingModel } from '../../_types/@internal_ai-sdk-v5@0.0.
|
|
1
|
+
import type { EmbeddingModel } from '../../_types/@internal_ai-sdk-v5@0.0.99/dist/index.js';
|
|
2
2
|
type EmbeddingModelV2<VALUE> = Exclude<EmbeddingModel<VALUE>, string>;
|
|
3
3
|
import type { OpenAICompatibleConfig } from './shared.types.js';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CallSettings } from '../../_types/@internal_ai-sdk-v5@0.0.
|
|
1
|
+
import type { CallSettings } from '../../_types/@internal_ai-sdk-v5@0.0.99/dist/index.js';
|
|
2
2
|
import type { ReasoningLevel } from '../../loop/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Time-based execution budget for an agent run.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CoreMessage, LanguageModelV1 as LanguageModel } from '../../_types/@internal_ai-sdk-v4@0.0.
|
|
1
|
+
import type { CoreMessage, LanguageModelV1 as LanguageModel } from '../../_types/@internal_ai-sdk-v4@0.0.99/dist/index.js';
|
|
2
2
|
import type { JSONSchema7 } from '@mastra/schema-compat';
|
|
3
3
|
import type { MastraPrimitives } from '../../action/index.js';
|
|
4
4
|
import { MastraBase } from '../../base.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ModelMessage, ToolSet } from '../../_types/@internal_ai-sdk-v5@0.0.
|
|
1
|
+
import type { ModelMessage, ToolSet } from '../../_types/@internal_ai-sdk-v5@0.0.99/dist/index.js';
|
|
2
2
|
import type { MastraPrimitives } from '../../action/index.js';
|
|
3
3
|
import { MastraBase } from '../../base.js';
|
|
4
4
|
import type { Mastra } from '../../mastra/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ToolSet, DeepPartial, streamText, StreamTextOnFinishCallback as OriginalStreamTextOnFinishCallback, StreamTextOnStepFinishCallback as OriginalStreamTextOnStepFinishCallback, ModelMessage, UIMessage } from '../../_types/@internal_ai-sdk-v5@0.0.
|
|
1
|
+
import type { ToolSet, DeepPartial, streamText, StreamTextOnFinishCallback as OriginalStreamTextOnFinishCallback, StreamTextOnStepFinishCallback as OriginalStreamTextOnStepFinishCallback, ModelMessage, UIMessage } from '../../_types/@internal_ai-sdk-v5@0.0.99/dist/index.js';
|
|
2
2
|
import type { JSONSchema7 } from 'json-schema';
|
|
3
3
|
import type { MessageList } from '../../agent/index.js';
|
|
4
4
|
import type { LoopOptions } from '../../loop/types.js';
|