@devflow-tools/workflow-engine 0.3.2 → 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.
Files changed (2) hide show
  1. package/README.md +50 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @devflow-tools/workflow-engine
2
+
3
+ Workflow engine for DevFlow — DAG-based execution engine for standardized AI development workflows.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @devflow-tools/workflow-engine
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { WorkflowEngine } from '@devflow-tools/workflow-engine';
15
+
16
+ const engine = new WorkflowEngine();
17
+
18
+ // Register a workflow definition
19
+ engine.register({
20
+ name: 'bugfix',
21
+ description: 'Standard bug fix workflow',
22
+ steps: [
23
+ { id: 'analyze', command: 'context', needs: [] },
24
+ { id: 'fix', command: 'edit', needs: ['analyze'] },
25
+ { id: 'test', command: 'verify', needs: ['fix'] },
26
+ ],
27
+ });
28
+
29
+ // Run a workflow
30
+ const run = await engine.run('bugfix', { issue: 'login broken' });
31
+ ```
32
+
33
+ ## Features
34
+
35
+ - **DAG execution** — topological sort with parallel branch support
36
+ - **Step resolution** — pluggable step handlers
37
+ - **SSE streaming** — real-time status updates
38
+ - **Approval gates** — approve/reject steps for human-in-the-loop
39
+
40
+ ## API
41
+
42
+ - `WorkflowEngine` — main class
43
+ - `.register(definition)` — register a workflow definition
44
+ - `.run(name, input)` — start a workflow run
45
+ - `.status(runId)` — get run status
46
+ - `topologicalSort(steps)` — sort steps by dependency order
47
+
48
+ ## License
49
+
50
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devflow-tools/workflow-engine",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "clean": "rm -rf dist"
18
18
  },
19
19
  "dependencies": {
20
- "@devflow-tools/sdk": "^0.3.2"
20
+ "@devflow-tools/sdk": "^0.4.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "typescript": "^5.5.0",
@@ -26,5 +26,5 @@
26
26
  "files": [
27
27
  "dist"
28
28
  ],
29
- "gitHead": "8bd4fe5d195782d3e5a5357fc9bff5998561c956"
29
+ "gitHead": "c76bcf3a2bb8ac12b871738d6661979eb45090c6"
30
30
  }