oikos-web: extract the client stack from dtoro/oikos
Some checks failed
ci / web (push) Has been cancelled
Desktop App / Build Linux (amd64) (push) Has been cancelled
Desktop App / Attach to Release (push) Has been cancelled

Phase 1 of the hexagonal-architecture plan (dtoro/oikos
plans/2026-08-15-hexagonal-architecture.md). Moves the delivery stack
for the control-room UI into its own repo with its own pipeline:

- web/ — Svelte 5 SPA, verbatim (vendor/ included)
- desktop/ — Wails v3 wrapper, updateURL repointed to
  dtoro/oikos-web releases
- compose/ — Dockerfile + Caddyfile, verbatim (the /wails/* 404 and
  asset no-fallback quirks are load-bearing)
- docker-compose.yml — single web service, same 8091:80 publish,
  mem/cpu limits, and restart policy as the oikos stack's web service
- scripts/deploy.sh — mirrors oikos deploy essentials: CI-green gate,
  TOCTOU guard, version-tagged oikos-web:v$VERSION, prune to 3
- cmd/webhook + scripts/install-webhook.sh — standalone push-to-deploy
  receiver on :9798 (env-only secrets, no Infisical dependency)
- CI: the web job from oikos's ci.yml + the desktop build/release
  workflow, path-adjusted

Own VERSION (0.33.0) with the same bump-on-main rule; starts above
oikos's 0.32.x so the desktop updater sees an upgrade.
This commit is contained in:
dtoro
2026-08-15 22:20:54 +02:00
commit ed8a3145b3
365 changed files with 61308 additions and 0 deletions

84
web/vendor/examples/state-sequence.html vendored Normal file
View File

@@ -0,0 +1,84 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Orby · State sequence example</title>
<link rel="stylesheet" href="./example.css" />
</head>
<body>
<main>
<h1>Timed sequence</h1>
<p>
Define a product-owned timeline, then pause, resume, stop, or replay it
through one controller.
</p>
<div class="glyph-stage">
<canvas id="aiGlyph" width="440" height="440" aria-label="Animated AI state sequence"></canvas>
</div>
<div class="actions" role="group" aria-label="Sequence controls">
<button id="replay" type="button">Replay</button>
<button id="pause" type="button">Pause</button>
<button id="resume" type="button">Resume</button>
<button id="stop" type="button">Stop</button>
</div>
<p id="stateStatus" role="status">Sequence ready</p>
</main>
<script type="module">
import { createGlyph } from "../src/joan-engine.js";
import { playStateSequence } from "../src/state-sequence.js";
const glyph = createGlyph("#aiGlyph", {
sprite: "ai.idle",
seed: "self-service-sequence",
gridSize: 68,
});
const status = document.querySelector("#stateStatus");
let playback;
const play = () => {
playback?.stop();
const nextPlayback = playStateSequence(glyph, [
{ sprite: "ai.idle", holdMs: 1_200 },
{ sprite: "ai.thinking", holdMs: 2_000 },
{ sprite: "ai.progress", holdMs: 1_200 },
{ sprite: "status.success", transition: "path-draw" },
]);
playback = nextPlayback;
status.textContent = "Sequence playing";
nextPlayback.finished.then(
() => {
if (playback === nextPlayback) status.textContent = "Sequence complete";
},
(error) => {
if (playback === nextPlayback) {
status.textContent = `Sequence ended: ${error.name}`;
}
},
);
};
document.querySelector("#replay").addEventListener("click", play);
document.querySelector("#pause").addEventListener("click", () => {
playback?.pause();
status.textContent = "Sequence paused";
});
document.querySelector("#resume").addEventListener("click", () => {
playback?.resume();
status.textContent = "Sequence playing";
});
document.querySelector("#stop").addEventListener("click", () => {
playback?.stop();
status.textContent = "Sequence stopped";
});
window.addEventListener("pagehide", () => {
playback?.stop();
glyph.destroy();
}, { once: true });
play();
</script>
</body>
</html>