@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/CHANGELOG.md
CHANGED
|
@@ -1,223 +1,412 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 1.0.0-beta.0
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Major Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Moving scorers under the eval domain, api method consistency, prebuilt evals, scorers require ids. ([#9589](https://github.com/mastra-ai/mastra/pull/9589))
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- **BREAKING CHANGE**: Scorers for Agents will now use `MastraDBMessage` instead of `UIMessage` ([#9702](https://github.com/mastra-ai/mastra/pull/9702))
|
|
10
|
+
- Scorer input/output types now use `MastraDBMessage[]` with nested `content` object structure
|
|
11
|
+
- Added `getTextContentFromMastraDBMessage()` helper function to extract text content from `MastraDBMessage` objects
|
|
12
|
+
- Added `createTestMessage()` helper function for creating `MastraDBMessage` objects in tests with optional tool invocations support
|
|
13
|
+
- Updated `extractToolCalls()` to access tool invocations from nested `content` structure
|
|
14
|
+
- Updated `getUserMessageFromRunInput()` and `getAssistantMessageFromRunOutput()` to use new message structure
|
|
15
|
+
- Removed `createUIMessage()`
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
- Every Mastra primitive (agent, MCPServer, workflow, tool, processor, scorer, and vector) now has a get, list, and add method associated with it. Each primitive also now requires an id to be set. ([#9675](https://github.com/mastra-ai/mastra/pull/9675))
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
Primitives that are added to other primitives are also automatically added to the Mastra instance
|
|
14
20
|
|
|
15
|
-
-
|
|
21
|
+
- Update handlers to use `listWorkflowRuns` instead of `getWorkflowRuns`. Fix type names from `StoragelistThreadsByResourceIdInput/Output` to `StorageListThreadsByResourceIdInput/Output`. ([#9507](https://github.com/mastra-ai/mastra/pull/9507))
|
|
16
22
|
|
|
17
|
-
-
|
|
23
|
+
- **BREAKING:** Remove `getMessagesPaginated()` and add `perPage: false` support ([#9670](https://github.com/mastra-ai/mastra/pull/9670))
|
|
18
24
|
|
|
19
|
-
|
|
20
|
-
- @mastra/schema-compat@0.11.7
|
|
25
|
+
Removes deprecated `getMessagesPaginated()` method. The `listMessages()` API and score handlers now support `perPage: false` to fetch all records without pagination limits.
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
**Storage changes:**
|
|
28
|
+
- `StoragePagination.perPage` type changed from `number` to `number | false`
|
|
29
|
+
- All storage implementations support `perPage: false`:
|
|
30
|
+
- Memory: `listMessages()`
|
|
31
|
+
- Scores: `listScoresBySpan()`, `listScoresByRunId()`, `listScoresByExecutionId()`
|
|
32
|
+
- HTTP query parser accepts `"false"` string (e.g., `?perPage=false`)
|
|
23
33
|
|
|
24
|
-
|
|
34
|
+
**Memory changes:**
|
|
35
|
+
- `memory.query()` parameter type changed from `StorageGetMessagesArg` to `StorageListMessagesInput`
|
|
36
|
+
- Uses flat parameters (`page`, `perPage`, `include`, `filter`, `vectorSearchString`) instead of `selectBy` object
|
|
25
37
|
|
|
26
|
-
|
|
38
|
+
**Stricter validation:**
|
|
39
|
+
- `listMessages()` requires non-empty, non-whitespace `threadId` (throws error instead of returning empty results)
|
|
27
40
|
|
|
28
|
-
|
|
41
|
+
**Migration:**
|
|
29
42
|
|
|
30
|
-
|
|
43
|
+
```typescript
|
|
44
|
+
// Storage/Memory: Replace getMessagesPaginated with listMessages
|
|
45
|
+
- storage.getMessagesPaginated({ threadId, selectBy: { pagination: { page: 0, perPage: 20 } } })
|
|
46
|
+
+ storage.listMessages({ threadId, page: 0, perPage: 20 })
|
|
47
|
+
+ storage.listMessages({ threadId, page: 0, perPage: false }) // Fetch all
|
|
48
|
+
|
|
49
|
+
// Memory: Replace selectBy with flat parameters
|
|
50
|
+
- memory.query({ threadId, selectBy: { last: 20, include: [...] } })
|
|
51
|
+
+ memory.query({ threadId, perPage: 20, include: [...] })
|
|
52
|
+
|
|
53
|
+
// Client SDK
|
|
54
|
+
- thread.getMessagesPaginated({ selectBy: { pagination: { page: 0 } } })
|
|
55
|
+
+ thread.listMessages({ page: 0, perPage: 20 })
|
|
56
|
+
```
|
|
31
57
|
|
|
32
|
-
-
|
|
58
|
+
- # Major Changes ([#9695](https://github.com/mastra-ai/mastra/pull/9695))
|
|
33
59
|
|
|
34
|
-
|
|
60
|
+
## Storage Layer
|
|
35
61
|
|
|
36
|
-
|
|
62
|
+
### BREAKING: Removed `storage.getMessages()`
|
|
37
63
|
|
|
38
|
-
|
|
39
|
-
- @mastra/schema-compat@0.11.7-alpha.0
|
|
64
|
+
The `getMessages()` method has been removed from all storage implementations. Use `listMessages()` instead, which provides pagination support.
|
|
40
65
|
|
|
41
|
-
|
|
66
|
+
**Migration:**
|
|
42
67
|
|
|
43
|
-
|
|
68
|
+
```typescript
|
|
69
|
+
// Before
|
|
70
|
+
const messages = await storage.getMessages({ threadId: 'thread-1' });
|
|
71
|
+
|
|
72
|
+
// After
|
|
73
|
+
const result = await storage.listMessages({
|
|
74
|
+
threadId: 'thread-1',
|
|
75
|
+
page: 0,
|
|
76
|
+
perPage: 50,
|
|
77
|
+
});
|
|
78
|
+
const messages = result.messages; // Access messages array
|
|
79
|
+
console.log(result.total); // Total count
|
|
80
|
+
console.log(result.hasMore); // Whether more pages exist
|
|
81
|
+
```
|
|
44
82
|
|
|
45
|
-
|
|
83
|
+
### Message ordering default
|
|
46
84
|
|
|
47
|
-
|
|
85
|
+
`listMessages()` defaults to ASC (oldest first) ordering by `createdAt`, matching the previous `getMessages()` behavior.
|
|
48
86
|
|
|
49
|
-
|
|
50
|
-
|
|
87
|
+
**To use DESC ordering (newest first):**
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
const result = await storage.listMessages({
|
|
91
|
+
threadId: 'thread-1',
|
|
92
|
+
orderBy: { field: 'createdAt', direction: 'DESC' },
|
|
93
|
+
});
|
|
51
94
|
```
|
|
52
95
|
|
|
53
|
-
|
|
96
|
+
## Client SDK
|
|
54
97
|
|
|
55
|
-
|
|
56
|
-
run.resume({
|
|
57
|
-
step: "nestedWorkflow.suspendedStep", //chained nested workflow step id and suspended step id
|
|
58
|
-
//other resume params
|
|
59
|
-
})
|
|
60
|
-
```
|
|
98
|
+
### BREAKING: Renamed `client.getThreadMessages()` → `client.listThreadMessages()`
|
|
61
99
|
|
|
62
|
-
|
|
100
|
+
**Migration:**
|
|
63
101
|
|
|
102
|
+
```typescript
|
|
103
|
+
// Before
|
|
104
|
+
const response = await client.getThreadMessages(threadId, { agentId });
|
|
105
|
+
|
|
106
|
+
// After
|
|
107
|
+
const response = await client.listThreadMessages(threadId, { agentId });
|
|
64
108
|
```
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
109
|
+
|
|
110
|
+
The response format remains the same.
|
|
111
|
+
|
|
112
|
+
## Type Changes
|
|
113
|
+
|
|
114
|
+
### BREAKING: Removed `StorageGetMessagesArg` type
|
|
115
|
+
|
|
116
|
+
Use `StorageListMessagesInput` instead:
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
// Before
|
|
120
|
+
import type { StorageGetMessagesArg } from '@mastra/core';
|
|
121
|
+
|
|
122
|
+
// After
|
|
123
|
+
import type { StorageListMessagesInput } from '@mastra/core';
|
|
69
124
|
```
|
|
70
125
|
|
|
71
|
-
-
|
|
126
|
+
- - Removes modelSettings.abortSignal in favour of top-level abortSignal only. Also removes the deprecated output field - use structuredOutput.schema instead. ([`9e1911d`](https://github.com/mastra-ai/mastra/commit/9e1911db2b4db85e0e768c3f15e0d61e319869f6))
|
|
127
|
+
- The deprecated generateVNext() and streamVNext() methods have been removed since they're now the stable generate() and stream() methods.
|
|
128
|
+
- The deprecated `output` option has been removed entirely, in favour of `structuredOutput`.
|
|
72
129
|
|
|
73
|
-
|
|
130
|
+
Method renames to clarify the API surface:
|
|
131
|
+
- getDefaultGenerateOptions → getDefaultGenerateOptionsLegacy
|
|
132
|
+
- getDefaultStreamOptions → getDefaultStreamOptionsLegacy
|
|
133
|
+
- getDefaultVNextStreamOptions → getDefaultStreamOptions
|
|
74
134
|
|
|
75
|
-
|
|
135
|
+
- Bump minimum required Node.js version to 22.13.0 ([#9706](https://github.com/mastra-ai/mastra/pull/9706))
|
|
76
136
|
|
|
77
|
-
|
|
137
|
+
- Replace `getThreadsByResourceIdPaginated` with `listThreadsByResourceId` across memory handlers. Update client SDK to use `listThreads()` with `offset`/`limit` parameters instead of deprecated `getMemoryThreads()`. Consolidate `/api/memory/threads` routes to single paginated endpoint. ([#9508](https://github.com/mastra-ai/mastra/pull/9508))
|
|
78
138
|
|
|
79
|
-
-
|
|
139
|
+
- Add new list methods to storage API: `listMessages`, `listMessagesById`, `listThreadsByResourceId`, and `listWorkflowRuns`. Most methods are currently wrappers around existing methods. Full implementations will be added when migrating away from legacy methods. ([#9489](https://github.com/mastra-ai/mastra/pull/9489))
|
|
80
140
|
|
|
81
|
-
|
|
141
|
+
- Update tool execution signature ([#9587](https://github.com/mastra-ai/mastra/pull/9587))
|
|
142
|
+
|
|
143
|
+
Consolidated the 3 different execution contexts to one
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
// before depending on the context the tool was executed in
|
|
147
|
+
tool.execute({ context: data });
|
|
148
|
+
tool.execute({ context: { inputData: data } });
|
|
149
|
+
tool.execute(data);
|
|
82
150
|
|
|
151
|
+
// now, for all contexts
|
|
152
|
+
tool.execute(data, context);
|
|
83
153
|
```
|
|
84
|
-
|
|
154
|
+
|
|
155
|
+
**Before:**
|
|
156
|
+
|
|
157
|
+
```typescript
|
|
158
|
+
inputSchema: z.object({ something: z.string() }),
|
|
159
|
+
execute: async ({ context, tracingContext, runId, ... }) => {
|
|
160
|
+
return doSomething(context.string);
|
|
161
|
+
}
|
|
85
162
|
```
|
|
86
163
|
|
|
87
|
-
|
|
164
|
+
**After:**
|
|
88
165
|
|
|
166
|
+
```typescript
|
|
167
|
+
inputSchema: z.object({ something: z.string() }),
|
|
168
|
+
execute: async (inputData, context) => {
|
|
169
|
+
const { agent, mcp, workflow, ...sharedContext } = context
|
|
170
|
+
|
|
171
|
+
// context that only an agent would get like toolCallId, messages, suspend, resume, etc
|
|
172
|
+
if (agent) {
|
|
173
|
+
doSomething(inputData.something, agent)
|
|
174
|
+
// context that only a workflow would get like runId, state, suspend, resume, etc
|
|
175
|
+
} else if (workflow) {
|
|
176
|
+
doSomething(inputData.something, workflow)
|
|
177
|
+
// context that only a workflow would get like "extra", "elicitation"
|
|
178
|
+
} else if (mcp) {
|
|
179
|
+
doSomething(inputData.something, mcp)
|
|
180
|
+
} else {
|
|
181
|
+
// Running a tool in no execution context
|
|
182
|
+
return doSomething(inputData.something);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
89
185
|
```
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
186
|
+
|
|
187
|
+
- The `@mastra/core` package no longer allows top-level imports except for `Mastra` and `type Config`. You must use subpath imports for all other imports. ([#9544](https://github.com/mastra-ai/mastra/pull/9544))
|
|
188
|
+
|
|
189
|
+
For example:
|
|
190
|
+
|
|
191
|
+
```diff
|
|
192
|
+
import { Mastra, type Config } from "@mastra/core";
|
|
193
|
+
- import { Agent } from "@mastra/core";
|
|
194
|
+
- import { createTool } from "@mastra/core";
|
|
195
|
+
- import { createStep } from "@mastra/core";
|
|
196
|
+
|
|
197
|
+
+ import { Agent } from "@mastra/core/agent";
|
|
198
|
+
+ import { createTool } from "@mastra/core/tools";
|
|
199
|
+
+ import { createStep } from "@mastra/core/workflows";
|
|
94
200
|
```
|
|
95
201
|
|
|
96
|
-
|
|
202
|
+
- This simplifies the Memory API by removing the confusing rememberMessages method and renaming query to recall for better clarity. ([#9701](https://github.com/mastra-ai/mastra/pull/9701))
|
|
203
|
+
|
|
204
|
+
The rememberMessages method name implied it might persist data when it was actually just retrieving messages, same as query. Having two methods that did essentially the same thing was unnecessary.
|
|
97
205
|
|
|
206
|
+
Before:
|
|
207
|
+
|
|
208
|
+
```typescript
|
|
209
|
+
// Two methods that did the same thing
|
|
210
|
+
memory.rememberMessages({ threadId, resourceId, config, vectorMessageSearch });
|
|
211
|
+
memory.query({ threadId, resourceId, perPage, vectorSearchString });
|
|
98
212
|
```
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
213
|
+
|
|
214
|
+
After:
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
// Single unified method with clear purpose
|
|
218
|
+
memory.recall({ threadId, resourceId, perPage, vectorMessageSearch, threadConfig });
|
|
103
219
|
```
|
|
104
220
|
|
|
105
|
-
|
|
221
|
+
All usages have been updated across the codebase including tests. The agent now calls recall directly with the appropriate parameters.
|
|
106
222
|
|
|
107
|
-
-
|
|
223
|
+
- Rename RuntimeContext to RequestContext ([#9511](https://github.com/mastra-ai/mastra/pull/9511))
|
|
108
224
|
|
|
109
|
-
|
|
225
|
+
- Implement listMessages API for replacing previous methods ([#9531](https://github.com/mastra-ai/mastra/pull/9531))
|
|
110
226
|
|
|
111
|
-
|
|
227
|
+
- Rename `defaultVNextStreamOptions` to `defaultOptions`. Add "Legacy" suffix to v1 option properties and methods (`defaultGenerateOptions` → `defaultGenerateOptionsLegacy`, `defaultStreamOptions` → `defaultStreamOptionsLegacy`). ([#9535](https://github.com/mastra-ai/mastra/pull/9535))
|
|
112
228
|
|
|
113
|
-
-
|
|
229
|
+
- Remove `getThreadsByResourceId` and `getThreadsByResourceIdPaginated` methods from storage interfaces in favor of `listThreadsByResourceId`. The new method uses `offset`/`limit` pagination and a nested `orderBy` object structure (`{ field, direction }`). ([#9536](https://github.com/mastra-ai/mastra/pull/9536))
|
|
114
230
|
|
|
115
|
-
-
|
|
231
|
+
- Remove `getMessagesById` method from storage interfaces in favor of `listMessagesById`. The new method only returns V2-format messages and removes the format parameter, simplifying the API surface. Users should migrate from `getMessagesById({ messageIds, format })` to `listMessagesById({ messageIds })`. ([#9534](https://github.com/mastra-ai/mastra/pull/9534))
|
|
116
232
|
|
|
117
|
-
-
|
|
233
|
+
- Experimental auth -> auth ([#9660](https://github.com/mastra-ai/mastra/pull/9660))
|
|
118
234
|
|
|
119
|
-
-
|
|
235
|
+
- Renamed a bunch of observability/tracing-related things to drop the AI prefix. ([#9744](https://github.com/mastra-ai/mastra/pull/9744))
|
|
120
236
|
|
|
121
|
-
-
|
|
237
|
+
- Removed MastraMessageV3 intermediary format, now we go from MastraDBMessage->aiv5 formats and back directly ([#9094](https://github.com/mastra-ai/mastra/pull/9094))
|
|
122
238
|
|
|
123
|
-
-
|
|
239
|
+
- **Breaking Change**: Remove legacy v1 watch events and consolidate on v2 implementation. ([#9252](https://github.com/mastra-ai/mastra/pull/9252))
|
|
124
240
|
|
|
125
|
-
|
|
241
|
+
This change simplifies the workflow watching API by removing the legacy v1 event system and promoting v2 as the standard (renamed to just `watch`).
|
|
126
242
|
|
|
127
|
-
|
|
243
|
+
### What's Changed
|
|
244
|
+
- Removed legacy v1 watch event handlers and types
|
|
245
|
+
- Renamed `watch-v2` to `watch` throughout the codebase
|
|
246
|
+
- Removed `.watch()` method from client-js SDK (`Workflow` and `AgentBuilder` classes)
|
|
247
|
+
- Removed `/watch` HTTP endpoints from server and deployer
|
|
248
|
+
- Removed `WorkflowWatchResult` and v1 `WatchEvent` types
|
|
128
249
|
|
|
129
|
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
250
|
+
- Remove various deprecated APIs from agent class. ([#9257](https://github.com/mastra-ai/mastra/pull/9257))
|
|
251
|
+
- `agent.llm` → `agent.getLLM()`
|
|
252
|
+
- `agent.tools` → `agent.getTools()`
|
|
253
|
+
- `agent.instructions` → `agent.getInstructions()`
|
|
254
|
+
- `agent.speak()` → `agent.voice.speak()`
|
|
255
|
+
- `agent.getSpeakers()` → `agent.voice.getSpeakers()`
|
|
256
|
+
- `agent.listen` → `agent.voice.listen()`
|
|
257
|
+
- `agent.fetchMemory` → `(await agent.getMemory()).query()`
|
|
258
|
+
- `agent.toStep` → Add agent directly to the step, workflows handle the transformation
|
|
133
259
|
|
|
134
|
-
|
|
260
|
+
- **BREAKING CHANGE**: Pagination APIs now use `page`/`perPage` instead of `offset`/`limit` ([#9592](https://github.com/mastra-ai/mastra/pull/9592))
|
|
135
261
|
|
|
136
|
-
|
|
262
|
+
All storage and memory pagination APIs have been updated to use `page` (0-indexed) and `perPage` instead of `offset` and `limit`, aligning with standard REST API patterns.
|
|
137
263
|
|
|
138
|
-
|
|
264
|
+
**Affected APIs:**
|
|
265
|
+
- `Memory.listThreadsByResourceId()`
|
|
266
|
+
- `Memory.listMessages()`
|
|
267
|
+
- `Storage.listWorkflowRuns()`
|
|
139
268
|
|
|
140
|
-
|
|
141
|
-
This ensures when you poll workflow run result using `getWorkflowRunExecutionResult(runId)`, you get the right status for all parallel steps
|
|
269
|
+
**Migration:**
|
|
142
270
|
|
|
143
|
-
|
|
271
|
+
```typescript
|
|
272
|
+
// Before
|
|
273
|
+
await memory.listThreadsByResourceId({
|
|
274
|
+
resourceId: 'user-123',
|
|
275
|
+
offset: 20,
|
|
276
|
+
limit: 10,
|
|
277
|
+
});
|
|
144
278
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
279
|
+
// After
|
|
280
|
+
await memory.listThreadsByResourceId({
|
|
281
|
+
resourceId: 'user-123',
|
|
282
|
+
page: 2, // page = Math.floor(offset / limit)
|
|
283
|
+
perPage: 10,
|
|
284
|
+
});
|
|
148
285
|
|
|
149
|
-
|
|
286
|
+
// Before
|
|
287
|
+
await memory.listMessages({
|
|
288
|
+
threadId: 'thread-456',
|
|
289
|
+
offset: 20,
|
|
290
|
+
limit: 10,
|
|
291
|
+
});
|
|
150
292
|
|
|
151
|
-
|
|
293
|
+
// After
|
|
294
|
+
await memory.listMessages({
|
|
295
|
+
threadId: 'thread-456',
|
|
296
|
+
page: 2,
|
|
297
|
+
perPage: 10,
|
|
298
|
+
});
|
|
152
299
|
|
|
153
|
-
|
|
154
|
-
|
|
300
|
+
// Before
|
|
301
|
+
await storage.listWorkflowRuns({
|
|
302
|
+
workflowName: 'my-workflow',
|
|
303
|
+
offset: 20,
|
|
304
|
+
limit: 10,
|
|
305
|
+
});
|
|
155
306
|
|
|
156
|
-
|
|
307
|
+
// After
|
|
308
|
+
await storage.listWorkflowRuns({
|
|
309
|
+
workflowName: 'my-workflow',
|
|
310
|
+
page: 2,
|
|
311
|
+
perPage: 10,
|
|
312
|
+
});
|
|
313
|
+
```
|
|
157
314
|
|
|
158
|
-
|
|
315
|
+
**Additional improvements:**
|
|
316
|
+
- Added validation for negative `page` values in all storage implementations
|
|
317
|
+
- Improved `perPage` validation to handle edge cases (negative values, `0`, `false`)
|
|
318
|
+
- Added reusable query parser utilities for consistent validation in handlers
|
|
159
319
|
|
|
160
|
-
-
|
|
320
|
+
- ```([#9709](https://github.com/mastra-ai/mastra/pull/9709))
|
|
321
|
+
import { Mastra } from '@mastra/core';
|
|
322
|
+
import { Observability } from '@mastra/observability'; // Explicit import
|
|
161
323
|
|
|
162
|
-
|
|
324
|
+
const mastra = new Mastra({
|
|
325
|
+
...other_config,
|
|
326
|
+
observability: new Observability({
|
|
327
|
+
default: { enabled: true }
|
|
328
|
+
}) // Instance
|
|
329
|
+
});
|
|
330
|
+
```
|
|
163
331
|
|
|
164
|
-
|
|
332
|
+
Instead of:
|
|
165
333
|
|
|
166
|
-
|
|
334
|
+
```
|
|
335
|
+
import { Mastra } from '@mastra/core';
|
|
336
|
+
import '@mastra/observability/init'; // Explicit import
|
|
167
337
|
|
|
168
|
-
|
|
169
|
-
|
|
338
|
+
const mastra = new Mastra({
|
|
339
|
+
...other_config,
|
|
340
|
+
observability: {
|
|
341
|
+
default: { enabled: true }
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
```
|
|
170
345
|
|
|
171
|
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
346
|
+
Also renamed a bunch of:
|
|
347
|
+
- `Tracing` things to `Observability` things.
|
|
348
|
+
- `AI-` things to just things.
|
|
174
349
|
|
|
175
|
-
-
|
|
350
|
+
- Changing getAgents -> listAgents, getTools -> listTools, getWorkflows -> listWorkflows ([#9495](https://github.com/mastra-ai/mastra/pull/9495))
|
|
176
351
|
|
|
177
|
-
-
|
|
352
|
+
- Removed old tracing code based on OpenTelemetry ([#9237](https://github.com/mastra-ai/mastra/pull/9237))
|
|
178
353
|
|
|
179
|
-
|
|
354
|
+
- Remove deprecated vector prompts and cohere provider from code ([#9596](https://github.com/mastra-ai/mastra/pull/9596))
|
|
180
355
|
|
|
181
|
-
|
|
356
|
+
- Mark as stable ([`83d5942`](https://github.com/mastra-ai/mastra/commit/83d5942669ce7bba4a6ca4fd4da697a10eb5ebdc))
|
|
182
357
|
|
|
183
|
-
-
|
|
358
|
+
- Enforcing id required on Processor primitive ([#9591](https://github.com/mastra-ai/mastra/pull/9591))
|
|
184
359
|
|
|
185
|
-
-
|
|
360
|
+
- **Breaking Changes:** ([#9045](https://github.com/mastra-ai/mastra/pull/9045))
|
|
361
|
+
- Moved `generateTitle` from `threads.generateTitle` to top-level memory option
|
|
362
|
+
- Changed default value from `true` to `false`
|
|
363
|
+
- Using `threads.generateTitle` now throws an error
|
|
186
364
|
|
|
187
|
-
|
|
365
|
+
**Migration:**
|
|
366
|
+
Replace `threads: { generateTitle: true }` with `generateTitle: true` at the top level of memory options.
|
|
188
367
|
|
|
189
|
-
|
|
368
|
+
**Playground:**
|
|
369
|
+
The playground UI now displays thread IDs instead of "Chat from" when titles aren't generated.
|
|
190
370
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
- Claude 3.5 Haiku strips `min`/`max` string constraints, sending shorter strings
|
|
194
|
-
- Validation would reject these valid responses because it checked against the original schema
|
|
371
|
+
- Renamed `MastraMessageV2` to `MastraDBMessage` ([#9255](https://github.com/mastra-ai/mastra/pull/9255))
|
|
372
|
+
Made the return format of all methods that return db messages consistent. It's always `{ messages: MastraDBMessage[] }` now, and messages can be converted after that using `@mastra/ai-sdk/ui`'s `toAISdkV4/5Messages()` function
|
|
195
373
|
|
|
196
|
-
|
|
374
|
+
- moved ai-tracing code into @mastra/observability ([#9661](https://github.com/mastra-ai/mastra/pull/9661))
|
|
197
375
|
|
|
198
|
-
-
|
|
376
|
+
- Remove legacy evals from Mastra ([#9491](https://github.com/mastra-ai/mastra/pull/9491))
|
|
199
377
|
|
|
200
|
-
-
|
|
378
|
+
- Removes deprecated input-processor type and processors. ([#9200](https://github.com/mastra-ai/mastra/pull/9200))
|
|
201
379
|
|
|
202
|
-
|
|
380
|
+
### Minor Changes
|
|
203
381
|
|
|
204
|
-
-
|
|
205
|
-
- @mastra/schema-compat@0.11.6-alpha.0
|
|
382
|
+
- **BREAKING CHANGE**: Memory scope defaults changed from 'thread' to 'resource' ([#8983](https://github.com/mastra-ai/mastra/pull/8983))
|
|
206
383
|
|
|
207
|
-
|
|
384
|
+
Both `workingMemory.scope` and `semanticRecall.scope` now default to `'resource'` instead of `'thread'`. This means:
|
|
385
|
+
- Working memory persists across all conversations for the same user/resource
|
|
386
|
+
- Semantic recall searches across all threads for the same user/resource
|
|
208
387
|
|
|
209
|
-
|
|
388
|
+
**Migration**: To maintain the previous thread-scoped behavior, explicitly set `scope: 'thread'`:
|
|
210
389
|
|
|
211
|
-
|
|
212
|
-
|
|
390
|
+
```typescript
|
|
391
|
+
memory: new Memory({
|
|
392
|
+
storage,
|
|
393
|
+
workingMemory: {
|
|
394
|
+
enabled: true,
|
|
395
|
+
scope: 'thread', // Explicitly set for thread-scoped behavior
|
|
396
|
+
},
|
|
397
|
+
semanticRecall: {
|
|
398
|
+
scope: 'thread', // Explicitly set for thread-scoped behavior
|
|
399
|
+
},
|
|
400
|
+
}),
|
|
401
|
+
```
|
|
213
402
|
|
|
214
|
-
|
|
403
|
+
See the [migration guide](https://mastra.ai/docs/guides/migrations/memory-scope-defaults) for more details.
|
|
215
404
|
|
|
216
|
-
|
|
405
|
+
Also fixed issues where playground semantic recall search could show missing or incorrect results in certain cases.
|
|
217
406
|
|
|
218
407
|
- Rename LLM span types and attributes to use Model prefix ([#9105](https://github.com/mastra-ai/mastra/pull/9105))
|
|
219
408
|
|
|
220
|
-
BREAKING CHANGE: This release renames
|
|
409
|
+
BREAKING CHANGE: This release renames tracing span types and attribute interfaces to use the "Model" prefix instead of "LLM":
|
|
221
410
|
- `AISpanType.LLM_GENERATION` → `AISpanType.MODEL_GENERATION`
|
|
222
411
|
- `AISpanType.LLM_STEP` → `AISpanType.MODEL_STEP`
|
|
223
412
|
- `AISpanType.LLM_CHUNK` → `AISpanType.MODEL_CHUNK`
|
|
@@ -235,41 +424,189 @@
|
|
|
235
424
|
|
|
236
425
|
### Patch Changes
|
|
237
426
|
|
|
427
|
+
- Add exponential backoff to model retry logic to prevent cascading failures ([#9798](https://github.com/mastra-ai/mastra/pull/9798))
|
|
428
|
+
|
|
429
|
+
When AI model calls fail, the system now implements exponential backoff (1s, 2s, 4s, 8s, max 10s) before retrying instead of immediately hammering the API. This prevents:
|
|
430
|
+
- Rate limit violations from getting worse
|
|
431
|
+
- Cascading failures across all fallback models
|
|
432
|
+
- Wasted API quota by burning through retries instantly
|
|
433
|
+
- Production outages when all models fail due to rate limits
|
|
434
|
+
|
|
435
|
+
The backoff gives APIs time to recover from transient failures and rate limiting.
|
|
436
|
+
|
|
238
437
|
- Update provider registry and model documentation with latest models and providers ([`f743dbb`](https://github.com/mastra-ai/mastra/commit/f743dbb8b40d1627b5c10c0e6fc154f4ebb6e394))
|
|
239
438
|
|
|
240
|
-
-
|
|
439
|
+
- Fix agent onChunk callback receiving wrapped chunk instead of direct chunk ([#9350](https://github.com/mastra-ai/mastra/pull/9350))
|
|
241
440
|
|
|
242
|
-
-
|
|
441
|
+
- Deprecate `runCount` parameter in favor of `retryCount` for better naming clarity. The name `runCount` was misleading as it doesn't represent the total number of times a step has run, but rather the number of retry attempts made for a step. ([#9153](https://github.com/mastra-ai/mastra/pull/9153))
|
|
243
442
|
|
|
244
|
-
|
|
443
|
+
`runCount` is available in `execute()` functions and methods that interact with the step execution. This also applies to condition functions and loop condition functions that use this parameter. If your code uses `runCount`, change the name to `retryCount`.
|
|
245
444
|
|
|
246
|
-
|
|
445
|
+
Here's an example migration:
|
|
247
446
|
|
|
248
|
-
|
|
447
|
+
```diff
|
|
448
|
+
const myStep = createStep({
|
|
449
|
+
// Rest of step...
|
|
450
|
+
- execute: async ({ runCount, ...params }) => {
|
|
451
|
+
+ execute: async ({ retryCount, ...params }) => {
|
|
452
|
+
// ... rest of your logic
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
```
|
|
249
456
|
|
|
250
|
-
|
|
251
|
-
- `AISpanType.LLM_GENERATION` → `AISpanType.MODEL_GENERATION`
|
|
252
|
-
- `AISpanType.LLM_STEP` → `AISpanType.MODEL_STEP`
|
|
253
|
-
- `AISpanType.LLM_CHUNK` → `AISpanType.MODEL_CHUNK`
|
|
254
|
-
- `LLMGenerationAttributes` → `ModelGenerationAttributes`
|
|
255
|
-
- `LLMStepAttributes` → `ModelStepAttributes`
|
|
256
|
-
- `LLMChunkAttributes` → `ModelChunkAttributes`
|
|
257
|
-
- `InternalSpans.LLM` → `InternalSpans.MODEL`
|
|
457
|
+
- Add requestContext column if it does not exist ([#9786](https://github.com/mastra-ai/mastra/pull/9786))
|
|
258
458
|
|
|
259
|
-
|
|
459
|
+
- Track usage in workflow and agent network ([#9649](https://github.com/mastra-ai/mastra/pull/9649))
|
|
260
460
|
|
|
261
|
-
|
|
262
|
-
- Update all imports: `import { ModelGenerationAttributes } from '@mastra/core/ai-tracing'`
|
|
263
|
-
- Update span type references: `AISpanType.MODEL_GENERATION`
|
|
264
|
-
- Update InternalSpans usage: `InternalSpans.MODEL`
|
|
461
|
+
- Allow resuming nested workflow step with chained id ([#9459](https://github.com/mastra-ai/mastra/pull/9459))
|
|
265
462
|
|
|
266
|
-
|
|
463
|
+
Example, you have a workflow like this
|
|
267
464
|
|
|
268
|
-
|
|
465
|
+
```
|
|
466
|
+
export const supportWorkflow = mainWorkflow.then(nestedWorkflow).commit();
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
And a step in `nestedWorkflow` is supsended, you can now also resume it any of these ways:
|
|
470
|
+
|
|
471
|
+
```
|
|
472
|
+
run.resume({
|
|
473
|
+
step: "nestedWorkflow.suspendedStep", //chained nested workflow step id and suspended step id
|
|
474
|
+
//other resume params
|
|
475
|
+
})
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
OR
|
|
479
|
+
|
|
480
|
+
```
|
|
481
|
+
run.resume({
|
|
482
|
+
step: "nestedWorkflow", // just the nested workflow step/step id
|
|
483
|
+
//other resume params
|
|
484
|
+
})
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
- Fix OpenAI schema validation errors in processors ([#9093](https://github.com/mastra-ai/mastra/pull/9093))
|
|
488
|
+
|
|
489
|
+
- Breaking change to move mcp related tool execute arguments nested under an `mcp` argument that is only populated if the tool is passed to an MCPServer. This simpliflies tool definitions and gives you the correct types when working with tools meant for MCP servers. ([#9134](https://github.com/mastra-ai/mastra/pull/9134))
|
|
490
|
+
|
|
491
|
+
- Ensure model_generation spans end before agent_run spans. ([#9251](https://github.com/mastra-ai/mastra/pull/9251))
|
|
492
|
+
|
|
493
|
+
- Fix workflow input property preservation after resume from snapshot ([#9380](https://github.com/mastra-ai/mastra/pull/9380))
|
|
494
|
+
|
|
495
|
+
Ensure that when resuming a workflow from a snapshot, the input property is correctly set from the snapshot's context input rather than from resume data. This prevents the loss of original workflow input data during suspend/resume cycles.
|
|
269
496
|
|
|
270
497
|
- Add tool call approval ([#8649](https://github.com/mastra-ai/mastra/pull/8649))
|
|
271
498
|
|
|
272
|
-
- Fix error handling and serialization in agent streaming to ensure errors are consistently exposed and preserved. ([#
|
|
499
|
+
- Fix error handling and serialization in agent streaming to ensure errors are consistently exposed and preserved. ([#9144](https://github.com/mastra-ai/mastra/pull/9144))
|
|
500
|
+
|
|
501
|
+
- Fixes issue where clicking the reset button in the model picker would fail to restore the original LanguageModelV2 (or any other types) object that was passed during agent construction. ([#9481](https://github.com/mastra-ai/mastra/pull/9481))
|
|
502
|
+
|
|
503
|
+
- Fix a bug where streaming didn't output the final chunk ([#9546](https://github.com/mastra-ai/mastra/pull/9546))
|
|
504
|
+
|
|
505
|
+
- Don't call `os.homedir()` at top level (but lazy invoke it) to accommodate sandboxed environments ([#9211](https://github.com/mastra-ai/mastra/pull/9211))
|
|
506
|
+
|
|
507
|
+
- Fix: Don't download unsupported media ([#9209](https://github.com/mastra-ai/mastra/pull/9209))
|
|
508
|
+
|
|
509
|
+
- Detect thenable objects returned by AI model providers ([#8905](https://github.com/mastra-ai/mastra/pull/8905))
|
|
510
|
+
|
|
511
|
+
- Fixes incorrect tool invocation format in message list that was causing client tools to fail during message format conversions. ([#9590](https://github.com/mastra-ai/mastra/pull/9590))
|
|
512
|
+
|
|
513
|
+
- Bug fix: Use input processors that are passed in generate or stream agent options rather than always defaulting to the processors set on the Agent class. ([#9407](https://github.com/mastra-ai/mastra/pull/9407))
|
|
514
|
+
|
|
515
|
+
- Fix tool input validation to use schema-compat transformed schemas ([#9258](https://github.com/mastra-ai/mastra/pull/9258))
|
|
516
|
+
|
|
517
|
+
Previously, tool input validation used the original Zod schema while the LLM received a schema-compat transformed version. This caused validation failures when LLMs (like OpenAI o3 or Claude 3.5 Haiku) sent arguments matching the transformed schema but not the original.
|
|
518
|
+
|
|
519
|
+
For example:
|
|
520
|
+
- OpenAI o3 reasoning models convert `.optional()` to `.nullable()`, sending `null` values
|
|
521
|
+
- Claude 3.5 Haiku strips `min`/`max` string constraints, sending shorter strings
|
|
522
|
+
- Validation would reject these valid responses because it checked against the original schema
|
|
523
|
+
|
|
524
|
+
The fix ensures validation uses the same schema-compat processed schema that was sent to the LLM, eliminating this mismatch.
|
|
525
|
+
|
|
526
|
+
- Add import for WriteableStream in execution-engine and dedupe llm.getModel in agent.ts ([#9185](https://github.com/mastra-ai/mastra/pull/9185))
|
|
527
|
+
|
|
528
|
+
- Use a shared `getAllToolPaths()` method from the bundler to discover tool paths. ([#9204](https://github.com/mastra-ai/mastra/pull/9204))
|
|
529
|
+
|
|
530
|
+
- Added support for .streamVNext and .stream that uses it in the inngest execution engine ([#9434](https://github.com/mastra-ai/mastra/pull/9434))
|
|
531
|
+
|
|
532
|
+
- pass writableStream parameter to workflow execution ([#9139](https://github.com/mastra-ai/mastra/pull/9139))
|
|
533
|
+
|
|
534
|
+
- Remove tools passed to the Routing Agent in .network() ([#9374](https://github.com/mastra-ai/mastra/pull/9374))
|
|
535
|
+
|
|
536
|
+
- Fix agent network iteration counter bug causing infinite loops ([#9762](https://github.com/mastra-ai/mastra/pull/9762))
|
|
537
|
+
|
|
538
|
+
The iteration counter in agent networks was stuck at 0 due to a faulty ternary operator that treated 0 as falsy. This prevented `maxSteps` from working correctly, causing infinite loops when the routing agent kept selecting primitives instead of returning "none".
|
|
539
|
+
|
|
540
|
+
**Changes:**
|
|
541
|
+
- Fixed iteration counter logic in `loop/network/index.ts` from `(inputData.iteration ? inputData.iteration : -1) + 1` to `(inputData.iteration ?? -1) + 1`
|
|
542
|
+
- Changed initial iteration value from `0` to `-1` so first iteration correctly starts at 0
|
|
543
|
+
- Added `checkIterations()` helper to validate iteration counting in all network tests
|
|
544
|
+
|
|
545
|
+
Fixes #9314
|
|
546
|
+
|
|
547
|
+
- Fix types from ai v4 ([#9818](https://github.com/mastra-ai/mastra/pull/9818))
|
|
548
|
+
|
|
549
|
+
- Save correct status in snapshot for all workflow parallel steps. ([#9379](https://github.com/mastra-ai/mastra/pull/9379))
|
|
550
|
+
This ensures when you poll workflow run result using `getWorkflowRunExecutionResult(runId)`, you get the right status for all parallel steps
|
|
551
|
+
|
|
552
|
+
- Prevent changing workflow status to suspended when some parallel steps are still running ([#9431](https://github.com/mastra-ai/mastra/pull/9431))
|
|
553
|
+
|
|
554
|
+
- Add ability to pass agent options when wrapping an agent with createStep. This allows configuring agent execution settings when using agents as workflow steps. ([#9199](https://github.com/mastra-ai/mastra/pull/9199))
|
|
555
|
+
|
|
556
|
+
- Fix MCP server registration ([#9802](https://github.com/mastra-ai/mastra/pull/9802))
|
|
557
|
+
|
|
558
|
+
- Fix network loop iteration counter and usage promise handling: ([#9408](https://github.com/mastra-ai/mastra/pull/9408))
|
|
559
|
+
- Fixed iteration counter in network loop that was stuck at 0 due to falsy check. Properly handled zero values to ensure maxSteps is correctly enforced.
|
|
560
|
+
- Fixed usage promise resolution in RunOutput stream by properly resolving or rejecting the promise on stream close, preventing hanging promises when streams complete.
|
|
561
|
+
|
|
562
|
+
- Remove `waitForEvent` from workflows. `waitForEvent` is now removed, please use suspend & resume flow instead. See https://mastra.ai/en/docs/workflows/suspend-and-resume for more details on suspend & resume flow. ([#9214](https://github.com/mastra-ai/mastra/pull/9214))
|
|
563
|
+
|
|
564
|
+
- Workflow validation zod v4 support ([#9319](https://github.com/mastra-ai/mastra/pull/9319))
|
|
565
|
+
|
|
566
|
+
- Use memory mock in server tests ([#9486](https://github.com/mastra-ai/mastra/pull/9486))
|
|
567
|
+
|
|
568
|
+
- Fix network routing agent smoothstreaming ([#9247](https://github.com/mastra-ai/mastra/pull/9247))
|
|
569
|
+
|
|
570
|
+
- Remove format from stream/generate ([#9577](https://github.com/mastra-ai/mastra/pull/9577))
|
|
571
|
+
|
|
572
|
+
- Fix agent network working memory tool routing. Memory tools are now included in routing agent instructions but excluded from its direct tool calls, allowing the routing agent to properly route to tool execution steps for memory updates. ([#9428](https://github.com/mastra-ai/mastra/pull/9428))
|
|
573
|
+
|
|
574
|
+
- Fix creating system messages from inside processors using processInput. ([#9469](https://github.com/mastra-ai/mastra/pull/9469))
|
|
575
|
+
|
|
576
|
+
- Fix usage tracking with agent network ([#9226](https://github.com/mastra-ai/mastra/pull/9226))
|
|
577
|
+
|
|
578
|
+
- Fix message conversion for incomplete client-side tool calls ([#9749](https://github.com/mastra-ai/mastra/pull/9749))
|
|
579
|
+
|
|
580
|
+
Fixed handling of `input-available` tool state in `sanitizeV5UIMessages()` to differentiate between two use cases:
|
|
581
|
+
1. **Response messages FROM the LLM**: Keep `input-available` states (tool calls waiting for client-side execution) in `response.messages` for proper message history.
|
|
582
|
+
2. **Prompt messages TO the LLM**: Filter out `input-available` states when sending historical messages back to the LLM, as these incomplete tool calls (without results) cause errors in the OpenAI Responses API.
|
|
583
|
+
|
|
584
|
+
The fix adds a `filterIncompleteToolCalls` parameter to control this behavior based on whether messages are being sent to or received from the LLM.
|
|
585
|
+
|
|
586
|
+
- Add `initialState` and `outputOptions` to run.stream() call. ([#9238](https://github.com/mastra-ai/mastra/pull/9238))
|
|
587
|
+
|
|
588
|
+
Example code
|
|
589
|
+
|
|
590
|
+
```
|
|
591
|
+
const run = await workflow.createRunAsync();
|
|
592
|
+
|
|
593
|
+
const streamResult = run.stream({
|
|
594
|
+
inputData: {},
|
|
595
|
+
initialState: { value: 'test-state', otherValue: 'test-other-state' },
|
|
596
|
+
outputOptions: { includeState: true },
|
|
597
|
+
});
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
Then the result from the stream will include the final state information
|
|
601
|
+
|
|
602
|
+
```
|
|
603
|
+
const executionResult = await streamResult.result;
|
|
604
|
+
console.log(executionResult.state)
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
- Updated dependencies [[`b9b7ffd`](https://github.com/mastra-ai/mastra/commit/b9b7ffdad6936a7d50b6b814b5bbe54e19087f66), [`dd1c38d`](https://github.com/mastra-ai/mastra/commit/dd1c38d1b75f1b695c27b40d8d9d6ed00d5e0f6f), [`83b08dc`](https://github.com/mastra-ai/mastra/commit/83b08dcf1bfcc915efab23c09207df90fa247908), [`f0f8f12`](https://github.com/mastra-ai/mastra/commit/f0f8f125c308f2d0fd36942ef652fd852df7522f), [`f111eac`](https://github.com/mastra-ai/mastra/commit/f111eac5de509b2e5fccfc1882e7f74cda264c74), [`51acef9`](https://github.com/mastra-ai/mastra/commit/51acef95b5977826594fe3ee24475842bd3d5780), [`eb09742`](https://github.com/mastra-ai/mastra/commit/eb09742197f66c4c38154c3beec78313e69760b2), [`354ad0b`](https://github.com/mastra-ai/mastra/commit/354ad0b7b1b8183ac567f236a884fc7ede6d7138), [`83d5942`](https://github.com/mastra-ai/mastra/commit/83d5942669ce7bba4a6ca4fd4da697a10eb5ebdc), [`a0c8c1b`](https://github.com/mastra-ai/mastra/commit/a0c8c1b87d4fee252aebda73e8637fbe01d761c9)]:
|
|
608
|
+
- @mastra/schema-compat@1.0.0-beta.0
|
|
609
|
+
- @mastra/observability@1.0.0-beta.0
|
|
273
610
|
|
|
274
611
|
## 0.22.2
|
|
275
612
|
|