From 205ab8a223ddf6591a3e8bfc9108506502977c11 Mon Sep 17 00:00:00 2001 From: soryu Date: Fri, 16 Jan 2026 12:23:49 +0000 Subject: Fixup: use default api.makima.jp URL and fix default branch detection Also add checkpointing/history --- makima/src/daemon/task/manager.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'makima/src/daemon/task/manager.rs') diff --git a/makima/src/daemon/task/manager.rs b/makima/src/daemon/task/manager.rs index 5491934..fccebc5 100644 --- a/makima/src/daemon/task/manager.rs +++ b/makima/src/daemon/task/manager.rs @@ -978,6 +978,8 @@ pub struct TaskConfig { pub disable_verbose: bool, /// Bubblewrap sandbox configuration. pub bubblewrap: Option, + /// API URL for spawned tasks (HTTP endpoint for makima CLI). + pub api_url: String, } impl Default for TaskConfig { @@ -992,6 +994,7 @@ impl Default for TaskConfig { enable_permissions: false, disable_verbose: false, bubblewrap: None, + api_url: "https://api.makima.jp".to_string(), } } } @@ -1583,6 +1586,7 @@ impl TaskManager { active_pids: self.active_pids.clone(), git_user_email: self.git_user_email.clone(), git_user_name: self.git_user_name.clone(), + api_url: self.config.api_url.clone(), } } @@ -2877,6 +2881,7 @@ struct TaskManagerInner { active_pids: Arc>>, git_user_email: Arc>>, git_user_name: Arc>>, + api_url: String, } impl TaskManagerInner { @@ -3196,8 +3201,7 @@ impl TaskManagerInner { // Set up environment variables for makima CLI let mut env = HashMap::new(); - // TODO: Make API URL configurable - env.insert("MAKIMA_API_URL".to_string(), "http://localhost:8080".to_string()); + env.insert("MAKIMA_API_URL".to_string(), self.api_url.clone()); env.insert("MAKIMA_API_KEY".to_string(), tool_key.clone()); env.insert("MAKIMA_TASK_ID".to_string(), task_id.to_string()); // Supervisor needs contract ID for its tools @@ -3207,7 +3211,7 @@ impl TaskManagerInner { tracing::info!( task_id = %task_id, - api_url = "http://localhost:8080", + api_url = %self.api_url, tool_key_preview = &tool_key[..8.min(tool_key.len())], "Set supervisor environment variables" ); @@ -3252,14 +3256,13 @@ impl TaskManagerInner { // Set up environment variables for makima CLI let mut env = HashMap::new(); - // TODO: Make API URL configurable - env.insert("MAKIMA_API_URL".to_string(), "http://localhost:8080".to_string()); + env.insert("MAKIMA_API_URL".to_string(), self.api_url.clone()); env.insert("MAKIMA_API_KEY".to_string(), tool_key.clone()); env.insert("MAKIMA_TASK_ID".to_string(), task_id.to_string()); tracing::info!( task_id = %task_id, - api_url = "http://localhost:8080", + api_url = %self.api_url, tool_key_preview = &tool_key[..8.min(tool_key.len())], "Set orchestrator environment variables" ); @@ -3313,7 +3316,7 @@ impl TaskManagerInner { tracing::warn!(task_id = %task_id, "Failed to register contract tool key"); } - env.insert("MAKIMA_API_URL".to_string(), "http://localhost:8080".to_string()); + env.insert("MAKIMA_API_URL".to_string(), self.api_url.clone()); env.insert("MAKIMA_API_KEY".to_string(), tool_key); env.insert("MAKIMA_TASK_ID".to_string(), task_id.to_string()); } @@ -4126,6 +4129,7 @@ impl Clone for TaskManagerInner { active_pids: self.active_pids.clone(), git_user_email: self.git_user_email.clone(), git_user_name: self.git_user_name.clone(), + api_url: self.api_url.clone(), } } } -- cgit v1.2.3