@mastra/core 1.2.1-alpha.0 → 1.3.0-alpha.2
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/CHANGELOG.md +341 -0
- package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +2093 -262
- package/dist/agent/agent-legacy.d.ts.map +1 -1
- package/dist/agent/agent.d.ts +12 -3
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/index.cjs +13 -13
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/index.cjs +18 -18
- package/dist/agent/message-list/index.js +1 -1
- package/dist/agent/message-list/message-list.d.ts.map +1 -1
- package/dist/agent/types.d.ts +6 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/index.d.ts +3 -1
- package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/stream-step.d.ts +3 -1
- package/dist/agent/workflows/prepare-stream/stream-step.d.ts.map +1 -1
- package/dist/base.cjs +2 -2
- package/dist/base.d.ts +13 -1
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +1 -1
- package/dist/bundler/index.cjs +2 -2
- package/dist/bundler/index.js +1 -1
- package/dist/cache/index.cjs +3 -3
- package/dist/cache/index.js +1 -1
- package/dist/{chunk-ENCTSDWC.js → chunk-2GWTJFVM.js} +2410 -1402
- package/dist/chunk-2GWTJFVM.js.map +1 -0
- package/dist/{chunk-OB4V67IX.cjs → chunk-2K5PNW2U.cjs} +4 -4
- package/dist/{chunk-OB4V67IX.cjs.map → chunk-2K5PNW2U.cjs.map} +1 -1
- package/dist/{chunk-VZXYBFCX.cjs → chunk-2P6DD7M5.cjs} +10 -10
- package/dist/{chunk-VZXYBFCX.cjs.map → chunk-2P6DD7M5.cjs.map} +1 -1
- package/dist/{chunk-Q2D7LERO.cjs → chunk-2VD5OGOT.cjs} +4 -4
- package/dist/{chunk-Q2D7LERO.cjs.map → chunk-2VD5OGOT.cjs.map} +1 -1
- package/dist/{chunk-2DMSFLJY.cjs → chunk-6TZKQI4R.cjs} +8 -8
- package/dist/chunk-6TZKQI4R.cjs.map +1 -0
- package/dist/{chunk-4NG7CKEG.js → chunk-6VGCVSP4.js} +3 -3
- package/dist/{chunk-4NG7CKEG.js.map → chunk-6VGCVSP4.js.map} +1 -1
- package/dist/{chunk-IIZF4W7B.cjs → chunk-7UWHFWST.cjs} +52 -5
- package/dist/chunk-7UWHFWST.cjs.map +1 -0
- package/dist/{chunk-VW7YQWDW.cjs → chunk-BFIOQFGF.cjs} +28 -2
- package/dist/chunk-BFIOQFGF.cjs.map +1 -0
- package/dist/{chunk-E3VFKTIA.js → chunk-BXLLXTT4.js} +2245 -179
- package/dist/chunk-BXLLXTT4.js.map +1 -0
- package/dist/{chunk-HMCXNOF6.cjs → chunk-CGPH7CMG.cjs} +2431 -1417
- package/dist/chunk-CGPH7CMG.cjs.map +1 -0
- package/dist/{chunk-GVLPTDJA.cjs → chunk-D5JZT6EK.cjs} +236 -63
- package/dist/chunk-D5JZT6EK.cjs.map +1 -0
- package/dist/{chunk-5SOS47PH.cjs → chunk-FLHFB23E.cjs} +454 -222
- package/dist/chunk-FLHFB23E.cjs.map +1 -0
- package/dist/{chunk-XCPEEIHI.cjs → chunk-GCTAD6B7.cjs} +3012 -927
- package/dist/chunk-GCTAD6B7.cjs.map +1 -0
- package/dist/{chunk-W3AQUG66.js → chunk-GIY5BINT.js} +4 -4
- package/dist/{chunk-W3AQUG66.js.map → chunk-GIY5BINT.js.map} +1 -1
- package/dist/{chunk-M6VFJX5A.js → chunk-GMSAGYTB.js} +3 -3
- package/dist/{chunk-M6VFJX5A.js.map → chunk-GMSAGYTB.js.map} +1 -1
- package/dist/{chunk-JRJJ5VQE.cjs → chunk-GZD6443M.cjs} +99 -55
- package/dist/chunk-GZD6443M.cjs.map +1 -0
- package/dist/{chunk-Z6NRYYOH.js → chunk-ILQXPZCD.js} +9 -4
- package/dist/chunk-ILQXPZCD.js.map +1 -0
- package/dist/{chunk-5YVR7B4R.js → chunk-JQNREL64.js} +29 -9
- package/dist/chunk-JQNREL64.js.map +1 -0
- package/dist/{chunk-QOFI2WBM.cjs → chunk-JU6K7UDX.cjs} +991 -229
- package/dist/chunk-JU6K7UDX.cjs.map +1 -0
- package/dist/{chunk-HN2MSTR6.cjs → chunk-KAJNBNWP.cjs} +283 -38
- package/dist/chunk-KAJNBNWP.cjs.map +1 -0
- package/dist/{chunk-MSWXEOZC.js → chunk-KL2JPSRX.js} +5 -5
- package/dist/chunk-KL2JPSRX.js.map +1 -0
- package/dist/{chunk-MQB7XFXP.js → chunk-LHRHOPUC.js} +3 -3
- package/dist/{chunk-MQB7XFXP.js.map → chunk-LHRHOPUC.js.map} +1 -1
- package/dist/{chunk-VX7UA3SO.js → chunk-MOOJ3H3C.js} +974 -217
- package/dist/chunk-MOOJ3H3C.js.map +1 -0
- package/dist/{chunk-HU2ONA2W.cjs → chunk-ON2KVIUJ.cjs} +17 -17
- package/dist/{chunk-HU2ONA2W.cjs.map → chunk-ON2KVIUJ.cjs.map} +1 -1
- package/dist/{chunk-I66TMZJ3.cjs → chunk-OOCEAC6U.cjs} +21 -18
- package/dist/chunk-OOCEAC6U.cjs.map +1 -0
- package/dist/{chunk-MNWW2R3U.js → chunk-OV7OOUUR.js} +90 -54
- package/dist/chunk-OV7OOUUR.js.map +1 -0
- package/dist/{chunk-C4WWWQHT.cjs → chunk-RO47SMI7.cjs} +23 -3
- package/dist/chunk-RO47SMI7.cjs.map +1 -0
- package/dist/{chunk-6FG6FU5Y.cjs → chunk-RQ56ZSIR.cjs} +4 -4
- package/dist/{chunk-6FG6FU5Y.cjs.map → chunk-RQ56ZSIR.cjs.map} +1 -1
- package/dist/{chunk-IW3BNL7A.js → chunk-RS6CZXGA.js} +50 -3
- package/dist/chunk-RS6CZXGA.js.map +1 -0
- package/dist/{chunk-AIJLACR2.js → chunk-S53FKKVL.js} +27 -3
- package/dist/chunk-S53FKKVL.js.map +1 -0
- package/dist/{chunk-G6E3QNJC.js → chunk-SBPPGJL6.js} +4078 -4333
- package/dist/chunk-SBPPGJL6.js.map +1 -0
- package/dist/{chunk-UZL4H5P2.cjs → chunk-SH4PCZ3X.cjs} +5375 -5648
- package/dist/chunk-SH4PCZ3X.cjs.map +1 -0
- package/dist/{chunk-ZWM2CAIM.js → chunk-STKNQDVA.js} +4 -4
- package/dist/{chunk-ZWM2CAIM.js.map → chunk-STKNQDVA.js.map} +1 -1
- package/dist/{chunk-A5QFWX67.cjs → chunk-U2CABSMC.cjs} +79 -59
- package/dist/chunk-U2CABSMC.cjs.map +1 -0
- package/dist/{chunk-7MDVYPWX.cjs → chunk-UE2G2LRP.cjs} +9 -4
- package/dist/chunk-UE2G2LRP.cjs.map +1 -0
- package/dist/{chunk-AUF6U2BL.js → chunk-VM25PDSW.js} +5 -5
- package/dist/{chunk-AUF6U2BL.js.map → chunk-VM25PDSW.js.map} +1 -1
- package/dist/{chunk-RXD5EGQF.js → chunk-VVD56FI4.js} +228 -55
- package/dist/chunk-VVD56FI4.js.map +1 -0
- package/dist/{chunk-JIT2OY3X.js → chunk-WCAFTXGK.js} +23 -3
- package/dist/chunk-WCAFTXGK.js.map +1 -0
- package/dist/{chunk-P62OJXQ4.js → chunk-WL3AW3YA.js} +282 -37
- package/dist/chunk-WL3AW3YA.js.map +1 -0
- package/dist/{chunk-YLODOPYM.cjs → chunk-XDD5V446.cjs} +4163 -5352
- package/dist/chunk-XDD5V446.cjs.map +1 -0
- package/dist/{chunk-B4M33FCS.cjs → chunk-XQVYEOI7.cjs} +7 -7
- package/dist/{chunk-B4M33FCS.cjs.map → chunk-XQVYEOI7.cjs.map} +1 -1
- package/dist/{chunk-BP2TSCBW.js → chunk-ZATLLPIH.js} +4391 -5561
- package/dist/chunk-ZATLLPIH.js.map +1 -0
- package/dist/{chunk-T6PRRKMW.js → chunk-ZHFM7HCQ.js} +9 -6
- package/dist/chunk-ZHFM7HCQ.js.map +1 -0
- package/dist/{chunk-WFUNLRQX.js → chunk-ZRUTE56J.js} +366 -134
- package/dist/chunk-ZRUTE56J.js.map +1 -0
- package/dist/deployer/index.cjs +2 -2
- package/dist/deployer/index.js +1 -1
- package/dist/docs/SKILL.md +2 -9
- package/dist/docs/assets/SOURCE_MAP.json +399 -342
- package/dist/docs/references/docs-agents-agent-memory.md +45 -1
- package/dist/docs/references/docs-agents-network-approval.md +1 -1
- package/dist/docs/references/docs-agents-networks.md +3 -3
- package/dist/docs/references/docs-agents-overview.md +8 -0
- package/dist/docs/references/docs-agents-using-tools.md +82 -72
- package/dist/docs/references/docs-memory-observational-memory.md +11 -8
- package/dist/docs/references/docs-observability-overview.md +1 -1
- package/dist/docs/references/docs-observability-tracing-exporters-langsmith.md +70 -0
- package/dist/docs/references/docs-observability-tracing-overview.md +1 -1
- package/dist/docs/references/docs-server-middleware.md +0 -2
- package/dist/docs/references/docs-server-request-context.md +17 -0
- package/dist/docs/references/docs-workflows-agents-and-tools.md +2 -2
- package/dist/docs/references/docs-workflows-overview.md +1 -1
- package/dist/docs/references/docs-workspace-filesystem.md +2 -0
- package/dist/docs/references/docs-workspace-overview.md +3 -1
- package/dist/docs/references/docs-workspace-sandbox.md +2 -0
- package/dist/docs/references/docs-workspace-search.md +2 -0
- package/dist/docs/references/docs-workspace-skills.md +3 -1
- package/dist/docs/references/reference-agents-getTools.md +1 -6
- package/dist/docs/references/reference-agents-listAgents.md +1 -1
- package/dist/docs/references/reference-agents-network.md +0 -2
- package/dist/docs/references/reference-cli-mastra.md +29 -4
- package/dist/docs/references/reference-client-js-agents.md +1 -1
- package/dist/docs/references/reference-configuration.md +1 -1
- package/dist/docs/references/reference-core-getStoredAgentById.md +2 -2
- package/dist/docs/references/reference-core-listStoredAgents.md +1 -1
- package/dist/docs/references/reference-memory-observational-memory.md +2 -0
- package/dist/docs/references/reference-tools-mcp-client.md +0 -2
- package/dist/docs/references/reference-workflows-step.md +2 -0
- package/dist/docs/references/reference-workflows-workflow-methods-map.md +2 -2
- package/dist/docs/references/reference-workspace-filesystem.md +2 -0
- package/dist/docs/references/reference-workspace-local-filesystem.md +2 -0
- package/dist/docs/references/reference-workspace-local-sandbox.md +2 -0
- package/dist/docs/references/reference-workspace-sandbox.md +2 -0
- package/dist/docs/references/reference-workspace-workspace-class.md +2 -0
- package/dist/docs/references/reference.md +7 -2
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/types.d.ts +53 -48
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/evals/base.d.ts +15 -0
- package/dist/evals/base.d.ts.map +1 -1
- package/dist/evals/index.cjs +20 -20
- package/dist/evals/index.js +3 -3
- package/dist/evals/run/index.d.ts +3 -3
- package/dist/evals/run/index.d.ts.map +1 -1
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/features/index.cjs +1 -1
- package/dist/features/index.cjs.map +1 -1
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/index.js +1 -1
- package/dist/features/index.js.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/integration/index.cjs +2 -2
- package/dist/integration/index.js +1 -1
- package/dist/llm/index.cjs +16 -16
- package/dist/llm/index.js +5 -5
- package/dist/llm/model/gateways/constants.d.ts.map +1 -1
- package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
- package/dist/llm/model/model.loop.d.ts +1 -1
- package/dist/llm/model/model.loop.d.ts.map +1 -1
- package/dist/llm/model/provider-types.generated.d.ts +128 -10
- package/dist/llm/model/resolve-model.d.ts.map +1 -1
- package/dist/loop/index.cjs +12 -12
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts +3 -3
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/loop/network/run-command-tool.d.ts +1 -1
- package/dist/loop/types.d.ts +13 -0
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/index.d.ts +9 -9
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +7 -7
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +3 -3
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-loop/index.d.ts +9 -9
- package/dist/loop/workflows/schema.d.ts +12 -12
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts +91 -5
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/mcp/index.cjs +2 -2
- package/dist/mcp/index.js +1 -1
- package/dist/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/memory/mock.d.ts.map +1 -1
- package/dist/memory/types.d.ts +128 -0
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/models-dev-FQVUTQ7L.js +3 -0
- package/dist/{models-dev-Z45JSLWD.js.map → models-dev-FQVUTQ7L.js.map} +1 -1
- package/dist/models-dev-PPIXUUCU.cjs +12 -0
- package/dist/{models-dev-OQKVMEIT.cjs.map → models-dev-PPIXUUCU.cjs.map} +1 -1
- package/dist/netlify-4RIKF7Y3.js +3 -0
- package/dist/{netlify-SSWMYSAX.js.map → netlify-4RIKF7Y3.js.map} +1 -1
- package/dist/netlify-V5F7JEJH.cjs +12 -0
- package/dist/{netlify-TXZZCT6N.cjs.map → netlify-V5F7JEJH.cjs.map} +1 -1
- package/dist/processors/index.cjs +41 -41
- package/dist/processors/index.js +1 -1
- package/dist/processors/step-schema.d.ts +44 -44
- package/dist/provider-registry-C6XCYX44.cjs +40 -0
- package/dist/{provider-registry-NR7FXV2Q.cjs.map → provider-registry-C6XCYX44.cjs.map} +1 -1
- package/dist/provider-registry-NWU4YFQW.js +3 -0
- package/dist/{provider-registry-RPOTQNHI.js.map → provider-registry-NWU4YFQW.js.map} +1 -1
- package/dist/provider-registry.json +278 -33
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/server/index.cjs +3 -3
- package/dist/server/index.js +1 -1
- package/dist/storage/base.d.ts +3 -1
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/constants.cjs +51 -19
- package/dist/storage/constants.d.ts +10 -2
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/agents/base.d.ts +13 -164
- package/dist/storage/domains/agents/base.d.ts.map +1 -1
- package/dist/storage/domains/agents/index.d.ts +0 -1
- package/dist/storage/domains/agents/index.d.ts.map +1 -1
- package/dist/storage/domains/agents/inmemory.d.ts +6 -10
- package/dist/storage/domains/agents/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/index.d.ts +3 -0
- package/dist/storage/domains/index.d.ts.map +1 -1
- package/dist/storage/domains/inmemory-db.d.ts +7 -1
- package/dist/storage/domains/inmemory-db.d.ts.map +1 -1
- package/dist/storage/domains/memory/base.d.ts +45 -5
- package/dist/storage/domains/memory/base.d.ts.map +1 -1
- package/dist/storage/domains/memory/inmemory.d.ts +7 -7
- package/dist/storage/domains/memory/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/observability/types.d.ts +62 -62
- package/dist/storage/domains/operations/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/prompt-blocks/base.d.ts +47 -0
- package/dist/storage/domains/prompt-blocks/base.d.ts.map +1 -0
- package/dist/storage/domains/prompt-blocks/index.d.ts +3 -0
- package/dist/storage/domains/prompt-blocks/index.d.ts.map +1 -0
- package/dist/storage/domains/prompt-blocks/inmemory.d.ts +31 -0
- package/dist/storage/domains/prompt-blocks/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/scorer-definitions/base.d.ts +47 -0
- package/dist/storage/domains/scorer-definitions/base.d.ts.map +1 -0
- package/dist/storage/domains/scorer-definitions/index.d.ts +3 -0
- package/dist/storage/domains/scorer-definitions/index.d.ts.map +1 -0
- package/dist/storage/domains/scorer-definitions/inmemory.d.ts +31 -0
- package/dist/storage/domains/scorer-definitions/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/versioned.d.ts +136 -0
- package/dist/storage/domains/versioned.d.ts.map +1 -0
- package/dist/storage/index.cjs +156 -104
- package/dist/storage/index.js +2 -2
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/types.d.ts +481 -27
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/MastraAgentNetworkStream.d.ts +1 -1
- package/dist/stream/MastraWorkflowStream.d.ts +1 -1
- package/dist/stream/RunOutput.d.ts +1 -1
- package/dist/stream/RunOutput.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts +4 -0
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/index.cjs +11 -11
- package/dist/stream/index.js +2 -2
- package/dist/test-utils/llm-mock.cjs +4 -4
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/tools/index.cjs +4 -4
- package/dist/tools/index.js +1 -1
- package/dist/tools/is-vercel-tool.cjs +2 -2
- package/dist/tools/is-vercel-tool.js +1 -1
- package/dist/tools/tool-builder/builder.d.ts.map +1 -1
- package/dist/tools/types.d.ts +15 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/validation.d.ts.map +1 -1
- package/dist/tts/index.cjs +2 -2
- package/dist/tts/index.js +1 -1
- package/dist/types/zod-compat.d.ts +2 -2
- package/dist/types/zod-compat.d.ts.map +1 -1
- package/dist/utils/zod-utils.d.ts +19 -0
- package/dist/utils/zod-utils.d.ts.map +1 -1
- package/dist/utils.cjs +28 -28
- package/dist/utils.d.ts +7 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +2 -2
- package/dist/vector/index.cjs +9 -9
- package/dist/vector/index.js +2 -2
- package/dist/voice/index.cjs +6 -6
- package/dist/voice/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/evented/step-executor.d.ts.map +1 -1
- package/dist/workflows/evented/workflow.d.ts +3 -1
- package/dist/workflows/evented/workflow.d.ts.map +1 -1
- package/dist/workflows/execution-engine.d.ts.map +1 -1
- package/dist/workflows/index.cjs +25 -25
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/step.d.ts +4 -3
- package/dist/workflows/step.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +2 -1
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/workflow.d.ts +12 -4
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/dist/workspace/errors.d.ts +6 -0
- package/dist/workspace/errors.d.ts.map +1 -1
- package/dist/workspace/filesystem/composite-filesystem.d.ts +93 -0
- package/dist/workspace/filesystem/composite-filesystem.d.ts.map +1 -0
- package/dist/workspace/filesystem/filesystem.d.ts +35 -0
- package/dist/workspace/filesystem/filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/index.d.ts +2 -0
- package/dist/workspace/filesystem/index.d.ts.map +1 -1
- package/dist/workspace/filesystem/local-filesystem.d.ts +9 -1
- package/dist/workspace/filesystem/local-filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/mastra-filesystem.d.ts +92 -3
- package/dist/workspace/filesystem/mastra-filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/mount.d.ts +34 -0
- package/dist/workspace/filesystem/mount.d.ts.map +1 -0
- package/dist/workspace/index.cjs +62 -34
- package/dist/workspace/index.d.ts +6 -2
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/lifecycle.d.ts +29 -0
- package/dist/workspace/lifecycle.d.ts.map +1 -1
- package/dist/workspace/sandbox/errors.d.ts +50 -0
- package/dist/workspace/sandbox/errors.d.ts.map +1 -0
- package/dist/workspace/sandbox/index.d.ts +3 -0
- package/dist/workspace/sandbox/index.d.ts.map +1 -1
- package/dist/workspace/sandbox/local-sandbox.d.ts +17 -2
- package/dist/workspace/sandbox/local-sandbox.d.ts.map +1 -1
- package/dist/workspace/sandbox/mastra-sandbox.d.ts +153 -6
- package/dist/workspace/sandbox/mastra-sandbox.d.ts.map +1 -1
- package/dist/workspace/sandbox/mount-manager.d.ts +195 -0
- package/dist/workspace/sandbox/mount-manager.d.ts.map +1 -0
- package/dist/workspace/sandbox/sandbox.d.ts +37 -84
- package/dist/workspace/sandbox/sandbox.d.ts.map +1 -1
- package/dist/workspace/sandbox/types.d.ts +92 -0
- package/dist/workspace/sandbox/types.d.ts.map +1 -0
- package/dist/workspace/tools/tools.d.ts.map +1 -1
- package/dist/workspace/tools/tree-formatter.d.ts.map +1 -1
- package/dist/workspace/workspace.d.ts +73 -3
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/package.json +16 -16
- package/src/llm/model/provider-types.generated.d.ts +128 -10
- package/dist/chunk-2DMSFLJY.cjs.map +0 -1
- package/dist/chunk-5SOS47PH.cjs.map +0 -1
- package/dist/chunk-5YVR7B4R.js.map +0 -1
- package/dist/chunk-7MDVYPWX.cjs.map +0 -1
- package/dist/chunk-A5QFWX67.cjs.map +0 -1
- package/dist/chunk-AIJLACR2.js.map +0 -1
- package/dist/chunk-BP2TSCBW.js.map +0 -1
- package/dist/chunk-C4WWWQHT.cjs.map +0 -1
- package/dist/chunk-E3VFKTIA.js.map +0 -1
- package/dist/chunk-ENCTSDWC.js.map +0 -1
- package/dist/chunk-G6E3QNJC.js.map +0 -1
- package/dist/chunk-GVLPTDJA.cjs.map +0 -1
- package/dist/chunk-HMCXNOF6.cjs.map +0 -1
- package/dist/chunk-HN2MSTR6.cjs.map +0 -1
- package/dist/chunk-I66TMZJ3.cjs.map +0 -1
- package/dist/chunk-IIZF4W7B.cjs.map +0 -1
- package/dist/chunk-IW3BNL7A.js.map +0 -1
- package/dist/chunk-JIT2OY3X.js.map +0 -1
- package/dist/chunk-JRJJ5VQE.cjs.map +0 -1
- package/dist/chunk-MNWW2R3U.js.map +0 -1
- package/dist/chunk-MSWXEOZC.js.map +0 -1
- package/dist/chunk-P62OJXQ4.js.map +0 -1
- package/dist/chunk-QOFI2WBM.cjs.map +0 -1
- package/dist/chunk-RXD5EGQF.js.map +0 -1
- package/dist/chunk-T6PRRKMW.js.map +0 -1
- package/dist/chunk-UZL4H5P2.cjs.map +0 -1
- package/dist/chunk-VW7YQWDW.cjs.map +0 -1
- package/dist/chunk-VX7UA3SO.js.map +0 -1
- package/dist/chunk-WFUNLRQX.js.map +0 -1
- package/dist/chunk-XCPEEIHI.cjs.map +0 -1
- package/dist/chunk-YLODOPYM.cjs.map +0 -1
- package/dist/chunk-Z6NRYYOH.js.map +0 -1
- package/dist/docs/references/docs-tools-mcp-advanced-usage.md +0 -143
- package/dist/docs/references/docs-tools-mcp-mcp-overview.md +0 -383
- package/dist/docs/references/docs-tools-mcp-overview.md +0 -78
- package/dist/docs/references/docs-workflows-input-data-mapping.md +0 -102
- package/dist/docs/references/reference-deployer-netlify.md +0 -14
- package/dist/docs/references/reference-deployer-vercel.md +0 -39
- package/dist/docs/references/reference-tools-client.md +0 -228
- package/dist/models-dev-OQKVMEIT.cjs +0 -12
- package/dist/models-dev-Z45JSLWD.js +0 -3
- package/dist/netlify-SSWMYSAX.js +0 -3
- package/dist/netlify-TXZZCT6N.cjs +0 -12
- package/dist/provider-registry-NR7FXV2Q.cjs +0 -40
- package/dist/provider-registry-RPOTQNHI.js +0 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunkU2CABSMC_cjs = require('./chunk-U2CABSMC.cjs');
|
|
4
|
+
var chunkXQVYEOI7_cjs = require('./chunk-XQVYEOI7.cjs');
|
|
5
|
+
var chunk6TZKQI4R_cjs = require('./chunk-6TZKQI4R.cjs');
|
|
6
|
+
var chunkFLHFB23E_cjs = require('./chunk-FLHFB23E.cjs');
|
|
7
7
|
var chunk6BJ7XHRH_cjs = require('./chunk-6BJ7XHRH.cjs');
|
|
8
8
|
var chunkMR7ZWBL6_cjs = require('./chunk-MR7ZWBL6.cjs');
|
|
9
9
|
var chunkCYUP7QWT_cjs = require('./chunk-CYUP7QWT.cjs');
|
|
10
10
|
var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
|
|
11
|
-
var
|
|
11
|
+
var chunk2VD5OGOT_cjs = require('./chunk-2VD5OGOT.cjs');
|
|
12
12
|
var chunk7XAECHYL_cjs = require('./chunk-7XAECHYL.cjs');
|
|
13
13
|
var crypto = require('crypto');
|
|
14
14
|
|
|
@@ -39,6 +39,7 @@ var Mastra = class {
|
|
|
39
39
|
#processorConfigurations = /* @__PURE__ */ new Map();
|
|
40
40
|
#memory;
|
|
41
41
|
#workspace;
|
|
42
|
+
#workspaces = {};
|
|
42
43
|
#server;
|
|
43
44
|
#serverAdapter;
|
|
44
45
|
#mcpServers;
|
|
@@ -52,6 +53,10 @@ var Mastra = class {
|
|
|
52
53
|
#serverCache;
|
|
53
54
|
// Cache for stored agents to allow in-memory modifications (like model changes) to persist across requests
|
|
54
55
|
#storedAgentsCache = /* @__PURE__ */ new Map();
|
|
56
|
+
// Cache for stored scorers to allow in-memory modifications to persist across requests
|
|
57
|
+
#storedScorersCache = /* @__PURE__ */ new Map();
|
|
58
|
+
// Registry for prompt blocks (stored or code-defined)
|
|
59
|
+
#promptBlocks = {};
|
|
55
60
|
// Editor instance for handling agent instantiation and configuration
|
|
56
61
|
#editor;
|
|
57
62
|
get pubsub() {
|
|
@@ -94,6 +99,13 @@ var Mastra = class {
|
|
|
94
99
|
getStoredAgentCache() {
|
|
95
100
|
return this.#storedAgentsCache;
|
|
96
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Gets the stored scorers cache
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
getStoredScorerCache() {
|
|
107
|
+
return this.#storedScorersCache;
|
|
108
|
+
}
|
|
97
109
|
/**
|
|
98
110
|
* Generates a unique identifier using the configured generator or defaults to `crypto.randomUUID()`.
|
|
99
111
|
*
|
|
@@ -183,7 +195,7 @@ var Mastra = class {
|
|
|
183
195
|
* ```
|
|
184
196
|
*/
|
|
185
197
|
constructor(config) {
|
|
186
|
-
this.#serverCache = new
|
|
198
|
+
this.#serverCache = new chunk2VD5OGOT_cjs.InMemoryServerCache();
|
|
187
199
|
this.#editor = config?.editor;
|
|
188
200
|
if (this.#editor && typeof this.#editor.registerWithMastra === "function") {
|
|
189
201
|
this.#editor.registerWithMastra(this);
|
|
@@ -191,7 +203,7 @@ var Mastra = class {
|
|
|
191
203
|
if (config?.pubsub) {
|
|
192
204
|
this.#pubsub = config.pubsub;
|
|
193
205
|
} else {
|
|
194
|
-
this.#pubsub = new
|
|
206
|
+
this.#pubsub = new chunkFLHFB23E_cjs.EventEmitterPubSub();
|
|
195
207
|
}
|
|
196
208
|
this.#events = {};
|
|
197
209
|
for (const topic in config?.events ?? {}) {
|
|
@@ -201,7 +213,7 @@ var Mastra = class {
|
|
|
201
213
|
this.#events[topic] = config?.events?.[topic] ?? [];
|
|
202
214
|
}
|
|
203
215
|
}
|
|
204
|
-
const workflowEventProcessor = new
|
|
216
|
+
const workflowEventProcessor = new chunkU2CABSMC_cjs.WorkflowEventProcessor({ mastra: this });
|
|
205
217
|
const workflowEventCb = async (event, cb) => {
|
|
206
218
|
try {
|
|
207
219
|
await workflowEventProcessor.process(event, cb);
|
|
@@ -229,7 +241,7 @@ var Mastra = class {
|
|
|
229
241
|
this.#idGenerator = config?.idGenerator;
|
|
230
242
|
let storage = config?.storage;
|
|
231
243
|
if (storage) {
|
|
232
|
-
storage =
|
|
244
|
+
storage = chunkFLHFB23E_cjs.augmentWithInit(storage);
|
|
233
245
|
}
|
|
234
246
|
if (config?.observability) {
|
|
235
247
|
if (typeof config.observability.getDefaultInstance === "function") {
|
|
@@ -285,6 +297,7 @@ var Mastra = class {
|
|
|
285
297
|
}
|
|
286
298
|
if (config?.workspace) {
|
|
287
299
|
this.#workspace = config.workspace;
|
|
300
|
+
this.addWorkspace(config.workspace);
|
|
288
301
|
}
|
|
289
302
|
if (config?.scorers) {
|
|
290
303
|
Object.entries(config.scorers).forEach(([key, scorer]) => {
|
|
@@ -331,7 +344,7 @@ var Mastra = class {
|
|
|
331
344
|
if (config?.server) {
|
|
332
345
|
this.#server = config.server;
|
|
333
346
|
}
|
|
334
|
-
chunkMR7ZWBL6_cjs.registerHook("onScorerRun" /* ON_SCORER_RUN */,
|
|
347
|
+
chunkMR7ZWBL6_cjs.registerHook("onScorerRun" /* ON_SCORER_RUN */, chunk6TZKQI4R_cjs.createOnScorerHook(this));
|
|
335
348
|
this.#observability.setMastraContext({ mastra: this });
|
|
336
349
|
this.setLogger({ logger });
|
|
337
350
|
}
|
|
@@ -475,8 +488,8 @@ var Mastra = class {
|
|
|
475
488
|
throw createUndefinedPrimitiveError("agent", agent, key);
|
|
476
489
|
}
|
|
477
490
|
let mastraAgent;
|
|
478
|
-
if (
|
|
479
|
-
mastraAgent =
|
|
491
|
+
if (chunkXQVYEOI7_cjs.isToolLoopAgentLike(agent)) {
|
|
492
|
+
mastraAgent = chunkXQVYEOI7_cjs.toolLoopAgentToMastraAgent(agent, { fallbackName: key });
|
|
480
493
|
} else {
|
|
481
494
|
mastraAgent = agent;
|
|
482
495
|
}
|
|
@@ -507,6 +520,22 @@ var Mastra = class {
|
|
|
507
520
|
}).catch((err) => {
|
|
508
521
|
this.#logger?.debug(`Failed to register processor workflows for agent ${agentKey}:`, err);
|
|
509
522
|
});
|
|
523
|
+
if (mastraAgent.hasOwnWorkspace?.()) {
|
|
524
|
+
Promise.resolve(mastraAgent.getWorkspace?.()).then((workspace) => {
|
|
525
|
+
if (workspace) {
|
|
526
|
+
this.addWorkspace(workspace);
|
|
527
|
+
}
|
|
528
|
+
}).catch((err) => {
|
|
529
|
+
this.#logger?.debug(`Failed to register workspace for agent ${agentKey}:`, err);
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
mastraAgent.listScorers().then((scorers) => {
|
|
533
|
+
for (const [, entry] of Object.entries(scorers || {})) {
|
|
534
|
+
this.addScorer(entry.scorer);
|
|
535
|
+
}
|
|
536
|
+
}).catch((err) => {
|
|
537
|
+
this.#logger?.debug(`Failed to register scorers from agent ${agentKey}:`, err);
|
|
538
|
+
});
|
|
510
539
|
}
|
|
511
540
|
/**
|
|
512
541
|
* Removes an agent from the Mastra instance by its key or ID.
|
|
@@ -749,6 +778,78 @@ var Mastra = class {
|
|
|
749
778
|
getWorkspace() {
|
|
750
779
|
return this.#workspace;
|
|
751
780
|
}
|
|
781
|
+
/**
|
|
782
|
+
* Retrieves a registered workspace by its ID.
|
|
783
|
+
*
|
|
784
|
+
* @throws {MastraError} When the workspace with the specified ID is not found
|
|
785
|
+
*
|
|
786
|
+
* @example
|
|
787
|
+
* ```typescript
|
|
788
|
+
* const workspace = mastra.getWorkspaceById('workspace-123');
|
|
789
|
+
* const files = await workspace.filesystem.readdir('/');
|
|
790
|
+
* ```
|
|
791
|
+
*/
|
|
792
|
+
getWorkspaceById(id) {
|
|
793
|
+
const workspace = this.#workspaces[id];
|
|
794
|
+
if (!workspace) {
|
|
795
|
+
const error = new chunk4U7ZLI36_cjs.MastraError({
|
|
796
|
+
id: "MASTRA_GET_WORKSPACE_BY_ID_NOT_FOUND",
|
|
797
|
+
domain: "MASTRA" /* MASTRA */,
|
|
798
|
+
category: "USER" /* USER */,
|
|
799
|
+
text: `Workspace with id ${id} not found`,
|
|
800
|
+
details: {
|
|
801
|
+
status: 404,
|
|
802
|
+
workspaceId: id,
|
|
803
|
+
availableIds: Object.keys(this.#workspaces).join(", ")
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
this.#logger?.trackException(error);
|
|
807
|
+
throw error;
|
|
808
|
+
}
|
|
809
|
+
return workspace;
|
|
810
|
+
}
|
|
811
|
+
/**
|
|
812
|
+
* Returns all registered workspaces as a record keyed by their IDs.
|
|
813
|
+
*
|
|
814
|
+
* @example
|
|
815
|
+
* ```typescript
|
|
816
|
+
* const workspaces = mastra.listWorkspaces();
|
|
817
|
+
* for (const [id, workspace] of Object.entries(workspaces)) {
|
|
818
|
+
* console.log(`Workspace ${id}: ${workspace.name}`);
|
|
819
|
+
* }
|
|
820
|
+
* ```
|
|
821
|
+
*/
|
|
822
|
+
listWorkspaces() {
|
|
823
|
+
return { ...this.#workspaces };
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Adds a new workspace to the Mastra instance.
|
|
827
|
+
*
|
|
828
|
+
* This method allows dynamic registration of workspaces after the Mastra instance
|
|
829
|
+
* has been created. Workspaces are keyed by their ID.
|
|
830
|
+
*
|
|
831
|
+
* @example
|
|
832
|
+
* ```typescript
|
|
833
|
+
* const workspace = new Workspace({
|
|
834
|
+
* id: 'project-workspace',
|
|
835
|
+
* name: 'Project Workspace',
|
|
836
|
+
* filesystem: new LocalFilesystem({ rootPath: './workspace' })
|
|
837
|
+
* });
|
|
838
|
+
* mastra.addWorkspace(workspace);
|
|
839
|
+
* ```
|
|
840
|
+
*/
|
|
841
|
+
addWorkspace(workspace, key) {
|
|
842
|
+
if (!workspace) {
|
|
843
|
+
throw createUndefinedPrimitiveError("workspace", workspace, key);
|
|
844
|
+
}
|
|
845
|
+
const workspaceKey = key || workspace.id;
|
|
846
|
+
if (this.#workspaces[workspaceKey]) {
|
|
847
|
+
const logger = this.getLogger();
|
|
848
|
+
logger.debug(`Workspace with key ${workspaceKey} already exists. Skipping addition.`);
|
|
849
|
+
return;
|
|
850
|
+
}
|
|
851
|
+
this.#workspaces[workspaceKey] = workspace;
|
|
852
|
+
}
|
|
752
853
|
/**
|
|
753
854
|
* Retrieves a registered workflow by its ID.
|
|
754
855
|
*
|
|
@@ -963,7 +1064,7 @@ var Mastra = class {
|
|
|
963
1064
|
* mastra.addScorer(newScorer, 'customKey'); // Uses custom key
|
|
964
1065
|
* ```
|
|
965
1066
|
*/
|
|
966
|
-
addScorer(scorer, key) {
|
|
1067
|
+
addScorer(scorer, key, options) {
|
|
967
1068
|
if (!scorer) {
|
|
968
1069
|
throw createUndefinedPrimitiveError("scorer", scorer, key);
|
|
969
1070
|
}
|
|
@@ -975,6 +1076,9 @@ var Mastra = class {
|
|
|
975
1076
|
return;
|
|
976
1077
|
}
|
|
977
1078
|
scorer.__registerMastra(this);
|
|
1079
|
+
if (options?.source) {
|
|
1080
|
+
scorer.source = options.source;
|
|
1081
|
+
}
|
|
978
1082
|
scorers[scorerKey] = scorer;
|
|
979
1083
|
}
|
|
980
1084
|
/**
|
|
@@ -1069,52 +1173,111 @@ var Mastra = class {
|
|
|
1069
1173
|
this.#logger?.trackException(error);
|
|
1070
1174
|
throw error;
|
|
1071
1175
|
}
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
//
|
|
1101
|
-
//
|
|
1102
|
-
//
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1176
|
+
/**
|
|
1177
|
+
* Removes a scorer from the Mastra instance by its key or ID.
|
|
1178
|
+
*
|
|
1179
|
+
* @param keyOrId - The scorer key or ID to remove
|
|
1180
|
+
* @returns true if a scorer was removed, false if no scorer was found
|
|
1181
|
+
*/
|
|
1182
|
+
removeScorer(keyOrId) {
|
|
1183
|
+
const scorers = this.#scorers;
|
|
1184
|
+
if (!scorers) return false;
|
|
1185
|
+
if (scorers[keyOrId]) {
|
|
1186
|
+
const scorerId = scorers[keyOrId]?.id;
|
|
1187
|
+
delete scorers[keyOrId];
|
|
1188
|
+
if (scorerId) {
|
|
1189
|
+
this.#storedScorersCache.delete(scorerId);
|
|
1190
|
+
}
|
|
1191
|
+
return true;
|
|
1192
|
+
}
|
|
1193
|
+
const key = Object.keys(scorers).find((k) => scorers[k]?.id === keyOrId || scorers[k]?.name === keyOrId);
|
|
1194
|
+
if (key) {
|
|
1195
|
+
const scorerId = scorers[key]?.id;
|
|
1196
|
+
delete scorers[key];
|
|
1197
|
+
if (scorerId) {
|
|
1198
|
+
this.#storedScorersCache.delete(scorerId);
|
|
1199
|
+
}
|
|
1200
|
+
return true;
|
|
1201
|
+
}
|
|
1202
|
+
return false;
|
|
1203
|
+
}
|
|
1204
|
+
// =========================================================================
|
|
1205
|
+
// Prompt Blocks
|
|
1206
|
+
// =========================================================================
|
|
1207
|
+
/**
|
|
1208
|
+
* Returns all registered prompt blocks.
|
|
1209
|
+
*/
|
|
1210
|
+
listPromptBlocks() {
|
|
1211
|
+
return this.#promptBlocks;
|
|
1212
|
+
}
|
|
1213
|
+
/**
|
|
1214
|
+
* Registers a prompt block in the Mastra instance's runtime registry.
|
|
1215
|
+
*
|
|
1216
|
+
* @param promptBlock - The resolved prompt block to register
|
|
1217
|
+
* @param key - Optional registration key (defaults to promptBlock.id)
|
|
1218
|
+
*/
|
|
1219
|
+
addPromptBlock(promptBlock, key) {
|
|
1220
|
+
const blockKey = key || promptBlock.id;
|
|
1221
|
+
if (this.#promptBlocks[blockKey]) {
|
|
1222
|
+
const logger = this.getLogger();
|
|
1223
|
+
logger.debug(`Prompt block with key ${blockKey} already exists. Skipping addition.`);
|
|
1224
|
+
return;
|
|
1225
|
+
}
|
|
1226
|
+
this.#promptBlocks[blockKey] = promptBlock;
|
|
1227
|
+
}
|
|
1228
|
+
/**
|
|
1229
|
+
* Retrieves a registered prompt block by its key.
|
|
1230
|
+
*
|
|
1231
|
+
* @throws {MastraError} When the prompt block with the specified key is not found
|
|
1232
|
+
*/
|
|
1233
|
+
getPromptBlock(key) {
|
|
1234
|
+
const block = this.#promptBlocks[key];
|
|
1235
|
+
if (!block) {
|
|
1236
|
+
throw new chunk4U7ZLI36_cjs.MastraError({
|
|
1237
|
+
id: "MASTRA_GET_PROMPT_BLOCK_NOT_FOUND",
|
|
1238
|
+
domain: "MASTRA" /* MASTRA */,
|
|
1239
|
+
category: "USER" /* USER */,
|
|
1240
|
+
text: `Prompt block with key ${key} not found`
|
|
1241
|
+
});
|
|
1242
|
+
}
|
|
1243
|
+
return block;
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* Retrieves a registered prompt block by its ID.
|
|
1247
|
+
*
|
|
1248
|
+
* @throws {MastraError} When no prompt block is found with the specified ID
|
|
1249
|
+
*/
|
|
1250
|
+
getPromptBlockById(id) {
|
|
1251
|
+
for (const [, block] of Object.entries(this.#promptBlocks)) {
|
|
1252
|
+
if (block.id === id) {
|
|
1253
|
+
return block;
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
throw new chunk4U7ZLI36_cjs.MastraError({
|
|
1257
|
+
id: "MASTRA_GET_PROMPT_BLOCK_BY_ID_NOT_FOUND",
|
|
1258
|
+
domain: "MASTRA" /* MASTRA */,
|
|
1259
|
+
category: "USER" /* USER */,
|
|
1260
|
+
text: `Prompt block with id ${id} not found`
|
|
1261
|
+
});
|
|
1262
|
+
}
|
|
1263
|
+
/**
|
|
1264
|
+
* Removes a prompt block from the Mastra instance by its key or ID.
|
|
1265
|
+
*
|
|
1266
|
+
* @param keyOrId - The prompt block key or ID to remove
|
|
1267
|
+
* @returns true if a prompt block was removed, false if not found
|
|
1268
|
+
*/
|
|
1269
|
+
removePromptBlock(keyOrId) {
|
|
1270
|
+
if (this.#promptBlocks[keyOrId]) {
|
|
1271
|
+
delete this.#promptBlocks[keyOrId];
|
|
1272
|
+
return true;
|
|
1273
|
+
}
|
|
1274
|
+
const key = Object.keys(this.#promptBlocks).find((k) => this.#promptBlocks[k]?.id === keyOrId);
|
|
1275
|
+
if (key) {
|
|
1276
|
+
delete this.#promptBlocks[key];
|
|
1277
|
+
return true;
|
|
1278
|
+
}
|
|
1279
|
+
return false;
|
|
1280
|
+
}
|
|
1118
1281
|
/**
|
|
1119
1282
|
* Retrieves a specific tool by registration key.
|
|
1120
1283
|
*
|
|
@@ -1651,7 +1814,7 @@ var Mastra = class {
|
|
|
1651
1814
|
* ```
|
|
1652
1815
|
*/
|
|
1653
1816
|
setStorage(storage) {
|
|
1654
|
-
this.#storage =
|
|
1817
|
+
this.#storage = chunkFLHFB23E_cjs.augmentWithInit(storage);
|
|
1655
1818
|
}
|
|
1656
1819
|
setLogger({ logger }) {
|
|
1657
1820
|
this.#logger = logger;
|
|
@@ -1681,12 +1844,22 @@ var Mastra = class {
|
|
|
1681
1844
|
this.#mcpServers?.[key]?.__setLogger(this.#logger);
|
|
1682
1845
|
});
|
|
1683
1846
|
}
|
|
1847
|
+
if (this.#workflows) {
|
|
1848
|
+
Object.keys(this.#workflows).forEach((key) => {
|
|
1849
|
+
this.#workflows?.[key]?.__setLogger(this.#logger);
|
|
1850
|
+
});
|
|
1851
|
+
}
|
|
1684
1852
|
if (this.#serverAdapter) {
|
|
1685
1853
|
this.#serverAdapter.__setLogger(this.#logger);
|
|
1686
1854
|
}
|
|
1687
1855
|
if (this.#workspace) {
|
|
1688
1856
|
this.#workspace.__setLogger(this.#logger);
|
|
1689
1857
|
}
|
|
1858
|
+
if (this.#memory) {
|
|
1859
|
+
Object.keys(this.#memory).forEach((key) => {
|
|
1860
|
+
this.#memory?.[key]?.__setLogger(this.#logger);
|
|
1861
|
+
});
|
|
1862
|
+
}
|
|
1690
1863
|
this.#observability.setLogger({ logger: this.#logger });
|
|
1691
1864
|
}
|
|
1692
1865
|
/**
|
|
@@ -2316,7 +2489,7 @@ var Mastra = class {
|
|
|
2316
2489
|
if (process.env.MASTRA_DEV !== "true" && process.env.MASTRA_DEV !== "1") {
|
|
2317
2490
|
return;
|
|
2318
2491
|
}
|
|
2319
|
-
import('./provider-registry-
|
|
2492
|
+
import('./provider-registry-C6XCYX44.cjs').then(async ({ GatewayRegistry }) => {
|
|
2320
2493
|
const registry = GatewayRegistry.getInstance();
|
|
2321
2494
|
const customGateways = Object.values(this.#gateways || {});
|
|
2322
2495
|
registry.registerCustomGateways(customGateways);
|
|
@@ -2370,5 +2543,5 @@ var Mastra = class {
|
|
|
2370
2543
|
};
|
|
2371
2544
|
|
|
2372
2545
|
exports.Mastra = Mastra;
|
|
2373
|
-
//# sourceMappingURL=chunk-
|
|
2374
|
-
//# sourceMappingURL=chunk-
|
|
2546
|
+
//# sourceMappingURL=chunk-D5JZT6EK.cjs.map
|
|
2547
|
+
//# sourceMappingURL=chunk-D5JZT6EK.cjs.map
|