@mastra/core 0.15.3-alpha.5 → 0.15.3-alpha.7
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 +33 -0
- package/dist/agent/agent.types.d.ts +1 -0
- package/dist/agent/agent.types.d.ts.map +1 -1
- package/dist/agent/index.cjs +11 -11
- package/dist/agent/index.d.ts +2 -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/prompt/convert-to-mastra-v1.d.ts.map +1 -1
- package/dist/ai-tracing/exporters/default.d.ts.map +1 -1
- package/dist/ai-tracing/index.cjs +30 -30
- package/dist/ai-tracing/index.js +1 -1
- package/dist/{chunk-XM2ASGWH.js → chunk-4VU6A5XE.js} +3 -3
- package/dist/{chunk-XM2ASGWH.js.map → chunk-4VU6A5XE.js.map} +1 -1
- package/dist/{chunk-VVTB47UG.cjs → chunk-626FLQPT.cjs} +4 -4
- package/dist/{chunk-VVTB47UG.cjs.map → chunk-626FLQPT.cjs.map} +1 -1
- package/dist/{chunk-E264YNL3.cjs → chunk-7IIXZ5HS.cjs} +14 -14
- package/dist/{chunk-E264YNL3.cjs.map → chunk-7IIXZ5HS.cjs.map} +1 -1
- package/dist/{chunk-5CJDO3UO.cjs → chunk-AAJF7WLJ.cjs} +3 -4
- package/dist/chunk-AAJF7WLJ.cjs.map +1 -0
- package/dist/{chunk-OBKBA6CO.cjs → chunk-AB2X2OLU.cjs} +4 -4
- package/dist/{chunk-OBKBA6CO.cjs.map → chunk-AB2X2OLU.cjs.map} +1 -1
- package/dist/{chunk-NMDRUT3Q.cjs → chunk-AWES6LTC.cjs} +4 -4
- package/dist/{chunk-NMDRUT3Q.cjs.map → chunk-AWES6LTC.cjs.map} +1 -1
- package/dist/{chunk-PQ3VP6NG.js → chunk-AYPDYPRS.js} +82 -42
- package/dist/chunk-AYPDYPRS.js.map +1 -0
- package/dist/{chunk-F4SQXAXR.js → chunk-BGE27UEX.js} +3 -4
- package/dist/chunk-BGE27UEX.js.map +1 -0
- package/dist/{chunk-A5NC3XK2.js → chunk-EUZ3OA6Y.js} +5 -5
- package/dist/{chunk-A5NC3XK2.js.map → chunk-EUZ3OA6Y.js.map} +1 -1
- package/dist/{chunk-JQKPRJCJ.cjs → chunk-GJD2BTI5.cjs} +252 -157
- package/dist/chunk-GJD2BTI5.cjs.map +1 -0
- package/dist/chunk-GXSERFAG.js +3 -0
- package/dist/{chunk-ZPQQN52E.js.map → chunk-GXSERFAG.js.map} +1 -1
- package/dist/{chunk-CKM2ESZF.js → chunk-HGYL2SSF.js} +14 -24
- package/dist/chunk-HGYL2SSF.js.map +1 -0
- package/dist/{chunk-F2CAC2R2.cjs → chunk-MNDKBEEQ.cjs} +14 -24
- package/dist/chunk-MNDKBEEQ.cjs.map +1 -0
- package/dist/{chunk-MVEPSGWQ.cjs → chunk-NVB2F66X.cjs} +86 -46
- package/dist/chunk-NVB2F66X.cjs.map +1 -0
- package/dist/{chunk-23NO6AMW.js → chunk-P24PB73W.js} +221 -126
- package/dist/chunk-P24PB73W.js.map +1 -0
- package/dist/{chunk-XPFWOBV4.js → chunk-POFCBVHG.js} +3 -3
- package/dist/{chunk-XPFWOBV4.js.map → chunk-POFCBVHG.js.map} +1 -1
- package/dist/{chunk-76MWMAR7.js → chunk-R7K2QO7M.js} +3 -2
- package/dist/chunk-R7K2QO7M.js.map +1 -0
- package/dist/{chunk-I7OAONIW.cjs → chunk-UFCYMOYH.cjs} +12 -2
- package/dist/chunk-UFCYMOYH.cjs.map +1 -0
- package/dist/{chunk-J35ULAQT.js → chunk-VZS4UVKF.js} +3 -3
- package/dist/{chunk-J35ULAQT.js.map → chunk-VZS4UVKF.js.map} +1 -1
- package/dist/{chunk-FBBP67MQ.cjs → chunk-VZYIKGJ6.cjs} +4 -4
- package/dist/{chunk-FBBP67MQ.cjs.map → chunk-VZYIKGJ6.cjs.map} +1 -1
- package/dist/{chunk-LOYT3WUA.js → chunk-WEPWZHE4.js} +12 -2
- package/dist/chunk-WEPWZHE4.js.map +1 -0
- package/dist/chunk-X4RMXTXF.cjs +4 -0
- package/dist/{chunk-F37IQKBQ.cjs.map → chunk-X4RMXTXF.cjs.map} +1 -1
- package/dist/{chunk-2L6PFHHU.js → chunk-XJO6WBIW.js} +3 -3
- package/dist/{chunk-2L6PFHHU.js.map → chunk-XJO6WBIW.js.map} +1 -1
- package/dist/{chunk-ZOU4K5MI.cjs → chunk-Z637KSJF.cjs} +3 -2
- package/dist/chunk-Z637KSJF.cjs.map +1 -0
- package/dist/index.cjs +30 -30
- package/dist/index.js +8 -8
- package/dist/llm/model/model.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/model.loop.types.d.ts +1 -0
- package/dist/llm/model/model.loop.types.d.ts.map +1 -1
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/loop/loop.d.ts +1 -1
- package/dist/loop/loop.d.ts.map +1 -1
- package/dist/loop/types.d.ts +2 -0
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/loop/workflow/llm-execution.d.ts.map +1 -1
- package/dist/loop/workflow/stream.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +4 -4
- package/dist/memory/index.js +1 -1
- package/dist/network/index.cjs +2 -2
- package/dist/network/index.js +1 -1
- package/dist/network/vNext/index.cjs +17 -17
- package/dist/network/vNext/index.cjs.map +1 -1
- package/dist/network/vNext/index.d.ts.map +1 -1
- package/dist/network/vNext/index.js +3 -3
- package/dist/network/vNext/index.js.map +1 -1
- package/dist/processors/index.cjs +8 -8
- package/dist/processors/index.js +2 -2
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.js +1 -1
- package/dist/scores/index.cjs +5 -5
- package/dist/scores/index.js +1 -1
- package/dist/server/index.cjs +2 -2
- package/dist/server/index.js +1 -1
- package/dist/storage/index.cjs +3 -3
- package/dist/storage/index.js +1 -1
- package/dist/stream/MastraWorkflowStream.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts +6 -0
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/index.cjs +3 -3
- package/dist/stream/index.js +1 -1
- package/dist/stream/types.d.ts +2 -1
- 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/telemetry/telemetry.decorators.d.ts.map +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 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tts/index.cjs +2 -2
- package/dist/tts/index.js +1 -1
- package/dist/voice/index.cjs +4 -4
- 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/workflow.d.ts.map +1 -1
- package/dist/workflows/index.cjs +10 -10
- 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/types.d.ts +64 -9
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-23NO6AMW.js.map +0 -1
- package/dist/chunk-5CJDO3UO.cjs.map +0 -1
- package/dist/chunk-76MWMAR7.js.map +0 -1
- package/dist/chunk-CKM2ESZF.js.map +0 -1
- package/dist/chunk-F2CAC2R2.cjs.map +0 -1
- package/dist/chunk-F37IQKBQ.cjs +0 -4
- package/dist/chunk-F4SQXAXR.js.map +0 -1
- package/dist/chunk-I7OAONIW.cjs.map +0 -1
- package/dist/chunk-JQKPRJCJ.cjs.map +0 -1
- package/dist/chunk-LOYT3WUA.js.map +0 -1
- package/dist/chunk-MVEPSGWQ.cjs.map +0 -1
- package/dist/chunk-PQ3VP6NG.js.map +0 -1
- package/dist/chunk-ZOU4K5MI.cjs.map +0 -1
- package/dist/chunk-ZPQQN52E.js +0 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkVZYIKGJ6_cjs = require('./chunk-VZYIKGJ6.cjs');
|
|
4
4
|
var chunkNFXTYMWZ_cjs = require('./chunk-NFXTYMWZ.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var chunkZ637KSJF_cjs = require('./chunk-Z637KSJF.cjs');
|
|
6
|
+
var chunkMNDKBEEQ_cjs = require('./chunk-MNDKBEEQ.cjs');
|
|
7
|
+
var chunkAAJF7WLJ_cjs = require('./chunk-AAJF7WLJ.cjs');
|
|
8
8
|
var chunkTSNDVBUU_cjs = require('./chunk-TSNDVBUU.cjs');
|
|
9
9
|
var chunkLVGGMWSE_cjs = require('./chunk-LVGGMWSE.cjs');
|
|
10
10
|
var chunkGPWMM745_cjs = require('./chunk-GPWMM745.cjs');
|
|
11
11
|
var chunkS6MAHT7F_cjs = require('./chunk-S6MAHT7F.cjs');
|
|
12
12
|
var chunkABRPHTOG_cjs = require('./chunk-ABRPHTOG.cjs');
|
|
13
|
-
var
|
|
13
|
+
var chunkUFCYMOYH_cjs = require('./chunk-UFCYMOYH.cjs');
|
|
14
14
|
var chunkC73WLCY3_cjs = require('./chunk-C73WLCY3.cjs');
|
|
15
15
|
var chunkKXCUCBEI_cjs = require('./chunk-KXCUCBEI.cjs');
|
|
16
16
|
var chunkV5WKCX3G_cjs = require('./chunk-V5WKCX3G.cjs');
|
|
@@ -1173,7 +1173,7 @@ function convertMastraChunkToAISDKv5({
|
|
|
1173
1173
|
if (mode === "generate") {
|
|
1174
1174
|
return {
|
|
1175
1175
|
type: "file",
|
|
1176
|
-
file: new
|
|
1176
|
+
file: new chunkAAJF7WLJ_cjs.DefaultGeneratedFile({
|
|
1177
1177
|
data: chunk.payload.data,
|
|
1178
1178
|
mediaType: chunk.payload.mimeType
|
|
1179
1179
|
})
|
|
@@ -1181,7 +1181,7 @@ function convertMastraChunkToAISDKv5({
|
|
|
1181
1181
|
}
|
|
1182
1182
|
return {
|
|
1183
1183
|
type: "file",
|
|
1184
|
-
file: new
|
|
1184
|
+
file: new chunkAAJF7WLJ_cjs.DefaultGeneratedFileWithType({
|
|
1185
1185
|
data: chunk.payload.data,
|
|
1186
1186
|
mediaType: chunk.payload.mimeType
|
|
1187
1187
|
})
|
|
@@ -2049,6 +2049,7 @@ var MastraModelOutput = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
2049
2049
|
reasoningDetails: new DelayedPromise()
|
|
2050
2050
|
};
|
|
2051
2051
|
#streamConsumed = false;
|
|
2052
|
+
#returnScorerData = false;
|
|
2052
2053
|
/**
|
|
2053
2054
|
* Unique identifier for this execution run.
|
|
2054
2055
|
*/
|
|
@@ -2073,6 +2074,7 @@ var MastraModelOutput = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
2073
2074
|
name: "MastraModelOutput"
|
|
2074
2075
|
});
|
|
2075
2076
|
this.#options = options;
|
|
2077
|
+
this.#returnScorerData = !!options.returnScorerData;
|
|
2076
2078
|
this.runId = options.runId;
|
|
2077
2079
|
if (options.outputProcessors?.length) {
|
|
2078
2080
|
this.processorRunner = new ProcessorRunner({
|
|
@@ -2225,7 +2227,7 @@ var MastraModelOutput = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
2225
2227
|
try {
|
|
2226
2228
|
if (self.processorRunner) {
|
|
2227
2229
|
await self.processorRunner.runOutputProcessors(self.messageList);
|
|
2228
|
-
const outputText = self.messageList.get.response.aiV4.core().map(m =>
|
|
2230
|
+
const outputText = self.messageList.get.response.aiV4.core().map(m => chunkAAJF7WLJ_cjs.MessageList.coreContentToString(m.content)).join("\n");
|
|
2229
2231
|
const messages = self.messageList.get.response.v2();
|
|
2230
2232
|
const messagesWithStructuredData = messages.filter(msg => msg.content.metadata && msg.content.metadata.structuredOutput);
|
|
2231
2233
|
if (messagesWithStructuredData[0] && messagesWithStructuredData[0].content.metadata?.structuredOutput) {
|
|
@@ -2552,6 +2554,18 @@ var MastraModelOutput = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
2552
2554
|
throw error;
|
|
2553
2555
|
}
|
|
2554
2556
|
});
|
|
2557
|
+
let scoringData;
|
|
2558
|
+
if (this.#returnScorerData) {
|
|
2559
|
+
scoringData = {
|
|
2560
|
+
input: {
|
|
2561
|
+
inputMessages: this.messageList.getPersisted.input.ui(),
|
|
2562
|
+
rememberedMessages: this.messageList.getPersisted.remembered.ui(),
|
|
2563
|
+
systemMessages: this.messageList.getSystemMessages(),
|
|
2564
|
+
taggedSystemMessages: this.messageList.getPersisted.taggedSystemMessages
|
|
2565
|
+
},
|
|
2566
|
+
output: this.messageList.getPersisted.response.ui()
|
|
2567
|
+
};
|
|
2568
|
+
}
|
|
2555
2569
|
const fullOutput = {
|
|
2556
2570
|
text: await this.text,
|
|
2557
2571
|
usage: await this.usage,
|
|
@@ -2571,7 +2585,10 @@ var MastraModelOutput = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
2571
2585
|
object: await this.object,
|
|
2572
2586
|
error: this.error,
|
|
2573
2587
|
tripwire: this.#tripwire,
|
|
2574
|
-
tripwireReason: this.#tripwireReason
|
|
2588
|
+
tripwireReason: this.#tripwireReason,
|
|
2589
|
+
...(scoringData ? {
|
|
2590
|
+
scoringData
|
|
2591
|
+
} : {})
|
|
2575
2592
|
};
|
|
2576
2593
|
fullOutput.response.messages = this.messageList.get.response.aiV5.model();
|
|
2577
2594
|
return fullOutput;
|
|
@@ -3095,7 +3112,16 @@ async function processOutputStream({
|
|
|
3095
3112
|
reasoningDeltas: []
|
|
3096
3113
|
});
|
|
3097
3114
|
}
|
|
3098
|
-
if (chunk.type !== "text-delta" && chunk.type !== "tool-call" &&
|
|
3115
|
+
if (chunk.type !== "text-delta" && chunk.type !== "tool-call" &&
|
|
3116
|
+
// not 100% sure about this being the right fix.
|
|
3117
|
+
// basically for some llm providers they add response-metadata after each text-delta
|
|
3118
|
+
// we then flush the chunks by calling messageList.add (a few lines down)
|
|
3119
|
+
// this results in a bunch of weird separated text chunks on the message instead of combined chunks
|
|
3120
|
+
// easiest solution here is to just not flush for response-metadata
|
|
3121
|
+
// BUT does this cause other issues?
|
|
3122
|
+
// Alternative solution: in message list allow combining text deltas together when the message source is "response" and the text parts are directly next to each other
|
|
3123
|
+
// simple solution for now is to not flush text deltas on response-metadata
|
|
3124
|
+
chunk.type !== "response-metadata" && runState.state.isStreaming) {
|
|
3099
3125
|
if (runState.state.textDeltas.length) {
|
|
3100
3126
|
const textStartPayload = chunk.payload;
|
|
3101
3127
|
const providerMetadata = textStartPayload.providerMetadata ?? runState.state.providerOptions;
|
|
@@ -3776,16 +3802,6 @@ function workflowLoopStream({
|
|
|
3776
3802
|
start: async controller => {
|
|
3777
3803
|
const writer = new WritableStream({
|
|
3778
3804
|
write: chunk => {
|
|
3779
|
-
if (llmAISpan && chunk.type === "text-delta") {
|
|
3780
|
-
llmAISpan.createEventSpan({
|
|
3781
|
-
type: "llm_chunk" /* LLM_CHUNK */,
|
|
3782
|
-
name: `llm chunk: ${chunk.type}`,
|
|
3783
|
-
output: chunk.payload.text,
|
|
3784
|
-
attributes: {
|
|
3785
|
-
chunkType: chunk.type
|
|
3786
|
-
}
|
|
3787
|
-
});
|
|
3788
|
-
}
|
|
3789
3805
|
controller.enqueue(chunk);
|
|
3790
3806
|
}
|
|
3791
3807
|
});
|
|
@@ -3931,6 +3947,7 @@ function loop({
|
|
|
3931
3947
|
_internal,
|
|
3932
3948
|
mode = "stream",
|
|
3933
3949
|
outputProcessors,
|
|
3950
|
+
returnScorerData,
|
|
3934
3951
|
llmAISpan,
|
|
3935
3952
|
...rest
|
|
3936
3953
|
}) {
|
|
@@ -4010,7 +4027,8 @@ function loop({
|
|
|
4010
4027
|
onStepFinish: rest.options?.onStepFinish,
|
|
4011
4028
|
includeRawChunks: !!includeRawChunks,
|
|
4012
4029
|
output: rest.output,
|
|
4013
|
-
outputProcessors
|
|
4030
|
+
outputProcessors,
|
|
4031
|
+
returnScorerData
|
|
4014
4032
|
}
|
|
4015
4033
|
});
|
|
4016
4034
|
}
|
|
@@ -4102,6 +4120,7 @@ var MastraLLMVNext = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
4102
4120
|
output,
|
|
4103
4121
|
options,
|
|
4104
4122
|
outputProcessors,
|
|
4123
|
+
returnScorerData,
|
|
4105
4124
|
providerOptions,
|
|
4106
4125
|
tracingContext
|
|
4107
4126
|
// ...rest
|
|
@@ -4138,7 +4157,7 @@ var MastraLLMVNext = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
4138
4157
|
}
|
|
4139
4158
|
});
|
|
4140
4159
|
try {
|
|
4141
|
-
const messageList = new
|
|
4160
|
+
const messageList = new chunkAAJF7WLJ_cjs.MessageList({
|
|
4142
4161
|
threadId,
|
|
4143
4162
|
resourceId
|
|
4144
4163
|
});
|
|
@@ -4157,6 +4176,7 @@ var MastraLLMVNext = class extends chunkKXCUCBEI_cjs.MastraBase {
|
|
|
4157
4176
|
},
|
|
4158
4177
|
output,
|
|
4159
4178
|
outputProcessors,
|
|
4179
|
+
returnScorerData,
|
|
4160
4180
|
llmAISpan,
|
|
4161
4181
|
options: {
|
|
4162
4182
|
...options,
|
|
@@ -8882,7 +8902,7 @@ function resolveThreadIdFromArgs(args) {
|
|
|
8882
8902
|
return void 0;
|
|
8883
8903
|
}
|
|
8884
8904
|
var _Agent_decorators, _init, _a;
|
|
8885
|
-
_Agent_decorators = [
|
|
8905
|
+
_Agent_decorators = [chunkZ637KSJF_cjs.InstrumentClass({
|
|
8886
8906
|
prefix: "agent",
|
|
8887
8907
|
excludeMethods: ["hasOwnMemory", "getMemory", "__primitive", "__registerMastra", "__registerPrimitives", "__runInputProcessors", "__runOutputProcessors", "_wrapToolsWithAITracing", "getProcessorRunner", "__setTools", "__setLogger", "__setTelemetry", "log", "getModel", "getInstructions", "getTools", "getLLM", "getWorkflows", "getDefaultGenerateOptions", "getDefaultStreamOptions", "getDescription", "getScorers", "getVoice"]
|
|
8888
8908
|
})];
|
|
@@ -8960,7 +8980,7 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
8960
8980
|
this.#voice?.addInstructions(config.instructions);
|
|
8961
8981
|
}
|
|
8962
8982
|
} else {
|
|
8963
|
-
this.#voice = new
|
|
8983
|
+
this.#voice = new chunkVZYIKGJ6_cjs.DefaultVoice();
|
|
8964
8984
|
}
|
|
8965
8985
|
if (config.inputProcessors) {
|
|
8966
8986
|
this.#inputProcessors = config.inputProcessors;
|
|
@@ -9110,7 +9130,7 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
9110
9130
|
}));
|
|
9111
9131
|
return voice;
|
|
9112
9132
|
} else {
|
|
9113
|
-
return new
|
|
9133
|
+
return new chunkVZYIKGJ6_cjs.DefaultVoice();
|
|
9114
9134
|
}
|
|
9115
9135
|
}
|
|
9116
9136
|
get instructions() {
|
|
@@ -9333,7 +9353,7 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
9333
9353
|
mastra: this.#mastra
|
|
9334
9354
|
});
|
|
9335
9355
|
} else {
|
|
9336
|
-
llm = new
|
|
9356
|
+
llm = new chunkMNDKBEEQ_cjs.MastraLLMV1({
|
|
9337
9357
|
model: resolvedModel,
|
|
9338
9358
|
mastra: this.#mastra
|
|
9339
9359
|
});
|
|
@@ -9449,7 +9469,7 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
9449
9469
|
runtimeContext,
|
|
9450
9470
|
model
|
|
9451
9471
|
});
|
|
9452
|
-
const normMessage = new
|
|
9472
|
+
const normMessage = new chunkAAJF7WLJ_cjs.MessageList().add(message, "user").get.all.ui().at(-1);
|
|
9453
9473
|
if (!normMessage) {
|
|
9454
9474
|
throw new Error(`Could not generate title from input ${JSON.stringify(message)}`);
|
|
9455
9475
|
}
|
|
@@ -9508,7 +9528,7 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
9508
9528
|
async genTitle(userMessage, runtimeContext, tracingContext, model, instructions) {
|
|
9509
9529
|
try {
|
|
9510
9530
|
if (userMessage) {
|
|
9511
|
-
const normMessage = new
|
|
9531
|
+
const normMessage = new chunkAAJF7WLJ_cjs.MessageList().add(userMessage, "user").get.all.ui().at(-1);
|
|
9512
9532
|
if (normMessage) {
|
|
9513
9533
|
return await this.generateTitleFromUserMessage({
|
|
9514
9534
|
message: normMessage,
|
|
@@ -9534,7 +9554,7 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
9534
9554
|
runId,
|
|
9535
9555
|
userMessages,
|
|
9536
9556
|
systemMessage,
|
|
9537
|
-
messageList = new
|
|
9557
|
+
messageList = new chunkAAJF7WLJ_cjs.MessageList({
|
|
9538
9558
|
threadId,
|
|
9539
9559
|
resourceId
|
|
9540
9560
|
}),
|
|
@@ -9589,7 +9609,7 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
9589
9609
|
systemMessage: systemMessages,
|
|
9590
9610
|
memorySystemMessage: memorySystemMessage || void 0
|
|
9591
9611
|
});
|
|
9592
|
-
const returnList = new
|
|
9612
|
+
const returnList = new chunkAAJF7WLJ_cjs.MessageList().addSystem(systemMessages).add(processedMemoryMessages, "memory").add(newMessages, "user");
|
|
9593
9613
|
return {
|
|
9594
9614
|
threadId: thread.id,
|
|
9595
9615
|
messages: returnList.get.all.prompt()
|
|
@@ -9905,27 +9925,31 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
9905
9925
|
threadId,
|
|
9906
9926
|
resourceId,
|
|
9907
9927
|
runtimeContext,
|
|
9928
|
+
methodType,
|
|
9908
9929
|
tracingContext
|
|
9909
9930
|
}) {
|
|
9910
|
-
|
|
9931
|
+
const convertedWorkflowTools = {};
|
|
9911
9932
|
const workflows = await this.getWorkflows({
|
|
9912
9933
|
runtimeContext
|
|
9913
9934
|
});
|
|
9914
9935
|
if (Object.keys(workflows).length > 0) {
|
|
9915
|
-
|
|
9916
|
-
|
|
9936
|
+
for (const [workflowName, workflow] of Object.entries(workflows)) {
|
|
9937
|
+
const toolObj = chunkABRPHTOG_cjs.createTool({
|
|
9938
|
+
id: workflowName,
|
|
9917
9939
|
description: workflow.description || `Workflow: ${workflowName}`,
|
|
9918
|
-
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
},
|
|
9940
|
+
inputSchema: workflow.inputSchema,
|
|
9941
|
+
outputSchema: workflow.outputSchema,
|
|
9942
|
+
mastra: this.#mastra,
|
|
9922
9943
|
// manually wrap workflow tools with ai tracing, so that we can pass the
|
|
9923
9944
|
// current tool span onto the workflow to maintain continuity of the trace
|
|
9924
|
-
execute: async
|
|
9945
|
+
execute: async ({
|
|
9946
|
+
context,
|
|
9947
|
+
writer
|
|
9948
|
+
}) => {
|
|
9925
9949
|
const toolAISpan = tracingContext.currentSpan?.createChildSpan({
|
|
9926
9950
|
type: "tool_call" /* TOOL_CALL */,
|
|
9927
9951
|
name: `tool: '${workflowName}'`,
|
|
9928
|
-
input:
|
|
9952
|
+
input: context,
|
|
9929
9953
|
attributes: {
|
|
9930
9954
|
toolId: workflowName,
|
|
9931
9955
|
toolType: "workflow"
|
|
@@ -9935,19 +9959,45 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
9935
9959
|
this.logger.debug(`[Agent:${this.name}] - Executing workflow as tool ${workflowName}`, {
|
|
9936
9960
|
name: workflowName,
|
|
9937
9961
|
description: workflow.description,
|
|
9938
|
-
args,
|
|
9962
|
+
args: context,
|
|
9939
9963
|
runId,
|
|
9940
9964
|
threadId,
|
|
9941
9965
|
resourceId
|
|
9942
9966
|
});
|
|
9943
9967
|
const run = workflow.createRun();
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9968
|
+
let result;
|
|
9969
|
+
if (methodType === "generate") {
|
|
9970
|
+
result = await run.start({
|
|
9971
|
+
inputData: context,
|
|
9972
|
+
runtimeContext,
|
|
9973
|
+
tracingContext: {
|
|
9974
|
+
currentSpan: toolAISpan
|
|
9975
|
+
}
|
|
9976
|
+
});
|
|
9977
|
+
} else if (methodType === "stream") {
|
|
9978
|
+
const streamResult = await run.stream({
|
|
9979
|
+
inputData: context,
|
|
9980
|
+
runtimeContext
|
|
9981
|
+
// TODO: is this forgottn?
|
|
9982
|
+
//currentSpan: toolAISpan,
|
|
9983
|
+
});
|
|
9984
|
+
if (writer) {
|
|
9985
|
+
await streamResult.stream.pipeTo(writer);
|
|
9986
|
+
} else {
|
|
9987
|
+
for await (const _chunk of streamResult.stream) {}
|
|
9949
9988
|
}
|
|
9950
|
-
|
|
9989
|
+
result = await streamResult.getWorkflowState();
|
|
9990
|
+
} else if (methodType === "streamVNext") {
|
|
9991
|
+
const streamResult = run.streamVNext({
|
|
9992
|
+
inputData: context,
|
|
9993
|
+
runtimeContext
|
|
9994
|
+
//format,
|
|
9995
|
+
});
|
|
9996
|
+
if (writer) {
|
|
9997
|
+
await streamResult.pipeTo(writer);
|
|
9998
|
+
}
|
|
9999
|
+
result = await streamResult.result;
|
|
10000
|
+
}
|
|
9951
10001
|
toolAISpan?.end({
|
|
9952
10002
|
output: result
|
|
9953
10003
|
});
|
|
@@ -9973,9 +10023,26 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
9973
10023
|
throw mastraError;
|
|
9974
10024
|
}
|
|
9975
10025
|
}
|
|
10026
|
+
});
|
|
10027
|
+
const options = {
|
|
10028
|
+
name: workflowName,
|
|
10029
|
+
runId,
|
|
10030
|
+
threadId,
|
|
10031
|
+
resourceId,
|
|
10032
|
+
logger: this.logger,
|
|
10033
|
+
mastra: this.#mastra,
|
|
10034
|
+
memory: await this.getMemory({
|
|
10035
|
+
runtimeContext
|
|
10036
|
+
}),
|
|
10037
|
+
agentName: this.name,
|
|
10038
|
+
runtimeContext,
|
|
10039
|
+
model: typeof this.model === "function" ? await this.getModel({
|
|
10040
|
+
runtimeContext
|
|
10041
|
+
}) : this.model,
|
|
10042
|
+
tracingContext
|
|
9976
10043
|
};
|
|
9977
|
-
|
|
9978
|
-
}
|
|
10044
|
+
convertedWorkflowTools[workflowName] = chunkLVGGMWSE_cjs.makeCoreTool(toolObj, options);
|
|
10045
|
+
}
|
|
9979
10046
|
}
|
|
9980
10047
|
return convertedWorkflowTools;
|
|
9981
10048
|
}
|
|
@@ -9987,7 +10054,9 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
9987
10054
|
runId,
|
|
9988
10055
|
runtimeContext,
|
|
9989
10056
|
tracingContext,
|
|
9990
|
-
writableStream
|
|
10057
|
+
writableStream,
|
|
10058
|
+
methodType,
|
|
10059
|
+
format
|
|
9991
10060
|
}) {
|
|
9992
10061
|
let mastraProxy = void 0;
|
|
9993
10062
|
const logger = this.logger;
|
|
@@ -10037,6 +10106,8 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
10037
10106
|
resourceId,
|
|
10038
10107
|
threadId,
|
|
10039
10108
|
runtimeContext,
|
|
10109
|
+
methodType,
|
|
10110
|
+
format,
|
|
10040
10111
|
tracingContext
|
|
10041
10112
|
});
|
|
10042
10113
|
return this.formatTools({
|
|
@@ -10122,6 +10193,7 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
10122
10193
|
runtimeContext,
|
|
10123
10194
|
saveQueueManager,
|
|
10124
10195
|
writableStream,
|
|
10196
|
+
methodType,
|
|
10125
10197
|
tracingContext
|
|
10126
10198
|
}) {
|
|
10127
10199
|
return {
|
|
@@ -10131,7 +10203,7 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
10131
10203
|
runId
|
|
10132
10204
|
});
|
|
10133
10205
|
}
|
|
10134
|
-
const agentAISpan =
|
|
10206
|
+
const agentAISpan = chunkUFCYMOYH_cjs.getOrCreateSpan({
|
|
10135
10207
|
type: "agent_run" /* AGENT_RUN */,
|
|
10136
10208
|
name: `agent run: '${this.id}'`,
|
|
10137
10209
|
input: messages,
|
|
@@ -10175,9 +10247,10 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
10175
10247
|
runId,
|
|
10176
10248
|
runtimeContext,
|
|
10177
10249
|
tracingContext: innerTracingContext,
|
|
10178
|
-
writableStream
|
|
10250
|
+
writableStream,
|
|
10251
|
+
methodType
|
|
10179
10252
|
});
|
|
10180
|
-
const messageList = new
|
|
10253
|
+
const messageList = new chunkAAJF7WLJ_cjs.MessageList({
|
|
10181
10254
|
threadId,
|
|
10182
10255
|
resourceId,
|
|
10183
10256
|
generateMessageId: this.#mastra?.generateId?.bind(this.#mastra),
|
|
@@ -10265,7 +10338,7 @@ exports.Agent = class Agent extends (_a = chunkKXCUCBEI_cjs.MastraBase) {
|
|
|
10265
10338
|
let [memoryMessages, memorySystemMessage] = await Promise.all([existingThread ? this.getMemoryMessages({
|
|
10266
10339
|
resourceId,
|
|
10267
10340
|
threadId: threadObject.id,
|
|
10268
|
-
vectorMessageSearch: new
|
|
10341
|
+
vectorMessageSearch: new chunkAAJF7WLJ_cjs.MessageList().add(messages, `user`).getLatestUserContent() || "",
|
|
10269
10342
|
memoryConfig,
|
|
10270
10343
|
runtimeContext
|
|
10271
10344
|
}) : [], memory.getSystemMessage({
|
|
@@ -10288,7 +10361,7 @@ The following messages were remembered from a different conversation:
|
|
|
10288
10361
|
<remembered_from_other_conversation>
|
|
10289
10362
|
${(() => {
|
|
10290
10363
|
let result = ``;
|
|
10291
|
-
const messages2 = new
|
|
10364
|
+
const messages2 = new chunkAAJF7WLJ_cjs.MessageList().add(resultsFromOtherThreads, "memory").get.all.v1();
|
|
10292
10365
|
let lastYmd = null;
|
|
10293
10366
|
for (const msg of messages2) {
|
|
10294
10367
|
const date = msg.createdAt;
|
|
@@ -10341,7 +10414,7 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
10341
10414
|
systemMessage,
|
|
10342
10415
|
memorySystemMessage: memorySystemMessage || void 0
|
|
10343
10416
|
});
|
|
10344
|
-
const processedList = new
|
|
10417
|
+
const processedList = new chunkAAJF7WLJ_cjs.MessageList({
|
|
10345
10418
|
threadId: threadObject.id,
|
|
10346
10419
|
resourceId,
|
|
10347
10420
|
generateMessageId: this.#mastra?.generateId?.bind(this.#mastra),
|
|
@@ -10397,7 +10470,7 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
10397
10470
|
result: resToLog,
|
|
10398
10471
|
threadId
|
|
10399
10472
|
});
|
|
10400
|
-
const messageListResponses = new
|
|
10473
|
+
const messageListResponses = new chunkAAJF7WLJ_cjs.MessageList({
|
|
10401
10474
|
threadId,
|
|
10402
10475
|
resourceId,
|
|
10403
10476
|
generateMessageId: this.#mastra?.generateId?.bind(this.#mastra),
|
|
@@ -10653,7 +10726,7 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
10653
10726
|
}
|
|
10654
10727
|
return result;
|
|
10655
10728
|
}
|
|
10656
|
-
async prepareLLMOptions(messages, options) {
|
|
10729
|
+
async prepareLLMOptions(messages, options, methodType) {
|
|
10657
10730
|
const {
|
|
10658
10731
|
context,
|
|
10659
10732
|
memoryOptions: memoryConfigFromArgs,
|
|
@@ -10686,7 +10759,7 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
10686
10759
|
const llm = await this.getLLM({
|
|
10687
10760
|
runtimeContext
|
|
10688
10761
|
});
|
|
10689
|
-
const activeSpan =
|
|
10762
|
+
const activeSpan = chunkZ637KSJF_cjs.Telemetry.getActiveSpan();
|
|
10690
10763
|
const baggageEntries = {};
|
|
10691
10764
|
if (threadFromArgs?.id) {
|
|
10692
10765
|
if (activeSpan) {
|
|
@@ -10705,7 +10778,7 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
10705
10778
|
};
|
|
10706
10779
|
}
|
|
10707
10780
|
if (Object.keys(baggageEntries).length > 0) {
|
|
10708
|
-
|
|
10781
|
+
chunkZ637KSJF_cjs.Telemetry.setBaggage(baggageEntries);
|
|
10709
10782
|
}
|
|
10710
10783
|
const memory = await this.getMemory({
|
|
10711
10784
|
runtimeContext
|
|
@@ -10730,6 +10803,7 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
10730
10803
|
runtimeContext,
|
|
10731
10804
|
saveQueueManager,
|
|
10732
10805
|
writableStream,
|
|
10806
|
+
methodType,
|
|
10733
10807
|
tracingContext
|
|
10734
10808
|
});
|
|
10735
10809
|
let messageList;
|
|
@@ -10817,7 +10891,26 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
10817
10891
|
}
|
|
10818
10892
|
};
|
|
10819
10893
|
}
|
|
10820
|
-
|
|
10894
|
+
/**
|
|
10895
|
+
* Merges telemetry wrapper with default onFinish callback when needed
|
|
10896
|
+
*/
|
|
10897
|
+
#mergeOnFinishWithTelemetry(streamOptions, defaultStreamOptions) {
|
|
10898
|
+
let finalOnFinish = streamOptions?.onFinish || defaultStreamOptions.onFinish;
|
|
10899
|
+
if (streamOptions?.onFinish && streamOptions.onFinish.__hasOriginalOnFinish === false && defaultStreamOptions.onFinish) {
|
|
10900
|
+
const telemetryWrapper = streamOptions.onFinish;
|
|
10901
|
+
const defaultCallback = defaultStreamOptions.onFinish;
|
|
10902
|
+
finalOnFinish = async data => {
|
|
10903
|
+
await telemetryWrapper(data);
|
|
10904
|
+
await defaultCallback(data);
|
|
10905
|
+
};
|
|
10906
|
+
}
|
|
10907
|
+
return finalOnFinish;
|
|
10908
|
+
}
|
|
10909
|
+
async #execute({
|
|
10910
|
+
methodType,
|
|
10911
|
+
format = "mastra",
|
|
10912
|
+
...options
|
|
10913
|
+
}) {
|
|
10821
10914
|
const runtimeContext = options.runtimeContext || new chunkGPWMM745_cjs.RuntimeContext();
|
|
10822
10915
|
const threadFromArgs = resolveThreadIdFromArgs({
|
|
10823
10916
|
threadId: options.threadId,
|
|
@@ -10835,7 +10928,7 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
10835
10928
|
const instructions = options.instructions || (await this.getInstructions({
|
|
10836
10929
|
runtimeContext
|
|
10837
10930
|
}));
|
|
10838
|
-
const agentAISpan =
|
|
10931
|
+
const agentAISpan = chunkUFCYMOYH_cjs.getOrCreateSpan({
|
|
10839
10932
|
type: "agent_run" /* AGENT_RUN */,
|
|
10840
10933
|
name: `agent run: '${this.id}'`,
|
|
10841
10934
|
input: options.messages,
|
|
@@ -10851,7 +10944,7 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
10851
10944
|
tracingContext: options.tracingContext,
|
|
10852
10945
|
runtimeContext
|
|
10853
10946
|
});
|
|
10854
|
-
const activeSpan =
|
|
10947
|
+
const activeSpan = chunkZ637KSJF_cjs.Telemetry.getActiveSpan();
|
|
10855
10948
|
const baggageEntries = {};
|
|
10856
10949
|
if (threadFromArgs?.id) {
|
|
10857
10950
|
if (activeSpan) {
|
|
@@ -10870,7 +10963,7 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
10870
10963
|
};
|
|
10871
10964
|
}
|
|
10872
10965
|
if (Object.keys(baggageEntries).length > 0) {
|
|
10873
|
-
|
|
10966
|
+
chunkZ637KSJF_cjs.Telemetry.setBaggage(baggageEntries);
|
|
10874
10967
|
}
|
|
10875
10968
|
const memory = await this.getMemory({
|
|
10876
10969
|
runtimeContext
|
|
@@ -10912,6 +11005,8 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
10912
11005
|
runId,
|
|
10913
11006
|
runtimeContext,
|
|
10914
11007
|
writableStream: options.writableStream,
|
|
11008
|
+
methodType,
|
|
11009
|
+
format,
|
|
10915
11010
|
tracingContext: {
|
|
10916
11011
|
currentSpan: agentAISpan
|
|
10917
11012
|
}
|
|
@@ -10936,7 +11031,7 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
10936
11031
|
tracingContext
|
|
10937
11032
|
}) => {
|
|
10938
11033
|
const thread = threadFromArgs;
|
|
10939
|
-
const messageList = new
|
|
11034
|
+
const messageList = new chunkAAJF7WLJ_cjs.MessageList({
|
|
10940
11035
|
threadId: thread?.id,
|
|
10941
11036
|
resourceId,
|
|
10942
11037
|
generateMessageId: this.#mastra?.generateId?.bind(this.#mastra),
|
|
@@ -11019,7 +11114,7 @@ Message ${msg.threadId && msg.threadId !== threadObject.id ? "from previous conv
|
|
|
11019
11114
|
let [memoryMessages, memorySystemMessage] = await Promise.all([existingThread ? this.getMemoryMessages({
|
|
11020
11115
|
resourceId,
|
|
11021
11116
|
threadId: threadObject.id,
|
|
11022
|
-
vectorMessageSearch: new
|
|
11117
|
+
vectorMessageSearch: new chunkAAJF7WLJ_cjs.MessageList().add(options.messages, `user`).getLatestUserContent() || "",
|
|
11023
11118
|
memoryConfig,
|
|
11024
11119
|
runtimeContext
|
|
11025
11120
|
}) : [], memory.getSystemMessage({
|
|
@@ -11042,7 +11137,7 @@ The following messages were remembered from a different conversation:
|
|
|
11042
11137
|
<remembered_from_other_conversation>
|
|
11043
11138
|
${(() => {
|
|
11044
11139
|
let result2 = ``;
|
|
11045
|
-
const messages = new
|
|
11140
|
+
const messages = new chunkAAJF7WLJ_cjs.MessageList().add(resultsFromOtherThreads, "memory").get.all.v1();
|
|
11046
11141
|
let lastYmd = null;
|
|
11047
11142
|
for (const msg of messages) {
|
|
11048
11143
|
const date = msg.createdAt;
|
|
@@ -11094,7 +11189,7 @@ the following messages are from ${ymd}
|
|
|
11094
11189
|
systemMessage,
|
|
11095
11190
|
memorySystemMessage: memorySystemMessage || void 0
|
|
11096
11191
|
});
|
|
11097
|
-
const processedList = new
|
|
11192
|
+
const processedList = new chunkAAJF7WLJ_cjs.MessageList({
|
|
11098
11193
|
threadId: threadObject.id,
|
|
11099
11194
|
resourceId,
|
|
11100
11195
|
generateMessageId: this.#mastra?.generateId?.bind(this.#mastra),
|
|
@@ -11131,9 +11226,10 @@ the following messages are from ${ymd}
|
|
|
11131
11226
|
const streamResult = llm.stream({
|
|
11132
11227
|
...inputData,
|
|
11133
11228
|
outputProcessors,
|
|
11229
|
+
returnScorerData: options.returnScorerData,
|
|
11134
11230
|
tracingContext
|
|
11135
11231
|
});
|
|
11136
|
-
if (
|
|
11232
|
+
if (format === "aisdk") {
|
|
11137
11233
|
return streamResult.aisdk.v5;
|
|
11138
11234
|
}
|
|
11139
11235
|
return streamResult;
|
|
@@ -11196,6 +11292,14 @@ the following messages are from ${ymd}
|
|
|
11196
11292
|
textStream: async function* () {}(),
|
|
11197
11293
|
fullStream: new globalThis.ReadableStream({
|
|
11198
11294
|
start(controller) {
|
|
11295
|
+
controller.enqueue({
|
|
11296
|
+
type: "tripwire",
|
|
11297
|
+
runId: result2.runId,
|
|
11298
|
+
from: "AGENT" /* AGENT */,
|
|
11299
|
+
payload: {
|
|
11300
|
+
tripwireReason: result2.tripwireReason
|
|
11301
|
+
}
|
|
11302
|
+
});
|
|
11199
11303
|
controller.close();
|
|
11200
11304
|
}
|
|
11201
11305
|
}),
|
|
@@ -11489,7 +11593,8 @@ the following messages are from ${ymd}
|
|
|
11489
11593
|
});
|
|
11490
11594
|
const mergedStreamOptions = {
|
|
11491
11595
|
...defaultStreamOptions,
|
|
11492
|
-
...streamOptions
|
|
11596
|
+
...streamOptions,
|
|
11597
|
+
onFinish: this.#mergeOnFinishWithTelemetry(streamOptions, defaultStreamOptions)
|
|
11493
11598
|
};
|
|
11494
11599
|
const llm = await this.getLLM({
|
|
11495
11600
|
runtimeContext: mergedStreamOptions.runtimeContext
|
|
@@ -11504,7 +11609,8 @@ the following messages are from ${ymd}
|
|
|
11504
11609
|
}
|
|
11505
11610
|
const result = await this.#execute({
|
|
11506
11611
|
...mergedStreamOptions,
|
|
11507
|
-
messages
|
|
11612
|
+
messages,
|
|
11613
|
+
methodType: "streamVNext"
|
|
11508
11614
|
});
|
|
11509
11615
|
if (result.status !== "success") {
|
|
11510
11616
|
if (result.status === "failed") {
|
|
@@ -11543,7 +11649,7 @@ the following messages are from ${ymd}
|
|
|
11543
11649
|
llm,
|
|
11544
11650
|
before,
|
|
11545
11651
|
after
|
|
11546
|
-
} = await this.prepareLLMOptions(messages, mergedGenerateOptions);
|
|
11652
|
+
} = await this.prepareLLMOptions(messages, mergedGenerateOptions, "generate");
|
|
11547
11653
|
if (llm.getModel().specificationVersion !== "v1") {
|
|
11548
11654
|
this.logger.error("V2 models are not supported for the current version of generate. Please use generateVNext instead.", {
|
|
11549
11655
|
modelId: llm.getModel().modelId
|
|
@@ -11617,7 +11723,7 @@ the following messages are from ${ymd}
|
|
|
11617
11723
|
runtimeContext: mergedGenerateOptions.runtimeContext || new chunkGPWMM745_cjs.RuntimeContext(),
|
|
11618
11724
|
tracingContext,
|
|
11619
11725
|
outputProcessorOverrides: finalOutputProcessors,
|
|
11620
|
-
messageList: new
|
|
11726
|
+
messageList: new chunkAAJF7WLJ_cjs.MessageList({
|
|
11621
11727
|
threadId: llmOptions.threadId || "",
|
|
11622
11728
|
resourceId: llmOptions.resourceId || ""
|
|
11623
11729
|
}).add({
|
|
@@ -11710,7 +11816,7 @@ the following messages are from ${ymd}
|
|
|
11710
11816
|
const outputProcessorResult = await this.__runOutputProcessors({
|
|
11711
11817
|
runtimeContext: mergedGenerateOptions.runtimeContext || new chunkGPWMM745_cjs.RuntimeContext(),
|
|
11712
11818
|
tracingContext,
|
|
11713
|
-
messageList: new
|
|
11819
|
+
messageList: new chunkAAJF7WLJ_cjs.MessageList({
|
|
11714
11820
|
threadId: llmOptions.threadId || "",
|
|
11715
11821
|
resourceId: llmOptions.resourceId || ""
|
|
11716
11822
|
}).add({
|
|
@@ -11787,13 +11893,14 @@ the following messages are from ${ymd}
|
|
|
11787
11893
|
});
|
|
11788
11894
|
const mergedStreamOptions = {
|
|
11789
11895
|
...defaultStreamOptions,
|
|
11790
|
-
...streamOptions
|
|
11896
|
+
...streamOptions,
|
|
11897
|
+
onFinish: this.#mergeOnFinishWithTelemetry(streamOptions, defaultStreamOptions)
|
|
11791
11898
|
};
|
|
11792
11899
|
const {
|
|
11793
11900
|
llm,
|
|
11794
11901
|
before,
|
|
11795
11902
|
after
|
|
11796
|
-
} = await this.prepareLLMOptions(messages, mergedStreamOptions);
|
|
11903
|
+
} = await this.prepareLLMOptions(messages, mergedStreamOptions, "stream");
|
|
11797
11904
|
if (llm.getModel().specificationVersion !== "v1") {
|
|
11798
11905
|
this.logger.error("V2 models are not supported for stream. Please use streamVNext instead.", {
|
|
11799
11906
|
modelId: llm.getModel().modelId
|
|
@@ -12185,21 +12292,20 @@ var MastraWorkflowStream = class extends web.ReadableStream {
|
|
|
12185
12292
|
}
|
|
12186
12293
|
});
|
|
12187
12294
|
controller.enqueue({
|
|
12188
|
-
type: "start",
|
|
12295
|
+
type: "workflow-start",
|
|
12189
12296
|
runId: run.runId,
|
|
12190
12297
|
from: "WORKFLOW" /* WORKFLOW */,
|
|
12191
12298
|
payload: {}
|
|
12192
12299
|
});
|
|
12193
12300
|
const stream = await createStream(writer);
|
|
12194
12301
|
for await (const chunk of stream) {
|
|
12195
|
-
if (chunk.type === "step-
|
|
12196
|
-
|
|
12197
|
-
updateUsageCount(finishPayload.usage);
|
|
12302
|
+
if (chunk.type === "step-finish") {
|
|
12303
|
+
updateUsageCount(chunk.payload.usage);
|
|
12198
12304
|
}
|
|
12199
12305
|
controller.enqueue(chunk);
|
|
12200
12306
|
}
|
|
12201
12307
|
controller.enqueue({
|
|
12202
|
-
type: "finish",
|
|
12308
|
+
type: "workflow-finish",
|
|
12203
12309
|
runId: run.runId,
|
|
12204
12310
|
from: "WORKFLOW" /* WORKFLOW */,
|
|
12205
12311
|
payload: {
|
|
@@ -12374,7 +12480,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
12374
12480
|
} = retryConfig ?? {};
|
|
12375
12481
|
const steps = graph.steps;
|
|
12376
12482
|
this.runCounts.clear();
|
|
12377
|
-
const workflowAISpan =
|
|
12483
|
+
const workflowAISpan = chunkUFCYMOYH_cjs.getOrCreateSpan({
|
|
12378
12484
|
type: "workflow_run" /* WORKFLOW_RUN */,
|
|
12379
12485
|
name: `workflow run: '${workflowId}'`,
|
|
12380
12486
|
input,
|
|
@@ -12615,7 +12721,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
12615
12721
|
engine: {},
|
|
12616
12722
|
abortSignal: abortController?.signal,
|
|
12617
12723
|
writer: new chunkS6MAHT7F_cjs.ToolStream({
|
|
12618
|
-
prefix: "step",
|
|
12724
|
+
prefix: "workflow-step",
|
|
12619
12725
|
callId: stepCallId,
|
|
12620
12726
|
name: "sleep",
|
|
12621
12727
|
runId
|
|
@@ -12694,7 +12800,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
12694
12800
|
engine: {},
|
|
12695
12801
|
abortSignal: abortController?.signal,
|
|
12696
12802
|
writer: new chunkS6MAHT7F_cjs.ToolStream({
|
|
12697
|
-
prefix: "step",
|
|
12803
|
+
prefix: "workflow-step",
|
|
12698
12804
|
callId: stepCallId,
|
|
12699
12805
|
name: "sleepUntil",
|
|
12700
12806
|
runId
|
|
@@ -12830,7 +12936,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
12830
12936
|
eventTimestamp: Date.now()
|
|
12831
12937
|
});
|
|
12832
12938
|
await emitter.emit("watch-v2", {
|
|
12833
|
-
type: "step-start",
|
|
12939
|
+
type: "workflow-step-start",
|
|
12834
12940
|
payload: {
|
|
12835
12941
|
id: step.id,
|
|
12836
12942
|
stepCallId,
|
|
@@ -12882,7 +12988,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
12882
12988
|
const result = await runStep({
|
|
12883
12989
|
runId,
|
|
12884
12990
|
workflowId,
|
|
12885
|
-
mastra: this.mastra ?
|
|
12991
|
+
mastra: this.mastra ? chunkUFCYMOYH_cjs.wrapMastra(this.mastra, innerTracingContext) : void 0,
|
|
12886
12992
|
runtimeContext,
|
|
12887
12993
|
inputData: prevOutput,
|
|
12888
12994
|
runCount: this.getOrGenerateRunCount(step.id),
|
|
@@ -12925,7 +13031,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
12925
13031
|
engine: {},
|
|
12926
13032
|
abortSignal: abortController?.signal,
|
|
12927
13033
|
writer: new chunkS6MAHT7F_cjs.ToolStream({
|
|
12928
|
-
prefix: "step",
|
|
13034
|
+
prefix: "workflow-step",
|
|
12929
13035
|
callId: stepCallId,
|
|
12930
13036
|
name: step.id,
|
|
12931
13037
|
runId
|
|
@@ -13016,7 +13122,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
13016
13122
|
});
|
|
13017
13123
|
if (execResults.status === "suspended") {
|
|
13018
13124
|
await emitter.emit("watch-v2", {
|
|
13019
|
-
type: "step-suspended",
|
|
13125
|
+
type: "workflow-step-suspended",
|
|
13020
13126
|
payload: {
|
|
13021
13127
|
id: step.id,
|
|
13022
13128
|
stepCallId,
|
|
@@ -13025,7 +13131,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
13025
13131
|
});
|
|
13026
13132
|
} else {
|
|
13027
13133
|
await emitter.emit("watch-v2", {
|
|
13028
|
-
type: "step-result",
|
|
13134
|
+
type: "workflow-step-result",
|
|
13029
13135
|
payload: {
|
|
13030
13136
|
id: step.id,
|
|
13031
13137
|
stepCallId,
|
|
@@ -13033,7 +13139,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
13033
13139
|
}
|
|
13034
13140
|
});
|
|
13035
13141
|
await emitter.emit("watch-v2", {
|
|
13036
|
-
type: "step-finish",
|
|
13142
|
+
type: "workflow-step-finish",
|
|
13037
13143
|
payload: {
|
|
13038
13144
|
id: step.id,
|
|
13039
13145
|
stepCallId,
|
|
@@ -13262,7 +13368,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
13262
13368
|
engine: {},
|
|
13263
13369
|
abortSignal: abortController?.signal,
|
|
13264
13370
|
writer: new chunkS6MAHT7F_cjs.ToolStream({
|
|
13265
|
-
prefix: "step",
|
|
13371
|
+
prefix: "workflow-step",
|
|
13266
13372
|
callId: crypto2.randomUUID(),
|
|
13267
13373
|
name: "conditional",
|
|
13268
13374
|
runId
|
|
@@ -13464,7 +13570,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
13464
13570
|
const evalSpan = loopSpan?.createChildSpan({
|
|
13465
13571
|
type: "workflow_conditional_eval" /* WORKFLOW_CONDITIONAL_EVAL */,
|
|
13466
13572
|
name: `condition: ${entry.loopType}`,
|
|
13467
|
-
input:
|
|
13573
|
+
input: chunkUFCYMOYH_cjs.selectFields(result.output, ["stepResult", "output.text", "output.object", "messages"]),
|
|
13468
13574
|
attributes: {
|
|
13469
13575
|
conditionIndex: iteration
|
|
13470
13576
|
}
|
|
@@ -13496,7 +13602,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
13496
13602
|
engine: {},
|
|
13497
13603
|
abortSignal: abortController?.signal,
|
|
13498
13604
|
writer: new chunkS6MAHT7F_cjs.ToolStream({
|
|
13499
|
-
prefix: "step",
|
|
13605
|
+
prefix: "workflow-step",
|
|
13500
13606
|
callId: crypto2.randomUUID(),
|
|
13501
13607
|
name: "loop",
|
|
13502
13608
|
runId
|
|
@@ -13586,7 +13692,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
13586
13692
|
eventTimestamp: Date.now()
|
|
13587
13693
|
});
|
|
13588
13694
|
await emitter.emit("watch-v2", {
|
|
13589
|
-
type: "step-start",
|
|
13695
|
+
type: "workflow-step-start",
|
|
13590
13696
|
payload: {
|
|
13591
13697
|
id: step.id,
|
|
13592
13698
|
...stepInfo,
|
|
@@ -13657,7 +13763,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
13657
13763
|
});
|
|
13658
13764
|
if (execResults.status === "suspended") {
|
|
13659
13765
|
await emitter.emit("watch-v2", {
|
|
13660
|
-
type: "step-suspended",
|
|
13766
|
+
type: "workflow-step-suspended",
|
|
13661
13767
|
payload: {
|
|
13662
13768
|
id: step.id,
|
|
13663
13769
|
...execResults
|
|
@@ -13665,14 +13771,14 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
13665
13771
|
});
|
|
13666
13772
|
} else {
|
|
13667
13773
|
await emitter.emit("watch-v2", {
|
|
13668
|
-
type: "step-result",
|
|
13774
|
+
type: "workflow-step-result",
|
|
13669
13775
|
payload: {
|
|
13670
13776
|
id: step.id,
|
|
13671
13777
|
...execResults
|
|
13672
13778
|
}
|
|
13673
13779
|
});
|
|
13674
13780
|
await emitter.emit("watch-v2", {
|
|
13675
|
-
type: "step-finish",
|
|
13781
|
+
type: "workflow-step-finish",
|
|
13676
13782
|
payload: {
|
|
13677
13783
|
id: step.id,
|
|
13678
13784
|
metadata: {}
|
|
@@ -13721,7 +13827,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
13721
13827
|
eventTimestamp: Date.now()
|
|
13722
13828
|
});
|
|
13723
13829
|
await emitter.emit("watch-v2", {
|
|
13724
|
-
type: "step-result",
|
|
13830
|
+
type: "workflow-step-result",
|
|
13725
13831
|
payload: {
|
|
13726
13832
|
id: step.id,
|
|
13727
13833
|
status: "success",
|
|
@@ -13730,7 +13836,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
13730
13836
|
}
|
|
13731
13837
|
});
|
|
13732
13838
|
await emitter.emit("watch-v2", {
|
|
13733
|
-
type: "step-finish",
|
|
13839
|
+
type: "workflow-step-finish",
|
|
13734
13840
|
payload: {
|
|
13735
13841
|
id: step.id,
|
|
13736
13842
|
metadata: {}
|
|
@@ -14003,7 +14109,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
14003
14109
|
eventTimestamp: Date.now()
|
|
14004
14110
|
});
|
|
14005
14111
|
await emitter.emit("watch-v2", {
|
|
14006
|
-
type: "step-waiting",
|
|
14112
|
+
type: "workflow-step-waiting",
|
|
14007
14113
|
payload: {
|
|
14008
14114
|
id: entry.id,
|
|
14009
14115
|
payload: prevOutput,
|
|
@@ -14083,7 +14189,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
14083
14189
|
eventTimestamp: Date.now()
|
|
14084
14190
|
});
|
|
14085
14191
|
await emitter.emit("watch-v2", {
|
|
14086
|
-
type: "step-result",
|
|
14192
|
+
type: "workflow-step-result",
|
|
14087
14193
|
payload: {
|
|
14088
14194
|
id: entry.id,
|
|
14089
14195
|
endedAt,
|
|
@@ -14092,7 +14198,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
14092
14198
|
}
|
|
14093
14199
|
});
|
|
14094
14200
|
await emitter.emit("watch-v2", {
|
|
14095
|
-
type: "step-finish",
|
|
14201
|
+
type: "workflow-step-finish",
|
|
14096
14202
|
payload: {
|
|
14097
14203
|
id: entry.id,
|
|
14098
14204
|
metadata: {}
|
|
@@ -14126,7 +14232,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
14126
14232
|
eventTimestamp: Date.now()
|
|
14127
14233
|
});
|
|
14128
14234
|
await emitter.emit("watch-v2", {
|
|
14129
|
-
type: "step-waiting",
|
|
14235
|
+
type: "workflow-step-waiting",
|
|
14130
14236
|
payload: {
|
|
14131
14237
|
id: entry.id,
|
|
14132
14238
|
payload: prevOutput,
|
|
@@ -14206,7 +14312,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
14206
14312
|
eventTimestamp: Date.now()
|
|
14207
14313
|
});
|
|
14208
14314
|
await emitter.emit("watch-v2", {
|
|
14209
|
-
type: "step-result",
|
|
14315
|
+
type: "workflow-step-result",
|
|
14210
14316
|
payload: {
|
|
14211
14317
|
id: entry.id,
|
|
14212
14318
|
endedAt,
|
|
@@ -14215,7 +14321,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
14215
14321
|
}
|
|
14216
14322
|
});
|
|
14217
14323
|
await emitter.emit("watch-v2", {
|
|
14218
|
-
type: "step-finish",
|
|
14324
|
+
type: "workflow-step-finish",
|
|
14219
14325
|
payload: {
|
|
14220
14326
|
id: entry.id,
|
|
14221
14327
|
metadata: {}
|
|
@@ -14250,7 +14356,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
14250
14356
|
eventTimestamp: Date.now()
|
|
14251
14357
|
});
|
|
14252
14358
|
await emitter.emit("watch-v2", {
|
|
14253
|
-
type: "step-waiting",
|
|
14359
|
+
type: "workflow-step-waiting",
|
|
14254
14360
|
payload: {
|
|
14255
14361
|
id: entry.step.id,
|
|
14256
14362
|
payload: prevOutput,
|
|
@@ -14374,8 +14480,8 @@ function createStep(params) {
|
|
|
14374
14480
|
args: inputData
|
|
14375
14481
|
};
|
|
14376
14482
|
await emitter.emit("watch-v2", {
|
|
14377
|
-
type: "
|
|
14378
|
-
|
|
14483
|
+
type: "workflow-agent-call-start",
|
|
14484
|
+
payload: toolData
|
|
14379
14485
|
});
|
|
14380
14486
|
const {
|
|
14381
14487
|
fullStream
|
|
@@ -14392,29 +14498,12 @@ function createStep(params) {
|
|
|
14392
14498
|
return abort();
|
|
14393
14499
|
}
|
|
14394
14500
|
for await (const chunk of fullStream) {
|
|
14395
|
-
|
|
14396
|
-
case "text-delta":
|
|
14397
|
-
await emitter.emit("watch-v2", {
|
|
14398
|
-
type: "tool-call-delta",
|
|
14399
|
-
...toolData,
|
|
14400
|
-
argsTextDelta: chunk.textDelta
|
|
14401
|
-
});
|
|
14402
|
-
break;
|
|
14403
|
-
case "step-start":
|
|
14404
|
-
case "step-finish":
|
|
14405
|
-
case "finish":
|
|
14406
|
-
break;
|
|
14407
|
-
case "tool-call":
|
|
14408
|
-
case "tool-result":
|
|
14409
|
-
case "tool-call-streaming-start":
|
|
14410
|
-
case "tool-call-delta":
|
|
14411
|
-
case "source":
|
|
14412
|
-
case "file":
|
|
14413
|
-
default:
|
|
14414
|
-
await emitter.emit("watch-v2", chunk);
|
|
14415
|
-
break;
|
|
14416
|
-
}
|
|
14501
|
+
await emitter.emit("watch-v2", chunk);
|
|
14417
14502
|
}
|
|
14503
|
+
await emitter.emit("watch-v2", {
|
|
14504
|
+
type: "workflow-agent-call-finish",
|
|
14505
|
+
payload: toolData
|
|
14506
|
+
});
|
|
14418
14507
|
return {
|
|
14419
14508
|
text: await streamPromise.promise
|
|
14420
14509
|
};
|
|
@@ -15363,15 +15452,43 @@ var Run = class {
|
|
|
15363
15452
|
readable,
|
|
15364
15453
|
writable
|
|
15365
15454
|
} = new web.TransformStream();
|
|
15455
|
+
let currentToolData = void 0;
|
|
15366
15456
|
const writer = writable.getWriter();
|
|
15367
15457
|
const unwatch = this.watch(async event => {
|
|
15458
|
+
if (event.type === "workflow-agent-call-start") {
|
|
15459
|
+
currentToolData = {
|
|
15460
|
+
name: event.payload.name,
|
|
15461
|
+
args: event.payload.args
|
|
15462
|
+
};
|
|
15463
|
+
await writer.write({
|
|
15464
|
+
...event.payload,
|
|
15465
|
+
type: "tool-call-streaming-start"
|
|
15466
|
+
});
|
|
15467
|
+
return;
|
|
15468
|
+
}
|
|
15368
15469
|
try {
|
|
15369
|
-
|
|
15470
|
+
if (event.type === "workflow-agent-call-finish") {
|
|
15471
|
+
return;
|
|
15472
|
+
} else if (!event.type.startsWith("workflow-")) {
|
|
15473
|
+
if (event.type === "text-delta") {
|
|
15474
|
+
await writer.write({
|
|
15475
|
+
type: "tool-call-delta",
|
|
15476
|
+
...(currentToolData ?? {}),
|
|
15477
|
+
argsTextDelta: event.textDelta
|
|
15478
|
+
});
|
|
15479
|
+
}
|
|
15480
|
+
return;
|
|
15481
|
+
}
|
|
15482
|
+
const e = {
|
|
15483
|
+
...event,
|
|
15484
|
+
type: event.type.replace("workflow-", "")
|
|
15485
|
+
};
|
|
15486
|
+
await writer.write(e);
|
|
15370
15487
|
} catch {}
|
|
15371
15488
|
}, "watch-v2");
|
|
15372
15489
|
this.closeStreamAction = async () => {
|
|
15373
15490
|
this.emitter.emit("watch-v2", {
|
|
15374
|
-
type: "finish",
|
|
15491
|
+
type: "workflow-finish",
|
|
15375
15492
|
payload: {
|
|
15376
15493
|
runId: this.runId
|
|
15377
15494
|
}
|
|
@@ -15386,7 +15503,7 @@ var Run = class {
|
|
|
15386
15503
|
}
|
|
15387
15504
|
};
|
|
15388
15505
|
this.emitter.emit("watch-v2", {
|
|
15389
|
-
type: "start",
|
|
15506
|
+
type: "workflow-start",
|
|
15390
15507
|
payload: {
|
|
15391
15508
|
runId: this.runId
|
|
15392
15509
|
}
|
|
@@ -15459,35 +15576,13 @@ var Run = class {
|
|
|
15459
15576
|
type,
|
|
15460
15577
|
payload
|
|
15461
15578
|
}) => {
|
|
15462
|
-
let newPayload = payload;
|
|
15463
|
-
if (type === "step-start") {
|
|
15464
|
-
const {
|
|
15465
|
-
payload: args,
|
|
15466
|
-
id,
|
|
15467
|
-
...rest
|
|
15468
|
-
} = newPayload;
|
|
15469
|
-
newPayload = {
|
|
15470
|
-
args,
|
|
15471
|
-
...rest
|
|
15472
|
-
};
|
|
15473
|
-
} else if (type === "step-result") {
|
|
15474
|
-
const {
|
|
15475
|
-
output,
|
|
15476
|
-
id,
|
|
15477
|
-
...rest
|
|
15478
|
-
} = newPayload;
|
|
15479
|
-
newPayload = {
|
|
15480
|
-
result: output,
|
|
15481
|
-
...rest
|
|
15482
|
-
};
|
|
15483
|
-
}
|
|
15484
15579
|
buffer.push({
|
|
15485
15580
|
type,
|
|
15486
15581
|
runId: this.runId,
|
|
15487
15582
|
from: "WORKFLOW" /* WORKFLOW */,
|
|
15488
15583
|
payload: {
|
|
15489
15584
|
stepName: payload.id,
|
|
15490
|
-
...
|
|
15585
|
+
...payload
|
|
15491
15586
|
}
|
|
15492
15587
|
});
|
|
15493
15588
|
await tryWrite();
|
|
@@ -15785,5 +15880,5 @@ exports.recursivelyCheckForFinalState = recursivelyCheckForFinalState;
|
|
|
15785
15880
|
exports.resolveVariables = resolveVariables;
|
|
15786
15881
|
exports.updateStepInHierarchy = updateStepInHierarchy;
|
|
15787
15882
|
exports.workflowToStep = workflowToStep;
|
|
15788
|
-
//# sourceMappingURL=chunk-
|
|
15789
|
-
//# sourceMappingURL=chunk-
|
|
15883
|
+
//# sourceMappingURL=chunk-GJD2BTI5.cjs.map
|
|
15884
|
+
//# sourceMappingURL=chunk-GJD2BTI5.cjs.map
|