@mastra/core 1.3.0-alpha.2 → 1.3.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 +291 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-JQNREL64.js → chunk-3MJCJLZS.js} +4 -4
- package/dist/{chunk-JQNREL64.js.map → chunk-3MJCJLZS.js.map} +1 -1
- package/dist/{chunk-OV7OOUUR.js → chunk-44SUGDBR.js} +2 -2
- package/dist/{chunk-OV7OOUUR.js.map → chunk-44SUGDBR.js.map} +1 -1
- package/dist/{chunk-STKNQDVA.js → chunk-57QAF2ZQ.js} +3 -3
- package/dist/{chunk-STKNQDVA.js.map → chunk-57QAF2ZQ.js.map} +1 -1
- package/dist/{chunk-GZD6443M.cjs → chunk-C3XU7ZDC.cjs} +2 -2
- package/dist/{chunk-GZD6443M.cjs.map → chunk-C3XU7ZDC.cjs.map} +1 -1
- package/dist/{chunk-U2CABSMC.cjs → chunk-EH6SAGEO.cjs} +48 -48
- package/dist/{chunk-U2CABSMC.cjs.map → chunk-EH6SAGEO.cjs.map} +1 -1
- package/dist/{chunk-6TZKQI4R.cjs → chunk-EUG4AON3.cjs} +7 -7
- package/dist/{chunk-6TZKQI4R.cjs.map → chunk-EUG4AON3.cjs.map} +1 -1
- package/dist/{chunk-MOOJ3H3C.js → chunk-JNE2ABVB.js} +3 -3
- package/dist/{chunk-MOOJ3H3C.js.map → chunk-JNE2ABVB.js.map} +1 -1
- package/dist/{chunk-KL2JPSRX.js → chunk-KUTU2YZF.js} +4 -4
- package/dist/{chunk-KL2JPSRX.js.map → chunk-KUTU2YZF.js.map} +1 -1
- package/dist/{chunk-XQVYEOI7.cjs → chunk-NCC45KOB.cjs} +5 -5
- package/dist/{chunk-XQVYEOI7.cjs.map → chunk-NCC45KOB.cjs.map} +1 -1
- package/dist/{chunk-VVD56FI4.js → chunk-PHYJYZ32.js} +6 -6
- package/dist/{chunk-VVD56FI4.js.map → chunk-PHYJYZ32.js.map} +1 -1
- package/dist/{chunk-ZRUTE56J.js → chunk-SIZEIYNH.js} +35 -33
- package/dist/chunk-SIZEIYNH.js.map +1 -0
- package/dist/{chunk-JU6K7UDX.cjs → chunk-TERSHTY5.cjs} +9 -9
- package/dist/{chunk-JU6K7UDX.cjs.map → chunk-TERSHTY5.cjs.map} +1 -1
- package/dist/{chunk-D5JZT6EK.cjs → chunk-UHVG25VW.cjs} +13 -13
- package/dist/{chunk-D5JZT6EK.cjs.map → chunk-UHVG25VW.cjs.map} +1 -1
- package/dist/{chunk-FLHFB23E.cjs → chunk-YNXIGRQE.cjs} +36 -34
- package/dist/chunk-YNXIGRQE.cjs.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +257 -257
- package/dist/evals/index.cjs +20 -20
- package/dist/evals/index.js +3 -3
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.js +2 -2
- package/dist/loop/index.cjs +12 -12
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/loop/network/validation.d.ts +8 -0
- package/dist/loop/network/validation.d.ts.map +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/storage/constants.cjs +27 -27
- package/dist/storage/constants.js +1 -1
- package/dist/storage/index.cjs +117 -117
- package/dist/storage/index.js +2 -2
- package/dist/storage/types.d.ts +2 -2
- package/dist/storage/types.d.ts.map +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/vector/index.cjs +7 -7
- package/dist/vector/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 +7 -7
- package/dist/chunk-FLHFB23E.cjs.map +0 -1
- package/dist/chunk-ZRUTE56J.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYNXIGRQE_cjs = require('./chunk-YNXIGRQE.cjs');
|
|
4
4
|
var chunkZCBG4ZQT_cjs = require('./chunk-ZCBG4ZQT.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkTERSHTY5_cjs = require('./chunk-TERSHTY5.cjs');
|
|
6
6
|
var chunkUE2G2LRP_cjs = require('./chunk-UE2G2LRP.cjs');
|
|
7
7
|
var chunkKJBMTK5B_cjs = require('./chunk-KJBMTK5B.cjs');
|
|
8
8
|
var chunk7UWHFWST_cjs = require('./chunk-7UWHFWST.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 chunkYNXIGRQE_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
|
+
chunkYNXIGRQE_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: chunkYNXIGRQE_cjs.getStepResult.bind(this, stepResults),
|
|
107
107
|
suspend: async (suspendPayload, suspendOptions) => {
|
|
108
|
-
const { suspendData, validationError: validationError2 } = await
|
|
108
|
+
const { suspendData, validationError: validationError2 } = await chunkYNXIGRQE_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: chunkYNXIGRQE_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 chunkYNXIGRQE_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
|
+
chunkYNXIGRQE_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: chunkYNXIGRQE_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: chunkYNXIGRQE_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
|
+
chunkYNXIGRQE_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: chunkYNXIGRQE_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: chunkYNXIGRQE_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
|
+
chunkYNXIGRQE_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: chunkYNXIGRQE_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: chunkYNXIGRQE_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 chunkYNXIGRQE_cjs.TripWire(
|
|
480
480
|
payload.reason || "Agent tripwire triggered",
|
|
481
481
|
{
|
|
482
482
|
retry: payload.retry,
|
|
@@ -777,7 +777,7 @@ async function processWorkflowForEach({
|
|
|
777
777
|
const workflowsStore2 = await mastra.getStorage()?.getStore("workflows");
|
|
778
778
|
const updatedOutput = [...currentResult.output];
|
|
779
779
|
for (const suspIdx of indicesToResume) {
|
|
780
|
-
updatedOutput[suspIdx] =
|
|
780
|
+
updatedOutput[suspIdx] = chunkTERSHTY5_cjs.createPendingMarker();
|
|
781
781
|
}
|
|
782
782
|
await workflowsStore2?.updateWorkflowResults({
|
|
783
783
|
workflowName: workflowId,
|
|
@@ -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 = chunkYNXIGRQE_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 chunkYNXIGRQE_cjs.validateStepResumeData({
|
|
2109
2109
|
resumeData: timeTravel?.stepResults[step.step.id]?.status === "suspended" ? timeTravel?.resumeData : void 0,
|
|
2110
2110
|
step: step.step
|
|
2111
2111
|
});
|
|
@@ -2905,7 +2905,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
|
|
|
2905
2905
|
|
|
2906
2906
|
// src/workflows/evented/workflow.ts
|
|
2907
2907
|
function cloneWorkflow(workflow, opts) {
|
|
2908
|
-
const wf = new
|
|
2908
|
+
const wf = new chunkYNXIGRQE_cjs.Workflow({
|
|
2909
2909
|
id: opts.id,
|
|
2910
2910
|
inputSchema: workflow.inputSchema,
|
|
2911
2911
|
outputSchema: workflow.outputSchema,
|
|
@@ -2934,16 +2934,16 @@ function cloneStep(step, opts) {
|
|
|
2934
2934
|
};
|
|
2935
2935
|
}
|
|
2936
2936
|
function isAgent(input) {
|
|
2937
|
-
return input instanceof
|
|
2937
|
+
return input instanceof chunkYNXIGRQE_cjs.Agent;
|
|
2938
2938
|
}
|
|
2939
2939
|
function isToolStep(input) {
|
|
2940
2940
|
return input instanceof chunk7UWHFWST_cjs.Tool;
|
|
2941
2941
|
}
|
|
2942
2942
|
function isStepParams(input) {
|
|
2943
|
-
return input !== null && typeof input === "object" && "id" in input && "execute" in input && !(input instanceof
|
|
2943
|
+
return input !== null && typeof input === "object" && "id" in input && "execute" in input && !(input instanceof chunkYNXIGRQE_cjs.Agent) && !(input instanceof chunk7UWHFWST_cjs.Tool);
|
|
2944
2944
|
}
|
|
2945
2945
|
function isProcessor(obj) {
|
|
2946
|
-
return obj !== null && typeof obj === "object" && "id" in obj && typeof obj.id === "string" && !(obj instanceof
|
|
2946
|
+
return obj !== null && typeof obj === "object" && "id" in obj && typeof obj.id === "string" && !(obj instanceof chunkYNXIGRQE_cjs.Agent) && !(obj instanceof chunk7UWHFWST_cjs.Tool) && (typeof obj.processInput === "function" || typeof obj.processInputStep === "function" || typeof obj.processOutputStream === "function" || typeof obj.processOutputResult === "function" || typeof obj.processOutputStep === "function");
|
|
2947
2947
|
}
|
|
2948
2948
|
function createStep(params, agentOrToolOptions) {
|
|
2949
2949
|
if (isAgent(params)) {
|
|
@@ -3058,7 +3058,7 @@ function createStepFromAgent(params, agentOrToolOptions) {
|
|
|
3058
3058
|
};
|
|
3059
3059
|
const llm = await params.getLLM({ requestContext });
|
|
3060
3060
|
const modelInfo = llm.getModel();
|
|
3061
|
-
const isV2Model =
|
|
3061
|
+
const isV2Model = chunkYNXIGRQE_cjs.isSupportedLanguageModel(modelInfo);
|
|
3062
3062
|
let structuredResult = null;
|
|
3063
3063
|
const handleFinish = (result) => {
|
|
3064
3064
|
const resultWithObject = result;
|
|
@@ -3212,8 +3212,8 @@ function createStepFromProcessor(processor) {
|
|
|
3212
3212
|
return {
|
|
3213
3213
|
id: `processor:${processor.id}`,
|
|
3214
3214
|
description: processor.name ?? `Processor ${processor.id}`,
|
|
3215
|
-
inputSchema:
|
|
3216
|
-
outputSchema:
|
|
3215
|
+
inputSchema: chunkYNXIGRQE_cjs.ProcessorStepSchema,
|
|
3216
|
+
outputSchema: chunkYNXIGRQE_cjs.ProcessorStepOutputSchema,
|
|
3217
3217
|
execute: async ({ inputData, requestContext, tracingContext }) => {
|
|
3218
3218
|
const input = inputData;
|
|
3219
3219
|
const {
|
|
@@ -3242,7 +3242,7 @@ function createStepFromProcessor(processor) {
|
|
|
3242
3242
|
abortSignal
|
|
3243
3243
|
} = input;
|
|
3244
3244
|
const abort = (reason, options) => {
|
|
3245
|
-
throw new
|
|
3245
|
+
throw new chunkYNXIGRQE_cjs.TripWire(reason || `Tripwire triggered by ${processor.id}`, options, processor.id);
|
|
3246
3246
|
};
|
|
3247
3247
|
if (!hasPhaseMethod(phase)) {
|
|
3248
3248
|
return input;
|
|
@@ -3300,7 +3300,7 @@ function createStepFromProcessor(processor) {
|
|
|
3300
3300
|
processorSpan?.end({ output: result });
|
|
3301
3301
|
return result;
|
|
3302
3302
|
} catch (error) {
|
|
3303
|
-
if (error instanceof
|
|
3303
|
+
if (error instanceof chunkYNXIGRQE_cjs.TripWire) {
|
|
3304
3304
|
processorSpan?.end({ output: { tripwire: error.message } });
|
|
3305
3305
|
} else {
|
|
3306
3306
|
processorSpan?.error({ error, endSpan: true });
|
|
@@ -3343,7 +3343,7 @@ function createStepFromProcessor(processor) {
|
|
|
3343
3343
|
systemMessages: result.getAllSystemMessages()
|
|
3344
3344
|
};
|
|
3345
3345
|
} else if (Array.isArray(result)) {
|
|
3346
|
-
|
|
3346
|
+
chunkYNXIGRQE_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3347
3347
|
result,
|
|
3348
3348
|
passThrough.messageList,
|
|
3349
3349
|
idsBeforeProcessing,
|
|
@@ -3353,7 +3353,7 @@ function createStepFromProcessor(processor) {
|
|
|
3353
3353
|
return { ...passThrough, messages: result };
|
|
3354
3354
|
} else if (result && "messages" in result && "systemMessages" in result) {
|
|
3355
3355
|
const typedResult = result;
|
|
3356
|
-
|
|
3356
|
+
chunkYNXIGRQE_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3357
3357
|
typedResult.messages,
|
|
3358
3358
|
passThrough.messageList,
|
|
3359
3359
|
idsBeforeProcessing,
|
|
@@ -3399,13 +3399,13 @@ function createStepFromProcessor(processor) {
|
|
|
3399
3399
|
structuredOutput,
|
|
3400
3400
|
steps: steps ?? []
|
|
3401
3401
|
});
|
|
3402
|
-
const validatedResult = await
|
|
3402
|
+
const validatedResult = await chunkYNXIGRQE_cjs.ProcessorRunner.validateAndFormatProcessInputStepResult(result, {
|
|
3403
3403
|
messageList: passThrough.messageList,
|
|
3404
3404
|
processor,
|
|
3405
3405
|
stepNumber: stepNumber ?? 0
|
|
3406
3406
|
});
|
|
3407
3407
|
if (validatedResult.messages) {
|
|
3408
|
-
|
|
3408
|
+
chunkYNXIGRQE_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3409
3409
|
validatedResult.messages,
|
|
3410
3410
|
passThrough.messageList,
|
|
3411
3411
|
idsBeforeProcessing,
|
|
@@ -3463,7 +3463,7 @@ function createStepFromProcessor(processor) {
|
|
|
3463
3463
|
delete mutableState[spanKey];
|
|
3464
3464
|
}
|
|
3465
3465
|
} catch (error) {
|
|
3466
|
-
if (error instanceof
|
|
3466
|
+
if (error instanceof chunkYNXIGRQE_cjs.TripWire) {
|
|
3467
3467
|
processorSpan2?.end({ output: { tripwire: error.message } });
|
|
3468
3468
|
} else {
|
|
3469
3469
|
processorSpan2?.error({ error, endSpan: true });
|
|
@@ -3507,7 +3507,7 @@ function createStepFromProcessor(processor) {
|
|
|
3507
3507
|
systemMessages: result.getAllSystemMessages()
|
|
3508
3508
|
};
|
|
3509
3509
|
} else if (Array.isArray(result)) {
|
|
3510
|
-
|
|
3510
|
+
chunkYNXIGRQE_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3511
3511
|
result,
|
|
3512
3512
|
passThrough.messageList,
|
|
3513
3513
|
idsBeforeProcessing,
|
|
@@ -3517,7 +3517,7 @@ function createStepFromProcessor(processor) {
|
|
|
3517
3517
|
return { ...passThrough, messages: result };
|
|
3518
3518
|
} else if (result && "messages" in result && "systemMessages" in result) {
|
|
3519
3519
|
const typedResult = result;
|
|
3520
|
-
|
|
3520
|
+
chunkYNXIGRQE_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3521
3521
|
typedResult.messages,
|
|
3522
3522
|
passThrough.messageList,
|
|
3523
3523
|
idsBeforeProcessing,
|
|
@@ -3573,7 +3573,7 @@ function createStepFromProcessor(processor) {
|
|
|
3573
3573
|
systemMessages: result.getAllSystemMessages()
|
|
3574
3574
|
};
|
|
3575
3575
|
} else if (Array.isArray(result)) {
|
|
3576
|
-
|
|
3576
|
+
chunkYNXIGRQE_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3577
3577
|
result,
|
|
3578
3578
|
passThrough.messageList,
|
|
3579
3579
|
idsBeforeProcessing,
|
|
@@ -3583,7 +3583,7 @@ function createStepFromProcessor(processor) {
|
|
|
3583
3583
|
return { ...passThrough, messages: result };
|
|
3584
3584
|
} else if (result && "messages" in result && "systemMessages" in result) {
|
|
3585
3585
|
const typedResult = result;
|
|
3586
|
-
|
|
3586
|
+
chunkYNXIGRQE_cjs.ProcessorRunner.applyMessagesToMessageList(
|
|
3587
3587
|
typedResult.messages,
|
|
3588
3588
|
passThrough.messageList,
|
|
3589
3589
|
idsBeforeProcessing,
|
|
@@ -3627,7 +3627,7 @@ function createWorkflow(params) {
|
|
|
3627
3627
|
executionEngine
|
|
3628
3628
|
});
|
|
3629
3629
|
}
|
|
3630
|
-
var EventedWorkflow = class extends
|
|
3630
|
+
var EventedWorkflow = class extends chunkYNXIGRQE_cjs.Workflow {
|
|
3631
3631
|
constructor(params) {
|
|
3632
3632
|
super(params);
|
|
3633
3633
|
this.engineType = "evented";
|
|
@@ -3692,7 +3692,7 @@ var EventedWorkflow = class extends chunkFLHFB23E_cjs.Workflow {
|
|
|
3692
3692
|
return run;
|
|
3693
3693
|
}
|
|
3694
3694
|
};
|
|
3695
|
-
var EventedRun = class extends
|
|
3695
|
+
var EventedRun = class extends chunkYNXIGRQE_cjs.Run {
|
|
3696
3696
|
constructor(params) {
|
|
3697
3697
|
super(params);
|
|
3698
3698
|
this.serializedStepGraph = params.serializedStepGraph;
|
|
@@ -3904,7 +3904,7 @@ var EventedRun = class extends chunkFLHFB23E_cjs.Run {
|
|
|
3904
3904
|
}
|
|
3905
3905
|
}
|
|
3906
3906
|
});
|
|
3907
|
-
this.streamOutput = new
|
|
3907
|
+
this.streamOutput = new chunkYNXIGRQE_cjs.WorkflowRunOutput({
|
|
3908
3908
|
runId: this.runId,
|
|
3909
3909
|
workflowId: this.workflowId,
|
|
3910
3910
|
stream
|
|
@@ -3970,7 +3970,7 @@ var EventedRun = class extends chunkFLHFB23E_cjs.Run {
|
|
|
3970
3970
|
}
|
|
3971
3971
|
}
|
|
3972
3972
|
});
|
|
3973
|
-
this.streamOutput = new
|
|
3973
|
+
this.streamOutput = new chunkYNXIGRQE_cjs.WorkflowRunOutput({
|
|
3974
3974
|
runId: this.runId,
|
|
3975
3975
|
workflowId: this.workflowId,
|
|
3976
3976
|
stream
|
|
@@ -4203,7 +4203,7 @@ function isExecutableStep(step) {
|
|
|
4203
4203
|
}
|
|
4204
4204
|
|
|
4205
4205
|
// src/workflows/evented/execution-engine.ts
|
|
4206
|
-
var EventedExecutionEngine = class extends
|
|
4206
|
+
var EventedExecutionEngine = class extends chunkYNXIGRQE_cjs.ExecutionEngine {
|
|
4207
4207
|
eventProcessor;
|
|
4208
4208
|
constructor({
|
|
4209
4209
|
mastra,
|
|
@@ -4243,7 +4243,7 @@ var EventedExecutionEngine = class extends chunkFLHFB23E_cjs.ExecutionEngine {
|
|
|
4243
4243
|
await ack?.();
|
|
4244
4244
|
await pubsub.unsubscribe("workflows-finish", finishCb);
|
|
4245
4245
|
if (event.type === "workflow.fail" && event.data.stepResults) {
|
|
4246
|
-
event.data.stepResults =
|
|
4246
|
+
event.data.stepResults = chunkYNXIGRQE_cjs.hydrateSerializedStepErrors(event.data.stepResults);
|
|
4247
4247
|
}
|
|
4248
4248
|
resolveResult(event.data);
|
|
4249
4249
|
return;
|
|
@@ -4325,7 +4325,7 @@ var EventedExecutionEngine = class extends chunkFLHFB23E_cjs.ExecutionEngine {
|
|
|
4325
4325
|
const { __state: _removedState, ...stepResultsWithoutTopLevelState } = resultData.stepResults ?? {};
|
|
4326
4326
|
const cleanStepResults = {};
|
|
4327
4327
|
for (const [stepId, stepResult] of Object.entries(stepResultsWithoutTopLevelState)) {
|
|
4328
|
-
cleanStepResults[stepId] =
|
|
4328
|
+
cleanStepResults[stepId] = chunkYNXIGRQE_cjs.cleanStepResult(stepResult);
|
|
4329
4329
|
}
|
|
4330
4330
|
let callbackArg;
|
|
4331
4331
|
if (resultData.prevResult.status === "failed") {
|
|
@@ -4441,5 +4441,5 @@ exports.cloneStep = cloneStep;
|
|
|
4441
4441
|
exports.cloneWorkflow = cloneWorkflow;
|
|
4442
4442
|
exports.createStep = createStep;
|
|
4443
4443
|
exports.createWorkflow = createWorkflow;
|
|
4444
|
-
//# sourceMappingURL=chunk-
|
|
4445
|
-
//# sourceMappingURL=chunk-
|
|
4444
|
+
//# sourceMappingURL=chunk-EH6SAGEO.cjs.map
|
|
4445
|
+
//# sourceMappingURL=chunk-EH6SAGEO.cjs.map
|