@mastra/core 1.0.0-beta.14 → 1.0.0-beta.15
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 +307 -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/{chunk-TDM43G4I.cjs → chunk-2OOMJRXZ.cjs} +9 -9
- package/dist/{chunk-TDM43G4I.cjs.map → chunk-2OOMJRXZ.cjs.map} +1 -1
- package/dist/chunk-37YWZMBX.js +27 -0
- package/dist/chunk-37YWZMBX.js.map +1 -0
- package/dist/{chunk-GBQXIVL6.js → chunk-3HDRO3GG.js} +790 -1206
- package/dist/chunk-3HDRO3GG.js.map +1 -0
- package/dist/{chunk-VZJOEGQA.js → chunk-4DFWV4IR.js} +2 -2
- package/dist/chunk-4DFWV4IR.js.map +1 -0
- package/dist/{chunk-373OC54J.js → chunk-4HP7CS6L.js} +7 -6
- package/dist/chunk-4HP7CS6L.js.map +1 -0
- package/dist/{chunk-4CMIJQF6.js → chunk-4J4M2Q5R.js} +14 -14
- package/dist/chunk-4J4M2Q5R.js.map +1 -0
- package/dist/{chunk-HWMMIRIF.cjs → chunk-4U7ZLI36.cjs} +3 -2
- package/dist/chunk-4U7ZLI36.cjs.map +1 -0
- package/dist/{chunk-Z55SJVEC.cjs → chunk-6HJFCSJ4.cjs} +7 -6
- package/dist/chunk-6HJFCSJ4.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-SLBWA2F3.js → chunk-AR5CF3IN.js} +3 -3
- package/dist/{chunk-SLBWA2F3.js.map → chunk-AR5CF3IN.js.map} +1 -1
- package/dist/{chunk-QDVYP2T7.js → chunk-BAZHNX5P.js} +8 -8
- package/dist/{chunk-QDVYP2T7.js.map → chunk-BAZHNX5P.js.map} +1 -1
- package/dist/{chunk-O3ULBGV6.cjs → chunk-BC2VKOH4.cjs} +43 -21
- package/dist/chunk-BC2VKOH4.cjs.map +1 -0
- package/dist/{chunk-5UQ5TB6J.js → chunk-BCUKD2XG.js} +59 -19
- package/dist/chunk-BCUKD2XG.js.map +1 -0
- package/dist/{chunk-67LM2UCT.js → chunk-CBQ6WDUJ.js} +5 -5
- package/dist/{chunk-67LM2UCT.js.map → chunk-CBQ6WDUJ.js.map} +1 -1
- package/dist/chunk-CBVHOGXX.cjs +674 -0
- package/dist/chunk-CBVHOGXX.cjs.map +1 -0
- package/dist/{chunk-O5BQBZEF.cjs → chunk-CBY37FTP.cjs} +28 -28
- package/dist/{chunk-O5BQBZEF.cjs.map → chunk-CBY37FTP.cjs.map} +1 -1
- package/dist/{chunk-3IP3DZ7G.js → chunk-D2IFWD7A.js} +285 -124
- package/dist/chunk-D2IFWD7A.js.map +1 -0
- package/dist/{chunk-JAGQZZ43.cjs → chunk-DDK3URK2.cjs} +636 -313
- package/dist/chunk-DDK3URK2.cjs.map +1 -0
- package/dist/chunk-DRJTNGI4.cjs +263 -0
- package/dist/chunk-DRJTNGI4.cjs.map +1 -0
- package/dist/{chunk-72E3YF6A.cjs → chunk-EMLEZXTQ.cjs} +15 -12
- package/dist/chunk-EMLEZXTQ.cjs.map +1 -0
- package/dist/{chunk-YPLZDWG7.js → chunk-FJEVLHJT.js} +3 -2
- package/dist/chunk-FJEVLHJT.js.map +1 -0
- package/dist/{chunk-53SZJCBX.cjs → chunk-GXMJ5URG.cjs} +25 -25
- package/dist/{chunk-53SZJCBX.cjs.map → chunk-GXMJ5URG.cjs.map} +1 -1
- package/dist/chunk-H2NHG7QL.cjs +32 -0
- package/dist/chunk-H2NHG7QL.cjs.map +1 -0
- package/dist/chunk-HAYBGFPA.js +259 -0
- package/dist/chunk-HAYBGFPA.js.map +1 -0
- package/dist/{chunk-AYBJ5GAD.js → chunk-IHISDRFV.js} +124 -50
- package/dist/chunk-IHISDRFV.js.map +1 -0
- package/dist/{chunk-DBW6S25C.cjs → chunk-IRTICXRZ.cjs} +101 -61
- package/dist/chunk-IRTICXRZ.cjs.map +1 -0
- package/dist/{chunk-ETWAR2YE.cjs → chunk-LOV5NNGK.cjs} +811 -1235
- package/dist/chunk-LOV5NNGK.cjs.map +1 -0
- package/dist/{chunk-QF4MHFSU.js → chunk-NGWTSHNA.js} +470 -152
- package/dist/chunk-NGWTSHNA.js.map +1 -0
- package/dist/{chunk-72YCRTEX.cjs → chunk-O2CAMK4A.cjs} +13 -2
- package/dist/chunk-O2CAMK4A.cjs.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-4AT6YQKZ.js → chunk-QXL3F3T2.js} +7 -4
- package/dist/chunk-QXL3F3T2.js.map +1 -0
- package/dist/{chunk-6CG7IY57.cjs → chunk-RA2CHJCY.cjs} +319 -158
- package/dist/chunk-RA2CHJCY.cjs.map +1 -0
- package/dist/chunk-RMV5HJM7.cjs +10237 -0
- package/dist/chunk-RMV5HJM7.cjs.map +1 -0
- package/dist/{chunk-FPDJ4XN6.cjs → chunk-S23TNDXG.cjs} +125 -51
- package/dist/chunk-S23TNDXG.cjs.map +1 -0
- 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-TRUNX3AX.cjs → chunk-T2LVULCK.cjs} +31 -31
- package/dist/chunk-T2LVULCK.cjs.map +1 -0
- package/dist/{chunk-LDXKZYOV.js → chunk-XJB7J4UT.js} +30 -8
- package/dist/chunk-XJB7J4UT.js.map +1 -0
- package/dist/chunk-YV43YEZ6.js +598 -0
- package/dist/chunk-YV43YEZ6.js.map +1 -0
- package/dist/{chunk-Y36Y5MTD.js → chunk-ZGIVAQRI.js} +13 -3
- package/dist/chunk-ZGIVAQRI.js.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 +568 -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 +42 -17
- 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.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 +4 -4
- package/dist/mcp/index.js +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-CUYK2MZ2.cjs +12 -0
- package/dist/{netlify-VZFM5UH3.cjs.map → netlify-CUYK2MZ2.cjs.map} +1 -1
- package/dist/netlify-J4QPOROO.js +3 -0
- package/dist/{netlify-TY656UYF.js.map → netlify-J4QPOROO.js.map} +1 -1
- package/dist/observability/index.cjs +14 -10
- package/dist/observability/index.js +1 -1
- package/dist/observability/types/tracing.d.ts +32 -19
- 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/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-6CIGRQVZ.js +3 -0
- package/dist/{provider-registry-NXVD764B.js.map → provider-registry-6CIGRQVZ.js.map} +1 -1
- package/dist/provider-registry-7O7FJ4BS.cjs +40 -0
- package/dist/{provider-registry-ZIWSEUQE.cjs.map → provider-registry-7O7FJ4BS.cjs.map} +1 -1
- package/dist/provider-registry.json +120 -46
- 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/storage/base.d.ts +40 -292
- 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 +28 -174
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/types.d.ts +39 -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/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.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/toolchecks.d.ts +1 -1
- package/dist/tools/toolchecks.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 +16 -6
- package/src/llm/model/provider-types.generated.d.ts +42 -17
- package/storage/constants.d.ts +1 -0
- package/tool-loop-agent.d.ts +1 -0
- package/dist/chunk-373OC54J.js.map +0 -1
- 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-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-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,7 +1,7 @@
|
|
|
1
|
-
import { validateStepInput, createDeprecationProxy, EventEmitterPubSub, getStepResult, validateStepSuspendData, runCountDeprecationMessage, createTimeTravelExecutionParams, validateStepResumeData, Workflow, Run, ExecutionEngine, hydrateSerializedStepErrors } from './chunk-
|
|
1
|
+
import { validateStepInput, createDeprecationProxy, EventEmitterPubSub, getStepResult, validateStepSuspendData, runCountDeprecationMessage, createTimeTravelExecutionParams, validateStepResumeData, Workflow, Run, ExecutionEngine, hydrateSerializedStepErrors } from './chunk-NGWTSHNA.js';
|
|
2
2
|
import { STREAM_FORMAT_SYMBOL, PUBSUB_SYMBOL } from './chunk-6PMMP3FR.js';
|
|
3
|
-
import { getErrorFromUnknown, MastraError } from './chunk-
|
|
4
|
-
import { Tool } from './chunk-
|
|
3
|
+
import { getErrorFromUnknown, MastraError } from './chunk-FJEVLHJT.js';
|
|
4
|
+
import { Tool } from './chunk-4HP7CS6L.js';
|
|
5
5
|
import { RequestContext } from './chunk-6TBWJV35.js';
|
|
6
6
|
import { MastraBase } from './chunk-LSHPJWM5.js';
|
|
7
7
|
import { RegisteredLogger } from './chunk-NRUZYMHE.js';
|
|
@@ -19,7 +19,7 @@ var StepExecutor = class extends MastraBase {
|
|
|
19
19
|
this.mastra = mastra;
|
|
20
20
|
}
|
|
21
21
|
async execute(params) {
|
|
22
|
-
const { step, stepResults, runId, requestContext, retryCount = 0 } = params;
|
|
22
|
+
const { step, stepResults, runId, requestContext, retryCount = 0, perStep } = params;
|
|
23
23
|
const abortController = params.abortController ?? new AbortController();
|
|
24
24
|
let suspended;
|
|
25
25
|
let bailed;
|
|
@@ -48,7 +48,7 @@ var StepExecutor = class extends MastraBase {
|
|
|
48
48
|
if (validationError) {
|
|
49
49
|
throw validationError;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const stepOutput = await step.execute(
|
|
52
52
|
createDeprecationProxy(
|
|
53
53
|
{
|
|
54
54
|
workflowId: params.workflowId,
|
|
@@ -99,6 +99,8 @@ var StepExecutor = class extends MastraBase {
|
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
);
|
|
102
|
+
const isNestedWorkflowStep = step.component === "WORKFLOW";
|
|
103
|
+
const nestedWflowStepPaused = isNestedWorkflowStep && perStep;
|
|
102
104
|
const endedAt = Date.now();
|
|
103
105
|
let finalResult;
|
|
104
106
|
if (suspended) {
|
|
@@ -106,7 +108,7 @@ var StepExecutor = class extends MastraBase {
|
|
|
106
108
|
...stepInfo,
|
|
107
109
|
status: "suspended",
|
|
108
110
|
suspendedAt: endedAt,
|
|
109
|
-
...
|
|
111
|
+
...stepOutput ? { suspendOutput: stepOutput } : {}
|
|
110
112
|
};
|
|
111
113
|
if (suspended.payload) {
|
|
112
114
|
finalResult.suspendPayload = suspended.payload;
|
|
@@ -119,12 +121,17 @@ var StepExecutor = class extends MastraBase {
|
|
|
119
121
|
endedAt,
|
|
120
122
|
output: bailed.payload
|
|
121
123
|
};
|
|
124
|
+
} else if (nestedWflowStepPaused) {
|
|
125
|
+
finalResult = {
|
|
126
|
+
...stepInfo,
|
|
127
|
+
status: "paused"
|
|
128
|
+
};
|
|
122
129
|
} else {
|
|
123
130
|
finalResult = {
|
|
124
131
|
...stepInfo,
|
|
125
132
|
status: "success",
|
|
126
133
|
endedAt,
|
|
127
|
-
output:
|
|
134
|
+
output: stepOutput
|
|
128
135
|
};
|
|
129
136
|
}
|
|
130
137
|
return finalResult;
|
|
@@ -369,7 +376,8 @@ async function processWorkflowLoop({
|
|
|
369
376
|
resumeData,
|
|
370
377
|
parentWorkflow,
|
|
371
378
|
requestContext,
|
|
372
|
-
retryCount = 0
|
|
379
|
+
retryCount = 0,
|
|
380
|
+
perStep
|
|
373
381
|
}, {
|
|
374
382
|
pubsub,
|
|
375
383
|
stepExecutor,
|
|
@@ -409,7 +417,8 @@ async function processWorkflowLoop({
|
|
|
409
417
|
prevResult: stepResult,
|
|
410
418
|
resumeData,
|
|
411
419
|
activeSteps,
|
|
412
|
-
requestContext
|
|
420
|
+
requestContext,
|
|
421
|
+
perStep
|
|
413
422
|
}
|
|
414
423
|
});
|
|
415
424
|
} else {
|
|
@@ -427,7 +436,8 @@ async function processWorkflowLoop({
|
|
|
427
436
|
resumeData,
|
|
428
437
|
activeSteps,
|
|
429
438
|
requestContext,
|
|
430
|
-
retryCount
|
|
439
|
+
retryCount,
|
|
440
|
+
perStep
|
|
431
441
|
}
|
|
432
442
|
});
|
|
433
443
|
}
|
|
@@ -447,7 +457,8 @@ async function processWorkflowLoop({
|
|
|
447
457
|
resumeData,
|
|
448
458
|
activeSteps,
|
|
449
459
|
requestContext,
|
|
450
|
-
retryCount
|
|
460
|
+
retryCount,
|
|
461
|
+
perStep
|
|
451
462
|
}
|
|
452
463
|
});
|
|
453
464
|
} else {
|
|
@@ -464,7 +475,8 @@ async function processWorkflowLoop({
|
|
|
464
475
|
prevResult: stepResult,
|
|
465
476
|
resumeData,
|
|
466
477
|
activeSteps,
|
|
467
|
-
requestContext
|
|
478
|
+
requestContext,
|
|
479
|
+
perStep
|
|
468
480
|
}
|
|
469
481
|
});
|
|
470
482
|
}
|
|
@@ -481,7 +493,8 @@ async function processWorkflowForEach({
|
|
|
481
493
|
timeTravel,
|
|
482
494
|
resumeData,
|
|
483
495
|
parentWorkflow,
|
|
484
|
-
requestContext
|
|
496
|
+
requestContext,
|
|
497
|
+
perStep
|
|
485
498
|
}, {
|
|
486
499
|
pubsub,
|
|
487
500
|
mastra,
|
|
@@ -505,22 +518,24 @@ async function processWorkflowForEach({
|
|
|
505
518
|
prevResult: currentResult,
|
|
506
519
|
resumeData,
|
|
507
520
|
activeSteps,
|
|
508
|
-
requestContext
|
|
521
|
+
requestContext,
|
|
522
|
+
perStep
|
|
509
523
|
}
|
|
510
524
|
});
|
|
511
525
|
return;
|
|
512
526
|
} else if (idx >= targetLen) {
|
|
513
527
|
return;
|
|
514
528
|
}
|
|
529
|
+
const workflowsStore = await mastra.getStorage()?.getStore("workflows");
|
|
515
530
|
if (executionPath.length === 1 && idx === 0) {
|
|
516
531
|
const concurrency = Math.min(step.opts.concurrency ?? 1, targetLen);
|
|
517
532
|
const dummyResult = Array.from({ length: concurrency }, () => null);
|
|
518
|
-
await
|
|
533
|
+
await workflowsStore?.updateWorkflowResults({
|
|
519
534
|
workflowName: workflowId,
|
|
520
535
|
runId,
|
|
521
536
|
stepId: step.step.id,
|
|
522
537
|
result: {
|
|
523
|
-
status: "
|
|
538
|
+
status: "success",
|
|
524
539
|
output: dummyResult,
|
|
525
540
|
startedAt: Date.now(),
|
|
526
541
|
payload: prevResult?.output
|
|
@@ -542,19 +557,20 @@ async function processWorkflowForEach({
|
|
|
542
557
|
prevResult,
|
|
543
558
|
resumeData,
|
|
544
559
|
activeSteps,
|
|
545
|
-
requestContext
|
|
560
|
+
requestContext,
|
|
561
|
+
perStep
|
|
546
562
|
}
|
|
547
563
|
});
|
|
548
564
|
}
|
|
549
565
|
return;
|
|
550
566
|
}
|
|
551
567
|
currentResult.output.push(null);
|
|
552
|
-
await
|
|
568
|
+
await workflowsStore?.updateWorkflowResults({
|
|
553
569
|
workflowName: workflowId,
|
|
554
570
|
runId,
|
|
555
571
|
stepId: step.step.id,
|
|
556
572
|
result: {
|
|
557
|
-
status: "
|
|
573
|
+
status: "success",
|
|
558
574
|
output: currentResult.output,
|
|
559
575
|
startedAt: Date.now(),
|
|
560
576
|
payload: prevResult?.output
|
|
@@ -575,7 +591,8 @@ async function processWorkflowForEach({
|
|
|
575
591
|
prevResult,
|
|
576
592
|
resumeData,
|
|
577
593
|
activeSteps,
|
|
578
|
-
requestContext
|
|
594
|
+
requestContext,
|
|
595
|
+
perStep
|
|
579
596
|
}
|
|
580
597
|
});
|
|
581
598
|
}
|
|
@@ -590,7 +607,8 @@ async function processWorkflowParallel({
|
|
|
590
607
|
prevResult,
|
|
591
608
|
resumeData,
|
|
592
609
|
parentWorkflow,
|
|
593
|
-
requestContext
|
|
610
|
+
requestContext,
|
|
611
|
+
perStep
|
|
594
612
|
}, {
|
|
595
613
|
pubsub,
|
|
596
614
|
step
|
|
@@ -599,10 +617,13 @@ async function processWorkflowParallel({
|
|
|
599
617
|
const nestedStep = step.steps[i];
|
|
600
618
|
if (nestedStep?.type === "step") {
|
|
601
619
|
activeSteps[nestedStep.step.id] = true;
|
|
620
|
+
if (perStep) {
|
|
621
|
+
break;
|
|
622
|
+
}
|
|
602
623
|
}
|
|
603
624
|
}
|
|
604
625
|
await Promise.all(
|
|
605
|
-
step.steps.map(async (_step, idx) => {
|
|
626
|
+
step.steps?.filter((step2) => activeSteps[step2.step.id]).map(async (_step, idx) => {
|
|
606
627
|
return pubsub.publish("workflows", {
|
|
607
628
|
type: "workflow.step.run",
|
|
608
629
|
runId,
|
|
@@ -617,7 +638,8 @@ async function processWorkflowParallel({
|
|
|
617
638
|
timeTravel,
|
|
618
639
|
parentWorkflow,
|
|
619
640
|
activeSteps,
|
|
620
|
-
requestContext
|
|
641
|
+
requestContext,
|
|
642
|
+
perStep
|
|
621
643
|
}
|
|
622
644
|
});
|
|
623
645
|
})
|
|
@@ -634,7 +656,8 @@ async function processWorkflowConditional({
|
|
|
634
656
|
prevResult,
|
|
635
657
|
resumeData,
|
|
636
658
|
parentWorkflow,
|
|
637
|
-
requestContext
|
|
659
|
+
requestContext,
|
|
660
|
+
perStep
|
|
638
661
|
}, {
|
|
639
662
|
pubsub,
|
|
640
663
|
stepExecutor,
|
|
@@ -658,49 +681,79 @@ async function processWorkflowConditional({
|
|
|
658
681
|
for (let i = 0; i < idxs.length; i++) {
|
|
659
682
|
truthyIdxs[idxs[i]] = true;
|
|
660
683
|
}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
684
|
+
let onlyStepToRun;
|
|
685
|
+
if (perStep) {
|
|
686
|
+
const stepsToRun = step.steps.filter((_, idx) => truthyIdxs[idx]);
|
|
687
|
+
onlyStepToRun = stepsToRun[0];
|
|
688
|
+
}
|
|
689
|
+
if (onlyStepToRun) {
|
|
690
|
+
activeSteps[onlyStepToRun.step.id] = true;
|
|
691
|
+
const stepIndex = step.steps.findIndex((step2) => step2.step.id === onlyStepToRun.step.id);
|
|
692
|
+
await pubsub.publish("workflows", {
|
|
693
|
+
type: "workflow.step.run",
|
|
694
|
+
runId,
|
|
695
|
+
data: {
|
|
696
|
+
workflowId,
|
|
697
|
+
runId,
|
|
698
|
+
executionPath: executionPath.concat([stepIndex]),
|
|
699
|
+
resumeSteps,
|
|
700
|
+
stepResults,
|
|
701
|
+
timeTravel,
|
|
702
|
+
prevResult,
|
|
703
|
+
resumeData,
|
|
704
|
+
parentWorkflow,
|
|
705
|
+
activeSteps,
|
|
706
|
+
requestContext,
|
|
707
|
+
perStep
|
|
708
|
+
}
|
|
709
|
+
});
|
|
710
|
+
} else {
|
|
711
|
+
await Promise.all(
|
|
712
|
+
step.steps.map(async (step2, idx) => {
|
|
713
|
+
if (truthyIdxs[idx]) {
|
|
714
|
+
if (step2?.type === "step") {
|
|
715
|
+
activeSteps[step2.step.id] = true;
|
|
682
716
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
return pubsub.publish("workflows", {
|
|
686
|
-
type: "workflow.step.end",
|
|
687
|
-
runId,
|
|
688
|
-
data: {
|
|
689
|
-
workflowId,
|
|
717
|
+
return pubsub.publish("workflows", {
|
|
718
|
+
type: "workflow.step.run",
|
|
690
719
|
runId,
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
720
|
+
data: {
|
|
721
|
+
workflowId,
|
|
722
|
+
runId,
|
|
723
|
+
executionPath: executionPath.concat([idx]),
|
|
724
|
+
resumeSteps,
|
|
725
|
+
stepResults,
|
|
726
|
+
timeTravel,
|
|
727
|
+
prevResult,
|
|
728
|
+
resumeData,
|
|
729
|
+
parentWorkflow,
|
|
730
|
+
activeSteps,
|
|
731
|
+
requestContext,
|
|
732
|
+
perStep
|
|
733
|
+
}
|
|
734
|
+
});
|
|
735
|
+
} else {
|
|
736
|
+
return pubsub.publish("workflows", {
|
|
737
|
+
type: "workflow.step.end",
|
|
738
|
+
runId,
|
|
739
|
+
data: {
|
|
740
|
+
workflowId,
|
|
741
|
+
runId,
|
|
742
|
+
executionPath: executionPath.concat([idx]),
|
|
743
|
+
resumeSteps,
|
|
744
|
+
stepResults,
|
|
745
|
+
prevResult: { status: "skipped" },
|
|
746
|
+
resumeData,
|
|
747
|
+
parentWorkflow,
|
|
748
|
+
activeSteps,
|
|
749
|
+
requestContext,
|
|
750
|
+
perStep
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
})
|
|
755
|
+
);
|
|
756
|
+
}
|
|
704
757
|
}
|
|
705
758
|
async function processWorkflowWaitForEvent(workflowData, {
|
|
706
759
|
pubsub,
|
|
@@ -729,7 +782,8 @@ async function processWorkflowWaitForEvent(workflowData, {
|
|
|
729
782
|
stepResults: currentState?.context,
|
|
730
783
|
prevResult,
|
|
731
784
|
activeSteps: [],
|
|
732
|
-
requestContext: currentState?.requestContext
|
|
785
|
+
requestContext: currentState?.requestContext,
|
|
786
|
+
perStep: workflowData.perStep
|
|
733
787
|
}
|
|
734
788
|
});
|
|
735
789
|
}
|
|
@@ -744,7 +798,8 @@ async function processWorkflowSleep({
|
|
|
744
798
|
prevResult,
|
|
745
799
|
resumeData,
|
|
746
800
|
parentWorkflow,
|
|
747
|
-
requestContext
|
|
801
|
+
requestContext,
|
|
802
|
+
perStep
|
|
748
803
|
}, {
|
|
749
804
|
pubsub,
|
|
750
805
|
stepExecutor,
|
|
@@ -818,7 +873,8 @@ async function processWorkflowSleep({
|
|
|
818
873
|
resumeData,
|
|
819
874
|
parentWorkflow,
|
|
820
875
|
activeSteps,
|
|
821
|
-
requestContext
|
|
876
|
+
requestContext,
|
|
877
|
+
perStep
|
|
822
878
|
}
|
|
823
879
|
});
|
|
824
880
|
},
|
|
@@ -836,7 +892,8 @@ async function processWorkflowSleepUntil({
|
|
|
836
892
|
prevResult,
|
|
837
893
|
resumeData,
|
|
838
894
|
parentWorkflow,
|
|
839
|
-
requestContext
|
|
895
|
+
requestContext,
|
|
896
|
+
perStep
|
|
840
897
|
}, {
|
|
841
898
|
pubsub,
|
|
842
899
|
stepExecutor,
|
|
@@ -910,7 +967,8 @@ async function processWorkflowSleepUntil({
|
|
|
910
967
|
resumeData,
|
|
911
968
|
parentWorkflow,
|
|
912
969
|
activeSteps,
|
|
913
|
-
requestContext
|
|
970
|
+
requestContext,
|
|
971
|
+
perStep
|
|
914
972
|
}
|
|
915
973
|
});
|
|
916
974
|
},
|
|
@@ -999,11 +1057,14 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
999
1057
|
}
|
|
1000
1058
|
async processWorkflowCancel({ workflowId, runId }) {
|
|
1001
1059
|
this.cancelRunAndChildren(runId);
|
|
1002
|
-
const
|
|
1003
|
-
const currentState = await
|
|
1060
|
+
const workflowsStore = await this.mastra.getStorage()?.getStore("workflows");
|
|
1061
|
+
const currentState = await workflowsStore?.loadWorkflowSnapshot({
|
|
1004
1062
|
workflowName: workflowId,
|
|
1005
1063
|
runId
|
|
1006
1064
|
});
|
|
1065
|
+
if (!currentState) {
|
|
1066
|
+
this.mastra.getLogger()?.warn("Canceling workflow without loaded state", { workflowId, runId });
|
|
1067
|
+
}
|
|
1007
1068
|
await this.endWorkflow(
|
|
1008
1069
|
{
|
|
1009
1070
|
workflow: void 0,
|
|
@@ -1032,15 +1093,17 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1032
1093
|
timeTravel,
|
|
1033
1094
|
executionPath,
|
|
1034
1095
|
stepResults,
|
|
1035
|
-
requestContext
|
|
1096
|
+
requestContext,
|
|
1097
|
+
perStep
|
|
1036
1098
|
}) {
|
|
1037
1099
|
this.getOrCreateAbortController(runId);
|
|
1038
1100
|
if (parentWorkflow?.runId) {
|
|
1039
1101
|
this.parentChildRelationships.set(runId, parentWorkflow.runId);
|
|
1040
1102
|
}
|
|
1041
|
-
const
|
|
1103
|
+
const workflowsStore = await this.mastra.getStorage()?.getStore("workflows");
|
|
1104
|
+
const existingRun = await workflowsStore?.getWorkflowRunById({ runId, workflowName: workflow.id });
|
|
1042
1105
|
const resourceId = existingRun?.resourceId;
|
|
1043
|
-
await
|
|
1106
|
+
await workflowsStore?.persistWorkflowSnapshot({
|
|
1044
1107
|
workflowName: workflow.id,
|
|
1045
1108
|
runId,
|
|
1046
1109
|
resourceId,
|
|
@@ -1076,20 +1139,32 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1076
1139
|
timeTravel,
|
|
1077
1140
|
requestContext,
|
|
1078
1141
|
resumeData,
|
|
1079
|
-
activeSteps: {}
|
|
1142
|
+
activeSteps: {},
|
|
1143
|
+
perStep
|
|
1080
1144
|
}
|
|
1081
1145
|
});
|
|
1082
1146
|
}
|
|
1083
1147
|
async endWorkflow(args, status = "success") {
|
|
1084
|
-
const { workflowId, runId, prevResult } = args;
|
|
1085
|
-
await this.mastra.getStorage()?.
|
|
1148
|
+
const { workflowId, runId, prevResult, perStep } = args;
|
|
1149
|
+
const workflowsStore = await this.mastra.getStorage()?.getStore("workflows");
|
|
1150
|
+
await workflowsStore?.updateWorkflowState({
|
|
1086
1151
|
workflowName: workflowId,
|
|
1087
1152
|
runId,
|
|
1088
1153
|
opts: {
|
|
1089
|
-
status,
|
|
1154
|
+
status: perStep && status === "success" ? "paused" : status,
|
|
1090
1155
|
result: prevResult
|
|
1091
1156
|
}
|
|
1092
1157
|
});
|
|
1158
|
+
if (perStep) {
|
|
1159
|
+
await this.mastra.pubsub.publish(`workflow.events.v2.${runId}`, {
|
|
1160
|
+
type: "watch",
|
|
1161
|
+
runId,
|
|
1162
|
+
data: {
|
|
1163
|
+
type: "workflow-paused",
|
|
1164
|
+
payload: {}
|
|
1165
|
+
}
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1093
1168
|
await this.mastra.pubsub.publish(`workflow.events.v2.${runId}`, {
|
|
1094
1169
|
type: "watch",
|
|
1095
1170
|
runId,
|
|
@@ -1107,7 +1182,17 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1107
1182
|
});
|
|
1108
1183
|
}
|
|
1109
1184
|
async processWorkflowEnd(args) {
|
|
1110
|
-
const {
|
|
1185
|
+
const {
|
|
1186
|
+
resumeSteps,
|
|
1187
|
+
prevResult,
|
|
1188
|
+
resumeData,
|
|
1189
|
+
parentWorkflow,
|
|
1190
|
+
activeSteps,
|
|
1191
|
+
requestContext,
|
|
1192
|
+
runId,
|
|
1193
|
+
timeTravel,
|
|
1194
|
+
perStep
|
|
1195
|
+
} = args;
|
|
1111
1196
|
this.cleanupRun(runId);
|
|
1112
1197
|
if (parentWorkflow) {
|
|
1113
1198
|
await this.mastra.pubsub.publish("workflows", {
|
|
@@ -1125,7 +1210,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1125
1210
|
parentWorkflow: parentWorkflow.parentWorkflow,
|
|
1126
1211
|
parentContext: parentWorkflow,
|
|
1127
1212
|
requestContext,
|
|
1128
|
-
timeTravel
|
|
1213
|
+
timeTravel,
|
|
1214
|
+
perStep
|
|
1129
1215
|
}
|
|
1130
1216
|
});
|
|
1131
1217
|
}
|
|
@@ -1185,7 +1271,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1185
1271
|
timeTravel
|
|
1186
1272
|
} = args;
|
|
1187
1273
|
this.cleanupRun(runId);
|
|
1188
|
-
await this.mastra.getStorage()?.
|
|
1274
|
+
const workflowsStore = await this.mastra.getStorage()?.getStore("workflows");
|
|
1275
|
+
await workflowsStore?.updateWorkflowState({
|
|
1189
1276
|
workflowName: workflowId,
|
|
1190
1277
|
runId,
|
|
1191
1278
|
opts: {
|
|
@@ -1232,7 +1319,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1232
1319
|
resumeData,
|
|
1233
1320
|
parentWorkflow,
|
|
1234
1321
|
requestContext,
|
|
1235
|
-
retryCount = 0
|
|
1322
|
+
retryCount = 0,
|
|
1323
|
+
perStep
|
|
1236
1324
|
}) {
|
|
1237
1325
|
let stepGraph = workflow.stepGraph;
|
|
1238
1326
|
if (!executionPath?.length) {
|
|
@@ -1295,7 +1383,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1295
1383
|
prevResult,
|
|
1296
1384
|
resumeData,
|
|
1297
1385
|
parentWorkflow,
|
|
1298
|
-
requestContext
|
|
1386
|
+
requestContext,
|
|
1387
|
+
perStep
|
|
1299
1388
|
},
|
|
1300
1389
|
{
|
|
1301
1390
|
pubsub: this.mastra.pubsub,
|
|
@@ -1315,7 +1404,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1315
1404
|
prevResult,
|
|
1316
1405
|
resumeData,
|
|
1317
1406
|
parentWorkflow,
|
|
1318
|
-
requestContext
|
|
1407
|
+
requestContext,
|
|
1408
|
+
perStep
|
|
1319
1409
|
},
|
|
1320
1410
|
{
|
|
1321
1411
|
pubsub: this.mastra.pubsub,
|
|
@@ -1336,7 +1426,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1336
1426
|
prevResult,
|
|
1337
1427
|
resumeData,
|
|
1338
1428
|
parentWorkflow,
|
|
1339
|
-
requestContext
|
|
1429
|
+
requestContext,
|
|
1430
|
+
perStep
|
|
1340
1431
|
},
|
|
1341
1432
|
{
|
|
1342
1433
|
pubsub: this.mastra.pubsub,
|
|
@@ -1357,7 +1448,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1357
1448
|
prevResult,
|
|
1358
1449
|
resumeData,
|
|
1359
1450
|
parentWorkflow,
|
|
1360
|
-
requestContext
|
|
1451
|
+
requestContext,
|
|
1452
|
+
perStep
|
|
1361
1453
|
},
|
|
1362
1454
|
{
|
|
1363
1455
|
pubsub: this.mastra.pubsub,
|
|
@@ -1378,7 +1470,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1378
1470
|
prevResult,
|
|
1379
1471
|
resumeData,
|
|
1380
1472
|
parentWorkflow,
|
|
1381
|
-
requestContext
|
|
1473
|
+
requestContext,
|
|
1474
|
+
perStep
|
|
1382
1475
|
},
|
|
1383
1476
|
{
|
|
1384
1477
|
pubsub: this.mastra.pubsub,
|
|
@@ -1410,6 +1503,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1410
1503
|
);
|
|
1411
1504
|
}
|
|
1412
1505
|
activeSteps[step.step.id] = true;
|
|
1506
|
+
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
1413
1507
|
if (step.step instanceof EventedWorkflow) {
|
|
1414
1508
|
if (resumeSteps?.length > 1) {
|
|
1415
1509
|
const stepData = stepResults[step.step.id];
|
|
@@ -1436,7 +1530,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1436
1530
|
})
|
|
1437
1531
|
);
|
|
1438
1532
|
}
|
|
1439
|
-
const snapshot = await
|
|
1533
|
+
const snapshot = await workflowsStore?.loadWorkflowSnapshot({
|
|
1440
1534
|
workflowName: step.step.id,
|
|
1441
1535
|
runId: nestedRunId
|
|
1442
1536
|
});
|
|
@@ -1464,11 +1558,12 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1464
1558
|
prevResult,
|
|
1465
1559
|
resumeData,
|
|
1466
1560
|
activeSteps,
|
|
1467
|
-
requestContext
|
|
1561
|
+
requestContext,
|
|
1562
|
+
perStep
|
|
1468
1563
|
}
|
|
1469
1564
|
});
|
|
1470
1565
|
} else if (timeTravel && timeTravel.steps?.length > 1 && timeTravel.steps[0] === step.step.id) {
|
|
1471
|
-
const snapshot = await
|
|
1566
|
+
const snapshot = await workflowsStore?.loadWorkflowSnapshot({
|
|
1472
1567
|
workflowName: step.step.id,
|
|
1473
1568
|
runId
|
|
1474
1569
|
}) ?? { context: {} };
|
|
@@ -1479,7 +1574,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1479
1574
|
context: timeTravel.nestedStepResults?.[step.step.id] ?? {},
|
|
1480
1575
|
nestedStepsContext: timeTravel.nestedStepResults ?? {},
|
|
1481
1576
|
snapshot,
|
|
1482
|
-
graph: step.step.buildExecutionGraph()
|
|
1577
|
+
graph: step.step.buildExecutionGraph(),
|
|
1578
|
+
perStep
|
|
1483
1579
|
});
|
|
1484
1580
|
const nestedPrevStep = getStep(step.step, timeTravelParams.executionPath);
|
|
1485
1581
|
const nestedPrevResult = timeTravelParams.stepResults[nestedPrevStep?.id ?? "input"];
|
|
@@ -1505,7 +1601,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1505
1601
|
prevResult: { status: "success", output: nestedPrevResult?.payload },
|
|
1506
1602
|
timeTravel: timeTravelParams,
|
|
1507
1603
|
activeSteps,
|
|
1508
|
-
requestContext
|
|
1604
|
+
requestContext,
|
|
1605
|
+
perStep
|
|
1509
1606
|
}
|
|
1510
1607
|
});
|
|
1511
1608
|
} else {
|
|
@@ -1530,7 +1627,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1530
1627
|
prevResult,
|
|
1531
1628
|
resumeData,
|
|
1532
1629
|
activeSteps,
|
|
1533
|
-
requestContext
|
|
1630
|
+
requestContext,
|
|
1631
|
+
perStep
|
|
1534
1632
|
}
|
|
1535
1633
|
});
|
|
1536
1634
|
}
|
|
@@ -1593,7 +1691,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1593
1691
|
retryCount,
|
|
1594
1692
|
foreachIdx: step.type === "foreach" ? executionPath[1] : void 0,
|
|
1595
1693
|
validateInputs: workflow.options.validateInputs,
|
|
1596
|
-
abortController
|
|
1694
|
+
abortController,
|
|
1695
|
+
perStep
|
|
1597
1696
|
});
|
|
1598
1697
|
requestContext = Object.fromEntries(rc.entries());
|
|
1599
1698
|
if (stepResult.status === "bailed") {
|
|
@@ -1612,7 +1711,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1612
1711
|
},
|
|
1613
1712
|
prevResult: stepResult,
|
|
1614
1713
|
activeSteps,
|
|
1615
|
-
requestContext
|
|
1714
|
+
requestContext,
|
|
1715
|
+
perStep
|
|
1616
1716
|
});
|
|
1617
1717
|
return;
|
|
1618
1718
|
}
|
|
@@ -1690,7 +1790,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1690
1790
|
stepResults,
|
|
1691
1791
|
prevResult: stepResult,
|
|
1692
1792
|
activeSteps,
|
|
1693
|
-
requestContext
|
|
1793
|
+
requestContext,
|
|
1794
|
+
perStep
|
|
1694
1795
|
}
|
|
1695
1796
|
});
|
|
1696
1797
|
}
|
|
@@ -1707,7 +1808,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1707
1808
|
stepResults,
|
|
1708
1809
|
activeSteps,
|
|
1709
1810
|
parentContext,
|
|
1710
|
-
requestContext
|
|
1811
|
+
requestContext,
|
|
1812
|
+
perStep
|
|
1711
1813
|
}) {
|
|
1712
1814
|
let step = workflow.stepGraph[executionPath[0]];
|
|
1713
1815
|
if ((step?.type === "parallel" || step?.type === "conditional") && executionPath.length > 1) {
|
|
@@ -1733,8 +1835,9 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1733
1835
|
})
|
|
1734
1836
|
);
|
|
1735
1837
|
}
|
|
1838
|
+
const workflowsStore = await this.mastra.getStorage()?.getStore("workflows");
|
|
1736
1839
|
if (step.type === "foreach") {
|
|
1737
|
-
const snapshot = await
|
|
1840
|
+
const snapshot = await workflowsStore?.loadWorkflowSnapshot({
|
|
1738
1841
|
workflowName: workflowId,
|
|
1739
1842
|
runId
|
|
1740
1843
|
});
|
|
@@ -1749,7 +1852,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1749
1852
|
newResult = { ...prevResult, output: [prevResult.output] };
|
|
1750
1853
|
}
|
|
1751
1854
|
}
|
|
1752
|
-
const newStepResults = await
|
|
1855
|
+
const newStepResults = await workflowsStore?.updateWorkflowResults({
|
|
1753
1856
|
workflowName: workflow.id,
|
|
1754
1857
|
runId,
|
|
1755
1858
|
stepId: step.step.id,
|
|
@@ -1768,7 +1871,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1768
1871
|
payload: parentContext.input?.output ?? {}
|
|
1769
1872
|
};
|
|
1770
1873
|
}
|
|
1771
|
-
const newStepResults = await
|
|
1874
|
+
const newStepResults = await workflowsStore?.updateWorkflowResults({
|
|
1772
1875
|
workflowName: workflow.id,
|
|
1773
1876
|
runId,
|
|
1774
1877
|
stepId: step.step.id,
|
|
@@ -1804,7 +1907,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1804
1907
|
if (suspendedStep) {
|
|
1805
1908
|
suspendedPaths[suspendedStep.id] = executionPath;
|
|
1806
1909
|
}
|
|
1807
|
-
await
|
|
1910
|
+
await workflowsStore?.updateWorkflowState({
|
|
1808
1911
|
workflowName: workflowId,
|
|
1809
1912
|
runId,
|
|
1810
1913
|
opts: {
|
|
@@ -1871,7 +1974,38 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1871
1974
|
}
|
|
1872
1975
|
}
|
|
1873
1976
|
step = workflow.stepGraph[executionPath[0]];
|
|
1874
|
-
if (
|
|
1977
|
+
if (perStep) {
|
|
1978
|
+
if (parentWorkflow && executionPath[0] < workflow.stepGraph.length - 1) {
|
|
1979
|
+
const { endedAt, output, status, ...nestedPrevResult } = prevResult;
|
|
1980
|
+
await this.endWorkflow({
|
|
1981
|
+
workflow,
|
|
1982
|
+
parentWorkflow,
|
|
1983
|
+
workflowId,
|
|
1984
|
+
runId,
|
|
1985
|
+
executionPath,
|
|
1986
|
+
resumeSteps,
|
|
1987
|
+
stepResults,
|
|
1988
|
+
prevResult: { ...nestedPrevResult, status: "paused" },
|
|
1989
|
+
activeSteps,
|
|
1990
|
+
requestContext,
|
|
1991
|
+
perStep
|
|
1992
|
+
});
|
|
1993
|
+
} else {
|
|
1994
|
+
await this.endWorkflow({
|
|
1995
|
+
workflow,
|
|
1996
|
+
parentWorkflow,
|
|
1997
|
+
workflowId,
|
|
1998
|
+
runId,
|
|
1999
|
+
executionPath,
|
|
2000
|
+
resumeSteps,
|
|
2001
|
+
stepResults,
|
|
2002
|
+
prevResult,
|
|
2003
|
+
activeSteps,
|
|
2004
|
+
requestContext,
|
|
2005
|
+
perStep
|
|
2006
|
+
});
|
|
2007
|
+
}
|
|
2008
|
+
} else if ((step?.type === "parallel" || step?.type === "conditional") && executionPath.length > 1) {
|
|
1875
2009
|
let skippedCount = 0;
|
|
1876
2010
|
const allResults = step.steps.reduce(
|
|
1877
2011
|
(acc, step2) => {
|
|
@@ -1960,7 +2094,8 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1960
2094
|
workflowId,
|
|
1961
2095
|
runId
|
|
1962
2096
|
}) {
|
|
1963
|
-
const
|
|
2097
|
+
const workflowsStore = await this.mastra.getStorage()?.getStore("workflows");
|
|
2098
|
+
const snapshot = await workflowsStore?.loadWorkflowSnapshot({
|
|
1964
2099
|
workflowName: workflowId,
|
|
1965
2100
|
runId
|
|
1966
2101
|
});
|
|
@@ -2284,7 +2419,8 @@ var EventedWorkflow = class extends Workflow {
|
|
|
2284
2419
|
withNestedWorkflows: false
|
|
2285
2420
|
});
|
|
2286
2421
|
if (!workflowSnapshotInStorage && shouldPersistSnapshot) {
|
|
2287
|
-
await this.mastra?.getStorage()?.
|
|
2422
|
+
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
2423
|
+
await workflowsStore?.persistWorkflowSnapshot({
|
|
2288
2424
|
workflowName: this.id,
|
|
2289
2425
|
runId: runIdToUse,
|
|
2290
2426
|
resourceId: options?.resourceId,
|
|
@@ -2336,7 +2472,8 @@ var EventedRun = class extends Run {
|
|
|
2336
2472
|
async start({
|
|
2337
2473
|
inputData,
|
|
2338
2474
|
initialState,
|
|
2339
|
-
requestContext
|
|
2475
|
+
requestContext,
|
|
2476
|
+
perStep
|
|
2340
2477
|
}) {
|
|
2341
2478
|
if (this.serializedStepGraph.length === 0) {
|
|
2342
2479
|
throw new Error(
|
|
@@ -2347,7 +2484,8 @@ var EventedRun = class extends Run {
|
|
|
2347
2484
|
throw new Error("Uncommitted step flow changes detected. Call .commit() to register the steps.");
|
|
2348
2485
|
}
|
|
2349
2486
|
requestContext = requestContext ?? new RequestContext();
|
|
2350
|
-
await this.mastra?.getStorage()?.
|
|
2487
|
+
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
2488
|
+
await workflowsStore?.persistWorkflowSnapshot({
|
|
2351
2489
|
workflowName: this.workflowId,
|
|
2352
2490
|
runId: this.runId,
|
|
2353
2491
|
resourceId: this.resourceId,
|
|
@@ -2382,7 +2520,8 @@ var EventedRun = class extends Run {
|
|
|
2382
2520
|
pubsub: this.mastra.pubsub,
|
|
2383
2521
|
retryConfig: this.retryConfig,
|
|
2384
2522
|
requestContext,
|
|
2385
|
-
abortController: this.abortController
|
|
2523
|
+
abortController: this.abortController,
|
|
2524
|
+
perStep
|
|
2386
2525
|
});
|
|
2387
2526
|
if (result.status !== "suspended") {
|
|
2388
2527
|
this.cleanup?.();
|
|
@@ -2397,7 +2536,8 @@ var EventedRun = class extends Run {
|
|
|
2397
2536
|
async startAsync({
|
|
2398
2537
|
inputData,
|
|
2399
2538
|
initialState,
|
|
2400
|
-
requestContext
|
|
2539
|
+
requestContext,
|
|
2540
|
+
perStep
|
|
2401
2541
|
}) {
|
|
2402
2542
|
if (this.serializedStepGraph.length === 0) {
|
|
2403
2543
|
throw new Error(
|
|
@@ -2408,7 +2548,8 @@ var EventedRun = class extends Run {
|
|
|
2408
2548
|
throw new Error("Uncommitted step flow changes detected. Call .commit() to register the steps.");
|
|
2409
2549
|
}
|
|
2410
2550
|
requestContext = requestContext ?? new RequestContext();
|
|
2411
|
-
await this.mastra?.getStorage()?.
|
|
2551
|
+
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
2552
|
+
await workflowsStore?.persistWorkflowSnapshot({
|
|
2412
2553
|
workflowName: this.workflowId,
|
|
2413
2554
|
runId: this.runId,
|
|
2414
2555
|
resourceId: this.resourceId,
|
|
@@ -2440,7 +2581,8 @@ var EventedRun = class extends Run {
|
|
|
2440
2581
|
runId: this.runId,
|
|
2441
2582
|
prevResult: { status: "success", output: inputDataToUse },
|
|
2442
2583
|
requestContext: Object.fromEntries(requestContext.entries()),
|
|
2443
|
-
initialState: initialStateToUse
|
|
2584
|
+
initialState: initialStateToUse,
|
|
2585
|
+
perStep
|
|
2444
2586
|
}
|
|
2445
2587
|
});
|
|
2446
2588
|
return { runId: this.runId };
|
|
@@ -2458,21 +2600,28 @@ var EventedRun = class extends Run {
|
|
|
2458
2600
|
if (steps.length === 0) {
|
|
2459
2601
|
throw new Error("No steps provided to resume");
|
|
2460
2602
|
}
|
|
2461
|
-
const
|
|
2603
|
+
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
2604
|
+
if (!workflowsStore) {
|
|
2605
|
+
throw new Error("Cannot resume workflow: workflows store is required");
|
|
2606
|
+
}
|
|
2607
|
+
const snapshot = await workflowsStore.loadWorkflowSnapshot({
|
|
2462
2608
|
workflowName: this.workflowId,
|
|
2463
2609
|
runId: this.runId
|
|
2464
2610
|
});
|
|
2465
|
-
|
|
2611
|
+
if (!snapshot) {
|
|
2612
|
+
throw new Error(`Cannot resume workflow: no snapshot found for runId ${this.runId}`);
|
|
2613
|
+
}
|
|
2614
|
+
const resumePath = snapshot.suspendedPaths?.[steps[0]];
|
|
2466
2615
|
if (!resumePath) {
|
|
2467
2616
|
throw new Error(
|
|
2468
|
-
`No resume path found for step ${JSON.stringify(steps)}, currently suspended paths are ${JSON.stringify(snapshot
|
|
2617
|
+
`No resume path found for step ${JSON.stringify(steps)}, currently suspended paths are ${JSON.stringify(snapshot.suspendedPaths)}`
|
|
2469
2618
|
);
|
|
2470
2619
|
}
|
|
2471
2620
|
console.dir(
|
|
2472
|
-
{ resume: { requestContextObj: snapshot
|
|
2621
|
+
{ resume: { requestContextObj: snapshot.requestContext, requestContext: params.requestContext } },
|
|
2473
2622
|
{ depth: null }
|
|
2474
2623
|
);
|
|
2475
|
-
const requestContextObj = snapshot
|
|
2624
|
+
const requestContextObj = snapshot.requestContext ?? {};
|
|
2476
2625
|
const requestContext = new RequestContext();
|
|
2477
2626
|
for (const [key, value] of Object.entries(requestContextObj)) {
|
|
2478
2627
|
requestContext.set(key, value);
|
|
@@ -2502,7 +2651,8 @@ var EventedRun = class extends Run {
|
|
|
2502
2651
|
},
|
|
2503
2652
|
pubsub: this.mastra.pubsub,
|
|
2504
2653
|
requestContext,
|
|
2505
|
-
abortController: this.abortController
|
|
2654
|
+
abortController: this.abortController,
|
|
2655
|
+
perStep: params.perStep
|
|
2506
2656
|
}).then((result) => {
|
|
2507
2657
|
if (result.status !== "suspended") {
|
|
2508
2658
|
this.closeStreamAction?.().catch(() => {
|
|
@@ -2544,7 +2694,8 @@ var EventedRun = class extends Run {
|
|
|
2544
2694
|
};
|
|
2545
2695
|
}
|
|
2546
2696
|
async cancel() {
|
|
2547
|
-
await this.mastra?.getStorage()?.
|
|
2697
|
+
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
2698
|
+
await workflowsStore?.updateWorkflowState({
|
|
2548
2699
|
workflowName: this.workflowId,
|
|
2549
2700
|
runId: this.runId,
|
|
2550
2701
|
opts: {
|
|
@@ -2639,7 +2790,8 @@ var EventedExecutionEngine = class extends ExecutionEngine {
|
|
|
2639
2790
|
prevResult: { status: "success", output: prevResult?.payload },
|
|
2640
2791
|
resumeData: params.resume.resumePayload,
|
|
2641
2792
|
requestContext: Object.fromEntries(params.requestContext.entries()),
|
|
2642
|
-
format: params.format
|
|
2793
|
+
format: params.format,
|
|
2794
|
+
perStep: params.perStep
|
|
2643
2795
|
}
|
|
2644
2796
|
});
|
|
2645
2797
|
} else if (params.timeTravel) {
|
|
@@ -2656,7 +2808,8 @@ var EventedExecutionEngine = class extends ExecutionEngine {
|
|
|
2656
2808
|
timeTravel: params.timeTravel,
|
|
2657
2809
|
prevResult: { status: "success", output: prevResult?.payload },
|
|
2658
2810
|
requestContext: Object.fromEntries(params.requestContext.entries()),
|
|
2659
|
-
format: params.format
|
|
2811
|
+
format: params.format,
|
|
2812
|
+
perStep: params.perStep
|
|
2660
2813
|
}
|
|
2661
2814
|
});
|
|
2662
2815
|
} else {
|
|
@@ -2668,7 +2821,8 @@ var EventedExecutionEngine = class extends ExecutionEngine {
|
|
|
2668
2821
|
runId: params.runId,
|
|
2669
2822
|
prevResult: { status: "success", output: params.input },
|
|
2670
2823
|
requestContext: Object.fromEntries(params.requestContext.entries()),
|
|
2671
|
-
format: params.format
|
|
2824
|
+
format: params.format,
|
|
2825
|
+
perStep: params.perStep
|
|
2672
2826
|
}
|
|
2673
2827
|
});
|
|
2674
2828
|
}
|
|
@@ -2706,6 +2860,11 @@ var EventedExecutionEngine = class extends ExecutionEngine {
|
|
|
2706
2860
|
status: "suspended",
|
|
2707
2861
|
steps: resultData.stepResults
|
|
2708
2862
|
};
|
|
2863
|
+
} else if (resultData.prevResult.status === "paused" || params.perStep) {
|
|
2864
|
+
callbackArg = {
|
|
2865
|
+
status: "paused",
|
|
2866
|
+
steps: resultData.stepResults
|
|
2867
|
+
};
|
|
2709
2868
|
} else {
|
|
2710
2869
|
callbackArg = {
|
|
2711
2870
|
status: resultData.prevResult.status,
|
|
@@ -2713,7 +2872,9 @@ var EventedExecutionEngine = class extends ExecutionEngine {
|
|
|
2713
2872
|
steps: resultData.stepResults
|
|
2714
2873
|
};
|
|
2715
2874
|
}
|
|
2716
|
-
|
|
2875
|
+
if (callbackArg.status !== "paused") {
|
|
2876
|
+
await this.invokeLifecycleCallbacks(callbackArg);
|
|
2877
|
+
}
|
|
2717
2878
|
let result;
|
|
2718
2879
|
if (resultData.prevResult.status === "suspended") {
|
|
2719
2880
|
const suspendedSteps = Object.entries(resultData.stepResults).map(([_stepId, stepResult]) => {
|
|
@@ -2734,5 +2895,5 @@ var EventedExecutionEngine = class extends ExecutionEngine {
|
|
|
2734
2895
|
};
|
|
2735
2896
|
|
|
2736
2897
|
export { EventedExecutionEngine, EventedRun, EventedWorkflow, StepExecutor, WorkflowEventProcessor, cloneStep, cloneWorkflow, createStep, createWorkflow };
|
|
2737
|
-
//# sourceMappingURL=chunk-
|
|
2738
|
-
//# sourceMappingURL=chunk-
|
|
2898
|
+
//# sourceMappingURL=chunk-D2IFWD7A.js.map
|
|
2899
|
+
//# sourceMappingURL=chunk-D2IFWD7A.js.map
|