@mastra/core 1.87.0-alpha.18 → 1.87.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_types/@internal_ai-v6@0.0.99/dist/index.d.ts +2075 -123
- package/dist/_types/@internal_core@0.1.4/dist/knowledge-compat/index.d.ts +30 -3
- package/dist/agent/agent.d.ts +2 -4
- package/dist/agent/agent.types.d.ts +1 -0
- package/dist/agent/durable/index.cjs +86 -86
- package/dist/agent/durable/index.js +2 -2
- package/dist/agent/durable/run-registry.d.ts +54 -25
- package/dist/agent/index.cjs +16 -16
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.js +3 -3
- package/dist/agent/scopes.d.ts +8 -0
- package/dist/agent/types.d.ts +1 -0
- package/dist/agent-builder/ee/index.cjs +1 -1
- package/dist/agent-builder/ee/index.js +1 -1
- package/dist/agent-controller/agent-controller.d.ts +8 -1
- package/dist/agent-controller/index.cjs +3 -3
- package/dist/agent-controller/index.js +3 -3
- package/dist/{agent-controller-D_OKCLUP.cjs → agent-controller-DzOEhUjR.cjs} +39 -35
- package/dist/{agent-controller-UZNIM4h-.js → agent-controller-lBdNfcFi.js} +15 -11
- package/dist/{agent-skills-resolver-BMoCDoaK.cjs → agent-skills-resolver-2d8k7ioj.cjs} +134 -109
- package/dist/{agent-skills-resolver-CUEIMDbx.js → agent-skills-resolver-D2HktP6Y.js} +134 -109
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-CioDMzgY.js → background-tasks-DAu4WaCb.js} +1 -1
- package/dist/{background-tasks-CLWnX7SN.cjs → background-tasks-DOmQdBVn.cjs} +1 -1
- package/dist/browser/index.cjs +4 -4
- package/dist/browser/index.js +4 -4
- package/dist/{builder-BC4l-RN5.cjs → builder-BFcVEbX0.cjs} +3 -3
- package/dist/{builder-CQLqpQO_.js → builder-DHFtMW8D.js} +2 -2
- package/dist/capabilities/302ai.json +198 -198
- package/dist/capabilities/abacus.json +2 -96
- package/dist/capabilities/abliteratedllm.json +36 -36
- package/dist/capabilities/abliteration-ai.json +11 -11
- package/dist/capabilities/above.json +19 -19
- package/dist/capabilities/adaption.json +11 -11
- package/dist/capabilities/adzuki.json +32 -32
- package/dist/capabilities/agentrouter.json +12 -12
- package/dist/capabilities/agnes.json +4 -4
- package/dist/capabilities/ai-router.json +5 -5
- package/dist/capabilities/aiand.json +25 -25
- package/dist/capabilities/aigrow.json +13 -13
- package/dist/capabilities/aimlapi.json +144 -144
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +24 -24
- package/dist/capabilities/aki-io.json +12 -12
- package/dist/capabilities/alibaba-cn.json +81 -126
- package/dist/capabilities/alibaba-coding-plan-cn.json +4 -4
- package/dist/capabilities/alibaba-coding-plan.json +4 -4
- package/dist/capabilities/alibaba-token-plan-cn.json +57 -53
- package/dist/capabilities/alibaba-token-plan.json +57 -53
- package/dist/capabilities/alibaba.json +76 -71
- package/dist/capabilities/ambient.json +14 -32
- package/dist/capabilities/amd-tokenlab.json +41 -0
- package/dist/capabilities/amd.json +8 -8
- package/dist/capabilities/anthropic.json +32 -56
- package/dist/capabilities/anyapi.json +47 -47
- package/dist/capabilities/apiko.json +5 -5
- package/dist/capabilities/arcee.json +5 -5
- package/dist/capabilities/augure.json +4 -4
- package/dist/capabilities/auriko.json +15 -15
- package/dist/capabilities/bailing.json +3 -3
- package/dist/capabilities/baseten.json +35 -35
- package/dist/capabilities/bee.json +5 -5
- package/dist/capabilities/berget.json +2 -35
- package/dist/capabilities/bothub.json +14 -14
- package/dist/capabilities/boundless.json +39 -39
- package/dist/capabilities/bumo.json +40 -40
- package/dist/capabilities/byteplus.json +28 -28
- package/dist/capabilities/cheapest-token.json +31 -31
- package/dist/capabilities/chutes.json +48 -17
- package/dist/capabilities/cline-pass.json +32 -45
- package/dist/capabilities/cloudcode.json +8 -8
- package/dist/capabilities/cloudferro-sherlock.json +4 -4
- package/dist/capabilities/cloudflare-workers-ai.json +17 -17
- package/dist/capabilities/commandcode.json +141 -156
- package/dist/capabilities/concentrate.json +289 -289
- package/dist/capabilities/cortecs.json +103 -103
- package/dist/capabilities/crossmodel.json +194 -194
- package/dist/capabilities/crusoe.json +18 -18
- package/dist/capabilities/daoxe.json +9 -9
- package/dist/capabilities/databricks.json +128 -128
- package/dist/capabilities/deepinfra.json +98 -94
- package/dist/capabilities/deepseek.json +4 -4
- package/dist/capabilities/digitalocean.json +114 -114
- package/dist/capabilities/dinference.json +1 -2
- package/dist/capabilities/dothoosh.json +26 -26
- package/dist/capabilities/doubleword.json +23 -23
- package/dist/capabilities/edenai.json +285 -285
- package/dist/capabilities/empiriolabs.json +176 -167
- package/dist/capabilities/engy.json +16 -16
- package/dist/capabilities/entrim.json +8 -8
- package/dist/capabilities/evroc.json +15 -15
- package/dist/capabilities/ezkielyna.json +10 -10
- package/dist/capabilities/fastrouter.json +93 -97
- package/dist/capabilities/fireworks-ai.json +85 -85
- package/dist/capabilities/fortytwo.json +4 -4
- package/dist/capabilities/freemodel.json +7 -51
- package/dist/capabilities/friendli.json +8 -8
- package/dist/capabilities/frogbot.json +95 -103
- package/dist/capabilities/gisoo.json +15 -15
- package/dist/capabilities/gmicloud.json +21 -21
- package/dist/capabilities/google.json +55 -55
- package/dist/capabilities/graphn.json +10 -10
- package/dist/capabilities/greenpt.json +35 -35
- package/dist/capabilities/groq.json +7 -20
- package/dist/capabilities/helicone.json +84 -86
- package/dist/capabilities/hetzner.json +4 -4
- package/dist/capabilities/hopper.json +2 -2
- package/dist/capabilities/hostinger-router.json +5 -5
- package/dist/capabilities/hpc-ai.json +8 -24
- package/dist/capabilities/huawei-maas.json +13 -13
- package/dist/capabilities/hubris.json +30 -30
- package/dist/capabilities/huggingface.json +86 -101
- package/dist/capabilities/hyper.json +24 -24
- package/dist/capabilities/impossibl.json +152 -199
- package/dist/capabilities/inceptron.json +8 -8
- package/dist/capabilities/inco.json +4 -21
- package/dist/capabilities/infer.json +16 -16
- package/dist/capabilities/inferall.json +2 -18
- package/dist/capabilities/inference-coop.json +6 -6
- package/dist/capabilities/inference.json +2 -11
- package/dist/capabilities/inferenceapis.json +24 -24
- package/dist/capabilities/infersia.json +13 -13
- package/dist/capabilities/inferx.json +3 -3
- package/dist/capabilities/infomaniak.json +3 -3
- package/dist/capabilities/io-net.json +6 -16
- package/dist/capabilities/isoquant.json +4 -4
- package/dist/capabilities/iteracompute.json +42 -80
- package/dist/capabilities/jalapeno.json +11 -11
- package/dist/capabilities/jiekou.json +19 -167
- package/dist/capabilities/joingonka.json +4 -4
- package/dist/capabilities/jzstoken.json +54 -54
- package/dist/capabilities/keln.json +23 -23
- package/dist/capabilities/kenari.json +122 -130
- package/dist/capabilities/kilo.json +649 -647
- package/dist/capabilities/kimi-code-plan-cn.json +7 -7
- package/dist/capabilities/kimi-code-plan-global.json +7 -7
- package/dist/capabilities/kitani.json +4 -4
- package/dist/capabilities/klavo.json +24 -24
- package/dist/capabilities/korouter.json +32 -32
- package/dist/capabilities/kunavo.json +7 -7
- package/dist/capabilities/liquid.json +8 -8
- package/dist/capabilities/lithosai.json +3 -3
- package/dist/capabilities/llmgateway-providers.json +885 -893
- package/dist/capabilities/llmgateway.json +340 -340
- package/dist/capabilities/llmtr.json +16 -54
- package/dist/capabilities/lowrouter.json +61 -61
- package/dist/capabilities/lyceum.json +14 -14
- package/dist/capabilities/meganova.json +0 -1
- package/dist/capabilities/melious.json +14 -14
- package/dist/capabilities/merge-gateway.json +292 -292
- package/dist/capabilities/meta.json +11 -11
- package/dist/capabilities/minimax-cn-coding-plan.json +2 -2
- package/dist/capabilities/minimax-cn.json +5 -5
- package/dist/capabilities/minimax-coding-plan.json +2 -2
- package/dist/capabilities/minimax.json +5 -5
- package/dist/capabilities/mistral.json +15 -31
- package/dist/capabilities/mixlayer.json +5 -5
- package/dist/capabilities/moark.json +0 -2
- package/dist/capabilities/modal.json +8 -8
- package/dist/capabilities/model-oracle-ai.json +19 -27
- package/dist/capabilities/modelis.json +14 -14
- package/dist/capabilities/modelscope.json +2 -2
- package/dist/capabilities/modular.json +11 -11
- package/dist/capabilities/moneo.json +7 -38
- package/dist/capabilities/moonshotai-cn.json +7 -7
- package/dist/capabilities/moonshotai.json +7 -7
- package/dist/capabilities/morph.json +13 -13
- package/dist/capabilities/munito-eu.json +8 -8
- package/dist/capabilities/munito.json +10 -10
- package/dist/capabilities/nan.json +31 -31
- package/dist/capabilities/nano-gpt.json +581 -603
- package/dist/capabilities/nearai.json +119 -119
- package/dist/capabilities/nebius.json +30 -31
- package/dist/capabilities/neon.json +132 -132
- package/dist/capabilities/neuralwatt.json +41 -41
- package/dist/capabilities/nokeep.json +5 -5
- package/dist/capabilities/novita-ai.json +113 -227
- package/dist/capabilities/nvidia.json +14 -82
- package/dist/capabilities/oathbreaker.json +2 -2
- package/dist/capabilities/obscurify.json +28 -28
- package/dist/capabilities/oci.json +4 -4
- package/dist/capabilities/ofox.json +270 -270
- package/dist/capabilities/ollama-cloud.json +53 -53
- package/dist/capabilities/openai.json +57 -57
- package/dist/capabilities/opencode-go.json +88 -90
- package/dist/capabilities/openreason.json +5 -5
- package/dist/capabilities/openrouter.json +574 -563
- package/dist/capabilities/opper.json +29 -34
- package/dist/capabilities/orcarouter.json +307 -367
- package/dist/capabilities/outerlabs.json +30 -30
- package/dist/capabilities/ovhcloud.json +19 -19
- package/dist/capabilities/pareto.json +2 -7
- package/dist/capabilities/perplexity-agent.json +47 -102
- package/dist/capabilities/perplexity.json +2 -2
- package/dist/capabilities/phala.json +35 -35
- package/dist/capabilities/pioneer.json +5 -122
- package/dist/capabilities/poe.json +130 -130
- package/dist/capabilities/poolside.json +2 -2
- package/dist/capabilities/powerspring.json +14 -14
- package/dist/capabilities/primalabs.json +12 -12
- package/dist/capabilities/prime.json +123 -115
- package/dist/capabilities/privatemode-ai.json +8 -36
- package/dist/capabilities/proxystacks.json +5 -5
- package/dist/capabilities/qihang-ai.json +3 -15
- package/dist/capabilities/qiniu-ai.json +13 -87
- package/dist/capabilities/refuseless.json +7 -14
- package/dist/capabilities/regolo-ai.json +9 -13
- package/dist/capabilities/requesty.json +202 -202
- package/dist/capabilities/routing-run.json +3 -40
- package/dist/capabilities/ruapi.json +21 -21
- package/dist/capabilities/runcrate.json +10 -10
- package/dist/capabilities/runinfra.json +16 -16
- package/dist/capabilities/sakana.json +3 -3
- package/dist/capabilities/sambanova.json +9 -9
- package/dist/capabilities/sandbase.json +20 -20
- package/dist/capabilities/sarvam.json +22 -13
- package/dist/capabilities/scaleway.json +18 -18
- package/dist/capabilities/scnet-token-plan.json +7 -7
- package/dist/capabilities/scx-ai.json +16 -32
- package/dist/capabilities/sensenova.json +12 -12
- package/dist/capabilities/siliconflow-cn.json +45 -97
- package/dist/capabilities/siliconflow.json +53 -53
- package/dist/capabilities/snowflake-cortex.json +26 -26
- package/dist/capabilities/sokkan.json +8 -20
- package/dist/capabilities/sparrowcodes.json +21 -21
- package/dist/capabilities/stackit.json +1 -2
- package/dist/capabilities/standardcompute.json +84 -120
- package/dist/capabilities/steadyrouter.json +41 -41
- package/dist/capabilities/stepfun-ai-step-plan.json +8 -8
- package/dist/capabilities/stepfun-ai.json +8 -8
- package/dist/capabilities/stepfun-step-plan.json +8 -8
- package/dist/capabilities/stepfun.json +8 -8
- package/dist/capabilities/stepping-stone.json +15 -15
- package/dist/capabilities/subconscious.json +2 -2
- package/dist/capabilities/superbot-gg.json +4 -4
- package/dist/capabilities/synthetic.json +8 -17
- package/dist/capabilities/synthorai.json +21 -21
- package/dist/capabilities/teamorouter.json +23 -23
- package/dist/capabilities/teapot-router.json +10 -10
- package/dist/capabilities/tencent-token-plan-intl.json +25 -25
- package/dist/capabilities/tencent-token-plan.json +38 -38
- package/dist/capabilities/tencent-tokenhub.json +46 -46
- package/dist/capabilities/tensorx.json +48 -48
- package/dist/capabilities/tenstorrent.json +4 -4
- package/dist/capabilities/the-grid-ai.json +29 -29
- package/dist/capabilities/thinkingmachines.json +71 -71
- package/dist/capabilities/tinfoil.json +8 -8
- package/dist/capabilities/toapis.json +3 -3
- package/dist/capabilities/togetherai.json +42 -42
- package/dist/capabilities/tokengo.json +21 -21
- package/dist/capabilities/tokenify.json +2 -2
- package/dist/capabilities/trustedrouter.json +5 -5
- package/dist/capabilities/trustedtokens.json +15 -15
- package/dist/capabilities/umans-ai-coding-plan.json +16 -16
- package/dist/capabilities/umans-ai.json +13 -13
- package/dist/capabilities/uncensuredai.json +4 -4
- package/dist/capabilities/unorouter.json +1 -22
- package/dist/capabilities/unrestricted.json +4 -20
- package/dist/capabilities/uplinkswitch.json +21 -21
- package/dist/capabilities/upstage.json +3 -15
- package/dist/capabilities/vancine.json +20 -20
- package/dist/capabilities/vercel.json +551 -551
- package/dist/capabilities/vivgrid.json +51 -131
- package/dist/capabilities/volcengine-coding-plan.json +29 -29
- package/dist/capabilities/volcengine.json +27 -27
- package/dist/capabilities/vultr.json +14 -67
- package/dist/capabilities/wafer.ai.json +17 -17
- package/dist/capabilities/wallaby.json +2 -2
- package/dist/capabilities/wally.json +12 -12
- package/dist/capabilities/wandb.json +21 -21
- package/dist/capabilities/watt.json +22 -22
- package/dist/capabilities/xai.json +5 -5
- package/dist/capabilities/xiaomi-token-plan-ams.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-cn.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -2
- package/dist/capabilities/xiaomi.json +2 -2
- package/dist/capabilities/xpersona.json +13 -13
- package/dist/capabilities/xxapi.json +30 -30
- package/dist/capabilities/zai-coding-plan.json +17 -17
- package/dist/capabilities/zai.json +31 -31
- package/dist/capabilities/zenifra.json +26 -26
- package/dist/capabilities/zenmux.json +190 -233
- package/dist/capabilities/zerogpu.json +8 -8
- package/dist/capabilities/zhipuai-coding-plan.json +3 -14
- package/dist/capabilities/zhipuai.json +30 -30
- package/dist/capabilities/zro.json +6 -6
- package/dist/channels/index.cjs +24 -24
- package/dist/channels/index.js +2 -2
- package/dist/{channels-Bemsws_d.js → channels-BBwgs50q.js} +2 -2
- package/dist/{channels-B7-KI9Ob.cjs → channels-CbhgGgQD.cjs} +6 -6
- package/dist/coding-agent/index.cjs +7 -7
- package/dist/coding-agent/index.js +4 -4
- package/dist/{constants-CFO8w780.cjs → constants-B2FVV_2e.cjs} +1 -1
- package/dist/{constants-CUv0mU2y.js → constants-Dro9fuhk.js} +1 -1
- package/dist/datasets/index.cjs +9 -9
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1147 -1142
- package/dist/docs/references/docs-agents-overview.md +9 -0
- package/dist/docs/references/docs-deployment-workers.md +1 -1
- package/dist/docs/references/docs-harness-background-tasks.md +8 -5
- package/dist/docs/references/docs-harness-durable-agents.md +1 -0
- package/dist/docs/references/docs-knowledge-search.md +1 -1
- package/dist/docs/references/docs-server-pubsub.md +1 -1
- package/dist/docs/references/docs-skills.md +4 -1
- package/dist/docs/references/docs-workflows-overview.md +2 -0
- package/dist/docs/references/reference-agents-createSkill.md +20 -1
- package/dist/docs/references/reference-knowledge-knowledge-tools.md +1 -2
- package/dist/docs/references/reference-observability-metrics-metrics-context.md +63 -3
- package/dist/docs/references/reference-pubsub-base.md +1 -1
- package/dist/docs/references/reference-pubsub-redis-streams.md +3 -5
- package/dist/docs/references/reference-pubsub-valkey-streams.md +2 -2
- package/dist/docs/references/reference-templates-overview.md +31 -1
- package/dist/docs/references/reference-workflows-run-methods-restart.md +2 -0
- package/dist/evals/index.cjs +13 -13
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +4 -4
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/events/index.cjs +1 -1
- package/dist/events/index.js +1 -1
- package/dist/events/pubsub.d.ts +1 -3
- package/dist/{run-registry-Cu9CK7AR.js → execution-fence-B8yV_n51.js} +62508 -62052
- package/dist/{run-registry-CXeR1Qso.cjs → execution-fence-fqV6FGdV.cjs} +63621 -63153
- package/dist/harness/index.cjs +3 -3
- package/dist/harness/index.js +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/integration/index.cjs +1 -1
- package/dist/integration/index.js +1 -1
- package/dist/knowledge/index.cjs +163 -153
- package/dist/knowledge/index.js +18 -8
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/gateways/opencode-session-header.d.ts +28 -0
- package/dist/llm/model/provider-types.generated.d.ts +7412 -7795
- package/dist/llm/model/resolve-model.d.ts +1 -0
- package/dist/llm/model/shared.types.d.ts +1 -0
- package/dist/{llm-ZA8oIVog.cjs → llm-B7ul27Ay.cjs} +32 -14
- package/dist/{llm-DCoDWje0.js → llm-Cy3WZXgA.js} +32 -14
- package/dist/loop/index.cjs +15 -15
- package/dist/loop/index.js +2 -2
- package/dist/loop/server.cjs +1 -1
- package/dist/loop/server.js +1 -1
- package/dist/{manager-oP6iB_H-.cjs → manager-CY-RzZJL.cjs} +21 -19
- package/dist/{manager-DSbR85XK.js → manager-Dsub5fyz.js} +9 -7
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.d.ts +33 -4
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-FEJ-anIN.cjs → mastra-DXQUuwFl.cjs} +116 -67
- package/dist/{mastra-RgFRZ_Az.js → mastra-yjoYfTS5.js} +76 -27
- package/dist/memory/index.cjs +24 -24
- package/dist/memory/index.js +2 -2
- package/dist/memory/mock.d.ts +2 -3
- package/dist/{model-opyZwnK3.cjs → model-BARBpXDN.cjs} +2 -2
- package/dist/{model-DSBVKOW8.js → model-DauH8JTo.js} +2 -2
- package/dist/{netlify-BqMGvc2s.js → netlify-BNBtKR4Q.js} +86 -4
- package/dist/{netlify-DzturPW3.cjs → netlify-DGsETiFB.cjs} +97 -3
- package/dist/notifications/index.cjs +18 -18
- package/dist/notifications/index.js +2 -2
- package/dist/observability/index.cjs +1 -1
- package/dist/observability/index.js +1 -1
- package/dist/{observability-D7RNOAPx.js → observability-DPDWibyH.js} +648 -648
- package/dist/{output-helpers-DgsH4aTb.cjs → output-helpers-By5FbLpp.cjs} +71 -73
- package/dist/{output-helpers-CVzhy1Y0.js → output-helpers-k2-48ssH.js} +72 -74
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +65 -65
- package/dist/processors/index.js +2 -2
- package/dist/{provider-registry-BcG2ooFa.js → provider-registry-CfHy4Zhw.js} +21401 -22401
- package/dist/{provider-registry-BZw14X9M.cjs → provider-registry-Y6tbfFhH.cjs} +21401 -22401
- package/dist/provider-registry.json +21940 -22961
- package/dist/{registry-generator-BrzPSCHS.cjs → registry-generator-BEJ0APNc.cjs} +1 -1
- package/dist/{registry-generator-CA4YBIHo.js → registry-generator-DJiQAI8V.js} +1 -1
- package/dist/{rehydrate-CfS6KkCr.cjs → rehydrate-4Sl7D3kO.cjs} +14 -14
- package/dist/{rehydrate-Chuw5IrY.js → rehydrate-Da4_E_N8.js} +2 -2
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +2 -2
- package/dist/{signal-provider-BslnAjWG.js → signal-provider-B_mfW-J4.js} +1 -1
- package/dist/{signal-provider-BFAvh_AJ.cjs → signal-provider-D9gbevHN.cjs} +1 -1
- package/dist/signals/index.cjs +3 -3
- package/dist/signals/index.js +3 -3
- package/dist/{signals-CbmgVwL-.cjs → signals-BwDXGqxc.cjs} +2 -2
- package/dist/{signals-Clupx3jz.js → signals-TznxWfM3.js} +2 -2
- package/dist/skills/create-skill.d.ts +3 -0
- package/dist/skills/index.cjs +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/inline-skill-source.d.ts +5 -1
- package/dist/skills/types.d.ts +16 -1
- package/dist/{source-DYZMfjv3.js → source-B3He4_mz.js} +1 -1
- package/dist/{source-BC8Et5qZ.cjs → source-C_nWbqI0.cjs} +1 -1
- package/dist/{state-processor-B9kxpM53.js → state-processor-B_KsS82m.js} +1 -1
- package/dist/{state-processor-kRNZ38Nf.cjs → state-processor-DaSmhVUX.cjs} +1 -1
- package/dist/storage/constants.cjs +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/agents/index.cjs +1 -1
- package/dist/storage/domains/agents/index.js +1 -1
- package/dist/storage/domains/inmemory-db.d.ts +1 -1
- package/dist/storage/domains/knowledge/pages.d.ts +8 -1
- package/dist/storage/domains/memory/base.d.ts +19 -9
- package/dist/storage/domains/memory/inmemory.d.ts +4 -1
- package/dist/storage/domains/memory/queue-thread.d.ts +7 -1
- package/dist/storage/domains/workflows/base.d.ts +18 -5
- package/dist/storage/domains/workflows/inmemory.d.ts +3 -5
- package/dist/storage/domains/workflows/journal.d.ts +16 -1
- package/dist/storage/index.cjs +187 -186
- package/dist/storage/index.js +6 -6
- package/dist/storage/workflow-snapshot.d.ts +4 -0
- package/dist/storage/workflow-step-guard.d.ts +5 -0
- package/dist/stream/base/output.d.ts +1 -0
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-DTpp9Tk-.js → stream-BFhCDJvz.js} +18 -8
- package/dist/{stream-CiXZtgym.cjs → stream-CZy8XA_q.cjs} +23 -7
- package/dist/telemetry/index.cjs +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/test-utils/llm-mock.cjs +1 -1
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/{tool-Z3bykc1m.js → tool-DIFduuTw.js} +2 -5
- package/dist/{tool-CYlT2UA-.cjs → tool-Dn9WSDVn.cjs} +2 -5
- package/dist/tool-loop-agent/index.cjs +1 -1
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/{tool-loop-agent-DtEg90Zj.cjs → tool-loop-agent-DifR6VLI.cjs} +4 -4
- package/dist/{tool-loop-agent-CqzgY98a.js → tool-loop-agent-SOpIJRws.js} +3 -3
- package/dist/{toolchecks-DrsZdc3S.js → toolchecks-CRAfUe9H.js} +1 -1
- package/dist/{toolchecks-MFU48cit.cjs → toolchecks-DbBsQGHW.cjs} +1 -1
- package/dist/tools/index.cjs +5 -5
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +5 -5
- package/dist/tools/is-vercel-tool.cjs +1 -1
- package/dist/tools/is-vercel-tool.js +1 -1
- package/dist/tools/tool.d.ts +2 -4
- package/dist/tools/types.d.ts +1 -0
- package/dist/{tools-BEYxowf0.cjs → tools-C2q0ougI.cjs} +1 -1
- package/dist/{tools-tPy2FwMI.js → tools-ybbz1YKg.js} +1 -1
- package/dist/{utils-B_y5EDSz.cjs → utils-BjFntMW_.cjs} +6 -5
- package/dist/{utils-tRzJ8Xfy.js → utils-DN_kWhH6.js} +6 -5
- package/dist/utils.cjs +3 -3
- package/dist/utils.js +3 -3
- package/dist/{validate-DpK_G9aa.cjs → validate-CBQ0dMBb.cjs} +1 -1
- package/dist/{validate-hFVBw9Sw.js → validate-KIBMWuyc.js} +1 -1
- package/dist/vector/index.cjs +8 -8
- package/dist/vector/index.js +1 -1
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/{worker-BFAw0uVe.js → worker-Bqg7bsxX.js} +8 -3
- package/dist/{worker-BhaB8pNL.cjs → worker-CJ_JYSy0.cjs} +3 -3
- package/dist/{worker-KkDudGwX.cjs → worker-Ct6E5_2p.cjs} +16 -11
- package/dist/{worker-m_uyOwiv.js → worker-DVM_pvH7.js} +2 -2
- package/dist/{workflow-Uroh6hlJ.js → workflow-BmShpn3p.js} +4 -4
- package/dist/{workflow-BwKfyvhR.cjs → workflow-DEAvg0pI.cjs} +8 -8
- package/dist/workflows/builder/index.cjs +1 -1
- package/dist/workflows/builder/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/evented/workflow-event-processor/index.d.ts +0 -2
- package/dist/workflows/evented/workflow.d.ts +2 -1
- package/dist/workflows/index.cjs +54 -54
- package/dist/workflows/index.js +4 -4
- package/dist/workflows/run-storage.d.ts +16 -1
- package/dist/workflows/types.d.ts +10 -0
- package/dist/workflows/workflow.d.ts +3 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/{workspace-CzzrnE6Q.cjs → workspace-BQD4tcQi.cjs} +3 -3
- package/dist/{workspace-Ct2kAiDv.js → workspace-sqcfdZRR.js} +2 -2
- package/package.json +9 -8
- package/skills/mastra/SKILL.md +171 -0
- package/skills/mastra/references/common-errors.md +557 -0
- package/skills/mastra/references/core-concepts.md +21 -0
- package/skills/mastra/references/create-mastra.md +233 -0
- package/skills/mastra/references/embedded-docs.md +103 -0
- package/skills/mastra/references/feedback.md +69 -0
- package/skills/mastra/references/gateway.md +66 -0
- package/skills/mastra/references/mastra-api.md +222 -0
- package/skills/mastra/references/migration-guide.md +185 -0
- package/skills/mastra/references/model-selection.md +29 -0
- package/skills/mastra/references/platform.md +164 -0
- package/skills/mastra/references/remote-docs.md +193 -0
- package/skills/mastra/references/trace-query.md +150 -0
- package/skills/mastra/scripts/provider-registry.mjs +271 -0
- package/src/llm/model/provider-types.generated.d.ts +7412 -7795
- package/dist/{observability-B0R_D1PZ.cjs → observability-VaoaeadK.cjs} +647 -647
package/dist/knowledge/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_base = require("../base-BIzR1D3_.cjs");
|
|
3
|
-
const
|
|
4
|
-
const require_tool = require("../tool-
|
|
3
|
+
const require_execution_fence = require("../execution-fence-fqV6FGdV.cjs");
|
|
4
|
+
const require_tool = require("../tool-Dn9WSDVn.cjs");
|
|
5
5
|
let crypto = require("crypto");
|
|
6
6
|
let _mastra_schema_compat_schema = require("@mastra/schema-compat/schema");
|
|
7
7
|
// src/knowledge/changes.ts
|
|
@@ -1273,7 +1273,7 @@ var ImportOverlay = class {
|
|
|
1273
1273
|
}
|
|
1274
1274
|
#livePage(id) {
|
|
1275
1275
|
const page = this.#page(id);
|
|
1276
|
-
if (!page || page.deletedAt || page.mergedInto) throw new
|
|
1276
|
+
if (!page || page.deletedAt || page.mergedInto) throw new require_execution_fence.KnowledgeNotFoundError("page", id);
|
|
1277
1277
|
return page;
|
|
1278
1278
|
}
|
|
1279
1279
|
/** Levels below the home scope, from the working copy's chain. */
|
|
@@ -1348,13 +1348,13 @@ var ImportOverlay = class {
|
|
|
1348
1348
|
const { positions, complete } = this.#state.rows;
|
|
1349
1349
|
if (this.#state.stalePositions.has(parentId)) {
|
|
1350
1350
|
if (!complete.has(parentId)) throw new KnowledgeImportBatchUnsupportedError("a position under a parent its last child left");
|
|
1351
|
-
return
|
|
1351
|
+
return require_execution_fence.knowledgePositionBetween(this.#children(parentId).at(-1)?.position);
|
|
1352
1352
|
}
|
|
1353
1353
|
if (!positions.has(parentId)) {
|
|
1354
1354
|
this.missing.positions.add(parentId);
|
|
1355
1355
|
throw new KnowledgeImportNotGatheredError(`last child position of ${parentId}`);
|
|
1356
1356
|
}
|
|
1357
|
-
return
|
|
1357
|
+
return require_execution_fence.knowledgePositionBetween(positions.get(parentId) ?? void 0);
|
|
1358
1358
|
}
|
|
1359
1359
|
/** A page left `parentId`: its next position is still the gathered one unless it was the last child. */
|
|
1360
1360
|
#left(parentId, position) {
|
|
@@ -1451,15 +1451,15 @@ var ImportOverlay = class {
|
|
|
1451
1451
|
if (rows().readOnce) throw new KnowledgeImportRereadRequiredError("createPage");
|
|
1452
1452
|
if (input.id !== void 0 || input.position !== void 0) throw new KnowledgeImportBatchUnsupportedError("createPage with id or position");
|
|
1453
1453
|
if (!input.name.trim()) throw new Error("Knowledge page name must not be empty");
|
|
1454
|
-
|
|
1454
|
+
require_execution_fence.assertKnowledgePageDescriptionWithinBound(input.description || void 0);
|
|
1455
1455
|
const parent = this.#livePage(input.parentId);
|
|
1456
1456
|
const scopeId = parent.isScope ? parent.id : parent.scopeId;
|
|
1457
1457
|
const id = (0, crypto.randomUUID)();
|
|
1458
1458
|
const depth = this.#depth(parent) + 1;
|
|
1459
|
-
if (depth > 10) throw new
|
|
1459
|
+
if (depth > 10) throw new require_execution_fence.KnowledgePageDepthError(id);
|
|
1460
1460
|
let path = null;
|
|
1461
1461
|
if (input.key !== void 0) {
|
|
1462
|
-
const problem =
|
|
1462
|
+
const problem = require_execution_fence.knowledgePageKeyProblem(input.key);
|
|
1463
1463
|
if (problem) throw new Error(problem);
|
|
1464
1464
|
const parentKeys = parent.isScope ? {
|
|
1465
1465
|
scopeId: parent.id,
|
|
@@ -1471,7 +1471,7 @@ var ImportOverlay = class {
|
|
|
1471
1471
|
scopeId,
|
|
1472
1472
|
path,
|
|
1473
1473
|
read: "all"
|
|
1474
|
-
})) throw new
|
|
1474
|
+
})) throw new require_execution_fence.KnowledgePageKeyConflictError(input.key, parent.id);
|
|
1475
1475
|
}
|
|
1476
1476
|
if (input.key !== void 0 && this.#state.freed.has(childKey(parent.id, input.key))) throw new KnowledgeImportBatchUnsupportedError("createPage at a key a move left");
|
|
1477
1477
|
const position = this.#nextPosition(parent.id);
|
|
@@ -1518,9 +1518,9 @@ var ImportOverlay = class {
|
|
|
1518
1518
|
},
|
|
1519
1519
|
updatePage: async (input) => {
|
|
1520
1520
|
const page = this.#livePage(input.id);
|
|
1521
|
-
if (page.version !== input.expectedVersion) throw new
|
|
1521
|
+
if (page.version !== input.expectedVersion) throw new require_execution_fence.KnowledgeConflictError(page.id);
|
|
1522
1522
|
if (input.name !== void 0 && !input.name.trim()) throw new Error("Knowledge page name must not be empty");
|
|
1523
|
-
|
|
1523
|
+
require_execution_fence.assertKnowledgePageDescriptionWithinBound(input.description || void 0);
|
|
1524
1524
|
const next = {
|
|
1525
1525
|
...page,
|
|
1526
1526
|
version: page.version + 1,
|
|
@@ -1561,7 +1561,7 @@ var ImportOverlay = class {
|
|
|
1561
1561
|
return Object.fromEntries(parentIds.map((id) => [id, this.#children(id).length]));
|
|
1562
1562
|
},
|
|
1563
1563
|
lockSubtree: async (rootId) => {
|
|
1564
|
-
if (rows().tooLarge.has(rootId)) throw new
|
|
1564
|
+
if (rows().tooLarge.has(rootId)) throw new require_execution_fence.KnowledgeMoveTooLargeError(rootId, 501);
|
|
1565
1565
|
const ids = [];
|
|
1566
1566
|
const parents = [rootId];
|
|
1567
1567
|
while (parents.length) {
|
|
@@ -1569,7 +1569,7 @@ var ImportOverlay = class {
|
|
|
1569
1569
|
ids.push(child.id);
|
|
1570
1570
|
parents.push(child.id);
|
|
1571
1571
|
}
|
|
1572
|
-
if (ids.length >= 500) throw new
|
|
1572
|
+
if (ids.length >= 500) throw new require_execution_fence.KnowledgeMoveTooLargeError(rootId, ids.length + 1);
|
|
1573
1573
|
}
|
|
1574
1574
|
const unlocked = ids.filter((id) => !rows().locked.has(id));
|
|
1575
1575
|
if (unlocked.length) {
|
|
@@ -1583,7 +1583,7 @@ var ImportOverlay = class {
|
|
|
1583
1583
|
if (input.position !== void 0) throw new KnowledgeImportBatchUnsupportedError("movePage with a position");
|
|
1584
1584
|
const page = this.#livePage(input.id);
|
|
1585
1585
|
if (page.isScope) throw new Error(`Knowledge scope page ${page.id} can't be moved`);
|
|
1586
|
-
if (page.version !== input.expectedVersion) throw new
|
|
1586
|
+
if (page.version !== input.expectedVersion) throw new require_execution_fence.KnowledgeConflictError(page.id);
|
|
1587
1587
|
const parent = this.#livePage(input.parentId);
|
|
1588
1588
|
const subtree = [];
|
|
1589
1589
|
const visit = (at, depth) => {
|
|
@@ -1595,14 +1595,14 @@ var ImportOverlay = class {
|
|
|
1595
1595
|
};
|
|
1596
1596
|
visit(page, 0);
|
|
1597
1597
|
if (subtree.some((entry) => entry.page.id === parent.id)) throw new Error(`Knowledge page ${page.id} can't move under itself or its own subtree`);
|
|
1598
|
-
if (subtree.length > 500) throw new
|
|
1598
|
+
if (subtree.length > 500) throw new require_execution_fence.KnowledgeMoveTooLargeError(page.id, subtree.length);
|
|
1599
1599
|
const parentDepth = parent.isScope ? 0 : this.#depth(parent);
|
|
1600
|
-
if (parentDepth + 1 + Math.max(...subtree.map((entry) => entry.depth)) > 10) throw new
|
|
1600
|
+
if (parentDepth + 1 + Math.max(...subtree.map((entry) => entry.depth)) > 10) throw new require_execution_fence.KnowledgePageDepthError(page.id);
|
|
1601
1601
|
const scopeId = parent.isScope ? parent.id : parent.scopeId;
|
|
1602
1602
|
if (scopeId !== page.scopeId) throw new KnowledgeImportBatchUnsupportedError("movePage across scopes");
|
|
1603
1603
|
const key = input.key ?? page.key;
|
|
1604
1604
|
if (input.key !== void 0) {
|
|
1605
|
-
const problem =
|
|
1605
|
+
const problem = require_execution_fence.knowledgePageKeyProblem(input.key);
|
|
1606
1606
|
if (problem) throw new Error(problem);
|
|
1607
1607
|
}
|
|
1608
1608
|
if (key !== void 0) {
|
|
@@ -1616,7 +1616,7 @@ var ImportOverlay = class {
|
|
|
1616
1616
|
path: [...parentKeys.path, key],
|
|
1617
1617
|
read: "all"
|
|
1618
1618
|
});
|
|
1619
|
-
if (clash && clash.id !== page.id) throw new
|
|
1619
|
+
if (clash && clash.id !== page.id) throw new require_execution_fence.KnowledgePageKeyConflictError(key, parent.id);
|
|
1620
1620
|
}
|
|
1621
1621
|
if (this.#state.moved.has(page.id)) throw new KnowledgeImportBatchUnsupportedError("a second move of a page");
|
|
1622
1622
|
const position = this.#nextPosition(parent.id);
|
|
@@ -1656,8 +1656,8 @@ var ImportOverlay = class {
|
|
|
1656
1656
|
if (rows().readOnce) throw new KnowledgeImportRereadRequiredError("deletePage");
|
|
1657
1657
|
const page = this.#livePage(input.id);
|
|
1658
1658
|
if (page.isScope) throw new Error(`Knowledge scope page ${page.id} can't be deleted`);
|
|
1659
|
-
if (page.version !== input.expectedVersion) throw new
|
|
1660
|
-
if (this.#children(page.id).length) throw new
|
|
1659
|
+
if (page.version !== input.expectedVersion) throw new require_execution_fence.KnowledgeConflictError(page.id);
|
|
1660
|
+
if (this.#children(page.id).length) throw new require_execution_fence.KnowledgePageHasChildrenError(page.id);
|
|
1661
1661
|
const at = now();
|
|
1662
1662
|
const deleted = {
|
|
1663
1663
|
...page,
|
|
@@ -1680,11 +1680,11 @@ var ImportOverlay = class {
|
|
|
1680
1680
|
},
|
|
1681
1681
|
addNote: async (input) => {
|
|
1682
1682
|
const page = this.#livePage(input.pageId);
|
|
1683
|
-
|
|
1683
|
+
require_execution_fence.assertKnowledgeNoteTextWithinBound(input.text);
|
|
1684
1684
|
if (input.mentions.length) throw new KnowledgeImportBatchUnsupportedError("addNote with mentions");
|
|
1685
1685
|
const notes = this.#notesOf(page.id);
|
|
1686
1686
|
const id = input.id ?? (0, crypto.randomUUID)();
|
|
1687
|
-
if (notes.some((note) => note.id === id)) throw new
|
|
1687
|
+
if (notes.some((note) => note.id === id)) throw new require_execution_fence.KnowledgeConflictError(id);
|
|
1688
1688
|
const at = now();
|
|
1689
1689
|
const note = {
|
|
1690
1690
|
id,
|
|
@@ -1716,7 +1716,7 @@ var ImportOverlay = class {
|
|
|
1716
1716
|
for (const [pageId, notes] of rows().notes) {
|
|
1717
1717
|
const note = notes.find((each) => each.id === input.id);
|
|
1718
1718
|
if (!note) continue;
|
|
1719
|
-
if (note.deletedAt) throw new
|
|
1719
|
+
if (note.deletedAt) throw new require_execution_fence.KnowledgeNotFoundError("note", input.id);
|
|
1720
1720
|
if (this.#state.writes.some((write) => write.op === "add-note" && write.id === input.id)) throw new KnowledgeImportBatchUnsupportedError("removeNote of a note this flush added");
|
|
1721
1721
|
const page = this.#livePage(pageId);
|
|
1722
1722
|
const at = now();
|
|
@@ -1856,7 +1856,7 @@ var ImportOverlay = class {
|
|
|
1856
1856
|
};
|
|
1857
1857
|
/** True when the stores implement every set-based method the batched flush needs. */
|
|
1858
1858
|
function canBatchImportFlush(storage, importers) {
|
|
1859
|
-
return !!(storage.getPageChains && storage.getPagesByPaths && storage.getLastChildPositions && storage.listNotesByPages && storage.getPageSubtrees && storage.applyPageWrites &&
|
|
1859
|
+
return !!(storage.getPageChains && storage.getPagesByPaths && storage.getLastChildPositions && storage.listNotesByPages && storage.getPageSubtrees && storage.applyPageWrites && require_execution_fence.canRepairKnowledgeLinksInBatch(storage) && importers.getNodes && importers.getNodesByPages && importers.writeNodes);
|
|
1860
1860
|
}
|
|
1861
1861
|
async function readImportRows(input) {
|
|
1862
1862
|
const { storage, importers, bindingId, missing } = input;
|
|
@@ -2200,7 +2200,7 @@ async function syncLinks(work) {
|
|
|
2200
2200
|
try {
|
|
2201
2201
|
await work();
|
|
2202
2202
|
} catch (error) {
|
|
2203
|
-
if (error instanceof
|
|
2203
|
+
if (error instanceof require_execution_fence.KnowledgeUnsupportedCapabilityError || error instanceof require_execution_fence.KnowledgeLinkRefreshIncompleteError) return;
|
|
2204
2204
|
throw error;
|
|
2205
2205
|
}
|
|
2206
2206
|
}
|
|
@@ -2265,8 +2265,8 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
2265
2265
|
return;
|
|
2266
2266
|
}
|
|
2267
2267
|
await syncLinks(async () => {
|
|
2268
|
-
if (sync) await
|
|
2269
|
-
if (refresh) await
|
|
2268
|
+
if (sync) await require_execution_fence.syncKnowledgePageBodyLinks(storage, sync);
|
|
2269
|
+
if (refresh) await require_execution_fence.refreshKnowledgeLinksTo(storage, refresh.pages, { withDescendants: refresh.withDescendants });
|
|
2270
2270
|
});
|
|
2271
2271
|
};
|
|
2272
2272
|
const target = parseKnowledgeImportTarget(binding.target);
|
|
@@ -2754,7 +2754,7 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
2754
2754
|
const targets = [];
|
|
2755
2755
|
const othersTargets = /* @__PURE__ */ new Map();
|
|
2756
2756
|
await storage.lockSubtree(page.id);
|
|
2757
|
-
for (const p of await
|
|
2757
|
+
for (const p of await require_execution_fence.knowledgeSubtree(storage, page)) {
|
|
2758
2758
|
const node = await importers.getNodeByPage(p.id);
|
|
2759
2759
|
if (!node) continue;
|
|
2760
2760
|
if (node.bindingId === binding.id) targets.push(node.sourceId);
|
|
@@ -3454,7 +3454,7 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
3454
3454
|
throw new BatchFallback(`node writes: ${error.name}`);
|
|
3455
3455
|
}
|
|
3456
3456
|
try {
|
|
3457
|
-
await
|
|
3457
|
+
await require_execution_fence.repairKnowledgeLinks(real.storage, {
|
|
3458
3458
|
synced: working.links.flatMap((work) => "sync" in work ? [work.sync] : []),
|
|
3459
3459
|
refreshed: working.links.flatMap((work) => "refresh" in work ? [{
|
|
3460
3460
|
page: work.refresh,
|
|
@@ -3462,8 +3462,8 @@ async function applyKnowledgeImportFlush(input) {
|
|
|
3462
3462
|
}] : [])
|
|
3463
3463
|
});
|
|
3464
3464
|
} catch (error) {
|
|
3465
|
-
if (error instanceof
|
|
3466
|
-
if (error instanceof
|
|
3465
|
+
if (error instanceof require_execution_fence.KnowledgeLinkRepairUnsupportedError) throw new BatchFallback(error.reason);
|
|
3466
|
+
if (error instanceof require_execution_fence.KnowledgeUnsupportedCapabilityError) throw new BatchFallback(`link repair: ${error.name}`);
|
|
3467
3467
|
throw error;
|
|
3468
3468
|
}
|
|
3469
3469
|
return null;
|
|
@@ -4091,7 +4091,7 @@ function transient(error) {
|
|
|
4091
4091
|
}
|
|
4092
4092
|
function hostError(error) {
|
|
4093
4093
|
if (error instanceof KnowledgeImporterHostConflictError || error instanceof KnowledgeImporterHostError) return error;
|
|
4094
|
-
if (error instanceof
|
|
4094
|
+
if (error instanceof require_execution_fence.KnowledgeImporterRunStateError) return runStateConflict(error);
|
|
4095
4095
|
const failure = new KnowledgeImporterHostError("The importer host could not apply the request; nothing was applied.", transient(error) ? 503 : 422);
|
|
4096
4096
|
failure.cause = error;
|
|
4097
4097
|
return failure;
|
|
@@ -4218,7 +4218,10 @@ function createLocalKnowledgeImporterHost(writer, options) {
|
|
|
4218
4218
|
* flushes and finish are refused as `run_not_active`; exact replays still return receipts.
|
|
4219
4219
|
*/
|
|
4220
4220
|
const staleAfter = leaseMs ?? options.staleRunAfterMs ?? DEFAULT_STALE_RUN_AFTER_MS;
|
|
4221
|
-
/**
|
|
4221
|
+
/**
|
|
4222
|
+
* Ends `run` if it isn't live; the caller holds the guard and the run's lock. The caller clears the
|
|
4223
|
+
* run's path-warning marker once its transaction commits: a rollback brings the run back.
|
|
4224
|
+
*/
|
|
4222
4225
|
const expireLocked = async (importers, run) => {
|
|
4223
4226
|
const why = lapsed(run, await clock(importers), staleAfter);
|
|
4224
4227
|
if (!why) return false;
|
|
@@ -4228,16 +4231,18 @@ function createLocalKnowledgeImporterHost(writer, options) {
|
|
|
4228
4231
|
finish,
|
|
4229
4232
|
status: finish.outcome === "canceled" ? "canceled" : "failed"
|
|
4230
4233
|
});
|
|
4231
|
-
pathWarned.delete(run.id);
|
|
4232
4234
|
return true;
|
|
4233
4235
|
};
|
|
4236
|
+
/** Ends the binding's runs that aren't live, returning the ones it ended. */
|
|
4234
4237
|
const reclaimStaleRuns = async (importers, bindingId) => {
|
|
4238
|
+
const ended = [];
|
|
4235
4239
|
for (const candidate of await importers.listRuns(bindingId)) {
|
|
4236
4240
|
if (candidate.status !== "running") continue;
|
|
4237
4241
|
const run = await importers.lockRun(candidate.id);
|
|
4238
4242
|
if (!run || run.status !== "running") continue;
|
|
4239
|
-
await expireLocked(importers, run);
|
|
4243
|
+
if (await expireLocked(importers, run)) ended.push(run.id);
|
|
4240
4244
|
}
|
|
4245
|
+
return ended;
|
|
4241
4246
|
};
|
|
4242
4247
|
/**
|
|
4243
4248
|
* Counts a settle flush that timed out, outside its rolled-back transaction. Best effort, and
|
|
@@ -4294,7 +4299,7 @@ function createLocalKnowledgeImporterHost(writer, options) {
|
|
|
4294
4299
|
importer: binding.importer,
|
|
4295
4300
|
target: binding.target
|
|
4296
4301
|
});
|
|
4297
|
-
await reclaimStaleRuns(importers, binding.id);
|
|
4302
|
+
const ended = await reclaimStaleRuns(importers, binding.id);
|
|
4298
4303
|
if (start?.admit) try {
|
|
4299
4304
|
await start.admit(unwrapKnowledgeStorage(tx));
|
|
4300
4305
|
} catch (error) {
|
|
@@ -4316,7 +4321,8 @@ function createLocalKnowledgeImporterHost(writer, options) {
|
|
|
4316
4321
|
const saved = run.status === "started" ? await importers.getState(binding.id) : {};
|
|
4317
4322
|
return {
|
|
4318
4323
|
run,
|
|
4319
|
-
state: Object.fromEntries(Object.entries(saved).filter(([key]) => !key.startsWith(RESERVED_STATE_PREFIX)))
|
|
4324
|
+
state: Object.fromEntries(Object.entries(saved).filter(([key]) => !key.startsWith(RESERVED_STATE_PREFIX))),
|
|
4325
|
+
ended
|
|
4320
4326
|
};
|
|
4321
4327
|
});
|
|
4322
4328
|
let result;
|
|
@@ -4327,6 +4333,7 @@ function createLocalKnowledgeImporterHost(writer, options) {
|
|
|
4327
4333
|
exclusive = true;
|
|
4328
4334
|
result = await attempt();
|
|
4329
4335
|
}
|
|
4336
|
+
for (const runId of result.ended) pathWarned.delete(runId);
|
|
4330
4337
|
if (result.run.status !== "started") return {
|
|
4331
4338
|
status: "skipped",
|
|
4332
4339
|
runId: result.run.run.id
|
|
@@ -4557,7 +4564,10 @@ function createLocalKnowledgeImporterHost(writer, options) {
|
|
|
4557
4564
|
await importers.lockWriterGuard("share");
|
|
4558
4565
|
const run = await importers.lockRun(runId);
|
|
4559
4566
|
return !!run && run.status === "running" && await expireLocked(importers, run);
|
|
4560
|
-
}))
|
|
4567
|
+
})) {
|
|
4568
|
+
expired.push(runId);
|
|
4569
|
+
pathWarned.delete(runId);
|
|
4570
|
+
}
|
|
4561
4571
|
return { expired };
|
|
4562
4572
|
} catch (error) {
|
|
4563
4573
|
throw hostError(error);
|
|
@@ -4875,7 +4885,7 @@ var KnowledgeScopeRuntime = class {
|
|
|
4875
4885
|
this.getStorage = getStorage;
|
|
4876
4886
|
this.warn = warn;
|
|
4877
4887
|
this.#config = structuredClone(declarations);
|
|
4878
|
-
this.#configCompiled =
|
|
4888
|
+
this.#configCompiled = require_execution_fence.compileKnowledgeScopes(structuredClone(declarations));
|
|
4879
4889
|
this.#resolved = {
|
|
4880
4890
|
stored: "{}",
|
|
4881
4891
|
compiled: this.#configCompiled,
|
|
@@ -4911,7 +4921,7 @@ var KnowledgeScopeRuntime = class {
|
|
|
4911
4921
|
...Object.fromEntries(entries)
|
|
4912
4922
|
};
|
|
4913
4923
|
try {
|
|
4914
|
-
compiled =
|
|
4924
|
+
compiled = require_execution_fence.compileKnowledgeScopes(structuredClone(next));
|
|
4915
4925
|
merged = next;
|
|
4916
4926
|
return true;
|
|
4917
4927
|
} catch (error) {
|
|
@@ -4964,7 +4974,7 @@ var KnowledgeScopeRuntime = class {
|
|
|
4964
4974
|
return entry;
|
|
4965
4975
|
}
|
|
4966
4976
|
validatePrincipals(principals) {
|
|
4967
|
-
for (const principal of principals) if (!this.compiled.match(principal)) throw new
|
|
4977
|
+
for (const principal of principals) if (!this.compiled.match(principal)) throw new require_execution_fence.KnowledgeDeclarationError(`Knowledge run scope "${principal}" does not match a declared scope type.`);
|
|
4968
4978
|
}
|
|
4969
4979
|
/**
|
|
4970
4980
|
* Fails when stored scope pages carry declaration keys neither the config nor the store declares: a
|
|
@@ -4997,19 +5007,19 @@ var KnowledgeScopeRuntime = class {
|
|
|
4997
5007
|
const stranded = orphans.filter(({ declaration }) => skippedKey(declaration) === key);
|
|
4998
5008
|
messages.push(`Knowledge skipped the store's scope declaration "${key}", so its stored scopes have none: ${list(stranded)}. ${this.#resolved.skipped.get(key)} Fix that declaration in the store, or declare the key, with its children, in scopes to override it.`);
|
|
4999
5009
|
}
|
|
5000
|
-
throw new
|
|
5010
|
+
throw new require_execution_fence.KnowledgeDeclarationError(messages.join(" "));
|
|
5001
5011
|
}
|
|
5002
5012
|
/** Re-keys stored scopes from declaration `from` to `to`. See {@link Knowledge.renameScopeDeclaration}. */
|
|
5003
5013
|
async renameScopeDeclaration(from, to) {
|
|
5004
|
-
if (this.compiled.declarations.has(from)) throw new
|
|
5005
|
-
if (!this.compiled.declarations.has(to)) throw new
|
|
5014
|
+
if (this.compiled.declarations.has(from)) throw new require_execution_fence.KnowledgeDeclarationError(`Can't rename scope declaration "${from}": it is still declared. Remove it from scopes first.`);
|
|
5015
|
+
if (!this.compiled.declarations.has(to)) throw new require_execution_fence.KnowledgeDeclarationError(`Can't rename scope declaration to "${to}": it isn't declared in scopes.`);
|
|
5006
5016
|
const renamed = await (await this.getStorage()).renameScopeDeclaration({
|
|
5007
5017
|
from,
|
|
5008
5018
|
to,
|
|
5009
5019
|
check: (scopes) => {
|
|
5010
5020
|
const mismatched = scopes.filter((scope) => this.compiled.match(scope.address)?.declaration !== scope.to);
|
|
5011
5021
|
if (mismatched.length === 0) return;
|
|
5012
|
-
throw new
|
|
5022
|
+
throw new require_execution_fence.KnowledgeDeclarationError(`Can't rename scope declaration "${from}" to "${to}": ` + mismatched.slice(0, 5).map((scope) => `"${scope.address}" doesn't match "${scope.to}"`).join(", ") + (mismatched.length > 5 ? `, and ${mismatched.length - 5} more` : "") + ". Nothing was renamed.");
|
|
5013
5023
|
}
|
|
5014
5024
|
});
|
|
5015
5025
|
this.#declarationsChecked = void 0;
|
|
@@ -5026,7 +5036,7 @@ var KnowledgeScopeRuntime = class {
|
|
|
5026
5036
|
}
|
|
5027
5037
|
#assertCurrent(scope) {
|
|
5028
5038
|
if (this.#isCurrent(scope)) return;
|
|
5029
|
-
throw new
|
|
5039
|
+
throw new require_execution_fence.KnowledgeDeclarationError(`Knowledge scope "${scope.address}" was created from "${scope.declaration}", which no longer matches it (scope params match one segment; encode colons in ids as %3A). It can't be used as a scope of "${this.compiled.match(scope.address)?.declaration}".`);
|
|
5030
5040
|
}
|
|
5031
5041
|
/** Refuses a stored scope row whose address now matches a different declaration, as materializing it would. */
|
|
5032
5042
|
assertCurrentScope(scope) {
|
|
@@ -5036,7 +5046,7 @@ var KnowledgeScopeRuntime = class {
|
|
|
5036
5046
|
this.validatePrincipals(principals);
|
|
5037
5047
|
await this.checkDeclarations();
|
|
5038
5048
|
const storage = await this.getStorage();
|
|
5039
|
-
const read = await
|
|
5049
|
+
const read = await require_execution_fence.knowledgeReadScopeFor(this.compiled, principals, async (addresses) => (await storage.getScopesByAddress(addresses)).filter((scope) => this.#isCurrent(scope)));
|
|
5040
5050
|
if (read.addresses.length === 0) return read;
|
|
5041
5051
|
const stale = new Set((await storage.getScopesByAddress(read.addresses)).filter((scope) => !this.#isCurrent(scope)).map((scope) => scope.address));
|
|
5042
5052
|
return stale.size ? {
|
|
@@ -5049,7 +5059,7 @@ var KnowledgeScopeRuntime = class {
|
|
|
5049
5059
|
if (!scope.isScope || !scope.address) throw new Error("Knowledge roles require a scope page.");
|
|
5050
5060
|
if (!this.#isCurrent(scope)) return null;
|
|
5051
5061
|
const storage = await this.getStorage();
|
|
5052
|
-
return
|
|
5062
|
+
return require_execution_fence.knowledgeRoleOn(this.compiled, principals, {
|
|
5053
5063
|
address: scope.address,
|
|
5054
5064
|
parentAddress: await this.#currentParentAddress(storage, scope)
|
|
5055
5065
|
});
|
|
@@ -5063,17 +5073,17 @@ var KnowledgeScopeRuntime = class {
|
|
|
5063
5073
|
return parent && this.#isCurrent(parent) ? parent.address ?? void 0 : void 0;
|
|
5064
5074
|
}
|
|
5065
5075
|
async explainAccess(runScopes, target) {
|
|
5066
|
-
const principals =
|
|
5076
|
+
const principals = require_execution_fence.knowledgeRunScopes(this.compiled, runScopes);
|
|
5067
5077
|
this.validatePrincipals(principals);
|
|
5068
5078
|
const storage = await this.getStorage();
|
|
5069
5079
|
let scope;
|
|
5070
5080
|
let page = null;
|
|
5071
5081
|
if ("scope" in target) {
|
|
5072
|
-
if (!this.compiled.match(target.scope)) throw new
|
|
5082
|
+
if (!this.compiled.match(target.scope)) throw new require_execution_fence.KnowledgeDeclarationError(`Knowledge scope "${target.scope}" does not match a declared scope type.`);
|
|
5073
5083
|
[scope] = await storage.getScopesByAddress([target.scope]);
|
|
5074
5084
|
} else {
|
|
5075
5085
|
if (target.page.indexOf("#") > 0) {
|
|
5076
|
-
const parsed =
|
|
5086
|
+
const parsed = require_execution_fence.parseKnowledgePageRef(target.page);
|
|
5077
5087
|
if (parsed) [scope] = await storage.getScopesByAddress([parsed.scope]);
|
|
5078
5088
|
page = parsed && scope ? await storage.getPageByPath({
|
|
5079
5089
|
scopeId: scope.id,
|
|
@@ -5098,12 +5108,12 @@ var KnowledgeScopeRuntime = class {
|
|
|
5098
5108
|
};
|
|
5099
5109
|
}
|
|
5100
5110
|
const address = scope?.address ?? target.scope;
|
|
5101
|
-
const reasons = scope && !this.#isCurrent(scope) ? [] :
|
|
5111
|
+
const reasons = scope && !this.#isCurrent(scope) ? [] : require_execution_fence.knowledgeAccessGrants(this.compiled, principals, {
|
|
5102
5112
|
address,
|
|
5103
5113
|
parentAddress: scope ? await this.#currentParentAddress(storage, scope) : void 0
|
|
5104
5114
|
});
|
|
5105
5115
|
let role = null;
|
|
5106
|
-
for (const reason of reasons) role =
|
|
5116
|
+
for (const reason of reasons) role = require_execution_fence.strongerKnowledgeRole(role, reason.role);
|
|
5107
5117
|
return {
|
|
5108
5118
|
role,
|
|
5109
5119
|
reasons,
|
|
@@ -5227,8 +5237,8 @@ var KnowledgeScopeRuntime = class {
|
|
|
5227
5237
|
}
|
|
5228
5238
|
async #materialize(address, principals, provenance, ancestors, run) {
|
|
5229
5239
|
const match = this.compiled.match(address);
|
|
5230
|
-
if (!match) throw new
|
|
5231
|
-
if (ancestors.includes(address)) throw new
|
|
5240
|
+
if (!match) throw new require_execution_fence.KnowledgeDeclarationError(`Knowledge scope "${address}" does not match a declared scope type.`);
|
|
5241
|
+
if (ancestors.includes(address)) throw new require_execution_fence.KnowledgeDeclarationError(`Knowledge scope placement cycle at "${address}".`);
|
|
5232
5242
|
const storage = run.storage ?? await this.getStorage();
|
|
5233
5243
|
const known = run.known;
|
|
5234
5244
|
const lookUp = async (scope) => known?.looked.has(scope) || known?.byAddress.has(scope) ? known.byAddress.get(scope) : (await storage.getScopesByAddress([scope]))[0];
|
|
@@ -5280,7 +5290,7 @@ var KnowledgeScopeRuntime = class {
|
|
|
5280
5290
|
});
|
|
5281
5291
|
this.#assertCurrent(result.scope);
|
|
5282
5292
|
if (!existing || result.created || templateCount > 0 || match.compiled.children.length > 0 || result.scope.parentId !== existing.parentId) run.wrote = true;
|
|
5283
|
-
if (result.created) await
|
|
5293
|
+
if (result.created) await require_execution_fence.updateKnowledgeLinks(this.warn, () => require_execution_fence.refreshKnowledgeLinksTo(storage, [result.scope], { withDescendants: true }));
|
|
5284
5294
|
if (result.parentConflict) this.warn(`Knowledge scope "${address}" was already linked by another run; keeping its persisted parent.`);
|
|
5285
5295
|
if (run.known) {
|
|
5286
5296
|
run.known.byAddress.set(address, result.scope);
|
|
@@ -5304,7 +5314,7 @@ var KnowledgeScopeRuntime = class {
|
|
|
5304
5314
|
/** Most scope pages one tree or ancestor walk looks at before it stops and reports truncation. */
|
|
5305
5315
|
const MAX_KNOWLEDGE_EXPLORER_SCOPE_SCAN = 1e3;
|
|
5306
5316
|
function scopeVisible(page, read) {
|
|
5307
|
-
return page.isScope &&
|
|
5317
|
+
return page.isScope && require_execution_fence.knowledgeScopeReadable(page, read);
|
|
5308
5318
|
}
|
|
5309
5319
|
async function allChildScopes(store, parentId, budget) {
|
|
5310
5320
|
const scopes = [];
|
|
@@ -5402,7 +5412,7 @@ async function withChildCounts(store, pages, read) {
|
|
|
5402
5412
|
read
|
|
5403
5413
|
});
|
|
5404
5414
|
} catch (error) {
|
|
5405
|
-
if (error instanceof
|
|
5415
|
+
if (error instanceof require_execution_fence.KnowledgeUnsupportedCapabilityError) return {
|
|
5406
5416
|
pages,
|
|
5407
5417
|
truncated: false
|
|
5408
5418
|
};
|
|
@@ -5468,13 +5478,13 @@ async function pageByIdOrRef(store, ref, read) {
|
|
|
5468
5478
|
read
|
|
5469
5479
|
});
|
|
5470
5480
|
if (byId || !ref.includes(":")) return byId;
|
|
5471
|
-
const parsed = ref.includes("#") ?
|
|
5481
|
+
const parsed = ref.includes("#") ? require_execution_fence.parseKnowledgePageRef(ref) : {
|
|
5472
5482
|
scope: ref,
|
|
5473
5483
|
path: []
|
|
5474
5484
|
};
|
|
5475
5485
|
if (!parsed) return null;
|
|
5476
5486
|
const [scope] = await store.getScopesByAddress([parsed.scope]);
|
|
5477
|
-
if (!scope || !
|
|
5487
|
+
if (!scope || !require_execution_fence.knowledgeScopeReadable(scope, read)) return null;
|
|
5478
5488
|
if (parsed.path.length === 0) return store.getPage({
|
|
5479
5489
|
id: scope.id,
|
|
5480
5490
|
read
|
|
@@ -5546,7 +5556,7 @@ async function countInBatches(pages, count) {
|
|
|
5546
5556
|
try {
|
|
5547
5557
|
for (let start = 0; start < pages.length; start += 100) Object.assign(counts, await count(pages.slice(start, start + 100).map((page) => page.id)));
|
|
5548
5558
|
} catch (error) {
|
|
5549
|
-
if (error instanceof
|
|
5559
|
+
if (error instanceof require_execution_fence.KnowledgeUnsupportedCapabilityError) return null;
|
|
5550
5560
|
throw error;
|
|
5551
5561
|
}
|
|
5552
5562
|
return counts;
|
|
@@ -5768,7 +5778,7 @@ async function readKnowledgeScopeGrants(store, input) {
|
|
|
5768
5778
|
for (const grant of wanted) {
|
|
5769
5779
|
const scope = scopes.get(grant.principal);
|
|
5770
5780
|
if (scope) {
|
|
5771
|
-
if (
|
|
5781
|
+
if (require_execution_fence.knowledgeScopeReadable(scope, read)) grants.push({
|
|
5772
5782
|
...grant,
|
|
5773
5783
|
principalId: scope.id
|
|
5774
5784
|
});
|
|
@@ -5795,7 +5805,7 @@ async function readKnowledgePageLinkCounts(store, input) {
|
|
|
5795
5805
|
read: input.read
|
|
5796
5806
|
});
|
|
5797
5807
|
} catch (error) {
|
|
5798
|
-
if (error instanceof
|
|
5808
|
+
if (error instanceof require_execution_fence.KnowledgeUnsupportedCapabilityError) return null;
|
|
5799
5809
|
throw error;
|
|
5800
5810
|
}
|
|
5801
5811
|
}
|
|
@@ -5821,7 +5831,7 @@ async function readKnowledgePageLinks(store, input) {
|
|
|
5821
5831
|
limit: 201
|
|
5822
5832
|
});
|
|
5823
5833
|
} catch (error) {
|
|
5824
|
-
if (error instanceof
|
|
5834
|
+
if (error instanceof require_execution_fence.KnowledgeUnsupportedCapabilityError) return null;
|
|
5825
5835
|
throw error;
|
|
5826
5836
|
}
|
|
5827
5837
|
const truncated = listed.length > 200;
|
|
@@ -5881,7 +5891,7 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
5881
5891
|
component: "STORAGE",
|
|
5882
5892
|
name: config?.name ?? config?.id ?? "Knowledge"
|
|
5883
5893
|
});
|
|
5884
|
-
if (!config?.scopes || typeof config.scopes !== "object") throw new
|
|
5894
|
+
if (!config?.scopes || typeof config.scopes !== "object") throw new require_execution_fence.KnowledgeDeclarationError("Knowledge needs `scopes`: declare the scopes its runs hold, e.g. `scopes: { ...knowledgeMemoryScopes() }`, or `{}` for none.");
|
|
5885
5895
|
this.id = config.id ?? (0, crypto.randomUUID)();
|
|
5886
5896
|
this.description = config.description;
|
|
5887
5897
|
const tools = config.tools;
|
|
@@ -5907,13 +5917,13 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
5907
5917
|
}
|
|
5908
5918
|
this.#importers = config.importers;
|
|
5909
5919
|
if (Boolean(config.vector) !== Boolean(config.embedder)) throw new Error("Knowledge semantic search needs both `vector` and `embedder`; pass both or neither.");
|
|
5910
|
-
if (config.vector && config.embedder) this.#semantic = new
|
|
5920
|
+
if (config.vector && config.embedder) this.#semantic = new require_execution_fence.KnowledgeSemanticIndex(config.vector, config.embedder, config.embedderOptions);
|
|
5911
5921
|
this.#runtime = new KnowledgeScopeRuntime(config.scopes, () => this.getStorage(), (message) => this.logger.warn(message));
|
|
5912
5922
|
if (this.#pins) this.#warnOnPinOvercommit(this.#pins);
|
|
5913
5923
|
this.hasOwnStorage = config.storage !== void 0;
|
|
5914
5924
|
if (config.storage) {
|
|
5915
|
-
this.#storageSource =
|
|
5916
|
-
this.#storage =
|
|
5925
|
+
this.#storageSource = require_execution_fence.getStorageSource(config.storage);
|
|
5926
|
+
this.#storage = require_execution_fence.augmentWithInit(config.storage);
|
|
5917
5927
|
}
|
|
5918
5928
|
}
|
|
5919
5929
|
/**
|
|
@@ -5961,9 +5971,9 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
5961
5971
|
*/
|
|
5962
5972
|
scopeGrants(scope) {
|
|
5963
5973
|
const strongest = /* @__PURE__ */ new Map();
|
|
5964
|
-
for (const grant of
|
|
5974
|
+
for (const grant of require_execution_fence.knowledgeAccessGrants(this.#runtime.compiled, "any", scope)) {
|
|
5965
5975
|
if (grant.via === "self") continue;
|
|
5966
|
-
strongest.set(grant.principal,
|
|
5976
|
+
strongest.set(grant.principal, require_execution_fence.strongerKnowledgeRole(strongest.get(grant.principal) ?? null, grant.role));
|
|
5967
5977
|
}
|
|
5968
5978
|
return [...strongest].map(([principal, role]) => ({
|
|
5969
5979
|
principal,
|
|
@@ -5997,7 +6007,7 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
5997
6007
|
/** Tools for explicit wiring; defaults to the groups configured on this Knowledge. */
|
|
5998
6008
|
createTools(options) {
|
|
5999
6009
|
const principals = options?.principals ? this.#hostPrincipals(options.principals) : void 0;
|
|
6000
|
-
return
|
|
6010
|
+
return require_execution_fence.buildKnowledgePageTools({
|
|
6001
6011
|
runtime: this.#runtime,
|
|
6002
6012
|
getStorage: () => this.getStorage(),
|
|
6003
6013
|
semantic: this.#semantic,
|
|
@@ -6006,7 +6016,7 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6006
6016
|
...principals ? { principals } : {},
|
|
6007
6017
|
...options?.author ? { author: options.author } : {},
|
|
6008
6018
|
...options?.requireExpectedVersion ? { requireExpectedVersion: true } : {}
|
|
6009
|
-
}, this.#groups(options), (context) => context?.requestContext?.delete?.(
|
|
6019
|
+
}, this.#groups(options), (context) => context?.requestContext?.delete?.(require_execution_fence.PINNED_READ_MEMO_KEY));
|
|
6010
6020
|
}
|
|
6011
6021
|
/**
|
|
6012
6022
|
* Creates or updates the page at `scope#path`, for apps that sync content in from outside an agent
|
|
@@ -6022,7 +6032,7 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6022
6032
|
* @experimental
|
|
6023
6033
|
*/
|
|
6024
6034
|
upsertPage(input) {
|
|
6025
|
-
return
|
|
6035
|
+
return require_execution_fence.upsertKnowledgePage(this.#hostWriter(), input);
|
|
6026
6036
|
}
|
|
6027
6037
|
/**
|
|
6028
6038
|
* Deletes the page at `scope#path`; `null` when there is none. Refuses a page with child pages
|
|
@@ -6034,7 +6044,7 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6034
6044
|
* @experimental
|
|
6035
6045
|
*/
|
|
6036
6046
|
removePage(input) {
|
|
6037
|
-
return
|
|
6047
|
+
return require_execution_fence.removeKnowledgePage(this.#hostWriter(), input);
|
|
6038
6048
|
}
|
|
6039
6049
|
/**
|
|
6040
6050
|
* Moves the page at `scope#path`, with its subtree, under the page at `parent` (a key path; left
|
|
@@ -6048,7 +6058,7 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6048
6058
|
* @experimental
|
|
6049
6059
|
*/
|
|
6050
6060
|
movePage(input) {
|
|
6051
|
-
return
|
|
6061
|
+
return require_execution_fence.moveKnowledgePage(this.#hostWriter(), input);
|
|
6052
6062
|
}
|
|
6053
6063
|
/**
|
|
6054
6064
|
* Adds a note to the page at `scope#path`; throws when there is no page there. Readers of the
|
|
@@ -6058,7 +6068,7 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6058
6068
|
* @experimental
|
|
6059
6069
|
*/
|
|
6060
6070
|
addNote(input) {
|
|
6061
|
-
return
|
|
6071
|
+
return require_execution_fence.addKnowledgeNote(this.#hostWriter(), input);
|
|
6062
6072
|
}
|
|
6063
6073
|
/**
|
|
6064
6074
|
* Replaces a note's text. Notes are immutable, so this adds the new note and then removes the old
|
|
@@ -6068,7 +6078,7 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6068
6078
|
* @experimental
|
|
6069
6079
|
*/
|
|
6070
6080
|
updateNote(input) {
|
|
6071
|
-
return
|
|
6081
|
+
return require_execution_fence.updateKnowledgeNote(this.#hostWriter(), input);
|
|
6072
6082
|
}
|
|
6073
6083
|
/**
|
|
6074
6084
|
* Removes a note; `null` when it is already gone. Host-only, like {@link Knowledge.upsertPage}.
|
|
@@ -6076,7 +6086,7 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6076
6086
|
* @experimental
|
|
6077
6087
|
*/
|
|
6078
6088
|
removeNote(input) {
|
|
6079
|
-
return
|
|
6089
|
+
return require_execution_fence.removeKnowledgeNote(this.#hostWriter(), input);
|
|
6080
6090
|
}
|
|
6081
6091
|
/**
|
|
6082
6092
|
* The app's importers: `host` applies flushes to this Knowledge's storage, and `run` runs one
|
|
@@ -6117,7 +6127,7 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6117
6127
|
* @experimental
|
|
6118
6128
|
*/
|
|
6119
6129
|
async reindexLinks() {
|
|
6120
|
-
return
|
|
6130
|
+
return require_execution_fence.reindexKnowledgeLinks(await this.getStorage());
|
|
6121
6131
|
}
|
|
6122
6132
|
/**
|
|
6123
6133
|
* Embeds pages and notes that already exist, without changing them: content written before a
|
|
@@ -6138,7 +6148,7 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6138
6148
|
}
|
|
6139
6149
|
/** The usage block that goes with `createTools(options)`. */
|
|
6140
6150
|
getInstructions(options) {
|
|
6141
|
-
return
|
|
6151
|
+
return require_execution_fence.buildKnowledgeInstructions(this.#groups(options), this.#instructions);
|
|
6142
6152
|
}
|
|
6143
6153
|
/** Whether attached agents get pinned context delivered every turn. */
|
|
6144
6154
|
get pinnedContextEnabled() {
|
|
@@ -6165,9 +6175,9 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6165
6175
|
async __principalsKey(context) {
|
|
6166
6176
|
await this.#runtime.resolve();
|
|
6167
6177
|
try {
|
|
6168
|
-
return
|
|
6178
|
+
return require_execution_fence.knowledgeRunPrincipals(this.#runtime, context).sort().join("\n");
|
|
6169
6179
|
} catch (error) {
|
|
6170
|
-
if (error instanceof
|
|
6180
|
+
if (error instanceof require_execution_fence.KnowledgeRunScopesError || error instanceof require_execution_fence.KnowledgeDeclarationError) return void 0;
|
|
6171
6181
|
throw error;
|
|
6172
6182
|
}
|
|
6173
6183
|
}
|
|
@@ -6181,8 +6191,8 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6181
6191
|
const principals = this.#hostPrincipals(options.principals);
|
|
6182
6192
|
const budget = this.#pins || resolvePins(true);
|
|
6183
6193
|
if (!budget) return [];
|
|
6184
|
-
const run = await
|
|
6185
|
-
return
|
|
6194
|
+
const run = await require_execution_fence.KnowledgeRun.start(this.#runtime, await this.getStorage(), void 0, { principals });
|
|
6195
|
+
return require_execution_fence.knowledgeDeliveredPins(run, budget, this.#groups({ read: options.read }).read);
|
|
6186
6196
|
}
|
|
6187
6197
|
#hostPrincipals(principals) {
|
|
6188
6198
|
const unique = [...new Set(principals)];
|
|
@@ -6193,13 +6203,13 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6193
6203
|
async __deliveredPins(context) {
|
|
6194
6204
|
const budget = this.#pins || resolvePins(true);
|
|
6195
6205
|
if (!budget) return [];
|
|
6196
|
-
const run = await
|
|
6197
|
-
return
|
|
6206
|
+
const run = await require_execution_fence.KnowledgeRun.start(this.#runtime, await this.getStorage(), context);
|
|
6207
|
+
return require_execution_fence.knowledgeDeliveredPins(run, budget, this.#groups().read);
|
|
6198
6208
|
}
|
|
6199
6209
|
/** The scopes a run holds a role on this turn, with that role. @internal */
|
|
6200
6210
|
async __heldScopes(context) {
|
|
6201
|
-
const run = await
|
|
6202
|
-
return (await
|
|
6211
|
+
const run = await require_execution_fence.KnowledgeRun.start(this.#runtime, await this.getStorage(), context);
|
|
6212
|
+
return (await require_execution_fence.heldScopes(run)).flatMap(({ address, role }) => role ? [{
|
|
6203
6213
|
address,
|
|
6204
6214
|
role
|
|
6205
6215
|
}] : []);
|
|
@@ -6216,7 +6226,7 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6216
6226
|
}
|
|
6217
6227
|
/** @internal */
|
|
6218
6228
|
__usesStorage(storage) {
|
|
6219
|
-
const source =
|
|
6229
|
+
const source = require_execution_fence.getStorageSource(storage);
|
|
6220
6230
|
if (this.#storageSource === source) return true;
|
|
6221
6231
|
const domain = this.#storageSource?.stores?.knowledge;
|
|
6222
6232
|
const sourceDomain = source.stores?.knowledge;
|
|
@@ -6225,8 +6235,8 @@ var Knowledge = class extends require_base.MastraBase {
|
|
|
6225
6235
|
/** @internal */
|
|
6226
6236
|
setStorage(storage, source = storage) {
|
|
6227
6237
|
if (this.hasOwnStorage) return;
|
|
6228
|
-
this.#storageSource =
|
|
6229
|
-
this.#storage =
|
|
6238
|
+
this.#storageSource = require_execution_fence.getStorageSource(source);
|
|
6239
|
+
this.#storage = require_execution_fence.augmentWithInit(storage);
|
|
6230
6240
|
this.#storagePromise = void 0;
|
|
6231
6241
|
}
|
|
6232
6242
|
async getStorage() {
|
|
@@ -6321,90 +6331,90 @@ function createKnowledgeImporterHost(knowledge, options) {
|
|
|
6321
6331
|
return createLocalKnowledgeImporterHost(hostWriterOf(knowledge), options);
|
|
6322
6332
|
}
|
|
6323
6333
|
exports.DEFAULT_KNOWLEDGE_PAGE_GRAPH_LIMITS = DEFAULT_KNOWLEDGE_PAGE_GRAPH_LIMITS;
|
|
6324
|
-
exports.InMemoryKnowledgeStorage =
|
|
6334
|
+
exports.InMemoryKnowledgeStorage = require_execution_fence.InMemoryKnowledgeStorage;
|
|
6325
6335
|
exports.KNOWLEDGE_IMPORTER_ERROR_CODES = KNOWLEDGE_IMPORTER_ERROR_CODES;
|
|
6326
6336
|
exports.KNOWLEDGE_IMPORT_REMOVED_PARENT_BODY = REMOVED_PARENT_BODY;
|
|
6327
|
-
exports.KNOWLEDGE_STORAGE_CONTRACT_VERSION =
|
|
6328
|
-
exports.KNOWLEDGE_STORAGE_SCHEMA_VERSION =
|
|
6337
|
+
exports.KNOWLEDGE_STORAGE_CONTRACT_VERSION = require_execution_fence.KNOWLEDGE_STORAGE_CONTRACT_VERSION;
|
|
6338
|
+
exports.KNOWLEDGE_STORAGE_SCHEMA_VERSION = require_execution_fence.KNOWLEDGE_STORAGE_SCHEMA_VERSION;
|
|
6329
6339
|
exports.Knowledge = Knowledge;
|
|
6330
|
-
exports.KnowledgeConflictError =
|
|
6331
|
-
exports.KnowledgeDeclarationError =
|
|
6340
|
+
exports.KnowledgeConflictError = require_execution_fence.KnowledgeConflictError;
|
|
6341
|
+
exports.KnowledgeDeclarationError = require_execution_fence.KnowledgeDeclarationError;
|
|
6332
6342
|
exports.KnowledgeImporter = KnowledgeImporter;
|
|
6333
6343
|
exports.KnowledgeImporterBase = KnowledgeImporterBase;
|
|
6334
|
-
exports.KnowledgeImporterBindingConflictError =
|
|
6344
|
+
exports.KnowledgeImporterBindingConflictError = require_execution_fence.KnowledgeImporterBindingConflictError;
|
|
6335
6345
|
exports.KnowledgeImporterCredentialsError = KnowledgeImporterCredentialsError;
|
|
6336
6346
|
exports.KnowledgeImporterDefinitionError = KnowledgeImporterDefinitionError;
|
|
6337
6347
|
exports.KnowledgeImporterHostConflictError = KnowledgeImporterHostConflictError;
|
|
6338
6348
|
exports.KnowledgeImporterHostError = KnowledgeImporterHostError;
|
|
6339
|
-
exports.KnowledgeImporterRunStateError =
|
|
6349
|
+
exports.KnowledgeImporterRunStateError = require_execution_fence.KnowledgeImporterRunStateError;
|
|
6340
6350
|
exports.KnowledgeImporterSettingsError = KnowledgeImporterSettingsError;
|
|
6341
6351
|
exports.KnowledgeImporterSourceError = KnowledgeImporterSourceError;
|
|
6342
|
-
exports.KnowledgeImportersStorage =
|
|
6343
|
-
exports.KnowledgeInvalidCursorError =
|
|
6344
|
-
exports.KnowledgeMoveTooLargeError =
|
|
6345
|
-
exports.KnowledgeNotFoundError =
|
|
6346
|
-
exports.KnowledgePageDepthError =
|
|
6347
|
-
exports.KnowledgePageHasChildrenError =
|
|
6348
|
-
exports.KnowledgePageKeyConflictError =
|
|
6349
|
-
exports.KnowledgeSchemaResetRequiredError =
|
|
6350
|
-
exports.KnowledgeStorage =
|
|
6351
|
-
exports.KnowledgeTransactionDeadlineError =
|
|
6352
|
-
exports.KnowledgeUnsupportedCapabilityError =
|
|
6352
|
+
exports.KnowledgeImportersStorage = require_execution_fence.KnowledgeImportersStorage;
|
|
6353
|
+
exports.KnowledgeInvalidCursorError = require_execution_fence.KnowledgeInvalidCursorError;
|
|
6354
|
+
exports.KnowledgeMoveTooLargeError = require_execution_fence.KnowledgeMoveTooLargeError;
|
|
6355
|
+
exports.KnowledgeNotFoundError = require_execution_fence.KnowledgeNotFoundError;
|
|
6356
|
+
exports.KnowledgePageDepthError = require_execution_fence.KnowledgePageDepthError;
|
|
6357
|
+
exports.KnowledgePageHasChildrenError = require_execution_fence.KnowledgePageHasChildrenError;
|
|
6358
|
+
exports.KnowledgePageKeyConflictError = require_execution_fence.KnowledgePageKeyConflictError;
|
|
6359
|
+
exports.KnowledgeSchemaResetRequiredError = require_execution_fence.KnowledgeSchemaResetRequiredError;
|
|
6360
|
+
exports.KnowledgeStorage = require_execution_fence.KnowledgeStorage;
|
|
6361
|
+
exports.KnowledgeTransactionDeadlineError = require_execution_fence.KnowledgeTransactionDeadlineError;
|
|
6362
|
+
exports.KnowledgeUnsupportedCapabilityError = require_execution_fence.KnowledgeUnsupportedCapabilityError;
|
|
6353
6363
|
exports.MAX_KNOWLEDGE_EXPLORER_PAGE_LINKS = MAX_KNOWLEDGE_EXPLORER_PAGE_LINKS;
|
|
6354
6364
|
exports.MAX_KNOWLEDGE_LINK_COUNT_PAGES = MAX_KNOWLEDGE_LINK_COUNT_PAGES;
|
|
6355
|
-
exports.MAX_KNOWLEDGE_MOVE_PAGES =
|
|
6356
|
-
exports.MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH =
|
|
6357
|
-
exports.MAX_KNOWLEDGE_NOTE_TOKENS =
|
|
6358
|
-
exports.MAX_KNOWLEDGE_PAGE_BODY_LINKS =
|
|
6359
|
-
exports.MAX_KNOWLEDGE_PAGE_DEPTH =
|
|
6360
|
-
exports.MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS =
|
|
6361
|
-
exports.MAX_KNOWLEDGE_PAGE_LINKS =
|
|
6362
|
-
exports.MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH =
|
|
6363
|
-
exports.MAX_KNOWLEDGE_PAGE_LIST_LIMIT =
|
|
6364
|
-
exports.MAX_KNOWLEDGE_PIN_LIST_DEPTH =
|
|
6365
|
-
exports.MAX_KNOWLEDGE_RECORD_TEXT_LENGTH =
|
|
6366
|
-
exports.MAX_KNOWLEDGE_SCOPE_TAGS =
|
|
6367
|
-
exports.assertKnowledgeCeilingRaised =
|
|
6368
|
-
exports.assertKnowledgeDescriptionWithinBound =
|
|
6369
|
-
exports.assertKnowledgeNoteTextWithinBound =
|
|
6370
|
-
exports.assertKnowledgePageDescriptionWithinBound =
|
|
6371
|
-
exports.assertKnowledgeRecordTextWithinBound =
|
|
6372
|
-
exports.assertKnowledgeSchemaCompatible =
|
|
6373
|
-
exports.assertKnowledgeScopeWithinCeiling =
|
|
6365
|
+
exports.MAX_KNOWLEDGE_MOVE_PAGES = require_execution_fence.MAX_KNOWLEDGE_MOVE_PAGES;
|
|
6366
|
+
exports.MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH = require_execution_fence.MAX_KNOWLEDGE_NODE_DESCRIPTION_LENGTH;
|
|
6367
|
+
exports.MAX_KNOWLEDGE_NOTE_TOKENS = require_execution_fence.MAX_KNOWLEDGE_NOTE_TOKENS;
|
|
6368
|
+
exports.MAX_KNOWLEDGE_PAGE_BODY_LINKS = require_execution_fence.MAX_KNOWLEDGE_PAGE_BODY_LINKS;
|
|
6369
|
+
exports.MAX_KNOWLEDGE_PAGE_DEPTH = require_execution_fence.MAX_KNOWLEDGE_PAGE_DEPTH;
|
|
6370
|
+
exports.MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS = require_execution_fence.MAX_KNOWLEDGE_PAGE_DESCRIPTION_TOKENS;
|
|
6371
|
+
exports.MAX_KNOWLEDGE_PAGE_LINKS = require_execution_fence.MAX_KNOWLEDGE_PAGE_LINKS;
|
|
6372
|
+
exports.MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH = require_execution_fence.MAX_KNOWLEDGE_PAGE_LINK_REF_LENGTH;
|
|
6373
|
+
exports.MAX_KNOWLEDGE_PAGE_LIST_LIMIT = require_execution_fence.MAX_KNOWLEDGE_PAGE_LIST_LIMIT;
|
|
6374
|
+
exports.MAX_KNOWLEDGE_PIN_LIST_DEPTH = require_execution_fence.MAX_KNOWLEDGE_PIN_LIST_DEPTH;
|
|
6375
|
+
exports.MAX_KNOWLEDGE_RECORD_TEXT_LENGTH = require_execution_fence.MAX_KNOWLEDGE_RECORD_TEXT_LENGTH;
|
|
6376
|
+
exports.MAX_KNOWLEDGE_SCOPE_TAGS = require_execution_fence.MAX_KNOWLEDGE_SCOPE_TAGS;
|
|
6377
|
+
exports.assertKnowledgeCeilingRaised = require_execution_fence.assertKnowledgeCeilingRaised;
|
|
6378
|
+
exports.assertKnowledgeDescriptionWithinBound = require_execution_fence.assertKnowledgeDescriptionWithinBound;
|
|
6379
|
+
exports.assertKnowledgeNoteTextWithinBound = require_execution_fence.assertKnowledgeNoteTextWithinBound;
|
|
6380
|
+
exports.assertKnowledgePageDescriptionWithinBound = require_execution_fence.assertKnowledgePageDescriptionWithinBound;
|
|
6381
|
+
exports.assertKnowledgeRecordTextWithinBound = require_execution_fence.assertKnowledgeRecordTextWithinBound;
|
|
6382
|
+
exports.assertKnowledgeSchemaCompatible = require_execution_fence.assertKnowledgeSchemaCompatible;
|
|
6383
|
+
exports.assertKnowledgeScopeWithinCeiling = require_execution_fence.assertKnowledgeScopeWithinCeiling;
|
|
6374
6384
|
exports.canonicalJson = canonicalJson;
|
|
6375
|
-
exports.canonicalKnowledgeName =
|
|
6376
|
-
exports.canonicalizeKnowledgeScope =
|
|
6385
|
+
exports.canonicalKnowledgeName = require_execution_fence.canonicalKnowledgeName;
|
|
6386
|
+
exports.canonicalizeKnowledgeScope = require_execution_fence.canonicalizeKnowledgeScope;
|
|
6377
6387
|
exports.createKnowledgeImporterHost = createKnowledgeImporterHost;
|
|
6378
|
-
exports.createKnowledgeNodeCursor =
|
|
6379
|
-
exports.createKnowledgeUlid =
|
|
6380
|
-
exports.decodeKnowledgeScopeId =
|
|
6381
|
-
exports.encodeKnowledgeScopeId =
|
|
6382
|
-
exports.expandKnowledgeScope =
|
|
6388
|
+
exports.createKnowledgeNodeCursor = require_execution_fence.createKnowledgeNodeCursor;
|
|
6389
|
+
exports.createKnowledgeUlid = require_execution_fence.createKnowledgeUlid;
|
|
6390
|
+
exports.decodeKnowledgeScopeId = require_execution_fence.decodeKnowledgeScopeId;
|
|
6391
|
+
exports.encodeKnowledgeScopeId = require_execution_fence.encodeKnowledgeScopeId;
|
|
6392
|
+
exports.expandKnowledgeScope = require_execution_fence.expandKnowledgeScope;
|
|
6383
6393
|
exports.importerHostConformance = importerHostConformance;
|
|
6384
|
-
exports.inspectKnowledgeSchema =
|
|
6385
|
-
exports.isKnowledgeScopeVisible =
|
|
6386
|
-
exports.knowledgeAgentScopes =
|
|
6394
|
+
exports.inspectKnowledgeSchema = require_execution_fence.inspectKnowledgeSchema;
|
|
6395
|
+
exports.isKnowledgeScopeVisible = require_execution_fence.isKnowledgeScopeVisible;
|
|
6396
|
+
exports.knowledgeAgentScopes = require_execution_fence.knowledgeAgentScopes;
|
|
6387
6397
|
exports.knowledgeImportKey = knowledgeImportKey;
|
|
6388
6398
|
exports.knowledgeImporterFlushDigest = knowledgeImporterFlushDigest;
|
|
6389
6399
|
exports.knowledgeImporterRegistry = knowledgeImporterRegistry;
|
|
6390
|
-
exports.knowledgeLinkRefKey =
|
|
6391
|
-
exports.knowledgeMemoryScopes =
|
|
6392
|
-
exports.knowledgePagePath =
|
|
6393
|
-
exports.knowledgePersonaScopes =
|
|
6394
|
-
exports.knowledgePinDepth =
|
|
6395
|
-
exports.knowledgePositionBetween =
|
|
6396
|
-
exports.knowledgeScopeAddress =
|
|
6397
|
-
exports.knowledgeScopeKey =
|
|
6398
|
-
exports.knowledgeScopeReadable =
|
|
6399
|
-
exports.knowledgeSemanticDocumentId =
|
|
6400
|
-
exports.knowledgeSemanticIdempotencyKey =
|
|
6401
|
-
exports.knowledgeVisibleScopeKeys =
|
|
6400
|
+
exports.knowledgeLinkRefKey = require_execution_fence.knowledgeLinkRefKey;
|
|
6401
|
+
exports.knowledgeMemoryScopes = require_execution_fence.knowledgeMemoryScopes;
|
|
6402
|
+
exports.knowledgePagePath = require_execution_fence.knowledgePagePath;
|
|
6403
|
+
exports.knowledgePersonaScopes = require_execution_fence.knowledgePersonaScopes;
|
|
6404
|
+
exports.knowledgePinDepth = require_execution_fence.knowledgePinDepth;
|
|
6405
|
+
exports.knowledgePositionBetween = require_execution_fence.knowledgePositionBetween;
|
|
6406
|
+
exports.knowledgeScopeAddress = require_execution_fence.knowledgeScopeAddress;
|
|
6407
|
+
exports.knowledgeScopeKey = require_execution_fence.knowledgeScopeKey;
|
|
6408
|
+
exports.knowledgeScopeReadable = require_execution_fence.knowledgeScopeReadable;
|
|
6409
|
+
exports.knowledgeSemanticDocumentId = require_execution_fence.knowledgeSemanticDocumentId;
|
|
6410
|
+
exports.knowledgeSemanticIdempotencyKey = require_execution_fence.knowledgeSemanticIdempotencyKey;
|
|
6411
|
+
exports.knowledgeVisibleScopeKeys = require_execution_fence.knowledgeVisibleScopeKeys;
|
|
6402
6412
|
exports.listKnowledgeTreeChildren = listKnowledgeTreeChildren;
|
|
6403
6413
|
exports.normalizeKnowledgeImporterFinish = normalizeKnowledgeImporterFinish;
|
|
6404
6414
|
exports.parseKnowledgeImporterFlushBody = parseKnowledgeImporterFlushBody;
|
|
6405
|
-
exports.parseKnowledgeNodeCursor =
|
|
6406
|
-
exports.parseKnowledgePageRef =
|
|
6407
|
-
exports.parseKnowledgeWikilinks =
|
|
6415
|
+
exports.parseKnowledgeNodeCursor = require_execution_fence.parseKnowledgeNodeCursor;
|
|
6416
|
+
exports.parseKnowledgePageRef = require_execution_fence.parseKnowledgePageRef;
|
|
6417
|
+
exports.parseKnowledgeWikilinks = require_execution_fence.parseKnowledgeWikilinks;
|
|
6408
6418
|
exports.readKnowledgePage = readKnowledgePage;
|
|
6409
6419
|
exports.readKnowledgePageActivity = readKnowledgePageActivity;
|
|
6410
6420
|
exports.readKnowledgePageGraph = readKnowledgePageGraph;
|