@mastra/core 1.2.1-alpha.0 → 1.3.0-alpha.1
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 +335 -0
- package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +2093 -262
- package/dist/agent/agent-legacy.d.ts.map +1 -1
- package/dist/agent/agent.d.ts +12 -3
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/index.cjs +13 -13
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/index.cjs +18 -18
- package/dist/agent/message-list/index.js +1 -1
- package/dist/agent/message-list/message-list.d.ts.map +1 -1
- package/dist/agent/types.d.ts +6 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/index.d.ts +3 -1
- package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/stream-step.d.ts +3 -1
- package/dist/agent/workflows/prepare-stream/stream-step.d.ts.map +1 -1
- package/dist/base.cjs +2 -2
- package/dist/base.d.ts +13 -1
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +1 -1
- package/dist/bundler/index.cjs +2 -2
- package/dist/bundler/index.js +1 -1
- package/dist/cache/index.cjs +3 -3
- package/dist/cache/index.js +1 -1
- package/dist/{chunk-ENCTSDWC.js → chunk-2GWTJFVM.js} +2410 -1402
- package/dist/chunk-2GWTJFVM.js.map +1 -0
- package/dist/{chunk-OB4V67IX.cjs → chunk-2K5PNW2U.cjs} +4 -4
- package/dist/{chunk-OB4V67IX.cjs.map → chunk-2K5PNW2U.cjs.map} +1 -1
- package/dist/{chunk-VZXYBFCX.cjs → chunk-2P6DD7M5.cjs} +10 -10
- package/dist/{chunk-VZXYBFCX.cjs.map → chunk-2P6DD7M5.cjs.map} +1 -1
- package/dist/{chunk-Q2D7LERO.cjs → chunk-2VD5OGOT.cjs} +4 -4
- package/dist/{chunk-Q2D7LERO.cjs.map → chunk-2VD5OGOT.cjs.map} +1 -1
- package/dist/{chunk-GVLPTDJA.cjs → chunk-5VMWMXSI.cjs} +236 -63
- package/dist/chunk-5VMWMXSI.cjs.map +1 -0
- package/dist/{chunk-4NG7CKEG.js → chunk-6VGCVSP4.js} +3 -3
- package/dist/{chunk-4NG7CKEG.js.map → chunk-6VGCVSP4.js.map} +1 -1
- package/dist/{chunk-IIZF4W7B.cjs → chunk-7UWHFWST.cjs} +52 -5
- package/dist/chunk-7UWHFWST.cjs.map +1 -0
- package/dist/{chunk-WFUNLRQX.js → chunk-AFF24QUP.js} +366 -134
- package/dist/chunk-AFF24QUP.js.map +1 -0
- package/dist/{chunk-VW7YQWDW.cjs → chunk-BFIOQFGF.cjs} +28 -2
- package/dist/chunk-BFIOQFGF.cjs.map +1 -0
- package/dist/{chunk-HMCXNOF6.cjs → chunk-CGPH7CMG.cjs} +2431 -1417
- package/dist/chunk-CGPH7CMG.cjs.map +1 -0
- package/dist/{chunk-HN2MSTR6.cjs → chunk-D5B5ON7A.cjs} +269 -42
- package/dist/chunk-D5B5ON7A.cjs.map +1 -0
- package/dist/{chunk-2DMSFLJY.cjs → chunk-DD7377YA.cjs} +8 -8
- package/dist/chunk-DD7377YA.cjs.map +1 -0
- package/dist/{chunk-A5QFWX67.cjs → chunk-DULE2DRR.cjs} +79 -59
- package/dist/chunk-DULE2DRR.cjs.map +1 -0
- package/dist/{chunk-ZWM2CAIM.js → chunk-ELBCIHOB.js} +4 -4
- package/dist/{chunk-ZWM2CAIM.js.map → chunk-ELBCIHOB.js.map} +1 -1
- package/dist/{chunk-W3AQUG66.js → chunk-GIY5BINT.js} +4 -4
- package/dist/{chunk-W3AQUG66.js.map → chunk-GIY5BINT.js.map} +1 -1
- package/dist/{chunk-M6VFJX5A.js → chunk-GMSAGYTB.js} +3 -3
- package/dist/{chunk-M6VFJX5A.js.map → chunk-GMSAGYTB.js.map} +1 -1
- package/dist/{chunk-E3VFKTIA.js → chunk-GMSEZYLZ.js} +2245 -179
- package/dist/chunk-GMSEZYLZ.js.map +1 -0
- package/dist/{chunk-JRJJ5VQE.cjs → chunk-GZD6443M.cjs} +99 -55
- package/dist/chunk-GZD6443M.cjs.map +1 -0
- package/dist/{chunk-Z6NRYYOH.js → chunk-ILQXPZCD.js} +9 -4
- package/dist/chunk-ILQXPZCD.js.map +1 -0
- package/dist/{chunk-MQB7XFXP.js → chunk-LHRHOPUC.js} +3 -3
- package/dist/{chunk-MQB7XFXP.js.map → chunk-LHRHOPUC.js.map} +1 -1
- package/dist/{chunk-5YVR7B4R.js → chunk-LULKG6NF.js} +29 -9
- package/dist/chunk-LULKG6NF.js.map +1 -0
- package/dist/{chunk-MSWXEOZC.js → chunk-MAX37NGP.js} +5 -5
- package/dist/chunk-MAX37NGP.js.map +1 -0
- package/dist/{chunk-HU2ONA2W.cjs → chunk-ON2KVIUJ.cjs} +17 -17
- package/dist/{chunk-HU2ONA2W.cjs.map → chunk-ON2KVIUJ.cjs.map} +1 -1
- package/dist/{chunk-I66TMZJ3.cjs → chunk-OOCEAC6U.cjs} +21 -18
- package/dist/chunk-OOCEAC6U.cjs.map +1 -0
- package/dist/{chunk-MNWW2R3U.js → chunk-OV7OOUUR.js} +90 -54
- package/dist/chunk-OV7OOUUR.js.map +1 -0
- package/dist/{chunk-C4WWWQHT.cjs → chunk-RO47SMI7.cjs} +23 -3
- package/dist/chunk-RO47SMI7.cjs.map +1 -0
- package/dist/{chunk-6FG6FU5Y.cjs → chunk-RQ56ZSIR.cjs} +4 -4
- package/dist/{chunk-6FG6FU5Y.cjs.map → chunk-RQ56ZSIR.cjs.map} +1 -1
- package/dist/{chunk-IW3BNL7A.js → chunk-RS6CZXGA.js} +50 -3
- package/dist/chunk-RS6CZXGA.js.map +1 -0
- package/dist/{chunk-AIJLACR2.js → chunk-S53FKKVL.js} +27 -3
- package/dist/chunk-S53FKKVL.js.map +1 -0
- package/dist/{chunk-G6E3QNJC.js → chunk-SBPPGJL6.js} +4078 -4333
- package/dist/chunk-SBPPGJL6.js.map +1 -0
- package/dist/{chunk-UZL4H5P2.cjs → chunk-SH4PCZ3X.cjs} +5375 -5648
- package/dist/chunk-SH4PCZ3X.cjs.map +1 -0
- package/dist/{chunk-QOFI2WBM.cjs → chunk-SZH2YH74.cjs} +985 -223
- package/dist/chunk-SZH2YH74.cjs.map +1 -0
- package/dist/{chunk-XCPEEIHI.cjs → chunk-U4EG3D6G.cjs} +3012 -927
- package/dist/chunk-U4EG3D6G.cjs.map +1 -0
- package/dist/{chunk-7MDVYPWX.cjs → chunk-UE2G2LRP.cjs} +9 -4
- package/dist/chunk-UE2G2LRP.cjs.map +1 -0
- package/dist/{chunk-P62OJXQ4.js → chunk-VHAFCFYP.js} +268 -41
- package/dist/chunk-VHAFCFYP.js.map +1 -0
- package/dist/{chunk-VX7UA3SO.js → chunk-VJDLIS2E.js} +968 -211
- package/dist/chunk-VJDLIS2E.js.map +1 -0
- package/dist/{chunk-AUF6U2BL.js → chunk-VM25PDSW.js} +5 -5
- package/dist/{chunk-AUF6U2BL.js.map → chunk-VM25PDSW.js.map} +1 -1
- package/dist/{chunk-JIT2OY3X.js → chunk-WCAFTXGK.js} +23 -3
- package/dist/chunk-WCAFTXGK.js.map +1 -0
- package/dist/{chunk-YLODOPYM.cjs → chunk-XDD5V446.cjs} +4163 -5352
- package/dist/chunk-XDD5V446.cjs.map +1 -0
- package/dist/{chunk-RXD5EGQF.js → chunk-YMXQDOSQ.js} +228 -55
- package/dist/chunk-YMXQDOSQ.js.map +1 -0
- package/dist/{chunk-BP2TSCBW.js → chunk-ZATLLPIH.js} +4391 -5561
- package/dist/chunk-ZATLLPIH.js.map +1 -0
- package/dist/{chunk-5SOS47PH.cjs → chunk-ZC6IHDHX.cjs} +454 -222
- package/dist/chunk-ZC6IHDHX.cjs.map +1 -0
- package/dist/{chunk-T6PRRKMW.js → chunk-ZHFM7HCQ.js} +9 -6
- package/dist/chunk-ZHFM7HCQ.js.map +1 -0
- package/dist/{chunk-B4M33FCS.cjs → chunk-ZIWDJWC3.cjs} +7 -7
- package/dist/{chunk-B4M33FCS.cjs.map → chunk-ZIWDJWC3.cjs.map} +1 -1
- package/dist/deployer/index.cjs +2 -2
- package/dist/deployer/index.js +1 -1
- package/dist/docs/SKILL.md +2 -9
- package/dist/docs/assets/SOURCE_MAP.json +399 -342
- package/dist/docs/references/docs-agents-agent-memory.md +45 -1
- package/dist/docs/references/docs-agents-network-approval.md +1 -1
- package/dist/docs/references/docs-agents-networks.md +3 -3
- package/dist/docs/references/docs-agents-overview.md +8 -0
- package/dist/docs/references/docs-agents-using-tools.md +82 -72
- package/dist/docs/references/docs-memory-observational-memory.md +89 -17
- package/dist/docs/references/docs-observability-overview.md +1 -1
- package/dist/docs/references/docs-observability-tracing-exporters-langsmith.md +70 -0
- package/dist/docs/references/docs-observability-tracing-overview.md +1 -1
- package/dist/docs/references/docs-server-middleware.md +0 -2
- package/dist/docs/references/docs-server-request-context.md +17 -0
- package/dist/docs/references/docs-workflows-agents-and-tools.md +2 -2
- package/dist/docs/references/docs-workflows-overview.md +1 -1
- package/dist/docs/references/docs-workspace-filesystem.md +2 -0
- package/dist/docs/references/docs-workspace-overview.md +3 -1
- package/dist/docs/references/docs-workspace-sandbox.md +2 -0
- package/dist/docs/references/docs-workspace-search.md +2 -0
- package/dist/docs/references/docs-workspace-skills.md +3 -1
- package/dist/docs/references/reference-agents-getTools.md +1 -6
- package/dist/docs/references/reference-agents-listAgents.md +1 -1
- package/dist/docs/references/reference-agents-network.md +0 -2
- package/dist/docs/references/reference-cli-mastra.md +29 -4
- package/dist/docs/references/reference-client-js-agents.md +1 -1
- package/dist/docs/references/reference-configuration.md +1 -1
- package/dist/docs/references/reference-core-getStoredAgentById.md +2 -2
- package/dist/docs/references/reference-core-listStoredAgents.md +1 -1
- package/dist/docs/references/reference-memory-observational-memory.md +318 -7
- package/dist/docs/references/reference-tools-mcp-client.md +0 -2
- package/dist/docs/references/reference-workflows-step.md +2 -0
- package/dist/docs/references/reference-workflows-workflow-methods-map.md +2 -2
- package/dist/docs/references/reference-workspace-filesystem.md +2 -0
- package/dist/docs/references/reference-workspace-local-filesystem.md +2 -0
- package/dist/docs/references/reference-workspace-local-sandbox.md +2 -0
- package/dist/docs/references/reference-workspace-sandbox.md +2 -0
- package/dist/docs/references/reference-workspace-workspace-class.md +2 -0
- package/dist/docs/references/reference.md +7 -2
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/types.d.ts +53 -48
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/evals/base.d.ts +15 -0
- package/dist/evals/base.d.ts.map +1 -1
- package/dist/evals/index.cjs +20 -20
- package/dist/evals/index.js +3 -3
- package/dist/evals/run/index.d.ts +3 -3
- package/dist/evals/run/index.d.ts.map +1 -1
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/features/index.cjs +1 -1
- package/dist/features/index.cjs.map +1 -1
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/index.js +1 -1
- package/dist/features/index.js.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/integration/index.cjs +2 -2
- package/dist/integration/index.js +1 -1
- package/dist/llm/index.cjs +16 -16
- package/dist/llm/index.js +5 -5
- package/dist/llm/model/gateways/constants.d.ts.map +1 -1
- package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
- package/dist/llm/model/model.loop.d.ts +1 -1
- package/dist/llm/model/model.loop.d.ts.map +1 -1
- package/dist/llm/model/provider-types.generated.d.ts +122 -13
- package/dist/llm/model/resolve-model.d.ts.map +1 -1
- package/dist/loop/index.cjs +12 -12
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts +3 -3
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/loop/network/run-command-tool.d.ts +1 -1
- package/dist/loop/types.d.ts +13 -0
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/index.d.ts +9 -9
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +7 -7
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +3 -3
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-loop/index.d.ts +9 -9
- package/dist/loop/workflows/schema.d.ts +12 -12
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts +91 -5
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/mcp/index.cjs +2 -2
- package/dist/mcp/index.js +1 -1
- package/dist/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/memory/mock.d.ts.map +1 -1
- package/dist/memory/types.d.ts +128 -0
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/models-dev-FQVUTQ7L.js +3 -0
- package/dist/{models-dev-Z45JSLWD.js.map → models-dev-FQVUTQ7L.js.map} +1 -1
- package/dist/models-dev-PPIXUUCU.cjs +12 -0
- package/dist/{models-dev-OQKVMEIT.cjs.map → models-dev-PPIXUUCU.cjs.map} +1 -1
- package/dist/netlify-4RIKF7Y3.js +3 -0
- package/dist/{netlify-SSWMYSAX.js.map → netlify-4RIKF7Y3.js.map} +1 -1
- package/dist/netlify-V5F7JEJH.cjs +12 -0
- package/dist/{netlify-TXZZCT6N.cjs.map → netlify-V5F7JEJH.cjs.map} +1 -1
- package/dist/processors/index.cjs +41 -41
- package/dist/processors/index.js +1 -1
- package/dist/processors/step-schema.d.ts +44 -44
- package/dist/provider-registry-BJJRUX4P.cjs +40 -0
- package/dist/{provider-registry-NR7FXV2Q.cjs.map → provider-registry-BJJRUX4P.cjs.map} +1 -1
- package/dist/provider-registry-VZYB342T.js +3 -0
- package/dist/{provider-registry-RPOTQNHI.js.map → provider-registry-VZYB342T.js.map} +1 -1
- package/dist/provider-registry.json +264 -37
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/server/index.cjs +3 -3
- package/dist/server/index.js +1 -1
- package/dist/storage/base.d.ts +3 -1
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/constants.cjs +51 -19
- package/dist/storage/constants.d.ts +10 -2
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/agents/base.d.ts +13 -164
- package/dist/storage/domains/agents/base.d.ts.map +1 -1
- package/dist/storage/domains/agents/index.d.ts +0 -1
- package/dist/storage/domains/agents/index.d.ts.map +1 -1
- package/dist/storage/domains/agents/inmemory.d.ts +6 -10
- package/dist/storage/domains/agents/inmemory.d.ts.map +1 -1
- 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 +7 -1
- package/dist/storage/domains/inmemory-db.d.ts.map +1 -1
- package/dist/storage/domains/memory/base.d.ts +41 -1
- package/dist/storage/domains/memory/base.d.ts.map +1 -1
- package/dist/storage/domains/memory/inmemory.d.ts +6 -6
- package/dist/storage/domains/memory/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/observability/types.d.ts +62 -62
- package/dist/storage/domains/operations/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/prompt-blocks/base.d.ts +47 -0
- package/dist/storage/domains/prompt-blocks/base.d.ts.map +1 -0
- package/dist/storage/domains/prompt-blocks/index.d.ts +3 -0
- package/dist/storage/domains/prompt-blocks/index.d.ts.map +1 -0
- package/dist/storage/domains/prompt-blocks/inmemory.d.ts +31 -0
- package/dist/storage/domains/prompt-blocks/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/scorer-definitions/base.d.ts +47 -0
- package/dist/storage/domains/scorer-definitions/base.d.ts.map +1 -0
- package/dist/storage/domains/scorer-definitions/index.d.ts +3 -0
- package/dist/storage/domains/scorer-definitions/index.d.ts.map +1 -0
- package/dist/storage/domains/scorer-definitions/inmemory.d.ts +31 -0
- package/dist/storage/domains/scorer-definitions/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/versioned.d.ts +136 -0
- package/dist/storage/domains/versioned.d.ts.map +1 -0
- package/dist/storage/index.cjs +156 -104
- package/dist/storage/index.js +2 -2
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/types.d.ts +481 -27
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/MastraAgentNetworkStream.d.ts +1 -1
- package/dist/stream/MastraWorkflowStream.d.ts +1 -1
- package/dist/stream/RunOutput.d.ts +1 -1
- package/dist/stream/RunOutput.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts +4 -0
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/index.cjs +11 -11
- package/dist/stream/index.js +2 -2
- 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 +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/tools/index.cjs +4 -4
- package/dist/tools/index.js +1 -1
- package/dist/tools/is-vercel-tool.cjs +2 -2
- package/dist/tools/is-vercel-tool.js +1 -1
- package/dist/tools/tool-builder/builder.d.ts.map +1 -1
- package/dist/tools/types.d.ts +15 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/validation.d.ts.map +1 -1
- package/dist/tts/index.cjs +2 -2
- package/dist/tts/index.js +1 -1
- package/dist/types/zod-compat.d.ts +2 -2
- package/dist/types/zod-compat.d.ts.map +1 -1
- package/dist/utils/zod-utils.d.ts +19 -0
- package/dist/utils/zod-utils.d.ts.map +1 -1
- package/dist/utils.cjs +28 -28
- package/dist/utils.d.ts +7 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +2 -2
- package/dist/vector/index.cjs +9 -9
- package/dist/vector/index.js +2 -2
- package/dist/voice/index.cjs +6 -6
- package/dist/voice/index.js +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.map +1 -1
- package/dist/workflows/evented/workflow.d.ts +3 -1
- package/dist/workflows/evented/workflow.d.ts.map +1 -1
- package/dist/workflows/execution-engine.d.ts.map +1 -1
- package/dist/workflows/index.cjs +25 -25
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/step.d.ts +4 -3
- package/dist/workflows/step.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +2 -1
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/workflow.d.ts +12 -4
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/dist/workspace/errors.d.ts +6 -0
- package/dist/workspace/errors.d.ts.map +1 -1
- package/dist/workspace/filesystem/composite-filesystem.d.ts +93 -0
- package/dist/workspace/filesystem/composite-filesystem.d.ts.map +1 -0
- package/dist/workspace/filesystem/filesystem.d.ts +35 -0
- package/dist/workspace/filesystem/filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/index.d.ts +2 -0
- package/dist/workspace/filesystem/index.d.ts.map +1 -1
- package/dist/workspace/filesystem/local-filesystem.d.ts +9 -1
- package/dist/workspace/filesystem/local-filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/mastra-filesystem.d.ts +92 -3
- package/dist/workspace/filesystem/mastra-filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/mount.d.ts +34 -0
- package/dist/workspace/filesystem/mount.d.ts.map +1 -0
- package/dist/workspace/index.cjs +62 -34
- package/dist/workspace/index.d.ts +6 -2
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/lifecycle.d.ts +29 -0
- package/dist/workspace/lifecycle.d.ts.map +1 -1
- package/dist/workspace/sandbox/errors.d.ts +50 -0
- package/dist/workspace/sandbox/errors.d.ts.map +1 -0
- package/dist/workspace/sandbox/index.d.ts +3 -0
- package/dist/workspace/sandbox/index.d.ts.map +1 -1
- package/dist/workspace/sandbox/local-sandbox.d.ts +17 -2
- package/dist/workspace/sandbox/local-sandbox.d.ts.map +1 -1
- package/dist/workspace/sandbox/mastra-sandbox.d.ts +153 -6
- package/dist/workspace/sandbox/mastra-sandbox.d.ts.map +1 -1
- package/dist/workspace/sandbox/mount-manager.d.ts +195 -0
- package/dist/workspace/sandbox/mount-manager.d.ts.map +1 -0
- package/dist/workspace/sandbox/sandbox.d.ts +37 -84
- package/dist/workspace/sandbox/sandbox.d.ts.map +1 -1
- package/dist/workspace/sandbox/types.d.ts +92 -0
- package/dist/workspace/sandbox/types.d.ts.map +1 -0
- package/dist/workspace/tools/tools.d.ts.map +1 -1
- package/dist/workspace/tools/tree-formatter.d.ts.map +1 -1
- package/dist/workspace/workspace.d.ts +73 -3
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/package.json +16 -16
- package/src/llm/model/provider-types.generated.d.ts +122 -13
- package/dist/chunk-2DMSFLJY.cjs.map +0 -1
- package/dist/chunk-5SOS47PH.cjs.map +0 -1
- package/dist/chunk-5YVR7B4R.js.map +0 -1
- package/dist/chunk-7MDVYPWX.cjs.map +0 -1
- package/dist/chunk-A5QFWX67.cjs.map +0 -1
- package/dist/chunk-AIJLACR2.js.map +0 -1
- package/dist/chunk-BP2TSCBW.js.map +0 -1
- package/dist/chunk-C4WWWQHT.cjs.map +0 -1
- package/dist/chunk-E3VFKTIA.js.map +0 -1
- package/dist/chunk-ENCTSDWC.js.map +0 -1
- package/dist/chunk-G6E3QNJC.js.map +0 -1
- package/dist/chunk-GVLPTDJA.cjs.map +0 -1
- package/dist/chunk-HMCXNOF6.cjs.map +0 -1
- package/dist/chunk-HN2MSTR6.cjs.map +0 -1
- package/dist/chunk-I66TMZJ3.cjs.map +0 -1
- package/dist/chunk-IIZF4W7B.cjs.map +0 -1
- package/dist/chunk-IW3BNL7A.js.map +0 -1
- package/dist/chunk-JIT2OY3X.js.map +0 -1
- package/dist/chunk-JRJJ5VQE.cjs.map +0 -1
- package/dist/chunk-MNWW2R3U.js.map +0 -1
- package/dist/chunk-MSWXEOZC.js.map +0 -1
- package/dist/chunk-P62OJXQ4.js.map +0 -1
- package/dist/chunk-QOFI2WBM.cjs.map +0 -1
- package/dist/chunk-RXD5EGQF.js.map +0 -1
- package/dist/chunk-T6PRRKMW.js.map +0 -1
- package/dist/chunk-UZL4H5P2.cjs.map +0 -1
- package/dist/chunk-VW7YQWDW.cjs.map +0 -1
- package/dist/chunk-VX7UA3SO.js.map +0 -1
- package/dist/chunk-WFUNLRQX.js.map +0 -1
- package/dist/chunk-XCPEEIHI.cjs.map +0 -1
- package/dist/chunk-YLODOPYM.cjs.map +0 -1
- package/dist/chunk-Z6NRYYOH.js.map +0 -1
- package/dist/docs/references/docs-tools-mcp-advanced-usage.md +0 -143
- package/dist/docs/references/docs-tools-mcp-mcp-overview.md +0 -383
- package/dist/docs/references/docs-tools-mcp-overview.md +0 -78
- package/dist/docs/references/docs-workflows-input-data-mapping.md +0 -102
- package/dist/docs/references/reference-deployer-netlify.md +0 -14
- package/dist/docs/references/reference-deployer-vercel.md +0 -39
- package/dist/docs/references/reference-tools-client.md +0 -228
- package/dist/models-dev-OQKVMEIT.cjs +0 -12
- package/dist/models-dev-Z45JSLWD.js +0 -3
- package/dist/netlify-SSWMYSAX.js +0 -3
- package/dist/netlify-TXZZCT6N.cjs +0 -12
- package/dist/provider-registry-NR7FXV2Q.cjs +0 -40
- package/dist/provider-registry-RPOTQNHI.js +0 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkZC6IHDHX_cjs = require('./chunk-ZC6IHDHX.cjs');
|
|
4
4
|
var chunkZCBG4ZQT_cjs = require('./chunk-ZCBG4ZQT.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkSZH2YH74_cjs = require('./chunk-SZH2YH74.cjs');
|
|
6
|
+
var chunkUE2G2LRP_cjs = require('./chunk-UE2G2LRP.cjs');
|
|
7
7
|
var chunkKJBMTK5B_cjs = require('./chunk-KJBMTK5B.cjs');
|
|
8
|
-
var
|
|
8
|
+
var chunk7UWHFWST_cjs = require('./chunk-7UWHFWST.cjs');
|
|
9
9
|
var chunkVDKWYUGC_cjs = require('./chunk-VDKWYUGC.cjs');
|
|
10
10
|
var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
|
|
11
|
-
var
|
|
11
|
+
var chunkRO47SMI7_cjs = require('./chunk-RO47SMI7.cjs');
|
|
12
12
|
var chunk7XAECHYL_cjs = require('./chunk-7XAECHYL.cjs');
|
|
13
13
|
var crypto = require('crypto');
|
|
14
14
|
var web = require('stream/web');
|
|
@@ -19,7 +19,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
19
19
|
|
|
20
20
|
var EventEmitter__default = /*#__PURE__*/_interopDefault(EventEmitter);
|
|
21
21
|
|
|
22
|
-
var StepExecutor = class extends
|
|
22
|
+
var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
23
23
|
mastra;
|
|
24
24
|
constructor({ mastra }) {
|
|
25
25
|
super({ name: "StepExecutor", component: chunk7XAECHYL_cjs.RegisteredLogger.WORKFLOW });
|
|
@@ -27,6 +27,10 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
27
27
|
}
|
|
28
28
|
__registerMastra(mastra) {
|
|
29
29
|
this.mastra = mastra;
|
|
30
|
+
const logger = mastra?.getLogger();
|
|
31
|
+
if (logger) {
|
|
32
|
+
this.__setLogger(logger);
|
|
33
|
+
}
|
|
30
34
|
}
|
|
31
35
|
/**
|
|
32
36
|
* Creates an output writer function that publishes chunks to the workflow event stream.
|
|
@@ -54,7 +58,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
54
58
|
let suspended;
|
|
55
59
|
let bailed;
|
|
56
60
|
const startedAt = Date.now();
|
|
57
|
-
const { inputData, validationError } = await
|
|
61
|
+
const { inputData, validationError } = await chunkZC6IHDHX_cjs.validateStepInput({
|
|
58
62
|
prevOutput: typeof params.foreachIdx === "number" ? params.input?.[params.foreachIdx] : params.input,
|
|
59
63
|
step,
|
|
60
64
|
validateInputs: params.validateInputs ?? true
|
|
@@ -84,7 +88,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
84
88
|
const callId = crypto.randomUUID();
|
|
85
89
|
const outputWriter = this.createOutputWriter(runId);
|
|
86
90
|
const stepOutput = await step.execute(
|
|
87
|
-
|
|
91
|
+
chunkZC6IHDHX_cjs.createDeprecationProxy(
|
|
88
92
|
{
|
|
89
93
|
workflowId: params.workflowId,
|
|
90
94
|
runId,
|
|
@@ -99,9 +103,9 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
99
103
|
resumeData: params.resumeData,
|
|
100
104
|
suspendData: suspendDataToUse,
|
|
101
105
|
getInitData: () => stepResults?.input,
|
|
102
|
-
getStepResult:
|
|
106
|
+
getStepResult: chunkZC6IHDHX_cjs.getStepResult.bind(this, stepResults),
|
|
103
107
|
suspend: async (suspendPayload, suspendOptions) => {
|
|
104
|
-
const { suspendData, validationError: validationError2 } = await
|
|
108
|
+
const { suspendData, validationError: validationError2 } = await chunkZC6IHDHX_cjs.validateStepSuspendData({
|
|
105
109
|
suspendData: suspendPayload,
|
|
106
110
|
step,
|
|
107
111
|
validateInputs: params.validateInputs ?? true
|
|
@@ -156,7 +160,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
156
160
|
},
|
|
157
161
|
{
|
|
158
162
|
paramName: "runCount",
|
|
159
|
-
deprecationMessage:
|
|
163
|
+
deprecationMessage: chunkZC6IHDHX_cjs.runCountDeprecationMessage,
|
|
160
164
|
logger: this.logger
|
|
161
165
|
}
|
|
162
166
|
)
|
|
@@ -207,6 +211,18 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
207
211
|
serializeStack: false,
|
|
208
212
|
fallbackMessage: "Unknown step execution error"
|
|
209
213
|
});
|
|
214
|
+
const stepId = params.step.id;
|
|
215
|
+
const mastraError = new chunk4U7ZLI36_cjs.MastraError(
|
|
216
|
+
{
|
|
217
|
+
id: "WORKFLOW_STEP_INVOKE_FAILED",
|
|
218
|
+
domain: "MASTRA_WORKFLOW" /* MASTRA_WORKFLOW */,
|
|
219
|
+
category: "USER" /* USER */,
|
|
220
|
+
details: { workflowId: params.workflowId, runId: params.runId, stepId }
|
|
221
|
+
},
|
|
222
|
+
errorInstance
|
|
223
|
+
);
|
|
224
|
+
this.logger?.trackException(mastraError);
|
|
225
|
+
this.logger?.error(`Error executing step ${stepId}: ` + errorInstance?.stack);
|
|
210
226
|
return {
|
|
211
227
|
...stepInfo,
|
|
212
228
|
status: "failed",
|
|
@@ -215,7 +231,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
215
231
|
// Preserve TripWire data as plain object for proper serialization
|
|
216
232
|
// Important: Check `error` not `errorInstance` because getErrorFromUnknown
|
|
217
233
|
// converts the error and loses the prototype chain
|
|
218
|
-
tripwire: error instanceof
|
|
234
|
+
tripwire: error instanceof chunkZC6IHDHX_cjs.TripWire ? {
|
|
219
235
|
reason: error.message,
|
|
220
236
|
retry: error.options?.retry,
|
|
221
237
|
metadata: error.options?.metadata,
|
|
@@ -273,7 +289,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
273
289
|
const callId = crypto.randomUUID();
|
|
274
290
|
const outputWriter = this.createOutputWriter(runId);
|
|
275
291
|
return condition(
|
|
276
|
-
|
|
292
|
+
chunkZC6IHDHX_cjs.createDeprecationProxy(
|
|
277
293
|
{
|
|
278
294
|
workflowId,
|
|
279
295
|
runId,
|
|
@@ -284,7 +300,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
284
300
|
retryCount,
|
|
285
301
|
resumeData,
|
|
286
302
|
getInitData: () => stepResults?.input,
|
|
287
|
-
getStepResult:
|
|
303
|
+
getStepResult: chunkZC6IHDHX_cjs.getStepResult.bind(this, stepResults),
|
|
288
304
|
bail: (_result) => {
|
|
289
305
|
throw new Error("Not implemented");
|
|
290
306
|
},
|
|
@@ -311,7 +327,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
311
327
|
},
|
|
312
328
|
{
|
|
313
329
|
paramName: "runCount",
|
|
314
|
-
deprecationMessage:
|
|
330
|
+
deprecationMessage: chunkZC6IHDHX_cjs.runCountDeprecationMessage,
|
|
315
331
|
logger: this.logger
|
|
316
332
|
}
|
|
317
333
|
)
|
|
@@ -331,7 +347,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
331
347
|
const callId = crypto.randomUUID();
|
|
332
348
|
const outputWriter = this.createOutputWriter(runId);
|
|
333
349
|
return await step.fn(
|
|
334
|
-
|
|
350
|
+
chunkZC6IHDHX_cjs.createDeprecationProxy(
|
|
335
351
|
{
|
|
336
352
|
workflowId: params.workflowId,
|
|
337
353
|
runId,
|
|
@@ -345,7 +361,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
345
361
|
retryCount,
|
|
346
362
|
resumeData: params.resumeData,
|
|
347
363
|
getInitData: () => stepResults?.input,
|
|
348
|
-
getStepResult:
|
|
364
|
+
getStepResult: chunkZC6IHDHX_cjs.getStepResult.bind(this, stepResults),
|
|
349
365
|
suspend: async (_suspendPayload) => {
|
|
350
366
|
throw new Error("Not implemented");
|
|
351
367
|
},
|
|
@@ -374,7 +390,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
374
390
|
},
|
|
375
391
|
{
|
|
376
392
|
paramName: "runCount",
|
|
377
|
-
deprecationMessage:
|
|
393
|
+
deprecationMessage: chunkZC6IHDHX_cjs.runCountDeprecationMessage,
|
|
378
394
|
logger: this.logger
|
|
379
395
|
}
|
|
380
396
|
)
|
|
@@ -398,7 +414,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
398
414
|
const callId = crypto.randomUUID();
|
|
399
415
|
const outputWriter = this.createOutputWriter(runId);
|
|
400
416
|
const result = await step.fn(
|
|
401
|
-
|
|
417
|
+
chunkZC6IHDHX_cjs.createDeprecationProxy(
|
|
402
418
|
{
|
|
403
419
|
workflowId: params.workflowId,
|
|
404
420
|
runId,
|
|
@@ -412,7 +428,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
412
428
|
retryCount,
|
|
413
429
|
resumeData: params.resumeData,
|
|
414
430
|
getInitData: () => stepResults?.input,
|
|
415
|
-
getStepResult:
|
|
431
|
+
getStepResult: chunkZC6IHDHX_cjs.getStepResult.bind(this, stepResults),
|
|
416
432
|
suspend: async (_suspendPayload) => {
|
|
417
433
|
throw new Error("Not implemented");
|
|
418
434
|
},
|
|
@@ -441,7 +457,7 @@ var StepExecutor = class extends chunkC4WWWQHT_cjs.MastraBase {
|
|
|
441
457
|
},
|
|
442
458
|
{
|
|
443
459
|
paramName: "runCount",
|
|
444
|
-
deprecationMessage:
|
|
460
|
+
deprecationMessage: chunkZC6IHDHX_cjs.runCountDeprecationMessage,
|
|
445
461
|
logger: this.logger
|
|
446
462
|
}
|
|
447
463
|
)
|
|
@@ -460,7 +476,7 @@ function isTripwireChunk(chunk) {
|
|
|
460
476
|
}
|
|
461
477
|
function createTripWireFromChunk(chunk) {
|
|
462
478
|
const { payload } = chunk;
|
|
463
|
-
return new
|
|
479
|
+
return new chunkZC6IHDHX_cjs.TripWire(
|
|
464
480
|
payload.reason || "Agent tripwire triggered",
|
|
465
481
|
{
|
|
466
482
|
retry: payload.retry,
|
|
@@ -761,7 +777,7 @@ async function processWorkflowForEach({
|
|
|
761
777
|
const workflowsStore2 = await mastra.getStorage()?.getStore("workflows");
|
|
762
778
|
const updatedOutput = [...currentResult.output];
|
|
763
779
|
for (const suspIdx of indicesToResume) {
|
|
764
|
-
updatedOutput[suspIdx] =
|
|
780
|
+
updatedOutput[suspIdx] = chunkSZH2YH74_cjs.createPendingMarker();
|
|
765
781
|
}
|
|
766
782
|
await workflowsStore2?.updateWorkflowResults({
|
|
767
783
|
workflowName: workflowId,
|
|
@@ -1989,7 +2005,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
1989
2005
|
runId
|
|
1990
2006
|
}) ?? { context: {} };
|
|
1991
2007
|
const nestedWorkflow = step.step;
|
|
1992
|
-
const timeTravelParams =
|
|
2008
|
+
const timeTravelParams = chunkZC6IHDHX_cjs.createTimeTravelExecutionParams({
|
|
1993
2009
|
steps: timeTravel.steps.slice(1),
|
|
1994
2010
|
inputData: timeTravel.inputData,
|
|
1995
2011
|
resumeData: timeTravel.resumeData,
|
|
@@ -2089,7 +2105,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
2089
2105
|
for (const [key, value] of Object.entries(requestContext)) {
|
|
2090
2106
|
rc.set(key, value);
|
|
2091
2107
|
}
|
|
2092
|
-
const { resumeData: timeTravelResumeData, validationError: timeTravelResumeValidationError } = await
|
|
2108
|
+
const { resumeData: timeTravelResumeData, validationError: timeTravelResumeValidationError } = await chunkZC6IHDHX_cjs.validateStepResumeData({
|
|
2093
2109
|
resumeData: timeTravel?.stepResults[step.step.id]?.status === "suspended" ? timeTravel?.resumeData : void 0,
|
|
2094
2110
|
step: step.step
|
|
2095
2111
|
});
|
|
@@ -2889,7 +2905,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
2889
2905
|
|
|
2890
2906
|
// src/workflows/evented/workflow.ts
|
|
2891
2907
|
function cloneWorkflow(workflow, opts) {
|
|
2892
|
-
const wf = new
|
|
2908
|
+
const wf = new chunkZC6IHDHX_cjs.Workflow({
|
|
2893
2909
|
id: opts.id,
|
|
2894
2910
|
inputSchema: workflow.inputSchema,
|
|
2895
2911
|
outputSchema: workflow.outputSchema,
|
|
@@ -2913,20 +2929,21 @@ function cloneStep(step, opts) {
|
|
|
2913
2929
|
execute: step.execute,
|
|
2914
2930
|
retries: step.retries,
|
|
2915
2931
|
scorers: step.scorers,
|
|
2932
|
+
metadata: step.metadata,
|
|
2916
2933
|
component: step.component
|
|
2917
2934
|
};
|
|
2918
2935
|
}
|
|
2919
2936
|
function isAgent(input) {
|
|
2920
|
-
return input instanceof
|
|
2937
|
+
return input instanceof chunkZC6IHDHX_cjs.Agent;
|
|
2921
2938
|
}
|
|
2922
2939
|
function isToolStep(input) {
|
|
2923
|
-
return input instanceof
|
|
2940
|
+
return input instanceof chunk7UWHFWST_cjs.Tool;
|
|
2924
2941
|
}
|
|
2925
2942
|
function isStepParams(input) {
|
|
2926
|
-
return input !== null && typeof input === "object" && "id" in input && "execute" in input && !(input instanceof
|
|
2943
|
+
return input !== null && typeof input === "object" && "id" in input && "execute" in input && !(input instanceof chunkZC6IHDHX_cjs.Agent) && !(input instanceof chunk7UWHFWST_cjs.Tool);
|
|
2927
2944
|
}
|
|
2928
2945
|
function isProcessor(obj) {
|
|
2929
|
-
return obj !== null && typeof obj === "object" && "id" in obj && typeof obj.id === "string" && !(obj instanceof
|
|
2946
|
+
return obj !== null && typeof obj === "object" && "id" in obj && typeof obj.id === "string" && !(obj instanceof chunkZC6IHDHX_cjs.Agent) && !(obj instanceof chunk7UWHFWST_cjs.Tool) && (typeof obj.processInput === "function" || typeof obj.processInputStep === "function" || typeof obj.processOutputStream === "function" || typeof obj.processOutputResult === "function" || typeof obj.processOutputStep === "function");
|
|
2930
2947
|
}
|
|
2931
2948
|
function createStep(params, agentOrToolOptions) {
|
|
2932
2949
|
if (isAgent(params)) {
|
|
@@ -2955,6 +2972,7 @@ function createStepFromParams(params) {
|
|
|
2955
2972
|
requestContextSchema: params.requestContextSchema,
|
|
2956
2973
|
scorers: params.scorers,
|
|
2957
2974
|
retries: params.retries,
|
|
2975
|
+
metadata: params.metadata,
|
|
2958
2976
|
execute: params.execute.bind(params)
|
|
2959
2977
|
};
|
|
2960
2978
|
}
|
|
@@ -3012,7 +3030,7 @@ async function safeOnFinish(callback, result, logger) {
|
|
|
3012
3030
|
function createStepFromAgent(params, agentOrToolOptions) {
|
|
3013
3031
|
const options = agentOrToolOptions ?? {};
|
|
3014
3032
|
const outputSchema = options?.structuredOutput?.schema ?? zod.z.object({ text: zod.z.string() });
|
|
3015
|
-
const { retries, scorers, ...agentOptions } = options ?? {};
|
|
3033
|
+
const { retries, scorers, metadata, ...agentOptions } = options ?? {};
|
|
3016
3034
|
return {
|
|
3017
3035
|
id: params.id,
|
|
3018
3036
|
description: params.getDescription(),
|
|
@@ -3022,6 +3040,7 @@ function createStepFromAgent(params, agentOrToolOptions) {
|
|
|
3022
3040
|
outputSchema,
|
|
3023
3041
|
retries,
|
|
3024
3042
|
scorers,
|
|
3043
|
+
metadata,
|
|
3025
3044
|
execute: async ({
|
|
3026
3045
|
inputData,
|
|
3027
3046
|
runId,
|
|
@@ -3039,7 +3058,7 @@ function createStepFromAgent(params, agentOrToolOptions) {
|
|
|
3039
3058
|
};
|
|
3040
3059
|
const llm = await params.getLLM({ requestContext });
|
|
3041
3060
|
const modelInfo = llm.getModel();
|
|
3042
|
-
const isV2Model =
|
|
3061
|
+
const isV2Model = chunkZC6IHDHX_cjs.isSupportedLanguageModel(modelInfo);
|
|
3043
3062
|
let structuredResult = null;
|
|
3044
3063
|
const handleFinish = (result) => {
|
|
3045
3064
|
const resultWithObject = result;
|
|
@@ -3118,6 +3137,7 @@ function createStepFromTool(params, agentOrToolOptions) {
|
|
|
3118
3137
|
suspendSchema: params.suspendSchema,
|
|
3119
3138
|
retries: toolOpts?.retries,
|
|
3120
3139
|
scorers: toolOpts?.scorers,
|
|
3140
|
+
metadata: toolOpts?.metadata,
|
|
3121
3141
|
execute: async ({ inputData, mastra, requestContext, suspend, resumeData, runId, workflowId, state, setState }) => {
|
|
3122
3142
|
if (!params.execute) {
|
|
3123
3143
|
throw new Error(`Tool ${params.id} does not have an execute function`);
|
|
@@ -3192,8 +3212,8 @@ function createStepFromProcessor(processor) {
|
|
|
3192
3212
|
return {
|
|
3193
3213
|
id: `processor:${processor.id}`,
|
|
3194
3214
|
description: processor.name ?? `Processor ${processor.id}`,
|
|
3195
|
-
inputSchema:
|
|
3196
|
-
outputSchema:
|
|
3215
|
+
inputSchema: chunkZC6IHDHX_cjs.ProcessorStepSchema,
|
|
3216
|
+
outputSchema: chunkZC6IHDHX_cjs.ProcessorStepOutputSchema,
|
|
3197
3217
|
execute: async ({ inputData, requestContext, tracingContext }) => {
|
|
3198
3218
|
const input = inputData;
|
|
3199
3219
|
const {
|
|
@@ -3222,7 +3242,7 @@ function createStepFromProcessor(processor) {
|
|
|
3222
3242
|
abortSignal
|
|
3223
3243
|
} = input;
|
|
3224
3244
|
const abort = (reason, options) => {
|
|
3225
|
-
throw new
|
|
3245
|
+
throw new chunkZC6IHDHX_cjs.TripWire(reason || `Tripwire triggered by ${processor.id}`, options, processor.id);
|
|
3226
3246
|
};
|
|
3227
3247
|
if (!hasPhaseMethod(phase)) {
|
|
3228
3248
|
return input;
|
|
@@ -3255,7 +3275,7 @@ function createStepFromProcessor(processor) {
|
|
|
3255
3275
|
phase,
|
|
3256
3276
|
// Auto-create MessageList from messages if not provided
|
|
3257
3277
|
// This enables running processor workflows from the UI where messageList can't be serialized
|
|
3258
|
-
messageList: messageList ?? (Array.isArray(messages) ? new
|
|
3278
|
+
messageList: messageList ?? (Array.isArray(messages) ? new chunkUE2G2LRP_cjs.MessageList().add(messages, "input").addSystem(systemMessages ?? []) : void 0),
|
|
3259
3279
|
stepNumber,
|
|
3260
3280
|
systemMessages,
|
|
3261
3281
|
streamParts,
|
|
@@ -3280,7 +3300,7 @@ function createStepFromProcessor(processor) {
|
|
|
3280
3300
|
processorSpan?.end({ output: result });
|
|
3281
3301
|
return result;
|
|
3282
3302
|
} catch (error) {
|
|
3283
|
-
if (error instanceof
|
|
3303
|
+
if (error instanceof chunkZC6IHDHX_cjs.TripWire) {
|
|
3284
3304
|
processorSpan?.end({ output: { tripwire: error.message } });
|
|
3285
3305
|
} else {
|
|
3286
3306
|
processorSpan?.error({ error, endSpan: true });
|
|
@@ -3308,7 +3328,7 @@ function createStepFromProcessor(processor) {
|
|
|
3308
3328
|
messageList: passThrough.messageList,
|
|
3309
3329
|
systemMessages: systemMessages ?? []
|
|
3310
3330
|
});
|
|
3311
|
-
if (result instanceof
|
|
3331
|
+
if (result instanceof chunkUE2G2LRP_cjs.MessageList) {
|
|
3312
3332
|
if (result !== passThrough.messageList) {
|
|
3313
3333
|
throw new chunk4U7ZLI36_cjs.MastraError({
|
|
3314
3334
|
category: "USER" /* USER */,
|
|
@@ -3323,7 +3343,7 @@ function createStepFromProcessor(processor) {
|
|
|
3323
3343
|
systemMessages: result.getAllSystemMessages()
|
|
3324
3344
|
};
|
|
3325
3345
|
} else if (Array.isArray(result)) {
|
|
3326
|
-
|
|
3346
|
+
chunkZC6IHDHX_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3327
3347
|
result,
|
|
3328
3348
|
passThrough.messageList,
|
|
3329
3349
|
idsBeforeProcessing,
|
|
@@ -3333,7 +3353,7 @@ function createStepFromProcessor(processor) {
|
|
|
3333
3353
|
return { ...passThrough, messages: result };
|
|
3334
3354
|
} else if (result && "messages" in result && "systemMessages" in result) {
|
|
3335
3355
|
const typedResult = result;
|
|
3336
|
-
|
|
3356
|
+
chunkZC6IHDHX_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3337
3357
|
typedResult.messages,
|
|
3338
3358
|
passThrough.messageList,
|
|
3339
3359
|
idsBeforeProcessing,
|
|
@@ -3379,13 +3399,13 @@ function createStepFromProcessor(processor) {
|
|
|
3379
3399
|
structuredOutput,
|
|
3380
3400
|
steps: steps ?? []
|
|
3381
3401
|
});
|
|
3382
|
-
const validatedResult = await
|
|
3402
|
+
const validatedResult = await chunkZC6IHDHX_cjs.ProcessorRunner.validateAndFormatProcessInputStepResult(result, {
|
|
3383
3403
|
messageList: passThrough.messageList,
|
|
3384
3404
|
processor,
|
|
3385
3405
|
stepNumber: stepNumber ?? 0
|
|
3386
3406
|
});
|
|
3387
3407
|
if (validatedResult.messages) {
|
|
3388
|
-
|
|
3408
|
+
chunkZC6IHDHX_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3389
3409
|
validatedResult.messages,
|
|
3390
3410
|
passThrough.messageList,
|
|
3391
3411
|
idsBeforeProcessing,
|
|
@@ -3443,7 +3463,7 @@ function createStepFromProcessor(processor) {
|
|
|
3443
3463
|
delete mutableState[spanKey];
|
|
3444
3464
|
}
|
|
3445
3465
|
} catch (error) {
|
|
3446
|
-
if (error instanceof
|
|
3466
|
+
if (error instanceof chunkZC6IHDHX_cjs.TripWire) {
|
|
3447
3467
|
processorSpan2?.end({ output: { tripwire: error.message } });
|
|
3448
3468
|
} else {
|
|
3449
3469
|
processorSpan2?.error({ error, endSpan: true });
|
|
@@ -3472,7 +3492,7 @@ function createStepFromProcessor(processor) {
|
|
|
3472
3492
|
messages,
|
|
3473
3493
|
messageList: passThrough.messageList
|
|
3474
3494
|
});
|
|
3475
|
-
if (result instanceof
|
|
3495
|
+
if (result instanceof chunkUE2G2LRP_cjs.MessageList) {
|
|
3476
3496
|
if (result !== passThrough.messageList) {
|
|
3477
3497
|
throw new chunk4U7ZLI36_cjs.MastraError({
|
|
3478
3498
|
category: "USER" /* USER */,
|
|
@@ -3487,7 +3507,7 @@ function createStepFromProcessor(processor) {
|
|
|
3487
3507
|
systemMessages: result.getAllSystemMessages()
|
|
3488
3508
|
};
|
|
3489
3509
|
} else if (Array.isArray(result)) {
|
|
3490
|
-
|
|
3510
|
+
chunkZC6IHDHX_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3491
3511
|
result,
|
|
3492
3512
|
passThrough.messageList,
|
|
3493
3513
|
idsBeforeProcessing,
|
|
@@ -3497,7 +3517,7 @@ function createStepFromProcessor(processor) {
|
|
|
3497
3517
|
return { ...passThrough, messages: result };
|
|
3498
3518
|
} else if (result && "messages" in result && "systemMessages" in result) {
|
|
3499
3519
|
const typedResult = result;
|
|
3500
|
-
|
|
3520
|
+
chunkZC6IHDHX_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3501
3521
|
typedResult.messages,
|
|
3502
3522
|
passThrough.messageList,
|
|
3503
3523
|
idsBeforeProcessing,
|
|
@@ -3538,7 +3558,7 @@ function createStepFromProcessor(processor) {
|
|
|
3538
3558
|
systemMessages: systemMessages ?? [],
|
|
3539
3559
|
steps: steps ?? []
|
|
3540
3560
|
});
|
|
3541
|
-
if (result instanceof
|
|
3561
|
+
if (result instanceof chunkUE2G2LRP_cjs.MessageList) {
|
|
3542
3562
|
if (result !== passThrough.messageList) {
|
|
3543
3563
|
throw new chunk4U7ZLI36_cjs.MastraError({
|
|
3544
3564
|
category: "USER" /* USER */,
|
|
@@ -3553,7 +3573,7 @@ function createStepFromProcessor(processor) {
|
|
|
3553
3573
|
systemMessages: result.getAllSystemMessages()
|
|
3554
3574
|
};
|
|
3555
3575
|
} else if (Array.isArray(result)) {
|
|
3556
|
-
|
|
3576
|
+
chunkZC6IHDHX_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3557
3577
|
result,
|
|
3558
3578
|
passThrough.messageList,
|
|
3559
3579
|
idsBeforeProcessing,
|
|
@@ -3563,7 +3583,7 @@ function createStepFromProcessor(processor) {
|
|
|
3563
3583
|
return { ...passThrough, messages: result };
|
|
3564
3584
|
} else if (result && "messages" in result && "systemMessages" in result) {
|
|
3565
3585
|
const typedResult = result;
|
|
3566
|
-
|
|
3586
|
+
chunkZC6IHDHX_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3567
3587
|
typedResult.messages,
|
|
3568
3588
|
passThrough.messageList,
|
|
3569
3589
|
idsBeforeProcessing,
|
|
@@ -3607,7 +3627,7 @@ function createWorkflow(params) {
|
|
|
3607
3627
|
executionEngine
|
|
3608
3628
|
});
|
|
3609
3629
|
}
|
|
3610
|
-
var EventedWorkflow = class extends
|
|
3630
|
+
var EventedWorkflow = class extends chunkZC6IHDHX_cjs.Workflow {
|
|
3611
3631
|
constructor(params) {
|
|
3612
3632
|
super(params);
|
|
3613
3633
|
this.engineType = "evented";
|
|
@@ -3672,7 +3692,7 @@ var EventedWorkflow = class extends chunk5SOS47PH_cjs.Workflow {
|
|
|
3672
3692
|
return run;
|
|
3673
3693
|
}
|
|
3674
3694
|
};
|
|
3675
|
-
var EventedRun = class extends
|
|
3695
|
+
var EventedRun = class extends chunkZC6IHDHX_cjs.Run {
|
|
3676
3696
|
constructor(params) {
|
|
3677
3697
|
super(params);
|
|
3678
3698
|
this.serializedStepGraph = params.serializedStepGraph;
|
|
@@ -3884,7 +3904,7 @@ var EventedRun = class extends chunk5SOS47PH_cjs.Run {
|
|
|
3884
3904
|
}
|
|
3885
3905
|
}
|
|
3886
3906
|
});
|
|
3887
|
-
this.streamOutput = new
|
|
3907
|
+
this.streamOutput = new chunkZC6IHDHX_cjs.WorkflowRunOutput({
|
|
3888
3908
|
runId: this.runId,
|
|
3889
3909
|
workflowId: this.workflowId,
|
|
3890
3910
|
stream
|
|
@@ -3950,7 +3970,7 @@ var EventedRun = class extends chunk5SOS47PH_cjs.Run {
|
|
|
3950
3970
|
}
|
|
3951
3971
|
}
|
|
3952
3972
|
});
|
|
3953
|
-
this.streamOutput = new
|
|
3973
|
+
this.streamOutput = new chunkZC6IHDHX_cjs.WorkflowRunOutput({
|
|
3954
3974
|
runId: this.runId,
|
|
3955
3975
|
workflowId: this.workflowId,
|
|
3956
3976
|
stream
|
|
@@ -4183,7 +4203,7 @@ function isExecutableStep(step) {
|
|
|
4183
4203
|
}
|
|
4184
4204
|
|
|
4185
4205
|
// src/workflows/evented/execution-engine.ts
|
|
4186
|
-
var EventedExecutionEngine = class extends
|
|
4206
|
+
var EventedExecutionEngine = class extends chunkZC6IHDHX_cjs.ExecutionEngine {
|
|
4187
4207
|
eventProcessor;
|
|
4188
4208
|
constructor({
|
|
4189
4209
|
mastra,
|
|
@@ -4194,7 +4214,7 @@ var EventedExecutionEngine = class extends chunk5SOS47PH_cjs.ExecutionEngine {
|
|
|
4194
4214
|
this.eventProcessor = eventProcessor;
|
|
4195
4215
|
}
|
|
4196
4216
|
__registerMastra(mastra) {
|
|
4197
|
-
|
|
4217
|
+
super.__registerMastra(mastra);
|
|
4198
4218
|
this.eventProcessor.__registerMastra(mastra);
|
|
4199
4219
|
}
|
|
4200
4220
|
/**
|
|
@@ -4223,7 +4243,7 @@ var EventedExecutionEngine = class extends chunk5SOS47PH_cjs.ExecutionEngine {
|
|
|
4223
4243
|
await ack?.();
|
|
4224
4244
|
await pubsub.unsubscribe("workflows-finish", finishCb);
|
|
4225
4245
|
if (event.type === "workflow.fail" && event.data.stepResults) {
|
|
4226
|
-
event.data.stepResults =
|
|
4246
|
+
event.data.stepResults = chunkZC6IHDHX_cjs.hydrateSerializedStepErrors(event.data.stepResults);
|
|
4227
4247
|
}
|
|
4228
4248
|
resolveResult(event.data);
|
|
4229
4249
|
return;
|
|
@@ -4305,7 +4325,7 @@ var EventedExecutionEngine = class extends chunk5SOS47PH_cjs.ExecutionEngine {
|
|
|
4305
4325
|
const { __state: _removedState, ...stepResultsWithoutTopLevelState } = resultData.stepResults ?? {};
|
|
4306
4326
|
const cleanStepResults = {};
|
|
4307
4327
|
for (const [stepId, stepResult] of Object.entries(stepResultsWithoutTopLevelState)) {
|
|
4308
|
-
cleanStepResults[stepId] =
|
|
4328
|
+
cleanStepResults[stepId] = chunkZC6IHDHX_cjs.cleanStepResult(stepResult);
|
|
4309
4329
|
}
|
|
4310
4330
|
let callbackArg;
|
|
4311
4331
|
if (resultData.prevResult.status === "failed") {
|
|
@@ -4421,5 +4441,5 @@ exports.cloneStep = cloneStep;
|
|
|
4421
4441
|
exports.cloneWorkflow = cloneWorkflow;
|
|
4422
4442
|
exports.createStep = createStep;
|
|
4423
4443
|
exports.createWorkflow = createWorkflow;
|
|
4424
|
-
//# sourceMappingURL=chunk-
|
|
4425
|
-
//# sourceMappingURL=chunk-
|
|
4444
|
+
//# sourceMappingURL=chunk-DULE2DRR.cjs.map
|
|
4445
|
+
//# sourceMappingURL=chunk-DULE2DRR.cjs.map
|