hive: remove the read-only schedules page and the old schedule store
Scheduled prompts live at swarm level (swarm-controller's /api/schedules, `swarmctl schedule`, the swarm UI's /schedules page). The hive dashboard's SCH3DUL3S tab only listed the rows left in hive-c0re's `scheduled_prompts` table so operators could copy them over; the operator confirmed everything is migrated. Removed: - the SCH3DUL3S tab, its pane, schedules.js, its CSS (including the `.rqe-source*` rules, whose only emitter was schedules.js) and the hub tile's "schedules" entry - hive-c0re's GET /api/schedules and the `scheduled_prompts` store (with its v1 column migration and test) - hive-sh4re's `schedule` wire types, which only that route used - docs describing the tab, the route and the two tables The rebuild-queue cancel route that shared the module moves to dashboard/rebuild_queue.rs under an OpenAPI tag of its own. The two sqlite tables are not dropped: nothing opens them any more, and persistence.md says they can be dropped by hand. Closes #4916
This commit is contained in:
parent
2f05e2db28
commit
78412b3d3b
22 changed files with 84 additions and 979 deletions
|
|
@ -38,9 +38,8 @@ schemas, file layouts, and internal migration mechanics.
|
|||
|
||||
### `/var/lib/hyperhive/db/broker.sqlite` (host)
|
||||
|
||||
Five tables, all in one file — the message queue, a small key/value
|
||||
table, the read-only schedule header/targets split, and the per-agent
|
||||
power-intent registry:
|
||||
Three tables, all in one file — the message queue, a small key/value
|
||||
table, and the per-agent power-intent registry:
|
||||
|
||||
- `messages` — every inter-agent / operator-authored message.
|
||||
`sender / recipient / body / sent_at / delivered_at / acked_at /
|
||||
|
|
@ -54,17 +53,6 @@ power-intent registry:
|
|||
per-agent store — see [`/harness/` contents
|
||||
below](#state-dirs-per-agent) for where reminders (and todos)
|
||||
live.
|
||||
- `scheduled_prompts` — the scheduled prompts left from before they
|
||||
moved to swarm level ([`swarm/schedules.md`](../swarm/schedules.md)).
|
||||
`owner / body / interval_seconds (NULL = one-shot) /
|
||||
next_fire_at_unix / created_at_unix / source ("operator" or
|
||||
"approval:<id>") / cancelled_at_unix / description / paused_at_unix`.
|
||||
Read-only: the dashboard's SCH3DUL3S tab lists them so the operator
|
||||
can recreate them with `swarmctl schedule`; nothing writes or fires
|
||||
them.
|
||||
- `scheduled_prompt_targets` — per-target state for each schedule.
|
||||
`schedule_id / target / cancelled_at_unix /
|
||||
last_fired_at_unix / last_result`.
|
||||
- `agent_power` — one row per agent: `agent PK / wanted (up |
|
||||
offline) / updated_at`, owned by `hive-c0re/src/stores/power.rs`.
|
||||
This is the durable power *intent* the job queue reconciles the
|
||||
|
|
@ -74,6 +62,12 @@ power-intent registry:
|
|||
section](../scheduler/coordinator.md#desired-state-spec-vs-status) for who
|
||||
writes and reads it and how reconciliation works.
|
||||
|
||||
On a host whose hive-c0re once kept scheduled prompts, the file also
|
||||
holds `scheduled_prompts` and `scheduled_prompt_targets`. Nothing opens
|
||||
them; scheduled prompts live at swarm level
|
||||
([`swarm/schedules.md`](../swarm/schedules.md)). They're safe to drop by
|
||||
hand.
|
||||
|
||||
Retention:
|
||||
|
||||
- `Broker::vacuum_delivered` runs hourly via a tokio task in
|
||||
|
|
@ -82,7 +76,6 @@ Retention:
|
|||
rows are always kept — the harness `ack_turn`s only after a
|
||||
successful turn, so `requeue_inflight` can still requeue
|
||||
an unacked row on a crash.
|
||||
- Scheduled prompts: nothing deletes them; the rows stay as they are.
|
||||
- `agent_power` rows live until the operator destroys the agent (one row per
|
||||
agent — nothing to vacuum).
|
||||
|
||||
|
|
|
|||
|
|
@ -16,13 +16,11 @@ Settings, Core). Every page links back to H0M3, so you're
|
|||
never more than one step from the hub.
|
||||
|
||||
The **dashboard** itself (`/dashboard.html`) is where you'll spend most
|
||||
of your time. It's a single page with exactly three tabs:
|
||||
of your time. It's a single page with exactly two tabs:
|
||||
|
||||
- **SW4RM** — every agent, live. This is the default tab and the one
|
||||
you'll check most.
|
||||
- **P3RM1SS10NS** — what tools and system-level access each agent has.
|
||||
- **SCH3DUL3S** — a read-only list of the scheduled prompts left in the
|
||||
hive, due for removal; operators set schedules at swarm level now.
|
||||
|
||||
Everything else lives on its own page instead, all reachable from the
|
||||
H0M3 hub: **Flow** (`/flow.html`, the raw live message stream across
|
||||
|
|
@ -69,9 +67,8 @@ swarm's VictoriaLogs; read them in Grafana's **Explore** — see
|
|||
[`swarm/services.md`](../swarm/services.md#logs-victorialogs).
|
||||
|
||||
**Set up a schedule.** Scheduled prompts are swarm-level: set them with
|
||||
`swarmctl schedule` ([`swarm/schedules.md`](../swarm/schedules.md)).
|
||||
SCH3DUL3S only lists the ones still in the hive, so you can copy them
|
||||
over.
|
||||
`swarmctl schedule` ([`swarm/schedules.md`](../swarm/schedules.md)) or
|
||||
on the swarm UI's schedules page ([`swarm/ui.md`](../swarm/ui.md)).
|
||||
|
||||
## More depth
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ matrix accounts, the controller's job graph — are on the
|
|||
hive-c0re serves the dashboard at `/dashboard.html` (with the home page at `/`).
|
||||
It has a fixed chrome header at the top and a `<main>` that shows exactly
|
||||
one tab pane at a time. The URL hash (`#swarm`,
|
||||
`#permissions`, `#schedules`) drives which pane is
|
||||
`#permissions`) drives which pane is
|
||||
active; hash changes don't reload the page. FL0W and the other
|
||||
standalone pages are reachable from the H0M3 hub at `/`, not
|
||||
from the dashboard tab strip.
|
||||
|
|
@ -19,12 +19,12 @@ from the dashboard tab strip.
|
|||
**Chrome header** (fixed, overlays the active tab pane):
|
||||
- **← home back-link**: top-left of the chrome, links to the H0M3 hub
|
||||
at `/`. Every surface links back to the hub rather than to each other.
|
||||
- **Tab strip**: `◆ SW4RM ◆`, `◆ P3RM1SS10NS ◆`,
|
||||
`◆ SCH3DUL3S ◆`. In-page tabs only — the SYST3M panels live on the
|
||||
- **Tab strip**: `◆ SW4RM ◆`, `◆ P3RM1SS10NS ◆`. In-page tabs only —
|
||||
the SYST3M panels live on the
|
||||
standalone **C0R3** page (`/core.html`), and FL0W / ST4TS
|
||||
live on their own pages too, all reachable from the
|
||||
H0M3 hub (not the tab strip). Count pills on SW4RM
|
||||
(container count) and SCH3DUL3S (active schedules left to copy).
|
||||
H0M3 hub (not the tab strip). Count pill on SW4RM
|
||||
(container count).
|
||||
- **Banner-thin** (`░▒▓█▓▒░ HYPERHIVE / HIVE-C0RE / WE ARE THE WIRED ░▒▓█▓▒░`)
|
||||
— sits below the tab strip.
|
||||
- **Server-warnings banner** — a generic, sticky top-of-page strip shown
|
||||
|
|
@ -326,34 +326,6 @@ Live `capabilities_changed` / `tool_groups_changed` events re-render the
|
|||
matrices unless the section has unsaved edits, so an in-progress edit set
|
||||
isn't clobbered.
|
||||
|
||||
## SCH3DUL3S tab
|
||||
|
||||
A read-only list of the scheduled prompts still in the hive's store.
|
||||
The hive no longer fires them: scheduled prompts live at swarm level
|
||||
([`swarm/schedules.md`](../swarm/schedules.md)), and a warning banner at
|
||||
the top of the tab says the page is due for removal and points at
|
||||
`swarmctl schedule`. The list is there so the operator can recreate each
|
||||
row with `swarmctl schedule add`.
|
||||
|
||||
**Single-table layout**: each schedule is one `<tr>`; columns are
|
||||
`# | src | next | every | owner | body | …agents…`. Agent columns are
|
||||
dynamic — every live container plus any extra name that appears as a
|
||||
target on some schedule but isn't a current container (struck through
|
||||
as gone). Column headers render vertically so each column reads as a
|
||||
narrow ~28px strip; per-agent cells show `✓` for an active target, a
|
||||
muted `✕` for a cancelled one, and nothing when the agent isn't a
|
||||
target. Hovering a target cell shows its last fire and result.
|
||||
|
||||
The `next` column shows the stored next fire time as an absolute UTC
|
||||
timestamp, the value to pass as `--at`; paused and cancelled rows say
|
||||
so instead, with the time in the cell's tooltip. The body cell
|
||||
truncates; hovering shows the full body and description.
|
||||
|
||||
The tab has no controls: nothing creates, edits, pauses, fires or
|
||||
cancels a row. The tab pill shows the count of active schedules (at least one
|
||||
live target not yet cancelled). Fetched from `GET /api/schedules` on
|
||||
tab activation and on each dashboard state load.
|
||||
|
||||
## ST4TS page (`/stats.html`)
|
||||
|
||||
Hive-wide turn statistics, aggregated across every agent's
|
||||
|
|
@ -843,9 +815,6 @@ below — some endpoints aren't in it yet.
|
|||
rows with both fields omitted rather than erroring on them.
|
||||
Returns `200 "ok"` on
|
||||
success.
|
||||
- `GET /api/schedules` — list every schedule row left in the hive's
|
||||
store (cancelled ones included) for the read-only SCH3DUL3S tab.
|
||||
Targets naming an agent that no longer exists are left out.
|
||||
- `POST /api/meta-update` — `nix flake update` the selected
|
||||
`meta/flake.lock` inputs, then rebuild the affected agents.
|
||||
- `GET /api/dashboard/stream` — unified live event channel:
|
||||
|
|
@ -892,9 +861,7 @@ payload):
|
|||
reminder mutation: agent `remind` calls (`agent_server`),
|
||||
operator cancel / retry (`/api/system/reminders/*`), `cancel_loose_end`
|
||||
with Reminder kind, and the scheduler tick after each delivery
|
||||
batch (`reminder_scheduler`). The SCH3DUL3S tab's reminders section
|
||||
subscribes and calls `renderReminders` on receipt, so the list
|
||||
updates live without polling.
|
||||
batch (`reminder_scheduler`).
|
||||
- `capabilities_changed` (seq, caps: `Vec<str>`, descriptions: map,
|
||||
assignments: `BTreeMap<String, Vec<String>>`) — full snapshot of
|
||||
capability grants. Emitted from the rebuild-queue worker after a
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ re-render), call `refreshState()`. State shapes live in
|
|||
`hive-c0re/src/dashboard/state_snapshot.rs::StateSnapshot` and
|
||||
`web_ui/state.rs::StateSnapshot` — when
|
||||
adding state fields, plumb through the snapshot struct and the
|
||||
relevant domain module (`swarm.js`, `schedules.js`, etc.) render function.
|
||||
relevant domain module (`swarm.js`, `permissions.js`, etc.) render function.
|
||||
|
||||
**Focus preservation:** `refreshState` checks whether
|
||||
`document.activeElement` sits inside one of the managed sections
|
||||
|
|
|
|||
Loading…
Reference in a new issue