@mastra/core 1.86.0-alpha.8 → 1.86.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_types/@internal_core@0.1.4/dist/knowledge-compat/index.d.ts +363 -0
- package/dist/a2a/index.cjs +1 -1
- package/dist/a2a/index.js +1 -1
- package/dist/agent/agent.d.ts +12 -0
- package/dist/agent/durable/index.cjs +1 -13
- package/dist/agent/durable/index.js +1 -13
- package/dist/agent/durable/preparation.d.ts +2 -0
- package/dist/agent/durable/utils/resolve-runtime.d.ts +9 -0
- package/dist/agent/durable/workflows/durable-loop-builder.d.ts +4 -0
- package/dist/agent/durable/workflows/finalize-run.d.ts +3 -1
- package/dist/agent/durable/workflows/steps/llm-execution.d.ts +1 -0
- package/dist/agent/index.cjs +3 -3
- package/dist/agent/index.js +3 -3
- package/dist/agent/message-list/index.cjs +1 -1
- package/dist/agent/message-list/index.js +1 -1
- package/dist/agent/message-list/message-list.d.ts +11 -0
- package/dist/agent/message-list/utils/provider-compat.d.ts +1 -0
- package/dist/agent/request-context-snapshot.d.ts +1 -1
- package/dist/agent/streams/types.d.ts +10 -0
- package/dist/agent/thread-stream-runtime.d.ts +5 -0
- 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-DEPayioq.cjs → agent-controller-CrQ9OF80.cjs} +7 -7
- package/dist/{agent-controller-B7POPub5.js → agent-controller-SSlKzE6A.js} +7 -7
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-7iftnRK_.cjs → background-tasks-BDrYBis-.cjs} +5 -3
- package/dist/{background-tasks-Cv1ecD6S.js → background-tasks-BnJfNLFo.js} +5 -3
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.js +2 -2
- package/dist/{builder-Gg-xnX_E.js → builder-Cl-0BWkh.js} +2 -2
- package/dist/{builder-DuJBbQDH.cjs → builder-Cw8u3pPl.cjs} +2 -2
- package/dist/capabilities/302ai.json +204 -204
- package/dist/capabilities/abliteratedllm.json +30 -30
- package/dist/capabilities/above.json +21 -21
- package/dist/capabilities/adaption.json +15 -15
- package/dist/capabilities/adzuki.json +24 -24
- package/dist/capabilities/agentrouter.json +9 -9
- package/dist/capabilities/agnes.json +3 -3
- package/dist/capabilities/ai-router.json +8 -8
- package/dist/capabilities/aiand.json +31 -23
- package/dist/capabilities/aigrow.json +14 -14
- package/dist/capabilities/aimlapi.json +144 -147
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +21 -21
- package/dist/capabilities/aki-io.json +10 -10
- package/dist/capabilities/alibaba-cn.json +136 -117
- package/dist/capabilities/alibaba-coding-plan-cn.json +7 -19
- package/dist/capabilities/alibaba-coding-plan.json +7 -19
- package/dist/capabilities/alibaba-token-plan-cn.json +49 -67
- package/dist/capabilities/alibaba-token-plan.json +50 -68
- package/dist/capabilities/alibaba.json +72 -119
- package/dist/capabilities/ambient.json +8 -8
- package/dist/capabilities/amd.json +10 -10
- package/dist/capabilities/anthropic.json +47 -47
- package/dist/capabilities/anyapi.json +19 -19
- package/dist/capabilities/apiko.json +5 -5
- package/dist/capabilities/arcee.json +11 -11
- package/dist/capabilities/augure.json +2 -2
- package/dist/capabilities/auriko.json +23 -23
- package/dist/capabilities/bailing.json +4 -4
- package/dist/capabilities/baseten.json +55 -25
- package/dist/capabilities/bee.json +4 -4
- package/dist/capabilities/berget.json +5 -5
- package/dist/capabilities/bothub.json +17 -17
- package/dist/capabilities/boundless.json +37 -37
- package/dist/capabilities/bumo.json +41 -41
- package/dist/capabilities/byteplus.json +26 -26
- package/dist/capabilities/cerebras.json +4 -4
- package/dist/capabilities/cheapaimodel.json +3 -3
- package/dist/capabilities/cheapest-token.json +30 -30
- package/dist/capabilities/chutes.json +10 -10
- package/dist/capabilities/cline-pass.json +39 -39
- package/dist/capabilities/cloudcode.json +9 -9
- package/dist/capabilities/cloudferro-sherlock.json +4 -4
- package/dist/capabilities/cloudflare-workers-ai.json +33 -33
- package/dist/capabilities/commandcode.json +139 -139
- package/dist/capabilities/concentrate.json +274 -274
- package/dist/capabilities/cortecs.json +108 -108
- package/dist/capabilities/crossmodel.json +189 -189
- package/dist/capabilities/crusoe.json +10 -10
- package/dist/capabilities/daoxe.json +9 -9
- package/dist/capabilities/databricks.json +315 -59
- package/dist/capabilities/deepinfra.json +90 -155
- package/dist/capabilities/deepseek.json +2 -2
- package/dist/capabilities/digitalocean.json +114 -114
- package/dist/capabilities/dothoosh.json +34 -34
- package/dist/capabilities/doubleword.json +28 -28
- package/dist/capabilities/edenai.json +433 -433
- package/dist/capabilities/empiriolabs.json +176 -176
- package/dist/capabilities/engy.json +17 -17
- package/dist/capabilities/entrim.json +6 -6
- package/dist/capabilities/evroc.json +13 -13
- package/dist/capabilities/ezkielyna.json +12 -12
- package/dist/capabilities/fastrouter.json +88 -88
- package/dist/capabilities/fireworks-ai.json +104 -41
- package/dist/capabilities/freemodel.json +20 -20
- package/dist/capabilities/friendli.json +9 -9
- package/dist/capabilities/frogbot.json +93 -93
- package/dist/capabilities/gisoo.json +19 -19
- package/dist/capabilities/gmicloud.json +21 -21
- package/dist/capabilities/google.json +55 -55
- package/dist/capabilities/graphn.json +11 -11
- package/dist/capabilities/greenpt.json +36 -36
- package/dist/capabilities/groq.json +9 -9
- package/dist/capabilities/helicone.json +83 -83
- package/dist/capabilities/hostinger-router.json +13 -13
- package/dist/capabilities/hpc-ai.json +8 -8
- package/dist/capabilities/huawei-maas.json +17 -17
- package/dist/capabilities/hubris.json +28 -28
- package/dist/capabilities/huggingface.json +200 -53
- package/dist/capabilities/humain.json +2 -2
- package/dist/capabilities/hyper.json +26 -26
- package/dist/capabilities/impossibl.json +127 -127
- package/dist/capabilities/inception.json +2 -2
- package/dist/capabilities/inceptron.json +8 -8
- package/dist/capabilities/inco.json +4 -4
- package/dist/capabilities/infer.json +14 -14
- package/dist/capabilities/inference-coop.json +15 -15
- package/dist/capabilities/inferenceapis.json +22 -22
- package/dist/capabilities/inferris.json +3 -3
- package/dist/capabilities/infersia.json +9 -9
- package/dist/capabilities/inferx.json +3 -3
- package/dist/capabilities/infomaniak.json +4 -4
- package/dist/capabilities/io-net.json +5 -5
- package/dist/capabilities/isoquant.json +4 -4
- package/dist/capabilities/iteracompute.json +51 -51
- package/dist/capabilities/jalapeno.json +12 -12
- package/dist/capabilities/jiekou.json +65 -65
- package/dist/capabilities/joingonka.json +4 -4
- package/dist/capabilities/jzstoken.json +54 -54
- package/dist/capabilities/keln.json +21 -28
- package/dist/capabilities/kenari.json +124 -121
- package/dist/capabilities/kilo.json +635 -636
- 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 +13 -13
- package/dist/capabilities/korouter.json +31 -31
- package/dist/capabilities/kunavo.json +9 -9
- package/dist/capabilities/liquid.json +10 -10
- package/dist/capabilities/llmgateway-providers.json +909 -909
- package/dist/capabilities/llmgateway.json +333 -333
- package/dist/capabilities/llmtr.json +19 -19
- package/dist/capabilities/logits.json +2 -2
- package/dist/capabilities/longcat.json +1 -6
- package/dist/capabilities/lowrouter.json +52 -52
- package/dist/capabilities/lyceum.json +7 -7
- package/dist/capabilities/melious.json +16 -16
- package/dist/capabilities/merge-gateway.json +275 -275
- package/dist/capabilities/meta.json +9 -9
- package/dist/capabilities/minimax-cn-coding-plan.json +6 -6
- package/dist/capabilities/minimax-coding-plan.json +6 -6
- package/dist/capabilities/mistral.json +18 -18
- package/dist/capabilities/mixlayer.json +5 -5
- package/dist/capabilities/modal.json +13 -13
- package/dist/capabilities/model-oracle-ai.json +26 -26
- package/dist/capabilities/modelis.json +24 -24
- package/dist/capabilities/modelscope.json +2 -2
- package/dist/capabilities/modular.json +9 -9
- package/dist/capabilities/moneo.json +14 -14
- 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-eu.json +6 -6
- package/dist/capabilities/munito.json +10 -10
- package/dist/capabilities/nan.json +24 -24
- package/dist/capabilities/nano-gpt.json +577 -577
- package/dist/capabilities/nearai.json +82 -82
- package/dist/capabilities/nebius.json +29 -29
- package/dist/capabilities/neon.json +134 -134
- package/dist/capabilities/neuralwatt.json +43 -43
- package/dist/capabilities/nokeep.json +4 -4
- package/dist/capabilities/novita-ai.json +135 -135
- package/dist/capabilities/nvidia.json +38 -38
- package/dist/capabilities/oathbreaker.json +2 -2
- package/dist/capabilities/obscurify.json +26 -26
- package/dist/capabilities/oci.json +5 -5
- package/dist/capabilities/ofox.json +338 -338
- package/dist/capabilities/ollama-cloud.json +55 -55
- package/dist/capabilities/openai.json +48 -48
- package/dist/capabilities/opencode-go.json +81 -81
- package/dist/capabilities/openreason.json +5 -5
- package/dist/capabilities/openrouter.json +548 -563
- package/dist/capabilities/opper.json +23 -23
- package/dist/capabilities/orcarouter.json +212 -212
- package/dist/capabilities/outerlabs.json +30 -30
- package/dist/capabilities/ovhcloud.json +8 -8
- package/dist/capabilities/pareto.json +5 -5
- package/dist/capabilities/pendra.json +4 -4
- package/dist/capabilities/perplexity-agent.json +59 -59
- package/dist/capabilities/perplexity.json +2 -2
- package/dist/capabilities/phala.json +27 -27
- package/dist/capabilities/pioneer.json +24 -24
- package/dist/capabilities/poe.json +136 -136
- package/dist/capabilities/powerspring.json +14 -14
- package/dist/capabilities/primalabs.json +7 -7
- package/dist/capabilities/prime.json +108 -108
- package/dist/capabilities/privatemode-ai.json +12 -12
- package/dist/capabilities/proxystacks.json +6 -6
- 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 +171 -171
- package/dist/capabilities/ruapi.json +20 -20
- package/dist/capabilities/runcrate.json +16 -16
- package/dist/capabilities/runinfra.json +17 -17
- package/dist/capabilities/sakana.json +6 -6
- package/dist/capabilities/sambanova.json +6 -6
- package/dist/capabilities/sandbase.json +16 -16
- package/dist/capabilities/sarvam.json +12 -12
- package/dist/capabilities/scaleway.json +17 -17
- package/dist/capabilities/scnet-token-plan.json +8 -8
- package/dist/capabilities/scx-ai.json +29 -29
- package/dist/capabilities/sensenova.json +14 -14
- package/dist/capabilities/siliconflow-cn.json +61 -61
- package/dist/capabilities/siliconflow.json +57 -57
- package/dist/capabilities/snowflake-cortex.json +24 -24
- package/dist/capabilities/sokkan.json +10 -10
- package/dist/capabilities/sparrowcodes.json +24 -24
- package/dist/capabilities/standardcompute.json +89 -89
- package/dist/capabilities/steadyrouter.json +38 -38
- package/dist/capabilities/stepfun-ai-step-plan.json +7 -7
- package/dist/capabilities/stepfun-ai.json +16 -9
- package/dist/capabilities/stepfun-step-plan.json +16 -9
- package/dist/capabilities/stepfun.json +16 -9
- package/dist/capabilities/stepping-stone.json +18 -18
- package/dist/capabilities/subconscious.json +2 -2
- package/dist/capabilities/synthetic.json +12 -12
- package/dist/capabilities/synthorai.json +26 -26
- package/dist/capabilities/teamorouter.json +21 -21
- package/dist/capabilities/teapot-router.json +9 -9
- package/dist/capabilities/tencent-coding-plan.json +1 -23
- package/dist/capabilities/tencent-token-plan.json +57 -20
- package/dist/capabilities/tencent-tokenhub.json +182 -7
- package/dist/capabilities/tensorx.json +36 -36
- package/dist/capabilities/the-grid-ai.json +29 -29
- package/dist/capabilities/thinkingmachines.json +73 -56
- package/dist/capabilities/tinfoil.json +9 -9
- package/dist/capabilities/toapis.json +3 -3
- package/dist/capabilities/togetherai.json +61 -90
- package/dist/capabilities/tokengo.json +21 -21
- package/dist/capabilities/tokenify.json +9 -9
- package/dist/capabilities/trustedrouter.json +7 -7
- package/dist/capabilities/trustedtokens.json +14 -14
- package/dist/capabilities/umans-ai-coding-plan.json +13 -13
- package/dist/capabilities/umans-ai.json +10 -10
- package/dist/capabilities/uncensuredai.json +4 -4
- package/dist/capabilities/unrestricted.json +4 -4
- package/dist/capabilities/uplinkswitch.json +19 -19
- package/dist/capabilities/upstage.json +6 -6
- package/dist/capabilities/vancine.json +19 -19
- package/dist/capabilities/vercel.json +558 -537
- package/dist/capabilities/vivgrid.json +78 -78
- package/dist/capabilities/volcengine-coding-plan.json +26 -56
- package/dist/capabilities/volcengine.json +57 -62
- package/dist/capabilities/vultr.json +28 -28
- package/dist/capabilities/wafer.ai.json +18 -18
- package/dist/capabilities/wallaby.json +5 -5
- package/dist/capabilities/wally.json +14 -14
- package/dist/capabilities/wandb.json +20 -20
- package/dist/capabilities/watt.json +22 -22
- package/dist/capabilities/xai.json +4 -4
- package/dist/capabilities/xiaomi-token-plan-ams.json +2 -12
- package/dist/capabilities/xiaomi-token-plan-cn.json +2 -12
- package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -12
- package/dist/capabilities/xiaomi.json +3 -25
- package/dist/capabilities/xpersona.json +11 -11
- package/dist/capabilities/xxapi.json +27 -27
- package/dist/capabilities/zai-coding-plan.json +14 -14
- package/dist/capabilities/zai.json +47 -24
- package/dist/capabilities/zenifra.json +24 -24
- package/dist/capabilities/zenmux.json +185 -185
- package/dist/capabilities/zerogpu.json +12 -12
- package/dist/capabilities/zhipuai-coding-plan.json +8 -8
- package/dist/capabilities/zhipuai.json +35 -20
- package/dist/capabilities/zro.json +7 -7
- package/dist/channels/index.cjs +2 -2
- package/dist/channels/index.js +2 -2
- package/dist/{channels-BRVCOutx.js → channels-Cz1y3W6u.js} +1 -1
- package/dist/{channels-MjTA9bFp.cjs → channels-DQg4v_gm.cjs} +1 -1
- package/dist/coding-agent/index.cjs +2 -2
- package/dist/coding-agent/index.js +2 -2
- package/dist/datasets/index.cjs +2 -2
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +3 -2
- package/dist/docs/assets/SOURCE_MAP.json +895 -870
- package/dist/docs/references/docs-harness-background-tasks.md +4 -1
- package/dist/docs/references/docs-knowledge-importers.md +195 -0
- package/dist/docs/references/docs-knowledge-load-your-content.md +1 -1
- package/dist/docs/references/docs-knowledge-overview.md +1 -1
- package/dist/docs/references/docs-sandbox-filesystem.md +1 -1
- package/dist/docs/references/docs-signals-thread-streams.md +1 -1
- package/dist/docs/references/docs-studio-auth.md +54 -7
- package/dist/docs/references/integrations-auth-clerk.md +48 -4
- package/dist/docs/references/reference-agents-agent.md +1 -1
- package/dist/docs/references/reference-agents-durable-agent.md +10 -4
- package/dist/docs/references/reference-auth-clerk.md +21 -1
- package/dist/docs/references/reference-knowledge-knowledge-class.md +11 -4
- package/dist/docs/references/reference-memory-observational-memory.md +2 -2
- package/dist/docs/references/reference-streaming-ChunkType.md +2 -2
- package/dist/docs/references/reference-workspace-local-sandbox.md +2 -0
- package/dist/error/index.cjs +1 -1
- package/dist/error/index.js +1 -1
- package/dist/{error-C9d_24w-.js → error-BLwEXqOK.js} +2 -2
- package/dist/{error-BRQf2ku0.cjs → error-BdEvO8za.cjs} +2 -2
- package/dist/evals/index.cjs +1 -1
- package/dist/evals/index.js +1 -1
- package/dist/evals/scoreTraces/index.cjs +1 -1
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/features/index.cjs +1 -0
- package/dist/features/index.js +1 -0
- package/dist/{filesystem-B5X-5G0x.js → filesystem-B8ad6kAW.js} +1 -1
- package/dist/{filesystem-BDSpwBke.cjs → filesystem-BB5YWXH-.cjs} +1 -1
- package/dist/{filesystem-DzM9pcQ8.js → filesystem-BDHUxbHn.js} +1 -1
- package/dist/{filesystem-B0AZrbj8.cjs → filesystem-BP5yz5LG.cjs} +1 -1
- package/dist/{filesystem-BsdkC311.js → filesystem-B_afSgYk.js} +1 -1
- package/dist/{filesystem-C-cyJfi1.cjs → filesystem-BaOJOc-V.cjs} +1 -1
- package/dist/{filesystem-B3s0WRud.js → filesystem-BhYgU8qg.js} +1 -1
- package/dist/{filesystem-DzfqVTO_.js → filesystem-CLBVmR5j.js} +1 -1
- package/dist/{filesystem-CEbD_77-.cjs → filesystem-Cgxc2a_-.cjs} +1 -1
- package/dist/{filesystem-Cv79mHRk.js → filesystem-ClBOBoDc.js} +1 -1
- package/dist/{filesystem-DsCQiBl2.cjs → filesystem-DVVecqZt.cjs} +1 -1
- package/dist/{filesystem-CUAgLugE.cjs → filesystem-Fpsu7e24.cjs} +1 -1
- package/dist/{filesystem-versioned-Bijb_p9l.js → filesystem-versioned-BL1ojJLo.js} +1 -1
- package/dist/{filesystem-versioned-DZGyPbNC.cjs → filesystem-versioned-BavRtYWJ.cjs} +1 -1
- 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/knowledge/config.d.ts +10 -0
- package/dist/knowledge/host-writes.d.ts +10 -0
- package/dist/knowledge/importers/conformance.d.ts +25 -0
- package/dist/knowledge/importers/define.d.ts +204 -0
- package/dist/knowledge/importers/host.d.ts +143 -0
- package/dist/knowledge/importers/index.d.ts +12 -0
- package/dist/knowledge/importers/local-host.d.ts +106 -0
- package/dist/knowledge/importers/manifest.d.ts +25 -0
- package/dist/knowledge/importers/runner.d.ts +61 -0
- package/dist/knowledge/importers/sink.d.ts +105 -0
- package/dist/knowledge/importers/types.d.ts +144 -0
- package/dist/knowledge/index.cjs +2715 -8
- package/dist/knowledge/index.d.ts +54 -4
- package/dist/knowledge/index.js +2692 -9
- package/dist/knowledge/instructions.d.ts +1 -1
- package/dist/knowledge/links.d.ts +8 -0
- package/dist/knowledge/pinned-state-processor.d.ts +5 -0
- package/dist/knowledge/pinned.d.ts +4 -1
- package/dist/knowledge/scope-runtime.d.ts +10 -0
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/provider-types.generated.d.ts +7705 -7727
- package/dist/{llm-DmUucguC.cjs → llm-8Av3mSjD.cjs} +2 -2
- package/dist/{llm-Djd8Qzi0.js → llm-B5A5cwJr.js} +2 -2
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/{manager-CO_Xz2zR.js → manager-DfWQCJUK.js} +2 -2
- package/dist/{manager-D27PkIPo.cjs → manager-sv35JY-z.cjs} +2 -2
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/mastra/resolve-agent.d.ts +3 -1
- package/dist/{mastra-Ch00nEAJ.js → mastra-CigBrT7X.js} +17 -23
- package/dist/{mastra-qsVWpOTi.cjs → mastra-D4hvfuxX.cjs} +19 -25
- package/dist/memory/index.cjs +3 -3
- package/dist/memory/index.js +3 -3
- package/dist/{message-list-DPXPXvin.cjs → message-list-Cj0Sq_JP.cjs} +63 -8
- package/dist/{message-list-DEuRl82K.js → message-list-KRbg-TnI.js} +63 -8
- package/dist/{model-Do6DTJoj.cjs → model-BK93CMtl.cjs} +1 -1
- package/dist/{model-CW-mfGYA.js → model-CYtXw861.js} +1 -1
- package/dist/{netlify-DU32SDT6.cjs → netlify-BAnn3ouY.cjs} +1 -1
- package/dist/{netlify-DZSAbdve.js → netlify-CuI1ZrwR.js} +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/processor-provider/index.cjs +1 -1
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/abort-signal-scope.d.ts +6 -0
- package/dist/processors/index.cjs +2 -2
- package/dist/processors/index.js +2 -2
- package/dist/{provider-registry-zGezZVsL.cjs → provider-registry-BwuI_IpT.cjs} +21696 -21828
- package/dist/{provider-registry-deA0x-Gd.js → provider-registry-CmQLzLF_.js} +21696 -21828
- package/dist/provider-registry.json +22300 -22417
- package/dist/{registry-generator-VvBfOKAD.js → registry-generator-C17V4WfG.js} +1 -1
- package/dist/{registry-generator-BkQ1AxZn.cjs → registry-generator-C_0ae7Ce.cjs} +1 -1
- package/dist/{rehydrate-DDYFpQsV.cjs → rehydrate-CDQ4dOYj.cjs} +2 -2
- package/dist/{rehydrate-BjLV643n.js → rehydrate-PnaVawGX.js} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/{run-registry-5Suldxz3.cjs → run-registry-BmckDVBk.cjs} +1156 -403
- package/dist/{run-registry-CGRPldLH.js → run-registry-BwEcwYlU.js} +1103 -404
- package/dist/{source-DDwx-87N.cjs → source-BVOi8Xhp.cjs} +1 -1
- package/dist/{source-Did_2XQc.js → source-fNa6u1kH.js} +1 -1
- package/dist/storage/domains/agents/index.cjs +1 -1
- package/dist/storage/domains/agents/index.js +1 -1
- package/dist/storage/domains/knowledge/base.d.ts +67 -0
- package/dist/storage/domains/knowledge/importers-inmemory.d.ts +146 -0
- package/dist/storage/domains/knowledge/importers.d.ts +287 -0
- package/dist/storage/domains/knowledge/index.d.ts +1 -0
- package/dist/storage/domains/knowledge/inmemory.d.ts +11 -0
- package/dist/storage/domains/knowledge/pages-inmemory.d.ts +12 -1
- package/dist/storage/domains/knowledge/pages.d.ts +1 -0
- package/dist/storage/domains/mcp-clients/index.cjs +1 -1
- package/dist/storage/domains/mcp-clients/index.js +1 -1
- package/dist/storage/domains/mcp-servers/index.cjs +1 -1
- package/dist/storage/domains/mcp-servers/index.js +1 -1
- package/dist/storage/domains/prompt-blocks/index.cjs +1 -1
- package/dist/storage/domains/prompt-blocks/index.js +1 -1
- package/dist/storage/domains/scorer-definitions/index.cjs +1 -1
- package/dist/storage/domains/scorer-definitions/index.js +1 -1
- package/dist/storage/domains/skills/index.cjs +1 -1
- package/dist/storage/domains/skills/index.js +1 -1
- package/dist/storage/domains/workspaces/index.cjs +1 -1
- package/dist/storage/domains/workspaces/index.js +1 -1
- package/dist/storage/index.cjs +15 -10
- package/dist/storage/index.js +11 -11
- package/dist/stream/base/output.d.ts +17 -0
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/stream/types.d.ts +5 -2
- package/dist/{stream-Dvy_0o14.cjs → stream-0kdqBOOn.cjs} +64 -9
- package/dist/{stream-Dpwx0whf.js → stream-D1y9GzoD.js} +29 -10
- package/dist/test-utils/llm-mock.cjs +1 -1
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +1 -1
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/{tool-loop-agent-PbWrEj1k.js → tool-loop-agent-BdjWGVIb.js} +4 -4
- package/dist/{tool-loop-agent-UxOv3FoK.cjs → tool-loop-agent-kWaZAT6Q.cjs} +4 -4
- package/dist/{utils-BbMTlyBO.cjs → utils-BKUCaZ12.cjs} +1 -1
- package/dist/{utils-BnNi1BYM.js → utils-GHY3hmLx.js} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-HSBcm96b.js → validate-CB-q-R2F.js} +1 -1
- package/dist/{validate-Skps-cM3.cjs → validate-De92squ7.cjs} +1 -1
- package/dist/vector/index.cjs +2 -2
- package/dist/vector/index.js +2 -2
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/{worker-BNS5A3qP.cjs → worker-BbWPQuPR.cjs} +2 -2
- package/dist/{worker-DehaD4qD.js → worker-C3u_xzY2.js} +2 -2
- package/dist/{worker-BE-0DyKL.cjs → worker-CAKvQj9_.cjs} +2 -2
- package/dist/{worker-BKrKHZzU.js → worker-Kwm8EKcj.js} +2 -2
- package/dist/{workflow-BjUTwaK9.cjs → workflow-CSjXeNcR.cjs} +3 -3
- package/dist/{workflow-Bvw6yDjc.js → workflow-CVmI1Sw-.js} +3 -3
- 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/workspace/filesystem/filesystem.d.ts +5 -0
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/sandbox/local-sandbox.d.ts +16 -7
- package/dist/workspace/sandbox/native-sandbox/types.d.ts +11 -1
- package/dist/{workspace-C05xDH60.js → workspace-DY2Nxiyi.js} +75 -27
- package/dist/{workspace-D1OzzlLw.cjs → workspace-X2RHJZU9.cjs} +75 -27
- package/package.json +3 -3
- package/src/llm/model/provider-types.generated.d.ts +7705 -7727
package/dist/error/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as MastraNonRetryableError, i as MastraError, n as ErrorDomain, o as getErrorFromUnknown, r as MastraBaseError, s as safeParseErrorObject, t as ErrorCategory } from "../error-oh2DLsP2.js";
|
|
2
|
-
import { a as providerErrorReason, i as classifyProviderError, n as toPersistedErrorIdentity, o as providerModelId, r as PROVIDER_CALL_ERROR_NAME, s as providerRequestId } from "../error-
|
|
2
|
+
import { a as providerErrorReason, i as classifyProviderError, n as toPersistedErrorIdentity, o as providerModelId, r as PROVIDER_CALL_ERROR_NAME, s as providerRequestId } from "../error-BLwEXqOK.js";
|
|
3
3
|
export { ErrorCategory, ErrorDomain, MastraBaseError, MastraError, MastraNonRetryableError, PROVIDER_CALL_ERROR_NAME, classifyProviderError, getErrorFromUnknown, providerErrorReason, providerModelId, providerRequestId, safeParseErrorObject, toPersistedErrorIdentity };
|
|
@@ -88,9 +88,9 @@ function describeProviderError(message, error, maxLength) {
|
|
|
88
88
|
const MAX_OBJECT_DEPTH = 4;
|
|
89
89
|
const ENVELOPE_TYPES = /* @__PURE__ */ new Set(["error", "response.failed"]);
|
|
90
90
|
const SYMBOLIC_STATUS = /^[A-Z][A-Z0-9_]+$/;
|
|
91
|
-
const BILLING_EXHAUSTED = /insufficient[_ ]quota|insufficient (?:balance|credits?)|credits? exhausted|credit balance|payment required/i;
|
|
91
|
+
const BILLING_EXHAUSTED = /insufficient[_ ]quota|insufficient (?:balance|credits?)|credits? exhausted|credit balance|no credits remaining|payment required/i;
|
|
92
92
|
const USAGE_CAPPED = /usage (?:limit|cap)|quota (?:exceeded|exhausted|reached)|exceeded (?:your )?current quota|weekly limit|monthly limit/i;
|
|
93
|
-
const RENEWS_WITHIN_THE_HOUR = /per[_ -]?(?:second|minute|hour|min|sec)\b|\b[rt]pm\b/i;
|
|
93
|
+
const RENEWS_WITHIN_THE_HOUR = /per[_ -]?(?:second|minute|hour|min|sec)\b|\b[rt]pm\b|\b(?:retry|try again) in \d+(?:\.\d+)?\s*(?:ms|s|sec|seconds?|m|min|minutes?)\b/i;
|
|
94
94
|
const ACCESS_DENIED_WORDING = /invalid[_ ]api[_ ]key|incorrect api key|api key not valid|authentication[_ ]error|permission_?(?:denied|error)|access[_ ]?denied/i;
|
|
95
95
|
const ACCESS_DENIED_CODE = new RegExp(`${ACCESS_DENIED_WORDING.source}|unauthorized|authentication|forbidden`, "i");
|
|
96
96
|
const CONTEXT_OVERFLOW = [
|
|
@@ -88,9 +88,9 @@ function describeProviderError(message, error, maxLength) {
|
|
|
88
88
|
const MAX_OBJECT_DEPTH = 4;
|
|
89
89
|
const ENVELOPE_TYPES = /* @__PURE__ */ new Set(["error", "response.failed"]);
|
|
90
90
|
const SYMBOLIC_STATUS = /^[A-Z][A-Z0-9_]+$/;
|
|
91
|
-
const BILLING_EXHAUSTED = /insufficient[_ ]quota|insufficient (?:balance|credits?)|credits? exhausted|credit balance|payment required/i;
|
|
91
|
+
const BILLING_EXHAUSTED = /insufficient[_ ]quota|insufficient (?:balance|credits?)|credits? exhausted|credit balance|no credits remaining|payment required/i;
|
|
92
92
|
const USAGE_CAPPED = /usage (?:limit|cap)|quota (?:exceeded|exhausted|reached)|exceeded (?:your )?current quota|weekly limit|monthly limit/i;
|
|
93
|
-
const RENEWS_WITHIN_THE_HOUR = /per[_ -]?(?:second|minute|hour|min|sec)\b|\b[rt]pm\b/i;
|
|
93
|
+
const RENEWS_WITHIN_THE_HOUR = /per[_ -]?(?:second|minute|hour|min|sec)\b|\b[rt]pm\b|\b(?:retry|try again) in \d+(?:\.\d+)?\s*(?:ms|s|sec|seconds?|m|min|minutes?)\b/i;
|
|
94
94
|
const ACCESS_DENIED_WORDING = /invalid[_ ]api[_ ]key|incorrect api key|api key not valid|authentication[_ ]error|permission_?(?:denied|error)|access[_ ]?denied/i;
|
|
95
95
|
const ACCESS_DENIED_CODE = new RegExp(`${ACCESS_DENIED_WORDING.source}|unauthorized|authentication|forbidden`, "i");
|
|
96
96
|
const CONTEXT_OVERFLOW = [
|
package/dist/evals/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_run_registry = require("../run-registry-
|
|
2
|
+
const require_run_registry = require("../run-registry-BmckDVBk.cjs");
|
|
3
3
|
const require_constants = require("../constants-B9ZDvXZ4.cjs");
|
|
4
4
|
const require_collect_tool_mocks = require("../collect-tool-mocks-k9fM6oDl.cjs");
|
|
5
5
|
exports.MastraScorer = require_run_registry.MastraScorer;
|
package/dist/evals/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as ScorerRunError, D as notScorable, Dc as SCORING_PREDICATE_ROOTS, E as isNotScorable, Oc as evaluateScoringPredicate, S as MastraScorer, T as filterRun, _ as runEvals, kc as validateScoringPredicate, w as createScorer, x as createClassifierScorer } from "../run-registry-BwEcwYlU.js";
|
|
2
2
|
import { Ar as scoringEntityTypeSchema, Cr as extractTrajectory, Dr as saveScorePayloadSchema, Er as listScoresResponseSchema, Fr as scoringInputWithExtractStepResultAndScoreAndReasonSchema, Ir as scoringInputWithExtractStepResultSchema, Lr as scoringPromptsSchema, Mr as scoringHookInputSchema, Nr as scoringInputSchema, Or as scoreResultSchema, Pr as scoringInputWithExtractStepResultAndAnalyzeStepResultSchema, Rr as scoringSourceSchema, Tr as extractWorkflowTrajectory, jr as scoringExtractStepResultSchema, kr as scoreRowDataSchema, wr as extractTrajectoryFromTrace, zr as scoringValueSchema } from "../constants-BmdTvEYN.js";
|
|
3
3
|
import { t as collectToolMocks } from "../collect-tool-mocks-3s2BN8o7.js";
|
|
4
4
|
export { MastraScorer, SCORING_PREDICATE_ROOTS, ScorerRunError, collectToolMocks, createClassifierScorer, createScorer, evaluateScoringPredicate, extractTrajectory, extractTrajectoryFromTrace, extractWorkflowTrajectory, filterRun, isNotScorable, listScoresResponseSchema, notScorable, runEvals, saveScorePayloadSchema, scoreResultSchema, scoreRowDataSchema, scoringEntityTypeSchema, scoringExtractStepResultSchema, scoringHookInputSchema, scoringInputSchema, scoringInputWithExtractStepResultAndAnalyzeStepResultSchema, scoringInputWithExtractStepResultAndScoreAndReasonSchema, scoringInputWithExtractStepResultSchema, scoringPromptsSchema, scoringSourceSchema, scoringValueSchema, validateScoringPredicate };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_error = require("../../error-D90lJ6M7.cjs");
|
|
3
3
|
const require_utils = require("../../utils-D-eNsgDM.cjs");
|
|
4
|
-
const require_run_registry = require("../../run-registry-
|
|
4
|
+
const require_run_registry = require("../../run-registry-BmckDVBk.cjs");
|
|
5
5
|
const require_constants = require("../../constants-B9ZDvXZ4.cjs");
|
|
6
6
|
let zod_v4 = require("zod/v4");
|
|
7
7
|
// src/evals/scoreTraces/scoreTraces.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as MastraError, n as ErrorDomain, t as ErrorCategory } from "../../error-oh2DLsP2.js";
|
|
2
2
|
import { i as getEntityTypeForSpan } from "../../utils-DU_pU5SK.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Fs as createStep, Is as createWorkflow } from "../../run-registry-BwEcwYlU.js";
|
|
4
4
|
import { Dr as saveScorePayloadSchema } from "../../constants-BmdTvEYN.js";
|
|
5
5
|
import { z } from "zod/v4";
|
|
6
6
|
// src/evals/scoreTraces/scoreTraces.ts
|
package/dist/features/index.cjs
CHANGED
package/dist/features/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
|
|
2
|
-
import { f as calculatePagination, m as normalizePerPage, o as VersionedStorageDomain, t as FilesystemVersionedHelpers } from "./filesystem-versioned-
|
|
2
|
+
import { f as calculatePagination, m as normalizePerPage, o as VersionedStorageDomain, t as FilesystemVersionedHelpers } from "./filesystem-versioned-BL1ojJLo.js";
|
|
3
3
|
// src/storage/domains/mcp-clients/base.ts
|
|
4
4
|
var MCPClientsStorage = class extends VersionedStorageDomain {
|
|
5
5
|
listKey = "mcpClients";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
|
|
2
|
-
const require_filesystem_versioned = require("./filesystem-versioned-
|
|
2
|
+
const require_filesystem_versioned = require("./filesystem-versioned-BavRtYWJ.cjs");
|
|
3
3
|
// src/storage/domains/mcp-servers/base.ts
|
|
4
4
|
var MCPServersStorage = class extends require_filesystem_versioned.VersionedStorageDomain {
|
|
5
5
|
listKey = "mcpServers";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
|
|
2
|
-
import { f as calculatePagination, m as normalizePerPage, o as VersionedStorageDomain, t as FilesystemVersionedHelpers } from "./filesystem-versioned-
|
|
2
|
+
import { f as calculatePagination, m as normalizePerPage, o as VersionedStorageDomain, t as FilesystemVersionedHelpers } from "./filesystem-versioned-BL1ojJLo.js";
|
|
3
3
|
// src/storage/domains/scorer-definitions/base.ts
|
|
4
4
|
var ScorerDefinitionsStorage = class extends VersionedStorageDomain {
|
|
5
5
|
listKey = "scorerDefinitions";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
|
|
2
|
-
const require_filesystem_versioned = require("./filesystem-versioned-
|
|
2
|
+
const require_filesystem_versioned = require("./filesystem-versioned-BavRtYWJ.cjs");
|
|
3
3
|
// src/storage/domains/skills/base.ts
|
|
4
4
|
var SkillsStorage = class extends require_filesystem_versioned.VersionedStorageDomain {
|
|
5
5
|
listKey = "skills";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
|
|
2
|
-
import { f as calculatePagination, m as normalizePerPage, o as VersionedStorageDomain, t as FilesystemVersionedHelpers } from "./filesystem-versioned-
|
|
2
|
+
import { f as calculatePagination, m as normalizePerPage, o as VersionedStorageDomain, t as FilesystemVersionedHelpers } from "./filesystem-versioned-BL1ojJLo.js";
|
|
3
3
|
// src/storage/domains/skills/base.ts
|
|
4
4
|
var SkillsStorage = class extends VersionedStorageDomain {
|
|
5
5
|
listKey = "skills";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
|
|
2
|
-
const require_filesystem_versioned = require("./filesystem-versioned-
|
|
2
|
+
const require_filesystem_versioned = require("./filesystem-versioned-BavRtYWJ.cjs");
|
|
3
3
|
// src/storage/domains/scorer-definitions/base.ts
|
|
4
4
|
var ScorerDefinitionsStorage = class extends require_filesystem_versioned.VersionedStorageDomain {
|
|
5
5
|
listKey = "scorerDefinitions";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
|
|
2
|
-
import { f as calculatePagination, m as normalizePerPage, o as VersionedStorageDomain, t as FilesystemVersionedHelpers } from "./filesystem-versioned-
|
|
2
|
+
import { f as calculatePagination, m as normalizePerPage, o as VersionedStorageDomain, t as FilesystemVersionedHelpers } from "./filesystem-versioned-BL1ojJLo.js";
|
|
3
3
|
// src/storage/domains/workspaces/base.ts
|
|
4
4
|
var WorkspacesStorage = class extends VersionedStorageDomain {
|
|
5
5
|
listKey = "workspaces";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
|
|
2
|
-
import { f as calculatePagination, m as normalizePerPage, o as VersionedStorageDomain, t as FilesystemVersionedHelpers } from "./filesystem-versioned-
|
|
2
|
+
import { f as calculatePagination, m as normalizePerPage, o as VersionedStorageDomain, t as FilesystemVersionedHelpers } from "./filesystem-versioned-BL1ojJLo.js";
|
|
3
3
|
// src/storage/domains/prompt-blocks/base.ts
|
|
4
4
|
var PromptBlocksStorage = class extends VersionedStorageDomain {
|
|
5
5
|
listKey = "promptBlocks";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
|
|
2
|
-
const require_filesystem_versioned = require("./filesystem-versioned-
|
|
2
|
+
const require_filesystem_versioned = require("./filesystem-versioned-BavRtYWJ.cjs");
|
|
3
3
|
// src/storage/domains/prompt-blocks/base.ts
|
|
4
4
|
var PromptBlocksStorage = class extends require_filesystem_versioned.VersionedStorageDomain {
|
|
5
5
|
listKey = "promptBlocks";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as deepEqual } from "./deep-equal-d1xU02ag.js";
|
|
2
|
-
import { f as calculatePagination, m as normalizePerPage, o as VersionedStorageDomain, t as FilesystemVersionedHelpers } from "./filesystem-versioned-
|
|
2
|
+
import { f as calculatePagination, m as normalizePerPage, o as VersionedStorageDomain, t as FilesystemVersionedHelpers } from "./filesystem-versioned-BL1ojJLo.js";
|
|
3
3
|
// src/storage/domains/mcp-servers/base.ts
|
|
4
4
|
var MCPServersStorage = class extends VersionedStorageDomain {
|
|
5
5
|
listKey = "mcpServers";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
|
|
2
|
-
const require_filesystem_versioned = require("./filesystem-versioned-
|
|
2
|
+
const require_filesystem_versioned = require("./filesystem-versioned-BavRtYWJ.cjs");
|
|
3
3
|
// src/storage/domains/mcp-clients/base.ts
|
|
4
4
|
var MCPClientsStorage = class extends require_filesystem_versioned.VersionedStorageDomain {
|
|
5
5
|
listKey = "mcpClients";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_deep_equal = require("./deep-equal-TMDmByBC.cjs");
|
|
2
|
-
const require_filesystem_versioned = require("./filesystem-versioned-
|
|
2
|
+
const require_filesystem_versioned = require("./filesystem-versioned-BavRtYWJ.cjs");
|
|
3
3
|
// src/storage/domains/workspaces/base.ts
|
|
4
4
|
var WorkspacesStorage = class extends require_filesystem_versioned.VersionedStorageDomain {
|
|
5
5
|
listKey = "workspaces";
|
|
@@ -335,7 +335,7 @@ var MastraCompositeStore = class extends MastraBase {
|
|
|
335
335
|
if (!knowledge) return;
|
|
336
336
|
let initialization = knowledgeInitializations.get(knowledge);
|
|
337
337
|
if (!initialization) {
|
|
338
|
-
initialization = Promise.resolve().then(() => this.init()).then(() => knowledge.init()).catch((error) => {
|
|
338
|
+
initialization = Promise.resolve().then(() => this.init()).then(() => knowledge.init()).then(() => knowledge.importers?.init()).catch((error) => {
|
|
339
339
|
knowledgeInitializations.delete(knowledge);
|
|
340
340
|
throw error;
|
|
341
341
|
});
|
|
@@ -335,7 +335,7 @@ var MastraCompositeStore = class extends require_base.MastraBase {
|
|
|
335
335
|
if (!knowledge) return;
|
|
336
336
|
let initialization = knowledgeInitializations.get(knowledge);
|
|
337
337
|
if (!initialization) {
|
|
338
|
-
initialization = Promise.resolve().then(() => this.init()).then(() => knowledge.init()).catch((error) => {
|
|
338
|
+
initialization = Promise.resolve().then(() => this.init()).then(() => knowledge.init()).then(() => knowledge.importers?.init()).catch((error) => {
|
|
339
339
|
knowledgeInitializations.delete(knowledge);
|
|
340
340
|
throw error;
|
|
341
341
|
});
|
package/dist/harness/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_state_processor = require("../state-processor-kRNZ38Nf.cjs");
|
|
3
3
|
const require_tools = require("../tools-CGF5Ik6j.cjs");
|
|
4
|
-
const require_agent_controller = require("../agent-controller-
|
|
4
|
+
const require_agent_controller = require("../agent-controller-CrQ9OF80.cjs");
|
|
5
5
|
// src/harness/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated Backwards-compatibility entrypoint.
|
package/dist/harness/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as taskCheckTool, h as taskWriteTool, m as taskUpdateTool, o as assignTaskIds, p as taskCompleteTool } from "../state-processor-B9kxpM53.js";
|
|
2
2
|
import { s as askUserTool, t as submitPlanTool } from "../tools-CDfyMpzN.js";
|
|
3
|
-
import { a as Session, c as defaultDisplayState, l as defaultOMProgressState, n as parseSubagentMeta, t as AgentController } from "../agent-controller-
|
|
3
|
+
import { a as Session, c as defaultDisplayState, l as defaultOMProgressState, n as parseSubagentMeta, t as AgentController } from "../agent-controller-SSlKzE6A.js";
|
|
4
4
|
// src/harness/index.ts
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated Backwards-compatibility entrypoint.
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Mastra } from "./mastra-
|
|
1
|
+
export { t as Mastra } from "./mastra-CigBrT7X.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MastraCompositeStore } from '../storage/index.js';
|
|
2
2
|
import type { MastraEmbeddingModel, MastraEmbeddingOptions, MastraVector } from '../vector/index.js';
|
|
3
3
|
import type { KnowledgeScopeDeclarations } from './declarations.js';
|
|
4
|
+
import type { KnowledgeImporterBase } from './importers/index.js';
|
|
4
5
|
import type { KnowledgeInstructionsOption } from './instructions.js';
|
|
5
6
|
/** @experimental Knowledge APIs are experimental and may change without notice. */
|
|
6
7
|
export interface KnowledgeConfig {
|
|
@@ -51,5 +52,14 @@ export interface KnowledgeConfig {
|
|
|
51
52
|
};
|
|
52
53
|
/** Usage instructions added whenever Knowledge attaches tools. */
|
|
53
54
|
instructions?: KnowledgeInstructionsOption;
|
|
55
|
+
/**
|
|
56
|
+
* Importers this app runs against its own Knowledge storage: one instance per configured source,
|
|
57
|
+
* e.g. `[new HelpSpotImporter({ id: 'support', target: 'docs#support', settings, credentials })]`.
|
|
58
|
+
* Run one with `knowledge.importers.run(bindingId)`. Needs a storage adapter with importer
|
|
59
|
+
* support (PostgreSQL, LibSQL, in-memory).
|
|
60
|
+
*
|
|
61
|
+
* @experimental
|
|
62
|
+
*/
|
|
63
|
+
importers?: readonly KnowledgeImporterBase[];
|
|
54
64
|
}
|
|
55
65
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -47,6 +47,16 @@ export interface KnowledgeRemovePageInput {
|
|
|
47
47
|
scope: string;
|
|
48
48
|
path: string;
|
|
49
49
|
author?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The page as the caller read it, by id and version, as in {@link KnowledgeUpsertPageInput}. The
|
|
52
|
+
* call refuses unless `scope#path` holds that page at that version, and deletes it guarded by that
|
|
53
|
+
* version. If the page was edited, removed, or replaced by a new page at the same path, before or
|
|
54
|
+
* after the lookup, it throws `KnowledgeConflictError` and deletes nothing.
|
|
55
|
+
*/
|
|
56
|
+
expected?: {
|
|
57
|
+
id: string;
|
|
58
|
+
version: number;
|
|
59
|
+
};
|
|
50
60
|
}
|
|
51
61
|
/** @experimental */
|
|
52
62
|
export interface KnowledgeMovePageInput {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { KnowledgeImporterHost } from './host.js';
|
|
2
|
+
/**
|
|
3
|
+
* A host under test. Each case calls the factory for a fresh host whose `bindingId` exists, has no
|
|
4
|
+
* run going, and has never been flushed to.
|
|
5
|
+
* @experimental
|
|
6
|
+
*/
|
|
7
|
+
export interface KnowledgeImporterHostConformanceFixture {
|
|
8
|
+
host: KnowledgeImporterHost;
|
|
9
|
+
bindingId: string;
|
|
10
|
+
cleanup?: () => Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
/** @experimental */
|
|
13
|
+
export interface KnowledgeImporterHostConformanceCase {
|
|
14
|
+
name: string;
|
|
15
|
+
run: () => Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The protocol every {@link KnowledgeImporterHost} keeps, as framework-free cases: run each one as a
|
|
19
|
+
* test (`for (const c of importerHostConformance(factory)) it(c.name, c.run)`). A case throws when
|
|
20
|
+
* the host breaks the protocol. It checks only what the runner relies on (sequencing, digests,
|
|
21
|
+
* replay, generations, finish, heartbeat, state), not where pages land.
|
|
22
|
+
* @experimental
|
|
23
|
+
*/
|
|
24
|
+
export declare function importerHostConformance(factory: () => Promise<KnowledgeImporterHostConformanceFixture>): KnowledgeImporterHostConformanceCase[];
|
|
25
|
+
//# sourceMappingURL=conformance.d.ts.map
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import type { InferPublicSchema, PublicSchema } from '../../schema/index.js';
|
|
2
|
+
import type { KnowledgeImporterRunBinding } from './host.js';
|
|
3
|
+
import type { KnowledgeImporterManifest } from './manifest.js';
|
|
4
|
+
import type { KnowledgeImportDeclaration, KnowledgeImportItem } from './types.js';
|
|
5
|
+
/** @experimental */
|
|
6
|
+
export interface KnowledgeImporterCredentialSlot {
|
|
7
|
+
description: string;
|
|
8
|
+
/** Default true: the host never shows or logs the value. */
|
|
9
|
+
secret?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Buffered writes. They reach Knowledge in the next flush: when the buffer fills, when
|
|
13
|
+
* `state.set` is called, and when `import` returns. Await them, so a full buffer can flush.
|
|
14
|
+
*/
|
|
15
|
+
export interface KnowledgeImporterItems {
|
|
16
|
+
upsert(item: KnowledgeImportItem): Promise<void>;
|
|
17
|
+
declare(item: KnowledgeImportDeclaration): Promise<void>;
|
|
18
|
+
/** Only on a positive signal from the source (archived, trashed), never because an item was missing. */
|
|
19
|
+
remove(sourceId: string): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
/** The importer's cursor store. Values are strings; keep them small. */
|
|
22
|
+
export interface KnowledgeImporterStateStore {
|
|
23
|
+
get(key: string): Promise<string | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* Flushes the buffered items together with this value, so a saved cursor never covers items that
|
|
26
|
+
* didn't land. Refused once the run is canceled.
|
|
27
|
+
*/
|
|
28
|
+
set(key: string, value: string): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
/** @experimental */
|
|
31
|
+
export interface KnowledgeImporterContext<TSettings = unknown, TSlot extends string = string> {
|
|
32
|
+
/** Fires on cancel and at the hard deadline. Stop reading the source when it does. */
|
|
33
|
+
signal: AbortSignal;
|
|
34
|
+
binding: {
|
|
35
|
+
id: string;
|
|
36
|
+
target: string;
|
|
37
|
+
};
|
|
38
|
+
settings: TSettings;
|
|
39
|
+
/** Values for the definition's slots, supplied by the host at run start. */
|
|
40
|
+
credentials: Readonly<Record<TSlot, string>>;
|
|
41
|
+
/**
|
|
42
|
+
* The source fetch, bound to `signal`: the runner's `fetch` option, else the platform fetch. A
|
|
43
|
+
* signal passed in `init` is combined with `signal`, so either one aborts the fetch. It
|
|
44
|
+
* doesn't retry; on hosts that keep the credentials it may be a relay. A source's error status
|
|
45
|
+
* comes back as a response; throw `KnowledgeImporterSourceError` to fail the run with it.
|
|
46
|
+
*/
|
|
47
|
+
fetch: (input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
48
|
+
state: KnowledgeImporterStateStore;
|
|
49
|
+
items: KnowledgeImporterItems;
|
|
50
|
+
/**
|
|
51
|
+
* This pass stopped at its own cap with more to read (its cursor is saved). The runner calls
|
|
52
|
+
* `import` again while the run has time, and the host may chain another run when it doesn't.
|
|
53
|
+
*/
|
|
54
|
+
reportBacklog(): void;
|
|
55
|
+
}
|
|
56
|
+
type SettingsOf<TSchema> = TSchema extends PublicSchema<any, any> ? InferPublicSchema<TSchema> : Record<string, never>;
|
|
57
|
+
/** The settings as a binding supplies them: the schema's input side, before defaults. */
|
|
58
|
+
type SettingsInputOf<TSchema> = TSchema extends {
|
|
59
|
+
_input: infer Input;
|
|
60
|
+
} ? Input : TSchema extends {
|
|
61
|
+
'~standard': {
|
|
62
|
+
types?: infer Types;
|
|
63
|
+
};
|
|
64
|
+
} ? NonNullable<Types> extends {
|
|
65
|
+
input: infer Input;
|
|
66
|
+
} ? Input : SettingsOf<TSchema> : SettingsOf<TSchema>;
|
|
67
|
+
/** What the class declares: `KnowledgeImporter({ ... })`. @experimental */
|
|
68
|
+
export interface KnowledgeImporterDefinitionInput<TSchema, TSlot extends string> {
|
|
69
|
+
/** Stable key: bindings and run history name the importer by it. Lowercase letters, digits, `-` and `_`. */
|
|
70
|
+
id: string;
|
|
71
|
+
label: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
/** An http(s) URL or a `data:image/` URI. */
|
|
74
|
+
iconUrl?: string;
|
|
75
|
+
settings?: TSchema;
|
|
76
|
+
credentials?: Record<TSlot, KnowledgeImporterCredentialSlot>;
|
|
77
|
+
}
|
|
78
|
+
/** The checked definition an importer class carries, read without constructing it. @experimental */
|
|
79
|
+
export interface KnowledgeImporterDefinition<TSettings = unknown, TSlot extends string = string> {
|
|
80
|
+
readonly id: string;
|
|
81
|
+
readonly label: string;
|
|
82
|
+
readonly description?: string;
|
|
83
|
+
readonly iconUrl?: string;
|
|
84
|
+
readonly credentials: Readonly<Record<TSlot, Required<KnowledgeImporterCredentialSlot>>>;
|
|
85
|
+
/** Validates a binding's settings against the definition's schema. */
|
|
86
|
+
parseSettings(value: unknown): Promise<TSettings>;
|
|
87
|
+
/** Checks a binding supplies exactly the declared slots, each a non-empty string. */
|
|
88
|
+
checkCredentials(values: Record<string, unknown> | undefined): Readonly<Record<TSlot, string>>;
|
|
89
|
+
toManifest(): KnowledgeImporterManifest;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* One configured source: where the importer writes and with what. Settings are checked against the
|
|
93
|
+
* schema when a run starts; credentials when the instance is constructed.
|
|
94
|
+
*
|
|
95
|
+
* @experimental
|
|
96
|
+
*/
|
|
97
|
+
export type KnowledgeImporterBindingInput<TInput = unknown, TSlot extends string = string> = {
|
|
98
|
+
/** Stable binding id: run history and page ownership key on it. Keep it when you edit the binding. */
|
|
99
|
+
id: string;
|
|
100
|
+
/** Where the pages go, `<scope>#<path>`. */
|
|
101
|
+
target: string;
|
|
102
|
+
} & ({} extends TInput ? {
|
|
103
|
+
settings?: TInput;
|
|
104
|
+
} : {
|
|
105
|
+
settings: TInput;
|
|
106
|
+
}) & ([TSlot] extends [never] ? {
|
|
107
|
+
credentials?: Record<string, never>;
|
|
108
|
+
} : {
|
|
109
|
+
credentials: Record<TSlot, string>;
|
|
110
|
+
});
|
|
111
|
+
/**
|
|
112
|
+
* The base every importer extends through {@link KnowledgeImporter}. An instance is one binding;
|
|
113
|
+
* `import` is called once per pass of a run.
|
|
114
|
+
*
|
|
115
|
+
* @experimental
|
|
116
|
+
*/
|
|
117
|
+
export declare abstract class KnowledgeImporterBase<TSettings = any, TSlot extends string = any, TInput = TSettings> {
|
|
118
|
+
/** What the instance was constructed with, as the host sees a binding. */
|
|
119
|
+
readonly binding: Readonly<KnowledgeImporterRunBinding>;
|
|
120
|
+
constructor(binding: KnowledgeImporterBindingInput<TInput, TSlot>);
|
|
121
|
+
/**
|
|
122
|
+
* Reads the source and writes items through `ctx.items`, saving a cursor with `ctx.state.set`.
|
|
123
|
+
* A full import and an incremental one are the same method: read the cursor, carry on from it.
|
|
124
|
+
*/
|
|
125
|
+
abstract import(ctx: KnowledgeImporterContext<TSettings, TSlot>): Promise<void>;
|
|
126
|
+
}
|
|
127
|
+
/** An importer class: what a host registers and constructs from a stored binding. @experimental */
|
|
128
|
+
export interface KnowledgeImporterClass<TSettings = any, TSlot extends string = any, TInput = any> {
|
|
129
|
+
new (binding: KnowledgeImporterBindingInput<TInput, TSlot>): KnowledgeImporterBase<TSettings, TSlot, TInput>;
|
|
130
|
+
readonly id: string;
|
|
131
|
+
readonly definition: KnowledgeImporterDefinition<TSettings, TSlot>;
|
|
132
|
+
toManifest(): KnowledgeImporterManifest;
|
|
133
|
+
}
|
|
134
|
+
/** A definition, a registry or a binding's settings or credentials are invalid. @experimental */
|
|
135
|
+
export declare class KnowledgeImporterDefinitionError extends Error {
|
|
136
|
+
constructor(message: string);
|
|
137
|
+
}
|
|
138
|
+
/** A binding's settings don't match the importer's schema (run error code `settings_invalid`). @experimental */
|
|
139
|
+
export declare class KnowledgeImporterSettingsError extends KnowledgeImporterDefinitionError {
|
|
140
|
+
readonly errors: {
|
|
141
|
+
path: string[];
|
|
142
|
+
message: string;
|
|
143
|
+
}[];
|
|
144
|
+
constructor(message: string, errors: {
|
|
145
|
+
path: string[];
|
|
146
|
+
message: string;
|
|
147
|
+
}[]);
|
|
148
|
+
}
|
|
149
|
+
/** A binding is missing a credential or supplies an undeclared one (run error code `credential_missing`). @experimental */
|
|
150
|
+
export declare class KnowledgeImporterCredentialsError extends KnowledgeImporterDefinitionError {
|
|
151
|
+
constructor(message: string);
|
|
152
|
+
}
|
|
153
|
+
/** The source answered with an error status. The runner maps the status to the run's error code. @experimental */
|
|
154
|
+
export declare class KnowledgeImporterSourceError extends Error {
|
|
155
|
+
readonly status: number;
|
|
156
|
+
constructor(message: string, status: number);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* The host failed, not the source: a fetch proxy or relay, or a remote host's flush, heartbeat or
|
|
160
|
+
* finish. Never a sign an item is gone. `status` is the HTTP status when there was a response;
|
|
161
|
+
* absent for a network error. @experimental
|
|
162
|
+
*/
|
|
163
|
+
export declare class KnowledgeImporterHostError extends Error {
|
|
164
|
+
readonly status?: number | undefined;
|
|
165
|
+
constructor(message: string, status?: number | undefined);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* The base class of an importer: code that reads a source and writes it into Knowledge as items.
|
|
169
|
+
* The class declares what it is (id, label, settings schema, credential slots); each instance is
|
|
170
|
+
* one binding (where it writes, with which settings and credentials).
|
|
171
|
+
*
|
|
172
|
+
* ```ts
|
|
173
|
+
* class HelpSpotImporter extends KnowledgeImporter({
|
|
174
|
+
* id: 'helpspot',
|
|
175
|
+
* label: 'HelpSpot',
|
|
176
|
+
* settings: z.object({ baseUrl: z.url() }),
|
|
177
|
+
* credentials: { apiKey: { description: 'HelpSpot API token' } },
|
|
178
|
+
* }) {
|
|
179
|
+
* async import(ctx) {
|
|
180
|
+
* // read ctx.state.get('cursor'), ctx.items.upsert(...), ctx.state.set('cursor', ...)
|
|
181
|
+
* }
|
|
182
|
+
* }
|
|
183
|
+
*
|
|
184
|
+
* new HelpSpotImporter({ id: 'support', target: 'docs#support', settings: { baseUrl }, credentials: { apiKey } });
|
|
185
|
+
* ```
|
|
186
|
+
*
|
|
187
|
+
* Invalid declarations throw `KnowledgeImporterDefinitionError` here, not at the first run.
|
|
188
|
+
*
|
|
189
|
+
* @experimental
|
|
190
|
+
*/
|
|
191
|
+
export declare function KnowledgeImporter<TSchema extends PublicSchema<any, any> | undefined = undefined, TSlot extends string = never>(input: KnowledgeImporterDefinitionInput<TSchema, TSlot>): (abstract new (binding: KnowledgeImporterBindingInput<SettingsInputOf<TSchema>, TSlot>) => KnowledgeImporterBase<SettingsOf<TSchema>, TSlot, SettingsInputOf<TSchema>>) & {
|
|
192
|
+
readonly id: string;
|
|
193
|
+
readonly definition: KnowledgeImporterDefinition<SettingsOf<TSchema>, TSlot>;
|
|
194
|
+
toManifest(): KnowledgeImporterManifest;
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* Indexes importer classes by id, refusing two different classes with the same id. A host uses it
|
|
198
|
+
* to construct the instance a stored binding names.
|
|
199
|
+
*
|
|
200
|
+
* @experimental
|
|
201
|
+
*/
|
|
202
|
+
export declare function knowledgeImporterRegistry(importers: readonly KnowledgeImporterClass[]): ReadonlyMap<string, KnowledgeImporterClass>;
|
|
203
|
+
export {};
|
|
204
|
+
//# sourceMappingURL=define.d.ts.map
|