@mastra/inngest 0.0.0-redis-cloud-transporter-20250508194049 → 0.0.0-taofeeqInngest-20250603090617

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 CHANGED
@@ -1,6 +1,214 @@
1
1
  # @mastra/inngest
2
2
 
3
- ## 0.0.0-redis-cloud-transporter-20250508194049
3
+ ## 0.0.0-taofeeqInngest-20250603090617
4
+
5
+ ### Patch Changes
6
+
7
+ - 195c428: Add runId to step execute fn
8
+ - 12b7002: Add serializedStepGraph to workflow run snapshot in storage
9
+ - f0d559f: Fix peerdeps for alpha channel
10
+ - Updated dependencies [ee77e78]
11
+ - Updated dependencies [592a2db]
12
+ - Updated dependencies [e5dc18d]
13
+ - Updated dependencies [ab5adbe]
14
+ - Updated dependencies [1e8bb40]
15
+ - Updated dependencies [195c428]
16
+ - Updated dependencies [f73e11b]
17
+ - Updated dependencies [c5bf1ce]
18
+ - Updated dependencies [12b7002]
19
+ - Updated dependencies [2901125]
20
+ - @mastra/core@0.0.0-taofeeqInngest-20250603090617
21
+
22
+ ## 0.10.2-alpha.2
23
+
24
+ ### Patch Changes
25
+
26
+ - 12b7002: Add serializedStepGraph to workflow run snapshot in storage
27
+ - Updated dependencies [c5bf1ce]
28
+ - Updated dependencies [12b7002]
29
+ - @mastra/core@0.10.2-alpha.4
30
+
31
+ ## 0.10.2-alpha.1
32
+
33
+ ### Patch Changes
34
+
35
+ - 195c428: Add runId to step execute fn
36
+ - Updated dependencies [ab5adbe]
37
+ - Updated dependencies [195c428]
38
+ - Updated dependencies [f73e11b]
39
+ - @mastra/core@0.10.2-alpha.3
40
+
41
+ ## 0.10.2-alpha.0
42
+
43
+ ### Patch Changes
44
+
45
+ - f0d559f: Fix peerdeps for alpha channel
46
+ - Updated dependencies [1e8bb40]
47
+ - @mastra/core@0.10.2-alpha.2
48
+
49
+ ## 0.10.1
50
+
51
+ ### Patch Changes
52
+
53
+ - 200d0da: Return payload data, start time, end time, resume time and suspend time for each step in workflow state
54
+ Return error stack for failed workflow runs
55
+ - 5343f93: Move emitter to symbol to make private
56
+ - Updated dependencies [d70b807]
57
+ - Updated dependencies [6d16390]
58
+ - Updated dependencies [1e4a421]
59
+ - Updated dependencies [200d0da]
60
+ - Updated dependencies [bf5f17b]
61
+ - Updated dependencies [5343f93]
62
+ - Updated dependencies [38aee50]
63
+ - Updated dependencies [5c41100]
64
+ - Updated dependencies [d6a759b]
65
+ - Updated dependencies [6015bdf]
66
+ - @mastra/core@0.10.1
67
+
68
+ ## 0.10.1-alpha.0
69
+
70
+ ### Patch Changes
71
+
72
+ - 200d0da: Return payload data, start time, end time, resume time and suspend time for each step in workflow state
73
+ Return error stack for failed workflow runs
74
+ - 5343f93: Move emitter to symbol to make private
75
+ - Updated dependencies [200d0da]
76
+ - Updated dependencies [bf5f17b]
77
+ - Updated dependencies [5343f93]
78
+ - Updated dependencies [38aee50]
79
+ - Updated dependencies [5c41100]
80
+ - Updated dependencies [d6a759b]
81
+ - @mastra/core@0.10.1-alpha.1
82
+
83
+ ## 0.10.0
84
+
85
+ ### Minor Changes
86
+
87
+ - 83da932: Move @mastra/core to peerdeps
88
+
89
+ ### Patch Changes
90
+
91
+ - b3a3d63: BREAKING: Make vnext workflow the default worklow, and old workflow legacy_workflow
92
+ - e4172d9: Update getWorkflowRuns type for inngest workflow
93
+ - Updated dependencies [b3a3d63]
94
+ - Updated dependencies [344f453]
95
+ - Updated dependencies [0a3ae6d]
96
+ - Updated dependencies [95911be]
97
+ - Updated dependencies [f53a6ac]
98
+ - Updated dependencies [5eb5a99]
99
+ - Updated dependencies [7e632c5]
100
+ - Updated dependencies [1e9fbfa]
101
+ - Updated dependencies [eabdcd9]
102
+ - Updated dependencies [90be034]
103
+ - Updated dependencies [99f050a]
104
+ - Updated dependencies [d0ee3c6]
105
+ - Updated dependencies [b2ae5aa]
106
+ - Updated dependencies [23f258c]
107
+ - Updated dependencies [a7292b0]
108
+ - Updated dependencies [0dcb9f0]
109
+ - Updated dependencies [2672a05]
110
+ - @mastra/core@0.10.0
111
+
112
+ ## 0.1.0-alpha.1
113
+
114
+ ### Minor Changes
115
+
116
+ - 83da932: Move @mastra/core to peerdeps
117
+
118
+ ### Patch Changes
119
+
120
+ - b3a3d63: BREAKING: Make vnext workflow the default worklow, and old workflow legacy_workflow
121
+ - Updated dependencies [b3a3d63]
122
+ - Updated dependencies [344f453]
123
+ - Updated dependencies [0a3ae6d]
124
+ - Updated dependencies [95911be]
125
+ - Updated dependencies [5eb5a99]
126
+ - Updated dependencies [7e632c5]
127
+ - Updated dependencies [1e9fbfa]
128
+ - Updated dependencies [b2ae5aa]
129
+ - Updated dependencies [a7292b0]
130
+ - Updated dependencies [0dcb9f0]
131
+ - @mastra/core@0.10.0-alpha.1
132
+
133
+ ## 0.0.4-alpha.0
134
+
135
+ ### Patch Changes
136
+
137
+ - e4172d9: Update getWorkflowRuns type for inngest workflow
138
+ - Updated dependencies [f53a6ac]
139
+ - Updated dependencies [eabdcd9]
140
+ - Updated dependencies [90be034]
141
+ - Updated dependencies [99f050a]
142
+ - Updated dependencies [d0ee3c6]
143
+ - Updated dependencies [23f258c]
144
+ - Updated dependencies [2672a05]
145
+ - @mastra/core@0.9.5-alpha.0
146
+
147
+ ## 0.0.3
148
+
149
+ ### Patch Changes
150
+
151
+ - Updated dependencies [396be50]
152
+ - Updated dependencies [ab80e7e]
153
+ - Updated dependencies [c3bd795]
154
+ - Updated dependencies [da082f8]
155
+ - Updated dependencies [a5810ce]
156
+ - Updated dependencies [3e9c131]
157
+ - Updated dependencies [3171b5b]
158
+ - Updated dependencies [973e5ac]
159
+ - Updated dependencies [daf942f]
160
+ - Updated dependencies [0b8b868]
161
+ - Updated dependencies [9e1eff5]
162
+ - Updated dependencies [6fa1ad1]
163
+ - Updated dependencies [c28d7a0]
164
+ - Updated dependencies [edf1e88]
165
+ - @mastra/core@0.9.4
166
+
167
+ ## 0.0.3-alpha.4
168
+
169
+ ### Patch Changes
170
+
171
+ - Updated dependencies [3e9c131]
172
+ - @mastra/core@0.9.4-alpha.4
173
+
174
+ ## 0.0.3-alpha.3
175
+
176
+ ### Patch Changes
177
+
178
+ - Updated dependencies [396be50]
179
+ - Updated dependencies [c3bd795]
180
+ - Updated dependencies [da082f8]
181
+ - Updated dependencies [a5810ce]
182
+ - @mastra/core@0.9.4-alpha.3
183
+
184
+ ## 0.0.3-alpha.2
185
+
186
+ ### Patch Changes
187
+
188
+ - Updated dependencies [3171b5b]
189
+ - Updated dependencies [973e5ac]
190
+ - Updated dependencies [9e1eff5]
191
+ - @mastra/core@0.9.4-alpha.2
192
+
193
+ ## 0.0.3-alpha.1
194
+
195
+ ### Patch Changes
196
+
197
+ - Updated dependencies [ab80e7e]
198
+ - Updated dependencies [6fa1ad1]
199
+ - Updated dependencies [c28d7a0]
200
+ - Updated dependencies [edf1e88]
201
+ - @mastra/core@0.9.4-alpha.1
202
+
203
+ ## 0.0.3-alpha.0
204
+
205
+ ### Patch Changes
206
+
207
+ - Updated dependencies [daf942f]
208
+ - Updated dependencies [0b8b868]
209
+ - @mastra/core@0.9.4-alpha.0
210
+
211
+ ## 0.0.2
4
212
 
