@mastra/core 0.24.0 → 1.0.0-beta.0
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 +478 -141
- package/README.md +2 -3
- package/agent/message-list.d.ts +1 -0
- package/dist/action/index.d.ts +0 -2
- package/dist/action/index.d.ts.map +1 -1
- package/dist/agent/__tests__/mock-model.d.ts +3 -1
- package/dist/agent/__tests__/mock-model.d.ts.map +1 -1
- package/dist/agent/agent-legacy.d.ts +176 -0
- package/dist/agent/agent-legacy.d.ts.map +1 -0
- package/dist/agent/agent.d.ts +83 -229
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.types.d.ts +10 -25
- package/dist/agent/agent.types.d.ts.map +1 -1
- package/dist/agent/index.cjs +10 -26
- package/dist/agent/index.d.ts +1 -2
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/index.cjs +16 -0
- package/dist/agent/message-list/index.d.ts +77 -87
- package/dist/agent/message-list/index.d.ts.map +1 -1
- package/dist/agent/message-list/index.js +3 -0
- package/dist/agent/message-list/prompt/attachments-to-parts.d.ts +2 -2
- package/dist/agent/message-list/prompt/attachments-to-parts.d.ts.map +1 -1
- package/dist/agent/message-list/prompt/convert-to-mastra-v1.d.ts +2 -2
- package/dist/agent/message-list/prompt/download-assets.d.ts.map +1 -1
- package/dist/agent/message-list/prompt/invalid-content-error.d.ts +1 -1
- package/dist/agent/message-list/prompt/invalid-content-error.d.ts.map +1 -1
- package/dist/agent/message-list/types.d.ts +2 -1
- package/dist/agent/message-list/types.d.ts.map +1 -1
- package/dist/agent/message-list/utils/ai-v4-v5/core-model-message.d.ts +3 -2
- package/dist/agent/message-list/utils/ai-v4-v5/core-model-message.d.ts.map +1 -1
- package/dist/agent/message-list/utils/ai-v4-v5/ui-message.d.ts +3 -2
- package/dist/agent/message-list/utils/ai-v4-v5/ui-message.d.ts.map +1 -1
- package/dist/agent/message-list/utils/ai-v5/gemini-compatibility.d.ts +1 -1
- package/dist/agent/message-list/utils/ai-v5/gemini-compatibility.d.ts.map +1 -1
- package/dist/agent/message-list/utils/convert-messages.d.ts +4 -4
- package/dist/agent/message-list/utils/convert-messages.d.ts.map +1 -1
- package/dist/agent/test-utils.d.ts +2 -79
- package/dist/agent/test-utils.d.ts.map +1 -1
- package/dist/agent/trip-wire.d.ts +1 -1
- package/dist/agent/trip-wire.d.ts.map +1 -1
- package/dist/agent/types.d.ts +23 -37
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/utils.d.ts +15 -64
- package/dist/agent/utils.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/index.d.ts +16 -20
- package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts +5 -7
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts +14 -18
- package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts +6 -6
- package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/schema.d.ts +10 -12
- package/dist/agent/workflows/prepare-stream/schema.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/stream-step.d.ts +3 -7
- package/dist/agent/workflows/prepare-stream/stream-step.d.ts.map +1 -1
- package/dist/ai-sdk.types.d.ts +4705 -0
- package/dist/base.cjs +2 -2
- package/dist/base.d.ts +0 -16
- 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.d.ts +2 -1
- package/dist/bundler/index.d.ts.map +1 -1
- package/dist/bundler/index.js +1 -1
- package/dist/cache/index.cjs +3 -3
- package/dist/cache/index.js +1 -1
- package/dist/chunk-26SQQNMU.js +15754 -0
- package/dist/chunk-26SQQNMU.js.map +1 -0
- package/dist/{chunk-FHVFGVIO.js → chunk-32CTMD2C.js} +90 -32
- package/dist/chunk-32CTMD2C.js.map +1 -0
- package/dist/chunk-4CDL2QJT.js +649 -0
- package/dist/chunk-4CDL2QJT.js.map +1 -0
- package/dist/chunk-5WRI5ZAA.js +29 -0
- package/dist/{chunk-3HXBPDKN.js.map → chunk-5WRI5ZAA.js.map} +1 -1
- package/dist/{chunk-KAEQISOW.js → chunk-76K3IYWM.js} +5 -5
- package/dist/chunk-76K3IYWM.js.map +1 -0
- package/dist/chunk-7AHYOMHJ.js +149 -0
- package/dist/chunk-7AHYOMHJ.js.map +1 -0
- package/dist/{chunk-BWGXM3D4.js → chunk-7SKXKUYT.js} +712 -541
- package/dist/chunk-7SKXKUYT.js.map +1 -0
- package/dist/{chunk-UZKIGB7M.cjs → chunk-BMAFVZ2D.cjs} +5 -5
- package/dist/chunk-BMAFVZ2D.cjs.map +1 -0
- package/dist/chunk-BNBRQS7N.js +910 -0
- package/dist/chunk-BNBRQS7N.js.map +1 -0
- package/dist/{chunk-34ZCWSUA.js → chunk-BU4IAJWF.js} +6 -9
- package/dist/chunk-BU4IAJWF.js.map +1 -0
- package/dist/{chunk-ABZOBBLL.cjs → chunk-BXOL277H.cjs} +735 -562
- package/dist/chunk-BXOL277H.cjs.map +1 -0
- package/dist/{chunk-6TEQIYXV.cjs → chunk-CBAB7GOD.cjs} +15 -15
- package/dist/chunk-CBAB7GOD.cjs.map +1 -0
- package/dist/{chunk-A5KDVZDL.cjs → chunk-DSNPWVIG.cjs} +9 -9
- package/dist/chunk-DSNPWVIG.cjs.map +1 -0
- package/dist/chunk-DZUJEN5N.cjs +32 -0
- package/dist/{chunk-EBVYYC2Q.cjs.map → chunk-DZUJEN5N.cjs.map} +1 -1
- package/dist/chunk-E7K4FTLN.cjs +273 -0
- package/dist/chunk-E7K4FTLN.cjs.map +1 -0
- package/dist/{chunk-MJMID7LX.cjs → chunk-ECFXGXWO.cjs} +609 -644
- package/dist/chunk-ECFXGXWO.cjs.map +1 -0
- package/dist/chunk-ET6UOTTU.cjs +154 -0
- package/dist/chunk-ET6UOTTU.cjs.map +1 -0
- package/dist/chunk-FD734TPS.cjs +15818 -0
- package/dist/chunk-FD734TPS.cjs.map +1 -0
- package/dist/chunk-GGYKYORQ.cjs +2060 -0
- package/dist/chunk-GGYKYORQ.cjs.map +1 -0
- package/dist/{chunk-HLRWYUFN.js → chunk-GRBGQ2GE.js} +5 -5
- package/dist/{chunk-HLRWYUFN.js.map → chunk-GRBGQ2GE.js.map} +1 -1
- package/dist/chunk-IU2SZXJQ.cjs +913 -0
- package/dist/chunk-IU2SZXJQ.cjs.map +1 -0
- package/dist/{chunk-GPWMM745.cjs → chunk-J7O6WENZ.cjs} +5 -5
- package/dist/{chunk-GPWMM745.cjs.map → chunk-J7O6WENZ.cjs.map} +1 -1
- package/dist/{chunk-PZUZNPFM.js → chunk-JJ5O45LH.js} +3 -4
- package/dist/chunk-JJ5O45LH.js.map +1 -0
- package/dist/{chunk-E3PG7G6E.js → chunk-JV2KH24V.js} +599 -633
- package/dist/chunk-JV2KH24V.js.map +1 -0
- package/dist/chunk-KEXGB7FK.cjs +29 -0
- package/dist/chunk-KEXGB7FK.cjs.map +1 -0
- package/dist/chunk-KIZIOFZC.js +265 -0
- package/dist/chunk-KIZIOFZC.js.map +1 -0
- package/dist/{chunk-UXG7PYML.js → chunk-KJ2SW6VA.js} +9 -9
- package/dist/chunk-KJ2SW6VA.js.map +1 -0
- package/dist/{chunk-TTELJD4F.js → chunk-L54GIUCB.js} +2 -2
- package/dist/chunk-L54GIUCB.js.map +1 -0
- package/dist/chunk-L7XKOKOW.js +12385 -0
- package/dist/chunk-L7XKOKOW.js.map +1 -0
- package/dist/{chunk-TSNDVBUU.cjs → chunk-MR7ZWBL6.cjs} +2 -2
- package/dist/chunk-MR7ZWBL6.cjs.map +1 -0
- package/dist/chunk-MV7KHWUT.js +2031 -0
- package/dist/chunk-MV7KHWUT.js.map +1 -0
- package/dist/{chunk-3NTOFNIU.js → chunk-OJNJA5ZI.js} +3 -3
- package/dist/{chunk-3NTOFNIU.js.map → chunk-OJNJA5ZI.js.map} +1 -1
- package/dist/{chunk-3VXXCPKX.js → chunk-P6APHXPZ.js} +334 -410
- package/dist/chunk-P6APHXPZ.js.map +1 -0
- package/dist/{chunk-77JHIM4E.cjs → chunk-QCQLOMJM.cjs} +348 -424
- package/dist/chunk-QCQLOMJM.cjs.map +1 -0
- package/dist/chunk-QM5SRDJX.js +9022 -0
- package/dist/chunk-QM5SRDJX.js.map +1 -0
- package/dist/{chunk-WBAXXG34.cjs → chunk-QUKUN6NR.cjs} +32 -66
- package/dist/chunk-QUKUN6NR.cjs.map +1 -0
- package/dist/{chunk-ROS5CMJS.cjs → chunk-QUZGDSWE.cjs} +63 -50
- package/dist/chunk-QUZGDSWE.cjs.map +1 -0
- package/dist/chunk-S5MJLXMG.cjs +12424 -0
- package/dist/chunk-S5MJLXMG.cjs.map +1 -0
- package/dist/chunk-S6URFGCZ.js +27 -0
- package/dist/chunk-S6URFGCZ.js.map +1 -0
- package/dist/chunk-SVLMF4UZ.cjs +9033 -0
- package/dist/chunk-SVLMF4UZ.cjs.map +1 -0
- package/dist/{chunk-ZMELUU72.js → chunk-TQTAMPSC.js} +3 -3
- package/dist/chunk-TQTAMPSC.js.map +1 -0
- package/dist/{chunk-5NTO7S5I.cjs → chunk-TWH4PTDG.cjs} +2 -4
- package/dist/chunk-TWH4PTDG.cjs.map +1 -0
- package/dist/{chunk-WCHE6FJ7.js → chunk-UIZSWUKP.js} +15 -50
- package/dist/chunk-UIZSWUKP.js.map +1 -0
- package/dist/{chunk-Z4RIRDU3.js → chunk-VJUZZB2I.js} +45 -32
- package/dist/chunk-VJUZZB2I.js.map +1 -0
- package/dist/{chunk-MCASUJWY.cjs → chunk-VOY2RXOC.cjs} +36 -59
- package/dist/chunk-VOY2RXOC.cjs.map +1 -0
- package/dist/{chunk-3JX2Y3WH.cjs → chunk-VV753WCB.cjs} +18 -21
- package/dist/chunk-VV753WCB.cjs.map +1 -0
- package/dist/chunk-WM6CK2F3.cjs +674 -0
- package/dist/chunk-WM6CK2F3.cjs.map +1 -0
- package/dist/{chunk-PFXXH2RP.js → chunk-X7JMA3IY.js} +15 -15
- package/dist/chunk-X7JMA3IY.js.map +1 -0
- package/dist/{chunk-NR77P3TK.js → chunk-XEVG546F.js} +14 -37
- package/dist/chunk-XEVG546F.js.map +1 -0
- package/dist/{chunk-QFF5JUKT.cjs → chunk-Y63IFHEZ.cjs} +4 -4
- package/dist/chunk-Y63IFHEZ.cjs.map +1 -0
- package/dist/{chunk-B7V6NYWH.cjs → chunk-Y6ROD72V.cjs} +4 -4
- package/dist/{chunk-B7V6NYWH.cjs.map → chunk-Y6ROD72V.cjs.map} +1 -1
- package/dist/{chunk-7J3XX4AO.cjs → chunk-YIK3ASEG.cjs} +100 -42
- package/dist/chunk-YIK3ASEG.cjs.map +1 -0
- package/dist/deployer/index.cjs +8 -6
- package/dist/deployer/index.cjs.map +1 -1
- package/dist/deployer/index.js +10 -1
- package/dist/deployer/index.js.map +1 -1
- package/dist/di/index.cjs +3 -3
- package/dist/di/index.d.ts +1 -1
- package/dist/di/index.js +1 -1
- package/dist/error/index.cjs +6 -6
- package/dist/error/index.d.ts +0 -1
- package/dist/error/index.d.ts.map +1 -1
- package/dist/error/index.js +1 -1
- package/dist/{scores → evals}/base.d.ts +20 -18
- package/dist/evals/base.d.ts.map +1 -0
- package/dist/{scores → evals}/base.test-utils.d.ts +25 -25
- package/dist/evals/base.test-utils.d.ts.map +1 -0
- package/dist/{scores → evals}/hooks.d.ts +3 -3
- package/dist/evals/hooks.d.ts.map +1 -0
- package/dist/evals/index.cjs +37 -0
- package/dist/evals/index.d.ts +4 -0
- package/dist/evals/index.d.ts.map +1 -0
- package/dist/evals/index.js +4 -0
- package/dist/{scores/run-experiment → evals/run}/index.d.ts +18 -18
- package/dist/evals/run/index.d.ts.map +1 -0
- package/dist/evals/run/scorerAccumulator.d.ts.map +1 -0
- package/dist/{scores → evals}/scoreTraces/index.cjs +79 -99
- package/dist/evals/scoreTraces/index.cjs.map +1 -0
- package/dist/evals/scoreTraces/index.d.ts.map +1 -0
- package/dist/{scores → evals}/scoreTraces/index.js +72 -92
- package/dist/evals/scoreTraces/index.js.map +1 -0
- package/dist/{scores → evals}/scoreTraces/scoreTraces.d.ts +2 -2
- package/dist/evals/scoreTraces/scoreTraces.d.ts.map +1 -0
- package/dist/{scores → evals}/scoreTraces/scoreTracesWorkflow.d.ts +11 -11
- package/dist/evals/scoreTraces/scoreTracesWorkflow.d.ts.map +1 -0
- package/dist/{scores → evals}/scoreTraces/utils.d.ts +7 -7
- package/dist/evals/scoreTraces/utils.d.ts.map +1 -0
- package/dist/{scores → evals}/types.d.ts +22 -22
- package/dist/evals/types.d.ts.map +1 -0
- package/dist/features/index.cjs +8 -0
- package/dist/features/index.cjs.map +1 -0
- package/dist/features/index.d.ts +17 -0
- package/dist/features/index.d.ts.map +1 -0
- package/dist/features/index.js +6 -0
- package/dist/features/index.js.map +1 -0
- package/dist/hooks/index.cjs +4 -4
- package/dist/hooks/index.d.ts +1 -27
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +2 -340
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -113
- package/dist/index.js.map +1 -1
- package/dist/integration/index.cjs +87 -10
- package/dist/integration/index.cjs.map +1 -1
- package/dist/integration/index.js +88 -1
- package/dist/integration/index.js.map +1 -1
- package/dist/integration/integration.d.ts +3 -3
- package/dist/integration/integration.d.ts.map +1 -1
- package/dist/llm/index.cjs +7 -7
- package/dist/llm/index.d.ts +5 -6
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +1 -1
- package/dist/llm/model/base.types.d.ts +6 -7
- package/dist/llm/model/base.types.d.ts.map +1 -1
- package/dist/llm/model/model.d.ts +7 -7
- package/dist/llm/model/model.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/model.loop.types.d.ts +3 -3
- package/dist/llm/model/model.loop.types.d.ts.map +1 -1
- package/dist/llm/model/provider-types.generated.d.ts +32 -7
- package/dist/llm/model/resolve-model.d.ts +8 -8
- package/dist/llm/model/shared.types.d.ts +2 -2
- package/dist/llm/model/shared.types.d.ts.map +1 -1
- package/dist/logger/constants.d.ts +1 -1
- package/dist/logger/default-logger.d.ts +2 -2
- package/dist/logger/default-logger.d.ts.map +1 -1
- package/dist/logger/index.cjs +11 -11
- package/dist/logger/index.js +2 -2
- package/dist/logger/logger.d.ts +4 -4
- package/dist/logger/logger.d.ts.map +1 -1
- package/dist/logger/multi-logger.d.ts +2 -2
- package/dist/logger/multi-logger.d.ts.map +1 -1
- package/dist/logger/transport.d.ts +3 -3
- package/dist/logger/transport.d.ts.map +1 -1
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/loop/loop.d.ts +1 -1
- package/dist/loop/loop.d.ts.map +1 -1
- package/dist/loop/network/index.d.ts +15 -15
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/loop/test-utils/generateText.d.ts.map +1 -1
- package/dist/loop/test-utils/options.d.ts.map +1 -1
- package/dist/loop/test-utils/resultObject.d.ts.map +1 -1
- package/dist/loop/test-utils/streamObject.d.ts.map +1 -1
- package/dist/loop/types.d.ts +4 -7
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/index.d.ts +55 -55
- package/dist/loop/workflows/agentic-execution/index.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +38 -38
- 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 +20 -20
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts +2 -2
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-loop/index.d.ts +55 -55
- package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
- package/dist/loop/workflows/schema.d.ts +19 -20
- package/dist/loop/workflows/schema.d.ts.map +1 -1
- package/dist/loop/workflows/stream.d.ts +1 -1
- package/dist/loop/workflows/stream.d.ts.map +1 -1
- package/dist/mastra/hooks.d.ts +2 -2
- package/dist/mastra/hooks.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts +389 -180
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/mcp/index.cjs +41 -4
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.d.ts +6 -4
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +39 -2
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/types.d.ts +0 -15
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/memory/index.cjs +327 -13
- package/dist/memory/index.cjs.map +1 -1
- package/dist/memory/index.d.ts +1 -0
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +327 -1
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/memory.d.ts +33 -57
- package/dist/memory/memory.d.ts.map +1 -1
- package/dist/memory/mock.d.ts +61 -0
- package/dist/memory/mock.d.ts.map +1 -0
- package/dist/memory/types.d.ts +48 -45
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/models-dev-7U4NRMM3.js +3 -0
- package/dist/{models-dev-4VGIWYS3.js.map → models-dev-7U4NRMM3.js.map} +1 -1
- package/dist/models-dev-VKSAQPRK.cjs +12 -0
- package/dist/{models-dev-AXZASLL2.cjs.map → models-dev-VKSAQPRK.cjs.map} +1 -1
- package/dist/netlify-2IDXTNFW.cjs +12 -0
- package/dist/{netlify-TX6V7SJJ.cjs.map → netlify-2IDXTNFW.cjs.map} +1 -1
- package/dist/netlify-42ZNWIDQ.js +3 -0
- package/dist/{netlify-VJXBII33.js.map → netlify-42ZNWIDQ.js.map} +1 -1
- package/dist/{ai-tracing → observability}/context.d.ts +5 -5
- package/dist/observability/context.d.ts.map +1 -0
- package/dist/observability/index.cjs +36 -0
- package/dist/observability/index.d.ts +11 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +3 -0
- package/dist/observability/no-op.d.ts +22 -0
- package/dist/observability/no-op.d.ts.map +1 -0
- package/dist/observability/types/index.d.ts +2 -0
- package/dist/observability/types/index.d.ts.map +1 -0
- package/dist/{ai-tracing/types.d.ts → observability/types/tracing.d.ts} +161 -107
- package/dist/observability/types/tracing.d.ts.map +1 -0
- package/dist/observability/utils.d.ts +12 -0
- package/dist/observability/utils.d.ts.map +1 -0
- package/dist/processors/index.cjs +11 -11
- package/dist/processors/index.d.ts +10 -9
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/processors/index.js +1 -1
- package/dist/processors/processors/batch-parts.d.ts +2 -1
- package/dist/processors/processors/batch-parts.d.ts.map +1 -1
- package/dist/processors/processors/language-detector.d.ts +6 -5
- package/dist/processors/processors/language-detector.d.ts.map +1 -1
- package/dist/processors/processors/moderation.d.ts +8 -7
- package/dist/processors/processors/moderation.d.ts.map +1 -1
- package/dist/processors/processors/pii-detector.d.ts +8 -7
- package/dist/processors/processors/pii-detector.d.ts.map +1 -1
- package/dist/processors/processors/prompt-injection-detector.d.ts +6 -5
- package/dist/processors/processors/prompt-injection-detector.d.ts.map +1 -1
- package/dist/processors/processors/structured-output.d.ts +3 -2
- package/dist/processors/processors/structured-output.d.ts.map +1 -1
- package/dist/processors/processors/system-prompt-scrubber.d.ts +6 -5
- package/dist/processors/processors/system-prompt-scrubber.d.ts.map +1 -1
- package/dist/processors/processors/token-limiter.d.ts +5 -4
- package/dist/processors/processors/token-limiter.d.ts.map +1 -1
- package/dist/processors/processors/unicode-normalizer.d.ts +5 -4
- package/dist/processors/processors/unicode-normalizer.d.ts.map +1 -1
- package/dist/processors/runner.d.ts +5 -5
- package/dist/processors/runner.d.ts.map +1 -1
- package/dist/provider-registry.json +76 -18
- package/dist/{registry-generator-DXRSYYYT.js → registry-generator-H4YNODDH.js} +2 -2
- package/dist/{registry-generator-DXRSYYYT.js.map → registry-generator-H4YNODDH.js.map} +1 -1
- package/dist/{registry-generator-6WVOHM2L.cjs → registry-generator-MK63POJO.cjs} +2 -2
- package/dist/{registry-generator-6WVOHM2L.cjs.map → registry-generator-MK63POJO.cjs.map} +1 -1
- package/dist/relevance/index.cjs +47 -13
- package/dist/relevance/index.cjs.map +1 -1
- package/dist/relevance/index.d.ts +0 -1
- package/dist/relevance/index.d.ts.map +1 -1
- package/dist/relevance/index.js +49 -1
- package/dist/relevance/index.js.map +1 -1
- package/dist/relevance/mastra-agent/index.d.ts.map +1 -1
- package/dist/request-context/index.cjs +12 -0
- package/dist/{runtime-context → request-context}/index.d.ts +1 -1
- package/dist/{runtime-context → request-context}/index.d.ts.map +1 -1
- package/dist/request-context/index.js +3 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/index.cjs +9 -25
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +4 -21
- package/dist/server/index.js.map +1 -1
- package/dist/server/types.d.ts +3 -3
- package/dist/server/types.d.ts.map +1 -1
- package/dist/storage/base.d.ts +75 -143
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/constants.d.ts +3 -4
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/domains/index.d.ts +0 -2
- package/dist/storage/domains/index.d.ts.map +1 -1
- package/dist/storage/domains/memory/base.d.ts +19 -56
- package/dist/storage/domains/memory/base.d.ts.map +1 -1
- package/dist/storage/domains/memory/inmemory.d.ts +15 -35
- package/dist/storage/domains/memory/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/observability/base.d.ts +24 -24
- package/dist/storage/domains/observability/base.d.ts.map +1 -1
- package/dist/storage/domains/observability/inmemory.d.ts +18 -18
- package/dist/storage/domains/observability/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/operations/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/scores/base.d.ts +5 -5
- package/dist/storage/domains/scores/base.d.ts.map +1 -1
- package/dist/storage/domains/scores/inmemory.d.ts +5 -5
- package/dist/storage/domains/scores/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/workflows/base.d.ts +4 -11
- package/dist/storage/domains/workflows/base.d.ts.map +1 -1
- package/dist/storage/domains/workflows/inmemory.d.ts +4 -11
- package/dist/storage/domains/workflows/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +74 -1775
- package/dist/storage/index.cjs.map +1 -1
- package/dist/storage/index.js +1 -1744
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/mock.d.ts +35 -92
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/types.d.ts +77 -75
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/MastraAgentNetworkStream.d.ts +4 -2
- package/dist/stream/MastraAgentNetworkStream.d.ts.map +1 -1
- package/dist/stream/MastraWorkflowStream.d.ts +1 -1
- package/dist/stream/MastraWorkflowStream.d.ts.map +1 -1
- package/dist/stream/RunOutput.d.ts +1 -0
- package/dist/stream/RunOutput.d.ts.map +1 -1
- package/dist/stream/aisdk/v4/input.d.ts +1 -1
- package/dist/stream/aisdk/v4/input.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/execute.d.ts +4 -11
- package/dist/stream/aisdk/v5/execute.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/output.d.ts +1 -1
- package/dist/stream/aisdk/v5/output.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts +1 -1
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/index.cjs +11 -11
- package/dist/stream/index.d.ts +1 -1
- package/dist/stream/index.d.ts.map +1 -1
- package/dist/stream/index.js +2 -2
- package/dist/stream/types.d.ts +2 -6
- package/dist/stream/types.d.ts.map +1 -1
- package/dist/test-utils/llm-mock.cjs +8 -8
- package/dist/test-utils/llm-mock.cjs.map +1 -1
- package/dist/test-utils/llm-mock.d.ts +1 -1
- package/dist/test-utils/llm-mock.d.ts.map +1 -1
- package/dist/test-utils/llm-mock.js +3 -3
- package/dist/test-utils/llm-mock.js.map +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 +3 -71
- package/dist/tools/tool-builder/builder.d.ts.map +1 -1
- package/dist/tools/tool.d.ts +25 -25
- package/dist/tools/tool.d.ts.map +1 -1
- package/dist/tools/types.d.ts +102 -11
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/validation.d.ts +4 -3
- package/dist/tools/validation.d.ts.map +1 -1
- package/dist/tts/index.cjs +12 -6
- package/dist/tts/index.cjs.map +1 -1
- package/dist/tts/index.d.ts +0 -1
- package/dist/tts/index.d.ts.map +1 -1
- package/dist/tts/index.js +14 -1
- package/dist/tts/index.js.map +1 -1
- package/dist/types/dynamic-argument.d.ts +3 -3
- package/dist/utils/fetchWithRetry.d.ts +9 -0
- package/dist/utils/fetchWithRetry.d.ts.map +1 -0
- package/dist/utils.cjs +33 -17
- package/dist/utils.d.ts +39 -6
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/vector/embed.d.ts +1 -1
- package/dist/vector/embed.d.ts.map +1 -1
- package/dist/vector/index.cjs +80 -8
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.js +80 -1
- package/dist/vector/index.js.map +1 -1
- package/dist/vector/vector.d.ts +5 -2
- package/dist/vector/vector.d.ts.map +1 -1
- package/dist/voice/composite-voice.d.ts +1 -7
- package/dist/voice/composite-voice.d.ts.map +1 -1
- package/dist/voice/index.cjs +4 -4
- package/dist/voice/index.js +1 -1
- package/dist/voice/voice.d.ts +0 -1
- package/dist/voice/voice.d.ts.map +1 -1
- package/dist/workflows/default.d.ts +35 -43
- package/dist/workflows/default.d.ts.map +1 -1
- package/dist/workflows/evented/execution-engine.d.ts +5 -3
- package/dist/workflows/evented/execution-engine.d.ts.map +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 +15 -13
- package/dist/workflows/evented/step-executor.d.ts.map +1 -1
- package/dist/workflows/evented/workflow-event-processor/index.d.ts +5 -5
- package/dist/workflows/evented/workflow-event-processor/index.d.ts.map +1 -1
- package/dist/workflows/evented/workflow-event-processor/loop.d.ts +3 -3
- package/dist/workflows/evented/workflow-event-processor/loop.d.ts.map +1 -1
- package/dist/workflows/evented/workflow-event-processor/parallel.d.ts +2 -2
- package/dist/workflows/evented/workflow-event-processor/sleep.d.ts +2 -2
- package/dist/workflows/evented/workflow-event-processor/utils.d.ts +2 -7
- package/dist/workflows/evented/workflow-event-processor/utils.d.ts.map +1 -1
- package/dist/workflows/evented/workflow.d.ts +11 -14
- package/dist/workflows/evented/workflow.d.ts.map +1 -1
- package/dist/workflows/execution-engine.d.ts +6 -6
- package/dist/workflows/execution-engine.d.ts.map +1 -1
- package/dist/workflows/index.cjs +22 -14
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/step.d.ts +5 -5
- package/dist/workflows/step.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +20 -44
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/utils.d.ts +14 -0
- package/dist/workflows/utils.d.ts.map +1 -1
- package/dist/workflows/workflow.d.ts +74 -64
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/evals/scoreTraces.d.ts +1 -0
- package/evals.d.ts +1 -0
- package/features.d.ts +1 -0
- package/observability.d.ts +1 -0
- package/package.json +48 -64
- package/request-context.d.ts +1 -0
- package/src/_types/ai-sdk.types.d.ts +4705 -0
- package/src/llm/model/provider-types.generated.d.ts +32 -7
- package/agent/input-processor/processors.d.ts +0 -1
- package/ai-tracing.d.ts +0 -1
- package/dist/agent/index.warning.d.ts +0 -13
- package/dist/agent/index.warning.d.ts.map +0 -1
- package/dist/agent/input-processor/index.cjs +0 -28
- package/dist/agent/input-processor/index.d.ts +0 -10
- package/dist/agent/input-processor/index.d.ts.map +0 -1
- package/dist/agent/input-processor/index.js +0 -3
- package/dist/agent/input-processor/processors/index.d.ts +0 -6
- package/dist/agent/input-processor/processors/index.d.ts.map +0 -1
- package/dist/agent/input-processor/processors/language-detector.d.ts +0 -18
- package/dist/agent/input-processor/processors/language-detector.d.ts.map +0 -1
- package/dist/agent/input-processor/processors/moderation.d.ts +0 -18
- package/dist/agent/input-processor/processors/moderation.d.ts.map +0 -1
- package/dist/agent/input-processor/processors/pii-detector.d.ts +0 -18
- package/dist/agent/input-processor/processors/pii-detector.d.ts.map +0 -1
- package/dist/agent/input-processor/processors/prompt-injection-detector.d.ts +0 -18
- package/dist/agent/input-processor/processors/prompt-injection-detector.d.ts.map +0 -1
- package/dist/agent/input-processor/processors/unicode-normalizer.d.ts +0 -18
- package/dist/agent/input-processor/processors/unicode-normalizer.d.ts.map +0 -1
- package/dist/ai-tracing/context.d.ts.map +0 -1
- package/dist/ai-tracing/exporters/base.d.ts +0 -111
- package/dist/ai-tracing/exporters/base.d.ts.map +0 -1
- package/dist/ai-tracing/exporters/cloud.d.ts +0 -30
- package/dist/ai-tracing/exporters/cloud.d.ts.map +0 -1
- package/dist/ai-tracing/exporters/console.d.ts +0 -10
- package/dist/ai-tracing/exporters/console.d.ts.map +0 -1
- package/dist/ai-tracing/exporters/default.d.ts +0 -98
- package/dist/ai-tracing/exporters/default.d.ts.map +0 -1
- package/dist/ai-tracing/exporters/index.d.ts +0 -9
- package/dist/ai-tracing/exporters/index.d.ts.map +0 -1
- package/dist/ai-tracing/index.cjs +0 -148
- package/dist/ai-tracing/index.d.ts +0 -13
- package/dist/ai-tracing/index.d.ts.map +0 -1
- package/dist/ai-tracing/index.js +0 -3
- package/dist/ai-tracing/model-tracing.d.ts +0 -63
- package/dist/ai-tracing/model-tracing.d.ts.map +0 -1
- package/dist/ai-tracing/registry.d.ts +0 -51
- package/dist/ai-tracing/registry.d.ts.map +0 -1
- package/dist/ai-tracing/span_processors/index.d.ts +0 -5
- package/dist/ai-tracing/span_processors/index.d.ts.map +0 -1
- package/dist/ai-tracing/span_processors/sensitive-data-filter.d.ts +0 -85
- package/dist/ai-tracing/span_processors/sensitive-data-filter.d.ts.map +0 -1
- package/dist/ai-tracing/spans/base.d.ts +0 -65
- package/dist/ai-tracing/spans/base.d.ts.map +0 -1
- package/dist/ai-tracing/spans/default.d.ts +0 -13
- package/dist/ai-tracing/spans/default.d.ts.map +0 -1
- package/dist/ai-tracing/spans/index.d.ts +0 -7
- package/dist/ai-tracing/spans/index.d.ts.map +0 -1
- package/dist/ai-tracing/spans/no-op.d.ts +0 -15
- package/dist/ai-tracing/spans/no-op.d.ts.map +0 -1
- package/dist/ai-tracing/tracers/base.d.ts +0 -105
- package/dist/ai-tracing/tracers/base.d.ts.map +0 -1
- package/dist/ai-tracing/tracers/default.d.ts +0 -7
- package/dist/ai-tracing/tracers/default.d.ts.map +0 -1
- package/dist/ai-tracing/tracers/index.d.ts +0 -6
- package/dist/ai-tracing/tracers/index.d.ts.map +0 -1
- package/dist/ai-tracing/types.d.ts.map +0 -1
- package/dist/ai-tracing/utils.d.ts +0 -68
- package/dist/ai-tracing/utils.d.ts.map +0 -1
- package/dist/base.warning.d.ts +0 -9
- package/dist/base.warning.d.ts.map +0 -1
- package/dist/bundler/index.warning.d.ts +0 -9
- package/dist/bundler/index.warning.d.ts.map +0 -1
- package/dist/chunk-253FBVD4.cjs +0 -1303
- package/dist/chunk-253FBVD4.cjs.map +0 -1
- package/dist/chunk-2B3VLGTH.js +0 -87
- package/dist/chunk-2B3VLGTH.js.map +0 -1
- package/dist/chunk-34ZCWSUA.js.map +0 -1
- package/dist/chunk-3HXBPDKN.js +0 -105
- package/dist/chunk-3JX2Y3WH.cjs.map +0 -1
- package/dist/chunk-3VXXCPKX.js.map +0 -1
- package/dist/chunk-4R2TBRS7.cjs +0 -191
- package/dist/chunk-4R2TBRS7.cjs.map +0 -1
- package/dist/chunk-5NTO7S5I.cjs.map +0 -1
- package/dist/chunk-6C7VGVK4.js +0 -267
- package/dist/chunk-6C7VGVK4.js.map +0 -1
- package/dist/chunk-6KOL2B3A.cjs +0 -75
- package/dist/chunk-6KOL2B3A.cjs.map +0 -1
- package/dist/chunk-6TEQIYXV.cjs.map +0 -1
- package/dist/chunk-6VOPKVYH.cjs +0 -57
- package/dist/chunk-6VOPKVYH.cjs.map +0 -1
- package/dist/chunk-77JHIM4E.cjs.map +0 -1
- package/dist/chunk-7J3XX4AO.cjs.map +0 -1
- package/dist/chunk-A5KDVZDL.cjs.map +0 -1
- package/dist/chunk-ABZOBBLL.cjs.map +0 -1
- package/dist/chunk-AQGLVU53.cjs +0 -603
- package/dist/chunk-AQGLVU53.cjs.map +0 -1
- package/dist/chunk-BLUDYAPI.js +0 -596
- package/dist/chunk-BLUDYAPI.js.map +0 -1
- package/dist/chunk-BWGXM3D4.js.map +0 -1
- package/dist/chunk-C7OVZMPW.cjs +0 -91
- package/dist/chunk-C7OVZMPW.cjs.map +0 -1
- package/dist/chunk-DMBN72QF.cjs +0 -39
- package/dist/chunk-DMBN72QF.cjs.map +0 -1
- package/dist/chunk-DTTOVV72.js +0 -2880
- package/dist/chunk-DTTOVV72.js.map +0 -1
- package/dist/chunk-E3PG7G6E.js.map +0 -1
- package/dist/chunk-EBVYYC2Q.cjs +0 -111
- package/dist/chunk-FHVFGVIO.js.map +0 -1
- package/dist/chunk-GB5BIA4V.js +0 -167
- package/dist/chunk-GB5BIA4V.js.map +0 -1
- package/dist/chunk-HEQTUMUA.cjs +0 -271
- package/dist/chunk-HEQTUMUA.cjs.map +0 -1
- package/dist/chunk-HF3GZRFP.cjs +0 -9
- package/dist/chunk-HF3GZRFP.cjs.map +0 -1
- package/dist/chunk-JVV5LREI.js +0 -431
- package/dist/chunk-JVV5LREI.js.map +0 -1
- package/dist/chunk-KAEQISOW.js.map +0 -1
- package/dist/chunk-KDX3ZMQ2.js +0 -12
- package/dist/chunk-KDX3ZMQ2.js.map +0 -1
- package/dist/chunk-LG5B3KIW.js +0 -1215
- package/dist/chunk-LG5B3KIW.js.map +0 -1
- package/dist/chunk-LZUSZT7R.cjs +0 -170
- package/dist/chunk-LZUSZT7R.cjs.map +0 -1
- package/dist/chunk-MCASUJWY.cjs.map +0 -1
- package/dist/chunk-MJMID7LX.cjs.map +0 -1
- package/dist/chunk-MKCC5K77.js +0 -90
- package/dist/chunk-MKCC5K77.js.map +0 -1
- package/dist/chunk-NPNGPMT2.js +0 -39
- package/dist/chunk-NPNGPMT2.js.map +0 -1
- package/dist/chunk-NR77P3TK.js.map +0 -1
- package/dist/chunk-NUAURT4I.cjs +0 -82
- package/dist/chunk-NUAURT4I.cjs.map +0 -1
- package/dist/chunk-OIT3PCWA.js +0 -72
- package/dist/chunk-OIT3PCWA.js.map +0 -1
- package/dist/chunk-P35FNLTQ.cjs +0 -2936
- package/dist/chunk-P35FNLTQ.cjs.map +0 -1
- package/dist/chunk-PFXXH2RP.js.map +0 -1
- package/dist/chunk-PZUZNPFM.js.map +0 -1
- package/dist/chunk-QFF5JUKT.cjs.map +0 -1
- package/dist/chunk-RKXWLG33.js +0 -7
- package/dist/chunk-RKXWLG33.js.map +0 -1
- package/dist/chunk-ROS5CMJS.cjs.map +0 -1
- package/dist/chunk-SJMKDSRF.js +0 -179
- package/dist/chunk-SJMKDSRF.js.map +0 -1
- package/dist/chunk-SSULK22X.cjs +0 -14
- package/dist/chunk-SSULK22X.cjs.map +0 -1
- package/dist/chunk-TSNDVBUU.cjs.map +0 -1
- package/dist/chunk-TTELJD4F.js.map +0 -1
- package/dist/chunk-TX4TTPYJ.cjs +0 -436
- package/dist/chunk-TX4TTPYJ.cjs.map +0 -1
- package/dist/chunk-UXG7PYML.js.map +0 -1
- package/dist/chunk-UZKIGB7M.cjs.map +0 -1
- package/dist/chunk-VF676YCO.cjs +0 -150
- package/dist/chunk-VF676YCO.cjs.map +0 -1
- package/dist/chunk-VQASQG5D.js +0 -55
- package/dist/chunk-VQASQG5D.js.map +0 -1
- package/dist/chunk-WBAXXG34.cjs.map +0 -1
- package/dist/chunk-WCHE6FJ7.js.map +0 -1
- package/dist/chunk-WM4RO23J.js +0 -145
- package/dist/chunk-WM4RO23J.js.map +0 -1
- package/dist/chunk-Z4RIRDU3.js.map +0 -1
- package/dist/chunk-ZABG3SZ2.cjs +0 -93
- package/dist/chunk-ZABG3SZ2.cjs.map +0 -1
- package/dist/chunk-ZISECZZO.js +0 -72
- package/dist/chunk-ZISECZZO.js.map +0 -1
- package/dist/chunk-ZMELUU72.js.map +0 -1
- package/dist/deployer/index.warning.d.ts +0 -9
- package/dist/deployer/index.warning.d.ts.map +0 -1
- package/dist/eval/evaluation.d.ts +0 -14
- package/dist/eval/evaluation.d.ts.map +0 -1
- package/dist/eval/index.cjs +0 -16
- package/dist/eval/index.d.ts +0 -4
- package/dist/eval/index.d.ts.map +0 -1
- package/dist/eval/index.js +0 -3
- package/dist/eval/metric.d.ts +0 -8
- package/dist/eval/metric.d.ts.map +0 -1
- package/dist/eval/types.d.ts +0 -9
- package/dist/eval/types.d.ts.map +0 -1
- package/dist/integration/index.warning.d.ts +0 -3
- package/dist/integration/index.warning.d.ts.map +0 -1
- package/dist/integration/integration.warning.d.ts +0 -5
- package/dist/integration/integration.warning.d.ts.map +0 -1
- package/dist/integration/openapi-toolset.warning.d.ts +0 -5
- package/dist/integration/openapi-toolset.warning.d.ts.map +0 -1
- package/dist/loop/telemetry/index.d.ts +0 -36
- package/dist/loop/telemetry/index.d.ts.map +0 -1
- package/dist/loop/telemetry/noop.d.ts +0 -3
- package/dist/loop/telemetry/noop.d.ts.map +0 -1
- package/dist/loop/test-utils/mockTracer.d.ts +0 -47
- package/dist/loop/test-utils/mockTracer.d.ts.map +0 -1
- package/dist/loop/test-utils/telemetry.d.ts +0 -6
- package/dist/loop/test-utils/telemetry.d.ts.map +0 -1
- package/dist/memory/index.warning.d.ts +0 -6
- package/dist/memory/index.warning.d.ts.map +0 -1
- package/dist/models-dev-4VGIWYS3.js +0 -3
- package/dist/models-dev-AXZASLL2.cjs +0 -12
- package/dist/netlify-TX6V7SJJ.cjs +0 -12
- package/dist/netlify-VJXBII33.js +0 -3
- package/dist/relevance/cohere/index.d.ts +0 -9
- package/dist/relevance/cohere/index.d.ts.map +0 -1
- package/dist/runtime-context/index.cjs +0 -12
- package/dist/runtime-context/index.js +0 -3
- package/dist/scores/base.d.ts.map +0 -1
- package/dist/scores/base.test-utils.d.ts.map +0 -1
- package/dist/scores/hooks.d.ts.map +0 -1
- package/dist/scores/index.cjs +0 -37
- package/dist/scores/index.cjs.map +0 -1
- package/dist/scores/index.d.ts +0 -4
- package/dist/scores/index.d.ts.map +0 -1
- package/dist/scores/index.js +0 -4
- package/dist/scores/index.js.map +0 -1
- package/dist/scores/run-experiment/index.d.ts.map +0 -1
- package/dist/scores/run-experiment/scorerAccumulator.d.ts.map +0 -1
- package/dist/scores/scoreTraces/index.cjs.map +0 -1
- package/dist/scores/scoreTraces/index.d.ts.map +0 -1
- package/dist/scores/scoreTraces/index.js.map +0 -1
- package/dist/scores/scoreTraces/scoreTraces.d.ts.map +0 -1
- package/dist/scores/scoreTraces/scoreTracesWorkflow.d.ts.map +0 -1
- package/dist/scores/scoreTraces/utils.d.ts.map +0 -1
- package/dist/scores/types.d.ts.map +0 -1
- package/dist/storage/base.warning.d.ts +0 -8
- package/dist/storage/base.warning.d.ts.map +0 -1
- package/dist/storage/domains/legacy-evals/base.d.ts +0 -13
- package/dist/storage/domains/legacy-evals/base.d.ts.map +0 -1
- package/dist/storage/domains/legacy-evals/index.d.ts +0 -2
- package/dist/storage/domains/legacy-evals/index.d.ts.map +0 -1
- package/dist/storage/domains/legacy-evals/inmemory.d.ts +0 -17
- package/dist/storage/domains/legacy-evals/inmemory.d.ts.map +0 -1
- package/dist/storage/domains/traces/base.d.ts +0 -14
- package/dist/storage/domains/traces/base.d.ts.map +0 -1
- package/dist/storage/domains/traces/index.d.ts +0 -3
- package/dist/storage/domains/traces/index.d.ts.map +0 -1
- package/dist/storage/domains/traces/inmemory.d.ts +0 -22
- package/dist/storage/domains/traces/inmemory.d.ts.map +0 -1
- package/dist/storage/index.warning.d.ts +0 -3
- package/dist/storage/index.warning.d.ts.map +0 -1
- package/dist/telemetry/composite-exporter.d.ts +0 -10
- package/dist/telemetry/composite-exporter.d.ts.map +0 -1
- package/dist/telemetry/index.cjs +0 -32
- package/dist/telemetry/index.cjs.map +0 -1
- package/dist/telemetry/index.d.ts +0 -6
- package/dist/telemetry/index.d.ts.map +0 -1
- package/dist/telemetry/index.js +0 -3
- package/dist/telemetry/index.js.map +0 -1
- package/dist/telemetry/otel-vendor.cjs +0 -105
- package/dist/telemetry/otel-vendor.cjs.map +0 -1
- package/dist/telemetry/otel-vendor.d.ts +0 -11
- package/dist/telemetry/otel-vendor.d.ts.map +0 -1
- package/dist/telemetry/otel-vendor.js +0 -59
- package/dist/telemetry/otel-vendor.js.map +0 -1
- package/dist/telemetry/storage-exporter.d.ts +0 -21
- package/dist/telemetry/storage-exporter.d.ts.map +0 -1
- package/dist/telemetry/telemetry.d.ts +0 -59
- package/dist/telemetry/telemetry.d.ts.map +0 -1
- package/dist/telemetry/telemetry.decorators.d.ts +0 -15
- package/dist/telemetry/telemetry.decorators.d.ts.map +0 -1
- package/dist/telemetry/types.d.ts +0 -74
- package/dist/telemetry/types.d.ts.map +0 -1
- package/dist/telemetry/utility.d.ts +0 -15
- package/dist/telemetry/utility.d.ts.map +0 -1
- package/dist/tools/index.warning.d.ts +0 -8
- package/dist/tools/index.warning.d.ts.map +0 -1
- package/dist/tts/index.warning.d.ts +0 -7
- package/dist/tts/index.warning.d.ts.map +0 -1
- package/dist/vector/index.warning.d.ts +0 -6
- package/dist/vector/index.warning.d.ts.map +0 -1
- package/dist/workflows/index.warning.d.ts +0 -6
- package/dist/workflows/index.warning.d.ts.map +0 -1
- package/dist/workflows/legacy/index.cjs +0 -92
- package/dist/workflows/legacy/index.cjs.map +0 -1
- package/dist/workflows/legacy/index.d.ts +0 -5
- package/dist/workflows/legacy/index.d.ts.map +0 -1
- package/dist/workflows/legacy/index.js +0 -3
- package/dist/workflows/legacy/index.js.map +0 -1
- package/dist/workflows/legacy/machine.d.ts +0 -386
- package/dist/workflows/legacy/machine.d.ts.map +0 -1
- package/dist/workflows/legacy/step.d.ts +0 -15
- package/dist/workflows/legacy/step.d.ts.map +0 -1
- package/dist/workflows/legacy/types.d.ts +0 -397
- package/dist/workflows/legacy/types.d.ts.map +0 -1
- package/dist/workflows/legacy/utils.d.ts +0 -68
- package/dist/workflows/legacy/utils.d.ts.map +0 -1
- package/dist/workflows/legacy/workflow-instance.d.ts +0 -97
- package/dist/workflows/legacy/workflow-instance.d.ts.map +0 -1
- package/dist/workflows/legacy/workflow.d.ts +0 -109
- package/dist/workflows/legacy/workflow.d.ts.map +0 -1
- package/dist/workflows/workflow.warning.d.ts +0 -9
- package/dist/workflows/workflow.warning.d.ts.map +0 -1
- package/eval.d.ts +0 -1
- package/runtime-context.d.ts +0 -1
- package/scores/scoreTraces.d.ts +0 -1
- package/scores.d.ts +0 -1
- package/telemetry/otel-vendor.d.ts +0 -1
- package/telemetry.d.ts +0 -1
- package/workflows/legacy.d.ts +0 -1
- /package/dist/agent/{input-processor → message-list}/index.cjs.map +0 -0
- /package/dist/agent/{input-processor → message-list}/index.js.map +0 -0
- /package/dist/{ai-tracing → evals}/index.cjs.map +0 -0
- /package/dist/{ai-tracing → evals}/index.js.map +0 -0
- /package/dist/{scores/run-experiment → evals/run}/scorerAccumulator.d.ts +0 -0
- /package/dist/{scores → evals}/scoreTraces/index.d.ts +0 -0
- /package/dist/{eval → observability}/index.cjs.map +0 -0
- /package/dist/{eval → observability}/index.js.map +0 -0
- /package/dist/{runtime-context → request-context}/index.cjs.map +0 -0
- /package/dist/{runtime-context → request-context}/index.js.map +0 -0
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { WorkflowEventProcessor } from './chunk-
|
|
2
|
-
import { saveScorePayloadSchema } from './chunk-KAEQISOW.js';
|
|
1
|
+
import { WorkflowEventProcessor } from './chunk-P6APHXPZ.js';
|
|
3
2
|
import { augmentWithInit } from './chunk-436FFEF6.js';
|
|
3
|
+
import { saveScorePayloadSchema } from './chunk-76K3IYWM.js';
|
|
4
4
|
import { PubSub } from './chunk-BVUMKER5.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { ConsoleLogger, LogLevel } from './chunk-UXG7PYML.js';
|
|
12
|
-
import { __decoratorStart, __decorateElement, __runInitializers } from './chunk-3HXBPDKN.js';
|
|
5
|
+
import { noopLogger } from './chunk-X7JMA3IY.js';
|
|
6
|
+
import { registerHook } from './chunk-L54GIUCB.js';
|
|
7
|
+
import { NoOpObservability } from './chunk-KIZIOFZC.js';
|
|
8
|
+
import { MastraError } from './chunk-JJ5O45LH.js';
|
|
9
|
+
import { InMemoryServerCache } from './chunk-OJNJA5ZI.js';
|
|
10
|
+
import { ConsoleLogger, LogLevel } from './chunk-KJ2SW6VA.js';
|
|
13
11
|
import { randomUUID } from 'crypto';
|
|
14
12
|
import EventEmitter from 'events';
|
|
15
13
|
import pMap from 'p-map';
|
|
@@ -22,7 +20,7 @@ var EventEmitterPubSub = class extends PubSub {
|
|
|
22
20
|
}
|
|
23
21
|
async publish(topic, event) {
|
|
24
22
|
const id = crypto.randomUUID();
|
|
25
|
-
const createdAt = /* @__PURE__ */new Date();
|
|
23
|
+
const createdAt = /* @__PURE__ */ new Date();
|
|
26
24
|
this.emitter.emit(topic, {
|
|
27
25
|
...event,
|
|
28
26
|
id,
|
|
@@ -35,10 +33,11 @@ var EventEmitterPubSub = class extends PubSub {
|
|
|
35
33
|
async unsubscribe(topic, cb) {
|
|
36
34
|
this.emitter.off(topic, cb);
|
|
37
35
|
}
|
|
38
|
-
async flush() {
|
|
36
|
+
async flush() {
|
|
37
|
+
}
|
|
39
38
|
};
|
|
40
39
|
function createOnScorerHook(mastra) {
|
|
41
|
-
return async hookData => {
|
|
40
|
+
return async (hookData) => {
|
|
42
41
|
const storage = mastra.getStorage();
|
|
43
42
|
if (!storage) {
|
|
44
43
|
mastra.getLogger()?.warn("Storage not found, skipping score validation and saving");
|
|
@@ -47,22 +46,24 @@ function createOnScorerHook(mastra) {
|
|
|
47
46
|
const entityId = hookData.entity.id;
|
|
48
47
|
const entityType = hookData.entityType;
|
|
49
48
|
const scorer = hookData.scorer;
|
|
49
|
+
const scorerId = scorer.id;
|
|
50
|
+
if (!scorerId) {
|
|
51
|
+
mastra.getLogger()?.warn("Scorer ID not found, skipping score validation and saving");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
50
54
|
try {
|
|
51
|
-
const scorerToUse = await findScorer(mastra, entityId, entityType,
|
|
55
|
+
const scorerToUse = await findScorer(mastra, entityId, entityType, scorerId);
|
|
52
56
|
if (!scorerToUse) {
|
|
53
57
|
throw new MastraError({
|
|
54
58
|
id: "MASTRA_SCORER_NOT_FOUND",
|
|
55
59
|
domain: "MASTRA" /* MASTRA */,
|
|
56
60
|
category: "USER" /* USER */,
|
|
57
|
-
text: `Scorer with ID ${
|
|
61
|
+
text: `Scorer with ID ${scorerId} not found`
|
|
58
62
|
});
|
|
59
63
|
}
|
|
60
64
|
let input = hookData.input;
|
|
61
65
|
let output = hookData.output;
|
|
62
|
-
const {
|
|
63
|
-
structuredOutput,
|
|
64
|
-
...rest
|
|
65
|
-
} = hookData;
|
|
66
|
+
const { structuredOutput, ...rest } = hookData;
|
|
66
67
|
const runResult = await scorerToUse.scorer.run({
|
|
67
68
|
...rest,
|
|
68
69
|
input,
|
|
@@ -79,7 +80,7 @@ function createOnScorerHook(mastra) {
|
|
|
79
80
|
...rest,
|
|
80
81
|
...runResult,
|
|
81
82
|
entityId,
|
|
82
|
-
scorerId
|
|
83
|
+
scorerId,
|
|
83
84
|
spanId,
|
|
84
85
|
traceId,
|
|
85
86
|
metadata: {
|
|
@@ -88,34 +89,43 @@ function createOnScorerHook(mastra) {
|
|
|
88
89
|
};
|
|
89
90
|
await validateAndSaveScore(storage, payload);
|
|
90
91
|
if (currentSpan && spanId && traceId) {
|
|
91
|
-
await pMap(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
await pMap(
|
|
93
|
+
currentSpan.observabilityInstance.getExporters(),
|
|
94
|
+
async (exporter) => {
|
|
95
|
+
if (exporter.addScoreToTrace) {
|
|
96
|
+
try {
|
|
97
|
+
await exporter.addScoreToTrace({
|
|
98
|
+
traceId,
|
|
99
|
+
spanId,
|
|
100
|
+
score: runResult.score,
|
|
101
|
+
reason: runResult.reason,
|
|
102
|
+
scorerName: scorerToUse.scorer.id,
|
|
103
|
+
metadata: {
|
|
104
|
+
...currentSpan.metadata ?? {}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
} catch (error) {
|
|
108
|
+
mastra.getLogger()?.error(`Failed to add score to trace via exporter: ${error}`);
|
|
101
109
|
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
});
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{ concurrency: 3 }
|
|
113
|
+
);
|
|
107
114
|
}
|
|
108
115
|
} catch (error) {
|
|
109
|
-
const mastraError = new MastraError(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
const mastraError = new MastraError(
|
|
117
|
+
{
|
|
118
|
+
id: "MASTRA_SCORER_FAILED_TO_RUN_HOOK",
|
|
119
|
+
domain: "SCORER" /* SCORER */,
|
|
120
|
+
category: "USER" /* USER */,
|
|
121
|
+
details: {
|
|
122
|
+
scorerId: scorer.id,
|
|
123
|
+
entityId,
|
|
124
|
+
entityType
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
error
|
|
128
|
+
);
|
|
119
129
|
mastra.getLogger()?.trackException(mastraError);
|
|
120
130
|
mastra.getLogger()?.error(mastraError.toString());
|
|
121
131
|
}
|
|
@@ -125,56 +135,46 @@ async function validateAndSaveScore(storage, payload) {
|
|
|
125
135
|
const payloadToSave = saveScorePayloadSchema.parse(payload);
|
|
126
136
|
await storage?.saveScore(payloadToSave);
|
|
127
137
|
}
|
|
128
|
-
async function findScorer(mastra, entityId, entityType,
|
|
138
|
+
async function findScorer(mastra, entityId, entityType, scorerId) {
|
|
129
139
|
let scorerToUse;
|
|
130
140
|
if (entityType === "AGENT") {
|
|
131
|
-
const scorers = await mastra.getAgentById(entityId).
|
|
141
|
+
const scorers = await mastra.getAgentById(entityId).listScorers();
|
|
132
142
|
for (const [_, scorer] of Object.entries(scorers)) {
|
|
133
|
-
if (scorer.scorer.
|
|
143
|
+
if (scorer.scorer.id === scorerId) {
|
|
134
144
|
scorerToUse = scorer;
|
|
135
145
|
break;
|
|
136
146
|
}
|
|
137
147
|
}
|
|
138
148
|
} else if (entityType === "WORKFLOW") {
|
|
139
|
-
const scorers = await mastra.getWorkflowById(entityId).
|
|
149
|
+
const scorers = await mastra.getWorkflowById(entityId).listScorers();
|
|
140
150
|
for (const [_, scorer] of Object.entries(scorers)) {
|
|
141
|
-
if (scorer.scorer.
|
|
151
|
+
if (scorer.scorer.id === scorerId) {
|
|
142
152
|
scorerToUse = scorer;
|
|
143
153
|
break;
|
|
144
154
|
}
|
|
145
155
|
}
|
|
146
156
|
}
|
|
147
157
|
if (!scorerToUse) {
|
|
148
|
-
const mastraRegisteredScorer = mastra.
|
|
149
|
-
scorerToUse = mastraRegisteredScorer ? {
|
|
150
|
-
scorer: mastraRegisteredScorer
|
|
151
|
-
} : void 0;
|
|
158
|
+
const mastraRegisteredScorer = mastra.getScorerById(scorerId);
|
|
159
|
+
scorerToUse = mastraRegisteredScorer ? { scorer: mastraRegisteredScorer } : void 0;
|
|
152
160
|
}
|
|
153
161
|
return scorerToUse;
|
|
154
162
|
}
|
|
155
163
|
|
|
156
164
|
// src/mastra/index.ts
|
|
157
|
-
var _Mastra_decorators, _init;
|
|
158
|
-
_Mastra_decorators = [InstrumentClass({
|
|
159
|
-
prefix: "mastra",
|
|
160
|
-
excludeMethods: ["getLogger", "getTelemetry"]
|
|
161
|
-
})];
|
|
162
165
|
var Mastra = class {
|
|
163
166
|
#vectors;
|
|
164
167
|
#agents;
|
|
165
168
|
#logger;
|
|
166
|
-
#legacy_workflows;
|
|
167
169
|
#workflows;
|
|
170
|
+
#observability;
|
|
168
171
|
#tts;
|
|
169
172
|
#deployer;
|
|
170
173
|
#serverMiddleware = [];
|
|
171
|
-
/**
|
|
172
|
-
* @deprecated Use {@link getAITracing()} instead.
|
|
173
|
-
*/
|
|
174
|
-
#telemetry;
|
|
175
174
|
#storage;
|
|
176
|
-
#memory;
|
|
177
175
|
#scorers;
|
|
176
|
+
#tools;
|
|
177
|
+
#processors;
|
|
178
178
|
#server;
|
|
179
179
|
#mcpServers;
|
|
180
180
|
#bundler;
|
|
@@ -184,24 +184,6 @@ var Mastra = class {
|
|
|
184
184
|
#internalMastraWorkflows = {};
|
|
185
185
|
// This is only used internally for server handlers that require temporary persistence
|
|
186
186
|
#serverCache;
|
|
187
|
-
/**
|
|
188
|
-
* @deprecated use {@link getAITracing()} instead
|
|
189
|
-
*/
|
|
190
|
-
get telemetry() {
|
|
191
|
-
return this.#telemetry;
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* @deprecated use getStorage() instead
|
|
195
|
-
*/
|
|
196
|
-
get storage() {
|
|
197
|
-
return this.#storage;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* @deprecated use getMemory() instead
|
|
201
|
-
*/
|
|
202
|
-
get memory() {
|
|
203
|
-
return this.#memory;
|
|
204
|
-
}
|
|
205
187
|
get pubsub() {
|
|
206
188
|
return this.#pubsub;
|
|
207
189
|
}
|
|
@@ -274,14 +256,15 @@ var Mastra = class {
|
|
|
274
256
|
* Creates a new Mastra instance with the provided configuration.
|
|
275
257
|
*
|
|
276
258
|
* The constructor initializes all the components specified in the config, sets up
|
|
277
|
-
* internal systems like logging and
|
|
259
|
+
* internal systems like logging and observability, and registers components with each other.
|
|
278
260
|
*
|
|
279
261
|
* @example
|
|
280
262
|
* ```typescript
|
|
281
263
|
* const mastra = new Mastra({
|
|
282
264
|
* agents: {
|
|
283
265
|
* assistant: new Agent({
|
|
284
|
-
*
|
|
266
|
+
* id: 'assistant',
|
|
267
|
+
* name: 'Assistant',
|
|
285
268
|
* instructions: 'You are a helpful assistant',
|
|
286
269
|
* model: 'openai/gpt-5'
|
|
287
270
|
* })
|
|
@@ -289,17 +272,12 @@ var Mastra = class {
|
|
|
289
272
|
* storage: new PostgresStore({
|
|
290
273
|
* connectionString: process.env.DATABASE_URL
|
|
291
274
|
* }),
|
|
292
|
-
* logger: new PinoLogger({ name: 'MyApp' })
|
|
275
|
+
* logger: new PinoLogger({ name: 'MyApp' }),
|
|
276
|
+
* observability: { default: { enabled: true }},
|
|
293
277
|
* });
|
|
294
278
|
* ```
|
|
295
279
|
*/
|
|
296
280
|
constructor(config) {
|
|
297
|
-
if (config?.serverMiddleware) {
|
|
298
|
-
this.#serverMiddleware = config.serverMiddleware.map(m => ({
|
|
299
|
-
handler: m.handler,
|
|
300
|
-
path: m.path || "/api/*"
|
|
301
|
-
}));
|
|
302
|
-
}
|
|
303
281
|
this.#serverCache = new InMemoryServerCache();
|
|
304
282
|
if (config?.pubsub) {
|
|
305
283
|
this.#pubsub = config.pubsub;
|
|
@@ -314,9 +292,7 @@ var Mastra = class {
|
|
|
314
292
|
this.#events[topic] = config?.events?.[topic] ?? [];
|
|
315
293
|
}
|
|
316
294
|
}
|
|
317
|
-
const workflowEventProcessor = new WorkflowEventProcessor({
|
|
318
|
-
mastra: this
|
|
319
|
-
});
|
|
295
|
+
const workflowEventProcessor = new WorkflowEventProcessor({ mastra: this });
|
|
320
296
|
const workflowEventCb = async (event, cb) => {
|
|
321
297
|
try {
|
|
322
298
|
await workflowEventProcessor.process(event, cb);
|
|
@@ -337,10 +313,7 @@ var Mastra = class {
|
|
|
337
313
|
logger = config.logger;
|
|
338
314
|
} else {
|
|
339
315
|
const levelOnEnv = process.env.NODE_ENV === "production" && process.env.MASTRA_DEV !== "true" ? LogLevel.WARN : LogLevel.INFO;
|
|
340
|
-
logger = new ConsoleLogger({
|
|
341
|
-
name: "Mastra",
|
|
342
|
-
level: levelOnEnv
|
|
343
|
-
});
|
|
316
|
+
logger = new ConsoleLogger({ name: "Mastra", level: levelOnEnv });
|
|
344
317
|
}
|
|
345
318
|
}
|
|
346
319
|
this.#logger = logger;
|
|
@@ -349,202 +322,74 @@ var Mastra = class {
|
|
|
349
322
|
if (storage) {
|
|
350
323
|
storage = augmentWithInit(storage);
|
|
351
324
|
}
|
|
352
|
-
this.#telemetry = Telemetry.init(config?.telemetry);
|
|
353
|
-
if (config?.telemetry?.enabled !== false && typeof globalThis !== "undefined" && globalThis.___MASTRA_TELEMETRY___ !== true) {
|
|
354
|
-
this.#logger?.warn(`Mastra telemetry is enabled, but the required instrumentation file was not loaded. If you are using Mastra outside of the mastra server environment, see: https://mastra.ai/en/docs/observability/tracing#tracing-outside-mastra-server-environment`, `If you are using a custom instrumentation file or want to disable this warning, set the globalThis.___MASTRA_TELEMETRY___ variable to true in your instrumentation file.`);
|
|
355
|
-
}
|
|
356
|
-
if (config?.telemetry?.enabled !== false) {
|
|
357
|
-
this.#logger?.warn(`Mastra telemetry is deprecated and will be removed on the Nov 4th release. Instead use AI Tracing. More info can be found here: https://github.com/mastra-ai/mastra/issues/8577 and here: https://mastra.ai/en/docs/observability/ai-tracing/overview`);
|
|
358
|
-
}
|
|
359
325
|
if (config?.observability) {
|
|
360
|
-
|
|
326
|
+
if (typeof config.observability.getDefaultInstance === "function") {
|
|
327
|
+
this.#observability = config.observability;
|
|
328
|
+
this.#observability.setLogger({ logger: this.#logger });
|
|
329
|
+
} else {
|
|
330
|
+
this.#logger?.warn(
|
|
331
|
+
'Observability configuration error: Expected an Observability instance, but received a config object. Import and instantiate: import { Observability } from "@mastra/observability"; then pass: observability: new Observability({ default: { enabled: true } }). Observability has been disabled.'
|
|
332
|
+
);
|
|
333
|
+
this.#observability = new NoOpObservability();
|
|
334
|
+
}
|
|
335
|
+
} else {
|
|
336
|
+
this.#observability = new NoOpObservability();
|
|
337
|
+
}
|
|
338
|
+
this.#storage = storage;
|
|
339
|
+
this.#vectors = {};
|
|
340
|
+
this.#mcpServers = {};
|
|
341
|
+
this.#tts = {};
|
|
342
|
+
this.#agents = {};
|
|
343
|
+
this.#scorers = {};
|
|
344
|
+
this.#tools = {};
|
|
345
|
+
this.#processors = {};
|
|
346
|
+
this.#workflows = {};
|
|
347
|
+
if (config?.tools) {
|
|
348
|
+
Object.entries(config.tools).forEach(([key, tool]) => {
|
|
349
|
+
this.addTool(tool, key);
|
|
350
|
+
});
|
|
361
351
|
}
|
|
362
|
-
if (
|
|
363
|
-
|
|
364
|
-
|
|
352
|
+
if (config?.processors) {
|
|
353
|
+
Object.entries(config.processors).forEach(([key, processor]) => {
|
|
354
|
+
this.addProcessor(processor, key);
|
|
365
355
|
});
|
|
366
|
-
this.#storage.__setTelemetry(this.#telemetry);
|
|
367
|
-
} else {
|
|
368
|
-
this.#storage = storage;
|
|
369
356
|
}
|
|
370
357
|
if (config?.vectors) {
|
|
371
|
-
let vectors = {};
|
|
372
358
|
Object.entries(config.vectors).forEach(([key, vector]) => {
|
|
373
|
-
|
|
374
|
-
vectors[key] = this.#telemetry.traceClass(vector, {
|
|
375
|
-
excludeMethods: ["__setTelemetry", "__getTelemetry"]
|
|
376
|
-
});
|
|
377
|
-
vectors[key].__setTelemetry(this.#telemetry);
|
|
378
|
-
} else {
|
|
379
|
-
vectors[key] = vector;
|
|
380
|
-
}
|
|
359
|
+
this.addVector(vector, key);
|
|
381
360
|
});
|
|
382
|
-
this.#vectors = vectors;
|
|
383
361
|
}
|
|
384
|
-
if (config?.
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
server.setId(key);
|
|
388
|
-
if (this.#telemetry) {
|
|
389
|
-
server.__setTelemetry(this.#telemetry);
|
|
390
|
-
}
|
|
391
|
-
server.__registerMastra(this);
|
|
392
|
-
server.__setLogger(this.getLogger());
|
|
362
|
+
if (config?.scorers) {
|
|
363
|
+
Object.entries(config.scorers).forEach(([key, scorer]) => {
|
|
364
|
+
this.addScorer(scorer, key);
|
|
393
365
|
});
|
|
394
366
|
}
|
|
395
|
-
if (config
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
domain: "MASTRA" /* MASTRA */,
|
|
399
|
-
category: "USER" /* USER */,
|
|
400
|
-
text: `
|
|
401
|
-
Memory should be added to Agents, not to Mastra.
|
|
402
|
-
|
|
403
|
-
Instead of:
|
|
404
|
-
new Mastra({ memory: new Memory() })
|
|
405
|
-
|
|
406
|
-
do:
|
|
407
|
-
new Agent({ memory: new Memory() })
|
|
408
|
-
`
|
|
367
|
+
if (config?.workflows) {
|
|
368
|
+
Object.entries(config.workflows).forEach(([key, workflow]) => {
|
|
369
|
+
this.addWorkflow(workflow, key);
|
|
409
370
|
});
|
|
410
|
-
this.#logger?.trackException(error);
|
|
411
|
-
throw error;
|
|
412
371
|
}
|
|
413
|
-
if (config?.
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
if (this.#tts?.[key]) {
|
|
417
|
-
if (this.#telemetry) {
|
|
418
|
-
this.#tts[key] = this.#telemetry.traceClass(ttsCl, {
|
|
419
|
-
excludeMethods: ["__setTelemetry", "__getTelemetry"]
|
|
420
|
-
});
|
|
421
|
-
this.#tts[key].__setTelemetry(this.#telemetry);
|
|
422
|
-
}
|
|
423
|
-
}
|
|
372
|
+
if (config?.mcpServers) {
|
|
373
|
+
Object.entries(config.mcpServers).forEach(([key, server]) => {
|
|
374
|
+
this.addMCPServer(server, key);
|
|
424
375
|
});
|
|
425
376
|
}
|
|
426
|
-
const agents = {};
|
|
427
377
|
if (config?.agents) {
|
|
428
378
|
Object.entries(config.agents).forEach(([key, agent]) => {
|
|
429
|
-
|
|
430
|
-
const error = new MastraError({
|
|
431
|
-
id: "MASTRA_AGENT_REGISTRATION_DUPLICATE_ID",
|
|
432
|
-
domain: "MASTRA" /* MASTRA */,
|
|
433
|
-
category: "USER" /* USER */,
|
|
434
|
-
text: `Agent with name ID:${key} already exists`,
|
|
435
|
-
details: {
|
|
436
|
-
agentId: key
|
|
437
|
-
}
|
|
438
|
-
});
|
|
439
|
-
this.#logger?.trackException(error);
|
|
440
|
-
throw error;
|
|
441
|
-
}
|
|
442
|
-
agent.__registerMastra(this);
|
|
443
|
-
agent.__registerPrimitives({
|
|
444
|
-
logger: this.getLogger(),
|
|
445
|
-
telemetry: this.#telemetry,
|
|
446
|
-
storage: this.storage,
|
|
447
|
-
memory: this.memory,
|
|
448
|
-
agents,
|
|
449
|
-
tts: this.#tts,
|
|
450
|
-
vectors: this.#vectors
|
|
451
|
-
});
|
|
452
|
-
agents[key] = agent;
|
|
379
|
+
this.addAgent(agent, key);
|
|
453
380
|
});
|
|
454
381
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
Object.entries(config.scorers).forEach(([key, scorer]) => {
|
|
459
|
-
scorers[key] = scorer;
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
this.#scorers = scorers;
|
|
463
|
-
this.#legacy_workflows = {};
|
|
464
|
-
if (config?.legacy_workflows) {
|
|
465
|
-
Object.entries(config.legacy_workflows).forEach(([key, workflow]) => {
|
|
466
|
-
workflow.__registerMastra(this);
|
|
467
|
-
workflow.__registerPrimitives({
|
|
468
|
-
logger: this.getLogger(),
|
|
469
|
-
telemetry: this.#telemetry,
|
|
470
|
-
storage: this.storage,
|
|
471
|
-
memory: this.memory,
|
|
472
|
-
agents,
|
|
473
|
-
tts: this.#tts,
|
|
474
|
-
vectors: this.#vectors
|
|
475
|
-
});
|
|
476
|
-
this.#legacy_workflows[key] = workflow;
|
|
477
|
-
const workflowSteps = Object.values(workflow.steps).filter(step => !!step.workflowId && !!step.workflow);
|
|
478
|
-
if (workflowSteps.length > 0) {
|
|
479
|
-
workflowSteps.forEach(step => {
|
|
480
|
-
this.#legacy_workflows[step.workflowId] = step.workflow;
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
this.#workflows = {};
|
|
486
|
-
if (config?.workflows) {
|
|
487
|
-
Object.entries(config.workflows).forEach(([key, workflow]) => {
|
|
488
|
-
workflow.__registerMastra(this);
|
|
489
|
-
workflow.__registerPrimitives({
|
|
490
|
-
logger: this.getLogger(),
|
|
491
|
-
telemetry: this.#telemetry,
|
|
492
|
-
storage: this.storage,
|
|
493
|
-
memory: this.memory,
|
|
494
|
-
agents,
|
|
495
|
-
tts: this.#tts,
|
|
496
|
-
vectors: this.#vectors
|
|
497
|
-
});
|
|
498
|
-
this.#workflows[key] = workflow;
|
|
382
|
+
if (config?.tts) {
|
|
383
|
+
Object.entries(config.tts).forEach(([key, tts]) => {
|
|
384
|
+
this.#tts[key] = tts;
|
|
499
385
|
});
|
|
500
386
|
}
|
|
501
387
|
if (config?.server) {
|
|
502
388
|
this.#server = config.server;
|
|
503
389
|
}
|
|
504
390
|
registerHook("onScorerRun" /* ON_SCORER_RUN */, createOnScorerHook(this));
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
this.initAITracingExporters();
|
|
508
|
-
}
|
|
509
|
-
this.setLogger({
|
|
510
|
-
logger
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
/**
|
|
514
|
-
* Register this Mastra instance with AI tracing exporters that need it
|
|
515
|
-
*/
|
|
516
|
-
registerAITracingExporters() {
|
|
517
|
-
const allTracingInstances = getAllAITracing();
|
|
518
|
-
allTracingInstances.forEach(tracing => {
|
|
519
|
-
const exporters = tracing.getExporters();
|
|
520
|
-
exporters.forEach(exporter => {
|
|
521
|
-
if ("__registerMastra" in exporter && typeof exporter.__registerMastra === "function") {
|
|
522
|
-
exporter.__registerMastra(this);
|
|
523
|
-
}
|
|
524
|
-
});
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* Initialize all AI tracing exporters after registration is complete
|
|
529
|
-
*/
|
|
530
|
-
initAITracingExporters() {
|
|
531
|
-
const allTracingInstances = getAllAITracing();
|
|
532
|
-
allTracingInstances.forEach(tracing => {
|
|
533
|
-
const config = tracing.getConfig();
|
|
534
|
-
const exporters = tracing.getExporters();
|
|
535
|
-
exporters.forEach(exporter => {
|
|
536
|
-
if ("init" in exporter && typeof exporter.init === "function") {
|
|
537
|
-
try {
|
|
538
|
-
exporter.init(config);
|
|
539
|
-
} catch (error) {
|
|
540
|
-
this.#logger?.warn("Failed to initialize AI tracing exporter", {
|
|
541
|
-
exporterName: exporter.name,
|
|
542
|
-
error: error instanceof Error ? error.message : String(error)
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
});
|
|
547
|
-
});
|
|
391
|
+
this.#observability.setMastraContext({ mastra: this });
|
|
392
|
+
this.setLogger({ logger });
|
|
548
393
|
}
|
|
549
394
|
/**
|
|
550
395
|
* Retrieves a registered agent by its name.
|
|
@@ -557,6 +402,7 @@ do:
|
|
|
557
402
|
* const mastra = new Mastra({
|
|
558
403
|
* agents: {
|
|
559
404
|
* weatherAgent: new Agent({
|
|
405
|
+
* id: 'weather-agent',
|
|
560
406
|
* name: 'weather-agent',
|
|
561
407
|
* instructions: 'You provide weather information',
|
|
562
408
|
* model: 'openai/gpt-5'
|
|
@@ -591,7 +437,7 @@ do:
|
|
|
591
437
|
*
|
|
592
438
|
* This method searches for an agent using its internal ID property. If no agent
|
|
593
439
|
* is found with the given ID, it also attempts to find an agent using the ID as
|
|
594
|
-
* a name
|
|
440
|
+
* a name.
|
|
595
441
|
*
|
|
596
442
|
* @throws {MastraError} When no agent is found with the specified ID
|
|
597
443
|
*
|
|
@@ -600,6 +446,7 @@ do:
|
|
|
600
446
|
* const mastra = new Mastra({
|
|
601
447
|
* agents: {
|
|
602
448
|
* assistant: new Agent({
|
|
449
|
+
* id: 'assistant',
|
|
603
450
|
* name: 'assistant',
|
|
604
451
|
* instructions: 'You are a helpful assistant',
|
|
605
452
|
* model: 'openai/gpt-5'
|
|
@@ -612,11 +459,12 @@ do:
|
|
|
612
459
|
* ```
|
|
613
460
|
*/
|
|
614
461
|
getAgentById(id) {
|
|
615
|
-
let agent = Object.values(this.#agents).find(a => a.id === id);
|
|
462
|
+
let agent = Object.values(this.#agents).find((a) => a.id === id);
|
|
616
463
|
if (!agent) {
|
|
617
464
|
try {
|
|
618
465
|
agent = this.getAgent(id);
|
|
619
|
-
} catch {
|
|
466
|
+
} catch {
|
|
467
|
+
}
|
|
620
468
|
}
|
|
621
469
|
if (!agent) {
|
|
622
470
|
const error = new MastraError({
|
|
@@ -645,18 +493,58 @@ do:
|
|
|
645
493
|
* ```typescript
|
|
646
494
|
* const mastra = new Mastra({
|
|
647
495
|
* agents: {
|
|
648
|
-
* weatherAgent: new Agent({ name: 'weather', model: openai
|
|
649
|
-
* supportAgent: new Agent({ name: 'support', model: openai
|
|
496
|
+
* weatherAgent: new Agent({ id: 'weather-agent', name: 'weather', model: 'openai/gpt-4o' }),
|
|
497
|
+
* supportAgent: new Agent({ id: 'support-agent', name: 'support', model: 'openai/gpt-4o' })
|
|
650
498
|
* }
|
|
651
499
|
* });
|
|
652
500
|
*
|
|
653
|
-
* const allAgents = mastra.
|
|
501
|
+
* const allAgents = mastra.listAgents();
|
|
654
502
|
* console.log(Object.keys(allAgents)); // ['weatherAgent', 'supportAgent']
|
|
655
503
|
* ```
|
|
656
504
|
*/
|
|
657
|
-
|
|
505
|
+
listAgents() {
|
|
658
506
|
return this.#agents;
|
|
659
507
|
}
|
|
508
|
+
/**
|
|
509
|
+
* Adds a new agent to the Mastra instance.
|
|
510
|
+
*
|
|
511
|
+
* This method allows dynamic registration of agents after the Mastra instance
|
|
512
|
+
* has been created. The agent will be initialized with the current logger.
|
|
513
|
+
*
|
|
514
|
+
* @throws {MastraError} When an agent with the same key already exists
|
|
515
|
+
*
|
|
516
|
+
* @example
|
|
517
|
+
* ```typescript
|
|
518
|
+
* const mastra = new Mastra();
|
|
519
|
+
* const newAgent = new Agent({
|
|
520
|
+
* id: 'chat-agent',
|
|
521
|
+
* name: 'Chat Assistant',
|
|
522
|
+
* model: 'openai/gpt-4o'
|
|
523
|
+
* });
|
|
524
|
+
* mastra.addAgent(newAgent); // Uses agent.id as key
|
|
525
|
+
* // or
|
|
526
|
+
* mastra.addAgent(newAgent, 'customKey'); // Uses custom key
|
|
527
|
+
* ```
|
|
528
|
+
*/
|
|
529
|
+
addAgent(agent, key) {
|
|
530
|
+
const agentKey = key || agent.id;
|
|
531
|
+
const agents = this.#agents;
|
|
532
|
+
if (agents[agentKey]) {
|
|
533
|
+
const logger = this.getLogger();
|
|
534
|
+
logger.debug(`Agent with key ${agentKey} already exists. Skipping addition.`);
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
agent.__setLogger(this.#logger);
|
|
538
|
+
agent.__registerMastra(this);
|
|
539
|
+
agent.__registerPrimitives({
|
|
540
|
+
logger: this.getLogger(),
|
|
541
|
+
storage: this.getStorage(),
|
|
542
|
+
agents,
|
|
543
|
+
tts: this.#tts,
|
|
544
|
+
vectors: this.#vectors
|
|
545
|
+
});
|
|
546
|
+
agents[agentKey] = agent;
|
|
547
|
+
}
|
|
660
548
|
/**
|
|
661
549
|
* Retrieves a registered vector store by its name.
|
|
662
550
|
*
|
|
@@ -714,6 +602,50 @@ do:
|
|
|
714
602
|
}
|
|
715
603
|
return vector;
|
|
716
604
|
}
|
|
605
|
+
/**
|
|
606
|
+
* Retrieves a specific vector store instance by its ID.
|
|
607
|
+
*
|
|
608
|
+
* This method searches for a vector store by its internal ID property.
|
|
609
|
+
* If not found by ID, it falls back to searching by registration key.
|
|
610
|
+
*
|
|
611
|
+
* @throws {MastraError} When the specified vector store is not found
|
|
612
|
+
*
|
|
613
|
+
* @example
|
|
614
|
+
* ```typescript
|
|
615
|
+
* const mastra = new Mastra({
|
|
616
|
+
* vectors: {
|
|
617
|
+
* embeddings: chromaVector
|
|
618
|
+
* }
|
|
619
|
+
* });
|
|
620
|
+
*
|
|
621
|
+
* const vectorStore = mastra.getVectorById('chroma-123');
|
|
622
|
+
* ```
|
|
623
|
+
*/
|
|
624
|
+
getVectorById(id) {
|
|
625
|
+
const allVectors = this.#vectors ?? {};
|
|
626
|
+
for (const vector of Object.values(allVectors)) {
|
|
627
|
+
if (vector.id === id) {
|
|
628
|
+
return vector;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
const vectorByKey = allVectors[id];
|
|
632
|
+
if (vectorByKey) {
|
|
633
|
+
return vectorByKey;
|
|
634
|
+
}
|
|
635
|
+
const error = new MastraError({
|
|
636
|
+
id: "MASTRA_GET_VECTOR_BY_ID_NOT_FOUND",
|
|
637
|
+
domain: "MASTRA" /* MASTRA */,
|
|
638
|
+
category: "USER" /* USER */,
|
|
639
|
+
text: `Vector store with id ${id} not found`,
|
|
640
|
+
details: {
|
|
641
|
+
status: 404,
|
|
642
|
+
vectorId: String(id),
|
|
643
|
+
vectors: Object.keys(allVectors).join(", ")
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
this.#logger?.trackException(error);
|
|
647
|
+
throw error;
|
|
648
|
+
}
|
|
717
649
|
/**
|
|
718
650
|
* Returns all registered vector stores as a record keyed by their names.
|
|
719
651
|
*
|
|
@@ -736,9 +668,44 @@ do:
|
|
|
736
668
|
* }
|
|
737
669
|
* ```
|
|
738
670
|
*/
|
|
739
|
-
|
|
671
|
+
listVectors() {
|
|
740
672
|
return this.#vectors;
|
|
741
673
|
}
|
|
674
|
+
/**
|
|
675
|
+
* Adds a new vector store to the Mastra instance.
|
|
676
|
+
*
|
|
677
|
+
* This method allows dynamic registration of vector stores after the Mastra instance
|
|
678
|
+
* has been created. The vector store will be initialized with the current logger.
|
|
679
|
+
*
|
|
680
|
+
* @throws {MastraError} When a vector store with the same key already exists
|
|
681
|
+
*
|
|
682
|
+
* @example
|
|
683
|
+
* ```typescript
|
|
684
|
+
* const mastra = new Mastra();
|
|
685
|
+
* const newVector = new ChromaVector({ id: 'chroma-embeddings' });
|
|
686
|
+
* mastra.addVector(newVector); // Uses vector.id as key
|
|
687
|
+
* // or
|
|
688
|
+
* mastra.addVector(newVector, 'customKey'); // Uses custom key
|
|
689
|
+
* ```
|
|
690
|
+
*/
|
|
691
|
+
addVector(vector, key) {
|
|
692
|
+
const vectorKey = key || vector.id;
|
|
693
|
+
const vectors = this.#vectors;
|
|
694
|
+
if (vectors[vectorKey]) {
|
|
695
|
+
const logger = this.getLogger();
|
|
696
|
+
logger.debug(`Vector with key ${vectorKey} already exists. Skipping addition.`);
|
|
697
|
+
return;
|
|
698
|
+
}
|
|
699
|
+
vector.__setLogger(this.#logger || this.getLogger());
|
|
700
|
+
vectors[vectorKey] = vector;
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* @deprecated Use listVectors() instead
|
|
704
|
+
*/
|
|
705
|
+
getVectors() {
|
|
706
|
+
console.warn("getVectors() is deprecated. Use listVectors() instead.");
|
|
707
|
+
return this.listVectors();
|
|
708
|
+
}
|
|
742
709
|
/**
|
|
743
710
|
* Gets the currently configured deployment provider.
|
|
744
711
|
*
|
|
@@ -763,55 +730,6 @@ do:
|
|
|
763
730
|
getDeployer() {
|
|
764
731
|
return this.#deployer;
|
|
765
732
|
}
|
|
766
|
-
/**
|
|
767
|
-
* Retrieves a registered legacy workflow by its ID.
|
|
768
|
-
*
|
|
769
|
-
* Legacy workflows are the previous generation of workflow system in Mastra,
|
|
770
|
-
* maintained for backward compatibility. For new implementations, use the
|
|
771
|
-
* modern workflow system accessed via `getWorkflow()`.
|
|
772
|
-
*
|
|
773
|
-
* @template TWorkflowId - The specific workflow ID type from the registered legacy workflows
|
|
774
|
-
* @throws {MastraError} When the legacy workflow with the specified ID is not found
|
|
775
|
-
* @deprecated Use `getWorkflow()` for new implementations
|
|
776
|
-
*
|
|
777
|
-
* @example Getting a legacy workflow
|
|
778
|
-
* ```typescript
|
|
779
|
-
* const mastra = new Mastra({
|
|
780
|
-
* legacy_workflows: {
|
|
781
|
-
* oldDataFlow: legacyWorkflowInstance
|
|
782
|
-
* }
|
|
783
|
-
* });
|
|
784
|
-
*
|
|
785
|
-
* const workflow = mastra.legacy_getWorkflow('oldDataFlow');
|
|
786
|
-
* const result = await workflow.execute({ input: 'data' });
|
|
787
|
-
* ```
|
|
788
|
-
*/
|
|
789
|
-
legacy_getWorkflow(id, {
|
|
790
|
-
serialized
|
|
791
|
-
} = {}) {
|
|
792
|
-
const workflow = this.#legacy_workflows?.[id];
|
|
793
|
-
if (!workflow) {
|
|
794
|
-
const error = new MastraError({
|
|
795
|
-
id: "MASTRA_GET_LEGACY_WORKFLOW_BY_ID_NOT_FOUND",
|
|
796
|
-
domain: "MASTRA" /* MASTRA */,
|
|
797
|
-
category: "USER" /* USER */,
|
|
798
|
-
text: `Workflow with ID ${String(id)} not found`,
|
|
799
|
-
details: {
|
|
800
|
-
status: 404,
|
|
801
|
-
workflowId: String(id),
|
|
802
|
-
workflows: Object.keys(this.#legacy_workflows ?? {}).join(", ")
|
|
803
|
-
}
|
|
804
|
-
});
|
|
805
|
-
this.#logger?.trackException(error);
|
|
806
|
-
throw error;
|
|
807
|
-
}
|
|
808
|
-
if (serialized) {
|
|
809
|
-
return {
|
|
810
|
-
name: workflow.name
|
|
811
|
-
};
|
|
812
|
-
}
|
|
813
|
-
return workflow;
|
|
814
|
-
}
|
|
815
733
|
/**
|
|
816
734
|
* Retrieves a registered workflow by its ID.
|
|
817
735
|
*
|
|
@@ -839,9 +757,7 @@ do:
|
|
|
839
757
|
* });
|
|
840
758
|
* ```
|
|
841
759
|
*/
|
|
842
|
-
getWorkflow(id, {
|
|
843
|
-
serialized
|
|
844
|
-
} = {}) {
|
|
760
|
+
getWorkflow(id, { serialized } = {}) {
|
|
845
761
|
const workflow = this.#workflows?.[id];
|
|
846
762
|
if (!workflow) {
|
|
847
763
|
const error = new MastraError({
|
|
@@ -859,25 +775,22 @@ do:
|
|
|
859
775
|
throw error;
|
|
860
776
|
}
|
|
861
777
|
if (serialized) {
|
|
862
|
-
return {
|
|
863
|
-
name: workflow.name
|
|
864
|
-
};
|
|
778
|
+
return { name: workflow.name };
|
|
865
779
|
}
|
|
866
780
|
return workflow;
|
|
867
781
|
}
|
|
868
782
|
__registerInternalWorkflow(workflow) {
|
|
869
783
|
workflow.__registerMastra(this);
|
|
870
784
|
workflow.__registerPrimitives({
|
|
871
|
-
logger: this.getLogger()
|
|
872
|
-
storage: this.storage
|
|
785
|
+
logger: this.getLogger()
|
|
873
786
|
});
|
|
874
787
|
this.#internalMastraWorkflows[workflow.id] = workflow;
|
|
875
788
|
}
|
|
876
789
|
__hasInternalWorkflow(id) {
|
|
877
|
-
return Object.values(this.#internalMastraWorkflows).some(workflow => workflow.id === id);
|
|
790
|
+
return Object.values(this.#internalMastraWorkflows).some((workflow) => workflow.id === id);
|
|
878
791
|
}
|
|
879
792
|
__getInternalWorkflow(id) {
|
|
880
|
-
const workflow = Object.values(this.#internalMastraWorkflows).find(a => a.id === id);
|
|
793
|
+
const workflow = Object.values(this.#internalMastraWorkflows).find((a) => a.id === id);
|
|
881
794
|
if (!workflow) {
|
|
882
795
|
throw new MastraError({
|
|
883
796
|
id: "MASTRA_GET_INTERNAL_WORKFLOW_BY_ID_NOT_FOUND",
|
|
@@ -897,7 +810,7 @@ do:
|
|
|
897
810
|
*
|
|
898
811
|
* This method searches for a workflow using its internal ID property. If no workflow
|
|
899
812
|
* is found with the given ID, it also attempts to find a workflow using the ID as
|
|
900
|
-
* a name
|
|
813
|
+
* a name.
|
|
901
814
|
*
|
|
902
815
|
* @throws {MastraError} When no workflow is found with the specified ID
|
|
903
816
|
*
|
|
@@ -922,11 +835,12 @@ do:
|
|
|
922
835
|
* ```
|
|
923
836
|
*/
|
|
924
837
|
getWorkflowById(id) {
|
|
925
|
-
let workflow = Object.values(this.#workflows).find(a => a.id === id);
|
|
838
|
+
let workflow = Object.values(this.#workflows).find((a) => a.id === id);
|
|
926
839
|
if (!workflow) {
|
|
927
840
|
try {
|
|
928
841
|
workflow = this.getWorkflow(id);
|
|
929
|
-
} catch {
|
|
842
|
+
} catch {
|
|
843
|
+
}
|
|
930
844
|
}
|
|
931
845
|
if (!workflow) {
|
|
932
846
|
const error = new MastraError({
|
|
@@ -945,45 +859,6 @@ do:
|
|
|
945
859
|
}
|
|
946
860
|
return workflow;
|
|
947
861
|
}
|
|
948
|
-
/**
|
|
949
|
-
* Returns all registered legacy workflows as a record keyed by their IDs.
|
|
950
|
-
*
|
|
951
|
-
* Legacy workflows are the previous generation of workflow system in Mastra,
|
|
952
|
-
* maintained for backward compatibility. For new implementations, use `getWorkflows()`.
|
|
953
|
-
*
|
|
954
|
-
* @deprecated Use `getWorkflows()` for new implementations
|
|
955
|
-
*
|
|
956
|
-
* @example Listing all legacy workflows
|
|
957
|
-
* ```typescript
|
|
958
|
-
* const mastra = new Mastra({
|
|
959
|
-
* legacy_workflows: {
|
|
960
|
-
* oldFlow1: legacyWorkflow1,
|
|
961
|
-
* oldFlow2: legacyWorkflow2
|
|
962
|
-
* }
|
|
963
|
-
* });
|
|
964
|
-
*
|
|
965
|
-
* const allLegacyWorkflows = mastra.legacy_getWorkflows();
|
|
966
|
-
* console.log(Object.keys(allLegacyWorkflows)); // ['oldFlow1', 'oldFlow2']
|
|
967
|
-
*
|
|
968
|
-
* // Execute all legacy workflows
|
|
969
|
-
* for (const [id, workflow] of Object.entries(allLegacyWorkflows)) {
|
|
970
|
-
* console.log(`Legacy workflow ${id}:`, workflow.name);
|
|
971
|
-
* }
|
|
972
|
-
* ```
|
|
973
|
-
*/
|
|
974
|
-
legacy_getWorkflows(props = {}) {
|
|
975
|
-
if (props.serialized) {
|
|
976
|
-
return Object.entries(this.#legacy_workflows).reduce((acc, [k, v]) => {
|
|
977
|
-
return {
|
|
978
|
-
...acc,
|
|
979
|
-
[k]: {
|
|
980
|
-
name: v.name
|
|
981
|
-
}
|
|
982
|
-
};
|
|
983
|
-
}, {});
|
|
984
|
-
}
|
|
985
|
-
return this.#legacy_workflows;
|
|
986
|
-
}
|
|
987
862
|
/**
|
|
988
863
|
* Returns all registered scorers as a record keyed by their IDs.
|
|
989
864
|
*
|
|
@@ -999,18 +874,48 @@ do:
|
|
|
999
874
|
* }
|
|
1000
875
|
* });
|
|
1001
876
|
*
|
|
1002
|
-
* const allScorers = mastra.
|
|
877
|
+
* const allScorers = mastra.listScorers();
|
|
1003
878
|
* console.log(Object.keys(allScorers)); // ['helpfulness', 'accuracy', 'relevance']
|
|
1004
879
|
*
|
|
1005
880
|
* // Check scorer configurations
|
|
1006
881
|
* for (const [id, scorer] of Object.entries(allScorers)) {
|
|
1007
|
-
* console.log(`Scorer ${id}:`, scorer.name, scorer.description);
|
|
882
|
+
* console.log(`Scorer ${id}:`, scorer.id, scorer.name, scorer.description);
|
|
1008
883
|
* }
|
|
1009
884
|
* ```
|
|
1010
885
|
*/
|
|
1011
|
-
|
|
886
|
+
listScorers() {
|
|
1012
887
|
return this.#scorers;
|
|
1013
888
|
}
|
|
889
|
+
/**
|
|
890
|
+
* Adds a new scorer to the Mastra instance.
|
|
891
|
+
*
|
|
892
|
+
* This method allows dynamic registration of scorers after the Mastra instance
|
|
893
|
+
* has been created.
|
|
894
|
+
*
|
|
895
|
+
* @throws {MastraError} When a scorer with the same key already exists
|
|
896
|
+
*
|
|
897
|
+
* @example
|
|
898
|
+
* ```typescript
|
|
899
|
+
* const mastra = new Mastra();
|
|
900
|
+
* const newScorer = new MastraScorer({
|
|
901
|
+
* id: 'quality-scorer',
|
|
902
|
+
* name: 'Quality Scorer'
|
|
903
|
+
* });
|
|
904
|
+
* mastra.addScorer(newScorer); // Uses scorer.id as key
|
|
905
|
+
* // or
|
|
906
|
+
* mastra.addScorer(newScorer, 'customKey'); // Uses custom key
|
|
907
|
+
* ```
|
|
908
|
+
*/
|
|
909
|
+
addScorer(scorer, key) {
|
|
910
|
+
const scorerKey = key || scorer.id;
|
|
911
|
+
const scorers = this.#scorers;
|
|
912
|
+
if (scorers[scorerKey]) {
|
|
913
|
+
const logger = this.getLogger();
|
|
914
|
+
logger.debug(`Scorer with key ${scorerKey} already exists. Skipping addition.`);
|
|
915
|
+
return;
|
|
916
|
+
}
|
|
917
|
+
scorers[scorerKey] = scorer;
|
|
918
|
+
}
|
|
1014
919
|
/**
|
|
1015
920
|
* Retrieves a registered scorer by its key.
|
|
1016
921
|
*
|
|
@@ -1024,7 +929,7 @@ do:
|
|
|
1024
929
|
* const mastra = new Mastra({
|
|
1025
930
|
* scorers: {
|
|
1026
931
|
* helpfulness: new HelpfulnessScorer({
|
|
1027
|
-
* model: openai
|
|
932
|
+
* model: 'openai/gpt-4o',
|
|
1028
933
|
* criteria: 'Rate how helpful this response is'
|
|
1029
934
|
* }),
|
|
1030
935
|
* accuracy: new AccuracyScorer({
|
|
@@ -1081,28 +986,298 @@ do:
|
|
|
1081
986
|
* });
|
|
1082
987
|
*
|
|
1083
988
|
* // Find scorer by its internal name, not the registration key
|
|
1084
|
-
* const scorer = mastra.
|
|
989
|
+
* const scorer = mastra.getScorerById('helpfulness-evaluator');
|
|
1085
990
|
* const score = await scorer.score({
|
|
1086
991
|
* input: 'question',
|
|
1087
992
|
* output: 'answer'
|
|
1088
993
|
* });
|
|
1089
994
|
* ```
|
|
1090
995
|
*/
|
|
1091
|
-
|
|
996
|
+
getScorerById(id) {
|
|
1092
997
|
for (const [_key, value] of Object.entries(this.#scorers ?? {})) {
|
|
1093
|
-
if (value.name ===
|
|
998
|
+
if (value.id === id || value?.name === id) {
|
|
1094
999
|
return value;
|
|
1095
1000
|
}
|
|
1096
1001
|
}
|
|
1097
1002
|
const error = new MastraError({
|
|
1098
|
-
id: "
|
|
1003
|
+
id: "MASTRA_GET_SCORER_BY_ID_NOT_FOUND",
|
|
1099
1004
|
domain: "MASTRA" /* MASTRA */,
|
|
1100
1005
|
category: "USER" /* USER */,
|
|
1101
|
-
text: `Scorer with
|
|
1006
|
+
text: `Scorer with id ${String(id)} not found`
|
|
1102
1007
|
});
|
|
1103
1008
|
this.#logger?.trackException(error);
|
|
1104
1009
|
throw error;
|
|
1105
1010
|
}
|
|
1011
|
+
/**
|
|
1012
|
+
* Retrieves a specific tool by registration key.
|
|
1013
|
+
*
|
|
1014
|
+
* @throws {MastraError} When the specified tool is not found
|
|
1015
|
+
*
|
|
1016
|
+
* @example
|
|
1017
|
+
* ```typescript
|
|
1018
|
+
* const mastra = new Mastra({
|
|
1019
|
+
* tools: {
|
|
1020
|
+
* calculator: calculatorTool,
|
|
1021
|
+
* weather: weatherTool
|
|
1022
|
+
* }
|
|
1023
|
+
* });
|
|
1024
|
+
*
|
|
1025
|
+
* const tool = mastra.getTool('calculator');
|
|
1026
|
+
* ```
|
|
1027
|
+
*/
|
|
1028
|
+
getTool(name) {
|
|
1029
|
+
if (!this.#tools || !this.#tools[name]) {
|
|
1030
|
+
const error = new MastraError({
|
|
1031
|
+
id: "MASTRA_GET_TOOL_BY_NAME_NOT_FOUND",
|
|
1032
|
+
domain: "MASTRA" /* MASTRA */,
|
|
1033
|
+
category: "USER" /* USER */,
|
|
1034
|
+
text: `Tool with name ${String(name)} not found`,
|
|
1035
|
+
details: {
|
|
1036
|
+
status: 404,
|
|
1037
|
+
toolName: String(name),
|
|
1038
|
+
tools: Object.keys(this.#tools ?? {}).join(", ")
|
|
1039
|
+
}
|
|
1040
|
+
});
|
|
1041
|
+
this.#logger?.trackException(error);
|
|
1042
|
+
throw error;
|
|
1043
|
+
}
|
|
1044
|
+
return this.#tools[name];
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Retrieves a specific tool by its ID.
|
|
1048
|
+
*
|
|
1049
|
+
* @throws {MastraError} When the specified tool is not found
|
|
1050
|
+
*
|
|
1051
|
+
* @example
|
|
1052
|
+
* ```typescript
|
|
1053
|
+
* const mastra = new Mastra({
|
|
1054
|
+
* tools: {
|
|
1055
|
+
* calculator: calculatorTool
|
|
1056
|
+
* }
|
|
1057
|
+
* });
|
|
1058
|
+
*
|
|
1059
|
+
* const tool = mastra.getToolById('calculator-tool-id');
|
|
1060
|
+
* ```
|
|
1061
|
+
*/
|
|
1062
|
+
getToolById(id) {
|
|
1063
|
+
const allTools = this.#tools;
|
|
1064
|
+
if (!allTools) {
|
|
1065
|
+
throw new MastraError({
|
|
1066
|
+
id: "MASTRA_GET_TOOL_BY_ID_NOT_FOUND",
|
|
1067
|
+
domain: "MASTRA" /* MASTRA */,
|
|
1068
|
+
category: "USER" /* USER */,
|
|
1069
|
+
text: `Tool with id ${id} not found`
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
for (const tool of Object.values(allTools)) {
|
|
1073
|
+
if (tool.id === id) {
|
|
1074
|
+
return tool;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
const toolByKey = allTools[id];
|
|
1078
|
+
if (toolByKey) {
|
|
1079
|
+
return toolByKey;
|
|
1080
|
+
}
|
|
1081
|
+
const error = new MastraError({
|
|
1082
|
+
id: "MASTRA_GET_TOOL_BY_ID_NOT_FOUND",
|
|
1083
|
+
domain: "MASTRA" /* MASTRA */,
|
|
1084
|
+
category: "USER" /* USER */,
|
|
1085
|
+
text: `Tool with id ${id} not found`,
|
|
1086
|
+
details: {
|
|
1087
|
+
status: 404,
|
|
1088
|
+
toolId: String(id),
|
|
1089
|
+
tools: Object.keys(allTools).join(", ")
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
this.#logger?.trackException(error);
|
|
1093
|
+
throw error;
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* Lists all configured tools.
|
|
1097
|
+
*
|
|
1098
|
+
* @example
|
|
1099
|
+
* ```typescript
|
|
1100
|
+
* const mastra = new Mastra({
|
|
1101
|
+
* tools: {
|
|
1102
|
+
* calculator: calculatorTool,
|
|
1103
|
+
* weather: weatherTool
|
|
1104
|
+
* }
|
|
1105
|
+
* });
|
|
1106
|
+
*
|
|
1107
|
+
* const tools = mastra.listTools();
|
|
1108
|
+
* Object.entries(tools || {}).forEach(([name, tool]) => {
|
|
1109
|
+
* console.log(`Tool "${name}":`, tool.id);
|
|
1110
|
+
* });
|
|
1111
|
+
* ```
|
|
1112
|
+
*/
|
|
1113
|
+
listTools() {
|
|
1114
|
+
return this.#tools;
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Adds a new tool to the Mastra instance.
|
|
1118
|
+
*
|
|
1119
|
+
* This method allows dynamic registration of tools after the Mastra instance
|
|
1120
|
+
* has been created.
|
|
1121
|
+
*
|
|
1122
|
+
* @throws {MastraError} When a tool with the same key already exists
|
|
1123
|
+
*
|
|
1124
|
+
* @example
|
|
1125
|
+
* ```typescript
|
|
1126
|
+
* const mastra = new Mastra();
|
|
1127
|
+
* const newTool = createTool({
|
|
1128
|
+
* id: 'calculator-tool',
|
|
1129
|
+
* description: 'Performs calculations'
|
|
1130
|
+
* });
|
|
1131
|
+
* mastra.addTool(newTool); // Uses tool.id as key
|
|
1132
|
+
* // or
|
|
1133
|
+
* mastra.addTool(newTool, 'customKey'); // Uses custom key
|
|
1134
|
+
* ```
|
|
1135
|
+
*/
|
|
1136
|
+
addTool(tool, key) {
|
|
1137
|
+
const toolKey = key || tool.id;
|
|
1138
|
+
const tools = this.#tools;
|
|
1139
|
+
if (tools[toolKey]) {
|
|
1140
|
+
const logger = this.getLogger();
|
|
1141
|
+
logger.debug(`Tool with key ${toolKey} already exists. Skipping addition.`);
|
|
1142
|
+
return;
|
|
1143
|
+
}
|
|
1144
|
+
tools[toolKey] = tool;
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* Retrieves a specific processor by registration key.
|
|
1148
|
+
*
|
|
1149
|
+
* @throws {MastraError} When the specified processor is not found
|
|
1150
|
+
*
|
|
1151
|
+
* @example
|
|
1152
|
+
* ```typescript
|
|
1153
|
+
* const mastra = new Mastra({
|
|
1154
|
+
* processors: {
|
|
1155
|
+
* validator: validatorProcessor,
|
|
1156
|
+
* transformer: transformerProcessor
|
|
1157
|
+
* }
|
|
1158
|
+
* });
|
|
1159
|
+
*
|
|
1160
|
+
* const processor = mastra.getProcessor('validator');
|
|
1161
|
+
* ```
|
|
1162
|
+
*/
|
|
1163
|
+
getProcessor(name) {
|
|
1164
|
+
if (!this.#processors || !this.#processors[name]) {
|
|
1165
|
+
const error = new MastraError({
|
|
1166
|
+
id: "MASTRA_GET_PROCESSOR_BY_NAME_NOT_FOUND",
|
|
1167
|
+
domain: "MASTRA" /* MASTRA */,
|
|
1168
|
+
category: "USER" /* USER */,
|
|
1169
|
+
text: `Processor with name ${String(name)} not found`,
|
|
1170
|
+
details: {
|
|
1171
|
+
status: 404,
|
|
1172
|
+
processorName: String(name),
|
|
1173
|
+
processors: Object.keys(this.#processors ?? {}).join(", ")
|
|
1174
|
+
}
|
|
1175
|
+
});
|
|
1176
|
+
this.#logger?.trackException(error);
|
|
1177
|
+
throw error;
|
|
1178
|
+
}
|
|
1179
|
+
return this.#processors[name];
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* Retrieves a specific processor by its ID.
|
|
1183
|
+
*
|
|
1184
|
+
* @throws {MastraError} When the specified processor is not found
|
|
1185
|
+
*
|
|
1186
|
+
* @example
|
|
1187
|
+
* ```typescript
|
|
1188
|
+
* const mastra = new Mastra({
|
|
1189
|
+
* processors: {
|
|
1190
|
+
* validator: validatorProcessor
|
|
1191
|
+
* }
|
|
1192
|
+
* });
|
|
1193
|
+
*
|
|
1194
|
+
* const processor = mastra.getProcessorById('validator-processor-id');
|
|
1195
|
+
* ```
|
|
1196
|
+
*/
|
|
1197
|
+
getProcessorById(id) {
|
|
1198
|
+
const allProcessors = this.#processors;
|
|
1199
|
+
if (!allProcessors) {
|
|
1200
|
+
throw new MastraError({
|
|
1201
|
+
id: "MASTRA_GET_PROCESSOR_BY_ID_NOT_FOUND",
|
|
1202
|
+
domain: "MASTRA" /* MASTRA */,
|
|
1203
|
+
category: "USER" /* USER */,
|
|
1204
|
+
text: `Processor with id ${id} not found`
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
for (const processor of Object.values(allProcessors)) {
|
|
1208
|
+
if (processor.id === id) {
|
|
1209
|
+
return processor;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
const processorByKey = allProcessors[id];
|
|
1213
|
+
if (processorByKey) {
|
|
1214
|
+
return processorByKey;
|
|
1215
|
+
}
|
|
1216
|
+
const error = new MastraError({
|
|
1217
|
+
id: "MASTRA_GET_PROCESSOR_BY_ID_NOT_FOUND",
|
|
1218
|
+
domain: "MASTRA" /* MASTRA */,
|
|
1219
|
+
category: "USER" /* USER */,
|
|
1220
|
+
text: `Processor with id ${id} not found`,
|
|
1221
|
+
details: {
|
|
1222
|
+
status: 404,
|
|
1223
|
+
processorId: String(id),
|
|
1224
|
+
processors: Object.keys(allProcessors).join(", ")
|
|
1225
|
+
}
|
|
1226
|
+
});
|
|
1227
|
+
this.#logger?.trackException(error);
|
|
1228
|
+
throw error;
|
|
1229
|
+
}
|
|
1230
|
+
/**
|
|
1231
|
+
* Lists all configured processors.
|
|
1232
|
+
*
|
|
1233
|
+
* @example
|
|
1234
|
+
* ```typescript
|
|
1235
|
+
* const mastra = new Mastra({
|
|
1236
|
+
* processors: {
|
|
1237
|
+
* validator: validatorProcessor,
|
|
1238
|
+
* transformer: transformerProcessor
|
|
1239
|
+
* }
|
|
1240
|
+
* });
|
|
1241
|
+
*
|
|
1242
|
+
* const processors = mastra.listProcessors();
|
|
1243
|
+
* Object.entries(processors || {}).forEach(([name, processor]) => {
|
|
1244
|
+
* console.log(`Processor "${name}":`, processor.id);
|
|
1245
|
+
* });
|
|
1246
|
+
* ```
|
|
1247
|
+
*/
|
|
1248
|
+
listProcessors() {
|
|
1249
|
+
return this.#processors;
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* Adds a new processor to the Mastra instance.
|
|
1253
|
+
*
|
|
1254
|
+
* This method allows dynamic registration of processors after the Mastra instance
|
|
1255
|
+
* has been created.
|
|
1256
|
+
*
|
|
1257
|
+
* @throws {MastraError} When a processor with the same key already exists
|
|
1258
|
+
*
|
|
1259
|
+
* @example
|
|
1260
|
+
* ```typescript
|
|
1261
|
+
* const mastra = new Mastra();
|
|
1262
|
+
* const newProcessor = {
|
|
1263
|
+
* id: 'text-processor',
|
|
1264
|
+
* processInput: async (messages) => messages
|
|
1265
|
+
* };
|
|
1266
|
+
* mastra.addProcessor(newProcessor); // Uses processor.id as key
|
|
1267
|
+
* // or
|
|
1268
|
+
* mastra.addProcessor(newProcessor, 'customKey'); // Uses custom key
|
|
1269
|
+
* ```
|
|
1270
|
+
*/
|
|
1271
|
+
addProcessor(processor, key) {
|
|
1272
|
+
const processorKey = key || processor.id;
|
|
1273
|
+
const processors = this.#processors;
|
|
1274
|
+
if (processors[processorKey]) {
|
|
1275
|
+
const logger = this.getLogger();
|
|
1276
|
+
logger.debug(`Processor with key ${processorKey} already exists. Skipping addition.`);
|
|
1277
|
+
return;
|
|
1278
|
+
}
|
|
1279
|
+
processors[processorKey] = processor;
|
|
1280
|
+
}
|
|
1106
1281
|
/**
|
|
1107
1282
|
* Returns all registered workflows as a record keyed by their IDs.
|
|
1108
1283
|
*
|
|
@@ -1116,7 +1291,7 @@ do:
|
|
|
1116
1291
|
* }
|
|
1117
1292
|
* });
|
|
1118
1293
|
*
|
|
1119
|
-
* const allWorkflows = mastra.
|
|
1294
|
+
* const allWorkflows = mastra.listWorkflows();
|
|
1120
1295
|
* console.log(Object.keys(allWorkflows)); // ['dataProcessor', 'emailSender', 'reportGenerator']
|
|
1121
1296
|
*
|
|
1122
1297
|
* // Execute all workflows with sample data
|
|
@@ -1126,19 +1301,52 @@ do:
|
|
|
1126
1301
|
* }
|
|
1127
1302
|
* ```
|
|
1128
1303
|
*/
|
|
1129
|
-
|
|
1304
|
+
listWorkflows(props = {}) {
|
|
1130
1305
|
if (props.serialized) {
|
|
1131
1306
|
return Object.entries(this.#workflows).reduce((acc, [k, v]) => {
|
|
1132
1307
|
return {
|
|
1133
1308
|
...acc,
|
|
1134
|
-
[k]: {
|
|
1135
|
-
name: v.name
|
|
1136
|
-
}
|
|
1309
|
+
[k]: { name: v.name }
|
|
1137
1310
|
};
|
|
1138
1311
|
}, {});
|
|
1139
1312
|
}
|
|
1140
1313
|
return this.#workflows;
|
|
1141
1314
|
}
|
|
1315
|
+
/**
|
|
1316
|
+
* Adds a new workflow to the Mastra instance.
|
|
1317
|
+
*
|
|
1318
|
+
* This method allows dynamic registration of workflows after the Mastra instance
|
|
1319
|
+
* has been created. The workflow will be initialized with Mastra and primitives.
|
|
1320
|
+
*
|
|
1321
|
+
* @throws {MastraError} When a workflow with the same key already exists
|
|
1322
|
+
*
|
|
1323
|
+
* @example
|
|
1324
|
+
* ```typescript
|
|
1325
|
+
* const mastra = new Mastra();
|
|
1326
|
+
* const newWorkflow = createWorkflow({
|
|
1327
|
+
* id: 'data-pipeline',
|
|
1328
|
+
* name: 'Data Pipeline'
|
|
1329
|
+
* }).commit();
|
|
1330
|
+
* mastra.addWorkflow(newWorkflow); // Uses workflow.id as key
|
|
1331
|
+
* // or
|
|
1332
|
+
* mastra.addWorkflow(newWorkflow, 'customKey'); // Uses custom key
|
|
1333
|
+
* ```
|
|
1334
|
+
*/
|
|
1335
|
+
addWorkflow(workflow, key) {
|
|
1336
|
+
const workflowKey = key || workflow.id;
|
|
1337
|
+
const workflows = this.#workflows;
|
|
1338
|
+
if (workflows[workflowKey]) {
|
|
1339
|
+
const logger = this.getLogger();
|
|
1340
|
+
logger.debug(`Workflow with key ${workflowKey} already exists. Skipping addition.`);
|
|
1341
|
+
return;
|
|
1342
|
+
}
|
|
1343
|
+
workflow.__registerMastra(this);
|
|
1344
|
+
workflow.__registerPrimitives({
|
|
1345
|
+
logger: this.getLogger(),
|
|
1346
|
+
storage: this.getStorage()
|
|
1347
|
+
});
|
|
1348
|
+
workflows[workflowKey] = workflow;
|
|
1349
|
+
}
|
|
1142
1350
|
/**
|
|
1143
1351
|
* Sets the storage provider for the Mastra instance.
|
|
1144
1352
|
*
|
|
@@ -1153,6 +1361,7 @@ do:
|
|
|
1153
1361
|
*
|
|
1154
1362
|
* // Now agents can use memory with the storage
|
|
1155
1363
|
* const agent = new Agent({
|
|
1364
|
+
* id: 'assistant',
|
|
1156
1365
|
* name: 'assistant',
|
|
1157
1366
|
* memory: new Memory({ storage: mastra.getStorage() })
|
|
1158
1367
|
* });
|
|
@@ -1161,23 +1370,18 @@ do:
|
|
|
1161
1370
|
setStorage(storage) {
|
|
1162
1371
|
this.#storage = augmentWithInit(storage);
|
|
1163
1372
|
}
|
|
1164
|
-
setLogger({
|
|
1165
|
-
logger
|
|
1166
|
-
}) {
|
|
1373
|
+
setLogger({ logger }) {
|
|
1167
1374
|
this.#logger = logger;
|
|
1168
1375
|
if (this.#agents) {
|
|
1169
|
-
Object.keys(this.#agents).forEach(key => {
|
|
1376
|
+
Object.keys(this.#agents).forEach((key) => {
|
|
1170
1377
|
this.#agents?.[key]?.__setLogger(this.#logger);
|
|
1171
1378
|
});
|
|
1172
1379
|
}
|
|
1173
|
-
if (this.#memory) {
|
|
1174
|
-
this.#memory.__setLogger(this.#logger);
|
|
1175
|
-
}
|
|
1176
1380
|
if (this.#deployer) {
|
|
1177
1381
|
this.#deployer.__setLogger(this.#logger);
|
|
1178
1382
|
}
|
|
1179
1383
|
if (this.#tts) {
|
|
1180
|
-
Object.keys(this.#tts).forEach(key => {
|
|
1384
|
+
Object.keys(this.#tts).forEach((key) => {
|
|
1181
1385
|
this.#tts?.[key]?.__setLogger(this.#logger);
|
|
1182
1386
|
});
|
|
1183
1387
|
}
|
|
@@ -1185,71 +1389,16 @@ do:
|
|
|
1185
1389
|
this.#storage.__setLogger(this.#logger);
|
|
1186
1390
|
}
|
|
1187
1391
|
if (this.#vectors) {
|
|
1188
|
-
Object.keys(this.#vectors).forEach(key => {
|
|
1392
|
+
Object.keys(this.#vectors).forEach((key) => {
|
|
1189
1393
|
this.#vectors?.[key]?.__setLogger(this.#logger);
|
|
1190
1394
|
});
|
|
1191
1395
|
}
|
|
1192
1396
|
if (this.#mcpServers) {
|
|
1193
|
-
Object.keys(this.#mcpServers).forEach(key => {
|
|
1397
|
+
Object.keys(this.#mcpServers).forEach((key) => {
|
|
1194
1398
|
this.#mcpServers?.[key]?.__setLogger(this.#logger);
|
|
1195
1399
|
});
|
|
1196
1400
|
}
|
|
1197
|
-
|
|
1198
|
-
allTracingInstances.forEach(instance => {
|
|
1199
|
-
instance.__setLogger(this.#logger);
|
|
1200
|
-
});
|
|
1201
|
-
}
|
|
1202
|
-
setTelemetry(telemetry) {
|
|
1203
|
-
this.#telemetry = Telemetry.init(telemetry);
|
|
1204
|
-
if (this.#agents) {
|
|
1205
|
-
Object.keys(this.#agents).forEach(key => {
|
|
1206
|
-
if (this.#telemetry) {
|
|
1207
|
-
this.#agents?.[key]?.__setTelemetry(this.#telemetry);
|
|
1208
|
-
}
|
|
1209
|
-
});
|
|
1210
|
-
}
|
|
1211
|
-
if (this.#memory) {
|
|
1212
|
-
this.#memory = this.#telemetry.traceClass(this.#memory, {
|
|
1213
|
-
excludeMethods: ["__setTelemetry", "__getTelemetry"]
|
|
1214
|
-
});
|
|
1215
|
-
this.#memory.__setTelemetry(this.#telemetry);
|
|
1216
|
-
}
|
|
1217
|
-
if (this.#deployer) {
|
|
1218
|
-
this.#deployer = this.#telemetry.traceClass(this.#deployer, {
|
|
1219
|
-
excludeMethods: ["__setTelemetry", "__getTelemetry"]
|
|
1220
|
-
});
|
|
1221
|
-
this.#deployer.__setTelemetry(this.#telemetry);
|
|
1222
|
-
}
|
|
1223
|
-
if (this.#tts) {
|
|
1224
|
-
let tts = {};
|
|
1225
|
-
Object.entries(this.#tts).forEach(([key, ttsCl]) => {
|
|
1226
|
-
if (this.#telemetry) {
|
|
1227
|
-
tts[key] = this.#telemetry.traceClass(ttsCl, {
|
|
1228
|
-
excludeMethods: ["__setTelemetry", "__getTelemetry"]
|
|
1229
|
-
});
|
|
1230
|
-
tts[key].__setTelemetry(this.#telemetry);
|
|
1231
|
-
}
|
|
1232
|
-
});
|
|
1233
|
-
this.#tts = tts;
|
|
1234
|
-
}
|
|
1235
|
-
if (this.#storage) {
|
|
1236
|
-
this.#storage = this.#telemetry.traceClass(this.#storage, {
|
|
1237
|
-
excludeMethods: ["__setTelemetry", "__getTelemetry"]
|
|
1238
|
-
});
|
|
1239
|
-
this.#storage.__setTelemetry(this.#telemetry);
|
|
1240
|
-
}
|
|
1241
|
-
if (this.#vectors) {
|
|
1242
|
-
let vectors = {};
|
|
1243
|
-
Object.entries(this.#vectors).forEach(([key, vector]) => {
|
|
1244
|
-
if (this.#telemetry) {
|
|
1245
|
-
vectors[key] = this.#telemetry.traceClass(vector, {
|
|
1246
|
-
excludeMethods: ["__setTelemetry", "__getTelemetry"]
|
|
1247
|
-
});
|
|
1248
|
-
vectors[key].__setTelemetry(this.#telemetry);
|
|
1249
|
-
}
|
|
1250
|
-
});
|
|
1251
|
-
this.#vectors = vectors;
|
|
1252
|
-
}
|
|
1401
|
+
this.#observability.setLogger({ logger: this.#logger });
|
|
1253
1402
|
}
|
|
1254
1403
|
/**
|
|
1255
1404
|
* Gets all registered text-to-speech (TTS) providers.
|
|
@@ -1295,67 +1444,18 @@ do:
|
|
|
1295
1444
|
getLogger() {
|
|
1296
1445
|
return this.#logger;
|
|
1297
1446
|
}
|
|
1298
|
-
/**
|
|
1299
|
-
* Gets the currently configured telemetry instance.
|
|
1300
|
-
*
|
|
1301
|
-
* @example
|
|
1302
|
-
* ```typescript
|
|
1303
|
-
* const mastra = new Mastra({
|
|
1304
|
-
* telemetry: {
|
|
1305
|
-
* enabled: true,
|
|
1306
|
-
* serviceName: 'my-mastra-app'
|
|
1307
|
-
* }
|
|
1308
|
-
* });
|
|
1309
|
-
*
|
|
1310
|
-
* const telemetry = mastra.getTelemetry();
|
|
1311
|
-
* if (telemetry) {
|
|
1312
|
-
* const span = telemetry.startSpan('custom-operation');
|
|
1313
|
-
* span.setAttributes({ operation: 'data-processing' });
|
|
1314
|
-
* span.end();
|
|
1315
|
-
* }
|
|
1316
|
-
* ```
|
|
1317
|
-
*
|
|
1318
|
-
* @deprecated use {@link getAITracing()} instead
|
|
1319
|
-
*/
|
|
1320
|
-
getTelemetry() {
|
|
1321
|
-
return this.#telemetry;
|
|
1322
|
-
}
|
|
1323
|
-
/**
|
|
1324
|
-
* Gets the currently configured memory instance.
|
|
1325
|
-
*
|
|
1326
|
-
* @deprecated Memory should be configured directly on agents instead of on the Mastra instance.
|
|
1327
|
-
* Use `new Agent({ memory: new Memory() })` instead.
|
|
1328
|
-
*
|
|
1329
|
-
* @example Legacy memory usage (deprecated)
|
|
1330
|
-
* ```typescript
|
|
1331
|
-
* // This approach is deprecated
|
|
1332
|
-
* const mastra = new Mastra({
|
|
1333
|
-
* // memory: new Memory() // This is no longer supported
|
|
1334
|
-
* });
|
|
1335
|
-
*
|
|
1336
|
-
* // Use this instead:
|
|
1337
|
-
* const agent = new Agent({
|
|
1338
|
-
* name: 'assistant',
|
|
1339
|
-
* memory: new Memory({
|
|
1340
|
-
* storage: new LibSQLStore({ url: ':memory:' })
|
|
1341
|
-
* })
|
|
1342
|
-
* });
|
|
1343
|
-
* ```
|
|
1344
|
-
*/
|
|
1345
|
-
getMemory() {
|
|
1346
|
-
return this.#memory;
|
|
1347
|
-
}
|
|
1348
1447
|
/**
|
|
1349
1448
|
* Gets the currently configured storage provider.
|
|
1350
1449
|
*
|
|
1351
1450
|
* @example
|
|
1352
1451
|
* ```typescript
|
|
1353
1452
|
* const mastra = new Mastra({
|
|
1354
|
-
* storage: new LibSQLStore({ url: 'file:./data.db' })
|
|
1453
|
+
* storage: new LibSQLStore({ id: 'mastra-storage', url: 'file:./data.db' })
|
|
1355
1454
|
* });
|
|
1356
1455
|
*
|
|
1357
1456
|
* // Use the storage in agent memory
|
|
1358
1457
|
* const agent = new Agent({
|
|
1458
|
+
* id: 'assistant',
|
|
1359
1459
|
* name: 'assistant',
|
|
1360
1460
|
* memory: new Memory({
|
|
1361
1461
|
* storage: mastra.getStorage()
|
|
@@ -1366,6 +1466,9 @@ do:
|
|
|
1366
1466
|
getStorage() {
|
|
1367
1467
|
return this.#storage;
|
|
1368
1468
|
}
|
|
1469
|
+
get observability() {
|
|
1470
|
+
return this.#observability;
|
|
1471
|
+
}
|
|
1369
1472
|
getServerMiddleware() {
|
|
1370
1473
|
return this.#serverMiddleware;
|
|
1371
1474
|
}
|
|
@@ -1374,10 +1477,12 @@ do:
|
|
|
1374
1477
|
}
|
|
1375
1478
|
setServerMiddleware(serverMiddleware) {
|
|
1376
1479
|
if (typeof serverMiddleware === "function") {
|
|
1377
|
-
this.#serverMiddleware = [
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1480
|
+
this.#serverMiddleware = [
|
|
1481
|
+
{
|
|
1482
|
+
handler: serverMiddleware,
|
|
1483
|
+
path: "/api/*"
|
|
1484
|
+
}
|
|
1485
|
+
];
|
|
1381
1486
|
return;
|
|
1382
1487
|
}
|
|
1383
1488
|
if (!Array.isArray(serverMiddleware)) {
|
|
@@ -1390,7 +1495,7 @@ do:
|
|
|
1390
1495
|
this.#logger?.trackException(error);
|
|
1391
1496
|
throw error;
|
|
1392
1497
|
}
|
|
1393
|
-
this.#serverMiddleware = serverMiddleware.map(m => {
|
|
1498
|
+
this.#serverMiddleware = serverMiddleware.map((m) => {
|
|
1394
1499
|
if (typeof m === "function") {
|
|
1395
1500
|
return {
|
|
1396
1501
|
handler: m,
|
|
@@ -1409,7 +1514,7 @@ do:
|
|
|
1409
1514
|
getBundlerConfig() {
|
|
1410
1515
|
return this.#bundler;
|
|
1411
1516
|
}
|
|
1412
|
-
async
|
|
1517
|
+
async listLogsByRunId({
|
|
1413
1518
|
runId,
|
|
1414
1519
|
transportId,
|
|
1415
1520
|
fromDate,
|
|
@@ -1421,7 +1526,7 @@ do:
|
|
|
1421
1526
|
}) {
|
|
1422
1527
|
if (!transportId) {
|
|
1423
1528
|
const error = new MastraError({
|
|
1424
|
-
id: "
|
|
1529
|
+
id: "MASTRA_LIST_LOGS_BY_RUN_ID_MISSING_TRANSPORT",
|
|
1425
1530
|
domain: "MASTRA" /* MASTRA */,
|
|
1426
1531
|
category: "USER" /* USER */,
|
|
1427
1532
|
text: "Transport ID is required",
|
|
@@ -1433,12 +1538,12 @@ do:
|
|
|
1433
1538
|
this.#logger?.trackException(error);
|
|
1434
1539
|
throw error;
|
|
1435
1540
|
}
|
|
1436
|
-
if (!this.#logger?.
|
|
1541
|
+
if (!this.#logger?.listLogsByRunId) {
|
|
1437
1542
|
const error = new MastraError({
|
|
1438
1543
|
id: "MASTRA_GET_LOGS_BY_RUN_ID_LOGGER_NOT_CONFIGURED",
|
|
1439
1544
|
domain: "MASTRA" /* MASTRA */,
|
|
1440
1545
|
category: "SYSTEM" /* SYSTEM */,
|
|
1441
|
-
text: "Logger is not configured or does not support
|
|
1546
|
+
text: "Logger is not configured or does not support listLogsByRunId operation",
|
|
1442
1547
|
details: {
|
|
1443
1548
|
runId,
|
|
1444
1549
|
transportId
|
|
@@ -1447,7 +1552,7 @@ do:
|
|
|
1447
1552
|
this.#logger?.trackException(error);
|
|
1448
1553
|
throw error;
|
|
1449
1554
|
}
|
|
1450
|
-
return await this.#logger.
|
|
1555
|
+
return await this.#logger.listLogsByRunId({
|
|
1451
1556
|
runId,
|
|
1452
1557
|
transportId,
|
|
1453
1558
|
fromDate,
|
|
@@ -1458,7 +1563,7 @@ do:
|
|
|
1458
1563
|
perPage
|
|
1459
1564
|
});
|
|
1460
1565
|
}
|
|
1461
|
-
async
|
|
1566
|
+
async listLogs(transportId, params) {
|
|
1462
1567
|
if (!transportId) {
|
|
1463
1568
|
const error = new MastraError({
|
|
1464
1569
|
id: "MASTRA_GET_LOGS_MISSING_TRANSPORT",
|
|
@@ -1484,7 +1589,7 @@ do:
|
|
|
1484
1589
|
});
|
|
1485
1590
|
throw error;
|
|
1486
1591
|
}
|
|
1487
|
-
return await this.#logger.
|
|
1592
|
+
return await this.#logger.listLogs(transportId, params);
|
|
1488
1593
|
}
|
|
1489
1594
|
/**
|
|
1490
1595
|
* Gets all registered Model Context Protocol (MCP) server instances.
|
|
@@ -1502,13 +1607,83 @@ do:
|
|
|
1502
1607
|
* const mcpServers = mastra.getMCPServers();
|
|
1503
1608
|
* if (mcpServers) {
|
|
1504
1609
|
* const fsServer = mcpServers.filesystem;
|
|
1505
|
-
* const tools = await fsServer.
|
|
1610
|
+
* const tools = await fsServer.listTools();
|
|
1506
1611
|
* }
|
|
1507
1612
|
* ```
|
|
1508
1613
|
*/
|
|
1509
|
-
|
|
1614
|
+
listMCPServers() {
|
|
1510
1615
|
return this.#mcpServers;
|
|
1511
1616
|
}
|
|
1617
|
+
/**
|
|
1618
|
+
* Adds a new MCP server to the Mastra instance.
|
|
1619
|
+
*
|
|
1620
|
+
* This method allows dynamic registration of MCP servers after the Mastra instance
|
|
1621
|
+
* has been created. The server will be initialized with ID, Mastra instance, and logger.
|
|
1622
|
+
*
|
|
1623
|
+
* @throws {MastraError} When an MCP server with the same key already exists
|
|
1624
|
+
*
|
|
1625
|
+
* @example
|
|
1626
|
+
* ```typescript
|
|
1627
|
+
* const mastra = new Mastra();
|
|
1628
|
+
* const newServer = new FileSystemMCPServer({
|
|
1629
|
+
* rootPath: '/data'
|
|
1630
|
+
* });
|
|
1631
|
+
* mastra.addMCPServer(newServer); // Uses server.id as key
|
|
1632
|
+
* // or
|
|
1633
|
+
* mastra.addMCPServer(newServer, 'customKey'); // Uses custom key
|
|
1634
|
+
* ```
|
|
1635
|
+
*/
|
|
1636
|
+
addMCPServer(server, key) {
|
|
1637
|
+
if (key) {
|
|
1638
|
+
server.setId(key);
|
|
1639
|
+
}
|
|
1640
|
+
const resolvedId = server.id;
|
|
1641
|
+
if (!resolvedId) {
|
|
1642
|
+
const error = new MastraError({
|
|
1643
|
+
id: "MASTRA_ADD_MCP_SERVER_MISSING_ID",
|
|
1644
|
+
domain: "MASTRA" /* MASTRA */,
|
|
1645
|
+
category: "USER" /* USER */,
|
|
1646
|
+
text: "MCP server must expose an id or be registered under one",
|
|
1647
|
+
details: { status: 400 }
|
|
1648
|
+
});
|
|
1649
|
+
this.#logger?.trackException(error);
|
|
1650
|
+
throw error;
|
|
1651
|
+
}
|
|
1652
|
+
const serverKey = key ?? resolvedId;
|
|
1653
|
+
const servers = this.#mcpServers;
|
|
1654
|
+
if (servers[serverKey]) {
|
|
1655
|
+
const logger = this.getLogger();
|
|
1656
|
+
logger.debug(`MCP server with key ${serverKey} already exists. Skipping addition.`);
|
|
1657
|
+
return;
|
|
1658
|
+
}
|
|
1659
|
+
server.__registerMastra(this);
|
|
1660
|
+
server.__setLogger(this.getLogger());
|
|
1661
|
+
servers[serverKey] = server;
|
|
1662
|
+
}
|
|
1663
|
+
/**
|
|
1664
|
+
* Retrieves a specific MCP server instance by registration key.
|
|
1665
|
+
*
|
|
1666
|
+
* @throws {MastraError} When the specified MCP server is not found
|
|
1667
|
+
*
|
|
1668
|
+
* @example
|
|
1669
|
+
* ```typescript
|
|
1670
|
+
* const mastra = new Mastra({
|
|
1671
|
+
* mcpServers: {
|
|
1672
|
+
* filesystem: new FileSystemMCPServer({...})
|
|
1673
|
+
* }
|
|
1674
|
+
* });
|
|
1675
|
+
*
|
|
1676
|
+
* const fsServer = mastra.getMCPServer('filesystem');
|
|
1677
|
+
* const tools = await fsServer.listTools();
|
|
1678
|
+
* ```
|
|
1679
|
+
*/
|
|
1680
|
+
getMCPServer(name) {
|
|
1681
|
+
if (!this.#mcpServers || !this.#mcpServers[name]) {
|
|
1682
|
+
this.#logger?.debug(`MCP server with name ${String(name)} not found`);
|
|
1683
|
+
return void 0;
|
|
1684
|
+
}
|
|
1685
|
+
return this.#mcpServers[name];
|
|
1686
|
+
}
|
|
1512
1687
|
/**
|
|
1513
1688
|
* Retrieves a specific Model Context Protocol (MCP) server instance by its logical ID.
|
|
1514
1689
|
*
|
|
@@ -1528,24 +1703,24 @@ do:
|
|
|
1528
1703
|
* }
|
|
1529
1704
|
* });
|
|
1530
1705
|
*
|
|
1531
|
-
* const fsServer = mastra.
|
|
1706
|
+
* const fsServer = mastra.getMCPServerById('fs-server');
|
|
1532
1707
|
* if (fsServer) {
|
|
1533
|
-
* const tools = await fsServer.
|
|
1708
|
+
* const tools = await fsServer.listTools();
|
|
1534
1709
|
* }
|
|
1535
1710
|
* ```
|
|
1536
1711
|
*/
|
|
1537
|
-
|
|
1712
|
+
getMCPServerById(serverId, version) {
|
|
1538
1713
|
if (!this.#mcpServers) {
|
|
1539
1714
|
return void 0;
|
|
1540
1715
|
}
|
|
1541
1716
|
const allRegisteredServers = Object.values(this.#mcpServers || {});
|
|
1542
|
-
const matchingLogicalIdServers = allRegisteredServers.filter(server => server.id === serverId);
|
|
1717
|
+
const matchingLogicalIdServers = allRegisteredServers.filter((server) => server.id === serverId);
|
|
1543
1718
|
if (matchingLogicalIdServers.length === 0) {
|
|
1544
1719
|
this.#logger?.debug(`No MCP servers found with logical ID: ${serverId}`);
|
|
1545
1720
|
return void 0;
|
|
1546
1721
|
}
|
|
1547
1722
|
if (version) {
|
|
1548
|
-
const specificVersionServer = matchingLogicalIdServers.find(server => server.version === version);
|
|
1723
|
+
const specificVersionServer = matchingLogicalIdServers.find((server) => server.version === version);
|
|
1549
1724
|
if (!specificVersionServer) {
|
|
1550
1725
|
this.#logger?.debug(`MCP server with logical ID '${serverId}' found, but not version '${version}'.`);
|
|
1551
1726
|
}
|
|
@@ -1568,7 +1743,9 @@ do:
|
|
|
1568
1743
|
return latestServer;
|
|
1569
1744
|
}
|
|
1570
1745
|
}
|
|
1571
|
-
this.#logger?.warn(
|
|
1746
|
+
this.#logger?.warn(
|
|
1747
|
+
`Could not determine the latest server for logical ID '${serverId}' due to invalid or missing release dates, or no servers left after filtering.`
|
|
1748
|
+
);
|
|
1572
1749
|
return void 0;
|
|
1573
1750
|
}
|
|
1574
1751
|
}
|
|
@@ -1605,7 +1782,7 @@ do:
|
|
|
1605
1782
|
* Gracefully shuts down the Mastra instance and cleans up all resources.
|
|
1606
1783
|
*
|
|
1607
1784
|
* This method performs a clean shutdown of all Mastra components, including:
|
|
1608
|
-
* -
|
|
1785
|
+
* - tracing registry and all tracing instances
|
|
1609
1786
|
* - Event engine and pub/sub system
|
|
1610
1787
|
* - All registered components and their resources
|
|
1611
1788
|
*
|
|
@@ -1627,8 +1804,8 @@ do:
|
|
|
1627
1804
|
* ```
|
|
1628
1805
|
*/
|
|
1629
1806
|
async shutdown() {
|
|
1630
|
-
await shutdownAITracingRegistry();
|
|
1631
1807
|
await this.stopEventEngine();
|
|
1808
|
+
await this.#observability.shutdown();
|
|
1632
1809
|
this.#logger?.info("Mastra shutdown completed");
|
|
1633
1810
|
}
|
|
1634
1811
|
// This method is only used internally for server hnadlers that require temporary persistence
|
|
@@ -1636,13 +1813,7 @@ do:
|
|
|
1636
1813
|
return this.#serverCache;
|
|
1637
1814
|
}
|
|
1638
1815
|
};
|
|
1639
|
-
Mastra = /*@__PURE__*/(_ => {
|
|
1640
|
-
_init = __decoratorStart(null);
|
|
1641
|
-
Mastra = __decorateElement(_init, 0, "Mastra", _Mastra_decorators, Mastra);
|
|
1642
|
-
__runInitializers(_init, 1, Mastra);
|
|
1643
|
-
return Mastra;
|
|
1644
|
-
})();
|
|
1645
1816
|
|
|
1646
1817
|
export { Mastra };
|
|
1647
|
-
//# sourceMappingURL=chunk-
|
|
1648
|
-
//# sourceMappingURL=chunk-
|
|
1818
|
+
//# sourceMappingURL=chunk-7SKXKUYT.js.map
|
|
1819
|
+
//# sourceMappingURL=chunk-7SKXKUYT.js.map
|