@db-lyon/flowkit 0.5.0 → 0.5.2

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.
@@ -5,37 +5,62 @@ export declare const TaskDefinitionSchema: z.ZodObject<{
5
5
  description: z.ZodOptional<z.ZodString>;
6
6
  group: z.ZodOptional<z.ZodString>;
7
7
  options: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
8
+ /** Declarative hints surfaced in listings; not used by the runner. */
9
+ idempotent: z.ZodOptional<z.ZodBoolean>;
10
+ reversible: z.ZodOptional<z.ZodBoolean>;
8
11
  }, "strip", z.ZodTypeAny, {
9
12
  options: Record<string, unknown>;
10
13
  class_path: string;
11
14
  description?: string | undefined;
12
15
  group?: string | undefined;
16
+ idempotent?: boolean | undefined;
17
+ reversible?: boolean | undefined;
13
18
  }, {
14
19
  class_path: string;
15
20
  options?: Record<string, unknown> | undefined;
16
21
  description?: string | undefined;
17
22
  group?: string | undefined;
23
+ idempotent?: boolean | undefined;
24
+ reversible?: boolean | undefined;
18
25
  }>;
19
26
  export declare const FlowStepSchema: z.ZodEffects<z.ZodObject<{
20
27
  task: z.ZodOptional<z.ZodString>;
21
28
  flow: z.ZodOptional<z.ZodString>;
22
29
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
30
+ /** Retry the step up to N additional times on failure. */
31
+ retries: z.ZodOptional<z.ZodNumber>;
32
+ /** Delay between retries, in milliseconds. */
33
+ retryDelay: z.ZodOptional<z.ZodNumber>;
34
+ /** Only retry when the error message contains this substring. */
35
+ retryOn: z.ZodOptional<z.ZodString>;
23
36
  }, "strip", z.ZodTypeAny, {
24
37
  options?: Record<string, unknown> | undefined;
25
38
  task?: string | undefined;
26
39
  flow?: string | undefined;
40
+ retries?: number | undefined;
41
+ retryDelay?: number | undefined;
42
+ retryOn?: string | undefined;
27
43
  }, {
28
44
  options?: Record<string, unknown> | undefined;
29
45
  task?: string | undefined;
30
46
  flow?: string | undefined;
47
+ retries?: number | undefined;
48
+ retryDelay?: number | undefined;
49
+ retryOn?: string | undefined;
31
50
  }>, {
32
51
  options?: Record<string, unknown> | undefined;
33
52
  task?: string | undefined;
34
53
  flow?: string | undefined;
54
+ retries?: number | undefined;
55
+ retryDelay?: number | undefined;
56
+ retryOn?: string | undefined;
35
57
  }, {
36
58
  options?: Record<string, unknown> | undefined;
37
59
  task?: string | undefined;
38
60
  flow?: string | undefined;
61
+ retries?: number | undefined;
62
+ retryDelay?: number | undefined;
63
+ retryOn?: string | undefined;
39
64
  }>;