5
213
  ### Patch Changes
6
214
 
@@ -9,8 +217,21 @@
9
217
  - Updated dependencies [8902157]
10
218
  - Updated dependencies [ca0dc88]
11
219
  - Updated dependencies [526c570]
220
+ - Updated dependencies [d7a6a33]
12
221
  - Updated dependencies [9cd1a46]
13
222
  - Updated dependencies [b5d2de0]
14
223
  - Updated dependencies [644f8ad]
15
224
  - Updated dependencies [70dbf51]
16
- - @mastra/core@0.0.0-redis-cloud-transporter-20250508194049
225
+ - @mastra/core@0.9.3
226
+
227
+ ## 0.0.2-alpha.0
228
+
229
+ ### Patch Changes
230
+
231
+ - e450778: vnext: Inngest playground fixes
232
+ - Updated dependencies [e450778]
233
+ - Updated dependencies [8902157]
234
+ - Updated dependencies [ca0dc88]
235
+ - Updated dependencies [9cd1a46]
236
+ - Updated dependencies [70dbf51]
237
+ - @mastra/core@0.9.3-alpha.1
@@ -1,37 +1,38 @@
1
1
  import type { BaseContext } from 'inngest';
2
2
  import { ClientOptions } from 'inngest';
3
- import { cloneStep } from '@mastra/core/workflows/vNext';
4
- import { createStep } from '@mastra/core/workflows/vNext';
5
- import { DefaultExecutionEngine } from '@mastra/core/workflows/vNext';
6
- import type { ExecuteFunction } from '@mastra/core/workflows/vNext';
7
- import type { ExecutionContext } from '@mastra/core/workflows/vNext';
8
- import type { ExecutionEngine } from '@mastra/core/workflows/vNext';
9
- import type { ExecutionGraph } from '@mastra/core/workflows/vNext';
3
+ import { cloneStep } from '@mastra/core/workflows';
4
+ import { createStep } from '@mastra/core/workflows';
5
+ import { DefaultExecutionEngine } from '@mastra/core/workflows';
6
+ import type { ExecuteFunction } from '@mastra/core/workflows';
7
+ import type { ExecutionContext } from '@mastra/core/workflows';
8
+ import type { ExecutionEngine } from '@mastra/core/workflows';
9
+ import type { ExecutionGraph } from '@mastra/core/workflows';
10
10
  import { Handler } from 'inngest';
