diff options
Diffstat (limited to 'makima/src/daemon')
| -rw-r--r-- | makima/src/daemon/api/directive.rs | 26 | ||||
| -rw-r--r-- | makima/src/daemon/cli/directive.rs | 20 | ||||
| -rw-r--r-- | makima/src/daemon/cli/mod.rs | 6 | ||||
| -rw-r--r-- | makima/src/daemon/skills/directive.md | 20 |
4 files changed, 72 insertions, 0 deletions
diff --git a/makima/src/daemon/api/directive.rs b/makima/src/daemon/api/directive.rs index 42f6f45..3589e78 100644 --- a/makima/src/daemon/api/directive.rs +++ b/makima/src/daemon/api/directive.rs @@ -57,4 +57,30 @@ impl ApiClient { 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<JsonValue, ApiError> { + self.post_empty(&format!( + "/api/v1/directives/{}/steps/{}/evaluate", + directive_id, step_id + )) + .await + } + + /// List evaluations for a step. + pub async fn directive_evaluations( + &self, + directive_id: Uuid, + step_id: Uuid, + ) -> Result<JsonValue, ApiError> { + self.get(&format!( + "/api/v1/directives/{}/steps/{}/evaluations", + directive_id, step_id + )) + .await + } } diff --git a/makima/src/daemon/cli/directive.rs b/makima/src/daemon/cli/directive.rs index 5ce88c5..4c29c14 100644 --- a/makima/src/daemon/cli/directive.rs +++ b/makima/src/daemon/cli/directive.rs @@ -38,3 +38,23 @@ pub struct UpdateStatusArgs { /// New status (draft, planning, active, paused, completed, archived, failed) pub status: String, } + +/// Arguments for evaluate command (trigger manual evaluation). +#[derive(Args, Debug)] +pub struct EvaluateArgs { + #[command(flatten)] + pub common: DirectiveArgs, + + /// Step ID to evaluate + pub step_id: Uuid, +} + +/// Arguments for evaluations command (list evaluation history). +#[derive(Args, Debug)] +pub struct EvaluationsArgs { + #[command(flatten)] + pub common: DirectiveArgs, + + /// Step ID to list evaluations for + pub step_id: Uuid, +} diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs index b07ab5a..c9a8c6f 100644 --- a/makima/src/daemon/cli/mod.rs +++ b/makima/src/daemon/cli/mod.rs @@ -225,6 +225,12 @@ pub enum DirectiveCommand { /// Start a directive (create planning contract and begin orchestration) Start(DirectiveArgs), + + /// Trigger a manual evaluation for a step + Evaluate(directive::EvaluateArgs), + + /// List evaluation history for a step + Evaluations(directive::EvaluationsArgs), } impl Cli { diff --git a/makima/src/daemon/skills/directive.md b/makima/src/daemon/skills/directive.md index cdfdaa2..0d1e9d6 100644 --- a/makima/src/daemon/skills/directive.md +++ b/makima/src/daemon/skills/directive.md @@ -47,6 +47,20 @@ makima directive update-status <status> ``` Updates the directive status. Valid statuses: `draft`, `planning`, `active`, `paused`, `completed`, `archived`, `failed`. +## Evaluation + +### Trigger manual evaluation for a step +```bash +makima directive evaluate <step_id> +``` +Triggers a monitoring evaluation for the specified step. The step must have been executed (have a contract). Sets the step to "evaluating" and dispatches a monitoring contract. + +### List evaluations for a step +```bash +makima directive evaluations <step_id> +``` +Returns the evaluation history for a step, ordered by evaluation number. + ## Output Format All commands output JSON to stdout. @@ -63,6 +77,12 @@ makima directive chains # Get details of a specific chain makima directive chain <chain_id> +# Trigger manual evaluation of a step +makima directive evaluate <step_id> + +# Check evaluation history +makima directive evaluations <step_id> + # Update status to active makima directive update-status active ``` |
