@eldrforge/tree-execution 0.1.6 → 0.1.7
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/guide/index.md +84 -0
- package/package.json +5 -4
package/guide/index.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# @eldrforge/tree-execution - Agentic Guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Parallel execution framework and tree orchestration for monorepo workflows. Provides task pool management, checkpoint/recovery, and resource monitoring.
|
|
6
|
+
|
|
7
|
+
## Key Features
|
|
8
|
+
|
|
9
|
+
- **Parallel Execution** - Execute tasks across dependency graph in parallel
|
|
10
|
+
- **Dynamic Task Pool** - Adaptive concurrency based on resources
|
|
11
|
+
- **Checkpoint/Recovery** - Save and resume execution state
|
|
12
|
+
- **Resource Monitoring** - Track CPU, memory, and disk usage
|
|
13
|
+
- **Dependency Validation** - Ensure dependencies are met before execution
|
|
14
|
+
- **Progress Tracking** - Real-time execution progress
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { TreeExecutor, DynamicTaskPool } from '@eldrforge/tree-execution';
|
|
20
|
+
|
|
21
|
+
// Create executor
|
|
22
|
+
const executor = new TreeExecutor({
|
|
23
|
+
maxConcurrency: 4,
|
|
24
|
+
enableCheckpoint: true,
|
|
25
|
+
resourceLimits: {
|
|
26
|
+
maxMemory: 4096,
|
|
27
|
+
maxCpu: 80
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// Execute tree command
|
|
32
|
+
await executor.execute({
|
|
33
|
+
command: 'npm run build',
|
|
34
|
+
packages: graph.getTopologicalOrder()
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// Resume from checkpoint
|
|
38
|
+
await executor.resume('/path/to/checkpoint.json');
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Dependencies
|
|
42
|
+
|
|
43
|
+
- @eldrforge/tree-core - Dependency graph
|
|
44
|
+
- @eldrforge/git-tools - Git operations
|
|
45
|
+
- @eldrforge/shared - Shared utilities
|
|
46
|
+
|
|
47
|
+
## Package Structure
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
src/
|
|
51
|
+
├── execution/ # Execution engine
|
|
52
|
+
│ ├── TreeExecutionAdapter.ts # Execution adapter
|
|
53
|
+
│ ├── DynamicTaskPool.ts # Task pool
|
|
54
|
+
│ ├── Scheduler.ts # Task scheduler
|
|
55
|
+
│ ├── ResourceMonitor.ts # Resource monitoring
|
|
56
|
+
│ ├── RecoveryManager.ts # Recovery logic
|
|
57
|
+
│ ├── DependencyChecker.ts # Dependency validation
|
|
58
|
+
│ └── CommandValidator.ts # Command validation
|
|
59
|
+
├── checkpoint/ # Checkpoint management
|
|
60
|
+
│ ├── CheckpointManager.ts # Checkpoint logic
|
|
61
|
+
│ └── index.ts
|
|
62
|
+
├── util/ # Utilities
|
|
63
|
+
│ ├── treeUtils.ts # Tree utilities
|
|
64
|
+
│ ├── commandStubs.ts # Command stubs
|
|
65
|
+
│ ├── mutex.ts # Mutex implementation
|
|
66
|
+
│ └── logger.ts # Logging
|
|
67
|
+
├── types/ # Type definitions
|
|
68
|
+
│ ├── config.ts
|
|
69
|
+
│ ├── parallelExecution.ts
|
|
70
|
+
│ └── index.ts
|
|
71
|
+
├── TreeExecutor.ts # Main executor
|
|
72
|
+
├── tree.ts # Tree command
|
|
73
|
+
└── index.ts
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Key Exports
|
|
77
|
+
|
|
78
|
+
- `TreeExecutor` - Main execution orchestrator
|
|
79
|
+
- `DynamicTaskPool` - Adaptive task pool
|
|
80
|
+
- `CheckpointManager` - Checkpoint/recovery
|
|
81
|
+
- `ResourceMonitor` - Resource tracking
|
|
82
|
+
- `executeTree()` - Execute tree command
|
|
83
|
+
- `resumeExecution()` - Resume from checkpoint
|
|
84
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eldrforge/tree-execution",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Parallel execution framework and tree orchestration for monorepo workflows",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/grunnverk/tree-execution#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@eldrforge/tree-core": "^0.1.
|
|
39
|
-
"@eldrforge/git-tools": "^0.1.
|
|
40
|
-
"@eldrforge/shared": "^0.1.
|
|
38
|
+
"@eldrforge/tree-core": "^0.1.7",
|
|
39
|
+
"@eldrforge/git-tools": "^0.1.18",
|
|
40
|
+
"@eldrforge/shared": "^0.1.8"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@eslint/eslintrc": "^3.2.0",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"files": [
|
|
59
59
|
"dist",
|
|
60
|
+
"guide",
|
|
60
61
|
"README.md",
|
|
61
62
|
"LICENSE"
|
|
62
63
|
]
|