fascicle 0.12.13 → 0.13.0

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/dist/adapters-DNnzeLxr.js +447 -0
  3. package/dist/adapters-DNnzeLxr.js.map +1 -0
  4. package/dist/adapters.d.ts +54 -9
  5. package/dist/adapters.js +1 -1
  6. package/dist/agents.d.ts +12 -9
  7. package/dist/agents.js +1 -1
  8. package/dist/{core-BVCVUMmH.js → core-B-M7nAkg.js} +704 -33
  9. package/dist/core-B-M7nAkg.js.map +1 -0
  10. package/dist/diagram_bin.d.ts +1 -2
  11. package/dist/diagram_bin.js +1 -1
  12. package/dist/diagram_bin.js.map +1 -1
  13. package/dist/{engine-Ct4LBzb9.js → engine-BRzVcTBB.js} +366 -36
  14. package/dist/engine-BRzVcTBB.js.map +1 -0
  15. package/dist/index.d.ts +325 -179
  16. package/dist/index.js +149 -123
  17. package/dist/index.js.map +1 -1
  18. package/dist/{invoke-BcPDqE5C.js → invoke-CIdhjChw.js} +3 -3
  19. package/dist/{invoke-BcPDqE5C.js.map → invoke-CIdhjChw.js.map} +1 -1
  20. package/dist/mcp.d.ts +8 -9
  21. package/dist/mcp.js +1 -1
  22. package/dist/otel.d.ts +3 -4
  23. package/dist/stdio.d.ts +4 -5
  24. package/dist/stdio.js +2 -2
  25. package/dist/testing.d.ts +46 -10
  26. package/dist/testing.js +540 -4
  27. package/dist/testing.js.map +1 -1
  28. package/dist/{trajectory-D1eq9eue.js → trajectory-BI-mrVFT.js} +25 -2
  29. package/dist/trajectory-BI-mrVFT.js.map +1 -0
  30. package/dist/{trajectory-ByoOQZ6T.d.ts → trajectory-Bm-mOtqw.d.ts} +34 -3
  31. package/dist/{types-BasW4Wwb.d.ts → types-CPqLZOEr.d.ts} +40 -2
  32. package/dist/{types-bEpfDrys.d.ts → types-CZ83Q5nm.d.ts} +12 -7
  33. package/dist/ui.d.ts +11 -10
  34. package/dist/ui.js +3 -2
  35. package/dist/ui.js.map +1 -1
  36. package/dist/viewer-app/assets/index-DXsB0byD.js +2 -0
  37. package/dist/viewer-app/index.html +1 -1
  38. package/dist/viewer.d.ts +7 -8
  39. package/dist/viewer.js +2 -2
  40. package/dist/viewer.js.map +1 -1
  41. package/package.json +28 -28
  42. package/dist/adapters-CutexJd3.js +0 -270
  43. package/dist/adapters-CutexJd3.js.map +0 -1
  44. package/dist/core-BVCVUMmH.js.map +0 -1
  45. package/dist/engine-Ct4LBzb9.js.map +0 -1
  46. package/dist/leading_system-CfOIc5fi.js +0 -330
  47. package/dist/leading_system-CfOIc5fi.js.map +0 -1
  48. package/dist/trajectory-D1eq9eue.js.map +0 -1
  49. package/dist/viewer-app/assets/index-BBEYkjnQ.js +0 -2
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { a as FlowValue, c as StepFn, d as StepOptions, f as StepOutput, i as FlowNode, l as StepInput, m as TrajectoryLogger, n as CheckpointStore, o as RunContext, p as TrajectoryEvent, r as CleanupFn, s as Step, t as AnyStep, u as StepMetadata } from "./types-BasW4Wwb.js";
1
+ import { a as FlowValue, c as Step, d as StepMetadata, f as StepOptions, h as TrajectoryLogger, i as FlowNode, l as StepFn, m as TrajectoryEvent, n as CheckpointStore, o as RunContext, p as StepOutput, r as CleanupFn, s as ScopedCheckpointStore, t as AnyStep, u as StepInput } from "./types-CPqLZOEr.js";
2
2
  import { n as SchemaIssue, r as ToolSchema, t as AnySchema } from "./types-BK0UW28o.js";
3
- import { _ as parse_trajectory_event, a as ParsedTrajectoryEvent, c as SpanEndEvent, d as is_checkpoint_event, f as is_custom_trajectory_event, g as is_span_start_event, h as is_span_end_event, i as EmitEvent, l as SpanStartEvent, m as is_run_end_event, n as CheckpointStatus, o as RunEndEvent, p as is_emit_event, r as CustomTrajectoryEvent, s as RunEndStatus, t as CheckpointEvent, u as TrajectoryParseResult } from "./trajectory-ByoOQZ6T.js";
4
- import { A as ToolExecContext, B as ProviderCapability, C as StepRecord, D as ToolApprovalHandler, E as Tool, F as AiSdkProviderAdapter, G as ClaudeCliProviderReported, H as ProviderTransport, I as EffortTranslation, L as ExternalAgentAdapter, M as TurnResult, N as UsageTotals, O as ToolApprovalRequest, P as UserContentPart, R as NativeProviderAdapter, S as RetryPolicy, T as StreamChunk, U as RawProviderUsage, V as ProviderFactory, W as default_normalize_usage, _ as PricingTable, a as Engine, b as ResolvedModel, c as FinishReason, d as GenerateTiming, f as Message, g as Pricing, h as PrepareStepResult, i as EffortLevel, j as TurnRequest, k as ToolCallRecord, l as GenerateOptions, m as PrepareStepHook, n as AssistantContentPart, o as EngineConfig, p as PrepareStepContext, r as CostBreakdown, s as EngineDefaults, t as AiSdkTelemetrySettings, u as GenerateResult, v as ProviderConfigMap, w as StepTiming, x as RetryFailureKind, y as ProviderInit, z as ProviderAdapter } from "./types-bEpfDrys.js";
5
-
3
+ import { _ as is_run_end_event, a as MapItemFailedEvent, b as is_step_replayed_event, c as RunEndStatus, d as StepReplayedEvent, f as TrajectoryParseResult, g as is_map_item_failed_event, h as is_emit_event, i as EmitEvent, l as SpanEndEvent, m as is_custom_trajectory_event, n as CheckpointStatus, o as ParsedTrajectoryEvent, p as is_checkpoint_event, r as CustomTrajectoryEvent, s as RunEndEvent, t as CheckpointEvent, u as SpanStartEvent, v as is_span_end_event, x as parse_trajectory_event, y as is_span_start_event } from "./trajectory-Bm-mOtqw.js";
4
+ import { A as ToolExecContext, B as ProviderCapability, C as StepRecord, D as ToolApprovalHandler, E as Tool, F as AiSdkProviderAdapter, G as ClaudeCliProviderReported, H as ProviderTransport, I as EffortTranslation, L as ExternalAgentAdapter, M as TurnResult, N as UsageTotals, O as ToolApprovalRequest, P as UserContentPart, R as NativeProviderAdapter, S as RetryPolicy, T as StreamChunk, U as RawProviderUsage, V as ProviderFactory, W as default_normalize_usage, _ as PricingTable, a as Engine, b as ResolvedModel, c as FinishReason, d as GenerateTiming, f as Message, g as Pricing, h as PrepareStepResult, i as EffortLevel, j as TurnRequest, k as ToolCallRecord, l as GenerateOptions, m as PrepareStepHook, n as AssistantContentPart, o as EngineConfig, p as PrepareStepContext, r as CostBreakdown, s as EngineDefaults, t as AiSdkTelemetrySettings, u as GenerateResult, v as ProviderConfigMap, w as StepTiming, x as RetryFailureKind, y as ProviderInit, z as ProviderAdapter } from "./types-CZ83Q5nm.js";
6
5
  //#region src/core/flow-schema.json.d.ts
7
6
  declare let $schema: string;
8
7
  declare let $id: string;
@@ -193,12 +192,16 @@ declare namespace $defs {
193
192
  export { type_14 as type };
194
193
  export let minimum: number;
195
194
  }
195
+ export namespace settle {
196
+ let type_15: string;
197
+ export { type_15 as type };
198
+ }
196
199
  }
197
200
  export { properties_4 as properties };
198
201
  }
199
202
  namespace pipe_config {
200
- let type_15: string;
201
- export { type_15 as type };
203
+ let type_16: string;
204
+ export { type_16 as type };
202
205
  let required_4: string[];
203
206
  export { required_4 as required };
204
207
  export namespace properties_5 {
@@ -207,16 +210,16 @@ declare namespace $defs {
207
210
  export { $ref_25 as $ref };
208
211
  }
209
212
  export namespace fn_1 {
210
- let type_16: string;
211
- export { type_16 as type };
213
+ let type_17: string;
214
+ export { type_17 as type };
212
215
  }
213
216
  export { fn_1 as fn };
214
217
  }
215
218
  export { properties_5 as properties };
216
219
  }
