@mastra/inngest 0.0.0-taofeeqInngest-20250603090617 → 0.0.0-tool-call-parts-20250630193309

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,23 +1,235 @@
1
1
  # @mastra/inngest
2
2
 
3
- ## 0.0.0-taofeeqInngest-20250603090617
3
+ ## 0.0.0-tool-call-parts-20250630193309
4
+
5
+ ### Patch Changes
6
+
7
+ - 764f86a: Introduces the runCount property in the execution parameters for the steps execute function
8
+ - 1760a1c: Use workflow stream in playground instead of watch
9
+ - Updated dependencies [9dda1ac]
10
+ - Updated dependencies [7e801dd]
11
+ - Updated dependencies [7aa70a4]
12
+ - Updated dependencies [764f86a]
13
+ - Updated dependencies [1760a1c]
14
+ - Updated dependencies [7dda16a]
15
+ - Updated dependencies [d80069a]
16
+ - Updated dependencies [57929df]
17
+ - Updated dependencies [6320a61]
18
+ - @mastra/core@0.0.0-tool-call-parts-20250630193309
19
+
20
+ ## 0.11.0
21
+
22
+ ### Minor Changes
23
+
24
+ - 8a3bfd2: Update peerdeps to latest core
25
+
26
+ ### Patch Changes
27
+
28
+ - 8e1b6e9: dependencies updates:
29
+ - Updated dependency [`zod@^3.25.67` ↗︎](https://www.npmjs.com/package/zod/v/3.25.67) (from `^3.25.57`, in `dependencies`)
30
+ - 9d52b17: Fix inngest workflows streaming and add step metadata
31
+ - 4fb0cc2: Type safe variable mapping
32
+ - 502fe05: createRun() -> createRunAsync()
33
+ - 4efcfa0: Added bail() method and more ergonomic suspend function return value
34
+ - Updated dependencies [15e9d26]
35
+ - Updated dependencies [d1baedb]
36
+ - Updated dependencies [d8f2d19]
37
+ - Updated dependencies [4d21bf2]
38
+ - Updated dependencies [07d6d88]
39
+ - Updated dependencies [9d52b17]
40
+ - Updated dependencies [2097952]
41
+ - Updated dependencies [792c4c0]
42
+ - Updated dependencies [5d74aab]
43
+ - Updated dependencies [a8b194f]
44
+ - Updated dependencies [4fb0cc2]
45
+ - Updated dependencies [d2a7a31]
46
+ - Updated dependencies [502fe05]
47
+ - Updated dependencies [144eb0b]
48
+ - Updated dependencies [8ba1b51]
49
+ - Updated dependencies [4efcfa0]
50
+ - Updated dependencies [0e17048]
51
+ - @mastra/core@0.10.7
52
+
53
+ ## 0.11.0-alpha.3
54
+
55
+ ### Minor Changes
56
+
57
+ - 8a3bfd2: Update peerdeps to latest core
58
+
59
+ ### Patch Changes
60
+
61
+ - 502fe05: createRun() -> createRunAsync()
62
+ - 4efcfa0: Added bail() method and more ergonomic suspend function return value
63
+ - Updated dependencies [792c4c0]
64
+ - Updated dependencies [502fe05]
65
+ - Updated dependencies [4efcfa0]
66
+ - @mastra/core@0.10.7-alpha.3
67
+
68
+ ## 0.10.6-alpha.2
69
+
70
+ ### Patch Changes
71
+
72
+ - 8e1b6e9: dependencies updates:
73
+ - Updated dependency [`zod@^3.25.67` ↗︎](https://www.npmjs.com/package/zod/v/3.25.67) (from `^3.25.57`, in `dependencies`)
74
+ - Updated dependencies [15e9d26]
75
+ - Updated dependencies [07d6d88]
76
+ - Updated dependencies [5d74aab]
77
+ - Updated dependencies [144eb0b]
78
+ - @mastra/core@0.10.7-alpha.2
79
+
80
+ ## 0.10.6-alpha.1
81
+
82
+ ### Patch Changes
83
+
84
+ - 4fb0cc2: Type safe variable mapping
85
+ - Updated dependencies [d1baedb]
86
+ - Updated dependencies [4d21bf2]
87
+ - Updated dependencies [2097952]
88
+ - Updated dependencies [4fb0cc2]
89
+ - Updated dependencies [d2a7a31]
90
+ - Updated dependencies [0e17048]
91
+ - @mastra/core@0.10.7-alpha.1
92
+
93
+ ## 0.10.6-alpha.0
94
+
95
+ ### Patch Changes
96
+
97
+ - 9d52b17: Fix inngest workflows streaming and add step metadata
98
+ - Updated dependencies [d8f2d19]
99
+ - Updated dependencies [9d52b17]
100
+ - Updated dependencies [8ba1b51]
101
+ - @mastra/core@0.10.7-alpha.0
102
+
103
+ ## 0.10.5
104
+
105
+ ### Patch Changes
106
+
107
+ - 63f6b7d: dependencies updates:
108
+ - Updated dependency [`inngest@^3.39.1` ↗︎](https://www.npmjs.com/package/inngest/v/3.39.1) (from `^3.35.1`, in `dependencies`)
109
+ - Updated dependency [`zod@^3.25.57` ↗︎](https://www.npmjs.com/package/zod/v/3.25.57) (from `^3.25.56`, in `dependencies`)
110
+ - ee9af57: Add api for polling run execution result and get run by id
111
+ - Updated dependencies [63f6b7d]
112
+ - Updated dependencies [12a95fc]
113
+ - Updated dependencies [4b0f8a6]
114
+ - Updated dependencies [51264a5]
115
+ - Updated dependencies [8e6f677]
116
+ - Updated dependencies [d70c420]
117
+ - Updated dependencies [ee9af57]
118
+ - Updated dependencies [36f1c36]
119
+ - Updated dependencies [2a16996]
120
+ - Updated dependencies [10d352e]
121
+ - Updated dependencies [9589624]
122
+ - Updated dependencies [53d3c37]
123
+ - Updated dependencies [751c894]
124
+ - Updated dependencies [577ce3a]
125
+ - Updated dependencies [9260b3a]
126
+ - @mastra/core@0.10.6
127
+
128
+ ## 0.10.5-alpha.1
129
+
130
+ ### Patch Changes
131
+
132
+ - ee9af57: Add api for polling run execution result and get run by id
133
+ - Updated dependencies [ee9af57]
134
+ - Updated dependencies [751c894]
135
+ - Updated dependencies [577ce3a]
136
+ - Updated dependencies [9260b3a]
137
+ - @mastra/core@0.10.6-alpha.1
138
+
139
+ ## 0.10.5-alpha.0
140
+
141
+ ### Patch Changes
142
+
143
+ - 63f6b7d: dependencies updates:
144
+ - Updated dependency [`inngest@^3.39.1` ↗︎](https://www.npmjs.com/package/inngest/v/3.39.1) (from `^3.35.1`, in `dependencies`)
145
+ - Updated dependency [`zod@^3.25.57` ↗︎](https://www.npmjs.com/package/zod/v/3.25.57) (from `^3.25.56`, in `dependencies`)
146
+ - Updated dependencies [63f6b7d]
147
+ - Updated dependencies [36f1c36]
148
+ - Updated dependencies [10d352e]
149
+ - Updated dependencies [53d3c37]
150
+ - @mastra/core@0.10.6-alpha.0
151
+
152
+ ## 0.10.4
153
+
154
+ ### Patch Changes
155
+
156
+ - 13c97f9: Save run status, result and error in storage snapshot
157
+ - Updated dependencies [13c97f9]
158
+ - @mastra/core@0.10.5
159
+
160
+ ## 0.10.3
161
+
162
+ ### Patch Changes
163
+
164
+ - 1ccccff: dependencies updates:
165
+ - Updated dependency [`zod@^3.25.56` ↗︎](https://www.npmjs.com/package/zod/v/3.25.56) (from `^3.24.2`, in `dependencies`)
166
+ - 1ccccff: dependencies updates:
167
+ - Updated dependency [`zod@^3.25.56` ↗︎](https://www.npmjs.com/package/zod/v/3.25.56) (from `^3.24.2`, in `dependencies`)
168
+ - Updated dependencies [d1ed912]
169
+ - Updated dependencies [f6fd25f]
170
+ - Updated dependencies [dffb67b]
171
+ - Updated dependencies [f1f1f1b]
172
+ - Updated dependencies [925ab94]
173
+ - Updated dependencies [f9816ae]
174
+ - Updated dependencies [82090c1]
175
+ - Updated dependencies [1b443fd]
176
+ - Updated dependencies [ce97900]
177
+ - Updated dependencies [f1309d3]
178
+ - Updated dependencies [14a2566]
179
+ - Updated dependencies [f7f8293]
180
+ - Updated dependencies [48eddb9]
181
+ - @mastra/core@0.10.4
182
+
183
+ ## 0.10.3-alpha.0
184
+
185
+ ### Patch Changes
186
+
187
+ - 1ccccff: dependencies updates:
188
+ - Updated dependency [`zod@^3.25.56` ↗︎](https://www.npmjs.com/package/zod/v/3.25.56) (from `^3.24.2`, in `dependencies`)
189
+ - 1ccccff: dependencies updates:
190
+ - Updated dependency [`zod@^3.25.56` ↗︎](https://www.npmjs.com/package/zod/v/3.25.56) (from `^3.24.2`, in `dependencies`)
191
+ - Updated dependencies [f6fd25f]
192
+ - Updated dependencies [dffb67b]
193
+ - Updated dependencies [f1309d3]
194
+ - Updated dependencies [f7f8293]
195
+ - @mastra/core@0.10.4-alpha.1
196
+
197
+ ## 0.10.2
4
198
 
5
199
  ### Patch Changes
6
200
 
7
201
  - 195c428: Add runId to step execute fn
8
202
  - 12b7002: Add serializedStepGraph to workflow run snapshot in storage
9
203
  - f0d559f: Fix peerdeps for alpha channel
204
+ - 1ee6894: inngest production url fix
10
205
  - Updated dependencies [ee77e78]
11
206
  - Updated dependencies [592a2db]
12
207
  - Updated dependencies [e5dc18d]
13
208
  - Updated dependencies [ab5adbe]
14
209
  - Updated dependencies [1e8bb40]
210
+ - Updated dependencies [1b5fc55]
15
211
  - Updated dependencies [195c428]
16
212
  - Updated dependencies [f73e11b]
213
+ - Updated dependencies [37643b8]
214
+ - Updated dependencies [99fd6cf]
17
215
  - Updated dependencies [c5bf1ce]
216
+ - Updated dependencies [add596e]
217
+ - Updated dependencies [8dc94d8]
218
+ - Updated dependencies [ecebbeb]
219
+ - Updated dependencies [79d5145]
18
220
  - Updated dependencies [12b7002]
19
221
  - Updated dependencies [2901125]
20
- - @mastra/core@0.0.0-taofeeqInngest-20250603090617
222
+ - @mastra/core@0.10.2
223
+
224
+ ## 0.10.2-alpha.3
225
+
226
+ ### Patch Changes
227
+
228
+ - 1ee6894: inngest production url fix
229
+ - Updated dependencies [1b5fc55]
230
+ - Updated dependencies [add596e]
231
+ - Updated dependencies [ecebbeb]
232
+ - @mastra/core@0.10.2-alpha.5
21
233
 
22
234
  ## 0.10.2-alpha.2
23
235
 
@@ -1,8 +1,8 @@
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';
4
- import { createStep } from '@mastra/core/workflows';
5
4
  import { DefaultExecutionEngine } from '@mastra/core/workflows';
5
+ import type { Emitter } from '@mastra/core/workflows';
6
6
  import type { ExecuteFunction } from '@mastra/core/workflows';
7
7
  import type { ExecutionContext } from '@mastra/core/workflows';
8
8
  import type { ExecutionEngine } from '@mastra/core/workflows';
@@ -12,6 +12,7 @@ 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 { ReadableStream as ReadableStream_2 } from 'node:stream/web';
15
16
  import { Run } from '@mastra/core/workflows';
16
17
  import { RuntimeContext } from '@mastra/core/di';
17
18
  import type { SerializedStepFlowEntry } from '@mastra/core/workflows';
@@ -20,31 +21,78 @@ import type { Span } from '@opentelemetry/api';
20
21
  import type { Step } from '@mastra/core/workflows';
21
22
  import type { StepFlowEntry } from '@mastra/core/workflows';
22
23
  import type { StepResult } from '@mastra/core/workflows';
24
+ import type { StreamEvent } from '@mastra/core/workflows';
25
+ import { Tool } from '@mastra/core/tools';
26
+ import type { ToolExecutionContext } from '@mastra/core';
27
+ import type { WatchEvent } from '@mastra/core/workflows';
23
28
  import { Workflow } from '@mastra/core/workflows';
24
29
  import type { WorkflowConfig } from '@mastra/core/workflows';
25
30
  import type { WorkflowResult } from '@mastra/core/workflows';
26
31
  import type { WorkflowRun } from '@mastra/core';
27
32
  import type { WorkflowRuns } from '@mastra/core';
28
- import type { z } from 'zod';
33
+ import { z } from 'zod';
29
34
 
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: {
31
- id: TWorkflowId;
32
- }): InngestWorkflow<TSteps, TWorkflowId, TInput, TOutput>;
35
+ 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: {
36
+ id: TStepId;
37
+ description?: string;
38
+ inputSchema: TStepInput;
39
+ outputSchema: TStepOutput;
40
+ resumeSchema?: TResumeSchema;
41
+ suspendSchema?: TSuspendSchema;
42
+ execute: ExecuteFunction<z.infer<TStepInput>, z.infer<TStepOutput>, z.infer<TResumeSchema>, z.infer<TSuspendSchema>, InngestEngineType>;
43
+ }): Step<TStepId, TStepInput, TStepOutput, TResumeSchema, TSuspendSchema, InngestEngineType>;
44
+
45
+ export declare function createStep<TStepId extends string, TStepInput extends z.ZodObject<{
46
+ prompt: z.ZodString;
47
+ }>, TStepOutput extends z.ZodObject<{
48
+ text: z.ZodString;
49
+ }>, TResumeSchema extends z.ZodType<any>, TSuspendSchema extends z.ZodType<any>>(agent: Agent<TStepId, any, any>): Step<TStepId, TStepInput, TStepOutput, TResumeSchema, TSuspendSchema, InngestEngineType>;
50
+
51
+ export declare function createStep<TSchemaIn extends z.ZodType<any>, TSchemaOut extends z.ZodType<any>, TContext extends ToolExecutionContext<TSchemaIn>>(tool: Tool<TSchemaIn, TSchemaOut, TContext> & {
52
+ inputSchema: TSchemaIn;
53
+ outputSchema: TSchemaOut;
54
+ execute: (context: TContext) => Promise<any>;
55
+ }): Step<string, TSchemaIn, TSchemaOut, z.ZodType<any>, z.ZodType<any>, InngestEngineType>;
33
56
 
34
57
  export declare function init(inngest: Inngest): {
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>;
58
+ 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>;
36
59
  createStep: typeof createStep;
37
- cloneStep: typeof cloneStep;
38
- cloneWorkflow: typeof cloneWorkflow;
60
+ cloneStep<TStepId extends string>(step: Step<string, any, any, any, any, InngestEngineType>, opts: {
61
+ id: TStepId;
62
+ }): Step<TStepId, any, any, any, any, InngestEngineType>;
63
+ 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: {
64
+ id: TWorkflowId;
65
+ }): Workflow<InngestEngineType, TSteps, TWorkflowId, TInput, TOutput, TPrevSchema>;
66
+ };
67
+
68
+ export declare type InngestEngineType = {
69
+ step: any;
39
70
  };
40
71
 
41
72
  export declare class InngestExecutionEngine extends DefaultExecutionEngine {
42
73
  private inngestStep;
43
74
  private inngestAttempts;
44
75
  constructor(mastra: Mastra, inngestStep: BaseContext<Inngest>['step'], inngestAttempts?: number);
45
- protected fmtReturnValue<TOutput>(executionSpan: Span | undefined, emitter: {
46
- emit: (event: string, data: any) => Promise<void>;
47
- }, stepResults: Record<string, StepResult<any, any, any, any>>, lastOutput: StepResult<any, any, any, any>, error?: Error | string): Promise<TOutput>;
76
+ execute<TInput, TOutput>(params: {
77
+ workflowId: string;
78
+ runId: string;
79
+ graph: ExecutionGraph;
80
+ serializedStepGraph: SerializedStepFlowEntry[];
81
+ input?: TInput;
82
+ resume?: {
83
+ steps: string[];
84
+ stepResults: Record<string, StepResult<any, any, any, any>>;
85
+ resumePayload: any;
86
+ resumePath: number[];
87
+ };
88
+ emitter: Emitter;
89
+ retryConfig?: {
90
+ attempts?: number;
91
+ delay?: number;
92
+ };
93
+ runtimeContext: RuntimeContext;
94
+ }): Promise<TOutput>;
95
+ 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>;
48
96
  superExecuteStep({ workflowId, runId, step, stepResults, executionContext, resume, prevOutput, emitter, runtimeContext, }: {
49
97
  workflowId: string;
50
98
  runId: string;
@@ -56,11 +104,17 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
56
104
  resumePayload: any;
57
105
  };
58
106
  prevOutput: any;
59
- emitter: {
60
- emit: (event: string, data: any) => Promise<void>;
61
- };
107
+ emitter: Emitter;
62
108
  runtimeContext: RuntimeContext;
63
109
  }): Promise<StepResult<any, any, any, any>>;
110
+ executeSleep({ id, duration }: {
111
+ id: string;
112
+ duration: number;
113
+ }): Promise<void>;
114
+ executeWaitForEvent({ event, timeout }: {
115
+ event: string;
116
+ timeout?: number;
117
+ }): Promise<any>;
64
118
  executeStep({ step, stepResults, executionContext, resume, prevOutput, emitter, runtimeContext, }: {
65
119
  step: Step<string, any, any>;
66
120
  stepResults: Record<string, StepResult<any, any, any, any>>;
@@ -80,17 +134,18 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
80
134
  runId?: string;
81
135
  };
82
136
  prevOutput: any;
83
- emitter: {
84
- emit: (event: string, data: any) => Promise<void>;
85
- };
137
+ emitter: Emitter;
86
138
  runtimeContext: RuntimeContext;
87
139
  }): Promise<StepResult<any, any, any, any>>;
88
- persistStepUpdate({ workflowId, runId, stepResults, executionContext, serializedStepGraph, }: {
140
+ persistStepUpdate({ workflowId, runId, stepResults, executionContext, serializedStepGraph, workflowStatus, result, error, }: {
89
141
  workflowId: string;
90
142
  runId: string;
91
143
  stepResults: Record<string, StepResult<any, any, any, any>>;
92
144
  serializedStepGraph: SerializedStepFlowEntry[];
93
145
  executionContext: ExecutionContext;
146
+ workflowStatus: 'success' | 'failed' | 'suspended' | 'running';
147
+ result?: Record<string, any>;
148
+ error?: string | Error;
94
149
  }): Promise<void>;
95
150
  executeConditional({ workflowId, runId, entry, prevOutput, prevStep, stepResults, serializedStepGraph, resume, executionContext, emitter, runtimeContext, }: {
96
151
  workflowId: string;
@@ -98,7 +153,7 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
98
153
  entry: {
99
154
  type: 'conditional';
100
155
  steps: StepFlowEntry[];
101
- conditions: ExecuteFunction<any, any, any, any>[];
156
+ conditions: ExecuteFunction<any, any, any, any, InngestEngineType>[];
102
157
  };
103
158
  prevStep: StepFlowEntry;
104
159
  serializedStepGraph: SerializedStepFlowEntry[];
@@ -111,14 +166,12 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
111
166
  resumePath: number[];
112
167
  };
113
168
  executionContext: ExecutionContext;
114
- emitter: {
115
- emit: (event: string, data: any) => Promise<void>;
116
- };
169
+ emitter: Emitter;
117
170
  runtimeContext: RuntimeContext;
118
171
  }): Promise<StepResult<any, any, any, any>>;
119
172
  }
120
173
 
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> {
174
+ 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> {
122
175
  #private;
123
176
  private inngest;
124
177
  serializedStepGraph: SerializedStepFlowEntry[];
@@ -137,6 +190,7 @@ export declare class InngestRun<TSteps extends Step<string, any, any>[] = Step<s
137
190
  }, inngest: Inngest);
138
191
  getRuns(eventId: string): Promise<any>;
139
192
  getRunOutput(eventId: string): Promise<any>;
193
+ sendEvent(event: string, data: any): Promise<void>;
140
194
  start({ inputData, }: {
141
195
  inputData?: z.infer<TInput>;
142
196
  runtimeContext?: RuntimeContext;
@@ -146,10 +200,22 @@ export declare class InngestRun<TSteps extends Step<string, any, any>[] = Step<s
146
200
  step: Step<string, any, any, TResumeSchema, any> | [...Step<string, any, any, any, any>[], Step<string, any, any, TResumeSchema, any>] | string | string[];
147
201
  runtimeContext?: RuntimeContext;
148
202
  }): Promise<WorkflowResult<TOutput, TSteps>>;
149
- watch(cb: (event: any) => void): () => void;
203
+ _resume<TResumeSchema extends z.ZodType<any>>(params: {
204
+ resumeData?: z.infer<TResumeSchema>;
205
+ step: Step<string, any, any, TResumeSchema, any> | [...Step<string, any, any, any, any>[], Step<string, any, any, TResumeSchema, any>] | string | string[];
206
+ runtimeContext?: RuntimeContext;
207
+ }): Promise<WorkflowResult<TOutput, TSteps>>;
208
+ watch(cb: (event: WatchEvent) => void, type?: 'watch' | 'watch-v2'): () => void;
209
+ stream({ inputData, runtimeContext }?: {
210
+ inputData?: z.infer<TInput>;
211
+ runtimeContext?: RuntimeContext;
212
+ }): {
213
+ stream: ReadableStream_2<StreamEvent>;
214
+ getWorkflowState: () => Promise<WorkflowResult<TOutput, TSteps>>;
215
+ };
150
216
  }
151
217
 
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> {
218
+ 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> {
153
219
  #private;
154
220
  inngest: Inngest;
155
221
  private function;
@@ -162,10 +228,14 @@ export declare class InngestWorkflow<TSteps extends Step<string, any, any>[] = S
162
228
  resourceId?: string;
163
229
  }): Promise<WorkflowRuns>;
164
230
  getWorkflowRunById(runId: string): Promise<WorkflowRun | null>;
231
+ getWorkflowRunExecutionResult(runId: string): Promise<WatchEvent['payload']['workflowState'] | null>;
165
232
  __registerMastra(mastra: Mastra): void;
166
233
  createRun(options?: {
167
234
  runId?: string;
168
- }): Run<TSteps, TInput, TOutput>;
235
+ }): Run<TEngineType, TSteps, TInput, TOutput>;
236
+ createRunAsync(options?: {
237
+ runId?: string;
238
+ }): Promise<Run<TEngineType, TSteps, TInput, TOutput>>;
169
239
  getFunction(): InngestFunction<Omit<InngestFunction.Options<Inngest<ClientOptions>, InngestMiddleware.Stack, InngestFunction.Trigger<string>[] | [{
170
240
  cron: string;
171
241
  } & Partial<Record<"event" | "if", never>>] | [{