Initial commit — SvelteKit fleet manager for T5 Plutonium servers

Ports push_scripts.sh (1497 lines of bash) to a SvelteKit + SQLite web app
that manages a fleet of T5 Plutonium servers running on Komodo. Same push
and beta workflow as the shell script, with a live SSE pipeline view, a
!rt-token-gated auth modal that hard-pauses deployments on stale tokens,
per-file audit diffs, and a Komodo-container deployment target.

- Push/beta engines port the exact filter, held-by-beta, conflict, and
  stale-backup rules from the shell script
- SQLite (better-sqlite3) replaces script_metadata.json; a one-shot
  importer moves legacy state over on first boot
- 16 vitest tests cover push add/update/skip, beta open→rollback,
  open→promote, conflict guards, sweep frozen/manual branches, and IW4M
  login/status parsing
- docker/ + komodo/stack.toml deploy as a managed container on the same
  host as the game servers, /root/zombies bind-mounted at the same path
  the shell script used
This commit is contained in:
2026-09-12 00:23:51 -04:00
commit d99711563e
67 changed files with 9415 additions and 0 deletions
@@ -0,0 +1,108 @@
<script lang="ts">
import { deployments, frozen, frozenReason } from '$ui/stores/pipeline.js';
// Newest first, up to 8 rows on the dashboard.
let rows = $derived(
Array.from($deployments.values())
.sort((a, b) => b.openedAt - a.openedAt)
.slice(0, 8)
);
function stateColor(state: string): string {
switch (state) {
case 'done': return '#2d4a2d';
case 'failed': return '#4a2d2d';
case 'pending': return '#3a2f00';
case 'manual': return '#333';
default: return '#222';
}
}
function stateFg(state: string): string {
switch (state) {
case 'done': return '#a8e6a8';
case 'failed': return '#ff8080';
case 'pending': return '#ffcc55';
case 'manual': return '#aaa';
default: return '#888';
}
}
</script>
<div class="wrapper">
<header>
<h3>Pipeline</h3>
{#if $frozen}
<span class="frozen">frozen — {$frozenReason ?? 'no reason'}</span>
{/if}
</header>
{#if rows.length === 0}
<p class="empty">no active deployments</p>
{:else}
<div class="rows">
{#each rows as dep (dep.id)}
<a class="row" href="/deployments/{dep.id}">
<div class="row-head">
<span class="action">{dep.action || dep.id}</span>
<span class="count">{dep.servers.size} server{dep.servers.size === 1 ? '' : 's'}</span>
</div>
<div class="chips">
{#each [...dep.servers.entries()] as [srv, meta] (srv)}
<span
class="chip"
style="background:{stateColor(meta.state)};color:{stateFg(meta.state)}"
title={meta.error ?? (meta.players !== null ? `${meta.players}p` : meta.state)}
>
{srv}{meta.players !== null && meta.players > 0 ? ` ${meta.players}p` : ''}
</span>
{/each}
</div>
</a>
{/each}
</div>
{/if}
</div>
<style>
.wrapper {
background: #141414;
border: 1px solid #333;
border-radius: 6px;
padding: 12px;
}
header {
display: flex;
justify-content: space-between;
align-items: baseline;
margin-bottom: 8px;
}
h3 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: #aaa; }
.frozen { color: #ff6060; font-size: 12px; }
.empty { color: #666; font-size: 13px; margin: 0; }
.rows { display: grid; gap: 8px; }
.row {
display: block;
color: #ddd;
text-decoration: none;
padding: 8px;
background: #1a1a1a;
border-radius: 4px;
border: 1px solid transparent;
}
.row:hover { border-color: #444; }
.row-head {
display: flex;
justify-content: space-between;
align-items: baseline;
margin-bottom: 6px;
}
.action { font-family: ui-monospace, monospace; font-size: 13px; }
.count { color: #666; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
padding: 2px 6px;
border-radius: 3px;
font-size: 11px;
font-family: ui-monospace, monospace;
}
</style>