feat: add optional description to request_apply_commit and request_spawn

This commit is contained in:
damocles 2026-05-16 14:26:12 +02:00
parent a6d1464071
commit 4a8a668348
9 changed files with 97 additions and 30 deletions

View file

@ -83,6 +83,11 @@ pub struct Approval {
pub resolved_at: Option<i64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub note: Option<String>,
/// Optional free-text description the manager attached at submission
/// time — shown on the dashboard approval card so the operator can
/// understand the change without opening the diff.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
/// What action the approval, when granted, will trigger.
@ -414,6 +419,9 @@ pub enum ManagerRequest {
/// agent of the same name already exists, the approval will fail.
RequestSpawn {
name: String,
/// Optional description shown on the dashboard approval card.
#[serde(default, skip_serializing_if = "Option::is_none")]
description: Option<String>,
},
/// Stop a sub-agent (graceful).
Kill {
@ -439,6 +447,10 @@ pub enum ManagerRequest {
RequestApplyCommit {
agent: String,
commit_ref: String,
/// Optional description shown on the dashboard approval card so the
/// operator knows what the change does without opening the diff.
#[serde(default, skip_serializing_if = "Option::is_none")]
description: Option<String>,
},
/// Ask the operator a question. Returns immediately with the queued
/// question id; the operator's answer arrives later as a