diff options
| author | soryu <soryu@soryu.co> | 2026-01-16 12:23:49 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-01-16 12:23:49 +0000 |
| commit | 205ab8a223ddf6591a3e8bfc9108506502977c11 (patch) | |
| tree | d768063acff233dbeea223d7b6ea69d7e3038300 /makima/src/daemon/task/manager.rs | |
| parent | 05931d19bc0c161d0177c3f983d0cd903d5e8ae3 (diff) | |
| download | soryu-205ab8a223ddf6591a3e8bfc9108506502977c11.tar.gz soryu-205ab8a223ddf6591a3e8bfc9108506502977c11.zip | |
Fixup: use default api.makima.jp URL and fix default branch detection
Also add checkpointing/history
Diffstat (limited to 'makima/src/daemon/task/manager.rs')
| -rw-r--r-- | makima/src/daemon/task/manager.rs | 18 |
1 files changed, 11 insertions, 7 deletions
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<crate::daemon::config::BubblewrapConfig>, + /// 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<RwLock<HashMap<Uuid, u32>>>, git_user_email: Arc<RwLock<Option<String>>>, git_user_name: Arc<RwLock<Option<String>>>, + 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(), } } } |