40
65
  export declare const FlowDefinitionSchema: z.ZodObject<{
41
66
  description: z.ZodString;
@@ -43,37 +68,289 @@ export declare const FlowDefinitionSchema: z.ZodObject<{
43
68
  task: z.ZodOptional<z.ZodString>;
44
69
  flow: z.ZodOptional<z.ZodString>;
45
70
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
71
+ /** Retry the step up to N additional times on failure. */
72
+ retries: z.ZodOptional<z.ZodNumber>;
73
+ /** Delay between retries, in milliseconds. */
74
+ retryDelay: z.ZodOptional<z.ZodNumber>;
75
+ /** Only retry when the error message contains this substring. */
76
+ retryOn: z.ZodOptional<z.ZodString>;
46
77
  }, "strip", z.ZodTypeAny, {
47
78
  options?: Record<string, unknown> | undefined;
48
79
  task?: string | undefined;
49
80
  flow?: string | undefined;
81
+ retries?: number | undefined;
82
+ retryDelay?: number | undefined;
83
+ retryOn?: string | undefined;
50
84
  }, {
51
85
  options?: Record<string, unknown> | undefined;
52
86
  task?: string | undefined;
53
87
  flow?: string | undefined;
88
+ retries?: number | undefined;
89
+ retryDelay?: number | undefined;
90
+ retryOn?: string | undefined;
54
91
  }>, {
55
92
  options?: Record<string, unknown> | undefined;
56
93
  task?: string | undefined;
57
94
  flow?: string | undefined;
95
+ retries?: number | undefined;
96
+ retryDelay?: number | undefined;
97
+ retryOn?: string | undefined;
58
98
  }, {
59
99
  options?: Record<string, unknown> | undefined;
60
100
  task?: string | undefined;
61
101
  flow?: string | undefined;
102
+ retries?: number | undefined;
103
+ retryDelay?: number | undefined;
104
+ retryOn?: string | undefined;
62
105
  }>>;
106
+ /** Runs before the first step. Failure fails the flow before steps execute. */
107
+ on_start: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
108
+ task: z.ZodOptional<z.ZodString>;
109
+ flow: z.ZodOptional<z.ZodString>;
110
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
111
+ /** Retry the step up to N additional times on failure. */
112
+ retries: z.ZodOptional<z.ZodNumber>;
113
+ /** Delay between retries, in milliseconds. */
114
+ retryDelay: z.ZodOptional<z.ZodNumber>;
115
+ /** Only retry when the error message contains this substring. */
116
+ retryOn: z.ZodOptional<z.ZodString>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ options?: Record<string, unknown> | undefined;
119
+ task?: string | undefined;
120
+ flow?: string | undefined;
121
+ retries?: number | undefined;
122
+ retryDelay?: number | undefined;
123
+ retryOn?: string | undefined;
124
+ }, {
125
+ options?: Record<string, unknown> | undefined;
126
+ task?: string | undefined;
127
+ flow?: string | undefined;
128
+ retries?: number | undefined;
129
+ retryDelay?: number | undefined;
130
+ retryOn?: string | undefined;
131
+ }>, {
132
+ options?: Record<string, unknown> | undefined;
133
+ task?: string | undefined;
134
+ flow?: string | undefined;
135
+ retries?: number | undefined;
136
+ retryDelay?: number | undefined;
137
+ retryOn?: string | undefined;
138
+ }, {
139
+ options?: Record<string, unknown> | undefined;
140
+ task?: string | undefined;
141
+ flow?: string | undefined;
142
+ retries?: number | undefined;
143
+ retryDelay?: number | undefined;
144
+ retryOn?: string | undefined;
145
+ }>, "many">>;
146
+ /** Runs after all steps succeed. */
147
+ on_success: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
148
+ task: z.ZodOptional<z.ZodString>;
149
+ flow: z.ZodOptional<z.ZodString>;
150
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
151
+ /** Retry the step up to N additional times on failure. */
152
+ retries: z.ZodOptional<z.ZodNumber>;
153
+ /** Delay between retries, in milliseconds. */
154
+ retryDelay: z.ZodOptional<z.ZodNumber>;
155
+ /** Only retry when the error message contains this substring. */
156
+ retryOn: z.ZodOptional<z.ZodString>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ options?: Record<string, unknown> | undefined;
159
+ task?: string | undefined;
160
+ flow?: string | undefined;
161
+ retries?: number | undefined;
162
+ retryDelay?: number | undefined;
163
+ retryOn?: string | undefined;
164
+ }, {
165
+ options?: Record<string, unknown> | undefined;
166
+ task?: string | undefined;
167
+ flow?: string | undefined;
168
+ retries?: number | undefined;
169
+ retryDelay?: number | undefined;
170
+ retryOn?: string | undefined;
171
+ }>, {
172
+ options?: Record<string, unknown> | undefined;
173
+ task?: string | undefined;
174
+ flow?: string | undefined;
175
+ retries?: number | undefined;
176
+ retryDelay?: number | undefined;
177
+ retryOn?: string | undefined;
178
+ }, {
179
+ options?: Record<string, unknown> | undefined;
180
+ task?: string | undefined;
181
+ flow?: string | undefined;
182
+ retries?: number | undefined;
183
+ retryDelay?: number | undefined;
184
+ retryOn?: string | undefined;
185
+ }>, "many">>;
186
+ /** Runs on any step failure. */
187
+ on_failure: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
188
+ task: z.ZodOptional<z.ZodString>;
189
+ flow: z.ZodOptional<z.ZodString>;
190
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
191
+ /** Retry the step up to N additional times on failure. */
192
+ retries: z.ZodOptional<z.ZodNumber>;
193
+ /** Delay between retries, in milliseconds. */
194
+ retryDelay: z.ZodOptional<z.ZodNumber>;
195
+ /** Only retry when the error message contains this substring. */
196
+ retryOn: z.ZodOptional<z.ZodString>;
197
+ }, "strip", z.ZodTypeAny, {
198
+ options?: Record<string, unknown> | undefined;
199
+ task?: string | undefined;
200
+ flow?: string | undefined;
201
+ retries?: number | undefined;
202
+ retryDelay?: number | undefined;
203
+ retryOn?: string | undefined;
204
+ }, {
205
+ options?: Record<string, unknown> | undefined;
206
+ task?: string | undefined;
207
+ flow?: string | undefined;
208
+ retries?: number | undefined;
209
+ retryDelay?: number | undefined;
210
+ retryOn?: string | undefined;
211
+ }>, {
212
+ options?: Record<string, unknown> | undefined;
213
+ task?: string | undefined;
214
+ flow?: string | undefined;
215
+ retries?: number | undefined;
216
+ retryDelay?: number | undefined;
217
+ retryOn?: string | undefined;
218
+ }, {
219
+ options?: Record<string, unknown> | undefined;
220
+ task?: string | undefined;
221
+ flow?: string | undefined;
222
+ retries?: number | undefined;
223
+ retryDelay?: number | undefined;
224
+ retryOn?: string | undefined;
225
+ }>, "many">>;
226
+ /** Runs after success or failure, after on_success/on_failure. */
227
+ finally: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
228
+ task: z.ZodOptional<z.ZodString>;
229
+ flow: z.ZodOptional<z.ZodString>;
230
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
231
+ /** Retry the step up to N additional times on failure. */
232
+ retries: z.ZodOptional<z.ZodNumber>;
233
+ /** Delay between retries, in milliseconds. */
234
+ retryDelay: z.ZodOptional<z.ZodNumber>;
235
+ /** Only retry when the error message contains this substring. */
236
+ retryOn: z.ZodOptional<z.ZodString>;
237
+ }, "strip", z.ZodTypeAny, {
238
+ options?: Record<string, unknown> | undefined;
239
+ task?: string | undefined;
240
+ flow?: string | undefined;
241
+ retries?: number | undefined;
242
+ retryDelay?: number | undefined;
243
+ retryOn?: string | undefined;
244
+ }, {
245
+ options?: Record<string, unknown> | undefined;
246
+ task?: string | undefined;
247
+ flow?: string | undefined;
248
+ retries?: number | undefined;
249
+ retryDelay?: number | undefined;
250
+ retryOn?: string | undefined;
251
+ }>, {
252
+ options?: Record<string, unknown> | undefined;
253
+ task?: string | undefined;
254
+ flow?: string | undefined;
255
+ retries?: number | undefined;
256
+ retryDelay?: number | undefined;
257
+ retryOn?: string | undefined;
258
+ }, {
259
+ options?: Record<string, unknown> | undefined;
260
+ task?: string | undefined;
261
+ flow?: string | undefined;
262
+ retries?: number | undefined;
263
+ retryDelay?: number | undefined;
264
+ retryOn?: string | undefined;
265
+ }>, "many">>;
266
+ /** If true, invoke rollback records from completed steps in reverse order on failure. */
267
+ rollback_on_failure: z.ZodOptional<z.ZodBoolean>;
63
268
  }, "strip", z.ZodTypeAny, {
64
269
  description: string;
65
270
  steps: Record<string, {
66
271
  options?: Record<string, unknown> | undefined;
67
272
  task?: string | undefined;
68
273
  flow?: string | undefined;
274
+ retries?: number | undefined;
275
+ retryDelay?: number | undefined;
276
+ retryOn?: string | undefined;
69
277
  }>;
278
+ on_start?: {
279
+ options?: Record<string, unknown> | undefined;
280
+ task?: string | undefined;
281
+ flow?: string | undefined;
282
+ retries?: number | undefined;
283
+ retryDelay?: number | undefined;
284
+ retryOn?: string | undefined;
285
+ }[] | undefined;
286
+ on_success?: {
287
+ options?: Record<string, unknown> | undefined;
288
+ task?: string | undefined;
289
+ flow?: string | undefined;
290
+ retries?: number | undefined;
291
+ retryDelay?: number | undefined;
292
+ retryOn?: string | undefined;
293
+ }[] | undefined;
294
+ on_failure?: {
295
+ options?: Record<string, unknown> | undefined;
296
+ task?: string | undefined;
297
+ flow?: string | undefined;
298
+ retries?: number | undefined;
299
+ retryDelay?: number | undefined;
300
+ retryOn?: string | undefined;
301
+ }[] | undefined;
302
+ finally?: {
303
+ options?: Record<string, unknown> | undefined;
304
+ task?: string | undefined;
305
+ flow?: string | undefined;
306
+ retries?: number | undefined;
307
+ retryDelay?: number | undefined;
308
+ retryOn?: string | undefined;
309
+ }[] | undefined;
310
+ rollback_on_failure?: boolean | undefined;
70
311
  }, {
71
312
  description: string;
72
313
  steps: Record<string, {
73
314
  options?: Record<string, unknown> | undefined;
74
315
  task?: string | undefined;
75
316
  flow?: string | undefined;
317
+ retries?: number | undefined;
318
+ retryDelay?: number | undefined;
319
+ retryOn?: string | undefined;
76
320
  }>;
321
+ on_start?: {
322
+ options?: Record<string, unknown> | undefined;
323
+ task?: string | undefined;
324
+ flow?: string | undefined;
325
+ retries?: number | undefined;
326
+ retryDelay?: number | undefined;
327
+ retryOn?: string | undefined;
328
+ }[] | undefined;
329
+ on_success?: {
330
+ options?: Record<string, unknown> | undefined;
331
+ task?: string | undefined;
332
+ flow?: string | undefined;
333
+ retries?: number | undefined;
334
+ retryDelay?: number | undefined;
335
+ retryOn?: string | undefined;
336
+ }[] | undefined;
337
+ on_failure?: {
338
+ options?: Record<string, unknown> | undefined;
339
+ task?: string | undefined;
340
+ flow?: string | undefined;
341
+ retries?: number | undefined;
342
+ retryDelay?: number | undefined;
343
+ retryOn?: string | undefined;
344
+ }[] | undefined;
345
+ finally?: {
346
+ options?: Record<string, unknown> | undefined;
347
+ task?: string | undefined;
348
+ flow?: string | undefined;
349
+ retries?: number | undefined;
350
+ retryDelay?: number | undefined;
351
+ retryOn?: string | undefined;
352
+ }[] | undefined;
353
+ rollback_on_failure?: boolean | undefined;
77
354
  }>;
