hive-agent: guarantee a wake after a self-requested /compact

This commit is contained in:
damocles 2026-08-13 21:30:26 +02:00 committed by mara
commit 2c7872841a
8 changed files with 227 additions and 48 deletions

View file

@ -117,7 +117,12 @@ pub enum Request {
/// explains why and takes no action. On a pass, queues the same
/// deferred `compact_pending` flag the operator's button sets (consumed
/// at the next turn boundary), so it never races a live claude process.
Compact,
/// `wake_prompt`, when set, is driven as a synthetic follow-up turn once
/// the compaction actually finishes — the dashboard button's own
/// requests go through `Bus::request_compact` directly with `None`, not
/// through this variant, since a human watching the dashboard isn't
/// waiting on a wake.
Compact { wake_prompt: Option<String> },
/// Mirror an outstanding question this agent asked (`ask()` succeeded).
/// `target` is who it's waiting on (`"operator"` when asked with
/// `to: None`). Part of the questions-mirror increment — see