summaryrefslogtreecommitdiff
path: root/makima/src/db/models.rs
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-01-27 00:19:16 +0000
committersoryu <soryu@soryu.co>2026-01-27 00:19:16 +0000
commit61e3b3f92adb791fd47d2de3027c46d08c03d901 (patch)
treed818cfcaf0f400d739155ddb729861beb3ccdc25 /makima/src/db/models.rs
parentf6b4d06a0158fb7803a2d7a861cf891cb3b202b4 (diff)
downloadsoryu-61e3b3f92adb791fd47d2de3027c46d08c03d901.tar.gz
soryu-61e3b3f92adb791fd47d2de3027c46d08c03d901.zip
[WIP] Heartbeat checkpoint - 2026-01-27 00:19:16 UTC
Diffstat (limited to 'makima/src/db/models.rs')
-rw-r--r--makima/src/db/models.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/makima/src/db/models.rs b/makima/src/db/models.rs
index 9c2d072..625a572 100644
--- a/makima/src/db/models.rs
+++ b/makima/src/db/models.rs
@@ -441,6 +441,12 @@ pub struct Task {
#[serde(default)]
pub is_supervisor: bool,
+ // Red team flag
+ /// True for red team monitor tasks. Red team tasks monitor work tasks
+ /// and can alert the supervisor about potential issues.
+ #[serde(default)]
+ pub is_red_team: bool,
+
// Daemon/container info
pub daemon_id: Option<Uuid>,
pub container_id: Option<String>,
@@ -627,6 +633,9 @@ pub struct CreateTaskRequest {
/// True for contract supervisor tasks. Only supervisors can spawn new tasks.
#[serde(default)]
pub is_supervisor: bool,
+ /// True for red team monitor tasks that watch work tasks.
+ #[serde(default)]
+ pub is_red_team: bool,
/// Priority (higher = more urgent)
#[serde(default)]
pub priority: i32,
@@ -1331,6 +1340,16 @@ pub struct Contract {
/// allowing users to manually handle code changes via patch files or other means.
#[serde(default)]
pub local_only: 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. If not provided, uses default
+ /// quality criteria.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub red_team_prompt: Option<String>,
pub version: i32,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
@@ -1508,6 +1527,15 @@ pub struct CreateContractRequest {
/// allowing users to manually handle code changes via patch files or other means.
#[serde(default)]
pub local_only: 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