78
355
  /** Minimal config shape the engine requires. Consumers extend with their own sections. */
79
356
  export declare const EngineConfigSchema: z.ZodObject<{
@@ -82,16 +359,23 @@ export declare const EngineConfigSchema: z.ZodObject<{
82
359
  description: z.ZodOptional<z.ZodString>;
83
360
  group: z.ZodOptional<z.ZodString>;
84
361
  options: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
362
+ /** Declarative hints surfaced in listings; not used by the runner. */
363
+ idempotent: z.ZodOptional<z.ZodBoolean>;
364
+ reversible: z.ZodOptional<z.ZodBoolean>;
85
365
  }, "strip", z.ZodTypeAny, {
86
366
  options: Record<string, unknown>;
87
367
  class_path: string;
88
368
  description?: string | undefined;
89
369
  group?: string | undefined;
370
+ idempotent?: boolean | undefined;
371
+ reversible?: boolean | undefined;
90
372
  }, {
91
373
  class_path: string;
92
374
  options?: Record<string, unknown> | undefined;
93
375
  description?: string | undefined;
94
376
  group?: string | undefined;
377
+ idempotent?: boolean | undefined;
378
+ reversible?: boolean | undefined;
95
379
  }>>>;
96
380
  flows: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
97
381
  description: z.ZodString;
@@ -99,37 +383,289 @@ export declare const EngineConfigSchema: z.ZodObject<{
99
383
  task: z.ZodOptional<z.ZodString>;
100
384
  flow: z.ZodOptional<z.ZodString>;
101
385
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
386
+ /** Retry the step up to N additional times on failure. */
387
+ retries: z.ZodOptional<z.ZodNumber>;
388
+ /** Delay between retries, in milliseconds. */
389
+ retryDelay: z.ZodOptional<z.ZodNumber>;
390
+ /** Only retry when the error message contains this substring. */
391
+ retryOn: z.ZodOptional<z.ZodString>;
102
392
  }, "strip", z.ZodTypeAny, {
103
393
  options?: Record<string, unknown> | undefined;
104
394
  task?: string | undefined;
105
395
  flow?: string | undefined;
396
+ retries?: number | undefined;
397
+ retryDelay?: number | undefined;
398
+ retryOn?: string | undefined;
106
399
  }, {
107
400
  options?: Record<string, unknown> | undefined;
108
401
  task?: string | undefined;
109
402
  flow?: string | undefined;
403
+ retries?: number | undefined;
404
+ retryDelay?: number | undefined;
405
+ retryOn?: string | undefined;
110
406
  }>, {
111
407
  options?: Record<string, unknown> | undefined;
112
408
  task?: string | undefined;
113
409
  flow?: string | undefined;
410
+ retries?: number | undefined;
411
+ retryDelay?: number | undefined;
412
+ retryOn?: string | undefined;
114
413
  }, {
115
414
  options?: Record<string, unknown> | undefined;
116
415
  task?: string | undefined;
117
416
  flow?: string | undefined;
417
+ retries?: number | undefined;
418
+ retryDelay?: number | undefined;
419
+ retryOn?: string | undefined;
118
420
  }>>;
421
+ /** Runs before the first step. Failure fails the flow before steps execute. */
422
+ on_start: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
423
+ task: z.ZodOptional<z.ZodString>;
424
+ flow: z.ZodOptional<z.ZodString>;
425
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
426
+ /** Retry the step up to N additional times on failure. */
427
+ retries: z.ZodOptional<z.ZodNumber>;
428
+ /** Delay between retries, in milliseconds. */
429
+ retryDelay: z.ZodOptional<z.ZodNumber>;
430
+ /** Only retry when the error message contains this substring. */
431
+ retryOn: z.ZodOptional<z.ZodString>;
432
+ }, "strip", z.ZodTypeAny, {
433
+ options?: Record<string, unknown> | undefined;
434
+ task?: string | undefined;
435
+ flow?: string | undefined;
436
+ retries?: number | undefined;
437
+ retryDelay?: number | undefined;
438
+ retryOn?: string | undefined;
439
+ }, {
440
+ options?: Record<string, unknown> | undefined;
441
+ task?: string | undefined;
442
+ flow?: string | undefined;
443
+ retries?: number | undefined;
444
+ retryDelay?: number | undefined;
445
+ retryOn?: string | undefined;
446
+ }>, {
447
+ options?: Record<string, unknown> | undefined;
448
+ task?: string | undefined;
449
+ flow?: string | undefined;
450
+ retries?: number | undefined;
451
+ retryDelay?: number | undefined;
452
+ retryOn?: string | undefined;
453
+ }, {
454
+ options?: Record<string, unknown> | undefined;
455
+ task?: string | undefined;
456
+ flow?: string | undefined;
457
+ retries?: number | undefined;
458
+ retryDelay?: number | undefined;
459
+ retryOn?: string | undefined;
460
+ }>, "many">>;
461
+ /** Runs after all steps succeed. */
462
+ on_success: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
463
+ task: z.ZodOptional<z.ZodString>;
464
+ flow: z.ZodOptional<z.ZodString>;
465
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
466
+ /** Retry the step up to N additional times on failure. */
467
+ retries: z.ZodOptional<z.ZodNumber>;
468
+ /** Delay between retries, in milliseconds. */
469
+ retryDelay: z.ZodOptional<z.ZodNumber>;
470
+ /** Only retry when the error message contains this substring. */
471
+ retryOn: z.ZodOptional<z.ZodString>;
472
+ }, "strip", z.ZodTypeAny, {
473
+ options?: Record<string, unknown> | undefined;
474
+ task?: string | undefined;
475
+ flow?: string | undefined;
476
+ retries?: number | undefined;
477
+ retryDelay?: number | undefined;
478
+ retryOn?: string | undefined;
479
+ }, {
480
+ options?: Record<string, unknown> | undefined;
481
+ task?: string | undefined;
482
+ flow?: string | undefined;
483
+ retries?: number | undefined;
484
+ retryDelay?: number | undefined;
485
+ retryOn?: string | undefined;
486
+ }>, {
487
+ options?: Record<string, unknown> | undefined;
488
+ task?: string | undefined;
489
+ flow?: string | undefined;
490
+ retries?: number | undefined;
491
+ retryDelay?: number | undefined;
492
+ retryOn?: string | undefined;
493
+ }, {
494
+ options?: Record<string, unknown> | undefined;
495
+ task?: string | undefined;
496
+ flow?: string | undefined;
497
+ retries?: number | undefined;
498
+ retryDelay?: number | undefined;
499
+ retryOn?: string | undefined;
500
+ }>, "many">>;
501
+ /** Runs on any step failure. */
502
+ on_failure: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
503
+ task: z.ZodOptional<z.ZodString>;
504
+ flow: z.ZodOptional<z.ZodString>;
505
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
506
+ /** Retry the step up to N additional times on failure. */
507
+ retries: z.ZodOptional<z.ZodNumber>;
508
+ /** Delay between retries, in milliseconds. */
509
+ retryDelay: z.ZodOptional<z.ZodNumber>;
510
+ /** Only retry when the error message contains this substring. */
511
+ retryOn: z.ZodOptional<z.ZodString>;
512
+ }, "strip", z.ZodTypeAny, {
513
+ options?: Record<string, unknown> | undefined;
514
+ task?: string | undefined;
515
+ flow?: string | undefined;
516
+ retries?: number | undefined;
517
+ retryDelay?: number | undefined;
518
+ retryOn?: string | undefined;
519
+ }, {
520
+ options?: Record<string, unknown> | undefined;
521
+ task?: string | undefined;
522
+ flow?: string | undefined;
523
+ retries?: number | undefined;
524
+ retryDelay?: number | undefined;
525
+ retryOn?: string | undefined;
526
+ }>, {
527
+ options?: Record<string, unknown> | undefined;
528
+ task?: string | undefined;
529
+ flow?: string | undefined;
530
+ retries?: number | undefined;
531
+ retryDelay?: number | undefined;
532
+ retryOn?: string | undefined;
533
+ }, {
534
+ options?: Record<string, unknown> | undefined;
535
+ task?: string | undefined;
536
+ flow?: string | undefined;
537
+ retries?: number | undefined;
538
+ retryDelay?: number | undefined;
539
+ retryOn?: string | undefined;
540
+ }>, "many">>;
541
+ /** Runs after success or failure, after on_success/on_failure. */
542
+ finally: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
543
+ task: z.ZodOptional<z.ZodString>;
544
+ flow: z.ZodOptional<z.ZodString>;
545
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
546
+ /** Retry the step up to N additional times on failure. */
547
+ retries: z.ZodOptional<z.ZodNumber>;
548
+ /** Delay between retries, in milliseconds. */
549
+ retryDelay: z.ZodOptional<z.ZodNumber>;
550
+ /** Only retry when the error message contains this substring. */
551
+ retryOn: z.ZodOptional<z.ZodString>;
552
+ }, "strip", z.ZodTypeAny, {
553
+ options?: Record<string, unknown> | undefined;
554
+ task?: string | undefined;
555
+ flow?: string | undefined;
556
+ retries?: number | undefined;
557
+ retryDelay?: number | undefined;
558
+ retryOn?: string | undefined;
559
+ }, {
560
+ options?: Record<string, unknown> | undefined;
561
+ task?: string | undefined;
562
+ flow?: string | undefined;
563
+ retries?: number | undefined;
564
+ retryDelay?: number | undefined;
565
+ retryOn?: string | undefined;
566
+ }>, {
567
+ options?: Record<string, unknown> | undefined;
568
+ task?: string | undefined;
569
+ flow?: string | undefined;
570
+ retries?: number | undefined;
571
+ retryDelay?: number | undefined;
572
+ retryOn?: string | undefined;
573
+ }, {
574
+ options?: Record<string, unknown> | undefined;
575
+ task?: string | undefined;
576
+ flow?: string | undefined;
577
+ retries?: number | undefined;
578
+ retryDelay?: number | undefined;
579
+ retryOn?: string | undefined;
580
+ }>, "many">>;
581
+ /** If true, invoke rollback records from completed steps in reverse order on failure. */
582
+ rollback_on_failure: z.ZodOptional<z.ZodBoolean>;
119
583
  }, "strip", z.ZodTypeAny, {
120
584
  description: string;
121
585
  steps: Record<string, {
122
586
  options?: Record<string, unknown> | undefined;
123
587
  task?: string | undefined;
124
588
  flow?: string | undefined;
589
+ retries?: number | undefined;
590
+ retryDelay?: number | undefined;
591
+ retryOn?: string | undefined;
125
592
  }>;
593
+ on_start?: {
594
+ options?: Record<string, unknown> | undefined;
595
+ task?: string | undefined;
596
+ flow?: string | undefined;
597
+ retries?: number | undefined;
598
+ retryDelay?: number | undefined;
599
+ retryOn?: string | undefined;
600
+ }[] | undefined;
601
+ on_success?: {
602
+ options?: Record<string, unknown> | undefined;
603
+ task?: string | undefined;
604
+ flow?: string | undefined;
605
+ retries?: number | undefined;
606
+ retryDelay?: number | undefined;
607
+ retryOn?: string | undefined;
608
+ }[] | undefined;
609
+ on_failure?: {
610
+ options?: Record<string, unknown> | undefined;
611
+ task?: string | undefined;
612
+ flow?: string | undefined;
613
+ retries?: number | undefined;
614
+ retryDelay?: number | undefined;
615
+ retryOn?: string | undefined;
616
+ }[] | undefined;
617
+ finally?: {
618
+ options?: Record<string, unknown> | undefined;
619
+ task?: string | undefined;
620
+ flow?: string | undefined;
621
+ retries?: number | undefined;
622
+ retryDelay?: number | undefined;
623
+ retryOn?: string | undefined;
624
+ }[] | undefined;
625
+ rollback_on_failure?: boolean | undefined;
126
626
  }, {
127
627
  description: string;
128
628
  steps: Record<string, {
129
629
  options?: Record<string, unknown> | undefined;
130
630
  task?: string | undefined;
131
631
  flow?: string | undefined;
632
+ retries?: number | undefined;
633
+ retryDelay?: number | undefined;
634
+ retryOn?: string | undefined;
132
635
  }>;
636
+ on_start?: {
637
+ options?: Record<string, unknown> | undefined;
638
+ task?: string | undefined;
639
+ flow?: string | undefined;
640
+ retries?: number | undefined;
641
+ retryDelay?: number | undefined;
642
+ retryOn?: string | undefined;
643
+ }[] | undefined;
644
+ on_success?: {
645
+ options?: Record<string, unknown> | undefined;
646
+ task?: string | undefined;
647
+ flow?: string | undefined;
648
+ retries?: number | undefined;
649
+ retryDelay?: number | undefined;
650
+ retryOn?: string | undefined;
651
+ }[] | undefined;
652
+ on_failure?: {
653
+ options?: Record<string, unknown> | undefined;
654
+ task?: string | undefined;
655
+ flow?: string | undefined;
656
+ retries?: number | undefined;
657
+ retryDelay?: number | undefined;
658
+ retryOn?: string | undefined;
659
+ }[] | undefined;
660
+ finally?: {
661
+ options?: Record<string, unknown> | undefined;
662
+ task?: string | undefined;
663
+ flow?: string | undefined;
664
+ retries?: number | undefined;
665
+ retryDelay?: number | undefined;
666
+ retryOn?: string | undefined;
667
+ }[] | undefined;
668
+ rollback_on_failure?: boolean | undefined;
133
669
  }>>>;
