summaryrefslogtreecommitdiff
path: root/makima/src/daemon/cli/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/daemon/cli/mod.rs')
-rw-r--r--makima/src/daemon/cli/mod.rs42
1 files changed, 42 insertions, 0 deletions
diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs
index c848e8e..07f0b7c 100644
--- a/makima/src/daemon/cli/mod.rs
+++ b/makima/src/daemon/cli/mod.rs
@@ -13,6 +13,7 @@ use uuid::Uuid;
pub use config::CliConfig;
pub use contract::ContractArgs;
+pub use contract::{PauseArgs, ResumeArgs, AdvanceArgs, RestartSupervisorArgs, ShowArgs, HealthArgs};
pub use daemon::DaemonArgs;
pub use red_team::handle_notify;
pub use server::ServerArgs;
@@ -65,6 +66,12 @@ pub enum Commands {
/// Red team commands for adversarial monitoring
#[command(name = "red-team", subcommand)]
RedTeam(RedTeamCommand),
+
+ /// Contract management helper commands
+ ///
+ /// User-facing commands for managing contracts (pause, resume, show, etc.)
+ #[command(subcommand)]
+ Contracts(ContractsCommand),
}
/// Config subcommands for CLI configuration.
@@ -211,6 +218,41 @@ pub enum RedTeamCommand {
Notify(RedTeamNotifyArgs),
}
+/// Contract management helper subcommands.
+#[derive(Subcommand, Debug)]
+pub enum ContractsCommand {
+ /// Pause a contract
+ ///
+ /// Sets the contract status to paused, optionally with a reason.
+ /// The supervisor will be stopped and tasks will not be picked up.
+ Pause(contract::PauseArgs),
+
+ /// Resume a paused contract
+ ///
+ /// Sets the contract status back to active and restarts the supervisor.
+ Resume(contract::ResumeArgs),
+
+ /// Manually advance a contract to a specific phase
+ ///
+ /// Use --force to skip deliverable validation.
+ Advance(contract::AdvanceArgs),
+
+ /// Restart the supervisor for a contract
+ ///
+ /// Useful when the supervisor is stuck or needs to be refreshed.
+ RestartSupervisor(contract::RestartSupervisorArgs),
+
+ /// Show detailed contract information
+ ///
+ /// Use --verbose for all details including tasks and files.
+ Show(contract::ShowArgs),
+
+ /// Check contract and supervisor health
+ ///
+ /// Returns health status including supervisor state, task counts, and staleness.
+ Health(contract::HealthArgs),
+}
+
/// Arguments for red-team notify command.
#[derive(Args, Debug)]
pub struct RedTeamNotifyArgs {