flowcraft 2.1.1 → 2.3.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 (162) hide show
  1. package/README.md +41 -35
  2. package/dist/analysis.d.ts +5 -2
  3. package/dist/analysis.js +1 -1
  4. package/dist/{chunk-HN72TZY5.js → chunk-233SESC2.js} +34 -23
  5. package/dist/chunk-233SESC2.js.map +1 -0
  6. package/dist/chunk-33NO4PUJ.js +74 -0
  7. package/dist/chunk-33NO4PUJ.js.map +1 -0
  8. package/dist/chunk-5KKSQWSC.js +90 -0
  9. package/dist/chunk-5KKSQWSC.js.map +1 -0
  10. package/dist/{chunk-O3XD45IL.js → chunk-6INWPSZT.js} +44 -17
  11. package/dist/chunk-6INWPSZT.js.map +1 -0
  12. package/dist/chunk-BC4G7OM6.js +42 -0
  13. package/dist/chunk-BC4G7OM6.js.map +1 -0
  14. package/dist/chunk-BCRWXTWX.js +21 -0
  15. package/dist/chunk-BCRWXTWX.js.map +1 -0
  16. package/dist/chunk-C4HYIJI3.js +279 -0
  17. package/dist/chunk-C4HYIJI3.js.map +1 -0
  18. package/dist/chunk-CD3Q4N6V.js +13 -0
  19. package/dist/chunk-CD3Q4N6V.js.map +1 -0
  20. package/dist/chunk-CD4FUZOJ.js +114 -0
  21. package/dist/chunk-CD4FUZOJ.js.map +1 -0
  22. package/dist/chunk-CY755I7I.js +25 -0
  23. package/dist/chunk-CY755I7I.js.map +1 -0
  24. package/dist/chunk-DL7KVYZF.js +39 -0
  25. package/dist/chunk-DL7KVYZF.js.map +1 -0
  26. package/dist/{chunk-UETC63DP.js → chunk-EUJWJWFA.js} +24 -4
  27. package/dist/chunk-EUJWJWFA.js.map +1 -0
  28. package/dist/chunk-FRKO3WX4.js +32 -0
  29. package/dist/chunk-FRKO3WX4.js.map +1 -0
  30. package/dist/chunk-G53CSLBF.js +54 -0
  31. package/dist/chunk-G53CSLBF.js.map +1 -0
  32. package/dist/chunk-G5BGBPFP.js +172 -0
  33. package/dist/chunk-G5BGBPFP.js.map +1 -0
  34. package/dist/chunk-HAZ26F3P.js +98 -0
  35. package/dist/chunk-HAZ26F3P.js.map +1 -0
  36. package/dist/chunk-IB2BISIC.js +446 -0
  37. package/dist/chunk-IB2BISIC.js.map +1 -0
  38. package/dist/{chunk-U5V5O5MN.js → chunk-LNK7LZER.js} +5 -3
  39. package/dist/chunk-LNK7LZER.js.map +1 -0
  40. package/dist/chunk-MCGK3FXQ.js +143 -0
  41. package/dist/chunk-MCGK3FXQ.js.map +1 -0
  42. package/dist/chunk-MUYLRTSR.js +82 -0
  43. package/dist/chunk-MUYLRTSR.js.map +1 -0
  44. package/dist/chunk-NVJ3ZO3P.js +3 -0
  45. package/dist/{chunk-HMR2GEGE.js.map → chunk-NVJ3ZO3P.js.map} +1 -1
  46. package/dist/chunk-NVLZFLYM.js +3 -0
  47. package/dist/chunk-NVLZFLYM.js.map +1 -0
  48. package/dist/chunk-ONH7PIJZ.js +300 -0
  49. package/dist/chunk-ONH7PIJZ.js.map +1 -0
  50. package/dist/chunk-QNYXQKFW.js +25 -0
  51. package/dist/chunk-QNYXQKFW.js.map +1 -0
  52. package/dist/{chunk-KWQHFT7E.js → chunk-R3HQXIEL.js} +6 -6
  53. package/dist/chunk-R3HQXIEL.js.map +1 -0
  54. package/dist/chunk-RM677CNU.js +52 -0
  55. package/dist/chunk-RM677CNU.js.map +1 -0
  56. package/dist/chunk-WWGFIYKW.js +47 -0
  57. package/dist/chunk-WWGFIYKW.js.map +1 -0
  58. package/dist/chunk-XNRIM27H.js +76 -0
  59. package/dist/chunk-XNRIM27H.js.map +1 -0
  60. package/dist/container-factory.d.ts +17 -0
  61. package/dist/container-factory.js +13 -0
  62. package/dist/container-factory.js.map +1 -0
  63. package/dist/container.d.ts +23 -0
  64. package/dist/container.js +3 -0
  65. package/dist/container.js.map +1 -0
  66. package/dist/context.d.ts +3 -1
  67. package/dist/context.js +1 -1
  68. package/dist/errors.d.ts +18 -17
  69. package/dist/errors.js +1 -1
  70. package/dist/evaluator.d.ts +3 -1
  71. package/dist/flow.d.ts +29 -8
  72. package/dist/flow.js +2 -2
  73. package/dist/index.d.ts +7 -7
  74. package/dist/index.js +27 -15
  75. package/dist/linter.d.ts +5 -3
  76. package/dist/linter.js +2 -2
  77. package/dist/logger.d.ts +3 -1
  78. package/dist/node.d.ts +3 -1
  79. package/dist/node.js +1 -1
  80. package/dist/nodes/batch-gather.d.ts +9 -0
  81. package/dist/nodes/batch-gather.js +4 -0
  82. package/dist/nodes/batch-gather.js.map +1 -0
  83. package/dist/nodes/batch-scatter.d.ts +9 -0
  84. package/dist/nodes/batch-scatter.js +4 -0
  85. package/dist/nodes/batch-scatter.js.map +1 -0
  86. package/dist/nodes/subflow.d.ts +9 -0
  87. package/dist/nodes/subflow.js +10 -0
  88. package/dist/nodes/subflow.js.map +1 -0
  89. package/dist/nodes/wait.d.ts +9 -0
  90. package/dist/nodes/wait.js +4 -0
  91. package/dist/nodes/wait.js.map +1 -0
  92. package/dist/runtime/adapter.d.ts +6 -5
  93. package/dist/runtime/adapter.js +20 -10
  94. package/dist/runtime/builtin-keys.d.ts +38 -0
  95. package/dist/runtime/builtin-keys.js +10 -0
  96. package/dist/runtime/builtin-keys.js.map +1 -0
  97. package/dist/runtime/execution-context.d.ts +3 -0
  98. package/dist/runtime/execution-context.js +6 -0
  99. package/dist/runtime/execution-context.js.map +1 -0
  100. package/dist/runtime/executors.d.ts +3 -26
  101. package/dist/runtime/executors.js +2 -2
  102. package/dist/runtime/index.d.ts +5 -6
  103. package/dist/runtime/index.js +22 -11
  104. package/dist/runtime/node-executor-factory.d.ts +12 -0
  105. package/dist/runtime/node-executor-factory.js +6 -0
  106. package/dist/runtime/node-executor-factory.js.map +1 -0
  107. package/dist/runtime/orchestrator.d.ts +9 -0
  108. package/dist/runtime/orchestrator.js +8 -0
  109. package/dist/runtime/orchestrator.js.map +1 -0
  110. package/dist/runtime/orchestrators/step-by-step.d.ts +16 -0
  111. package/dist/runtime/orchestrators/step-by-step.js +5 -0
  112. package/dist/runtime/orchestrators/step-by-step.js.map +1 -0
  113. package/dist/runtime/orchestrators/utils.d.ts +35 -0
  114. package/dist/runtime/orchestrators/utils.js +4 -0
  115. package/dist/runtime/orchestrators/utils.js.map +1 -0
  116. package/dist/runtime/runtime.d.ts +3 -35
  117. package/dist/runtime/runtime.js +19 -9
  118. package/dist/runtime/state.d.ts +3 -21
  119. package/dist/runtime/state.js +3 -2
  120. package/dist/runtime/traverser.d.ts +3 -26
  121. package/dist/runtime/traverser.js +2 -3
  122. package/dist/runtime/types.d.ts +3 -16
  123. package/dist/runtime/types.js +1 -1
  124. package/dist/runtime/workflow-logic-handler.d.ts +17 -0
  125. package/dist/runtime/workflow-logic-handler.js +5 -0
  126. package/dist/runtime/workflow-logic-handler.js.map +1 -0
  127. package/dist/sanitizer.d.ts +3 -1
  128. package/dist/serializer.d.ts +3 -1
  129. package/dist/testing/event-logger.d.ts +63 -0
  130. package/dist/testing/event-logger.js +3 -0
  131. package/dist/testing/event-logger.js.map +1 -0
  132. package/dist/testing/index.d.ts +6 -0
  133. package/dist/testing/index.js +31 -0
  134. package/dist/testing/index.js.map +1 -0
  135. package/dist/testing/run-with-trace.d.ts +38 -0
  136. package/dist/testing/run-with-trace.js +29 -0
  137. package/dist/testing/run-with-trace.js.map +1 -0
  138. package/dist/testing/stepper.d.ts +79 -0
  139. package/dist/testing/stepper.js +11 -0
  140. package/dist/testing/stepper.js.map +1 -0
  141. package/dist/types-ezHUBdpL.d.ts +564 -0
  142. package/dist/types.d.ts +3 -1
  143. package/package.json +6 -2
  144. package/dist/chunk-3XVVR2SR.js +0 -417
  145. package/dist/chunk-3XVVR2SR.js.map +0 -1
  146. package/dist/chunk-4A627Q6L.js +0 -147
  147. package/dist/chunk-4A627Q6L.js.map +0 -1
  148. package/dist/chunk-5ZXV3R5D.js +0 -28
  149. package/dist/chunk-5ZXV3R5D.js.map +0 -1
  150. package/dist/chunk-CSZ6EOWG.js +0 -61
  151. package/dist/chunk-CSZ6EOWG.js.map +0 -1
  152. package/dist/chunk-HMR2GEGE.js +0 -3
  153. package/dist/chunk-HN72TZY5.js.map +0 -1
  154. package/dist/chunk-KWQHFT7E.js.map +0 -1
  155. package/dist/chunk-M2FRTT2K.js +0 -144
  156. package/dist/chunk-M2FRTT2K.js.map +0 -1
  157. package/dist/chunk-NBIRTKZ7.js +0 -192
  158. package/dist/chunk-NBIRTKZ7.js.map +0 -1
  159. package/dist/chunk-O3XD45IL.js.map +0 -1
  160. package/dist/chunk-U5V5O5MN.js.map +0 -1
  161. package/dist/chunk-UETC63DP.js.map +0 -1
  162. package/dist/types-CQCe_nBM.d.ts +0 -214
