flowcraft 2.8.0 → 2.9.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.
- package/README.md +1 -1
- package/dist/index-B7cJxomy.d.mts +1291 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +747 -0
- package/dist/index.mjs.map +1 -0
- package/dist/replay-BB11M6K1.mjs +107 -0
- package/dist/replay-BB11M6K1.mjs.map +1 -0
- package/dist/runtime-Bob_ca8M.mjs +2215 -0
- package/dist/runtime-Bob_ca8M.mjs.map +1 -0
- package/dist/{sdk.d.ts → sdk.d.mts} +14 -12
- package/dist/sdk.mjs +29 -0
- package/dist/sdk.mjs.map +1 -0
- package/dist/testing/index.d.mts +172 -0
- package/dist/testing/index.mjs +277 -0
- package/dist/testing/index.mjs.map +1 -0
- package/package.json +13 -13
- package/dist/adapters/index.d.ts +0 -4
- package/dist/adapters/index.js +0 -4
- package/dist/adapters/index.js.map +0 -1
- package/dist/adapters/persistent-event-bus.d.ts +0 -69
- package/dist/adapters/persistent-event-bus.js +0 -3
- package/dist/adapters/persistent-event-bus.js.map +0 -1
- package/dist/analysis.d.ts +0 -53
- package/dist/analysis.js +0 -3
- package/dist/analysis.js.map +0 -1
- package/dist/chunk-26VTGQAF.js +0 -103
- package/dist/chunk-26VTGQAF.js.map +0 -1
- package/dist/chunk-27STBUGG.js +0 -44
- package/dist/chunk-27STBUGG.js.map +0 -1
- package/dist/chunk-2TSADFQX.js +0 -46
- package/dist/chunk-2TSADFQX.js.map +0 -1
- package/dist/chunk-3Y5O5EGB.js +0 -3
- package/dist/chunk-3Y5O5EGB.js.map +0 -1
- package/dist/chunk-4JUPOFSL.js +0 -76
- package/dist/chunk-4JUPOFSL.js.map +0 -1
- package/dist/chunk-4PELJWF7.js +0 -29
- package/dist/chunk-4PELJWF7.js.map +0 -1
- package/dist/chunk-55J6XMHW.js +0 -3
- package/dist/chunk-55J6XMHW.js.map +0 -1
- package/dist/chunk-5A24LVGQ.js +0 -90
- package/dist/chunk-5A24LVGQ.js.map +0 -1
- package/dist/chunk-6RKHCJUU.js +0 -29
- package/dist/chunk-6RKHCJUU.js.map +0 -1
- package/dist/chunk-7EBKWATZ.js +0 -86
- package/dist/chunk-7EBKWATZ.js.map +0 -1
- package/dist/chunk-BC4G7OM6.js +0 -42
- package/dist/chunk-BC4G7OM6.js.map +0 -1
- package/dist/chunk-BCRWXTWX.js +0 -21
- package/dist/chunk-BCRWXTWX.js.map +0 -1
- package/dist/chunk-BV6MXL74.js +0 -340
- package/dist/chunk-BV6MXL74.js.map +0 -1
- package/dist/chunk-CIXL7AKH.js +0 -532
- package/dist/chunk-CIXL7AKH.js.map +0 -1
- package/dist/chunk-DL7KVYZF.js +0 -39
- package/dist/chunk-DL7KVYZF.js.map +0 -1
- package/dist/chunk-E6ICIXVR.js +0 -25
- package/dist/chunk-E6ICIXVR.js.map +0 -1
- package/dist/chunk-HFJXYY4E.js +0 -3
- package/dist/chunk-HFJXYY4E.js.map +0 -1
- package/dist/chunk-HNHM3FDK.js +0 -52
- package/dist/chunk-HNHM3FDK.js.map +0 -1
- package/dist/chunk-I53JB2KW.js +0 -26
- package/dist/chunk-I53JB2KW.js.map +0 -1
- package/dist/chunk-IDTYHLDQ.js +0 -16
- package/dist/chunk-IDTYHLDQ.js.map +0 -1
- package/dist/chunk-IKOTX22J.js +0 -85
- package/dist/chunk-IKOTX22J.js.map +0 -1
- package/dist/chunk-K446NZ4E.js +0 -25
- package/dist/chunk-K446NZ4E.js.map +0 -1
- package/dist/chunk-L3MX5MTA.js +0 -33
- package/dist/chunk-L3MX5MTA.js.map +0 -1
- package/dist/chunk-L46TQXCV.js +0 -144
- package/dist/chunk-L46TQXCV.js.map +0 -1
- package/dist/chunk-LM4ACVHL.js +0 -73
- package/dist/chunk-LM4ACVHL.js.map +0 -1
- package/dist/chunk-LNK7LZER.js +0 -51
- package/dist/chunk-LNK7LZER.js.map +0 -1
- package/dist/chunk-NVLZFLYM.js +0 -3
- package/dist/chunk-NVLZFLYM.js.map +0 -1
- package/dist/chunk-ONH7PIJZ.js +0 -300
- package/dist/chunk-ONH7PIJZ.js.map +0 -1
- package/dist/chunk-OOJEXFYY.js +0 -47
- package/dist/chunk-OOJEXFYY.js.map +0 -1
- package/dist/chunk-PH2IYZHV.js +0 -48
- package/dist/chunk-PH2IYZHV.js.map +0 -1
- package/dist/chunk-PU2VTWJD.js +0 -164
- package/dist/chunk-PU2VTWJD.js.map +0 -1
- package/dist/chunk-QA2WDZPV.js +0 -74
- package/dist/chunk-QA2WDZPV.js.map +0 -1
- package/dist/chunk-RM677CNU.js +0 -52
- package/dist/chunk-RM677CNU.js.map +0 -1
- package/dist/chunk-TKSSRS5U.js +0 -39
- package/dist/chunk-TKSSRS5U.js.map +0 -1
- package/dist/chunk-UNORA7EM.js +0 -103
- package/dist/chunk-UNORA7EM.js.map +0 -1
- package/dist/chunk-VZ4BRDBK.js +0 -54
- package/dist/chunk-VZ4BRDBK.js.map +0 -1
- package/dist/chunk-X5RJOZY2.js +0 -279
- package/dist/chunk-X5RJOZY2.js.map +0 -1
- package/dist/chunk-ZETQCNEF.js +0 -139
- package/dist/chunk-ZETQCNEF.js.map +0 -1
- package/dist/chunk-ZKINHLMS.js +0 -230
- package/dist/chunk-ZKINHLMS.js.map +0 -1
- package/dist/chunk-ZLW4QOTS.js +0 -192
- package/dist/chunk-ZLW4QOTS.js.map +0 -1
- package/dist/container-factory.d.ts +0 -17
- package/dist/container-factory.js +0 -13
- package/dist/container-factory.js.map +0 -1
- package/dist/container.d.ts +0 -23
- package/dist/container.js +0 -3
- package/dist/container.js.map +0 -1
- package/dist/context.d.ts +0 -65
- package/dist/context.js +0 -3
- package/dist/context.js.map +0 -1
- package/dist/error-mapper.d.ts +0 -15
- package/dist/error-mapper.js +0 -4
- package/dist/error-mapper.js.map +0 -1
- package/dist/errors.d.ts +0 -20
- package/dist/errors.js +0 -3
- package/dist/errors.js.map +0 -1
- package/dist/evaluator.d.ts +0 -32
- package/dist/evaluator.js +0 -3
- package/dist/evaluator.js.map +0 -1
- package/dist/flow.d.ts +0 -83
- package/dist/flow.js +0 -4
- package/dist/flow.js.map +0 -1
- package/dist/index.d.ts +0 -18
- package/dist/index.js +0 -38
- package/dist/index.js.map +0 -1
- package/dist/linter.d.ts +0 -26
- package/dist/linter.js +0 -4
- package/dist/linter.js.map +0 -1
- package/dist/logger.d.ts +0 -20
- package/dist/logger.js +0 -3
- package/dist/logger.js.map +0 -1
- package/dist/node.d.ts +0 -3
- package/dist/node.js +0 -3
- package/dist/node.js.map +0 -1
- package/dist/nodes/batch-gather.d.ts +0 -9
- package/dist/nodes/batch-gather.js +0 -4
- package/dist/nodes/batch-gather.js.map +0 -1
- package/dist/nodes/batch-scatter.d.ts +0 -9
- package/dist/nodes/batch-scatter.js +0 -4
- package/dist/nodes/batch-scatter.js.map +0 -1
- package/dist/nodes/sleep.d.ts +0 -9
- package/dist/nodes/sleep.js +0 -4
- package/dist/nodes/sleep.js.map +0 -1
- package/dist/nodes/subflow.d.ts +0 -9
- package/dist/nodes/subflow.js +0 -10
- package/dist/nodes/subflow.js.map +0 -1
- package/dist/nodes/wait.d.ts +0 -9
- package/dist/nodes/wait.js +0 -4
- package/dist/nodes/wait.js.map +0 -1
- package/dist/nodes/webhook.d.ts +0 -13
- package/dist/nodes/webhook.js +0 -4
- package/dist/nodes/webhook.js.map +0 -1
- package/dist/runtime/adapter.d.ts +0 -114
- package/dist/runtime/adapter.js +0 -28
- package/dist/runtime/adapter.js.map +0 -1
- package/dist/runtime/builtin-keys.d.ts +0 -38
- package/dist/runtime/builtin-keys.js +0 -10
- package/dist/runtime/builtin-keys.js.map +0 -1
- package/dist/runtime/execution-context.d.ts +0 -3
- package/dist/runtime/execution-context.js +0 -6
- package/dist/runtime/execution-context.js.map +0 -1
- package/dist/runtime/executors.d.ts +0 -3
- package/dist/runtime/executors.js +0 -4
- package/dist/runtime/executors.js.map +0 -1
- package/dist/runtime/index.d.ts +0 -7
- package/dist/runtime/index.js +0 -31
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/node-executor-factory.d.ts +0 -12
- package/dist/runtime/node-executor-factory.js +0 -6
- package/dist/runtime/node-executor-factory.js.map +0 -1
- package/dist/runtime/orchestrator.d.ts +0 -9
- package/dist/runtime/orchestrator.js +0 -8
- package/dist/runtime/orchestrator.js.map +0 -1
- package/dist/runtime/orchestrators/replay.d.ts +0 -45
- package/dist/runtime/orchestrators/replay.js +0 -3
- package/dist/runtime/orchestrators/replay.js.map +0 -1
- package/dist/runtime/orchestrators/step-by-step.d.ts +0 -16
- package/dist/runtime/orchestrators/step-by-step.js +0 -5
- package/dist/runtime/orchestrators/step-by-step.js.map +0 -1
- package/dist/runtime/orchestrators/utils.d.ts +0 -35
- package/dist/runtime/orchestrators/utils.js +0 -4
- package/dist/runtime/orchestrators/utils.js.map +0 -1
- package/dist/runtime/runtime.d.ts +0 -3
- package/dist/runtime/runtime.js +0 -27
- package/dist/runtime/runtime.js.map +0 -1
- package/dist/runtime/scheduler.d.ts +0 -3
- package/dist/runtime/scheduler.js +0 -3
- package/dist/runtime/scheduler.js.map +0 -1
- package/dist/runtime/state.d.ts +0 -3
- package/dist/runtime/state.js +0 -5
- package/dist/runtime/state.js.map +0 -1
- package/dist/runtime/traverser.d.ts +0 -3
- package/dist/runtime/traverser.js +0 -5
- package/dist/runtime/traverser.js.map +0 -1
- package/dist/runtime/types.d.ts +0 -3
- package/dist/runtime/types.js +0 -3
- package/dist/runtime/types.js.map +0 -1
- package/dist/runtime/workflow-logic-handler.d.ts +0 -17
- package/dist/runtime/workflow-logic-handler.js +0 -5
- package/dist/runtime/workflow-logic-handler.js.map +0 -1
- package/dist/sanitizer.d.ts +0 -12
- package/dist/sanitizer.js +0 -3
- package/dist/sanitizer.js.map +0 -1
- package/dist/sdk.js +0 -20
- package/dist/sdk.js.map +0 -1
- package/dist/serializer.d.ts +0 -18
- package/dist/serializer.js +0 -3
- package/dist/serializer.js.map +0 -1
- package/dist/testing/event-logger.d.ts +0 -63
- package/dist/testing/event-logger.js +0 -3
- package/dist/testing/event-logger.js.map +0 -1
- package/dist/testing/index.d.ts +0 -7
- package/dist/testing/index.js +0 -37
- package/dist/testing/index.js.map +0 -1
- package/dist/testing/run-with-trace.d.ts +0 -38
- package/dist/testing/run-with-trace.js +0 -33
- package/dist/testing/run-with-trace.js.map +0 -1
- package/dist/testing/stepper.d.ts +0 -79
- package/dist/testing/stepper.js +0 -11
- package/dist/testing/stepper.js.map +0 -1
- package/dist/types-Biip2gLh.d.ts +0 -676
- package/dist/types.d.ts +0 -3
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"execution-context.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"executors.js"}
|
package/dist/runtime/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { AdapterOptions, BaseDistributedAdapter, ICoordinationStore, JobPayload } from './adapter.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-Biip2gLh.js';
|
|
3
|
-
export { DefaultOrchestrator } from './orchestrator.js';
|
|
4
|
-
export { ReplayOrchestrator } from './orchestrators/replay.js';
|
|
5
|
-
export { executeBatch, processResults } from './orchestrators/utils.js';
|
|
6
|
-
import '../errors.js';
|
|
7
|
-
import '../container.js';
|
package/dist/runtime/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import '../chunk-HFJXYY4E.js';
|
|
2
|
-
export { ReplayOrchestrator } from '../chunk-UNORA7EM.js';
|
|
3
|
-
import '../chunk-NVLZFLYM.js';
|
|
4
|
-
export { BaseDistributedAdapter } from '../chunk-BV6MXL74.js';
|
|
5
|
-
export { FlowRuntime } from '../chunk-CIXL7AKH.js';
|
|
6
|
-
import '../chunk-PU2VTWJD.js';
|
|
7
|
-
import '../chunk-DL7KVYZF.js';
|
|
8
|
-
import '../chunk-LM4ACVHL.js';
|
|
9
|
-
export { ClassNodeExecutor, FunctionNodeExecutor, NodeExecutor } from '../chunk-ONH7PIJZ.js';
|
|
10
|
-
import '../chunk-BC4G7OM6.js';
|
|
11
|
-
import '../chunk-RM677CNU.js';
|
|
12
|
-
import '../chunk-HNHM3FDK.js';
|
|
13
|
-
import '../chunk-5A24LVGQ.js';
|
|
14
|
-
export { GraphTraverser } from '../chunk-ZKINHLMS.js';
|
|
15
|
-
import '../chunk-IDTYHLDQ.js';
|
|
16
|
-
import '../chunk-I53JB2KW.js';
|
|
17
|
-
import '../chunk-TKSSRS5U.js';
|
|
18
|
-
import '../chunk-ZLW4QOTS.js';
|
|
19
|
-
export { DefaultOrchestrator } from '../chunk-QA2WDZPV.js';
|
|
20
|
-
export { executeBatch, processResults } from '../chunk-26VTGQAF.js';
|
|
21
|
-
import '../chunk-L3MX5MTA.js';
|
|
22
|
-
export { WorkflowState } from '../chunk-L46TQXCV.js';
|
|
23
|
-
import '../chunk-4PELJWF7.js';
|
|
24
|
-
import '../chunk-6RKHCJUU.js';
|
|
25
|
-
import '../chunk-OOJEXFYY.js';
|
|
26
|
-
import '../chunk-ZETQCNEF.js';
|
|
27
|
-
import '../chunk-BCRWXTWX.js';
|
|
28
|
-
import '../chunk-PH2IYZHV.js';
|
|
29
|
-
import '../chunk-LNK7LZER.js';
|
|
30
|
-
//# sourceMappingURL=index.js.map
|
|
31
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { A as IEventBus, L as ExecutionContext, b as NodeExecutor } from '../types-Biip2gLh.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 };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"node-executor-factory.js"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { I as IOrchestrator, L as ExecutionContext, G as GraphTraverser, K as WorkflowResult } from '../types-Biip2gLh.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 };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { DefaultOrchestrator } from '../chunk-QA2WDZPV.js';
|
|
2
|
-
import '../chunk-26VTGQAF.js';
|
|
3
|
-
import '../chunk-L3MX5MTA.js';
|
|
4
|
-
import '../chunk-L46TQXCV.js';
|
|
5
|
-
import '../chunk-ZETQCNEF.js';
|
|
6
|
-
import '../chunk-BCRWXTWX.js';
|
|
7
|
-
//# sourceMappingURL=orchestrator.js.map
|
|
8
|
-
//# sourceMappingURL=orchestrator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"orchestrator.js"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { I as IOrchestrator, z as FlowcraftEvent, L as ExecutionContext, G as GraphTraverser, K as WorkflowResult } from '../../types-Biip2gLh.js';
|
|
2
|
-
import '../../errors.js';
|
|
3
|
-
import '../../container.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* An orchestrator that replays a pre-recorded sequence of workflow events
|
|
7
|
-
* to reconstruct the workflow state without executing any node logic.
|
|
8
|
-
*
|
|
9
|
-
* This enables time-travel debugging by allowing developers to inspect
|
|
10
|
-
* the exact state of a workflow at any point in its execution history.
|
|
11
|
-
*/
|
|
12
|
-
declare class ReplayOrchestrator implements IOrchestrator {
|
|
13
|
-
private events;
|
|
14
|
-
/**
|
|
15
|
-
* Creates a new ReplayOrchestrator with a sequence of recorded workflow events.
|
|
16
|
-
*
|
|
17
|
-
* @param events - Array of FlowcraftEvent objects representing the recorded workflow execution
|
|
18
|
-
*/
|
|
19
|
-
constructor(events: FlowcraftEvent[]);
|
|
20
|
-
/**
|
|
21
|
-
* Replays the recorded workflow events to reconstruct the workflow state.
|
|
22
|
-
*
|
|
23
|
-
* This method filters events for the specific execution, applies each event in sequence
|
|
24
|
-
* to rebuild the context state, and returns the final reconstructed workflow result.
|
|
25
|
-
* Replayed executions always have a "completed" status since they reconstruct the final state.
|
|
26
|
-
*
|
|
27
|
-
* @param context - The execution context containing state and services
|
|
28
|
-
* @param _traverser - Graph traverser (unused in replay mode)
|
|
29
|
-
* @returns Promise resolving to the reconstructed workflow result
|
|
30
|
-
*/
|
|
31
|
-
run(context: ExecutionContext<any, any>, _traverser: GraphTraverser): Promise<WorkflowResult<any>>;
|
|
32
|
-
/**
|
|
33
|
-
* Applies a single workflow event to reconstruct the execution state.
|
|
34
|
-
*
|
|
35
|
-
* This method handles different event types by updating the workflow state accordingly,
|
|
36
|
-
* including node completions, context changes, errors, fallbacks, and workflow control events.
|
|
37
|
-
*
|
|
38
|
-
* @param event - The workflow event to apply
|
|
39
|
-
* @param context - The execution context to update
|
|
40
|
-
* @param fallbackMap - Map tracking fallback node relationships (fallbackNodeId -> originalNodeId)
|
|
41
|
-
*/
|
|
42
|
-
private applyEvent;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export { ReplayOrchestrator };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"replay.js"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { I as IOrchestrator, L as ExecutionContext, G as GraphTraverser, K as WorkflowResult } from '../../types-Biip2gLh.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 };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"step-by-step.js"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { h as WorkflowBlueprint, W as WorkflowState, N as NodeExecutionResult, G as GraphTraverser } from '../../types-Biip2gLh.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 };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"utils.js"}
|
package/dist/runtime/runtime.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export { FlowRuntime } from '../chunk-CIXL7AKH.js';
|
|
2
|
-
import '../chunk-PU2VTWJD.js';
|
|
3
|
-
import '../chunk-DL7KVYZF.js';
|
|
4
|
-
import '../chunk-LM4ACVHL.js';
|
|
5
|
-
import '../chunk-ONH7PIJZ.js';
|
|
6
|
-
import '../chunk-BC4G7OM6.js';
|
|
7
|
-
import '../chunk-RM677CNU.js';
|
|
8
|
-
import '../chunk-HNHM3FDK.js';
|
|
9
|
-
import '../chunk-5A24LVGQ.js';
|
|
10
|
-
import '../chunk-ZKINHLMS.js';
|
|
11
|
-
import '../chunk-IDTYHLDQ.js';
|
|
12
|
-
import '../chunk-I53JB2KW.js';
|
|
13
|
-
import '../chunk-TKSSRS5U.js';
|
|
14
|
-
import '../chunk-ZLW4QOTS.js';
|
|
15
|
-
import '../chunk-QA2WDZPV.js';
|
|
16
|
-
import '../chunk-26VTGQAF.js';
|
|
17
|
-
import '../chunk-L3MX5MTA.js';
|
|
18
|
-
import '../chunk-L46TQXCV.js';
|
|
19
|
-
import '../chunk-4PELJWF7.js';
|
|
20
|
-
import '../chunk-6RKHCJUU.js';
|
|
21
|
-
import '../chunk-OOJEXFYY.js';
|
|
22
|
-
import '../chunk-ZETQCNEF.js';
|
|
23
|
-
import '../chunk-BCRWXTWX.js';
|
|
24
|
-
import '../chunk-PH2IYZHV.js';
|
|
25
|
-
import '../chunk-LNK7LZER.js';
|
|
26
|
-
//# sourceMappingURL=runtime.js.map
|
|
27
|
-
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"runtime.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"scheduler.js"}
|
package/dist/runtime/state.d.ts
DELETED
package/dist/runtime/state.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"state.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"traverser.js"}
|
package/dist/runtime/types.d.ts
DELETED
package/dist/runtime/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { x as IEvaluator, A as IEventBus, h as WorkflowBlueprint, m as NodeResult, s as ContextImplementation, j as NodeDefinition, k as EdgeDefinition } from '../types-Biip2gLh.js';
|
|
2
|
-
import '../errors.js';
|
|
3
|
-
import '../container.js';
|
|
4
|
-
|
|
5
|
-
declare class WorkflowLogicHandler {
|
|
6
|
-
private readonly evaluator;
|
|
7
|
-
private readonly eventBus;
|
|
8
|
-
constructor(evaluator: IEvaluator, eventBus: IEventBus);
|
|
9
|
-
determineNextNodes(blueprint: WorkflowBlueprint, completedNodeId: string, result: NodeResult<any, any>, context: ContextImplementation<any>, executionId?: string): Promise<{
|
|
10
|
-
node: NodeDefinition;
|
|
11
|
-
edge: EdgeDefinition;
|
|
12
|
-
}[]>;
|
|
13
|
-
applyEdgeTransform(edge: EdgeDefinition, sourceResult: NodeResult<any, any>, targetNode: NodeDefinition, context: ContextImplementation<any>, allPredecessors?: Map<string, Set<string>>, executionId?: string): Promise<void>;
|
|
14
|
-
resolveNodeInput(nodeId: string, blueprint: WorkflowBlueprint, context: ContextImplementation<any>): Promise<any>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { WorkflowLogicHandler };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"workflow-logic-handler.js"}
|
package/dist/sanitizer.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { h as WorkflowBlueprint } from './types-Biip2gLh.js';
|
|
2
|
-
import './errors.js';
|
|
3
|
-
import './container.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Sanitizes a raw workflow blueprint by removing extra properties
|
|
7
|
-
* added by UI tools (e.g., position, style) and keeping only the
|
|
8
|
-
* properties defined in NodeDefinition and EdgeDefinition.
|
|
9
|
-
*/
|
|
10
|
-
declare function sanitizeBlueprint(raw: any): WorkflowBlueprint;
|
|
11
|
-
|
|
12
|
-
export { sanitizeBlueprint };
|
package/dist/sanitizer.js
DELETED
package/dist/sanitizer.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"sanitizer.js"}
|
package/dist/sdk.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// src/sdk.ts
|
|
2
|
-
function sleep(_duration) {
|
|
3
|
-
console.warn(`'sleep' should only be used inside a compiled @flow function.`);
|
|
4
|
-
return new Promise(() => {
|
|
5
|
-
});
|
|
6
|
-
}
|
|
7
|
-
function waitForEvent(_eventName) {
|
|
8
|
-
console.warn(`'waitForEvent' should only be used inside a compiled @flow function.`);
|
|
9
|
-
return new Promise(() => {
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
function createWebhook() {
|
|
13
|
-
console.warn(`'createWebhook' should only be used inside a compiled @flow function.`);
|
|
14
|
-
return new Promise(() => {
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { createWebhook, sleep, waitForEvent };
|
|
19
|
-
//# sourceMappingURL=sdk.js.map
|
|
20
|
-
//# sourceMappingURL=sdk.js.map
|
package/dist/sdk.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/sdk.ts"],"names":[],"mappings":";AAiBO,SAAS,MAAM,SAAA,EAA2C;AAChE,EAAA,OAAA,CAAQ,KAAK,CAAA,6DAAA,CAA+D,CAAA;AAC5E,EAAA,OAAO,IAAI,QAAQ,MAAM;AAAA,EAAC,CAAC,CAAA;AAC5B;AAMO,SAAS,aAAsB,UAAA,EAAgC;AACrE,EAAA,OAAA,CAAQ,KAAK,CAAA,oEAAA,CAAsE,CAAA;AACnF,EAAA,OAAO,IAAI,QAAQ,MAAM;AAAA,EAAC,CAAC,CAAA;AAC5B;AAMO,SAAS,aAAA,GAA8C;AAC7D,EAAA,OAAA,CAAQ,KAAK,CAAA,qEAAA,CAAuE,CAAA;AACpF,EAAA,OAAO,IAAI,QAAQ,MAAM;AAAA,EAAC,CAAC,CAAA;AAC5B","file":"sdk.js","sourcesContent":["export interface Webhook<T = any> {\n\t/** The unique public URL to which the external system should send its POST request. */\n\turl: string\n\t/** A unique event name which can be used to trigger the webhook */\n\tevent: string\n\t/** A promise-like object that resolves with the webhook's request details when it is invoked. */\n\trequest: Promise<{\n\t\tjson: () => Promise<T>\n\t\ttext: () => Promise<string>\n\t\theaders: Record<string, string>\n\t}>\n}\n\n/**\n * Pauses workflow execution for a specified duration.\n * Must be used with `await` inside a compiled `@flow` function.\n */\nexport function sleep(_duration: number | string): Promise<void> {\n\tconsole.warn(`'sleep' should only be used inside a compiled @flow function.`)\n\treturn new Promise(() => {}) // intentionally never resolves\n}\n\n/**\n * Pauses a workflow until an external event is received.\n * Must be used with `await` inside a compiled `@flow` function.\n */\nexport function waitForEvent<T = any>(_eventName: string): Promise<T> {\n\tconsole.warn(`'waitForEvent' should only be used inside a compiled @flow function.`)\n\treturn new Promise(() => {}) // intentionally never resolves\n}\n\n/**\n * Creates a durable, single-use webhook endpoint.\n * Must be used with `await` inside a compiled `@flow` function.\n */\nexport function createWebhook<T = any>(): Promise<Webhook<T>> {\n\tconsole.warn(`'createWebhook' should only be used inside a compiled @flow function.`)\n\treturn new Promise(() => {}) // intentionally never resolves\n}\n"]}
|
package/dist/serializer.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { D as ISerializer } from './types-Biip2gLh.js';
|
|
2
|
-
import './errors.js';
|
|
3
|
-
import './container.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* A default serializer using standard JSON.
|
|
7
|
-
*
|
|
8
|
-
* @warning This implementation is lossy and does not handle complex data types
|
|
9
|
-
* like `Date`, `Map`, `Set`, `undefined`, etc. It is recommended to provide a robust
|
|
10
|
-
* serializer like `superjson` if working with complex data types.
|
|
11
|
-
*/
|
|
12
|
-
declare class JsonSerializer implements ISerializer {
|
|
13
|
-
private hasWarned;
|
|
14
|
-
serialize(data: Record<string, any>): string;
|
|
15
|
-
deserialize(text: string): Record<string, any>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { JsonSerializer };
|
package/dist/serializer.js
DELETED
package/dist/serializer.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"serializer.js"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { A as IEventBus, z as FlowcraftEvent } from '../types-Biip2gLh.js';
|
|
2
|
-
import '../errors.js';
|
|
3
|
-
import '../container.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* A test utility that implements IEventBus to capture all workflow events
|
|
7
|
-
* in memory, acting as a "flight recorder" for behavioral testing.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* // In your test file (e.g., resiliency.test.ts)
|
|
11
|
-
* it('should retry a node on failure', async () => {
|
|
12
|
-
* const eventLogger = new InMemoryEventLogger();
|
|
13
|
-
* const runtime = new FlowRuntime({ eventBus: eventLogger });
|
|
14
|
-
*
|
|
15
|
-
* const flow = createFlow('retry-flow')
|
|
16
|
-
* .node('api-call', vi.fn().mockRejectedValueOnce(new Error('fail')), {
|
|
17
|
-
* config: { maxRetries: 2 },
|
|
18
|
-
* });
|
|
19
|
-
*
|
|
20
|
-
* await runtime.run(flow.toBlueprint());
|
|
21
|
-
*
|
|
22
|
-
* // Assert against the captured event history to prove behavior.
|
|
23
|
-
* const retryEvents = eventLogger.filter('node:retry');
|
|
24
|
-
* expect(retryEvents).toHaveLength(1); // The first attempt is not a "retry"
|
|
25
|
-
* });
|
|
26
|
-
*/
|
|
27
|
-
declare class InMemoryEventLogger implements IEventBus {
|
|
28
|
-
readonly events: FlowcraftEvent[];
|
|
29
|
-
/**
|
|
30
|
-
* Clears all captured events.
|
|
31
|
-
*/
|
|
32
|
-
clear(): void;
|
|
33
|
-
/**
|
|
34
|
-
* The `emit` method required by the IEventBus interface.
|
|
35
|
-
* It simply pushes the received event into the internal events array.
|
|
36
|
-
* @param event The FlowcraftEvent to record.
|
|
37
|
-
*/
|
|
38
|
-
emit(event: FlowcraftEvent): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* Finds the first event of a specific type.
|
|
41
|
-
* @param type The event type to find (e.g., 'node:error').
|
|
42
|
-
* @returns The first matching event, or undefined if not found.
|
|
43
|
-
*/
|
|
44
|
-
find<T extends FlowcraftEvent['type']>(type: T): Extract<FlowcraftEvent, {
|
|
45
|
-
type: T;
|
|
46
|
-
}> | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* Filters events to find all occurrences of a specific type.
|
|
49
|
-
* @param type The event type to filter by.
|
|
50
|
-
* @returns An array of matching events.
|
|
51
|
-
*/
|
|
52
|
-
filter<T extends FlowcraftEvent['type']>(type: T): Extract<FlowcraftEvent, {
|
|
53
|
-
type: T;
|
|
54
|
-
}>[];
|
|
55
|
-
/**
|
|
56
|
-
* Prints a formatted log of all captured events to the console.
|
|
57
|
-
* Ideal for debugging failing tests.
|
|
58
|
-
* @param title A title for the log output.
|
|
59
|
-
*/
|
|
60
|
-
printLog(title?: string): void;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export { InMemoryEventLogger };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"event-logger.js"}
|
package/dist/testing/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { IEventStore, InMemoryEventStore, PersistentEventBusAdapter } from '../adapters/persistent-event-bus.js';
|
|
2
|
-
export { InMemoryEventLogger } from './event-logger.js';
|
|
3
|
-
export { runWithTrace } from './run-with-trace.js';
|
|
4
|
-
export { IWorkflowStepper, createStepper } from './stepper.js';
|
|
5
|
-
import '../types-Biip2gLh.js';
|
|
6
|
-
import '../errors.js';
|
|
7
|
-
import '../container.js';
|
package/dist/testing/index.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export { runWithTrace } from '../chunk-K446NZ4E.js';
|
|
2
|
-
export { InMemoryEventLogger } from '../chunk-7EBKWATZ.js';
|
|
3
|
-
export { createStepper } from '../chunk-4JUPOFSL.js';
|
|
4
|
-
import '../chunk-VZ4BRDBK.js';
|
|
5
|
-
import '../chunk-HFJXYY4E.js';
|
|
6
|
-
import '../chunk-UNORA7EM.js';
|
|
7
|
-
import '../chunk-NVLZFLYM.js';
|
|
8
|
-
import '../chunk-BV6MXL74.js';
|
|
9
|
-
import '../chunk-CIXL7AKH.js';
|
|
10
|
-
import '../chunk-PU2VTWJD.js';
|
|
11
|
-
import '../chunk-DL7KVYZF.js';
|
|
12
|
-
import '../chunk-LM4ACVHL.js';
|
|
13
|
-
import '../chunk-ONH7PIJZ.js';
|
|
14
|
-
import '../chunk-3Y5O5EGB.js';
|
|
15
|
-
export { InMemoryEventStore, PersistentEventBusAdapter } from '../chunk-2TSADFQX.js';
|
|
16
|
-
import '../chunk-BC4G7OM6.js';
|
|
17
|
-
import '../chunk-RM677CNU.js';
|
|
18
|
-
import '../chunk-HNHM3FDK.js';
|
|
19
|
-
import '../chunk-5A24LVGQ.js';
|
|
20
|
-
import '../chunk-ZKINHLMS.js';
|
|
21
|
-
import '../chunk-IDTYHLDQ.js';
|
|
22
|
-
import '../chunk-I53JB2KW.js';
|
|
23
|
-
import '../chunk-TKSSRS5U.js';
|
|
24
|
-
import '../chunk-ZLW4QOTS.js';
|
|
25
|
-
import '../chunk-QA2WDZPV.js';
|
|
26
|
-
import '../chunk-26VTGQAF.js';
|
|
27
|
-
import '../chunk-L3MX5MTA.js';
|
|
28
|
-
import '../chunk-L46TQXCV.js';
|
|
29
|
-
import '../chunk-4PELJWF7.js';
|
|
30
|
-
import '../chunk-6RKHCJUU.js';
|
|
31
|
-
import '../chunk-OOJEXFYY.js';
|
|
32
|
-
import '../chunk-ZETQCNEF.js';
|
|
33
|
-
import '../chunk-BCRWXTWX.js';
|
|
34
|
-
import '../chunk-PH2IYZHV.js';
|
|
35
|
-
import '../chunk-LNK7LZER.js';
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|