diff --git a/docs/agent-lifecycle/persistence.md b/docs/agent-lifecycle/persistence.md index 851f7e73..7de37400 100644 --- a/docs/agent-lifecycle/persistence.md +++ b/docs/agent-lifecycle/persistence.md @@ -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:") / 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). diff --git a/docs/web-ui/README.md b/docs/web-ui/README.md index e469774d..fdf14ca6 100644 --- a/docs/web-ui/README.md +++ b/docs/web-ui/README.md @@ -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 diff --git a/docs/web-ui/dashboard.md b/docs/web-ui/dashboard.md index c720b00f..0766dd1f 100644 --- a/docs/web-ui/dashboard.md +++ b/docs/web-ui/dashboard.md @@ -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 `
` 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 ``; 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`, descriptions: map, assignments: `BTreeMap>`) — full snapshot of capability grants. Emitted from the rebuild-queue worker after a diff --git a/docs/web-ui/shape.md b/docs/web-ui/shape.md index f09ca05b..44850508 100644 --- a/docs/web-ui/shape.md +++ b/docs/web-ui/shape.md @@ -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 diff --git a/frontend/packages/dashboard/src/dashboard.css b/frontend/packages/dashboard/src/dashboard.css index 735b38d8..a02618b6 100644 --- a/frontend/packages/dashboard/src/dashboard.css +++ b/frontend/packages/dashboard/src/dashboard.css @@ -4,8 +4,8 @@ /* SYST3M panel rules (rebuild queue / meta inputs / container load) live in system-sections.css, shared with /core.html. A few are still - referenced from dashboard JS (the schedules view uses `.rqe-source*`), - so the dashboard pulls them in here. */ + referenced from the dashboard (`.rebuild-queue`), so the dashboard + pulls them in here. */ @import "./system-sections.css"; @import "@hive/shared/jobq-rollup.css"; @@ -709,113 +709,6 @@ footer .banner-thin { cursor: not-allowed; } -/* ─── scheduled prompts tab ──────────────────────────────────────── - Read-only table of the schedules left in the hive's store. */ - -.schedules-table-wrap { - overflow-x: auto; - margin-top: 0.5em; -} -.schedules-table { - min-width: 100%; - border-collapse: collapse; - font-size: 0.82em; -} -.schedules-table th, -.schedules-table td { - padding: 0.35em 0.6em; - border: 1px solid var(--border); - vertical-align: middle; -} -.schedules-table thead th { - background: var(--bg-elev); - color: var(--muted); - font-weight: normal; - text-transform: uppercase; - letter-spacing: 0.05em; - white-space: nowrap; -} -.schedules-table-id { - width: 3em; - text-align: center; -} -.schedules-table-next-col { - white-space: nowrap; -} -/* every column: sized to typical content (short durations). */ -.schedules-table-every-col { - width: 5em; - white-space: nowrap; -} -.schedules-table-body-th { - min-width: 12em; -} -/* Agent-name columns: 90° vertical text (writing-mode) so names are fully - readable without truncation. Previously used a -45° CSS transform which - clipped names mid-glyph. writing-mode + rotate(180deg) is in-flow and - needs no absolute positioning or overflow hacks. */ -.schedules-table-agent-th { - width: 28px; - min-width: 28px; - height: 8em; - padding: 4px 2px !important; - vertical-align: bottom; - text-transform: none !important; - letter-spacing: 0 !important; - overflow: hidden; -} -.schedules-table-agent-th > div { - font-family: ui-monospace, "JetBrains Mono", monospace; - font-size: 0.85em; - color: var(--fg); - /* Rotate 90° bottom-to-top (conventional rotated column header). */ - writing-mode: vertical-rl; - transform: rotate(180deg); - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - max-height: 7.5em; -} -.schedules-table-agent-th > div > span { - display: inline-block; - padding: 0 2px; -} -/* Column for an agent no longer in the live roster — its past schedules - linger but the agent is gone. Greyed + struck through. */ -.schedules-table-agent-th--gone > div { - color: var(--muted); - text-decoration: line-through; - opacity: 0.75; -} -.schedules-table-row-cancelled td { - opacity: 0.55; -} -.schedules-table-row-paused td { - opacity: 0.75; -} -.sched-paused-label { - color: var(--yellow); - font-size: 0.9em; -} -.schedules-table-body-cell { - max-width: 30em; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-family: ui-monospace, "JetBrains Mono", monospace; - font-size: 0.9em; -} -.schedules-table-check { - width: 28px; - text-align: center; - color: var(--green); - padding: 0.3em 0 !important; -} -.schedules-table-check-cancelled { - color: var(--muted); - font-size: 0.9em; -} - /* Selection bar — sticky-bottom strip for bulk actions. */ .selection-bar { position: fixed; diff --git a/frontend/packages/dashboard/src/dashboard.html b/frontend/packages/dashboard/src/dashboard.html index 4bdf3d51..3445d881 100644 --- a/frontend/packages/dashboard/src/dashboard.html +++ b/frontend/packages/dashboard/src/dashboard.html @@ -53,21 +53,6 @@ ◆ P3RM1SS10NS ◆ - - - ◆ SCH3DUL3S ◆ - - - @@ -190,38 +175,6 @@ - - -