diff --git a/AGENTS.md b/AGENTS.md index 908ac0da..fcf5380b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -67,7 +67,7 @@ Open `http://127.0.0.1:8080/` after the preview server starts. GitHub Pages serv - Keep one source for machine-readable state. `status.json`, the status section, and the current-state lines in `llms.txt` all read `components::status::layer_states()`. - Tests live beside the code in `#[cfg(test)]` modules. Add a test when a rule can regress silently. - Hive's page structure is generated, not written in Rust. `om/hive-page/hive.om` is a seeded Omega program in program mode that writes the whole `/hive/` skeleton to stdout: the section set and order (the `meta` table, one record per section), the ids and aria attributes, the mission tree container, the compact agent row, the message and field templates, the strip, the empty states and the jump navigation. `sh om/hive-page/check.sh` compiles it with the pinned compiler (`om/hive-page/omc.sha256`), runs it twice, and keeps `om/hive-page/main.html` with `main.html.sha256`. Commit the artifact and the digest with the `.om` change; `components/hive.rs` only embeds the bytes, and the site test fails when the two disagree. GitHub Pages CI is x86_64 and cannot execute the AArch64 pin, so CI verifies bytes only. A structure change is an edit to `hive.om` plus `check.sh`, never markup in a component or DOM construction in `public/js/hive.js`, which only clones the emitted templates and fills text. -- Hive has no decorative scene: no nebula, starfield, orbit drawing or invented coordinates. It is an information board: a status and freshness strip, a mission tree indented by depth, compact agent rows (name, status, model and provider, elapsed, current activity), a selected-agent manifest and a message feed. Sections carry `data-requires` in the emitted markup, so a section the snapshot has no data for is hidden rather than shown empty; which sections exist and in what order is decided in `hive.om`. Task, activity and lifecycle data must come from real observations. Preserve source freshness, partial coverage, unknown states, message-time model identity, keyboard focus, and reduced-motion support. +- Hive keeps its Omega-generated information board. At Drake's explicit request for a universe presentation, a local decorative galaxy may appear behind the masthead; it must not represent agent positions, progress, topology or live activity. No invented coordinates or data are allowed. The operational interface remains: a status and freshness strip, a mission tree indented by depth, compact agent rows (name, status, model and provider, elapsed, current activity), a selected-agent manifest and a message feed. Sections carry `data-requires` in the emitted markup, so a section the snapshot has no data for is hidden rather than shown empty; which sections exist and in what order is decided in `hive.om`. Task, activity and lifecycle data must come from real observations. Preserve source freshness, partial coverage, unknown states, message-time model identity, keyboard focus, and reduced-motion support. - Hive surfaces use the shared palette tokens (`--bg-base`, `--bg-surface`, `--bg-card`, `--bg-card-hover`, `--border-subtle`, `--text-primary`, `--text-secondary`, `--text-muted`), never a bespoke near-black or a local hex palette. Its motion stays compositor-only: animate transform and opacity, never `filter` or `box-shadow`, and cap change highlights so a busy fleet cannot strobe. Text lines that the feed rewrites every second are clamped to a fixed line count so the page cannot reflow under the pointer. - Hive text passes a field whitelist and full-string privacy screening before truncation. Never serialize raw sessions, system/task prompts, tool payloads, hidden reasoning, credentials, or control metadata. Direct Drake messages, short task-summary fields and public agent replies require the authorized publication boundary. Render feed strings through text nodes, not HTML. diff --git a/public/assets/hive-universe.svg b/public/assets/hive-universe.svg new file mode 100644 index 00000000..e14cf886 --- /dev/null +++ b/public/assets/hive-universe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/hive.css b/public/assets/hive.css index 6c0e6689..9618d79f 100644 --- a/public/assets/hive.css +++ b/public/assets/hive.css @@ -127,3 +127,87 @@ @media (prefers-reduced-motion: reduce) { .hive * { scroll-behavior: auto !important; } } + +/* Cosmic presentation pass. The sky is decorative; .om owns all page structure. + No agent positions, source states or progress values are invented here. */ +.hive { max-width:1600px; padding:22px 4vw 80px; } +.hive *, .hive *::before, .hive *::after { box-sizing:border-box; } +.hive-jumps { margin-bottom:0; border-top:0; padding:14px 0; gap:12px 30px; } +.hive-jumps a { font-size:.73rem; letter-spacing:.04em; } +.hive-masthead { + position:relative; isolation:isolate; overflow:hidden; + max-width:none; min-height:520px; margin:0 -4vw 36px; + padding:80px 8vw 72px; display:flex; flex-direction:column; justify-content:center; + background:var(--bg-base); +} +.hive-masthead::before { + content:""; position:absolute; inset:0 -10% 0 18%; z-index:-2; pointer-events:none; + background:url('/assets/hive-universe.svg') 55% 48% / cover no-repeat; + opacity:.95; +} +.hive-masthead::after { + content:""; position:absolute; inset:0; z-index:-1; pointer-events:none; + background:linear-gradient(90deg,var(--bg-base) 3%,transparent 76%),linear-gradient(0deg,var(--bg-base),transparent 15%,transparent 88%,var(--bg-base)); +} +.hive-masthead .hive-eyebrow { color:var(--text-secondary); font-size:.65rem; letter-spacing:.24em; margin-bottom:22px; } +.hive h1 { font-size:clamp(4rem,9vw,8.5rem); font-weight:400; letter-spacing:-.065em; margin:0 0 24px; } +.hive-period { color:var(--accent-blue); } +.hive-intro { max-width:34ch; font-size:clamp(1.1rem,1.8vw,1.4rem); line-height:1.5; } +.hive-welcome { max-width:43ch; font-size:.85rem; margin-top:16px; } +.hive-learn { align-self:flex-start; margin-top:25px; padding:12px 19px; border:1px solid var(--border-subtle); border-radius:30px; text-decoration:none; font-size:.76rem; background:var(--bg-surface); } +.hive-learn:hover { border-color:var(--border-active); background:var(--bg-card); } +.hive-sections { gap:28px; } +.hive-section { border-radius:16px; padding:26px; background:var(--bg-surface); } +.hive-section .hive-eyebrow { font-size:.61rem; letter-spacing:.18em; } +.hive h2 { font-size:1.5rem; font-weight:450; letter-spacing:-.025em; } +.hive-note { font-size:.78rem; } +#hive-strip { display:grid; grid-template-columns:minmax(220px,1fr) minmax(240px,1.2fr); gap:12px 32px; padding:22px 26px; } +#hive-strip > * { margin-top:0; } +#hive-strip > .hive-eyebrow,#hive-strip > h2,#hive-strip > .hive-note { grid-column:1; } +#hive-strip > .hive-times { grid-column:2; grid-row:1 / 4; align-self:center; } +#hive-strip > .hive-strip-status { grid-column:1 / -1; } +#hive-strip > .hive-coverage { grid-column:1 / -1; } +#hive-motion { justify-self:start; } +.hive button { min-height:44px; border-radius:22px; font-size:.78rem; padding:9px 14px; } +.hive input { min-height:44px; border-radius:22px; padding:10px 15px; } +.hive-search { max-width:none; } +.hive-search label { font-size:.71rem; } +.hive-record { grid-template-columns:minmax(0,1fr) max-content; gap:5px 14px; padding:14px 0; } +.hive-select { min-height:44px !important; line-height:1.45; font-size:.88rem !important; } +.hive-chip { grid-column:1; font-size:.66rem; } +.hive-pill,.hive-elapsed { font-size:.63rem; } +.hive-activity { font-size:.76rem; } +.hive-node[data-selected="true"] > .hive-record { background:var(--bg-card); border-radius:8px; } +.hive-children { margin-left:10px; padding-left:15px; } +.hive-fields { grid-template-columns:72px minmax(0,1fr); font-size:.68rem; } +#hive-manifest { position:sticky; top:145px; } +.hive-message { border-radius:10px; padding:16px 18px; } +.hive-message-text { font-size:.88rem; line-height:1.75; } +.hive-closing { font-size:.78rem; } +@media (min-width:901px) { #hive-tree { max-height:1000px; overflow:auto; padding-right:12px; scrollbar-color:var(--border-active) var(--bg-surface); } } +@media (max-width:900px) { + .hive-masthead { min-height:460px; padding:58px 7vw; } + .hive-masthead::before { inset:0 -30% 0 10%; opacity:.75; } + #hive-manifest { position:static; } + .hive-section { padding:22px; } +} +@media (max-width:600px) { + .hive { padding:14px 20px 50px; } + .hive-jumps { gap:10px 20px; } + .hive-jumps a { font-size:.65rem; } + .hive-masthead { margin:0 -20px 22px; padding:54px 28px 48px; min-height:520px; justify-content:flex-end; } + .hive-masthead::before { inset:-25% -65% 15% -25%; background-position:center; opacity:.7; } + .hive-masthead::after { background:linear-gradient(0deg,var(--bg-base) 1%,transparent 95%); } + .hive h1 { font-size:clamp(3.7rem,17vw,5rem); margin-bottom:18px; } + .hive-intro { font-size:1rem; } + .hive-welcome { font-size:.78rem; } + .hive-sections { gap:18px; } + .hive-section { padding:20px 16px; border-radius:12px; } + #hive-strip { display:block; padding:20px 16px; } + #hive-strip > * + * { margin-top:12px; } + .hive-times { grid-template-columns:1fr; font-size:.67rem; gap:2px; } + .hive-times dd { margin-bottom:8px; } + .hive-chip { max-width:100%; } + .hive-conversation-controls button { flex:1; } +} +@media (prefers-reduced-motion:reduce) { .hive *, .hive *::before, .hive *::after { animation:none !important; transition:none !important; } } diff --git a/scripts/test-hive-cosmic.py b/scripts/test-hive-cosmic.py new file mode 100644 index 00000000..5f8e3e3c --- /dev/null +++ b/scripts/test-hive-cosmic.py @@ -0,0 +1,21 @@ +"""Static presentation checks. Does not substitute for a Rust build or browser QA.""" +from pathlib import Path +import hashlib,re,unittest,xml.etree.ElementTree as ET +ROOT=Path(__file__).resolve().parents[1] +class CosmicChecks(unittest.TestCase): + def test_omega_bytes_untouched(self): + p=ROOT/'om/hive-page/main.html' + self.assertEqual(hashlib.sha256(p.read_bytes()).hexdigest(),(ROOT/'om/hive-page/main.html.sha256').read_text().split()[0]) + def test_decorative_asset(self): + p=ROOT/'public/assets/hive-universe.svg' + self.assertEqual(ET.parse(p).getroot().attrib['viewBox'],'0 0 1600 900') + self.assertNotRegex(p.read_text(),r'