@exaudeus/workrail 2.1.0 → 3.1.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 (61) hide show
  1. package/dist/application/services/compiler/resolve-templates.d.ts +5 -0
  2. package/dist/application/services/compiler/resolve-templates.js +35 -0
  3. package/dist/application/services/compiler/routine-loader.d.ts +11 -0
  4. package/dist/application/services/compiler/routine-loader.js +45 -0
  5. package/dist/application/services/compiler/template-registry.d.ts +4 -2
  6. package/dist/application/services/compiler/template-registry.js +105 -4
  7. package/dist/application/services/workflow-compiler.js +34 -3
  8. package/dist/di/container.js +10 -1
  9. package/dist/di/tokens.d.ts +1 -0
  10. package/dist/di/tokens.js +1 -0
  11. package/dist/engine/engine-factory.d.ts +3 -0
  12. package/dist/engine/engine-factory.js +295 -0
  13. package/dist/engine/index.d.ts +3 -0
  14. package/dist/engine/index.js +12 -0
  15. package/dist/engine/types.d.ts +130 -0
  16. package/dist/engine/types.js +18 -0
  17. package/dist/manifest.json +146 -74
  18. package/dist/mcp/handlers/v2-checkpoint.d.ts +31 -1
  19. package/dist/mcp/handlers/v2-checkpoint.js +76 -64
  20. package/dist/mcp/handlers/v2-execution/continue-advance.d.ts +2 -0
  21. package/dist/mcp/handlers/v2-execution/continue-advance.js +5 -5
  22. package/dist/mcp/handlers/v2-execution/continue-rehydrate.d.ts +2 -0
  23. package/dist/mcp/handlers/v2-execution/continue-rehydrate.js +17 -22
  24. package/dist/mcp/handlers/v2-execution/index.d.ts +10 -17
  25. package/dist/mcp/handlers/v2-execution/index.js +44 -54
  26. package/dist/mcp/handlers/v2-execution/replay.d.ts +4 -15
  27. package/dist/mcp/handlers/v2-execution/replay.js +52 -128
  28. package/dist/mcp/handlers/v2-execution/start.d.ts +3 -2
  29. package/dist/mcp/handlers/v2-execution/start.js +18 -46
  30. package/dist/mcp/handlers/v2-token-ops.d.ts +45 -24
  31. package/dist/mcp/handlers/v2-token-ops.js +372 -32
  32. package/dist/mcp/output-schemas.d.ts +104 -283
  33. package/dist/mcp/output-schemas.js +24 -22
  34. package/dist/mcp/server.js +8 -0
  35. package/dist/mcp/types.d.ts +4 -0
  36. package/dist/mcp/v2/tools.d.ts +22 -52
  37. package/dist/mcp/v2/tools.js +18 -32
  38. package/dist/mcp/v2-response-formatter.js +12 -16
  39. package/dist/runtime/runtime-mode.d.ts +2 -0
  40. package/dist/v2/durable-core/domain/prompt-renderer.d.ts +1 -0
  41. package/dist/v2/durable-core/domain/prompt-renderer.js +5 -3
  42. package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +14 -14
  43. package/dist/v2/durable-core/schemas/session/events.d.ts +4 -4
  44. package/dist/v2/durable-core/schemas/session/validation-event.d.ts +2 -2
  45. package/dist/v2/durable-core/tokens/payloads.d.ts +32 -32
  46. package/dist/v2/durable-core/tokens/short-token.d.ts +38 -0
  47. package/dist/v2/durable-core/tokens/short-token.js +126 -0
  48. package/dist/v2/durable-core/tokens/token-patterns.d.ts +4 -0
  49. package/dist/v2/durable-core/tokens/token-patterns.js +9 -0
  50. package/dist/v2/infra/in-memory/token-alias-store/index.d.ts +11 -0
  51. package/dist/v2/infra/in-memory/token-alias-store/index.js +38 -0
  52. package/dist/v2/infra/local/data-dir/index.d.ts +1 -0
  53. package/dist/v2/infra/local/data-dir/index.js +3 -0
  54. package/dist/v2/infra/local/token-alias-store/index.d.ts +16 -0
  55. package/dist/v2/infra/local/token-alias-store/index.js +117 -0
  56. package/dist/v2/ports/data-dir.port.d.ts +1 -0
  57. package/dist/v2/ports/token-alias-store.port.d.ts +33 -0
  58. package/dist/v2/ports/token-alias-store.port.js +2 -0
  59. package/package.json +8 -1
  60. package/workflows/coding-task-workflow-agentic.lean.v2.json +41 -3
  61. package/workflows/examples/routine-injection-example.json +28 -0