package/dist/node.d.ts CHANGED
@@ -1 +1,3 @@
1
- export { B as BaseNode, i as isNodeClass } from './types-CQCe_nBM.js';
1
+ export { B as BaseNode, i as isNodeClass } from './types-ezHUBdpL.js';
2
+ import './errors.js';
3
+ import './container.js';
package/dist/node.js CHANGED
@@ -1,3 +1,3 @@
1
- export { BaseNode, isNodeClass } from './chunk-U5V5O5MN.js';
1
+ export { BaseNode, isNodeClass } from './chunk-LNK7LZER.js';
2
2
  //# sourceMappingURL=node.js.map
3
3
  //# sourceMappingURL=node.js.map
@@ -0,0 +1,9 @@
1
+ import { B as BaseNode, m as NodeContext, l as NodeResult } from '../types-ezHUBdpL.js';
2
+ import '../errors.js';
3
+ import '../container.js';
4
+
5
+ declare class BatchGatherNode extends BaseNode {
6
+ exec(_prepResult: any, context: NodeContext<any, any, any>): Promise<Omit<NodeResult, 'error'>>;
7
+ }
8
+
9
+ export { BatchGatherNode };
@@ -0,0 +1,4 @@
1
+ export { BatchGatherNode } from '../chunk-BC4G7OM6.js';
2
+ import '../chunk-LNK7LZER.js';
3
+ //# sourceMappingURL=batch-gather.js.map
4
+ //# sourceMappingURL=batch-gather.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"batch-gather.js"}
@@ -0,0 +1,9 @@
1
+ import { B as BaseNode, m as NodeContext, l as NodeResult } from '../types-ezHUBdpL.js';
2
+ import '../errors.js';
3
+ import '../container.js';
4
+
5
+ declare class BatchScatterNode extends BaseNode {
6
+ exec(_prepResult: any, context: NodeContext<any, any, any>): Promise<Omit<NodeResult, 'error'>>;
7
+ }
8
+
9
+ export { BatchScatterNode };
@@ -0,0 +1,4 @@
1
+ export { BatchScatterNode } from '../chunk-RM677CNU.js';
2
+ import '../chunk-LNK7LZER.js';
3
+ //# sourceMappingURL=batch-scatter.js.map
4
+ //# sourceMappingURL=batch-scatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"batch-scatter.js"}
@@ -0,0 +1,9 @@
1
+ import { B as BaseNode, m as NodeContext, l as NodeResult } from '../types-ezHUBdpL.js';
2
+ import '../errors.js';
3
+ import '../container.js';
4
+
5
+ declare class SubflowNode extends BaseNode {
6
+ exec(_prepResult: any, context: NodeContext<Record<string, any>, any, any>): Promise<Omit<NodeResult, 'error'>>;
7
+ }
8
+
9
+ export { SubflowNode };
@@ -0,0 +1,10 @@
1
+ export { SubflowNode } from '../chunk-5KKSQWSC.js';
2
+ import '../chunk-G5BGBPFP.js';
3
+ import '../chunk-233SESC2.js';
4
+ import '../chunk-FRKO3WX4.js';
5
+ import '../chunk-CD4FUZOJ.js';
6
+ import '../chunk-R3HQXIEL.js';
7
+ import '../chunk-BCRWXTWX.js';
8
+ import '../chunk-LNK7LZER.js';
9
+ //# sourceMappingURL=subflow.js.map
10
+ //# sourceMappingURL=subflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"subflow.js"}
@@ -0,0 +1,9 @@
1
+ import { B as BaseNode, m as NodeContext, l as NodeResult } from '../types-ezHUBdpL.js';
2
+ import '../errors.js';
3
+ import '../container.js';
4
+
5
+ declare class WaitNode extends BaseNode {
6
+ exec(_prepResult: any, context: NodeContext<Record<string, any>, any, any>): Promise<Omit<NodeResult, 'error'>>;
7
+ }
8
+
9
+ export { WaitNode };
@@ -0,0 +1,4 @@
1
+ export { WaitNode } from '../chunk-CD3Q4N6V.js';
2
+ import '../chunk-LNK7LZER.js';
3
+ //# sourceMappingURL=wait.js.map
4
+ //# sourceMappingURL=wait.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"wait.js"}
@@ -1,7 +1,6 @@
1
- import { j as RuntimeOptions, n as ISerializer, h as IAsyncContext, p as WorkflowResult, W as WorkflowBlueprint } from '../types-CQCe_nBM.js';
2
- import { FlowRuntime } from './runtime.js';
3
- import './state.js';
4
- import './types.js';
1
+ import { v as RuntimeOptions, c as FlowRuntime, A as ISerializer, t as IAsyncContext, J as WorkflowResult, g as WorkflowBlueprint } from '../types-ezHUBdpL.js';
2
+ import '../errors.js';
3
+ import '../container.js';
5
4
 
