@mastra/inngest 0.10.2-alpha.1 → 0.10.2-alpha.3
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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +19 -0
- package/dist/_tsup-dts-rollup.d.cts +7 -2
- package/dist/_tsup-dts-rollup.d.ts +7 -2
- package/dist/index.cjs +11 -2
- package/dist/index.js +11 -2
- package/package.json +3 -3
- package/src/index.ts +14 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/inngest@0.10.2-alpha.
|
|
2
|
+
> @mastra/inngest@0.10.2-alpha.3 build /home/runner/work/mastra/mastra/workflows/inngest
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.4.0
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 7362ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/workflows/inngest/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
14
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
15
15
|
[36mWriting package typings: /home/runner/work/mastra/mastra/workflows/inngest/dist/_tsup-dts-rollup.d.cts[39m
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 6361ms
|
|
17
17
|
[34mCLI[39m Cleaning output folder
|
|
18
18
|
[34mESM[39m Build start
|
|
19
19
|
[34mCJS[39m Build start
|
|
20
|
-
[32mCJS[39m [1mdist/index.cjs [22m[32m22.
|
|
21
|
-
[32mCJS[39m ⚡️ Build success in
|
|
22
|
-
[32mESM[39m [1mdist/index.js [22m[32m22.
|
|
23
|
-
[32mESM[39m ⚡️ Build success in
|
|
20
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m22.68 KB[39m
|
|
21
|
+
[32mCJS[39m ⚡️ Build success in 207ms
|
|
22
|
+
[32mESM[39m [1mdist/index.js [22m[32m22.54 KB[39m
|
|
23
|
+
[32mESM[39m ⚡️ Build success in 306ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @mastra/inngest
|
|
2
2
|
|
|
3
|
+
## 0.10.2-alpha.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1ee6894: inngest production url fix
|
|
8
|
+
- Updated dependencies [1b5fc55]
|
|
9
|
+
- Updated dependencies [add596e]
|
|
10
|
+
- Updated dependencies [ecebbeb]
|
|
11
|
+
- @mastra/core@0.10.2-alpha.5
|
|
12
|
+
|
|
13
|
+
## 0.10.2-alpha.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 12b7002: Add serializedStepGraph to workflow run snapshot in storage
|
|
18
|
+
- Updated dependencies [c5bf1ce]
|
|
19
|
+
- Updated dependencies [12b7002]
|
|
20
|
+
- @mastra/core@0.10.2-alpha.4
|
|
21
|
+
|
|
3
22
|
## 0.10.2-alpha.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -14,6 +14,7 @@ import { InngestMiddleware } from 'inngest';
|
|
|
14
14
|
import type { Mastra } from '@mastra/core';
|
|
15
15
|
import { Run } from '@mastra/core/workflows';
|
|
16
16
|
import { RuntimeContext } from '@mastra/core/di';
|
|
17
|
+
import type { SerializedStepFlowEntry } from '@mastra/core/workflows';
|
|
17
18
|
import { serve as serve_2 } from 'inngest/hono';
|
|
18
19
|
import type { Span } from '@opentelemetry/api';
|
|
19
20
|
import type { Step } from '@mastra/core/workflows';
|
|
@@ -84,13 +85,14 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
84
85
|
};
|
|
85
86
|
runtimeContext: RuntimeContext;
|
|
86
87
|
}): Promise<StepResult<any, any, any, any>>;
|
|
87
|
-
persistStepUpdate({ workflowId, runId, stepResults, executionContext, }: {
|
|
88
|
+
persistStepUpdate({ workflowId, runId, stepResults, executionContext, serializedStepGraph, }: {
|
|
88
89
|
workflowId: string;
|
|
89
90
|
runId: string;
|
|
90
91
|
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
92
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
91
93
|
executionContext: ExecutionContext;
|
|
92
94
|
}): Promise<void>;
|
|
93
|
-
executeConditional({ workflowId, runId, entry, prevOutput, prevStep, stepResults, resume, executionContext, emitter, runtimeContext, }: {
|
|
95
|
+
executeConditional({ workflowId, runId, entry, prevOutput, prevStep, stepResults, serializedStepGraph, resume, executionContext, emitter, runtimeContext, }: {
|
|
94
96
|
workflowId: string;
|
|
95
97
|
runId: string;
|
|
96
98
|
entry: {
|
|
@@ -99,6 +101,7 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
99
101
|
conditions: ExecuteFunction<any, any, any, any>[];
|
|
100
102
|
};
|
|
101
103
|
prevStep: StepFlowEntry;
|
|
104
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
102
105
|
prevOutput: any;
|
|
103
106
|
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
104
107
|
resume?: {
|
|
@@ -118,11 +121,13 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
118
121
|
export declare class InngestRun<TSteps extends Step<string, any, any>[] = Step<string, any, any>[], TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>> extends Run<TSteps, TInput, TOutput> {
|
|
119
122
|
#private;
|
|
120
123
|
private inngest;
|
|
124
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
121
125
|
constructor(params: {
|
|
122
126
|
workflowId: string;
|
|
123
127
|
runId: string;
|
|
124
128
|
executionEngine: ExecutionEngine;
|
|
125
129
|
executionGraph: ExecutionGraph;
|
|
130
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
126
131
|
mastra?: Mastra;
|
|
127
132
|
retryConfig?: {
|
|
128
133
|
attempts?: number;
|
|
@@ -14,6 +14,7 @@ import { InngestMiddleware } from 'inngest';
|
|
|
14
14
|
import type { Mastra } from '@mastra/core';
|
|
15
15
|
import { Run } from '@mastra/core/workflows';
|
|
16
16
|
import { RuntimeContext } from '@mastra/core/di';
|
|
17
|
+
import type { SerializedStepFlowEntry } from '@mastra/core/workflows';
|
|
17
18
|
import { serve as serve_2 } from 'inngest/hono';
|
|
18
19
|
import type { Span } from '@opentelemetry/api';
|
|
19
20
|
import type { Step } from '@mastra/core/workflows';
|
|
@@ -84,13 +85,14 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
84
85
|
};
|
|
85
86
|
runtimeContext: RuntimeContext;
|
|
86
87
|
}): Promise<StepResult<any, any, any, any>>;
|
|
87
|
-
persistStepUpdate({ workflowId, runId, stepResults, executionContext, }: {
|
|
88
|
+
persistStepUpdate({ workflowId, runId, stepResults, executionContext, serializedStepGraph, }: {
|
|
88
89
|
workflowId: string;
|
|
89
90
|
runId: string;
|
|
90
91
|
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
92
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
91
93
|
executionContext: ExecutionContext;
|
|
92
94
|
}): Promise<void>;
|
|
93
|
-
executeConditional({ workflowId, runId, entry, prevOutput, prevStep, stepResults, resume, executionContext, emitter, runtimeContext, }: {
|
|
95
|
+
executeConditional({ workflowId, runId, entry, prevOutput, prevStep, stepResults, serializedStepGraph, resume, executionContext, emitter, runtimeContext, }: {
|
|
94
96
|
workflowId: string;
|
|
95
97
|
runId: string;
|
|
96
98
|
entry: {
|
|
@@ -99,6 +101,7 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
99
101
|
conditions: ExecuteFunction<any, any, any, any>[];
|
|
100
102
|
};
|
|
101
103
|
prevStep: StepFlowEntry;
|
|
104
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
102
105
|
prevOutput: any;
|
|
103
106
|
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
104
107
|
resume?: {
|
|
@@ -118,11 +121,13 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
118
121
|
export declare class InngestRun<TSteps extends Step<string, any, any>[] = Step<string, any, any>[], TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>> extends Run<TSteps, TInput, TOutput> {
|
|
119
122
|
#private;
|
|
120
123
|
private inngest;
|
|
124
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
121
125
|
constructor(params: {
|
|
122
126
|
workflowId: string;
|
|
123
127
|
runId: string;
|
|
124
128
|
executionEngine: ExecutionEngine;
|
|
125
129
|
executionGraph: ExecutionGraph;
|
|
130
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
126
131
|
mastra?: Mastra;
|
|
127
132
|
retryConfig?: {
|
|
128
133
|
attempts?: number;
|
package/dist/index.cjs
CHANGED
|
@@ -24,14 +24,16 @@ function serve({ mastra, inngest }) {
|
|
|
24
24
|
}
|
|
25
25
|
var InngestRun = class extends workflows.Run {
|
|
26
26
|
inngest;
|
|
27
|
+
serializedStepGraph;
|
|
27
28
|
#mastra;
|
|
28
29
|
constructor(params, inngest) {
|
|
29
30
|
super(params);
|
|
30
31
|
this.inngest = inngest;
|
|
32
|
+
this.serializedStepGraph = params.serializedStepGraph;
|
|
31
33
|
this.#mastra = params.mastra;
|
|
32
34
|
}
|
|
33
35
|
async getRuns(eventId) {
|
|
34
|
-
const response = await fetch(`${this.inngest.apiBaseUrl}/v1/events/${eventId}/runs`, {
|
|
36
|
+
const response = await fetch(`${this.inngest.apiBaseUrl ?? "https://api.inngest.com"}/v1/events/${eventId}/runs`, {
|
|
35
37
|
headers: {
|
|
36
38
|
Authorization: `Bearer ${process.env.INNGEST_SIGNING_KEY}`
|
|
37
39
|
}
|
|
@@ -58,6 +60,7 @@ var InngestRun = class extends workflows.Run {
|
|
|
58
60
|
runId: this.runId,
|
|
59
61
|
snapshot: {
|
|
60
62
|
runId: this.runId,
|
|
63
|
+
serializedStepGraph: this.serializedStepGraph,
|
|
61
64
|
value: {},
|
|
62
65
|
context: {},
|
|
63
66
|
activePaths: [],
|
|
@@ -190,6 +193,7 @@ var InngestWorkflow = class _InngestWorkflow extends workflows.Workflow {
|
|
|
190
193
|
runId: runIdToUse,
|
|
191
194
|
executionEngine: this.executionEngine,
|
|
192
195
|
executionGraph: this.executionGraph,
|
|
196
|
+
serializedStepGraph: this.serializedStepGraph,
|
|
193
197
|
mastra: this.#mastra,
|
|
194
198
|
retryConfig: this.retryConfig,
|
|
195
199
|
cleanup: () => this.runs.delete(runIdToUse)
|
|
@@ -235,6 +239,7 @@ var InngestWorkflow = class _InngestWorkflow extends workflows.Workflow {
|
|
|
235
239
|
workflowId: this.id,
|
|
236
240
|
runId,
|
|
237
241
|
graph: this.executionGraph,
|
|
242
|
+
serializedStepGraph: this.serializedStepGraph,
|
|
238
243
|
input: inputData,
|
|
239
244
|
emitter,
|
|
240
245
|
retryConfig: this.retryConfig,
|
|
@@ -621,7 +626,8 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
621
626
|
workflowId,
|
|
622
627
|
runId,
|
|
623
628
|
stepResults,
|
|
624
|
-
executionContext
|
|
629
|
+
executionContext,
|
|
630
|
+
serializedStepGraph
|
|
625
631
|
}) {
|
|
626
632
|
await this.inngestStep.run(
|
|
627
633
|
`workflow.${workflowId}.run.${runId}.path.${JSON.stringify(executionContext.executionPath)}.stepUpdate`,
|
|
@@ -635,6 +641,7 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
635
641
|
context: stepResults,
|
|
636
642
|
activePaths: [],
|
|
637
643
|
suspendedPaths: executionContext.suspendedPaths,
|
|
644
|
+
serializedStepGraph,
|
|
638
645
|
// @ts-ignore
|
|
639
646
|
timestamp: Date.now()
|
|
640
647
|
}
|
|
@@ -649,6 +656,7 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
649
656
|
prevOutput,
|
|
650
657
|
prevStep,
|
|
651
658
|
stepResults,
|
|
659
|
+
serializedStepGraph,
|
|
652
660
|
resume,
|
|
653
661
|
executionContext,
|
|
654
662
|
emitter,
|
|
@@ -697,6 +705,7 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
697
705
|
prevStep,
|
|
698
706
|
stepResults,
|
|
699
707
|
resume,
|
|
708
|
+
serializedStepGraph,
|
|
700
709
|
executionContext: {
|
|
701
710
|
workflowId,
|
|
702
711
|
runId,
|
package/dist/index.js
CHANGED
|
@@ -22,14 +22,16 @@ function serve({ mastra, inngest }) {
|
|
|
22
22
|
}
|
|
23
23
|
var InngestRun = class extends Run {
|
|
24
24
|
inngest;
|
|
25
|
+
serializedStepGraph;
|
|
25
26
|
#mastra;
|
|
26
27
|
constructor(params, inngest) {
|
|
27
28
|
super(params);
|
|
28
29
|
this.inngest = inngest;
|
|
30
|
+
this.serializedStepGraph = params.serializedStepGraph;
|
|
29
31
|
this.#mastra = params.mastra;
|
|
30
32
|
}
|
|
31
33
|
async getRuns(eventId) {
|
|
32
|
-
const response = await fetch(`${this.inngest.apiBaseUrl}/v1/events/${eventId}/runs`, {
|
|
34
|
+
const response = await fetch(`${this.inngest.apiBaseUrl ?? "https://api.inngest.com"}/v1/events/${eventId}/runs`, {
|
|
33
35
|
headers: {
|
|
34
36
|
Authorization: `Bearer ${process.env.INNGEST_SIGNING_KEY}`
|
|
35
37
|
}
|
|
@@ -56,6 +58,7 @@ var InngestRun = class extends Run {
|
|
|
56
58
|
runId: this.runId,
|
|
57
59
|
snapshot: {
|
|
58
60
|
runId: this.runId,
|
|
61
|
+
serializedStepGraph: this.serializedStepGraph,
|
|
59
62
|
value: {},
|
|
60
63
|
context: {},
|
|
61
64
|
activePaths: [],
|
|
@@ -188,6 +191,7 @@ var InngestWorkflow = class _InngestWorkflow extends Workflow {
|
|
|
188
191
|
runId: runIdToUse,
|
|
189
192
|
executionEngine: this.executionEngine,
|
|
190
193
|
executionGraph: this.executionGraph,
|
|
194
|
+
serializedStepGraph: this.serializedStepGraph,
|
|
191
195
|
mastra: this.#mastra,
|
|
192
196
|
retryConfig: this.retryConfig,
|
|
193
197
|
cleanup: () => this.runs.delete(runIdToUse)
|
|
@@ -233,6 +237,7 @@ var InngestWorkflow = class _InngestWorkflow extends Workflow {
|
|
|
233
237
|
workflowId: this.id,
|
|
234
238
|
runId,
|
|
235
239
|
graph: this.executionGraph,
|
|
240
|
+
serializedStepGraph: this.serializedStepGraph,
|
|
236
241
|
input: inputData,
|
|
237
242
|
emitter,
|
|
238
243
|
retryConfig: this.retryConfig,
|
|
@@ -619,7 +624,8 @@ var InngestExecutionEngine = class extends DefaultExecutionEngine {
|
|
|
619
624
|
workflowId,
|
|
620
625
|
runId,
|
|
621
626
|
stepResults,
|
|
622
|
-
executionContext
|
|
627
|
+
executionContext,
|
|
628
|
+
serializedStepGraph
|
|
623
629
|
}) {
|
|
624
630
|
await this.inngestStep.run(
|
|
625
631
|
`workflow.${workflowId}.run.${runId}.path.${JSON.stringify(executionContext.executionPath)}.stepUpdate`,
|
|
@@ -633,6 +639,7 @@ var InngestExecutionEngine = class extends DefaultExecutionEngine {
|
|
|
633
639
|
context: stepResults,
|
|
634
640
|
activePaths: [],
|
|
635
641
|
suspendedPaths: executionContext.suspendedPaths,
|
|
642
|
+
serializedStepGraph,
|
|
636
643
|
// @ts-ignore
|
|
637
644
|
timestamp: Date.now()
|
|
638
645
|
}
|
|
@@ -647,6 +654,7 @@ var InngestExecutionEngine = class extends DefaultExecutionEngine {
|
|
|
647
654
|
prevOutput,
|
|
648
655
|
prevStep,
|
|
649
656
|
stepResults,
|
|
657
|
+
serializedStepGraph,
|
|
650
658
|
resume,
|
|
651
659
|
executionContext,
|
|
652
660
|
emitter,
|
|
@@ -695,6 +703,7 @@ var InngestExecutionEngine = class extends DefaultExecutionEngine {
|
|
|
695
703
|
prevStep,
|
|
696
704
|
stepResults,
|
|
697
705
|
resume,
|
|
706
|
+
serializedStepGraph,
|
|
698
707
|
executionContext: {
|
|
699
708
|
workflowId,
|
|
700
709
|
runId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/inngest",
|
|
3
|
-
"version": "0.10.2-alpha.
|
|
3
|
+
"version": "0.10.2-alpha.3",
|
|
4
4
|
"description": "Mastra Inngest integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"tsup": "^8.4.0",
|
|
38
38
|
"typescript": "^5.8.2",
|
|
39
39
|
"vitest": "^2.1.9",
|
|
40
|
-
"@mastra/deployer": "0.10.2-alpha.
|
|
40
|
+
"@mastra/deployer": "0.10.2-alpha.5",
|
|
41
41
|
"@internal/lint": "0.0.7",
|
|
42
|
-
"@mastra/core": "0.10.2-alpha.
|
|
42
|
+
"@mastra/core": "0.10.2-alpha.5"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@mastra/core": "^0.10.0-alpha.0"
|
package/src/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
StepFlowEntry,
|
|
14
14
|
StepResult,
|
|
15
15
|
WorkflowResult,
|
|
16
|
+
SerializedStepFlowEntry,
|
|
16
17
|
} from '@mastra/core/workflows';
|
|
17
18
|
import { EMITTER_SYMBOL } from '@mastra/core/workflows/_constants';
|
|
18
19
|
import type { Span } from '@opentelemetry/api';
|
|
@@ -41,6 +42,7 @@ export class InngestRun<
|
|
|
41
42
|
TOutput extends z.ZodType<any> = z.ZodType<any>,
|
|
42
43
|
> extends Run<TSteps, TInput, TOutput> {
|
|
43
44
|
private inngest: Inngest;
|
|
45
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
44
46
|
#mastra: Mastra;
|
|
45
47
|
|
|
46
48
|
constructor(
|
|
@@ -49,6 +51,7 @@ export class InngestRun<
|
|
|
49
51
|
runId: string;
|
|
50
52
|
executionEngine: ExecutionEngine;
|
|
51
53
|
executionGraph: ExecutionGraph;
|
|
54
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
52
55
|
mastra?: Mastra;
|
|
53
56
|
retryConfig?: {
|
|
54
57
|
attempts?: number;
|
|
@@ -60,11 +63,12 @@ export class InngestRun<
|
|
|
60
63
|
) {
|
|
61
64
|
super(params);
|
|
62
65
|
this.inngest = inngest;
|
|
66
|
+
this.serializedStepGraph = params.serializedStepGraph;
|
|
63
67
|
this.#mastra = params.mastra!;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
async getRuns(eventId: string) {
|
|
67
|
-
const response = await fetch(`${this.inngest.apiBaseUrl}/v1/events/${eventId}/runs`, {
|
|
71
|
+
const response = await fetch(`${this.inngest.apiBaseUrl ?? 'https://api.inngest.com'}/v1/events/${eventId}/runs`, {
|
|
68
72
|
headers: {
|
|
69
73
|
Authorization: `Bearer ${process.env.INNGEST_SIGNING_KEY}`,
|
|
70
74
|
},
|
|
@@ -96,6 +100,7 @@ export class InngestRun<
|
|
|
96
100
|
runId: this.runId,
|
|
97
101
|
snapshot: {
|
|
98
102
|
runId: this.runId,
|
|
103
|
+
serializedStepGraph: this.serializedStepGraph,
|
|
99
104
|
value: {},
|
|
100
105
|
context: {} as any,
|
|
101
106
|
activePaths: [],
|
|
@@ -278,6 +283,7 @@ export class InngestWorkflow<
|
|
|
278
283
|
runId: runIdToUse,
|
|
279
284
|
executionEngine: this.executionEngine,
|
|
280
285
|
executionGraph: this.executionGraph,
|
|
286
|
+
serializedStepGraph: this.serializedStepGraph,
|
|
281
287
|
mastra: this.#mastra,
|
|
282
288
|
retryConfig: this.retryConfig,
|
|
283
289
|
cleanup: () => this.runs.delete(runIdToUse),
|
|
@@ -329,6 +335,7 @@ export class InngestWorkflow<
|
|
|
329
335
|
workflowId: this.id,
|
|
330
336
|
runId,
|
|
331
337
|
graph: this.executionGraph,
|
|
338
|
+
serializedStepGraph: this.serializedStepGraph,
|
|
332
339
|
input: inputData,
|
|
333
340
|
emitter,
|
|
334
341
|
retryConfig: this.retryConfig,
|
|
@@ -817,10 +824,12 @@ export class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
817
824
|
runId,
|
|
818
825
|
stepResults,
|
|
819
826
|
executionContext,
|
|
827
|
+
serializedStepGraph,
|
|
820
828
|
}: {
|
|
821
829
|
workflowId: string;
|
|
822
830
|
runId: string;
|
|
823
831
|
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
832
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
824
833
|
executionContext: ExecutionContext;
|
|
825
834
|
}) {
|
|
826
835
|
await this.inngestStep.run(
|
|
@@ -835,6 +844,7 @@ export class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
835
844
|
context: stepResults as any,
|
|
836
845
|
activePaths: [],
|
|
837
846
|
suspendedPaths: executionContext.suspendedPaths,
|
|
847
|
+
serializedStepGraph,
|
|
838
848
|
// @ts-ignore
|
|
839
849
|
timestamp: Date.now(),
|
|
840
850
|
},
|
|
@@ -850,6 +860,7 @@ export class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
850
860
|
prevOutput,
|
|
851
861
|
prevStep,
|
|
852
862
|
stepResults,
|
|
863
|
+
serializedStepGraph,
|
|
853
864
|
resume,
|
|
854
865
|
executionContext,
|
|
855
866
|
emitter,
|
|
@@ -859,6 +870,7 @@ export class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
859
870
|
runId: string;
|
|
860
871
|
entry: { type: 'conditional'; steps: StepFlowEntry[]; conditions: ExecuteFunction<any, any, any, any>[] };
|
|
861
872
|
prevStep: StepFlowEntry;
|
|
873
|
+
serializedStepGraph: SerializedStepFlowEntry[];
|
|
862
874
|
prevOutput: any;
|
|
863
875
|
stepResults: Record<string, StepResult<any, any, any, any>>;
|
|
864
876
|
resume?: {
|
|
@@ -920,6 +932,7 @@ export class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
920
932
|
prevStep,
|
|
921
933
|
stepResults,
|
|
922
934
|
resume,
|
|
935
|
+
serializedStepGraph,
|
|
923
936
|
executionContext: {
|
|
924
937
|
workflowId,
|
|
925
938
|
runId,
|