@vinhnt-sdk/workflow 0.4.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nguyen Thanh Vinh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # @vinhnt-sdk/workflow
2
+
3
+ > Version: 0.4.0 | Status: BETA
4
+
5
+ Workflow primitives for agent orchestration — parallel, sequential, conditional execution.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ # npm
11
+ npm install @vinhnt-sdk/workflow
12
+
13
+ # pnpm (monorepo)
14
+ pnpm add @vinhnt-sdk/workflow
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```typescript
20
+ import { parallel, sequential, conditional } from '@vinhnt-sdk/workflow';
21
+
22
+ // Parallel execution
23
+ const results = await parallel([
24
+ { name: 'fetch-user', execute: async () => getUser() },
25
+ { name: 'fetch-posts', execute: async () => getPosts() },
26
+ ]);
27
+
28
+ // Sequential execution
29
+ const result = await sequential([
30
+ { name: 'validate', execute: async (input) => validate(input) },
31
+ { name: 'process', execute: async (input) => process(input) },
32
+ { name: 'save', execute: async (input) => save(input) },
33
+ ], initialInput);
34
+
35
+ // Conditional execution
36
+ const result = await conditional(input, [
37
+ {
38
+ condition: (input) => input.type === 'admin',
39
+ steps: [adminStep],
40
+ name: 'admin-path',
41
+ },
42
+ {
43
+ condition: () => true,
44
+ steps: [defaultStep],
45
+ name: 'default-path',
46
+ },
47
+ ]);
48
+ ```
49
+
50
+ ## Exports
51
+
52
+ ### Types
53
+
54
+ | Type | Description |
55
+ |------|-------------|
56
+ | `WorkflowStep<TInput, TOutput>` | A single workflow step |
57
+ | `WorkflowContext` | Context passed to each step |
58
+ | `StepResult<T>` | Result of a workflow step |
59
+ | `ConditionalBranch<TInput, TOutput>` | A conditional branch |
60
+
61
+ ### Functions
62
+
63
+ | Function | Description |
64
+ |----------|-------------|
65
+ | `parallel(steps)` | Execute multiple steps in parallel |
66
+ | `sequential(steps, input)` | Execute steps sequentially, chaining outputs |
67
+ | `conditional(input, branches)` | Execute steps conditionally based on input |
68
+
69
+ ## Dependencies
70
+
71
+ - `@vinhnt-sdk/schema`
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Workflow primitives for agent orchestration.
3
+ *
4
+ * Inspired by Google ADK workflow patterns.
5
+ * Provides parallel, sequential, and conditional execution.
6
+ *
7
+ * @module workflow
8
+ * @packageDocumentation
9
+ */
10
+ /** Workflow step result */
11
+ export interface StepResult<T = unknown> {
12
+ readonly success: boolean;
13
+ readonly output?: T;
14
+ readonly error?: Error | undefined;
15
+ readonly durationMs: number;
16
+ }
17
+ /** Workflow context passed to each step */
18
+ export interface WorkflowContext {
19
+ readonly workflowId: string;
20
+ readonly stepIndex: number;
21
+ readonly metadata: Record<string, unknown>;
22
+ /** Abort signal for cancellation */
23
+ readonly signal?: AbortSignal | undefined;
24
+ }
25
+ /** A single workflow step */
26
+ export interface WorkflowStep<TInput = unknown, TOutput = unknown> {
27
+ readonly name: string;
28
+ execute(input: TInput, ctx: WorkflowContext): Promise<TOutput>;
29
+ }
30
+ /**
31
+ * Execute multiple steps in parallel.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const results = await parallel([
36
+ * { name: "fetch-user", execute: async () => getUser() },
37
+ * { name: "fetch-posts", execute: async () => getPosts() },
38
+ * ]);
39
+ * ```
40
+ */
41
+ export declare function parallel<T>(steps: WorkflowStep<unknown, T>[], ctx?: Partial<WorkflowContext>): Promise<StepResult<T>[]>;
42
+ /**
43
+ * Execute steps sequentially, passing output of one as input to the next.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const result = await sequential([
48
+ * { name: "validate", execute: async (input) => validate(input) },
49
+ * { name: "process", execute: async (input) => process(input) },
50
+ * { name: "save", execute: async (input) => save(input) },
51
+ * ], initialInput);
52
+ * ```
53
+ */
54
+ export declare function sequential<TInput, TOutput>(steps: WorkflowStep<any, any>[], initialInput: TInput, ctx?: Partial<WorkflowContext>): Promise<StepResult<TOutput>>;
55
+ /** A conditional branch */
56
+ export interface ConditionalBranch<TInput = unknown, TOutput = unknown> {
57
+ readonly condition: (input: TInput) => boolean | Promise<boolean>;
58
+ readonly steps: WorkflowStep[];
59
+ readonly name?: string;
60
+ }
61
+ /**
62
+ * Execute steps conditionally based on input.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * const result = await conditional(input, [
67
+ * {
68
+ * condition: (input) => input.type === "admin",
69
+ * steps: [adminStep],
70
+ * name: "admin-path",
71
+ * },
72
+ * {
73
+ * condition: () => true,
74
+ * steps: [defaultStep],
75
+ * name: "default-path",
76
+ * },
77
+ * ]);
78
+ * ```
79
+ */
80
+ export declare function conditional<TInput, TOutput>(input: TInput, branches: ConditionalBranch<TInput, TOutput>[], ctx?: Partial<WorkflowContext>): Promise<StepResult<TOut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AK,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAC/B,YAAY,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAC7B,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAoC9B;AAMD,2BAA2B;AAC3B,MAAM,WAAW,iBAAiB,CAAC,MAAM,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO;IACpE,QAAQ,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAClE,QAAQ,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,OAAO,EAC/C,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC9C,GAAG,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAC7B,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAkD9B"}
package/dist/index.js ADDED
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Workflow primitives for agent orchestration.
3
+ *
4
+ * Inspired by Google ADK workflow patterns.
5
+ * Provides parallel, sequential, and conditional execution.
6
+ *
7
+ * @module workflow
8
+ * @packageDocumentation
9
+ */
10
+ // ---------------------------------------------------------------------------
11
+ // Parallel Execution
12
+ // ---------------------------------------------------------------------------
13
+ /**
14
+ * Execute multiple steps in parallel.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const results = await parallel([
19
+ * { name: "fetch-user", execute: async () => getUser() },
20
+ * { name: "fetch-posts", execute: async () => getPosts() },
21
+ * ]);
22
+ * ```
23
+ */
24
+ export async function parallel(steps, ctx) {
25
+ const workflowId = ctx?.workflowId ?? `parallel-${Date.now()}`;
26
+ const metadata = ctx?.metadata ?? {};
27
+ return Promise.all(steps.map((step, i) => executeStep(step, undefined, {
28
+ workflowId,
29
+ stepIndex: i,
30
+ metadata,
31
+ signal: ctx?.signal,
32
+ })));
33
+ }
34
+ // ---------------------------------------------------------------------------
35
+ // Sequential Execution
36
+ // ---------------------------------------------------------------------------
37
+ /**
38
+ * Execute steps sequentially, passing output of one as input to the next.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const result = await sequential([
43
+ * { name: "validate", execute: async (input) => validate(input) },
44
+ * { name: "process", execute: async (input) => process(input) },
45
+ * { name: "save", execute: async (input) => save(input) },
46
+ * ], initialInput);
47
+ * ```
48
+ */
49
+ export async function sequential(steps, initialInput, ctx) {
50
+ const workflowId = ctx?.workflowId ?? `sequential-${Date.now()}`;
51
+ const metadata = ctx?.metadata ?? {};
52
+ let currentInput = initialInput;
53
+ let totalDuration = 0;
54
+ for (let i = 0; i < steps.length; i++) {
55
+ const step = steps[i];
56
+ if (!step)
57
+ continue;
58
+ const result = await executeStep(step, currentInput, {
59
+ workflowId,
60
+ stepIndex: i,
61
+ metadata,
62
+ signal: ctx?.signal,
63
+ });
64
+ totalDuration += result.durationMs;
65
+ if (!result.success) {
66
+ return {
67
+ success: false,
68
+ error: result.error,
69
+ durationMs: totalDuration,
70
+ };
71
+ }
72
+ currentInput = result.output;
73
+ }
74
+ return {
75
+ success: true,
76
+ output: currentInput,
77
+ durationMs: totalDuration,
78
+ };
79
+ }
80
+ /**
81
+ * Execute steps conditionally based on input.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * const result = await conditional(input, [
86
+ * {
87
+ * condition: (input) => input.type === "admin",
88
+ * steps: [adminStep],
89
+ * name: "admin-path",
90
+ * },
91
+ * {
92
+ * condition: () => true,
93
+ * steps: [defaultStep],
94
+ * name: "default-path",
95
+ * },
96
+ * ]);
97
+ * ```
98
+ */
99
+ export async function conditional(input, branches, ctx) {
100
+ const workflowId = ctx?.workflowId ?? `conditional-${Date.now()}`;
101
+ const metadata = ctx?.metadata ?? {};
102
+ for (let i = 0; i < branches.length; i++) {
103
+ const branch = branches[i];
104
+ if (!branch)
105
+ continue;
106
+ const shouldRun = await branch.condition(input);
107
+ if (shouldRun) {
108
+ let currentInput = input;
109
+ let totalDuration = 0;
110
+ for (let j = 0; j < branch.steps.length; j++) {
111
+ const step = branch.steps[j];
112
+ if (!step)
113
+ continue;
114
+ const result = await executeStep(step, currentInput, {
115
+ workflowId,
116
+ stepIndex: j,
117
+ metadata: { ...metadata, branch: branch.name ?? i },
118
+ signal: ctx?.signal,
119
+ });
120
+ totalDuration += result.durationMs;
121
+ if (!result.success) {
122
+ return {
123
+ success: false,
124
+ error: result.error,
125
+ durationMs: totalDuration,
126
+ };
127
+ }
128
+ currentInput = result.output;
129
+ }
130
+ return {
131
+ success: true,
132
+ output: currentInput,
133
+ durationMs: totalDuration,
134
+ };
135
+ }
136
+ }
137
+ return {
138
+ success: false,
139
+ error: new Error("No matching branch"),
140
+ durationMs: 0,
141
+ };
142
+ }
143
+ // ---------------------------------------------------------------------------
144
+ // Helper
145
+ // ---------------------------------------------------------------------------
146
+ async function executeStep(step, input, ctx) {
147
+ const start = Date.now();
148
+ try {
149
+ const output = await step.execute(input, ctx);
150
+ return {
151
+ success: true,
152
+ output,
153
+ durationMs: Date.now() - start,
154
+ };
155
+ }
156
+ catch (error) {
157
+ return {
158
+ success: false,
159
+ error: error instanceof Error ? error : new Error(String(error)),
160
+ durationMs: Date.now() - start,
161
+ };
162
+ }
163
+ }
164
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA6BH,8EAA8E;AAC9E,qBAAqB;AACrB,8EAA8E;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,KAAiC,EACjC,GAA8B;IAE9B,MAAM,UAAU,GAAG,GAAG,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,KAAK,CAAC,CAAC;YAChE,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;SAC/B,CAAC;IACJ,CAAC;AACH,CAAC"}
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@vinhnt-sdk/workflow",
3
+ "version": "0.4.0",
4
+ "description": "Workflow primitives for agent orchestration - parallel, sequential, conditional",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "LICENSE",
20
+ "README.md"
21
+ ],
22
+ "sideEffects": false,
23
+ "engines": {
24
+ "node": ">=20"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/vinhnt-develop/vinhnt-sdk.git",
29
+ "directory": "packages/workflow"
30
+ },
31
+ "homepage": "https://github.com/vinhnt-develop/vinhnt-sdk/tree/main/packages/workflow",
32
+ "bugs": {
33
+ "url": "https://github.com/vinhnt-develop/vinhnt-sdk/issues"
34
+ },
35
+ "keywords": [
36
+ "vnt",
37
+ "workflow",
38
+ "orchestration",
39
+ "parallel",
40
+ "sequential"
41
+ ],
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
45
+ "dependencies": {
46
+ "@vinhnt-sdk/schema": "0.4.0"
47
+ },
48
+ "devDependencies": {
49
+ "vitest": "^3.2.7"
50
+ },
51
+ "scripts": {
52
+ "build": "tsc -b",
53
+ "typecheck": "tsc --noEmit",
54
+ "test": "vitest run"
55
+ }
56
+ }