@mastra/core 1.0.0-beta.14 → 1.0.0-beta.16
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 +472 -0
- package/dist/agent/agent-legacy.d.ts.map +1 -1
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/index.cjs +11 -11
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/index.cjs +3 -3
- package/dist/agent/message-list/index.d.ts +1 -1
- 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.map +1 -1
- package/dist/agent/utils.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
- package/dist/{chunk-DBW6S25C.cjs → chunk-33VDGXRH.cjs} +83 -65
- package/dist/chunk-33VDGXRH.cjs.map +1 -0
- package/dist/chunk-37YWZMBX.js +27 -0
- package/dist/chunk-37YWZMBX.js.map +1 -0
- package/dist/chunk-3ZRMVPQA.cjs +263 -0
- package/dist/chunk-3ZRMVPQA.cjs.map +1 -0
- package/dist/{chunk-VZJOEGQA.js → chunk-4DFWV4IR.js} +2 -2
- package/dist/chunk-4DFWV4IR.js.map +1 -0
- package/dist/{chunk-53SZJCBX.cjs → chunk-4KVIXN7K.cjs} +24 -24
- package/dist/{chunk-53SZJCBX.cjs.map → chunk-4KVIXN7K.cjs.map} +1 -1
- package/dist/{chunk-QDVYP2T7.js → chunk-4N6WB4EZ.js} +7 -7
- package/dist/{chunk-QDVYP2T7.js.map → chunk-4N6WB4EZ.js.map} +1 -1
- package/dist/{chunk-HWMMIRIF.cjs → chunk-4U7ZLI36.cjs} +3 -2
- package/dist/chunk-4U7ZLI36.cjs.map +1 -0
- package/dist/{chunk-O5BQBZEF.cjs → chunk-4UH5LAF5.cjs} +28 -28
- package/dist/{chunk-O5BQBZEF.cjs.map → chunk-4UH5LAF5.cjs.map} +1 -1
- package/dist/{chunk-JAGQZZ43.cjs → chunk-5DL6Y7PJ.cjs} +696 -352
- package/dist/chunk-5DL6Y7PJ.cjs.map +1 -0
- package/dist/{chunk-Z55SJVEC.cjs → chunk-6YUHA5UH.cjs} +7 -6
- package/dist/chunk-6YUHA5UH.cjs.map +1 -0
- package/dist/{chunk-TRUNX3AX.cjs → chunk-7KL2YFFK.cjs} +31 -31
- package/dist/chunk-7KL2YFFK.cjs.map +1 -0
- package/dist/{chunk-6CG7IY57.cjs → chunk-A6JNGJIU.cjs} +325 -164
- package/dist/chunk-A6JNGJIU.cjs.map +1 -0
- package/dist/{chunk-EGHGFLL3.cjs → chunk-AAX7ZOM7.cjs} +2 -2
- package/dist/chunk-AAX7ZOM7.cjs.map +1 -0
- package/dist/{chunk-O3ULBGV6.cjs → chunk-AQ22JIR7.cjs} +43 -21
- package/dist/chunk-AQ22JIR7.cjs.map +1 -0
- package/dist/chunk-CSCTVLD5.js +598 -0
- package/dist/chunk-CSCTVLD5.js.map +1 -0
- package/dist/chunk-DMX7MC4N.js +3 -0
- package/dist/{chunk-GXSERFAG.js.map → chunk-DMX7MC4N.js.map} +1 -1
- package/dist/{chunk-AYBJ5GAD.js → chunk-DT5RMENY.js} +302 -136
- package/dist/chunk-DT5RMENY.js.map +1 -0
- package/dist/{chunk-72E3YF6A.cjs → chunk-EMLEZXTQ.cjs} +15 -12
- package/dist/chunk-EMLEZXTQ.cjs.map +1 -0
- package/dist/{chunk-QF4MHFSU.js → chunk-F7PAZAGE.js} +530 -191
- package/dist/chunk-F7PAZAGE.js.map +1 -0
- package/dist/{chunk-LDXKZYOV.js → chunk-FB5QMTJJ.js} +30 -8
- package/dist/chunk-FB5QMTJJ.js.map +1 -0
- package/dist/{chunk-YPLZDWG7.js → chunk-FJEVLHJT.js} +3 -2
- package/dist/chunk-FJEVLHJT.js.map +1 -0
- package/dist/{chunk-GBQXIVL6.js → chunk-GNUITL2N.js} +801 -1240
- package/dist/chunk-GNUITL2N.js.map +1 -0
- package/dist/chunk-H2NHG7QL.cjs +32 -0
- package/dist/chunk-H2NHG7QL.cjs.map +1 -0
- package/dist/chunk-J4SXS7KN.js +259 -0
- package/dist/chunk-J4SXS7KN.js.map +1 -0
- package/dist/{chunk-Y36Y5MTD.js → chunk-JQM64OZF.js} +13 -3
- package/dist/chunk-JQM64OZF.js.map +1 -0
- package/dist/{chunk-67LM2UCT.js → chunk-K4XAKG7L.js} +5 -5
- package/dist/{chunk-67LM2UCT.js.map → chunk-K4XAKG7L.js.map} +1 -1
- package/dist/{chunk-4CMIJQF6.js → chunk-KKYAYRIO.js} +14 -14
- package/dist/chunk-KKYAYRIO.js.map +1 -0
- package/dist/{chunk-FPDJ4XN6.cjs → chunk-NCAMNQC3.cjs} +303 -137
- package/dist/chunk-NCAMNQC3.cjs.map +1 -0
- package/dist/chunk-NK4UN2LF.cjs +674 -0
- package/dist/chunk-NK4UN2LF.cjs.map +1 -0
- package/dist/{chunk-5UQ5TB6J.js → chunk-NNFF3URD.js} +41 -23
- package/dist/chunk-NNFF3URD.js.map +1 -0
- package/dist/{chunk-GELVUDUY.js → chunk-O7M7DR4E.js} +3 -3
- package/dist/{chunk-GELVUDUY.js.map → chunk-O7M7DR4E.js.map} +1 -1
- package/dist/chunk-OTIGV7CL.js +10215 -0
- package/dist/chunk-OTIGV7CL.js.map +1 -0
- package/dist/{chunk-ETWAR2YE.cjs → chunk-OXV6QFSV.cjs} +828 -1275
- package/dist/chunk-OXV6QFSV.cjs.map +1 -0
- package/dist/{chunk-373OC54J.js → chunk-QD776HMB.js} +7 -6
- package/dist/{chunk-373OC54J.js.map → chunk-QD776HMB.js.map} +1 -1
- package/dist/{chunk-4AT6YQKZ.js → chunk-QXL3F3T2.js} +7 -4
- package/dist/chunk-QXL3F3T2.js.map +1 -0
- package/dist/chunk-RMV5HJM7.cjs +10237 -0
- package/dist/chunk-RMV5HJM7.cjs.map +1 -0
- package/dist/chunk-ROOVGRNA.cjs +4 -0
- package/dist/{chunk-X4RMXTXF.cjs.map → chunk-ROOVGRNA.cjs.map} +1 -1
- package/dist/{chunk-OOUFPYSX.cjs → chunk-SSB4AVHU.cjs} +17 -17
- package/dist/{chunk-OOUFPYSX.cjs.map → chunk-SSB4AVHU.cjs.map} +1 -1
- package/dist/{chunk-TDM43G4I.cjs → chunk-UT6MASE5.cjs} +9 -9
- package/dist/{chunk-TDM43G4I.cjs.map → chunk-UT6MASE5.cjs.map} +1 -1
- package/dist/{chunk-3IP3DZ7G.js → chunk-UTMBASR5.js} +291 -130
- package/dist/chunk-UTMBASR5.js.map +1 -0
- package/dist/{chunk-SLBWA2F3.js → chunk-WDXYPI3P.js} +3 -3
- package/dist/{chunk-SLBWA2F3.js.map → chunk-WDXYPI3P.js.map} +1 -1
- package/dist/{chunk-72YCRTEX.cjs → chunk-ZSZOYPSJ.cjs} +13 -2
- package/dist/chunk-ZSZOYPSJ.cjs.map +1 -0
- package/dist/error/index.cjs +6 -6
- package/dist/error/index.d.ts +1 -0
- package/dist/error/index.d.ts.map +1 -1
- package/dist/error/index.js +1 -1
- package/dist/evals/index.cjs +49 -9
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +70 -22
- package/dist/evals/scoreTraces/index.cjs.map +1 -1
- package/dist/evals/scoreTraces/index.js +63 -15
- package/dist/evals/scoreTraces/index.js.map +1 -1
- package/dist/evals/scoreTraces/scoreTracesWorkflow.d.ts.map +1 -1
- package/dist/evals/scoreTraces/utils.d.ts.map +1 -1
- package/dist/evals/types.d.ts +566 -116
- package/dist/evals/types.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 +20 -20
- package/dist/llm/index.js +4 -4
- package/dist/llm/model/aisdk/v6/model.d.ts +1 -9
- package/dist/llm/model/aisdk/v6/model.d.ts.map +1 -1
- package/dist/llm/model/embedding-router.d.ts +1 -1
- package/dist/llm/model/model.d.ts.map +1 -1
- package/dist/llm/model/model.loop.d.ts.map +1 -1
- package/dist/llm/model/provider-options.d.ts +2 -1
- package/dist/llm/model/provider-options.d.ts.map +1 -1
- package/dist/llm/model/provider-types.generated.d.ts +129 -58
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts +6 -6
- package/dist/loop/test-utils/MastraLanguageModelV3Mock.d.ts +1 -9
- package/dist/loop/test-utils/MastraLanguageModelV3Mock.d.ts.map +1 -1
- package/dist/loop/types.d.ts +5 -2
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts +1 -1
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
- package/dist/mastra/hooks.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts +7 -2
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/mcp/index.cjs +7 -4
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +4 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/types.d.ts +2 -0
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/memory/index.cjs +26 -6
- package/dist/memory/index.d.ts +1 -0
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +1 -1
- package/dist/memory/memory.d.ts +9 -8
- package/dist/memory/memory.d.ts.map +1 -1
- package/dist/memory/mock.d.ts +2 -1
- package/dist/memory/mock.d.ts.map +1 -1
- package/dist/memory/types.d.ts +3 -4
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/memory/working-memory-utils.d.ts +20 -0
- package/dist/memory/working-memory-utils.d.ts.map +1 -0
- package/dist/models-dev-26XLUKVK.cjs +12 -0
- package/dist/{models-dev-PPS7X4JM.cjs.map → models-dev-26XLUKVK.cjs.map} +1 -1
- package/dist/models-dev-HUFLQFPB.js +3 -0
- package/dist/{models-dev-E3WWI7VA.js.map → models-dev-HUFLQFPB.js.map} +1 -1
- package/dist/netlify-3MHHJG2E.js +3 -0
- package/dist/{netlify-TY656UYF.js.map → netlify-3MHHJG2E.js.map} +1 -1
- package/dist/netlify-5Y33S7WL.cjs +12 -0
- package/dist/{netlify-VZFM5UH3.cjs.map → netlify-5Y33S7WL.cjs.map} +1 -1
- package/dist/observability/index.cjs +14 -10
- package/dist/observability/index.js +1 -1
- package/dist/observability/types/tracing.d.ts +34 -20
- package/dist/observability/types/tracing.d.ts.map +1 -1
- package/dist/processors/index.cjs +37 -37
- package/dist/processors/index.d.ts +2 -0
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/processors/index.js +1 -1
- package/dist/processors/memory/message-history.d.ts +7 -1
- package/dist/processors/memory/message-history.d.ts.map +1 -1
- package/dist/processors/processors/language-detector.d.ts.map +1 -1
- package/dist/processors/processors/moderation.d.ts.map +1 -1
- package/dist/processors/processors/pii-detector.d.ts.map +1 -1
- package/dist/processors/processors/prompt-injection-detector.d.ts.map +1 -1
- package/dist/processors/processors/structured-output.d.ts +1 -0
- package/dist/processors/processors/structured-output.d.ts.map +1 -1
- package/dist/processors/processors/token-limiter.d.ts +5 -2
- package/dist/processors/processors/token-limiter.d.ts.map +1 -1
- package/dist/processors/runner.d.ts +2 -0
- package/dist/processors/runner.d.ts.map +1 -1
- package/dist/provider-registry-LXSWMVEC.js +3 -0
- package/dist/{provider-registry-NXVD764B.js.map → provider-registry-LXSWMVEC.js.map} +1 -1
- package/dist/provider-registry-YJ2P5YY5.cjs +40 -0
- package/dist/{provider-registry-ZIWSEUQE.cjs.map → provider-registry-YJ2P5YY5.cjs.map} +1 -1
- package/dist/provider-registry.json +298 -132
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/server/index.cjs +5 -5
- package/dist/server/index.js +1 -1
- package/dist/server/types.d.ts +28 -0
- package/dist/server/types.d.ts.map +1 -1
- package/dist/storage/base.d.ts +95 -300
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/constants.cjs +60 -0
- package/dist/storage/constants.cjs.map +1 -0
- package/dist/storage/constants.d.ts +6 -1
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/constants.js +3 -0
- package/dist/storage/constants.js.map +1 -0
- package/dist/storage/domains/agents/base.d.ts +2 -2
- package/dist/storage/domains/agents/base.d.ts.map +1 -1
- package/dist/storage/domains/agents/inmemory.d.ts +5 -4
- package/dist/storage/domains/agents/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/base.d.ts +20 -0
- package/dist/storage/domains/base.d.ts.map +1 -0
- package/dist/storage/domains/index.d.ts +3 -0
- package/dist/storage/domains/index.d.ts.map +1 -1
- package/dist/storage/domains/inmemory-db.d.ts +57 -0
- package/dist/storage/domains/inmemory-db.d.ts.map +1 -0
- package/dist/storage/domains/memory/base.d.ts +2 -2
- package/dist/storage/domains/memory/base.d.ts.map +1 -1
- package/dist/storage/domains/memory/inmemory.d.ts +5 -13
- package/dist/storage/domains/memory/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/observability/base.d.ts +24 -29
- package/dist/storage/domains/observability/base.d.ts.map +1 -1
- package/dist/storage/domains/observability/index.d.ts +1 -0
- package/dist/storage/domains/observability/index.d.ts.map +1 -1
- package/dist/storage/domains/observability/inmemory.d.ts +46 -35
- package/dist/storage/domains/observability/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/observability/types.d.ts +2365 -0
- package/dist/storage/domains/observability/types.d.ts.map +1 -0
- package/dist/storage/domains/scores/base.d.ts +9 -20
- package/dist/storage/domains/scores/base.d.ts.map +1 -1
- package/dist/storage/domains/scores/inmemory.d.ts +11 -22
- package/dist/storage/domains/scores/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/shared.d.ts +76 -0
- package/dist/storage/domains/shared.d.ts.map +1 -0
- package/dist/storage/domains/workflows/base.d.ts +4 -2
- package/dist/storage/domains/workflows/base.d.ts.map +1 -1
- package/dist/storage/domains/workflows/inmemory.d.ts +10 -9
- package/dist/storage/domains/workflows/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +272 -59
- package/dist/storage/index.js +2 -1
- package/dist/storage/mock.d.ts +26 -174
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/types.d.ts +15 -44
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/utils.d.ts +5 -0
- package/dist/storage/utils.d.ts.map +1 -1
- package/dist/stream/MastraAgentNetworkStream.d.ts +1 -1
- 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.map +1 -1
- package/dist/stream/aisdk/v5/compat/consume-stream.d.ts +4 -1
- package/dist/stream/aisdk/v5/compat/consume-stream.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/output.d.ts.map +1 -1
- package/dist/stream/base/output.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 +3 -0
- package/dist/stream/types.d.ts.map +1 -1
- package/dist/test-utils/llm-mock.cjs +4 -4
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +20 -0
- package/dist/tool-loop-agent/index.cjs.map +1 -0
- package/dist/tool-loop-agent/index.d.ts +36 -0
- package/dist/tool-loop-agent/index.d.ts.map +1 -0
- package/dist/tool-loop-agent/index.js +3 -0
- package/dist/tool-loop-agent/index.js.map +1 -0
- package/dist/tool-loop-agent/tool-loop-processor.d.ts +30 -0
- package/dist/tool-loop-agent/tool-loop-processor.d.ts.map +1 -0
- package/dist/tool-loop-agent/utils.d.ts +17 -0
- package/dist/tool-loop-agent/utils.d.ts.map +1 -0
- package/dist/tools/index.cjs +4 -4
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/is-vercel-tool.cjs +2 -2
- package/dist/tools/is-vercel-tool.js +1 -1
- package/dist/tools/tool-builder/builder.d.ts.map +1 -1
- package/dist/tools/tool.d.ts +4 -4
- package/dist/tools/tool.d.ts.map +1 -1
- package/dist/tools/toolchecks.d.ts +1 -1
- package/dist/tools/toolchecks.d.ts.map +1 -1
- package/dist/tools/types.d.ts +3 -1
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/validation.d.ts +1 -1
- package/dist/tools/validation.d.ts.map +1 -1
- package/dist/utils/zod-utils.d.ts +34 -0
- package/dist/utils/zod-utils.d.ts.map +1 -0
- package/dist/utils.cjs +39 -22
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +2 -1
- package/dist/vector/index.cjs +12 -5299
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.js +3 -5274
- package/dist/vector/index.js.map +1 -1
- package/dist/vector/vector.d.ts +13 -3
- package/dist/vector/vector.d.ts.map +1 -1
- package/dist/voice/index.cjs +6 -6
- package/dist/voice/index.js +1 -1
- package/dist/workflows/default.d.ts +2 -0
- package/dist/workflows/default.d.ts.map +1 -1
- package/dist/workflows/evented/execution-engine.d.ts +1 -0
- 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 +1 -0
- package/dist/workflows/evented/step-executor.d.ts.map +1 -1
- package/dist/workflows/evented/workflow-event-processor/index.d.ts +5 -4
- package/dist/workflows/evented/workflow-event-processor/index.d.ts.map +1 -1
- package/dist/workflows/evented/workflow-event-processor/loop.d.ts +2 -2
- 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/parallel.d.ts.map +1 -1
- package/dist/workflows/evented/workflow-event-processor/sleep.d.ts +2 -2
- package/dist/workflows/evented/workflow-event-processor/sleep.d.ts.map +1 -1
- package/dist/workflows/evented/workflow.d.ts +5 -2
- package/dist/workflows/evented/workflow.d.ts.map +1 -1
- package/dist/workflows/execution-engine.d.ts +1 -0
- package/dist/workflows/execution-engine.d.ts.map +1 -1
- package/dist/workflows/handlers/control-flow.d.ts +4 -0
- package/dist/workflows/handlers/control-flow.d.ts.map +1 -1
- package/dist/workflows/handlers/entry.d.ts +3 -2
- package/dist/workflows/handlers/entry.d.ts.map +1 -1
- package/dist/workflows/handlers/step.d.ts +1 -0
- package/dist/workflows/handlers/step.d.ts.map +1 -1
- package/dist/workflows/index.cjs +23 -23
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/types.d.ts +23 -3
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/utils.d.ts +1 -0
- package/dist/workflows/utils.d.ts.map +1 -1
- package/dist/workflows/workflow.d.ts +22 -8
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/package.json +15 -5
- package/src/llm/model/provider-types.generated.d.ts +129 -58
- package/storage/constants.d.ts +1 -0
- package/tool-loop-agent.d.ts +1 -0
- package/dist/chunk-3IP3DZ7G.js.map +0 -1
- package/dist/chunk-4AT6YQKZ.js.map +0 -1
- package/dist/chunk-4CMIJQF6.js.map +0 -1
- package/dist/chunk-5UQ5TB6J.js.map +0 -1
- package/dist/chunk-6CG7IY57.cjs.map +0 -1
- package/dist/chunk-72E3YF6A.cjs.map +0 -1
- package/dist/chunk-72YCRTEX.cjs.map +0 -1
- package/dist/chunk-ADADLFDR.js +0 -42
- package/dist/chunk-ADADLFDR.js.map +0 -1
- package/dist/chunk-AYBJ5GAD.js.map +0 -1
- package/dist/chunk-DBW6S25C.cjs.map +0 -1
- package/dist/chunk-EGHGFLL3.cjs.map +0 -1
- package/dist/chunk-ETWAR2YE.cjs.map +0 -1
- package/dist/chunk-FPDJ4XN6.cjs.map +0 -1
- package/dist/chunk-GBQXIVL6.js.map +0 -1
- package/dist/chunk-GXSERFAG.js +0 -3
- package/dist/chunk-HWMMIRIF.cjs.map +0 -1
- package/dist/chunk-JAGQZZ43.cjs.map +0 -1
- package/dist/chunk-LDXKZYOV.js.map +0 -1
- package/dist/chunk-O3ULBGV6.cjs.map +0 -1
- package/dist/chunk-QF4MHFSU.js.map +0 -1
- package/dist/chunk-T2VLUFGG.cjs +0 -47
- package/dist/chunk-T2VLUFGG.cjs.map +0 -1
- package/dist/chunk-TRUNX3AX.cjs.map +0 -1
- package/dist/chunk-VZJOEGQA.js.map +0 -1
- package/dist/chunk-X4RMXTXF.cjs +0 -4
- package/dist/chunk-Y36Y5MTD.js.map +0 -1
- package/dist/chunk-YPLZDWG7.js.map +0 -1
- package/dist/chunk-Z55SJVEC.cjs.map +0 -1
- package/dist/models-dev-E3WWI7VA.js +0 -3
- package/dist/models-dev-PPS7X4JM.cjs +0 -12
- package/dist/netlify-TY656UYF.js +0 -3
- package/dist/netlify-VZFM5UH3.cjs +0 -12
- package/dist/provider-registry-NXVD764B.js +0 -3
- package/dist/provider-registry-ZIWSEUQE.cjs +0 -40
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5DL6Y7PJ_cjs = require('./chunk-5DL6Y7PJ.cjs');
|
|
4
4
|
var chunkL3NKIMF5_cjs = require('./chunk-L3NKIMF5.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
|
|
6
|
+
var chunk6YUHA5UH_cjs = require('./chunk-6YUHA5UH.cjs');
|
|
7
7
|
var chunkUVHSM2GU_cjs = require('./chunk-UVHSM2GU.cjs');
|
|
8
8
|
var chunkDGV2FWB4_cjs = require('./chunk-DGV2FWB4.cjs');
|
|
9
9
|
var chunkAF74UXR5_cjs = require('./chunk-AF74UXR5.cjs');
|
|
@@ -26,12 +26,12 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
26
26
|
this.mastra = mastra;
|
|
27
27
|
}
|
|
28
28
|
async execute(params) {
|
|
29
|
-
const { step, stepResults, runId, requestContext, retryCount = 0 } = params;
|
|
29
|
+
const { step, stepResults, runId, requestContext, retryCount = 0, perStep } = params;
|
|
30
30
|
const abortController = params.abortController ?? new AbortController();
|
|
31
31
|
let suspended;
|
|
32
32
|
let bailed;
|
|
33
33
|
const startedAt = Date.now();
|
|
34
|
-
const { inputData, validationError } = await
|
|
34
|
+
const { inputData, validationError } = await chunk5DL6Y7PJ_cjs.validateStepInput({
|
|
35
35
|
prevOutput: typeof params.foreachIdx === "number" ? params.input?.[params.foreachIdx] : params.input,
|
|
36
36
|
step,
|
|
37
37
|
validateInputs: params.validateInputs ?? true
|
|
@@ -55,8 +55,8 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
55
55
|
if (validationError) {
|
|
56
56
|
throw validationError;
|
|
57
57
|
}
|
|
58
|
-
const
|
|
59
|
-
|
|
58
|
+
const stepOutput = await step.execute(
|
|
59
|
+
chunk5DL6Y7PJ_cjs.createDeprecationProxy(
|
|
60
60
|
{
|
|
61
61
|
workflowId: params.workflowId,
|
|
62
62
|
runId,
|
|
@@ -71,9 +71,9 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
71
71
|
resumeData: params.resumeData,
|
|
72
72
|
suspendData: suspendDataToUse,
|
|
73
73
|
getInitData: () => stepResults?.input,
|
|
74
|
-
getStepResult:
|
|
74
|
+
getStepResult: chunk5DL6Y7PJ_cjs.getStepResult.bind(this, stepResults),
|
|
75
75
|
suspend: async (suspendPayload) => {
|
|
76
|
-
const { suspendData, validationError: validationError2 } = await
|
|
76
|
+
const { suspendData, validationError: validationError2 } = await chunk5DL6Y7PJ_cjs.validateStepSuspendData({
|
|
77
77
|
suspendData: suspendPayload,
|
|
78
78
|
step,
|
|
79
79
|
validateInputs: params.validateInputs ?? true
|
|
@@ -91,7 +91,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
91
91
|
abort: () => {
|
|
92
92
|
abortController?.abort();
|
|
93
93
|
},
|
|
94
|
-
[chunkL3NKIMF5_cjs.PUBSUB_SYMBOL]: this.mastra?.pubsub ?? new
|
|
94
|
+
[chunkL3NKIMF5_cjs.PUBSUB_SYMBOL]: this.mastra?.pubsub ?? new chunk5DL6Y7PJ_cjs.EventEmitterPubSub(params.emitter),
|
|
95
95
|
[chunkL3NKIMF5_cjs.STREAM_FORMAT_SYMBOL]: void 0,
|
|
96
96
|
// TODO
|
|
97
97
|
engine: {},
|
|
@@ -101,11 +101,13 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
paramName: "runCount",
|
|
104
|
-
deprecationMessage:
|
|
104
|
+
deprecationMessage: chunk5DL6Y7PJ_cjs.runCountDeprecationMessage,
|
|
105
105
|
logger: this.logger
|
|
106
106
|
}
|
|
107
107
|
)
|
|
108
108
|
);
|
|
109
|
+
const isNestedWorkflowStep = step.component === "WORKFLOW";
|
|
110
|
+
const nestedWflowStepPaused = isNestedWorkflowStep && perStep;
|
|
109
111
|
const endedAt = Date.now();
|
|
110
112
|
let finalResult;
|
|
111
113
|
if (suspended) {
|
|
@@ -113,7 +115,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
113
115
|
...stepInfo,
|
|
114
116
|
status: "suspended",
|
|
115
117
|
suspendedAt: endedAt,
|
|
116
|
-
...
|
|
118
|
+
...stepOutput ? { suspendOutput: stepOutput } : {}
|
|
117
119
|
};
|
|
118
120
|
if (suspended.payload) {
|
|
119
121
|
finalResult.suspendPayload = suspended.payload;
|
|
@@ -126,18 +128,23 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
126
128
|
endedAt,
|
|
127
129
|
output: bailed.payload
|
|
128
130
|
};
|
|
131
|
+
} else if (nestedWflowStepPaused) {
|
|
132
|
+
finalResult = {
|
|
133
|
+
...stepInfo,
|
|
134
|
+
status: "paused"
|
|
135
|
+
};
|
|
129
136
|
} else {
|
|
130
137
|
finalResult = {
|
|
131
138
|
...stepInfo,
|
|
132
139
|
status: "success",
|
|
133
140
|
endedAt,
|
|
134
|
-
output:
|
|
141
|
+
output: stepOutput
|
|
135
142
|
};
|
|
136
143
|
}
|
|
137
144
|
return finalResult;
|
|
138
145
|
} catch (error) {
|
|
139
146
|
const endedAt = Date.now();
|
|
140
|
-
const errorInstance =
|
|
147
|
+
const errorInstance = chunk4U7ZLI36_cjs.getErrorFromUnknown(error, {
|
|
141
148
|
serializeStack: false,
|
|
142
149
|
fallbackMessage: "Unknown step execution error"
|
|
143
150
|
});
|
|
@@ -171,7 +178,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
171
178
|
iterationCount: 0
|
|
172
179
|
});
|
|
173
180
|
} catch (e) {
|
|
174
|
-
|
|
181
|
+
this.mastra?.getLogger()?.error("error evaluating condition", e);
|
|
175
182
|
return false;
|
|
176
183
|
}
|
|
177
184
|
})
|
|
@@ -199,7 +206,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
199
206
|
iterationCount
|
|
200
207
|
}) {
|
|
201
208
|
return condition(
|
|
202
|
-
|
|
209
|
+
chunk5DL6Y7PJ_cjs.createDeprecationProxy(
|
|
203
210
|
{
|
|
204
211
|
workflowId,
|
|
205
212
|
runId,
|
|
@@ -210,7 +217,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
210
217
|
retryCount,
|
|
211
218
|
resumeData,
|
|
212
219
|
getInitData: () => stepResults?.input,
|
|
213
|
-
getStepResult:
|
|
220
|
+
getStepResult: chunk5DL6Y7PJ_cjs.getStepResult.bind(this, stepResults),
|
|
214
221
|
bail: (_result) => {
|
|
215
222
|
throw new Error("Not implemented");
|
|
216
223
|
},
|
|
@@ -219,7 +226,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
219
226
|
abort: () => {
|
|
220
227
|
abortController?.abort();
|
|
221
228
|
},
|
|
222
|
-
[chunkL3NKIMF5_cjs.PUBSUB_SYMBOL]: this.mastra?.pubsub ?? new
|
|
229
|
+
[chunkL3NKIMF5_cjs.PUBSUB_SYMBOL]: this.mastra?.pubsub ?? new chunk5DL6Y7PJ_cjs.EventEmitterPubSub(emitter),
|
|
223
230
|
[chunkL3NKIMF5_cjs.STREAM_FORMAT_SYMBOL]: void 0,
|
|
224
231
|
// TODO
|
|
225
232
|
engine: {},
|
|
@@ -230,7 +237,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
230
237
|
},
|
|
231
238
|
{
|
|
232
239
|
paramName: "runCount",
|
|
233
|
-
deprecationMessage:
|
|
240
|
+
deprecationMessage: chunk5DL6Y7PJ_cjs.runCountDeprecationMessage,
|
|
234
241
|
logger: this.logger
|
|
235
242
|
}
|
|
236
243
|
)
|
|
@@ -248,7 +255,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
248
255
|
}
|
|
249
256
|
try {
|
|
250
257
|
return await step.fn(
|
|
251
|
-
|
|
258
|
+
chunk5DL6Y7PJ_cjs.createDeprecationProxy(
|
|
252
259
|
{
|
|
253
260
|
workflowId: params.workflowId,
|
|
254
261
|
runId,
|
|
@@ -262,7 +269,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
262
269
|
retryCount,
|
|
263
270
|
resumeData: params.resumeData,
|
|
264
271
|
getInitData: () => stepResults?.input,
|
|
265
|
-
getStepResult:
|
|
272
|
+
getStepResult: chunk5DL6Y7PJ_cjs.getStepResult.bind(this, stepResults),
|
|
266
273
|
suspend: async (_suspendPayload) => {
|
|
267
274
|
throw new Error("Not implemented");
|
|
268
275
|
},
|
|
@@ -274,7 +281,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
274
281
|
},
|
|
275
282
|
// TODO
|
|
276
283
|
writer: void 0,
|
|
277
|
-
[chunkL3NKIMF5_cjs.PUBSUB_SYMBOL]: this.mastra?.pubsub ?? new
|
|
284
|
+
[chunkL3NKIMF5_cjs.PUBSUB_SYMBOL]: this.mastra?.pubsub ?? new chunk5DL6Y7PJ_cjs.EventEmitterPubSub(ee),
|
|
278
285
|
[chunkL3NKIMF5_cjs.STREAM_FORMAT_SYMBOL]: void 0,
|
|
279
286
|
// TODO
|
|
280
287
|
engine: {},
|
|
@@ -284,13 +291,13 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
284
291
|
},
|
|
285
292
|
{
|
|
286
293
|
paramName: "runCount",
|
|
287
|
-
deprecationMessage:
|
|
294
|
+
deprecationMessage: chunk5DL6Y7PJ_cjs.runCountDeprecationMessage,
|
|
288
295
|
logger: this.logger
|
|
289
296
|
}
|
|
290
297
|
)
|
|
291
298
|
);
|
|
292
299
|
} catch (e) {
|
|
293
|
-
|
|
300
|
+
this.mastra?.getLogger()?.error("error evaluating condition", e);
|
|
294
301
|
return 0;
|
|
295
302
|
}
|
|
296
303
|
}
|
|
@@ -306,7 +313,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
306
313
|
}
|
|
307
314
|
try {
|
|
308
315
|
const result = await step.fn(
|
|
309
|
-
|
|
316
|
+
chunk5DL6Y7PJ_cjs.createDeprecationProxy(
|
|
310
317
|
{
|
|
311
318
|
workflowId: params.workflowId,
|
|
312
319
|
runId,
|
|
@@ -320,7 +327,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
320
327
|
retryCount,
|
|
321
328
|
resumeData: params.resumeData,
|
|
322
329
|
getInitData: () => stepResults?.input,
|
|
323
|
-
getStepResult:
|
|
330
|
+
getStepResult: chunk5DL6Y7PJ_cjs.getStepResult.bind(this, stepResults),
|
|
324
331
|
suspend: async (_suspendPayload) => {
|
|
325
332
|
throw new Error("Not implemented");
|
|
326
333
|
},
|
|
@@ -332,7 +339,7 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
332
339
|
},
|
|
333
340
|
// TODO
|
|
334
341
|
writer: void 0,
|
|
335
|
-
[chunkL3NKIMF5_cjs.PUBSUB_SYMBOL]: this.mastra?.pubsub ?? new
|
|
342
|
+
[chunkL3NKIMF5_cjs.PUBSUB_SYMBOL]: this.mastra?.pubsub ?? new chunk5DL6Y7PJ_cjs.EventEmitterPubSub(ee),
|
|
336
343
|
[chunkL3NKIMF5_cjs.STREAM_FORMAT_SYMBOL]: void 0,
|
|
337
344
|
// TODO
|
|
338
345
|
engine: {},
|
|
@@ -342,14 +349,14 @@ var StepExecutor = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
342
349
|
},
|
|
343
350
|
{
|
|
344
351
|
paramName: "runCount",
|
|
345
|
-
deprecationMessage:
|
|
352
|
+
deprecationMessage: chunk5DL6Y7PJ_cjs.runCountDeprecationMessage,
|
|
346
353
|
logger: this.logger
|
|
347
354
|
}
|
|
348
355
|
)
|
|
349
356
|
);
|
|
350
357
|
return result.getTime() - Date.now();
|
|
351
358
|
} catch (e) {
|
|
352
|
-
|
|
359
|
+
this.mastra?.getLogger()?.error("error evaluating condition", e);
|
|
353
360
|
return 0;
|
|
354
361
|
}
|
|
355
362
|
}
|
|
@@ -376,7 +383,8 @@ async function processWorkflowLoop({
|
|
|
376
383
|
resumeData,
|
|
377
384
|
parentWorkflow,
|
|
378
385
|
requestContext,
|
|
379
|
-
retryCount = 0
|
|
386
|
+
retryCount = 0,
|
|
387
|
+
perStep
|
|
380
388
|
}, {
|
|
381
389
|
pubsub,
|
|
382
390
|
stepExecutor,
|
|
@@ -416,7 +424,8 @@ async function processWorkflowLoop({
|
|
|
416
424
|
prevResult: stepResult,
|
|
417
425
|
resumeData,
|
|
418
426
|
activeSteps,
|
|
419
|
-
requestContext
|
|
427
|
+
requestContext,
|
|
428
|
+
perStep
|
|
420
429
|
}
|
|
421
430
|
});
|
|
422
431
|
} else {
|
|
@@ -434,7 +443,8 @@ async function processWorkflowLoop({
|
|
|
434
443
|
resumeData,
|
|
435
444
|
activeSteps,
|
|
436
445
|
requestContext,
|
|
437
|
-
retryCount
|
|
446
|
+
retryCount,
|
|
447
|
+
perStep
|
|
438
448
|
}
|
|
439
449
|
});
|
|
440
450
|
}
|
|
@@ -454,7 +464,8 @@ async function processWorkflowLoop({
|
|
|
454
464
|
resumeData,
|
|
455
465
|
activeSteps,
|
|
456
466
|
requestContext,
|
|
457
|
-
retryCount
|
|
467
|
+
retryCount,
|
|
468
|
+
perStep
|
|
458
469
|
}
|
|
459
470
|
});
|
|
460
471
|
} else {
|
|
@@ -471,7 +482,8 @@ async function processWorkflowLoop({
|
|
|
471
482
|
prevResult: stepResult,
|
|
472
483
|
resumeData,
|
|
473
484
|
activeSteps,
|
|
474
|
-
requestContext
|
|
485
|
+
requestContext,
|
|
486
|
+
perStep
|
|
475
487
|
}
|
|
476
488
|
});
|
|
477
489
|
}
|
|
@@ -488,7 +500,8 @@ async function processWorkflowForEach({
|
|
|
488
500
|
timeTravel,
|
|
489
501
|
resumeData,
|
|
490
502
|
parentWorkflow,
|
|
491
|
-
requestContext
|
|
503
|
+
requestContext,
|
|
504
|
+
perStep
|
|
492
505
|
}, {
|
|
493
506
|
pubsub,
|
|
494
507
|
mastra,
|
|
@@ -512,22 +525,24 @@ async function processWorkflowForEach({
|
|
|
512
525
|
prevResult: currentResult,
|
|
513
526
|
resumeData,
|
|
514
527
|
activeSteps,
|
|
515
|
-
requestContext
|
|
528
|
+
requestContext,
|
|
529
|
+
perStep
|
|
516
530
|
}
|
|
517
531
|
});
|
|
518
532
|
return;
|
|
519
533
|
} else if (idx >= targetLen) {
|
|
520
534
|
return;
|
|
521
535
|
}
|
|
536
|
+
const workflowsStore = await mastra.getStorage()?.getStore("workflows");
|
|
522
537
|
if (executionPath.length === 1 && idx === 0) {
|
|
523
538
|
const concurrency = Math.min(step.opts.concurrency ?? 1, targetLen);
|
|
524
539
|
const dummyResult = Array.from({ length: concurrency }, () => null);
|
|
525
|
-
await
|
|
540
|
+
await workflowsStore?.updateWorkflowResults({
|
|
526
541
|
workflowName: workflowId,
|
|
527
542
|
runId,
|
|
528
543
|
stepId: step.step.id,
|
|
529
544
|
result: {
|
|
530
|
-
status: "
|
|
545
|
+
status: "success",
|
|
531
546
|
output: dummyResult,
|
|
532
547
|
startedAt: Date.now(),
|
|
533
548
|
payload: prevResult?.output
|
|
@@ -549,19 +564,20 @@ async function processWorkflowForEach({
|
|
|
549
564
|
prevResult,
|
|
550
565
|
resumeData,
|
|
551
566
|
activeSteps,
|
|
552
|
-
requestContext
|
|
567
|
+
requestContext,
|
|
568
|
+
perStep
|
|
553
569
|
}
|
|
554
570
|
});
|
|
555
571
|
}
|
|
556
572
|
return;
|
|
557
573
|
}
|
|
558
574
|
currentResult.output.push(null);
|
|
559
|
-
await
|
|
575
|
+
await workflowsStore?.updateWorkflowResults({
|
|
560
576
|
workflowName: workflowId,
|
|
561
577
|
runId,
|
|
562
578
|
stepId: step.step.id,
|
|
563
579
|
result: {
|
|
564
|
-
status: "
|
|
580
|
+
status: "success",
|
|
565
581
|
output: currentResult.output,
|
|
566
582
|
startedAt: Date.now(),
|
|
567
583
|
payload: prevResult?.output
|
|
@@ -582,7 +598,8 @@ async function processWorkflowForEach({
|
|
|
582
598
|
prevResult,
|
|
583
599
|
resumeData,
|
|
584
600
|
activeSteps,
|
|
585
|
-
requestContext
|
|
601
|
+
requestContext,
|
|
602
|
+
perStep
|
|
586
603
|
}
|
|
587
604
|
});
|
|
588
605
|
}
|
|
@@ -597,7 +614,8 @@ async function processWorkflowParallel({
|
|
|
597
614
|
prevResult,
|
|
598
615
|
resumeData,
|
|
599
616
|
parentWorkflow,
|
|
600
|
-
requestContext
|
|
617
|
+
requestContext,
|
|
618
|
+
perStep
|
|
601
619
|
}, {
|
|
602
620
|
pubsub,
|
|
603
621
|
step
|
|
@@ -606,10 +624,13 @@ async function processWorkflowParallel({
|
|
|
606
624
|
const nestedStep = step.steps[i];
|
|
607
625
|
if (nestedStep?.type === "step") {
|
|
608
626
|
activeSteps[nestedStep.step.id] = true;
|
|
627
|
+
if (perStep) {
|
|
628
|
+
break;
|
|
629
|
+
}
|
|
609
630
|
}
|
|
610
631
|
}
|
|
611
632
|
await Promise.all(
|
|
612
|
-
step.steps.map(async (_step, idx) => {
|
|
633
|
+
step.steps?.filter((step2) => activeSteps[step2.step.id]).map(async (_step, idx) => {
|
|
613
634
|
return pubsub.publish("workflows", {
|
|
614
635
|
type: "workflow.step.run",
|
|
615
636
|
runId,
|
|
@@ -624,7 +645,8 @@ async function processWorkflowParallel({
|
|
|
624
645
|
timeTravel,
|
|
625
646
|
parentWorkflow,
|
|
626
647
|
activeSteps,
|
|
627
|
-
requestContext
|
|
648
|
+
requestContext,
|
|
649
|
+
perStep
|
|
628
650
|
}
|
|
629
651
|
});
|
|
630
652
|
})
|
|
@@ -641,7 +663,8 @@ async function processWorkflowConditional({
|
|
|
641
663
|
prevResult,
|
|
642
664
|
resumeData,
|
|
643
665
|
parentWorkflow,
|
|
644
|
-
requestContext
|
|
666
|
+
requestContext,
|
|
667
|
+
perStep
|
|
645
668
|
}, {
|
|
646
669
|
pubsub,
|
|
647
670
|
stepExecutor,
|
|
@@ -665,49 +688,79 @@ async function processWorkflowConditional({
|
|
|
665
688
|
for (let i = 0; i < idxs.length; i++) {
|
|
666
689
|
truthyIdxs[idxs[i]] = true;
|
|
667
690
|
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
691
|
+
let onlyStepToRun;
|
|
692
|
+
if (perStep) {
|
|
693
|
+
const stepsToRun = step.steps.filter((_, idx) => truthyIdxs[idx]);
|
|
694
|
+
onlyStepToRun = stepsToRun[0];
|
|
695
|
+
}
|
|
696
|
+
if (onlyStepToRun) {
|
|
697
|
+
activeSteps[onlyStepToRun.step.id] = true;
|
|
698
|
+
const stepIndex = step.steps.findIndex((step2) => step2.step.id === onlyStepToRun.step.id);
|
|
699
|
+
await pubsub.publish("workflows", {
|
|
700
|
+
type: "workflow.step.run",
|
|
701
|
+
runId,
|
|
702
|
+
data: {
|
|
703
|
+
workflowId,
|
|
704
|
+
runId,
|
|
705
|
+
executionPath: executionPath.concat([stepIndex]),
|
|
706
|
+
resumeSteps,
|
|
707
|
+
stepResults,
|
|
708
|
+
timeTravel,
|
|
709
|
+
prevResult,
|
|
710
|
+
resumeData,
|
|
711
|
+
parentWorkflow,
|
|
712
|
+
activeSteps,
|
|
713
|
+
requestContext,
|
|
714
|
+
perStep
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
} else {
|
|
718
|
+
await Promise.all(
|
|
719
|
+
step.steps.map(async (step2, idx) => {
|
|
720
|
+
if (truthyIdxs[idx]) {
|
|
721
|
+
if (step2?.type === "step") {
|
|
722
|
+
activeSteps[step2.step.id] = true;
|
|
689
723
|
}
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
return pubsub.publish("workflows", {
|
|
693
|
-
type: "workflow.step.end",
|
|
694
|
-
runId,
|
|
695
|
-
data: {
|
|
696
|
-
workflowId,
|
|
724
|
+
return pubsub.publish("workflows", {
|
|
725
|
+
type: "workflow.step.run",
|
|
697
726
|
runId,
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
727
|
+
data: {
|
|
728
|
+
workflowId,
|
|
729
|
+
runId,
|
|
730
|
+
executionPath: executionPath.concat([idx]),
|
|
731
|
+
resumeSteps,
|
|
732
|
+
stepResults,
|
|
733
|
+
timeTravel,
|
|
734
|
+
prevResult,
|
|
735
|
+
resumeData,
|
|
736
|
+
parentWorkflow,
|
|
737
|
+
activeSteps,
|
|
738
|
+
requestContext,
|
|
739
|
+
perStep
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
} else {
|
|
743
|
+
return pubsub.publish("workflows", {
|
|
744
|
+
type: "workflow.step.end",
|
|
745
|
+
runId,
|
|
746
|
+
data: {
|
|
747
|
+
workflowId,
|
|
748
|
+
runId,
|
|
749
|
+
executionPath: executionPath.concat([idx]),
|
|
750
|
+
resumeSteps,
|
|
751
|
+
stepResults,
|
|
752
|
+
prevResult: { status: "skipped" },
|
|
753
|
+
resumeData,
|
|
754
|
+
parentWorkflow,
|
|
755
|
+
activeSteps,
|
|
756
|
+
requestContext,
|
|
757
|
+
perStep
|
|
758
|
+
}
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
})
|
|
762
|
+
);
|
|
763
|
+
}
|
|
711
764
|
}
|
|
712
765
|
async function processWorkflowWaitForEvent(workflowData, {
|
|
713
766
|
pubsub,
|
|
@@ -736,7 +789,8 @@ async function processWorkflowWaitForEvent(workflowData, {
|
|
|
736
789
|
stepResults: currentState?.context,
|
|
737
790
|
prevResult,
|
|
738
791
|
activeSteps: [],
|
|
739
|
-
requestContext: currentState?.requestContext
|
|
792
|
+
requestContext: currentState?.requestContext,
|
|
793
|
+
perStep: workflowData.perStep
|
|
740
794
|
}
|
|
741
795
|
});
|
|
742
796
|
}
|
|
@@ -751,7 +805,8 @@ async function processWorkflowSleep({
|
|
|
751
805
|
prevResult,
|
|
752
806
|
resumeData,
|
|
753
807
|
parentWorkflow,
|
|
754
|
-
requestContext
|
|
808
|
+
requestContext,
|
|
809
|
+
perStep
|
|
755
810
|
}, {
|
|
756
811
|
pubsub,
|
|
757
812
|
stepExecutor,
|
|
@@ -825,7 +880,8 @@ async function processWorkflowSleep({
|
|
|
825
880
|
resumeData,
|
|
826
881
|
parentWorkflow,
|
|
827
882
|
activeSteps,
|
|
828
|
-
requestContext
|
|
883
|
+
requestContext,
|
|
884
|
+
perStep
|
|
829
885
|
}
|
|
830
886
|
});
|
|
831
887
|
},
|
|
@@ -843,7 +899,8 @@ async function processWorkflowSleepUntil({
|
|
|
843
899
|
prevResult,
|
|
844
900
|
resumeData,
|
|
845
901
|
parentWorkflow,
|
|
846
|
-
requestContext
|
|
902
|
+
requestContext,
|
|
903
|
+
perStep
|
|
847
904
|
}, {
|
|
848
905
|
pubsub,
|
|
849
906
|
stepExecutor,
|
|
@@ -917,7 +974,8 @@ async function processWorkflowSleepUntil({
|
|
|
917
974
|
resumeData,
|
|
918
975
|
parentWorkflow,
|
|
919
976
|
activeSteps,
|
|
920
|
-
requestContext
|
|
977
|
+
requestContext,
|
|
978
|
+
perStep
|
|
921
979
|
}
|
|
922
980
|
});
|
|
923
981
|
},
|
|
@@ -996,7 +1054,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
996
1054
|
executionPath: [],
|
|
997
1055
|
resumeSteps,
|
|
998
1056
|
stepResults,
|
|
999
|
-
prevResult: { status: "failed", error:
|
|
1057
|
+
prevResult: { status: "failed", error: chunk4U7ZLI36_cjs.getErrorFromUnknown(e).toJSON() },
|
|
1000
1058
|
requestContext,
|
|
1001
1059
|
resumeData,
|
|
1002
1060
|
activeSteps: {},
|
|
@@ -1006,11 +1064,14 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1006
1064
|
}
|
|
1007
1065
|
async processWorkflowCancel({ workflowId, runId }) {
|
|
1008
1066
|
this.cancelRunAndChildren(runId);
|
|
1009
|
-
const
|
|
1010
|
-
const currentState = await
|
|
1067
|
+
const workflowsStore = await this.mastra.getStorage()?.getStore("workflows");
|
|
1068
|
+
const currentState = await workflowsStore?.loadWorkflowSnapshot({
|
|
1011
1069
|
workflowName: workflowId,
|
|
1012
1070
|
runId
|
|
1013
1071
|
});
|
|
1072
|
+
if (!currentState) {
|
|
1073
|
+
this.mastra.getLogger()?.warn("Canceling workflow without loaded state", { workflowId, runId });
|
|
1074
|
+
}
|
|
1014
1075
|
await this.endWorkflow(
|
|
1015
1076
|
{
|
|
1016
1077
|
workflow: void 0,
|
|
@@ -1039,15 +1100,17 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1039
1100
|
timeTravel,
|
|
1040
1101
|
executionPath,
|
|
1041
1102
|
stepResults,
|
|
1042
|
-
requestContext
|
|
1103
|
+
requestContext,
|
|
1104
|
+
perStep
|
|
1043
1105
|
}) {
|
|
1044
1106
|
this.getOrCreateAbortController(runId);
|
|
1045
1107
|
if (parentWorkflow?.runId) {
|
|
1046
1108
|
this.parentChildRelationships.set(runId, parentWorkflow.runId);
|
|
1047
1109
|
}
|
|
1048
|
-
const
|
|
1110
|
+
const workflowsStore = await this.mastra.getStorage()?.getStore("workflows");
|
|
1111
|
+
const existingRun = await workflowsStore?.getWorkflowRunById({ runId, workflowName: workflow.id });
|
|
1049
1112
|
const resourceId = existingRun?.resourceId;
|
|
1050
|
-
await
|
|
1113
|
+
await workflowsStore?.persistWorkflowSnapshot({
|
|
1051
1114
|
workflowName: workflow.id,
|
|
1052
1115
|
runId,
|
|
1053
1116
|
resourceId,
|
|
@@ -1083,20 +1146,32 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1083
1146
|
timeTravel,
|
|
1084
1147
|
requestContext,
|
|
1085
1148
|
resumeData,
|
|
1086
|
-
activeSteps: {}
|
|
1149
|
+
activeSteps: {},
|
|
1150
|
+
perStep
|
|
1087
1151
|
}
|
|
1088
1152
|
});
|
|
1089
1153
|
}
|
|
1090
1154
|
async endWorkflow(args, status = "success") {
|
|
1091
|
-
const { workflowId, runId, prevResult } = args;
|
|
1092
|
-
await this.mastra.getStorage()?.
|
|
1155
|
+
const { workflowId, runId, prevResult, perStep } = args;
|
|
1156
|
+
const workflowsStore = await this.mastra.getStorage()?.getStore("workflows");
|
|
1157
|
+
await workflowsStore?.updateWorkflowState({
|
|
1093
1158
|
workflowName: workflowId,
|
|
1094
1159
|
runId,
|
|
1095
1160
|
opts: {
|
|
1096
|
-
status,
|
|
1161
|
+
status: perStep && status === "success" ? "paused" : status,
|
|
1097
1162
|
result: prevResult
|
|
1098
1163
|
}
|
|
1099
1164
|
});
|
|
1165
|
+
if (perStep) {
|
|
1166
|
+
await this.mastra.pubsub.publish(`workflow.events.v2.${runId}`, {
|
|
1167
|
+
type: "watch",
|
|
1168
|
+
runId,
|
|
1169
|
+
data: {
|
|
1170
|
+
type: "workflow-paused",
|
|
1171
|
+
payload: {}
|
|
1172
|
+
}
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1100
1175
|
await this.mastra.pubsub.publish(`workflow.events.v2.${runId}`, {
|
|
1101
1176
|
type: "watch",
|
|
1102
1177
|
runId,
|
|
@@ -1114,7 +1189,17 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1114
1189
|
});
|
|
1115
1190
|
}
|
|
1116
1191
|
async processWorkflowEnd(args) {
|
|
1117
|
-
const {
|
|
1192
|
+
const {
|
|
1193
|
+
resumeSteps,
|
|
1194
|
+
prevResult,
|
|
1195
|
+
resumeData,
|
|
1196
|
+
parentWorkflow,
|
|
1197
|
+
activeSteps,
|
|
1198
|
+
requestContext,
|
|
1199
|
+
runId,
|
|
1200
|
+
timeTravel,
|
|
1201
|
+
perStep
|
|
1202
|
+
} = args;
|
|
1118
1203
|
this.cleanupRun(runId);
|
|
1119
1204
|
if (parentWorkflow) {
|
|
1120
1205
|
await this.mastra.pubsub.publish("workflows", {
|
|
@@ -1132,7 +1217,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1132
1217
|
parentWorkflow: parentWorkflow.parentWorkflow,
|
|
1133
1218
|
parentContext: parentWorkflow,
|
|
1134
1219
|
requestContext,
|
|
1135
|
-
timeTravel
|
|
1220
|
+
timeTravel,
|
|
1221
|
+
perStep
|
|
1136
1222
|
}
|
|
1137
1223
|
});
|
|
1138
1224
|
}
|
|
@@ -1192,7 +1278,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1192
1278
|
timeTravel
|
|
1193
1279
|
} = args;
|
|
1194
1280
|
this.cleanupRun(runId);
|
|
1195
|
-
await this.mastra.getStorage()?.
|
|
1281
|
+
const workflowsStore = await this.mastra.getStorage()?.getStore("workflows");
|
|
1282
|
+
await workflowsStore?.updateWorkflowState({
|
|
1196
1283
|
workflowName: workflowId,
|
|
1197
1284
|
runId,
|
|
1198
1285
|
opts: {
|
|
@@ -1239,7 +1326,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1239
1326
|
resumeData,
|
|
1240
1327
|
parentWorkflow,
|
|
1241
1328
|
requestContext,
|
|
1242
|
-
retryCount = 0
|
|
1329
|
+
retryCount = 0,
|
|
1330
|
+
perStep
|
|
1243
1331
|
}) {
|
|
1244
1332
|
let stepGraph = workflow.stepGraph;
|
|
1245
1333
|
if (!executionPath?.length) {
|
|
@@ -1256,7 +1344,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1256
1344
|
parentWorkflow,
|
|
1257
1345
|
requestContext
|
|
1258
1346
|
},
|
|
1259
|
-
new
|
|
1347
|
+
new chunk4U7ZLI36_cjs.MastraError({
|
|
1260
1348
|
id: "MASTRA_WORKFLOW",
|
|
1261
1349
|
text: `Execution path is empty: ${JSON.stringify(executionPath)}`,
|
|
1262
1350
|
domain: "MASTRA_WORKFLOW" /* MASTRA_WORKFLOW */,
|
|
@@ -1279,7 +1367,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1279
1367
|
parentWorkflow,
|
|
1280
1368
|
requestContext
|
|
1281
1369
|
},
|
|
1282
|
-
new
|
|
1370
|
+
new chunk4U7ZLI36_cjs.MastraError({
|
|
1283
1371
|
id: "MASTRA_WORKFLOW",
|
|
1284
1372
|
text: `Step not found in step graph: ${JSON.stringify(executionPath)}`,
|
|
1285
1373
|
domain: "MASTRA_WORKFLOW" /* MASTRA_WORKFLOW */,
|
|
@@ -1302,7 +1390,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1302
1390
|
prevResult,
|
|
1303
1391
|
resumeData,
|
|
1304
1392
|
parentWorkflow,
|
|
1305
|
-
requestContext
|
|
1393
|
+
requestContext,
|
|
1394
|
+
perStep
|
|
1306
1395
|
},
|
|
1307
1396
|
{
|
|
1308
1397
|
pubsub: this.mastra.pubsub,
|
|
@@ -1322,7 +1411,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1322
1411
|
prevResult,
|
|
1323
1412
|
resumeData,
|
|
1324
1413
|
parentWorkflow,
|
|
1325
|
-
requestContext
|
|
1414
|
+
requestContext,
|
|
1415
|
+
perStep
|
|
1326
1416
|
},
|
|
1327
1417
|
{
|
|
1328
1418
|
pubsub: this.mastra.pubsub,
|
|
@@ -1343,7 +1433,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1343
1433
|
prevResult,
|
|
1344
1434
|
resumeData,
|
|
1345
1435
|
parentWorkflow,
|
|
1346
|
-
requestContext
|
|
1436
|
+
requestContext,
|
|
1437
|
+
perStep
|
|
1347
1438
|
},
|
|
1348
1439
|
{
|
|
1349
1440
|
pubsub: this.mastra.pubsub,
|
|
@@ -1364,7 +1455,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1364
1455
|
prevResult,
|
|
1365
1456
|
resumeData,
|
|
1366
1457
|
parentWorkflow,
|
|
1367
|
-
requestContext
|
|
1458
|
+
requestContext,
|
|
1459
|
+
perStep
|
|
1368
1460
|
},
|
|
1369
1461
|
{
|
|
1370
1462
|
pubsub: this.mastra.pubsub,
|
|
@@ -1385,7 +1477,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1385
1477
|
prevResult,
|
|
1386
1478
|
resumeData,
|
|
1387
1479
|
parentWorkflow,
|
|
1388
|
-
requestContext
|
|
1480
|
+
requestContext,
|
|
1481
|
+
perStep
|
|
1389
1482
|
},
|
|
1390
1483
|
{
|
|
1391
1484
|
pubsub: this.mastra.pubsub,
|
|
@@ -1408,7 +1501,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1408
1501
|
parentWorkflow,
|
|
1409
1502
|
requestContext
|
|
1410
1503
|
},
|
|
1411
|
-
new
|
|
1504
|
+
new chunk4U7ZLI36_cjs.MastraError({
|
|
1412
1505
|
id: "MASTRA_WORKFLOW",
|
|
1413
1506
|
text: `Step is not executable: ${step?.type} -- ${JSON.stringify(executionPath)}`,
|
|
1414
1507
|
domain: "MASTRA_WORKFLOW" /* MASTRA_WORKFLOW */,
|
|
@@ -1417,6 +1510,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1417
1510
|
);
|
|
1418
1511
|
}
|
|
1419
1512
|
activeSteps[step.step.id] = true;
|
|
1513
|
+
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
1420
1514
|
if (step.step instanceof EventedWorkflow) {
|
|
1421
1515
|
if (resumeSteps?.length > 1) {
|
|
1422
1516
|
const stepData = stepResults[step.step.id];
|
|
@@ -1435,7 +1529,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1435
1529
|
parentWorkflow,
|
|
1436
1530
|
requestContext
|
|
1437
1531
|
},
|
|
1438
|
-
new
|
|
1532
|
+
new chunk4U7ZLI36_cjs.MastraError({
|
|
1439
1533
|
id: "MASTRA_WORKFLOW",
|
|
1440
1534
|
text: `Nested workflow run id not found: ${JSON.stringify(stepResults)}`,
|
|
1441
1535
|
domain: "MASTRA_WORKFLOW" /* MASTRA_WORKFLOW */,
|
|
@@ -1443,7 +1537,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1443
1537
|
})
|
|
1444
1538
|
);
|
|
1445
1539
|
}
|
|
1446
|
-
const snapshot = await
|
|
1540
|
+
const snapshot = await workflowsStore?.loadWorkflowSnapshot({
|
|
1447
1541
|
workflowName: step.step.id,
|
|
1448
1542
|
runId: nestedRunId
|
|
1449
1543
|
});
|
|
@@ -1471,22 +1565,24 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1471
1565
|
prevResult,
|
|
1472
1566
|
resumeData,
|
|
1473
1567
|
activeSteps,
|
|
1474
|
-
requestContext
|
|
1568
|
+
requestContext,
|
|
1569
|
+
perStep
|
|
1475
1570
|
}
|
|
1476
1571
|
});
|
|
1477
1572
|
} else if (timeTravel && timeTravel.steps?.length > 1 && timeTravel.steps[0] === step.step.id) {
|
|
1478
|
-
const snapshot = await
|
|
1573
|
+
const snapshot = await workflowsStore?.loadWorkflowSnapshot({
|
|
1479
1574
|
workflowName: step.step.id,
|
|
1480
1575
|
runId
|
|
1481
1576
|
}) ?? { context: {} };
|
|
1482
|
-
const timeTravelParams =
|
|
1577
|
+
const timeTravelParams = chunk5DL6Y7PJ_cjs.createTimeTravelExecutionParams({
|
|
1483
1578
|
steps: timeTravel.steps.slice(1),
|
|
1484
1579
|
inputData: timeTravel.inputData,
|
|
1485
1580
|
resumeData: timeTravel.resumeData,
|
|
1486
1581
|
context: timeTravel.nestedStepResults?.[step.step.id] ?? {},
|
|
1487
1582
|
nestedStepsContext: timeTravel.nestedStepResults ?? {},
|
|
1488
1583
|
snapshot,
|
|
1489
|
-
graph: step.step.buildExecutionGraph()
|
|
1584
|
+
graph: step.step.buildExecutionGraph(),
|
|
1585
|
+
perStep
|
|
1490
1586
|
});
|
|
1491
1587
|
const nestedPrevStep = getStep(step.step, timeTravelParams.executionPath);
|
|
1492
1588
|
const nestedPrevResult = timeTravelParams.stepResults[nestedPrevStep?.id ?? "input"];
|
|
@@ -1512,7 +1608,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1512
1608
|
prevResult: { status: "success", output: nestedPrevResult?.payload },
|
|
1513
1609
|
timeTravel: timeTravelParams,
|
|
1514
1610
|
activeSteps,
|
|
1515
|
-
requestContext
|
|
1611
|
+
requestContext,
|
|
1612
|
+
perStep
|
|
1516
1613
|
}
|
|
1517
1614
|
});
|
|
1518
1615
|
} else {
|
|
@@ -1537,7 +1634,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1537
1634
|
prevResult,
|
|
1538
1635
|
resumeData,
|
|
1539
1636
|
activeSteps,
|
|
1540
|
-
requestContext
|
|
1637
|
+
requestContext,
|
|
1638
|
+
perStep
|
|
1541
1639
|
}
|
|
1542
1640
|
});
|
|
1543
1641
|
}
|
|
@@ -1570,7 +1668,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1570
1668
|
for (const [key, value] of Object.entries(requestContext)) {
|
|
1571
1669
|
rc.set(key, value);
|
|
1572
1670
|
}
|
|
1573
|
-
const { resumeData: timeTravelResumeData, validationError: timeTravelResumeValidationError } = await
|
|
1671
|
+
const { resumeData: timeTravelResumeData, validationError: timeTravelResumeValidationError } = await chunk5DL6Y7PJ_cjs.validateStepResumeData({
|
|
1574
1672
|
resumeData: timeTravel?.stepResults[step.step.id]?.status === "suspended" ? timeTravel?.resumeData : void 0,
|
|
1575
1673
|
step: step.step
|
|
1576
1674
|
});
|
|
@@ -1600,7 +1698,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1600
1698
|
retryCount,
|
|
1601
1699
|
foreachIdx: step.type === "foreach" ? executionPath[1] : void 0,
|
|
1602
1700
|
validateInputs: workflow.options.validateInputs,
|
|
1603
|
-
abortController
|
|
1701
|
+
abortController,
|
|
1702
|
+
perStep
|
|
1604
1703
|
});
|
|
1605
1704
|
requestContext = Object.fromEntries(rc.entries());
|
|
1606
1705
|
if (stepResult.status === "bailed") {
|
|
@@ -1619,7 +1718,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1619
1718
|
},
|
|
1620
1719
|
prevResult: stepResult,
|
|
1621
1720
|
activeSteps,
|
|
1622
|
-
requestContext
|
|
1721
|
+
requestContext,
|
|
1722
|
+
perStep
|
|
1623
1723
|
});
|
|
1624
1724
|
return;
|
|
1625
1725
|
}
|
|
@@ -1697,7 +1797,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1697
1797
|
stepResults,
|
|
1698
1798
|
prevResult: stepResult,
|
|
1699
1799
|
activeSteps,
|
|
1700
|
-
requestContext
|
|
1800
|
+
requestContext,
|
|
1801
|
+
perStep
|
|
1701
1802
|
}
|
|
1702
1803
|
});
|
|
1703
1804
|
}
|
|
@@ -1714,7 +1815,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1714
1815
|
stepResults,
|
|
1715
1816
|
activeSteps,
|
|
1716
1817
|
parentContext,
|
|
1717
|
-
requestContext
|
|
1818
|
+
requestContext,
|
|
1819
|
+
perStep
|
|
1718
1820
|
}) {
|
|
1719
1821
|
let step = workflow.stepGraph[executionPath[0]];
|
|
1720
1822
|
if ((step?.type === "parallel" || step?.type === "conditional") && executionPath.length > 1) {
|
|
@@ -1732,7 +1834,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1732
1834
|
activeSteps,
|
|
1733
1835
|
requestContext
|
|
1734
1836
|
},
|
|
1735
|
-
new
|
|
1837
|
+
new chunk4U7ZLI36_cjs.MastraError({
|
|
1736
1838
|
id: "MASTRA_WORKFLOW",
|
|
1737
1839
|
text: `Step not found: ${JSON.stringify(executionPath)}`,
|
|
1738
1840
|
domain: "MASTRA_WORKFLOW" /* MASTRA_WORKFLOW */,
|
|
@@ -1740,8 +1842,9 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1740
1842
|
})
|
|
1741
1843
|
);
|
|
1742
1844
|
}
|
|
1845
|
+
const workflowsStore = await this.mastra.getStorage()?.getStore("workflows");
|
|
1743
1846
|
if (step.type === "foreach") {
|
|
1744
|
-
const snapshot = await
|
|
1847
|
+
const snapshot = await workflowsStore?.loadWorkflowSnapshot({
|
|
1745
1848
|
workflowName: workflowId,
|
|
1746
1849
|
runId
|
|
1747
1850
|
});
|
|
@@ -1756,7 +1859,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1756
1859
|
newResult = { ...prevResult, output: [prevResult.output] };
|
|
1757
1860
|
}
|
|
1758
1861
|
}
|
|
1759
|
-
const newStepResults = await
|
|
1862
|
+
const newStepResults = await workflowsStore?.updateWorkflowResults({
|
|
1760
1863
|
workflowName: workflow.id,
|
|
1761
1864
|
runId,
|
|
1762
1865
|
stepId: step.step.id,
|
|
@@ -1775,7 +1878,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1775
1878
|
payload: parentContext.input?.output ?? {}
|
|
1776
1879
|
};
|
|
1777
1880
|
}
|
|
1778
|
-
const newStepResults = await
|
|
1881
|
+
const newStepResults = await workflowsStore?.updateWorkflowResults({
|
|
1779
1882
|
workflowName: workflow.id,
|
|
1780
1883
|
runId,
|
|
1781
1884
|
stepId: step.step.id,
|
|
@@ -1811,7 +1914,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1811
1914
|
if (suspendedStep) {
|
|
1812
1915
|
suspendedPaths[suspendedStep.id] = executionPath;
|
|
1813
1916
|
}
|
|
1814
|
-
await
|
|
1917
|
+
await workflowsStore?.updateWorkflowState({
|
|
1815
1918
|
workflowName: workflowId,
|
|
1816
1919
|
runId,
|
|
1817
1920
|
opts: {
|
|
@@ -1878,7 +1981,38 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1878
1981
|
}
|
|
1879
1982
|
}
|
|
1880
1983
|
step = workflow.stepGraph[executionPath[0]];
|
|
1881
|
-
if (
|
|
1984
|
+
if (perStep) {
|
|
1985
|
+
if (parentWorkflow && executionPath[0] < workflow.stepGraph.length - 1) {
|
|
1986
|
+
const { endedAt, output, status, ...nestedPrevResult } = prevResult;
|
|
1987
|
+
await this.endWorkflow({
|
|
1988
|
+
workflow,
|
|
1989
|
+
parentWorkflow,
|
|
1990
|
+
workflowId,
|
|
1991
|
+
runId,
|
|
1992
|
+
executionPath,
|
|
1993
|
+
resumeSteps,
|
|
1994
|
+
stepResults,
|
|
1995
|
+
prevResult: { ...nestedPrevResult, status: "paused" },
|
|
1996
|
+
activeSteps,
|
|
1997
|
+
requestContext,
|
|
1998
|
+
perStep
|
|
1999
|
+
});
|
|
2000
|
+
} else {
|
|
2001
|
+
await this.endWorkflow({
|
|
2002
|
+
workflow,
|
|
2003
|
+
parentWorkflow,
|
|
2004
|
+
workflowId,
|
|
2005
|
+
runId,
|
|
2006
|
+
executionPath,
|
|
2007
|
+
resumeSteps,
|
|
2008
|
+
stepResults,
|
|
2009
|
+
prevResult,
|
|
2010
|
+
activeSteps,
|
|
2011
|
+
requestContext,
|
|
2012
|
+
perStep
|
|
2013
|
+
});
|
|
2014
|
+
}
|
|
2015
|
+
} else if ((step?.type === "parallel" || step?.type === "conditional") && executionPath.length > 1) {
|
|
1882
2016
|
let skippedCount = 0;
|
|
1883
2017
|
const allResults = step.steps.reduce(
|
|
1884
2018
|
(acc, step2) => {
|
|
@@ -1967,7 +2101,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1967
2101
|
workflowId,
|
|
1968
2102
|
runId
|
|
1969
2103
|
}) {
|
|
1970
|
-
const
|
|
2104
|
+
const workflowsStore = await this.mastra.getStorage()?.getStore("workflows");
|
|
2105
|
+
const snapshot = await workflowsStore?.loadWorkflowSnapshot({
|
|
1971
2106
|
workflowName: workflowId,
|
|
1972
2107
|
runId
|
|
1973
2108
|
});
|
|
@@ -2008,7 +2143,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
2008
2143
|
if (!workflow) {
|
|
2009
2144
|
return this.errorWorkflow(
|
|
2010
2145
|
workflowData,
|
|
2011
|
-
new
|
|
2146
|
+
new chunk4U7ZLI36_cjs.MastraError({
|
|
2012
2147
|
id: "MASTRA_WORKFLOW",
|
|
2013
2148
|
text: `Workflow not found: ${workflowData.workflowId}`,
|
|
2014
2149
|
domain: "MASTRA_WORKFLOW" /* MASTRA_WORKFLOW */,
|
|
@@ -2082,14 +2217,14 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
2082
2217
|
try {
|
|
2083
2218
|
await ack?.();
|
|
2084
2219
|
} catch (e) {
|
|
2085
|
-
|
|
2220
|
+
this.mastra.getLogger()?.error("Error acking event", e);
|
|
2086
2221
|
}
|
|
2087
2222
|
}
|
|
2088
2223
|
};
|
|
2089
2224
|
|
|
2090
2225
|
// src/workflows/evented/workflow.ts
|
|
2091
2226
|
function cloneWorkflow(workflow, opts) {
|
|
2092
|
-
const wf = new
|
|
2227
|
+
const wf = new chunk5DL6Y7PJ_cjs.Workflow({
|
|
2093
2228
|
id: opts.id,
|
|
2094
2229
|
inputSchema: workflow.inputSchema,
|
|
2095
2230
|
outputSchema: workflow.outputSchema,
|
|
@@ -2120,7 +2255,7 @@ function isAgent(params) {
|
|
|
2120
2255
|
return params?.component === "AGENT";
|
|
2121
2256
|
}
|
|
2122
2257
|
function isTool(params) {
|
|
2123
|
-
return params instanceof
|
|
2258
|
+
return params instanceof chunk6YUHA5UH_cjs.Tool;
|
|
2124
2259
|
}
|
|
2125
2260
|
function createStep(params) {
|
|
2126
2261
|
if (isAgent(params)) {
|
|
@@ -2257,7 +2392,7 @@ function createWorkflow(params) {
|
|
|
2257
2392
|
executionEngine
|
|
2258
2393
|
});
|
|
2259
2394
|
}
|
|
2260
|
-
var EventedWorkflow = class extends
|
|
2395
|
+
var EventedWorkflow = class extends chunk5DL6Y7PJ_cjs.Workflow {
|
|
2261
2396
|
constructor(params) {
|
|
2262
2397
|
super(params);
|
|
2263
2398
|
this.engineType = "evented";
|
|
@@ -2291,7 +2426,8 @@ var EventedWorkflow = class extends chunkJAGQZZ43_cjs.Workflow {
|
|
|
2291
2426
|
withNestedWorkflows: false
|
|
2292
2427
|
});
|
|
2293
2428
|
if (!workflowSnapshotInStorage && shouldPersistSnapshot) {
|
|
2294
|
-
await this.mastra?.getStorage()?.
|
|
2429
|
+
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
2430
|
+
await workflowsStore?.persistWorkflowSnapshot({
|
|
2295
2431
|
workflowName: this.id,
|
|
2296
2432
|
runId: runIdToUse,
|
|
2297
2433
|
resourceId: options?.resourceId,
|
|
@@ -2316,7 +2452,7 @@ var EventedWorkflow = class extends chunkJAGQZZ43_cjs.Workflow {
|
|
|
2316
2452
|
return run;
|
|
2317
2453
|
}
|
|
2318
2454
|
};
|
|
2319
|
-
var EventedRun = class extends
|
|
2455
|
+
var EventedRun = class extends chunk5DL6Y7PJ_cjs.Run {
|
|
2320
2456
|
constructor(params) {
|
|
2321
2457
|
super(params);
|
|
2322
2458
|
this.serializedStepGraph = params.serializedStepGraph;
|
|
@@ -2335,7 +2471,7 @@ var EventedRun = class extends chunkJAGQZZ43_cjs.Run {
|
|
|
2335
2471
|
runId: this.runId
|
|
2336
2472
|
}
|
|
2337
2473
|
}).catch((err) => {
|
|
2338
|
-
|
|
2474
|
+
this.mastra?.getLogger()?.error(`Failed to publish workflow.cancel for runId ${this.runId}:`, err);
|
|
2339
2475
|
});
|
|
2340
2476
|
};
|
|
2341
2477
|
this.abortController.signal.addEventListener("abort", abortHandler, { once: true });
|
|
@@ -2343,7 +2479,8 @@ var EventedRun = class extends chunkJAGQZZ43_cjs.Run {
|
|
|
2343
2479
|
async start({
|
|
2344
2480
|
inputData,
|
|
2345
2481
|
initialState,
|
|
2346
|
-
requestContext
|
|
2482
|
+
requestContext,
|
|
2483
|
+
perStep
|
|
2347
2484
|
}) {
|
|
2348
2485
|
if (this.serializedStepGraph.length === 0) {
|
|
2349
2486
|
throw new Error(
|
|
@@ -2354,7 +2491,8 @@ var EventedRun = class extends chunkJAGQZZ43_cjs.Run {
|
|
|
2354
2491
|
throw new Error("Uncommitted step flow changes detected. Call .commit() to register the steps.");
|
|
2355
2492
|
}
|
|
2356
2493
|
requestContext = requestContext ?? new chunkUVHSM2GU_cjs.RequestContext();
|
|
2357
|
-
await this.mastra?.getStorage()?.
|
|
2494
|
+
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
2495
|
+
await workflowsStore?.persistWorkflowSnapshot({
|
|
2358
2496
|
workflowName: this.workflowId,
|
|
2359
2497
|
runId: this.runId,
|
|
2360
2498
|
resourceId: this.resourceId,
|
|
@@ -2389,7 +2527,8 @@ var EventedRun = class extends chunkJAGQZZ43_cjs.Run {
|
|
|
2389
2527
|
pubsub: this.mastra.pubsub,
|
|
2390
2528
|
retryConfig: this.retryConfig,
|
|
2391
2529
|
requestContext,
|
|
2392
|
-
abortController: this.abortController
|
|
2530
|
+
abortController: this.abortController,
|
|
2531
|
+
perStep
|
|
2393
2532
|
});
|
|
2394
2533
|
if (result.status !== "suspended") {
|
|
2395
2534
|
this.cleanup?.();
|
|
@@ -2404,7 +2543,8 @@ var EventedRun = class extends chunkJAGQZZ43_cjs.Run {
|
|
|
2404
2543
|
async startAsync({
|
|
2405
2544
|
inputData,
|
|
2406
2545
|
initialState,
|
|
2407
|
-
requestContext
|
|
2546
|
+
requestContext,
|
|
2547
|
+
perStep
|
|
2408
2548
|
}) {
|
|
2409
2549
|
if (this.serializedStepGraph.length === 0) {
|
|
2410
2550
|
throw new Error(
|
|
@@ -2415,7 +2555,8 @@ var EventedRun = class extends chunkJAGQZZ43_cjs.Run {
|
|
|
2415
2555
|
throw new Error("Uncommitted step flow changes detected. Call .commit() to register the steps.");
|
|
2416
2556
|
}
|
|
2417
2557
|
requestContext = requestContext ?? new chunkUVHSM2GU_cjs.RequestContext();
|
|
2418
|
-
await this.mastra?.getStorage()?.
|
|
2558
|
+
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
2559
|
+
await workflowsStore?.persistWorkflowSnapshot({
|
|
2419
2560
|
workflowName: this.workflowId,
|
|
2420
2561
|
runId: this.runId,
|
|
2421
2562
|
resourceId: this.resourceId,
|
|
@@ -2447,7 +2588,8 @@ var EventedRun = class extends chunkJAGQZZ43_cjs.Run {
|
|
|
2447
2588
|
runId: this.runId,
|
|
2448
2589
|
prevResult: { status: "success", output: inputDataToUse },
|
|
2449
2590
|
requestContext: Object.fromEntries(requestContext.entries()),
|
|
2450
|
-
initialState: initialStateToUse
|
|
2591
|
+
initialState: initialStateToUse,
|
|
2592
|
+
perStep
|
|
2451
2593
|
}
|
|
2452
2594
|
});
|
|
2453
2595
|
return { runId: this.runId };
|
|
@@ -2465,21 +2607,28 @@ var EventedRun = class extends chunkJAGQZZ43_cjs.Run {
|
|
|
2465
2607
|
if (steps.length === 0) {
|
|
2466
2608
|
throw new Error("No steps provided to resume");
|
|
2467
2609
|
}
|
|
2468
|
-
const
|
|
2610
|
+
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
2611
|
+
if (!workflowsStore) {
|
|
2612
|
+
throw new Error("Cannot resume workflow: workflows store is required");
|
|
2613
|
+
}
|
|
2614
|
+
const snapshot = await workflowsStore.loadWorkflowSnapshot({
|
|
2469
2615
|
workflowName: this.workflowId,
|
|
2470
2616
|
runId: this.runId
|
|
2471
2617
|
});
|
|
2472
|
-
|
|
2618
|
+
if (!snapshot) {
|
|
2619
|
+
throw new Error(`Cannot resume workflow: no snapshot found for runId ${this.runId}`);
|
|
2620
|
+
}
|
|
2621
|
+
const resumePath = snapshot.suspendedPaths?.[steps[0]];
|
|
2473
2622
|
if (!resumePath) {
|
|
2474
2623
|
throw new Error(
|
|
2475
|
-
`No resume path found for step ${JSON.stringify(steps)}, currently suspended paths are ${JSON.stringify(snapshot
|
|
2624
|
+
`No resume path found for step ${JSON.stringify(steps)}, currently suspended paths are ${JSON.stringify(snapshot.suspendedPaths)}`
|
|
2476
2625
|
);
|
|
2477
2626
|
}
|
|
2478
2627
|
console.dir(
|
|
2479
|
-
{ resume: { requestContextObj: snapshot
|
|
2628
|
+
{ resume: { requestContextObj: snapshot.requestContext, requestContext: params.requestContext } },
|
|
2480
2629
|
{ depth: null }
|
|
2481
2630
|
);
|
|
2482
|
-
const requestContextObj = snapshot
|
|
2631
|
+
const requestContextObj = snapshot.requestContext ?? {};
|
|
2483
2632
|
const requestContext = new chunkUVHSM2GU_cjs.RequestContext();
|
|
2484
2633
|
for (const [key, value] of Object.entries(requestContextObj)) {
|
|
2485
2634
|
requestContext.set(key, value);
|
|
@@ -2509,7 +2658,8 @@ var EventedRun = class extends chunkJAGQZZ43_cjs.Run {
|
|
|
2509
2658
|
},
|
|
2510
2659
|
pubsub: this.mastra.pubsub,
|
|
2511
2660
|
requestContext,
|
|
2512
|
-
abortController: this.abortController
|
|
2661
|
+
abortController: this.abortController,
|
|
2662
|
+
perStep: params.perStep
|
|
2513
2663
|
}).then((result) => {
|
|
2514
2664
|
if (result.status !== "suspended") {
|
|
2515
2665
|
this.closeStreamAction?.().catch(() => {
|
|
@@ -2551,7 +2701,8 @@ var EventedRun = class extends chunkJAGQZZ43_cjs.Run {
|
|
|
2551
2701
|
};
|
|
2552
2702
|
}
|
|
2553
2703
|
async cancel() {
|
|
2554
|
-
await this.mastra?.getStorage()?.
|
|
2704
|
+
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
2705
|
+
await workflowsStore?.updateWorkflowState({
|
|
2555
2706
|
workflowName: this.workflowId,
|
|
2556
2707
|
runId: this.runId,
|
|
2557
2708
|
opts: {
|
|
@@ -2606,7 +2757,7 @@ function isExecutableStep(step) {
|
|
|
2606
2757
|
}
|
|
2607
2758
|
|
|
2608
2759
|
// src/workflows/evented/execution-engine.ts
|
|
2609
|
-
var EventedExecutionEngine = class extends
|
|
2760
|
+
var EventedExecutionEngine = class extends chunk5DL6Y7PJ_cjs.ExecutionEngine {
|
|
2610
2761
|
eventProcessor;
|
|
2611
2762
|
constructor({
|
|
2612
2763
|
mastra,
|
|
@@ -2646,7 +2797,8 @@ var EventedExecutionEngine = class extends chunkJAGQZZ43_cjs.ExecutionEngine {
|
|
|
2646
2797
|
prevResult: { status: "success", output: prevResult?.payload },
|
|
2647
2798
|
resumeData: params.resume.resumePayload,
|
|
2648
2799
|
requestContext: Object.fromEntries(params.requestContext.entries()),
|
|
2649
|
-
format: params.format
|
|
2800
|
+
format: params.format,
|
|
2801
|
+
perStep: params.perStep
|
|
2650
2802
|
}
|
|
2651
2803
|
});
|
|
2652
2804
|
} else if (params.timeTravel) {
|
|
@@ -2663,7 +2815,8 @@ var EventedExecutionEngine = class extends chunkJAGQZZ43_cjs.ExecutionEngine {
|
|
|
2663
2815
|
timeTravel: params.timeTravel,
|
|
2664
2816
|
prevResult: { status: "success", output: prevResult?.payload },
|
|
2665
2817
|
requestContext: Object.fromEntries(params.requestContext.entries()),
|
|
2666
|
-
format: params.format
|
|
2818
|
+
format: params.format,
|
|
2819
|
+
perStep: params.perStep
|
|
2667
2820
|
}
|
|
2668
2821
|
});
|
|
2669
2822
|
} else {
|
|
@@ -2675,7 +2828,8 @@ var EventedExecutionEngine = class extends chunkJAGQZZ43_cjs.ExecutionEngine {
|
|
|
2675
2828
|
runId: params.runId,
|
|
2676
2829
|
prevResult: { status: "success", output: params.input },
|
|
2677
2830
|
requestContext: Object.fromEntries(params.requestContext.entries()),
|
|
2678
|
-
format: params.format
|
|
2831
|
+
format: params.format,
|
|
2832
|
+
perStep: params.perStep
|
|
2679
2833
|
}
|
|
2680
2834
|
});
|
|
2681
2835
|
}
|
|
@@ -2689,7 +2843,7 @@ var EventedExecutionEngine = class extends chunkJAGQZZ43_cjs.ExecutionEngine {
|
|
|
2689
2843
|
await ack?.();
|
|
2690
2844
|
await pubsub.unsubscribe("workflows-finish", finishCb);
|
|
2691
2845
|
if (event.type === "workflow.fail" && event.data.stepResults) {
|
|
2692
|
-
event.data.stepResults =
|
|
2846
|
+
event.data.stepResults = chunk5DL6Y7PJ_cjs.hydrateSerializedStepErrors(event.data.stepResults);
|
|
2693
2847
|
}
|
|
2694
2848
|
resolve(event.data);
|
|
2695
2849
|
return;
|
|
@@ -2697,7 +2851,7 @@ var EventedExecutionEngine = class extends chunkJAGQZZ43_cjs.ExecutionEngine {
|
|
|
2697
2851
|
await ack?.();
|
|
2698
2852
|
};
|
|
2699
2853
|
pubsub.subscribe("workflows-finish", finishCb).catch((err) => {
|
|
2700
|
-
|
|
2854
|
+
this.mastra?.getLogger()?.error("Failed to subscribe to workflows-finish:", err);
|
|
2701
2855
|
reject(err);
|
|
2702
2856
|
});
|
|
2703
2857
|
});
|
|
@@ -2713,6 +2867,11 @@ var EventedExecutionEngine = class extends chunkJAGQZZ43_cjs.ExecutionEngine {
|
|
|
2713
2867
|
status: "suspended",
|
|
2714
2868
|
steps: resultData.stepResults
|
|
2715
2869
|
};
|
|
2870
|
+
} else if (resultData.prevResult.status === "paused" || params.perStep) {
|
|
2871
|
+
callbackArg = {
|
|
2872
|
+
status: "paused",
|
|
2873
|
+
steps: resultData.stepResults
|
|
2874
|
+
};
|
|
2716
2875
|
} else {
|
|
2717
2876
|
callbackArg = {
|
|
2718
2877
|
status: resultData.prevResult.status,
|
|
@@ -2720,7 +2879,9 @@ var EventedExecutionEngine = class extends chunkJAGQZZ43_cjs.ExecutionEngine {
|
|
|
2720
2879
|
steps: resultData.stepResults
|
|
2721
2880
|
};
|
|
2722
2881
|
}
|
|
2723
|
-
|
|
2882
|
+
if (callbackArg.status !== "paused") {
|
|
2883
|
+
await this.invokeLifecycleCallbacks(callbackArg);
|
|
2884
|
+
}
|
|
2724
2885
|
let result;
|
|
2725
2886
|
if (resultData.prevResult.status === "suspended") {
|
|
2726
2887
|
const suspendedSteps = Object.entries(resultData.stepResults).map(([_stepId, stepResult]) => {
|
|
@@ -2749,5 +2910,5 @@ exports.cloneStep = cloneStep;
|
|
|
2749
2910
|
exports.cloneWorkflow = cloneWorkflow;
|
|
2750
2911
|
exports.createStep = createStep;
|
|
2751
2912
|
exports.createWorkflow = createWorkflow;
|
|
2752
|
-
//# sourceMappingURL=chunk-
|
|
2753
|
-
//# sourceMappingURL=chunk-
|
|
2913
|
+
//# sourceMappingURL=chunk-A6JNGJIU.cjs.map
|
|
2914
|
+
//# sourceMappingURL=chunk-A6JNGJIU.cjs.map
|