summaryrefslogtreecommitdiff
path: root/makima/src/db/models.rs
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/db/models.rs')
-rw-r--r--makima/src/db/models.rs94
1 files changed, 0 insertions, 94 deletions
diff --git a/makima/src/db/models.rs b/makima/src/db/models.rs
index abdcce6..cef0a22 100644
--- a/makima/src/db/models.rs
+++ b/makima/src/db/models.rs
@@ -440,11 +440,6 @@ pub struct Task {
/// True for contract supervisor tasks. Only supervisors can spawn new tasks.
#[serde(default)]
pub is_supervisor: bool,
- /// Whether this is a red team monitoring task.
- /// Red team tasks monitor work task outputs and can notify
- /// the supervisor about potential issues.
- #[serde(default)]
- pub is_red_team: bool,
// Daemon/container info
pub daemon_id: Option<Uuid>,
@@ -575,9 +570,6 @@ pub struct TaskSummary {
/// True for contract supervisor tasks
#[serde(default)]
pub is_supervisor: bool,
- /// True for red team tasks that monitor and review other tasks' work
- #[serde(default)]
- pub is_red_team: bool,
/// Whether this task is hidden from the UI (user dismissed it)
#[serde(default)]
pub hidden: bool,
@@ -603,7 +595,6 @@ impl From<Task> for TaskSummary {
subtask_count: 0, // Would need separate query
version: task.version,
is_supervisor: task.is_supervisor,
- is_red_team: task.is_red_team,
hidden: task.hidden,
created_at: task.created_at,
updated_at: task.updated_at,
@@ -636,9 +627,6 @@ pub struct CreateTaskRequest {
/// True for contract supervisor tasks. Only supervisors can spawn new tasks.
#[serde(default)]
pub is_supervisor: bool,
- /// True for red team tasks that monitor and review other tasks' work.
- #[serde(default)]
- pub is_red_team: bool,
/// Priority (higher = more urgent)
#[serde(default)]
pub priority: i32,
@@ -1453,15 +1441,6 @@ pub struct Contract {
/// automatically merged to the master/main branch locally (without pushing or creating PRs).
#[serde(default)]
pub auto_merge_local: bool,
- /// Whether to spawn a red team task to monitor work tasks.
- /// When enabled, a parallel task monitors outputs and can alert
- /// the supervisor about potential issues.
- #[serde(default)]
- pub red_team_enabled: bool,
- /// Optional custom prompt/criteria for the red team to use
- /// when evaluating task outputs.
- #[serde(skip_serializing_if = "Option::is_none")]
- pub red_team_prompt: Option<String>,
/// Phase configuration copied from template at contract creation (raw JSON).
/// When present, this overrides the built-in contract type phases.
/// Use `get_phase_config()` to get the parsed PhaseConfig.
@@ -1649,9 +1628,6 @@ pub struct ContractSummary {
/// When true with local_only, automatically merge completed tasks to target branch locally.
#[serde(default)]
pub auto_merge_local: bool,
- /// Whether red team monitoring is enabled for this contract.
- #[serde(default)]
- pub red_team_enabled: bool,
pub file_count: i64,
pub task_count: i64,
pub repository_count: i64,
@@ -1723,15 +1699,6 @@ pub struct CreateContractRequest {
/// automatically merged to the master/main branch locally (without pushing or creating PRs).
#[serde(default)]
pub auto_merge_local: Option<bool>,
- /// Enable red team monitoring for this contract.
- /// When enabled, a parallel task monitors work task outputs
- /// and can alert the supervisor about potential issues.
- #[serde(default)]
- pub red_team_enabled: Option<bool>,
- /// Optional custom criteria for the red team to evaluate.
- /// Examples: "Focus on security vulnerabilities",
- /// "Ensure all functions have tests", etc.
- pub red_team_prompt: Option<String>,
}
/// Request payload for updating a contract
@@ -2542,67 +2509,6 @@ pub struct SupervisorHeartbeatRequest {
pub pending_task_ids: Vec<Uuid>,
}
-// =============================================================================
-// Red Team Types
-// =============================================================================
-
-/// Red Team notification record
-#[derive(Debug, Clone, FromRow, Serialize, ToSchema)]
-#[serde(rename_all = "camelCase")]
-pub struct RedTeamNotification {
- pub id: Uuid,
- pub contract_id: Uuid,
- pub red_team_task_id: Uuid,
- pub related_task_id: Option<Uuid>,
-
- pub message: String,
- pub severity: String,
- pub file_path: Option<String>,
- pub context: Option<String>,
-
- pub delivered: bool,
- pub delivered_at: Option<DateTime<Utc>>,
- pub acknowledged: bool,
- pub acknowledged_at: Option<DateTime<Utc>>,
-
- pub created_at: DateTime<Utc>,
-}
-
-/// Severity levels for red team notifications
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
-#[serde(rename_all = "lowercase")]
-pub enum NotificationSeverity {
- Low,
- Medium,
- High,
- Critical,
-}
-
-impl std::fmt::Display for NotificationSeverity {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- match self {
- Self::Low => write!(f, "low"),
- Self::Medium => write!(f, "medium"),
- Self::High => write!(f, "high"),
- Self::Critical => write!(f, "critical"),
- }
- }
-}
-
-impl std::str::FromStr for NotificationSeverity {
- type Err = String;
-
- fn from_str(s: &str) -> Result<Self, Self::Err> {
- match s.to_lowercase().as_str() {
- "low" => Ok(Self::Low),
- "medium" => Ok(Self::Medium),
- "high" => Ok(Self::High),
- "critical" => Ok(Self::Critical),
- _ => Err(format!("Invalid severity: {}", s)),
- }
- }
-}
-
// ============================================================================
// Supervisor Status API Types
// ============================================================================