summaryrefslogtreecommitdiff
path: root/makima/src/daemon/cli
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/daemon/cli')
-rw-r--r--makima/src/daemon/cli/mod.rs3
-rw-r--r--makima/src/daemon/cli/supervisor.rs26
2 files changed, 25 insertions, 4 deletions
diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs
index 66c7941..1a49399 100644
--- a/makima/src/daemon/cli/mod.rs
+++ b/makima/src/daemon/cli/mod.rs
@@ -77,6 +77,9 @@ pub enum SupervisorCommand {
/// Get contract status
Status(SupervisorArgs),
+ /// Advance the contract to the next phase
+ AdvancePhase(supervisor::AdvancePhaseArgs),
+
/// Ask a question and wait for user feedback
Ask(supervisor::AskArgs),
}
diff --git a/makima/src/daemon/cli/supervisor.rs b/makima/src/daemon/cli/supervisor.rs
index ebfb4bc..dc534b5 100644
--- a/makima/src/daemon/cli/supervisor.rs
+++ b/makima/src/daemon/cli/supervisor.rs
@@ -7,19 +7,19 @@ use uuid::Uuid;
#[derive(Args, Debug, Clone)]
pub struct SupervisorArgs {
/// API URL
- #[arg(long, env = "MAKIMA_API_URL", default_value = "http://localhost:8080", global = true)]
+ #[arg(long, env = "MAKIMA_API_URL", default_value = "http://localhost:8080")]
pub api_url: String,
/// API key for authentication
- #[arg(long, env = "MAKIMA_API_KEY", global = true)]
+ #[arg(long, env = "MAKIMA_API_KEY")]
pub api_key: String,
/// Current task ID (optional)
- #[arg(long, env = "MAKIMA_TASK_ID", global = true)]
+ #[arg(long, env = "MAKIMA_TASK_ID")]
pub task_id: Option<Uuid>,
/// Contract ID
- #[arg(long, env = "MAKIMA_CONTRACT_ID", global = true)]
+ #[arg(long, env = "MAKIMA_CONTRACT_ID")]
pub contract_id: Uuid,
}
@@ -181,3 +181,21 @@ pub struct AskArgs {
#[arg(long, default_value = "3600")]
pub timeout: i32,
}
+
+/// Arguments for status command (get contract status including phase).
+#[derive(Args, Debug)]
+pub struct StatusArgs {
+ #[command(flatten)]
+ pub common: SupervisorArgs,
+}
+
+/// Arguments for advance-phase command.
+#[derive(Args, Debug)]
+pub struct AdvancePhaseArgs {
+ #[command(flatten)]
+ pub common: SupervisorArgs,
+
+ /// The phase to advance to (specify, plan, execute, review)
+ #[arg(index = 1)]
+ pub phase: String,
+}