From 657a8e55796c9f0cc6f30937de545ed91f052063 Mon Sep 17 00:00:00 2001 From: soryu Date: Sun, 8 Feb 2026 12:32:53 +0000 Subject: Fixes for directive chain init --- makima/src/daemon/api/directive.rs | 20 ++++++++++++++++++++ makima/src/daemon/cli/mod.rs | 3 +++ 2 files changed, 23 insertions(+) (limited to 'makima/src/daemon') diff --git a/makima/src/daemon/api/directive.rs b/makima/src/daemon/api/directive.rs index 3589e78..c51882b 100644 --- a/makima/src/daemon/api/directive.rs +++ b/makima/src/daemon/api/directive.rs @@ -71,6 +71,26 @@ impl ApiClient { .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, diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs index c9a8c6f..954f219 100644 --- a/makima/src/daemon/cli/mod.rs +++ b/makima/src/daemon/cli/mod.rs @@ -231,6 +231,9 @@ pub enum DirectiveCommand { /// List evaluation history for a step Evaluations(directive::EvaluationsArgs), + + /// Submit a chain plan for a directive (reads JSON from stdin) + SubmitPlan(DirectiveArgs), } impl Cli { -- cgit v1.2.3