6
5
  /**
7
6
  * Defines the contract for an atomic, distributed key-value store required by
@@ -14,6 +13,8 @@ interface ICoordinationStore {
14
13
  setIfNotExist: (key: string, value: string, ttlSeconds: number) => Promise<boolean>;
15
14
  /** Deletes a key. Used for cleanup. */
16
15
  delete: (key: string) => Promise<void>;
16
+ /** Gets the value of a key. */
17
+ get: (key: string) => Promise<string | undefined>;
17
18
  }
18
19
  /** Configuration options for constructing a BaseDistributedAdapter. */
19
20
  interface AdapterOptions {
@@ -90,7 +91,7 @@ declare abstract class BaseDistributedAdapter {
90
91
  reconcile(runId: string): Promise<Set<string>>;
91
92
  private calculateResumedFrontier;
92
93
  /**
93
- * Writes a poison pill for 'all' join successors of a failed node to prevent stalling.
94
+ * Writes a poison pill for 'all' join successors and a cancellation pill for 'any' join successors of a failed node to prevent stalling or ambiguous states.
94
95
  */
95
96
  private writePoisonPillForSuccessors;
96
97
  }
@@ -1,15 +1,25 @@
1
- export { BaseDistributedAdapter } from '../chunk-O3XD45IL.js';
2
- import '../chunk-3XVVR2SR.js';
3
- import '../chunk-CSZ6EOWG.js';
4
- import '../chunk-NBIRTKZ7.js';
1
+ export { BaseDistributedAdapter } from '../chunk-6INWPSZT.js';
2
+ import '../chunk-IB2BISIC.js';
3
+ import '../chunk-MCGK3FXQ.js';
4
+ import '../chunk-DL7KVYZF.js';
5
+ import '../chunk-ONH7PIJZ.js';
6
+ import '../chunk-5KKSQWSC.js';
7
+ import '../chunk-CD3Q4N6V.js';
8
+ import '../chunk-G5BGBPFP.js';
5
9
  import '../chunk-DSYAC4WB.js';
10
+ import '../chunk-BC4G7OM6.js';
11
+ import '../chunk-RM677CNU.js';
12
+ import '../chunk-233SESC2.js';
13
+ import '../chunk-33NO4PUJ.js';
14
+ import '../chunk-HAZ26F3P.js';
15
+ import '../chunk-FRKO3WX4.js';
16
+ import '../chunk-CD4FUZOJ.js';
17
+ import '../chunk-4PELJWF7.js';
6
18
  import '../chunk-CYHZ2YVH.js';
7
- import '../chunk-M2FRTT2K.js';
8
- import '../chunk-KWQHFT7E.js';
9
- import '../chunk-5ZXV3R5D.js';
19
+ import '../chunk-WWGFIYKW.js';
20
+ import '../chunk-R3HQXIEL.js';
21
+ import '../chunk-BCRWXTWX.js';
10
22
  import '../chunk-PH2IYZHV.js';
11
- import '../chunk-U5V5O5MN.js';
12
- import '../chunk-HN72TZY5.js';
13
- import '../chunk-4PELJWF7.js';
23
+ import '../chunk-LNK7LZER.js';
14
24
  //# sourceMappingURL=adapter.js.map
15
25
  //# sourceMappingURL=adapter.js.map
@@ -0,0 +1,38 @@
1
+ /**
2
+ * A registry defining the dynamic context keys set by each built-in node.
3
+ * This object is the single source of truth.
4
+ */
5
+ declare const BUILTIN_KEYS: {
6
+ readonly 'batch-scatter': readonly ["currentIndex", "hasMore"];
7
+ readonly 'batch-gather': readonly ["allWorkerIds", "hasMore"];
8
+ };
9
+ /**
10
+ * A comprehensive map of all possible dynamic keys to their corresponding TypeScript types.
11
+ * The compiler will enforce that any key used in `BUILTIN_KEYS` must have an entry here.
12
+ */
13
+ type DynamicKeyTypeMap = {
14
+ currentIndex: number;
15
+ hasMore: boolean;
16
+ allWorkerIds: string[];
17
+ };
18
+ /**
19
+ * A utility type that creates a union of all possible dynamic key strings
20
+ * by flattening the values of the `BUILTIN_KEYS` object.
21
+ *
22
+ * Example: 'currentIndex' | 'hasMore' | 'allWorkerIds'
23
+ */
24
+ type AllDynamicKeyStrings = (typeof BUILTIN_KEYS)[keyof typeof BUILTIN_KEYS][number];
25
+ /**
26
+ * The final, dynamically generated `DynamicKeys` type.
27
+ *
28
+ * It uses a mapped type to construct an object where:
29
+ * - The keys are the union of all strings from `AllDynamicKeyStrings`.
30
+ * - The value for each key is looked up from our central `DynamicKeyTypeMap`.
31
+ *
32
+ * This ensures that `DynamicKeys` is always perfectly in sync with `BUILTIN_KEYS`.
33
+ */
34
+ type DynamicKeys = {
35
+ [K in AllDynamicKeyStrings]: DynamicKeyTypeMap[K];
36
+ };
37
+
38
+ export { BUILTIN_KEYS, type DynamicKeys };
@@ -0,0 +1,10 @@
1
+ // src/runtime/builtin-keys.ts
2
+ var BUILTIN_KEYS = {
3
+ "batch-scatter": ["currentIndex", "hasMore"],
4
+ "batch-gather": ["allWorkerIds", "hasMore"]
5
+ // 'loop-controller': ['loopCounter']
6
+ };
7
+
8
+ export { BUILTIN_KEYS };
9
+ //# sourceMappingURL=builtin-keys.js.map
10
+ //# sourceMappingURL=builtin-keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/runtime/builtin-keys.ts"],"names":[],"mappings":";AAIO,IAAM,YAAA,GAAe;AAAA,EAC3B,eAAA,EAAiB,CAAC,cAAA,EAAgB,SAAS,CAAA;AAAA,EAC3C,cAAA,EAAgB,CAAC,cAAA,EAAgB,SAAS;AAAA;AAE3C","file":"builtin-keys.js","sourcesContent":["/**\n * A registry defining the dynamic context keys set by each built-in node.\n * This object is the single source of truth.\n */\nexport const BUILTIN_KEYS = {\n\t'batch-scatter': ['currentIndex', 'hasMore'],\n\t'batch-gather': ['allWorkerIds', 'hasMore'],\n\t// 'loop-controller': ['loopCounter']\n} as const\n\n/**\n * A comprehensive map of all possible dynamic keys to their corresponding TypeScript types.\n * The compiler will enforce that any key used in `BUILTIN_KEYS` must have an entry here.\n */\ntype DynamicKeyTypeMap = {\n\tcurrentIndex: number\n\thasMore: boolean\n\tallWorkerIds: string[]\n\t// loopCounter: number\n}\n\n/**\n * A utility type that creates a union of all possible dynamic key strings\n * by flattening the values of the `BUILTIN_KEYS` object.\n *\n * Example: 'currentIndex' | 'hasMore' | 'allWorkerIds'\n */\ntype AllDynamicKeyStrings = (typeof BUILTIN_KEYS)[keyof typeof BUILTIN_KEYS][number]\n\n/**\n * The final, dynamically generated `DynamicKeys` type.\n *\n * It uses a mapped type to construct an object where:\n * - The keys are the union of all strings from `AllDynamicKeyStrings`.\n * - The value for each key is looked up from our central `DynamicKeyTypeMap`.\n *\n * This ensures that `DynamicKeys` is always perfectly in sync with `BUILTIN_KEYS`.\n */\nexport type DynamicKeys = {\n\t[K in AllDynamicKeyStrings]: DynamicKeyTypeMap[K]\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { K as ExecutionContext } from '../types-ezHUBdpL.js';
2
+ import '../errors.js';
3
+ import '../container.js';
@@ -0,0 +1,6 @@
1
+ export { ExecutionContext } from '../chunk-FRKO3WX4.js';
2
+ import '../chunk-CD4FUZOJ.js';
3
+ import '../chunk-R3HQXIEL.js';
4
+ import '../chunk-BCRWXTWX.js';
5
+ //# sourceMappingURL=execution-context.js.map
6
+ //# sourceMappingURL=execution-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"execution-context.js"}
@@ -1,26 +1,3 @@
1
- import { N as NodeDefinition, c as NodeContext, b as NodeResult, d as NodeFunction, m as IEventBus, e as NodeClass, C as ContextImplementation } from '../types-CQCe_nBM.js';
2
-
3
- interface ExecutionStrategy {
4
- execute: (nodeDef: NodeDefinition, context: NodeContext<any, any, any>, executionId?: string, signal?: AbortSignal) => Promise<NodeResult<any, any>>;
5
- }
6
- declare class FunctionNodeExecutor implements ExecutionStrategy {
7
- private implementation;
8
- private maxRetries;
9
- private eventBus;
10
- constructor(implementation: NodeFunction, maxRetries: number, eventBus: IEventBus);
11
- execute(nodeDef: NodeDefinition, context: NodeContext<any, any, any>, executionId?: string, signal?: AbortSignal): Promise<NodeResult<any, any>>;
12
- }
13
- declare class ClassNodeExecutor implements ExecutionStrategy {
14
- private implementation;
15
- private maxRetries;
16
- private eventBus;
17
- constructor(implementation: NodeClass, maxRetries: number, eventBus: IEventBus);
18
- execute(nodeDef: NodeDefinition, context: NodeContext<any, any, any>, executionId?: string, signal?: AbortSignal): Promise<NodeResult<any, any>>;
19
- }
20
- declare class BuiltInNodeExecutor implements ExecutionStrategy {
21
- private executeBuiltIn;
22
- constructor(executeBuiltIn: (nodeDef: NodeDefinition, context: ContextImplementation<any>) => Promise<NodeResult<any, any>>);
23
- execute(nodeDef: NodeDefinition, context: NodeContext<Record<string, unknown>, Record<string, unknown>, any>): Promise<NodeResult<any, any>>;
24
- }
25
-
26
- export { BuiltInNodeExecutor, ClassNodeExecutor, type ExecutionStrategy, FunctionNodeExecutor };
1
+ import '../errors.js';
2
+ export { C as ClassNodeExecutor, E as ExecutionStrategy, F as FunctionNodeExecutor, N as NodeExecutionResult, b as NodeExecutor, a as NodeExecutorConfig } from '../types-ezHUBdpL.js';
3
+ import '../container.js';
@@ -1,4 +1,4 @@
1
- export { BuiltInNodeExecutor, ClassNodeExecutor, FunctionNodeExecutor } from '../chunk-M2FRTT2K.js';
2
- import '../chunk-5ZXV3R5D.js';
1
+ export { ClassNodeExecutor, FunctionNodeExecutor, NodeExecutor } from '../chunk-ONH7PIJZ.js';
2
+ import '../chunk-BCRWXTWX.js';
3
3
  //# sourceMappingURL=executors.js.map
4
4
  //# sourceMappingURL=executors.js.map
@@ -1,7 +1,6 @@
1
1
  export { AdapterOptions, BaseDistributedAdapter, ICoordinationStore, JobPayload } from './adapter.js';
2
- export { BuiltInNodeExecutor, ClassNodeExecutor, ExecutionStrategy, FunctionNodeExecutor } from './executors.js';
3
- export { FlowRuntime } from './runtime.js';
4
- export { WorkflowState } from './state.js';
5
- export { GraphTraverser } from './traverser.js';
6
- import '../types-CQCe_nBM.js';
7
- import './types.js';
2
+ export { C as ClassNodeExecutor, e as ExecutionServices, E as ExecutionStrategy, c as FlowRuntime, F as FunctionNodeExecutor, G as GraphTraverser, I as IOrchestrator, f as IRuntime, N as NodeExecutionResult, b as NodeExecutor, a as NodeExecutorConfig, d as NodeExecutorFactory, R as ReadyNode, W as WorkflowState } from '../types-ezHUBdpL.js';
3
+ export { DefaultOrchestrator } from './orchestrator.js';
4
+ export { executeBatch, processResults } from './orchestrators/utils.js';
5
+ import '../errors.js';
6
+ import '../container.js';
@@ -1,16 +1,27 @@
1
- import '../chunk-HMR2GEGE.js';
2
- export { BaseDistributedAdapter } from '../chunk-O3XD45IL.js';
3
- export { FlowRuntime } from '../chunk-3XVVR2SR.js';
4
- export { WorkflowState } from '../chunk-CSZ6EOWG.js';
5
- export { GraphTraverser } from '../chunk-NBIRTKZ7.js';
1
+ import '../chunk-NVJ3ZO3P.js';
2
+ import '../chunk-NVLZFLYM.js';
3
+ export { BaseDistributedAdapter } from '../chunk-6INWPSZT.js';
4
+ export { FlowRuntime } from '../chunk-IB2BISIC.js';
5
+ import '../chunk-MCGK3FXQ.js';
6
+ import '../chunk-DL7KVYZF.js';
7
+ export { ClassNodeExecutor, FunctionNodeExecutor, NodeExecutor } from '../chunk-ONH7PIJZ.js';
8
+ import '../chunk-5KKSQWSC.js';
9
+ import '../chunk-CD3Q4N6V.js';
10
+ export { GraphTraverser } from '../chunk-G5BGBPFP.js';
6
11
  import '../chunk-DSYAC4WB.js';
12
+ import '../chunk-BC4G7OM6.js';
13
+ import '../chunk-RM677CNU.js';
14
+ import '../chunk-233SESC2.js';
15
+ export { DefaultOrchestrator } from '../chunk-33NO4PUJ.js';
16
+ export { executeBatch, processResults } from '../chunk-HAZ26F3P.js';
17
+ import '../chunk-FRKO3WX4.js';
18
+ export { WorkflowState } from '../chunk-CD4FUZOJ.js';
19
+ import '../chunk-4PELJWF7.js';
7
20
  import '../chunk-CYHZ2YVH.js';
8
- export { BuiltInNodeExecutor, ClassNodeExecutor, FunctionNodeExecutor } from '../chunk-M2FRTT2K.js';
9
- import '../chunk-KWQHFT7E.js';
10
- import '../chunk-5ZXV3R5D.js';
21
+ import '../chunk-WWGFIYKW.js';
22
+ import '../chunk-R3HQXIEL.js';
23
+ import '../chunk-BCRWXTWX.js';
11
24
  import '../chunk-PH2IYZHV.js';
12
- import '../chunk-U5V5O5MN.js';
13
- import '../chunk-HN72TZY5.js';
14
- import '../chunk-4PELJWF7.js';
25
+ import '../chunk-LNK7LZER.js';
15
26
  //# sourceMappingURL=index.js.map
16
27
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,12 @@
1
+ import { z as IEventBus, K as ExecutionContext, b as NodeExecutor } from '../types-ezHUBdpL.js';
2
+ import '../errors.js';
3
+ import '../container.js';
4
+
5
+ declare class NodeExecutorFactory {
6
+ private readonly eventBus;
7
+ constructor(eventBus: IEventBus);
8
+ createExecutorForNode(nodeId: string, context: ExecutionContext<any, any>): NodeExecutor<any, any>;
9
+ private getExecutionStrategy;
10
+ }
11
+
12
+ export { NodeExecutorFactory };
@@ -0,0 +1,6 @@
1
+ export { NodeExecutorFactory } from '../chunk-DL7KVYZF.js';
2
+ import '../chunk-ONH7PIJZ.js';
3
+ import '../chunk-BCRWXTWX.js';
4
+ import '../chunk-LNK7LZER.js';
5
+ //# sourceMappingURL=node-executor-factory.js.map
6
+ //# sourceMappingURL=node-executor-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"node-executor-factory.js"}
@@ -0,0 +1,9 @@
1
+ import { I as IOrchestrator, K as ExecutionContext, G as GraphTraverser, J as WorkflowResult } from '../types-ezHUBdpL.js';
2
+ import '../errors.js';
3
+ import '../container.js';
4
+
5
+ declare class DefaultOrchestrator implements IOrchestrator {
6
+ run(context: ExecutionContext<any, any>, traverser: GraphTraverser): Promise<WorkflowResult<any>>;
7
+ }
8
+
9
+ export { DefaultOrchestrator };
@@ -0,0 +1,8 @@
1
+ export { DefaultOrchestrator } from '../chunk-33NO4PUJ.js';
2
+ import '../chunk-HAZ26F3P.js';
3
+ import '../chunk-FRKO3WX4.js';
4
+ import '../chunk-CD4FUZOJ.js';
5
+ import '../chunk-R3HQXIEL.js';
6
+ import '../chunk-BCRWXTWX.js';
7
+ //# sourceMappingURL=orchestrator.js.map
8
+ //# sourceMappingURL=orchestrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"orchestrator.js"}
@@ -0,0 +1,16 @@
1
+ import { I as IOrchestrator, K as ExecutionContext, G as GraphTraverser, J as WorkflowResult } from '../../types-ezHUBdpL.js';
2
+ import '../../errors.js';
3
+ import '../../container.js';
4
+
5
+ /**
6
+ * An orchestrator that executes only one "tick" or "turn" of the workflow.
7
+ * It processes a single batch of ready nodes from the frontier and then returns,
8
+ * allowing the caller to inspect the intermediate state before proceeding.
9
+ *
10
+ * Useful for debugging, testing, or building interactive tools.
11
+ */
12
+ declare class StepByStepOrchestrator implements IOrchestrator {
13
+ run(context: ExecutionContext<any, any>, traverser: GraphTraverser): Promise<WorkflowResult<any>>;
14
+ }
15
+
16
+ export { StepByStepOrchestrator };
@@ -0,0 +1,5 @@
1
+ export { StepByStepOrchestrator } from '../../chunk-G53CSLBF.js';
2
+ import '../../chunk-HAZ26F3P.js';
3
+ import '../../chunk-BCRWXTWX.js';
4
+ //# sourceMappingURL=step-by-step.js.map
5
+ //# sourceMappingURL=step-by-step.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"step-by-step.js"}
@@ -0,0 +1,35 @@
1
+ import { g as WorkflowBlueprint, W as WorkflowState, N as NodeExecutionResult, G as GraphTraverser } from '../../types-ezHUBdpL.js';
2
+ import '../../errors.js';
3
+ import '../../container.js';
4
+
5
+ declare function executeBatch(readyNodes: Array<{
6
+ nodeId: string;
7
+ nodeDef: any;
8
+ }>, blueprint: WorkflowBlueprint, state: WorkflowState<any>, executorFactory: (nodeId: string) => any, runtime: any, maxConcurrency?: number): Promise<Array<{
9
+ status: 'fulfilled';
10
+ value: {
11
+ nodeId: string;
12
+ executionResult: NodeExecutionResult;
13
+ };
14
+ } | {
15
+ status: 'rejected';
16
+ reason: {
17
+ nodeId: string;
18
+ error: unknown;
19
+ };
20
+ }>>;
21
+ declare function processResults(settledResults: Array<{
22
+ status: 'fulfilled';
23
+ value: {
24
+ nodeId: string;
25
+ executionResult: NodeExecutionResult;
26
+ };
27
+ } | {
28
+ status: 'rejected';
29
+ reason: {
30
+ nodeId: string;
31
+ error: unknown;
32
+ };
33
+ }>, traverser: GraphTraverser, state: WorkflowState<any>, runtime: any, _blueprint: WorkflowBlueprint, executionId?: string): Promise<void>;
34
+
35
+ export { executeBatch, processResults };
@@ -0,0 +1,4 @@
1
+ export { executeBatch, processResults } from '../../chunk-HAZ26F3P.js';
2
+ import '../../chunk-BCRWXTWX.js';
3
+ //# sourceMappingURL=utils.js.map
4
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"utils.js"}
@@ -1,35 +1,3 @@
1
- import { d as NodeFunction, e as NodeClass, B as BaseNode, j as RuntimeOptions, W as WorkflowBlueprint, p as WorkflowResult, b as NodeResult, C as ContextImplementation, N as NodeDefinition, E as EdgeDefinition } from '../types-CQCe_nBM.js';
2
- import { WorkflowState } from './state.js';
3
- import { IRuntime } from './types.js';
4
-
5
- declare class FlowRuntime<TContext extends Record<string, any>, TDependencies extends Record<string, any>> implements IRuntime<TContext, TDependencies> {
6
- registry: Record<string, NodeFunction | NodeClass | typeof BaseNode>;
7
- private blueprints;
8
- private dependencies;
9
- private logger;
10
- private eventBus;
11
- private serializer;
12
- private middleware;
13
- private evaluator;
14
- private analysisCache;
15
- options: RuntimeOptions<TDependencies>;
16
- constructor(options: RuntimeOptions<TDependencies>);
17
- run(blueprint: WorkflowBlueprint, initialState?: Partial<TContext> | string, options?: {
18
- functionRegistry?: Map<string, any>;
19
- strict?: boolean;
20
- signal?: AbortSignal;
21
- concurrency?: number;
22
- }): Promise<WorkflowResult<TContext>>;
23
- executeNode(blueprint: WorkflowBlueprint, nodeId: string, state: WorkflowState<TContext>, allPredecessors?: Map<string, Set<string>>, functionRegistry?: Map<string, any>, executionId?: string, signal?: AbortSignal): Promise<NodeResult<any, any>>;
24
- private getExecutor;
25
- private executeWithFallback;
26
- determineNextNodes(blueprint: WorkflowBlueprint, nodeId: string, result: NodeResult<any, any>, context: ContextImplementation<TContext>): Promise<{
27
- node: NodeDefinition;
28
- edge: EdgeDefinition;
29
- }[]>;
30
- applyEdgeTransform(edge: EdgeDefinition, sourceResult: NodeResult<any, any>, targetNode: NodeDefinition, context: ContextImplementation<TContext>, allPredecessors?: Map<string, Set<string>>): Promise<void>;
31
- private _resolveNodeInput;
32
- protected _executeBuiltInNode(nodeDef: NodeDefinition, contextImpl: ContextImplementation<TContext>): Promise<NodeResult<any, any>>;
33
- }
34
-
35
- export { FlowRuntime };
1
+ import '../container.js';
2
+ export { c as FlowRuntime } from '../types-ezHUBdpL.js';
3
+ import '../errors.js';
@@ -1,14 +1,24 @@
1
- export { FlowRuntime } from '../chunk-3XVVR2SR.js';
2
- import '../chunk-CSZ6EOWG.js';
3
- import '../chunk-NBIRTKZ7.js';
1
+ export { FlowRuntime } from '../chunk-IB2BISIC.js';
2
+ import '../chunk-MCGK3FXQ.js';
3
+ import '../chunk-DL7KVYZF.js';
4
+ import '../chunk-ONH7PIJZ.js';
5
+ import '../chunk-5KKSQWSC.js';
6
+ import '../chunk-CD3Q4N6V.js';
7
+ import '../chunk-G5BGBPFP.js';
4
8
  import '../chunk-DSYAC4WB.js';
