@workglow/task-graph 0.0.86 → 0.0.87
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/browser.js +1399 -311
- package/dist/browser.js.map +16 -8
- package/dist/bun.js +1399 -311
- package/dist/bun.js.map +16 -8
- package/dist/node.js +1399 -311
- package/dist/node.js.map +16 -8
- package/dist/task/BatchTask.d.ts +154 -0
- package/dist/task/BatchTask.d.ts.map +1 -0
- package/dist/task/ForEachTask.d.ts +120 -0
- package/dist/task/ForEachTask.d.ts.map +1 -0
- package/dist/task/IteratorTask.d.ts +197 -0
- package/dist/task/IteratorTask.d.ts.map +1 -0
- package/dist/task/IteratorTaskRunner.d.ts +63 -0
- package/dist/task/IteratorTaskRunner.d.ts.map +1 -0
- package/dist/task/MapTask.d.ts +134 -0
- package/dist/task/MapTask.d.ts.map +1 -0
- package/dist/task/ReduceTask.d.ts +155 -0
- package/dist/task/ReduceTask.d.ts.map +1 -0
- package/dist/task/WhileTask.d.ts +176 -0
- package/dist/task/WhileTask.d.ts.map +1 -0
- package/dist/task/index.d.ts +13 -1
- package/dist/task/index.d.ts.map +1 -1
- package/dist/task-graph/Dataflow.d.ts.map +1 -1
- package/dist/task-graph/Workflow.d.ts +94 -8
- package/dist/task-graph/Workflow.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapTask.d.ts","sourceRoot":"","sources":["../../src/task/MapTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAOrD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,kBAAkB;IACvD;;;;OAIG;IACH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ier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { DataPortSchema } from "@workglow/util";
|
|
7
|
+
import { TaskGraph } from "../task-graph/TaskGraph";
|
|
8
|
+
import { IteratorTask, IteratorTaskConfig } from "./IteratorTask";
|
|
9
|
+
import type { IExecuteContext } from "./ITask";
|
|
10
|
+
import type { TaskInput, TaskOutput, TaskTypeName } from "./TaskTypes";
|
|
11
|
+
/**
|
|
12
|
+
* Configuration for ReduceTask.
|
|
13
|
+
*/
|
|
14
|
+
export interface ReduceTaskConfig<Accumulator = unknown> extends IteratorTaskConfig {
|
|
15
|
+
/**
|
|
16
|
+
* The initial value for the accumulator.
|
|
17
|
+
* This is the starting value before processing any items.
|
|
18
|
+
*/
|
|
19
|
+
readonly initialValue?: Accumulator;
|
|
20
|
+
/**
|
|
21
|
+
* Name of the accumulator port in the inner workflow input.
|
|
22
|
+
* @default "accumulator"
|
|
23
|
+
*/
|
|
24
|
+
readonly accumulatorPort?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Name of the current item port in the inner workflow input.
|
|
27
|
+
* @default "currentItem"
|
|
28
|
+
*/
|
|
29
|
+
readonly currentItemPort?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Name of the index port in the inner workflow input.
|
|
32
|
+
* @default "index"
|
|
33
|
+
*/
|
|
34
|
+
readonly indexPort?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* ReduceTask processes array elements sequentially with an accumulator.
|
|
38
|
+
*
|
|
39
|
+
* This task implements the functional reduce/fold pattern:
|
|
40
|
+
* - Starts with an initial accumulator value
|
|
41
|
+
* - Processes items one at a time (always sequential)
|
|
42
|
+
* - Passes accumulator, current item, and index to each iteration
|
|
43
|
+
* - Uses the output as the new accumulator for the next iteration
|
|
44
|
+
*
|
|
45
|
+
* ## Features
|
|
46
|
+
*
|
|
47
|
+
* - Sequential-only execution (accumulator pattern requires it)
|
|
48
|
+
* - Configurable initial value
|
|
49
|
+
* - Access to accumulator, current item, and index
|
|
50
|
+
* - Final output is the last accumulator value
|
|
51
|
+
*
|
|
52
|
+
* ## Usage
|
|
53
|
+
*
|
|
54
|
+
* ```typescript
|
|
55
|
+
* // Sum all numbers
|
|
56
|
+
* workflow
|
|
57
|
+
* .input({ numbers: [1, 2, 3, 4, 5] })
|
|
58
|
+
* .reduce({ initialValue: { sum: 0 } })
|
|
59
|
+
* .addToSum() // receives { accumulator, currentItem, index }
|
|
60
|
+
* .endReduce()
|
|
61
|
+
* // Result: { sum: 15 }
|
|
62
|
+
*
|
|
63
|
+
* // Build a string from parts
|
|
64
|
+
* workflow
|
|
65
|
+
* .reduce({ initialValue: { text: "" } })
|
|
66
|
+
* .appendText()
|
|
67
|
+
* .endReduce()
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* @template Input - The input type containing the array to reduce
|
|
71
|
+
* @template Output - The output/accumulator type
|
|
72
|
+
* @template Config - The configuration type
|
|
73
|
+
*/
|
|
74
|
+
export declare class ReduceTask<Input extends TaskInput = TaskInput, Output extends TaskOutput = TaskOutput, Config extends ReduceTaskConfig<Output> = ReduceTaskConfig<Output>> extends IteratorTask<Input, Output, Config> {
|
|
75
|
+
static type: TaskTypeName;
|
|
76
|
+
static category: string;
|
|
77
|
+
static title: string;
|
|
78
|
+
static description: string;
|
|
79
|
+
constructor(input?: Partial<Input>, config?: Partial<Config>);
|
|
80
|
+
/**
|
|
81
|
+
* Gets the initial accumulator value.
|
|
82
|
+
*/
|
|
83
|
+
get initialValue(): Output;
|
|
84
|
+
/**
|
|
85
|
+
* Gets the accumulator port name.
|
|
86
|
+
*/
|
|
87
|
+
get accumulatorPort(): string;
|
|
88
|
+
/**
|
|
89
|
+
* Gets the current item port name.
|
|
90
|
+
*/
|
|
91
|
+
get currentItemPort(): string;
|
|
92
|
+
/**
|
|
93
|
+
* Gets the index port name.
|
|
94
|
+
*/
|
|
95
|
+
get indexPort(): string;
|
|
96
|
+
/**
|
|
97
|
+
* Execute the reduce operation.
|
|
98
|
+
* Processes items sequentially, passing accumulator through each iteration.
|
|
99
|
+
*/
|
|
100
|
+
execute(input: Input, context: IExecuteContext): Promise<Output | undefined>;
|
|
101
|
+
/**
|
|
102
|
+
* Returns the initial value as empty result.
|
|
103
|
+
*/
|
|
104
|
+
protected getEmptyResult(): Output;
|
|
105
|
+
/**
|
|
106
|
+
* Clones the template graph for a specific reduction step.
|
|
107
|
+
*/
|
|
108
|
+
protected cloneTemplateForStep(stepIndex: number): TaskGraph;
|
|
109
|
+
/**
|
|
110
|
+
* Static input schema for ReduceTask.
|
|
111
|
+
* Includes standard accumulator/item/index ports.
|
|
112
|
+
*/
|
|
113
|
+
static inputSchema(): DataPortSchema;
|
|
114
|
+
/**
|
|
115
|
+
* Static output schema for ReduceTask.
|
|
116
|
+
*/
|
|
117
|
+
static outputSchema(): DataPortSchema;
|
|
118
|
+
/**
|
|
119
|
+
* Instance output schema - returns the accumulator schema from template.
|
|
120
|
+
*/
|
|
121
|
+
outputSchema(): DataPortSchema;
|
|
122
|
+
/**
|
|
123
|
+
* Override regenerateGraph to do nothing for ReduceTask.
|
|
124
|
+
* We create subgraphs on-the-fly during execution.
|
|
125
|
+
*/
|
|
126
|
+
regenerateGraph(): void;
|
|
127
|
+
}
|
|
128
|
+
declare module "../task-graph/Workflow" {
|
|
129
|
+
interface Workflow {
|
|
130
|
+
/**
|
|
131
|
+
* Starts a reduce loop that processes items with an accumulator.
|
|
132
|
+
* Use .endReduce() to close the loop and return to the parent workflow.
|
|
133
|
+
*
|
|
134
|
+
* @param config - Configuration for the reduce loop
|
|
135
|
+
* @returns A Workflow in loop builder mode for defining the reduction
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```typescript
|
|
139
|
+
* workflow
|
|
140
|
+
* .reduce({ initialValue: { sum: 0 } })
|
|
141
|
+
* .addToAccumulator()
|
|
142
|
+
* .endReduce()
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
reduce: CreateLoopWorkflow<TaskInput, TaskOutput, ReduceTaskConfig<any>>;
|
|
146
|
+
/**
|
|
147
|
+
* Ends the reduce loop and returns to the parent workflow.
|
|
148
|
+
* Only callable on workflows in loop builder mode.
|
|
149
|
+
*
|
|
150
|
+
* @returns The parent workflow
|
|
151
|
+
*/
|
|
152
|
+
endReduce(): Workflow;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=ReduceTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReduceTask.d.ts","sourceRoot":"","sources":["../../src/task/ReduceTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAMpD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,WAAW,GAAG,OAAO,CAAE,SAAQ,kBAAkB;IACjF;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC;IAEpC;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAElC;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAElC;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBAAa,UAAU,CACrB,KAAK,SAAS,SAAS,GAAG,SAAS,EACnC,MAAM,SAAS,UAAU,GAAG,UAAU,EACtC,MAAM,SAAS,gBAAgB,CAAC,MAAM,C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* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { DataPortSchema } from "@workglow/util";
|
|
7
|
+
import { TaskGraph } from "../task-graph/TaskGraph";
|
|
8
|
+
import { GraphAsTask, GraphAsTaskConfig } from "./GraphAsTask";
|
|
9
|
+
import type { IExecuteContext } from "./ITask";
|
|
10
|
+
import type { TaskInput, TaskOutput, TaskTypeName } from "./TaskTypes";
|
|
11
|
+
/**
|
|
12
|
+
* Condition function type for WhileTask.
|
|
13
|
+
* Receives the current output and iteration count, returns whether to continue looping.
|
|
14
|
+
*
|
|
15
|
+
* @param output - The output from the last iteration
|
|
16
|
+
* @param iteration - The current iteration number (0-based)
|
|
17
|
+
* @returns true to continue looping, false to stop
|
|
18
|
+
*/
|
|
19
|
+
export type WhileConditionFn<Output> = (output: Output, iteration: number) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Configuration for WhileTask.
|
|
22
|
+
*/
|
|
23
|
+
export interface WhileTaskConfig<Output extends TaskOutput = TaskOutput> extends GraphAsTaskConfig {
|
|
24
|
+
/**
|
|
25
|
+
* Condition function that determines whether to continue looping.
|
|
26
|
+
* Called after each iteration with the current output and iteration count.
|
|
27
|
+
* Returns true to continue, false to stop.
|
|
28
|
+
*/
|
|
29
|
+
readonly condition?: WhileConditionFn<Output>;
|
|
30
|
+
/**
|
|
31
|
+
* Maximum number of iterations to prevent infinite loops.
|
|
32
|
+
* @default 100
|
|
33
|
+
*/
|
|
34
|
+
readonly maxIterations?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to pass the output of each iteration as input to the next.
|
|
37
|
+
* When true, output from iteration N becomes input to iteration N+1.
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
readonly chainIterations?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* WhileTask loops until a condition function returns false.
|
|
44
|
+
*
|
|
45
|
+
* This task is useful for:
|
|
46
|
+
* - Iterative refinement processes
|
|
47
|
+
* - Polling until a condition is met
|
|
48
|
+
* - Convergence algorithms
|
|
49
|
+
* - Retry logic with conditions
|
|
50
|
+
*
|
|
51
|
+
* ## Features
|
|
52
|
+
*
|
|
53
|
+
* - Loops until condition returns false
|
|
54
|
+
* - Configurable maximum iterations (safety limit)
|
|
55
|
+
* - Passes output from each iteration to the next
|
|
56
|
+
* - Access to iteration count in condition function
|
|
57
|
+
*
|
|
58
|
+
* ## Usage
|
|
59
|
+
*
|
|
60
|
+
* ```typescript
|
|
61
|
+
* // Refine until quality threshold
|
|
62
|
+
* workflow
|
|
63
|
+
* .while({
|
|
64
|
+
* condition: (output, iteration) => output.quality < 0.9 && iteration < 10,
|
|
65
|
+
* maxIterations: 20
|
|
66
|
+
* })
|
|
67
|
+
* .refineResult()
|
|
68
|
+
* .evaluateQuality()
|
|
69
|
+
* .endWhile()
|
|
70
|
+
*
|
|
71
|
+
* // Retry until success
|
|
72
|
+
* workflow
|
|
73
|
+
* .while({
|
|
74
|
+
* condition: (output) => !output.success,
|
|
75
|
+
* maxIterations: 5
|
|
76
|
+
* })
|
|
77
|
+
* .attemptOperation()
|
|
78
|
+
* .endWhile()
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @template Input - The input type for the while task
|
|
82
|
+
* @template Output - The output type for the while task
|
|
83
|
+
* @template Config - The configuration type
|
|
84
|
+
*/
|
|
85
|
+
export declare class WhileTask<Input extends TaskInput = TaskInput, Output extends TaskOutput = TaskOutput, Config extends WhileTaskConfig<Output> = WhileTaskConfig<Output>> extends GraphAsTask<Input, Output, Config> {
|
|
86
|
+
static type: TaskTypeName;
|
|
87
|
+
static category: string;
|
|
88
|
+
static title: string;
|
|
89
|
+
static description: string;
|
|
90
|
+
/** This task has dynamic schemas based on the inner workflow */
|
|
91
|
+
static hasDynamicSchemas: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* The template subgraph that will be executed each iteration.
|
|
94
|
+
*/
|
|
95
|
+
protected _templateGraph: TaskGraph | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Current iteration count during execution.
|
|
98
|
+
*/
|
|
99
|
+
protected _currentIteration: number;
|
|
100
|
+
constructor(input?: Partial<Input>, config?: Partial<Config>);
|
|
101
|
+
/**
|
|
102
|
+
* Gets the condition function.
|
|
103
|
+
*/
|
|
104
|
+
get condition(): WhileConditionFn<Output> | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Gets the maximum iterations limit.
|
|
107
|
+
*/
|
|
108
|
+
get maxIterations(): number;
|
|
109
|
+
/**
|
|
110
|
+
* Whether to chain iteration outputs to inputs.
|
|
111
|
+
*/
|
|
112
|
+
get chainIterations(): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Gets the current iteration count.
|
|
115
|
+
*/
|
|
116
|
+
get currentIteration(): number;
|
|
117
|
+
/**
|
|
118
|
+
* Sets the template graph that defines the workflow to run each iteration.
|
|
119
|
+
*/
|
|
120
|
+
setTemplateGraph(graph: TaskGraph): void;
|
|
121
|
+
/**
|
|
122
|
+
* Gets the template graph.
|
|
123
|
+
*/
|
|
124
|
+
getTemplateGraph(): TaskGraph | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Execute the while loop.
|
|
127
|
+
*/
|
|
128
|
+
execute(input: Input, context: IExecuteContext): Promise<Output | undefined>;
|
|
129
|
+
/**
|
|
130
|
+
* Clones the template graph for a specific iteration.
|
|
131
|
+
*/
|
|
132
|
+
protected cloneTemplateGraph(iteration: number): TaskGraph;
|
|
133
|
+
/**
|
|
134
|
+
* Static input schema for WhileTask.
|
|
135
|
+
*/
|
|
136
|
+
static inputSchema(): DataPortSchema;
|
|
137
|
+
/**
|
|
138
|
+
* Static output schema for WhileTask.
|
|
139
|
+
*/
|
|
140
|
+
static outputSchema(): DataPortSchema;
|
|
141
|
+
/**
|
|
142
|
+
* Instance output schema - returns final iteration output schema.
|
|
143
|
+
*/
|
|
144
|
+
outputSchema(): DataPortSchema;
|
|
145
|
+
}
|
|
146
|
+
declare module "../task-graph/Workflow" {
|
|
147
|
+
interface Workflow {
|
|
148
|
+
/**
|
|
149
|
+
* Starts a while loop that continues until a condition is false.
|
|
150
|
+
* Use .endWhile() to close the loop and return to the parent workflow.
|
|
151
|
+
*
|
|
152
|
+
* @param config - Configuration for the while loop (must include condition)
|
|
153
|
+
* @returns A Workflow in loop builder mode for defining the loop body
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```typescript
|
|
157
|
+
* workflow
|
|
158
|
+
* .while({
|
|
159
|
+
* condition: (output, iteration) => output.quality < 0.9,
|
|
160
|
+
* maxIterations: 10
|
|
161
|
+
* })
|
|
162
|
+
* .refineResult()
|
|
163
|
+
* .endWhile()
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
while: CreateLoopWorkflow<TaskInput, TaskOutput, WhileTaskConfig<any>>;
|
|
167
|
+
/**
|
|
168
|
+
* Ends the while loop and returns to the parent workflow.
|
|
169
|
+
* Only callable on workflows in loop builder mode.
|
|
170
|
+
*
|
|
171
|
+
* @returns The parent workflow
|
|
172
|
+
*/
|
|
173
|
+
endWhile(): Workflow;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=WhileTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WhileTask.d.ts","sourceRoot":"","sources":["../../src/task/WhileTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAMpD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvE;;;;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IACH,IAAW,aAAa,IAAI,MAAM,CAEjC;IAED;;OAEG;IACH,IAAW,eAAe,IAAI,OAAO,CAEpC;IAED;;OAEG;IACH,IAAW,gBAAgB,IAAI,MAAM,CAEpC;IAMD;;OAEG;IACI,gBAAgB,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAI/C;;OAEG;IACI,gBAAgB,IAAI,SAAS,GAAG,SAAS;IAQhD;;OAEG;IACU,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAwDzF;;OAEG;IACH,SAAS,CAAC,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS;IAqD1D;;OAEG;WACW,WAAW,IAAI,cAAc;IAQ3C;;OAEG;WACW,YAAY,IAAI,cAAc;IAc5C;;OAEG;IACa,YAAY,IAAI,cAAc;CA0C/C;AAMD,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAU,QAAQ;QAChB;;;;;;;;;;;;;;;;;WAiBG;QACH,KAAK,EAAE,kBAAkB,CAAC,SAAS,EAAE,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;QAEvE;;;;;WAKG;QACH,QAAQ,IAAI,QAAQ,CAAC;KACtB;CACF"}
|
package/dist/task/index.d.ts
CHANGED
|
@@ -3,13 +3,19 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
export * from "./BatchTask";
|
|
6
7
|
export * from "./ConditionalTask";
|
|
8
|
+
export * from "./ForEachTask";
|
|
7
9
|
export * from "./GraphAsTask";
|
|
8
10
|
export * from "./GraphAsTaskRunner";
|
|
9
11
|
export * from "./InputResolver";
|
|
10
12
|
export * from "./ITask";
|
|
13
|
+
export * from "./IteratorTask";
|
|
14
|
+
export * from "./IteratorTaskRunner";
|
|
11
15
|
export * from "./JobQueueFactory";
|
|
12
16
|
export * from "./JobQueueTask";
|
|
17
|
+
export * from "./MapTask";
|
|
18
|
+
export * from "./ReduceTask";
|
|
13
19
|
export * from "./Task";
|
|
14
20
|
export * from "./TaskError";
|
|
15
21
|
export * from "./TaskEvents";
|
|
@@ -17,7 +23,13 @@ export * from "./TaskJSON";
|
|
|
17
23
|
export * from "./TaskQueueRegistry";
|
|
18
24
|
export * from "./TaskRegistry";
|
|
19
25
|
export * from "./TaskTypes";
|
|
26
|
+
export * from "./WhileTask";
|
|
27
|
+
import { BatchTask } from "./BatchTask";
|
|
20
28
|
import { ConditionalTask } from "./ConditionalTask";
|
|
29
|
+
import { ForEachTask } from "./ForEachTask";
|
|
21
30
|
import { GraphAsTask } from "./GraphAsTask";
|
|
22
|
-
|
|
31
|
+
import { MapTask } from "./MapTask";
|
|
32
|
+
import { ReduceTask } from "./ReduceTask";
|
|
33
|
+
import { WhileTask } from "./WhileTask";
|
|
34
|
+
export declare const registerBaseTasks: () => (typeof ConditionalTask | typeof GraphAsTask | typeof ForEachTask | typeof MapTask | typeof BatchTask | typeof WhileTask | typeof ReduceTask)[];
|
|
23
35
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/task/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,iBAAiB,uJAY7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dataflow.d.ts","sourceRoot":"","sources":["../../src/task-graph/Dataflow.ts"],"names":[],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ow/util";
|
|
7
|
+
import { IteratorTask } from "../common";
|
|
7
8
|
import { TaskOutputRepository } from "../storage/TaskOutputRepository";
|
|
8
9
|
import { GraphAsTask } from "../task/GraphAsTask";
|
|
9
10
|
import type { ITask, ITaskConstructor } from "../task/ITask";
|
|
@@ -15,6 +16,32 @@ import { IWorkflow } from "./IWorkflow";
|
|
|
15
16
|
import { TaskGraph } from "./TaskGraph";
|
|
16
17
|
import { CompoundMergeStrategy, type PropertyArrayGraphResult } from "./TaskGraphRunner";
|
|
17
18
|
export type CreateWorkflow<I extends DataPorts, O extends DataPorts, C extends TaskConfig> = (input?: Partial<I>, config?: Partial<C>) => Workflow<I, O>;
|
|
19
|
+
export declare function CreateWorkflow<I extends DataPorts, O extends DataPorts, C extends TaskConfig = TaskConfig>(taskClass: ITaskConstructor<I, O, C>): CreateWorkflow<I, O, C>;
|
|
20
|
+
/**
|
|
21
|
+
* Type for loop workflow methods (forEach, map, batch, while, reduce).
|
|
22
|
+
* Represents the method signature with proper `this` context.
|
|
23
|
+
* Loop methods take only a config parameter - input is not used for loop tasks.
|
|
24
|
+
*/
|
|
25
|
+
export type CreateLoopWorkflow<I extends DataPorts, O extends DataPorts, C extends TaskConfig = TaskConfig> = (this: Workflow<I, O>, config?: Partial<C>) => Workflow<I, O>;
|
|
26
|
+
/**
|
|
27
|
+
* Factory function that creates a loop workflow method for a given task class.
|
|
28
|
+
* Returns a method that can be assigned to Workflow.prototype.
|
|
29
|
+
*
|
|
30
|
+
* @param taskClass - The iterator task class (ForEachTask, MapTask, etc.)
|
|
31
|
+
* @returns A method that creates the task and returns a loop builder workflow
|
|
32
|
+
*/
|
|
33
|
+
export declare function CreateLoopWorkflow<I extends DataPorts, O extends DataPorts, C extends TaskConfig = TaskConfig>(taskClass: ITaskConstructor<I, O, C>): CreateLoopWorkflow<I, O, C>;
|
|
34
|
+
/**
|
|
35
|
+
* Type for end loop workflow methods (endForEach, endMap, etc.).
|
|
36
|
+
*/
|
|
37
|
+
export type EndLoopWorkflow = (this: Workflow) => Workflow;
|
|
38
|
+
/**
|
|
39
|
+
* Factory function that creates an end loop workflow method.
|
|
40
|
+
*
|
|
41
|
+
* @param methodName - The name of the method (for error messages)
|
|
42
|
+
* @returns A method that finalizes the loop and returns to the parent workflow
|
|
43
|
+
*/
|
|
44
|
+
export declare function CreateEndLoopWorkflow(methodName: string): EndLoopWorkflow;
|
|
18
45
|
export type WorkflowEventListeners = {
|
|
19
46
|
changed: (id: unknown) => void;
|
|
20
47
|
reset: () => void;
|
|
@@ -29,19 +56,32 @@ export type WorkflowEventParameters<Event extends WorkflowEvents> = EventParamet
|
|
|
29
56
|
/**
|
|
30
57
|
* Class for building and managing a task graph
|
|
31
58
|
* Provides methods for adding tasks, connecting outputs to inputs, and running the task graph
|
|
59
|
+
*
|
|
60
|
+
* When used with a parent workflow (loop builder mode), this class redirects task additions
|
|
61
|
+
* to the iterator task's template graph until an end method (endMap, endForEach, etc.) is called.
|
|
32
62
|
*/
|
|
33
63
|
export declare class Workflow<Input extends DataPorts = DataPorts, Output extends DataPorts = DataPorts> implements IWorkflow<Input, Output> {
|
|
34
64
|
/**
|
|
35
65
|
* Creates a new Workflow
|
|
36
66
|
*
|
|
37
|
-
* @param
|
|
67
|
+
* @param cache - Optional repository for task outputs
|
|
68
|
+
* @param parent - Optional parent workflow (for loop builder mode)
|
|
69
|
+
* @param iteratorTask - Optional iterator task being configured (for loop builder mode)
|
|
38
70
|
*/
|
|
39
|
-
constructor(
|
|
71
|
+
constructor(cache?: TaskOutputRepository, parent?: Workflow, iteratorTask?: IteratorTask);
|
|
40
72
|
private _graph;
|
|
41
73
|
private _dataFlows;
|
|
42
74
|
private _error;
|
|
43
|
-
private
|
|
75
|
+
private _outputCache?;
|
|
44
76
|
private _abortController?;
|
|
77
|
+
private readonly _parentWorkflow?;
|
|
78
|
+
private readonly _iteratorTask?;
|
|
79
|
+
outputCache(): TaskOutputRepository | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Whether this workflow is in loop builder mode.
|
|
82
|
+
* When true, tasks are added to the template graph for an iterator task.
|
|
83
|
+
*/
|
|
84
|
+
get isLoopBuilder(): boolean;
|
|
45
85
|
/**
|
|
46
86
|
* Event emitter for task graph events
|
|
47
87
|
*/
|
|
@@ -146,10 +186,56 @@ export declare class Workflow<Input extends DataPorts = DataPorts, Output extend
|
|
|
146
186
|
* Connects outputs to inputs between tasks
|
|
147
187
|
*/
|
|
148
188
|
connect(sourceTaskId: unknown, sourceTaskPortId: string, targetTaskId: unknown, targetTaskPortId: string): Workflow;
|
|
149
|
-
|
|
189
|
+
addTaskToGraph<I extends DataPorts, O extends DataPorts, C extends TaskConfig = TaskConfig>(taskClass: ITaskConstructor<I, O, C>, input: I, config: C): ITask<I, O, C>;
|
|
190
|
+
/**
|
|
191
|
+
* Adds a task to the workflow using the same logic as createWorkflow() helpers.
|
|
192
|
+
* Auto-generates an ID, processes pending dataflows, and auto-connects to previous tasks.
|
|
193
|
+
*
|
|
194
|
+
* @param taskClass - The task class to instantiate and add
|
|
195
|
+
* @param input - Optional input values for the task
|
|
196
|
+
* @param config - Optional configuration (id will be auto-generated if not provided)
|
|
197
|
+
* @returns The workflow for chaining
|
|
198
|
+
*/
|
|
199
|
+
addTask<I extends DataPorts, O extends DataPorts, C extends TaskConfig = TaskConfig>(taskClass: ITaskConstructor<I, O, C>, input?: Partial<I>, config?: Partial<C>): Workflow<Input, Output>;
|
|
200
|
+
/**
|
|
201
|
+
* Options for auto-connect operation.
|
|
202
|
+
*/
|
|
203
|
+
static readonly AutoConnectOptions: unique symbol;
|
|
204
|
+
/**
|
|
205
|
+
* Auto-connects two tasks based on their schemas.
|
|
206
|
+
* Uses multiple matching strategies:
|
|
207
|
+
* 1. Match by type AND port name (highest priority)
|
|
208
|
+
* 2. Match by specific type only (format, $id) for unmatched ports
|
|
209
|
+
* 3. Look back through earlier tasks for unmatched required inputs
|
|
210
|
+
*
|
|
211
|
+
* @param graph - The task graph to add dataflows to
|
|
212
|
+
* @param sourceTask - The source task to connect from
|
|
213
|
+
* @param targetTask - The target task to connect to
|
|
214
|
+
* @param options - Optional configuration for the auto-connect operation
|
|
215
|
+
* @returns Result containing matches made, any errors, and unmatched required inputs
|
|
216
|
+
*/
|
|
217
|
+
static autoConnect(graph: TaskGraph, sourceTask: ITask, targetTask: ITask, options?: {
|
|
218
|
+
/** Keys of inputs that are already provided and don't need connection */
|
|
219
|
+
readonly providedInputKeys?: Set<string>;
|
|
220
|
+
/** Earlier tasks to search for unmatched required inputs (in reverse chronological order) */
|
|
221
|
+
readonly earlierTasks?: readonly ITask[];
|
|
222
|
+
}): {
|
|
223
|
+
readonly matches: Map<string, string>;
|
|
224
|
+
readonly error?: string;
|
|
225
|
+
readonly unmatchedRequired: readonly string[];
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* Finalizes the template graph and sets it on the iterator task.
|
|
229
|
+
* Only applicable in loop builder mode.
|
|
230
|
+
*/
|
|
231
|
+
finalizeTemplate(): void;
|
|
232
|
+
/**
|
|
233
|
+
* Finalizes the template graph and returns the parent workflow.
|
|
234
|
+
* Only applicable in loop builder mode.
|
|
235
|
+
*
|
|
236
|
+
* @returns The parent workflow
|
|
237
|
+
* @throws WorkflowError if not in loop builder mode
|
|
238
|
+
*/
|
|
239
|
+
finalizeAndReturn(): Workflow;
|
|
150
240
|
}
|
|
151
|
-
/**
|
|
152
|
-
* Helper function for backward compatibility
|
|
153
|
-
*/
|
|
154
|
-
export declare function CreateWorkflow<I extends DataPorts, O extends DataPorts, C extends TaskConfig = TaskConfig>(taskClass: any): CreateWorkflow<I, O, C>;
|
|
155
241
|
//# sourceMappingURL=Workflow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Workflow.d.ts","sourceRoot":"","sources":["../../src/task-graph/Workflow.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"Workflow.d.ts","sourceRoot":"","sources":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C/C;IA4UD;;;OAGG;IACI,gBAAgB,IAAI,IAAI;IAM/B;;;;;;OAMG;IACI,iBAAiB,IAAI,QAAQ;CAOrC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workglow/task-graph",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.87",
|
|
5
5
|
"description": "Task graph management for Workglow, providing DAG construction, execution planning, and workflow orchestration.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"watch": "concurrently -c 'auto' 'bun:watch-*'",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@workglow/job-queue": "0.0.
|
|
40
|
-
"@workglow/storage": "0.0.
|
|
41
|
-
"@workglow/util": "0.0.
|
|
39
|
+
"@workglow/job-queue": "0.0.87",
|
|
40
|
+
"@workglow/storage": "0.0.87",
|
|
41
|
+
"@workglow/util": "0.0.87"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"@workglow/job-queue": {
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@workglow/job-queue": "0.0.
|
|
56
|
-
"@workglow/storage": "0.0.
|
|
57
|
-
"@workglow/util": "0.0.
|
|
55
|
+
"@workglow/job-queue": "0.0.87",
|
|
56
|
+
"@workglow/storage": "0.0.87",
|
|
57
|
+
"@workglow/util": "0.0.87"
|
|
58
58
|
}
|
|
59
59
|
}
|