@mastra/inngest 0.0.0-support-d1-client-20250701191943 → 0.0.0-taofeeq-fix-tool-call-showing-after-message-20250806184630
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 +312 -2
- package/LICENSE.md +11 -42
- package/dist/index.cjs +150 -9
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +282 -7
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +151 -10
- package/dist/index.js.map +1 -0
- package/docker-compose.yaml +3 -3
- package/package.json +15 -13
- package/src/index.test.ts +951 -208
- package/src/index.ts +204 -3
- package/tsconfig.build.json +9 -0
- package/tsconfig.json +1 -1
- package/tsup.config.ts +17 -0
- package/vitest.config.ts +6 -0
- package/dist/_tsup-dts-rollup.d.cts +0 -265
- package/dist/_tsup-dts-rollup.d.ts +0 -265
- package/dist/index.d.cts +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,312 @@
|
|
|
1
1
|
# @mastra/inngest
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-taofeeq-fix-tool-call-showing-after-message-20250806184630
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [8388649]
|
|
8
|
+
- Updated dependencies [2fff911]
|
|
9
|
+
- @mastra/core@0.0.0-taofeeq-fix-tool-call-showing-after-message-20250806184630
|
|
10
|
+
|
|
11
|
+
## 0.11.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
|
|
16
|
+
- Updated dependencies [cb36de0]
|
|
17
|
+
- Updated dependencies [d0496e6]
|
|
18
|
+
- Updated dependencies [a82b851]
|
|
19
|
+
- Updated dependencies [ea0c5f2]
|
|
20
|
+
- Updated dependencies [41a0a0e]
|
|
21
|
+
- Updated dependencies [2871020]
|
|
22
|
+
- Updated dependencies [94f4812]
|
|
23
|
+
- Updated dependencies [e202b82]
|
|
24
|
+
- Updated dependencies [e00f6a0]
|
|
25
|
+
- Updated dependencies [4a406ec]
|
|
26
|
+
- Updated dependencies [b0e43c1]
|
|
27
|
+
- Updated dependencies [5d377e5]
|
|
28
|
+
- Updated dependencies [1fb812e]
|
|
29
|
+
- Updated dependencies [35c5798]
|
|
30
|
+
- @mastra/core@0.13.0
|
|
31
|
+
|
|
32
|
+
## 0.11.9-alpha.0
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
|
|
37
|
+
- Updated dependencies [cb36de0]
|
|
38
|
+
- Updated dependencies [a82b851]
|
|
39
|
+
- Updated dependencies [41a0a0e]
|
|
40
|
+
- Updated dependencies [2871020]
|
|
41
|
+
- Updated dependencies [4a406ec]
|
|
42
|
+
- Updated dependencies [5d377e5]
|
|
43
|
+
- @mastra/core@0.13.0-alpha.2
|
|
44
|
+
|
|
45
|
+
## 0.11.8
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- 7257912: dependencies updates:
|
|
50
|
+
- Updated dependency [`inngest@^3.40.1` ↗︎](https://www.npmjs.com/package/inngest/v/3.40.1) (from `^3.40.0`, in `dependencies`)
|
|
51
|
+
- Updated dependencies [33dcb07]
|
|
52
|
+
- Updated dependencies [d0d9500]
|
|
53
|
+
- Updated dependencies [d30b1a0]
|
|
54
|
+
- Updated dependencies [bff87f7]
|
|
55
|
+
- Updated dependencies [b4a8df0]
|
|
56
|
+
- @mastra/core@0.12.1
|
|
57
|
+
|
|
58
|
+
## 0.11.8-alpha.0
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- 7257912: dependencies updates:
|
|
63
|
+
- Updated dependency [`inngest@^3.40.1` ↗︎](https://www.npmjs.com/package/inngest/v/3.40.1) (from `^3.40.0`, in `dependencies`)
|
|
64
|
+
- Updated dependencies [33dcb07]
|
|
65
|
+
- Updated dependencies [d30b1a0]
|
|
66
|
+
- Updated dependencies [bff87f7]
|
|
67
|
+
- Updated dependencies [b4a8df0]
|
|
68
|
+
- @mastra/core@0.12.1-alpha.0
|
|
69
|
+
|
|
70
|
+
## 0.11.7
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- f42c4c2: update peer deps for packages to latest core range
|
|
75
|
+
- Updated dependencies [510e2c8]
|
|
76
|
+
- Updated dependencies [2f72fb2]
|
|
77
|
+
- Updated dependencies [27cc97a]
|
|
78
|
+
- Updated dependencies [3f89307]
|
|
79
|
+
- Updated dependencies [9eda7d4]
|
|
80
|
+
- Updated dependencies [9d49408]
|
|
81
|
+
- Updated dependencies [41daa63]
|
|
82
|
+
- Updated dependencies [ad0a58b]
|
|
83
|
+
- Updated dependencies [254a36b]
|
|
84
|
+
- Updated dependencies [2ecf658]
|
|
85
|
+
- Updated dependencies [7a7754f]
|
|
86
|
+
- Updated dependencies [fc92d80]
|
|
87
|
+
- Updated dependencies [e0f73c6]
|
|
88
|
+
- Updated dependencies [0b89602]
|
|
89
|
+
- Updated dependencies [4d37822]
|
|
90
|
+
- Updated dependencies [23a6a7c]
|
|
91
|
+
- Updated dependencies [cda801d]
|
|
92
|
+
- Updated dependencies [a77c823]
|
|
93
|
+
- Updated dependencies [ff9c125]
|
|
94
|
+
- Updated dependencies [09bca64]
|
|
95
|
+
- Updated dependencies [b8efbb9]
|
|
96
|
+
- Updated dependencies [71466e7]
|
|
97
|
+
- Updated dependencies [0c99fbe]
|
|
98
|
+
- @mastra/core@0.12.0
|
|
99
|
+
|
|
100
|
+
## 0.11.7-alpha.0
|
|
101
|
+
|
|
102
|
+
### Patch Changes
|
|
103
|
+
|
|
104
|
+
- f42c4c2: update peer deps for packages to latest core range
|
|
105
|
+
- @mastra/core@0.12.0-alpha.5
|
|
106
|
+
|
|
107
|
+
## 0.11.6
|
|
108
|
+
|
|
109
|
+
### Patch Changes
|
|
110
|
+
|
|
111
|
+
- ce088f5: Update all peerdeps to latest core
|
|
112
|
+
- @mastra/core@0.11.1
|
|
113
|
+
|
|
114
|
+
## 0.11.5
|
|
115
|
+
|
|
116
|
+
### Patch Changes
|
|
117
|
+
|
|
118
|
+
- a723d69: Pass workflowId through
|
|
119
|
+
- Updated dependencies [f248d53]
|
|
120
|
+
- Updated dependencies [2affc57]
|
|
121
|
+
- Updated dependencies [66e13e3]
|
|
122
|
+
- Updated dependencies [edd9482]
|
|
123
|
+
- Updated dependencies [18344d7]
|
|
124
|
+
- Updated dependencies [9d372c2]
|
|
125
|
+
- Updated dependencies [40c2525]
|
|
126
|
+
- Updated dependencies [e473f27]
|
|
127
|
+
- Updated dependencies [032cb66]
|
|
128
|
+
- Updated dependencies [703ac71]
|
|
129
|
+
- Updated dependencies [a723d69]
|
|
130
|
+
- Updated dependencies [7827943]
|
|
131
|
+
- Updated dependencies [5889a31]
|
|
132
|
+
- Updated dependencies [bf1e7e7]
|
|
133
|
+
- Updated dependencies [65e3395]
|
|
134
|
+
- Updated dependencies [4933192]
|
|
135
|
+
- Updated dependencies [d1c77a4]
|
|
136
|
+
- Updated dependencies [bea9dd1]
|
|
137
|
+
- Updated dependencies [dcd4802]
|
|
138
|
+
- Updated dependencies [cbddd18]
|
|
139
|
+
- Updated dependencies [7ba91fa]
|
|
140
|
+
- @mastra/core@0.11.0
|
|
141
|
+
|
|
142
|
+
## 0.11.5-alpha.0
|
|
143
|
+
|
|
144
|
+
### Patch Changes
|
|
145
|
+
|
|
146
|
+
- a723d69: Pass workflowId through
|
|
147
|
+
- Updated dependencies [f248d53]
|
|
148
|
+
- Updated dependencies [2affc57]
|
|
149
|
+
- Updated dependencies [66e13e3]
|
|
150
|
+
- Updated dependencies [edd9482]
|
|
151
|
+
- Updated dependencies [18344d7]
|
|
152
|
+
- Updated dependencies [9d372c2]
|
|
153
|
+
- Updated dependencies [40c2525]
|
|
154
|
+
- Updated dependencies [e473f27]
|
|
155
|
+
- Updated dependencies [032cb66]
|
|
156
|
+
- Updated dependencies [703ac71]
|
|
157
|
+
- Updated dependencies [a723d69]
|
|
158
|
+
- Updated dependencies [5889a31]
|
|
159
|
+
- Updated dependencies [65e3395]
|
|
160
|
+
- Updated dependencies [4933192]
|
|
161
|
+
- Updated dependencies [d1c77a4]
|
|
162
|
+
- Updated dependencies [bea9dd1]
|
|
163
|
+
- Updated dependencies [dcd4802]
|
|
164
|
+
- Updated dependencies [7ba91fa]
|
|
165
|
+
- @mastra/core@0.11.0-alpha.2
|
|
166
|
+
|
|
167
|
+
## 0.11.4
|
|
168
|
+
|
|
169
|
+
### Patch Changes
|
|
170
|
+
|
|
171
|
+
- 0b56518: Ensure removed runtimeContext values are not saved in snapshot
|
|
172
|
+
- Updated dependencies [0b56518]
|
|
173
|
+
- Updated dependencies [db5cc15]
|
|
174
|
+
- Updated dependencies [2ba5b76]
|
|
175
|
+
- Updated dependencies [5237998]
|
|
176
|
+
- Updated dependencies [c3a30de]
|
|
177
|
+
- Updated dependencies [37c1acd]
|
|
178
|
+
- Updated dependencies [1aa60b1]
|
|
179
|
+
- Updated dependencies [89ec9d4]
|
|
180
|
+
- Updated dependencies [cf3a184]
|
|
181
|
+
- Updated dependencies [d6bfd60]
|
|
182
|
+
- Updated dependencies [626b0f4]
|
|
183
|
+
- Updated dependencies [c22a91f]
|
|
184
|
+
- Updated dependencies [f7403ab]
|
|
185
|
+
- Updated dependencies [6c89d7f]
|
|
186
|
+
- @mastra/core@0.10.15
|
|
187
|
+
|
|
188
|
+
## 0.11.4-alpha.0
|
|
189
|
+
|
|
190
|
+
### Patch Changes
|
|
191
|
+
|
|
192
|
+
- 0b56518: Ensure removed runtimeContext values are not saved in snapshot
|
|
193
|
+
- Updated dependencies [0b56518]
|
|
194
|
+
- Updated dependencies [2ba5b76]
|
|
195
|
+
- Updated dependencies [c3a30de]
|
|
196
|
+
- Updated dependencies [cf3a184]
|
|
197
|
+
- Updated dependencies [d6bfd60]
|
|
198
|
+
- @mastra/core@0.10.15-alpha.1
|
|
199
|
+
|
|
200
|
+
## 0.11.3
|
|
201
|
+
|
|
202
|
+
### Patch Changes
|
|
203
|
+
|
|
204
|
+
- 515488a: dependencies updates:
|
|
205
|
+
- Updated dependency [`inngest@^3.39.2` ↗︎](https://www.npmjs.com/package/inngest/v/3.39.2) (from `^3.39.1`, in `dependencies`)
|
|
206
|
+
- defb5ae: dependencies updates:
|
|
207
|
+
- Updated dependency [`inngest@^3.40.0` ↗︎](https://www.npmjs.com/package/inngest/v/3.40.0) (from `^3.39.2`, in `dependencies`)
|
|
208
|
+
- b790fd1: Ability to pass a function to .sleep()/.sleepUntil()
|
|
209
|
+
- c1cceea: Bump peerdeps of @matra/core
|
|
210
|
+
- Updated dependencies [2873c7f]
|
|
211
|
+
- Updated dependencies [1c1c6a1]
|
|
212
|
+
- Updated dependencies [f8ce2cc]
|
|
213
|
+
- Updated dependencies [8c846b6]
|
|
214
|
+
- Updated dependencies [c7bbf1e]
|
|
215
|
+
- Updated dependencies [8722d53]
|
|
216
|
+
- Updated dependencies [565cc0c]
|
|
217
|
+
- Updated dependencies [b790fd1]
|
|
218
|
+
- Updated dependencies [132027f]
|
|
219
|
+
- Updated dependencies [0c85311]
|
|
220
|
+
- Updated dependencies [d7ed04d]
|
|
221
|
+
- Updated dependencies [cb16baf]
|
|
222
|
+
- Updated dependencies [f36e4f1]
|
|
223
|
+
- Updated dependencies [7f6e403]
|
|
224
|
+
- @mastra/core@0.10.11
|
|
225
|
+
|
|
226
|
+
## 0.11.3-alpha.3
|
|
227
|
+
|
|
228
|
+
### Patch Changes
|
|
229
|
+
|
|
230
|
+
- c1cceea: Bump peerdeps of @matra/core
|
|
231
|
+
- @mastra/core@0.10.11-alpha.4
|
|
232
|
+
|
|
233
|
+
## 0.11.3-alpha.2
|
|
234
|
+
|
|
235
|
+
### Patch Changes
|
|
236
|
+
|
|
237
|
+
- defb5ae: dependencies updates:
|
|
238
|
+
- Updated dependency [`inngest@^3.40.0` ↗︎](https://www.npmjs.com/package/inngest/v/3.40.0) (from `^3.39.2`, in `dependencies`)
|
|
239
|
+
- Updated dependencies [c7bbf1e]
|
|
240
|
+
- Updated dependencies [8722d53]
|
|
241
|
+
- Updated dependencies [132027f]
|
|
242
|
+
- Updated dependencies [0c85311]
|
|
243
|
+
- Updated dependencies [cb16baf]
|
|
244
|
+
- @mastra/core@0.10.11-alpha.3
|
|
245
|
+
|
|
246
|
+
## 0.11.3-alpha.1
|
|
247
|
+
|
|
248
|
+
### Patch Changes
|
|
249
|
+
|
|
250
|
+
- 515488a: dependencies updates:
|
|
251
|
+
- Updated dependency [`inngest@^3.39.2` ↗︎](https://www.npmjs.com/package/inngest/v/3.39.2) (from `^3.39.1`, in `dependencies`)
|
|
252
|
+
- Updated dependencies [7f6e403]
|
|
253
|
+
- @mastra/core@0.10.11-alpha.1
|
|
254
|
+
|
|
255
|
+
## 0.11.3-alpha.0
|
|
256
|
+
|
|
257
|
+
### Patch Changes
|
|
258
|
+
|
|
259
|
+
- b790fd1: Ability to pass a function to .sleep()/.sleepUntil()
|
|
260
|
+
- Updated dependencies [f8ce2cc]
|
|
261
|
+
- Updated dependencies [8c846b6]
|
|
262
|
+
- Updated dependencies [b790fd1]
|
|
263
|
+
- Updated dependencies [d7ed04d]
|
|
264
|
+
- Updated dependencies [f36e4f1]
|
|
265
|
+
- @mastra/core@0.10.11-alpha.0
|
|
266
|
+
|
|
267
|
+
## 0.11.2
|
|
268
|
+
|
|
269
|
+
### Patch Changes
|
|
270
|
+
|
|
271
|
+
- 48d9738: Fix inngest sleep stream events
|
|
272
|
+
- Updated dependencies [4d3fbdf]
|
|
273
|
+
- @mastra/core@0.10.10
|
|
274
|
+
|
|
275
|
+
## 0.11.2-alpha.0
|
|
276
|
+
|
|
277
|
+
### Patch Changes
|
|
278
|
+
|
|
279
|
+
- 48d9738: Fix inngest sleep stream events
|
|
280
|
+
- Updated dependencies [4d3fbdf]
|
|
281
|
+
- @mastra/core@0.10.10-alpha.0
|
|
282
|
+
|
|
283
|
+
## 0.11.1
|
|
284
|
+
|
|
285
|
+
### Patch Changes
|
|
286
|
+
|
|
287
|
+
- e423a31: Fix bug where nested workflows would cause Inngest duplicate key error
|
|
288
|
+
- 764f86a: Introduces the runCount property in the execution parameters for the steps execute function
|
|
289
|
+
- 1760a1c: Use workflow stream in playground instead of watch
|
|
290
|
+
- 038e5ae: Add cancel workflow run
|
|
291
|
+
- 81a1b3b: Update peerdeps
|
|
292
|
+
- Updated dependencies [9dda1ac]
|
|
293
|
+
- Updated dependencies [c984582]
|
|
294
|
+
- Updated dependencies [7e801dd]
|
|
295
|
+
- Updated dependencies [a606c75]
|
|
296
|
+
- Updated dependencies [7aa70a4]
|
|
297
|
+
- Updated dependencies [764f86a]
|
|
298
|
+
- Updated dependencies [1760a1c]
|
|
299
|
+
- Updated dependencies [038e5ae]
|
|
300
|
+
- Updated dependencies [7dda16a]
|
|
301
|
+
- Updated dependencies [5ebfcdd]
|
|
302
|
+
- Updated dependencies [b2d0c91]
|
|
303
|
+
- Updated dependencies [4e809ad]
|
|
304
|
+
- Updated dependencies [57929df]
|
|
305
|
+
- Updated dependencies [b7852ed]
|
|
306
|
+
- Updated dependencies [6320a61]
|
|
307
|
+
- @mastra/core@0.10.9
|
|
308
|
+
|
|
309
|
+
## 0.11.1-alpha.0
|
|
4
310
|
|
|
5
311
|
### Patch Changes
|
|
6
312
|
|
|
@@ -8,7 +314,9 @@
|
|
|
8
314
|
- 764f86a: Introduces the runCount property in the execution parameters for the steps execute function
|
|
9
315
|
- 1760a1c: Use workflow stream in playground instead of watch
|
|
10
316
|
- 038e5ae: Add cancel workflow run
|
|
317
|
+
- 81a1b3b: Update peerdeps
|
|
11
318
|
- Updated dependencies [9dda1ac]
|
|
319
|
+
- Updated dependencies [c984582]
|
|
12
320
|
- Updated dependencies [7e801dd]
|
|
13
321
|
- Updated dependencies [a606c75]
|
|
14
322
|
- Updated dependencies [7aa70a4]
|
|
@@ -16,11 +324,13 @@
|
|
|
16
324
|
- Updated dependencies [1760a1c]
|
|
17
325
|
- Updated dependencies [038e5ae]
|
|
18
326
|
- Updated dependencies [7dda16a]
|
|
327
|
+
- Updated dependencies [5ebfcdd]
|
|
328
|
+
- Updated dependencies [b2d0c91]
|
|
19
329
|
- Updated dependencies [4e809ad]
|
|
20
330
|
- Updated dependencies [57929df]
|
|
21
331
|
- Updated dependencies [b7852ed]
|
|
22
332
|
- Updated dependencies [6320a61]
|
|
23
|
-
- @mastra/core@0.
|
|
333
|
+
- @mastra/core@0.10.9-alpha.0
|
|
24
334
|
|
|
25
335
|
## 0.11.0
|
|
26
336
|
|
package/LICENSE.md
CHANGED
|
@@ -1,46 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Apache License 2.0
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2025
|
|
3
|
+
Copyright (c) 2025 Kepler Software, Inc.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
|
|
17
|
-
|
|
18
|
-
**Patents**
|
|
19
|
-
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
20
|
-
|
|
21
|
-
**Notices**
|
|
22
|
-
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
|
|
23
|
-
|
|
24
|
-
If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
|
|
25
|
-
|
|
26
|
-
**No Other Rights**
|
|
27
|
-
These terms do not imply any licenses other than those expressly granted in these terms.
|
|
28
|
-
|
|
29
|
-
**Termination**
|
|
30
|
-
If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
|
|
31
|
-
|
|
32
|
-
**No Liability**
|
|
33
|
-
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
|
|
34
|
-
|
|
35
|
-
**Definitions**
|
|
36
|
-
The _licensor_ is the entity offering these terms, and the _software_ is the software the licensor makes available under these terms, including any portion of it.
|
|
37
|
-
|
|
38
|
-
_you_ refers to the individual or entity agreeing to these terms.
|
|
39
|
-
|
|
40
|
-
_your company_ is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. _control_ means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
41
|
-
|
|
42
|
-
_your licenses_ are all the licenses granted to you for the software under these terms.
|
|
43
|
-
|
|
44
|
-
_use_ means anything you do with the software requiring one of your licenses.
|
|
45
|
-
|
|
46
|
-
_trademark_ means trademarks, service marks, and similar rights.
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
package/dist/index.cjs
CHANGED
|
@@ -53,6 +53,7 @@ var InngestRun = class extends workflows.Run {
|
|
|
53
53
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
54
54
|
runs = await this.getRuns(eventId);
|
|
55
55
|
if (runs?.[0]?.status === "Failed") {
|
|
56
|
+
console.log("run", runs?.[0]);
|
|
56
57
|
throw new Error(`Function run ${runs?.[0]?.status}`);
|
|
57
58
|
} else if (runs?.[0]?.status === "Cancelled") {
|
|
58
59
|
const snapshot = await this.#mastra?.storage?.loadWorkflowSnapshot({
|
|
@@ -154,6 +155,7 @@ var InngestRun = class extends workflows.Run {
|
|
|
154
155
|
data: {
|
|
155
156
|
inputData: params.resumeData,
|
|
156
157
|
runId: this.runId,
|
|
158
|
+
workflowId: this.workflowId,
|
|
157
159
|
stepResults: snapshot?.context,
|
|
158
160
|
resume: {
|
|
159
161
|
steps,
|
|
@@ -649,7 +651,8 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
649
651
|
prevOutput,
|
|
650
652
|
emitter,
|
|
651
653
|
abortController,
|
|
652
|
-
runtimeContext
|
|
654
|
+
runtimeContext,
|
|
655
|
+
writableStream
|
|
653
656
|
}) {
|
|
654
657
|
return super.executeStep({
|
|
655
658
|
workflowId,
|
|
@@ -661,11 +664,131 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
661
664
|
prevOutput,
|
|
662
665
|
emitter,
|
|
663
666
|
abortController,
|
|
664
|
-
runtimeContext
|
|
667
|
+
runtimeContext,
|
|
668
|
+
writableStream
|
|
665
669
|
});
|
|
666
670
|
}
|
|
667
|
-
async executeSleep({ id, duration }) {
|
|
668
|
-
|
|
671
|
+
// async executeSleep({ id, duration }: { id: string; duration: number }): Promise<void> {
|
|
672
|
+
// await this.inngestStep.sleep(id, duration);
|
|
673
|
+
// }
|
|
674
|
+
async executeSleep({
|
|
675
|
+
workflowId,
|
|
676
|
+
runId,
|
|
677
|
+
entry,
|
|
678
|
+
prevOutput,
|
|
679
|
+
stepResults,
|
|
680
|
+
emitter,
|
|
681
|
+
abortController,
|
|
682
|
+
runtimeContext,
|
|
683
|
+
writableStream
|
|
684
|
+
}) {
|
|
685
|
+
let { duration, fn } = entry;
|
|
686
|
+
if (fn) {
|
|
687
|
+
const stepCallId = crypto.randomUUID();
|
|
688
|
+
duration = await this.inngestStep.run(`workflow.${workflowId}.sleep.${entry.id}`, async () => {
|
|
689
|
+
return await fn({
|
|
690
|
+
runId,
|
|
691
|
+
workflowId,
|
|
692
|
+
mastra: this.mastra,
|
|
693
|
+
runtimeContext,
|
|
694
|
+
inputData: prevOutput,
|
|
695
|
+
runCount: -1,
|
|
696
|
+
getInitData: () => stepResults?.input,
|
|
697
|
+
getStepResult: (step) => {
|
|
698
|
+
if (!step?.id) {
|
|
699
|
+
return null;
|
|
700
|
+
}
|
|
701
|
+
const result = stepResults[step.id];
|
|
702
|
+
if (result?.status === "success") {
|
|
703
|
+
return result.output;
|
|
704
|
+
}
|
|
705
|
+
return null;
|
|
706
|
+
},
|
|
707
|
+
// TODO: this function shouldn't have suspend probably?
|
|
708
|
+
suspend: async (_suspendPayload) => {
|
|
709
|
+
},
|
|
710
|
+
bail: () => {
|
|
711
|
+
},
|
|
712
|
+
abort: () => {
|
|
713
|
+
abortController?.abort();
|
|
714
|
+
},
|
|
715
|
+
[_constants.EMITTER_SYMBOL]: emitter,
|
|
716
|
+
engine: { step: this.inngestStep },
|
|
717
|
+
abortSignal: abortController?.signal,
|
|
718
|
+
writer: new tools.ToolStream(
|
|
719
|
+
{
|
|
720
|
+
prefix: "step",
|
|
721
|
+
callId: stepCallId,
|
|
722
|
+
name: "sleep",
|
|
723
|
+
runId
|
|
724
|
+
},
|
|
725
|
+
writableStream
|
|
726
|
+
)
|
|
727
|
+
});
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
await this.inngestStep.sleep(entry.id, !duration || duration < 0 ? 0 : duration);
|
|
731
|
+
}
|
|
732
|
+
async executeSleepUntil({
|
|
733
|
+
workflowId,
|
|
734
|
+
runId,
|
|
735
|
+
entry,
|
|
736
|
+
prevOutput,
|
|
737
|
+
stepResults,
|
|
738
|
+
emitter,
|
|
739
|
+
abortController,
|
|
740
|
+
runtimeContext,
|
|
741
|
+
writableStream
|
|
742
|
+
}) {
|
|
743
|
+
let { date, fn } = entry;
|
|
744
|
+
if (fn) {
|
|
745
|
+
date = await this.inngestStep.run(`workflow.${workflowId}.sleepUntil.${entry.id}`, async () => {
|
|
746
|
+
const stepCallId = crypto.randomUUID();
|
|
747
|
+
return await fn({
|
|
748
|
+
runId,
|
|
749
|
+
workflowId,
|
|
750
|
+
mastra: this.mastra,
|
|
751
|
+
runtimeContext,
|
|
752
|
+
inputData: prevOutput,
|
|
753
|
+
runCount: -1,
|
|
754
|
+
getInitData: () => stepResults?.input,
|
|
755
|
+
getStepResult: (step) => {
|
|
756
|
+
if (!step?.id) {
|
|
757
|
+
return null;
|
|
758
|
+
}
|
|
759
|
+
const result = stepResults[step.id];
|
|
760
|
+
if (result?.status === "success") {
|
|
761
|
+
return result.output;
|
|
762
|
+
}
|
|
763
|
+
return null;
|
|
764
|
+
},
|
|
765
|
+
// TODO: this function shouldn't have suspend probably?
|
|
766
|
+
suspend: async (_suspendPayload) => {
|
|
767
|
+
},
|
|
768
|
+
bail: () => {
|
|
769
|
+
},
|
|
770
|
+
abort: () => {
|
|
771
|
+
abortController?.abort();
|
|
772
|
+
},
|
|
773
|
+
[_constants.EMITTER_SYMBOL]: emitter,
|
|
774
|
+
engine: { step: this.inngestStep },
|
|
775
|
+
abortSignal: abortController?.signal,
|
|
776
|
+
writer: new tools.ToolStream(
|
|
777
|
+
{
|
|
778
|
+
prefix: "step",
|
|
779
|
+
callId: stepCallId,
|
|
780
|
+
name: "sleep",
|
|
781
|
+
runId
|
|
782
|
+
},
|
|
783
|
+
writableStream
|
|
784
|
+
)
|
|
785
|
+
});
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
if (!(date instanceof Date)) {
|
|
789
|
+
return;
|
|
790
|
+
}
|
|
791
|
+
await this.inngestStep.sleepUntil(entry.id, date);
|
|
669
792
|
}
|
|
670
793
|
async executeWaitForEvent({ event, timeout }) {
|
|
671
794
|
const eventData = await this.inngestStep.waitForEvent(`user-event-${event}`, {
|
|
@@ -685,7 +808,8 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
685
808
|
prevOutput,
|
|
686
809
|
emitter,
|
|
687
810
|
abortController,
|
|
688
|
-
runtimeContext
|
|
811
|
+
runtimeContext,
|
|
812
|
+
writableStream
|
|
689
813
|
}) {
|
|
690
814
|
const startedAt = await this.inngestStep.run(
|
|
691
815
|
`workflow.${executionContext.workflowId}.run.${executionContext.runId}.step.${step.id}.running_ev`,
|
|
@@ -716,7 +840,9 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
716
840
|
type: "step-start",
|
|
717
841
|
payload: {
|
|
718
842
|
id: step.id,
|
|
719
|
-
status: "running"
|
|
843
|
+
status: "running",
|
|
844
|
+
payload: prevOutput,
|
|
845
|
+
startedAt: startedAt2
|
|
720
846
|
}
|
|
721
847
|
});
|
|
722
848
|
return startedAt2;
|
|
@@ -902,6 +1028,7 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
902
1028
|
runId: executionContext.runId,
|
|
903
1029
|
mastra: this.mastra,
|
|
904
1030
|
runtimeContext,
|
|
1031
|
+
writableStream,
|
|
905
1032
|
inputData: prevOutput,
|
|
906
1033
|
resumeData: resume?.steps[0] === step.id ? resume?.resumePayload : void 0,
|
|
907
1034
|
getInitData: () => stepResults?.input,
|
|
@@ -1061,7 +1188,8 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
1061
1188
|
executionContext,
|
|
1062
1189
|
emitter,
|
|
1063
1190
|
abortController,
|
|
1064
|
-
runtimeContext
|
|
1191
|
+
runtimeContext,
|
|
1192
|
+
writableStream
|
|
1065
1193
|
}) {
|
|
1066
1194
|
let execResults;
|
|
1067
1195
|
const truthyIndexes = (await Promise.all(
|
|
@@ -1070,6 +1198,7 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
1070
1198
|
try {
|
|
1071
1199
|
const result = await cond({
|
|
1072
1200
|
runId,
|
|
1201
|
+
workflowId,
|
|
1073
1202
|
mastra: this.mastra,
|
|
1074
1203
|
runtimeContext,
|
|
1075
1204
|
runCount: -1,
|
|
@@ -1097,7 +1226,16 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
1097
1226
|
engine: {
|
|
1098
1227
|
step: this.inngestStep
|
|
1099
1228
|
},
|
|
1100
|
-
abortSignal: abortController.signal
|
|
1229
|
+
abortSignal: abortController.signal,
|
|
1230
|
+
writer: new tools.ToolStream(
|
|
1231
|
+
{
|
|
1232
|
+
prefix: "step",
|
|
1233
|
+
callId: crypto.randomUUID(),
|
|
1234
|
+
name: "conditional",
|
|
1235
|
+
runId
|
|
1236
|
+
},
|
|
1237
|
+
writableStream
|
|
1238
|
+
)
|
|
1101
1239
|
});
|
|
1102
1240
|
return result ? index : null;
|
|
1103
1241
|
} catch (e) {
|
|
@@ -1127,7 +1265,8 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
1127
1265
|
},
|
|
1128
1266
|
emitter,
|
|
1129
1267
|
abortController,
|
|
1130
|
-
runtimeContext
|
|
1268
|
+
runtimeContext,
|
|
1269
|
+
writableStream
|
|
1131
1270
|
})
|
|
1132
1271
|
)
|
|
1133
1272
|
);
|
|
@@ -1158,3 +1297,5 @@ exports.InngestWorkflow = InngestWorkflow;
|
|
|
1158
1297
|
exports.createStep = createStep;
|
|
1159
1298
|
exports.init = init;
|
|
1160
1299
|
exports.serve = serve;
|
|
1300
|
+
//# sourceMappingURL=index.cjs.map
|
|
1301
|
+
//# sourceMappingURL=index.cjs.map
|