@mastra/core 1.5.0-alpha.1 → 1.5.0
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 +364 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-I3AWF54W.js → chunk-4GB2GS4S.js} +3 -3
- package/dist/{chunk-I3AWF54W.js.map → chunk-4GB2GS4S.js.map} +1 -1
- package/dist/{chunk-RH2K66O2.cjs → chunk-7S6LA43E.cjs} +3 -3
- package/dist/{chunk-RH2K66O2.cjs.map → chunk-7S6LA43E.cjs.map} +1 -1
- package/dist/{chunk-IJIE3ZID.cjs → chunk-7WC7ALDW.cjs} +6 -6
- package/dist/{chunk-IJIE3ZID.cjs.map → chunk-7WC7ALDW.cjs.map} +1 -1
- package/dist/{chunk-E2FHTXAI.cjs → chunk-CQ4Z6ZAV.cjs} +5 -5
- package/dist/{chunk-E2FHTXAI.cjs.map → chunk-CQ4Z6ZAV.cjs.map} +1 -1
- package/dist/{chunk-GEDGDKQ6.js → chunk-D57U4II4.js} +7 -7
- package/dist/{chunk-GEDGDKQ6.js.map → chunk-D57U4II4.js.map} +1 -1
- package/dist/{chunk-5EOLBHHS.js → chunk-DST75PA4.js} +4 -4
- package/dist/{chunk-5EOLBHHS.js.map → chunk-DST75PA4.js.map} +1 -1
- package/dist/{chunk-BKQAP27M.cjs → chunk-G5JVVFIG.cjs} +5 -5
- package/dist/{chunk-BKQAP27M.cjs.map → chunk-G5JVVFIG.cjs.map} +1 -1
- package/dist/{chunk-A7V2NSY3.js → chunk-MZIMV2BB.js} +3 -3
- package/dist/{chunk-A7V2NSY3.js.map → chunk-MZIMV2BB.js.map} +1 -1
- package/dist/{chunk-JWG272ZZ.cjs → chunk-NUV3BLRH.cjs} +15 -15
- package/dist/{chunk-JWG272ZZ.cjs.map → chunk-NUV3BLRH.cjs.map} +1 -1
- package/dist/{chunk-FTBLAVTF.cjs → chunk-OQ5LZ6OV.cjs} +46 -46
- package/dist/{chunk-FTBLAVTF.cjs.map → chunk-OQ5LZ6OV.cjs.map} +1 -1
- package/dist/{chunk-PECKKR4C.js → chunk-R3364RAL.js} +3 -3
- package/dist/{chunk-PECKKR4C.js.map → chunk-R3364RAL.js.map} +1 -1
- package/dist/{chunk-IBNCZTNQ.js → chunk-YV2YGQRY.js} +3 -3
- package/dist/{chunk-IBNCZTNQ.js.map → chunk-YV2YGQRY.js.map} +1 -1
- package/dist/datasets/index.cjs +11 -11
- package/dist/datasets/index.js +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +103 -103
- package/dist/docs/references/docs-workflows-suspend-and-resume.md +1 -1
- package/dist/evals/index.cjs +5 -5
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +3 -3
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/harness/index.cjs +2 -2
- package/dist/harness/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/loop/index.cjs +12 -12
- package/dist/loop/index.js +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/processors/index.cjs +41 -41
- package/dist/processors/index.js +1 -1
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/stream/index.cjs +8 -8
- package/dist/stream/index.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +25 -25
- package/dist/workflows/index.js +1 -1
- package/package.json +8 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7S6LA43E_cjs = require('./chunk-7S6LA43E.cjs');
|
|
4
4
|
var chunkZCBG4ZQT_cjs = require('./chunk-ZCBG4ZQT.cjs');
|
|
5
5
|
var chunkJZ6TH4HQ_cjs = require('./chunk-JZ6TH4HQ.cjs');
|
|
6
6
|
var chunkYW54RH77_cjs = require('./chunk-YW54RH77.cjs');
|
|
@@ -58,7 +58,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
58
58
|
let suspended;
|
|
59
59
|
let bailed;
|
|
60
60
|
const startedAt = Date.now();
|
|
61
|
-
const { inputData, validationError } = await
|
|
61
|
+
const { inputData, validationError } = await chunk7S6LA43E_cjs.validateStepInput({
|
|
62
62
|
prevOutput: typeof params.foreachIdx === "number" ? params.input?.[params.foreachIdx] : params.input,
|
|
63
63
|
step,
|
|
64
64
|
validateInputs: params.validateInputs ?? true
|
|
@@ -88,7 +88,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
88
88
|
const callId = crypto.randomUUID();
|
|
89
89
|
const outputWriter = this.createOutputWriter(runId);
|
|
90
90
|
const stepOutput = await step.execute(
|
|
91
|
-
|
|
91
|
+
chunk7S6LA43E_cjs.createDeprecationProxy(
|
|
92
92
|
{
|
|
93
93
|
workflowId: params.workflowId,
|
|
94
94
|
runId,
|
|
@@ -103,9 +103,9 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
103
103
|
resumeData: params.resumeData,
|
|
104
104
|
suspendData: suspendDataToUse,
|
|
105
105
|
getInitData: () => stepResults?.input,
|
|
106
|
-
getStepResult:
|
|
106
|
+
getStepResult: chunk7S6LA43E_cjs.getStepResult.bind(this, stepResults),
|
|
107
107
|
suspend: async (suspendPayload, suspendOptions) => {
|
|
108
|
-
const { suspendData, validationError: validationError2 } = await
|
|
108
|
+
const { suspendData, validationError: validationError2 } = await chunk7S6LA43E_cjs.validateStepSuspendData({
|
|
109
109
|
suspendData: suspendPayload,
|
|
110
110
|
step,
|
|
111
111
|
validateInputs: params.validateInputs ?? true
|
|
@@ -160,7 +160,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
162
|
paramName: "runCount",
|
|
163
|
-
deprecationMessage:
|
|
163
|
+
deprecationMessage: chunk7S6LA43E_cjs.runCountDeprecationMessage,
|
|
164
164
|
logger: this.logger
|
|
165
165
|
}
|
|
166
166
|
)
|
|
@@ -231,7 +231,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
231
231
|
// Preserve TripWire data as plain object for proper serialization
|
|
232
232
|
// Important: Check `error` not `errorInstance` because getErrorFromUnknown
|
|
233
233
|
// converts the error and loses the prototype chain
|
|
234
|
-
tripwire: error instanceof
|
|
234
|
+
tripwire: error instanceof chunk7S6LA43E_cjs.TripWire ? {
|
|
235
235
|
reason: error.message,
|
|
236
236
|
retry: error.options?.retry,
|
|
237
237
|
metadata: error.options?.metadata,
|
|
@@ -289,7 +289,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
289
289
|
const callId = crypto.randomUUID();
|
|
290
290
|
const outputWriter = this.createOutputWriter(runId);
|
|
291
291
|
return condition(
|
|
292
|
-
|
|
292
|
+
chunk7S6LA43E_cjs.createDeprecationProxy(
|
|
293
293
|
{
|
|
294
294
|
workflowId,
|
|
295
295
|
runId,
|
|
@@ -300,7 +300,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
300
300
|
retryCount,
|
|
301
301
|
resumeData,
|
|
302
302
|
getInitData: () => stepResults?.input,
|
|
303
|
-
getStepResult:
|
|
303
|
+
getStepResult: chunk7S6LA43E_cjs.getStepResult.bind(this, stepResults),
|
|
304
304
|
bail: (_result) => {
|
|
305
305
|
throw new Error("Not implemented");
|
|
306
306
|
},
|
|
@@ -327,7 +327,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
327
327
|
},
|
|
328
328
|
{
|
|
329
329
|
paramName: "runCount",
|
|
330
|
-
deprecationMessage:
|
|
330
|
+
deprecationMessage: chunk7S6LA43E_cjs.runCountDeprecationMessage,
|
|
331
331
|
logger: this.logger
|
|
332
332
|
}
|
|
333
333
|
)
|
|
@@ -347,7 +347,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
347
347
|
const callId = crypto.randomUUID();
|
|
348
348
|
const outputWriter = this.createOutputWriter(runId);
|
|
349
349
|
return await step.fn(
|
|
350
|
-
|
|
350
|
+
chunk7S6LA43E_cjs.createDeprecationProxy(
|
|
351
351
|
{
|
|
352
352
|
workflowId: params.workflowId,
|
|
353
353
|
runId,
|
|
@@ -361,7 +361,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
361
361
|
retryCount,
|
|
362
362
|
resumeData: params.resumeData,
|
|
363
363
|
getInitData: () => stepResults?.input,
|
|
364
|
-
getStepResult:
|
|
364
|
+
getStepResult: chunk7S6LA43E_cjs.getStepResult.bind(this, stepResults),
|
|
365
365
|
suspend: async (_suspendPayload) => {
|
|
366
366
|
throw new Error("Not implemented");
|
|
367
367
|
},
|
|
@@ -390,7 +390,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
390
390
|
},
|
|
391
391
|
{
|
|
392
392
|
paramName: "runCount",
|
|
393
|
-
deprecationMessage:
|
|
393
|
+
deprecationMessage: chunk7S6LA43E_cjs.runCountDeprecationMessage,
|
|
394
394
|
logger: this.logger
|
|
395
395
|
}
|
|
396
396
|
)
|
|
@@ -414,7 +414,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
414
414
|
const callId = crypto.randomUUID();
|
|
415
415
|
const outputWriter = this.createOutputWriter(runId);
|
|
416
416
|
const result = await step.fn(
|
|
417
|
-
|
|
417
|
+
chunk7S6LA43E_cjs.createDeprecationProxy(
|
|
418
418
|
{
|
|
419
419
|
workflowId: params.workflowId,
|
|
420
420
|
runId,
|
|
@@ -428,7 +428,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
428
428
|
retryCount,
|
|
429
429
|
resumeData: params.resumeData,
|
|
430
430
|
getInitData: () => stepResults?.input,
|
|
431
|
-
getStepResult:
|
|
431
|
+
getStepResult: chunk7S6LA43E_cjs.getStepResult.bind(this, stepResults),
|
|
432
432
|
suspend: async (_suspendPayload) => {
|
|
433
433
|
throw new Error("Not implemented");
|
|
434
434
|
},
|
|
@@ -457,7 +457,7 @@ var StepExecutor = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
457
457
|
},
|
|
458
458
|
{
|
|
459
459
|
paramName: "runCount",
|
|
460
|
-
deprecationMessage:
|
|
460
|
+
deprecationMessage: chunk7S6LA43E_cjs.runCountDeprecationMessage,
|
|
461
461
|
logger: this.logger
|
|
462
462
|
}
|
|
463
463
|
)
|
|
@@ -476,7 +476,7 @@ function isTripwireChunk(chunk) {
|
|
|
476
476
|
}
|
|
477
477
|
function createTripWireFromChunk(chunk) {
|
|
478
478
|
const { payload } = chunk;
|
|
479
|
-
return new
|
|
479
|
+
return new chunk7S6LA43E_cjs.TripWire(
|
|
480
480
|
payload.reason || "Agent tripwire triggered",
|
|
481
481
|
{
|
|
482
482
|
retry: payload.retry,
|
|
@@ -2005,7 +2005,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
2005
2005
|
runId
|
|
2006
2006
|
}) ?? { context: {} };
|
|
2007
2007
|
const nestedWorkflow = step.step;
|
|
2008
|
-
const timeTravelParams =
|
|
2008
|
+
const timeTravelParams = chunk7S6LA43E_cjs.createTimeTravelExecutionParams({
|
|
2009
2009
|
steps: timeTravel.steps.slice(1),
|
|
2010
2010
|
inputData: timeTravel.inputData,
|
|
2011
2011
|
resumeData: timeTravel.resumeData,
|
|
@@ -2105,7 +2105,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
2105
2105
|
for (const [key, value] of Object.entries(requestContext)) {
|
|
2106
2106
|
rc.set(key, value);
|
|
2107
2107
|
}
|
|
2108
|
-
const { resumeData: timeTravelResumeData, validationError: timeTravelResumeValidationError } = await
|
|
2108
|
+
const { resumeData: timeTravelResumeData, validationError: timeTravelResumeValidationError } = await chunk7S6LA43E_cjs.validateStepResumeData({
|
|
2109
2109
|
resumeData: timeTravel?.stepResults[step.step.id]?.status === "suspended" ? timeTravel?.resumeData : void 0,
|
|
2110
2110
|
step: step.step
|
|
2111
2111
|
});
|
|
@@ -2924,7 +2924,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
2924
2924
|
|
|
2925
2925
|
// src/workflows/evented/workflow.ts
|
|
2926
2926
|
function cloneWorkflow(workflow, opts) {
|
|
2927
|
-
const wf = new
|
|
2927
|
+
const wf = new chunk7S6LA43E_cjs.Workflow({
|
|
2928
2928
|
id: opts.id,
|
|
2929
2929
|
inputSchema: workflow.inputSchema,
|
|
2930
2930
|
outputSchema: workflow.outputSchema,
|
|
@@ -2953,16 +2953,16 @@ function cloneStep(step, opts) {
|
|
|
2953
2953
|
};
|
|
2954
2954
|
}
|
|
2955
2955
|
function isAgent(input) {
|
|
2956
|
-
return input instanceof
|
|
2956
|
+
return input instanceof chunk7S6LA43E_cjs.Agent;
|
|
2957
2957
|
}
|
|
2958
2958
|
function isToolStep(input) {
|
|
2959
2959
|
return input instanceof chunkEAZ6YDCQ_cjs.Tool;
|
|
2960
2960
|
}
|
|
2961
2961
|
function isStepParams(input) {
|
|
2962
|
-
return input !== null && typeof input === "object" && "id" in input && "execute" in input && !(input instanceof
|
|
2962
|
+
return input !== null && typeof input === "object" && "id" in input && "execute" in input && !(input instanceof chunk7S6LA43E_cjs.Agent) && !(input instanceof chunkEAZ6YDCQ_cjs.Tool);
|
|
2963
2963
|
}
|
|
2964
2964
|
function isProcessor(obj) {
|
|
2965
|
-
return obj !== null && typeof obj === "object" && "id" in obj && typeof obj.id === "string" && !(obj instanceof
|
|
2965
|
+
return obj !== null && typeof obj === "object" && "id" in obj && typeof obj.id === "string" && !(obj instanceof chunk7S6LA43E_cjs.Agent) && !(obj instanceof chunkEAZ6YDCQ_cjs.Tool) && (typeof obj.processInput === "function" || typeof obj.processInputStep === "function" || typeof obj.processOutputStream === "function" || typeof obj.processOutputResult === "function" || typeof obj.processOutputStep === "function");
|
|
2966
2966
|
}
|
|
2967
2967
|
function createStep(params, agentOrToolOptions) {
|
|
2968
2968
|
if (isAgent(params)) {
|
|
@@ -3077,7 +3077,7 @@ function createStepFromAgent(params, agentOrToolOptions) {
|
|
|
3077
3077
|
};
|
|
3078
3078
|
const llm = await params.getLLM({ requestContext });
|
|
3079
3079
|
const modelInfo = llm.getModel();
|
|
3080
|
-
const isV2Model =
|
|
3080
|
+
const isV2Model = chunk7S6LA43E_cjs.isSupportedLanguageModel(modelInfo);
|
|
3081
3081
|
let structuredResult = null;
|
|
3082
3082
|
const handleFinish = (result) => {
|
|
3083
3083
|
const resultWithObject = result;
|
|
@@ -3231,8 +3231,8 @@ function createStepFromProcessor(processor) {
|
|
|
3231
3231
|
return {
|
|
3232
3232
|
id: `processor:${processor.id}`,
|
|
3233
3233
|
description: processor.name ?? `Processor ${processor.id}`,
|
|
3234
|
-
inputSchema:
|
|
3235
|
-
outputSchema:
|
|
3234
|
+
inputSchema: chunk7S6LA43E_cjs.ProcessorStepSchema,
|
|
3235
|
+
outputSchema: chunk7S6LA43E_cjs.ProcessorStepOutputSchema,
|
|
3236
3236
|
execute: async ({ inputData, requestContext, tracingContext }) => {
|
|
3237
3237
|
const input = inputData;
|
|
3238
3238
|
const {
|
|
@@ -3261,7 +3261,7 @@ function createStepFromProcessor(processor) {
|
|
|
3261
3261
|
abortSignal
|
|
3262
3262
|
} = input;
|
|
3263
3263
|
const abort = (reason, options) => {
|
|
3264
|
-
throw new
|
|
3264
|
+
throw new chunk7S6LA43E_cjs.TripWire(reason || `Tripwire triggered by ${processor.id}`, options, processor.id);
|
|
3265
3265
|
};
|
|
3266
3266
|
if (!hasPhaseMethod(phase)) {
|
|
3267
3267
|
return input;
|
|
@@ -3319,7 +3319,7 @@ function createStepFromProcessor(processor) {
|
|
|
3319
3319
|
processorSpan?.end({ output: result });
|
|
3320
3320
|
return result;
|
|
3321
3321
|
} catch (error) {
|
|
3322
|
-
if (error instanceof
|
|
3322
|
+
if (error instanceof chunk7S6LA43E_cjs.TripWire) {
|
|
3323
3323
|
processorSpan?.end({ output: { tripwire: error.message } });
|
|
3324
3324
|
} else {
|
|
3325
3325
|
processorSpan?.error({ error, endSpan: true });
|
|
@@ -3362,7 +3362,7 @@ function createStepFromProcessor(processor) {
|
|
|
3362
3362
|
systemMessages: result.getAllSystemMessages()
|
|
3363
3363
|
};
|
|
3364
3364
|
} else if (Array.isArray(result)) {
|
|
3365
|
-
|
|
3365
|
+
chunk7S6LA43E_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3366
3366
|
result,
|
|
3367
3367
|
passThrough.messageList,
|
|
3368
3368
|
idsBeforeProcessing,
|
|
@@ -3372,7 +3372,7 @@ function createStepFromProcessor(processor) {
|
|
|
3372
3372
|
return { ...passThrough, messages: result };
|
|
3373
3373
|
} else if (result && "messages" in result && "systemMessages" in result) {
|
|
3374
3374
|
const typedResult = result;
|
|
3375
|
-
|
|
3375
|
+
chunk7S6LA43E_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3376
3376
|
typedResult.messages,
|
|
3377
3377
|
passThrough.messageList,
|
|
3378
3378
|
idsBeforeProcessing,
|
|
@@ -3418,13 +3418,13 @@ function createStepFromProcessor(processor) {
|
|
|
3418
3418
|
structuredOutput,
|
|
3419
3419
|
steps: steps ?? []
|
|
3420
3420
|
});
|
|
3421
|
-
const validatedResult = await
|
|
3421
|
+
const validatedResult = await chunk7S6LA43E_cjs.ProcessorRunner.validateAndFormatProcessInputStepResult(result, {
|
|
3422
3422
|
messageList: passThrough.messageList,
|
|
3423
3423
|
processor,
|
|
3424
3424
|
stepNumber: stepNumber ?? 0
|
|
3425
3425
|
});
|
|
3426
3426
|
if (validatedResult.messages) {
|
|
3427
|
-
|
|
3427
|
+
chunk7S6LA43E_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3428
3428
|
validatedResult.messages,
|
|
3429
3429
|
passThrough.messageList,
|
|
3430
3430
|
idsBeforeProcessing,
|
|
@@ -3482,7 +3482,7 @@ function createStepFromProcessor(processor) {
|
|
|
3482
3482
|
delete mutableState[spanKey];
|
|
3483
3483
|
}
|
|
3484
3484
|
} catch (error) {
|
|
3485
|
-
if (error instanceof
|
|
3485
|
+
if (error instanceof chunk7S6LA43E_cjs.TripWire) {
|
|
3486
3486
|
processorSpan2?.end({ output: { tripwire: error.message } });
|
|
3487
3487
|
} else {
|
|
3488
3488
|
processorSpan2?.error({ error, endSpan: true });
|
|
@@ -3526,7 +3526,7 @@ function createStepFromProcessor(processor) {
|
|
|
3526
3526
|
systemMessages: result.getAllSystemMessages()
|
|
3527
3527
|
};
|
|
3528
3528
|
} else if (Array.isArray(result)) {
|
|
3529
|
-
|
|
3529
|
+
chunk7S6LA43E_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3530
3530
|
result,
|
|
3531
3531
|
passThrough.messageList,
|
|
3532
3532
|
idsBeforeProcessing,
|
|
@@ -3536,7 +3536,7 @@ function createStepFromProcessor(processor) {
|
|
|
3536
3536
|
return { ...passThrough, messages: result };
|
|
3537
3537
|
} else if (result && "messages" in result && "systemMessages" in result) {
|
|
3538
3538
|
const typedResult = result;
|
|
3539
|
-
|
|
3539
|
+
chunk7S6LA43E_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3540
3540
|
typedResult.messages,
|
|
3541
3541
|
passThrough.messageList,
|
|
3542
3542
|
idsBeforeProcessing,
|
|
@@ -3592,7 +3592,7 @@ function createStepFromProcessor(processor) {
|
|
|
3592
3592
|
systemMessages: result.getAllSystemMessages()
|
|
3593
3593
|
};
|
|
3594
3594
|
} else if (Array.isArray(result)) {
|
|
3595
|
-
|
|
3595
|
+
chunk7S6LA43E_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3596
3596
|
result,
|
|
3597
3597
|
passThrough.messageList,
|
|
3598
3598
|
idsBeforeProcessing,
|
|
@@ -3602,7 +3602,7 @@ function createStepFromProcessor(processor) {
|
|
|
3602
3602
|
return { ...passThrough, messages: result };
|
|
3603
3603
|
} else if (result && "messages" in result && "systemMessages" in result) {
|
|
3604
3604
|
const typedResult = result;
|
|
3605
|
-
|
|
3605
|
+
chunk7S6LA43E_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3606
3606
|
typedResult.messages,
|
|
3607
3607
|
passThrough.messageList,
|
|
3608
3608
|
idsBeforeProcessing,
|
|
@@ -3646,7 +3646,7 @@ function createWorkflow(params) {
|
|
|
3646
3646
|
executionEngine
|
|
3647
3647
|
});
|
|
3648
3648
|
}
|
|
3649
|
-
var EventedWorkflow = class extends
|
|
3649
|
+
var EventedWorkflow = class extends chunk7S6LA43E_cjs.Workflow {
|
|
3650
3650
|
constructor(params) {
|
|
3651
3651
|
super(params);
|
|
3652
3652
|
this.engineType = "evented";
|
|
@@ -3711,7 +3711,7 @@ var EventedWorkflow = class extends chunkRH2K66O2_cjs.Workflow {
|
|
|
3711
3711
|
return run;
|
|
3712
3712
|
}
|
|
3713
3713
|
};
|
|
3714
|
-
var EventedRun = class extends
|
|
3714
|
+
var EventedRun = class extends chunk7S6LA43E_cjs.Run {
|
|
3715
3715
|
constructor(params) {
|
|
3716
3716
|
super(params);
|
|
3717
3717
|
this.serializedStepGraph = params.serializedStepGraph;
|
|
@@ -3923,7 +3923,7 @@ var EventedRun = class extends chunkRH2K66O2_cjs.Run {
|
|
|
3923
3923
|
}
|
|
3924
3924
|
}
|
|
3925
3925
|
});
|
|
3926
|
-
this.streamOutput = new
|
|
3926
|
+
this.streamOutput = new chunk7S6LA43E_cjs.WorkflowRunOutput({
|
|
3927
3927
|
runId: this.runId,
|
|
3928
3928
|
workflowId: this.workflowId,
|
|
3929
3929
|
stream
|
|
@@ -3989,7 +3989,7 @@ var EventedRun = class extends chunkRH2K66O2_cjs.Run {
|
|
|
3989
3989
|
}
|
|
3990
3990
|
}
|
|
3991
3991
|
});
|
|
3992
|
-
this.streamOutput = new
|
|
3992
|
+
this.streamOutput = new chunk7S6LA43E_cjs.WorkflowRunOutput({
|
|
3993
3993
|
runId: this.runId,
|
|
3994
3994
|
workflowId: this.workflowId,
|
|
3995
3995
|
stream
|
|
@@ -4222,7 +4222,7 @@ function isExecutableStep(step) {
|
|
|
4222
4222
|
}
|
|
4223
4223
|
|
|
4224
4224
|
// src/workflows/evented/execution-engine.ts
|
|
4225
|
-
var EventedExecutionEngine = class extends
|
|
4225
|
+
var EventedExecutionEngine = class extends chunk7S6LA43E_cjs.ExecutionEngine {
|
|
4226
4226
|
eventProcessor;
|
|
4227
4227
|
constructor({
|
|
4228
4228
|
mastra,
|
|
@@ -4262,7 +4262,7 @@ var EventedExecutionEngine = class extends chunkRH2K66O2_cjs.ExecutionEngine {
|
|
|
4262
4262
|
await ack?.();
|
|
4263
4263
|
await pubsub.unsubscribe("workflows-finish", finishCb);
|
|
4264
4264
|
if (event.type === "workflow.fail" && event.data.stepResults) {
|
|
4265
|
-
event.data.stepResults =
|
|
4265
|
+
event.data.stepResults = chunk7S6LA43E_cjs.hydrateSerializedStepErrors(event.data.stepResults);
|
|
4266
4266
|
}
|
|
4267
4267
|
resolveResult(event.data);
|
|
4268
4268
|
return;
|
|
@@ -4344,7 +4344,7 @@ var EventedExecutionEngine = class extends chunkRH2K66O2_cjs.ExecutionEngine {
|
|
|
4344
4344
|
const { __state: _removedState, ...stepResultsWithoutTopLevelState } = resultData.stepResults ?? {};
|
|
4345
4345
|
const cleanStepResults = {};
|
|
4346
4346
|
for (const [stepId, stepResult] of Object.entries(stepResultsWithoutTopLevelState)) {
|
|
4347
|
-
cleanStepResults[stepId] =
|
|
4347
|
+
cleanStepResults[stepId] = chunk7S6LA43E_cjs.cleanStepResult(stepResult);
|
|
4348
4348
|
}
|
|
4349
4349
|
let callbackArg;
|
|
4350
4350
|
if (resultData.prevResult.status === "failed") {
|
|
@@ -4460,5 +4460,5 @@ exports.cloneStep = cloneStep;
|
|
|
4460
4460
|
exports.cloneWorkflow = cloneWorkflow;
|
|
4461
4461
|
exports.createStep = createStep;
|
|
4462
4462
|
exports.createWorkflow = createWorkflow;
|
|
4463
|
-
//# sourceMappingURL=chunk-
|
|
4464
|
-
//# sourceMappingURL=chunk-
|
|
4463
|
+
//# sourceMappingURL=chunk-OQ5LZ6OV.cjs.map
|
|
4464
|
+
//# sourceMappingURL=chunk-OQ5LZ6OV.cjs.map
|