From 22d970fbe94246f22e94139535b97a6480651af2 Mon Sep 17 00:00:00 2001 From: lexis Date: Tue, 26 May 2026 10:02:31 +0200 Subject: [PATCH] docs: add scheduled_prompts to file map + manager schedule tools (follow-up to #454) --- CLAUDE.md | 7 +++++++ docs/turn-loop.md | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 1689e9c5..ea9e550c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -45,6 +45,13 @@ hive-c0re/ host daemon + CLI (one binary, subcommand-dispatched) src/reminder_scheduler.rs 5s poll loop: drains due reminders, resolves file_path container→host, persists payload + delivers pointer string + src/scheduled_prompts.rs sqlite layer for scheduled prompts — + schema, CRUD helpers, cancel-auth chain + (`cancel_authorized` walks topology), catch-up + clamp on resume (#444) + src/scheduled_prompts_worker.rs 5s poll loop: fires due rows, + fans out one Message per active target, + re-arms recurring rows, deletes fired one-shots src/events_vacuum.rs host-side hourly sweep of every agent's /state/hyperhive-events.sqlite src/crash_watch.rs poll every 10s; fire HelperEvent::ContainerCrash diff --git a/docs/turn-loop.md b/docs/turn-loop.md index 57acbb39..d5d12d41 100644 --- a/docs/turn-loop.md +++ b/docs/turn-loop.md @@ -335,6 +335,23 @@ meta's. startup crashes, etc.). Pass the plain logical agent name; hive-c0re resolves the machine name (`h-`, manager `hm1nd`). `lines` defaults to 50, host-capped at 500. +- `request_schedule_prompt(targets, body, first_fire_at_unix, interval_seconds?, description?)` — + queue an operator-approval for a scheduled prompt. On approve, + `body` is fanned out to each `targets` agent at + `first_fire_at_unix`; recurring if `interval_seconds` is set, + one-shot otherwise. Even self-targeted schedules go through + approval (use `remind` for unapproved self-wake). Long downtime + fires once per recurring row on resume (catch-up clamp). +- `cancel_schedule(id, targets?)` — cancel a schedule. Omit + `targets` / pass empty to cancel the whole schedule; pass a list + to cancel just those recipients (auto-cancels when every target + is removed). Authorization: manager can cancel schedules it owns + or any owned by a sub-agent in its topology subtree. +- `list_schedules()` — snapshot every schedule (active + + cancelled-but-not-reaped): id, owner, body, per-target + `last_fired_at` + `last_result`, `next_fire_at_unix`, + `interval_seconds`. Use to look up an id before cancelling or to + audit upcoming wake-ups across the swarm. - `remind` / `get_loose_ends` / `cancel_loose_end` / `set_status` / `get_agent_meta` — same as the sub-agent tools above. `get_loose_ends` scopes to the manager's own items by default;