@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/README.md +18 -0
- package/dist/config.js +1 -1
- package/dist/dag.d.ts +30 -1
- package/dist/dag.d.ts.map +1 -1
- package/dist/dag.js +390 -116
- package/dist/persistence.d.ts +16 -6
- package/dist/persistence.d.ts.map +1 -1
- package/dist/persistence.js +84 -18
- package/dist/run-lifecycle.d.ts +2 -0
- package/dist/run-lifecycle.d.ts.map +1 -1
- package/dist/run-lifecycle.js +4 -0
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +33 -7
- package/dist/transition-flow.d.ts.map +1 -1
- package/dist/transition-flow.js +111 -40
- package/dist/types.d.ts +7 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/config.ts +1 -1
- package/src/dag.ts +443 -138
- package/src/persistence.ts +119 -15
- package/src/run-lifecycle.ts +5 -0
- package/src/service.ts +31 -7
- package/src/transition-flow.ts +147 -36
- package/src/types.ts +11 -1
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(
|
|
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
|
}
|