summaryrefslogtreecommitdiff
path: root/makima/src/server/handlers
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-02-06 19:45:45 +0000
committersoryu <soryu@soryu.co>2026-02-06 19:45:45 +0000
commit139be135c2086d725e4f040e744bb25acd436549 (patch)
tree2519f63e1499f8b93a89fde0045fb91d689901d5 /makima/src/server/handlers
parent25e1275af1b742cc7866fba91152d9a4734a6f94 (diff)
downloadsoryu-139be135c2086d725e4f040e744bb25acd436549.tar.gz
soryu-139be135c2086d725e4f040e744bb25acd436549.zip
Fix: Directives fixes
Diffstat (limited to 'makima/src/server/handlers')
-rw-r--r--makima/src/server/handlers/mesh_daemon.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/makima/src/server/handlers/mesh_daemon.rs b/makima/src/server/handlers/mesh_daemon.rs
index cb929ea..9938145 100644
--- a/makima/src/server/handlers/mesh_daemon.rs
+++ b/makima/src/server/handlers/mesh_daemon.rs
@@ -1302,6 +1302,21 @@ async fn handle_daemon_connection(socket: WebSocket, state: SharedState, auth_re
"error": &updated_task.error_message,
}),
).await;
+
+ // Check if this task's contract is a directive orchestrator
+ if let Some(contract_id) = updated_task.contract_id {
+ if let Ok(Some(directive)) = repository::get_directive_by_orchestrator_contract_id(
+ &pool, contract_id
+ ).await {
+ let engine = crate::orchestration::DirectiveEngine::new(pool.clone());
+ if let Err(e) = engine.on_planning_complete(directive.id, success).await {
+ tracing::error!(
+ "Failed to handle planning completion for directive {}: {}",
+ directive.id, e
+ );
+ }
+ }
+ }
}
Ok(None) => {
tracing::warn!(