diff options
| author | soryu <soryu@soryu.co> | 2026-02-03 22:01:29 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-02-03 22:01:37 +0000 |
| commit | cf0a25af1d2834bfe6c5ea892ce5769936e5a673 (patch) | |
| tree | 476ba326ac1752281a441b5c17d2b3be4b23a2a9 /makima/src/daemon/cli/mod.rs | |
| parent | 8361916ce67f3d2ba191ebf27cb50e79cb42e39c (diff) | |
| download | soryu-cf0a25af1d2834bfe6c5ea892ce5769936e5a673.tar.gz soryu-cf0a25af1d2834bfe6c5ea892ce5769936e5a673.zip | |
Add makima chain mechanism
Diffstat (limited to 'makima/src/daemon/cli/mod.rs')
| -rw-r--r-- | makima/src/daemon/cli/mod.rs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs index 0805edd..035a784 100644 --- a/makima/src/daemon/cli/mod.rs +++ b/makima/src/daemon/cli/mod.rs @@ -1,5 +1,6 @@ //! Command-line interface for the makima CLI. +pub mod chain; pub mod config; pub mod contract; pub mod daemon; @@ -9,6 +10,7 @@ pub mod view; use clap::{Parser, Subcommand}; +pub use chain::ChainArgs; pub use config::CliConfig; pub use contract::ContractArgs; pub use daemon::DaemonArgs; @@ -58,6 +60,14 @@ pub enum Commands { /// Saves configuration to ~/.makima/config.toml for use by CLI commands. #[command(subcommand)] Config(ConfigCommand), + + /// Chain commands for multi-contract orchestration + /// + /// Chains are DAGs (directed acyclic graphs) of contracts that work together + /// to achieve a larger goal. Contracts can depend on each other, and run + /// in parallel when no dependencies exist. + #[command(subcommand)] + Chain(ChainCommand), } /// Config subcommands for CLI configuration. @@ -196,6 +206,48 @@ pub enum ContractCommand { CreateFile(contract::CreateFileArgs), } +/// Chain subcommands for multi-contract orchestration. +#[derive(Subcommand, Debug)] +pub enum ChainCommand { + /// Create a chain from a YAML file + /// + /// Parses the chain definition, validates the DAG, and creates + /// contracts in the correct dependency order. + Run(chain::RunArgs), + + /// Get chain status and progress + Status(chain::StatusArgs), + + /// List all chains + List(chain::ListArgs), + + /// List contracts in a chain + Contracts(chain::ContractsArgs), + + /// Display ASCII DAG visualization + /// + /// Shows the chain structure as an ASCII graph with + /// contracts as nodes and dependencies as edges. + Graph(chain::GraphArgs), + + /// Validate a chain YAML file without creating + /// + /// Checks syntax, validates the DAG (no cycles), and + /// reports any errors. + Validate(chain::ValidateArgs), + + /// Preview what would be created from a chain file + /// + /// Shows execution order and contract details without + /// actually creating anything. + Preview(chain::PreviewArgs), + + /// Archive a chain + /// + /// Marks the chain as archived. Does not delete contracts. + Archive(chain::ArchiveArgs), +} + impl Cli { /// Parse command-line arguments pub fn parse_args() -> Self { |
