@mastra/core 0.18.0 → 0.19.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 +61 -0
- package/dist/action/index.d.ts +5 -5
- package/dist/action/index.d.ts.map +1 -1
- package/dist/agent/agent.d.ts +20 -10
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/index.cjs +11 -11
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +2 -2
- package/dist/agent/input-processor/index.cjs +6 -6
- package/dist/agent/input-processor/index.js +1 -1
- package/dist/agent/message-list/index.d.ts +1 -1
- package/dist/agent/message-list/index.d.ts.map +1 -1
- package/dist/agent/trip-wire.d.ts +14 -0
- package/dist/agent/trip-wire.d.ts.map +1 -1
- package/dist/agent/types.d.ts +19 -11
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts +4 -33
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/schema.d.ts +3 -1
- package/dist/agent/workflows/prepare-stream/schema.d.ts.map +1 -1
- package/dist/ai-tracing/exporters/default.d.ts +2 -2
- package/dist/ai-tracing/exporters/default.d.ts.map +1 -1
- package/dist/ai-tracing/index.cjs +32 -32
- package/dist/ai-tracing/index.js +1 -1
- package/dist/ai-tracing/types.d.ts +2 -2
- package/dist/ai-tracing/types.d.ts.map +1 -1
- package/dist/base.d.ts +1 -1
- package/dist/{chunk-ITD7IHN5.js → chunk-2DGWSOVQ.js} +23 -5
- package/dist/chunk-2DGWSOVQ.js.map +1 -0
- package/dist/{chunk-WAGAASWE.cjs → chunk-2GHLV754.cjs} +5 -4
- package/dist/chunk-2GHLV754.cjs.map +1 -0
- package/dist/{chunk-JRTFV63C.cjs → chunk-3CCJVNYI.cjs} +48 -30
- package/dist/chunk-3CCJVNYI.cjs.map +1 -0
- package/dist/{chunk-TZZFP4EW.js → chunk-3WFH6YRI.js} +4 -4
- package/dist/{chunk-TZZFP4EW.js.map → chunk-3WFH6YRI.js.map} +1 -1
- package/dist/chunk-45CV4JYJ.cjs +4 -0
- package/dist/{chunk-VBPPPQO3.cjs.map → chunk-45CV4JYJ.cjs.map} +1 -1
- package/dist/{chunk-TJZ4ERV4.cjs → chunk-47WWN5FW.cjs} +19 -19
- package/dist/{chunk-TJZ4ERV4.cjs.map → chunk-47WWN5FW.cjs.map} +1 -1
- package/dist/{chunk-SEZBEL3U.js → chunk-4BEHJSL6.js} +4 -4
- package/dist/{chunk-SEZBEL3U.js.map → chunk-4BEHJSL6.js.map} +1 -1
- package/dist/{chunk-QIXLPKMN.cjs → chunk-4LGYM3WV.cjs} +4 -4
- package/dist/{chunk-QIXLPKMN.cjs.map → chunk-4LGYM3WV.cjs.map} +1 -1
- package/dist/chunk-4LSFAAZW.js +3 -0
- package/dist/{chunk-CE73R5W7.js.map → chunk-4LSFAAZW.js.map} +1 -1
- package/dist/{chunk-XUAWHRUO.cjs → chunk-4R2TBRS7.cjs} +37 -112
- package/dist/chunk-4R2TBRS7.cjs.map +1 -0
- package/dist/{chunk-AEYCHF2U.cjs → chunk-4VNAMG7K.cjs} +6 -6
- package/dist/{chunk-AEYCHF2U.cjs.map → chunk-4VNAMG7K.cjs.map} +1 -1
- package/dist/{chunk-FXLZYRV7.js → chunk-5HCVPQTD.js} +3 -3
- package/dist/{chunk-FXLZYRV7.js.map → chunk-5HCVPQTD.js.map} +1 -1
- package/dist/chunk-5M6ZTQJN.js +1374 -0
- package/dist/chunk-5M6ZTQJN.js.map +1 -0
- package/dist/{chunk-SW7WPHZ2.cjs → chunk-7E4ESNZS.cjs} +5 -5
- package/dist/{chunk-SW7WPHZ2.cjs.map → chunk-7E4ESNZS.cjs.map} +1 -1
- package/dist/{chunk-OVVKYARB.cjs → chunk-A4RAEU6X.cjs} +2 -2
- package/dist/chunk-A4RAEU6X.cjs.map +1 -0
- package/dist/{chunk-SHFLPFKN.js → chunk-BUY5X7DT.js} +4 -4
- package/dist/{chunk-SHFLPFKN.js.map → chunk-BUY5X7DT.js.map} +1 -1
- package/dist/{chunk-L7Z3C5XG.cjs → chunk-CQ73JM2N.cjs} +10 -10
- package/dist/{chunk-L7Z3C5XG.cjs.map → chunk-CQ73JM2N.cjs.map} +1 -1
- package/dist/{chunk-GGN63GU5.cjs → chunk-DRVSEV5Y.cjs} +25 -65
- package/dist/chunk-DRVSEV5Y.cjs.map +1 -0
- package/dist/{chunk-2TQHRYRK.cjs → chunk-EPMJYNEK.cjs} +4 -4
- package/dist/{chunk-2TQHRYRK.cjs.map → chunk-EPMJYNEK.cjs.map} +1 -1
- package/dist/{chunk-TKFLL33F.cjs → chunk-F6EJEELE.cjs} +9 -9
- package/dist/{chunk-TKFLL33F.cjs.map → chunk-F6EJEELE.cjs.map} +1 -1
- package/dist/{chunk-AR76DMZQ.js → chunk-FV4QVXO4.js} +2 -2
- package/dist/chunk-FV4QVXO4.js.map +1 -0
- package/dist/{chunk-O6PQYYT6.cjs → chunk-HQPFM22N.cjs} +63 -45
- package/dist/chunk-HQPFM22N.cjs.map +1 -0
- package/dist/{chunk-GMQUHK3L.js → chunk-IAXAPVOP.js} +4 -4
- package/dist/{chunk-GMQUHK3L.js.map → chunk-IAXAPVOP.js.map} +1 -1
- package/dist/{chunk-2ZSMA4EM.js → chunk-JJW5JU2G.js} +391 -367
- package/dist/chunk-JJW5JU2G.js.map +1 -0
- package/dist/{chunk-USHKSVKL.js → chunk-JWSZSM7U.js} +11 -9
- package/dist/{chunk-USHKSVKL.js.map → chunk-JWSZSM7U.js.map} +1 -1
- package/dist/{chunk-Y5XECV4O.cjs → chunk-K4AYIXVH.cjs} +4 -4
- package/dist/{chunk-Y5XECV4O.cjs.map → chunk-K4AYIXVH.cjs.map} +1 -1
- package/dist/{chunk-6NZTZOEI.js → chunk-LT6NPN3E.js} +33 -15
- package/dist/chunk-LT6NPN3E.js.map +1 -0
- package/dist/{chunk-7CF3FKP3.js → chunk-MAGA2UEJ.js} +4 -4
- package/dist/{chunk-7CF3FKP3.js.map → chunk-MAGA2UEJ.js.map} +1 -1
- package/dist/{chunk-RPFJBB5X.js → chunk-N4PK4MOG.js} +4 -4
- package/dist/{chunk-RPFJBB5X.js.map → chunk-N4PK4MOG.js.map} +1 -1
- package/dist/{chunk-TRZT7QPJ.cjs → chunk-NHJVMZIL.cjs} +19 -19
- package/dist/{chunk-TRZT7QPJ.cjs.map → chunk-NHJVMZIL.cjs.map} +1 -1
- package/dist/{chunk-BJZWMVNW.js → chunk-OBIF7QD5.js} +3 -3
- package/dist/{chunk-BJZWMVNW.js.map → chunk-OBIF7QD5.js.map} +1 -1
- package/dist/{chunk-JXRAFE3E.js → chunk-OSZMRVWP.js} +3 -3
- package/dist/{chunk-JXRAFE3E.js.map → chunk-OSZMRVWP.js.map} +1 -1
- package/dist/{chunk-SQFVIROI.js → chunk-PJ6HF3KW.js} +16 -56
- package/dist/chunk-PJ6HF3KW.js.map +1 -0
- package/dist/{chunk-CBV6EVJK.cjs → chunk-PLATPKJA.cjs} +433 -408
- package/dist/chunk-PLATPKJA.cjs.map +1 -0
- package/dist/{chunk-X2TVBX7O.js → chunk-RAXBZZKS.js} +4 -3
- package/dist/chunk-RAXBZZKS.js.map +1 -0
- package/dist/chunk-RFGQ3EQV.js +3 -0
- package/dist/chunk-RFGQ3EQV.js.map +1 -0
- package/dist/{chunk-YDLEEOJ6.js → chunk-RYFQKXXS.js} +3 -3
- package/dist/{chunk-YDLEEOJ6.js.map → chunk-RYFQKXXS.js.map} +1 -1
- package/dist/{chunk-C73WLCY3.cjs → chunk-S7UXT3V4.cjs} +21 -3
- package/dist/chunk-S7UXT3V4.cjs.map +1 -0
- package/dist/{chunk-R5GESRGB.js → chunk-SJMKDSRF.js} +37 -112
- package/dist/chunk-SJMKDSRF.js.map +1 -0
- package/dist/{chunk-YWXSGDDO.cjs → chunk-SQQMX4VC.cjs} +6 -6
- package/dist/{chunk-YWXSGDDO.cjs.map → chunk-SQQMX4VC.cjs.map} +1 -1
- package/dist/chunk-TCHOIK53.cjs +4 -0
- package/dist/chunk-TCHOIK53.cjs.map +1 -0
- package/dist/chunk-TIBULEK6.cjs +1379 -0
- package/dist/chunk-TIBULEK6.cjs.map +1 -0
- package/dist/{chunk-WECJNCGT.cjs → chunk-UTEH2LCJ.cjs} +19 -19
- package/dist/{chunk-WECJNCGT.cjs.map → chunk-UTEH2LCJ.cjs.map} +1 -1
- package/dist/{chunk-MCOVMKIS.js → chunk-WHFNGECY.js} +21 -4
- package/dist/chunk-WHFNGECY.js.map +1 -0
- package/dist/{chunk-NTXNE4YR.js → chunk-XG3SFWOH.js} +3 -3
- package/dist/{chunk-NTXNE4YR.js.map → chunk-XG3SFWOH.js.map} +1 -1
- package/dist/{chunk-UMATHB4Q.cjs → chunk-YJQDN37F.cjs} +40 -38
- package/dist/chunk-YJQDN37F.cjs.map +1 -0
- package/dist/error/index.cjs +5 -5
- package/dist/error/index.d.ts.map +1 -1
- package/dist/error/index.js +1 -1
- package/dist/error/utils.d.ts +8 -0
- package/dist/error/utils.d.ts.map +1 -0
- package/dist/eval/index.cjs +3 -3
- package/dist/eval/index.js +1 -1
- package/dist/index.cjs +87 -66
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -17
- package/dist/index.js.map +1 -1
- package/dist/integration/index.cjs +3 -3
- package/dist/integration/index.js +1 -1
- package/dist/llm/index.cjs +20 -0
- package/dist/llm/index.d.ts +3 -1
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +1 -1
- package/dist/llm/model/gateways/base.d.ts +42 -0
- package/dist/llm/model/gateways/base.d.ts.map +1 -0
- package/dist/llm/model/gateways/index.d.ts +3 -0
- package/dist/llm/model/gateways/index.d.ts.map +1 -0
- package/dist/llm/model/gateways/models-dev.d.ts +11 -0
- package/dist/llm/model/gateways/models-dev.d.ts.map +1 -0
- package/dist/llm/model/index.d.ts +2 -0
- package/dist/llm/model/index.d.ts.map +1 -1
- package/dist/llm/model/model.loop.d.ts.map +1 -1
- package/dist/llm/model/openai-compatible.d.ts +32 -0
- package/dist/llm/model/openai-compatible.d.ts.map +1 -0
- package/dist/llm/model/provider-registry.generated.d.ts +462 -0
- package/dist/llm/model/provider-registry.generated.d.ts.map +1 -0
- package/dist/llm/model/shared.types.d.ts +8 -0
- package/dist/llm/model/shared.types.d.ts.map +1 -1
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts +18 -18
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/loop/test-utils/fullStream.d.ts.map +1 -1
- package/dist/loop/test-utils/generateText.d.ts.map +1 -1
- package/dist/loop/test-utils/options.d.ts.map +1 -1
- package/dist/loop/test-utils/resultObject.d.ts.map +1 -1
- package/dist/loop/test-utils/streamObject.d.ts.map +1 -1
- package/dist/loop/test-utils/toUIMessageStream.d.ts.map +1 -1
- package/dist/loop/test-utils/tools.d.ts.map +1 -1
- package/dist/loop/types.d.ts +5 -5
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/index.d.ts +147 -48
- package/dist/loop/workflows/agentic-execution/index.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +98 -32
- 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 +49 -16
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-loop/index.d.ts +147 -48
- package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
- package/dist/loop/workflows/run-state.d.ts +5 -0
- package/dist/loop/workflows/run-state.d.ts.map +1 -1
- package/dist/loop/workflows/schema.d.ts +57 -19
- package/dist/loop/workflows/schema.d.ts.map +1 -1
- package/dist/loop/workflows/stream.d.ts +13 -0
- package/dist/loop/workflows/stream.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts +1 -1
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +4 -4
- package/dist/memory/index.js +1 -1
- package/dist/memory/types.d.ts +1 -1
- package/dist/network/vNext/index.cjs +29 -29
- package/dist/network/vNext/index.cjs.map +1 -1
- package/dist/network/vNext/index.d.ts +14 -14
- package/dist/network/vNext/index.js +17 -17
- package/dist/network/vNext/index.js.map +1 -1
- package/dist/processors/index.cjs +10 -10
- package/dist/processors/index.js +1 -1
- package/dist/processors/processors/language-detector.d.ts.map +1 -1
- package/dist/processors/processors/moderation.d.ts.map +1 -1
- package/dist/processors/processors/pii-detector.d.ts.map +1 -1
- package/dist/processors/processors/prompt-injection-detector.d.ts.map +1 -1
- package/dist/processors/processors/structured-output.d.ts.map +1 -1
- package/dist/processors/processors/system-prompt-scrubber.d.ts.map +1 -1
- package/dist/processors/runner.d.ts +7 -7
- package/dist/processors/runner.d.ts.map +1 -1
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.js +1 -1
- package/dist/scores/index.cjs +9 -9
- package/dist/scores/index.js +2 -2
- package/dist/scores/scoreTraces/index.cjs +57 -68
- package/dist/scores/scoreTraces/index.cjs.map +1 -1
- package/dist/scores/scoreTraces/index.js +48 -59
- package/dist/scores/scoreTraces/index.js.map +1 -1
- package/dist/scores/scoreTraces/scoreTracesWorkflow.d.ts.map +1 -1
- package/dist/scores/scoreTraces/utils.d.ts +4 -8
- package/dist/scores/scoreTraces/utils.d.ts.map +1 -1
- package/dist/scores/types.d.ts +8 -4
- package/dist/scores/types.d.ts.map +1 -1
- package/dist/server/index.cjs +7 -7
- package/dist/server/index.js +2 -2
- package/dist/storage/base.d.ts +14 -5
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/domains/observability/base.d.ts +5 -5
- package/dist/storage/domains/observability/base.d.ts.map +1 -1
- package/dist/storage/domains/observability/inmemory.d.ts +7 -7
- package/dist/storage/domains/observability/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/scores/base.d.ts +8 -0
- package/dist/storage/domains/scores/base.d.ts.map +1 -1
- package/dist/storage/domains/scores/inmemory.d.ts +8 -0
- package/dist/storage/domains/scores/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +94 -64
- package/dist/storage/index.cjs.map +1 -1
- package/dist/storage/index.js +59 -29
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/mock.d.ts +9 -0
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/types.d.ts +2 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/MastraAgentNetworkStream.d.ts.map +1 -1
- package/dist/stream/MastraWorkflowStream.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/compat/ui-message.d.ts +5 -5
- package/dist/stream/aisdk/v5/compat/ui-message.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/execute.d.ts +2 -5
- package/dist/stream/aisdk/v5/execute.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/input.d.ts +2 -1
- package/dist/stream/aisdk/v5/input.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/output-helpers.d.ts +5 -11
- package/dist/stream/aisdk/v5/output-helpers.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/output.d.ts +43 -16
- package/dist/stream/aisdk/v5/output.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/transform.d.ts +6 -6
- package/dist/stream/aisdk/v5/transform.d.ts.map +1 -1
- package/dist/stream/base/input.d.ts +2 -1
- package/dist/stream/base/input.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts +69 -82
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/index.cjs +4 -4
- package/dist/stream/index.d.ts +1 -1
- package/dist/stream/index.d.ts.map +1 -1
- package/dist/stream/index.js +1 -1
- package/dist/stream/types.d.ts +217 -96
- package/dist/stream/types.d.ts.map +1 -1
- package/dist/telemetry/index.cjs +7 -7
- package/dist/telemetry/index.js +1 -1
- package/dist/test-utils/llm-mock.cjs +2 -2
- package/dist/test-utils/llm-mock.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.d.ts +6 -8
- package/dist/tools/tool.d.ts.map +1 -1
- package/dist/tools/types.d.ts +8 -7
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/validation.d.ts +2 -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.d.ts → types/dynamic-argument.d.ts} +3 -3
- package/dist/types/dynamic-argument.d.ts.map +1 -0
- package/dist/types/index.cjs +4 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/zod-compat.d.ts +23 -0
- package/dist/types/zod-compat.d.ts.map +1 -0
- package/dist/utils.cjs +17 -17
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +4 -4
- package/dist/vector/index.js +1 -1
- package/dist/voice/index.cjs +4 -4
- package/dist/voice/index.js +1 -1
- package/dist/workflows/default.d.ts +1 -1
- package/dist/workflows/default.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.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 +2 -1
- package/dist/workflows/execution-engine.d.ts.map +1 -1
- package/dist/workflows/index.cjs +15 -11
- package/dist/workflows/index.d.ts +1 -0
- package/dist/workflows/index.d.ts.map +1 -1
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/legacy/index.cjs +22 -22
- package/dist/workflows/legacy/index.js +1 -1
- package/dist/workflows/legacy/step.d.ts +4 -4
- package/dist/workflows/legacy/step.d.ts.map +1 -1
- package/dist/workflows/legacy/types.d.ts +12 -7
- package/dist/workflows/legacy/types.d.ts.map +1 -1
- package/dist/workflows/legacy/workflow-instance.d.ts +2 -2
- package/dist/workflows/step.d.ts +3 -1
- package/dist/workflows/step.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +12 -1
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/utils.d.ts +10 -0
- package/dist/workflows/utils.d.ts.map +1 -0
- package/dist/workflows/workflow.d.ts +30 -14
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/package.json +6 -3
- package/types.d.ts +1 -0
- package/dist/chunk-2ZSMA4EM.js.map +0 -1
- package/dist/chunk-6NZTZOEI.js.map +0 -1
- package/dist/chunk-AR76DMZQ.js.map +0 -1
- package/dist/chunk-C73WLCY3.cjs.map +0 -1
- package/dist/chunk-CBV6EVJK.cjs.map +0 -1
- package/dist/chunk-CE73R5W7.js +0 -3
- package/dist/chunk-GGN63GU5.cjs.map +0 -1
- package/dist/chunk-ITD7IHN5.js.map +0 -1
- package/dist/chunk-JRTFV63C.cjs.map +0 -1
- package/dist/chunk-MCOVMKIS.js.map +0 -1
- package/dist/chunk-O6PQYYT6.cjs.map +0 -1
- package/dist/chunk-OVVKYARB.cjs.map +0 -1
- package/dist/chunk-R5GESRGB.js.map +0 -1
- package/dist/chunk-SQFVIROI.js.map +0 -1
- package/dist/chunk-UMATHB4Q.cjs.map +0 -1
- package/dist/chunk-VBPPPQO3.cjs +0 -4
- package/dist/chunk-WAGAASWE.cjs.map +0 -1
- package/dist/chunk-X2TVBX7O.js.map +0 -1
- package/dist/chunk-XUAWHRUO.cjs.map +0 -1
- package/dist/types.d.ts.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkGPWMM745_cjs = require('./chunk-GPWMM745.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkS7UXT3V4_cjs = require('./chunk-S7UXT3V4.cjs');
|
|
5
5
|
var chunkOXAN5SM7_cjs = require('./chunk-OXAN5SM7.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkA4RAEU6X_cjs = require('./chunk-A4RAEU6X.cjs');
|
|
7
7
|
var chunk4L3P3PCP_cjs = require('./chunk-4L3P3PCP.cjs');
|
|
8
8
|
var chunkWVCEJBDR_cjs = require('./chunk-WVCEJBDR.cjs');
|
|
9
9
|
var crypto$1 = require('crypto');
|
|
@@ -229,7 +229,7 @@ var DefaultAISpan = class extends BaseAISpan {
|
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
231
|
const { error, endSpan = true, attributes, metadata } = options;
|
|
232
|
-
this.errorInfo = error instanceof
|
|
232
|
+
this.errorInfo = error instanceof chunkS7UXT3V4_cjs.MastraError ? {
|
|
233
233
|
id: error.id,
|
|
234
234
|
details: error.details,
|
|
235
235
|
category: error.category,
|
|
@@ -579,7 +579,7 @@ var CoreToolBuilder = class extends chunk4L3P3PCP_cjs.MastraBase {
|
|
|
579
579
|
}
|
|
580
580
|
// Helper to get parameters based on tool type
|
|
581
581
|
getParameters = () => {
|
|
582
|
-
if (
|
|
582
|
+
if (chunkA4RAEU6X_cjs.isVercelTool(this.originalTool)) {
|
|
583
583
|
return this.originalTool.parameters ?? zod.z.object({});
|
|
584
584
|
}
|
|
585
585
|
return this.originalTool.inputSchema ?? zod.z.object({});
|
|
@@ -644,7 +644,7 @@ var CoreToolBuilder = class extends chunk4L3P3PCP_cjs.MastraBase {
|
|
|
644
644
|
});
|
|
645
645
|
try {
|
|
646
646
|
let result;
|
|
647
|
-
if (
|
|
647
|
+
if (chunkA4RAEU6X_cjs.isVercelTool(tool)) {
|
|
648
648
|
result = await tool?.execute?.(args, execOptions);
|
|
649
649
|
} else {
|
|
650
650
|
const wrappedMastra = options.mastra ? wrapMastra(options.mastra, { currentSpan: toolSpan }) : options.mastra;
|
|
@@ -683,7 +683,7 @@ var CoreToolBuilder = class extends chunk4L3P3PCP_cjs.MastraBase {
|
|
|
683
683
|
try {
|
|
684
684
|
logger2.debug(start, { ...rest, args });
|
|
685
685
|
const parameters = this.getParameters();
|
|
686
|
-
const { data, error: error2 } =
|
|
686
|
+
const { data, error: error2 } = chunkA4RAEU6X_cjs.validateToolInput(parameters, args, options.name);
|
|
687
687
|
if (error2) {
|
|
688
688
|
logger2.warn(`Tool input validation failed for '${options.name}'`, {
|
|
689
689
|
toolName: options.name,
|
|
@@ -704,7 +704,7 @@ var CoreToolBuilder = class extends chunk4L3P3PCP_cjs.MastraBase {
|
|
|
704
704
|
});
|
|
705
705
|
});
|
|
706
706
|
} catch (err) {
|
|
707
|
-
const mastraError = new
|
|
707
|
+
const mastraError = new chunkS7UXT3V4_cjs.MastraError(
|
|
708
708
|
{
|
|
709
709
|
id: "TOOL_EXECUTION_FAILED",
|
|
710
710
|
domain: "TOOL" /* TOOL */,
|
|
@@ -927,7 +927,7 @@ function ensureToolProperties(tools) {
|
|
|
927
927
|
const toolsWithProperties = Object.keys(tools).reduce((acc, key) => {
|
|
928
928
|
const tool = tools?.[key];
|
|
929
929
|
if (tool) {
|
|
930
|
-
if (
|
|
930
|
+
if (chunkA4RAEU6X_cjs.isVercelTool(tool)) {
|
|
931
931
|
acc[key] = setVercelToolProperties(tool);
|
|
932
932
|
} else {
|
|
933
933
|
acc[key] = tool;
|
|
@@ -1178,7 +1178,7 @@ var CloudExporter = class {
|
|
|
1178
1178
|
}
|
|
1179
1179
|
this.flushTimer = setTimeout(() => {
|
|
1180
1180
|
this.flush().catch((error) => {
|
|
1181
|
-
const mastraError = new
|
|
1181
|
+
const mastraError = new chunkS7UXT3V4_cjs.MastraError(
|
|
1182
1182
|
{
|
|
1183
1183
|
id: `CLOUD_AI_TRACING_FAILED_TO_SCHEDULE_FLUSH`,
|
|
1184
1184
|
domain: "MASTRA_OBSERVABILITY" /* MASTRA_OBSERVABILITY */,
|
|
@@ -1212,7 +1212,7 @@ var CloudExporter = class {
|
|
|
1212
1212
|
durationMs: elapsed
|
|
1213
1213
|
});
|
|
1214
1214
|
} catch (error) {
|
|
1215
|
-
const mastraError = new
|
|
1215
|
+
const mastraError = new chunkS7UXT3V4_cjs.MastraError(
|
|
1216
1216
|
{
|
|
1217
1217
|
id: `CLOUD_AI_TRACING_FAILED_TO_BATCH_UPLOAD`,
|
|
1218
1218
|
domain: "MASTRA_OBSERVABILITY" /* MASTRA_OBSERVABILITY */,
|
|
@@ -1263,7 +1263,7 @@ var CloudExporter = class {
|
|
|
1263
1263
|
try {
|
|
1264
1264
|
await this.flush();
|
|
1265
1265
|
} catch (error) {
|
|
1266
|
-
const mastraError = new
|
|
1266
|
+
const mastraError = new chunkS7UXT3V4_cjs.MastraError(
|
|
1267
1267
|
{
|
|
1268
1268
|
id: `CLOUD_AI_TRACING_FAILED_TO_FLUSH_REMAINING_EVENTS_DURING_SHUTDOWN`,
|
|
1269
1269
|
domain: "MASTRA_OBSERVABILITY" /* MASTRA_OBSERVABILITY */,
|
|
@@ -1430,7 +1430,7 @@ var DefaultExporter = class {
|
|
|
1430
1430
|
/**
|
|
1431
1431
|
* Initialize the exporter (called after all dependencies are ready)
|
|
1432
1432
|
*/
|
|
1433
|
-
init() {
|
|
1433
|
+
init(_config) {
|
|
1434
1434
|
if (!this.mastra) {
|
|
1435
1435
|
throw new Error("DefaultExporter: init() called before __registerMastra()");
|
|
1436
1436
|
}
|
|
@@ -1493,13 +1493,7 @@ var DefaultExporter = class {
|
|
|
1493
1493
|
switch (event.type) {
|
|
1494
1494
|
case "span_started" /* SPAN_STARTED */:
|
|
1495
1495
|
if (this.resolvedStrategy === "batch-with-updates") {
|
|
1496
|
-
const createRecord =
|
|
1497
|
-
traceId: event.exportedSpan.traceId,
|
|
1498
|
-
spanId: event.exportedSpan.id,
|
|
1499
|
-
...this.buildCreateRecord(event.exportedSpan),
|
|
1500
|
-
createdAt: /* @__PURE__ */ new Date(),
|
|
1501
|
-
updatedAt: null
|
|
1502
|
-
};
|
|
1496
|
+
const createRecord = this.buildCreateRecord(event.exportedSpan);
|
|
1503
1497
|
this.buffer.creates.push(createRecord);
|
|
1504
1498
|
this.buffer.seenSpans.add(spanKey);
|
|
1505
1499
|
this.allCreatedSpans.add(spanKey);
|
|
@@ -1511,10 +1505,7 @@ var DefaultExporter = class {
|
|
|
1511
1505
|
this.buffer.updates.push({
|
|
1512
1506
|
traceId: event.exportedSpan.traceId,
|
|
1513
1507
|
spanId: event.exportedSpan.id,
|
|
1514
|
-
updates:
|
|
1515
|
-
...this.buildUpdateRecord(event.exportedSpan),
|
|
1516
|
-
updatedAt: /* @__PURE__ */ new Date()
|
|
1517
|
-
},
|
|
1508
|
+
updates: this.buildUpdateRecord(event.exportedSpan),
|
|
1518
1509
|
sequenceNumber: this.getNextSequence(spanKey)
|
|
1519
1510
|
});
|
|
1520
1511
|
} else {
|
|
@@ -1529,21 +1520,12 @@ var DefaultExporter = class {
|
|
|
1529
1520
|
this.buffer.updates.push({
|
|
1530
1521
|
traceId: event.exportedSpan.traceId,
|
|
1531
1522
|
spanId: event.exportedSpan.id,
|
|
1532
|
-
updates:
|
|
1533
|
-
...this.buildUpdateRecord(event.exportedSpan),
|
|
1534
|
-
updatedAt: /* @__PURE__ */ new Date()
|
|
1535
|
-
},
|
|
1523
|
+
updates: this.buildUpdateRecord(event.exportedSpan),
|
|
1536
1524
|
sequenceNumber: this.getNextSequence(spanKey)
|
|
1537
1525
|
});
|
|
1538
1526
|
this.buffer.completedSpans.add(spanKey);
|
|
1539
1527
|
} else if (event.exportedSpan.isEvent) {
|
|
1540
|
-
const createRecord =
|
|
1541
|
-
traceId: event.exportedSpan.traceId,
|
|
1542
|
-
spanId: event.exportedSpan.id,
|
|
1543
|
-
...this.buildCreateRecord(event.exportedSpan),
|
|
1544
|
-
createdAt: /* @__PURE__ */ new Date(),
|
|
1545
|
-
updatedAt: null
|
|
1546
|
-
};
|
|
1528
|
+
const createRecord = this.buildCreateRecord(event.exportedSpan);
|
|
1547
1529
|
this.buffer.creates.push(createRecord);
|
|
1548
1530
|
this.buffer.seenSpans.add(spanKey);
|
|
1549
1531
|
this.allCreatedSpans.add(spanKey);
|
|
@@ -1553,13 +1535,7 @@ var DefaultExporter = class {
|
|
|
1553
1535
|
this.buffer.outOfOrderCount++;
|
|
1554
1536
|
}
|
|
1555
1537
|
} else if (this.resolvedStrategy === "insert-only") {
|
|
1556
|
-
const createRecord =
|
|
1557
|
-
traceId: event.exportedSpan.traceId,
|
|
1558
|
-
spanId: event.exportedSpan.id,
|
|
1559
|
-
...this.buildCreateRecord(event.exportedSpan),
|
|
1560
|
-
createdAt: /* @__PURE__ */ new Date(),
|
|
1561
|
-
updatedAt: null
|
|
1562
|
-
};
|
|
1538
|
+
const createRecord = this.buildCreateRecord(event.exportedSpan);
|
|
1563
1539
|
this.buffer.insertOnly.push(createRecord);
|
|
1564
1540
|
this.buffer.completedSpans.add(spanKey);
|
|
1565
1541
|
this.allCreatedSpans.add(spanKey);
|
|
@@ -1649,6 +1625,8 @@ var DefaultExporter = class {
|
|
|
1649
1625
|
}
|
|
1650
1626
|
buildCreateRecord(span) {
|
|
1651
1627
|
return {
|
|
1628
|
+
traceId: span.traceId,
|
|
1629
|
+
spanId: span.id,
|
|
1652
1630
|
parentSpanId: span.parentSpanId ?? null,
|
|
1653
1631
|
name: span.name,
|
|
1654
1632
|
scope: null,
|
|
@@ -1685,46 +1663,28 @@ var DefaultExporter = class {
|
|
|
1685
1663
|
const spanKey = this.buildSpanKey(span.traceId, span.id);
|
|
1686
1664
|
if (span.isEvent) {
|
|
1687
1665
|
if (event.type === "span_ended" /* SPAN_ENDED */) {
|
|
1688
|
-
await storage.createAISpan(
|
|
1689
|
-
traceId: span.traceId,
|
|
1690
|
-
spanId: span.id,
|
|
1691
|
-
...this.buildCreateRecord(span),
|
|
1692
|
-
createdAt: /* @__PURE__ */ new Date(),
|
|
1693
|
-
updatedAt: null
|
|
1694
|
-
});
|
|
1666
|
+
await storage.createAISpan(this.buildCreateRecord(event.exportedSpan));
|
|
1695
1667
|
} else {
|
|
1696
1668
|
this.logger.warn(`Tracing event type not implemented for event spans: ${event.type}`);
|
|
1697
1669
|
}
|
|
1698
1670
|
} else {
|
|
1699
1671
|
switch (event.type) {
|
|
1700
1672
|
case "span_started" /* SPAN_STARTED */:
|
|
1701
|
-
await storage.createAISpan(
|
|
1702
|
-
traceId: span.traceId,
|
|
1703
|
-
spanId: span.id,
|
|
1704
|
-
...this.buildCreateRecord(span),
|
|
1705
|
-
createdAt: /* @__PURE__ */ new Date(),
|
|
1706
|
-
updatedAt: null
|
|
1707
|
-
});
|
|
1673
|
+
await storage.createAISpan(this.buildCreateRecord(event.exportedSpan));
|
|
1708
1674
|
this.allCreatedSpans.add(spanKey);
|
|
1709
1675
|
break;
|
|
1710
1676
|
case "span_updated" /* SPAN_UPDATED */:
|
|
1711
1677
|
await storage.updateAISpan({
|
|
1712
1678
|
traceId: span.traceId,
|
|
1713
1679
|
spanId: span.id,
|
|
1714
|
-
updates:
|
|
1715
|
-
...this.buildUpdateRecord(span),
|
|
1716
|
-
updatedAt: /* @__PURE__ */ new Date()
|
|
1717
|
-
}
|
|
1680
|
+
updates: this.buildUpdateRecord(span)
|
|
1718
1681
|
});
|
|
1719
1682
|
break;
|
|
1720
1683
|
case "span_ended" /* SPAN_ENDED */:
|
|
1721
1684
|
await storage.updateAISpan({
|
|
1722
1685
|
traceId: span.traceId,
|
|
1723
1686
|
spanId: span.id,
|
|
1724
|
-
updates:
|
|
1725
|
-
...this.buildUpdateRecord(span),
|
|
1726
|
-
updatedAt: /* @__PURE__ */ new Date()
|
|
1727
|
-
}
|
|
1687
|
+
updates: this.buildUpdateRecord(span)
|
|
1728
1688
|
});
|
|
1729
1689
|
this.allCreatedSpans.delete(spanKey);
|
|
1730
1690
|
break;
|
|
@@ -2442,5 +2402,5 @@ exports.setupAITracing = setupAITracing;
|
|
|
2442
2402
|
exports.shutdownAITracingRegistry = shutdownAITracingRegistry;
|
|
2443
2403
|
exports.unregisterAITracing = unregisterAITracing;
|
|
2444
2404
|
exports.wrapMastra = wrapMastra;
|
|
2445
|
-
//# sourceMappingURL=chunk-
|
|
2446
|
-
//# sourceMappingURL=chunk-
|
|
2405
|
+
//# sourceMappingURL=chunk-DRVSEV5Y.cjs.map
|
|
2406
|
+
//# sourceMappingURL=chunk-DRVSEV5Y.cjs.map
|