From 219bca168508e1ea5e91e8a9ce98338afeddfbd2 Mon Sep 17 00:00:00 2001 From: soryu Date: Sun, 18 Jan 2026 17:44:18 +0000 Subject: Add phaseguard flag for supervisor questions to wait indefinitely (#4) * Add phaseguard flag to supervisor ask command When phaseguard is enabled (--phaseguard flag), the supervisor's ask command will block indefinitely waiting for user response instead of timing out after the default 1 hour. This ensures that phase transitions requiring user confirmation cannot proceed without explicit approval. Changes: - Add phaseguard field to AskQuestionRequest in server handler - Add phaseguard field to AskQuestionRequest in API client - Add --phaseguard CLI flag to AskArgs - Update supervisor_ask() to accept phaseguard parameter - Modify ask_question handler to skip timeout check when phaseguard=true Co-Authored-By: Claude Opus 4.5 * Task completion checkpoint --------- Co-authored-by: Claude Opus 4.5 --- makima/src/daemon/api/supervisor.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'makima/src/daemon/api') diff --git a/makima/src/daemon/api/supervisor.rs b/makima/src/daemon/api/supervisor.rs index 8b3d480..adeda22 100644 --- a/makima/src/daemon/api/supervisor.rs +++ b/makima/src/daemon/api/supervisor.rs @@ -71,6 +71,8 @@ pub struct AskQuestionRequest { #[serde(skip_serializing_if = "Option::is_none")] pub context: Option, pub timeout_seconds: i32, + /// When true, the request will block indefinitely until user responds (no timeout) + pub phaseguard: bool, } // Generic response type for JSON output @@ -202,12 +204,14 @@ impl ApiClient { choices: Vec, context: Option, timeout_seconds: i32, + phaseguard: bool, ) -> Result { let req = AskQuestionRequest { question: question.to_string(), choices, context, timeout_seconds, + phaseguard, }; self.post("/api/v1/mesh/supervisor/questions", &req).await } -- cgit v1.2.3