11
11
  import type { Inngest } from 'inngest';
12
12
  import { InngestFunction } from 'inngest';
13
13
  import { InngestMiddleware } from 'inngest';
14
14
  import type { Mastra } from '@mastra/core';
15
- import type { NewStep } from '@mastra/core/workflows/vNext';
16
- import { NewWorkflow } from '@mastra/core/workflows/vNext';
17
- import type { NewWorkflowConfig } from '@mastra/core/workflows/vNext';
18
- import { Run } from '@mastra/core/workflows/vNext';
15
+ import { Run } from '@mastra/core/workflows';
19
16
  import { RuntimeContext } from '@mastra/core/di';
17
+ import type { SerializedStepFlowEntry } from '@mastra/core/workflows';
20
18
  import { serve as serve_2 } from 'inngest/hono';
21
19
  import type { Span } from '@opentelemetry/api';
22
- import type { StepFlowEntry } from '@mastra/core/workflows/vNext';
23
- import type { StepResult } from '@mastra/core/workflows/vNext';
24
- import type { WorkflowResult } from '@mastra/core/workflows/vNext';
20
+ import type { Step } from '@mastra/core/workflows';
21
+ import type { StepFlowEntry } from '@mastra/core/workflows';
22
+ import type { StepResult } from '@mastra/core/workflows';
23
+ import { Workflow } from '@mastra/core/workflows';
24
+ import type { WorkflowConfig } from '@mastra/core/workflows';
25
+ import type { WorkflowResult } from '@mastra/core/workflows';
25
26
  import type { WorkflowRun } from '@mastra/core';
26
- import { WorkflowRuns } from '@mastra/core';
27
+ import type { WorkflowRuns } from '@mastra/core';
27
28
  import type { z } from 'zod';
