From 3662b334dfd68cfdf00ed44ae88927c2e1b2aabe Mon Sep 17 00:00:00 2001 From: soryu Date: Sun, 8 Feb 2026 21:07:30 +0000 Subject: Remove directive mechanism --- makima/src/daemon/api/directive.rs | 106 ------------------------------------- makima/src/daemon/api/mod.rs | 1 - 2 files changed, 107 deletions(-) delete mode 100644 makima/src/daemon/api/directive.rs (limited to 'makima/src/daemon/api') diff --git a/makima/src/daemon/api/directive.rs b/makima/src/daemon/api/directive.rs deleted file mode 100644 index c51882b..0000000 --- a/makima/src/daemon/api/directive.rs +++ /dev/null @@ -1,106 +0,0 @@ -//! Directive API methods. - -use serde::Serialize; -use uuid::Uuid; - -use super::client::{ApiClient, ApiError}; -use super::supervisor::JsonValue; - -/// Request to update a directive. -#[derive(Serialize)] -#[serde(rename_all = "camelCase")] -pub struct UpdateDirectiveRequest { - #[serde(skip_serializing_if = "Option::is_none")] - pub status: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub version: Option, -} - -impl ApiClient { - /// Get directive status and details. - pub async fn directive_status(&self, directive_id: Uuid) -> Result { - self.get(&format!("/api/v1/directives/{}", directive_id)) - .await - } - - /// List chains for a directive. - pub async fn directive_chains(&self, directive_id: Uuid) -> Result { - self.get(&format!("/api/v1/directives/{}/chains", directive_id)) - .await - } - - /// Get a chain with its steps. - pub async fn directive_chain( - &self, - directive_id: Uuid, - chain_id: Uuid, - ) -> Result { - self.get(&format!( - "/api/v1/directives/{}/chains/{}", - directive_id, chain_id - )) - .await - } - - /// Update a directive. - pub async fn directive_update( - &self, - directive_id: Uuid, - req: UpdateDirectiveRequest, - ) -> Result { - self.put(&format!("/api/v1/directives/{}", directive_id), &req) - .await - } - - /// Start a directive (transition from draft to planning). - pub async fn directive_start(&self, directive_id: Uuid) -> Result { - self.post_empty(&format!("/api/v1/directives/{}/start", directive_id)) - .await - } - - /// Trigger a manual evaluation for a step. - pub async fn directive_evaluate_step( - &self, - directive_id: Uuid, - step_id: Uuid, - ) -> Result { - self.post_empty(&format!( - "/api/v1/directives/{}/steps/{}/evaluate", - directive_id, step_id - )) - .await - } - - /// Submit a chain plan for a directive. - pub async fn directive_submit_plan( - &self, - directive_id: Uuid, - plan_json: &str, - ) -> Result { - #[derive(serde::Serialize)] - #[serde(rename_all = "camelCase")] - struct SubmitPlanBody { - plan: String, - } - self.post( - &format!("/api/v1/directives/{}/submit-plan", directive_id), - &SubmitPlanBody { - plan: plan_json.to_string(), - }, - ) - .await - } - - /// List evaluations for a step. - pub async fn directive_evaluations( - &self, - directive_id: Uuid, - step_id: Uuid, - ) -> Result { - self.get(&format!( - "/api/v1/directives/{}/steps/{}/evaluations", - directive_id, step_id - )) - .await - } -} diff --git a/makima/src/daemon/api/mod.rs b/makima/src/daemon/api/mod.rs index 2d1efbf..49d80e0 100644 --- a/makima/src/daemon/api/mod.rs +++ b/makima/src/daemon/api/mod.rs @@ -2,7 +2,6 @@ pub mod client; pub mod contract; -pub mod directive; pub mod supervisor; pub use client::ApiClient; -- cgit v1.2.3