@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 +0,0 @@
|
|
|
1
|
-
# NetlifyDeployer
|
|
2
|
-
|
|
3
|
-
The `NetlifyDeployer` class handles deployment of standalone Mastra applications to Netlify. It manages configuration, deployment, and extends the base [Deployer](https://mastra.ai/reference/deployer) class with Netlify specific functionality.
|
|
4
|
-
|
|
5
|
-
## Usage example
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { Mastra } from "@mastra/core";
|
|
9
|
-
import { NetlifyDeployer } from "@mastra/deployer-netlify";
|
|
10
|
-
|
|
11
|
-
export const mastra = new Mastra({
|
|
12
|
-
deployer: new NetlifyDeployer(),
|
|
13
|
-
});
|
|
14
|
-
```
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# VercelDeployer
|
|
2
|
-
|
|
3
|
-
The `VercelDeployer` class handles deployment of standalone Mastra applications to Vercel. It manages configuration, deployment, and extends the base [Deployer](https://mastra.ai/reference/deployer) class with Vercel specific functionality.
|
|
4
|
-
|
|
5
|
-
## Usage example
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { Mastra } from "@mastra/core";
|
|
9
|
-
import { VercelDeployer } from "@mastra/deployer-vercel";
|
|
10
|
-
|
|
11
|
-
export const mastra = new Mastra({
|
|
12
|
-
deployer: new VercelDeployer(),
|
|
13
|
-
});
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Constructor options
|
|
17
|
-
|
|
18
|
-
The deployer supports a small set of high‑value overrides that are written to the Vercel Output API function config (`.vc-config.json`):
|
|
19
|
-
|
|
20
|
-
- `maxDuration?: number` — Function execution timeout (in seconds)
|
|
21
|
-
- `memory?: number` — Function memory (in MB)
|
|
22
|
-
- `regions?: string[]` — Regions to deploy the function (e.g. `['sfo1','iad1']`)
|
|
23
|
-
|
|
24
|
-
These options are merged into `.vercel/output/functions/index.func/.vc-config.json` while preserving default fields (`handler`, `launcherType`, `runtime`, `shouldAddHelpers`).
|
|
25
|
-
|
|
26
|
-
### Example with overrides
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
import { Mastra } from "@mastra/core";
|
|
30
|
-
import { VercelDeployer } from "@mastra/deployer-vercel";
|
|
31
|
-
|
|
32
|
-
export const mastra = new Mastra({
|
|
33
|
-
deployer: new VercelDeployer({
|
|
34
|
-
maxDuration: 600,
|
|
35
|
-
memory: 1536,
|
|
36
|
-
regions: ["sfo1", "iad1"],
|
|
37
|
-
}),
|
|
38
|
-
});
|
|
39
|
-
```
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
# MastraMCPClient (Deprecated)
|
|
2
|
-
|
|
3
|
-
The `MastraMCPClient` class provides a client implementation for interacting with Model Context Protocol (MCP) servers. It handles connection management, resource discovery, and tool execution through the MCP protocol.
|
|
4
|
-
|
|
5
|
-
## Deprecation notice
|
|
6
|
-
|
|
7
|
-
`MastraMCPClient` is being deprecated in favour of [`MCPClient`](https://mastra.ai/reference/tools/mcp-client). Rather than having two different interfaces for managing a single MCP server vs multiple MCP servers, we opted to recommend using the interface to manage multiple even when using a single MCP server.
|
|
8
|
-
|
|
9
|
-
## Constructor
|
|
10
|
-
|
|
11
|
-
Creates a new instance of the MastraMCPClient.
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
constructor({
|
|
15
|
-
name,
|
|
16
|
-
version = '1.0.0',
|
|
17
|
-
server,
|
|
18
|
-
capabilities = {},
|
|
19
|
-
timeout = 60000,
|
|
20
|
-
}: {
|
|
21
|
-
name: string;
|
|
22
|
-
server: MastraMCPServerDefinition;
|
|
23
|
-
capabilities?: ClientCapabilities;
|
|
24
|
-
version?: string;
|
|
25
|
-
timeout?: number;
|
|
26
|
-
})
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### Parameters
|
|
30
|
-
|
|
31
|
-
**name:** (`string`): The name identifier for this client instance.
|
|
32
|
-
|
|
33
|
-
**version?:** (`string`): The version of the client. (Default: `1.0.0`)
|
|
34
|
-
|
|
35
|
-
**server:** (`MastraMCPServerDefinition`): Configuration parameters for either a stdio server connection or an SSE server connection. Can include log handler and server logs configuration.
|
|
36
|
-
|
|
37
|
-
**capabilities?:** (`ClientCapabilities`): Optional capabilities configuration for the client. (Default: `{}`)
|
|
38
|
-
|
|
39
|
-
**timeout?:** (`number`): The timeout duration, in milliseconds, for client tool calls. (Default: `60000`)
|
|
40
|
-
|
|
41
|
-
### MastraMCPServerDefinition
|
|
42
|
-
|
|
43
|
-
MCP servers can be configured using this definition. The client automatically detects the transport type based on the provided parameters:
|
|
44
|
-
|
|
45
|
-
- If `command` is provided, it uses the Stdio transport.
|
|
46
|
-
- If `url` is provided, it first attempts to use the Streamable HTTP transport and falls back to the legacy SSE transport if the initial connection fails.
|
|
47
|
-
|
|
48
|
-
**command?:** (`string`): For Stdio servers: The command to execute.
|
|
49
|
-
|
|
50
|
-
**args?:** (`string[]`): For Stdio servers: Arguments to pass to the command.
|
|
51
|
-
|
|
52
|
-
**env?:** (`Record<string, string>`): For Stdio servers: Environment variables to set for the command.
|
|
53
|
-
|
|
54
|
-
**url?:** (`URL`): For HTTP servers (Streamable HTTP or SSE): The URL of the server.
|
|
55
|
-
|
|
56
|
-
**requestInit?:** (`RequestInit`): For HTTP servers: Request configuration for the fetch API.
|
|
57
|
-
|
|
58
|
-
**eventSourceInit?:** (`EventSourceInit`): For SSE fallback: Custom fetch configuration for SSE connections. Required when using custom headers with SSE.
|
|
59
|
-
|
|
60
|
-
**logger?:** (`LogHandler`): Optional additional handler for logging.
|
|
61
|
-
|
|
62
|
-
**timeout?:** (`number`): Server-specific timeout in milliseconds.
|
|
63
|
-
|
|
64
|
-
**capabilities?:** (`ClientCapabilities`): Server-specific capabilities configuration.
|
|
65
|
-
|
|
66
|
-
**enableServerLogs?:** (`boolean`): Whether to enable logging for this server. (Default: `true`)
|
|
67
|
-
|
|
68
|
-
### LogHandler
|
|
69
|
-
|
|
70
|
-
The `LogHandler` function takes a `LogMessage` object as its parameter and returns void. The `LogMessage` object has the following properties. The `LoggingLevel` type is a string enum with values: `debug`, `info`, `warn`, and `error`.
|
|
71
|
-
|
|
72
|
-
**level:** (`LoggingLevel`): Log level (debug, info, warn, error)
|
|
73
|
-
|
|
74
|
-
**message:** (`string`): Log message content
|
|
75
|
-
|
|
76
|
-
**timestamp:** (`Date`): When the log was generated
|
|
77
|
-
|
|
78
|
-
**serverName:** (`string`): Name of the server that generated the log
|
|
79
|
-
|
|
80
|
-
**details?:** (`Record<string, any>`): Optional additional log details
|
|
81
|
-
|
|
82
|
-
## Methods
|
|
83
|
-
|
|
84
|
-
### connect()
|
|
85
|
-
|
|
86
|
-
Establishes a connection with the MCP server.
|
|
87
|
-
|
|
88
|
-
```typescript
|
|
89
|
-
async connect(): Promise<void>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### disconnect()
|
|
93
|
-
|
|
94
|
-
Closes the connection with the MCP server.
|
|
95
|
-
|
|
96
|
-
```typescript
|
|
97
|
-
async disconnect(): Promise<void>
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### resources()
|
|
101
|
-
|
|
102
|
-
Retrieves the list of available resources from the server.
|
|
103
|
-
|
|
104
|
-
```typescript
|
|
105
|
-
async resources(): Promise<ListResourcesResult>
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### tools()
|
|
109
|
-
|
|
110
|
-
Fetches and initializes available tools from the server, converting them into Mastra-compatible tool formats.
|
|
111
|
-
|
|
112
|
-
```typescript
|
|
113
|
-
async tools(): Promise<Record<string, Tool>>
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Returns an object mapping tool names to their corresponding Mastra tool implementations.
|
|
117
|
-
|
|
118
|
-
## Examples
|
|
119
|
-
|
|
120
|
-
### Using with Mastra Agent
|
|
121
|
-
|
|
122
|
-
#### Example with Stdio Server
|
|
123
|
-
|
|
124
|
-
```typescript
|
|
125
|
-
import { Agent } from "@mastra/core/agent";
|
|
126
|
-
import { MastraMCPClient } from "@mastra/mcp";
|
|
127
|
-
|
|
128
|
-
// Initialize the MCP client using mcp/fetch as an example https://hub.docker.com/r/mcp/fetch
|
|
129
|
-
// Visit https://github.com/docker/mcp-servers for other reference docker mcp servers
|
|
130
|
-
const fetchClient = new MastraMCPClient({
|
|
131
|
-
name: "fetch",
|
|
132
|
-
server: {
|
|
133
|
-
command: "docker",
|
|
134
|
-
args: ["run", "-i", "--rm", "mcp/fetch"],
|
|
135
|
-
logger: (logMessage) => {
|
|
136
|
-
console.log(`[${logMessage.level}] ${logMessage.message}`);
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
// Create a Mastra Agent
|
|
142
|
-
const agent = new Agent({
|
|
143
|
-
name: "Fetch agent",
|
|
144
|
-
instructions:
|
|
145
|
-
"You are able to fetch data from URLs on demand and discuss the response data with the user.",
|
|
146
|
-
model: "openai/gpt-5.1",
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
try {
|
|
150
|
-
// Connect to the MCP server
|
|
151
|
-
await fetchClient.connect();
|
|
152
|
-
|
|
153
|
-
// Gracefully handle process exits so the docker subprocess is cleaned up
|
|
154
|
-
process.on("exit", () => {
|
|
155
|
-
fetchClient.disconnect();
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
// Get available tools
|
|
159
|
-
const tools = await fetchClient.tools();
|
|
160
|
-
|
|
161
|
-
// Use the agent with the MCP tools
|
|
162
|
-
const response = await agent.generate(
|
|
163
|
-
"Tell me about mastra.ai/docs. Tell me generally what this page is and the content it includes.",
|
|
164
|
-
{
|
|
165
|
-
toolsets: {
|
|
166
|
-
fetch: tools,
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
);
|
|
170
|
-
|
|
171
|
-
console.log("\n\n" + response.text);
|
|
172
|
-
} catch (error) {
|
|
173
|
-
console.error("Error:", error);
|
|
174
|
-
} finally {
|
|
175
|
-
// Always disconnect when done
|
|
176
|
-
await fetchClient.disconnect();
|
|
177
|
-
}
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Example with SSE Server
|
|
181
|
-
|
|
182
|
-
```typescript
|
|
183
|
-
// Initialize the MCP client using an SSE server
|
|
184
|
-
const sseClient = new MastraMCPClient({
|
|
185
|
-
name: "sse-client",
|
|
186
|
-
server: {
|
|
187
|
-
url: new URL("https://your-mcp-server.com/sse"),
|
|
188
|
-
// Optional fetch request configuration - Note: requestInit alone isn't enough for SSE
|
|
189
|
-
requestInit: {
|
|
190
|
-
headers: {
|
|
191
|
-
Authorization: "Bearer your-token",
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
// Required for SSE connections with custom headers
|
|
195
|
-
eventSourceInit: {
|
|
196
|
-
fetch(input: Request | URL | string, init?: RequestInit) {
|
|
197
|
-
const headers = new Headers(init?.headers || {});
|
|
198
|
-
headers.set("Authorization", "Bearer your-token");
|
|
199
|
-
return fetch(input, {
|
|
200
|
-
...init,
|
|
201
|
-
headers,
|
|
202
|
-
});
|
|
203
|
-
},
|
|
204
|
-
},
|
|
205
|
-
// Optional additional logging configuration
|
|
206
|
-
logger: (logMessage) => {
|
|
207
|
-
console.log(
|
|
208
|
-
`[${logMessage.level}] ${logMessage.serverName}: ${logMessage.message}`,
|
|
209
|
-
);
|
|
210
|
-
},
|
|
211
|
-
// Disable server logs
|
|
212
|
-
enableServerLogs: false,
|
|
213
|
-
},
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
// The rest of the usage is identical to the stdio example
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Important Note About SSE Authentication
|
|
220
|
-
|
|
221
|
-
When using SSE connections with authentication or custom headers, you need to configure both `requestInit` and `eventSourceInit`. This is because SSE connections use the browser's EventSource API, which doesn't support custom headers directly.
|
|
222
|
-
|
|
223
|
-
The `eventSourceInit` configuration allows you to customize the underlying fetch request used for the SSE connection, ensuring your authentication headers are properly included. Without `eventSourceInit`, authentication headers specified in `requestInit` won't be included in the connection request, leading to 401 Unauthorized errors.
|
|
224
|
-
|
|
225
|
-
## Related Information
|
|
226
|
-
|
|
227
|
-
- For managing multiple MCP servers in your application, see the [MCPClient documentation](https://mastra.ai/reference/tools/mcp-client)
|
|
228
|
-
- For more details about the Model Context Protocol, see the [@modelcontextprotocol/sdk documentation](https://github.com/modelcontextprotocol/typescript-sdk).
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkYLODOPYM_cjs = require('./chunk-YLODOPYM.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "ModelsDevGateway", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () { return chunkYLODOPYM_cjs.ModelsDevGateway; }
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=models-dev-OQKVMEIT.cjs.map
|
|
12
|
-
//# sourceMappingURL=models-dev-OQKVMEIT.cjs.map
|
package/dist/netlify-SSWMYSAX.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkVZXYBFCX_cjs = require('./chunk-VZXYBFCX.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "NetlifyGateway", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () { return chunkVZXYBFCX_cjs.NetlifyGateway; }
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=netlify-TXZZCT6N.cjs.map
|
|
12
|
-
//# sourceMappingURL=netlify-TXZZCT6N.cjs.map
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkHN2MSTR6_cjs = require('./chunk-HN2MSTR6.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "GatewayRegistry", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () { return chunkHN2MSTR6_cjs.GatewayRegistry; }
|
|
10
|
-
});
|
|
11
|
-
Object.defineProperty(exports, "PROVIDER_MODELS", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return chunkHN2MSTR6_cjs.PROVIDER_MODELS; }
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports, "PROVIDER_REGISTRY", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return chunkHN2MSTR6_cjs.PROVIDER_REGISTRY; }
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "getProviderConfig", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return chunkHN2MSTR6_cjs.getProviderConfig; }
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports, "getRegisteredProviders", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function () { return chunkHN2MSTR6_cjs.getRegisteredProviders; }
|
|
26
|
-
});
|
|
27
|
-
Object.defineProperty(exports, "isProviderRegistered", {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () { return chunkHN2MSTR6_cjs.isProviderRegistered; }
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(exports, "isValidModelId", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () { return chunkHN2MSTR6_cjs.isValidModelId; }
|
|
34
|
-
});
|
|
35
|
-
Object.defineProperty(exports, "parseModelString", {
|
|
36
|
-
enumerable: true,
|
|
37
|
-
get: function () { return chunkHN2MSTR6_cjs.parseModelString; }
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=provider-registry-NR7FXV2Q.cjs.map
|
|
40
|
-
//# sourceMappingURL=provider-registry-NR7FXV2Q.cjs.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { GatewayRegistry, PROVIDER_MODELS, PROVIDER_REGISTRY, getProviderConfig, getRegisteredProviders, isProviderRegistered, isValidModelId, parseModelString } from './chunk-P62OJXQ4.js';
|
|
2
|
-
//# sourceMappingURL=provider-registry-RPOTQNHI.js.map
|
|
3
|
-
//# sourceMappingURL=provider-registry-RPOTQNHI.js.map
|