@mastra/inngest 0.0.0-add-runtime-context-to-openai-realtime-20250516201052 → 0.0.0-ai-v5-20250625014956

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,17 +1,300 @@
1
1
  # @mastra/inngest
2
2
 
3
- ## 0.0.0-add-runtime-context-to-openai-realtime-20250516201052
3
+ ## 0.0.0-ai-v5-20250625014956
4
+
5
+ ### Patch Changes
6
+
7
+ - 9d52b17: Fix inngest workflows streaming and add step metadata
8
+ - 4fb0cc2: Type safe variable mapping
9
+ - Updated dependencies [d1baedb]
10
+ - Updated dependencies [d8f2d19]
11
+ - Updated dependencies [4d21bf2]
12
+ - Updated dependencies [9d52b17]
13
+ - Updated dependencies [2097952]
14
+ - Updated dependencies [4fb0cc2]
15
+ - Updated dependencies [d2a7a31]
16
+ - Updated dependencies [8ba1b51]
17
+ - Updated dependencies [0e17048]
18
+ - @mastra/core@0.0.0-ai-v5-20250625014956
19
+
20
+ ## 0.10.6-alpha.1
21
+
22
+ ### Patch Changes
23
+
24
+ - 4fb0cc2: Type safe variable mapping
25
+ - Updated dependencies [d1baedb]
26
+ - Updated dependencies [4d21bf2]
27
+ - Updated dependencies [2097952]
28
+ - Updated dependencies [4fb0cc2]
29
+ - Updated dependencies [d2a7a31]
30
+ - Updated dependencies [0e17048]
31
+ - @mastra/core@0.10.7-alpha.1
32
+
33
+ ## 0.10.6-alpha.0
34
+
35
+ ### Patch Changes
36
+
37
+ - 9d52b17: Fix inngest workflows streaming and add step metadata
38
+ - Updated dependencies [d8f2d19]
39
+ - Updated dependencies [9d52b17]
40
+ - Updated dependencies [8ba1b51]
41
+ - @mastra/core@0.10.7-alpha.0
42
+
43
+ ## 0.10.5
44
+
45
+ ### Patch Changes
46
+
47
+ - 63f6b7d: dependencies updates:
48
+ - Updated dependency [`inngest@^3.39.1` ↗︎](https://www.npmjs.com/package/inngest/v/3.39.1) (from `^3.35.1`, in `dependencies`)
49
+ - Updated dependency [`zod@^3.25.57` ↗︎](https://www.npmjs.com/package/zod/v/3.25.57) (from `^3.25.56`, in `dependencies`)
50
+ - ee9af57: Add api for polling run execution result and get run by id
51
+ - Updated dependencies [63f6b7d]
52
+ - Updated dependencies [12a95fc]
53
+ - Updated dependencies [4b0f8a6]
54
+ - Updated dependencies [51264a5]
55
+ - Updated dependencies [8e6f677]
56
+ - Updated dependencies [d70c420]
57
+ - Updated dependencies [ee9af57]
58
+ - Updated dependencies [36f1c36]
59
+ - Updated dependencies [2a16996]
60
+ - Updated dependencies [10d352e]
61
+ - Updated dependencies [9589624]
62
+ - Updated dependencies [53d3c37]
63
+ - Updated dependencies [751c894]
64
+ - Updated dependencies [577ce3a]
65
+ - Updated dependencies [9260b3a]
66
+ - @mastra/core@0.10.6
67
+
68
+ ## 0.10.5-alpha.1
69
+
70
+ ### Patch Changes
71
+
72
+ - ee9af57: Add api for polling run execution result and get run by id
73
+ - Updated dependencies [ee9af57]
74
+ - Updated dependencies [751c894]
75
+ - Updated dependencies [577ce3a]
76
+ - Updated dependencies [9260b3a]
77
+ - @mastra/core@0.10.6-alpha.1
78
+
79
+ ## 0.10.5-alpha.0
80
+
81
+ ### Patch Changes
82
+
83
+ - 63f6b7d: dependencies updates:
84
+ - Updated dependency [`inngest@^3.39.1` ↗︎](https://www.npmjs.com/package/inngest/v/3.39.1) (from `^3.35.1`, in `dependencies`)
85
+ - Updated dependency [`zod@^3.25.57` ↗︎](https://www.npmjs.com/package/zod/v/3.25.57) (from `^3.25.56`, in `dependencies`)
86
+ - Updated dependencies [63f6b7d]
87
+ - Updated dependencies [36f1c36]
88
+ - Updated dependencies [10d352e]
89
+ - Updated dependencies [53d3c37]
90
+ - @mastra/core@0.10.6-alpha.0
91
+
92
+ ## 0.10.4
93
+
94
+ ### Patch Changes
95
+
96
+ - 13c97f9: Save run status, result and error in storage snapshot
97
+ - Updated dependencies [13c97f9]
98
+ - @mastra/core@0.10.5
99
+
100
+ ## 0.10.3
101
+
102
+ ### Patch Changes
103
+
104
+ - 1ccccff: dependencies updates:
105
+ - Updated dependency [`zod@^3.25.56` ↗︎](https://www.npmjs.com/package/zod/v/3.25.56) (from `^3.24.2`, in `dependencies`)
106
+ - 1ccccff: dependencies updates:
107
+ - Updated dependency [`zod@^3.25.56` ↗︎](https://www.npmjs.com/package/zod/v/3.25.56) (from `^3.24.2`, in `dependencies`)
108
+ - Updated dependencies [d1ed912]
109
+ - Updated dependencies [f6fd25f]
110
+ - Updated dependencies [dffb67b]
111
+ - Updated dependencies [f1f1f1b]
112
+ - Updated dependencies [925ab94]
113
+ - Updated dependencies [f9816ae]
114
+ - Updated dependencies [82090c1]
115
+ - Updated dependencies [1b443fd]
116
+ - Updated dependencies [ce97900]
117
+ - Updated dependencies [f1309d3]
118
+ - Updated dependencies [14a2566]
119
+ - Updated dependencies [f7f8293]
120
+ - Updated dependencies [48eddb9]
121
+ - @mastra/core@0.10.4
122
+
123
+ ## 0.10.3-alpha.0
124
+
125
+ ### Patch Changes
126
+
127
+ - 1ccccff: dependencies updates:
128
+ - Updated dependency [`zod@^3.25.56` ↗︎](https://www.npmjs.com/package/zod/v/3.25.56) (from `^3.24.2`, in `dependencies`)
129
+ - 1ccccff: dependencies updates:
130
+ - Updated dependency [`zod@^3.25.56` ↗︎](https://www.npmjs.com/package/zod/v/3.25.56) (from `^3.24.2`, in `dependencies`)
131
+ - Updated dependencies [f6fd25f]
132
+ - Updated dependencies [dffb67b]
133
+ - Updated dependencies [f1309d3]
134
+ - Updated dependencies [f7f8293]
135
+ - @mastra/core@0.10.4-alpha.1
136
+
137
+ ## 0.10.2
138
+
139
+ ### Patch Changes
140
+
141
+ - 195c428: Add runId to step execute fn
142
+ - 12b7002: Add serializedStepGraph to workflow run snapshot in storage
143
+ - f0d559f: Fix peerdeps for alpha channel
144
+ - 1ee6894: inngest production url fix
145
+ - Updated dependencies [ee77e78]
146
+ - Updated dependencies [592a2db]
147
+ - Updated dependencies [e5dc18d]
148
+ - Updated dependencies [ab5adbe]
149
+ - Updated dependencies [1e8bb40]
150
+ - Updated dependencies [1b5fc55]
151
+ - Updated dependencies [195c428]
152
+ - Updated dependencies [f73e11b]
153
+ - Updated dependencies [37643b8]
154
+ - Updated dependencies [99fd6cf]
155
+ - Updated dependencies [c5bf1ce]
156
+ - Updated dependencies [add596e]
157
+ - Updated dependencies [8dc94d8]
158
+ - Updated dependencies [ecebbeb]
159
+ - Updated dependencies [79d5145]
160
+ - Updated dependencies [12b7002]
161
+ - Updated dependencies [2901125]
162
+ - @mastra/core@0.10.2
163
+
164
+ ## 0.10.2-alpha.3
165
+
166
+ ### Patch Changes
167
+
168
+ - 1ee6894: inngest production url fix
169
+ - Updated dependencies [1b5fc55]
170
+ - Updated dependencies [add596e]
171
+ - Updated dependencies [ecebbeb]
172
+ - @mastra/core@0.10.2-alpha.5
173
+
174
+ ## 0.10.2-alpha.2
175
+
176
+ ### Patch Changes
177
+
178
+ - 12b7002: Add serializedStepGraph to workflow run snapshot in storage
179
+ - Updated dependencies [c5bf1ce]
180
+ - Updated dependencies [12b7002]
181
+ - @mastra/core@0.10.2-alpha.4
182
+
183
+ ## 0.10.2-alpha.1
184
+
185
+ ### Patch Changes
186
+
187
+ - 195c428: Add runId to step execute fn
188
+ - Updated dependencies [ab5adbe]
189
+ - Updated dependencies [195c428]
190
+ - Updated dependencies [f73e11b]
191
+ - @mastra/core@0.10.2-alpha.3
192
+
193
+ ## 0.10.2-alpha.0
194
+
195
+ ### Patch Changes
196
+
197
+ - f0d559f: Fix peerdeps for alpha channel
198
+ - Updated dependencies [1e8bb40]
199
+ - @mastra/core@0.10.2-alpha.2
200
+
201
+ ## 0.10.1
202
+
203
+ ### Patch Changes
204
+
205
+ - 200d0da: Return payload data, start time, end time, resume time and suspend time for each step in workflow state
206
+ Return error stack for failed workflow runs
207
+ - 5343f93: Move emitter to symbol to make private
208
+ - Updated dependencies [d70b807]
209
+ - Updated dependencies [6d16390]
210
+ - Updated dependencies [1e4a421]
211
+ - Updated dependencies [200d0da]
212
+ - Updated dependencies [bf5f17b]
213
+ - Updated dependencies [5343f93]
214
+ - Updated dependencies [38aee50]
215
+ - Updated dependencies [5c41100]
216
+ - Updated dependencies [d6a759b]
217
+ - Updated dependencies [6015bdf]
218
+ - @mastra/core@0.10.1
219
+
220
+ ## 0.10.1-alpha.0
221
+
222
+ ### Patch Changes
223
+
224
+ - 200d0da: Return payload data, start time, end time, resume time and suspend time for each step in workflow state
225
+ Return error stack for failed workflow runs
226
+ - 5343f93: Move emitter to symbol to make private
227
+ - Updated dependencies [200d0da]
228
+ - Updated dependencies [bf5f17b]
229
+ - Updated dependencies [5343f93]
230
+ - Updated dependencies [38aee50]
231
+ - Updated dependencies [5c41100]
232
+ - Updated dependencies [d6a759b]
233
+ - @mastra/core@0.10.1-alpha.1
234
+
235
+ ## 0.10.0
236
+
237
+ ### Minor Changes
238
+
239
+ - 83da932: Move @mastra/core to peerdeps
240
+
241
+ ### Patch Changes
242
+
243
+ - b3a3d63: BREAKING: Make vnext workflow the default worklow, and old workflow legacy_workflow
244
+ - e4172d9: Update getWorkflowRuns type for inngest workflow
245
+ - Updated dependencies [b3a3d63]
246
+ - Updated dependencies [344f453]
247
+ - Updated dependencies [0a3ae6d]
248
+ - Updated dependencies [95911be]
249
+ - Updated dependencies [f53a6ac]
250
+ - Updated dependencies [5eb5a99]
251
+ - Updated dependencies [7e632c5]
252
+ - Updated dependencies [1e9fbfa]
253
+ - Updated dependencies [eabdcd9]
254
+ - Updated dependencies [90be034]
255
+ - Updated dependencies [99f050a]
256
+ - Updated dependencies [d0ee3c6]
257
+ - Updated dependencies [b2ae5aa]
258
+ - Updated dependencies [23f258c]
259
+ - Updated dependencies [a7292b0]
260
+ - Updated dependencies [0dcb9f0]
261
+ - Updated dependencies [2672a05]
262
+ - @mastra/core@0.10.0
263
+
264
+ ## 0.1.0-alpha.1
265
+
266
+ ### Minor Changes
267
+
268
+ - 83da932: Move @mastra/core to peerdeps
269
+
270
+ ### Patch Changes
271
+
272
+ - b3a3d63: BREAKING: Make vnext workflow the default worklow, and old workflow legacy_workflow
273
+ - Updated dependencies [b3a3d63]
274
+ - Updated dependencies [344f453]
275
+ - Updated dependencies [0a3ae6d]
276
+ - Updated dependencies [95911be]
277
+ - Updated dependencies [5eb5a99]
278
+ - Updated dependencies [7e632c5]
279
+ - Updated dependencies [1e9fbfa]
280
+ - Updated dependencies [b2ae5aa]
281
+ - Updated dependencies [a7292b0]
282
+ - Updated dependencies [0dcb9f0]
283
+ - @mastra/core@0.10.0-alpha.1
284
+
285
+ ## 0.0.4-alpha.0
4
286
 
5
287
  ### Patch Changes
6
288
 
7
289
  - e4172d9: Update getWorkflowRuns type for inngest workflow
8
290
  - Updated dependencies [f53a6ac]
9
291
  - Updated dependencies [eabdcd9]
292
+ - Updated dependencies [90be034]
10
293
  - Updated dependencies [99f050a]
11
294
  - Updated dependencies [d0ee3c6]
12
295
  - Updated dependencies [23f258c]
13
296
  - Updated dependencies [2672a05]
14
- - @mastra/core@0.0.0-add-runtime-context-to-openai-realtime-20250516201052
297
+ - @mastra/core@0.9.5-alpha.0
15
298
 
16
299
  ## 0.0.3
17
300
 
@@ -1,68 +1,122 @@
1
+ import type { Agent } from '@mastra/core';
1
2
  import type { BaseContext } from 'inngest';
2
3
  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';
4
+ import { DefaultExecutionEngine } from '@mastra/core/workflows';
5
+ import type { Emitter } 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 { VNextWorkflowRun } from '@mastra/core';
25
- import type { VNextWorkflowRuns } from '@mastra/core';
26
- import type { WorkflowResult } from '@mastra/core/workflows/vNext';
27
- import type { z } from 'zod';
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 type { StreamEvent } from '@mastra/core/workflows';
24
+ import { Tool } from '@mastra/core/tools';
25
+ import type { ToolExecutionContext } from '@mastra/core';
26
+ import type { WatchEvent } from '@mastra/core/workflows';
27
+ import { Workflow } from '@mastra/core/workflows';
28
+ import type { WorkflowConfig } from '@mastra/core/workflows';
29
+ import type { WorkflowResult } from '@mastra/core/workflows';
30
+ import type { WorkflowRun } from '@mastra/core';
31
+ import type { WorkflowRuns } from '@mastra/core';
32
+ import { z } from 'zod';
28
33
 
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
- id: TWorkflowId;
31
- }): InngestWorkflow<TSteps, TWorkflowId, TInput, TOutput>;
34
+ export declare function createStep<TStepId extends string, TStepInput extends z.ZodType<any>, TStepOutput extends z.ZodType<any>, TResumeSchema extends z.ZodType<any>, TSuspendSchema extends z.ZodType<any>>(params: {
35
+ id: TStepId;
36
+ description?: string;
37
+ inputSchema: TStepInput;
38
+ outputSchema: TStepOutput;
39
+ resumeSchema?: TResumeSchema;
40
+ suspendSchema?: TSuspendSchema;
41
+ execute: ExecuteFunction<z.infer<TStepInput>, z.infer<TStepOutput>, z.infer<TResumeSchema>, z.infer<TSuspendSchema>, InngestEngineType>;
42
+ }): Step<TStepId, TStepInput, TStepOutput, TResumeSchema, TSuspendSchema, InngestEngineType>;
43
+
44
+ export declare function createStep<TStepId extends string, TStepInput extends z.ZodObject<{
45
+ prompt: z.ZodString;
46
+ }>, TStepOutput extends z.ZodObject<{
47
+ text: z.ZodString;
48
+ }>, TResumeSchema extends z.ZodType<any>, TSuspendSchema extends z.ZodType<any>>(agent: Agent<TStepId, any, any>): Step<TStepId, TStepInput, TStepOutput, TResumeSchema, TSuspendSchema, InngestEngineType>;
49
+
50
+ export declare function createStep<TSchemaIn extends z.ZodType<any>, TSchemaOut extends z.ZodType<any>, TContext extends ToolExecutionContext<TSchemaIn>>(tool: Tool<TSchemaIn, TSchemaOut, TContext> & {
51
+ inputSchema: TSchemaIn;
52
+ outputSchema: TSchemaOut;
53
+ execute: (context: TContext) => Promise<any>;
54
+ }): Step<string, TSchemaIn, TSchemaOut, z.ZodType<any>, z.ZodType<any>, InngestEngineType>;
32
55
 
33
56
  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>;
57
+ 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, any, any, InngestEngineType>[] = Step<string, any, any, any, any, InngestEngineType>[]>(params: WorkflowConfig<TWorkflowId, TInput, TOutput, TSteps>): InngestWorkflow<InngestEngineType, TSteps, TWorkflowId, TInput, TOutput, TInput>;
35
58
  createStep: typeof createStep;
36
- cloneStep: typeof cloneStep;
37
- cloneWorkflow: typeof cloneWorkflow;
59
+ cloneStep<TStepId extends string>(step: Step<string, any, any, any, any, InngestEngineType>, opts: {
60
+ id: TStepId;
61
+ }): Step<TStepId, any, any, any, any, InngestEngineType>;
62
+ cloneWorkflow<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, any, any, InngestEngineType>[] = Step<string, any, any, any, any, InngestEngineType>[], TPrevSchema extends z.ZodType<any> = TInput>(workflow: Workflow<InngestEngineType, TSteps, string, TInput, TOutput, TPrevSchema>, opts: {
63
+ id: TWorkflowId;
64
+ }): Workflow<InngestEngineType, TSteps, TWorkflowId, TInput, TOutput, TPrevSchema>;
65
+ };
66
+
67
+ export declare type InngestEngineType = {
68
+ step: any;
38
69
  };
39
70
 
40
71
  export declare class InngestExecutionEngine extends DefaultExecutionEngine {
41
72
  private inngestStep;
42
73
  private inngestAttempts;
43
74
  constructor(mastra: Mastra, inngestStep: BaseContext<Inngest>['step'], inngestAttempts?: number);
44
- protected fmtReturnValue<TOutput>(executionSpan: Span | undefined, emitter: {
45
- emit: (event: string, data: any) => Promise<void>;
46
- }, stepResults: Record<string, StepResult<any>>, lastOutput: StepResult<any>, error?: Error | string): Promise<TOutput>;
75
+ execute<TInput, TOutput>(params: {
76
+ workflowId: string;
77
+ runId: string;
78
+ graph: ExecutionGraph;
79
+ serializedStepGraph: SerializedStepFlowEntry[];
80
+ input?: TInput;
81
+ resume?: {
82
+ steps: string[];
83
+ stepResults: Record<string, StepResult<any, any, any, any>>;
84
+ resumePayload: any;
85
+ resumePath: number[];
86
+ };
87
+ emitter: Emitter;
88
+ retryConfig?: {
89
+ attempts?: number;
90
+ delay?: number;
91
+ };
92
+ runtimeContext: RuntimeContext;
93
+ }): Promise<TOutput>;
94
+ protected fmtReturnValue<TOutput>(executionSpan: Span | undefined, emitter: Emitter, stepResults: Record<string, StepResult<any, any, any, any>>, lastOutput: StepResult<any, any, any, any>, error?: Error | string): Promise<TOutput>;
47
95
  superExecuteStep({ workflowId, runId, step, stepResults, executionContext, resume, prevOutput, emitter, runtimeContext, }: {
48
96
  workflowId: string;
49
97
  runId: string;
50
- step: NewStep<string, any, any>;
51
- stepResults: Record<string, StepResult<any>>;
98
+ step: Step<string, any, any>;
99
+ stepResults: Record<string, StepResult<any, any, any, any>>;
52
100
  executionContext: ExecutionContext;
53
101
  resume?: {
54
102
  steps: string[];
55
103
  resumePayload: any;
56
104
  };
57
105
  prevOutput: any;
58
- emitter: {
59
- emit: (event: string, data: any) => Promise<void>;
60
- };
106
+ emitter: Emitter;
61
107
  runtimeContext: RuntimeContext;
62
- }): Promise<StepResult<any>>;
108
+ }): Promise<StepResult<any, any, any, any>>;
109
+ executeSleep({ id, duration }: {
110
+ id: string;
111
+ duration: number;
112
+ }): Promise<void>;
113
+ executeWaitForEvent({ event, timeout }: {
114
+ event: string;
115
+ timeout?: number;
116
+ }): Promise<any>;
63
117
  executeStep({ step, stepResults, executionContext, resume, prevOutput, emitter, runtimeContext, }: {
64
- step: NewStep<string, any, any>;
65
- stepResults: Record<string, StepResult<any>>;
118
+ step: Step<string, any, any>;
119
+ stepResults: Record<string, StepResult<any, any, any, any>>;
66
120
  executionContext: {
67
121
  workflowId: string;
68
122
  runId: string;
@@ -79,50 +133,53 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
79
133
  runId?: string;
80
134
  };
81
135
  prevOutput: any;
82
- emitter: {
83
- emit: (event: string, data: any) => Promise<void>;
84
- };
136
+ emitter: Emitter;
85
137
  runtimeContext: RuntimeContext;
86
- }): Promise<StepResult<any>>;
87
- persistStepUpdate({ workflowId, runId, stepResults, executionContext, }: {
138
+ }): Promise<StepResult<any, any, any, any>>;
139
+ persistStepUpdate({ workflowId, runId, stepResults, executionContext, serializedStepGraph, workflowStatus, result, error, }: {
88
140
  workflowId: string;
89
141
  runId: string;
90
- stepResults: Record<string, StepResult<any>>;
142
+ stepResults: Record<string, StepResult<any, any, any, any>>;
143
+ serializedStepGraph: SerializedStepFlowEntry[];
91
144
  executionContext: ExecutionContext;
145
+ workflowStatus: 'success' | 'failed' | 'suspended' | 'running';
146
+ result?: Record<string, any>;
147
+ error?: string | Error;
92
148
  }): Promise<void>;
93
- executeConditional({ workflowId, runId, entry, prevOutput, prevStep, stepResults, resume, executionContext, emitter, runtimeContext, }: {
149
+ executeConditional({ workflowId, runId, entry, prevOutput, prevStep, stepResults, serializedStepGraph, resume, executionContext, emitter, runtimeContext, }: {
94
150
  workflowId: string;
95
151
  runId: string;
96
152
  entry: {
97
153
  type: 'conditional';
98
154
  steps: StepFlowEntry[];
99
- conditions: ExecuteFunction<any, any, any, any>[];
155
+ conditions: ExecuteFunction<any, any, any, any, InngestEngineType>[];
100
156
  };
101
157
  prevStep: StepFlowEntry;
158
+ serializedStepGraph: SerializedStepFlowEntry[];
102
159
  prevOutput: any;
103
- stepResults: Record<string, StepResult<any>>;
160
+ stepResults: Record<string, StepResult<any, any, any, any>>;
104
161
  resume?: {
105
162
  steps: string[];
106
- stepResults: Record<string, StepResult<any>>;
163
+ stepResults: Record<string, StepResult<any, any, any, any>>;
107
164
  resumePayload: any;
108
165
  resumePath: number[];
109
166
  };
110
167
  executionContext: ExecutionContext;
111
- emitter: {
112
- emit: (event: string, data: any) => Promise<void>;
113
- };
168
+ emitter: Emitter;
114
169
  runtimeContext: RuntimeContext;
115
- }): Promise<StepResult<any>>;
170
+ }): Promise<StepResult<any, any, any, any>>;
116
171
  }
117
172
 
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> {
173
+ export declare class InngestRun<TEngineType = InngestEngineType, 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<TEngineType, TSteps, TInput, TOutput> {
119
174
  #private;
120
175
  private inngest;
176
+ serializedStepGraph: SerializedStepFlowEntry[];
121
177
  constructor(params: {
122
178
  workflowId: string;
123
179
  runId: string;
124
180
  executionEngine: ExecutionEngine;
125
181
  executionGraph: ExecutionGraph;
182
+ serializedStepGraph: SerializedStepFlowEntry[];
126
183
  mastra?: Mastra;
127
184
  retryConfig?: {
128
185
  attempts?: number;
@@ -132,35 +189,49 @@ export declare class InngestRun<TSteps extends NewStep<string, any, any>[] = New
132
189
  }, inngest: Inngest);
133
190
  getRuns(eventId: string): Promise<any>;
134
191
  getRunOutput(eventId: string): Promise<any>;
192
+ sendEvent(event: string, data: any): Promise<void>;
135
193
  start({ inputData, }: {
136
194
  inputData?: z.infer<TInput>;
137
195
  runtimeContext?: RuntimeContext;
138
196
  }): Promise<WorkflowResult<TOutput, TSteps>>;
139
197
  resume<TResumeSchema extends z.ZodType<any>>(params: {
140
198
  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[];
199
+ step: Step<string, any, any, TResumeSchema, any> | [...Step<string, any, any, any, any>[], Step<string, any, any, TResumeSchema, any>] | string | string[];
200
+ runtimeContext?: RuntimeContext;
201
+ }): Promise<WorkflowResult<TOutput, TSteps>>;
202
+ _resume<TResumeSchema extends z.ZodType<any>>(params: {
203
+ resumeData?: z.infer<TResumeSchema>;
204
+ step: Step<string, any, any, TResumeSchema, any> | [...Step<string, any, any, any, any>[], Step<string, any, any, TResumeSchema, any>] | string | string[];
142
205
  runtimeContext?: RuntimeContext;
143
206
  }): Promise<WorkflowResult<TOutput, TSteps>>;
144
- watch(cb: (event: any) => void): () => void;
207
+ watch(cb: (event: WatchEvent) => void, type?: 'watch' | 'watch-v2'): () => void;
208
+ stream({ inputData, runtimeContext }?: {
209
+ inputData?: z.infer<TInput>;
210
+ runtimeContext?: RuntimeContext;
211
+ }): {
212
+ stream: ReadableStream<StreamEvent>;
213
+ getWorkflowState: () => Promise<WorkflowResult<TOutput, TSteps>>;
214
+ };
145
215
  }
146
216
 
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> {
217
+ export declare class InngestWorkflow<TEngineType = InngestEngineType, 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<TEngineType, TSteps, TWorkflowId, TInput, TOutput, TPrevSchema> {
148
218
  #private;
149
219
  inngest: Inngest;
150
220
  private function;
151
- constructor(params: NewWorkflowConfig<TWorkflowId, TInput, TOutput, TSteps>, inngest: Inngest);
221
+ constructor(params: WorkflowConfig<TWorkflowId, TInput, TOutput, TSteps>, inngest: Inngest);
152
222
  getWorkflowRuns(args?: {
153
223
  fromDate?: Date;
154
224
  toDate?: Date;
155
225
  limit?: number;
156
226
  offset?: number;
157
227
  resourceId?: string;
158
- }): Promise<VNextWorkflowRuns>;
159
- getWorkflowRunById(runId: string): Promise<VNextWorkflowRun | null>;
228
+ }): Promise<WorkflowRuns>;
229
+ getWorkflowRunById(runId: string): Promise<WorkflowRun | null>;
230
+ getWorkflowRunExecutionResult(runId: string): Promise<WatchEvent['payload']['workflowState'] | null>;
160
231
  __registerMastra(mastra: Mastra): void;
161
232
  createRun(options?: {
162
233
  runId?: string;
163
- }): Run<TSteps, TInput, TOutput>;
234
+ }): Run<TEngineType, TSteps, TInput, TOutput>;
164
235
  getFunction(): InngestFunction<Omit<InngestFunction.Options<Inngest<ClientOptions>, InngestMiddleware.Stack, InngestFunction.Trigger<string>[] | [{
165
236
  cron: string;
166
237
  } & Partial<Record<"event" | "if", never>>] | [{