28
29
 
29
- declare function cloneWorkflow<TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>, TSteps extends NewStep<string, any, any, any, any>[] = NewStep<string, any, any, any, any>[]>(workflow: InngestWorkflow<TSteps, string, TInput, TOutput>, opts: {
30
+ declare function cloneWorkflow<TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>, TSteps extends Step<string, any, any, any, any>[] = Step<string, any, any, any, any>[]>(workflow: InngestWorkflow<TSteps, string, TInput, TOutput>, opts: {
30
31
  id: TWorkflowId;
31
32
  }): InngestWorkflow<TSteps, TWorkflowId, TInput, TOutput>;
32
33
 
33
34
  export declare function init(inngest: Inngest): {
34
- createWorkflow<TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any, z.ZodTypeDef, any>, TOutput extends z.ZodType<any> = z.ZodType<any, z.ZodTypeDef, any>, TSteps extends NewStep<string, any, any>[] = NewStep<string, any, any, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>>[]>(params: NewWorkflowConfig<TWorkflowId, TInput, TOutput, TSteps>): InngestWorkflow<TSteps, TWorkflowId, TInput, TOutput, TInput>;
35
+ createWorkflow<TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any, z.ZodTypeDef, any>, TOutput extends z.ZodType<any> = z.ZodType<any, z.ZodTypeDef, any>, TSteps extends Step<string, any, any>[] = Step<string, any, any, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>>[]>(params: WorkflowConfig<TWorkflowId, TInput, TOutput, TSteps>): InngestWorkflow<TSteps, TWorkflowId, TInput, TOutput, TInput>;
35
36
  createStep: typeof createStep;
36
37
  cloneStep: typeof cloneStep;
37
38
  cloneWorkflow: typeof cloneWorkflow;
@@ -43,12 +44,12 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
43
44
  constructor(mastra: Mastra, inngestStep: BaseContext<Inngest>['step'], inngestAttempts?: number);
44
45
  protected fmtReturnValue<TOutput>(executionSpan: Span | undefined, emitter: {
45
46
  emit: (event: string, data: any) => Promise<void>;
46
- }, stepResults: Record<string, StepResult<any>>, lastOutput: StepResult<any>, error?: Error | string): Promise<TOutput>;
47
+ }, stepResults: Record<string, StepResult<any, any, any, any>>, lastOutput: StepResult<any, any, any, any>, error?: Error | string): Promise<TOutput>;
47
48
  superExecuteStep({ workflowId, runId, step, stepResults, executionContext, resume, prevOutput, emitter, runtimeContext, }: {
48
49
  workflowId: string;
49
50
  runId: string;
50
- step: NewStep<string, any, any>;
51
- stepResults: Record<string, StepResult<any>>;
51
+ step: Step<string, any, any>;
52
+ stepResults: Record<string, StepResult<any, any, any, any>>;
52
53
  executionContext: ExecutionContext;
53
54
  resume?: {
54
55
  steps: string[];
@@ -59,10 +60,10 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
59
60
  emit: (event: string, data: any) => Promise<void>;
60
61
  };
61
62
  runtimeContext: RuntimeContext;
62
- }): Promise<StepResult<any>>;
63
+ }): Promise<StepResult<any, any, any, any>>;
63
64
  executeStep({ step, stepResults, executionContext, resume, prevOutput, emitter, runtimeContext, }: {
64
- step: NewStep<string, any, any>;
65
- stepResults: Record<string, StepResult<any>>;
65
+ step: Step<string, any, any>;
66
+ stepResults: Record<string, StepResult<any, any, any, any>>;
66
67
  executionContext: {
67
68
  workflowId: string;
68
69
  runId: string;
@@ -83,14 +84,15 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
83
84
  emit: (event: string, data: any) => Promise<void>;
84
85
  };
85
86
  runtimeContext: RuntimeContext;
86
- }): Promise<StepResult<any>>;
87
- persistStepUpdate({ workflowId, runId, stepResults, executionContext, }: {
87
+ }): Promise<StepResult<any, any, any, any>>;
88
+ persistStepUpdate({ workflowId, runId, stepResults, executionContext, serializedStepGraph, }: {
88
89
  workflowId: string;
89
90
  runId: string;
90
- stepResults: Record<string, StepResult<any>>;
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,11 +101,12 @@ 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
- stepResults: Record<string, StepResult<any>>;
106
+ stepResults: Record<string, StepResult<any, any, any, any>>;
104
107
  resume?: {
105
108
  steps: string[];
106
- stepResults: Record<string, StepResult<any>>;
109
+ stepResults: Record<string, StepResult<any, any, any, any>>;
107
110
  resumePayload: any;
108
111
  resumePath: number[];
109
112
  };
@@ -112,17 +115,19 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
112
115
  emit: (event: string, data: any) => Promise<void>;
113
116
  };
114
117
  runtimeContext: RuntimeContext;
115
- }): Promise<StepResult<any>>;
118
+ }): Promise<StepResult<any, any, any, any>>;
116
119
  }
