flowcraft 2.6.0 → 2.6.1
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/dist/analysis.d.ts +1 -1
- package/dist/{chunk-JLDHCI2O.js → chunk-2YLGY3R2.js} +4 -4
- package/dist/{chunk-JLDHCI2O.js.map → chunk-2YLGY3R2.js.map} +1 -1
- package/dist/{chunk-OPRR4TAO.js → chunk-34LDT5EG.js} +12 -9
- package/dist/chunk-34LDT5EG.js.map +1 -0
- package/dist/{chunk-XTW36KQZ.js → chunk-3YV6X6VQ.js} +4 -4
- package/dist/chunk-3YV6X6VQ.js.map +1 -0
- package/dist/{chunk-CYHZ2YVH.js → chunk-6X5BERRF.js} +8 -3
- package/dist/chunk-6X5BERRF.js.map +1 -0
- package/dist/{chunk-UXIASXSG.js → chunk-BTCZU2DJ.js} +3 -3
- package/dist/{chunk-UXIASXSG.js.map → chunk-BTCZU2DJ.js.map} +1 -1
- package/dist/{chunk-G53CSLBF.js → chunk-C3ZT7FNO.js} +3 -3
- package/dist/{chunk-G53CSLBF.js.map → chunk-C3ZT7FNO.js.map} +1 -1
- package/dist/{chunk-FBPY44WL.js → chunk-H4JTZYIT.js} +3 -3
- package/dist/{chunk-FBPY44WL.js.map → chunk-H4JTZYIT.js.map} +1 -1
- package/dist/chunk-HLN72CCU.js +43 -0
- package/dist/chunk-HLN72CCU.js.map +1 -0
- package/dist/{chunk-7FIOROIR.js → chunk-IWTFVGMK.js} +2 -2
- package/dist/{chunk-7FIOROIR.js.map → chunk-IWTFVGMK.js.map} +1 -1
- package/dist/{chunk-6MGLU3UU.js → chunk-NQORJ53O.js} +3 -3
- package/dist/{chunk-6MGLU3UU.js.map → chunk-NQORJ53O.js.map} +1 -1
- package/dist/{chunk-5XPW6YEP.js → chunk-O3QJFRXS.js} +4 -4
- package/dist/{chunk-5XPW6YEP.js.map → chunk-O3QJFRXS.js.map} +1 -1
- package/dist/{chunk-2ISKDTSN.js → chunk-QSQ2BSGG.js} +4 -4
- package/dist/{chunk-2ISKDTSN.js.map → chunk-QSQ2BSGG.js.map} +1 -1
- package/dist/{chunk-HAZ26F3P.js → chunk-SF5GQHUU.js} +12 -10
- package/dist/chunk-SF5GQHUU.js.map +1 -0
- package/dist/{chunk-SEI4Z3MO.js → chunk-VB7VNXR7.js} +3 -2
- package/dist/chunk-VB7VNXR7.js.map +1 -0
- package/dist/container-factory.d.ts +1 -1
- package/dist/container-factory.js +4 -4
- package/dist/context.d.ts +1 -1
- package/dist/error-mapper.d.ts +1 -1
- package/dist/evaluator.d.ts +1 -1
- package/dist/flow.d.ts +1 -1
- package/dist/flow.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -11
- package/dist/linter.d.ts +1 -1
- 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/subflow.d.ts +1 -1
- package/dist/nodes/subflow.js +2 -2
- package/dist/nodes/wait.d.ts +1 -1
- package/dist/nodes/webhook.d.ts +1 -1
- package/dist/runtime/adapter.d.ts +1 -1
- package/dist/runtime/adapter.js +9 -9
- package/dist/runtime/execution-context.d.ts +1 -1
- package/dist/runtime/executors.d.ts +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +9 -9
- package/dist/runtime/node-executor-factory.d.ts +1 -1
- package/dist/runtime/orchestrator.d.ts +1 -1
- package/dist/runtime/orchestrator.js +2 -2
- package/dist/runtime/orchestrators/step-by-step.d.ts +1 -1
- package/dist/runtime/orchestrators/step-by-step.js +2 -2
- package/dist/runtime/orchestrators/utils.d.ts +1 -1
- package/dist/runtime/orchestrators/utils.js +1 -1
- package/dist/runtime/runtime.d.ts +1 -1
- package/dist/runtime/runtime.js +8 -8
- package/dist/runtime/scheduler.d.ts +1 -1
- package/dist/runtime/state.d.ts +1 -1
- package/dist/runtime/traverser.d.ts +1 -1
- package/dist/runtime/traverser.js +1 -1
- 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 +1 -1
- package/dist/sanitizer.d.ts +2 -1
- package/dist/sanitizer.js +1 -1
- package/dist/serializer.d.ts +1 -1
- package/dist/serializer.js +1 -1
- package/dist/testing/event-logger.d.ts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +12 -12
- package/dist/testing/run-with-trace.d.ts +1 -1
- package/dist/testing/run-with-trace.js +10 -10
- package/dist/testing/stepper.d.ts +1 -1
- package/dist/testing/stepper.js +4 -4
- package/dist/{types-B-Drn84R.d.ts → types-Cv5JcMwI.d.ts} +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-CYHZ2YVH.js.map +0 -1
- package/dist/chunk-DSYAC4WB.js +0 -27
- package/dist/chunk-DSYAC4WB.js.map +0 -1
- package/dist/chunk-HAZ26F3P.js.map +0 -1
- package/dist/chunk-OPRR4TAO.js.map +0 -1
- package/dist/chunk-SEI4Z3MO.js.map +0 -1
- package/dist/chunk-XTW36KQZ.js.map +0 -1
package/dist/logger.d.ts
CHANGED
package/dist/node.d.ts
CHANGED
package/dist/nodes/sleep.d.ts
CHANGED
package/dist/nodes/subflow.d.ts
CHANGED
package/dist/nodes/subflow.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { SubflowNode } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { SubflowNode } from '../chunk-BTCZU2DJ.js';
|
|
2
|
+
import '../chunk-H4JTZYIT.js';
|
|
3
3
|
import '../chunk-ZLW4QOTS.js';
|
|
4
4
|
import '../chunk-N4NLAIEN.js';
|
|
5
5
|
import '../chunk-5BOUGXZO.js';
|
package/dist/nodes/wait.d.ts
CHANGED
package/dist/nodes/webhook.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-Cv5JcMwI.js';
|
|
2
2
|
import '../errors.js';
|
|
3
3
|
import '../container.js';
|
|
4
4
|
|
package/dist/runtime/adapter.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export { BaseDistributedAdapter } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { BaseDistributedAdapter } from '../chunk-O3QJFRXS.js';
|
|
2
|
+
import '../chunk-34LDT5EG.js';
|
|
3
|
+
import '../chunk-VB7VNXR7.js';
|
|
4
4
|
import '../chunk-DL7KVYZF.js';
|
|
5
5
|
import '../chunk-ONH7PIJZ.js';
|
|
6
6
|
import '../chunk-LM4ACVHL.js';
|
|
7
7
|
import '../chunk-BC4G7OM6.js';
|
|
8
8
|
import '../chunk-RM677CNU.js';
|
|
9
9
|
import '../chunk-HNHM3FDK.js';
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-BTCZU2DJ.js';
|
|
11
|
+
import '../chunk-H4JTZYIT.js';
|
|
12
12
|
import '../chunk-IDTYHLDQ.js';
|
|
13
13
|
import '../chunk-I53JB2KW.js';
|
|
14
|
-
import '../chunk-
|
|
14
|
+
import '../chunk-HLN72CCU.js';
|
|
15
15
|
import '../chunk-ZLW4QOTS.js';
|
|
16
|
-
import '../chunk-
|
|
17
|
-
import '../chunk-
|
|
16
|
+
import '../chunk-3YV6X6VQ.js';
|
|
17
|
+
import '../chunk-SF5GQHUU.js';
|
|
18
18
|
import '../chunk-N4NLAIEN.js';
|
|
19
19
|
import '../chunk-5BOUGXZO.js';
|
|
20
20
|
import '../chunk-4PELJWF7.js';
|
|
21
|
-
import '../chunk-
|
|
21
|
+
import '../chunk-6X5BERRF.js';
|
|
22
22
|
import '../chunk-WWGFIYKW.js';
|
|
23
23
|
import '../chunk-XDI4TJHA.js';
|
|
24
24
|
import '../chunk-BCRWXTWX.js';
|
|
@@ -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-Cv5JcMwI.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-Cv5JcMwI.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,26 +1,26 @@
|
|
|
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-
|
|
3
|
+
export { BaseDistributedAdapter } from '../chunk-O3QJFRXS.js';
|
|
4
|
+
export { FlowRuntime } from '../chunk-34LDT5EG.js';
|
|
5
|
+
import '../chunk-VB7VNXR7.js';
|
|
6
6
|
import '../chunk-DL7KVYZF.js';
|
|
7
7
|
export { ClassNodeExecutor, FunctionNodeExecutor, NodeExecutor } from '../chunk-ONH7PIJZ.js';
|
|
8
8
|
import '../chunk-LM4ACVHL.js';
|
|
9
9
|
import '../chunk-BC4G7OM6.js';
|
|
10
10
|
import '../chunk-RM677CNU.js';
|
|
11
11
|
import '../chunk-HNHM3FDK.js';
|
|
12
|
-
import '../chunk-
|
|
13
|
-
export { GraphTraverser } from '../chunk-
|
|
12
|
+
import '../chunk-BTCZU2DJ.js';
|
|
13
|
+
export { GraphTraverser } from '../chunk-H4JTZYIT.js';
|
|
14
14
|
import '../chunk-IDTYHLDQ.js';
|
|
15
15
|
import '../chunk-I53JB2KW.js';
|
|
16
|
-
import '../chunk-
|
|
16
|
+
import '../chunk-HLN72CCU.js';
|
|
17
17
|
import '../chunk-ZLW4QOTS.js';
|
|
18
|
-
export { DefaultOrchestrator } from '../chunk-
|
|
19
|
-
export { executeBatch, processResults } from '../chunk-
|
|
18
|
+
export { DefaultOrchestrator } from '../chunk-3YV6X6VQ.js';
|
|
19
|
+
export { executeBatch, processResults } from '../chunk-SF5GQHUU.js';
|
|
20
20
|
import '../chunk-N4NLAIEN.js';
|
|
21
21
|
export { WorkflowState } from '../chunk-5BOUGXZO.js';
|
|
22
22
|
import '../chunk-4PELJWF7.js';
|
|
23
|
-
import '../chunk-
|
|
23
|
+
import '../chunk-6X5BERRF.js';
|
|
24
24
|
import '../chunk-WWGFIYKW.js';
|
|
25
25
|
import '../chunk-XDI4TJHA.js';
|
|
26
26
|
import '../chunk-BCRWXTWX.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IOrchestrator, L as ExecutionContext, G as GraphTraverser, K as WorkflowResult } from '../types-
|
|
1
|
+
import { I as IOrchestrator, L as ExecutionContext, G as GraphTraverser, K as WorkflowResult } from '../types-Cv5JcMwI.js';
|
|
2
2
|
import '../errors.js';
|
|
3
3
|
import '../container.js';
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { DefaultOrchestrator } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { DefaultOrchestrator } from '../chunk-3YV6X6VQ.js';
|
|
2
|
+
import '../chunk-SF5GQHUU.js';
|
|
3
3
|
import '../chunk-N4NLAIEN.js';
|
|
4
4
|
import '../chunk-5BOUGXZO.js';
|
|
5
5
|
import '../chunk-XDI4TJHA.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IOrchestrator, L as ExecutionContext, G as GraphTraverser, K as WorkflowResult } from '../../types-
|
|
1
|
+
import { I as IOrchestrator, L as ExecutionContext, G as GraphTraverser, K as WorkflowResult } from '../../types-Cv5JcMwI.js';
|
|
2
2
|
import '../../errors.js';
|
|
3
3
|
import '../../container.js';
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { StepByStepOrchestrator } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { StepByStepOrchestrator } from '../../chunk-C3ZT7FNO.js';
|
|
2
|
+
import '../../chunk-SF5GQHUU.js';
|
|
3
3
|
import '../../chunk-BCRWXTWX.js';
|
|
4
4
|
//# sourceMappingURL=step-by-step.js.map
|
|
5
5
|
//# sourceMappingURL=step-by-step.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as WorkflowBlueprint, W as WorkflowState, N as NodeExecutionResult, G as GraphTraverser } from '../../types-
|
|
1
|
+
import { h as WorkflowBlueprint, W as WorkflowState, N as NodeExecutionResult, G as GraphTraverser } from '../../types-Cv5JcMwI.js';
|
|
2
2
|
import '../../errors.js';
|
|
3
3
|
import '../../container.js';
|
|
4
4
|
|
package/dist/runtime/runtime.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export { FlowRuntime } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { FlowRuntime } from '../chunk-34LDT5EG.js';
|
|
2
|
+
import '../chunk-VB7VNXR7.js';
|
|
3
3
|
import '../chunk-DL7KVYZF.js';
|
|
4
4
|
import '../chunk-ONH7PIJZ.js';
|
|
5
5
|
import '../chunk-LM4ACVHL.js';
|
|
6
6
|
import '../chunk-BC4G7OM6.js';
|
|
7
7
|
import '../chunk-RM677CNU.js';
|
|
8
8
|
import '../chunk-HNHM3FDK.js';
|
|
9
|
-
import '../chunk-
|
|
10
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-BTCZU2DJ.js';
|
|
10
|
+
import '../chunk-H4JTZYIT.js';
|
|
11
11
|
import '../chunk-IDTYHLDQ.js';
|
|
12
12
|
import '../chunk-I53JB2KW.js';
|
|
13
|
-
import '../chunk-
|
|
13
|
+
import '../chunk-HLN72CCU.js';
|
|
14
14
|
import '../chunk-ZLW4QOTS.js';
|
|
15
|
-
import '../chunk-
|
|
16
|
-
import '../chunk-
|
|
15
|
+
import '../chunk-3YV6X6VQ.js';
|
|
16
|
+
import '../chunk-SF5GQHUU.js';
|
|
17
17
|
import '../chunk-N4NLAIEN.js';
|
|
18
18
|
import '../chunk-5BOUGXZO.js';
|
|
19
19
|
import '../chunk-4PELJWF7.js';
|
|
20
|
-
import '../chunk-
|
|
20
|
+
import '../chunk-6X5BERRF.js';
|
|
21
21
|
import '../chunk-WWGFIYKW.js';
|
|
22
22
|
import '../chunk-XDI4TJHA.js';
|
|
23
23
|
import '../chunk-BCRWXTWX.js';
|
package/dist/runtime/state.d.ts
CHANGED
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-Cv5JcMwI.js';
|
|
2
2
|
import '../errors.js';
|
|
3
3
|
import '../container.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-Cv5JcMwI.js';
|
|
2
2
|
import '../errors.js';
|
|
3
3
|
import '../container.js';
|
|
4
4
|
|
package/dist/sanitizer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as WorkflowBlueprint } from './types-
|
|
1
|
+
import { h as WorkflowBlueprint } from './types-Cv5JcMwI.js';
|
|
2
2
|
import './errors.js';
|
|
3
3
|
import './container.js';
|
|
4
4
|
|
|
@@ -6,6 +6,7 @@ import './container.js';
|
|
|
6
6
|
* Sanitizes a raw workflow blueprint by removing extra properties
|
|
7
7
|
* added by UI tools (e.g., position, style) and keeping only the
|
|
8
8
|
* properties defined in NodeDefinition and EdgeDefinition.
|
|
9
|
+
* Also prevents prototype pollution attacks.
|
|
9
10
|
*/
|
|
10
11
|
declare function sanitizeBlueprint(raw: any): WorkflowBlueprint;
|
|
11
12
|
|
package/dist/sanitizer.js
CHANGED
package/dist/serializer.d.ts
CHANGED
package/dist/serializer.js
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-Cv5JcMwI.js';
|
|
5
5
|
import '../errors.js';
|
|
6
6
|
import '../container.js';
|
package/dist/testing/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
export { runWithTrace } from '../chunk-
|
|
1
|
+
export { runWithTrace } from '../chunk-NQORJ53O.js';
|
|
2
2
|
export { InMemoryEventLogger } from '../chunk-MUYLRTSR.js';
|
|
3
|
-
export { createStepper } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
3
|
+
export { createStepper } from '../chunk-2YLGY3R2.js';
|
|
4
|
+
import '../chunk-C3ZT7FNO.js';
|
|
5
5
|
import '../chunk-NVJ3ZO3P.js';
|
|
6
6
|
import '../chunk-NVLZFLYM.js';
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-O3QJFRXS.js';
|
|
8
|
+
import '../chunk-34LDT5EG.js';
|
|
9
|
+
import '../chunk-VB7VNXR7.js';
|
|
10
10
|
import '../chunk-DL7KVYZF.js';
|
|
11
11
|
import '../chunk-ONH7PIJZ.js';
|
|
12
12
|
import '../chunk-LM4ACVHL.js';
|
|
13
13
|
import '../chunk-BC4G7OM6.js';
|
|
14
14
|
import '../chunk-RM677CNU.js';
|
|
15
15
|
import '../chunk-HNHM3FDK.js';
|
|
16
|
-
import '../chunk-
|
|
17
|
-
import '../chunk-
|
|
16
|
+
import '../chunk-BTCZU2DJ.js';
|
|
17
|
+
import '../chunk-H4JTZYIT.js';
|
|
18
18
|
import '../chunk-IDTYHLDQ.js';
|
|
19
19
|
import '../chunk-I53JB2KW.js';
|
|
20
|
-
import '../chunk-
|
|
20
|
+
import '../chunk-HLN72CCU.js';
|
|
21
21
|
import '../chunk-ZLW4QOTS.js';
|
|
22
|
-
import '../chunk-
|
|
23
|
-
import '../chunk-
|
|
22
|
+
import '../chunk-3YV6X6VQ.js';
|
|
23
|
+
import '../chunk-SF5GQHUU.js';
|
|
24
24
|
import '../chunk-N4NLAIEN.js';
|
|
25
25
|
import '../chunk-5BOUGXZO.js';
|
|
26
26
|
import '../chunk-4PELJWF7.js';
|
|
27
|
-
import '../chunk-
|
|
27
|
+
import '../chunk-6X5BERRF.js';
|
|
28
28
|
import '../chunk-WWGFIYKW.js';
|
|
29
29
|
import '../chunk-XDI4TJHA.js';
|
|
30
30
|
import '../chunk-BCRWXTWX.js';
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export { runWithTrace } from '../chunk-
|
|
1
|
+
export { runWithTrace } from '../chunk-NQORJ53O.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-
|
|
7
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-O3QJFRXS.js';
|
|
6
|
+
import '../chunk-34LDT5EG.js';
|
|
7
|
+
import '../chunk-VB7VNXR7.js';
|
|
8
8
|
import '../chunk-DL7KVYZF.js';
|
|
9
9
|
import '../chunk-ONH7PIJZ.js';
|
|
10
10
|
import '../chunk-LM4ACVHL.js';
|
|
11
11
|
import '../chunk-BC4G7OM6.js';
|
|
12
12
|
import '../chunk-RM677CNU.js';
|
|
13
13
|
import '../chunk-HNHM3FDK.js';
|
|
14
|
-
import '../chunk-
|
|
15
|
-
import '../chunk-
|
|
14
|
+
import '../chunk-BTCZU2DJ.js';
|
|
15
|
+
import '../chunk-H4JTZYIT.js';
|
|
16
16
|
import '../chunk-IDTYHLDQ.js';
|
|
17
17
|
import '../chunk-I53JB2KW.js';
|
|
18
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-HLN72CCU.js';
|
|
19
19
|
import '../chunk-ZLW4QOTS.js';
|
|
20
|
-
import '../chunk-
|
|
21
|
-
import '../chunk-
|
|
20
|
+
import '../chunk-3YV6X6VQ.js';
|
|
21
|
+
import '../chunk-SF5GQHUU.js';
|
|
22
22
|
import '../chunk-N4NLAIEN.js';
|
|
23
23
|
import '../chunk-5BOUGXZO.js';
|
|
24
24
|
import '../chunk-4PELJWF7.js';
|
|
25
|
-
import '../chunk-
|
|
25
|
+
import '../chunk-6X5BERRF.js';
|
|
26
26
|
import '../chunk-WWGFIYKW.js';
|
|
27
27
|
import '../chunk-XDI4TJHA.js';
|
|
28
28
|
import '../chunk-BCRWXTWX.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-Cv5JcMwI.js';
|
|
2
2
|
import '../errors.js';
|
|
3
3
|
import '../container.js';
|
|
4
4
|
|
package/dist/testing/stepper.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { createStepper } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { createStepper } from '../chunk-2YLGY3R2.js';
|
|
2
|
+
import '../chunk-C3ZT7FNO.js';
|
|
3
|
+
import '../chunk-H4JTZYIT.js';
|
|
4
4
|
import '../chunk-ZLW4QOTS.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-SF5GQHUU.js';
|
|
6
6
|
import '../chunk-N4NLAIEN.js';
|
|
7
7
|
import '../chunk-5BOUGXZO.js';
|
|
8
8
|
import '../chunk-XDI4TJHA.js';
|
|
@@ -231,7 +231,7 @@ declare class FlowRuntime<TContext extends Record<string, any>, TDependencies ex
|
|
|
231
231
|
signal?: AbortSignal;
|
|
232
232
|
concurrency?: number;
|
|
233
233
|
}): Promise<WorkflowResult<TContext>>;
|
|
234
|
-
startScheduler(): void;
|
|
234
|
+
startScheduler(checkIntervalMs?: number): void;
|
|
235
235
|
stopScheduler(): void;
|
|
236
236
|
private _setupResumedExecutionContext;
|
|
237
237
|
resume(blueprint: WorkflowBlueprint, serializedContext: string, resumeData: {
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './errors.js';
|
|
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-
|
|
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-Cv5JcMwI.js';
|
|
3
3
|
import './container.js';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/serializer.ts"],"names":[],"mappings":";AASO,IAAM,iBAAN,MAA4C;AAAA,EAC1C,SAAA,GAAY,KAAA;AAAA,EAEpB,UAAU,IAAA,EAAmC;AAC5C,IAAA,KAAA,MAAW,KAAA,IAAS,MAAA,CAAO,MAAA,CAAO,IAAI,CAAA,EAAG;AACxC,MAAA,IAAI,KAAA,YAAiB,GAAA,IAAO,KAAA,YAAiB,GAAA,IAAO,iBAAiB,IAAA,EAAM;AAC1E,QAAA,IAAI,CAAC,KAAK,SAAA,EAAW;AACpB,UAAA,OAAA,CAAQ,IAAA;AAAA,YACP;AAAA,WACD;AACA,UAAA,IAAA,CAAK,SAAA,GAAY,IAAA;AAAA,QAClB;AAAA,MACD;AAAA,IACD;AACA,IAAA,OAAO,IAAA,CAAK,UAAU,IAAI,CAAA;AAAA,EAC3B;AAAA,EAEA,YAAY,IAAA,EAAmC;AAC9C,IAAA,OAAO,IAAA,CAAK,MAAM,IAAI,CAAA;AAAA,EACvB;AACD","file":"chunk-CYHZ2YVH.js","sourcesContent":["import type { ISerializer } from './types'\n\n/**\n * A default serializer using standard JSON.\n *\n * @warning This implementation is lossy and does not handle complex data types\n * like `Date`, `Map`, `Set`, `undefined`, etc. It is recommended to provide a robust\n * serializer like `superjson` if working with complex data types.\n */\nexport class JsonSerializer implements ISerializer {\n\tprivate hasWarned = false\n\n\tserialize(data: Record<string, any>): string {\n\t\tfor (const value of Object.values(data)) {\n\t\t\tif (value instanceof Map || value instanceof Set || value instanceof Date) {\n\t\t\t\tif (!this.hasWarned) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t'[Flowcraft] Warning: Default JsonSerializer does not support Map, Set, or Date types. Data may be lost. Consider providing a custom ISerializer (e.g., using superjson).',\n\t\t\t\t\t)\n\t\t\t\t\tthis.hasWarned = true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn JSON.stringify(data)\n\t}\n\n\tdeserialize(text: string): Record<string, any> {\n\t\treturn JSON.parse(text)\n\t}\n}\n"]}
|
package/dist/chunk-DSYAC4WB.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// src/sanitizer.ts
|
|
2
|
-
function sanitizeBlueprint(raw) {
|
|
3
|
-
const nodes = raw.nodes?.map((node) => ({
|
|
4
|
-
id: node.id,
|
|
5
|
-
uses: node.uses,
|
|
6
|
-
params: node.params,
|
|
7
|
-
inputs: node.inputs,
|
|
8
|
-
config: node.config
|
|
9
|
-
})) || [];
|
|
10
|
-
const edges = raw.edges?.map((edge) => ({
|
|
11
|
-
source: edge.source,
|
|
12
|
-
target: edge.target,
|
|
13
|
-
action: edge.action,
|
|
14
|
-
condition: edge.condition,
|
|
15
|
-
transform: edge.transform
|
|
16
|
-
})) || [];
|
|
17
|
-
return {
|
|
18
|
-
id: raw.id,
|
|
19
|
-
nodes,
|
|
20
|
-
edges,
|
|
21
|
-
metadata: raw.metadata
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { sanitizeBlueprint };
|
|
26
|
-
//# sourceMappingURL=chunk-DSYAC4WB.js.map
|
|
27
|
-
//# sourceMappingURL=chunk-DSYAC4WB.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/sanitizer.ts"],"names":[],"mappings":";AAOO,SAAS,kBAAkB,GAAA,EAA6B;AAC9D,EAAA,MAAM,KAAA,GACL,GAAA,CAAI,KAAA,EAAO,GAAA,CAAI,CAAC,IAAA,MAAe;AAAA,IAC9B,IAAI,IAAA,CAAK,EAAA;AAAA,IACT,MAAM,IAAA,CAAK,IAAA;AAAA,IACX,QAAQ,IAAA,CAAK,MAAA;AAAA,IACb,QAAQ,IAAA,CAAK,MAAA;AAAA,IACb,QAAQ,IAAA,CAAK;AAAA,GACd,CAAE,KAAK,EAAC;AAET,EAAA,MAAM,KAAA,GACL,GAAA,CAAI,KAAA,EAAO,GAAA,CAAI,CAAC,IAAA,MAAe;AAAA,IAC9B,QAAQ,IAAA,CAAK,MAAA;AAAA,IACb,QAAQ,IAAA,CAAK,MAAA;AAAA,IACb,QAAQ,IAAA,CAAK,MAAA;AAAA,IACb,WAAW,IAAA,CAAK,SAAA;AAAA,IAChB,WAAW,IAAA,CAAK;AAAA,GACjB,CAAE,KAAK,EAAC;AAET,EAAA,OAAO;AAAA,IACN,IAAI,GAAA,CAAI,EAAA;AAAA,IACR,KAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAU,GAAA,CAAI;AAAA,GACf;AACD","file":"chunk-DSYAC4WB.js","sourcesContent":["import type { EdgeDefinition, NodeDefinition, WorkflowBlueprint } from './types'\n\n/**\n * Sanitizes a raw workflow blueprint by removing extra properties\n * added by UI tools (e.g., position, style) and keeping only the\n * properties defined in NodeDefinition and EdgeDefinition.\n */\nexport function sanitizeBlueprint(raw: any): WorkflowBlueprint {\n\tconst nodes: NodeDefinition[] =\n\t\traw.nodes?.map((node: any) => ({\n\t\t\tid: node.id,\n\t\t\tuses: node.uses,\n\t\t\tparams: node.params,\n\t\t\tinputs: node.inputs,\n\t\t\tconfig: node.config,\n\t\t})) || []\n\n\tconst edges: EdgeDefinition[] =\n\t\traw.edges?.map((edge: any) => ({\n\t\t\tsource: edge.source,\n\t\t\ttarget: edge.target,\n\t\t\taction: edge.action,\n\t\t\tcondition: edge.condition,\n\t\t\ttransform: edge.transform,\n\t\t})) || []\n\n\treturn {\n\t\tid: raw.id,\n\t\tnodes,\n\t\tedges,\n\t\tmetadata: raw.metadata,\n\t}\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/runtime/orchestrators/utils.ts"],"names":["nodeId"],"mappings":"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","file":"chunk-HAZ26F3P.js","sourcesContent":["import { FlowcraftError } from '../../errors'\nimport type { NodeDefinition, WorkflowBlueprint } from '../../types'\nimport type { NodeExecutionResult } from '../executors'\nimport type { WorkflowState } from '../state'\nimport type { GraphTraverser } from '../traverser'\n\nexport async function executeBatch(\n\treadyNodes: Array<{ nodeId: string; nodeDef: any }>,\n\tblueprint: WorkflowBlueprint,\n\tstate: WorkflowState<any>,\n\texecutorFactory: (nodeId: string) => any,\n\truntime: any,\n\tmaxConcurrency?: number,\n): Promise<\n\tArray<\n\t\t| { status: 'fulfilled'; value: { nodeId: string; executionResult: NodeExecutionResult } }\n\t\t| { status: 'rejected'; reason: { nodeId: string; error: unknown } }\n\t>\n> {\n\tconst concurrency = maxConcurrency || readyNodes.length\n\tconst results: Array<\n\t\t| { status: 'fulfilled'; value: { nodeId: string; executionResult: NodeExecutionResult } }\n\t\t| { status: 'rejected'; reason: { nodeId: string; error: unknown } }\n\t> = []\n\n\tfor (let i = 0; i < readyNodes.length; i += concurrency) {\n\t\tconst batch = readyNodes.slice(i, i + concurrency)\n\t\tconst batchPromises = batch.map(async ({ nodeId }) => {\n\t\t\ttry {\n\t\t\t\tconst executor = executorFactory(nodeId)\n\t\t\t\tif (!executor) throw new Error(`No executor for node ${nodeId}`)\n\t\t\t\tconst executionResult = await executor.execute(\n\t\t\t\t\tawait runtime.resolveNodeInput(nodeId, blueprint, state.getContext()),\n\t\t\t\t)\n\t\t\t\tresults.push({\n\t\t\t\t\tstatus: 'fulfilled' as const,\n\t\t\t\t\tvalue: { nodeId, executionResult },\n\t\t\t\t})\n\t\t\t} catch (error) {\n\t\t\t\tresults.push({\n\t\t\t\t\tstatus: 'rejected' as const,\n\t\t\t\t\treason: { nodeId, error },\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\tawait Promise.all(batchPromises)\n\t}\n\n\treturn results\n}\n\nexport async function processResults(\n\tsettledResults: Array<\n\t\t| { status: 'fulfilled'; value: { nodeId: string; executionResult: NodeExecutionResult } }\n\t\t| { status: 'rejected'; reason: { nodeId: string; error: unknown } }\n\t>,\n\ttraverser: GraphTraverser,\n\tstate: WorkflowState<any>,\n\truntime: any,\n\t_blueprint: WorkflowBlueprint,\n\texecutionId?: string,\n): Promise<void> {\n\tfor (const promiseResult of settledResults) {\n\t\tif (promiseResult.status === 'rejected') {\n\t\t\tconst { nodeId, error } = promiseResult.reason\n\t\t\tif (error instanceof FlowcraftError && error.message.includes('cancelled')) {\n\t\t\t\tthrow error\n\t\t\t}\n\t\t\tstate.addError(nodeId, error as Error)\n\t\t\tcontinue\n\t\t}\n\n\t\tconst { nodeId, executionResult } = promiseResult.value\n\n\t\tif (executionResult.status === 'success') {\n\t\t\tconst result = executionResult.result\n\t\t\tstate.addCompletedNode(nodeId, result.output)\n\t\t\tif (result._fallbackExecuted) {\n\t\t\t\tstate.markFallbackExecuted()\n\t\t\t}\n\n\t\t\tif (result.dynamicNodes && result.dynamicNodes.length > 0) {\n\t\t\t\tconst gatherNodeId = result.output?.gatherNodeId\n\t\t\t\tfor (const dynamicNode of result.dynamicNodes) {\n\t\t\t\t\ttraverser.addDynamicNode(dynamicNode.id, dynamicNode, nodeId, gatherNodeId)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst matched = await runtime.determineNextNodes(\n\t\t\t\ttraverser.getDynamicBlueprint(),\n\t\t\t\tnodeId,\n\t\t\t\tresult,\n\t\t\t\tstate.getContext(),\n\t\t\t\texecutionId,\n\t\t\t)\n\n\t\t\tconst loopControllerMatch = matched.find(\n\t\t\t\t(m: { node: NodeDefinition; edge: any }) => m.node.uses === 'loop-controller',\n\t\t\t)\n\t\t\tconst finalMatched = loopControllerMatch ? [loopControllerMatch] : matched\n\n\t\t\tfor (const { node, edge } of finalMatched) {\n\t\t\t\tawait runtime.applyEdgeTransform(edge, result, node, state.getContext(), traverser.getAllPredecessors())\n\t\t\t}\n\n\t\t\ttraverser.markNodeCompleted(\n\t\t\t\tnodeId,\n\t\t\t\tresult,\n\t\t\t\tfinalMatched.map((m: { node: NodeDefinition; edge: any }) => m.node),\n\t\t\t)\n\t\t} else if (executionResult.status === 'failed_with_fallback') {\n\t\t\tconst { fallbackNodeId, error } = executionResult\n\t\t\tconst blueprint = traverser.getDynamicBlueprint()\n\t\t\tconst fallbackNodeDef = blueprint.nodes.find((n) => n.id === fallbackNodeId)\n\n\t\t\tif (!fallbackNodeDef) {\n\t\t\t\tconst notFoundError = new FlowcraftError(`Fallback node '${fallbackNodeId}' not found in blueprint.`, {\n\t\t\t\t\tnodeId,\n\t\t\t\t\tcause: error,\n\t\t\t\t})\n\t\t\t\tstate.addError(nodeId, notFoundError)\n\t\t\t} else {\n\t\t\t\tstate.addCompletedNode(nodeId, null)\n\t\t\t\tstate.markFallbackExecuted()\n\n\t\t\t\ttraverser.markNodeCompleted(nodeId, { action: 'fallback', output: null, _fallbackExecuted: true }, [\n\t\t\t\t\tfallbackNodeDef,\n\t\t\t\t])\n\t\t\t}\n\t\t} else {\n\t\t\tstate.addError(nodeId, executionResult.error)\n\t\t}\n\t}\n}\n"]}
|