Skip to content

Commit c7d1dbf

Browse files
committed
feat: implement Task DAG CLI system with parallel execution
This commit adds a comprehensive CLI interface for managing and executing task DAGs (Directed Acyclic Graphs) with dependency resolution. Features: - DAG creation from YAML/JSON specification files - Parallel execution with configurable concurrency limits - Sequential execution mode with topological ordering - Circular dependency detection during DAG validation - Failure propagation with configurable modes (fail-fast, skip-dependents, continue) - Task persistence and resume capability - Multiple visualization formats (ASCII, Graphviz DOT, Mermaid) - JSON, text, and compact output formats CLI Commands: - `dag create` - Create a new DAG from spec file - `dag run` - Execute a DAG with parallel or sequential strategy - `dag status` - Show DAG execution status - `dag list` - List all stored DAGs - `dag validate` - Validate DAG specification and detect cycles - `dag graph` - Visualize DAG structure - `dag delete` - Remove a stored DAG - `dag resume` - Resume a partially executed DAG Files added/modified: - cortex-cli/src/dag_cmd.rs (new) - cortex-cli/Cargo.toml (added cortex-agents and futures dependencies) - cortex-cli/src/lib.rs (added dag_cmd module) - cortex-cli/src/main.rs (added Dag command)
1 parent 7fc3905 commit c7d1dbf

5 files changed

Lines changed: 1596 additions & 0 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cortex-cli/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ cortex-mcp-server = { workspace = true }
3838
cortex-share = { path = "../cortex-share" }
3939
cortex-snapshot = { workspace = true }
4040
cortex-compact = { path = "../cortex-compact" }
41+
cortex-agents = { workspace = true }
4142

4243
clap = { workspace = true }
4344
clap_complete = { workspace = true }
@@ -46,6 +47,7 @@ clap_mangen = { workspace = true }
4647
# For colored help output
4748
color-print = "0.3"
4849
tokio = { workspace = true, features = ["full"] }
50+
futures = { workspace = true }
4951
anyhow = { workspace = true }
5052
tracing = { workspace = true }
5153
tracing-subscriber = { workspace = true, features = ["env-filter"] }

0 commit comments

Comments
 (0)