scheduled prompts: add/remove targets on edit (#474 fast-follow)

This commit is contained in:
damocles 2026-05-26 16:14:47 +02:00 committed by Mara
commit 99bf4d635d
6 changed files with 216 additions and 3 deletions

View file

@ -1006,6 +1006,16 @@ pub struct EditScheduleArgs {
/// leave the schedule on its current cadence.
#[serde(default)]
pub next_fire_at_unix: Option<i64>,
/// Names of new targets to add. Replace-on-conflict: re-adding
/// a previously cancelled target resets its history (operator
/// intent on re-add = "this target is active again").
#[serde(default)]
pub targets_add: Option<Vec<String>>,
/// Names of targets to cancel. Tombstones preserve per-target
/// audit; when no active targets remain the schedule
/// auto-cancels.
#[serde(default)]
pub targets_remove: Option<Vec<String>>,
}
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
@ -1382,6 +1392,8 @@ impl ManagerServer {
description: args.description.map(Some),
interval_seconds: args.interval_seconds.map(Some),
next_fire_at_unix: args.next_fire_at_unix,
targets_add: args.targets_add,
targets_remove: args.targets_remove,
})
.await;
annotate_retries(