134
670
  }, "strip", z.ZodTypeAny, {
135
671
  tasks: Record<string, {
@@ -137,6 +673,8 @@ export declare const EngineConfigSchema: z.ZodObject<{
137
673
  class_path: string;
138
674
  description?: string | undefined;
139
675
  group?: string | undefined;
676
+ idempotent?: boolean | undefined;
677
+ reversible?: boolean | undefined;
140
678
  }>;
141
679
  flows: Record<string, {
142
680
  description: string;
@@ -144,7 +682,43 @@ export declare const EngineConfigSchema: z.ZodObject<{
144
682
  options?: Record<string, unknown> | undefined;
145
683
  task?: string | undefined;
146
684
  flow?: string | undefined;
685
+ retries?: number | undefined;
686
+ retryDelay?: number | undefined;
687
+ retryOn?: string | undefined;
147
688
  }>;
689
+ on_start?: {
690
+ options?: Record<string, unknown> | undefined;
691
+ task?: string | undefined;
692
+ flow?: string | undefined;
693
+ retries?: number | undefined;
694
+ retryDelay?: number | undefined;
695
+ retryOn?: string | undefined;
696
+ }[] | undefined;
697
+ on_success?: {
698
+ options?: Record<string, unknown> | undefined;
699
+ task?: string | undefined;
700
+ flow?: string | undefined;
701
+ retries?: number | undefined;
702
+ retryDelay?: number | undefined;
703
+ retryOn?: string | undefined;
704
+ }[] | undefined;
705
+ on_failure?: {
706
+ options?: Record<string, unknown> | undefined;
707
+ task?: string | undefined;
708
+ flow?: string | undefined;
709
+ retries?: number | undefined;
710
+ retryDelay?: number | undefined;
711
+ retryOn?: string | undefined;
712
+ }[] | undefined;
713
+ finally?: {
714
+ options?: Record<string, unknown> | undefined;
715
+ task?: string | undefined;
716
+ flow?: string | undefined;
717
+ retries?: number | undefined;
718
+ retryDelay?: number | undefined;
719
+ retryOn?: string | undefined;
720
+ }[] | undefined;
721
+ rollback_on_failure?: boolean | undefined;
148
722
  }>;
149
723
  }, {
150
724
  tasks?: Record<string, {
@@ -152,6 +726,8 @@ export declare const EngineConfigSchema: z.ZodObject<{
152
726
  options?: Record<string, unknown> | undefined;
153
727
  description?: string | undefined;
154
728
  group?: string | undefined;
729
+ idempotent?: boolean | undefined;
730
+ reversible?: boolean | undefined;
155
731
  }> | undefined;
156
732
  flows?: Record<string, {
157
733
  description: string;
@@ -159,7 +735,43 @@ export declare const EngineConfigSchema: z.ZodObject<{
159
735
  options?: Record<string, unknown> | undefined;
160
736
  task?: string | undefined;
161
737
  flow?: string | undefined;
738
+ retries?: number | undefined;
739
+ retryDelay?: number | undefined;
740
+ retryOn?: string | undefined;
162
741
  }>;
742
+ on_start?: {
743
+ options?: Record<string, unknown> | undefined;
744
+ task?: string | undefined;
745
+ flow?: string | undefined;
746
+ retries?: number | undefined;
747
+ retryDelay?: number | undefined;
748
+ retryOn?: string | undefined;
749
+ }[] | undefined;
750
+ on_success?: {
751
+ options?: Record<string, unknown> | undefined;
752
+ task?: string | undefined;
753
+ flow?: string | undefined;
754
+ retries?: number | undefined;
755
+ retryDelay?: number | undefined;
756
+ retryOn?: string | undefined;
757
+ }[] | undefined;
758
+ on_failure?: {
759
+ options?: Record<string, unknown> | undefined;
760
+ task?: string | undefined;
761
+ flow?: string | undefined;
762
+ retries?: number | undefined;
763
+ retryDelay?: number | undefined;
764
+ retryOn?: string | undefined;
765
+ }[] | undefined;
766
+ finally?: {
767
+ options?: Record<string, unknown> | undefined;
768
+ task?: string | undefined;
769
+ flow?: string | undefined;
770
+ retries?: number | undefined;
771
+ retryDelay?: number | undefined;
772
+ retryOn?: string | undefined;
773
+ }[] | undefined;
774
+ rollback_on_failure?: boolean | undefined;
163
775
  }> | undefined;
164
776
  }>;
165
777
  export type TaskOptions = z.infer<typeof TaskOptionsSchema>;