summaryrefslogtreecommitdiff
path: root/makima/src/daemon
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-02-09 02:35:36 +0000
committersoryu <soryu@soryu.co>2026-02-09 02:35:36 +0000
commita2646a828febbdac798a206655a15eae7e463bca (patch)
tree7736396d87f6bf4dd50a2d3e91525534a36adf00 /makima/src/daemon
parent9c92d9235a0d1258fff9f7e625b0463c4952c45f (diff)
downloadsoryu-a2646a828febbdac798a206655a15eae7e463bca.tar.gz
soryu-a2646a828febbdac798a206655a15eae7e463bca.zip
Add directive init
Diffstat (limited to 'makima/src/daemon')
-rw-r--r--makima/src/daemon/api/directive.rs13
-rw-r--r--makima/src/daemon/cli/directive.rs11
-rw-r--r--makima/src/daemon/cli/mod.rs3
3 files changed, 27 insertions, 0 deletions
diff --git a/makima/src/daemon/api/directive.rs b/makima/src/daemon/api/directive.rs
index fbd27fe..cd21692 100644
--- a/makima/src/daemon/api/directive.rs
+++ b/makima/src/daemon/api/directive.rs
@@ -112,6 +112,19 @@ impl ApiClient {
self.post_empty(&format!("/api/v1/directives/{}/steps/{}/skip", directive_id, step_id)).await
}
+ /// Batch add steps to a directive.
+ pub async fn directive_batch_add_steps(
+ &self,
+ directive_id: Uuid,
+ steps: serde_json::Value,
+ ) -> Result<JsonValue, ApiError> {
+ self.post(
+ &format!("/api/v1/directives/{}/steps/batch", directive_id),
+ &steps,
+ )
+ .await
+ }
+
/// Update the directive's goal.
pub async fn directive_update_goal(
&self,
diff --git a/makima/src/daemon/cli/directive.rs b/makima/src/daemon/cli/directive.rs
index 5de60ed..cd94a56 100644
--- a/makima/src/daemon/cli/directive.rs
+++ b/makima/src/daemon/cli/directive.rs
@@ -99,3 +99,14 @@ pub struct UpdateGoalArgs {
/// New goal text
pub goal: String,
}
+
+/// Arguments for batch-add-steps command.
+#[derive(Args, Debug)]
+pub struct BatchAddStepsArgs {
+ #[command(flatten)]
+ pub common: DirectiveArgs,
+
+ /// JSON array of steps: [{"name":"...","description":"...","taskPlan":"...","dependsOn":[],"orderIndex":0}]
+ #[arg(long)]
+ pub json: String,
+}
diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs
index faafaea..98923d9 100644
--- a/makima/src/daemon/cli/mod.rs
+++ b/makima/src/daemon/cli/mod.rs
@@ -243,6 +243,9 @@ pub enum DirectiveCommand {
/// Update the directive's goal (triggers re-planning)
UpdateGoal(directive::UpdateGoalArgs),
+
+ /// Batch add multiple steps from JSON
+ BatchAddSteps(directive::BatchAddStepsArgs),
}
impl Cli {