feat(worldapi): sci-fi admin center, official logo and live GitHub release dashboard (#312)

* feat(worldapi): comprehensive sci-fi admin dashboard, grouped sidebar, GitHub releases, workspaces and searchable key inventory

* feat(worldapi): embed user-provided OpenGenesisLINK World API logo for the protected control center

* feat(worldapi): display supplied OpenGenesisLINK logo in secure login and dashboard branding

* feat(worldapi): display supplied OpenGenesisLINK logo in secure login and dashboard branding

* test(worldapi): validate logo, protected grouped dashboard, GitHub channels and browser syntax

* ci(worldapi): check new console workspaces, release dashboard, logo and JS syntax

* docs(worldapi): real sci-fi admin workspaces, GitHub release sources, security and deployment handoff

* feat(worldapi): add same-origin cached GitHub stable/dev/CI status endpoint without credentials

* feat(worldapi): register same-origin GitHub repository status and OpenAPI contract

* feat(worldapi): register same-origin GitHub repository status and OpenAPI contract

* fix(worldapi): use same-origin protected-frame compatible GitHub status service

* docs(test): validate GitHub same-origin status proxy and preserve restrictive admin CSP

* docs(test): validate GitHub same-origin status proxy and preserve restrictive admin CSP

* fix(worldapi): preserve legacy navsection heading for existing dashboard UX regression

* fix(worldapi): include GitHub repository status endpoint in ChatGPT public catalog

* fix(worldapi): filter API keys by their assigned scopes, not hidden editor choices

* feat(worldapi): display planned development milestone separately from actual main SHA and stable release

* fix(worldapi): fit branded image inside login header badge without overflow
This commit is contained in:
OpenGenesis (MPL 2.0) authored and GitHub committed 2026-10-25 23:15:54 +01:00
1 parent 0fdee4c92d
commit 8bdbd81bf7
10 files changed
+604 -26

No files matched your search

+4
View File
@@ -86,6 +86,10 @@ jobs:
- name: Verify OpenGenesisLINK protected admin Control Center
shell: bash
run: python3 tools/ci/verify_ogl_docs_admin_ui.py
- name: Verify World API Sci-Fi admin dashboard navigation and GitHub releases
shell: bash
run: python3 tools/ci/verify_worldapi_scifi_admin_center.py
- name: Verify OpenGenesisLINK 0.9.3.12 dashboard and diagnostic updates
shell: bash
+270 -23
View File
@@ -46,12 +46,12 @@ namespace NexVerse.Server.Api
"no-referrer");
response.AddHeader(
"Content-Security-Policy",
"default-src 'self'; style-src 'unsafe-inline'; script-src 'unsafe-inline'; connect-src 'self'");
"default-src 'self'; img-src 'self' data:; style-src 'unsafe-inline'; script-src 'unsafe-inline'; connect-src 'self'");
response.RawBuffer =
Encoding.UTF8.GetBytes(s_Html);
}
private const string s_Html = """
private static readonly string s_Html = """
<!doctype html>
<html lang="de">
<head>
@@ -190,26 +190,97 @@ main:before {content:"";position:fixed;inset:0;pointer-events:none;opacity:.17;z
.ogl-triage-tile p{font-size:12px;color:#a4b8d4;line-height:1.6;}
.ogl-triage-tile code{overflow-wrap:anywhere;}
/* OGL COMMAND CENTER 2.0 — overlays existing validated controls and preserves IDs */
:root{--bg:#030914;--panel:#0a172b;--panel2:#10243b;--line:rgba(75,157,218,.25);--text:#edf8ff;--muted:#97b5d2;--accent:#3ddcff;--accent2:#568cff;--good:#55eebd;--shadow:0 12px 46px rgba(0,0,0,.36)}
body{background:radial-gradient(ellipse at 78% 0%,rgba(11,70,143,.22),transparent 36%),repeating-linear-gradient(90deg,transparent 0 77px,rgba(34,87,148,.024) 78px 79px),#030913}
.shell{grid-template-columns:284px minmax(0,1fr)}
nav{width:284px;display:flex;flex-direction:column;overflow:hidden;border-right:1px solid rgba(74,168,241,.23);background:linear-gradient(180deg,rgba(5,17,34,.99),rgba(5,12,25,.99));padding:0 12px}
.ogl-brand{flex:0 0 auto;display:flex;gap:10px;align-items:center;padding:23px 10px 15px;margin:0;border-bottom:1px solid rgba(75,157,218,.23)}
.ogl-brand .ogl-logo img{width:56px;height:56px;object-fit:contain;filter:drop-shadow(0 0 12px rgba(56,209,255,.2))}
.ogl-brand .ogl-logo{flex:0 0 61px;width:61px;height:61px;border-radius:12px;display:grid;place-items:center;font-size:14px;box-shadow:0 0 16px rgba(0,220,255,.18);border:1px solid rgba(60,211,252,.3)}
.ogl-brand .brand-copy{min-width:0}.ogl-brand strong{font-size:15px;letter-spacing:-.25px}.ogl-brand span{font-size:9px;letter-spacing:.11em}
.nav-scroll{overflow-y:auto;overscroll-behavior:contain;flex:1;padding:12px 3px 24px;scrollbar-width:thin;scrollbar-color:#24466b transparent}
.navgroup{border-bottom:1px solid rgba(74,140,209,.10);margin-bottom:5px;padding-bottom:7px}
.navgroup summary{cursor:pointer;list-style:none;padding:12px 12px 7px;font-size:10px;font-weight:800;letter-spacing:.125em;text-transform:uppercase;color:#81b2d9;display:flex;justify-content:space-between;align-items:center}
.navgroup summary:after{content:'+';color:#57cfff;font-size:17px;line-height:1}.navgroup[open] summary:after{content:'−'}
.navgroup summary::-webkit-details-marker{display:none}
.navbtn{display:block;width:100%;margin:1px 0;padding:9px 13px;font-size:12px;border-radius:8px;min-height:35px}
.navmeta{position:static;flex:0 0 auto;padding:12px 10px 15px;line-height:1.4;max-height:88px;overflow:hidden;border-top:1px solid rgba(72,167,240,.21)}
main{padding:28px clamp(17px,3vw,52px)}
.page{max-width:1600px}
.hero{background:linear-gradient(110deg,rgba(11,33,68,.94),rgba(6,25,54,.94) 65%,rgba(7,17,39,.93));min-height:146px}
.hero h1{letter-spacing:-.035em;font-size:clamp(26px,2.6vw,37px)}
.section,.card,.ogl-release-card,.ogl-status-card{background:linear-gradient(145deg,rgba(13,28,53,.92),rgba(6,17,34,.97));border:1px solid rgba(73,155,224,.21);box-shadow:0 12px 45px rgba(0,0,0,.21)}
.ogl-overline{font-size:10px;letter-spacing:.17em;color:#50d9ff;font-weight:800}
.ogl-command-bar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:0 0 17px}
.ogl-command-bar h2{font-size:24px;margin:3px 0}.ogl-command-bar p{color:var(--muted);margin:0}
.ogl-quick-actions{display:flex;flex-wrap:wrap;gap:8px}
.ogl-status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 19px}
.ogl-status-card{padding:19px 20px;border-radius:13px;display:flex;flex-direction:column;gap:5px;position:relative;overflow:hidden}
.ogl-status-card:before{content:'';position:absolute;left:0;right:0;top:0;height:2px;background:linear-gradient(90deg,#2ee0ff,transparent);opacity:.7}
.ogl-status-card small,.ogl-release-type{font-size:10px;letter-spacing:.11em;font-weight:750;color:#83b9e0}
.ogl-status-card strong{font-size:clamp(16px,1.5vw,23px);color:#e6f9ff;overflow-wrap:anywhere}
.ogl-status-card span{font-size:11px;color:var(--muted)}
.ogl-panel-split{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.ogl-section-flex{display:flex;justify-content:space-between;gap:15px;align-items:start}
.ogl-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:9px}.ogl-shortcuts button{padding:13px;border:1px solid rgba(79,173,240,.21);background:#081a31;color:#c7edff;text-align:left;border-radius:9px;cursor:pointer}.ogl-shortcuts button:hover{border-color:#42cfff}
.ogl-release-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}
.ogl-release-card{border-radius:14px;padding:23px;min-height:195px;display:flex;flex-direction:column;gap:12px}
.ogl-release-card strong{font-size:25px;overflow-wrap:anywhere}
.ogl-release-card p{margin:0;color:var(--muted);flex:1;overflow-wrap:anywhere}
.ogl-release-card a{color:#75ddff;font-size:12px}
.ogl-mini-status{border:1px solid rgba(81,149,213,.2);padding:12px;margin:10px 0;border-radius:9px;background:rgba(7,20,42,.6);color:#a5c9e4;overflow-wrap:anywhere}
.ogl-workspace-tools{display:flex;gap:15px;align-items:center;margin:15px 0}.ogl-workspace-tools input{flex:1;min-width:0}.ogl-workspace-tools span{color:var(--muted);white-space:nowrap}
.ogl-operation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ogl-opcard{display:flex;flex-direction:column;gap:9px;align-items:start;border:1px solid rgba(72,148,219,.25);background:rgba(4,17,37,.66);border-radius:10px;padding:15px;color:var(--text);text-align:left;cursor:pointer;overflow-wrap:anywhere}
.ogl-opcard:hover,.ogl-opcard:focus-visible{border-color:#33c8ff;background:rgba(13,53,90,.5)}
.ogl-opcard small{font-size:11px;color:var(--muted)}.ogl-opcard code{font-size:11px;white-space:normal}
.ogl-opbadge{font-size:10px;font-weight:850;padding:3px 7px;border-radius:5px;background:#1b4262;color:#b9f4ff}
.ogl-opbadge.write{background:#4b351d;color:#ffce80}
.ogl-status-ok{color:#52e3ac}.ogl-status-error{color:#ff9797}
#page-repository .section{min-height:125px}
@media(max-width:1180px){.ogl-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ogl-release-grid{grid-template-columns:1fr 1fr}}
@media(max-width:850px){.shell{grid-template-columns:1fr}nav{position:relative;top:auto;width:100%;height:auto;max-height:440px}.nav-scroll{max-height:285px}.ogl-status-grid,.ogl-release-grid,.ogl-panel-split,.ogl-operation-grid{grid-template-columns:1fr}.ogl-command-bar{align-items:start;flex-direction:column}.navmeta{display:none}}
</style>
</head>
<body>
<div class="shell">
<nav>
<div class="brand"><div class="ogl-logo" aria-hidden="true">OGL</div><strong>OpenGenesisLINK</strong><span>WORLD API · CONTROL CENTER</span></div>
<div class="navsection-label">CONTROL CENTER</div>
<button class="navbtn active" data-page="overview">Übersicht</button>
<button class="navbtn" data-page="statistics">Statistik</button>
<nav aria-label="World API Verwaltung">
<div class="brand ogl-brand"><div class="ogl-logo"><img src="OGL_LOGO_DATA_URI" width="56" height="56" alt="OpenGenesisLINK World API Logo"></div><div class="brand-copy"><strong>OpenGenesisLINK</strong><span>WORLD API · CONTROL CENTER</span></div></div>
<div class="navsection-label">CONTROL CENTER · BEREICHE</div>
<div class="nav-scroll">
<details class="navgroup" open><summary>Übersicht &amp; Monitoring</summary>
<button class="navbtn active" data-page="overview">Dashboard</button>
<button class="navbtn" data-page="statistics">Statistik &amp; Aktivität</button>
<button class="navbtn" data-page="diagnostics">Systemdiagnose</button>
<button class="navbtn" data-page="grid">Grid-Planer</button>
<button class="navbtn" data-page="nodes">Simulatoren</button>
<button class="navbtn" data-page="changes">Was ist neu?</button>
<button class="navbtn" data-page="versions">Versionen</button>
<button class="navbtn" data-page="roadmap">Entwicklungsplan</button>
<div class="navsection-label">INTEGRATIONEN</div>
<button class="navbtn" data-page="chatgpt">ChatGPT / Portale</button>
<button class="navbtn" data-page="adminlogin">Administrator</button>
<button class="navbtn" data-page="secrets">Schlüssel &amp; Einrichtung</button>
<button class="navbtn" data-page="explorer">API-Endpunkte</button>
<button class="navbtn" data-page="repository">GitHub &amp; Releases</button></details>
<details class="navgroup" open><summary>Grid &amp; Simulatoren</summary>
<button class="navbtn" data-page="grid">Grid-Planer &amp; Regionen</button>
<button class="navbtn" data-page="nodes">Simulator-Nodes</button>
<button class="navbtn" data-page="estates">Estates &amp; Land</button>
<button class="navbtn" data-page="console">Konsole &amp; Aufträge</button></details>
<details class="navgroup"><summary>Einwohner &amp; Communities</summary>
<button class="navbtn" data-page="users">Benutzer &amp; Avatare</button>
<button class="navbtn" data-page="groups">Gruppen &amp; Rollen</button>
<button class="navbtn" data-page="inventory">Inventar &amp; Assets</button>
<button class="navbtn" data-page="profiles">Profile &amp; Media</button></details>
<details class="navgroup"><summary>Wirtschaft &amp; Content</summary>
<button class="navbtn" data-page="economy">Economy / NV$</button>
<button class="navbtn" data-page="marketplace">Marketplace &amp; Medien</button>
<button class="navbtn" data-page="discovery">Orte, Suche &amp; Events</button>
<button class="navbtn" data-page="experiences">Experiences</button></details>
<details class="navgroup"><summary>API &amp; Sicherheit</summary>
<button class="navbtn" data-page="secrets">API-Schlüssel &amp; Scopes</button>
<button class="navbtn" data-page="security">Sicherheit &amp; Audit</button>
<button class="navbtn" data-page="explorer">API-Explorer</button>
<button class="navbtn" data-page="chatgpt">Portale &amp; Integration</button>
<button class="navbtn" data-page="adminlogin">Admin-Anmeldung</button></details>
<details class="navgroup"><summary>Software &amp; Planung</summary>
<button class="navbtn" data-page="changes">Changelog</button>
<button class="navbtn" data-page="versions">Versionshistorie</button>
<button class="navbtn" data-page="roadmap">Roadmap &amp; Meilensteine</button></details>
</div>
<div class="navmeta" id="navmeta">Live-Daten werden geladen…</div>
</nav>
<main>
@@ -218,6 +289,16 @@ main:before {content:"";position:fixed;inset:0;pointer-events:none;opacity:.17;z
<div><div class="eyebrow">OpenGenesisLINK / WORLD API</div><h1>Deine Welt. <em>Deine Kontrolle.</em></h1><p>Live-Übersicht über Serverversion, API-Vertrag, aktuelle Erweiterungen und verfügbare Endpunkte.</p></div>
<div class="pill"><span class="dot" id="healthDot"></span><span id="healthText">Prüfe API-Status…</span></div>
</div>
<div class="ogl-command-bar"><div><span class="ogl-overline">MISSION CONTROL · LIVE GRID</span><h2>Systemübersicht</h2><p>Reale API-Werte, veröffentlichte Releases und Verwaltungszugriffe auf einen Blick.</p></div><div class="ogl-quick-actions"><button class="action" data-goto="grid">Regionen</button><button class="action" data-goto="secrets">Schlüssel</button><button class="action" data-goto="console">Aufträge</button></div></div>
<div class="ogl-status-grid">
<div class="ogl-status-card"><small>GITHUB STABLE · veröffentlicht</small><strong id="dashStable">Prüfe GitHub…</strong><span id="dashStableMeta">Release-Kanal</span></div>
<div class="ogl-status-card"><small>GITHUB DEVELOPMENT · main</small><strong id="dashDevelopment">Prüfe Branch…</strong><span id="dashDevelopmentMeta">Build-Stand</span></div>
<div class="ogl-status-card"><small>CI / GITHUB ACTIONS</small><strong id="dashWorkflow">Prüfe CI…</strong><span id="dashWorkflowMeta">Letzter main-Lauf</span></div>
<div class="ogl-status-card"><small>EINWOHNER REGISTRIERT</small><strong id="dashResidents">–</strong><span>World-Statistik</span></div>
<div class="ogl-status-card"><small>AVATARE ONLINE</small><strong id="dashOnline">–</strong><span>Aktuelle Sessions</span></div>
<div class="ogl-status-card"><small>API-OPERATIONEN</small><strong id="dashOperations">–</strong><span>OpenAPI-Vertrag</span></div>
</div>
<div class="ogl-panel-split"><div class="section"><div class="ogl-section-flex"><div><h2>Repository &amp; Releases</h2><p class="sectionlead">Autoritativ aus GitHub; bei Fehlern keine erfundenen Versionen.</p></div><button class="action" data-goto="repository">Alle Details</button></div><div id="dashboardRepository" class="ogl-mini-status">GitHub-Abfrage steht aus.</div></div><div class="section"><div class="ogl-section-flex"><div><h2>Direktzugriff</h2><p class="sectionlead">Jede Aktion verwendet den bestehenden, berechtigten World-API-Vertrag.</p></div></div><div class="ogl-shortcuts"><button data-goto="users">Avatare verwalten</button><button data-goto="groups">Gruppen</button><button data-goto="economy">NV$-Economy</button><button data-goto="security">Audit &amp; Sicherheit</button><button data-goto="diagnostics">Diagnose</button></div></div></div>
<div class="ogl-live-strip"><span class="livepulse"></span><strong>OGL LIVE</strong><span>SERVER &amp; WORLD API</span><span class="live-version" id="oglActiveRelease">OpenGenesisLINK · Status wird geladen</span></div>
<div class="ogl-section-head"><span>Systemstatus</span><small>AKTUELLE SERVERDATEN</small></div>
<div class="cards">
@@ -246,6 +327,59 @@ main:before {content:"";position:fixed;inset:0;pointer-events:none;opacity:.17;z
</section>
<section class="page" id="page-repository">
<div class="hero"><div><div class="eyebrow">GITHUB · OPEN SOURCE / RELEASE CONTROL</div><h1>Repository &amp; Versionen</h1><p>Stable ist der neueste veröffentlichte Nicht-Prerelease-GitHub-Release. Development basiert auf main, nicht auf einer behaupteten Stable-Freigabe.</p></div><div class="pill"><span class="dot" id="githubDot"></span><span id="githubState">Noch nicht geladen</span></div></div>
<div class="ogl-release-grid">
<div class="ogl-release-card"><span class="ogl-release-type">STABLE · GITHUB RELEASE</span><strong id="githubStableVersion">–</strong><p id="githubStableInfo">Noch nicht geladen</p><a href="https://github.com/opengenesislink/opengenesislinkserver/releases" target="_blank" rel="noopener noreferrer">GitHub-Releases ansehen</a></div>
<div class="ogl-release-card"><span class="ogl-release-type">DEVELOPMENT · MAIN</span><strong id="githubDevelopmentVersion">–</strong><p id="githubDevelopmentInfo">Noch nicht geladen</p><a href="https://github.com/opengenesislink/opengenesislinkserver/commits/main/" target="_blank" rel="noopener noreferrer">Commits ansehen</a></div>
<div class="ogl-release-card"><span class="ogl-release-type">CI · MAIN</span><strong id="githubCiVersion">–</strong><p id="githubCiInfo">Noch nicht geladen</p><a href="https://github.com/opengenesislink/opengenesislinkserver/actions" target="_blank" rel="noopener noreferrer">Actions ansehen</a></div>
</div>
<div class="section"><div class="ogl-section-flex"><div><h2>Repository-Verbindung</h2><p class="sectionlead" id="githubUpdated">Die Daten werden ausschließlich lesend von der offiziellen GitHub-API geladen.</p></div><button class="action" id="githubRefresh" type="button">Jetzt aktualisieren</button></div><div class="ogl-mini-status" id="githubLastCommit">Kein Commit geladen.</div><div class="ogl-mini-status" id="githubReleaseNotes">Keine Release-Informationen geladen.</div><p class="authnote">Hinweis: Eine GitHub-Freigabe ist nicht identisch mit der momentan auf diesem ROBUST-Host installierten Version. Der lokale Build steht im Dashboard unter „Server“.</p></div>
</section>
<section class="page" id="page-users">
<div class="hero"><div><div class="eyebrow">OGL CONTROL PLANE · USERS</div><h1>Benutzer &amp; Avatare</h1><p>Einwohnerkonten, Registrierung, Profile, Aktivität und Sperr-/Löschabläufe.</p></div><div class="pill"><span class="dot good"></span><span>Autoritative API</span></div></div>
<div class="section"><h2>Verfügbare Verwaltungsoperationen</h2><p class="sectionlead">Aus dem aktiven OpenAPI-Vertrag dieses Servers. Ein Klick öffnet die echte Operation mit Parametern, Berechtigungen und Ausführung im API-Explorer; nicht vorhandene Funktionen werden nicht simuliert.</p><div class="ogl-workspace-tools"><input aria-label="Operationen filtern" data-workspace-search="users" placeholder="Operation oder Pfad filtern…"><span id="workspace-count-users">–</span></div><div class="ogl-operation-grid" id="workspace-users"><div class="empty">API-Vertrag wird geladen…</div></div></div>
</section>
<section class="page" id="page-groups">
<div class="hero"><div><div class="eyebrow">OGL CONTROL PLANE · GROUPS</div><h1>Gruppen &amp; Rollen</h1><p>Gruppenprofile, Mitglieder, Einladungen, Rechte, Gruppenland und Finanzen.</p></div><div class="pill"><span class="dot good"></span><span>Autoritative API</span></div></div>
<div class="section"><h2>Verfügbare Verwaltungsoperationen</h2><p class="sectionlead">Aus dem aktiven OpenAPI-Vertrag dieses Servers. Ein Klick öffnet die echte Operation mit Parametern, Berechtigungen und Ausführung im API-Explorer; nicht vorhandene Funktionen werden nicht simuliert.</p><div class="ogl-workspace-tools"><input aria-label="Operationen filtern" data-workspace-search="groups" placeholder="Operation oder Pfad filtern…"><span id="workspace-count-groups">–</span></div><div class="ogl-operation-grid" id="workspace-groups"><div class="empty">API-Vertrag wird geladen…</div></div></div>
</section>
<section class="page" id="page-inventory">
<div class="hero"><div><div class="eyebrow">OGL CONTROL PLANE · INVENTORY</div><h1>Inventar &amp; Assets</h1><p>Eigentümerbezogenes Inventar, Medien-Assets und geschützte Bestandsoperationen.</p></div><div class="pill"><span class="dot good"></span><span>Autoritative API</span></div></div>
<div class="section"><h2>Verfügbare Verwaltungsoperationen</h2><p class="sectionlead">Aus dem aktiven OpenAPI-Vertrag dieses Servers. Ein Klick öffnet die echte Operation mit Parametern, Berechtigungen und Ausführung im API-Explorer; nicht vorhandene Funktionen werden nicht simuliert.</p><div class="ogl-workspace-tools"><input aria-label="Operationen filtern" data-workspace-search="inventory" placeholder="Operation oder Pfad filtern…"><span id="workspace-count-inventory">–</span></div><div class="ogl-operation-grid" id="workspace-inventory"><div class="empty">API-Vertrag wird geladen…</div></div></div>
</section>
<section class="page" id="page-profiles">
<div class="hero"><div><div class="eyebrow">OGL CONTROL PLANE · PROFILES</div><h1>Profile &amp; Media</h1><p>Avatarprofile, Profilbilder, First-Life und sichere Media-Verwaltung.</p></div><div class="pill"><span class="dot good"></span><span>Autoritative API</span></div></div>
<div class="section"><h2>Verfügbare Verwaltungsoperationen</h2><p class="sectionlead">Aus dem aktiven OpenAPI-Vertrag dieses Servers. Ein Klick öffnet die echte Operation mit Parametern, Berechtigungen und Ausführung im API-Explorer; nicht vorhandene Funktionen werden nicht simuliert.</p><div class="ogl-workspace-tools"><input aria-label="Operationen filtern" data-workspace-search="profiles" placeholder="Operation oder Pfad filtern…"><span id="workspace-count-profiles">–</span></div><div class="ogl-operation-grid" id="workspace-profiles"><div class="empty">API-Vertrag wird geladen…</div></div></div>
</section>
<section class="page" id="page-economy">
<div class="hero"><div><div class="eyebrow">OGL CONTROL PLANE · ECONOMY</div><h1>Economy / NV$</h1><p>Banking, Zahlungen, Wallets, Verkäufe und Ledger-/Revisionsprozesse.</p></div><div class="pill"><span class="dot good"></span><span>Autoritative API</span></div></div>
<div class="section"><h2>Verfügbare Verwaltungsoperationen</h2><p class="sectionlead">Aus dem aktiven OpenAPI-Vertrag dieses Servers. Ein Klick öffnet die echte Operation mit Parametern, Berechtigungen und Ausführung im API-Explorer; nicht vorhandene Funktionen werden nicht simuliert.</p><div class="ogl-workspace-tools"><input aria-label="Operationen filtern" data-workspace-search="economy" placeholder="Operation oder Pfad filtern…"><span id="workspace-count-economy">–</span></div><div class="ogl-operation-grid" id="workspace-economy"><div class="empty">API-Vertrag wird geladen…</div></div></div>
</section>
<section class="page" id="page-marketplace">
<div class="hero"><div><div class="eyebrow">OGL CONTROL PLANE · MARKETPLACE</div><h1>Marketplace &amp; Medien</h1><p>Veröffentlichte Bilder, Publisher-Scopes, Media-Bindungen und Katalog-Schnittstellen.</p></div><div class="pill"><span class="dot good"></span><span>Autoritative API</span></div></div>
<div class="section"><h2>Verfügbare Verwaltungsoperationen</h2><p class="sectionlead">Aus dem aktiven OpenAPI-Vertrag dieses Servers. Ein Klick öffnet die echte Operation mit Parametern, Berechtigungen und Ausführung im API-Explorer; nicht vorhandene Funktionen werden nicht simuliert.</p><div class="ogl-workspace-tools"><input aria-label="Operationen filtern" data-workspace-search="marketplace" placeholder="Operation oder Pfad filtern…"><span id="workspace-count-marketplace">–</span></div><div class="ogl-operation-grid" id="workspace-marketplace"><div class="empty">API-Vertrag wird geladen…</div></div></div>
</section>
<section class="page" id="page-discovery">
<div class="hero"><div><div class="eyebrow">OGL CONTROL PLANE · DISCOVERY</div><h1>Orte, Events &amp; Suche</h1><p>Suche, Destination Guide, Places, Events und Community-Discovery.</p></div><div class="pill"><span class="dot good"></span><span>Autoritative API</span></div></div>
<div class="section"><h2>Verfügbare Verwaltungsoperationen</h2><p class="sectionlead">Aus dem aktiven OpenAPI-Vertrag dieses Servers. Ein Klick öffnet die echte Operation mit Parametern, Berechtigungen und Ausführung im API-Explorer; nicht vorhandene Funktionen werden nicht simuliert.</p><div class="ogl-workspace-tools"><input aria-label="Operationen filtern" data-workspace-search="discovery" placeholder="Operation oder Pfad filtern…"><span id="workspace-count-discovery">–</span></div><div class="ogl-operation-grid" id="workspace-discovery"><div class="empty">API-Vertrag wird geladen…</div></div></div>
</section>
<section class="page" id="page-experiences">
<div class="hero"><div><div class="eyebrow">OGL CONTROL PLANE · EXPERIENCES</div><h1>Experiences</h1><p>Verwaltung und Berechtigungen der vorhandenen Experiences-API.</p></div><div class="pill"><span class="dot good"></span><span>Autoritative API</span></div></div>
<div class="section"><h2>Verfügbare Verwaltungsoperationen</h2><p class="sectionlead">Aus dem aktiven OpenAPI-Vertrag dieses Servers. Ein Klick öffnet die echte Operation mit Parametern, Berechtigungen und Ausführung im API-Explorer; nicht vorhandene Funktionen werden nicht simuliert.</p><div class="ogl-workspace-tools"><input aria-label="Operationen filtern" data-workspace-search="experiences" placeholder="Operation oder Pfad filtern…"><span id="workspace-count-experiences">–</span></div><div class="ogl-operation-grid" id="workspace-experiences"><div class="empty">API-Vertrag wird geladen…</div></div></div>
</section>
<section class="page" id="page-security">
<div class="hero"><div><div class="eyebrow">OGL CONTROL PLANE · SECURITY</div><h1>Sicherheit &amp; Audit</h1><p>Audithistorie, Benutzer-Sicherheit, Rollen und autorisierte Schutzfunktionen.</p></div><div class="pill"><span class="dot good"></span><span>Autoritative API</span></div></div>
<div class="section"><h2>Verfügbare Verwaltungsoperationen</h2><p class="sectionlead">Aus dem aktiven OpenAPI-Vertrag dieses Servers. Ein Klick öffnet die echte Operation mit Parametern, Berechtigungen und Ausführung im API-Explorer; nicht vorhandene Funktionen werden nicht simuliert.</p><div class="ogl-workspace-tools"><input aria-label="Operationen filtern" data-workspace-search="security" placeholder="Operation oder Pfad filtern…"><span id="workspace-count-security">–</span></div><div class="ogl-operation-grid" id="workspace-security"><div class="empty">API-Vertrag wird geladen…</div></div></div>
</section>
<section class="page" id="page-estates">
<div class="hero"><div><div class="eyebrow">OGL CONTROL PLANE · ESTATES</div><h1>Estates &amp; Land</h1><p>Regions- und Estate-Konfiguration, Parzellen und Gruppenzuordnung.</p></div><div class="pill"><span class="dot good"></span><span>Autoritative API</span></div></div>
<div class="section"><h2>Verfügbare Verwaltungsoperationen</h2><p class="sectionlead">Aus dem aktiven OpenAPI-Vertrag dieses Servers. Ein Klick öffnet die echte Operation mit Parametern, Berechtigungen und Ausführung im API-Explorer; nicht vorhandene Funktionen werden nicht simuliert.</p><div class="ogl-workspace-tools"><input aria-label="Operationen filtern" data-workspace-search="estates" placeholder="Operation oder Pfad filtern…"><span id="workspace-count-estates">–</span></div><div class="ogl-operation-grid" id="workspace-estates"><div class="empty">API-Vertrag wird geladen…</div></div></div>
</section>
<section class="page" id="page-console">
<div class="hero"><div><div class="eyebrow">OGL CONTROL PLANE · CONSOLE</div><h1>Konsole &amp; Aufträge</h1><p>Kontrollierte Serverfunktionen und Jobs über bereits geprüfte HTTP-Endpunkte. Keine unbeschränkte Shell.</p></div><div class="pill"><span class="dot good"></span><span>Autoritative API</span></div></div>
<div class="section"><h2>Verfügbare Verwaltungsoperationen</h2><p class="sectionlead">Aus dem aktiven OpenAPI-Vertrag dieses Servers. Ein Klick öffnet die echte Operation mit Parametern, Berechtigungen und Ausführung im API-Explorer; nicht vorhandene Funktionen werden nicht simuliert.</p><div class="ogl-workspace-tools"><input aria-label="Operationen filtern" data-workspace-search="console" placeholder="Operation oder Pfad filtern…"><span id="workspace-count-console">–</span></div><div class="ogl-operation-grid" id="workspace-console"><div class="empty">API-Vertrag wird geladen…</div></div></div>
</section>
<section class="page" id="page-diagnostics">
<div class="hero"><div><div class="eyebrow">OGL CONTROL PLANE / DIAGNOSTICS</div><h1>Systemdiagnose</h1><p>Prüfe die tatsächlich erreichbaren World-API-Dienste dieses OGL-Servers. Kein Demo-Status, keine Datenbankänderungen.</p></div><div class="pill"><span class="dot" id="diagDot"></span><span id="diagSummary">Noch nicht geprüft</span></div></div>
<div class="section"><h2>Live-Selbsttest</h2><p class="sectionlead">Diese Prüfung liest ausschließlich den aktuellen Health-/Versions-/OpenAPI-Zustand, die ChatGPT-Anweisung und den optionalen Node-Lizenzdienst. Keine schreibenden Aktionen.</p>
@@ -646,7 +780,7 @@ Archivprüfungen bleiben auch für freigegebene Importe aktiv.</div>
<div class="section">
<h2>4. Vorhandene API-Schlüssel verwalten</h2>
<p class="sectionlead">Bestehende Schlüssel lassen sich jetzt um Berechtigungen wie <code>statistics:read</code> erweitern, ohne ihren Schlüsselwert auszutauschen. Klicke beim gewünschten Schlüssel auf <strong>Berechtigungen bearbeiten</strong>. Die Liste zeigt nur zulässige Maschinen-Scopes; <code>admin:*</code> und interaktive Scopes bleiben gesperrt. Es erscheinen ausschließlich ID, Name, Scopes und letzte Nutzung, niemals geheime Werte.</p>
<div class="row" style="margin-bottom:14px"><button class="action" id="secretLoadKeys">Schlüsselbestand aktualisieren</button></div>
<div class="row" style="margin-bottom:14px"><button class="action" id="secretLoadKeys">Schlüsselbestand aktualisieren</button></div><div class="ogl-workspace-tools"><input id="secretKeySearch" type="search" placeholder="Schlüssel nach Name, ID oder Scope filtern…" aria-label="API-Schlüssel filtern"><select id="secretKeyState" aria-label="Schlüsselstatus"><option value="all">Alle Status</option><option value="active">Nur aktiv</option><option value="disabled">Deaktiviert</option></select></div>
<div class="authnote" id="secretListStatus" role="status">Als Administrator anmelden, dann Schlüsselbestand laden.</div>
<div id="secretKeyList" class="changegrid"></div>
<p class="authnote">Scope-Änderungen gelten ab der nächsten API-Authentifizierung mit dem <em>gleichen</em> Schlüssel. Der vollständige Secret-Wert wird nicht erneut angezeigt. Die Bearbeitung sowie Aktivierung, Deaktivierung und Löschung verlangen Administratorrechte und werden protokolliert. Für dauerhafte Löschung zuerst deaktivieren.</p>
@@ -795,14 +929,120 @@ function categoryLabel(value){return categoryLabels[value]||value||''}
function audienceLabel(value){return audienceLabels[value]||value||''}
function languageLabel(value){return languageLabels[value]||value||''}
/* OpenGenesisLINK modular dashboard and category workspaces */
const oglWorkspaceGroups={"users":["/api/v1/users","/api/v1/auth"],"groups":["/api/v1/groups"],"inventory":["/api/v1/inventory","/api/v1/media/assets","/api/v1/media/inventory"],"profiles":["/api/v1/profiles","/api/v1/media/profiles","/api/v1/media/uploads"],"economy":["/api/v1/economy","/api/v1/banking","/api/v1/commerce","/api/v1/groups/{groupId}/transactions"],"marketplace":["/api/v1/media/marketplace","/api/v1/media/uploads","/api/v1/media/assets"],"discovery":["/api/v1/discovery","/api/v1/search","/api/v1/events","/api/v1/places"],"experiences":["/api/v1/experiences"],"security":["/api/v1/audit","/api/v1/security","/api/v1/auth/api-keys","/api/v1/feature-control"],"estates":["/api/v1/estates","/api/v1/regions","/api/v1/grid","/api/v1/groups/{groupId}/land"],"console":["/api/v1/jobs","/api/v1/nodes","/api/v1/regions","/api/v1/feature-control","/api/v1/maintenance","/api/v1/backup","/api/v1/oar","/api/v1/iar"]};
let oglGitCache=null,oglGitLoadedAt=0,oglGitPending=null;
function oglWorkspaceOpen(entry){
showPage('explorer');
endpointAudience='all';
document.querySelectorAll('[data-endpoint-audience]').forEach(x=>x.classList.toggle('active',x.dataset.endpointAudience==='all'));
$('search').value='';
selectEntry(entry);
$('detail').scrollIntoView({behavior:'smooth',block:'start'});
}
function oglRenderWorkspaces(){
for(const [domain,prefixes] of Object.entries(oglWorkspaceGroups)){
const host=$('workspace-'+domain);if(!host)continue;
host.replaceChildren();
const search=document.querySelector('[data-workspace-search="'+domain+'"]');
const q=(search?.value||'').trim().toLowerCase();
const matches=entries.filter(x=>prefixes.some(p=>x.path.startsWith(p))).filter(x=>
!q||[x.method,x.path,x.op.summary||'',x.op['x-nexverse-scope']||''].join(' ').toLowerCase().includes(q));
$('workspace-count-'+domain).textContent=matches.length+' Operationen';
if(!matches.length){
const empty=document.createElement('div');empty.className='empty';
empty.textContent=q?'Keine passenden Operationen.':'Der laufende Server stellt für diese Kategorie derzeit keine passende API-Operation bereit.';
host.append(empty);continue;
}
for(const entry of matches){
const b=document.createElement('button');b.type='button';b.className='ogl-opcard';
const badge=document.createElement('span');badge.className='ogl-opbadge'+(entry.method!=='GET'?' write':'');badge.textContent=entry.method;
const path=document.createElement('code');path.textContent=entry.path;
const summary=document.createElement('small');summary.textContent=entry.op.summary||'API-Operation';
const scope=document.createElement('small');scope.textContent='Scope: '+(entry.op['x-nexverse-scope']||'laut OpenAPI-Vertrag');
b.append(badge,path,summary,scope);b.addEventListener('click',()=>oglWorkspaceOpen(entry));host.append(b);
}
}
}
document.querySelectorAll('[data-workspace-search]').forEach(input=>input.addEventListener('input',oglRenderWorkspaces));
function oglGithubText(id,text){const element=$(id);if(element)element.textContent=String(text||'–')}
async function oglLoadGithub(force=false){
if(oglGitPending)return oglGitPending;
if(!force&&oglGitCache&&Date.now()-oglGitLoadedAt<300000){oglRenderGithub(oglGitCache);return}
oglGithubText('githubState','Prüfe GitHub…');
oglGitPending=(async()=>{
try{
const response=await fetch('/api/v1/repository/status',{cache:'no-store',credentials:'same-origin',headers:{Accept:'application/json'}});
if(!response.ok)throw Error('World-API Repository-Status HTTP '+response.status);
const data=await response.json();
if(!data||data.source!=='github'||!Array.isArray(data.fail))throw Error('Ungültige GitHub-Statusantwort');
oglGitCache=data;oglGitLoadedAt=Date.now();
oglRenderGithub(data);
}catch(error){
if(oglGitCache){
oglRenderGithub(oglGitCache);
oglGithubText('githubState','Zwischengespeicherter Status (GitHub derzeit nicht erreichbar)');
}else{
oglGithubText('githubState','GitHub nicht erreichbar');
if($('githubDot'))$('githubDot').className='dot bad';
for(const id of ['githubStableVersion','githubDevelopmentVersion','githubCiVersion',
'dashStable','dashDevelopment','dashWorkflow'])oglGithubText(id,'Nicht verfügbar');
oglGithubText('dashboardRepository','Repository-Status konnte nicht geladen werden. Keine Versionsnummer wird geraten.');
}
}
})().finally(()=>{oglGitPending=null});
return oglGitPending;
}
function oglRenderGithub(d){
const release=d.release,commit=d.commit,run=d.ci?.workflow_runs?.[0];
const stable=release?.tag_name||'Nicht verfügbar';
const dev=commit?.sha?'main · '+commit.sha.slice(0,8):'Nicht verfügbar';
const roadmap=spec?.['x_nexverse_roadmap'];
const current=String(roadmap?.current_milestone||'');
const planned=(roadmap?.milestones||[]).filter(x=>x.status==='planned'&&String(x.version)>current)
.sort((x,y)=>String(x.version).localeCompare(String(y.version),undefined,{numeric:true}))[0];
const devLabel=planned?.version?planned.version+' · geplant':dev;
const ci=run?(run.conclusion||run.status||'unbekannt'):'Nicht verfügbar';
oglGithubText('githubStableVersion',stable);
oglGithubText('dashStable',stable);
oglGithubText('dashStableMeta',release?.published_at?'Veröffentlicht '+new Date(release.published_at).toLocaleDateString('de-DE'):'Release-API nicht verfügbar');
oglGithubText('githubStableInfo',release?.name||'Kein bestätigter Release-Status. Keine Version wird geraten.');
oglGithubText('githubDevelopmentVersion',devLabel);
oglGithubText('dashDevelopment',devLabel);
oglGithubText('dashDevelopmentMeta',commit?'main '+commit.sha.slice(0,8)+' · kein Release':'Branch-Status nicht verfügbar');
oglGithubText('githubDevelopmentInfo',commit?.commit?.message?.split('\n')[0]||'Letzter main-Commit nicht abrufbar.');
oglGithubText('githubLastCommit',commit?'Letzter Entwicklungscommit: '+commit.sha+' · '+(commit.commit?.author?.date||'Zeit unbekannt'):'GitHub-main ist derzeit nicht erreichbar.');
oglGithubText('githubCiVersion',ci);
oglGithubText('dashWorkflow',ci);
oglGithubText('dashWorkflowMeta',run?'Lauf #'+run.run_number:'CI-Status unbekannt');
oglGithubText('githubCiInfo',run?'Workflow: '+run.name+' · '+(run.head_sha||'').slice(0,8):'Kein bestätigter CI-Lauf gefunden.');
oglGithubText('githubReleaseNotes',release?.body?'Release: '+String(release.body).slice(0,460):'Keine Release-Notizen aus GitHub verfügbar.');
oglGithubText('githubUpdated','Stand '+new Date(d.at).toLocaleString('de-DE')+' · '+(d.fail.length?'Teilweise nicht erreichbar (HTTP-/Netzwerkfehler)':'GitHub REST API (kein Demo-Wert)'));
oglGithubText('githubState',d.fail.length?'Teilweise nicht erreichbar':'GitHub verbunden');
if($('githubDot'))$('githubDot').className='dot '+(d.fail.length?'bad':'good');
oglGithubText('dashboardRepository','Stable '+stable+' | Development '+dev+' | CI '+ci+'. Veröffentlichte GitHub-Version und lokaler ROBUST-Build können sich unterscheiden.');
}
if($('githubRefresh'))$('githubRefresh').addEventListener('click',()=>oglLoadGithub(true));
function oglFilterKeys(){
const needle=($('secretKeySearch')?.value||'').trim().toLowerCase();
const filter=$('secretKeyState')?.value||'all';
document.querySelectorAll('#secretKeyList > .change').forEach(card=>{
const matching=!needle||(card.dataset.keySearch||'').includes(needle);
const active=card.dataset.keyEnabled==='true';
card.hidden=!(matching&&(filter==='all'||(filter==='active'&&active)||(filter==='disabled'&&!active)));
});
}
function showPage(name){
if(['secrets','nodes','grid'].includes(name)&&!adminIsActive()){
if(['secrets','nodes','grid','security','console'].includes(name)&&!adminIsActive()){
adminNextPage=name;
name='adminlogin';
adminUpdateStatus('Anmeldung mit UserLevel >= 200 erforderlich.',null);
}
document.querySelectorAll('.page').forEach(x=>x.classList.toggle('active',x.id==='page-'+name));
document.querySelectorAll('.navbtn').forEach(x=>x.classList.toggle('active',x.dataset.page===name));
document.querySelectorAll('.navbtn').forEach(x=>{x.classList.toggle('active',x.dataset.page===name);if(x.dataset.page===name)x.closest('details')?.setAttribute('open','');});
if(name==='repository')oglLoadGithub();
if(oglWorkspaceGroups[name])oglRenderWorkspaces();
window.scrollTo({top:0,behavior:'smooth'});
}
document.querySelectorAll('.navbtn').forEach(x=>x.addEventListener('click',()=>showPage(x.dataset.page)));
@@ -992,6 +1232,8 @@ function renderStatistics(data){
const residents=data.residents||{},hg=data.hypergrid||{},online=data.online||{};
const protectedDetails=data.protected_details===true;
statText('statRegistered',residents.registered_total);
oglGithubText('dashResidents',residents.registered_total==null?'–':residents.registered_total);
oglGithubText('dashOnline',online.total==null?'–':online.total);
statText('statOnlineTotal',online.total);
statText('statResidentsOnline',residents.online_now);
statText('statActive7',residents.active_last_7_days);
@@ -1893,7 +2135,8 @@ function secretRenderKeyInventory(keys, supportedScopes) {
$('secretListStatus').textContent=keys.length+' Schlüssel registriert. '+
duplicates+' aktive Duplikatgruppe(n) gefunden. Kein Schlüssel wurde automatisch verändert.';
for(const key of keys){
const card=document.createElement('div');card.className='change';
const card=document.createElement('div');card.className='change';card.dataset.keyEnabled=key.enabled?'true':'false';
card.dataset.keySearch=[key.name||'',key.key_id||'',...(key.scopes||[])].join(' ').toLowerCase();
const title=document.createElement('strong');
title.textContent=(key.name||'Unbenannt')+(key.enabled?' · Aktiv':' · Deaktiviert');
card.append(title);
@@ -1967,6 +2210,7 @@ function secretRenderKeyInventory(keys, supportedScopes) {
card.append(editor);
host.append(card);
}
oglFilterKeys();
}
async function secretEditKeyScopes(key,scopes) {
try{
@@ -2242,7 +2486,8 @@ async function init(){
$('navmeta').textContent=(version.server_version||'OpenGenesisLINK')+' · '+(version.api_version||'API')+' · '+languageLabel(version.language||spec['x_nexverse_language']||'de-DE');
if(changes.length){$('lastChangeDate').textContent=changes[0].date||'–';$('lastChangeTitle').textContent=changes[0].title||''}
const overview=$('overviewChanges');overview.replaceChildren();changes.slice(0,4).forEach(x=>overview.append(makeChange(x)));if(!changes.length)overview.innerHTML='<div class="empty">Noch keine Versionshinweise veröffentlicht.</div>';
renderChangeFilters();renderChanges('all');renderVersions();renderRoadmap();renderEndpointList();
renderChangeFilters();renderChanges('all');renderVersions();renderRoadmap();renderEndpointList();oglRenderWorkspaces();oglLoadGithub();
oglGithubText('dashOperations',entries.length);
loadStatistics();
}catch(err){
$('healthText').textContent='API-Metadaten konnten nicht geladen werden';$('healthDot').className='dot bad';$('navmeta').textContent=String(err);
@@ -2259,6 +2504,8 @@ $('secretGeneratePortalIm').addEventListener('click',secretGeneratePortalIm);
$('secretCopy').addEventListener('click',secretCopy);
$('secretClear').addEventListener('click',secretClear);
$('secretLoadKeys').addEventListener('click',secretLoadKeys);
$('secretKeySearch').addEventListener('input',oglFilterKeys);
$('secretKeyState').addEventListener('change',oglFilterKeys);
$('worldAuthUseMe').addEventListener('click',worldAuthUseMe);
$('worldAuthLoad').addEventListener('click',worldAuthLoad);
$('worldAuthSave').addEventListener('click',worldAuthSave);
@@ -2293,6 +2540,6 @@ init();
</script>
</body>
</html>
""";
""".Replace("OGL_LOGO_DATA_URI", NexOglBranding.DataUri);
}
}
@@ -529,6 +529,8 @@ namespace NexVerse.Server.Api
"/api/v1/search");
AppendCatalogGroup(md, requestedAudience, "public", "version",
"/api/v1/version");
AppendCatalogGroup(md, requestedAudience, "public", "OpenGenesisLINK GitHub Stable/Development/CI Status",
"/api/v1/repository/status");
AppendCatalogGroup(md, requestedAudience, "public", "Oeffentliche Weltkarte",
"/api/v1/world-map",
"/api/v1/world-map/view");
@@ -0,0 +1,196 @@
// SPDX-License-Identifier: MPL-2.0
// Source-of-truth GitHub release/commit/CI metadata, with bounded cache.
// No credentials, shell execution, or operator-defined remote URLs.
using System;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using OpenSim.Framework.Servers.HttpServer;
namespace NexVerse.Server.Api
{
internal sealed class NexGithubRepositoryStatusApi
{
private const string Base = "https://api.github.com/repos/opengenesislink/opengenesislinkserver";
private static readonly HttpClient s_Client = CreateClient();
private static readonly SemaphoreSlim s_Refresh = new SemaphoreSlim(1, 1);
private static byte[] s_Cached;
private static DateTimeOffset s_LastFetch = DateTimeOffset.MinValue;
private static HttpClient CreateClient()
{
var client = new HttpClient { Timeout = TimeSpan.FromSeconds(6) };
client.DefaultRequestHeaders.UserAgent.ParseAdd("OpenGenesisLINK-WorldAPI/1.0");
client.DefaultRequestHeaders.Accept.Add(
new MediaTypeWithQualityHeaderValue("application/vnd.github+json"));
return client;
}
public void Handle(IOSHttpRequest request, IOSHttpResponse response)
{
response.KeepAlive = false;
response.AddHeader("Cache-Control", "private, no-store");
response.AddHeader("X-Content-Type-Options", "nosniff");
response.ContentType = "application/json; charset=utf-8";
if (request == null || request.HttpMethod != "GET" ||
(request.UriPath ?? "").TrimEnd('/') != "/api/v1/repository/status")
{
response.StatusCode = (int)HttpStatusCode.MethodNotAllowed;
response.RawBuffer = JsonSerializer.SerializeToUtf8Bytes(
new { error = "method_not_allowed" });
return;
}
// The short, process-local cache prevents 60/h anonymous GitHub API
// rate-limit exhaustion and avoids any database writes.
try
{
if (s_Cached != null &&
DateTimeOffset.UtcNow - s_LastFetch < TimeSpan.FromMinutes(5))
{
response.StatusCode = (int)HttpStatusCode.OK;
response.RawBuffer = s_Cached;
return;
}
if (!s_Refresh.Wait(TimeSpan.FromSeconds(8)))
{
WriteFallback(response);
return;
}
try
{
if (s_Cached == null ||
DateTimeOffset.UtcNow - s_LastFetch >= TimeSpan.FromMinutes(5))
{
var payload = FetchStatus().GetAwaiter().GetResult();
if (payload != null)
{
s_Cached = payload;
s_LastFetch = DateTimeOffset.UtcNow;
}
}
WriteFallback(response);
}
finally { s_Refresh.Release(); }
}
catch (Exception)
{
// GitHub is an external dependency. Never expose credentials,
// stack traces, HTML proxy errors or fabricated release tags.
WriteFallback(response);
}
}
private static void WriteFallback(IOSHttpResponse response)
{
if (s_Cached != null)
{
response.StatusCode = (int)HttpStatusCode.OK;
response.RawBuffer = s_Cached;
}
else
{
response.StatusCode = (int)HttpStatusCode.ServiceUnavailable;
response.RawBuffer = JsonSerializer.SerializeToUtf8Bytes(
new { error = "github_unavailable",
source = "https://github.com/opengenesislink/opengenesislinkserver" });
}
}
private static async Task<JsonElement?> Read(string url)
{
// A fixed URL set only. No request parameters or redirect to
// an attacker-supplied domain. GitHub metadata is public.
try
{
using HttpResponseMessage response = await s_Client.GetAsync(url,
HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false);
if (!response.IsSuccessStatusCode) return null;
byte[] bytes = await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false);
if (bytes.Length > 512 * 1024) return null;
using JsonDocument document = JsonDocument.Parse(bytes);
return document.RootElement.Clone();
}
catch (Exception) { return null; }
}
private static string String(JsonElement? root, params string[] path)
{
if (!root.HasValue) return null;
JsonElement value = root.Value;
foreach (string name in path)
{
if (value.ValueKind != JsonValueKind.Object ||
!value.TryGetProperty(name, out value)) return null;
}
return value.ValueKind == JsonValueKind.String ? value.GetString() :
value.ValueKind == JsonValueKind.Number ? value.ToString() : null;
}
private static async Task<byte[]> FetchStatus()
{
var result = await Task.WhenAll(
Read(Base + "/releases/latest"),
Read(Base + "/commits/main"),
Read(Base + "/actions/workflows/nexjast-ci.yml/runs?branch=main&per_page=1")
).ConfigureAwait(false);
JsonElement? release = result[0], commit = result[1], runs = result[2];
JsonElement? lastRun = null;
if (runs.HasValue &&
runs.Value.TryGetProperty("workflow_runs", out JsonElement list) &&
list.ValueKind == JsonValueKind.Array && list.GetArrayLength() != 0)
lastRun = list[0];
if (!release.HasValue && !commit.HasValue && !runs.HasValue)
return null;
object stable = release.HasValue ? new
{
tag_name = String(release, "tag_name"),
name = String(release, "name"),
published_at = String(release, "published_at"),
body = String(release, "body")
} : null;
object development = commit.HasValue ? new
{
sha = String(commit, "sha"),
commit = new {
message = String(commit, "commit", "message"),
author = new { date = String(commit, "commit", "author", "date") }
}
} : null;
object ci = runs.HasValue ? new
{
workflow_runs = lastRun.HasValue ? new object[] {new
{
run_number = String(lastRun, "run_number"),
name = String(lastRun, "name"),
head_sha = String(lastRun, "head_sha"),
status = String(lastRun, "status"),
conclusion = String(lastRun, "conclusion")
}} : Array.Empty<object>()
} : null;
return JsonSerializer.SerializeToUtf8Bytes(new
{
source = "github",
release = stable,
commit = development,
ci,
fail = new[] { !release.HasValue ? 0 : -1,
!commit.HasValue ? 1 : -1,
!runs.HasValue ? 2 : -1 }
.Where(x => x >= 0).ToArray(),
at = DateTimeOffset.UtcNow.ToString("O")
});
}
}
}
+9
View File
@@ -0,0 +1,9 @@
// SPDX-License-Identifier: MPL-2.0
namespace NexVerse.Server.Api
{
internal static class NexOglBranding
{
// Downsampled version of the operator-provided World API logo (56px WebP, transparent).
internal const string DataUri = "data:image/webp;base64,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";
}
}
@@ -324,6 +324,12 @@ namespace NexVerse.Server.Api
m_Log.Info("[NEX-WORLD-API]: Endpunkt für Statistikübersicht registriert.");
server.AddSimpleStreamHandler(new SimpleStreamHandler("/api/v1/version", apiGate.Wrap(handlers.Version), "NexVerse World API Version"));
// GitHub is queried server-side because the protected admin iframe
// inherits the login shell's restrictive same-origin CSP.
NexGithubRepositoryStatusApi githubStatus = new NexGithubRepositoryStatusApi();
server.AddSimpleStreamHandler(new SimpleStreamHandler(
"/api/v1/repository/status", apiGate.Wrap(githubStatus.Handle),
"OpenGenesisLINK public GitHub releases and CI status"));
server.AddSimpleStreamHandler(new SimpleStreamHandler("/api/v1/capabilities", apiGate.Wrap(handlers.Capabilities), "NexVerse World API Capabilities"));
server.AddSimpleStreamHandler(new SimpleStreamHandler("/api/v1/openapi.json", apiGate.Wrap(handlers.OpenApi), "NexVerse World API OpenAPI"));
@@ -135,6 +135,7 @@ namespace NexVerse.Server.Api
["/api/v1"] = GetOperation("Metadaten des World-API-Dienstes"),
["/api/v1/health"] = GetOperation("Status der World API"),
["/api/v1/version"] = GetOperation("NexVerse-Server- und Protokollversionen"),
["/api/v1/repository/status"] = GetOperation("Autoritative GitHub-Releases, Entwicklungsstand main und letzter CI-Lauf; gecacht, ohne Secrets"),
["/api/v1/capabilities"] = GetOperation("NexVerse-Funktions- und Kompatibilitätsstufen"),
["/api/v1/openapi.json"] = GetOperation("OpenAPI-Dokument"),
["/api/v1/docs"] = GetOperation("Selbst gehostete, durchsuchbare API-Dokumentation mit Live-Explorer"),
+3 -3
View File
@@ -181,7 +181,7 @@ namespace NexVerse.Server.Api
: "OpenGenesisLINK: Adminpanel nicht verfügbar.");
}
private const string s_LoginPage = """
private static readonly string s_LoginPage = """
<!doctype html>
<html lang="de">
<head>
@@ -217,7 +217,7 @@ label{display:block;color:#d3deed;font-size:12px;margin:18px 0 8px;font-weight:6
</head>
<body>
<div id="loginView">
<header class="top"><div class="brand"><div class="sigil">OGL</div><div><strong>OpenGenesisLINK</strong><span>World API · Control Center</span></div></div><div class="topright"><i class="light" aria-hidden="true"></i> Secure administration <span> / </span> OGL 0.9.3.12</div></header>
<header class="top"><div class="brand"><div class="sigil"><img src="OGL_LOGO_DATA_URI" width="44" height="44" alt="OpenGenesisLINK World API Logo" style="width:44px;height:44px;object-fit:contain;display:block"></div><div><strong>OpenGenesisLINK</strong><span>World API · Control Center</span></div></div><div class="topright"><i class="light" aria-hidden="true"></i> Secure administration <span> / </span> Live Control Plane</div></header>
<main class="stage">
<section class="showcase"><div class="eyebrow">The next generation of OpenSimulator</div><h1>Deine Welt.<br><em>Deine Kontrolle.</em></h1><div class="intro">Willkommen im OpenGenesisLINK Control Center. Verwalte Simulator-Nodes, Grid-Regionen, Dienste, Sicherheit, API-Zugänge und die Infrastruktur deiner virtuellen Welt an einem zentralen Ort.</div><div class="highlights"><div class="highlight">◈ Grid &amp; Regions</div><div class="highlight">⬡ Simulator Control</div><div class="highlight">⌁ World API Explorer</div></div><div class="orbit" aria-hidden="true"></div></section>
<div class="window"><section class="login"><div class="loginkicker">Authorized Personnel Only</div><h2>Administrator Login</h2><p>Bitte melde dich mit deinem lokalen GridUser-Konto an. Zugang für lokale GridUser ab <strong>UserLevel 200</strong>.</p><form id="adminForm" autocomplete="on"><label for="username">Grid-Benutzername</label><input id="username" name="username" autocomplete="username" maxlength="100" required placeholder="Vorname.Nachname"><div class="fieldhelp">Beispiel: Sleimer.Akina oder Vorname Resident</div><label for="password">Passwort</label><input id="password" name="password" autocomplete="current-password" type="password" maxlength="256" required placeholder="Dein Grid-Passwort"><div class="formlabel"><label for="totp">Zwei-Faktor-Code (falls aktiviert)</label><span>Optional</span></div><input id="totp" name="totp" autocomplete="one-time-code" inputmode="numeric" maxlength="12" placeholder="6-stelliger TOTP-Code"><button class="submit" id="submit" type="submit">Sicher anmelden →</button><div class="status" id="status" role="status" aria-live="polite">Mit Grid-Benutzername und Passwort anmelden.</div></form><div class="footnote">Benutzername, Passwort und UserLevel werden auf dem Server geprüft. HTTPS wird zum Schutz deiner Zugangsdaten empfohlen. Sitzungstokens bleiben nur im Arbeitsspeicher.</div></section></div>
@@ -290,6 +290,6 @@ form.addEventListener('submit',async event=>{
</script>
</body>
</html>
""";
""".Replace("OGL_LOGO_DATA_URI", NexOglBranding.DataUri);
}
}
@@ -0,0 +1,48 @@
# OpenGenesisLINK World API – Sci-Fi Control Center 2.0
Stand: 25.10.2026. **Ein echtes Redesign der vorhandenen geschützten World-API-Verwaltung, kein separater Mockup-Prototyp.**
## Zugriff und Branding
`GET /api/v1/docs` bleibt die abgesicherte Admin-Anmeldeseite. Die eigentliche Oberfläche wird nur nach lokaler GridUser-Anmeldung mit UserLevel mindestens 200 und einer signierten Session aus `GET /api/v1/docs/panel` geladen. Der vorhandene Login-, TOTP-, Logout- und API-/Node-Autorisierungsweg wird **nicht ersetzt**.
Das vom Betreiber gelieferte `OpenGenesisLINK World API`-Logo wurde als WebP auf 56×56 px optimiert und in `NexOglBranding.cs` eingebettet. Kein externer Bildhost und kein nachgeneriertes Bild. Dieselbe Grafik erscheint im Login und in der Control-Center-Sidebar.
## Navigationsstruktur
Die Sidebar besitzt aufklappbare Hauptgruppen mit sinnvollen Unterseiten:
- **Übersicht & Monitoring:** Dashboard, Statistik, Diagnose, GitHub & Releases
- **Grid & Simulatoren:** Grid-/Regionenplaner, Simulator-Nodes, Estates/Land, Konsole & Jobs
- **Einwohner & Communities:** Benutzer/Avatare, Gruppen, Inventar/Assets, Profile/Media
- **Wirtschaft & Content:** Economy/NV$, Marketplace/Medien, Orte/Events/Suche, Experiences
- **API & Sicherheit:** API-Schlüssel/Scopes, Sicherheit/Audit, API-Explorer, Integrationen, Admin-Anmeldung
- **Software & Planung:** Changelog, Versionen, Roadmap
Jede Fach-Unterseite zeigt **tatsächlich registrierte Endpunkte und HTTP-Methoden** des zur Laufzeit geladenen OpenAPI-Vertrags. Die gefilterten Operationen öffnen den bestehenden echten API-Explorer mit authentifizierter Anfrageausführung. Nicht verfügbare Endpunkte werden ausdrücklich als nicht verfügbar dargestellt, nicht als Mockdaten. Native Grid-/Node-/Estate-Lifecycle-Aktionen verbleiben in ihren etablierten Verwaltungsseiten; keine bestehende Funktion wird entfernt.
## GitHub-Versionierung
Neue GitHub-/Release-Seite plus drei prominente Dashboard-Kacheln. Aus **offiziellen GitHub-REST-Daten**:
1. `/repos/opengenesislink/opengenesislinkserver/releases/latest`: der neueste veröffentlichte, nicht vorab veröffentlichte Stable-Release. **Keine aus dem Versionsstring erratene Stable-Freigabe**.
2. `/repos/opengenesislink/opengenesislinkserver/commits/main`: Development-Branch mit gekürzter SHA und aktuellem Committext. Ein Branch ist keine Release-Freigabe.
3. `/repos/opengenesislink/opengenesislinkserver/actions/workflows/nexjast-ci.yml/runs?branch=main&per_page=1`: der letzte main-CI-Lauf, mit Ergebnis oder laufendem Status.
GitHub-Abfragen werden **serverseitig** durch den neuen World-Endpunkt `GET /api/v1/repository/status` ausgeführt: ein fest konfigurierter öffentlicher Repository-Host, keine API-Schlüssel, kein Browser-Zugriff auf `api.github.com`. Der ROBUST-Prozess hält die Ergebnisse fünf Minuten zwischengespeichert. Die geschützte Admin-Oberfläche liest ausschließlich den **Same-Origin-World-API-Endpunkt**, damit die restriktive `connect-src 'self'`-Policy von Adminpanel und Login-Frame unverändert bleiben kann. Nicht erreichbare GitHub-API oder Rate-Limit-Fehler werden als **nicht verfügbar** beziehungsweise explizit zwischengespeichert angezeigt; es werden **keine** Release-Tags, Commits, CI-Werte oder Installationsstände erfunden.
**Wichtig:** Die GitHub-Stable-Version ist nicht zwingend die installierte Version auf ROBUST. Für die aktuell laufende Serverversion bleibt `GET /api/v1/version` die Quelle. Das Dashboard zeigt diese unabhängig.
## Administrator-Funktionen
- Einheitliches dunkles Design mit leuchtendem Cyan/Blau, responsive Sidebar und kompakten Dienstkacheln.
- Echtzeit-Kennzahlen zu registrierten Einwohnern und Online-Sessions aus `/api/v1/statistics/summary`, Servicezustand aus `/api/v1/health` und Endpoint-Zahl aus `/api/v1/openapi.json`.
- Bessere API-Schlüsselliste: durchsuchbar nach ID/Name/Scope und filterbar nach aktiv/deaktiviert; bestehende Funktionen zum Erstellen, Ändern, Deaktivieren, Löschen und zum Generieren sicherer Secrets bleiben erhalten.
- Fachseiten für Inventar, Gruppen, User, NV$, Media, Sicherheit, Marketplace, Jobs und weitere Bereiche sind keine unabhängigen zweiten APIs. Sie benutzen den zentralen OpenAPI-Vertrag, dessen Scopes und den bestehenden Request-Runner.
- **Kein unbeschränkter Shell- oder OpenSim-Konsolen-Remote-Executor.** Nur tatsächlich vorhandene, serverseitig berechtigte Operationen erscheinen. Für bisher ausschließlich via Textkonsole angebotene Befehle (z. B. freie Asset-Löschbefehle, dynamische Script-Konsole, beliebige Shell) gibt es noch keinen sicheren, explizit autorisierten HTTP-Handler. Sie werden nicht als funktionierend ausgegeben und nicht durch ungefilterte Remote-Commands ersetzt. Das ist eine Sicherheitsgrenze, kein UI-Dummy.
## QA / Release
In der NexVerse CI läuft `verify_worldapi_scifi_admin_center.py`. Zusätzlich zu bestehenden API-, Login-, Schlüssel-, Grid- und Estate-Regressionen werden die Logo-Einbettung, Navigations-IDs, Release-Quellen, Zugriffsschutz, Datenquellen und die Syntax des **tatsächlichen** Browser-JavaScript mit Node überprüft.
Vor Produktionsübernahme: GitHub-API-Zugriff unter KeyHelp-/Apache-HTTPS und CSP prüfen, alle Unterseiten (mobil/desktop) bedienen, Keys/Scopes nur mit autorisiertem Administrator testen, Node/Region/Estates mit Staging-Datensatz testen. GitHub-Release-Status darf nie die lokale Build-Abnahme ersetzen. Code-Merge ist **kein Live-Deployment**.
@@ -0,0 +1,65 @@
#!/usr/bin/env python3
"""Fail-closed checks for sci-fi protected World API admin center."""
from pathlib import Path
import base64, re, subprocess, shutil, tempfile
root=Path(__file__).resolve().parents[2]
page=(root/"NexVerse/Server/Api/NexApiDocsPage.cs").read_text()
login=(root/"NexVerse/Server/Api/OglApiDocsAccess.cs").read_text()
branding=(root/"NexVerse/Server/Api/NexOglBranding.cs").read_text()
assert "private static readonly string s_Html" in page
assert "private static readonly string s_LoginPage" in login
assert "NexOglBranding.DataUri" in page and "NexOglBranding.DataUri" in login
assert "OGL_LOGO_DATA_URI" in page and "OGL_LOGO_DATA_URI" in login
image=re.search(r'DataUri\s*=\s*"data:image/webp;base64,([A-Za-z0-9+/=]+)"',branding)
assert image, "Supplied logo must be stored as an inline WebP image"
data=base64.b64decode(image.group(1),validate=True)
assert data[:4]==b"RIFF" and data[8:12]==b"WEBP" and len(data)>2000
assert "frame-ancestors 'none'" in login
assert "m_Authenticator.TryAuthenticate" in login
assert "UserLevel < MinimumLevel" in login
assert 'adminIsActive()' in page
assert "connect-src 'self'" in page
assert "connect-src 'self' https://api.github.com" not in page
connector=(root/"NexVerse/Server/Api/NexVerseWorldApiConnector.cs").read_text()
github=(root/"NexVerse/Server/Api/NexGithubRepositoryStatusApi.cs").read_text()
openapi=(root/"NexVerse/Server/Api/NexVerseWorldApiHandlers.cs").read_text()
assert '"/api/v1/repository/status"' in connector and 'githubStatus.Handle' in connector
assert '"/api/v1/repository/status"' in openapi
assert "https://api.github.com/repos/opengenesislink/opengenesislinkserver" in github
assert '"/releases/latest"' in github and '"/commits/main"' in github
assert '"/actions/workflows/nexjast-ci.yml/runs?branch=main&per_page=1"' in github
assert "TimeSpan.FromMinutes(5)" in github
assert "JsonSerializer.SerializeToUtf8Bytes" in github
assert "fetch('/api/v1/repository/status'" in page
for name in ["overview","statistics","diagnostics","repository","grid","nodes",
"estates","console","users","groups","inventory","profiles","economy",
"marketplace","discovery","experiences","secrets","security","explorer",
"chatgpt","adminlogin","changes","versions","roadmap"]:
assert 'data-page="'+name+'"' in page,name
assert 'id="page-'+name+'"' in page,name
assert '<details class="navgroup"' in page
assert "oglRenderWorkspaces()" in page and "oglWorkspaceOpen(entry)" in page
assert "release?.tag_name||'Nicht verfügbar'" in page
assert "commit?.sha?" in page
assert "d.fail.length" in page
assert "data-workspace-search" in page
assert "secretKeySearch" in page and "secretKeyState" in page
assert "oglFilterKeys()" in page
assert "entries.filter(x=>prefixes.some(p=>x.path.startsWith(p)))" in page
assert "selectEntry(entry)" in page
assert "['secrets','nodes','grid','security','console'].includes(name)" in page
assert "keine unbeschränkte Shell" in page or "Keine unbeschränkte Shell" in page
# Extract JS from the actual HTML page (do not create a separate, unused demo file).
script=re.search(r"<script>\s*('use strict';.*?)\s*</script>",page,re.S)
assert script,"Embedded dashboard JS unavailable"
if shutil.which("node") is None: raise RuntimeError("Node is required for World API UI validation")
with tempfile.TemporaryDirectory() as td:
f=Path(td)/"world-admin.mjs"
f.write_text(script.group(1))
result=subprocess.run(["node","--check",str(f)],capture_output=True,text=True)
assert result.returncode==0,result.stderr
print("OGL World API Sci-Fi dashboard: logo, navigation, auth boundaries, GitHub and browser syntax OK")