@gobing-ai/ts-dual-workflow-engine 0.5.17 → 0.5.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/types.ts CHANGED
@@ -560,7 +560,13 @@ export interface WorkflowPersistenceAdapter {
560
560
  */
561
561
  interruptRun(runId: string, reason: string): Promise<WorkflowRunRecord | undefined>;
562
562
  /** Record the start of a branch execution in a parallel region. */
563
- saveBranchStart(runId: string, parallelNode: string, branchId: string, startNode: string): Promise<string>;
563
+ saveBranchStart(
564
+ runId: string,
565
+ parallelNode: string,
566
+ branchId: string,
567
+ startNode: string,
568
+ ownerAttempt?: string,
569
+ ): Promise<string>;
564
570
  /** Finalize a branch execution with terminal status, duration, output variables, and optional error. */
565
571
  saveBranchFinalize(
566
572
  runId: string,
@@ -569,6 +575,7 @@ export interface WorkflowPersistenceAdapter {
569
575
  durationMs: number,
570
576
  outputVars?: Vars,
571
577
  error?: string,
578
+ checkpoint?: { readonly parallelNode: string; readonly node: string; readonly ownerAttempt?: string },
572
579
  ): Promise<void>;
573
580
  /** List all branch records for a run, optionally filtered by parallel node ID. */
574
581
  listRunBranches(runId: string, parallelNode?: string): Promise<readonly WorkflowBranchRecord[]>;
@@ -579,5 +586,8 @@ export interface WorkflowPersistenceAdapter {
579
586
  joinNode: string,
580
587
  mergedVars?: Vars,
581
588
  phase?: { phase: string; status: WorkflowStatus },
589
+ ownerAttempt?: string,
590
+ transitionsTaken?: number,
591
+ collectedFailure?: string,
582
592
  ): Promise<void>;
583
593
  }