9
+ import '../chunk-BC4G7OM6.js';
10
+ import '../chunk-RM677CNU.js';
11
+ import '../chunk-233SESC2.js';
12
+ import '../chunk-33NO4PUJ.js';
13
+ import '../chunk-HAZ26F3P.js';
14
+ import '../chunk-FRKO3WX4.js';
15
+ import '../chunk-CD4FUZOJ.js';
16
+ import '../chunk-4PELJWF7.js';
5
17
  import '../chunk-CYHZ2YVH.js';
6
- import '../chunk-M2FRTT2K.js';
7
- import '../chunk-KWQHFT7E.js';
8
- import '../chunk-5ZXV3R5D.js';
18
+ import '../chunk-WWGFIYKW.js';
19
+ import '../chunk-R3HQXIEL.js';
20
+ import '../chunk-BCRWXTWX.js';
9
21
  import '../chunk-PH2IYZHV.js';
10
- import '../chunk-U5V5O5MN.js';
11
- import '../chunk-HN72TZY5.js';
12
- import '../chunk-4PELJWF7.js';
22
+ import '../chunk-LNK7LZER.js';
13
23
  //# sourceMappingURL=runtime.js.map
14
24
  //# sourceMappingURL=runtime.js.map
@@ -1,21 +1,3 @@
1
- import { C as ContextImplementation, o as WorkflowError, p as WorkflowResult, n as ISerializer } from '../types-CQCe_nBM.js';
2
-
3
- declare class WorkflowState<TContext extends Record<string, any>> {
4
- private _completedNodes;
5
- private errors;
6
- private anyFallbackExecuted;
7
- private context;
8
- constructor(initialData: Partial<TContext>);
9
- addCompletedNode(nodeId: string, output: any): void;
10
- addError(nodeId: string, error: Error): void;
11
- clearError(nodeId: string): void;
12
- markFallbackExecuted(): void;
13
- getContext(): ContextImplementation<TContext>;
14
- getCompletedNodes(): Set<string>;
15
- getErrors(): WorkflowError[];
16
- getAnyFallbackExecuted(): boolean;
17
- getStatus(allNodeIds: Set<string>, _fallbackNodeIds: Set<string>): WorkflowResult['status'];
18
- toResult(serializer: ISerializer): WorkflowResult<TContext>;
19
- }
20
-
21
- export { WorkflowState };
1
+ export { W as WorkflowState } from '../types-ezHUBdpL.js';
2
+ import '../errors.js';
3
+ import '../container.js';
@@ -1,4 +1,5 @@
1
- export { WorkflowState } from '../chunk-CSZ6EOWG.js';
2
- import '../chunk-KWQHFT7E.js';
1
+ export { WorkflowState } from '../chunk-CD4FUZOJ.js';
2
+ import '../chunk-R3HQXIEL.js';
3
+ import '../chunk-BCRWXTWX.js';
3
4
  //# sourceMappingURL=state.js.map
