summaryrefslogtreecommitdiff
path: root/makima/src/server/mod.rs
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-01-27 01:05:25 +0000
committerGitHub <noreply@github.com>2026-01-27 01:05:25 +0000
commit6cd5b20670d7ecd3d48539ff898e021988f2a503 (patch)
tree0232ecd8411b01db07230f8ea2003cbbcdc070a6 /makima/src/server/mod.rs
parent64cc98783d067625d633eea1142d114e324f76bb (diff)
downloadsoryu-6cd5b20670d7ecd3d48539ff898e021988f2a503.tar.gz
soryu-6cd5b20670d7ecd3d48539ff898e021988f2a503.zip
Add Red Team adversarial review system for contract monitoring (#35)
Implements a parallel "red team" task that monitors work task outputs in real-time, verifying implementations stick to contract requirements, repository standards, and the execution plan. Key features: - New `red_team_enabled` and `red_team_prompt` contract configuration - Red team tasks auto-spawn when first work task is created - `makima red-team notify` CLI command for alerting supervisors - POST /api/v1/mesh/red-team/notify and /status endpoints - Alert delivery to supervisor via SendMessage daemon command - Notification audit trail via history_events table Database changes: - Add red_team_enabled/red_team_prompt columns to contracts - Add is_red_team flag to tasks with partial index - Create red_team_notifications table for audit logging Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'makima/src/server/mod.rs')
-rw-r--r--makima/src/server/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/makima/src/server/mod.rs b/makima/src/server/mod.rs
index bf302a5..b002a49 100644
--- a/makima/src/server/mod.rs
+++ b/makima/src/server/mod.rs
@@ -18,7 +18,7 @@ use tower_http::trace::TraceLayer;
use utoipa::OpenApi;
use utoipa_swagger_ui::SwaggerUi;
-use crate::server::handlers::{api_keys, chat, contract_chat, contract_daemon, contracts, file_ws, files, history, listen, mesh, mesh_chat, mesh_daemon, mesh_merge, mesh_supervisor, mesh_ws, repository_history, templates, transcript_analysis, users, versions};
+use crate::server::handlers::{api_keys, chat, contract_chat, contract_daemon, contracts, file_ws, files, history, listen, mesh, mesh_chat, mesh_daemon, mesh_merge, mesh_red_team, mesh_supervisor, mesh_ws, repository_history, templates, transcript_analysis, users, versions};
use crate::server::openapi::ApiDoc;
use crate::server::state::SharedState;
@@ -129,6 +129,9 @@ pub fn make_router(state: SharedState) -> Router {
.route("/mesh/supervisor/questions", post(mesh_supervisor::ask_question))
.route("/mesh/questions", get(mesh_supervisor::list_pending_questions))
.route("/mesh/questions/{question_id}/answer", post(mesh_supervisor::answer_question))
+ // Red team endpoints (for red team tasks to notify supervisors)
+ .route("/mesh/red-team/notify", post(mesh_red_team::notify_supervisor))
+ .route("/mesh/red-team/status", get(mesh_red_team::get_status))
// Mesh WebSocket endpoints
.route("/mesh/tasks/subscribe", get(mesh_ws::task_subscription_handler))
.route("/mesh/daemons/connect", get(mesh_daemon::daemon_handler))