@mastra/core 1.0.0-beta.11 → 1.0.0-beta.14
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 +343 -0
- package/dist/_types/@internal_ai-sdk-v4/dist/index.d.ts +7549 -0
- package/dist/_types/@internal_ai-sdk-v4/dist/test.d.ts +65 -0
- package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +8396 -0
- package/dist/_types/@internal_ai-sdk-v5/dist/test.d.ts +1708 -0
- package/dist/_types/@internal_external-types/dist/index.d.ts +858 -0
- package/dist/agent/agent-legacy.d.ts +1 -1
- package/dist/agent/agent.d.ts +3 -3
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.types.d.ts +11 -8
- package/dist/agent/agent.types.d.ts.map +1 -1
- package/dist/agent/index.cjs +17 -9
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/index.cjs +3 -3
- package/dist/agent/message-list/index.d.ts +4 -3
- package/dist/agent/message-list/index.d.ts.map +1 -1
- package/dist/agent/message-list/index.js +1 -1
- package/dist/agent/message-list/prompt/attachments-to-parts.d.ts +1 -1
- package/dist/agent/message-list/prompt/invalid-content-error.d.ts +1 -1
- package/dist/agent/message-list/types.d.ts +3 -3
- 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 +1 -1
- package/dist/agent/message-list/utils/ai-v4-v5/ui-message.d.ts +1 -1
- package/dist/agent/message-list/utils/ai-v5/gemini-compatibility.d.ts +2 -2
- 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 +2 -2
- package/dist/agent/message-list/utils/convert-messages.d.ts.map +1 -1
- package/dist/agent/trip-wire.d.ts +2 -2
- package/dist/agent/trip-wire.d.ts.map +1 -1
- package/dist/agent/types.d.ts +3 -3
- package/dist/agent/utils.d.ts +7 -4
- package/dist/agent/utils.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/index.d.ts +4 -3
- package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts +3 -3
- 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 +3 -3
- 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 +3 -3
- package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/stream-step.d.ts +3 -1
- package/dist/agent/workflows/prepare-stream/stream-step.d.ts.map +1 -1
- package/dist/bundler/types.d.ts +15 -1
- package/dist/bundler/types.d.ts.map +1 -1
- package/dist/chunk-2AU5ZHBL.js +79 -0
- package/dist/chunk-2AU5ZHBL.js.map +1 -0
- package/dist/chunk-2SQB3WBT.js +4574 -0
- package/dist/chunk-2SQB3WBT.js.map +1 -0
- package/dist/{chunk-THZTRBFS.js → chunk-373OC54J.js} +8 -8
- package/dist/chunk-373OC54J.js.map +1 -0
- package/dist/{chunk-US2U7ECW.js → chunk-3IP3DZ7G.js} +234 -101
- package/dist/chunk-3IP3DZ7G.js.map +1 -0
- package/dist/{chunk-SXNQRJQD.js → chunk-4AT6YQKZ.js} +26 -20
- package/dist/chunk-4AT6YQKZ.js.map +1 -0
- package/dist/{chunk-C36YRTZ6.js → chunk-4CMIJQF6.js} +117 -114
- package/dist/chunk-4CMIJQF6.js.map +1 -0
- package/dist/chunk-53SZJCBX.cjs +4888 -0
- package/dist/chunk-53SZJCBX.cjs.map +1 -0
- package/dist/chunk-55VPMN3N.js +250 -0
- package/dist/chunk-55VPMN3N.js.map +1 -0
- package/dist/{chunk-QM5SRDJX.js → chunk-5PTZG26U.js} +66 -84
- package/dist/chunk-5PTZG26U.js.map +1 -0
- package/dist/{chunk-U3XOLEPX.js → chunk-5UQ5TB6J.js} +6 -32
- package/dist/chunk-5UQ5TB6J.js.map +1 -0
- package/dist/{chunk-O2BJW7YA.js → chunk-67LM2UCT.js} +9 -9
- package/dist/chunk-67LM2UCT.js.map +1 -0
- package/dist/{chunk-YC6PJEPH.cjs → chunk-6CG7IY57.cjs} +266 -133
- package/dist/chunk-6CG7IY57.cjs.map +1 -0
- package/dist/chunk-6PMMP3FR.js +7 -0
- package/dist/chunk-6PMMP3FR.js.map +1 -0
- package/dist/{chunk-DZUJEN5N.cjs → chunk-6SZKM6EC.cjs} +10 -3
- package/dist/{chunk-DZUJEN5N.cjs.map → chunk-6SZKM6EC.cjs.map} +1 -1
- package/dist/{chunk-5Q6WAYEY.cjs → chunk-72E3YF6A.cjs} +35 -49
- package/dist/chunk-72E3YF6A.cjs.map +1 -0
- package/dist/{chunk-5WRI5ZAA.js → chunk-7D4SUZUM.js} +10 -4
- package/dist/{chunk-5WRI5ZAA.js.map → chunk-7D4SUZUM.js.map} +1 -1
- package/dist/{chunk-7P6BNIJH.js → chunk-AYBJ5GAD.js} +281 -35
- package/dist/chunk-AYBJ5GAD.js.map +1 -0
- package/dist/chunk-D22XABFZ.js +79 -0
- package/dist/chunk-D22XABFZ.js.map +1 -0
- package/dist/{chunk-SCUWP4II.cjs → chunk-DBW6S25C.cjs} +47 -74
- package/dist/chunk-DBW6S25C.cjs.map +1 -0
- package/dist/{chunk-MRFUISXC.cjs → chunk-EGHGFLL3.cjs} +2631 -179
- package/dist/chunk-EGHGFLL3.cjs.map +1 -0
- package/dist/{chunk-BJXKH4LG.cjs → chunk-ETWAR2YE.cjs} +43 -78
- package/dist/chunk-ETWAR2YE.cjs.map +1 -0
- package/dist/{chunk-CZEJQSWB.cjs → chunk-F75EQ574.cjs} +65 -6
- package/dist/chunk-F75EQ574.cjs.map +1 -0
- package/dist/{chunk-BUKY6CTR.cjs → chunk-FPDJ4XN6.cjs} +282 -36
- package/dist/chunk-FPDJ4XN6.cjs.map +1 -0
- package/dist/chunk-FST2G2FQ.cjs +84 -0
- package/dist/chunk-FST2G2FQ.cjs.map +1 -0
- package/dist/chunk-FVQTJUBD.cjs +2120 -0
- package/dist/chunk-FVQTJUBD.cjs.map +1 -0
- package/dist/chunk-G6E6V2Z4.js +2070 -0
- package/dist/chunk-G6E6V2Z4.js.map +1 -0
- package/dist/{chunk-JIGDJK2O.js → chunk-GBQXIVL6.js} +4 -39
- package/dist/chunk-GBQXIVL6.js.map +1 -0
- package/dist/{chunk-F2GAJSBI.js → chunk-GELVUDUY.js} +11 -8
- package/dist/chunk-GELVUDUY.js.map +1 -0
- package/dist/chunk-GVAPYQRO.cjs +252 -0
- package/dist/chunk-GVAPYQRO.cjs.map +1 -0
- package/dist/{chunk-TWH4PTDG.cjs → chunk-HWMMIRIF.cjs} +32 -27
- package/dist/chunk-HWMMIRIF.cjs.map +1 -0
- package/dist/{chunk-52RSUALV.cjs → chunk-JAGQZZ43.cjs} +1660 -1196
- package/dist/chunk-JAGQZZ43.cjs.map +1 -0
- package/dist/{chunk-PK2A5WBG.js → chunk-K66U47VL.js} +54 -7
- package/dist/chunk-K66U47VL.js.map +1 -0
- package/dist/chunk-L3NKIMF5.cjs +10 -0
- package/dist/chunk-L3NKIMF5.cjs.map +1 -0
- package/dist/chunk-L4JCRWDY.cjs +252 -0
- package/dist/chunk-L4JCRWDY.cjs.map +1 -0
- package/dist/{chunk-IVV5TOMD.js → chunk-LDXKZYOV.js} +31 -11
- package/dist/chunk-LDXKZYOV.js.map +1 -0
- package/dist/chunk-NESKUIRE.cjs +4586 -0
- package/dist/chunk-NESKUIRE.cjs.map +1 -0
- package/dist/{chunk-SVLMF4UZ.cjs → chunk-NIOEY3N3.cjs} +66 -85
- package/dist/chunk-NIOEY3N3.cjs.map +1 -0
- package/dist/{chunk-PG5H6QIO.cjs → chunk-O3ULBGV6.cjs} +40 -20
- package/dist/chunk-O3ULBGV6.cjs.map +1 -0
- package/dist/{chunk-WTSZBHIZ.cjs → chunk-O5BQBZEF.cjs} +28 -28
- package/dist/chunk-O5BQBZEF.cjs.map +1 -0
- package/dist/{chunk-4JKEUSCC.cjs → chunk-OOUFPYSX.cjs} +25 -22
- package/dist/chunk-OOUFPYSX.cjs.map +1 -0
- package/dist/chunk-QDVYP2T7.js +4883 -0
- package/dist/chunk-QDVYP2T7.js.map +1 -0
- package/dist/{chunk-2ULLRN4Y.js → chunk-QF4MHFSU.js} +1294 -834
- package/dist/chunk-QF4MHFSU.js.map +1 -0
- package/dist/{chunk-Z57R5WS4.js → chunk-SLBWA2F3.js} +4 -4
- package/dist/{chunk-Z57R5WS4.js.map → chunk-SLBWA2F3.js.map} +1 -1
- package/dist/chunk-ST7NBF4H.cjs +84 -0
- package/dist/chunk-ST7NBF4H.cjs.map +1 -0
- package/dist/{chunk-YWMMBIOM.cjs → chunk-TDM43G4I.cjs} +15 -15
- package/dist/{chunk-YWMMBIOM.cjs.map → chunk-TDM43G4I.cjs.map} +1 -1
- package/dist/{chunk-S73Z3PBJ.cjs → chunk-TRUNX3AX.cjs} +138 -134
- package/dist/chunk-TRUNX3AX.cjs.map +1 -0
- package/dist/chunk-VE6HQ7H6.js +250 -0
- package/dist/chunk-VE6HQ7H6.js.map +1 -0
- package/dist/{chunk-OEIVMCWX.js → chunk-VZJOEGQA.js} +2536 -84
- package/dist/chunk-VZJOEGQA.js.map +1 -0
- package/dist/{chunk-JJ5O45LH.js → chunk-YPLZDWG7.js} +32 -27
- package/dist/chunk-YPLZDWG7.js.map +1 -0
- package/dist/{chunk-MGCGWPQJ.cjs → chunk-Z55SJVEC.cjs} +8 -8
- package/dist/chunk-Z55SJVEC.cjs.map +1 -0
- package/dist/error/index.cjs +6 -6
- package/dist/error/index.d.ts +26 -20
- package/dist/error/index.d.ts.map +1 -1
- package/dist/error/index.js +1 -1
- package/dist/error/utils.d.ts +19 -5
- package/dist/error/utils.d.ts.map +1 -1
- package/dist/evals/index.cjs +4 -4
- package/dist/evals/index.js +1 -1
- package/dist/evals/run/index.d.ts +1 -1
- package/dist/evals/run/index.d.ts.map +1 -1
- package/dist/evals/scoreTraces/index.cjs +8 -8
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/evals/types.d.ts +1 -1
- package/dist/events/event-emitter.d.ts +6 -1
- package/dist/events/event-emitter.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/integration/index.cjs +2 -2
- package/dist/integration/index.js +1 -1
- package/dist/llm/index.cjs +15 -15
- package/dist/llm/index.d.ts +2 -2
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +5 -5
- package/dist/llm/model/aisdk/generate-to-stream.d.ts +20 -0
- package/dist/llm/model/aisdk/generate-to-stream.d.ts.map +1 -0
- package/dist/llm/model/aisdk/v5/model.d.ts +5 -1
- package/dist/llm/model/aisdk/v5/model.d.ts.map +1 -1
- package/dist/llm/model/aisdk/v6/model.d.ts +51 -0
- package/dist/llm/model/aisdk/v6/model.d.ts.map +1 -0
- package/dist/llm/model/base.types.d.ts +2 -2
- package/dist/llm/model/model.d.ts +1 -1
- package/dist/llm/model/model.d.ts.map +1 -1
- package/dist/llm/model/model.loop.d.ts +3 -3
- package/dist/llm/model/model.loop.d.ts.map +1 -1
- package/dist/llm/model/model.loop.types.d.ts +1 -1
- package/dist/llm/model/model.loop.types.d.ts.map +1 -1
- package/dist/llm/model/provider-types.generated.d.ts +135 -11
- package/dist/llm/model/resolve-model.d.ts +2 -2
- package/dist/llm/model/resolve-model.d.ts.map +1 -1
- package/dist/llm/model/shared.types.d.ts +19 -8
- package/dist/llm/model/shared.types.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 +2 -2
- package/dist/loop/loop.d.ts.map +1 -1
- package/dist/loop/network/index.d.ts +2 -2
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/loop/test-utils/MastraLanguageModelV2Mock.d.ts +2 -2
- package/dist/loop/test-utils/MastraLanguageModelV2Mock.d.ts.map +1 -1
- package/dist/loop/test-utils/MastraLanguageModelV3Mock.d.ts +37 -0
- package/dist/loop/test-utils/MastraLanguageModelV3Mock.d.ts.map +1 -0
- package/dist/loop/test-utils/fullStream.d.ts +2 -1
- package/dist/loop/test-utils/fullStream.d.ts.map +1 -1
- package/dist/loop/test-utils/options.d.ts.map +1 -1
- package/dist/loop/test-utils/resultObject.d.ts +2 -1
- package/dist/loop/test-utils/resultObject.d.ts.map +1 -1
- package/dist/loop/test-utils/streamObject.d.ts +1 -1
- package/dist/loop/test-utils/streamObject.d.ts.map +1 -1
- package/dist/loop/test-utils/tools.d.ts.map +1 -1
- package/dist/loop/test-utils/utils-v3.d.ts +55 -0
- package/dist/loop/test-utils/utils-v3.d.ts.map +1 -0
- package/dist/loop/types.d.ts +8 -7
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/index.d.ts +49 -49
- package/dist/loop/workflows/agentic-execution/index.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +34 -34
- 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 +17 -17
- 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 +22 -21
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-loop/index.d.ts +49 -49
- package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
- package/dist/loop/workflows/run-state.d.ts +2 -2
- package/dist/loop/workflows/run-state.d.ts.map +1 -1
- package/dist/loop/workflows/schema.d.ts +18 -18
- package/dist/loop/workflows/schema.d.ts.map +1 -1
- package/dist/loop/workflows/stream.d.ts +2 -2
- package/dist/loop/workflows/stream.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/mcp/index.cjs +4 -4
- package/dist/mcp/index.js +1 -1
- package/dist/memory/index.cjs +6 -6
- package/dist/memory/index.js +1 -1
- package/dist/memory/memory.d.ts +1 -1
- package/dist/memory/types.d.ts +3 -3
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/models-dev-E3WWI7VA.js +3 -0
- package/dist/{models-dev-23RN2WHG.js.map → models-dev-E3WWI7VA.js.map} +1 -1
- package/dist/models-dev-PPS7X4JM.cjs +12 -0
- package/dist/{models-dev-EO3SUIY2.cjs.map → models-dev-PPS7X4JM.cjs.map} +1 -1
- package/dist/netlify-TY656UYF.js +3 -0
- package/dist/{netlify-GXJ5D5DD.js.map → netlify-TY656UYF.js.map} +1 -1
- package/dist/netlify-VZFM5UH3.cjs +12 -0
- package/dist/{netlify-KJLY3GFS.cjs.map → netlify-VZFM5UH3.cjs.map} +1 -1
- package/dist/processors/index.cjs +37 -37
- package/dist/processors/index.d.ts +9 -9
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/processors/index.js +1 -1
- package/dist/processors/runner.d.ts.map +1 -1
- package/dist/processors/step-schema.d.ts +1293 -1293
- package/dist/processors/step-schema.d.ts.map +1 -1
- package/dist/provider-registry-NXVD764B.js +3 -0
- package/dist/{provider-registry-F67Y6OF2.js.map → provider-registry-NXVD764B.js.map} +1 -1
- package/dist/provider-registry-ZIWSEUQE.cjs +40 -0
- package/dist/{provider-registry-3TG2KUD2.cjs.map → provider-registry-ZIWSEUQE.cjs.map} +1 -1
- package/dist/provider-registry.json +276 -30
- package/dist/{registry-generator-UMTNPBJX.js → registry-generator-AVQXI3GX.js} +2 -2
- package/dist/{registry-generator-UMTNPBJX.js.map → registry-generator-AVQXI3GX.js.map} +1 -1
- package/dist/{registry-generator-34SC4TAU.cjs → registry-generator-KOFNIIWJ.cjs} +2 -2
- package/dist/{registry-generator-34SC4TAU.cjs.map → registry-generator-KOFNIIWJ.cjs.map} +1 -1
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.cjs.map +1 -1
- package/dist/relevance/index.js +2 -2
- package/dist/relevance/index.js.map +1 -1
- package/dist/server/index.cjs +5 -5
- package/dist/server/index.js +1 -1
- package/dist/storage/base.d.ts +2 -10
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/domains/workflows/base.d.ts +2 -8
- package/dist/storage/domains/workflows/base.d.ts.map +1 -1
- package/dist/storage/domains/workflows/inmemory.d.ts +2 -8
- package/dist/storage/domains/workflows/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +38 -38
- package/dist/storage/index.js +1 -1
- package/dist/storage/mock.d.ts +2 -8
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/types.d.ts +9 -1
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/RunOutput.d.ts +1 -1
- package/dist/stream/aisdk/v4/input.d.ts +1 -1
- package/dist/stream/aisdk/v5/compat/content.d.ts +1 -1
- package/dist/stream/aisdk/v5/compat/content.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/compat/prepare-tools.d.ts +1 -1
- package/dist/stream/aisdk/v5/compat/prepare-tools.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/compat/ui-message.d.ts +1 -1
- package/dist/stream/aisdk/v5/compat/ui-message.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/compat/validation.d.ts +1 -1
- package/dist/stream/aisdk/v5/compat/validation.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/execute.d.ts +6 -6
- package/dist/stream/aisdk/v5/execute.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/input.d.ts +1 -1
- package/dist/stream/aisdk/v5/input.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/output-helpers.d.ts +12 -27
- package/dist/stream/aisdk/v5/output-helpers.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/output.d.ts +41 -91
- package/dist/stream/aisdk/v5/output.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/transform.d.ts +1 -1
- package/dist/stream/aisdk/v5/transform.d.ts.map +1 -1
- package/dist/stream/base/input.d.ts +1 -1
- package/dist/stream/base/output.d.ts +16 -36
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/base/schema.d.ts +2 -2
- package/dist/stream/base/schema.d.ts.map +1 -1
- package/dist/stream/index.cjs +12 -12
- package/dist/stream/index.js +2 -2
- package/dist/stream/types.d.ts +32 -23
- package/dist/stream/types.d.ts.map +1 -1
- package/dist/test-utils/llm-mock.cjs +14587 -14
- package/dist/test-utils/llm-mock.cjs.map +1 -1
- package/dist/test-utils/llm-mock.d.ts +3 -3
- package/dist/test-utils/llm-mock.d.ts.map +1 -1
- package/dist/test-utils/llm-mock.js +14577 -4
- package/dist/test-utils/llm-mock.js.map +1 -1
- package/dist/token-6GSAFR2W-LTZ7QQUP.js +61 -0
- package/dist/token-6GSAFR2W-LTZ7QQUP.js.map +1 -0
- package/dist/token-6GSAFR2W-SGVIXFCP.cjs +63 -0
- package/dist/token-6GSAFR2W-SGVIXFCP.cjs.map +1 -0
- package/dist/token-6GSAFR2W-SPYPLMBM.js +61 -0
- package/dist/token-6GSAFR2W-SPYPLMBM.js.map +1 -0
- package/dist/token-6GSAFR2W-UEEINYAN.cjs +63 -0
- package/dist/token-6GSAFR2W-UEEINYAN.cjs.map +1 -0
- package/dist/token-util-NEHG7TUY-7GMW5FXI.cjs +10 -0
- package/dist/token-util-NEHG7TUY-7GMW5FXI.cjs.map +1 -0
- package/dist/token-util-NEHG7TUY-JRJTGTAB.js +8 -0
- package/dist/token-util-NEHG7TUY-JRJTGTAB.js.map +1 -0
- package/dist/token-util-NEHG7TUY-QTFZ26EN.js +8 -0
- package/dist/token-util-NEHG7TUY-QTFZ26EN.js.map +1 -0
- package/dist/token-util-NEHG7TUY-WZL2DNCG.cjs +10 -0
- package/dist/token-util-NEHG7TUY-WZL2DNCG.cjs.map +1 -0
- 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 +2 -1
- package/dist/tools/tool-builder/builder.d.ts.map +1 -1
- package/dist/tools/tool.d.ts.map +1 -1
- package/dist/tools/types.d.ts +5 -5
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/utils.cjs +22 -22
- package/dist/utils.d.ts +5 -5
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/vector/embed.d.ts +3 -2
- package/dist/vector/embed.d.ts.map +1 -1
- package/dist/vector/index.cjs +5316 -16
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.js +5282 -4
- package/dist/vector/index.js.map +1 -1
- package/dist/vector/vector.d.ts +15 -2
- package/dist/vector/vector.d.ts.map +1 -1
- package/dist/voice/aisdk/speech.d.ts +1 -1
- package/dist/voice/aisdk/speech.d.ts.map +1 -1
- package/dist/voice/aisdk/transcription.d.ts +1 -1
- package/dist/voice/aisdk/transcription.d.ts.map +1 -1
- package/dist/voice/composite-voice.d.ts +1 -1
- package/dist/voice/composite-voice.d.ts.map +1 -1
- package/dist/voice/index.cjs +6 -6
- package/dist/voice/index.js +1 -1
- package/dist/workflows/constants.cjs +4 -4
- package/dist/workflows/constants.d.ts +1 -1
- package/dist/workflows/constants.d.ts.map +1 -1
- package/dist/workflows/constants.js +1 -1
- package/dist/workflows/default.d.ts +9 -16
- package/dist/workflows/default.d.ts.map +1 -1
- package/dist/workflows/evented/execution-engine.d.ts +3 -2
- 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 +5 -1
- package/dist/workflows/evented/step-executor.d.ts.map +1 -1
- package/dist/workflows/evented/workflow-event-processor/index.d.ts +16 -1
- package/dist/workflows/evented/workflow-event-processor/index.d.ts.map +1 -1
- package/dist/workflows/evented/workflow.d.ts +20 -0
- package/dist/workflows/evented/workflow.d.ts.map +1 -1
- package/dist/workflows/execution-engine.d.ts +25 -2
- package/dist/workflows/execution-engine.d.ts.map +1 -1
- package/dist/workflows/handlers/control-flow.d.ts +6 -5
- package/dist/workflows/handlers/control-flow.d.ts.map +1 -1
- package/dist/workflows/handlers/entry.d.ts +5 -3
- package/dist/workflows/handlers/entry.d.ts.map +1 -1
- package/dist/workflows/handlers/sleep.d.ts +4 -3
- package/dist/workflows/handlers/sleep.d.ts.map +1 -1
- package/dist/workflows/handlers/step.d.ts +5 -3
- package/dist/workflows/handlers/step.d.ts.map +1 -1
- package/dist/workflows/index.cjs +26 -22
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/step.d.ts +5 -4
- package/dist/workflows/step.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +66 -14
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/utils.d.ts +11 -0
- package/dist/workflows/utils.d.ts.map +1 -1
- package/dist/workflows/workflow.d.ts +30 -9
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/package.json +13 -14
- package/src/llm/model/provider-types.generated.d.ts +135 -11
- package/dist/agent/__tests__/mock-model.d.ts +0 -8
- package/dist/agent/__tests__/mock-model.d.ts.map +0 -1
- package/dist/agent/agent-types.test-d.d.ts +0 -2
- package/dist/agent/agent-types.test-d.d.ts.map +0 -1
- package/dist/ai-sdk.types.d.ts +0 -4705
- package/dist/chunk-2ULLRN4Y.js.map +0 -1
- package/dist/chunk-3E3ILV6T.cjs +0 -518
- package/dist/chunk-3E3ILV6T.cjs.map +0 -1
- package/dist/chunk-4JKEUSCC.cjs.map +0 -1
- package/dist/chunk-52RSUALV.cjs.map +0 -1
- package/dist/chunk-5PAEYE3Q.js +0 -513
- package/dist/chunk-5PAEYE3Q.js.map +0 -1
- package/dist/chunk-5Q6WAYEY.cjs.map +0 -1
- package/dist/chunk-7P6BNIJH.js.map +0 -1
- package/dist/chunk-ABJOUEVA.cjs +0 -10
- package/dist/chunk-ABJOUEVA.cjs.map +0 -1
- package/dist/chunk-BJXKH4LG.cjs.map +0 -1
- package/dist/chunk-BUKY6CTR.cjs.map +0 -1
- package/dist/chunk-C36YRTZ6.js.map +0 -1
- package/dist/chunk-CZEJQSWB.cjs.map +0 -1
- package/dist/chunk-F2GAJSBI.js.map +0 -1
- package/dist/chunk-IVV5TOMD.js.map +0 -1
- package/dist/chunk-JIGDJK2O.js.map +0 -1
- package/dist/chunk-JJ5O45LH.js.map +0 -1
- package/dist/chunk-MGCGWPQJ.cjs.map +0 -1
- package/dist/chunk-MRFUISXC.cjs.map +0 -1
- package/dist/chunk-NLNKQD2T.js +0 -7
- package/dist/chunk-NLNKQD2T.js.map +0 -1
- package/dist/chunk-O2BJW7YA.js.map +0 -1
- package/dist/chunk-OEIVMCWX.js.map +0 -1
- package/dist/chunk-PG5H6QIO.cjs.map +0 -1
- package/dist/chunk-PK2A5WBG.js.map +0 -1
- package/dist/chunk-QM5SRDJX.js.map +0 -1
- package/dist/chunk-S73Z3PBJ.cjs.map +0 -1
- package/dist/chunk-SCUWP4II.cjs.map +0 -1
- package/dist/chunk-SVLMF4UZ.cjs.map +0 -1
- package/dist/chunk-SXNQRJQD.js.map +0 -1
- package/dist/chunk-THZTRBFS.js.map +0 -1
- package/dist/chunk-TWH4PTDG.cjs.map +0 -1
- package/dist/chunk-U3XOLEPX.js.map +0 -1
- package/dist/chunk-US2U7ECW.js.map +0 -1
- package/dist/chunk-WTSZBHIZ.cjs.map +0 -1
- package/dist/chunk-YC6PJEPH.cjs.map +0 -1
- package/dist/llm/model/is-v2-model.d.ts +0 -3
- package/dist/llm/model/is-v2-model.d.ts.map +0 -1
- package/dist/models-dev-23RN2WHG.js +0 -3
- package/dist/models-dev-EO3SUIY2.cjs +0 -12
- package/dist/netlify-GXJ5D5DD.js +0 -3
- package/dist/netlify-KJLY3GFS.cjs +0 -12
- package/dist/provider-registry-3TG2KUD2.cjs +0 -40
- package/dist/provider-registry-F67Y6OF2.js +0 -3
- package/dist/tools/tool-stream-types.test-d.d.ts +0 -2
- package/dist/tools/tool-stream-types.test-d.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,348 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.14
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add support for AI SDK v6 (LanguageModelV3) ([#11191](https://github.com/mastra-ai/mastra/pull/11191))
|
|
8
|
+
|
|
9
|
+
Agents can now use `LanguageModelV3` models from AI SDK v6 beta providers like `@ai-sdk/openai@^3.0.0-beta`.
|
|
10
|
+
|
|
11
|
+
**New features:**
|
|
12
|
+
- Usage normalization: V3's nested usage format is normalized to Mastra's flat format with `reasoningTokens`, `cachedInputTokens`, and raw data preserved in a `raw` field
|
|
13
|
+
|
|
14
|
+
**Backward compatible:** All existing V1 and V2 models continue to work unchanged.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Fix model-level and runtime header support for LLM calls ([#11275](https://github.com/mastra-ai/mastra/pull/11275))
|
|
19
|
+
|
|
20
|
+
This fixes a bug where custom headers configured on models (like `anthropic-beta`) were not being passed through to the underlying AI SDK calls. The fix properly handles headers from multiple sources with correct priority:
|
|
21
|
+
|
|
22
|
+
**Header Priority (low to high):**
|
|
23
|
+
1. Model config headers - Headers set in model configuration
|
|
24
|
+
2. ModelSettings headers - Runtime headers that override model config
|
|
25
|
+
3. Provider-level headers - Headers baked into AI SDK providers (not overridden)
|
|
26
|
+
|
|
27
|
+
**Examples that now work:**
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
// Model config headers
|
|
31
|
+
new Agent({
|
|
32
|
+
model: {
|
|
33
|
+
id: 'anthropic/claude-4-5-sonnet',
|
|
34
|
+
headers: { 'anthropic-beta': 'context-1m-2025-08-07' },
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Runtime headers override config
|
|
39
|
+
agent.generate('...', {
|
|
40
|
+
modelSettings: { headers: { 'x-custom': 'runtime-value' } },
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Provider-level headers preserved
|
|
44
|
+
const openai = createOpenAI({ headers: { 'openai-organization': 'org-123' } });
|
|
45
|
+
new Agent({ model: openai('gpt-4o-mini') });
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- Fixed AbortSignal not propagating from parent workflows to nested sub-workflows in the evented workflow engine. ([#11142](https://github.com/mastra-ai/mastra/pull/11142))
|
|
49
|
+
|
|
50
|
+
Previously, canceling a parent workflow did not stop nested sub-workflows, causing them to continue running and consuming resources after the parent was canceled.
|
|
51
|
+
|
|
52
|
+
Now, when you cancel a parent workflow, all nested sub-workflows are automatically canceled as well, ensuring clean termination of the entire workflow tree.
|
|
53
|
+
|
|
54
|
+
**Example:**
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
const parentWorkflow = createWorkflow({ id: 'parent-workflow' }).then(someStep).then(nestedChildWorkflow).commit();
|
|
58
|
+
|
|
59
|
+
const run = await parentWorkflow.createRun();
|
|
60
|
+
const resultPromise = run.start({ inputData: { value: 5 } });
|
|
61
|
+
|
|
62
|
+
// Cancel the parent workflow - nested workflows will also be canceled
|
|
63
|
+
await run.cancel();
|
|
64
|
+
// or use: run.abortController.abort();
|
|
65
|
+
|
|
66
|
+
const result = await resultPromise;
|
|
67
|
+
// result.status === 'canceled'
|
|
68
|
+
// All nested child workflows are also canceled
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Related to #11063
|
|
72
|
+
|
|
73
|
+
- Fix empty overrideScorers causing error instead of skipping scoring ([#11257](https://github.com/mastra-ai/mastra/pull/11257))
|
|
74
|
+
|
|
75
|
+
When `overrideScorers` was passed as an empty object `{}`, the agent would throw a "No scorers found" error. Now an empty object explicitly skips scoring, while `undefined` continues to use default scorers.
|
|
76
|
+
|
|
77
|
+
- feat: Add field filtering and nested workflow control to workflow execution result endpoint ([#11246](https://github.com/mastra-ai/mastra/pull/11246))
|
|
78
|
+
|
|
79
|
+
Adds two optional query parameters to `/api/workflows/:workflowId/runs/:runId/execution-result` endpoint:
|
|
80
|
+
- `fields`: Request only specific fields (e.g., `status`, `result`, `error`)
|
|
81
|
+
- `withNestedWorkflows`: Control whether to fetch nested workflow data
|
|
82
|
+
|
|
83
|
+
This significantly reduces response payload size and improves response times for large workflows.
|
|
84
|
+
|
|
85
|
+
## Server Endpoint Usage
|
|
86
|
+
|
|
87
|
+
```http
|
|
88
|
+
# Get only status (minimal payload - fastest)
|
|
89
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status
|
|
90
|
+
|
|
91
|
+
# Get status and result
|
|
92
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,result
|
|
93
|
+
|
|
94
|
+
# Get all fields but without nested workflow data (faster)
|
|
95
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result?withNestedWorkflows=false
|
|
96
|
+
|
|
97
|
+
# Get only specific fields without nested workflow data
|
|
98
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,steps&withNestedWorkflows=false
|
|
99
|
+
|
|
100
|
+
# Get full data (default behavior)
|
|
101
|
+
GET /api/workflows/:workflowId/runs/:runId/execution-result
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Client SDK Usage
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
import { MastraClient } from '@mastra/client-js';
|
|
108
|
+
|
|
109
|
+
const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
|
|
110
|
+
const workflow = client.getWorkflow('myWorkflow');
|
|
111
|
+
|
|
112
|
+
// Get only status (minimal payload - fastest)
|
|
113
|
+
const statusOnly = await workflow.runExecutionResult(runId, {
|
|
114
|
+
fields: ['status'],
|
|
115
|
+
});
|
|
116
|
+
console.log(statusOnly.status); // 'success' | 'failed' | 'running' | etc.
|
|
117
|
+
|
|
118
|
+
// Get status and result
|
|
119
|
+
const statusAndResult = await workflow.runExecutionResult(runId, {
|
|
120
|
+
fields: ['status', 'result'],
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// Get all fields but without nested workflow data (faster)
|
|
124
|
+
const resultWithoutNested = await workflow.runExecutionResult(runId, {
|
|
125
|
+
withNestedWorkflows: false,
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// Get specific fields without nested workflow data
|
|
129
|
+
const optimized = await workflow.runExecutionResult(runId, {
|
|
130
|
+
fields: ['status', 'steps'],
|
|
131
|
+
withNestedWorkflows: false,
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// Get full execution result (default behavior)
|
|
135
|
+
const fullResult = await workflow.runExecutionResult(runId);
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Core API Changes
|
|
139
|
+
|
|
140
|
+
The `Workflow.getWorkflowRunExecutionResult` method now accepts an options object:
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
await workflow.getWorkflowRunExecutionResult(runId, {
|
|
144
|
+
withNestedWorkflows: false, // default: true, set to false to skip nested workflow data
|
|
145
|
+
fields: ['status', 'result'], // optional field filtering
|
|
146
|
+
});
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Inngest Compatibility
|
|
150
|
+
|
|
151
|
+
The `@mastra/inngest` package has been updated to use the new options object API. This is a non-breaking internal change - no action required from inngest workflow users.
|
|
152
|
+
|
|
153
|
+
## Performance Impact
|
|
154
|
+
|
|
155
|
+
For workflows with large step outputs:
|
|
156
|
+
- Requesting only `status`: ~99% reduction in payload size
|
|
157
|
+
- Requesting `status,result,error`: ~95% reduction in payload size
|
|
158
|
+
- Using `withNestedWorkflows=false`: Avoids expensive nested workflow data fetching
|
|
159
|
+
- Combining both: Maximum performance optimization
|
|
160
|
+
|
|
161
|
+
- Removed a debug log that printed large Zod schemas, resulting in cleaner console output when using agents with memory enabled. ([#11279](https://github.com/mastra-ai/mastra/pull/11279))
|
|
162
|
+
|
|
163
|
+
- Set `externals: true` as the default for `mastra build` and cloud-deployer to reduce bundle issues with native dependencies. ([`0dbf199`](https://github.com/mastra-ai/mastra/commit/0dbf199110f22192ce5c95b1c8148d4872b4d119))
|
|
164
|
+
|
|
165
|
+
**Note:** If you previously relied on the default bundling behavior (all dependencies bundled), you can explicitly set `externals: false` in your bundler configuration.
|
|
166
|
+
|
|
167
|
+
- Fix delayed promises rejecting when stream suspends on tool-call-approval ([#11278](https://github.com/mastra-ai/mastra/pull/11278))
|
|
168
|
+
|
|
169
|
+
When a stream ends in suspended state (e.g., requiring tool approval), the delayed promises like `toolResults`, `toolCalls`, `text`, etc. now resolve with partial results instead of rejecting with an error. This allows consumers to access data that was produced before the suspension.
|
|
170
|
+
|
|
171
|
+
Also improves generic type inference for `LLMStepResult` and related types throughout the streaming infrastructure.
|
|
172
|
+
|
|
173
|
+
## 1.0.0-beta.13
|
|
174
|
+
|
|
175
|
+
### Patch Changes
|
|
176
|
+
|
|
177
|
+
- Add `onFinish` and `onError` lifecycle callbacks to workflow options ([#11200](https://github.com/mastra-ai/mastra/pull/11200))
|
|
178
|
+
|
|
179
|
+
Workflows now support lifecycle callbacks for server-side handling of workflow completion and errors:
|
|
180
|
+
- `onFinish`: Called when workflow completes with any status (success, failed, suspended, tripwire)
|
|
181
|
+
- `onError`: Called only when workflow fails (failed or tripwire status)
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
const workflow = createWorkflow({
|
|
185
|
+
id: 'my-workflow',
|
|
186
|
+
inputSchema: z.object({ ... }),
|
|
187
|
+
outputSchema: z.object({ ... }),
|
|
188
|
+
options: {
|
|
189
|
+
onFinish: async (result) => {
|
|
190
|
+
// Handle any workflow completion
|
|
191
|
+
await updateJobStatus(result.status);
|
|
192
|
+
},
|
|
193
|
+
onError: async (errorInfo) => {
|
|
194
|
+
// Handle workflow failures
|
|
195
|
+
await logError(errorInfo.error);
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
});
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Both callbacks support sync and async functions. Callback errors are caught and logged, not propagated to the workflow result.
|
|
202
|
+
|
|
203
|
+
## 1.0.0-beta.12
|
|
204
|
+
|
|
205
|
+
### Patch Changes
|
|
206
|
+
|
|
207
|
+
- Remove redundant toolCalls from network agent finalResult ([#11189](https://github.com/mastra-ai/mastra/pull/11189))
|
|
208
|
+
|
|
209
|
+
The network agent's `finalResult` was storing `toolCalls` separately even though all tool call information is already present in the `messages` array (as `tool-call` and `tool-result` type messages). This caused significant token waste since the routing agent reads this data from memory on every iteration.
|
|
210
|
+
|
|
211
|
+
**Before:** `finalResult: { text, toolCalls, messages }`
|
|
212
|
+
**After:** `finalResult: { text, messages }`
|
|
213
|
+
|
|
214
|
+
+**Migration:** If you were accessing `finalResult.toolCalls`, retrieve tool calls from `finalResult.messages` by filtering for messages with `type: 'tool-call'`.
|
|
215
|
+
|
|
216
|
+
Updated `@mastra/react` to extract tool calls directly from the `messages` array instead of the removed `toolCalls` field when resolving initial messages from memory.
|
|
217
|
+
|
|
218
|
+
Fixes #11059
|
|
219
|
+
|
|
220
|
+
- Embed AI types to fix peerdeps mismatches ([`9650cce`](https://github.com/mastra-ai/mastra/commit/9650cce52a1d917ff9114653398e2a0f5c3ba808))
|
|
221
|
+
|
|
222
|
+
- Fix invalid state: Controller is already closed ([`932d63d`](https://github.com/mastra-ai/mastra/commit/932d63dd51be9c8bf1e00e3671fe65606c6fb9cd))
|
|
223
|
+
|
|
224
|
+
Fixes #11005
|
|
225
|
+
|
|
226
|
+
- Fix HITL (Human-In-The-Loop) tool execution bug when mixing tools with and without execute functions. ([#11178](https://github.com/mastra-ai/mastra/pull/11178))
|
|
227
|
+
|
|
228
|
+
When an agent called multiple tools simultaneously where some had `execute` functions and others didn't (HITL tools expecting `addToolResult` from the frontend), the HITL tools would incorrectly receive `result: undefined` and be marked as "output-available" instead of "input-available". This caused the agent to continue instead of pausing for user input.
|
|
229
|
+
|
|
230
|
+
- Add resourceId to workflow routes ([#11166](https://github.com/mastra-ai/mastra/pull/11166))
|
|
231
|
+
|
|
232
|
+
- Auto resume suspended tools if `autoResumeSuspendedTools: true` ([#11157](https://github.com/mastra-ai/mastra/pull/11157))
|
|
233
|
+
|
|
234
|
+
The flag can be added to `defaultAgentOptions` when creating the agent or to options in `agent.stream` or `agent.generate`
|
|
235
|
+
|
|
236
|
+
```typescript
|
|
237
|
+
const agent = new Agent({
|
|
238
|
+
//...agent information,
|
|
239
|
+
defaultAgentOptions: {
|
|
240
|
+
autoResumeSuspendedTools: true,
|
|
241
|
+
},
|
|
242
|
+
});
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
- Preserve error details when thrown from workflow steps ([#10992](https://github.com/mastra-ai/mastra/pull/10992))
|
|
246
|
+
- Errors thrown in workflow steps now preserve full error details including `cause` chain and custom properties
|
|
247
|
+
- Added `SerializedError` type with proper cause chain support
|
|
248
|
+
- Added `SerializedStepResult` and `SerializedStepFailure` types for handling errors loaded from storage
|
|
249
|
+
- Enhanced `addErrorToJSON` to recursively serialize error cause chains with max depth protection
|
|
250
|
+
- Added `hydrateSerializedStepErrors` to convert serialized errors back to Error instances
|
|
251
|
+
- Fixed Inngest workflow error handling to extract original error from `NonRetriableError.cause`
|
|
252
|
+
|
|
253
|
+
- Move `@ai-sdk/azure` to devDependencies ([#10218](https://github.com/mastra-ai/mastra/pull/10218))
|
|
254
|
+
|
|
255
|
+
- Refactor internal event system from Emitter to PubSub abstraction for workflow event handling. This change replaces the EventEmitter-based event system with a pluggable PubSub interface, enabling support for distributed workflow execution backends like Inngest. Adds `close()` method to PubSub implementations for proper cleanup. ([#11052](https://github.com/mastra-ai/mastra/pull/11052))
|
|
256
|
+
|
|
257
|
+
- Add `startAsync()` method and fix Inngest duplicate workflow execution bug ([#11093](https://github.com/mastra-ai/mastra/pull/11093))
|
|
258
|
+
|
|
259
|
+
**New Feature: `startAsync()` for fire-and-forget workflow execution**
|
|
260
|
+
- Add `Run.startAsync()` to base workflow class - starts workflow in background and returns `{ runId }` immediately
|
|
261
|
+
- Add `EventedRun.startAsync()` - publishes workflow start event without subscribing for completion
|
|
262
|
+
- Add `InngestRun.startAsync()` - sends Inngest event without polling for result
|
|
263
|
+
|
|
264
|
+
**Bug Fix: Prevent duplicate Inngest workflow executions**
|
|
265
|
+
- Fix `getRuns()` to properly handle rate limits (429), empty responses, and JSON parse errors with retry logic and exponential backoff
|
|
266
|
+
- Fix `getRunOutput()` to throw `NonRetriableError` when polling fails, preventing Inngest from retrying the parent function and re-triggering the workflow
|
|
267
|
+
- Add timeout to `getRunOutput()` polling (default 5 minutes) with `NonRetriableError` on timeout
|
|
268
|
+
|
|
269
|
+
This fixes a production issue where polling failures after successful workflow completion caused Inngest to retry the parent function, which fired a new workflow event and resulted in duplicate executions (e.g., duplicate Slack messages).
|
|
270
|
+
|
|
271
|
+
- Preserve error details when thrown from workflow steps ([#10992](https://github.com/mastra-ai/mastra/pull/10992))
|
|
272
|
+
|
|
273
|
+
Workflow errors now retain custom properties like `statusCode`, `responseHeaders`, and `cause` chains. This enables error-specific recovery logic in your applications.
|
|
274
|
+
|
|
275
|
+
**Before:**
|
|
276
|
+
|
|
277
|
+
```typescript
|
|
278
|
+
const result = await workflow.execute({ input });
|
|
279
|
+
if (result.status === 'failed') {
|
|
280
|
+
// Custom error properties were lost
|
|
281
|
+
console.log(result.error); // "Step execution failed" (just a string)
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
**After:**
|
|
286
|
+
|
|
287
|
+
```typescript
|
|
288
|
+
const result = await workflow.execute({ input });
|
|
289
|
+
if (result.status === 'failed') {
|
|
290
|
+
// Custom properties are preserved
|
|
291
|
+
console.log(result.error.message); // "Step execution failed"
|
|
292
|
+
console.log(result.error.statusCode); // 429
|
|
293
|
+
console.log(result.error.cause?.name); // "RateLimitError"
|
|
294
|
+
}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
**Type change:** `WorkflowState.error` and `WorkflowRunState.error` types changed from `string | Error` to `SerializedError`.
|
|
298
|
+
|
|
299
|
+
Other changes:
|
|
300
|
+
- Added `UpdateWorkflowStateOptions` type for workflow state updates
|
|
301
|
+
|
|
302
|
+
- Fix Zod 4 compatibility issue with structuredOutput in agent.generate() ([#11133](https://github.com/mastra-ai/mastra/pull/11133))
|
|
303
|
+
|
|
304
|
+
Users with Zod 4 installed would see `TypeError: undefined is not an object (evaluating 'def.valueType._zod')` when using `structuredOutput` with agent.generate(). This happened because ProcessorStepSchema contains `z.custom()` fields that hold user-provided Zod schemas, and the workflow validation was trying to deeply validate these schemas causing version conflicts.
|
|
305
|
+
|
|
306
|
+
The fix disables input validation for processor workflows since `z.custom()` fields are meant to pass through arbitrary types without deep validation.
|
|
307
|
+
|
|
308
|
+
- Truncate map config when too long ([#11175](https://github.com/mastra-ai/mastra/pull/11175))
|
|
309
|
+
|
|
310
|
+
- Add helpful JSDoc comments to `BundlerConfig` properties (used with `bundler` option) ([#10218](https://github.com/mastra-ai/mastra/pull/10218))
|
|
311
|
+
|
|
312
|
+
- Fixes .network() method ignores MASTRA_RESOURCE_ID_KEY from requestContext ([`4524734`](https://github.com/mastra-ai/mastra/commit/45247343e384717a7c8404296275c56201d6470f))
|
|
313
|
+
|
|
314
|
+
- fix: make getSqlType consistent across storage adapters ([#11112](https://github.com/mastra-ai/mastra/pull/11112))
|
|
315
|
+
- PostgreSQL: use `getSqlType()` in `createTable` instead of `toUpperCase()`
|
|
316
|
+
- LibSQL: use `getSqlType()` in `createTable`, return `JSONB` for jsonb type (matches SQLite 3.45+ support)
|
|
317
|
+
- ClickHouse: use `getSqlType()` in `createTable` instead of `COLUMN_TYPES` constant, add missing types (uuid, float, boolean)
|
|
318
|
+
- Remove unused `getSqlType()` and `getDefaultValue()` from `MastraStorage` base class (all stores use `StoreOperations` versions)
|
|
319
|
+
|
|
320
|
+
- Fix workflow cancel not updating status when workflow is suspended ([#11139](https://github.com/mastra-ai/mastra/pull/11139))
|
|
321
|
+
- `Run.cancel()` now updates workflow status to 'canceled' in storage, resolving the issue where suspended workflows remained in 'suspended' status after cancellation
|
|
322
|
+
- Cancellation status is immediately persisted and reflected to observers
|
|
323
|
+
|
|
324
|
+
- What changed: ([#10998](https://github.com/mastra-ai/mastra/pull/10998))
|
|
325
|
+
|
|
326
|
+
Support for sequential tool execution was added. Tool call concurrency is now set conditionally, defaulting to 1 when sequential execution is needed (to avoid race conditions that interfere with human-in-the-loop approval during the workflow) rather than the default of 10 when concurrency is acceptable.
|
|
327
|
+
|
|
328
|
+
How it was changed:
|
|
329
|
+
|
|
330
|
+
A `sequentialExecutionRequired` constant was set to a boolean depending on whether any of the tools involved in a returned agentic execution workflow would require approval. If any tool has a 'suspendSchema' property (used for conditionally suspending execution and waiting for human input), or if they have their `requireApproval` property set to `true`, then the concurrency property used in the toolCallStep is set to 1, causing sequential execution. The old default of 10 remains otherwise.
|
|
331
|
+
|
|
332
|
+
- Fixed duplicate assistant messages appearing when using `useChat` with memory enabled. ([#11195](https://github.com/mastra-ai/mastra/pull/11195))
|
|
333
|
+
|
|
334
|
+
**What was happening:** When using `useChat` with `chatRoute` and memory, assistant messages were being duplicated in storage after multiple conversation turns. This occurred because the backend-generated message ID wasn't being sent back to `useChat`, causing ID mismatches during deduplication.
|
|
335
|
+
|
|
336
|
+
**What changed:**
|
|
337
|
+
- The backend now sends the assistant message ID in the stream's start event, so `useChat` uses the same ID as storage
|
|
338
|
+
- Custom `data-*` parts (from `writer.custom()`) are now preserved when messages contain V5 tool parts
|
|
339
|
+
|
|
340
|
+
Fixes #11091
|
|
341
|
+
|
|
342
|
+
- Updated dependencies [[`9650cce`](https://github.com/mastra-ai/mastra/commit/9650cce52a1d917ff9114653398e2a0f5c3ba808), [`5a632bd`](https://github.com/mastra-ai/mastra/commit/5a632bdf7b78953b664f5e038e98d4ba5f971e47)]:
|
|
343
|
+
- @mastra/schema-compat@1.0.0-beta.3
|
|
344
|
+
- @mastra/observability@1.0.0-beta.5
|
|
345
|
+
|
|
3
346
|
## 1.0.0-beta.11
|
|
4
347
|
|
|
5
348
|
### Minor Changes
|