Rebuild Ghostlight around explicit world authority

This commit is contained in:
Meta Vens 2026-09-02 07:21:11 +02:00
commit 6bb6869810
61 changed files with 10666 additions and 105981 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

19
web/dist/index.html vendored
View file

@ -1,19 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Ghostlight Dungeon</title>
<script type="module" crossorigin src="/assets/index-DIf_m6wC.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-0xx6l_wS.css">
</head>
<body>
<a class="skip-link" href="#surface">Skip to Ghostlight</a>
<header>
<p class="eyebrow">GHOSTLIGHT / LIVING WORLDS</p>
<h1>Ghostlight Dungeon</h1>
<p id="status" role="status" aria-live="polite">Reading the table…</p>
</header>
<main id="surface" tabindex="-1"></main>
</body>
</html>

View file

@ -22,9 +22,7 @@ class GhostlightEveTransport implements EveBrowserProviderTransport {
async surface(surface: EveProviderSurfaceAdvertisement): Promise<EveSurfaceDocument> {
const surfaceId = surface.surfaceId || "ghostlight.play";
const pendingInvite = sessionStorage.getItem("ghostlight.pendingInvite");
const query = pendingInvite ? `?invite=${encodeURIComponent(pendingInvite)}` : "";
const document = await fetchJson<EveSurfaceDocument>(`api/eve/surfaces/${encodeURIComponent(surfaceId)}${query}`);
const document = await fetchJson<EveSurfaceDocument>(`api/eve/surfaces/${encodeURIComponent(surfaceId)}`);
this.sourceVersion = Math.max(0, Math.trunc(document.version || 0));
this.authenticatedSurface = !containsAnonymousAccessGate(document);
return document;
@ -40,9 +38,6 @@ class GhostlightEveTransport implements EveBrowserProviderTransport {
headers: { "content-type": "application/json" },
body: JSON.stringify(intent),
});
if (intent.operation.operationId === "session_zero.join" && result.receipt?.state === "accepted") {
sessionStorage.removeItem("ghostlight.pendingInvite");
}
return result;
}
@ -67,12 +62,6 @@ class GhostlightEveTransport implements EveBrowserProviderTransport {
}
}
const linkedInvite = new URL(window.location.href).searchParams.get("invite");
if (linkedInvite) {
sessionStorage.setItem("ghostlight.pendingInvite", linkedInvite);
history.replaceState(null, "", `${window.location.pathname}${window.location.hash}`);
}
async function fetchJson<T = any>(input: RequestInfo | URL, init?: RequestInit): Promise<T> {
const response = await fetch(input, { cache: "no-store", credentials: "same-origin", ...init });
const body = await response.json().catch(() => undefined);