117
120
 
118
- export declare class InngestRun<TSteps extends NewStep<string, any, any>[] = NewStep<string, any, any>[], TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>> extends Run<TSteps, TInput, TOutput> {
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;
@@ -138,17 +143,17 @@ export declare class InngestRun<TSteps extends NewStep<string, any, any>[] = New
138
143
  }): Promise<WorkflowResult<TOutput, TSteps>>;
139
144
  resume<TResumeSchema extends z.ZodType<any>>(params: {
140
145
  resumeData?: z.infer<TResumeSchema>;
141
- step: NewStep<string, any, any, TResumeSchema, any> | [...NewStep<string, any, any, any, any>[], NewStep<string, any, any, TResumeSchema, any>] | string | string[];
146
+ step: Step<string, any, any, TResumeSchema, any> | [...Step<string, any, any, any, any>[], Step<string, any, any, TResumeSchema, any>] | string | string[];
142
147
  runtimeContext?: RuntimeContext;
143
148
  }): Promise<WorkflowResult<TOutput, TSteps>>;
144
149
  watch(cb: (event: any) => void): () => void;
145
150
  }
146
151
 
147
- export declare class InngestWorkflow<TSteps extends NewStep<string, any, any>[] = NewStep<string, any, any>[], TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>, TPrevSchema extends z.ZodType<any> = TInput> extends NewWorkflow<TSteps, TWorkflowId, TInput, TOutput, TPrevSchema> {
152
+ export declare class InngestWorkflow<TSteps extends Step<string, any, any>[] = Step<string, any, any>[], TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>, TPrevSchema extends z.ZodType<any> = TInput> extends Workflow<TSteps, TWorkflowId, TInput, TOutput, TPrevSchema> {
148
153
  #private;
149
154
  inngest: Inngest;
150
155
  private function;
151
- constructor(params: NewWorkflowConfig<TWorkflowId, TInput, TOutput, TSteps>, inngest: Inngest);
156
+ constructor(params: WorkflowConfig<TWorkflowId, TInput, TOutput, TSteps>, inngest: Inngest);
152
157
  getWorkflowRuns(args?: {
153
158
  fromDate?: Date;
154
159
  toDate?: Date;
@@ -1,37 +1,38 @@
1
1
  import type { BaseContext } from 'inngest';
2
2
  import { ClientOptions } from 'inngest';
3
- import { cloneStep } from '@mastra/core/workflows/vNext';
4
- import { createStep } from '@mastra/core/workflows/vNext';
5
- import { DefaultExecutionEngine } from '@mastra/core/workflows/vNext';
6
- import type { ExecuteFunction } from '@mastra/core/workflows/vNext';
7
- import type { ExecutionContext } from '@mastra/core/workflows/vNext';
8
- import type { ExecutionEngine } from '@mastra/core/workflows/vNext';
9
- import type { ExecutionGraph } from '@mastra/core/workflows/vNext';
3
+ import { cloneStep } from '@mastra/core/workflows';
4
+ import { createStep } from '@mastra/core/workflows';
5
+ import { DefaultExecutionEngine } from '@mastra/core/workflows';
6
+ import type { ExecuteFunction } from '@mastra/core/workflows';
7
+ import type { ExecutionContext } from '@mastra/core/workflows';
8
+ import type { ExecutionEngine } from '@mastra/core/workflows';
9
+ import type { ExecutionGraph } from '@mastra/core/workflows';
10
10
  import { Handler } from 'inngest';
11
11
  import type { Inngest } from 'inngest';
12
12
  import { InngestFunction } from 'inngest';
13
13
  import { InngestMiddleware } from 'inngest';
14
14
  import type { Mastra } from '@mastra/core';
15
- import type { NewStep } from '@mastra/core/workflows/vNext';
16
- import { NewWorkflow } from '@mastra/core/workflows/vNext';
17
- import type { NewWorkflowConfig } from '@mastra/core/workflows/vNext';
18
- import { Run } from '@mastra/core/workflows/vNext';
15
+ import { Run } from '@mastra/core/workflows';
19
16
  import { RuntimeContext } from '@mastra/core/di';
17
+ import type { SerializedStepFlowEntry } from '@mastra/core/workflows';
20
18
  import { serve as serve_2 } from 'inngest/hono';
21
19
  import type { Span } from '@opentelemetry/api';
22
- import type { StepFlowEntry } from '@mastra/core/workflows/vNext';
23
- import type { StepResult } from '@mastra/core/workflows/vNext';
24
- import type { WorkflowResult } from '@mastra/core/workflows/vNext';
20
+ import type { Step } from '@mastra/core/workflows';
21
+ import type { StepFlowEntry } from '@mastra/core/workflows';
22
+ import type { StepResult } from '@mastra/core/workflows';
23
+ import { Workflow } from '@mastra/core/workflows';
24
+ import type { WorkflowConfig } from '@mastra/core/workflows';
25
+ import type { WorkflowResult } from '@mastra/core/workflows';
25
26
  import type { WorkflowRun } from '@mastra/core';
26
- import { WorkflowRuns } from '@mastra/core';
27
+ import type { WorkflowRuns } from '@mastra/core';
27
28
  import type { z } from 'zod';
28
29
 
29
- declare function cloneWorkflow<TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>, TSteps extends NewStep<string, any, any, any, any>[] = NewStep<string, any, any, any, any>[]>(workflow: InngestWorkflow<TSteps, string, TInput, TOutput>, opts: {
30
+ declare function cloneWorkflow<TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>, TSteps extends Step<string, any, any, any, any>[] = Step<string, any, any, any, any>[]>(workflow: InngestWorkflow<TSteps, string, TInput, TOutput>, opts: {
30
31
  id: TWorkflowId;
31
32
  }): InngestWorkflow<TSteps, TWorkflowId, TInput, TOutput>;
32
33
 
33
34
  export declare function init(inngest: Inngest): {
34
- createWorkflow<TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any, z.ZodTypeDef, any>, TOutput extends z.ZodType<any> = z.ZodType<any, z.ZodTypeDef, any>, TSteps extends NewStep<string, any, any>[] = NewStep<string, any, any, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>>[]>(params: NewWorkflowConfig<TWorkflowId, TInput, TOutput, TSteps>): InngestWorkflow<TSteps, TWorkflowId, TInput, TOutput, TInput>;
35
+ createWorkflow<TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any, z.ZodTypeDef, any>, TOutput extends z.ZodType<any> = z.ZodType<any, z.ZodTypeDef, any>, TSteps extends Step<string, any, any>[] = Step<string, any, any, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>>[]>(params: WorkflowConfig<TWorkflowId, TInput, TOutput, TSteps>): InngestWorkflow<TSteps, TWorkflowId, TInput, TOutput, TInput>;
35
36
  createStep: typeof createStep;
36
37
  cloneStep: typeof cloneStep;
37
38
  cloneWorkflow: typeof cloneWorkflow;
@@ -43,12 +44,12 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
43
44
  constructor(mastra: Mastra, inngestStep: BaseContext<Inngest>['step'], inngestAttempts?: number);
44
45
  protected fmtReturnValue<TOutput>(executionSpan: Span | undefined, emitter: {
45
46
  emit: (event: string, data: any) => Promise<void>;
46
- }, stepResults: Record<string, StepResult<any>>, lastOutput: StepResult<any>, error?: Error | string): Promise<TOutput>;
47
+ }, stepResults: Record<string, StepResult<any, any, any, any>>, lastOutput: StepResult<any, any, any, any>, error?: Error | string): Promise<TOutput>;
47
48
  superExecuteStep({ workflowId, runId, step, stepResults, executionContext, resume, prevOutput, emitter, runtimeContext, }: {
48
49
  workflowId: string;
49
50
  runId: string;
50
- step: NewStep<string, any, any>;
51
- stepResults: Record<string, StepResult<any>>;
51
+ step: Step<string, any, any>;
52
+ stepResults: Record<string, StepResult<any, any, any, any>>;
52
53
  executionContext: ExecutionContext;
53
54
  resume?: {
54
55
  steps: string[];
@@ -59,10 +60,10 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
59
60
  emit: (event: string, data: any) => Promise<void>;
60
61
  };
61
62
  runtimeContext: RuntimeContext;
62
- }): Promise<StepResult<any>>;
63
+ }): Promise<StepResult<any, any, any, any>>;
63
64
  executeStep({ step, stepResults, executionContext, resume, prevOutput, emitter, runtimeContext, }: {
64
- step: NewStep<string, any, any>;
65
- stepResults: Record<string, StepResult<any>>;
65
+ step: Step<string, any, any>;
66
+ stepResults: Record<string, StepResult<any, any, any, any>>;
66
67
  executionContext: {
67
68
  workflowId: string;
68
69
  runId: string;
@@ -83,14 +84,15 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
83
84
  emit: (event: string, data: any) => Promise<void>;
84
85
  };
85
86
  runtimeContext: RuntimeContext;
86
- }): Promise<StepResult<any>>;
87
- persistStepUpdate({ workflowId, runId, stepResults, executionContext, }: {
87
+ }): Promise<StepResult<any, any, any, any>>;
88
+ persistStepUpdate({ workflowId, runId, stepResults, executionContext, serializedStepGraph, }: {
88
89
  workflowId: string;
89
90
  runId: string;
90
- stepResults: Record<string, StepResult<any>>;
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,11 +101,12 @@ 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
- stepResults: Record<string, StepResult<any>>;
106
+ stepResults: Record<string, StepResult<any, any, any, any>>;
104
107
  resume?: {
105
108
  steps: string[];
106
- stepResults: Record<string, StepResult<any>>;
109
+ stepResults: Record<string, StepResult<any, any, any, any>>;
107
110
  resumePayload: any;
108
111
  resumePath: number[];
109
112
  };
@@ -112,17 +115,19 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
112
115
  emit: (event: string, data: any) => Promise<void>;
113
116
  };
114
117
  runtimeContext: RuntimeContext;
115
- }): Promise<StepResult<any>>;
118
+ }): Promise<StepResult<any, any, any, any>>;
116
119
  }
