flowcraft 2.4.0 → 2.6.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/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/analysis.d.ts +9 -2
- package/dist/analysis.js +1 -1
- package/dist/chunk-27STBUGG.js +44 -0
- package/dist/chunk-27STBUGG.js.map +1 -0
- package/dist/{chunk-OZZP5YI6.js → chunk-2ISKDTSN.js} +3 -3
- package/dist/{chunk-OZZP5YI6.js.map → chunk-2ISKDTSN.js.map} +1 -1
- package/dist/{chunk-OO3FF3DF.js → chunk-5BOUGXZO.js} +8 -8
- package/dist/chunk-5BOUGXZO.js.map +1 -0
- package/dist/{chunk-J3HZD5ES.js → chunk-5XPW6YEP.js} +54 -15
- package/dist/chunk-5XPW6YEP.js.map +1 -0
- package/dist/{chunk-VN2JKKAE.js → chunk-6MGLU3UU.js} +3 -3
- package/dist/{chunk-VN2JKKAE.js.map → chunk-6MGLU3UU.js.map} +1 -1
- package/dist/{chunk-7PBANEG3.js → chunk-7FIOROIR.js} +5 -11
- package/dist/chunk-7FIOROIR.js.map +1 -0
- package/dist/{chunk-G5BGBPFP.js → chunk-FBPY44WL.js} +3 -3
- package/dist/{chunk-G5BGBPFP.js.map → chunk-FBPY44WL.js.map} +1 -1
- package/dist/chunk-HNHM3FDK.js +52 -0
- package/dist/chunk-HNHM3FDK.js.map +1 -0
- package/dist/chunk-I53JB2KW.js +26 -0
- package/dist/chunk-I53JB2KW.js.map +1 -0
- package/dist/{chunk-GVF7GQXQ.js → chunk-IDTYHLDQ.js} +3 -3
- package/dist/chunk-IDTYHLDQ.js.map +1 -0
- package/dist/{chunk-EUJWJWFA.js → chunk-IKOTX22J.js} +3 -3
- package/dist/{chunk-EUJWJWFA.js.map → chunk-IKOTX22J.js.map} +1 -1
- package/dist/{chunk-GIJOZ3AN.js → chunk-JLDHCI2O.js} +5 -5
- package/dist/{chunk-GIJOZ3AN.js.map → chunk-JLDHCI2O.js.map} +1 -1
- package/dist/{chunk-KXXEA5VE.js → chunk-N4NLAIEN.js} +3 -3
- package/dist/{chunk-KXXEA5VE.js.map → chunk-N4NLAIEN.js.map} +1 -1
- package/dist/{chunk-CHG6O6JX.js → chunk-OPRR4TAO.js} +14 -12
- package/dist/chunk-OPRR4TAO.js.map +1 -0
- package/dist/{chunk-MCGK3FXQ.js → chunk-SEI4Z3MO.js} +3 -3
- package/dist/{chunk-MCGK3FXQ.js.map → chunk-SEI4Z3MO.js.map} +1 -1
- package/dist/{chunk-K6LPGUPR.js → chunk-UXIASXSG.js} +7 -7
- package/dist/chunk-UXIASXSG.js.map +1 -0
- package/dist/chunk-XDI4TJHA.js +95 -0
- package/dist/chunk-XDI4TJHA.js.map +1 -0
- package/dist/{chunk-NDWVLU7J.js → chunk-XTW36KQZ.js} +3 -3
- package/dist/{chunk-NDWVLU7J.js.map → chunk-XTW36KQZ.js.map} +1 -1
- package/dist/{chunk-233SESC2.js → chunk-ZLW4QOTS.js} +74 -3
- package/dist/chunk-ZLW4QOTS.js.map +1 -0
- package/dist/container-factory.d.ts +1 -1
- package/dist/container-factory.js +5 -5
- package/dist/context.d.ts +21 -2
- package/dist/context.js +1 -1
- package/dist/error-mapper.d.ts +15 -0
- package/dist/error-mapper.js +4 -0
- package/dist/error-mapper.js.map +1 -0
- package/dist/evaluator.d.ts +1 -1
- package/dist/flow.d.ts +5 -5
- package/dist/flow.js +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +20 -18
- package/dist/linter.d.ts +1 -1
- package/dist/linter.js +2 -2
- package/dist/logger.d.ts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/nodes/batch-gather.d.ts +1 -1
- package/dist/nodes/batch-scatter.d.ts +1 -1
- package/dist/nodes/sleep.d.ts +1 -1
- package/dist/nodes/sleep.js +1 -1
- package/dist/nodes/subflow.d.ts +1 -1
- package/dist/nodes/subflow.js +6 -6
- package/dist/nodes/wait.d.ts +1 -1
- package/dist/nodes/wait.js +1 -1
- package/dist/nodes/webhook.d.ts +13 -0
- package/dist/nodes/webhook.js +4 -0
- package/dist/nodes/webhook.js.map +1 -0
- package/dist/runtime/adapter.d.ts +13 -1
- package/dist/runtime/adapter.js +15 -14
- package/dist/runtime/execution-context.d.ts +1 -1
- package/dist/runtime/execution-context.js +3 -3
- package/dist/runtime/executors.d.ts +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +15 -14
- package/dist/runtime/node-executor-factory.d.ts +1 -1
- package/dist/runtime/orchestrator.d.ts +1 -1
- package/dist/runtime/orchestrator.js +4 -4
- package/dist/runtime/orchestrators/step-by-step.d.ts +1 -1
- package/dist/runtime/orchestrators/utils.d.ts +1 -1
- package/dist/runtime/runtime.d.ts +1 -1
- package/dist/runtime/runtime.js +14 -13
- package/dist/runtime/scheduler.d.ts +1 -1
- package/dist/runtime/state.d.ts +1 -1
- package/dist/runtime/state.js +2 -2
- package/dist/runtime/traverser.d.ts +1 -1
- package/dist/runtime/traverser.js +2 -2
- package/dist/runtime/types.d.ts +1 -1
- package/dist/runtime/workflow-logic-handler.d.ts +1 -1
- package/dist/runtime/workflow-logic-handler.js +2 -2
- package/dist/sanitizer.d.ts +1 -1
- package/dist/sdk.d.ts +29 -0
- package/dist/sdk.js +20 -0
- package/dist/sdk.js.map +1 -0
- package/dist/serializer.d.ts +1 -1
- package/dist/testing/event-logger.d.ts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +17 -16
- package/dist/testing/run-with-trace.d.ts +1 -1
- package/dist/testing/run-with-trace.js +16 -15
- package/dist/testing/stepper.d.ts +1 -1
- package/dist/testing/stepper.js +6 -6
- package/dist/{types-DWCZW68f.d.ts → types-B-Drn84R.d.ts} +35 -3
- package/dist/types.d.ts +1 -1
- package/package.json +59 -55
- package/dist/chunk-233SESC2.js.map +0 -1
- package/dist/chunk-7PBANEG3.js.map +0 -1
- package/dist/chunk-CHG6O6JX.js.map +0 -1
- package/dist/chunk-GVF7GQXQ.js.map +0 -1
- package/dist/chunk-J3HZD5ES.js.map +0 -1
- package/dist/chunk-K6LPGUPR.js.map +0 -1
- package/dist/chunk-LJ4COM7S.js +0 -20
- package/dist/chunk-LJ4COM7S.js.map +0 -1
- package/dist/chunk-OO3FF3DF.js.map +0 -1
- package/dist/chunk-R3HQXIEL.js +0 -49
- package/dist/chunk-R3HQXIEL.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as RuntimeOptions, c as FlowRuntime, D as ISerializer, y as ILogger, u as IAsyncContext, K as WorkflowResult, h as WorkflowBlueprint } from '../types-B-Drn84R.js';
|
|
2
2
|
import '../errors.js';
|
|
3
3
|
import '../container.js';
|
|
4
4
|
|
|
@@ -11,6 +11,8 @@ interface ICoordinationStore {
|
|
|
11
11
|
increment: (key: string, ttlSeconds: number) => Promise<number>;
|
|
12
12
|
/** Sets a key only if it does not already exist. Ideal for 'any' joins (locking). */
|
|
13
13
|
setIfNotExist: (key: string, value: string, ttlSeconds: number) => Promise<boolean>;
|
|
14
|
+
/** Extends the TTL of an existing key. Used for heartbeat mechanism in long-running jobs. */
|
|
15
|
+
extendTTL: (key: string, ttlSeconds: number) => Promise<boolean>;
|
|
14
16
|
/** Deletes a key. Used for cleanup. */
|
|
15
17
|
delete: (key: string) => Promise<void>;
|
|
16
18
|
/** Gets the value of a key. */
|
|
@@ -67,6 +69,16 @@ declare abstract class BaseDistributedAdapter {
|
|
|
67
69
|
payload?: WorkflowResult;
|
|
68
70
|
reason?: string;
|
|
69
71
|
}): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Registers a webhook endpoint for a specific node in a workflow run.
|
|
74
|
+
* @param runId The unique ID of the workflow run.
|
|
75
|
+
* @param nodeId The ID of the node that will wait for the webhook.
|
|
76
|
+
* @returns The URL and event name for the webhook.
|
|
77
|
+
*/
|
|
78
|
+
abstract registerWebhookEndpoint(runId: string, nodeId: string): Promise<{
|
|
79
|
+
url: string;
|
|
80
|
+
event: string;
|
|
81
|
+
}>;
|
|
70
82
|
/**
|
|
71
83
|
* Hook called at the start of job processing. Subclasses can override this
|
|
72
84
|
* to perform additional setup (e.g., timestamp tracking for reconciliation).
|
package/dist/runtime/adapter.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
export { BaseDistributedAdapter } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { BaseDistributedAdapter } from '../chunk-5XPW6YEP.js';
|
|
2
|
+
import '../chunk-OPRR4TAO.js';
|
|
3
|
+
import '../chunk-SEI4Z3MO.js';
|
|
3
4
|
import '../chunk-DL7KVYZF.js';
|
|
4
|
-
import '../chunk-LM4ACVHL.js';
|
|
5
|
-
import '../chunk-MCGK3FXQ.js';
|
|
6
|
-
import '../chunk-LJ4COM7S.js';
|
|
7
|
-
import '../chunk-K6LPGUPR.js';
|
|
8
|
-
import '../chunk-G5BGBPFP.js';
|
|
9
|
-
import '../chunk-GVF7GQXQ.js';
|
|
10
5
|
import '../chunk-ONH7PIJZ.js';
|
|
11
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-LM4ACVHL.js';
|
|
12
7
|
import '../chunk-BC4G7OM6.js';
|
|
13
8
|
import '../chunk-RM677CNU.js';
|
|
14
|
-
import '../chunk-
|
|
15
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-HNHM3FDK.js';
|
|
10
|
+
import '../chunk-UXIASXSG.js';
|
|
11
|
+
import '../chunk-FBPY44WL.js';
|
|
12
|
+
import '../chunk-IDTYHLDQ.js';
|
|
13
|
+
import '../chunk-I53JB2KW.js';
|
|
14
|
+
import '../chunk-DSYAC4WB.js';
|
|
15
|
+
import '../chunk-ZLW4QOTS.js';
|
|
16
|
+
import '../chunk-XTW36KQZ.js';
|
|
16
17
|
import '../chunk-HAZ26F3P.js';
|
|
17
|
-
import '../chunk-
|
|
18
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-N4NLAIEN.js';
|
|
19
|
+
import '../chunk-5BOUGXZO.js';
|
|
19
20
|
import '../chunk-4PELJWF7.js';
|
|
20
21
|
import '../chunk-CYHZ2YVH.js';
|
|
21
22
|
import '../chunk-WWGFIYKW.js';
|
|
22
|
-
import '../chunk-
|
|
23
|
+
import '../chunk-XDI4TJHA.js';
|
|
23
24
|
import '../chunk-BCRWXTWX.js';
|
|
24
25
|
import '../chunk-PH2IYZHV.js';
|
|
25
26
|
import '../chunk-LNK7LZER.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ExecutionContext } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { ExecutionContext } from '../chunk-N4NLAIEN.js';
|
|
2
|
+
import '../chunk-5BOUGXZO.js';
|
|
3
|
+
import '../chunk-XDI4TJHA.js';
|
|
4
4
|
import '../chunk-BCRWXTWX.js';
|
|
5
5
|
//# sourceMappingURL=execution-context.js.map
|
|
6
6
|
//# sourceMappingURL=execution-context.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
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-
|
|
2
|
+
export { C as ClassNodeExecutor, E as ExecutionStrategy, F as FunctionNodeExecutor, N as NodeExecutionResult, b as NodeExecutor, a as NodeExecutorConfig } from '../types-B-Drn84R.js';
|
|
3
3
|
import '../container.js';
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
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-B-Drn84R.js';
|
|
3
3
|
export { DefaultOrchestrator } from './orchestrator.js';
|
|
4
4
|
export { executeBatch, processResults } from './orchestrators/utils.js';
|
|
5
5
|
import '../errors.js';
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import '../chunk-NVJ3ZO3P.js';
|
|
2
2
|
import '../chunk-NVLZFLYM.js';
|
|
3
|
-
export { BaseDistributedAdapter } from '../chunk-
|
|
4
|
-
export { FlowRuntime } from '../chunk-
|
|
3
|
+
export { BaseDistributedAdapter } from '../chunk-5XPW6YEP.js';
|
|
4
|
+
export { FlowRuntime } from '../chunk-OPRR4TAO.js';
|
|
5
|
+
import '../chunk-SEI4Z3MO.js';
|
|
5
6
|
import '../chunk-DL7KVYZF.js';
|
|
6
|
-
import '../chunk-LM4ACVHL.js';
|
|
7
|
-
import '../chunk-MCGK3FXQ.js';
|
|
8
|
-
import '../chunk-LJ4COM7S.js';
|
|
9
|
-
import '../chunk-K6LPGUPR.js';
|
|
10
|
-
export { GraphTraverser } from '../chunk-G5BGBPFP.js';
|
|
11
|
-
import '../chunk-GVF7GQXQ.js';
|
|
12
7
|
export { ClassNodeExecutor, FunctionNodeExecutor, NodeExecutor } from '../chunk-ONH7PIJZ.js';
|
|
13
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-LM4ACVHL.js';
|
|
14
9
|
import '../chunk-BC4G7OM6.js';
|
|
15
10
|
import '../chunk-RM677CNU.js';
|
|
16
|
-
import '../chunk-
|
|
17
|
-
|
|
11
|
+
import '../chunk-HNHM3FDK.js';
|
|
12
|
+
import '../chunk-UXIASXSG.js';
|
|
13
|
+
export { GraphTraverser } from '../chunk-FBPY44WL.js';
|
|
14
|
+
import '../chunk-IDTYHLDQ.js';
|
|
15
|
+
import '../chunk-I53JB2KW.js';
|
|
16
|
+
import '../chunk-DSYAC4WB.js';
|
|
17
|
+
import '../chunk-ZLW4QOTS.js';
|
|
18
|
+
export { DefaultOrchestrator } from '../chunk-XTW36KQZ.js';
|
|
18
19
|
export { executeBatch, processResults } from '../chunk-HAZ26F3P.js';
|
|
19
|
-
import '../chunk-
|
|
20
|
-
export { WorkflowState } from '../chunk-
|
|
20
|
+
import '../chunk-N4NLAIEN.js';
|
|
21
|
+
export { WorkflowState } from '../chunk-5BOUGXZO.js';
|
|
21
22
|
import '../chunk-4PELJWF7.js';
|
|
22
23
|
import '../chunk-CYHZ2YVH.js';
|
|
23
24
|
import '../chunk-WWGFIYKW.js';
|
|
24
|
-
import '../chunk-
|
|
25
|
+
import '../chunk-XDI4TJHA.js';
|
|
25
26
|
import '../chunk-BCRWXTWX.js';
|
|
26
27
|
import '../chunk-PH2IYZHV.js';
|
|
27
28
|
import '../chunk-LNK7LZER.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IOrchestrator,
|
|
1
|
+
import { I as IOrchestrator, L as ExecutionContext, G as GraphTraverser, K as WorkflowResult } from '../types-B-Drn84R.js';
|
|
2
2
|
import '../errors.js';
|
|
3
3
|
import '../container.js';
|
|
4
4
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { DefaultOrchestrator } from '../chunk-
|
|
1
|
+
export { DefaultOrchestrator } from '../chunk-XTW36KQZ.js';
|
|
2
2
|
import '../chunk-HAZ26F3P.js';
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-N4NLAIEN.js';
|
|
4
|
+
import '../chunk-5BOUGXZO.js';
|
|
5
|
+
import '../chunk-XDI4TJHA.js';
|
|
6
6
|
import '../chunk-BCRWXTWX.js';
|
|
7
7
|
//# sourceMappingURL=orchestrator.js.map
|
|
8
8
|
//# sourceMappingURL=orchestrator.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IOrchestrator,
|
|
1
|
+
import { I as IOrchestrator, L as ExecutionContext, G as GraphTraverser, K as WorkflowResult } from '../../types-B-Drn84R.js';
|
|
2
2
|
import '../../errors.js';
|
|
3
3
|
import '../../container.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as WorkflowBlueprint, W as WorkflowState, N as NodeExecutionResult, G as GraphTraverser } from '../../types-B-Drn84R.js';
|
|
2
2
|
import '../../errors.js';
|
|
3
3
|
import '../../container.js';
|
|
4
4
|
|
package/dist/runtime/runtime.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
export { FlowRuntime } from '../chunk-
|
|
1
|
+
export { FlowRuntime } from '../chunk-OPRR4TAO.js';
|
|
2
|
+
import '../chunk-SEI4Z3MO.js';
|
|
2
3
|
import '../chunk-DL7KVYZF.js';
|
|
3
|
-
import '../chunk-LM4ACVHL.js';
|
|
4
|
-
import '../chunk-MCGK3FXQ.js';
|
|
5
|
-
import '../chunk-LJ4COM7S.js';
|
|
6
|
-
import '../chunk-K6LPGUPR.js';
|
|
7
|
-
import '../chunk-G5BGBPFP.js';
|
|
8
|
-
import '../chunk-GVF7GQXQ.js';
|
|
9
4
|
import '../chunk-ONH7PIJZ.js';
|
|
10
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-LM4ACVHL.js';
|
|
11
6
|
import '../chunk-BC4G7OM6.js';
|
|
12
7
|
import '../chunk-RM677CNU.js';
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-HNHM3FDK.js';
|
|
9
|
+
import '../chunk-UXIASXSG.js';
|
|
10
|
+
import '../chunk-FBPY44WL.js';
|
|
11
|
+
import '../chunk-IDTYHLDQ.js';
|
|
12
|
+
import '../chunk-I53JB2KW.js';
|
|
13
|
+
import '../chunk-DSYAC4WB.js';
|
|
14
|
+
import '../chunk-ZLW4QOTS.js';
|
|
15
|
+
import '../chunk-XTW36KQZ.js';
|
|
15
16
|
import '../chunk-HAZ26F3P.js';
|
|
16
|
-
import '../chunk-
|
|
17
|
-
import '../chunk-
|
|
17
|
+
import '../chunk-N4NLAIEN.js';
|
|
18
|
+
import '../chunk-5BOUGXZO.js';
|
|
18
19
|
import '../chunk-4PELJWF7.js';
|
|
19
20
|
import '../chunk-CYHZ2YVH.js';
|
|
20
21
|
import '../chunk-WWGFIYKW.js';
|
|
21
|
-
import '../chunk-
|
|
22
|
+
import '../chunk-XDI4TJHA.js';
|
|
22
23
|
import '../chunk-BCRWXTWX.js';
|
|
23
24
|
import '../chunk-PH2IYZHV.js';
|
|
24
25
|
import '../chunk-LNK7LZER.js';
|
package/dist/runtime/state.d.ts
CHANGED
package/dist/runtime/state.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { WorkflowState } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { WorkflowState } from '../chunk-5BOUGXZO.js';
|
|
2
|
+
import '../chunk-XDI4TJHA.js';
|
|
3
3
|
import '../chunk-BCRWXTWX.js';
|
|
4
4
|
//# sourceMappingURL=state.js.map
|
|
5
5
|
//# sourceMappingURL=state.js.map
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { e as ExecutionServices, I as IOrchestrator, f as IRuntime, N as NodeExecutionResult, b as NodeExecutor, d as NodeExecutorFactory } from '../types-
|
|
1
|
+
export { e as ExecutionServices, I as IOrchestrator, f as IRuntime, N as NodeExecutionResult, b as NodeExecutor, d as NodeExecutorFactory } from '../types-B-Drn84R.js';
|
|
2
2
|
import '../errors.js';
|
|
3
3
|
import '../container.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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-B-Drn84R.js';
|
|
2
2
|
import '../errors.js';
|
|
3
3
|
import '../container.js';
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { WorkflowLogicHandler } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { WorkflowLogicHandler } from '../chunk-SEI4Z3MO.js';
|
|
2
|
+
import '../chunk-XDI4TJHA.js';
|
|
3
3
|
import '../chunk-BCRWXTWX.js';
|
|
4
4
|
//# sourceMappingURL=workflow-logic-handler.js.map
|
|
5
5
|
//# sourceMappingURL=workflow-logic-handler.js.map
|
package/dist/sanitizer.d.ts
CHANGED
package/dist/sdk.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface Webhook<T = any> {
|
|
2
|
+
/** The unique public URL to which the external system should send its POST request. */
|
|
3
|
+
url: string;
|
|
4
|
+
/** A unique event name which can be used to trigger the webhook */
|
|
5
|
+
event: string;
|
|
6
|
+
/** A promise-like object that resolves with the webhook's request details when it is invoked. */
|
|
7
|
+
request: Promise<{
|
|
8
|
+
json: () => Promise<T>;
|
|
9
|
+
text: () => Promise<string>;
|
|
10
|
+
headers: Record<string, string>;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Pauses workflow execution for a specified duration.
|
|
15
|
+
* Must be used with `await` inside a compiled `@flow` function.
|
|
16
|
+
*/
|
|
17
|
+
declare function sleep(_duration: number | string): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Pauses a workflow until an external event is received.
|
|
20
|
+
* Must be used with `await` inside a compiled `@flow` function.
|
|
21
|
+
*/
|
|
22
|
+
declare function waitForEvent<T = any>(_eventName: string): Promise<T>;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a durable, single-use webhook endpoint.
|
|
25
|
+
* Must be used with `await` inside a compiled `@flow` function.
|
|
26
|
+
*/
|
|
27
|
+
declare function createWebhook<T = any>(): Promise<Webhook<T>>;
|
|
28
|
+
|
|
29
|
+
export { type Webhook, createWebhook, sleep, waitForEvent };
|
package/dist/sdk.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
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
CHANGED
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { InMemoryEventLogger } from './event-logger.js';
|
|
2
2
|
export { runWithTrace } from './run-with-trace.js';
|
|
3
3
|
export { IWorkflowStepper, createStepper } from './stepper.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-B-Drn84R.js';
|
|
5
5
|
import '../errors.js';
|
|
6
6
|
import '../container.js';
|
package/dist/testing/index.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
export { runWithTrace } from '../chunk-
|
|
1
|
+
export { runWithTrace } from '../chunk-6MGLU3UU.js';
|
|
2
2
|
export { InMemoryEventLogger } from '../chunk-MUYLRTSR.js';
|
|
3
|
-
export { createStepper } from '../chunk-
|
|
3
|
+
export { createStepper } from '../chunk-JLDHCI2O.js';
|
|
4
4
|
import '../chunk-G53CSLBF.js';
|
|
5
5
|
import '../chunk-NVJ3ZO3P.js';
|
|
6
6
|
import '../chunk-NVLZFLYM.js';
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-5XPW6YEP.js';
|
|
8
|
+
import '../chunk-OPRR4TAO.js';
|
|
9
|
+
import '../chunk-SEI4Z3MO.js';
|
|
9
10
|
import '../chunk-DL7KVYZF.js';
|
|
10
|
-
import '../chunk-LM4ACVHL.js';
|
|
11
|
-
import '../chunk-MCGK3FXQ.js';
|
|
12
|
-
import '../chunk-LJ4COM7S.js';
|
|
13
|
-
import '../chunk-K6LPGUPR.js';
|
|
14
|
-
import '../chunk-G5BGBPFP.js';
|
|
15
|
-
import '../chunk-GVF7GQXQ.js';
|
|
16
11
|
import '../chunk-ONH7PIJZ.js';
|
|
17
|
-
import '../chunk-
|
|
12
|
+
import '../chunk-LM4ACVHL.js';
|
|
18
13
|
import '../chunk-BC4G7OM6.js';
|
|
19
14
|
import '../chunk-RM677CNU.js';
|
|
20
|
-
import '../chunk-
|
|
21
|
-
import '../chunk-
|
|
15
|
+
import '../chunk-HNHM3FDK.js';
|
|
16
|
+
import '../chunk-UXIASXSG.js';
|
|
17
|
+
import '../chunk-FBPY44WL.js';
|
|
18
|
+
import '../chunk-IDTYHLDQ.js';
|
|
19
|
+
import '../chunk-I53JB2KW.js';
|
|
20
|
+
import '../chunk-DSYAC4WB.js';
|
|
21
|
+
import '../chunk-ZLW4QOTS.js';
|
|
22
|
+
import '../chunk-XTW36KQZ.js';
|
|
22
23
|
import '../chunk-HAZ26F3P.js';
|
|
23
|
-
import '../chunk-
|
|
24
|
-
import '../chunk-
|
|
24
|
+
import '../chunk-N4NLAIEN.js';
|
|
25
|
+
import '../chunk-5BOUGXZO.js';
|
|
25
26
|
import '../chunk-4PELJWF7.js';
|
|
26
27
|
import '../chunk-CYHZ2YVH.js';
|
|
27
28
|
import '../chunk-WWGFIYKW.js';
|
|
28
|
-
import '../chunk-
|
|
29
|
+
import '../chunk-XDI4TJHA.js';
|
|
29
30
|
import '../chunk-BCRWXTWX.js';
|
|
30
31
|
import '../chunk-PH2IYZHV.js';
|
|
31
32
|
import '../chunk-LNK7LZER.js';
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
export { runWithTrace } from '../chunk-
|
|
1
|
+
export { runWithTrace } from '../chunk-6MGLU3UU.js';
|
|
2
2
|
import '../chunk-MUYLRTSR.js';
|
|
3
3
|
import '../chunk-NVJ3ZO3P.js';
|
|
4
4
|
import '../chunk-NVLZFLYM.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-5XPW6YEP.js';
|
|
6
|
+
import '../chunk-OPRR4TAO.js';
|
|
7
|
+
import '../chunk-SEI4Z3MO.js';
|
|
7
8
|
import '../chunk-DL7KVYZF.js';
|
|
8
|
-
import '../chunk-LM4ACVHL.js';
|
|
9
|
-
import '../chunk-MCGK3FXQ.js';
|
|
10
|
-
import '../chunk-LJ4COM7S.js';
|
|
11
|
-
import '../chunk-K6LPGUPR.js';
|
|
12
|
-
import '../chunk-G5BGBPFP.js';
|
|
13
|
-
import '../chunk-GVF7GQXQ.js';
|
|
14
9
|
import '../chunk-ONH7PIJZ.js';
|
|
15
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-LM4ACVHL.js';
|
|
16
11
|
import '../chunk-BC4G7OM6.js';
|
|
17
12
|
import '../chunk-RM677CNU.js';
|
|
18
|
-
import '../chunk-
|
|
19
|
-
import '../chunk-
|
|
13
|
+
import '../chunk-HNHM3FDK.js';
|
|
14
|
+
import '../chunk-UXIASXSG.js';
|
|
15
|
+
import '../chunk-FBPY44WL.js';
|
|
16
|
+
import '../chunk-IDTYHLDQ.js';
|
|
17
|
+
import '../chunk-I53JB2KW.js';
|
|
18
|
+
import '../chunk-DSYAC4WB.js';
|
|
19
|
+
import '../chunk-ZLW4QOTS.js';
|
|
20
|
+
import '../chunk-XTW36KQZ.js';
|
|
20
21
|
import '../chunk-HAZ26F3P.js';
|
|
21
|
-
import '../chunk-
|
|
22
|
-
import '../chunk-
|
|
22
|
+
import '../chunk-N4NLAIEN.js';
|
|
23
|
+
import '../chunk-5BOUGXZO.js';
|
|
23
24
|
import '../chunk-4PELJWF7.js';
|
|
24
25
|
import '../chunk-CYHZ2YVH.js';
|
|
25
26
|
import '../chunk-WWGFIYKW.js';
|
|
26
|
-
import '../chunk-
|
|
27
|
+
import '../chunk-XDI4TJHA.js';
|
|
27
28
|
import '../chunk-BCRWXTWX.js';
|
|
28
29
|
import '../chunk-PH2IYZHV.js';
|
|
29
30
|
import '../chunk-LNK7LZER.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WorkflowState, G as GraphTraverser,
|
|
1
|
+
import { W as WorkflowState, G as GraphTraverser, K as WorkflowResult, c as FlowRuntime, h as WorkflowBlueprint, o as NodeFunction, p as NodeClass } from '../types-B-Drn84R.js';
|
|
2
2
|
import '../errors.js';
|
|
3
3
|
import '../container.js';
|
|
4
4
|
|
package/dist/testing/stepper.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { createStepper } from '../chunk-
|
|
1
|
+
export { createStepper } from '../chunk-JLDHCI2O.js';
|
|
2
2
|
import '../chunk-G53CSLBF.js';
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-FBPY44WL.js';
|
|
4
|
+
import '../chunk-ZLW4QOTS.js';
|
|
5
5
|
import '../chunk-HAZ26F3P.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-N4NLAIEN.js';
|
|
7
|
+
import '../chunk-5BOUGXZO.js';
|
|
8
|
+
import '../chunk-XDI4TJHA.js';
|
|
9
9
|
import '../chunk-BCRWXTWX.js';
|
|
10
10
|
//# sourceMappingURL=stepper.js.map
|
|
11
11
|
//# sourceMappingURL=stepper.js.map
|
|
@@ -88,7 +88,7 @@ declare class WorkflowState<TContext extends Record<string, any>> {
|
|
|
88
88
|
getCompletedNodes(): Set<string>;
|
|
89
89
|
getErrors(): WorkflowError[];
|
|
90
90
|
getAnyFallbackExecuted(): boolean;
|
|
91
|
-
markAsAwaiting(nodeId: string, details?: any): void
|
|
91
|
+
markAsAwaiting(nodeId: string, details?: any): Promise<void>;
|
|
92
92
|
isAwaiting(): boolean;
|
|
93
93
|
getAwaitingNodeIds(): string[];
|
|
94
94
|
getAwaitingDetails(nodeId: string): any;
|
|
@@ -287,12 +287,26 @@ declare class ExecutionContext<TContext extends Record<string, any>, TDependenci
|
|
|
287
287
|
createForSubflow(subBlueprint: WorkflowBlueprint, initialSubState: Partial<TContext>): ExecutionContext<TContext, TDependencies>;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
+
/** Source location information for debugging and visualization. */
|
|
291
|
+
interface SourceLocation {
|
|
292
|
+
file: string;
|
|
293
|
+
line: number;
|
|
294
|
+
column: number;
|
|
295
|
+
}
|
|
296
|
+
/** Metadata associated with a workflow blueprint. */
|
|
297
|
+
interface WorkflowBlueprintMetadata {
|
|
298
|
+
/** Optional version identifier for the blueprint. Used in distributed systems to ensure version compatibility. */
|
|
299
|
+
version?: string;
|
|
300
|
+
/** Entry points for cycles in the workflow graph. */
|
|
301
|
+
cycleEntryPoints?: string[];
|
|
302
|
+
[key: string]: any;
|
|
303
|
+
}
|
|
290
304
|
/** The central, serializable representation of a workflow. */
|
|
291
305
|
interface WorkflowBlueprint {
|
|
292
306
|
id: string;
|
|
293
307
|
nodes: NodeDefinition[];
|
|
294
308
|
edges: EdgeDefinition[];
|
|
295
|
-
metadata?:
|
|
309
|
+
metadata?: WorkflowBlueprintMetadata;
|
|
296
310
|
}
|
|
297
311
|
/** Defines a single step in the workflow. */
|
|
298
312
|
interface NodeDefinition {
|
|
@@ -305,6 +319,8 @@ interface NodeDefinition {
|
|
|
305
319
|
inputs?: string | Record<string, string>;
|
|
306
320
|
/** Configuration for retries, timeouts, etc. */
|
|
307
321
|
config?: NodeConfig;
|
|
322
|
+
/** Source location for debugging and visualization. */
|
|
323
|
+
_sourceLocation?: SourceLocation;
|
|
308
324
|
}
|
|
309
325
|
/** Defines the connection and data flow between two nodes. */
|
|
310
326
|
interface EdgeDefinition {
|
|
@@ -316,6 +332,8 @@ interface EdgeDefinition {
|
|
|
316
332
|
condition?: string;
|
|
317
333
|
/** A string expression to transform the data before passing it to the target node. */
|
|
318
334
|
transform?: string;
|
|
335
|
+
/** Source location for debugging and visualization. */
|
|
336
|
+
_sourceLocation?: SourceLocation;
|
|
319
337
|
}
|
|
320
338
|
/** Configuration for a node's resiliency and behavior. */
|
|
321
339
|
interface NodeConfig {
|
|
@@ -391,7 +409,21 @@ interface IAsyncContext<TContext extends Record<string, any> = Record<string, an
|
|
|
391
409
|
delete<K extends keyof TContext>(key: K): Promise<boolean>;
|
|
392
410
|
delete(key: string): Promise<boolean>;
|
|
393
411
|
toJSON: () => Promise<Record<string, any>>;
|
|
412
|
+
/**
|
|
413
|
+
* Applies a batch of patch operations atomically.
|
|
414
|
+
* More efficient than individual set/delete calls for bulk updates.
|
|
415
|
+
*/
|
|
416
|
+
patch(operations: PatchOperation[]): Promise<void>;
|
|
394
417
|
}
|
|
418
|
+
/** Represents a single patch operation for delta-based state updates. */
|
|
419
|
+
type PatchOperation = {
|
|
420
|
+
op: 'set';
|
|
421
|
+
key: string;
|
|
422
|
+
value: any;
|
|
423
|
+
} | {
|
|
424
|
+
op: 'delete';
|
|
425
|
+
key: string;
|
|
426
|
+
};
|
|
395
427
|
/** Generic for any set of dependencies. */
|
|
396
428
|
interface RuntimeDependencies {
|
|
397
429
|
[key: string]: any;
|
|
@@ -588,4 +620,4 @@ interface UIGraph {
|
|
|
588
620
|
}>;
|
|
589
621
|
}
|
|
590
622
|
|
|
591
|
-
export { type
|
|
623
|
+
export { type IEventBus as A, BaseNode as B, ClassNodeExecutor as C, type ISerializer as D, type ExecutionStrategy as E, FunctionNodeExecutor as F, GraphTraverser as G, type WorkflowError as H, type IOrchestrator as I, type WorkflowStatus as J, type WorkflowResult as K, ExecutionContext as L, type Middleware as M, type NodeExecutionResult as N, type AwaitingWorkflow as O, type PatchOperation as P, WorkflowScheduler as Q, type ReadyNode as R, type SourceLocation as S, type UIGraph as U, WorkflowState as W, type NodeExecutorConfig as a, NodeExecutor as b, FlowRuntime as c, type NodeExecutorFactory as d, type ExecutionServices as e, type IRuntime as f, type WorkflowBlueprintMetadata as g, type WorkflowBlueprint as h, isNodeClass as i, type NodeDefinition as j, type EdgeDefinition as k, type NodeConfig as l, type NodeResult as m, type NodeContext as n, type NodeFunction as o, type NodeClass as p, type NodeImplementation as q, type NodeRegistry as r, type ContextImplementation as s, type ISyncContext as t, type IAsyncContext as u, type RuntimeDependencies as v, type RuntimeOptions as w, type IEvaluator as x, type ILogger as y, type FlowcraftEvent as z };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './errors.js';
|
|
2
|
-
export {
|
|
2
|
+
export { s as ContextImplementation, k as EdgeDefinition, z as FlowcraftEvent, u as IAsyncContext, x as IEvaluator, A as IEventBus, y as ILogger, D as ISerializer, t as ISyncContext, M as Middleware, p as NodeClass, l as NodeConfig, n as NodeContext, j as NodeDefinition, o as NodeFunction, q as NodeImplementation, r as NodeRegistry, m as NodeResult, P as PatchOperation, v as RuntimeDependencies, w as RuntimeOptions, S as SourceLocation, U as UIGraph, h as WorkflowBlueprint, g as WorkflowBlueprintMetadata, H as WorkflowError, K as WorkflowResult, J as WorkflowStatus } from './types-B-Drn84R.js';
|
|
3
3
|
import './container.js';
|