4
5
  //# sourceMappingURL=state.js.map
@@ -1,26 +1,3 @@
1
- import { W as WorkflowBlueprint } from '../types-CQCe_nBM.js';
2
- import { WorkflowState } from './state.js';
3
- import { IRuntime } from './types.js';
4
-
5
- declare class GraphTraverser<TContext extends Record<string, any>, TDependencies extends Record<string, any>> {
6
- private runtime;
7
- private state;
8
- private functionRegistry;
9
- private executionId;
10
- private signal?;
11
- private concurrency?;
12
- private frontier;
13
- private allPredecessors;
14
- private dynamicBlueprint;
15
- constructor(blueprint: WorkflowBlueprint, runtime: IRuntime<TContext, TDependencies>, state: WorkflowState<TContext>, functionRegistry: Map<string, any> | undefined, executionId: string, signal?: AbortSignal | undefined, concurrency?: number | undefined);
16
- private isFallbackNode;
17
- private getEffectiveJoinStrategy;
18
- traverse(): Promise<void>;
19
- private executeWithConcurrency;
20
- private handleDynamicNodes;
21
- getAllNodeIds(): Set<string>;
22
- getFallbackNodeIds(): Set<string>;
23
- getDynamicBlueprint(): WorkflowBlueprint;
24
- }
25
-
26
- export { GraphTraverser };
1
+ export { G as GraphTraverser, R as ReadyNode } from '../types-ezHUBdpL.js';
2
+ import '../errors.js';
3
+ import '../container.js';
@@ -1,5 +1,4 @@
1
- export { GraphTraverser } from '../chunk-NBIRTKZ7.js';
2
- import '../chunk-5ZXV3R5D.js';
3
- import '../chunk-HN72TZY5.js';
1
+ export { GraphTraverser } from '../chunk-G5BGBPFP.js';
2
+ import '../chunk-233SESC2.js';
4
3
  //# sourceMappingURL=traverser.js.map
