flowcraft 2.3.1 → 2.5.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-QNYXQKFW.js → chunk-2ISKDTSN.js} +3 -3
- package/dist/{chunk-QNYXQKFW.js.map → chunk-2ISKDTSN.js.map} +1 -1
- package/dist/{chunk-CD4FUZOJ.js → chunk-5BOUGXZO.js} +25 -11
- package/dist/chunk-5BOUGXZO.js.map +1 -0
- package/dist/{chunk-ZNL7ZXPR.js → chunk-5XPW6YEP.js} +76 -32
- package/dist/chunk-5XPW6YEP.js.map +1 -0
- package/dist/{chunk-BN4MV36K.js → chunk-6MGLU3UU.js} +3 -3
- package/dist/{chunk-BN4MV36K.js.map → chunk-6MGLU3UU.js.map} +1 -1
- package/dist/{chunk-C4HYIJI3.js → chunk-7FIOROIR.js} +19 -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-IDTYHLDQ.js +16 -0
- 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-XNRIM27H.js → chunk-JLDHCI2O.js} +5 -5
- package/dist/{chunk-XNRIM27H.js.map → chunk-JLDHCI2O.js.map} +1 -1
- package/dist/chunk-LM4ACVHL.js +73 -0
- package/dist/chunk-LM4ACVHL.js.map +1 -0
- package/dist/{chunk-FRKO3WX4.js → chunk-N4NLAIEN.js} +3 -3
- package/dist/{chunk-FRKO3WX4.js.map → chunk-N4NLAIEN.js.map} +1 -1
- package/dist/{chunk-HKX7WQLS.js → chunk-OPRR4TAO.js} +43 -11
- 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-MKNZBKSR.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-33NO4PUJ.js → chunk-XTW36KQZ.js} +3 -3
- package/dist/{chunk-33NO4PUJ.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 +14 -5
- package/dist/flow.js +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +20 -16
- 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 +9 -0
- package/dist/nodes/sleep.js +4 -0
- package/dist/nodes/sleep.js.map +1 -0
- 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 +14 -1
- package/dist/runtime/adapter.js +15 -12
- 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 -12
- 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 -11
- package/dist/runtime/scheduler.d.ts +3 -0
- package/dist/runtime/scheduler.js +3 -0
- package/dist/runtime/scheduler.js.map +1 -0
- 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 +18 -15
- package/dist/testing/run-with-trace.d.ts +1 -1
- package/dist/testing/run-with-trace.js +16 -13
- package/dist/testing/stepper.d.ts +1 -1
- package/dist/testing/stepper.js +6 -6
- package/dist/{types-ezHUBdpL.d.ts → types-B-Drn84R.d.ts} +62 -3
- package/dist/types.d.ts +1 -1
- package/package.json +59 -55
- package/dist/chunk-233SESC2.js.map +0 -1
- package/dist/chunk-C4HYIJI3.js.map +0 -1
- package/dist/chunk-CD3Q4N6V.js +0 -13
- package/dist/chunk-CD3Q4N6V.js.map +0 -1
- package/dist/chunk-CD4FUZOJ.js.map +0 -1
- package/dist/chunk-HKX7WQLS.js.map +0 -1
- package/dist/chunk-MKNZBKSR.js.map +0 -1
- package/dist/chunk-R3HQXIEL.js +0 -49
- package/dist/chunk-R3HQXIEL.js.map +0 -1
- package/dist/chunk-ZNL7ZXPR.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { createDefaultContainer } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { createDefaultContainer } from './chunk-2ISKDTSN.js';
|
|
2
|
+
import './chunk-XTW36KQZ.js';
|
|
3
3
|
import './chunk-HAZ26F3P.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
4
|
+
import './chunk-N4NLAIEN.js';
|
|
5
|
+
import './chunk-5BOUGXZO.js';
|
|
6
6
|
import './chunk-4PELJWF7.js';
|
|
7
7
|
import './chunk-CYHZ2YVH.js';
|
|
8
8
|
import './chunk-WWGFIYKW.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-XDI4TJHA.js';
|
|
10
10
|
import './chunk-BCRWXTWX.js';
|
|
11
11
|
import './chunk-PH2IYZHV.js';
|
|
12
12
|
//# sourceMappingURL=container-factory.js.map
|
package/dist/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as ISyncContext, u as IAsyncContext, P as PatchOperation } from './types-B-Drn84R.js';
|
|
2
2
|
import './errors.js';
|
|
3
3
|
import './container.js';
|
|
4
4
|
|
|
@@ -28,6 +28,25 @@ declare class AsyncContextView<TContext extends Record<string, any>> implements
|
|
|
28
28
|
has<K extends keyof TContext>(key: K): Promise<boolean>;
|
|
29
29
|
delete<K extends keyof TContext>(key: K): Promise<boolean>;
|
|
30
30
|
toJSON(): Promise<Record<string, any>>;
|
|
31
|
+
patch(_operations: PatchOperation[]): Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A proxy wrapper that tracks changes to an async context for delta-based persistence.
|
|
35
|
+
* Records all mutations (set/delete operations) to enable efficient partial updates.
|
|
36
|
+
*/
|
|
37
|
+
declare class TrackedAsyncContext<TContext extends Record<string, any>> implements IAsyncContext<TContext> {
|
|
38
|
+
readonly type: "async";
|
|
39
|
+
private deltas;
|
|
40
|
+
private innerContext;
|
|
41
|
+
constructor(innerContext: IAsyncContext<TContext>);
|
|
42
|
+
get<K extends keyof TContext>(key: K): Promise<TContext[K] | undefined>;
|
|
43
|
+
set<K extends keyof TContext>(key: K, value: TContext[K]): Promise<void>;
|
|
44
|
+
has<K extends keyof TContext>(key: K): Promise<boolean>;
|
|
45
|
+
delete<K extends keyof TContext>(key: K): Promise<boolean>;
|
|
46
|
+
toJSON(): Promise<Record<string, any>>;
|
|
47
|
+
patch(operations: PatchOperation[]): Promise<void>;
|
|
48
|
+
getDeltas(): PatchOperation[];
|
|
49
|
+
clearDeltas(): void;
|
|
31
50
|
}
|
|
32
51
|
|
|
33
|
-
export { AsyncContextView, Context };
|
|
52
|
+
export { AsyncContextView, Context, TrackedAsyncContext };
|
package/dist/context.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { h as WorkflowBlueprint } from './types-B-Drn84R.js';
|
|
2
|
+
import './errors.js';
|
|
3
|
+
import './container.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Creates an error mapper function that enhances runtime errors with source location information.
|
|
7
|
+
* The mapper looks up node IDs in the provided manifest blueprints and returns enhanced errors
|
|
8
|
+
* that point to the original TypeScript source code.
|
|
9
|
+
*
|
|
10
|
+
* @param manifestBlueprints - The compiled blueprint manifest containing source location data
|
|
11
|
+
* @returns A function that maps errors to enhanced errors with source location information
|
|
12
|
+
*/
|
|
13
|
+
declare function createErrorMapper(manifestBlueprints: Record<string, WorkflowBlueprint>): (error: Error) => Error;
|
|
14
|
+
|
|
15
|
+
export { createErrorMapper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"error-mapper.js"}
|
package/dist/evaluator.d.ts
CHANGED
package/dist/flow.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as NodeFunction, p as NodeClass, j as NodeDefinition, k as EdgeDefinition, h as WorkflowBlueprint, U as UIGraph } from './types-B-Drn84R.js';
|
|
2
2
|
import './errors.js';
|
|
3
3
|
import './container.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* A fluent API for programmatically constructing a WorkflowBlueprint.
|
|
7
7
|
*/
|
|
8
|
-
declare class
|
|
8
|
+
declare class FlowBuilder<TContext extends Record<string, any> = Record<string, any>, TDependencies extends Record<string, any> = Record<string, any>> {
|
|
9
9
|
private blueprint;
|
|
10
10
|
private functionRegistry;
|
|
11
11
|
private loopControllerIds;
|
|
@@ -32,9 +32,18 @@ declare class Flow<TContext extends Record<string, any> = Record<string, any>, T
|
|
|
32
32
|
outputKey: TOutputKey;
|
|
33
33
|
/** The number of items to process in each chunk to limit memory usage. */
|
|
34
34
|
chunkSize?: number;
|
|
35
|
-
}):
|
|
35
|
+
}): FlowBuilder<TContext & {
|
|
36
36
|
[K in TOutputKey]: TWorkerOutput[];
|
|
37
37
|
}, TDependencies>;
|
|
38
|
+
/**
|
|
39
|
+
* Creates a sleep node that pauses workflow execution for a specified duration.
|
|
40
|
+
* @param id A unique identifier for the sleep node.
|
|
41
|
+
* @param options Configuration for the sleep duration.
|
|
42
|
+
*/
|
|
43
|
+
sleep(id: string, options: {
|
|
44
|
+
/** The duration to sleep in milliseconds. */
|
|
45
|
+
duration: number;
|
|
46
|
+
}): this;
|
|
38
47
|
/**
|
|
39
48
|
* Creates a wait node that pauses workflow execution for external input.
|
|
40
49
|
* @param id A unique identifier for the wait node.
|
|
@@ -71,6 +80,6 @@ declare class Flow<TContext extends Record<string, any> = Record<string, any>, T
|
|
|
71
80
|
/**
|
|
72
81
|
* Helper function to create a new Flow builder instance.
|
|
73
82
|
*/
|
|
74
|
-
declare function createFlow<TContext extends Record<string, any> = Record<string, any>, TDependencies extends Record<string, any> = Record<string, any>>(id: string):
|
|
83
|
+
declare function createFlow<TContext extends Record<string, any> = Record<string, any>, TDependencies extends Record<string, any> = Record<string, any>>(id: string): FlowBuilder<TContext, TDependencies>;
|
|
75
84
|
|
|
76
|
-
export {
|
|
85
|
+
export { FlowBuilder, createFlow };
|
package/dist/flow.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
export { BlueprintAnalysis, Cycles, analyzeBlueprint, checkForCycles, generateMermaid } from './analysis.js';
|
|
1
|
+
export { BlueprintAnalysis, Cycles, analyzeBlueprint, checkForCycles, generateMermaid, generateMermaidForRun } from './analysis.js';
|
|
2
2
|
export { DIContainer, ServiceToken, ServiceTokens } from './container.js';
|
|
3
3
|
export { ContainerOptions, createDefaultContainer } from './container-factory.js';
|
|
4
|
-
export { AsyncContextView, Context } from './context.js';
|
|
4
|
+
export { AsyncContextView, Context, TrackedAsyncContext } from './context.js';
|
|
5
|
+
export { createErrorMapper } from './error-mapper.js';
|
|
5
6
|
export { FlowcraftError } from './errors.js';
|
|
6
7
|
export { PropertyEvaluator, UnsafeEvaluator } from './evaluator.js';
|
|
7
|
-
export {
|
|
8
|
+
export { FlowBuilder, createFlow } from './flow.js';
|
|
8
9
|
export { LinterIssue, LinterIssueCode, LinterResult, lintBlueprint } from './linter.js';
|
|
9
10
|
export { ConsoleLogger, NullLogger } from './logger.js';
|
|
10
|
-
export { B as BaseNode, C as ClassNodeExecutor,
|
|
11
|
+
export { B as BaseNode, C as ClassNodeExecutor, s as ContextImplementation, k as EdgeDefinition, e as ExecutionServices, E as ExecutionStrategy, c as FlowRuntime, z as FlowcraftEvent, F as FunctionNodeExecutor, G as GraphTraverser, u as IAsyncContext, x as IEvaluator, A as IEventBus, y as ILogger, I as IOrchestrator, f as IRuntime, D as ISerializer, t as ISyncContext, M as Middleware, p as NodeClass, l as NodeConfig, n as NodeContext, j as NodeDefinition, N as NodeExecutionResult, b as NodeExecutor, a as NodeExecutorConfig, d as NodeExecutorFactory, o as NodeFunction, q as NodeImplementation, r as NodeRegistry, m as NodeResult, P as PatchOperation, R as ReadyNode, v as RuntimeDependencies, w as RuntimeOptions, S as SourceLocation, U as UIGraph, h as WorkflowBlueprint, g as WorkflowBlueprintMetadata, H as WorkflowError, K as WorkflowResult, W as WorkflowState, J as WorkflowStatus, i as isNodeClass } from './types-B-Drn84R.js';
|
|
11
12
|
export { AdapterOptions, BaseDistributedAdapter, ICoordinationStore, JobPayload } from './runtime/adapter.js';
|
|
12
13
|
export { DefaultOrchestrator } from './runtime/orchestrator.js';
|
|
13
14
|
export { executeBatch, processResults } from './runtime/orchestrators/utils.js';
|
package/dist/index.js
CHANGED
|
@@ -1,31 +1,35 @@
|
|
|
1
1
|
import './chunk-NVJ3ZO3P.js';
|
|
2
2
|
import './chunk-NVLZFLYM.js';
|
|
3
|
-
export { BaseDistributedAdapter } from './chunk-
|
|
4
|
-
export { FlowRuntime } from './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-MKNZBKSR.js';
|
|
7
|
-
export { GraphTraverser } from './chunk-G5BGBPFP.js';
|
|
8
|
-
import './chunk-CD3Q4N6V.js';
|
|
3
|
+
export { BaseDistributedAdapter } from './chunk-5XPW6YEP.js';
|
|
4
|
+
export { FlowRuntime } from './chunk-OPRR4TAO.js';
|
|
5
|
+
import './chunk-SEI4Z3MO.js';
|
|
9
6
|
import './chunk-DL7KVYZF.js';
|
|
10
7
|
export { ClassNodeExecutor, FunctionNodeExecutor, NodeExecutor } from './chunk-ONH7PIJZ.js';
|
|
11
|
-
|
|
12
|
-
export { sanitizeBlueprint } from './chunk-DSYAC4WB.js';
|
|
13
|
-
import './chunk-55J6XMHW.js';
|
|
8
|
+
import './chunk-LM4ACVHL.js';
|
|
14
9
|
import './chunk-BC4G7OM6.js';
|
|
15
10
|
import './chunk-RM677CNU.js';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export {
|
|
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
|
+
export { lintBlueprint } from './chunk-IKOTX22J.js';
|
|
17
|
+
export { sanitizeBlueprint } from './chunk-DSYAC4WB.js';
|
|
18
|
+
import './chunk-55J6XMHW.js';
|
|
19
|
+
export { analyzeBlueprint, checkForCycles, generateMermaid, generateMermaidForRun } from './chunk-ZLW4QOTS.js';
|
|
20
|
+
export { createDefaultContainer } from './chunk-2ISKDTSN.js';
|
|
21
|
+
export { DefaultOrchestrator } from './chunk-XTW36KQZ.js';
|
|
19
22
|
export { executeBatch, processResults } from './chunk-HAZ26F3P.js';
|
|
20
|
-
import './chunk-
|
|
21
|
-
export { WorkflowState } from './chunk-
|
|
23
|
+
import './chunk-N4NLAIEN.js';
|
|
24
|
+
export { WorkflowState } from './chunk-5BOUGXZO.js';
|
|
22
25
|
export { ConsoleLogger, NullLogger } from './chunk-4PELJWF7.js';
|
|
23
26
|
export { JsonSerializer } from './chunk-CYHZ2YVH.js';
|
|
24
27
|
export { DIContainer, ServiceTokens } from './chunk-WWGFIYKW.js';
|
|
25
|
-
export { AsyncContextView, Context } from './chunk-
|
|
28
|
+
export { AsyncContextView, Context, TrackedAsyncContext } from './chunk-XDI4TJHA.js';
|
|
29
|
+
export { createErrorMapper } from './chunk-27STBUGG.js';
|
|
26
30
|
export { FlowcraftError } from './chunk-BCRWXTWX.js';
|
|
27
31
|
export { PropertyEvaluator, UnsafeEvaluator } from './chunk-PH2IYZHV.js';
|
|
28
|
-
export {
|
|
32
|
+
export { FlowBuilder, createFlow } from './chunk-7FIOROIR.js';
|
|
29
33
|
export { BaseNode, isNodeClass } from './chunk-LNK7LZER.js';
|
|
30
34
|
//# sourceMappingURL=index.js.map
|
|
31
35
|
//# sourceMappingURL=index.js.map
|
package/dist/linter.d.ts
CHANGED
package/dist/linter.js
CHANGED
package/dist/logger.d.ts
CHANGED
package/dist/node.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { B as BaseNode, n as NodeContext, m as NodeResult } from '../types-B-Drn84R.js';
|
|
2
|
+
import '../errors.js';
|
|
3
|
+
import '../container.js';
|
|
4
|
+
|
|
5
|
+
declare class SleepNode extends BaseNode {
|
|
6
|
+
exec(_prepResult: any, context: NodeContext<Record<string, any>, any, any>): Promise<Omit<NodeResult, 'error'>>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { SleepNode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"sleep.js"}
|
package/dist/nodes/subflow.d.ts
CHANGED
package/dist/nodes/subflow.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { SubflowNode } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
1
|
+
export { SubflowNode } from '../chunk-UXIASXSG.js';
|
|
2
|
+
import '../chunk-FBPY44WL.js';
|
|
3
|
+
import '../chunk-ZLW4QOTS.js';
|
|
4
|
+
import '../chunk-N4NLAIEN.js';
|
|
5
|
+
import '../chunk-5BOUGXZO.js';
|
|
6
|
+
import '../chunk-XDI4TJHA.js';
|
|
7
7
|
import '../chunk-BCRWXTWX.js';
|
|
8
8
|
import '../chunk-LNK7LZER.js';
|
|
9
9
|
//# sourceMappingURL=subflow.js.map
|
package/dist/nodes/wait.d.ts
CHANGED
package/dist/nodes/wait.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { B as BaseNode, n as NodeContext, m as NodeResult } from '../types-B-Drn84R.js';
|
|
2
|
+
import '../errors.js';
|
|
3
|
+
import '../container.js';
|
|
4
|
+
|
|
5
|
+
declare class WebhookNode extends BaseNode {
|
|
6
|
+
prep(context: NodeContext<Record<string, any>, any, any>): Promise<any>;
|
|
7
|
+
exec(prepResult: {
|
|
8
|
+
url: string;
|
|
9
|
+
event: string;
|
|
10
|
+
}, _context: NodeContext<Record<string, any>, any, any>): Promise<Omit<NodeResult, 'error'>>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { WebhookNode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"webhook.js"}
|
|
@@ -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. */
|
|
@@ -35,6 +37,7 @@ declare abstract class BaseDistributedAdapter {
|
|
|
35
37
|
protected readonly runtime: FlowRuntime<any, any>;
|
|
36
38
|
protected readonly store: ICoordinationStore;
|
|
37
39
|
protected readonly serializer: ISerializer;
|
|
40
|
+
protected readonly logger: ILogger;
|
|
38
41
|
constructor(options: AdapterOptions);
|
|
39
42
|
/**
|
|
40
43
|
* Starts the worker, which begins listening for and processing jobs from the queue.
|
|
@@ -66,6 +69,16 @@ declare abstract class BaseDistributedAdapter {
|
|
|
66
69
|
payload?: WorkflowResult;
|
|
67
70
|
reason?: string;
|
|
68
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
|
+
}>;
|
|
69
82
|
/**
|
|
70
83
|
* Hook called at the start of job processing. Subclasses can override this
|
|
71
84
|
* to perform additional setup (e.g., timestamp tracking for reconciliation).
|
package/dist/runtime/adapter.js
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
export { BaseDistributedAdapter } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-MKNZBKSR.js';
|
|
5
|
-
import '../chunk-G5BGBPFP.js';
|
|
6
|
-
import '../chunk-CD3Q4N6V.js';
|
|
1
|
+
export { BaseDistributedAdapter } from '../chunk-5XPW6YEP.js';
|
|
2
|
+
import '../chunk-OPRR4TAO.js';
|
|
3
|
+
import '../chunk-SEI4Z3MO.js';
|
|
7
4
|
import '../chunk-DL7KVYZF.js';
|
|
8
5
|
import '../chunk-ONH7PIJZ.js';
|
|
9
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-LM4ACVHL.js';
|
|
10
7
|
import '../chunk-BC4G7OM6.js';
|
|
11
8
|
import '../chunk-RM677CNU.js';
|
|
12
|
-
import '../chunk-
|
|
13
|
-
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';
|
|
14
17
|
import '../chunk-HAZ26F3P.js';
|
|
15
|
-
import '../chunk-
|
|
16
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-N4NLAIEN.js';
|
|
19
|
+
import '../chunk-5BOUGXZO.js';
|
|
17
20
|
import '../chunk-4PELJWF7.js';
|
|
18
21
|
import '../chunk-CYHZ2YVH.js';
|
|
19
22
|
import '../chunk-WWGFIYKW.js';
|
|
20
|
-
import '../chunk-
|
|
23
|
+
import '../chunk-XDI4TJHA.js';
|
|
21
24
|
import '../chunk-BCRWXTWX.js';
|
|
22
25
|
import '../chunk-PH2IYZHV.js';
|
|
23
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,25 +1,28 @@
|
|
|
1
1
|
import '../chunk-NVJ3ZO3P.js';
|
|
2
2
|
import '../chunk-NVLZFLYM.js';
|
|
3
|
-
export { BaseDistributedAdapter } from '../chunk-
|
|
4
|
-
export { FlowRuntime } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-MKNZBKSR.js';
|
|
7
|
-
export { GraphTraverser } from '../chunk-G5BGBPFP.js';
|
|
8
|
-
import '../chunk-CD3Q4N6V.js';
|
|
3
|
+
export { BaseDistributedAdapter } from '../chunk-5XPW6YEP.js';
|
|
4
|
+
export { FlowRuntime } from '../chunk-OPRR4TAO.js';
|
|
5
|
+
import '../chunk-SEI4Z3MO.js';
|
|
9
6
|
import '../chunk-DL7KVYZF.js';
|
|
10
7
|
export { ClassNodeExecutor, FunctionNodeExecutor, NodeExecutor } from '../chunk-ONH7PIJZ.js';
|
|
11
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-LM4ACVHL.js';
|
|
12
9
|
import '../chunk-BC4G7OM6.js';
|
|
13
10
|
import '../chunk-RM677CNU.js';
|
|
14
|
-
import '../chunk-
|
|
15
|
-
|
|
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';
|
|
16
19
|
export { executeBatch, processResults } from '../chunk-HAZ26F3P.js';
|
|
17
|
-
import '../chunk-
|
|
18
|
-
export { WorkflowState } from '../chunk-
|
|
20
|
+
import '../chunk-N4NLAIEN.js';
|
|
21
|
+
export { WorkflowState } from '../chunk-5BOUGXZO.js';
|
|
19
22
|
import '../chunk-4PELJWF7.js';
|
|
20
23
|
import '../chunk-CYHZ2YVH.js';
|
|
21
24
|
import '../chunk-WWGFIYKW.js';
|
|
22
|
-
import '../chunk-
|
|
25
|
+
import '../chunk-XDI4TJHA.js';
|
|
23
26
|
import '../chunk-BCRWXTWX.js';
|
|
24
27
|
import '../chunk-PH2IYZHV.js';
|
|
25
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,22 +1,25 @@
|
|
|
1
|
-
export { FlowRuntime } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-MKNZBKSR.js';
|
|
4
|
-
import '../chunk-G5BGBPFP.js';
|
|
5
|
-
import '../chunk-CD3Q4N6V.js';
|
|
1
|
+
export { FlowRuntime } from '../chunk-OPRR4TAO.js';
|
|
2
|
+
import '../chunk-SEI4Z3MO.js';
|
|
6
3
|
import '../chunk-DL7KVYZF.js';
|
|
7
4
|
import '../chunk-ONH7PIJZ.js';
|
|
8
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-LM4ACVHL.js';
|
|
9
6
|
import '../chunk-BC4G7OM6.js';
|
|
10
7
|
import '../chunk-RM677CNU.js';
|
|
11
|
-
import '../chunk-
|
|
12
|
-
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';
|
|
13
16
|
import '../chunk-HAZ26F3P.js';
|
|
14
|
-
import '../chunk-
|
|
15
|
-
import '../chunk-
|
|
17
|
+
import '../chunk-N4NLAIEN.js';
|
|
18
|
+
import '../chunk-5BOUGXZO.js';
|
|
16
19
|
import '../chunk-4PELJWF7.js';
|
|
17
20
|
import '../chunk-CYHZ2YVH.js';
|
|
18
21
|
import '../chunk-WWGFIYKW.js';
|
|
19
|
-
import '../chunk-
|
|
22
|
+
import '../chunk-XDI4TJHA.js';
|
|
20
23
|
import '../chunk-BCRWXTWX.js';
|
|
21
24
|
import '../chunk-PH2IYZHV.js';
|
|
22
25
|
import '../chunk-LNK7LZER.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"scheduler.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
|