@mastra/core 1.87.0-alpha.7 → 1.87.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/agent/agent.d.ts +3 -1
- package/dist/agent/durable/index.cjs +1 -1
- package/dist/agent/durable/index.js +1 -1
- package/dist/agent/index.cjs +3 -2
- package/dist/agent/index.d.ts +2 -0
- package/dist/agent/index.js +3 -3
- package/dist/agent/merge-persona.d.ts +15 -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 +2 -2
- package/dist/agent-controller/index.js +2 -2
- package/dist/{agent-controller-QGBVBDRi.cjs → agent-controller-ZCQy7cOG.cjs} +7 -7
- package/dist/{agent-controller-GM-2_7C2.js → agent-controller-fazk0U_b.js} +7 -7
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-C-3AqSKL.cjs → background-tasks-B63welNM.cjs} +1 -1
- package/dist/{background-tasks-lHCVpHbm.js → background-tasks-DlLB_pJR.js} +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.js +2 -2
- package/dist/{builder-C9UYOrxv.js → builder-D82iR2oQ.js} +2 -2
- package/dist/{builder-mGGr3IhH.cjs → builder-DCaL4xmU.cjs} +2 -2
- package/dist/capabilities/302ai.json +196 -196
- package/dist/capabilities/abliteratedllm.json +43 -34
- package/dist/capabilities/abliteration-ai.json +9 -9
- package/dist/capabilities/above.json +18 -18
- package/dist/capabilities/adaption.json +12 -12
- package/dist/capabilities/adzuki.json +28 -28
- package/dist/capabilities/agentrouter.json +10 -10
- package/dist/capabilities/agnes.json +2 -2
- package/dist/capabilities/ai-router.json +6 -6
- package/dist/capabilities/aiand.json +20 -20
- package/dist/capabilities/aigrow.json +10 -10
- package/dist/capabilities/aimlapi.json +143 -143
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +23 -23
- package/dist/capabilities/aki-io.json +14 -14
- package/dist/capabilities/alibaba-cn.json +100 -94
- package/dist/capabilities/alibaba-coding-plan-cn.json +4 -4
- package/dist/capabilities/alibaba-coding-plan.json +4 -4
- package/dist/capabilities/alibaba-token-plan-cn.json +47 -47
- package/dist/capabilities/alibaba-token-plan.json +47 -47
- package/dist/capabilities/alibaba.json +63 -63
- package/dist/capabilities/ambient.json +14 -14
- package/dist/capabilities/amd.json +10 -10
- package/dist/capabilities/anthropic.json +42 -42
- package/dist/capabilities/anyapi.json +47 -47
- package/dist/capabilities/arcee.json +10 -10
- package/dist/capabilities/augure.json +5 -5
- package/dist/capabilities/auriko.json +21 -21
- package/dist/capabilities/bailing.json +4 -4
- package/dist/capabilities/baseten.json +34 -34
- package/dist/capabilities/bee.json +3 -3
- package/dist/capabilities/berget.json +18 -5
- package/dist/capabilities/bothub.json +15 -15
- package/dist/capabilities/boundless.json +35 -35
- package/dist/capabilities/bumo.json +43 -43
- package/dist/capabilities/byteplus.json +29 -29
- package/dist/capabilities/cheapaimodel.json +6 -6
- package/dist/capabilities/cheapest-token.json +28 -28
- package/dist/capabilities/chutes.json +9 -9
- package/dist/capabilities/clarifai.json +2 -2
- package/dist/capabilities/claudinio.json +10 -1
- package/dist/capabilities/cline-pass.json +40 -40
- package/dist/capabilities/cloudcode.json +10 -17
- package/dist/capabilities/cloudferro-sherlock.json +4 -4
- package/dist/capabilities/cloudflare-workers-ai.json +20 -20
- package/dist/capabilities/commandcode.json +148 -148
- package/dist/capabilities/concentrate.json +268 -268
- package/dist/capabilities/cortecs.json +104 -104
- package/dist/capabilities/crossmodel.json +172 -172
- package/dist/capabilities/crusoe.json +35 -6
- package/dist/capabilities/daoxe.json +8 -8
- package/dist/capabilities/databricks.json +126 -126
- package/dist/capabilities/deepinfra.json +105 -105
- package/dist/capabilities/deepseek.json +4 -4
- package/dist/capabilities/digitalocean.json +115 -115
- package/dist/capabilities/dothoosh.json +32 -32
- package/dist/capabilities/doubleword.json +26 -26
- package/dist/capabilities/edenai.json +281 -277
- package/dist/capabilities/empiriolabs.json +164 -164
- package/dist/capabilities/engy.json +10 -10
- package/dist/capabilities/entrim.json +5 -5
- package/dist/capabilities/evroc.json +13 -13
- package/dist/capabilities/ezkielyna.json +8 -8
- package/dist/capabilities/fastrouter.json +88 -88
- package/dist/capabilities/fireworks-ai.json +92 -92
- package/dist/capabilities/fortytwo.json +9 -3
- package/dist/capabilities/freemodel.json +18 -18
- package/dist/capabilities/friendli.json +8 -8
- package/dist/capabilities/frogbot.json +100 -100
- package/dist/capabilities/gisoo.json +20 -20
- package/dist/capabilities/gmicloud.json +16 -16
- package/dist/capabilities/google.json +48 -48
- package/dist/capabilities/graphn.json +13 -13
- package/dist/capabilities/greenpt.json +37 -37
- package/dist/capabilities/groq.json +2 -2
- package/dist/capabilities/helicone.json +78 -78
- package/dist/capabilities/hetzner.json +35 -3
- package/dist/capabilities/hostinger-router.json +14 -14
- package/dist/capabilities/hpc-ai.json +11 -11
- package/dist/capabilities/huawei-maas.json +14 -14
- package/dist/capabilities/hubris.json +31 -31
- package/dist/capabilities/huggingface.json +84 -174
- package/dist/capabilities/humain.json +2 -2
- package/dist/capabilities/hyper.json +19 -19
- package/dist/capabilities/impossibl.json +171 -171
- package/dist/capabilities/inception.json +3 -3
- package/dist/capabilities/inceptron.json +4 -4
- package/dist/capabilities/inco.json +4 -4
- package/dist/capabilities/infer.json +19 -19
- package/dist/capabilities/inferall.json +11 -11
- package/dist/capabilities/inference-coop.json +15 -15
- package/dist/capabilities/inferenceapis.json +24 -24
- package/dist/capabilities/inferris.json +4 -4
- package/dist/capabilities/infersia.json +13 -13
- package/dist/capabilities/inferx.json +2 -2
- package/dist/capabilities/infomaniak.json +2 -2
- package/dist/capabilities/io-net.json +4 -4
- package/dist/capabilities/isoquant.json +4 -4
- package/dist/capabilities/iteracompute.json +56 -56
- package/dist/capabilities/jad-ai.json +3 -3
- package/dist/capabilities/jalapeno.json +10 -10
- package/dist/capabilities/jiekou.json +64 -64
- package/dist/capabilities/jzstoken.json +50 -51
- package/dist/capabilities/keln.json +22 -22
- package/dist/capabilities/kenari.json +123 -123
- package/dist/capabilities/kilo.json +601 -601
- 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 +6 -6
- package/dist/capabilities/klavo.json +22 -22
- package/dist/capabilities/korouter.json +34 -34
- package/dist/capabilities/kunavo.json +7 -7
- package/dist/capabilities/liquid.json +12 -12
- package/dist/capabilities/llmgateway-providers.json +934 -934
- package/dist/capabilities/llmgateway.json +334 -334
- package/dist/capabilities/llmtr.json +34 -34
- package/dist/capabilities/lowrouter.json +58 -58
- package/dist/capabilities/lyceum.json +18 -10
- package/dist/capabilities/melious.json +17 -17
- package/dist/capabilities/merge-gateway.json +255 -254
- package/dist/capabilities/meta.json +10 -10
- package/dist/capabilities/minimax-cn-coding-plan.json +5 -5
- package/dist/capabilities/minimax-cn.json +5 -5
- package/dist/capabilities/minimax-coding-plan.json +5 -5
- package/dist/capabilities/minimax.json +5 -5
- package/dist/capabilities/mistral.json +22 -22
- package/dist/capabilities/mixlayer.json +2 -2
- package/dist/capabilities/modal.json +12 -12
- package/dist/capabilities/model-oracle-ai.json +26 -26
- package/dist/capabilities/modelis.json +17 -17
- package/dist/capabilities/modelscope.json +2 -2
- package/dist/capabilities/modular.json +30 -8
- 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 +18 -18
- package/dist/capabilities/munito-eu.json +6 -6
- package/dist/capabilities/munito.json +8 -8
- package/dist/capabilities/nan.json +23 -23
- package/dist/capabilities/nano-gpt.json +565 -571
- package/dist/capabilities/nearai.json +93 -93
- package/dist/capabilities/nebius.json +32 -32
- package/dist/capabilities/neon.json +129 -129
- package/dist/capabilities/neuralwatt.json +42 -42
- package/dist/capabilities/nokeep.json +5 -5
- package/dist/capabilities/novita-ai.json +135 -135
- package/dist/capabilities/nvidia.json +49 -32
- package/dist/capabilities/oathbreaker.json +26 -3
- package/dist/capabilities/obscurify.json +27 -27
- package/dist/capabilities/oci.json +6 -6
- package/dist/capabilities/ofox.json +302 -302
- package/dist/capabilities/ollama-cloud.json +59 -59
- package/dist/capabilities/openai.json +58 -58
- package/dist/capabilities/opencode-go.json +78 -78
- package/dist/capabilities/openreason.json +5 -5
- package/dist/capabilities/openrouter.json +526 -526
- package/dist/capabilities/opper.json +27 -27
- package/dist/capabilities/orcarouter.json +243 -243
- package/dist/capabilities/outerlabs.json +32 -32
- package/dist/capabilities/ovhcloud.json +21 -21
- package/dist/capabilities/pareto.json +6 -6
- package/dist/capabilities/perplexity-agent.json +57 -57
- package/dist/capabilities/perplexity.json +2 -2
- package/dist/capabilities/phala.json +34 -34
- package/dist/capabilities/pioneer.json +34 -34
- package/dist/capabilities/poe.json +129 -129
- package/dist/capabilities/poolside.json +3 -3
- package/dist/capabilities/powerspring.json +12 -12
- package/dist/capabilities/primalabs.json +10 -10
- package/dist/capabilities/prime.json +113 -113
- package/dist/capabilities/privatemode-ai.json +14 -14
- package/dist/capabilities/proxystacks.json +7 -7
- package/dist/capabilities/qiniu-ai.json +14 -14
- package/dist/capabilities/refuseless.json +6 -6
- package/dist/capabilities/regolo-ai.json +10 -10
- package/dist/capabilities/requesty.json +371 -167
- package/dist/capabilities/ruapi.json +33 -17
- package/dist/capabilities/runcrate.json +10 -10
- package/dist/capabilities/runinfra.json +14 -14
- package/dist/capabilities/sakana.json +7 -7
- package/dist/capabilities/sambanova.json +9 -9
- package/dist/capabilities/sandbase.json +18 -18
- package/dist/capabilities/sarvam.json +11 -11
- package/dist/capabilities/scaleway.json +19 -19
- package/dist/capabilities/scnet-token-plan.json +11 -11
- package/dist/capabilities/scx-ai.json +27 -27
- package/dist/capabilities/sensenova.json +13 -13
- package/dist/capabilities/siliconflow-cn.json +55 -55
- package/dist/capabilities/siliconflow.json +63 -63
- package/dist/capabilities/snowflake-cortex.json +25 -25
- package/dist/capabilities/sokkan.json +2 -2
- package/dist/capabilities/sparrowcodes.json +22 -22
- package/dist/capabilities/standardcompute.json +97 -97
- package/dist/capabilities/steadyrouter.json +36 -36
- package/dist/capabilities/stepfun-ai-step-plan.json +4 -4
- package/dist/capabilities/stepfun-ai.json +4 -4
- package/dist/capabilities/stepfun-step-plan.json +4 -4
- package/dist/capabilities/stepfun.json +4 -4
- package/dist/capabilities/stepping-stone.json +19 -19
- package/dist/capabilities/superbot-gg.json +4 -4
- package/dist/capabilities/synthetic.json +9 -9
- package/dist/capabilities/synthorai.json +26 -26
- package/dist/capabilities/teamorouter.json +16 -16
- package/dist/capabilities/teapot-router.json +14 -14
- package/dist/capabilities/tencent-token-plan-intl.json +21 -21
- package/dist/capabilities/tencent-token-plan.json +42 -42
- package/dist/capabilities/tencent-tokenhub.json +49 -49
- package/dist/capabilities/tensorx.json +48 -48
- package/dist/capabilities/tenstorrent.json +8 -8
- package/dist/capabilities/the-grid-ai.json +34 -34
- package/dist/capabilities/thinkingmachines.json +78 -78
- package/dist/capabilities/tinfoil.json +13 -13
- package/dist/capabilities/togetherai.json +44 -44
- package/dist/capabilities/tokengo.json +25 -25
- package/dist/capabilities/tokenify.json +9 -9
- package/dist/capabilities/tokenwatt.json +10 -2
- package/dist/capabilities/trustedrouter.json +7 -7
- package/dist/capabilities/trustedtokens.json +19 -19
- package/dist/capabilities/umans-ai-coding-plan.json +14 -14
- package/dist/capabilities/umans-ai.json +10 -10
- package/dist/capabilities/unrestricted.json +6 -6
- package/dist/capabilities/uplinkswitch.json +20 -20
- package/dist/capabilities/upstage.json +6 -6
- package/dist/capabilities/vancine.json +25 -25
- package/dist/capabilities/vercel.json +552 -551
- package/dist/capabilities/vivgrid.json +74 -65
- package/dist/capabilities/volcengine-coding-plan.json +27 -27
- package/dist/capabilities/volcengine.json +29 -28
- package/dist/capabilities/vultr.json +25 -25
- package/dist/capabilities/wafer.ai.json +17 -17
- package/dist/capabilities/wallaby.json +4 -4
- package/dist/capabilities/wally.json +14 -14
- package/dist/capabilities/wandb.json +19 -19
- package/dist/capabilities/watt.json +25 -25
- package/dist/capabilities/xai.json +6 -6
- package/dist/capabilities/xiaomi-token-plan-ams.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-cn.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -2
- package/dist/capabilities/xiaomi.json +2 -2
- package/dist/capabilities/xpersona.json +12 -12
- package/dist/capabilities/xxapi.json +27 -27
- package/dist/capabilities/zai-coding-plan.json +12 -12
- package/dist/capabilities/zai.json +32 -32
- package/dist/capabilities/zenifra.json +27 -27
- package/dist/capabilities/zenmux.json +190 -190
- package/dist/capabilities/zerogpu.json +14 -14
- package/dist/capabilities/zhipuai-coding-plan.json +8 -8
- package/dist/capabilities/zhipuai.json +31 -31
- package/dist/capabilities/zro.json +6 -6
- package/dist/channels/index.cjs +2 -2
- package/dist/channels/index.js +2 -2
- package/dist/{channels-dBz-1Oy7.cjs → channels-BXZbY7TL.cjs} +1 -1
- package/dist/{channels-CyJ0PpSg.js → channels-Bs8wDPDl.js} +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 +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +722 -707
- package/dist/docs/references/docs-agents-code-mode.md +20 -0
- package/dist/docs/references/docs-browser.md +3 -1
- package/dist/docs/references/docs-knowledge-agents-and-tools.md +2 -0
- package/dist/docs/references/integrations.md +1 -0
- package/dist/docs/references/reference-processors-tool-search-processor.md +3 -3
- package/dist/docs/references/reference-tools-create-code-mode.md +22 -0
- 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/harness/index.cjs +2 -2
- package/dist/harness/index.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/knowledge/agent-scopes.d.ts +17 -0
- package/dist/knowledge/declarations.d.ts +2 -0
- package/dist/knowledge/held-scopes-state-processor.d.ts +50 -0
- package/dist/knowledge/importers/types.d.ts +2 -0
- package/dist/knowledge/index.cjs +65 -15
- package/dist/knowledge/index.d.ts +6 -0
- package/dist/knowledge/index.js +64 -16
- package/dist/knowledge/page-tools.d.ts +14 -0
- package/dist/knowledge/run.d.ts +1 -0
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/provider-types.generated.d.ts +8041 -8014
- package/dist/{llm-Du8yTHDN.js → llm-9xmy8HlF.js} +2 -2
- package/dist/{llm-BiSuGioB.cjs → llm-ypGNjEom.cjs} +2 -2
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/{manager-CiKAT1GP.js → manager-B-QrBhhd.js} +2 -2
- package/dist/{manager-Bd8By72w.cjs → manager-CYXV5_vY.cjs} +2 -2
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-GjJdwKF7.js → mastra-DPSwJ5ae.js} +16 -16
- package/dist/{mastra-BD1Hqrb2.cjs → mastra-zszeli0N.cjs} +16 -16
- package/dist/memory/index.cjs +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/{model-Bvfq1yB9.js → model-UYJb8Zel.js} +1 -1
- package/dist/{model-CI05YYPx.cjs → model-WLujr8OR.cjs} +1 -1
- package/dist/{netlify-DQ-v2Run.js → netlify-DTWAZGpA.js} +1 -1
- package/dist/{netlify-DkSS4nuo.cjs → netlify-wZafLKoe.cjs} +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/index.cjs +2 -2
- package/dist/processors/index.js +2 -2
- package/dist/processors/processors/tool-search.d.ts +2 -2
- package/dist/{provider-registry-K3a83H9-.cjs → provider-registry-BvpUdOiq.cjs} +21504 -21437
- package/dist/{provider-registry-D7D3C2RI.js → provider-registry-COT79RLh.js} +21504 -21437
- package/dist/provider-registry.json +22003 -21942
- package/dist/{registry-generator-BgHaZqDZ.js → registry-generator-BKjTPD6B.js} +1 -1
- package/dist/{registry-generator-RfPwMlUl.cjs → registry-generator-Dn1Tuacv.cjs} +1 -1
- package/dist/{rehydrate-C4-5kM6Z.js → rehydrate-BK1v65H7.js} +2 -2
- package/dist/{rehydrate-DwfzaTOg.cjs → rehydrate-C0xrJUBu.cjs} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/{run-registry-Bj_lW9M3.js → run-registry-DKiudqVU.js} +351 -36
- package/dist/{run-registry-BJa47sa2.cjs → run-registry-DX_EyboB.cjs} +374 -35
- package/dist/storage/index.cjs +2 -2
- package/dist/storage/index.js +2 -2
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-DaIpS6ky.js → stream-B4LzC6Sz.js} +1 -1
- package/dist/{stream-CWE0h7Yc.cjs → stream-BmtBm_-L.cjs} +1 -1
- 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-BGBhn5xS.cjs → tool-loop-agent-BIbw3quM.cjs} +3 -3
- package/dist/{tool-loop-agent-B12lpXBl.js → tool-loop-agent-CR2AgmkF.js} +3 -3
- package/dist/tools/code-mode/index.d.ts +2 -0
- package/dist/tools/code-mode/log-collector.d.ts +49 -0
- package/dist/tools/code-mode/types.d.ts +71 -0
- package/dist/tools/index.cjs +3 -1
- package/dist/tools/index.js +2 -2
- package/dist/{tools-n9lqzDNe.cjs → tools-BEYxowf0.cjs} +316 -30
- package/dist/{tools-DDfA_ES4.js → tools-tPy2FwMI.js} +305 -31
- package/dist/{utils-dueX8ECq.js → utils-BnG4bq6k.js} +1 -1
- package/dist/{utils-CPOlvXFL.cjs → utils-D2Bj0C2E.cjs} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-DdirQd9u.cjs → validate-BxgKlbt7.cjs} +1 -1
- package/dist/{validate-x3wcpuT8.js → validate-DHEGALaE.js} +1 -1
- package/dist/vector/index.cjs +1 -1
- package/dist/vector/index.js +1 -1
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/{worker-CfMtR2cV.js → worker-1lHN6hT1.js} +2 -2
- package/dist/{worker-CPZ3HqQn.cjs → worker-BRKHC9hv.cjs} +2 -2
- package/dist/{worker-NYiueScR.js → worker-C-xoXGOt.js} +2 -2
- package/dist/{worker-GrFJJ7Y0.cjs → worker-DYBrWSDX.cjs} +2 -2
- package/dist/{workflow-BgAes9PI.js → workflow-79JneaJP.js} +3 -3
- package/dist/{workflow-BNUED985.cjs → workflow-DGRDgyhs.cjs} +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/index.cjs +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/sandbox/teardown-context.d.ts +74 -0
- package/dist/{workspace-Pv3J8K0c.cjs → workspace-C8Zo5_qK.cjs} +106 -5
- package/dist/{workspace-BK9ltbSa.js → workspace-DOAil8mG.js} +106 -5
- package/package.json +7 -7
- package/src/llm/model/provider-types.generated.d.ts +8041 -8014
package/dist/knowledge/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as MastraBase } from "../base-CKLWBhDo.js";
|
|
2
|
-
import { $t as
|
|
2
|
+
import { $t as PINNED_READ_MEMO_KEY, Ai as KnowledgePageDepthError, An as strongerKnowledgeRole, Bi as MAX_KNOWLEDGE_PAGE_LIST_LIMIT, Ci as KnowledgeTransactionDeadlineError, Cn as knowledgeReadScopeFor, Cr as knowledgeSemanticDocumentId, Di as inspectKnowledgeSchema, Dn as knowledgeMemoryScopes, Ei as createKnowledgeUlid, En as compileKnowledgeScopes, Er as parseKnowledgeNodeCursor, Fi as MAX_KNOWLEDGE_PAGE_BODY_LINKS, Gi as knowledgeLinkRefKey, Hi as assertKnowledgeNoteTextWithinBound, Ii as MAX_KNOWLEDGE_PAGE_DEPTH, Ji as knowledgePositionBetween, Jo as augmentWithInit, Ki as knowledgePagePath, Li as MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, Mi as KnowledgePageKeyConflictError, Mn as encodeKnowledgeScopeId, Ni as MAX_KNOWLEDGE_MOVE_PAGES, Nn as buildKnowledgeInstructions, Oi as parseKnowledgeWikilinks, On as knowledgeRunScopes, Pi as MAX_KNOWLEDGE_NOTE_TOKENS, Ri as MAX_KNOWLEDGE_PAGE_LINKS, Si as KnowledgeStorage, Sn as knowledgeAccessGrants, Sr as knowledgeScopeKey, Ti as assertKnowledgeSchemaCompatible, Tn as KnowledgeDeclarationError, Tr as knowledgeVisibleScopeKeys, Ui as assertKnowledgePageDescriptionWithinBound, Vi as MAX_KNOWLEDGE_PIN_LIST_DEPTH, Wi as canonicalKnowledgeName, Xi as parseKnowledgePageRef, Yi as knowledgeScopeReadable, Yo as getStorageSource, Zi as KnowledgeInvalidCursorError, _i as KNOWLEDGE_STORAGE_CONTRACT_VERSION, _n as knowledgeSubtree, _r as assertKnowledgeScopeWithinCeiling, an as knowledgeRunPrincipals, bi as KnowledgeNotFoundError, bn as syncKnowledgePageBodyLinks, br as expandKnowledgeScope, cn as addKnowledgeNote, dn as removeKnowledgePage, dr as MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, en as knowledgeDeliveredPins, fn as updateKnowledgeNote, fr as MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, gi as KnowledgeImportersStorage, gn as KnowledgeLinkRefreshIncompleteError, gr as assertKnowledgeRecordTextWithinBound, hi as KnowledgeImporterRunStateError, hr as assertKnowledgeDescriptionWithinBound, in as KnowledgeRunScopesError, ji as KnowledgePageHasChildrenError, jn as decodeKnowledgeScopeId, ki as KnowledgeMoveTooLargeError, kn as knowledgeScopeAddress, ln as moveKnowledgePage, mi as KnowledgeImporterBindingConflictError, mn as KnowledgeSemanticIndex, mr as assertKnowledgeCeilingRaised, nn as heldScopes, on as knowledgeAgentScopes, pi as InMemoryKnowledgeStorage, pn as upsertKnowledgePage, pr as MAX_KNOWLEDGE_SCOPE_TAGS, qi as knowledgePinDepth, rn as KnowledgeRun, sn as knowledgePersonaScopes, tn as buildKnowledgePageTools, un as removeKnowledgeNote, vi as KNOWLEDGE_STORAGE_SCHEMA_VERSION, vn as refreshKnowledgeLinksTo, vr as canonicalizeKnowledgeScope, wi as KnowledgeUnsupportedCapabilityError, wn as knowledgeRoleOn, wr as knowledgeSemanticIdempotencyKey, xi as KnowledgeSchemaResetRequiredError, xn as updateKnowledgeLinks, xr as isKnowledgeScopeVisible, yi as KnowledgeConflictError, yn as reindexKnowledgeLinks, yr as createKnowledgeNodeCursor, zi as MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH } from "../run-registry-DKiudqVU.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";
|
|
@@ -1192,7 +1192,8 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
1192
1192
|
unchanged: 0,
|
|
1193
1193
|
moved: 0,
|
|
1194
1194
|
removed: 0,
|
|
1195
|
-
stubbed: 0
|
|
1195
|
+
stubbed: 0,
|
|
1196
|
+
merged: 0
|
|
1196
1197
|
},
|
|
1197
1198
|
refused: [],
|
|
1198
1199
|
changes: [],
|
|
@@ -1376,12 +1377,13 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
1376
1377
|
};
|
|
1377
1378
|
};
|
|
1378
1379
|
const nodeOf = async (sourceId) => sourceId ? importers.getNode(binding.id, sourceId) : null;
|
|
1379
|
-
const
|
|
1380
|
+
const stateOf = async (node) => {
|
|
1380
1381
|
const page = await storage.getPage({
|
|
1381
1382
|
id: node.pageId,
|
|
1382
1383
|
read: "all"
|
|
1383
1384
|
});
|
|
1384
|
-
|
|
1385
|
+
if (page?.mergedInto) return "merged";
|
|
1386
|
+
return !page || !!page.deletedAt || page.scopeId !== scope.id ? "gone" : "live";
|
|
1385
1387
|
};
|
|
1386
1388
|
/**
|
|
1387
1389
|
* Drops the node of a page that is gone, so its item is written again as new. Pages that linked to
|
|
@@ -1437,7 +1439,7 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
1437
1439
|
};
|
|
1438
1440
|
const liveNodeOf = async (sourceId) => {
|
|
1439
1441
|
const node = await nodeOf(sourceId);
|
|
1440
|
-
return node &&
|
|
1442
|
+
return node && await stateOf(node) === "live" ? node : null;
|
|
1441
1443
|
};
|
|
1442
1444
|
const ref = (keys) => `${target.scope}#${keys.join("/")}`;
|
|
1443
1445
|
const linkLine = async (link, node) => {
|
|
@@ -1616,12 +1618,17 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
1616
1618
|
};
|
|
1617
1619
|
const write = async (item, hasBody) => {
|
|
1618
1620
|
let existing = await importers.getNode(binding.id, item.sourceId);
|
|
1619
|
-
|
|
1621
|
+
const state = existing ? await stateOf(existing) : null;
|
|
1622
|
+
if (state === "merged") return null;
|
|
1623
|
+
if (existing && state === "gone") {
|
|
1620
1624
|
await forget(existing);
|
|
1621
1625
|
existing = null;
|
|
1622
1626
|
}
|
|
1623
|
-
const
|
|
1624
|
-
const
|
|
1627
|
+
const parentRecord = await nodeOf(item.parent);
|
|
1628
|
+
const parentState = parentRecord ? await stateOf(parentRecord) : null;
|
|
1629
|
+
const sourceParent = parentState === "live" ? parentRecord : null;
|
|
1630
|
+
const parentMerged = parentState === "merged";
|
|
1631
|
+
const misplaced = !!item.parent && !sourceParent && !parentMerged;
|
|
1625
1632
|
const parentNode = sourceParent ?? await liveNodeOf(item.fallbackParent);
|
|
1626
1633
|
const destination = parentNode ? await owned(parentNode.pageId, parentNode.sourceId) : anchor;
|
|
1627
1634
|
if (existing && destination.page.id === existing.pageId) throw new KnowledgeImportRefusalError("invalid");
|
|
@@ -1675,7 +1682,7 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
1675
1682
|
const current = await owned(existing.pageId, item.sourceId);
|
|
1676
1683
|
page = current.page;
|
|
1677
1684
|
if (existing.stub && existing.adopted && !REMOVED_BODIES.has(page.body ?? "")) await keepBody(page.id, page.body ?? "");
|
|
1678
|
-
if (!current.outside && page.parentId !== destination.page.id) {
|
|
1685
|
+
if (!current.outside && !parentMerged && page.parentId !== destination.page.id) {
|
|
1679
1686
|
if (destination.keys.length > current.keys.length && sameKeys(destination.keys.slice(0, current.keys.length), current.keys)) throw new KnowledgeImportRefusalError("invalid");
|
|
1680
1687
|
({page, relinked} = await moveOwned(item.sourceId, page, destination));
|
|
1681
1688
|
moved = true;
|
|
@@ -1755,7 +1762,9 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
1755
1762
|
if (op.op === "remove") {
|
|
1756
1763
|
const node = await importers.getNode(binding.id, sourceId);
|
|
1757
1764
|
if (!node) return;
|
|
1758
|
-
|
|
1765
|
+
const state = await stateOf(node);
|
|
1766
|
+
if (state === "merged") return;
|
|
1767
|
+
if (state === "gone") {
|
|
1759
1768
|
await forget(node);
|
|
1760
1769
|
result.applied = true;
|
|
1761
1770
|
return;
|
|
@@ -1827,7 +1836,12 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
1827
1836
|
result.applied = true;
|
|
1828
1837
|
return;
|
|
1829
1838
|
}
|
|
1830
|
-
const
|
|
1839
|
+
const written = await write(op.item, op.op === "upsert");
|
|
1840
|
+
if (!written) {
|
|
1841
|
+
result.counts.merged++;
|
|
1842
|
+
return;
|
|
1843
|
+
}
|
|
1844
|
+
const { page, change, moved, relinked } = written;
|
|
1831
1845
|
recordRelinked(relinked, embeds);
|
|
1832
1846
|
if (change === "unchanged") {
|
|
1833
1847
|
result.counts.unchanged++;
|
|
@@ -1946,12 +1960,24 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
1946
1960
|
moved: false,
|
|
1947
1961
|
relinked: false
|
|
1948
1962
|
};
|
|
1963
|
+
if (await stateOf(node) === "merged") {
|
|
1964
|
+
await importers.saveNode({
|
|
1965
|
+
...node,
|
|
1966
|
+
unsettled: false
|
|
1967
|
+
});
|
|
1968
|
+
return {
|
|
1969
|
+
moved: false,
|
|
1970
|
+
relinked: false
|
|
1971
|
+
};
|
|
1972
|
+
}
|
|
1949
1973
|
const current = await owned(node.pageId, sourceId);
|
|
1950
1974
|
let { page, keys } = current;
|
|
1951
1975
|
let moved = false;
|
|
1952
1976
|
let relinked = false;
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1977
|
+
const sourceParent = current.outside ? null : await nodeOf(node.parentSourceId);
|
|
1978
|
+
const parentMerged = !!sourceParent && await stateOf(sourceParent) === "merged";
|
|
1979
|
+
const parent = parentMerged ? null : sourceParent;
|
|
1980
|
+
let misplaced = !current.outside && !!node.parentSourceId && !parent && !parentMerged;
|
|
1955
1981
|
if (parent && canMove) {
|
|
1956
1982
|
const destination = await owned(parent.pageId, parent.sourceId);
|
|
1957
1983
|
if (page.parentId !== destination.page.id) {
|
|
@@ -2352,6 +2378,14 @@ function hostError(error) {
|
|
|
2352
2378
|
failure.cause = error;
|
|
2353
2379
|
return failure;
|
|
2354
2380
|
}
|
|
2381
|
+
/** A committed receipt as replayed; receipts written before the `merged` count existed read it as 0. */
|
|
2382
|
+
const storedReceipt = (receipt) => {
|
|
2383
|
+
const stored = receipt;
|
|
2384
|
+
return {
|
|
2385
|
+
...stored,
|
|
2386
|
+
merged: stored.merged ?? 0
|
|
2387
|
+
};
|
|
2388
|
+
};
|
|
2355
2389
|
const receiptCounts = (counts) => ({
|
|
2356
2390
|
created: counts.created ?? 0,
|
|
2357
2391
|
updated: counts.updated ?? 0,
|
|
@@ -2359,6 +2393,7 @@ const receiptCounts = (counts) => ({
|
|
|
2359
2393
|
moved: counts.moved ?? 0,
|
|
2360
2394
|
removed: counts.removed ?? 0,
|
|
2361
2395
|
stubbed: counts.stubbed ?? 0,
|
|
2396
|
+
merged: counts.merged ?? 0,
|
|
2362
2397
|
refused: counts.refused ?? 0
|
|
2363
2398
|
});
|
|
2364
2399
|
const runReceipt = (run) => {
|
|
@@ -2613,7 +2648,7 @@ function createLocalKnowledgeImporterHost(writer, options) {
|
|
|
2613
2648
|
});
|
|
2614
2649
|
if (replayed) {
|
|
2615
2650
|
if (replayed.digest !== digest) throw conflict("digest_mismatch", "This seq was committed with other content.");
|
|
2616
|
-
return replayed.receipt;
|
|
2651
|
+
return storedReceipt(replayed.receipt);
|
|
2617
2652
|
}
|
|
2618
2653
|
const [peek, peekRun] = await Promise.all([rootImporters.readWriterGuard(), rootImporters.getRun(flush.runId)]).catch((error) => {
|
|
2619
2654
|
throw hostError(error);
|
|
@@ -2638,7 +2673,7 @@ function createLocalKnowledgeImporterHost(writer, options) {
|
|
|
2638
2673
|
const stored = await importers.getFlush(flush.runId, flush.generation, flush.seq);
|
|
2639
2674
|
if (stored) {
|
|
2640
2675
|
if (stored.digest !== digest) throw conflict("digest_mismatch", "This seq was committed with other content.");
|
|
2641
|
-
return stored.receipt;
|
|
2676
|
+
return storedReceipt(stored.receipt);
|
|
2642
2677
|
}
|
|
2643
2678
|
if (!run || run.status !== "running") throw conflict("run_not_active", "The run is not running.");
|
|
2644
2679
|
if (run.generation !== flush.generation || guard.generation !== flush.generation) throw conflict("stale_generation", "The run belongs to an older writer generation.");
|
|
@@ -4379,6 +4414,11 @@ var Knowledge = class extends MastraBase {
|
|
|
4379
4414
|
write
|
|
4380
4415
|
};
|
|
4381
4416
|
}
|
|
4417
|
+
/** Whether the resolved mint declarations need metadata.persona. @internal */
|
|
4418
|
+
async __needsAgentPersona() {
|
|
4419
|
+
await this.#runtime.resolve();
|
|
4420
|
+
return [...this.#runtime.compiled.declarations.values()].some((declaration) => declaration.declaration.mint === "run-identity" && declaration.pattern.params.some((param) => param === "role" || param === "teamId"));
|
|
4421
|
+
}
|
|
4382
4422
|
/**
|
|
4383
4423
|
* The run's principals as a stable key, or `undefined` when the run has no Knowledge view (no scopes,
|
|
4384
4424
|
* or an undeclared scope). Loads the store's declarations first, so a scope only the store declares
|
|
@@ -4418,6 +4458,14 @@ var Knowledge = class extends MastraBase {
|
|
|
4418
4458
|
const run = await KnowledgeRun.start(this.#runtime, await this.getStorage(), context);
|
|
4419
4459
|
return knowledgeDeliveredPins(run, budget, this.#groups().read);
|
|
4420
4460
|
}
|
|
4461
|
+
/** The scopes a run holds a role on this turn, with that role. @internal */
|
|
4462
|
+
async __heldScopes(context) {
|
|
4463
|
+
const run = await KnowledgeRun.start(this.#runtime, await this.getStorage(), context);
|
|
4464
|
+
return (await heldScopes(run)).flatMap(({ address, role }) => role ? [{
|
|
4465
|
+
address,
|
|
4466
|
+
role
|
|
4467
|
+
}] : []);
|
|
4468
|
+
}
|
|
4421
4469
|
/** @internal */
|
|
4422
4470
|
__registerMastra(_mastra) {}
|
|
4423
4471
|
/** @internal */
|
|
@@ -4534,4 +4582,4 @@ var Knowledge = class extends MastraBase {
|
|
|
4534
4582
|
function createKnowledgeImporterHost(knowledge, options) {
|
|
4535
4583
|
return createLocalKnowledgeImporterHost(hostWriterOf(knowledge), options);
|
|
4536
4584
|
}
|
|
4537
|
-
export { DEFAULT_KNOWLEDGE_PAGE_GRAPH_LIMITS, InMemoryKnowledgeStorage, KNOWLEDGE_IMPORTER_ERROR_CODES, REMOVED_PARENT_BODY as KNOWLEDGE_IMPORT_REMOVED_PARENT_BODY, KNOWLEDGE_STORAGE_CONTRACT_VERSION, KNOWLEDGE_STORAGE_SCHEMA_VERSION, Knowledge, KnowledgeConflictError, KnowledgeDeclarationError, KnowledgeImporter, KnowledgeImporterBase, KnowledgeImporterBindingConflictError, KnowledgeImporterCredentialsError, KnowledgeImporterDefinitionError, KnowledgeImporterHostConflictError, KnowledgeImporterHostError, KnowledgeImporterRunStateError, KnowledgeImporterSettingsError, KnowledgeImporterSourceError, KnowledgeImportersStorage, KnowledgeInvalidCursorError, KnowledgeMoveTooLargeError, KnowledgeNotFoundError, KnowledgePageDepthError, KnowledgePageHasChildrenError, KnowledgePageKeyConflictError, KnowledgeSchemaResetRequiredError, KnowledgeStorage, KnowledgeTransactionDeadlineError, KnowledgeUnsupportedCapabilityError, MAX_KNOWLEDGE_EXPLORER_PAGE_LINKS, MAX_KNOWLEDGE_LINK_COUNT_PAGES, MAX_KNOWLEDGE_MOVE_PAGES, MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, MAX_KNOWLEDGE_NOTE_TOKENS, MAX_KNOWLEDGE_PAGE_BODY_LINKS, MAX_KNOWLEDGE_PAGE_DEPTH, MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, MAX_KNOWLEDGE_PAGE_LINKS, MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, MAX_KNOWLEDGE_PAGE_LIST_LIMIT, MAX_KNOWLEDGE_PIN_LIST_DEPTH, MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, MAX_KNOWLEDGE_SCOPE_TAGS, assertKnowledgeCeilingRaised, assertKnowledgeDescriptionWithinBound, assertKnowledgeNoteTextWithinBound, assertKnowledgePageDescriptionWithinBound, assertKnowledgeRecordTextWithinBound, assertKnowledgeSchemaCompatible, assertKnowledgeScopeWithinCeiling, canonicalJson, canonicalKnowledgeName, canonicalizeKnowledgeScope, createKnowledgeImporterHost, createKnowledgeNodeCursor, createKnowledgeUlid, decodeKnowledgeScopeId, encodeKnowledgeScopeId, expandKnowledgeScope, importerHostConformance, inspectKnowledgeSchema, isKnowledgeScopeVisible, knowledgeImportKey, knowledgeImporterFlushDigest, knowledgeImporterRegistry, knowledgeLinkRefKey, knowledgeMemoryScopes, knowledgePagePath, knowledgePinDepth, knowledgePositionBetween, knowledgeScopeAddress, knowledgeScopeKey, knowledgeScopeReadable, knowledgeSemanticDocumentId, knowledgeSemanticIdempotencyKey, knowledgeVisibleScopeKeys, listKnowledgeTreeChildren, normalizeKnowledgeImporterFinish, parseKnowledgeImporterFlushBody, parseKnowledgeNodeCursor, parseKnowledgePageRef, parseKnowledgeWikilinks, readKnowledgePage, readKnowledgePageActivity, readKnowledgePageGraph, readKnowledgePageLinkCounts, readKnowledgePageLinks, readKnowledgeScopeGrants, runKnowledgeImport, searchKnowledgeExplorerPages };
|
|
4585
|
+
export { DEFAULT_KNOWLEDGE_PAGE_GRAPH_LIMITS, InMemoryKnowledgeStorage, KNOWLEDGE_IMPORTER_ERROR_CODES, REMOVED_PARENT_BODY as KNOWLEDGE_IMPORT_REMOVED_PARENT_BODY, KNOWLEDGE_STORAGE_CONTRACT_VERSION, KNOWLEDGE_STORAGE_SCHEMA_VERSION, Knowledge, KnowledgeConflictError, KnowledgeDeclarationError, KnowledgeImporter, KnowledgeImporterBase, KnowledgeImporterBindingConflictError, KnowledgeImporterCredentialsError, KnowledgeImporterDefinitionError, KnowledgeImporterHostConflictError, KnowledgeImporterHostError, KnowledgeImporterRunStateError, KnowledgeImporterSettingsError, KnowledgeImporterSourceError, KnowledgeImportersStorage, KnowledgeInvalidCursorError, KnowledgeMoveTooLargeError, KnowledgeNotFoundError, KnowledgePageDepthError, KnowledgePageHasChildrenError, KnowledgePageKeyConflictError, KnowledgeSchemaResetRequiredError, KnowledgeStorage, KnowledgeTransactionDeadlineError, KnowledgeUnsupportedCapabilityError, MAX_KNOWLEDGE_EXPLORER_PAGE_LINKS, MAX_KNOWLEDGE_LINK_COUNT_PAGES, MAX_KNOWLEDGE_MOVE_PAGES, MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH, MAX_KNOWLEDGE_NOTE_TOKENS, MAX_KNOWLEDGE_PAGE_BODY_LINKS, MAX_KNOWLEDGE_PAGE_DEPTH, MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS, MAX_KNOWLEDGE_PAGE_LINKS, MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH, MAX_KNOWLEDGE_PAGE_LIST_LIMIT, MAX_KNOWLEDGE_PIN_LIST_DEPTH, MAX_KNOWLEDGE_RECORD_TEXT_LENGTH, MAX_KNOWLEDGE_SCOPE_TAGS, assertKnowledgeCeilingRaised, assertKnowledgeDescriptionWithinBound, assertKnowledgeNoteTextWithinBound, assertKnowledgePageDescriptionWithinBound, assertKnowledgeRecordTextWithinBound, assertKnowledgeSchemaCompatible, assertKnowledgeScopeWithinCeiling, canonicalJson, canonicalKnowledgeName, canonicalizeKnowledgeScope, createKnowledgeImporterHost, createKnowledgeNodeCursor, createKnowledgeUlid, decodeKnowledgeScopeId, encodeKnowledgeScopeId, expandKnowledgeScope, importerHostConformance, inspectKnowledgeSchema, isKnowledgeScopeVisible, knowledgeAgentScopes, knowledgeImportKey, knowledgeImporterFlushDigest, knowledgeImporterRegistry, knowledgeLinkRefKey, knowledgeMemoryScopes, knowledgePagePath, knowledgePersonaScopes, knowledgePinDepth, knowledgePositionBetween, knowledgeScopeAddress, knowledgeScopeKey, knowledgeScopeReadable, knowledgeSemanticDocumentId, knowledgeSemanticIdempotencyKey, knowledgeVisibleScopeKeys, listKnowledgeTreeChildren, normalizeKnowledgeImporterFinish, parseKnowledgeImporterFlushBody, parseKnowledgeNodeCursor, parseKnowledgePageRef, parseKnowledgeWikilinks, readKnowledgePage, readKnowledgePageActivity, readKnowledgePageGraph, readKnowledgePageLinkCounts, readKnowledgePageLinks, readKnowledgeScopeGrants, runKnowledgeImport, searchKnowledgeExplorerPages };
|
|
@@ -27,6 +27,20 @@ export interface KnowledgePageToolGroups {
|
|
|
27
27
|
type Tools = Record<string, ToolAction<any, any, any>>;
|
|
28
28
|
/** What a run can do in a scope it holds: contributors and up can write, viewers only read. */
|
|
29
29
|
type HeldScopeAccess = 'write' | 'read' | 'none';
|
|
30
|
+
/** A scope the run holds, whether or not it has a scope page yet. */
|
|
31
|
+
type HeldScope = {
|
|
32
|
+
address: string;
|
|
33
|
+
page?: KnowledgePage;
|
|
34
|
+
role: KnowledgeRole | null;
|
|
35
|
+
can: HeldScopeAccess;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Every scope the run holds, in principal order, with its role and what it can do there. A held scope
|
|
39
|
+
* gets its page on the first write, so before that its role comes from the declarations and the parent
|
|
40
|
+
* that write would link it under: without it a model sees no scopes on its first turn and concludes it
|
|
41
|
+
* has nowhere to write. A stored scope it can't read keeps only its address.
|
|
42
|
+
*/
|
|
43
|
+
export declare function heldScopes(run: KnowledgeRun): Promise<HeldScope[]>;
|
|
30
44
|
/** One entry of a `knowledge_list` result. */
|
|
31
45
|
export interface ListEntry {
|
|
32
46
|
ref: string;
|
package/dist/knowledge/run.d.ts
CHANGED
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-ypGNjEom.cjs");
|
|
3
|
+
const require_netlify = require("../netlify-wZafLKoe.cjs");
|
|
4
|
+
const require_provider_registry = require("../provider-registry-BvpUdOiq.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.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 { l as GATEWAY_AUTH_HEADER, m as getGatewayId, p as findGatewayForModel, r as ModelsDevGateway, t as NetlifyGateway, y 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-9xmy8HlF.js";
|
|
2
|
+
import { l as GATEWAY_AUTH_HEADER, m as getGatewayId, p as findGatewayForModel, r as ModelsDevGateway, t as NetlifyGateway, y as MastraModelGateway } from "../netlify-DTWAZGpA.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-COT79RLh.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 };
|