5
4
  //# sourceMappingURL=traverser.js.map
@@ -1,16 +1,3 @@
1
- import { R as RuntimeDependencies, j as RuntimeOptions, W as WorkflowBlueprint, b as NodeResult, C as ContextImplementation, N as NodeDefinition, E as EdgeDefinition } from '../types-CQCe_nBM.js';
2
- import { WorkflowState } from './state.js';
3
-
4
- /** Interface for the core runtime operations used by the traverser. */
5
- interface IRuntime<TContext extends Record<string, any> = Record<string, any>, TDependencies extends RuntimeDependencies = RuntimeDependencies> {
6
- options: RuntimeOptions<TDependencies>;
7
- registry: Record<string, any>;
8
- executeNode: (blueprint: WorkflowBlueprint, nodeId: string, state: WorkflowState<TContext>, allPredecessors?: Map<string, Set<string>>, functionRegistry?: Map<string, any>, executionId?: string, signal?: AbortSignal) => Promise<NodeResult>;
9
- determineNextNodes: (blueprint: WorkflowBlueprint, nodeId: string, result: NodeResult, context: ContextImplementation<TContext>) => Promise<{
10
- node: NodeDefinition;
11
- edge: EdgeDefinition;
12
- }[]>;
13
- applyEdgeTransform: (edge: EdgeDefinition, sourceResult: NodeResult, targetNode: NodeDefinition, context: ContextImplementation<TContext>, allPredecessors?: Map<string, Set<string>>) => Promise<void>;
14
- }
15
-
16
- export type { IRuntime };
1
+ export { e as ExecutionServices, I as IOrchestrator, f as IRuntime, N as NodeExecutionResult, b as NodeExecutor, d as NodeExecutorFactory } from '../types-ezHUBdpL.js';
2
+ import '../errors.js';
3
+ import '../container.js';