117
120
 
118
- export declare class InngestRun<TSteps extends NewStep<string, any, any>[] = NewStep<string, any, any>[], TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>> extends Run<TSteps, TInput, TOutput> {
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;
@@ -138,17 +143,17 @@ export declare class InngestRun<TSteps extends NewStep<string, any, any>[] = New
138
143
  }): Promise<WorkflowResult<TOutput, TSteps>>;
139
144
  resume<TResumeSchema extends z.ZodType<any>>(params: {
140
145
  resumeData?: z.infer<TResumeSchema>;
141
- step: NewStep<string, any, any, TResumeSchema, any> | [...NewStep<string, any, any, any, any>[], NewStep<string, any, any, TResumeSchema, any>] | string | string[];
146
+ step: Step<string, any, any, TResumeSchema, any> | [...Step<string, any, any, any, any>[], Step<string, any, any, TResumeSchema, any>] | string | string[];
142
147
  runtimeContext?: RuntimeContext;
143
148
  }): Promise<WorkflowResult<TOutput, TSteps>>;
144
149
  watch(cb: (event: any) => void): () => void;
145
150
  }
146
151
 
147
- export declare class InngestWorkflow<TSteps extends NewStep<string, any, any>[] = NewStep<string, any, any>[], TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>, TPrevSchema extends z.ZodType<any> = TInput> extends NewWorkflow<TSteps, TWorkflowId, TInput, TOutput, TPrevSchema> {
152
+ export declare class InngestWorkflow<TSteps extends Step<string, any, any>[] = Step<string, any, any>[], TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>, TPrevSchema extends z.ZodType<any> = TInput> extends Workflow<TSteps, TWorkflowId, TInput, TOutput, TPrevSchema> {
148
153
  #private;
149
154
  inngest: Inngest;
150
155
  private function;
151
- constructor(params: NewWorkflowConfig<TWorkflowId, TInput, TOutput, TSteps>, inngest: Inngest);
156
+ constructor(params: WorkflowConfig<TWorkflowId, TInput, TOutput, TSteps>, inngest: Inngest);
152
157
  getWorkflowRuns(args?: {
153
158
  fromDate?: Date;
154
159
  toDate?: Date;