Merge control portal work from RPGTheory/aeternalis-portal

RPGTheory/aeternalis-portal had diverged from this repo (the git/CI/CD
copy) with an in-progress control portal feature that was never synced
back here, so none of it had gone through CI or been deployed:

- New site/game/control routing split: index.html becomes a world
  directory landing page (site.ts), game.html is the renamed former
  index.html (main.ts), control.html is a new admin panel
  (control.ts, portal-shared.ts, portal.css).
- Server: new internal/store/portal.go (character/world registry,
  command queue, admin grants) and internal/transport/control.go
  (portal API routes), plus a new internal/gitops package that lets
  the portal provision new worlds via a GitOps repo commit.
- game.World gains BornAt/DiedAt/DeathReason and an operator Control()
  path (close/open admissions, awaken boss, end world, per-character
  rename/heal/unstuck/retire); death no longer reuses the same
  character id on rejoin, matching the "new life" permadeath model in
  Plan.md rather than the old bypass-prevention test's expectations.
- deploy/: new control-egress network policy and portal/control
  values (admin role, GitOps repo/branch/values file/CIDRs).
- New e2e coverage: tests/portal.spec.ts, tools/capture-world.mjs.

Verified this repo's own independent commits (800ms movement-staleness
window, 20s boss-attack poll, SRS/TLS deploy values, ubuntu-22.04
runner pin, DOCKER_HOST fix) were already present in the portal copy
before merging, so nothing here regresses them. `tsc --noEmit`, the
vite client build, and the protocol contract check all pass; no go.mod
changes. Could not run `go build`/`go test` locally (no Go toolchain
on PATH, Docker daemon not running) — every new/changed Go symbol was
manually cross-referenced and resolves, but this should still be built
and tested in CI before merging to master.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-09-06 11:08:44 -04:00
co-authored by Claude Sonnet 5
parent b515c65aba
commit 5df2f1b681
32 changed files with 1871 additions and 100 deletions
+10 -33
View File
@@ -1,35 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<meta name="theme-color" content="#172725" />
<title>Aeternalis</title>
<link rel="icon" href="data:," />
</head>
<body>
<canvas id="world" aria-label="Aeternalis 3D world"></canvas>
<div id="hud">
<header class="topbar">
<div class="brand"><span class="brand-mark">A</span><div><strong>AETERNALIS</strong><span id="world-name">The First Reach</span></div></div>
<div class="compass"><span>W</span><span>NW</span><b>N</b><span>NE</span><span>E</span></div>
<div class="connection"><i id="connection-dot"></i><span id="connection-status">Connecting</span><button id="settings-toggle" class="icon" title="Display settings" aria-label="Display settings"><i data-lucide="settings-2"></i></button></div>
</header>
<section id="season" class="season"><div><span id="phase-label">THE GATHERING</span><strong id="season-clock">7d 00h</strong></div><span id="season-detail">Until the Harbinger</span><div class="thin-track"><i id="season-progress"></i></div></section>
<section id="boss-bar" class="boss-bar" hidden><button id="target-boss" title="Target Harbinger" aria-label="Target Harbinger"><i data-lucide="crosshair"></i> THE HARBINGER</button><div class="bar"><i id="boss-health"></i></div><small id="boss-count"></small></section>
<aside id="settings" class="panel settings" hidden><div class="panel-title"><h2>Display</h2><button data-close="settings" class="icon" title="Close" aria-label="Close display settings"><i data-lucide="x"></i></button></div><label>Detail <select id="quality"><option value="high">High</option><option value="low">Low</option></select></label><label>Camera distance <input id="zoom" type="range" min="30" max="100" value="62" /></label><button id="dev-boss" hidden><i data-lucide="flame"></i> Awaken Harbinger</button><button id="logout"><i data-lucide="log-out"></i> Sign out</button></aside>
<aside id="inventory" class="panel inventory" hidden><div class="panel-title"><h2>Inventory</h2><button data-close="inventory" class="icon" title="Close" aria-label="Close inventory"><i data-lucide="x"></i></button></div><div id="inventory-items" class="inventory-items"></div><h3>Crafting</h3><div id="recipes"></div><h3>Skills</h3><div id="skills" class="skills"></div></aside>
<div id="target" class="target" hidden><span id="target-name"></span><span id="target-health"></span></div>
<div id="notice" role="status" class="notice" hidden></div>
<footer class="bottom" id="game-controls" hidden>
<section class="vitals"><div><strong id="character-name">Traveler</strong><span id="health-number">100 / 100</span></div><div class="bar"><i id="health-fill"></i></div><div class="vital-detail"><span><i data-lucide="hourglass"></i><span id="play-time">2h left today</span></span><span id="kills">0 kills</span></div></section>
<nav class="actions" aria-label="Actions"><button id="attack" title="Attack" aria-label="Attack"><i data-lucide="swords"></i></button><button id="gather" title="Gather" aria-label="Gather"><i data-lucide="pickaxe"></i></button><button id="heal" title="Use bandage" aria-label="Use bandage"><i data-lucide="heart-pulse"></i><small id="bandage-count">0</small></button><button id="keystone" title="Return with keystone" aria-label="Return with keystone"><i data-lucide="gem"></i></button><span></span><button id="inventory-toggle" title="Inventory and crafting" aria-label="Inventory and crafting"><i data-lucide="backpack"></i></button></nav>
<section class="location"><canvas id="minimap" width="140" height="140" aria-label="World map"></canvas><span id="coordinates">0, 0</span><small id="chunk-count">9 chunks</small></section>
</footer>
<nav id="movement" class="movement" aria-label="Movement" hidden><button data-move="up" aria-label="Move north"><i data-lucide="chevron-up"></i></button><button data-move="left" aria-label="Move west"><i data-lucide="chevron-left"></i></button><button data-move="down" aria-label="Move south"><i data-lucide="chevron-down"></i></button><button data-move="right" aria-label="Move east"><i data-lucide="chevron-right"></i></button></nav>
</div>
<dialog id="arrival" open><div class="eyebrow">THE FIRST REACH</div><h1>Aeternalis</h1><p id="arrival-status">One life. A world on borrowed time.</p><form id="join-form"><label for="name">Character name</label><input id="name" name="name" autocomplete="nickname" minlength="2" maxlength="24" placeholder="Traveler" required value="Traveler" /><button id="join" type="submit">Enter world <i data-lucide="arrow-right"></i></button></form><a id="login" class="command" href="/auth/login" hidden>Sign in <i data-lucide="arrow-right"></i></a><div id="passages"></div><p id="arrival-error" class="error" role="alert"></p></dialog>
<dialog id="ending"><div class="eyebrow" id="ending-eyebrow">JOURNEY ENDED</div><h1 id="ending-title">Your story remains.</h1><p id="ending-detail"></p><div id="destinations"></div><button id="reconnect" hidden>Reconnect <i data-lucide="refresh-cw"></i></button></dialog>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
<head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#122b24"/><title>Aeternalis | Worlds</title><link rel="icon" href="data:,"/></head>
<body class="public-site">
<header class="site-header"><a class="wordmark" href="/">AETERNALIS<span>Survival worlds</span></a><nav aria-label="Main navigation"><a href="#worlds">Worlds</a><a href="#journey">My journey</a><a id="control-link" href="/control" hidden>Control</a><button id="account-button" class="button secondary"><i data-lucide="log-in"></i><span>Sign in</span></button></nav></header>
<main>
<section class="world-hero"><img src="/images/world.png" alt="The procedural forests and highlands of Aeternalis"/><div class="hero-shade"></div><div class="hero-copy"><p class="eyebrow">A WORLD ON BORROWED TIME</p><h1>Aeternalis</h1><p>The Harbinger is coming. Every life leaves a story.</p><a class="button light" href="#worlds">Choose a world<i data-lucide="arrow-down"></i></a></div><span class="hero-caption">THE FIRST REACH / IN-GAME TERRAIN</span></section>
<section id="worlds" class="site-section"><div class="section-heading"><div><p class="eyebrow">THE REALMS</p><h2>Worlds</h2></div><div class="heading-tools"><span id="world-count" class="muted">Loading</span><button id="refresh" class="icon-button" aria-label="Refresh worlds" title="Refresh worlds"><i data-lucide="refresh-cw"></i></button></div></div><div id="site-message" class="message" role="status" hidden></div><div id="world-list" class="world-list" aria-live="polite"><p class="empty">Loading worlds...</p></div></section>
<section id="journey" class="site-section journey-section"><div class="section-heading"><div><p class="eyebrow">ONE LIVING CHARACTER</p><h2>Your journey</h2></div></div><div id="active-character"></div><div id="character-history"><p class="empty">Sign in to see your characters.</p></div></section>
</main><footer class="site-footer"><span>AETERNALIS</span><span>One character. One life. Another beginning.</span><a href="/control">Control portal</a></footer>
<script type="module" src="/src/site.ts"></script>
</body></html>