@@ -63,12 +63,12 @@ export declare const WorkflowNextOutputSchema: z.ZodObject<{
63
63
  next: z.ZodNullable<z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>;
64
64
  isComplete: z.ZodBoolean;
65
65
  }, "strip", z.ZodTypeAny, {
66
- isComplete: boolean;
67
66
  state: import("../domain/execution/state.js").ExecutionState;
67
+ isComplete: boolean;
68
68
  next: JsonValue;
69
69
  }, {
70
- isComplete: boolean;
71
70
  state: import("../domain/execution/state.js").ExecutionState;
71
+ isComplete: boolean;
72
72
  next: JsonValue;
73
73
  }>;
74
74
  export declare const WorkflowValidateJsonOutputSchema: z.ZodObject<{
@@ -236,15 +236,25 @@ export declare const V2PendingStepSchema: z.ZodObject<{
236
236
  stepId: z.ZodString;
237
237
  title: z.ZodString;
238
238
  prompt: z.ZodString;
239
+ agentRole: z.ZodOptional<z.ZodString>;
239
240
  }, "strip", z.ZodTypeAny, {
240
241
  stepId: string;
241
242
  title: string;
242
243
  prompt: string;
244
+ agentRole?: string | undefined;
243
245
  }, {
244
246
  stepId: string;
245
247
  title: string;
246
248
  prompt: string;
249
+ agentRole?: string | undefined;
247
250
  }>;
251
+ export type V2PendingStep = z.infer<typeof V2PendingStepSchema>;
252
+ export declare function toPendingStep(meta: {
253
+ readonly stepId: string;
254
+ readonly title: string;
255
+ readonly prompt: string;
256
+ readonly agentRole?: string;
257
+ } | null): V2PendingStep | null;
248
258
  export declare const V2PreferencesSchema: z.ZodObject<{
249
259
  autonomy: z.ZodEnum<["guided", "full_auto_stop_on_user_deps", "full_auto_never_stop"]>;
250
260
  riskPolicy: z.ZodEnum<["conservative", "balanced", "aggressive"]>;
@@ -258,46 +268,21 @@ export declare const V2PreferencesSchema: z.ZodObject<{
258
268
  export declare const V2NextIntentSchema: z.ZodEnum<["perform_pending_then_continue", "await_user_confirmation", "rehydrate_only", "complete"]>;
259
269
  export declare const V2NextCallSchema: z.ZodNullable<z.ZodObject<{
260
270
  tool: z.ZodLiteral<"continue_workflow">;
261
- params: z.ZodDiscriminatedUnion<"intent", [z.ZodObject<{
262
- intent: z.ZodLiteral<"advance">;
263
- stateToken: z.ZodString;
264
- ackToken: z.ZodString;
271
+ params: z.ZodObject<{
272
+ continueToken: z.ZodString;
265
273
  }, "strip", z.ZodTypeAny, {
266
- intent: "advance";
267
- stateToken: string;
268
- ackToken: string;
274
+ continueToken: string;
269
275
  }, {
270
- intent: "advance";
271
- stateToken: string;
272
- ackToken: string;
273
- }>, z.ZodObject<{
274
- intent: z.ZodLiteral<"rehydrate">;
275
- stateToken: z.ZodString;
276
- }, "strip", z.ZodTypeAny, {
277
- intent: "rehydrate";
278
- stateToken: string;
279
- }, {
280
- intent: "rehydrate";
281
- stateToken: string;
282
- }>]>;
276
+ continueToken: string;
277
+ }>;
283
278
  }, "strip", z.ZodTypeAny, {
284
279
  params: {
285
- intent: "advance";
286
- stateToken: string;
287
- ackToken: string;
288
- } | {
289
- intent: "rehydrate";
290
- stateToken: string;
280
+ continueToken: string;
291
281
  };
292
282
  tool: "continue_workflow";
293
283
  }, {
294
284
  params: {
295
- intent: "advance";
296
- stateToken: string;
297
- ackToken: string;
298
- } | {
299
- intent: "rehydrate";
300
- stateToken: string;
285
+ continueToken: string;
301
286
  };
302
287
  tool: "continue_workflow";
303
288
  }>>;
@@ -475,22 +460,24 @@ export declare const V2BlockerReportSchema: z.ZodEffects<z.ZodObject<{
475
460
  }>;
476
461
  export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
477
462
  kind: z.ZodLiteral<"ok">;
478
- stateToken: z.ZodString;
479
- ackToken: z.ZodOptional<z.ZodString>;
463
+ continueToken: z.ZodOptional<z.ZodString>;
480
464
  checkpointToken: z.ZodOptional<z.ZodString>;
481
465
  isComplete: z.ZodBoolean;
482
466
  pending: z.ZodNullable<z.ZodObject<{
483
467
  stepId: z.ZodString;
484
468
  title: z.ZodString;
485
469
  prompt: z.ZodString;
470
+ agentRole: z.ZodOptional<z.ZodString>;
486
471
  }, "strip", z.ZodTypeAny, {
487
472
  stepId: string;
488
473
  title: string;
489
474
  prompt: string;
475
+ agentRole?: string | undefined;
490
476
  }, {
491
477
  stepId: string;
492
478
  title: string;
493
479
  prompt: string;
480
+ agentRole?: string | undefined;
494
481
  }>>;
495
482
  preferences: z.ZodObject<{
496
483
  autonomy: z.ZodEnum<["guided", "full_auto_stop_on_user_deps", "full_auto_never_stop"]>;
@@ -505,46 +492,21 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
505
492
  nextIntent: z.ZodEnum<["perform_pending_then_continue", "await_user_confirmation", "rehydrate_only", "complete"]>;
506
493
  nextCall: z.ZodNullable<z.ZodObject<{
507
494
  tool: z.ZodLiteral<"continue_workflow">;
508
- params: z.ZodDiscriminatedUnion<"intent", [z.ZodObject<{
509
- intent: z.ZodLiteral<"advance">;
510
- stateToken: z.ZodString;
511
- ackToken: z.ZodString;
495
+ params: z.ZodObject<{
496
+ continueToken: z.ZodString;
512
497
  }, "strip", z.ZodTypeAny, {
513
- intent: "advance";
514
- stateToken: string;
515
- ackToken: string;
498
+ continueToken: string;
516
499
  }, {
517
- intent: "advance";
518
- stateToken: string;
519
- ackToken: string;
520
- }>, z.ZodObject<{
521
- intent: z.ZodLiteral<"rehydrate">;
522
- stateToken: z.ZodString;
523
- }, "strip", z.ZodTypeAny, {
524
- intent: "rehydrate";
525
- stateToken: string;
526
- }, {
527
- intent: "rehydrate";
528
- stateToken: string;
529
- }>]>;
500
+ continueToken: string;
501
+ }>;
530
502
  }, "strip", z.ZodTypeAny, {
531
503
  params: {
532
- intent: "advance";
533
- stateToken: string;
534
- ackToken: string;
535
- } | {
536
- intent: "rehydrate";
537
- stateToken: string;
504
+ continueToken: string;
538
505
  };
539
506
  tool: "continue_workflow";
540
507
  }, {
541
508
  params: {
542
- intent: "advance";
543
- stateToken: string;
544
- ackToken: string;
545
- } | {
546
- intent: "rehydrate";
547
- stateToken: string;
509
+ continueToken: string;
548
510
  };
549
511
  tool: "continue_workflow";
550
512
  }>>;
@@ -554,9 +516,9 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
554
516
  stepId: string;
555
517
  title: string;
556
518
  prompt: string;
519
+ agentRole?: string | undefined;
557
520
  } | null;
558
521
  isComplete: boolean;
559
- stateToken: string;
560
522
  preferences: {
561
523
  autonomy: "guided" | "full_auto_never_stop" | "full_auto_stop_on_user_deps";
562
524
  riskPolicy: "conservative" | "balanced" | "aggressive";
@@ -564,16 +526,11 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
564
526
  nextIntent: "complete" | "perform_pending_then_continue" | "await_user_confirmation" | "rehydrate_only";
565
527
  nextCall: {
566
528
  params: {
567
- intent: "advance";
568
- stateToken: string;
569
- ackToken: string;
570
- } | {
571
- intent: "rehydrate";
572
- stateToken: string;
529
+ continueToken: string;
573
530
  };
574
531
  tool: "continue_workflow";
575
532
  } | null;
576
- ackToken?: string | undefined;
533
+ continueToken?: string | undefined;
577
534
  checkpointToken?: string | undefined;
578
535
  }, {
579
536
  kind: "ok";
@@ -581,9 +538,9 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
581
538
  stepId: string;
582
539
  title: string;
583
540
  prompt: string;
541
+ agentRole?: string | undefined;
584
542
  } | null;
585
543
  isComplete: boolean;
586
- stateToken: string;
587
544
  preferences: {
588
545
  autonomy: "guided" | "full_auto_never_stop" | "full_auto_stop_on_user_deps";
589
546
  riskPolicy: "conservative" | "balanced" | "aggressive";
@@ -591,35 +548,32 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
591
548
  nextIntent: "complete" | "perform_pending_then_continue" | "await_user_confirmation" | "rehydrate_only";
592
549
  nextCall: {
593
550
  params: {
594
- intent: "advance";
595
- stateToken: string;
596
- ackToken: string;
597
- } | {
598
- intent: "rehydrate";
599
- stateToken: string;
551
+ continueToken: string;
600
552
  };
601
553
  tool: "continue_workflow";
602
554
  } | null;
603
- ackToken?: string | undefined;
555
+ continueToken?: string | undefined;
604
556
  checkpointToken?: string | undefined;
605
557
  }>, z.ZodObject<{
606
558
  kind: z.ZodLiteral<"blocked">;
607
- stateToken: z.ZodString;
608
- ackToken: z.ZodOptional<z.ZodString>;
559
+ continueToken: z.ZodOptional<z.ZodString>;
609
560
  checkpointToken: z.ZodOptional<z.ZodString>;
610
561
  isComplete: z.ZodBoolean;
611
562
  pending: z.ZodNullable<z.ZodObject<{
612
563
  stepId: z.ZodString;
613
564
  title: z.ZodString;
614
565
  prompt: z.ZodString;
566
+ agentRole: z.ZodOptional<z.ZodString>;
615
567
  }, "strip", z.ZodTypeAny, {
616
568
  stepId: string;
617
569
  title: string;
618
570
  prompt: string;
571
+ agentRole?: string | undefined;
619
572
  }, {
620
573
  stepId: string;
621
574
  title: string;
622
575
  prompt: string;
576
+ agentRole?: string | undefined;
623
577
  }>>;
624
578
  preferences: z.ZodObject<{
625
579
  autonomy: z.ZodEnum<["guided", "full_auto_stop_on_user_deps", "full_auto_never_stop"]>;
@@ -634,46 +588,21 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
634
588
  nextIntent: z.ZodEnum<["perform_pending_then_continue", "await_user_confirmation", "rehydrate_only", "complete"]>;
635
589
  nextCall: z.ZodNullable<z.ZodObject<{
636
590
  tool: z.ZodLiteral<"continue_workflow">;
637
- params: z.ZodDiscriminatedUnion<"intent", [z.ZodObject<{
638
- intent: z.ZodLiteral<"advance">;
639
- stateToken: z.ZodString;
640
- ackToken: z.ZodString;
591
+ params: z.ZodObject<{
592
+ continueToken: z.ZodString;
641
593
  }, "strip", z.ZodTypeAny, {
642
- intent: "advance";
643
- stateToken: string;
644
- ackToken: string;
594
+ continueToken: string;
645
595
  }, {
646
- intent: "advance";
647
- stateToken: string;
648
- ackToken: string;
649
- }>, z.ZodObject<{
650
- intent: z.ZodLiteral<"rehydrate">;
651
- stateToken: z.ZodString;
652
- }, "strip", z.ZodTypeAny, {
653
- intent: "rehydrate";
654
- stateToken: string;
655
- }, {
656
- intent: "rehydrate";
657
- stateToken: string;
658
- }>]>;
596
+ continueToken: string;
597
+ }>;
659
598
  }, "strip", z.ZodTypeAny, {
660
599
  params: {
661
- intent: "advance";
662
- stateToken: string;
663
- ackToken: string;
664
- } | {
665
- intent: "rehydrate";
666
- stateToken: string;
600
+ continueToken: string;
667
601
  };
668
602
  tool: "continue_workflow";
669
603
  }, {
670
604
  params: {
671
- intent: "advance";
672
- stateToken: string;
673
- ackToken: string;
674
- } | {
675
- intent: "rehydrate";
676
- stateToken: string;
605
+ continueToken: string;
677
606
  };
678
607
  tool: "continue_workflow";
679
608
  }>>;
@@ -850,7 +779,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
850
779
  }[];
851
780
  }>;
852
781
  retryable: z.ZodOptional<z.ZodBoolean>;
853
- retryAckToken: z.ZodOptional<z.ZodString>;
782
+ retryContinueToken: z.ZodOptional<z.ZodString>;
854
783
  validation: z.ZodOptional<z.ZodObject<{
855
784
  issues: z.ZodArray<z.ZodString, "many">;
856
785
  suggestions: z.ZodArray<z.ZodString, "many">;
@@ -889,9 +818,9 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
889
818
  stepId: string;
890
819
  title: string;
891
820
  prompt: string;
821
+ agentRole?: string | undefined;
892
822
  } | null;
893
823
  isComplete: boolean;
894
- stateToken: string;
895
824
  preferences: {
896
825
  autonomy: "guided" | "full_auto_never_stop" | "full_auto_stop_on_user_deps";
897
826
  riskPolicy: "conservative" | "balanced" | "aggressive";
@@ -899,12 +828,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
899
828
  nextIntent: "complete" | "perform_pending_then_continue" | "await_user_confirmation" | "rehydrate_only";
900
829
  nextCall: {
901
830
  params: {
902
- intent: "advance";
903
- stateToken: string;
904
- ackToken: string;
905
- } | {
906
- intent: "rehydrate";
907
- stateToken: string;
831
+ continueToken: string;
908
832
  };
909
833
  tool: "continue_workflow";
910
834
  } | null;
@@ -912,10 +836,10 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
912
836
  issues: string[];
913
837
  suggestions: string[];
914
838
  } | undefined;
915
- ackToken?: string | undefined;
839
+ continueToken?: string | undefined;
916
840
  checkpointToken?: string | undefined;
917
841
  retryable?: boolean | undefined;
918
- retryAckToken?: string | undefined;
842
+ retryContinueToken?: string | undefined;
919
843
  }, {
920
844
  kind: "blocked";
921
845
  blockers: {
@@ -944,9 +868,9 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
944
868
  stepId: string;
945
869
  title: string;
946
870
  prompt: string;
871
+ agentRole?: string | undefined;
947
872
  } | null;
948
873
  isComplete: boolean;
949
- stateToken: string;
950
874
  preferences: {
951
875
  autonomy: "guided" | "full_auto_never_stop" | "full_auto_stop_on_user_deps";
952
876
  riskPolicy: "conservative" | "balanced" | "aggressive";
@@ -954,12 +878,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
954
878
  nextIntent: "complete" | "perform_pending_then_continue" | "await_user_confirmation" | "rehydrate_only";
955
879
  nextCall: {
956
880
  params: {
957
- intent: "advance";
958
- stateToken: string;
959
- ackToken: string;
960
- } | {
961
- intent: "rehydrate";
962
- stateToken: string;
881
+ continueToken: string;
963
882
  };
964
883
  tool: "continue_workflow";
965
884
  } | null;
@@ -967,19 +886,19 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
967
886
  issues: string[];
968
887
  suggestions: string[];
969
888
  } | undefined;
970
- ackToken?: string | undefined;
889
+ continueToken?: string | undefined;
971
890
  checkpointToken?: string | undefined;
972
891
  retryable?: boolean | undefined;
973
- retryAckToken?: string | undefined;
892
+ retryContinueToken?: string | undefined;
974
893
  }>]>, {
975
894
  kind: "ok";
976
895
  pending: {
977
896
  stepId: string;
978
897
  title: string;
979
898
  prompt: string;
899
+ agentRole?: string | undefined;
980
900
  } | null;
981
901
  isComplete: boolean;
982
- stateToken: string;
983
902
  preferences: {
984
903
  autonomy: "guided" | "full_auto_never_stop" | "full_auto_stop_on_user_deps";
985
904
  riskPolicy: "conservative" | "balanced" | "aggressive";
@@ -987,16 +906,11 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
987
906
  nextIntent: "complete" | "perform_pending_then_continue" | "await_user_confirmation" | "rehydrate_only";
988
907
  nextCall: {
989
908
  params: {
990
- intent: "advance";
991
- stateToken: string;
992
- ackToken: string;
993
- } | {
994
- intent: "rehydrate";
995
- stateToken: string;
909
+ continueToken: string;
996
910
  };
997
911
  tool: "continue_workflow";
998
912
  } | null;
999
- ackToken?: string | undefined;
913
+ continueToken?: string | undefined;
1000
914
  checkpointToken?: string | undefined;
1001
915
  } | {
1002
916
  kind: "blocked";
@@ -1026,9 +940,9 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
1026
940
  stepId: string;
1027
941
  title: string;
1028
942
  prompt: string;
943
+ agentRole?: string | undefined;
1029
944
  } | null;
1030
945
  isComplete: boolean;
1031
- stateToken: string;
1032
946
  preferences: {
1033
947
  autonomy: "guided" | "full_auto_never_stop" | "full_auto_stop_on_user_deps";
1034
948
  riskPolicy: "conservative" | "balanced" | "aggressive";
@@ -1036,12 +950,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
1036
950
  nextIntent: "complete" | "perform_pending_then_continue" | "await_user_confirmation" | "rehydrate_only";
1037
951
  nextCall: {
1038
952
  params: {
1039
- intent: "advance";
1040
- stateToken: string;
1041
- ackToken: string;
1042
- } | {
1043
- intent: "rehydrate";
1044
- stateToken: string;
953
+ continueToken: string;
1045
954
  };
1046
955
  tool: "continue_workflow";
1047
956
  } | null;
@@ -1049,19 +958,19 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
1049
958
  issues: string[];
1050
959
  suggestions: string[];
1051
960
  } | undefined;
1052
- ackToken?: string | undefined;
961
+ continueToken?: string | undefined;
1053
962
  checkpointToken?: string | undefined;
1054
963
  retryable?: boolean | undefined;
1055
- retryAckToken?: string | undefined;
964
+ retryContinueToken?: string | undefined;
1056
965
  }, {
1057
966
  kind: "ok";
1058
967
  pending: {
1059
968
  stepId: string;
1060
969
  title: string;
1061
970
  prompt: string;
971
+ agentRole?: string | undefined;
1062
972
  } | null;
1063
973
  isComplete: boolean;
1064
- stateToken: string;
1065
974
  preferences: {
1066
975
  autonomy: "guided" | "full_auto_never_stop" | "full_auto_stop_on_user_deps";
1067
976
  riskPolicy: "conservative" | "balanced" | "aggressive";
@@ -1069,16 +978,11 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
1069
978
  nextIntent: "complete" | "perform_pending_then_continue" | "await_user_confirmation" | "rehydrate_only";
1070
979
  nextCall: {
1071
980
  params: {
1072
- intent: "advance";
1073
- stateToken: string;
1074
- ackToken: string;
1075
- } | {
1076
- intent: "rehydrate";
1077
- stateToken: string;
981
+ continueToken: string;
1078
982
  };
1079
983
  tool: "continue_workflow";
1080
984
  } | null;
1081
- ackToken?: string | undefined;
985
+ continueToken?: string | undefined;
1082
986
  checkpointToken?: string | undefined;
1083
987
  } | {
1084
988
  kind: "blocked";
@@ -1108,9 +1012,9 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
1108
1012
  stepId: string;
1109
1013
  title: string;
1110
1014
  prompt: string;
1015
+ agentRole?: string | undefined;
1111
1016
  } | null;
1112
1017
  isComplete: boolean;
1113
- stateToken: string;
1114
1018
  preferences: {
1115
1019
  autonomy: "guided" | "full_auto_never_stop" | "full_auto_stop_on_user_deps";
1116
1020
  riskPolicy: "conservative" | "balanced" | "aggressive";
@@ -1118,12 +1022,7 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
1118
1022
  nextIntent: "complete" | "perform_pending_then_continue" | "await_user_confirmation" | "rehydrate_only";
1119
1023
  nextCall: {
1120
1024
  params: {
1121
- intent: "advance";
1122
- stateToken: string;
1123
- ackToken: string;
1124
- } | {
1125
- intent: "rehydrate";
1126
- stateToken: string;
1025
+ continueToken: string;
1127
1026
  };
1128
1027
  tool: "continue_workflow";
1129
1028
  } | null;
@@ -1131,10 +1030,10 @@ export declare const V2ContinueWorkflowOutputSchema: z.ZodEffects<z.ZodDiscrimin
1131
1030
  issues: string[];
1132
1031
  suggestions: string[];
1133
1032
  } | undefined;
1134
- ackToken?: string | undefined;
1033
+ continueToken?: string | undefined;
1135
1034
  checkpointToken?: string | undefined;
1136
1035
  retryable?: boolean | undefined;
1137
- retryAckToken?: string | undefined;
1036
+ retryContinueToken?: string | undefined;
1138
1037
  }>;
1139
1038
  export declare const V2ResumeSessionOutputSchema: z.ZodObject<{
1140
1039
  candidates: z.ZodArray<z.ZodObject<{
@@ -1181,95 +1080,62 @@ export declare const V2CheckpointWorkflowOutputSchema: z.ZodObject<{
1181
1080
  stateToken: z.ZodString;
1182
1081
  nextCall: z.ZodNullable<z.ZodObject<{
1183
1082
  tool: z.ZodLiteral<"continue_workflow">;
1184
- params: z.ZodDiscriminatedUnion<"intent", [z.ZodObject<{
1185
- intent: z.ZodLiteral<"advance">;
1186
- stateToken: z.ZodString;
1187
- ackToken: z.ZodString;
1083
+ params: z.ZodObject<{
1084
+ continueToken: z.ZodString;
1188
1085
  }, "strip", z.ZodTypeAny, {
1189
- intent: "advance";
1190
- stateToken: string;
1191
- ackToken: string;
1086
+ continueToken: string;
1192
1087
  }, {
1193
- intent: "advance";
1194
- stateToken: string;
1195
- ackToken: string;
1196
- }>, z.ZodObject<{
1197
- intent: z.ZodLiteral<"rehydrate">;
1198
- stateToken: z.ZodString;
1199
- }, "strip", z.ZodTypeAny, {
1200
- intent: "rehydrate";
1201
- stateToken: string;
1202
- }, {
1203
- intent: "rehydrate";
1204
- stateToken: string;
1205
- }>]>;
1088
+ continueToken: string;
1089
+ }>;
1206
1090
  }, "strip", z.ZodTypeAny, {
1207
1091
  params: {
1208
- intent: "advance";
1209
- stateToken: string;
1210
- ackToken: string;
1211
- } | {
1212
- intent: "rehydrate";
1213
- stateToken: string;
1092
+ continueToken: string;
1214
1093
  };
1215
1094
  tool: "continue_workflow";
1216
1095
  }, {
1217
1096
  params: {
1218
- intent: "advance";
1219
- stateToken: string;
1220
- ackToken: string;
1221
- } | {
1222
- intent: "rehydrate";
1223
- stateToken: string;
1097
+ continueToken: string;
1224
1098
  };
1225
1099
  tool: "continue_workflow";
1226
1100
  }>>;
1227
1101
  }, "strip", z.ZodTypeAny, {
1228
- stateToken: string;
1229
1102
  nextCall: {
1230
1103
  params: {
1231
- intent: "advance";
1232
- stateToken: string;
1233
- ackToken: string;
1234
- } | {
1235
- intent: "rehydrate";
1236
- stateToken: string;
1104
+ continueToken: string;
1237
1105
  };
1238
1106
  tool: "continue_workflow";
1239
1107
  } | null;
1108
+ stateToken: string;
1240
1109
  checkpointNodeId: string;
1241
1110
  }, {
1242
- stateToken: string;
1243
1111
  nextCall: {
1244
1112
  params: {
1245
- intent: "advance";
1246
- stateToken: string;
1247
- ackToken: string;
1248
- } | {
1249
- intent: "rehydrate";
1250
- stateToken: string;
1113
+ continueToken: string;
1251
1114
  };
1252
1115
  tool: "continue_workflow";
1253
1116
  } | null;
1117
+ stateToken: string;
1254
1118
  checkpointNodeId: string;
1255
1119
  }>;
1256
1120
  export declare const V2StartWorkflowOutputSchema: z.ZodEffects<z.ZodObject<{
1257
- stateToken: z.ZodString;
1258
- ackToken: z.ZodOptional<z.ZodString>;
1121
+ continueToken: z.ZodOptional<z.ZodString>;
1259
1122
  checkpointToken: z.ZodOptional<z.ZodString>;
1260
1123
  isComplete: z.ZodBoolean;
1261
1124
  pending: z.ZodNullable<z.ZodObject<{
1262
1125
  stepId: z.ZodString;
1263
1126
  title: z.ZodString;
1264
1127
  prompt: z.ZodString;
1128
+ agentRole: z.ZodOptional<z.ZodString>;
1265
1129
  }, "strip", z.ZodTypeAny, {
1266
1130
  stepId: string;
1267
1131
  title: string;
1268
1132
  prompt: string;
1133
+ agentRole?: string | undefined;
1269
1134
  }, {
1270
1135
  stepId: string;
1271
1136
  title: string;
1272
1137
  prompt: string;
1138
+ agentRole?: string | undefined;
1273
1139
  }>>;
1274
1140
  preferences: z.ZodObject<{
1275
1141
  autonomy: z.ZodEnum<["guided", "full_auto_stop_on_user_deps", "full_auto_never_stop"]>;
@@ -1284,46 +1150,21 @@ export declare const V2StartWorkflowOutputSchema: z.ZodEffects<z.ZodObject<{
1284
1150
  nextIntent: z.ZodEnum<["perform_pending_then_continue", "await_user_confirmation", "rehydrate_only", "complete"]>;
1285
1151
  nextCall: z.ZodNullable<z.ZodObject<{
1286
1152
  tool: z.ZodLiteral<"continue_workflow">;
1287
- params: z.ZodDiscriminatedUnion<"intent", [z.ZodObject<{
1288
- intent: z.ZodLiteral<"advance">;
1289
- stateToken: z.ZodString;
1290
- ackToken: z.ZodString;
1153
+ params: z.ZodObject<{
1154
+ continueToken: z.ZodString;
1291
1155
  }, "strip", z.ZodTypeAny, {
1292
- intent: "advance";
1293
- stateToken: string;
1294
- ackToken: string;
1156
+ continueToken: string;
1295
1157
  }, {
1296
- intent: "advance";
1297
- stateToken: string;
1298
- ackToken: string;
1299
- }>, z.ZodObject<{
1300
- intent: z.ZodLiteral<"rehydrate">;
1301
- stateToken: z.ZodString;
1302
- }, "strip", z.ZodTypeAny, {
1303
- intent: "rehydrate";
1304
- stateToken: string;
1305
- }, {
1306
- intent: "rehydrate";
1307
- stateToken: string;
1308
- }>]>;
1158
+ continueToken: string;
1159
+ }>;
1309
1160
  }, "strip", z.ZodTypeAny, {
1310
1161
  params: {
1311
- intent: "advance";
1312
- stateToken: string;
1313
- ackToken: string;
1314
- } | {
1315
- intent: "rehydrate";
1316
- stateToken: string;
1162
+ continueToken: string;
1317
1163
  };
1318
1164
  tool: "continue_workflow";
1319
1165
  }, {
1320
1166
  params: {
1321
- intent: "advance";
1322
- stateToken: string;
1323
- ackToken: string;
1324
- } | {
1325
- intent: "rehydrate";
1326
- stateToken: string;
1167
+ continueToken: string;
1327
1168
  };
1328
1169
  tool: "continue_workflow";
1329
1170
  }>>;
@@ -1332,9 +1173,9 @@ export declare const V2StartWorkflowOutputSchema: z.ZodEffects<z.ZodObject<{
1332
1173
  stepId: string;
1333
1174
  title: string;
1334
1175
  prompt: string;
1176
+ agentRole?: string | undefined;
1335
1177
  } | null;
1336
1178
  isComplete: boolean;
1337
- stateToken: string;
1338
1179
  preferences: {
1339
1180
  autonomy: "guided" | "full_auto_never_stop" | "full_auto_stop_on_user_deps";
1340
1181
  riskPolicy: "conservative" | "balanced" | "aggressive";
@@ -1342,25 +1183,20 @@ export declare const V2StartWorkflowOutputSchema: z.ZodEffects<z.ZodObject<{
1342
1183
  nextIntent: "complete" | "perform_pending_then_continue" | "await_user_confirmation" | "rehydrate_only";
1343
1184
  nextCall: {
1344
1185
  params: {
1345
- intent: "advance";
1346
- stateToken: string;
1347
- ackToken: string;
1348
- } | {
1349
- intent: "rehydrate";
1350
- stateToken: string;
1186
+ continueToken: string;
1351
1187
  };
1352
1188
  tool: "continue_workflow";
1353
1189
  } | null;
1354
- ackToken?: string | undefined;
1190
+ continueToken?: string | undefined;
1355
1191
  checkpointToken?: string | undefined;
1356
1192
  }, {
1357
1193
  pending: {
1358
1194
  stepId: string;
1359
1195
  title: string;
1360
1196
  prompt: string;
1197
+ agentRole?: string | undefined;
1361
1198
  } | null;
1362
1199
  isComplete: boolean;
1363
- stateToken: string;
1364
1200
  preferences: {
1365
1201
  autonomy: "guided" | "full_auto_never_stop" | "full_auto_stop_on_user_deps";
1366
1202
  riskPolicy: "conservative" | "balanced" | "aggressive";
@@ -1368,25 +1204,20 @@ export declare const V2StartWorkflowOutputSchema: z.ZodEffects<z.ZodObject<{
1368
1204
  nextIntent: "complete" | "perform_pending_then_continue" | "await_user_confirmation" | "rehydrate_only";
1369
1205
  nextCall: {
1370
1206
  params: {
1371
- intent: "advance";
1372
- stateToken: string;
1373
- ackToken: string;
1374
- } | {
1375
- intent: "rehydrate";
1376
- stateToken: string;
1207
+ continueToken: string;
1377
1208
  };
1378
1209
  tool: "continue_workflow";
1379
1210
  } | null;
1380
- ackToken?: string | undefined;
1211
+ continueToken?: string | undefined;
1381
1212
  checkpointToken?: string | undefined;
1382
1213
  }>, {
1383
1214
  pending: {
1384
1215
  stepId: string;
1385
1216
  title: string;
1386
1217
  prompt: string;
1218
+ agentRole?: string | undefined;
1387
1219
  } | null;
1388
1220
  isComplete: boolean;
1389
- stateToken: string;
1390
1221
  preferences: {
1391
1222
  autonomy: "guided" | "full_auto_never_stop" | "full_auto_stop_on_user_deps";
1392
1223
  riskPolicy: "conservative" | "balanced" | "aggressive";
@@ -1394,25 +1225,20 @@ export declare const V2StartWorkflowOutputSchema: z.ZodEffects<z.ZodObject<{
1394
1225
  nextIntent: "complete" | "perform_pending_then_continue" | "await_user_confirmation" | "rehydrate_only";
1395
1226
  nextCall: {
1396
1227
  params: {
1397
- intent: "advance";
1398
- stateToken: string;
1399
- ackToken: string;
1400
- } | {
1401
- intent: "rehydrate";
1402
- stateToken: string;
1228
+ continueToken: string;
1403
1229
  };
1404
1230
  tool: "continue_workflow";
1405
1231
  } | null;
1406
- ackToken?: string | undefined;
1232
+ continueToken?: string | undefined;
1407
1233
  checkpointToken?: string | undefined;
1408
1234
  }, {
1409
1235
  pending: {
1410
1236
  stepId: string;
1411
1237
  title: string;
1412
1238
  prompt: string;
1239
+ agentRole?: string | undefined;
1413
1240
  } | null;
1414
1241
  isComplete: boolean;
1415
- stateToken: string;
1416
1242
  preferences: {
1417
1243
  autonomy: "guided" | "full_auto_never_stop" | "full_auto_stop_on_user_deps";
1418
1244
  riskPolicy: "conservative" | "balanced" | "aggressive";
@@ -1420,16 +1246,11 @@ export declare const V2StartWorkflowOutputSchema: z.ZodEffects<z.ZodObject<{
1420
1246
  nextIntent: "complete" | "perform_pending_then_continue" | "await_user_confirmation" | "rehydrate_only";
1421
1247
  nextCall: {
1422
1248
  params: {
1423
- intent: "advance";
1424
- stateToken: string;
1425
- ackToken: string;
1426
- } | {
1427
- intent: "rehydrate";
1428
- stateToken: string;
1249
+ continueToken: string;
1429
1250
  };
1430
1251
  tool: "continue_workflow";
1431
1252
  } | null;
1432
- ackToken?: string | undefined;
1253
+ continueToken?: string | undefined;
1433
1254
  checkpointToken?: string | undefined;
1434
1255
  }>;
1435
1256
  export declare const CreateSessionOutputSchema: z.ZodObject<{