217
220
  namespace retry_config {
218
- let type_17: string;
219
- export { type_17 as type };
221
+ let type_18: string;
222
+ export { type_18 as type };
220
223
  let required_5: string[];
221
224
  export { required_5 as required };
222
225
  export namespace properties_6 {
@@ -226,14 +229,14 @@ declare namespace $defs {
226
229
  }
227
230
  export { _do_1 as do };
228
231
  export namespace max_attempts {
229
- let type_18: string;
230
- export { type_18 as type };
232
+ let type_19: string;
233
+ export { type_19 as type };
231
234
  let minimum_1: number;
232
235
  export { minimum_1 as minimum };
233
236
  }
234
237
  export namespace backoff_ms {
235
- let type_19: string;
236
- export { type_19 as type };
238
+ let type_20: string;
239
+ export { type_20 as type };
237
240
  let minimum_2: number;
238
241
  export { minimum_2 as minimum };
239
242
  }
@@ -241,8 +244,8 @@ declare namespace $defs {
241
244
  export { properties_6 as properties };
242
245
  }
243
246
  namespace fallback_config {
244
- let type_20: string;
245
- export { type_20 as type };
247
+ let type_21: string;
248
+ export { type_21 as type };
246
249
  let required_6: string[];
247
250
  export { required_6 as required };
248
251
  export namespace properties_7 {
@@ -258,8 +261,8 @@ declare namespace $defs {
258
261
  export { properties_7 as properties };
259
262
  }
260
263
  namespace timeout_config {
261
- let type_21: string;
262
- export { type_21 as type };
264
+ let type_22: string;
265
+ export { type_22 as type };
263
266
  let required_7: string[];
264
267
  export { required_7 as required };
265
268
  export namespace properties_8 {
@@ -269,8 +272,8 @@ declare namespace $defs {
269
272
  }
270
273
  export { _do_2 as do };
271
274
  export namespace ms {
272
- let type_22: string;
273
- export { type_22 as type };
275
+ let type_23: string;
276
+ export { type_23 as type };
274
277
  let minimum_3: number;
275
278
  export { minimum_3 as minimum };
276
279
  }
@@ -278,14 +281,14 @@ declare namespace $defs {
278
281
  export { properties_8 as properties };
279
282
  }
280
283
  namespace compose_node_config {
281
- let type_23: string;
282
- export { type_23 as type };
284
+ let type_24: string;
285
+ export { type_24 as type };
283
286
  let required_8: string[];
284
287
  export { required_8 as required };
285
288
  export namespace properties_9 {
286
289
  export namespace name {
287
- let type_24: string;
288
- export { type_24 as type };
290
+ let type_25: string;
291
+ export { type_25 as type };
289
292
  export let minLength: number;
290
293
  }
291
294
  export namespace _do_3 {
@@ -297,21 +300,21 @@ declare namespace $defs {
297
300
  export { properties_9 as properties };
298
301
  }
299
302
  namespace loop_config {
300
- let type_25: string;
301
- export { type_25 as type };
303
+ let type_26: string;
304
+ export { type_26 as type };
302
305
  let required_9: string[];
303
306
  export { required_9 as required };
304
307
  export namespace properties_10 {
305
308
  export namespace name_1 {
306
- let type_26: string;
307
- export { type_26 as type };
309
+ let type_27: string;
310
+ export { type_27 as type };
308
311
  let minLength_1: number;
309
312
  export { minLength_1 as minLength };
310
313
  }
311
314
  export { name_1 as name };
312
315
  export namespace init {
313
- let type_27: string;
314
- export { type_27 as type };
316
+ let type_28: string;
317
+ export { type_28 as type };
315
318
  }
316
319
  export namespace body {
317
320
  let $ref_31: string;
@@ -322,12 +325,12 @@ declare namespace $defs {
322
325
  export { $ref_32 as $ref };
323
326
  }
324
327
  export namespace finish {
325
- let type_28: string;
326
- export { type_28 as type };
327
- }
328
- export namespace max_rounds {
329
328
  let type_29: string;
330
329
  export { type_29 as type };
330
+ }
331
+ export namespace max_rounds {
332
+ let type_30: string;
333
+ export { type_30 as type };
331
334
  let minimum_4: number;
332
335
  export { minimum_4 as minimum };
333
336
  }
@@ -335,8 +338,8 @@ declare namespace $defs {
335
338
  export { properties_10 as properties };
336
339
  }
337
340
  namespace adversarial_config {
338
- let type_30: string;
339
- export { type_30 as type };
341
+ let type_31: string;
342
+ export { type_31 as type };
340
343
  let required_10: string[];
341
344
  export { required_10 as required };
342
345
  export namespace properties_11 {
@@ -349,12 +352,12 @@ declare namespace $defs {
349
352
  export { $ref_34 as $ref };
350
353
  }
351
354
  export namespace accept {
352
- let type_31: string;
353
- export { type_31 as type };
354
- }
355
- export namespace max_rounds_1 {
356
355
  let type_32: string;
357
356
  export { type_32 as type };
357
+ }
358
+ export namespace max_rounds_1 {
359
+ let type_33: string;
360
+ export { type_33 as type };
358
361
  let minimum_5: number;
359
362
  export { minimum_5 as minimum };
360
363
  }
@@ -363,14 +366,14 @@ declare namespace $defs {
363
366
  export { properties_11 as properties };
364
367
  }
365
368
  namespace ensemble_config {
366
- let type_33: string;
367
- export { type_33 as type };
369
+ let type_34: string;
370
+ export { type_34 as type };
368
371
  let required_11: string[];
369
372
  export { required_11 as required };
370
373
  export namespace properties_12 {
371
374
  namespace members {
372
- let type_34: string;
373
- export { type_34 as type };
375
+ let type_35: string;
376
+ export { type_35 as type };
374
377
  export namespace additionalProperties_1 {
375
378
  let $ref_35: string;
376
379
  export { $ref_35 as $ref };
@@ -378,12 +381,12 @@ declare namespace $defs {
378
381
  export { additionalProperties_1 as additionalProperties };
379
382
  }
380
383
  namespace score {
381
- let type_35: string;
382
- export { type_35 as type };
383
- }
384
- namespace select {
385
384
  let type_36: string;
386
385
  export { type_36 as type };
386
+ }
387
+ namespace select {
388
+ let type_37: string;
389
+ export { type_37 as type };
387
390
  let _enum: string[];
388
391
  export { _enum as enum };
389
392
  }
@@ -391,14 +394,14 @@ declare namespace $defs {
391
394
  export { properties_12 as properties };
392
395
  }
393
396
  namespace tournament_config {
394
- let type_37: string;
395
- export { type_37 as type };
397
+ let type_38: string;
398
+ export { type_38 as type };
396
399
  let required_12: string[];
397
400
  export { required_12 as required };
398
401
  export namespace properties_13 {
399
402
  export namespace members_1 {
400
- let type_38: string;
401
- export { type_38 as type };
403
+ let type_39: string;
404
+ export { type_39 as type };
402
405
  export namespace additionalProperties_2 {
403
406
  let $ref_36: string;
404
407
  export { $ref_36 as $ref };
@@ -407,21 +410,21 @@ declare namespace $defs {
407
410
  }
408
411
  export { members_1 as members };
409
412
  export namespace compare {
410
- let type_39: string;
411
- export { type_39 as type };
413
+ let type_40: string;
414
+ export { type_40 as type };
412
415
  }
413
416
  }
414
417
  export { properties_13 as properties };
415
418
  }
416
419
  namespace consensus_config {
417
- let type_40: string;
418
- export { type_40 as type };
420
+ let type_41: string;
421
+ export { type_41 as type };
419
422
  let required_13: string[];
420
423
  export { required_13 as required };
421
424
  export namespace properties_14 {
422
425
  export namespace members_2 {
423
- let type_41: string;
424
- export { type_41 as type };
426
+ let type_42: string;
427
+ export { type_42 as type };
425
428
  export namespace additionalProperties_3 {
426
429
  let $ref_37: string;
427
430
  export { $ref_37 as $ref };
@@ -430,12 +433,12 @@ declare namespace $defs {
430
433
  }
431
434
  export { members_2 as members };
432
435
  export namespace agree {
433
- let type_42: string;
434
- export { type_42 as type };
435
- }
436
- export namespace max_rounds_2 {
437
436
  let type_43: string;
438
437
  export { type_43 as type };
438
+ }
439
+ export namespace max_rounds_2 {
440
+ let type_44: string;
441
+ export { type_44 as type };
439
442
  let minimum_6: number;
440
443
  export { minimum_6 as minimum };
441
444
  }
@@ -444,8 +447,8 @@ declare namespace $defs {
444
447
  export { properties_14 as properties };
445
448
  }
446
449
  namespace checkpoint_config {
447
- let type_44: string;
448
- export { type_44 as type };
450
+ let type_45: string;
451
+ export { type_45 as type };
449
452
  let required_14: string[];
450
453
  export { required_14 as required };
451
454
  export namespace properties_15 {
@@ -455,41 +458,45 @@ declare namespace $defs {
455
458
  }
456
459
  export { _do_4 as do };
457
460
  export namespace key {
458
- let type_45: string;
459
- export { type_45 as type };
461
+ let type_46: string;
462
+ export { type_46 as type };
460
463
  }
461
464
  }
462
465
  export { properties_15 as properties };
463
466
  }
464
467
  namespace suspend_config {
465
- let type_46: string;
466
- export { type_46 as type };
468
+ let type_47: string;
469
+ export { type_47 as type };
467
470
  let required_15: string[];
468
471
  export { required_15 as required };
469
472
  export namespace properties_16 {
470
473
  export namespace id_1 {
471
- let type_47: string;
472
- export { type_47 as type };
473
- }
474
- export { id_1 as id };
475
- export namespace on {
476
474
  let type_48: string;
477
475
  export { type_48 as type };
478
476
  }
479
- export namespace resume_schema {
477
+ export { id_1 as id };
478
+ export namespace on {
480
479
  let type_49: string;
481
480
  export { type_49 as type };
482
481
  }
483
- export namespace combine {
482
+ export namespace resume_schema {
484
483
  let type_50: string;
485
484
  export { type_50 as type };
486
485
  }
486
+ export namespace combine {
487
+ let type_51: string;
488
+ export { type_51 as type };
489
+ }
490
+ export namespace deadline_ms {
491
+ let type_52: string;
492
+ export { type_52 as type };
493
+ }
487
494
  }
488
495
  export { properties_16 as properties };
489
496
  }
490
497
  namespace scope_config {
491
- let type_51: string;
492
- export { type_51 as type };
498
+ let type_53: string;
499
+ export { type_53 as type };
493
500
  export namespace items_3 {
494
501
  let $ref_39: string;
495
502
  export { $ref_39 as $ref };
@@ -497,8 +504,8 @@ declare namespace $defs {
497
504
  export { items_3 as items };
498
505
  }
499
506
  namespace scope_entry {
500
- let type_52: string;
501
- export { type_52 as type };
507
+ let type_54: string;
508
+ export { type_54 as type };
502
509
  export let oneOf: ({
503
510
  type: string;
504
511
  required: string[];
@@ -529,18 +536,18 @@ declare namespace $defs {
529
536
  })[];
530
537
  }
531
538
  namespace chain_config {
532
- let type_53: string;
533
- export { type_53 as type };
539
+ let type_55: string;
540
+ export { type_55 as type };
534
541
  let required_16: string[];
535
542
  export { required_16 as required };
536
543
  export namespace properties_17 {
537
544
  namespace input {
538
- let type_54: string;
539
- export { type_54 as type };
545
+ let type_56: string;
546
+ export { type_56 as type };
540
547
  }
541
548
  namespace steps {
542
- let type_55: string;
543
- export { type_55 as type };
549
+ let type_57: string;
550
+ export { type_57 as type };
544
551
  export namespace items_4 {
545
552
  let $ref_40: string;
546
553
  export { $ref_40 as $ref };
@@ -548,15 +555,15 @@ declare namespace $defs {
548
555
  export { items_4 as items };
549
556
  }
550
557
  namespace output {
551
- let type_56: string;
552
- export { type_56 as type };
558
+ let type_58: string;
559
+ export { type_58 as type };
553
560
  }
554
561
  }
555
562
  export { properties_17 as properties };
556
563
  }
557
564
  namespace chain_entry {
558
- let type_57: string;
559
- export { type_57 as type };
565
+ let type_59: string;
566
+ export { type_59 as type };
560
567
  let oneOf_1: ({
561
568
  type: string;
562
569
  required: string[];
@@ -618,6 +625,7 @@ type RunOutcome<o> = {
618
625
  readonly kind: 'suspended';
619
626
  readonly id: string;
620
627
  readonly payload: unknown;
628
+ readonly deadline_ms?: number;
621
629
  readonly resume: (data: unknown) => Promise<RunOutcome<o>>;
622
630
  };
623
631
  /**
@@ -627,7 +635,8 @@ type RunOutcome<o> = {
627
635
  * Resolves `{ kind: 'done', output }` on completion. When a `suspend` gate
628
636
  * fires, resolves `{ kind: 'suspended', id, payload, resume }` where `id` is
629
637
  * the gate's suspend id, `payload` is what the gate raised on its
630
- * `suspended_error`, and `resume(data)` re-runs the flow from the original
638
+ * `suspended_error` (plus `deadline_ms`, when the gate set one), and
639
+ * `resume(data)` re-runs the flow from the original
631
640
  * input with `resume_data[id] = data` merged over the caller's options: the
632
641
  * same full re-run semantics as calling `run` again yourself, so pure
633
642
  * prefixes replay and `checkpoint`ed steps are served from the store. The
@@ -645,11 +654,86 @@ declare function run_until_suspended<i, o>(flow: Step<i, o>, input: i, options?:
645
654
  * carries suspension as data. All share one implementation, so every entry
646
655
  * point runs the same graph identically.
647
656
  */
648
- declare const run: typeof run_impl & {
657
+ export declare const run: typeof run_impl & {
649
658
  stream: typeof run_stream;
650
659
  until_suspended: typeof run_until_suspended;
651
660
  };
652
661
  //#endregion
662
+ //#region src/core/durable.d.ts
663
+ type Claims = Required<Pick<CheckpointStore, 'claim' | 'release'>>;
664
+ /**
665
+ * A store `durable` can keep runs in: one that scopes, and whose scopes can
666
+ * claim. `filesystem_store` from `fascicle/adapters` is one, and
667
+ * `checkpoint_store_conformance` in `fascicle/testing` checks a store of
668
+ * your own.
669
+ */
670
+ type DurableStore = {
671
+ readonly scope: (prefix: string) => ScopedCheckpointStore & Claims;
672
+ };
673
+ type DurableConfig = {
674
+ readonly store: DurableStore;
675
+ /**
676
+ * How long a drive owns its run before another invocation may take it
677
+ * over, in milliseconds. The driver renews the lease every third of this
678
+ * while it drives, so the lease only runs out once a drive stops answering
679
+ * (its process died, or stalled for longer than this). Default 60 seconds.
680
+ */
681
+ readonly lease_ms?: number;
682
+ /**
683
+ * What happens when a run's flow no longer has the shape the run started
684
+ * on. `'fail'` (the default) throws `flow_changed_error`. `'replay'` takes
685
+ * the new shape, records a `flow_changed` event, and drives on.
686
+ */
687
+ readonly on_flow_change?: 'fail' | 'replay';
688
+ };
689
+ /**
690
+ * The `run` options a drive passes through. The driver owns the checkpoint
691
+ * store and the resume data, so it leaves those two out.
692
+ */
693
+ type DurableRunOptions = Omit<RunOptions, 'checkpoint_store' | 'resume_data'>;
694
+ type DurableOutcome<o> = {
695
+ readonly kind: 'done';
696
+ readonly run_id: string;
697
+ readonly output: o;
698
+ } | {
699
+ readonly kind: 'suspended';
700
+ readonly run_id: string;
701
+ readonly id: string;
702
+ readonly payload: unknown;
703
+ readonly deadline_at?: number;
704
+ } | {
705
+ readonly kind: 'busy';
706
+ readonly run_id: string;
707
+ };
708
+ type DurableRunState = Exclude<DurableOutcome<unknown>, {
709
+ readonly kind: 'busy';
710
+ }> | {
711
+ readonly kind: 'running';
712
+ readonly run_id: string;
713
+ } | {
714
+ readonly kind: 'failed';
715
+ readonly run_id: string;
716
+ readonly error: string;
717
+ };
718
+ type DurableRuns = {
719
+ readonly start: <i, o>(run_id: string, flow: Step<i, o>, input: i, options?: DurableRunOptions) => Promise<DurableOutcome<o>>;
720
+ readonly resume: <i, o>(run_id: string, flow: Step<i, o>, resume_data: Readonly<Record<string, unknown>>, options?: DurableRunOptions) => Promise<DurableOutcome<o>>;
721
+ readonly get: (run_id: string) => Promise<DurableRunState | undefined>;
722
+ readonly delete: (run_id: string) => Promise<boolean>;
723
+ };
724
+ /**
725
+ * Keep the runs of flows that suspend in `config.store`, and drive them one
726
+ * event at a time.
727
+ *
728
+ * `start(run_id, flow, input)` begins a run and drives it until it's done or
729
+ * waiting at a gate. `resume(run_id, flow, { [gate]: data })` hands a run
730
+ * the data its gate waits for and drives it on. Both report `busy` instead
731
+ * when another invocation is driving the run, and both are safe to repeat.
732
+ * `get(run_id)` reads where a run stands without driving it, and
733
+ * `delete(run_id)` removes it, resolving false while a drive holds it.
734
+ */
735
+ export declare function durable(config: DurableConfig): DurableRuns;
736
+ //#endregion
653
737
  //#region src/core/step.d.ts
654
738
  /**
655
739
  * Wrap a plain function as a `Step`, named or anonymous.
@@ -662,13 +746,16 @@ declare const run: typeof run_impl & {
662
746
  * `options` is stored as `meta`, and left off entirely when nothing remains,
663
747
  * so `describe` never echoes an empty object.
664
748
  */
665
- declare function step<i, o>(id: string, fn: StepFn<i, o>, options?: StepOptions): Step<i, o>;
666
- declare function step<i, o>(fn: StepFn<i, o>): Step<i, o>;
749
+ export declare function step<i, o>(id: string, fn: StepFn<i, o>, options?: StepOptions): Step<i, o>;
750
+ export declare function step<i, o>(fn: StepFn<i, o>): Step<i, o>;
667
751
  //#endregion
668
752
  //#region src/core/diagram.d.ts
669
753
  type DiagramOptions = {
670
- /** Throw `describe_cycle_error` on a cycle instead of drawing `<cycle>`, as `describe` does. */readonly strict?: boolean; /** Wrap descriptions so that no line runs wider than this, `prefix` included. */
671
- readonly width?: number; /** Written at the start of every line, for example `' * '` for a doc comment. */
754
+ /** Throw `describe_cycle_error` on a cycle instead of drawing `<cycle>`, as `describe` does. */
755
+ readonly strict?: boolean;
756
+ /** Wrap descriptions so that no line runs wider than this, `prefix` included. */
757
+ readonly width?: number;
758
+ /** Written at the start of every line, for example `' * '` for a doc comment. */
672
759
  readonly prefix?: string;
673
760
  };
674
761
  //#endregion
@@ -680,7 +767,7 @@ type DescribeOptions = {
680
767
  * Public entry point: `describe(step)` for text, `describe.json(step)` for
681
768
  * the `FlowNode` tree, `describe.diagram(step)` for the annotated diagram.
682
769
  */
683
- declare const describe: {
770
+ export declare const describe: {
684
771
  <i, o>(root: Step<i, o>, options?: DescribeOptions): string;
685
772
  json: <i, o>(root: Step<i, o>, options?: DescribeOptions) => FlowNode;
686
773
  diagram: <i, o>(root: Step<i, o>, options?: DiagramOptions) => string;
@@ -693,7 +780,7 @@ declare const describe: {
693
780
  * It reads only `config` and `meta`, so a `describe.json` node resolves the
694
781
  * same way as the step it was drawn from.
695
782
  */
696
- declare function resolve_display_name(node: Pick<AnyStep, 'config' | 'meta'>, fallback: string): string;
783
+ export declare function resolve_display_name(node: Pick<AnyStep, 'config' | 'meta'>, fallback: string): string;
697
784
  //#endregion
698
785
  //#region src/core/step_id.d.ts
699
786
  /**
@@ -718,19 +805,19 @@ declare function resolve_display_name(node: Pick<AnyStep, 'config' | 'meta'>, fa
718
805
  /**
719
806
  * Report whether `id` can be read back as a property name.
720
807
  */
721
- declare function is_valid_step_id(id: string): boolean;
808
+ export declare function is_valid_step_id(id: string): boolean;
722
809
  /**
723
810
  * Render the closest identifier-shaped spelling of `raw`, for failure
724
811
  * messages only. Prefixes an underscore when the swap alone still leaves an
725
812
  * illegal leading character, so the suggestion is always usable as written.
726
813
  */
727
- declare function suggest_step_id(raw: string): string;
814
+ export declare function suggest_step_id(raw: string): string;
728
815
  /**
729
816
  * Throw when `id` is not identifier-shaped. `subject` names the failing
730
817
  * surface so the message points at the call the reader actually wrote, and
731
818
  * `remedy` says where the prose spelling belongs instead.
732
819
  */
733
- declare function assert_valid_step_id(id: string, subject: string, remedy: string): void;
820
+ export declare function assert_valid_step_id(id: string, subject: string, remedy: string): void;
734
821
  //#endregion
735
822
  //#region src/core/sequence.d.ts
736
823
  type FirstInput<children> = children extends readonly [Step<infer i, unknown>, ...unknown[]] ? i : unknown;
@@ -744,7 +831,7 @@ interface SequenceJointMismatch<at extends string, upstream_output, this_step_ac
744
831
  }
745
832
  type CheckedJoint<element, upstream, at extends string> = unknown extends element ? unknown : element extends AnyStep ? [upstream] extends [InputOf<element>] ? element : SequenceJointMismatch<at, upstream, InputOf<element>> : AnyStep;
746
833
  type CheckedFirst<element> = unknown extends element ? unknown : element extends AnyStep ? element : AnyStep;
747
- type CheckedTail<children extends readonly unknown[], rest extends readonly unknown[]> = { readonly [k in keyof rest]: CheckedJoint<rest[k], OutputOf<k extends keyof children ? children[k] : never>, `after children[${k & string}]`> };
834
+ type CheckedTail<children extends readonly unknown[], rest extends readonly unknown[]> = { readonly [k in keyof rest]: CheckedJoint<rest[k], OutputOf<k extends keyof children ? children[k] : never>, `after children[${k & string}]`>; };
748
835
  type IsPlainArray<t extends readonly unknown[]> = t extends readonly [] ? false : t[number][] extends [...t] ? true : false;
749
836
  type CheckedSegment<seg extends readonly unknown[], e, upstream> = unknown extends e ? seg : [e] extends [AnyStep] ? [upstream | OutputOf<e>] extends [InputOf<e>] ? seg : readonly SequenceJointMismatch<'spread segment', upstream | OutputOf<e>, InputOf<e>>[] : readonly AnyStep[];
750
837
  type SplitSpreadTrail<t extends readonly unknown[], trail extends readonly unknown[] = []> = IsPlainArray<t> extends true ? [t, trail] : t extends readonly [...infer init, infer last_el] ? SplitSpreadTrail<init, [last_el, ...trail]> : [t, trail];
@@ -777,13 +864,13 @@ type SequenceOptions = {
777
864
  * construction with a pointed message rather than at run time. Checks
778
865
  * `ctx.abort` before each child so aborts land on step boundaries.
779
866
  */
780
- declare function sequence<const children extends readonly unknown[]>(children: children & CheckedChildren<children>, options?: SequenceOptions): Step<FirstInput<children>, LastOutput$1<children>>;
781
- declare function sequence<t>(children: ReadonlyArray<Step<t, t>>, options?: SequenceOptions): Step<t, t>;
867
+ export declare function sequence<const children extends readonly unknown[]>(children: children & CheckedChildren<children>, options?: SequenceOptions): Step<FirstInput<children>, LastOutput$1<children>>;
868
+ export declare function sequence<t>(children: ReadonlyArray<Step<t, t>>, options?: SequenceOptions): Step<t, t>;
782
869
  //#endregion
783
870
  //#region src/core/parallel.d.ts
784
871
  type UnionToIntersection<u> = (u extends unknown ? (x: u) => void : never) extends ((x: infer i) => void) ? i : never;
785
872
  type ParallelInput<children extends Record<string, AnyStep>> = UnionToIntersection<StepInput<children[keyof children]>>;
786
- type ParallelOutputs<children extends Record<string, AnyStep>> = { [k in keyof children]: StepOutput<children[k]> };
873
+ type ParallelOutputs<children extends Record<string, AnyStep>> = { [k in keyof children]: StepOutput<children[k]>; };
787
874
  type ParallelOptions = {
788
875
  readonly name?: string;
789
876
  readonly description?: string;
@@ -797,7 +884,7 @@ type ParallelOptions = {
797
884
  * wins over application errors so a human-approval gate stays resumable
798
885
  * instead of being masked by a sibling's failure.
799
886
  */
800
- declare function parallel<children extends Record<string, AnyStep>>(members: children, options?: ParallelOptions): Step<ParallelInput<children>, ParallelOutputs<children>>;
887
+ export declare function parallel<children extends Record<string, AnyStep>>(members: children, options?: ParallelOptions): Step<ParallelInput<children>, ParallelOutputs<children>>;
801
888
  //#endregion
802
889
  //#region src/core/branch.d.ts
803
890
  type BranchConfig<i, o> = {
@@ -814,7 +901,7 @@ type BranchConfig<i, o> = {
814
901
  * Both branches appear as children so `describe()` renders the full tree even
815
902
  * though only one branch runs.
816
903
  */
817
- declare function branch<i, o>(config: BranchConfig<i, o>): Step<i, o>;
904
+ export declare function branch<i, o>(config: BranchConfig<i, o>): Step<i, o>;
818
905
  //#endregion
819
906
  //#region src/core/map.d.ts
820
907
  type MapConfig<input, item, result> = {
@@ -823,15 +910,52 @@ type MapConfig<input, item, result> = {
823
910
  readonly items: (input: input) => ReadonlyArray<item> | Promise<ReadonlyArray<item>>;
824
911
  readonly do: Step<item, result>;
825
912
  readonly concurrency?: number;
913
+ /**
914
+ * Unset or `false`: the first item that throws fails the map. A map that
915
+ * keeps every item's outcome takes a `MapSettleConfig` instead.
916
+ */
917
+ readonly settle?: false;
918
+ };
919
+ /**
920
+ * The config of a map that settles: every item runs, and the output holds one
921
+ * `Settled` entry per item, in input order.
922
+ */
923
+ type MapSettleConfig<input, item, result> = Omit<MapConfig<input, item, result>, 'settle'> & {
924
+ readonly settle: true;
925
+ };
926
+ /**
927
+ * What a settled item keeps of the error it threw: the `message`, plus the
928
+ * `name`, `kind`, and step-id `path` when the error has them. All of it is
929
+ * plain data, so it survives a checkpoint, and `kind` (`timeout_error`, for
930
+ * example) is how to tell one failure from another once the class is gone.
931
+ */
932
+ type SettledError = {
933
+ readonly message: string;
934
+ readonly name?: string;
935
+ readonly kind?: string;
936
+ readonly path?: ReadonlyArray<string>;
937
+ };
938
+ /**
939
+ * One item's outcome in the output of a map that settles.
940
+ */
941
+ type Settled<o> = {
942
+ readonly ok: true;
943
+ readonly value: o;
944
+ } | {
945
+ readonly ok: false;
946
+ readonly error: SettledError;
826
947
  };
827
948
  /**
828
949
  * Build a per-item execution step.
829
950
  *
830
951
  * Extracts an array via `items(input)`, runs `do` once per element through a
831
952
  * bounded worker pool, and returns results in input order. The first item
832
- * failure stops new work and propagates after in-flight items settle.
953
+ * failure stops new work and propagates after in-flight items settle. With
954
+ * `settle: true` every item runs, and the output holds each one's `Settled`
955
+ * outcome instead.
833
956
  */
834
- declare function map<input, item, result>(config: MapConfig<input, item, result>): Step<input, result[]>;
957
+ export declare function map<input, item, result>(config: MapSettleConfig<input, item, result>): Step<input, Settled<result>[]>;
958
+ export declare function map<input, item, result>(config: MapConfig<input, item, result>): Step<input, result[]>;
835
959
  //#endregion
836
960
  //#region src/core/pipe.d.ts
837
961
  type PipeOptions = {
@@ -845,7 +969,7 @@ type PipeOptions = {
845
969
  * not variadic, and the early `TypeError`s point misuse at `step(fn)` or
846
970
  * `sequence([...])` instead of failing obscurely at run time.
847
971
  */
848
- declare function pipe<i, a, b>(inner: Step<i, a>, fn: (value: a) => b | Promise<b>, options?: PipeOptions): Step<i, b>;
972
+ export declare function pipe<i, a, b>(inner: Step<i, a>, fn: (value: a) => b | Promise<b>, options?: PipeOptions): Step<i, b>;
849
973
  //#endregion
850
974
  //#region src/core/retry.d.ts
851
975
  /**
@@ -894,7 +1018,7 @@ type RetryProjection<o, projected> = {
894
1018
  * `on_error`; control-flow signals and errors `when` rejects propagate
895
1019
  * untouched. `project` maps the outcome envelope into the output.
896
1020
  */
897
- declare function retry<i, o, projected = o>(inner: Step<i, o>, config: RetryConfig & RetryProjection<o, projected>): Step<i, projected>;
1021
+ export declare function retry<i, o, projected = o>(inner: Step<i, o>, config: RetryConfig & RetryProjection<o, projected>): Step<i, projected>;
898
1022
  //#endregion
899
1023
  //#region src/core/fallback.d.ts
900
1024
  /**
@@ -943,7 +1067,7 @@ type FallbackProjection<o, projected> = {
943
1067
  * triggering the backup or the handoff. `project` maps the outcome envelope
944
1068
  * into the output.
945
1069
  */
946
- declare function fallback<i, o, projected = o>(primary: Step<i, o>, backup: Step<i, o>, options?: FallbackOptions<i> & FallbackProjection<o, projected>): Step<i, projected>;
1070
+ export declare function fallback<i, o, projected = o>(primary: Step<i, o>, backup: Step<i, o>, options?: FallbackOptions<i> & FallbackProjection<o, projected>): Step<i, projected>;
947
1071
  //#endregion
948
1072
  //#region src/core/timeout.d.ts
949
1073
  type TimeoutOptions = {
@@ -957,7 +1081,7 @@ type TimeoutOptions = {
957
1081
  * with `timeout_error`. The `timed_out` flag distinguishes timer expiry from
958
1082
  * a parent abort so the right error propagates.
959
1083
  */
960
- declare function timeout<i, o>(inner: Step<i, o>, ms: number, options?: TimeoutOptions): Step<i, o>;
1084
+ export declare function timeout<i, o>(inner: Step<i, o>, ms: number, options?: TimeoutOptions): Step<i, o>;
961
1085
  //#endregion
962
1086
  //#region src/core/loop.d.ts
963
1087
  type LoopGuardResult<state> = {
@@ -987,7 +1111,7 @@ type LoopConfig<i, state, o> = {
987
1111
  * can tell a converged run from an exhausted one without the loop wrapping
988
1112
  * its output.
989
1113
  */
990
- declare function loop<i, state, o>(config: LoopConfig<i, state, o>): Step<i, o>;
1114
+ export declare function loop<i, state, o>(config: LoopConfig<i, state, o>): Step<i, o>;
991
1115
  //#endregion
992
1116
  //#region src/core/compose.d.ts
993
1117
  type ComposeConfig = {
@@ -1001,7 +1125,7 @@ type ComposeConfig = {
1001
1125
  * `display_name` used as the span label. Throws a `TypeError` when `name`
1002
1126
  * is not a non-empty string, catching the mistake at construction time.
1003
1127
  */
1004
- declare function compose<i, o>(inner: Step<i, o>, config: ComposeConfig): Step<i, o>;
1128
+ export declare function compose<i, o>(inner: Step<i, o>, config: ComposeConfig): Step<i, o>;
1005
1129
  //#endregion
1006
1130
  //#region src/core/checkpoint.d.ts
1007
1131
  type CheckpointConfig<i> = {
@@ -1018,13 +1142,14 @@ type CheckpointConfig<i> = {
1018
1142
  * re-computed rather than replayed. Throws at construction time when `inner`
1019
1143
  * is anonymous.
1020
1144
  */
1021
- declare function checkpoint<i, o>(inner: Step<i, o>, config: CheckpointConfig<i>): Step<i, o>;
1145
+ export declare function checkpoint<i, o>(inner: Step<i, o>, config: CheckpointConfig<i>): Step<i, o>;
1022
1146
  //#endregion
1023
1147
  //#region src/core/suspend.d.ts
1024
1148
  type SuspendConfig<i, o, resume> = {
1025
1149
  readonly id: string;
1026
1150
  readonly name?: string;
1027
1151
  readonly description?: string;
1152
+ readonly deadline_ms?: number;
1028
1153
  readonly on: (input: i, ctx: RunContext) => Promise<void> | void;
1029
1154
  readonly resume_schema: AnySchema<resume>;
1030
1155
  readonly combine: (input: i, resume: resume, ctx: RunContext) => Promise<o> | o | Step<i, o>;
@@ -1037,7 +1162,7 @@ type SuspendConfig<i, o, resume> = {
1037
1162
  * `combine`. The step's id is the user-supplied suspend id so resume data can
1038
1163
  * be addressed to it.
1039
1164
  */
1040
- declare function suspend<i, o, resume>(config: SuspendConfig<i, o, resume>): Step<i, o>;
1165
+ export declare function suspend<i, o, resume>(config: SuspendConfig<i, o, resume>): Step<i, o>;
1041
1166
  //#endregion
1042
1167
  //#region src/core/scope.d.ts
1043
1168
  type LastOutput<children> = children extends readonly [...unknown[], Step<never, infer o>] ? o : children extends readonly [Step<never, infer o>] ? o : unknown;
@@ -1060,24 +1185,24 @@ type UseOptions = {
1060
1185
  * values) and registered so `stash`/`use` inside recognize it; writes stay
1061
1186
  * local to this scope. Outputs chain like `sequence`.
1062
1187
  */
1063
- declare function scope<const children extends readonly AnyStep[]>(children: children, options?: ScopeOptions): Step<unknown, LastOutput<children>>;
1188
+ export declare function scope<const children extends readonly AnyStep[]>(children: children, options?: ScopeOptions): Step<unknown, LastOutput<children>>;
1064
1189
  /**
1065
1190
  * Build a step that stores its source's output in scope state at `key`.
1066
1191
  *
1067
1192
  * Passes the value through unchanged so it composes mid-chain. Throws when
1068
1193
  * run outside a `scope`.
1069
1194
  */
1070
- declare function stash<i, v>(key: string, source: Step<i, v>, options?: StashOptions): Step<i, v>;
1195
+ export declare function stash<i, v>(key: string, source: Step<i, v>, options?: StashOptions): Step<i, v>;
1071
1196
  /**
1072
1197
  * Build a step that projects named scope values into a function call.
1073
1198
  *
1074
1199
  * Reads `keys` from scope state (missing keys project as `undefined`) and
1075
1200
  * invokes `fn(projection, input, ctx)`. Throws when run outside a `scope`.
1076
1201
  */
1077
- declare function use<const keys extends readonly string[], i, o>(keys: keys, fn: (state: { [k in keys[number]]: unknown }, input: i, ctx: RunContext) => Promise<o> | o, options?: UseOptions): Step<i, o>;
1202
+ export declare function use<const keys extends readonly string[], i, o>(keys: keys, fn: (state: { [k in keys[number]]: unknown; }, input: i, ctx: RunContext) => Promise<o> | o, options?: UseOptions): Step<i, o>;
1078
1203
  //#endregion
1079
1204
  //#region src/core/chain.d.ts
1080
- type merge<a, b> = { readonly [k in keyof (a & b)]: (a & b)[k] };
1205
+ type merge<a, b> = { readonly [k in keyof (a & b)]: (a & b)[k]; };
1081
1206
  type ChainStepOptions = {
1082
1207
  readonly arm?: AnyStep | ReadonlyArray<AnyStep>;
1083
1208
  /**
@@ -1085,13 +1210,14 @@ type ChainStepOptions = {
1085
1210
  * name is a record key and so must be identifier-shaped; this is where the
1086
1211
  * free prose goes, exactly as `meta.name` does for a plain `step`.
1087
1212
  */
1088
- readonly name?: string; /** What the binding is for, carried to `describe` as `meta.description`. */
1213
+ readonly name?: string;
1214
+ /** What the binding is for, carried to `describe` as `meta.description`. */
1089
1215
  readonly description?: string;
1090
1216
  };
1091
1217
  type Chain<i, acc> = {
1092
1218
  readonly step: {
1093
- <k extends string, o>(name: k, fn: (s: acc, ctx: RunContext) => Promise<o> | o, options?: ChainStepOptions): Chain<i, merge<acc, { readonly [p in k]: o }>>;
1094
- <k extends string, a, o>(name: k, arm: Step<a, o>, select: (s: acc) => a, options?: ChainStepOptions): Chain<i, merge<acc, { readonly [p in k]: o }>>;
1219
+ <k extends string, o>(name: k, fn: (s: acc, ctx: RunContext) => Promise<o> | o, options?: ChainStepOptions): Chain<i, merge<acc, { readonly [p in k]: o; }>>;
1220
+ <k extends string, a, o>(name: k, arm: Step<a, o>, select: (s: acc) => a, options?: ChainStepOptions): Chain<i, merge<acc, { readonly [p in k]: o; }>>;
1095
1221
  };
1096
1222
  readonly stage: {
1097
1223
  (name: string): Chain<i, acc>;
@@ -1107,7 +1233,7 @@ type Chain<i, acc> = {
1107
1233
  * before any entry is recorded.
1108
1234
  */
1109
1235
  type ChainOpen<i, k extends string, acc> = Chain<i, acc> & {
1110
- readonly input: <t>() => Chain<t, { readonly [p in k]: t }>;
1236
+ readonly input: <t>() => Chain<t, { readonly [p in k]: t; }>;
1111
1237
  };
1112
1238
  /**
1113
1239
  * Open a chain builder whose record starts as `{ [input_name]: input }`.
@@ -1121,35 +1247,51 @@ type ChainOpen<i, k extends string, acc> = Chain<i, acc> & {
1121
1247
  * return, so binding names and views are checked at compile time with no
1122
1248
  * declared state shape.
1123
1249
  */
1124
- declare function chain<i = never, k extends string = 'input'>(input_name?: k): ChainOpen<i, k, { readonly [p in k]: i }>;
1250
+ export declare function chain<i = never, k extends string = 'input'>(input_name?: k): ChainOpen<i, k, { readonly [p in k]: i; }>;
1125
1251
  //#endregion
1126
1252
  //#region src/core/errors.d.ts
1127
- declare class timeout_error extends Error {
1253
+ export declare class timeout_error extends Error {
1128
1254
  readonly kind: "timeout_error";
1129
1255
  readonly path?: ReadonlyArray<string>;
1130
1256
  readonly timeout_ms: number;
1131
1257
  constructor(message: string, timeout_ms: number);
1132
1258
  }
1133
- declare class suspended_error extends Error {
1259
+ export declare class suspended_error extends Error {
1134
1260
  readonly kind: "suspended_error";
1135
1261
  readonly path?: ReadonlyArray<string>;
1136
1262
  readonly suspend_id: string;
1137
1263
  readonly payload: unknown;
1138
- constructor(suspend_id: string, payload: unknown, message?: string);
1264
+ readonly deadline_ms: number | undefined;
1265
+ constructor(suspend_id: string, payload: unknown, message?: string, deadline_ms?: number);
1139
1266
  }
1140
- declare class resume_validation_error extends Error {
1267
+ export declare class resume_validation_error extends Error {
1141
1268
  readonly kind: "resume_validation_error";
1142
1269
  readonly path?: ReadonlyArray<string>;
1143
1270
  readonly issues: ReadonlyArray<SchemaIssue>;
1144
- constructor(message: string, issues: ReadonlyArray<SchemaIssue>);
1271
+ readonly suspend_id: string | undefined;
1272
+ constructor(message: string, issues: ReadonlyArray<SchemaIssue>, suspend_id?: string);
1273
+ }
1274
+ export declare class flow_changed_error extends Error {
1275
+ readonly kind: "flow_changed_error";
1276
+ readonly path?: ReadonlyArray<string>;
1277
+ readonly run_id: string;
1278
+ readonly started_on: string;
1279
+ readonly continued_on: string;
1280
+ constructor(run_id: string, started_on: string, continued_on: string);
1281
+ }
1282
+ export declare class run_not_found_error extends Error {
1283
+ readonly kind: "run_not_found_error";
1284
+ readonly path?: ReadonlyArray<string>;
1285
+ readonly run_id: string;
1286
+ constructor(run_id: string);
1145
1287
  }
1146
- declare class describe_cycle_error extends Error {
1288
+ export declare class describe_cycle_error extends Error {
1147
1289
  readonly kind: "describe_cycle_error";
1148
1290
  readonly path?: ReadonlyArray<string>;
1149
1291
  readonly step_id: string;
1150
1292
  constructor(step_id: string, message?: string);
1151
1293
  }
1152
- declare class aborted_error extends Error {
1294
+ export declare class aborted_error extends Error {
1153
1295
  readonly kind: "aborted_error";
1154
1296
  readonly path?: ReadonlyArray<string>;
1155
1297
  readonly reason?: unknown;
@@ -1176,7 +1318,7 @@ declare class aborted_error extends Error {
1176
1318
  * property is present and well-formed (an all-string array); anything else,
1177
1319
  * including non-object inputs, is `undefined`.
1178
1320
  */
1179
- declare function error_path(err: unknown): ReadonlyArray<string> | undefined;
1321
+ export declare function error_path(err: unknown): ReadonlyArray<string> | undefined;
1180
1322
  //#endregion
1181
1323
  //#region src/core/is_step.d.ts
1182
1324
  /**
@@ -1185,7 +1327,7 @@ declare function error_path(err: unknown): ReadonlyArray<string> | undefined;
1185
1327
  * True when the value has a string `id`, a string `kind`, and a callable
1186
1328
  * `run`.
1187
1329
  */
1188
- declare function is_step(value: unknown): value is AnyStep;
1330
+ export declare function is_step(value: unknown): value is AnyStep;
1189
1331
  //#endregion
1190
1332
  //#region src/core/step_kinds.d.ts
1191
1333
  /**
@@ -1198,12 +1340,12 @@ declare function is_step(value: unknown): value is AnyStep;
1198
1340
  * `composites/__tests__/coverage.test.ts` covers the four composite kinds
1199
1341
  * whose factories live outside core.
1200
1342
  */
1201
- declare const STEP_KINDS: readonly ["step", "sequence", "parallel", "branch", "map", "pipe", "retry", "fallback", "timeout", "loop", "compose", "adversarial", "ensemble", "tournament", "consensus", "checkpoint", "suspend", "scope", "stash", "use", "chain"];
1343
+ export declare const STEP_KINDS: readonly ["step", "sequence", "parallel", "branch", "map", "pipe", "retry", "fallback", "timeout", "loop", "compose", "adversarial", "ensemble", "tournament", "consensus", "checkpoint", "suspend", "scope", "stash", "use", "chain"];
1202
1344
  type StepKind = (typeof STEP_KINDS)[number];
1203
1345
  /**
1204
1346
  * Check whether a value is one of the registered `Step.kind` strings.
1205
1347
  */
1206
- declare function is_step_kind(value: unknown): value is StepKind;
1348
+ export declare function is_step_kind(value: unknown): value is StepKind;
1207
1349
  //#endregion
1208
1350
  //#region src/engine/create_engine.d.ts
1209
1351
  /**
@@ -1213,18 +1355,21 @@ declare function is_step_kind(value: unknown): value is StepKind;
1213
1355
  * A `generate` call that names a provider absent from `config.providers`
1214
1356
  * still throws `provider_not_configured_error`, but only at call time.
1215
1357
  */
1216
- declare function create_engine(config: EngineConfig): Engine;
1358
+ export declare function create_engine(config: EngineConfig): Engine;
1217
1359
  //#endregion
1218
1360
  //#region src/engine/throughput.d.ts
1219
1361
  type Throughput = {
1220
- /** Output tokens per second over the measured window. Not rounded. */tokens_per_second: number;
1362
+ /** Output tokens per second over the measured window. Not rounded. */
1363
+ tokens_per_second: number;
1221
1364
  /**
1222
1365
  * 'decode' when every contributing step streamed, so each window excludes
1223
1366
  * its time-to-first-chunk; 'blended' when any window is a whole round-trip
1224
1367
  * (network + queueing + prefill included).
1225
1368
  */
1226
- basis: 'decode' | 'blended'; /** Output tokens summed across the contributing steps. */
1227
- output_tokens: number; /** The measured window in ms, summed across the contributing steps. */
1369
+ basis: 'decode' | 'blended';
1370
+ /** Output tokens summed across the contributing steps. */
1371
+ output_tokens: number;
1372
+ /** The measured window in ms, summed across the contributing steps. */
1228
1373
  measured_ms: number;
1229
1374
  };
1230
1375
  /**
@@ -1239,7 +1384,7 @@ type Throughput = {
1239
1384
  * no step has timing (an external adapter, a test seam), or the summed window
1240
1385
  * is 0 ms (a sub-millisecond stub turn), where a rate would divide by zero.
1241
1386
  */
1242
- declare function throughput(source: GenerateResult<unknown> | StepRecord | ReadonlyArray<StepRecord>): Throughput | undefined;
1387
+ export declare function throughput(source: GenerateResult<unknown> | StepRecord | ReadonlyArray<StepRecord>): Throughput | undefined;
1243
1388
  //#endregion
1244
1389
  //#region src/engine/providers/claude_cli/reported.d.ts
1245
1390
  /**
@@ -1251,12 +1396,12 @@ declare function throughput(source: GenerateResult<unknown> | StepRecord | Reado
1251
1396
  * entry lacks a string `session_id` and a numeric `duration_ms`.
1252
1397
  * `duration_api_ms` carries through only when it is a number.
1253
1398
  */
1254
- declare function claude_cli_reported(source: {
1399
+ export declare function claude_cli_reported(source: {
1255
1400
  readonly provider_reported?: Readonly<Record<string, unknown>>;
1256
1401
  }): ClaudeCliProviderReported | undefined;
1257
1402
  //#endregion
1258
1403
  //#region src/engine/errors.d.ts
1259
- declare class rate_limit_error extends Error {
1404
+ export declare class rate_limit_error extends Error {
1260
1405
  readonly kind: "rate_limit_error";
1261
1406
  readonly path?: ReadonlyArray<string>;
1262
1407
  readonly retry_after_ms: number | undefined;
@@ -1268,7 +1413,7 @@ declare class rate_limit_error extends Error {
1268
1413
  status?: number;
1269
1414
  });
1270
1415
  }
1271
- declare class provider_error extends Error {
1416
+ export declare class provider_error extends Error {
1272
1417
  readonly kind: "provider_error";
1273
1418
  readonly path?: ReadonlyArray<string>;
1274
1419
  readonly status: number | undefined;
@@ -1280,14 +1425,14 @@ declare class provider_error extends Error {
1280
1425
  cause_kind?: 'provider_5xx' | 'network' | 'unknown';
1281
1426
  });
1282
1427
  }
1283
- declare class schema_validation_error extends Error {
1428
+ export declare class schema_validation_error extends Error {
1284
1429
  readonly kind: "schema_validation_error";
1285
1430
  readonly path?: ReadonlyArray<string>;
1286
1431
  readonly schema_issues: ReadonlyArray<SchemaIssue>;
1287
1432
  readonly raw_text: string;
1288
1433
  constructor(message: string, schema_issues: ReadonlyArray<SchemaIssue>, raw_text: string);
1289
1434
  }
1290
- declare class tool_error extends Error {
1435
+ export declare class tool_error extends Error {
1291
1436
  readonly kind: "tool_error";
1292
1437
  readonly path?: ReadonlyArray<string>;
1293
1438
  readonly tool_name: string;
@@ -1299,7 +1444,7 @@ declare class tool_error extends Error {
1299
1444
  cause: unknown;
1300
1445
  });
1301
1446
  }
1302
- declare class tool_approval_denied_error extends Error {
1447
+ export declare class tool_approval_denied_error extends Error {
1303
1448
  readonly kind: "tool_approval_denied_error";
1304
1449
  readonly path?: ReadonlyArray<string>;
1305
1450
  readonly tool_name: string;
@@ -1311,7 +1456,7 @@ declare class tool_approval_denied_error extends Error {
1311
1456
  tool_call_id: string;
1312
1457
  });
1313
1458
  }
1314
- declare class model_required_error extends Error {
1459
+ export declare class model_required_error extends Error {
1315
1460
  readonly kind: "model_required_error";
1316
1461
  readonly path?: ReadonlyArray<string>;
1317
1462
  constructor(message?: string);
@@ -1321,7 +1466,7 @@ declare class model_required_error extends Error {
1321
1466
  * configured names, and the message repeats them, so a typo is visible from
1322
1467
  * the message alone rather than needing the engine config alongside it.
1323
1468
  */
1324
- declare class provider_not_configured_error extends Error {
1469
+ export declare class provider_not_configured_error extends Error {
1325
1470
  readonly kind: "provider_not_configured_error";
1326
1471
  readonly path?: ReadonlyArray<string>;
1327
1472
  readonly provider: string;
@@ -1334,38 +1479,38 @@ declare class provider_not_configured_error extends Error {
1334
1479
  * the configured provider names so the message tells the caller exactly what
1335
1480
  * the engine can route to.
1336
1481
  */
1337
- declare class provider_required_error extends Error {
1482
+ export declare class provider_required_error extends Error {
1338
1483
  readonly kind: "provider_required_error";
1339
1484
  readonly path?: ReadonlyArray<string>;
1340
1485
  readonly configured: ReadonlyArray<string>;
1341
1486
  constructor(configured: ReadonlyArray<string>);
1342
1487
  }
1343
- declare class engine_config_error extends Error {
1488
+ export declare class engine_config_error extends Error {
1344
1489
  readonly kind: "engine_config_error";
1345
1490
  readonly path?: ReadonlyArray<string>;
1346
1491
  readonly provider: string | undefined;
1347
1492
  constructor(message: string, provider?: string);
1348
1493
  }
1349
- declare class on_chunk_error extends Error {
1494
+ export declare class on_chunk_error extends Error {
1350
1495
  readonly kind: "on_chunk_error";
1351
1496
  readonly path?: ReadonlyArray<string>;
1352
1497
  readonly cause: unknown;
1353
1498
  constructor(message: string, cause: unknown);
1354
1499
  }
1355
- declare class provider_capability_error extends Error {
1500
+ export declare class provider_capability_error extends Error {
1356
1501
  readonly kind: "provider_capability_error";
1357
1502
  readonly path?: ReadonlyArray<string>;
1358
1503
  readonly provider: string;
1359
1504
  readonly capability: string;
1360
1505
  constructor(provider: string, capability: string, detail?: string);
1361
1506
  }
1362
- declare class engine_disposed_error extends Error {
1507
+ export declare class engine_disposed_error extends Error {
1363
1508
  readonly kind: "engine_disposed_error";
1364
1509
  readonly path?: ReadonlyArray<string>;
1365
1510
  constructor(message?: string);
1366
1511
  }
1367
1512
  type ClaudeCliErrorReason = 'binary_not_found' | 'auth_missing' | 'auth_expired' | 'api_key_missing' | 'startup_timeout' | 'stall_timeout' | 'no_result_event' | 'result_error' | 'subprocess_exit' | 'sandbox_unavailable' | 'engine_disposed' | 'parse_error';
1368
- declare class claude_cli_error extends Error {
1513
+ export declare class claude_cli_error extends Error {
1369
1514
  readonly kind: "claude_cli_error";
1370
1515
  readonly path?: ReadonlyArray<string>;
1371
1516
  readonly reason: ClaudeCliErrorReason;
@@ -1376,7 +1521,7 @@ declare class claude_cli_error extends Error {
1376
1521
  stderr_snippet?: string;
1377
1522
  });
1378
1523
  }
1379
- declare class provider_auth_error extends Error {
1524
+ export declare class provider_auth_error extends Error {
1380
1525
  readonly kind: "provider_auth_error";
1381
1526
  readonly path?: ReadonlyArray<string>;
1382
1527
  readonly provider: string;
@@ -1394,7 +1539,7 @@ declare class provider_auth_error extends Error {
1394
1539
  * schema_validation_error, which covers a response that completed normally
1395
1540
  * and then failed validation after its repair attempts ran out.
1396
1541
  */
1397
- declare class incomplete_generation_error extends Error {
1542
+ export declare class incomplete_generation_error extends Error {
1398
1543
  readonly kind: "incomplete_generation_error";
1399
1544
  readonly path?: ReadonlyArray<string>;
1400
1545
  readonly finish_reason: FinishReason;
@@ -1442,7 +1587,7 @@ type AdversarialConfig<input, candidate, projected = AdversarialResult<candidate
1442
1587
  * through `scope`/`stash`/`use` so the build and critique steps remain
1443
1588
  * unmodified user-supplied `Step` values.
1444
1589
  */
1445
- declare function adversarial<input, candidate, projected = AdversarialResult<candidate>>(config: AdversarialConfig<input, candidate, projected>): Step<input, projected>;
1590
+ export declare function adversarial<input, candidate, projected = AdversarialResult<candidate>>(config: AdversarialConfig<input, candidate, projected>): Step<input, projected>;
1446
1591
  //#endregion
1447
1592
  //#region src/composites/consensus.d.ts
1448
1593
  type ConsensusConfig<i, o, projected = ConsensusResult<o>> = {
@@ -1471,7 +1616,7 @@ type ConsensusResult<o> = {
1471
1616
  * whose guard evaluates `agree`. State carries the original input alongside
1472
1617
  * the most recent results so each round receives the same input.
1473
1618
  */
1474
- declare function consensus<i, o, projected = ConsensusResult<o>>(config: ConsensusConfig<i, o, projected>): Step<i, projected>;
1619
+ export declare function consensus<i, o, projected = ConsensusResult<o>>(config: ConsensusConfig<i, o, projected>): Step<i, projected>;
1475
1620
  //#endregion
1476
1621
  //#region src/composites/ensemble.d.ts
1477
1622
  type EnsembleConfig<i, o, projected = EnsembleResult<o>> = {
@@ -1500,7 +1645,7 @@ type EnsembleResult<o> = {
1500
1645
  * a single picking step. Cancellation, fan-out, and abort propagation come
1501
1646
  * from `parallel`'s own contract.
1502
1647
  */
1503
- declare function ensemble<i, o, projected = EnsembleResult<o>>(config: EnsembleConfig<i, o, projected>): Step<i, projected>;
1648
+ export declare function ensemble<i, o, projected = EnsembleResult<o>>(config: EnsembleConfig<i, o, projected>): Step<i, projected>;
1504
1649
  //#endregion
1505
1650
  //#region src/composites/ensemble_step.d.ts
1506
1651
  type EnsembleStepConfig<i, o, ranked, projected = EnsembleStepResult<o, ranked>> = {
@@ -1539,7 +1684,7 @@ type EnsembleStepResult<o, ranked> = {
1539
1684
  * winner). Cancellation, fan-out, and abort propagation come from the
1540
1685
  * underlying `parallel` and `map` contracts.
1541
1686
  */
1542
- declare function ensemble_step<i, o, ranked, projected = EnsembleStepResult<o, ranked>>(config: EnsembleStepConfig<i, o, ranked, projected>): Step<i, projected>;
1687
+ export declare function ensemble_step<i, o, ranked, projected = EnsembleStepResult<o, ranked>>(config: EnsembleStepConfig<i, o, ranked, projected>): Step<i, projected>;
1543
1688
  //#endregion
1544
1689
  //#region src/composites/gate.d.ts
1545
1690
  type GateConfig<o> = {
@@ -1564,7 +1709,7 @@ type GateConfig<o> = {
1564
1709
  * `combine` returns a `use` step that restores the stashed result, which is
1565
1710
  * how the decision stays signal-only.
1566
1711
  */
1567
- declare function gate<i, o>(inner: Step<i, o>, config: GateConfig<o>): Step<i, o>;
1712
+ export declare function gate<i, o>(inner: Step<i, o>, config: GateConfig<o>): Step<i, o>;
1568
1713
  //#endregion
1569
1714
  //#region src/composites/improve.d.ts
1570
1715
  type Candidate<c> = {
@@ -1642,7 +1787,7 @@ type ImproveResult<c> = {
1642
1787
  * `ensemble_step`, and merges the outcome back into state via `use`.
1643
1788
  * State threading is the entire job.
1644
1789
  */
1645
- declare function improve<i, c, projected = ImproveResult<c>>(config: ImproveConfig<i, c, projected>): Step<i, projected>;
1790
+ export declare function improve<i, c, projected = ImproveResult<c>>(config: ImproveConfig<i, c, projected>): Step<i, projected>;
1646
1791
  //#endregion
1647
1792
  //#region src/composites/learn.d.ts
1648
1793
  type TrajectorySource = {
@@ -1688,7 +1833,7 @@ type LearnResult<o> = {
1688
1833
  * wraps its proposals with the stashed meta (event count, run ids) into a
1689
1834
  * `LearnResult`.
1690
1835
  */
1691
- declare function learn<i extends LearnInput, o>(config: LearnConfig<i, o>): Step<unknown, LearnResult<o>>;
1836
+ export declare function learn<i extends LearnInput, o>(config: LearnConfig<i, o>): Step<unknown, LearnResult<o>>;
1692
1837
  //#endregion
1693
1838
  //#region src/composites/tournament.d.ts
1694
1839
  type BracketRecord = {
@@ -1717,7 +1862,7 @@ type TournamentResult<o> = {
1717
1862
  * bracket }` envelope into the step's output (for example, `(r) => r.winner`);
1718
1863
  * omitted, the envelope itself is the output.
1719
1864
  */
1720
- declare function tournament<i, o, projected = TournamentResult<o>>(config: TournamentConfig<i, o, projected>): Step<i, projected>;
1865
+ export declare function tournament<i, o, projected = TournamentResult<o>>(config: TournamentConfig<i, o, projected>): Step<i, projected>;
1721
1866
  //#endregion
1722
1867
  //#region src/composites/errors.d.ts
1723
1868
  /**
@@ -1727,7 +1872,7 @@ declare function tournament<i, o, projected = TournamentResult<o>>(config: Tourn
1727
1872
  * src/mcp/errors.ts in the `no-class` rule ignores: `instanceof` branching is
1728
1873
  * how a caller tells a benched flow's usage error apart from a case failure.
1729
1874
  */
1730
- declare class bench_suspend_error extends Error {
1875
+ export declare class bench_suspend_error extends Error {
1731
1876
  readonly kind: "bench_suspend_error";
1732
1877
  readonly path?: ReadonlyArray<string>;
1733
1878
  readonly case_id: string;
@@ -1810,7 +1955,7 @@ type BenchOptions = {
1810
1955
  * `suspended_error` from an approval gate rejects with `bench_suspend_error`:
1811
1956
  * `bench` has no resume path, so a suspend is a usage error, not a zero score.
1812
1957
  */
1813
- declare function bench<I, O, S = Score>(flow: Step<I, O>, cases: ReadonlyArray<BenchCase<I>>, judges: Record<string, Judge<I, O, S>>, options?: BenchOptions): Promise<BenchReport<I, O, S>>;
1958
+ export declare function bench<I, O, S = Score>(flow: Step<I, O>, cases: ReadonlyArray<BenchCase<I>>, judges: Record<string, Judge<I, O, S>>, options?: BenchOptions): Promise<BenchReport<I, O, S>>;
1814
1959
  /**
1815
1960
  * Coerces a raw judge return value into a `Score`.
1816
1961
  *
@@ -1819,21 +1964,21 @@ declare function bench<I, O, S = Score>(flow: Step<I, O>, cases: ReadonlyArray<B
1819
1964
  * non-string `reason`, which is dropped) normalizes toward `undefined` or a
1820
1965
  * reason-less score; `undefined` means the judge abstained.
1821
1966
  */
1822
- declare function normalize_score(raw: unknown): Score | undefined;
1967
+ export declare function normalize_score(raw: unknown): Score | undefined;
1823
1968
  //#endregion
1824
1969
  //#region src/composites/judges.d.ts
1825
1970
  /**
1826
1971
  * Judge that scores 1 when the output deep-equals `meta.expected`, 0
1827
1972
  * otherwise. Abstains when the case has no `meta` or no `expected` key.
1828
1973
  */
1829
- declare function judge_equals<O>(): Judge<unknown, O>;
1974
+ export declare function judge_equals<O>(): Judge<unknown, O>;
1830
1975
  type JudgeWithFn<I, O> = (args: JudgeArgs<I, O>) => number | Score | undefined | Promise<number | Score | undefined>;
1831
1976
  /**
1832
1977
  * Wraps a plain scoring function as a Judge. The function may return a bare
1833
1978
  * number, a `Score`, or `undefined` to abstain; the result is normalized
1834
1979
  * via `normalize_score`.
1835
1980
  */
1836
- declare function judge_with<I, O>(fn: JudgeWithFn<I, O>): Judge<I, O>;
1981
+ export declare function judge_with<I, O>(fn: JudgeWithFn<I, O>): Judge<I, O>;
1837
1982
  type JudgeLlmConfig = {
1838
1983
  readonly model: Step<string, string>;
1839
1984
  readonly rubric: string;
@@ -1850,7 +1995,7 @@ type JudgeLlmConfig = {
1850
1995
  * caller-supplied model step, parse the JSON score from the reply. An
1851
1996
  * unparseable reply makes the judge abstain rather than fail the case.
1852
1997
  */
1853
- declare function judge_llm<I, O>(config: JudgeLlmConfig): Judge<I, O>;
1998
+ export declare function judge_llm<I, O>(config: JudgeLlmConfig): Judge<I, O>;
1854
1999
  //#endregion
1855
2000
  //#region src/composites/regression.d.ts
1856
2001
  type RegressionDelta = {
@@ -1885,18 +2030,18 @@ type RegressionCompareOptions = {
1885
2030
  * `score_threshold` (default 0); cost regresses on a relative increase above
1886
2031
  * `cost_threshold` (default 10%).
1887
2032
  */
1888
- declare function regression_compare(current: BenchReport, baseline: BenchReport, options?: RegressionCompareOptions): RegressionReport;
2033
+ export declare function regression_compare(current: BenchReport, baseline: BenchReport, options?: RegressionCompareOptions): RegressionReport;
1889
2034
  /**
1890
2035
  * Read and validate a baseline `BenchReport` from a JSON file.
1891
2036
  *
1892
2037
  * Validation is structural (required fields present), so a hand-edited or
1893
2038
  * truncated baseline fails loudly with the offending path in the message.
1894
2039
  */
1895
- declare function read_baseline(path: string): Promise<BenchReport>;
2040
+ export declare function read_baseline(path: string): Promise<BenchReport>;
1896
2041
  /**
1897
2042
  * Write a `BenchReport` as pretty-printed JSON, creating parent directories.
1898
2043
  */
1899
- declare function write_baseline(path: string, report: BenchReport): Promise<void>;
2044
+ export declare function write_baseline(path: string, report: BenchReport): Promise<void>;
1900
2045
  //#endregion
1901
2046
  //#region src/model_call.d.ts
1902
2047
  type ModelCallInput = string | ReadonlyArray<Message>;
@@ -1919,7 +2064,8 @@ type ModelCallConfig<T = string, projected = GenerateResult<T>> = {
1919
2064
  * the step is anonymous, like `step(fn)`: `describe.diagram` labels it by
1920
2065
  * its kind, and `checkpoint` and `gate` reject it.
1921
2066
  */
1922
- readonly id?: string; /** What this model boundary is for, carried to `describe` as `meta.description`. */
2067
+ readonly id?: string;
2068
+ /** What this model boundary is for, carried to `describe` as `meta.description`. */
1923
2069
  readonly description?: string;
1924
2070
  readonly system?: string;
1925
2071
  readonly tools?: ReadonlyArray<Tool>;
@@ -1974,7 +2120,7 @@ type ModelCallConfig<T = string, projected = GenerateResult<T>> = {
1974
2120
  * maps the `GenerateResult` envelope into the step's output inside the same
1975
2121
  * step; omitted, the envelope is the output.
1976
2122
  */
1977
- declare function model_call<T = string, projected = GenerateResult<T>>(cfg: ModelCallConfig<T, projected>): Step<ModelCallInput, projected>;
2123
+ export declare function model_call<T = string, projected = GenerateResult<T>>(cfg: ModelCallConfig<T, projected>): Step<ModelCallInput, projected>;
1978
2124
  /**
1979
2125
  * model_step: `model_call` projected to its content.
1980
2126
  *
@@ -1991,7 +2137,7 @@ declare function model_call<T = string, projected = GenerateResult<T>>(cfg: Mode
1991
2137
  * primitive into an app-shaped helper of your own is still the extension
1992
2138
  * pattern; this is its smallest instance.
1993
2139
  */
1994
- declare function model_step<T = string>(cfg: Omit<ModelCallConfig<T>, 'project'>): Step<ModelCallInput, T>;
2140
+ export declare function model_step<T = string>(cfg: Omit<ModelCallConfig<T>, 'project'>): Step<ModelCallInput, T>;
1995
2141
  //#endregion
1996
2142
  //#region src/forward_standard_env.d.ts
1997
2143
  /**
@@ -2005,7 +2151,7 @@ declare function model_step<T = string>(cfg: Omit<ModelCallConfig<T>, 'project'>
2005
2151
  * claude_cli: { env: forward_standard_env() },
2006
2152
  * }
2007
2153
  */
2008
- declare function forward_standard_env(): Record<string, string>;
2154
+ export declare function forward_standard_env(): Record<string, string>;
2009
2155
  //#endregion
2010
- export { type AdversarialBuildInput, type AdversarialConfig, type AdversarialCritiqueResult, type AdversarialResult, type AiSdkProviderAdapter, type AiSdkTelemetrySettings, type AnySchema, type AnyStep, type AssistantContentPart, type BenchCase, type BenchOptions, type BenchReport, type BenchSummary, type BracketRecord, type BranchConfig, type Candidate, type CaseResult, type Chain, type ChainOpen, type ChainStepOptions, type CheckpointConfig, type CheckpointEvent, type CheckpointStatus, type CheckpointStore, type ClaudeCliErrorReason, type ClaudeCliProviderReported, type CleanupFn, type ComposeConfig, type ConsensusConfig, type ConsensusResult, type CostBreakdown, type CustomTrajectoryEvent, type DescribeOptions, type DiagramOptions, type EffortLevel, type EffortTranslation, type EmitEvent, type Engine, type EngineConfig, type EngineDefaults, type EnsembleConfig, type EnsembleResult, type EnsembleStepConfig, type EnsembleStepResult, type ExternalAgentAdapter, type FallbackOptions, type FallbackOutcome, type FallbackProjection, type FinishReason, type FlowNode, type FlowValue, type GateConfig, type GenerateOptions, type GenerateResult, type GenerateTiming, type HistoryEntry, type ImproveBudget, type ImproveConfig, type ImproveResult, type ImproveRoundInput, type Improvement, type Judge, type JudgeArgs, type JudgeLlmConfig, type JudgeWithFn, type LearnConfig, type LearnInput, type LearnResult, type Lesson, type LoopConfig, type LoopGuardPredicate, type LoopGuardResult, type LoopOutcome, type MapConfig, type Message, type ModelCallConfig, type ModelCallInput, type NativeProviderAdapter, type ParallelOptions, type ParsedTrajectoryEvent, type PerCaseDelta, type PipeOptions, type PrepareStepContext, type PrepareStepHook, type PrepareStepResult, type Pricing, type PricingTable, type ProviderAdapter, type ProviderCapability, type ProviderConfigMap, type ProviderFactory, type ProviderInit, type ProviderTransport, type RawProviderUsage, type RegressionCompareOptions, type RegressionDelta, type RegressionReport, type ResolvedModel, type RetryConfig, type RetryFailureKind, type RetryOutcome, type RetryPolicy, type RetryProjection, type RunContext, type RunEndEvent, type RunEndStatus, type RunOptions, type RunOutcome, STEP_KINDS, type SchemaIssue, type ScopeOptions, type Score, type ScoredCandidate, type SequenceOptions, type SpanEndEvent, type SpanStartEvent, type StashOptions, type Step, type StepFn, type StepInput, type StepKind, type StepMetadata, type StepOptions, type StepOutput, type StepRecord, type StepTiming, type StreamChunk, type StreamingRunHandle, type SuspendConfig, type Throughput, type TimeoutOptions, type Tool, type ToolApprovalHandler, type ToolApprovalRequest, type ToolCallRecord, type ToolExecContext, type ToolSchema, type TournamentConfig, type TournamentResult, type TrajectoryEvent, type TrajectoryLogger, type TrajectoryParseResult, type TrajectorySource, type TurnRequest, type TurnResult, type UsageTotals, type UseOptions, type UserContentPart, aborted_error, adversarial, assert_valid_step_id, bench, bench_suspend_error, branch, chain, checkpoint, claude_cli_error, claude_cli_reported, compose, consensus, create_engine, default_normalize_usage, describe, describe_cycle_error, engine_config_error, engine_disposed_error, ensemble, ensemble_step, error_path, fallback, __json_default_export as flow_schema, forward_standard_env, gate, improve, incomplete_generation_error, is_checkpoint_event, is_custom_trajectory_event, is_emit_event, is_run_end_event, is_span_end_event, is_span_start_event, is_step, is_step_kind, is_valid_step_id, judge_equals, judge_llm, judge_with, learn, loop, map, model_call, model_required_error, model_step, normalize_score, on_chunk_error, parallel, parse_trajectory_event, pipe, provider_auth_error, provider_capability_error, provider_error, provider_not_configured_error, provider_required_error, rate_limit_error, read_baseline, regression_compare, resolve_display_name, resume_validation_error, retry, run, schema_validation_error, scope, sequence, stash, step, suggest_step_id, suspend, suspended_error, throughput, timeout, timeout_error, tool_approval_denied_error, tool_error, tournament, use, write_baseline };
2156
+ export { type AdversarialBuildInput, type AdversarialConfig, type AdversarialCritiqueResult, type AdversarialResult, type AiSdkProviderAdapter, type AiSdkTelemetrySettings, type AnySchema, type AnyStep, type AssistantContentPart, type BenchCase, type BenchOptions, type BenchReport, type BenchSummary, type BracketRecord, type BranchConfig, type Candidate, type CaseResult, type Chain, type ChainOpen, type ChainStepOptions, type CheckpointConfig, type CheckpointEvent, type CheckpointStatus, type CheckpointStore, type ClaudeCliErrorReason, type ClaudeCliProviderReported, type CleanupFn, type ComposeConfig, type ConsensusConfig, type ConsensusResult, type CostBreakdown, type CustomTrajectoryEvent, type DescribeOptions, type DiagramOptions, type DurableConfig, type DurableOutcome, type DurableRunOptions, type DurableRunState, type DurableRuns, type DurableStore, type EffortLevel, type EffortTranslation, type EmitEvent, type Engine, type EngineConfig, type EngineDefaults, type EnsembleConfig, type EnsembleResult, type EnsembleStepConfig, type EnsembleStepResult, type ExternalAgentAdapter, type FallbackOptions, type FallbackOutcome, type FallbackProjection, type FinishReason, type FlowNode, type FlowValue, type GateConfig, type GenerateOptions, type GenerateResult, type GenerateTiming, type HistoryEntry, type ImproveBudget, type ImproveConfig, type ImproveResult, type ImproveRoundInput, type Improvement, type Judge, type JudgeArgs, type JudgeLlmConfig, type JudgeWithFn, type LearnConfig, type LearnInput, type LearnResult, type Lesson, type LoopConfig, type LoopGuardPredicate, type LoopGuardResult, type LoopOutcome, type MapConfig, type MapItemFailedEvent, type MapSettleConfig, type Message, type ModelCallConfig, type ModelCallInput, type NativeProviderAdapter, type ParallelOptions, type ParsedTrajectoryEvent, type PerCaseDelta, type PipeOptions, type PrepareStepContext, type PrepareStepHook, type PrepareStepResult, type Pricing, type PricingTable, type ProviderAdapter, type ProviderCapability, type ProviderConfigMap, type ProviderFactory, type ProviderInit, type ProviderTransport, type RawProviderUsage, type RegressionCompareOptions, type RegressionDelta, type RegressionReport, type ResolvedModel, type RetryConfig, type RetryFailureKind, type RetryOutcome, type RetryPolicy, type RetryProjection, type RunContext, type RunEndEvent, type RunEndStatus, type RunOptions, type RunOutcome, type SchemaIssue, type ScopeOptions, type ScopedCheckpointStore, type Score, type ScoredCandidate, type SequenceOptions, type Settled, type SettledError, type SpanEndEvent, type SpanStartEvent, type StashOptions, type Step, type StepFn, type StepInput, type StepKind, type StepMetadata, type StepOptions, type StepOutput, type StepRecord, type StepReplayedEvent, type StepTiming, type StreamChunk, type StreamingRunHandle, type SuspendConfig, type Throughput, type TimeoutOptions, type Tool, type ToolApprovalHandler, type ToolApprovalRequest, type ToolCallRecord, type ToolExecContext, type ToolSchema, type TournamentConfig, type TournamentResult, type TrajectoryEvent, type TrajectoryLogger, type TrajectoryParseResult, type TrajectorySource, type TurnRequest, type TurnResult, type UsageTotals, type UseOptions, type UserContentPart, default_normalize_usage, __json_default_export as flow_schema, is_checkpoint_event, is_custom_trajectory_event, is_emit_event, is_map_item_failed_event, is_run_end_event, is_span_end_event, is_span_start_event, is_step_replayed_event, parse_trajectory_event };
2011
2157
  //# sourceMappingURL=index.d.ts.map