@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,9 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MastraFilesystem Base Class
|
|
3
3
|
*
|
|
4
|
-
* Abstract base class for filesystem providers that want automatic logger integration
|
|
4
|
+
* Abstract base class for filesystem providers that want automatic logger integration
|
|
5
|
+
* and lifecycle management.
|
|
6
|
+
*
|
|
5
7
|
* Extends MastraBase to receive the Mastra logger when registered with a Mastra instance.
|
|
6
8
|
*
|
|
9
|
+
* ## Lifecycle Management
|
|
10
|
+
*
|
|
11
|
+
* The base class provides race-condition-safe lifecycle wrappers:
|
|
12
|
+
* - `_init()` - Handles concurrent calls, status management
|
|
13
|
+
* - `_destroy()` - Handles concurrent calls and status management
|
|
14
|
+
*
|
|
15
|
+
* Subclasses override the plain `init()` and `destroy()` methods to provide
|
|
16
|
+
* their implementation. Callers use the `_`-prefixed wrappers (or `callLifecycle()`)
|
|
17
|
+
* which add status tracking and race-condition safety.
|
|
18
|
+
*
|
|
7
19
|
* External providers can extend this class to get logger support, or implement
|
|
8
20
|
* the WorkspaceFilesystem interface directly if they don't need logging.
|
|
9
21
|
*/
|
|
@@ -11,7 +23,7 @@ import { MastraBase } from '../../base.js';
|
|
|
11
23
|
import type { ProviderStatus } from '../lifecycle.js';
|
|
12
24
|
import type { WorkspaceFilesystem, FileContent, FileStat, FileEntry, ReadOptions, WriteOptions, ListOptions, RemoveOptions, CopyOptions } from './filesystem.js';
|
|
13
25
|
/**
|
|
14
|
-
* Abstract base class for filesystem providers with logger support.
|
|
26
|
+
* Abstract base class for filesystem providers with logger support and lifecycle management.
|
|
15
27
|
*
|
|
16
28
|
* Providers that extend this class automatically receive the Mastra logger
|
|
17
29
|
* when the filesystem is used with a Mastra instance.
|
|
@@ -22,13 +34,19 @@ import type { WorkspaceFilesystem, FileContent, FileStat, FileEntry, ReadOptions
|
|
|
22
34
|
* readonly id = 'my-fs';
|
|
23
35
|
* readonly name = 'MyCustomFilesystem';
|
|
24
36
|
* readonly provider = 'custom';
|
|
25
|
-
* status: ProviderStatus = '
|
|
37
|
+
* status: ProviderStatus = 'pending';
|
|
26
38
|
*
|
|
27
39
|
* constructor() {
|
|
28
40
|
* super({ name: 'MyCustomFilesystem' });
|
|
29
41
|
* }
|
|
30
42
|
*
|
|
43
|
+
* // Override init() to provide initialization logic
|
|
44
|
+
* async init(): Promise<void> {
|
|
45
|
+
* // Your initialization logic here
|
|
46
|
+
* }
|
|
47
|
+
*
|
|
31
48
|
* async readFile(path: string): Promise<string | Buffer> {
|
|
49
|
+
* await this.ensureReady();
|
|
32
50
|
* this.logger.debug('Reading file', { path });
|
|
33
51
|
* // Implementation...
|
|
34
52
|
* }
|
|
@@ -45,9 +63,80 @@ export declare abstract class MastraFilesystem extends MastraBase implements Wor
|
|
|
45
63
|
abstract readonly provider: string;
|
|
46
64
|
/** Current status of the filesystem */
|
|
47
65
|
abstract status: ProviderStatus;
|
|
66
|
+
/** Error message when status is 'error' */
|
|
67
|
+
error?: string;
|
|
68
|
+
/** Promise for _init() to prevent race conditions from concurrent calls */
|
|
69
|
+
private _initPromise?;
|
|
70
|
+
/** Promise for _destroy() to prevent race conditions from concurrent calls */
|
|
71
|
+
private _destroyPromise?;
|
|
48
72
|
constructor(options: {
|
|
49
73
|
name: string;
|
|
50
74
|
});
|
|
75
|
+
/**
|
|
76
|
+
* Initialize the filesystem (wrapper with status management and race-condition safety).
|
|
77
|
+
*
|
|
78
|
+
* This method is race-condition-safe - concurrent calls will return the same promise.
|
|
79
|
+
* Handles status management automatically.
|
|
80
|
+
*
|
|
81
|
+
* Subclasses override `init()` to provide their initialization logic.
|
|
82
|
+
*/
|
|
83
|
+
_init(): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Internal init execution - handles status.
|
|
86
|
+
*/
|
|
87
|
+
private _executeInit;
|
|
88
|
+
/**
|
|
89
|
+
* Override this method to implement filesystem initialization logic.
|
|
90
|
+
*
|
|
91
|
+
* Called by `_init()` after status is set to 'initializing'.
|
|
92
|
+
* Status will be set to 'ready' on success, 'error' on failure.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```typescript
|
|
96
|
+
* async init(): Promise<void> {
|
|
97
|
+
* this._client = new StorageClient({ ... });
|
|
98
|
+
* await this._client.connect();
|
|
99
|
+
* }
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
init(): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* Ensure the filesystem is ready.
|
|
105
|
+
*
|
|
106
|
+
* Calls `_init()` if status is not 'ready'. Useful for lazy initialization
|
|
107
|
+
* where operations should automatically initialize the filesystem if needed.
|
|
108
|
+
*
|
|
109
|
+
* @throws {FilesystemNotReadyError} if the filesystem fails to reach 'ready' status
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* async readFile(path: string): Promise<string | Buffer> {
|
|
114
|
+
* await this.ensureReady();
|
|
115
|
+
* // Now safe to use the filesystem
|
|
116
|
+
* }
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
protected ensureReady(): Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* Destroy the filesystem and clean up all resources (wrapper with status management).
|
|
122
|
+
*
|
|
123
|
+
* This method is race-condition-safe - concurrent calls will return the same promise.
|
|
124
|
+
* Handles status management.
|
|
125
|
+
*
|
|
126
|
+
* Subclasses override `destroy()` to provide their destroy logic.
|
|
127
|
+
*/
|
|
128
|
+
_destroy(): Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* Internal destroy execution - handles status.
|
|
131
|
+
*/
|
|
132
|
+
private _executeDestroy;
|
|
133
|
+
/**
|
|
134
|
+
* Override this method to implement filesystem destroy logic.
|
|
135
|
+
*
|
|
136
|
+
* Called by `_destroy()` after status is set to 'destroying'.
|
|
137
|
+
* Status will be set to 'destroyed' on success, 'error' on failure.
|
|
138
|
+
*/
|
|
139
|
+
destroy(): Promise<void>;
|
|
51
140
|
abstract readFile(path: string, options?: ReadOptions): Promise<string | Buffer>;
|
|
52
141
|
abstract writeFile(path: string, content: FileContent, options?: WriteOptions): Promise<void>;
|
|
53
142
|
abstract appendFile(path: string, content: FileContent): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mastra-filesystem.d.ts","sourceRoot":"","sources":["../../../src/workspace/filesystem/mastra-filesystem.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"mastra-filesystem.d.ts","sourceRoot":"","sources":["../../../src/worksp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AAO,CAAC,OAAO,CAAC;IAC/C,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAC/C"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mount Types for Workspace Filesystems
|
|
3
|
+
*
|
|
4
|
+
* Base types for filesystem mounts. Provider-specific mount configs
|
|
5
|
+
* are defined in their respective packages (e.g., @mastra/s3, @mastra/e2b).
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Base configuration for filesystem mounts.
|
|
9
|
+
* Extended by specific packages (e.g., @mastra/s3 defines S3MountConfig).
|
|
10
|
+
*
|
|
11
|
+
* Filesystem packages implement getMountConfig() returning their specific config.
|
|
12
|
+
* Sandbox packages define what mount configs they support.
|
|
13
|
+
*/
|
|
14
|
+
export interface FilesystemMountConfig {
|
|
15
|
+
/** Mount type identifier (e.g., 's3', 'gcs', 'r2') */
|
|
16
|
+
type: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Result of a mount operation.
|
|
20
|
+
*/
|
|
21
|
+
export interface MountResult {
|
|
22
|
+
/** Whether the mount was successful */
|
|
23
|
+
success: boolean;
|
|
24
|
+
/** Path where the filesystem was mounted */
|
|
25
|
+
mountPath: string;
|
|
26
|
+
/** Error message if mount failed */
|
|
27
|
+
error?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Icon identifiers for filesystem providers.
|
|
31
|
+
* Used in UI to display appropriate icons.
|
|
32
|
+
*/
|
|
33
|
+
export type FilesystemIcon = 's3' | 'aws-s3' | 'gcs' | 'google-cloud' | 'google-cloud-storage' | 'r2' | 'cloudflare' | 'cloudflare-r2' | 'azure' | 'azure-blob' | 'minio' | 'local' | 'folder' | 'database' | 'hard-drive' | 'cloud' | string;
|
|
34
|
+
//# sourceMappingURL=mount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../../../src/workspace/filesystem/mount.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;CACd;AAMD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,IAAI,GACJ,QAAQ,GACR,KAAK,GACL,cAAc,GACd,sBAAsB,GACtB,IAAI,GACJ,YAAY,GACZ,eAAe,GACf,OAAO,GACP,YAAY,GACZ,OAAO,GACP,OAAO,GACP,QAAQ,GACR,UAAU,GACV,YAAY,GACZ,OAAO,GACP,MAAM,CAAC"}
|
package/dist/workspace/index.cjs
CHANGED
|
@@ -1,140 +1,168 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCGPH7CMG_cjs = require('../chunk-CGPH7CMG.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
Object.defineProperty(exports, "CompositeFilesystem", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkCGPH7CMG_cjs.CompositeFilesystem; }
|
|
10
|
+
});
|
|
7
11
|
Object.defineProperty(exports, "DirectoryNotEmptyError", {
|
|
8
12
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkCGPH7CMG_cjs.DirectoryNotEmptyError; }
|
|
10
14
|
});
|
|
11
15
|
Object.defineProperty(exports, "DirectoryNotFoundError", {
|
|
12
16
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkCGPH7CMG_cjs.DirectoryNotFoundError; }
|
|
14
18
|
});
|
|
15
19
|
Object.defineProperty(exports, "FileExistsError", {
|
|
16
20
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkCGPH7CMG_cjs.FileExistsError; }
|
|
18
22
|
});
|
|
19
23
|
Object.defineProperty(exports, "FileNotFoundError", {
|
|
20
24
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkCGPH7CMG_cjs.FileNotFoundError; }
|
|
22
26
|
});
|
|
23
27
|
Object.defineProperty(exports, "FileReadRequiredError", {
|
|
24
28
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkCGPH7CMG_cjs.FileReadRequiredError; }
|
|
26
30
|
});
|
|
27
31
|
Object.defineProperty(exports, "FilesystemError", {
|
|
28
32
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkCGPH7CMG_cjs.FilesystemError; }
|
|
30
34
|
});
|
|
31
35
|
Object.defineProperty(exports, "FilesystemNotAvailableError", {
|
|
32
36
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkCGPH7CMG_cjs.FilesystemNotAvailableError; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "FilesystemNotMountableError", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return chunkCGPH7CMG_cjs.FilesystemNotMountableError; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "FilesystemNotReadyError", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return chunkCGPH7CMG_cjs.FilesystemNotReadyError; }
|
|
34
46
|
});
|
|
35
47
|
Object.defineProperty(exports, "IsDirectoryError", {
|
|
36
48
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkCGPH7CMG_cjs.IsDirectoryError; }
|
|
38
50
|
});
|
|
39
51
|
Object.defineProperty(exports, "IsolationUnavailableError", {
|
|
40
52
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkCGPH7CMG_cjs.IsolationUnavailableError; }
|
|
42
54
|
});
|
|
43
55
|
Object.defineProperty(exports, "LocalFilesystem", {
|
|
44
56
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkCGPH7CMG_cjs.LocalFilesystem; }
|
|
46
58
|
});
|
|
47
59
|
Object.defineProperty(exports, "LocalSandbox", {
|
|
48
60
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkCGPH7CMG_cjs.LocalSandbox; }
|
|
50
62
|
});
|
|
51
63
|
Object.defineProperty(exports, "MastraFilesystem", {
|
|
52
64
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkCGPH7CMG_cjs.MastraFilesystem; }
|
|
54
66
|
});
|
|
55
67
|
Object.defineProperty(exports, "MastraSandbox", {
|
|
56
68
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkCGPH7CMG_cjs.MastraSandbox; }
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(exports, "MountError", {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () { return chunkCGPH7CMG_cjs.MountError; }
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, "MountManager", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () { return chunkCGPH7CMG_cjs.MountManager; }
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(exports, "MountNotSupportedError", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
get: function () { return chunkCGPH7CMG_cjs.MountNotSupportedError; }
|
|
58
82
|
});
|
|
59
83
|
Object.defineProperty(exports, "NotDirectoryError", {
|
|
60
84
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkCGPH7CMG_cjs.NotDirectoryError; }
|
|
62
86
|
});
|
|
63
87
|
Object.defineProperty(exports, "PermissionError", {
|
|
64
88
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkCGPH7CMG_cjs.PermissionError; }
|
|
66
90
|
});
|
|
67
91
|
Object.defineProperty(exports, "SandboxError", {
|
|
68
92
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkCGPH7CMG_cjs.SandboxError; }
|
|
70
94
|
});
|
|
71
95
|
Object.defineProperty(exports, "SandboxExecutionError", {
|
|
72
96
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkCGPH7CMG_cjs.SandboxExecutionError; }
|
|
74
98
|
});
|
|
75
99
|
Object.defineProperty(exports, "SandboxFeatureNotSupportedError", {
|
|
76
100
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkCGPH7CMG_cjs.SandboxFeatureNotSupportedError; }
|
|
78
102
|
});
|
|
79
103
|
Object.defineProperty(exports, "SandboxNotAvailableError", {
|
|
80
104
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkCGPH7CMG_cjs.SandboxNotAvailableError; }
|
|
82
106
|
});
|
|
83
107
|
Object.defineProperty(exports, "SandboxNotReadyError", {
|
|
84
108
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkCGPH7CMG_cjs.SandboxNotReadyError; }
|
|
86
110
|
});
|
|
87
111
|
Object.defineProperty(exports, "SandboxTimeoutError", {
|
|
88
112
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunkCGPH7CMG_cjs.SandboxTimeoutError; }
|
|
90
114
|
});
|
|
91
115
|
Object.defineProperty(exports, "SearchNotAvailableError", {
|
|
92
116
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunkCGPH7CMG_cjs.SearchNotAvailableError; }
|
|
94
118
|
});
|
|
95
119
|
Object.defineProperty(exports, "WORKSPACE_TOOLS", {
|
|
96
120
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunkCGPH7CMG_cjs.WORKSPACE_TOOLS; }
|
|
98
122
|
});
|
|
99
123
|
Object.defineProperty(exports, "WORKSPACE_TOOLS_PREFIX", {
|
|
100
124
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunkCGPH7CMG_cjs.WORKSPACE_TOOLS_PREFIX; }
|
|
102
126
|
});
|
|
103
127
|
Object.defineProperty(exports, "Workspace", {
|
|
104
128
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunkCGPH7CMG_cjs.Workspace; }
|
|
106
130
|
});
|
|
107
131
|
Object.defineProperty(exports, "WorkspaceError", {
|
|
108
132
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunkCGPH7CMG_cjs.WorkspaceError; }
|
|
110
134
|
});
|
|
111
135
|
Object.defineProperty(exports, "WorkspaceNotReadyError", {
|
|
112
136
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunkCGPH7CMG_cjs.WorkspaceNotReadyError; }
|
|
114
138
|
});
|
|
115
139
|
Object.defineProperty(exports, "WorkspaceReadOnlyError", {
|
|
116
140
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunkCGPH7CMG_cjs.WorkspaceReadOnlyError; }
|
|
142
|
+
});
|
|
143
|
+
Object.defineProperty(exports, "callLifecycle", {
|
|
144
|
+
enumerable: true,
|
|
145
|
+
get: function () { return chunkCGPH7CMG_cjs.callLifecycle; }
|
|
118
146
|
});
|
|
119
147
|
Object.defineProperty(exports, "createWorkspaceTools", {
|
|
120
148
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
149
|
+
get: function () { return chunkCGPH7CMG_cjs.createWorkspaceTools; }
|
|
122
150
|
});
|
|
123
151
|
Object.defineProperty(exports, "detectIsolation", {
|
|
124
152
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunkCGPH7CMG_cjs.detectIsolation; }
|
|
126
154
|
});
|
|
127
155
|
Object.defineProperty(exports, "getRecommendedIsolation", {
|
|
128
156
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkCGPH7CMG_cjs.getRecommendedIsolation; }
|
|
130
158
|
});
|
|
131
159
|
Object.defineProperty(exports, "isIsolationAvailable", {
|
|
132
160
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunkCGPH7CMG_cjs.isIsolationAvailable; }
|
|
134
162
|
});
|
|
135
163
|
Object.defineProperty(exports, "resolveToolConfig", {
|
|
136
164
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
165
|
+
get: function () { return chunkCGPH7CMG_cjs.resolveToolConfig; }
|
|
138
166
|
});
|
|
139
167
|
//# sourceMappingURL=index.cjs.map
|
|
140
168
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
export * from './workspace.js';
|
|
2
2
|
export { LocalFilesystem, type LocalFilesystemOptions } from './filesystem/index.js';
|
|
3
|
+
export { CompositeFilesystem, type CompositeFilesystemConfig } from './filesystem/index.js';
|
|
3
4
|
export { LocalSandbox, type LocalSandboxOptions } from './sandbox/index.js';
|
|
4
5
|
export { MastraFilesystem } from './filesystem/index.js';
|
|
5
6
|
export { MastraSandbox } from './sandbox/index.js';
|
|
6
7
|
export * from './errors.js';
|
|
7
|
-
export { SandboxError, SandboxExecutionError, SandboxTimeoutError, SandboxNotReadyError, IsolationUnavailableError, type SandboxOperation, } from './sandbox/index.js';
|
|
8
|
+
export { SandboxError, SandboxExecutionError, SandboxTimeoutError, SandboxNotReadyError, IsolationUnavailableError, MountError, MountNotSupportedError, FilesystemNotMountableError, type SandboxOperation, } from './sandbox/index.js';
|
|
8
9
|
export { createWorkspaceTools, resolveToolConfig, type WorkspaceToolConfig, type WorkspaceToolsConfig } from './tools/index.js';
|
|
9
10
|
export * from './lifecycle.js';
|
|
10
11
|
export type { WorkspaceFilesystem, FileContent, FileStat, FileEntry, FilesystemInfo, ReadOptions, WriteOptions, ListOptions, RemoveOptions, CopyOptions, } from './filesystem/index.js';
|
|
11
|
-
export type {
|
|
12
|
+
export type { FilesystemMountConfig, MountResult, FilesystemIcon } from './filesystem/index.js';
|
|
13
|
+
export { MountManager } from './sandbox/index.js';
|
|
14
|
+
export type { WorkspaceSandbox, ExecutionResult, CommandResult, ExecuteCommandOptions, SandboxInfo, SandboxLifecycleHook, MastraSandboxOptions, } from './sandbox/index.js';
|
|
15
|
+
export type { MountManagerConfig, MountFn, OnMountHook, OnMountArgs, OnMountResult } from './sandbox/index.js';
|
|
12
16
|
export type { IsolationBackend, NativeSandboxConfig, SandboxDetectionResult } from './sandbox/index.js';
|
|
13
17
|
export { detectIsolation, isIsolationAvailable, getRecommendedIsolation } from './sandbox/index.js';
|
|
14
18
|
export { WORKSPACE_TOOLS_PREFIX, WORKSPACE_TOOLS, type WorkspaceToolName } from './constants/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workspace/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,KAAK,gBAAgB,GACtB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,KAAK,m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AAY,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAGtG,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAG3F,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG9F,YAAY,EACV,WAAW,EACX,aAAa,EACb,KAAK,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,aAAa,GACd,MAAM,UAAU,CAAC"}
|
package/dist/workspace/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DirectoryNotEmptyError, DirectoryNotFoundError, FileExistsError, FileNotFoundError, FileReadRequiredError, FilesystemError, FilesystemNotAvailableError, IsDirectoryError, IsolationUnavailableError, LocalFilesystem, LocalSandbox, MastraFilesystem, MastraSandbox, NotDirectoryError, PermissionError, SandboxError, SandboxExecutionError, SandboxFeatureNotSupportedError, SandboxNotAvailableError, SandboxNotReadyError, SandboxTimeoutError, SearchNotAvailableError, WORKSPACE_TOOLS, WORKSPACE_TOOLS_PREFIX, Workspace, WorkspaceError, WorkspaceNotReadyError, WorkspaceReadOnlyError, createWorkspaceTools, detectIsolation, getRecommendedIsolation, isIsolationAvailable, resolveToolConfig } from '../chunk-
|
|
1
|
+
export { CompositeFilesystem, DirectoryNotEmptyError, DirectoryNotFoundError, FileExistsError, FileNotFoundError, FileReadRequiredError, FilesystemError, FilesystemNotAvailableError, FilesystemNotMountableError, FilesystemNotReadyError, IsDirectoryError, IsolationUnavailableError, LocalFilesystem, LocalSandbox, MastraFilesystem, MastraSandbox, MountError, MountManager, MountNotSupportedError, NotDirectoryError, PermissionError, SandboxError, SandboxExecutionError, SandboxFeatureNotSupportedError, SandboxNotAvailableError, SandboxNotReadyError, SandboxTimeoutError, SearchNotAvailableError, WORKSPACE_TOOLS, WORKSPACE_TOOLS_PREFIX, Workspace, WorkspaceError, WorkspaceNotReadyError, WorkspaceReadOnlyError, callLifecycle, createWorkspaceTools, detectIsolation, getRecommendedIsolation, isIsolationAvailable, resolveToolConfig } from '../chunk-2GWTJFVM.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
export interface Lifecycle<TInfo = unknown> {
|
|
37
37
|
/** Current status */
|
|
38
38
|
status: ProviderStatus;
|
|
39
|
+
/** Error message when status is 'error' */
|
|
40
|
+
error?: string;
|
|
39
41
|
/**
|
|
40
42
|
* One-time setup operations.
|
|
41
43
|
*
|
|
@@ -103,4 +105,31 @@ export interface Lifecycle<TInfo = unknown> {
|
|
|
103
105
|
* instances can use these states.
|
|
104
106
|
*/
|
|
105
107
|
export type ProviderStatus = 'pending' | 'initializing' | 'ready' | 'starting' | 'running' | 'stopping' | 'stopped' | 'destroying' | 'destroyed' | 'error';
|
|
108
|
+
/**
|
|
109
|
+
* Provider that may have lifecycle methods.
|
|
110
|
+
* Used by `callLifecycle` to dispatch to the correct method.
|
|
111
|
+
*/
|
|
112
|
+
interface LifecycleProvider {
|
|
113
|
+
_init?(): void | Promise<void>;
|
|
114
|
+
_start?(): void | Promise<void>;
|
|
115
|
+
_stop?(): void | Promise<void>;
|
|
116
|
+
_destroy?(): void | Promise<void>;
|
|
117
|
+
init?(): void | Promise<void>;
|
|
118
|
+
start?(): void | Promise<void>;
|
|
119
|
+
stop?(): void | Promise<void>;
|
|
120
|
+
destroy?(): void | Promise<void>;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Call a lifecycle method on a provider, preferring the `_`-prefixed wrapper
|
|
124
|
+
* (which adds status tracking & race-condition safety) when available,
|
|
125
|
+
* falling back to the plain method for interface-only implementations.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```typescript
|
|
129
|
+
* await callLifecycle(sandbox, 'start'); // calls sandbox._start() ?? sandbox.start()
|
|
130
|
+
* await callLifecycle(filesystem, 'init'); // calls filesystem._init() ?? filesystem.init()
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
export declare function callLifecycle(provider: LifecycleProvider, method: 'init' | 'start' | 'stop' | 'destroy'): Promise<void>;
|
|
134
|
+
export {};
|
|
106
135
|
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/workspace/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,SAAS,CAAC,KAAK,GAAG,OAAO;IACxC,qBAAqB;IACrB,MAAM,EAAE,cAAc,CAAC;IAEvB;;;;;;;;;OASG;IACH,IAAI,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9B;;;;;;;;;OASG;IACH,KAAK,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/B;;;;;;;;OAQG;IACH,IAAI,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9B;;;;;;;;OAQG;IACH,OAAO,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjC;;;;;;;;OAQG;IACH,OAAO,CAAC,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvC;;;;OAIG;IACH,OAAO,CAAC,IAAI,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,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,KAAK,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,QAAQ,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,KAAK,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,iBAAiB,EAC3B,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAC5C,OAAO,CAAC,IAAI,CAAC,CAWf"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sandbox Errors
|
|
3
|
+
*
|
|
4
|
+
* Error classes for sandbox operations including execution and mounting.
|
|
5
|
+
*/
|
|
6
|
+
import type { SandboxOperation } from './types.js';
|
|
7
|
+
export declare class SandboxError extends Error {
|
|
8
|
+
readonly code: string;
|
|
9
|
+
readonly details?: Record<string, unknown> | undefined;
|
|
10
|
+
constructor(message: string, code: string, details?: Record<string, unknown> | undefined);
|
|
11
|
+
}
|
|
12
|
+
export declare class SandboxExecutionError extends SandboxError {
|
|
13
|
+
readonly exitCode: number;
|
|
14
|
+
readonly stdout: string;
|
|
15
|
+
readonly stderr: string;
|
|
16
|
+
constructor(message: string, exitCode: number, stdout: string, stderr: string);
|
|
17
|
+
}
|
|
18
|
+
export declare class SandboxTimeoutError extends SandboxError {
|
|
19
|
+
readonly timeoutMs: number;
|
|
20
|
+
readonly operation: SandboxOperation;
|
|
21
|
+
constructor(timeoutMs: number, operation: SandboxOperation);
|
|
22
|
+
}
|
|
23
|
+
export declare class SandboxNotReadyError extends SandboxError {
|
|
24
|
+
constructor(idOrStatus: string);
|
|
25
|
+
}
|
|
26
|
+
export declare class IsolationUnavailableError extends SandboxError {
|
|
27
|
+
readonly backend: string;
|
|
28
|
+
readonly reason: string;
|
|
29
|
+
constructor(backend: string, reason: string);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Base error for mount operations.
|
|
33
|
+
*/
|
|
34
|
+
export declare class MountError extends SandboxError {
|
|
35
|
+
readonly mountPath: string;
|
|
36
|
+
constructor(message: string, mountPath: string, details?: Record<string, unknown>);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Error thrown when sandbox doesn't support mounting.
|
|
40
|
+
*/
|
|
41
|
+
export declare class MountNotSupportedError extends SandboxError {
|
|
42
|
+
constructor(sandboxProvider: string);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Error thrown when a filesystem cannot be mounted.
|
|
46
|
+
*/
|
|
47
|
+
export declare class FilesystemNotMountableError extends SandboxError {
|
|
48
|
+
constructor(filesystemProvider: string, reason?: string);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/workspace/sandbox/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMhD,qBAAa,YAAa,SAAQ,KAAK;aAGnB,IAAI,EAAE,MAAM;aACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFjD,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,CAA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ot":"","sources":["../../../src/workspace/sandbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { ProviderStatus } from '../lifecycle.js';
|
|
12
12
|
import { MastraSandbox } from './mastra-sandbox.js';
|
|
13
|
+
import type { MastraSandboxOptions } from './mastra-sandbox.js';
|
|
13
14
|
import type { IsolationBackend, NativeSandboxConfig } from './native-sandbox/index.js';
|
|
14
|
-
import type { SandboxInfo, ExecuteCommandOptions, CommandResult } from './
|
|
15
|
+
import type { SandboxInfo, ExecuteCommandOptions, CommandResult } from './types.js';
|
|
15
16
|
/**
|
|
16
17
|
* Local sandbox provider configuration.
|
|
17
18
|
*/
|
|
18
|
-
export interface LocalSandboxOptions {
|
|
19
|
+
export interface LocalSandboxOptions extends Pick<MastraSandboxOptions, 'onStart' | 'onStop' | 'onDestroy'> {
|
|
19
20
|
/** Unique identifier for this sandbox instance */
|
|
20
21
|
id?: string;
|
|
21
22
|
/** Working directory for command execution */
|
|
@@ -119,8 +120,22 @@ export declare class LocalSandbox extends MastraSandbox {
|
|
|
119
120
|
* Merges the sandbox's configured env with any additional env from the command.
|
|
120
121
|
*/
|
|
121
122
|
private buildEnv;
|
|
123
|
+
/**
|
|
124
|
+
* Start the local sandbox.
|
|
125
|
+
* Creates working directory and sets up seatbelt profile if using macOS isolation.
|
|
126
|
+
* Status management is handled by the base class.
|
|
127
|
+
*/
|
|
122
128
|
start(): Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* Stop the local sandbox.
|
|
131
|
+
* Status management is handled by the base class.
|
|
132
|
+
*/
|
|
123
133
|
stop(): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Destroy the local sandbox and clean up resources.
|
|
136
|
+
* Cleans up seatbelt profile if auto-generated.
|
|
137
|
+
* Status management is handled by the base class.
|
|
138
|
+
*/
|
|
124
139
|
destroy(): Promise<void>;
|
|
125
140
|
isReady(): Promise<boolean>;
|
|
126
141
|
getInfo(): Promise<SandboxInfo>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-sandbox.d.ts","sourceRoot":"","sources":["../../../src/workspace/sandbox/local-sandbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"local-sandbox.d.ts","sourceRoot":"","sources":["../../../src/workspace/sandbox/local-sandbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAwEjF;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;IACzG,kDAAkD;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;;;;;;;OAgBG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAA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