summaryrefslogtreecommitdiff
path: root/makima/src/daemon/cli/red_team.rs
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-01-27 11:04:20 +0000
committerGitHub <noreply@github.com>2026-01-27 11:04:20 +0000
commitc618174e60e4632d36d7352d83399508c72b2f42 (patch)
treefbca74b921a57165aea046b959a44ab00589532f /makima/src/daemon/cli/red_team.rs
parentb6f239c19f0d3130515f3745f842e17a69212295 (diff)
downloadsoryu-c618174e60e4632d36d7352d83399508c72b2f42.tar.gz
soryu-c618174e60e4632d36d7352d83399508c72b2f42.zip
Add Red Team CLI command and frontend UI (#39)
* Add Red Team CLI command and frontend UI Backend additions: - Add `makima red-team notify` CLI command for red team tasks - Add RedTeamCommand enum with Notify subcommand - Add red_team API client module for notify endpoint - Add RedTeamNotifyArgs with severity, task, file, context options Frontend additions: - Add ContractCreateModal with red team toggle and prompt input - Update ContractDetail with red-team tab for notifications - Update ContractList with red team enabled badge - Add TypeScript types for RedTeamNotification and related interfaces Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add CSS styles for Red Team frontend components Add comprehensive styling for: - Contract list and detail containers - Red team badge styling with gradient backgrounds - Tab navigation with red team specific styling - Red team notifications panel with severity indicators - Contract creation modal form elements - Task badges for supervisor and red team roles Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix missing local_only field in TUI CreateContractRequest Add the missing local_only field to the CreateContractRequest struct initialization in the TUI contract creation handler. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * [WIP] Heartbeat checkpoint - 2026-01-27 03:07:28 UTC --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'makima/src/daemon/cli/red_team.rs')
-rw-r--r--makima/src/daemon/cli/red_team.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/makima/src/daemon/cli/red_team.rs b/makima/src/daemon/cli/red_team.rs
new file mode 100644
index 0000000..771aae4
--- /dev/null
+++ b/makima/src/daemon/cli/red_team.rs
@@ -0,0 +1,26 @@
+//! Red Team subcommand - adversarial review notification commands.
+
+use crate::daemon::api::{ApiClient, RedTeamNotifyRequest};
+use super::RedTeamNotifyArgs;
+
+/// Handle the red-team notify command.
+pub async fn handle_notify(args: RedTeamNotifyArgs) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
+ let client = ApiClient::new(args.api_url, args.api_key)?;
+
+ // Use --task if provided, otherwise fall back to MAKIMA_TASK_ID
+ let related_task_id = args.task;
+
+ let req = RedTeamNotifyRequest {
+ message: args.message,
+ severity: args.severity,
+ related_task_id,
+ file_path: args.file,
+ context: args.context,
+ };
+
+ eprintln!("Sending red team notification...");
+ let result = client.red_team_notify(req).await?;
+ println!("{}", serde_json::to_string(&result.0)?);
+
+ Ok(())
+}