@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
package/dist/agent/agent.d.ts
CHANGED
|
@@ -1,38 +1,28 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { CoreMessage, StreamObjectResult, UIMessage } from 'ai';
|
|
1
|
+
import type { UIMessage, StreamObjectResult } from '../ai-sdk.types.d.ts';
|
|
3
2
|
import type { JSONSchema7 } from 'json-schema';
|
|
4
3
|
import { z } from 'zod';
|
|
5
4
|
import type { ZodSchema } from 'zod';
|
|
6
5
|
import type { MastraPrimitives } from '../action/index.js';
|
|
7
|
-
import { AISpanType } from '../ai-tracing/index.js';
|
|
8
|
-
import type { AISpan, TracingContext, TracingOptions, TracingProperties } from '../ai-tracing/index.js';
|
|
9
6
|
import { MastraBase } from '../base.js';
|
|
10
|
-
import type {
|
|
7
|
+
import type { MastraScorers, MastraScorer } from '../evals/index.js';
|
|
11
8
|
import { MastraLLMV1 } from '../llm/model/index.js';
|
|
12
9
|
import type { GenerateObjectResult, GenerateTextResult, StreamTextResult } from '../llm/model/base.types.js';
|
|
13
10
|
import { MastraLLMVNext } from '../llm/model/model.loop.js';
|
|
14
11
|
import type { MastraLanguageModel, MastraModelConfig } from '../llm/model/shared.types.js';
|
|
15
12
|
import type { Mastra } from '../mastra/index.js';
|
|
16
13
|
import type { MastraMemory } from '../memory/memory.js';
|
|
17
|
-
import type {
|
|
14
|
+
import type { TracingContext, TracingProperties } from '../observability/index.js';
|
|
18
15
|
import type { InputProcessor, OutputProcessor } from '../processors/index.js';
|
|
19
|
-
import {
|
|
20
|
-
import type { ScorerRunInputForAgent, ScorerRunOutputForAgent, MastraScorers, MastraScorer } from '../scores/index.js';
|
|
21
|
-
import type { AISDKV5OutputStream } from '../stream/index.js';
|
|
16
|
+
import { RequestContext } from '../request-context/index.js';
|
|
22
17
|
import type { MastraModelOutput } from '../stream/base/output.js';
|
|
23
18
|
import type { OutputSchema } from '../stream/base/schema.js';
|
|
24
|
-
import type { ChunkType } from '../stream/types.js';
|
|
25
|
-
import type { CoreTool } from '../tools/types.js';
|
|
26
19
|
import type { DynamicArgument } from '../types/index.js';
|
|
27
20
|
import type { CompositeVoice } from '../voice/index.js';
|
|
28
21
|
import { DefaultVoice } from '../voice/index.js';
|
|
29
22
|
import type { Workflow } from '../workflows/index.js';
|
|
30
|
-
import {
|
|
31
|
-
import type { AgentExecutionOptions, DeprecatedOutputOptions, MultiPrimitiveExecutionOptions } from './agent.types.js';
|
|
32
|
-
import { MessageList } from './message-list/index.js';
|
|
23
|
+
import type { AgentExecutionOptions, MultiPrimitiveExecutionOptions } from './agent.types.js';
|
|
33
24
|
import type { MessageInput, MessageListInput, UIMessageWithMetadata } from './message-list/index.js';
|
|
34
|
-
import {
|
|
35
|
-
import type { AgentConfig, AgentGenerateOptions, AgentStreamOptions, ToolsetsInput, ToolsInput, AgentModelManagerConfig, AgentInstructions } from './types.js';
|
|
25
|
+
import type { AgentConfig, AgentGenerateOptions, AgentStreamOptions, ToolsInput, AgentModelManagerConfig, AgentInstructions } from './types.js';
|
|
36
26
|
export type MastraLLM = MastraLLMV1 | MastraLLMVNext;
|
|
37
27
|
type ModelFallbacks = {
|
|
38
28
|
id: string;
|
|
@@ -50,7 +40,8 @@ type ModelFallbacks = {
|
|
|
50
40
|
* import { Memory } from '@mastra/memory';
|
|
51
41
|
*
|
|
52
42
|
* const agent = new Agent({
|
|
53
|
-
*
|
|
43
|
+
* id: 'my-agent',
|
|
44
|
+
* name: 'My Agent',
|
|
54
45
|
* instructions: 'You are a helpful assistant',
|
|
55
46
|
* model: 'openai/gpt-5',
|
|
56
47
|
* tools: {
|
|
@@ -60,13 +51,12 @@ type ModelFallbacks = {
|
|
|
60
51
|
* });
|
|
61
52
|
* ```
|
|
62
53
|
*/
|
|
63
|
-
export declare class Agent<TAgentId extends string = string, TTools extends ToolsInput = ToolsInput
|
|
54
|
+
export declare class Agent<TAgentId extends string = string, TTools extends ToolsInput = ToolsInput> extends MastraBase {
|
|
64
55
|
#private;
|
|
65
56
|
id: TAgentId;
|
|
66
57
|
name: TAgentId;
|
|
67
58
|
model: DynamicArgument<MastraModelConfig> | ModelFallbacks;
|
|
68
59
|
maxRetries?: number;
|
|
69
|
-
evals: TMetrics;
|
|
70
60
|
private _agentNetworkAppend;
|
|
71
61
|
/**
|
|
72
62
|
* Creates a new Agent instance with the specified configuration.
|
|
@@ -77,7 +67,8 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
77
67
|
* import { Memory } from '@mastra/memory';
|
|
78
68
|
*
|
|
79
69
|
* const agent = new Agent({
|
|
80
|
-
*
|
|
70
|
+
* id: 'weatherAgent',
|
|
71
|
+
* name: 'Weather Agent',
|
|
81
72
|
* instructions: 'You help users with weather information',
|
|
82
73
|
* model: 'openai/gpt-5',
|
|
83
74
|
* tools: { getWeather },
|
|
@@ -86,8 +77,8 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
86
77
|
* });
|
|
87
78
|
* ```
|
|
88
79
|
*/
|
|
89
|
-
constructor(config: AgentConfig<TAgentId, TTools
|
|
90
|
-
getMastraInstance(): Mastra<Record<string, Agent<any, ToolsInput
|
|
80
|
+
constructor(config: AgentConfig<TAgentId, TTools>);
|
|
81
|
+
getMastraInstance(): Mastra<Record<string, Agent<any, ToolsInput>>, Record<string, Workflow<any, any, any, any, any, any, any>>, Record<string, import("../vector").MastraVector<import("../vector/filter").VectorFilter>>, Record<string, import("../tts").MastraTTS>, import("../logger").IMastraLogger, Record<string, import("../mcp").MCPServerBase>, Record<string, MastraScorer<any, any, any, any>>, Record<string, import("../tools").ToolAction<any, any, any, any, import("../tools").ToolExecutionContext<any, any>>>, Record<string, import("../processors/index").Processor>> | undefined;
|
|
91
82
|
/**
|
|
92
83
|
* Returns the agents configured for this agent, resolving function-based agents if necessary.
|
|
93
84
|
* Used in multi-agent collaboration scenarios where this agent can delegate to other agents.
|
|
@@ -98,9 +89,9 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
98
89
|
* console.log(Object.keys(agents)); // ['agent1', 'agent2']
|
|
99
90
|
* ```
|
|
100
91
|
*/
|
|
101
|
-
listAgents({
|
|
102
|
-
|
|
103
|
-
}): Record<string, Agent<string, ToolsInput
|
|
92
|
+
listAgents({ requestContext }?: {
|
|
93
|
+
requestContext?: RequestContext;
|
|
94
|
+
}): Record<string, Agent<string, ToolsInput>> | Promise<Record<string, Agent<string, ToolsInput>>>;
|
|
104
95
|
/**
|
|
105
96
|
* Creates and returns a ProcessorRunner with resolved input/output processors.
|
|
106
97
|
* @internal
|
|
@@ -110,20 +101,20 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
110
101
|
* Resolves and returns output processors from agent configuration.
|
|
111
102
|
* @internal
|
|
112
103
|
*/
|
|
113
|
-
private
|
|
104
|
+
private listResolvedOutputProcessors;
|
|
114
105
|
/**
|
|
115
106
|
* Resolves and returns input processors from agent configuration.
|
|
116
107
|
* @internal
|
|
117
108
|
*/
|
|
118
|
-
private
|
|
109
|
+
private listResolvedInputProcessors;
|
|
119
110
|
/**
|
|
120
111
|
* Returns the input processors for this agent, resolving function-based processors if necessary.
|
|
121
112
|
*/
|
|
122
|
-
|
|
113
|
+
listInputProcessors(requestContext?: RequestContext): Promise<InputProcessor[]>;
|
|
123
114
|
/**
|
|
124
115
|
* Returns the output processors for this agent, resolving function-based processors if necessary.
|
|
125
116
|
*/
|
|
126
|
-
|
|
117
|
+
listOutputProcessors(requestContext?: RequestContext): Promise<OutputProcessor[]>;
|
|
127
118
|
/**
|
|
128
119
|
* Returns whether this agent has its own memory configured.
|
|
129
120
|
*
|
|
@@ -147,8 +138,8 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
147
138
|
* }
|
|
148
139
|
* ```
|
|
149
140
|
*/
|
|
150
|
-
getMemory({
|
|
151
|
-
|
|
141
|
+
getMemory({ requestContext }?: {
|
|
142
|
+
requestContext?: RequestContext;
|
|
152
143
|
}): Promise<MastraMemory | undefined>;
|
|
153
144
|
get voice(): CompositeVoice;
|
|
154
145
|
/**
|
|
@@ -157,15 +148,15 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
157
148
|
*
|
|
158
149
|
* @example
|
|
159
150
|
* ```typescript
|
|
160
|
-
* const workflows = await agent.
|
|
151
|
+
* const workflows = await agent.listWorkflows();
|
|
161
152
|
* const workflow = workflows['myWorkflow'];
|
|
162
153
|
* ```
|
|
163
154
|
*/
|
|
164
|
-
|
|
165
|
-
|
|
155
|
+
listWorkflows({ requestContext, }?: {
|
|
156
|
+
requestContext?: RequestContext;
|
|
166
157
|
}): Promise<Record<string, Workflow<any, any, any, any, any, any>>>;
|
|
167
|
-
|
|
168
|
-
|
|
158
|
+
listScorers({ requestContext, }?: {
|
|
159
|
+
requestContext?: RequestContext;
|
|
169
160
|
}): Promise<MastraScorers>;
|
|
170
161
|
/**
|
|
171
162
|
* Gets the voice instance for this agent with tools and instructions configured.
|
|
@@ -177,10 +168,9 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
177
168
|
* const audioStream = await voice.speak('Hello world');
|
|
178
169
|
* ```
|
|
179
170
|
*/
|
|
180
|
-
getVoice({
|
|
181
|
-
|
|
171
|
+
getVoice({ requestContext }?: {
|
|
172
|
+
requestContext?: RequestContext;
|
|
182
173
|
}): Promise<CompositeVoice | DefaultVoice>;
|
|
183
|
-
get instructions(): string;
|
|
184
174
|
/**
|
|
185
175
|
* Gets the instructions for this agent, resolving function-based instructions if necessary.
|
|
186
176
|
* Instructions define the agent's behavior and capabilities.
|
|
@@ -191,8 +181,8 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
191
181
|
* console.log(instructions); // 'You are a helpful assistant'
|
|
192
182
|
* ```
|
|
193
183
|
*/
|
|
194
|
-
getInstructions({
|
|
195
|
-
|
|
184
|
+
getInstructions({ requestContext }?: {
|
|
185
|
+
requestContext?: RequestContext;
|
|
196
186
|
}): AgentInstructions | Promise<AgentInstructions>;
|
|
197
187
|
/**
|
|
198
188
|
* Returns the description of the agent.
|
|
@@ -205,62 +195,65 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
205
195
|
*/
|
|
206
196
|
getDescription(): string;
|
|
207
197
|
/**
|
|
208
|
-
* Gets the
|
|
209
|
-
*
|
|
198
|
+
* Gets the legacy handler instance, initializing it lazily if needed.
|
|
199
|
+
* @internal
|
|
200
|
+
*/
|
|
201
|
+
private getLegacyHandler;
|
|
202
|
+
/**
|
|
203
|
+
* Gets the default generate options for the legacy generate method.
|
|
204
|
+
* These options are used as defaults when calling `generateLegacy()` without explicit options.
|
|
210
205
|
*
|
|
211
206
|
* @example
|
|
212
207
|
* ```typescript
|
|
213
|
-
* const options = await agent.
|
|
208
|
+
* const options = await agent.getDefaultGenerateOptionsLegacy();
|
|
214
209
|
* console.log(options.maxSteps); // 5
|
|
215
210
|
* ```
|
|
216
211
|
*/
|
|
217
|
-
|
|
218
|
-
|
|
212
|
+
getDefaultGenerateOptionsLegacy({ requestContext, }?: {
|
|
213
|
+
requestContext?: RequestContext;
|
|
219
214
|
}): AgentGenerateOptions | Promise<AgentGenerateOptions>;
|
|
220
215
|
/**
|
|
221
|
-
* Gets the default stream options for
|
|
222
|
-
* These options are used as defaults when calling `
|
|
216
|
+
* Gets the default stream options for the legacy stream method.
|
|
217
|
+
* These options are used as defaults when calling `streamLegacy()` without explicit options.
|
|
223
218
|
*
|
|
224
219
|
* @example
|
|
225
220
|
* ```typescript
|
|
226
|
-
* const options = await agent.
|
|
221
|
+
* const options = await agent.getDefaultStreamOptionsLegacy();
|
|
227
222
|
* console.log(options.temperature); // 0.7
|
|
228
223
|
* ```
|
|
229
224
|
*/
|
|
230
|
-
|
|
231
|
-
|
|
225
|
+
getDefaultStreamOptionsLegacy({ requestContext, }?: {
|
|
226
|
+
requestContext?: RequestContext;
|
|
232
227
|
}): AgentStreamOptions | Promise<AgentStreamOptions>;
|
|
233
228
|
/**
|
|
234
|
-
* Gets the default
|
|
235
|
-
* These options are used as defaults when calling `
|
|
229
|
+
* Gets the default options for this agent, resolving function-based options if necessary.
|
|
230
|
+
* These options are used as defaults when calling `stream()` or `generate()` without explicit options.
|
|
236
231
|
*
|
|
237
232
|
* @example
|
|
238
233
|
* ```typescript
|
|
239
|
-
* const options = await agent.
|
|
234
|
+
* const options = await agent.getDefaultStreamOptions();
|
|
240
235
|
* console.log(options.maxSteps); // 5
|
|
241
236
|
* ```
|
|
242
237
|
*/
|
|
243
|
-
|
|
244
|
-
|
|
238
|
+
getDefaultOptions<OUTPUT extends OutputSchema = undefined>({ requestContext, }?: {
|
|
239
|
+
requestContext?: RequestContext;
|
|
245
240
|
}): AgentExecutionOptions<OUTPUT> | Promise<AgentExecutionOptions<OUTPUT>>;
|
|
246
|
-
get tools(): TTools;
|
|
247
241
|
/**
|
|
248
242
|
* Gets the tools configured for this agent, resolving function-based tools if necessary.
|
|
249
243
|
* Tools extend the agent's capabilities, allowing it to perform specific actions or access external systems.
|
|
250
244
|
*
|
|
251
245
|
* @example
|
|
252
246
|
* ```typescript
|
|
253
|
-
* const tools = await agent.
|
|
247
|
+
* const tools = await agent.listTools();
|
|
254
248
|
* console.log(Object.keys(tools)); // ['calculator', 'weather']
|
|
255
249
|
* ```
|
|
256
250
|
*/
|
|
257
|
-
|
|
258
|
-
|
|
251
|
+
listTools({ requestContext }?: {
|
|
252
|
+
requestContext?: RequestContext;
|
|
259
253
|
}): TTools | Promise<TTools>;
|
|
260
|
-
get llm(): MastraLLM | Promise<MastraLLM>;
|
|
261
254
|
/**
|
|
262
255
|
* Gets or creates an LLM instance based on the provided or configured model.
|
|
263
|
-
* The LLM wraps the language model with additional capabilities like
|
|
256
|
+
* The LLM wraps the language model with additional capabilities like error handling.
|
|
264
257
|
*
|
|
265
258
|
* @example
|
|
266
259
|
* ```typescript
|
|
@@ -269,8 +262,8 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
269
262
|
* const customLlm = await agent.getLLM({ model: 'openai/gpt-5' });
|
|
270
263
|
* ```
|
|
271
264
|
*/
|
|
272
|
-
getLLM({
|
|
273
|
-
|
|
265
|
+
getLLM({ requestContext, model, }?: {
|
|
266
|
+
requestContext?: RequestContext;
|
|
274
267
|
model?: DynamicArgument<MastraModelConfig>;
|
|
275
268
|
}): MastraLLM | Promise<MastraLLM>;
|
|
276
269
|
/**
|
|
@@ -293,8 +286,8 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
293
286
|
* });
|
|
294
287
|
* ```
|
|
295
288
|
*/
|
|
296
|
-
getModel({
|
|
297
|
-
|
|
289
|
+
getModel({ requestContext, modelConfig, }?: {
|
|
290
|
+
requestContext?: RequestContext;
|
|
298
291
|
modelConfig?: Agent['model'];
|
|
299
292
|
}): MastraLanguageModel | Promise<MastraLanguageModel>;
|
|
300
293
|
/**
|
|
@@ -309,7 +302,7 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
309
302
|
* }
|
|
310
303
|
* ```
|
|
311
304
|
*/
|
|
312
|
-
getModelList(
|
|
305
|
+
getModelList(requestContext?: RequestContext): Promise<Array<AgentModelManagerConfig> | null>;
|
|
313
306
|
/**
|
|
314
307
|
* Updates the agent's instructions.
|
|
315
308
|
* @internal
|
|
@@ -336,7 +329,7 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
336
329
|
maxRetries?: number;
|
|
337
330
|
}): void;
|
|
338
331
|
/**
|
|
339
|
-
* Registers
|
|
332
|
+
* Registers logger primitives with the agent.
|
|
340
333
|
* @internal
|
|
341
334
|
*/
|
|
342
335
|
__registerPrimitives(p: MastraPrimitives): void;
|
|
@@ -351,35 +344,21 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
351
344
|
* @internal
|
|
352
345
|
*/
|
|
353
346
|
__setTools(tools: TTools): void;
|
|
354
|
-
generateTitleFromUserMessage({ message,
|
|
347
|
+
generateTitleFromUserMessage({ message, requestContext, tracingContext, model, instructions, }: {
|
|
355
348
|
message: string | MessageInput;
|
|
356
|
-
|
|
349
|
+
requestContext?: RequestContext;
|
|
357
350
|
tracingContext: TracingContext;
|
|
358
351
|
model?: DynamicArgument<MastraLanguageModel>;
|
|
359
352
|
instructions?: DynamicArgument<string>;
|
|
360
353
|
}): Promise<string>;
|
|
361
354
|
getMostRecentUserMessage(messages: Array<UIMessage | UIMessageWithMetadata>): UIMessage | UIMessageWithMetadata | undefined;
|
|
362
|
-
genTitle(userMessage: string | MessageInput | undefined,
|
|
355
|
+
genTitle(userMessage: string | MessageInput | undefined, requestContext: RequestContext, tracingContext: TracingContext, model?: DynamicArgument<MastraLanguageModel>, instructions?: DynamicArgument<string>): Promise<string | undefined>;
|
|
363
356
|
__setMemory(memory: DynamicArgument<MastraMemory>): void;
|
|
364
|
-
fetchMemory({ threadId, thread: passedThread, memoryConfig, resourceId, runId, userMessages, systemMessage, messageList, runtimeContext, }: {
|
|
365
|
-
resourceId: string;
|
|
366
|
-
threadId: string;
|
|
367
|
-
thread?: StorageThreadType;
|
|
368
|
-
memoryConfig?: MemoryConfig;
|
|
369
|
-
userMessages?: CoreMessage[];
|
|
370
|
-
systemMessage?: CoreMessage;
|
|
371
|
-
runId?: string;
|
|
372
|
-
messageList?: MessageList;
|
|
373
|
-
runtimeContext?: RuntimeContext;
|
|
374
|
-
}): Promise<{
|
|
375
|
-
threadId: string;
|
|
376
|
-
messages: CoreMessage[];
|
|
377
|
-
}>;
|
|
378
357
|
/**
|
|
379
358
|
* Retrieves and converts memory tools to CoreTool format.
|
|
380
359
|
* @internal
|
|
381
360
|
*/
|
|
382
|
-
private
|
|
361
|
+
private listMemoryTools;
|
|
383
362
|
/**
|
|
384
363
|
* Executes input processors on the message list before LLM processing.
|
|
385
364
|
* @internal
|
|
@@ -399,27 +378,27 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
399
378
|
* Retrieves and converts assigned tools to CoreTool format.
|
|
400
379
|
* @internal
|
|
401
380
|
*/
|
|
402
|
-
private
|
|
381
|
+
private listAssignedTools;
|
|
403
382
|
/**
|
|
404
383
|
* Retrieves and converts toolset tools to CoreTool format.
|
|
405
384
|
* @internal
|
|
406
385
|
*/
|
|
407
|
-
private
|
|
386
|
+
private listToolsets;
|
|
408
387
|
/**
|
|
409
388
|
* Retrieves and converts client-side tools to CoreTool format.
|
|
410
389
|
* @internal
|
|
411
390
|
*/
|
|
412
|
-
private
|
|
391
|
+
private listClientTools;
|
|
413
392
|
/**
|
|
414
393
|
* Retrieves and converts agent tools to CoreTool format.
|
|
415
394
|
* @internal
|
|
416
395
|
*/
|
|
417
|
-
private
|
|
396
|
+
private listAgentTools;
|
|
418
397
|
/**
|
|
419
398
|
* Retrieves and converts workflow tools to CoreTool format.
|
|
420
399
|
* @internal
|
|
421
400
|
*/
|
|
422
|
-
private
|
|
401
|
+
private listWorkflowTools;
|
|
423
402
|
/**
|
|
424
403
|
* Assembles all tools from various sources into a unified CoreTool dictionary.
|
|
425
404
|
* @internal
|
|
@@ -443,77 +422,11 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
443
422
|
* @internal
|
|
444
423
|
*/
|
|
445
424
|
private saveStepMessages;
|
|
446
|
-
/**
|
|
447
|
-
* Prepares message list and tools before LLM execution and handles memory persistence after.
|
|
448
|
-
* @internal
|
|
449
|
-
*/
|
|
450
|
-
__primitive({ instructions, messages, context, thread, memoryConfig, resourceId, runId, toolsets, clientTools, runtimeContext, saveQueueManager, writableStream, methodType, tracingContext, tracingOptions, }: {
|
|
451
|
-
instructions: AgentInstructions;
|
|
452
|
-
toolsets?: ToolsetsInput;
|
|
453
|
-
clientTools?: ToolsInput;
|
|
454
|
-
resourceId?: string;
|
|
455
|
-
thread?: (Partial<StorageThreadType> & {
|
|
456
|
-
id: string;
|
|
457
|
-
}) | undefined;
|
|
458
|
-
memoryConfig?: MemoryConfig;
|
|
459
|
-
context?: CoreMessage[];
|
|
460
|
-
runId?: string;
|
|
461
|
-
messages: MessageListInput;
|
|
462
|
-
runtimeContext: RuntimeContext;
|
|
463
|
-
saveQueueManager: SaveQueueManager;
|
|
464
|
-
writableStream?: WritableStream<ChunkType>;
|
|
465
|
-
methodType: 'generate' | 'stream';
|
|
466
|
-
tracingContext?: TracingContext;
|
|
467
|
-
tracingOptions?: TracingOptions;
|
|
468
|
-
}): {
|
|
469
|
-
before: () => Promise<{
|
|
470
|
-
tripwire?: boolean | undefined;
|
|
471
|
-
tripwireReason?: string | undefined;
|
|
472
|
-
messageObjects: CoreMessage[];
|
|
473
|
-
convertedTools: Record<string, CoreTool>;
|
|
474
|
-
threadExists: boolean;
|
|
475
|
-
thread: undefined;
|
|
476
|
-
messageList: MessageList;
|
|
477
|
-
agentAISpan: AISpan<AISpanType.AGENT_RUN> | undefined;
|
|
478
|
-
} | {
|
|
479
|
-
threadExists: boolean;
|
|
480
|
-
tripwire?: boolean | undefined;
|
|
481
|
-
tripwireReason?: string | undefined;
|
|
482
|
-
convertedTools: Record<string, CoreTool>;
|
|
483
|
-
thread: StorageThreadType;
|
|
484
|
-
messageList: MessageList;
|
|
485
|
-
messageObjects: CoreMessage[];
|
|
486
|
-
agentAISpan: AISpan<AISpanType.AGENT_RUN> | undefined;
|
|
487
|
-
}>;
|
|
488
|
-
after: ({ result, thread: threadAfter, threadId, memoryConfig, outputText, runId, messageList, threadExists, structuredOutput, overrideScorers, agentAISpan, }: {
|
|
489
|
-
runId: string;
|
|
490
|
-
result: Record<string, any>;
|
|
491
|
-
thread: StorageThreadType | null | undefined;
|
|
492
|
-
threadId?: string;
|
|
493
|
-
memoryConfig: MemoryConfig | undefined;
|
|
494
|
-
outputText: string;
|
|
495
|
-
messageList: MessageList;
|
|
496
|
-
threadExists: boolean;
|
|
497
|
-
structuredOutput?: boolean;
|
|
498
|
-
overrideScorers?: MastraScorers;
|
|
499
|
-
agentAISpan?: AISpan<AISpanType.AGENT_RUN>;
|
|
500
|
-
}) => Promise<{
|
|
501
|
-
scoringData: {
|
|
502
|
-
input: Omit<ScorerRunInputForAgent, "runId">;
|
|
503
|
-
output: ScorerRunOutputForAgent;
|
|
504
|
-
};
|
|
505
|
-
}>;
|
|
506
|
-
};
|
|
507
425
|
/**
|
|
508
426
|
* Resolves scorer name references to actual scorer instances from Mastra.
|
|
509
427
|
* @internal
|
|
510
428
|
*/
|
|
511
429
|
private resolveOverrideScorerReferences;
|
|
512
|
-
/**
|
|
513
|
-
* Prepares options and handlers for LLM text/object generation or streaming.
|
|
514
|
-
* @internal
|
|
515
|
-
*/
|
|
516
|
-
private prepareLLMOptions;
|
|
517
430
|
/**
|
|
518
431
|
* Resolves and prepares model configurations for the LLM.
|
|
519
432
|
* @internal
|
|
@@ -541,32 +454,24 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
541
454
|
* ```
|
|
542
455
|
*/
|
|
543
456
|
network(messages: MessageListInput, options?: MultiPrimitiveExecutionOptions): Promise<import("../stream").MastraAgentNetworkStream>;
|
|
457
|
+
generate<OUTPUT extends OutputSchema = undefined>(messages: MessageListInput, options?: AgentExecutionOptions<OUTPUT>): Promise<Awaited<ReturnType<MastraModelOutput<OUTPUT>['getFullOutput']>>>;
|
|
458
|
+
stream<OUTPUT extends OutputSchema = undefined>(messages: MessageListInput, streamOptions?: AgentExecutionOptions<OUTPUT>): Promise<MastraModelOutput<OUTPUT>>;
|
|
544
459
|
/**
|
|
545
|
-
*
|
|
546
|
-
*/
|
|
547
|
-
generateVNext<OUTPUT extends OutputSchema = undefined, FORMAT extends 'aisdk' | 'mastra' = 'mastra'>(_messages: MessageListInput, _options?: AgentExecutionOptions<OUTPUT, FORMAT>): Promise<FORMAT extends 'aisdk' ? Awaited<ReturnType<AISDKV5OutputStream<OUTPUT>['getFullOutput']>> : Awaited<ReturnType<MastraModelOutput<OUTPUT>['getFullOutput']>>>;
|
|
548
|
-
generate<OUTPUT extends OutputSchema = undefined, FORMAT extends 'aisdk' | 'mastra' = 'mastra'>(messages: MessageListInput, options?: AgentExecutionOptions<OUTPUT, FORMAT> & DeprecatedOutputOptions<OUTPUT>): Promise<FORMAT extends 'aisdk' ? Awaited<ReturnType<AISDKV5OutputStream<OUTPUT>['getFullOutput']>> : Awaited<ReturnType<MastraModelOutput<OUTPUT>['getFullOutput']>>>;
|
|
549
|
-
/**
|
|
550
|
-
* @deprecated `streamVNext()` has been renamed to `stream()`. Please use `stream()` instead.
|
|
551
|
-
*/
|
|
552
|
-
streamVNext<OUTPUT extends OutputSchema = undefined, FORMAT extends 'mastra' | 'aisdk' | undefined = undefined>(_messages: MessageListInput, _streamOptions?: AgentExecutionOptions<OUTPUT, FORMAT>): Promise<FORMAT extends 'aisdk' ? AISDKV5OutputStream<OUTPUT> : MastraModelOutput<OUTPUT>>;
|
|
553
|
-
stream<OUTPUT extends OutputSchema = undefined, FORMAT extends 'mastra' | 'aisdk' | undefined = undefined>(messages: MessageListInput, streamOptions?: AgentExecutionOptions<OUTPUT, FORMAT> & DeprecatedOutputOptions<OUTPUT>): Promise<FORMAT extends 'aisdk' ? AISDKV5OutputStream<OUTPUT> : MastraModelOutput<OUTPUT>>;
|
|
554
|
-
/**
|
|
555
|
-
* Resumes a previously suspended VNext stream execution.
|
|
460
|
+
* Resumes a previously suspended stream execution.
|
|
556
461
|
* Used to continue execution after a suspension point (e.g., tool approval, workflow suspend).
|
|
557
462
|
*
|
|
558
463
|
* @example
|
|
559
464
|
* ```typescript
|
|
560
465
|
* // Resume after suspension
|
|
561
|
-
* const stream = await agent.
|
|
466
|
+
* const stream = await agent.resumeStream(
|
|
562
467
|
* { approved: true },
|
|
563
468
|
* { runId: 'previous-run-id' }
|
|
564
469
|
* );
|
|
565
470
|
* ```
|
|
566
471
|
*/
|
|
567
|
-
resumeStream<OUTPUT extends OutputSchema | undefined = undefined
|
|
472
|
+
resumeStream<OUTPUT extends OutputSchema | undefined = undefined>(resumeData: any, streamOptions?: AgentExecutionOptions<OUTPUT> & {
|
|
568
473
|
toolCallId?: string;
|
|
569
|
-
}): Promise<
|
|
474
|
+
}): Promise<MastraModelOutput<OUTPUT>>;
|
|
570
475
|
/**
|
|
571
476
|
* Approves a pending tool call and resumes execution.
|
|
572
477
|
* Used when `requireToolApproval` is enabled to allow the agent to proceed with a tool call.
|
|
@@ -582,10 +487,10 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
582
487
|
* }
|
|
583
488
|
* ```
|
|
584
489
|
*/
|
|
585
|
-
approveToolCall<OUTPUT extends OutputSchema | undefined = undefined
|
|
490
|
+
approveToolCall<OUTPUT extends OutputSchema | undefined = undefined>(options: AgentExecutionOptions<OUTPUT> & {
|
|
586
491
|
runId: string;
|
|
587
492
|
toolCallId?: string;
|
|
588
|
-
}): Promise<
|
|
493
|
+
}): Promise<MastraModelOutput<OUTPUT>>;
|
|
589
494
|
/**
|
|
590
495
|
* Declines a pending tool call and resumes execution.
|
|
591
496
|
* Used when `requireToolApproval` is enabled to prevent the agent from executing a tool call.
|
|
@@ -601,13 +506,13 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
601
506
|
* }
|
|
602
507
|
* ```
|
|
603
508
|
*/
|
|
604
|
-
declineToolCall<OUTPUT extends OutputSchema | undefined = undefined
|
|
509
|
+
declineToolCall<OUTPUT extends OutputSchema | undefined = undefined>(options: AgentExecutionOptions<OUTPUT> & {
|
|
605
510
|
runId: string;
|
|
606
511
|
toolCallId?: string;
|
|
607
|
-
}): Promise<
|
|
512
|
+
}): Promise<MastraModelOutput<OUTPUT>>;
|
|
608
513
|
/**
|
|
609
514
|
* Legacy implementation of generate method using AI SDK v4 models.
|
|
610
|
-
* Use this method if you need to continue using AI SDK v4 models
|
|
515
|
+
* Use this method if you need to continue using AI SDK v4 models.
|
|
611
516
|
*
|
|
612
517
|
* @example
|
|
613
518
|
* ```typescript
|
|
@@ -629,7 +534,7 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
629
534
|
}): Promise<GenerateTextResult<any, EXPERIMENTAL_OUTPUT>>;
|
|
630
535
|
/**
|
|
631
536
|
* Legacy implementation of stream method using AI SDK v4 models.
|
|
632
|
-
* Use this method if you need to continue using AI SDK v4 models
|
|
537
|
+
* Use this method if you need to continue using AI SDK v4 models.
|
|
633
538
|
*
|
|
634
539
|
* @example
|
|
635
540
|
* ```typescript
|
|
@@ -653,57 +558,6 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
653
558
|
}): Promise<StreamTextResult<any, OUTPUT extends ZodSchema ? z.infer<OUTPUT> : unknown> & {
|
|
654
559
|
partialObjectStream: StreamTextResult<any, OUTPUT extends ZodSchema ? z.infer<OUTPUT> : EXPERIMENTAL_OUTPUT extends ZodSchema ? z.infer<EXPERIMENTAL_OUTPUT> : unknown>['experimental_partialOutputStream'];
|
|
655
560
|
}>;
|
|
656
|
-
/**
|
|
657
|
-
* Convert text to speech using the configured voice provider
|
|
658
|
-
* @param input Text or text stream to convert to speech
|
|
659
|
-
* @param options Speech options including speaker and provider-specific options
|
|
660
|
-
* @returns Audio stream
|
|
661
|
-
* @deprecated Use agent.voice.speak() instead
|
|
662
|
-
*/
|
|
663
|
-
speak(input: string | NodeJS.ReadableStream, options?: {
|
|
664
|
-
speaker?: string;
|
|
665
|
-
[key: string]: any;
|
|
666
|
-
}): Promise<NodeJS.ReadableStream | void>;
|
|
667
|
-
/**
|
|
668
|
-
* Convert speech to text using the configured voice provider
|
|
669
|
-
* @param audioStream Audio stream to transcribe
|
|
670
|
-
* @param options Provider-specific transcription options
|
|
671
|
-
* @returns Text or text stream
|
|
672
|
-
* @deprecated Use agent.voice.listen() instead
|
|
673
|
-
*/
|
|
674
|
-
listen(audioStream: NodeJS.ReadableStream, options?: {
|
|
675
|
-
[key: string]: any;
|
|
676
|
-
}): Promise<string | NodeJS.ReadableStream | void>;
|
|
677
|
-
/**
|
|
678
|
-
* Get a list of available speakers from the configured voice provider
|
|
679
|
-
* @throws {Error} If no voice provider is configured
|
|
680
|
-
* @returns {Promise<Array<{voiceId: string}>>} List of available speakers
|
|
681
|
-
* @deprecated Use agent.voice.getSpeakers() instead
|
|
682
|
-
*/
|
|
683
|
-
getSpeakers(): Promise<{
|
|
684
|
-
voiceId: string;
|
|
685
|
-
}[]>;
|
|
686
|
-
/**
|
|
687
|
-
* Converts the agent to a workflow step for use in legacy workflows.
|
|
688
|
-
* The step accepts a prompt and returns text output.
|
|
689
|
-
*
|
|
690
|
-
* @deprecated Use agent directly in workflows instead
|
|
691
|
-
*
|
|
692
|
-
* @example
|
|
693
|
-
* ```typescript
|
|
694
|
-
* const agentStep = agent.toStep();
|
|
695
|
-
* const workflow = new Workflow({
|
|
696
|
-
* steps: {
|
|
697
|
-
* analyze: agentStep
|
|
698
|
-
* }
|
|
699
|
-
* });
|
|
700
|
-
* ```
|
|
701
|
-
*/
|
|
702
|
-
toStep(): Step<TAgentId, z.ZodObject<{
|
|
703
|
-
prompt: z.ZodString;
|
|
704
|
-
}>, z.ZodObject<{
|
|
705
|
-
text: z.ZodString;
|
|
706
|
-
}>, any>;
|
|
707
561
|
/**
|
|
708
562
|
* Resolves the configuration for title generation.
|
|
709
563
|
* @internal
|
|
@@ -720,7 +574,7 @@ export declare class Agent<TAgentId extends string = string, TTools extends Tool
|
|
|
720
574
|
* Resolves title generation instructions, handling both static strings and dynamic functions
|
|
721
575
|
* @internal
|
|
722
576
|
*/
|
|
723
|
-
resolveTitleInstructions(
|
|
577
|
+
resolveTitleInstructions(requestContext: RequestContext, instructions?: DynamicArgument<string>): Promise<string>;
|
|
724
578
|
}
|
|
725
579
|
export {};
|
|
726
580
|
//# sourceMappingURL=agent.d.ts.map
|