docs(worldapi): synchronize ChatGPT instructions and OpenAPI v1 with runtime contract (#157)

* docs(openapi): register real Experience script/viewer bridge paths, explicit contracts and service-only policy

* docs(openapi): add typed Experience management, script KV and trusted viewer bridge schemas

* docs(chatgpt): reconcile all three runtime markdown instructions with actual World API, audience and Experience service boundaries

* docs(openapi): correct 0.9.3.10 release scope and explicitly defer Voice/Havok

* docs(api-explorer): clarify runtime feature flags and simulator-only OAuth boundaries

* ci(worldapi): statically cross-check Experience handlers, OpenAPI schemas and ChatGPT manuals

* ci(worldapi): test live generated OpenAPI Experience route schemas, simulator scope, and all three MD downloads

* docs(worldapi): reconcile full runtime instructions, OpenAPI routes, audience, deployment and Experience bridge limits
This commit is contained in:
OpenGenesis (MPL 2.0) authored and GitHub committed 2026-10-11 14:11:53 +02:00
1 parent 853dca9101
commit 32e1958f7a
6 files changed
+490 -19

No files matched your search

+42
View File
@@ -254,6 +254,10 @@ jobs:
shell: bash
run: python3 tools/ci/verify_simple_stream_routing.py
- name: Verify World API OpenAPI and ChatGPT MD consistency
shell: bash
run: python3 tools/ci/verify_worldapi_chatgpt_openapi.py
- name: Verify Chapter 11 NexGroups and NexExperiences
shell: bash
run: python3 tools/ci/verify_nexgroups_experiences.py
@@ -958,6 +962,40 @@ jobs:
assert doc["paths"]["/api/v1/nodes"]["get"]["x-nexverse-audience"] == ["admin", "service"]
assert doc["paths"]["/api/v1/economy/balance"]["get"]["x-nexverse-audience"] == ["citizen", "admin", "service"]
assert doc["paths"]["/api/v1/inventory/tree"]["get"]["x-nexverse-audience"] == ["citizen", "admin", "service"]
# Real simulator Experience routes must appear in OpenAPI with
# their method, service-only security and typed responses.
for experience_path, methods in {
"/api/v1/experiences/script/info": ("get",),
"/api/v1/experiences/script/search": ("get",),
"/api/v1/experiences/script/resolve": ("get",),
"/api/v1/experiences/script/details": ("get",),
"/api/v1/experiences/script/permission": ("get",),
"/api/v1/experiences/script/location": ("get",),
"/api/v1/experiences/script/kv": ("post",),
"/api/v1/experiences/viewer/permissions": ("get", "put"),
"/api/v1/experiences/viewer/group": ("get",),
}.items():
for method in methods:
assert method in doc["paths"][experience_path], (experience_path, method)
viewer = doc["paths"]["/api/v1/experiences/viewer/permissions"]
assert viewer["put"]["x-nexverse-scope"] == "experiences:viewer:permissions"
assert viewer["put"]["x-nexverse-audience"] == ["service"]
assert viewer["put"]["security"] == [{"apiKeyAuth": []}]
assert viewer["put"]["requestBody"]["content"]["application/json"]["schema"]["$ref"] == (
"#/components/schemas/ExperienceViewerDecisionRequest")
assert viewer["get"]["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == (
"#/components/schemas/ExperienceViewerPermissionReadResponse")
assert {p["name"] for p in viewer["get"]["parameters"]} == {
"resident_id", "experience_id"}
assert "oneOf" in schemas["ExperienceViewerPermissionReadResponse"]
assert doc["paths"]["/api/v1/experiences/script/kv"]["post"]["requestBody"][
"content"]["application/json"]["schema"]["$ref"] == (
"#/components/schemas/ExperienceKvRequest")
assert doc["paths"]["/api/v1/experiences/script/info"]["get"]["responses"]["200"][
"content"]["application/json"]["schema"]["$ref"] == (
"#/components/schemas/ExperiencePublicInfoResponse")
assert "check_original" in schemas["ExperienceKvRequest"]["properties"]
assert doc["x_nexverse_version_history"][0]["status"] == "development"
assert "/api/v1/chatgpt-instructions.md" in doc["paths"]
assert "/api/v1/chatgpt-buergerportal.md" in doc["paths"]
assert "/api/v1/chatgpt-admin.md" in doc["paths"]
@@ -1026,14 +1064,18 @@ jobs:
grep -F 'Buergerportal / Einwohner-Selbstbedienung' /tmp/nexverse-chatgpt.md
grep -F '## Adminbereich' /tmp/nexverse-chatgpt.md
grep -F '/api/v1/openapi.json' /tmp/nexverse-chatgpt.md
grep -F 'experiences:viewer:permissions' /tmp/nexverse-chatgpt.md
grep -F 'Script-/Service-Integrationen' /tmp/nexverse-chatgpt.md
curl --silent --fail --max-time 2 http://127.0.0.1:19090/api/v1/chatgpt-buergerportal.md > /tmp/nexverse-chatgpt-citizen.md
grep -F 'ChatGPT Anweisung Buergerportal' /tmp/nexverse-chatgpt-citizen.md
grep -F 'admin:* gehoeren nicht in das Buergerportal' /tmp/nexverse-chatgpt-citizen.md
grep -F 'Viewer-CAPS' /tmp/nexverse-chatgpt-citizen.md
curl --silent --fail --max-time 2 http://127.0.0.1:19090/api/v1/chatgpt-admin.md > /tmp/nexverse-chatgpt-admin.md
grep -F 'ChatGPT Anweisung Adminbereich' /tmp/nexverse-chatgpt-admin.md
grep -F 'Administrative Mutationen nur mit ausdruecklicher Benutzerabsicht' /tmp/nexverse-chatgpt-admin.md
grep -F 'experiences:viewer:permissions' /tmp/nexverse-chatgpt-admin.md
ledger-db-matrix:
+2 -2
View File
@@ -365,7 +365,7 @@ input,textarea,select{width:100%;background:#08131e;color:var(--text);border:1px
<section class="page" id="page-chatgpt">
<div class="hero">
<div><div class="eyebrow">KI-Integration</div><h1>ChatGPT-Anweisungen &amp; Portaltrennung</h1><p>Downloadbare Arbeitsanweisungen fuer ChatGPT und API-Agenten. Die Trennung zwischen Buergerportal, Adminbereich und technischen Diensten folgt den Zielgruppen- und Scope-Metadaten des laufenden OpenAPI-Vertrags.</p></div>
<div><div class="eyebrow">KI-Integration</div><h1>ChatGPT-Anweisungen &amp; Portaltrennung</h1><p>Downloadbare Arbeitsanweisungen fuer ChatGPT und API-Agenten. Die Trennung zwischen Buergerportal, Adminbereich und technischen Diensten folgt den Zielgruppen- und Scope-Metadaten des laufenden OpenAPI-Vertrags. Interne Simulator-Bridges (z. B. Experiences) sind keine direkt benutzbaren Einwohner-Endpunkte.</p></div>
<div class="pill"><span class="dot good"></span><span>OpenAPI-gebunden</span></div>
</div>
@@ -377,7 +377,7 @@ input,textarea,select{width:100%;background:#08131e;color:var(--text);border:1px
<a class="action actionlink" href="/api/v1/openapi.json" target="_blank" rel="noreferrer">OpenAPI JSON oeffnen</a>
<button class="action" data-goto="explorer">API-Explorer oeffnen</button>
</div>
<div class="portalmeta">Technische Quelle der Wahrheit bleibt immer der aktuelle OpenAPI-3.1-Vertrag des laufenden Servers.</div>
<div class="portalmeta">Technische Quelle der Wahrheit bleibt immer der aktuelle OpenAPI-3.1-Vertrag des laufenden Servers. Dokumentierte optionale Endpunkte koennen je nach Robust-Konfiguration deaktiviert sein. Service-only Routen erfordern gesonderte berechtigte Simulator-Schluessel; OpenAPI-Zugriff allein erteilt keine Rechte.</div>
</div>
<div class="portalgrid">
@@ -74,12 +74,12 @@ namespace NexVerse.Server.Api
md.AppendLine();
md.AppendLine("1. Zuerst den aktuellen Vertrag von " + m_ApiBaseUrl + "/openapi.json laden.");
md.AppendLine("2. Den gewuenschten Endpunkt anhand von x-nexverse-audience, x-nexverse-scope, x-nexverse-ai-instruction und x-nexverse-security-constraints klassifizieren.");
md.AppendLine("3. Entscheiden, ob die Aufgabe zum Buergerportal, Adminbereich oder zu einer Service-Integration gehoert.");
md.AppendLine("3. Entscheiden, ob die Aufgabe zum Buergerportal, Adminbereich oder zu einer Service-Integration gehoert. Interne Simulator-/Viewer-CAPS niemals als Buergerportal-Operation einsetzen.");
md.AppendLine("4. Nur die minimal benoetigten Berechtigungen verwenden.");
md.AppendLine("5. Vor schreibenden oder loeschenden Admin-Aktionen sicherstellen, dass der Benutzer diese konkrete Aktion angefordert hat.");
md.AppendLine("6. Bei Fehlern Statuscode, API-Fehler und X-Correlation-Id auswerten; fehlende Rechte niemals umgehen.");
md.AppendLine();
md.AppendLine("Bei Abweichungen ist " + m_ApiBaseUrl + "/openapi.json die technische Quelle der Wahrheit.");
md.AppendLine("Bei Abweichungen ist " + m_ApiBaseUrl + "/openapi.json die technische Quelle der Wahrheit. Der Vertrag ist installations- und versionsbezogen; vor Mutationen zusaetzlich echte Scope-/Feature-Freischaltung pruefen.");
return md.ToString();
}
@@ -135,8 +135,12 @@ namespace NexVerse.Server.Api
md.AppendLine("- Health: " + m_ApiBaseUrl + "/health");
md.AppendLine("- Version: " + m_ApiBaseUrl + "/version");
md.AppendLine("- Capabilities: " + m_ApiBaseUrl + "/capabilities");
md.AppendLine("- Gesamtanweisung: " + m_ApiBaseUrl + "/chatgpt-instructions.md");
md.AppendLine("- Buergerportal-Anweisung: " + m_ApiBaseUrl + "/chatgpt-buergerportal.md");
md.AppendLine("- Admin-Anweisung: " + m_ApiBaseUrl + "/chatgpt-admin.md");
md.AppendLine();
md.AppendLine("Alle API-v1-Aufrufe folgen " + m_ApiBaseUrl + "/<endpunkt>. OAuth/OIDC besitzt zusaetzlich die im OpenAPI-Vertrag dokumentierten /oauth/...-Routen.");
md.AppendLine("Die allgemeinen World-API-Routen liegen unter " + m_ApiBaseUrl + "/...; OAuth/OIDC liegt teils unter /oauth/... und /.well-known/openid-configuration (separat im OpenAPI-Vertrag). Manche Routen werden nur registriert, wenn [NexVerseWorldApi] EnablePrivilegedEndpoints und die zugehoerigen Services aktiviert sind.");
md.AppendLine("OpenAPI enthaelt auch vertrauenswuerdige Simulator-Bridges: deren Dokumentation erlaubt KEINEN direkten Zugriff mit normalen Einwohner- oder ChatGPT-Tokens.");
return md;
}
@@ -151,7 +155,9 @@ namespace NexVerse.Server.Api
md.AppendLine("- Einwohneraktionen standardmaessig auf den authentifizierten Einwohner beschraenken.");
md.AppendLine("- Zugriff auf fremde Konten, fremdes Inventar oder administrative Ressourcen nur mit dokumentierter Admin-Autorisierung.");
md.AppendLine("- Fuer zustandsaendernde Operationen den dokumentierten Idempotency-Key verwenden, wenn der Endpunkt dies verlangt.");
md.AppendLine("- Request- und Response-Felder aus dem OpenAPI-Schema lesen und nicht erraten.");
md.AppendLine("- Request- und Response-Felder aus dem OpenAPI-Schema lesen und nicht erraten. Bei unvollstaendigen Teil-Schemas die Operation nicht blind durch ausgedachte Felder ergaenzen.");
md.AppendLine("- API-v1 und Protokollversion sind nicht identisch mit der Serverrelease-Version. OpenGenesisLINK 0.9.3.10 ist Entwicklung, nicht Stable; 0.9.3.8 bleibt letzte Stable.");
md.AppendLine("- Ein Eintrag im OpenAPI-Katalog beweist nicht, dass ein optionales Modul im laufenden Robust freigeschaltet oder eine viewer-spezifische Funktion live abgenommen ist.");
md.AppendLine("- HTTP 401 bedeutet fehlende oder ungueltige Authentifizierung; HTTP 403 bedeutet fehlende Berechtigung. Keinen privilegierten Alternativpfad zum Umgehen ausprobieren.");
md.AppendLine("- HTTP 429 respektieren und Rate-Limits beachten.");
md.AppendLine("- X-Correlation-Id bei Fehlersuche und administrativen Vorgaengen erhalten.");
@@ -171,7 +177,7 @@ namespace NexVerse.Server.Api
md.AppendLine("- Eigene Sitzungen: POST " + m_ApiBaseUrl + "/auth/sessions/revoke");
md.AppendLine();
md.AppendLine("### Eigenes Einwohnerkonto");
md.AppendLine("- GET /users/me fuer das aktuell authentifizierte Konto.");
md.AppendLine("- GET /users/me fuer das aktuell authentifizierte Konto (vollstaendige URL: /api/v1/users/me).");
md.AppendLine("- GET/PATCH /users/{principalId} nur im dokumentierten Self-Kontext.");
md.AppendLine("- POST /users/{principalId}/password nur fuer den eigenen Account, ausser eine ausdrueckliche Admin-Autorisierung liegt vor.");
md.AppendLine();
@@ -214,6 +220,9 @@ namespace NexVerse.Server.Api
md.AppendLine("- Nur anzeigen und ausfuehren, wenn der angemeldete Einwohner die vom OpenAPI-Vertrag geforderten Scopes besitzt.");
md.AppendLine("- Ressourcenrollen und serverseitige Ownership-Pruefungen bleiben verbindlich.");
md.AppendLine("- experiences:script ist fuer vertrauenswuerdige Script-/Service-Integrationen und nicht fuer normale Browser-Selbstbedienung.");
md.AppendLine("- /experiences/script/info, /script/search, /script/resolve, /script/details, /script/permission, /script/location und /script/kv sind interne Service-Bridges; keinen experiences:script-Schluessel an Einwohner ausgeben.");
md.AppendLine("- /experiences/viewer/permissions und /experiences/viewer/group sind NUR fuer den Simulator hinter kurzlebigen avatar-/regiongebundenen Viewer-CAPS. Kein direkter Aufruf mit selbst gewaehltetem resident_id.");
md.AppendLine("- Firestorm Experience-Kauf/Editor, Script-Zustimmung und OGL-Pathfinding nur als implementiert/aktiv behaupten, wenn der konkrete installierte Build, seine Feature-Schalter und Live-Tests dies bestaetigen.");
}
private static void AppendAdminSection(StringBuilder md)
@@ -243,7 +252,10 @@ namespace NexVerse.Server.Api
md.AppendLine("- Maschinen-API-Schluessel: /auth/api-keys.");
md.AppendLine("- OAuth-/Dienst-Clients: /auth/clients.");
md.AppendLine("- Audit-Historie: /audit.");
md.AppendLine("- Neue API-Keys nur mit minimal benoetigten Scopes erzeugen.");
md.AppendLine("- Neue API-Keys nur mit minimal benoetigten Scopes erzeugen; aktive Schluessel nicht im MD, Chat oder URL ausgeben.");
md.AppendLine("- NexExperiences besitzt getrennte Dienst-Scopes: experiences:script und experiences:viewer:permissions; der letztere ist privilegiert und nur fuer vertrauenswuerdige Simulatoren. Ein Manage-Scope ist nicht automatisch ein Bewohner-Identitaetsnachweis.");
md.AppendLine("- Eigentums- und Actor-Regeln beachten: Service-Clients mit experiences:manage duerfen keine beliebigen Bewohner-IDs impersonieren; administrative Delegation erfordert admin:*.");
md.AppendLine("- OGLVoice und Havok-kompatibles Firestorm-NavMesh sind in 0.9.3.10 kein als Stable freigegebenes Feature.");
md.AppendLine();
md.AppendLine("### Economy-Administration");
md.AppendLine("- Reversals: /economy/transactions/{transactionId}/reverse.");
@@ -264,6 +276,11 @@ namespace NexVerse.Server.Api
md.AppendLine();
md.AppendLine("- Maschinenintegrationen verwenden eingeschraenkte API-Schluessel oder registrierte OAuth-Service-Clients.");
md.AppendLine("- Kein admin:*-Schluessel fuer normale Simulator- oder Portalaufgaben.");
md.AppendLine("- Spezielle Experience-Schluessel: experiences:script fuer die LSL-/Metadaten-Bridge und ein davon verschiedener, privilegiert vergebener experiences:viewer:permissions nur fuer Allow/Block/Forget/GetExperiences und Gruppenlisten.");
md.AppendLine("- Die direkte World API /api/v1/experiences/viewer/permissions erfordert einen Service-Principal. resident_id muss aus der aktiven, widerrufbaren Avatar-CAP-Lease stammen, nicht aus Nutzertext.");
md.AppendLine("- /api/v1/experiences/script/kv unterstuetzt create, read, update (optional check_original/original_value), delete, stats und keys; keine K/V-Autorisierung ohne zugeordnetes Script.");
md.AppendLine("- World-API-Dienstschluessel bei fehlgeschlagenem Test nicht als HTTP-Query oder Teil einer anonymen Viewer-URL versenden.");
md.AppendLine("- Ein OpenAPI-Eintrag ist nicht automatisch eine externe ChatGPT-App-Anbindung. Ohne angebundene API-Credentials kann der Agent nicht authentifiziert im Namen des Nutzers handeln.");
md.AppendLine("- Service-Scopes immer funktionsbezogen und minimal halten.");
md.AppendLine("- Service-Aktionen muessen Idempotenz-, Audit- und Korrelationsregeln einhalten.");
}
@@ -273,7 +290,8 @@ namespace NexVerse.Server.Api
md.AppendLine();
md.AppendLine("## OpenAPI-Metadaten fuer die automatische Zuordnung");
md.AppendLine();
md.AppendLine("- x-nexverse-audience: citizen, admin und/oder service.");
md.AppendLine("- x-nexverse-audience: citizen, admin und/oder service; Service bedeutet nicht automatisch Browser/OAuth-Einwohnerzugriff.");
md.AppendLine("- security.apiKeyAuth (Header X-NexVerse-Api-Key) ist bei internen Viewer-Bridges explizit; normalen Bewohner-Bearer dort NICHT verwenden.");
md.AppendLine("- x-nexverse-scope: benoetigter Berechtigungsumfang.");
md.AppendLine("- x-nexverse-purpose: Zweck der Operation.");
md.AppendLine("- x-nexverse-ai-instruction: operation-spezifische Anweisung fuer ChatGPT/API-Agenten.");
@@ -293,6 +311,9 @@ namespace NexVerse.Server.Api
md.AppendLine("- Idempotenz: Idempotency-Key mit einem stabilen Key pro fachlichem Vorgang.");
md.AppendLine("- Niemals denselben Idempotency-Key fuer fachlich unterschiedliche Vorgaenge verwenden.");
md.AppendLine("- Asynchrone Regionsoperationen ueber /region-operations/{operationId} verfolgen.");
md.AppendLine("- Bei GET /api/v1/experiences/viewer/permissions bestimmt experience_id die Einzelstatusantwort; ohne experience_id liefert die Bridge mehrere nach Bewohner gefilterte ID-Listen.");
md.AppendLine("- Bei PUT /api/v1/experiences/viewer/permissions nur status allowed, blocked oder none und die vom Simulator verifizierte avatar-gebundene resident_id verwenden.");
md.AppendLine("- Interne Viewer-Bridges niemals ueber anonyme oder Bewohner-ChatGPT-Aufgaben direkt aufrufen; kein Cross-Avatar-Test mit fremder UUID als Ersatz fuer Authentifizierung.");
md.AppendLine("- Keine Endpunkte erfinden. Nicht in OpenAPI vorhandene Funktionen als derzeit nicht ueber World API verfuegbar behandeln.");
}
}
+308 -8
View File
@@ -322,6 +322,18 @@ namespace NexVerse.Server.Api
("put", "Estate-/Parcel-Policy ändern", "experiences:manage", "200")),
["/api/v1/experiences/{experienceId}/scripts/{scriptId}/bind"] = AuthenticatedOperations(
("post", "Script an Experience binden", "experiences:manage", "200")),
// Trusted simulator proxy routes are real World API endpoints.
// The viewer receives *only* expiring per-avatar simulator CAPS,
// never these authenticated Robust API paths or service keys.
["/api/v1/experiences/script/search"] = AuthenticatedOperations(
("get", "Öffentliche Experience-Metadaten für Simulator-Such-CAPS", "experiences:script", "200")),
["/api/v1/experiences/script/info"] = AuthenticatedOperations(
("get", "Experience-Kurzprofile für Viewer-CAPS (max. 64 UUIDs)", "experiences:script", "200")),
["/api/v1/experiences/viewer/permissions"] = SimulatorBridgeOperations(
("get", "Eigene Experience-Listen oder Berechtigungsstatus über authentifizierten Simulator lesen", "experiences:viewer:permissions", "200"),
("put", "Explizites Firestorm Allow/Block/Forget für den aktuell angemeldeten Avatar speichern", "experiences:viewer:permissions", "200")),
["/api/v1/experiences/viewer/group"] = SimulatorBridgeOperations(
("get", "Experience-IDs einer Gruppe für die Viewer-CAP ermitteln", "experiences:viewer:permissions", "200")),
["/api/v1/experiences/script/resolve"] = AuthenticatedOperations(
("get", "Script-Experience-Bindung auflösen", "experiences:script", "200")),
["/api/v1/experiences/script/details"] = AuthenticatedOperations(
@@ -614,16 +626,50 @@ namespace NexVerse.Server.Api
ApplyJsonContract(paths, "/api/v1/groups/{groupId}/bans/{agentId}", "post", "Chapter11MutationRequest", "Chapter11ObjectResponse", "200");
ApplyJsonContract(paths, "/api/v1/groups/{groupId}/accounting", "get", null, "Chapter11ObjectResponse", "200");
ApplyJsonContract(paths, "/api/v1/groups/{groupId}/capabilities", "get", null, "Chapter11ObjectResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences", "get", null, "Chapter11ObjectResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences", "post", "NexExperienceCreateRequest", "Chapter11ObjectResponse", "201");
ApplyJsonContract(paths, "/api/v1/experiences/{experienceId}", "get", null, "Chapter11ObjectResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/{experienceId}", "put", "Chapter11MutationRequest", "Chapter11ObjectResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences", "get", null, "ExperienceSearchResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences", "post", "NexExperienceCreateRequest", "ExperienceDetailsResponse", "201");
ApplyJsonContract(paths, "/api/v1/experiences/{experienceId}", "get", null, "ExperienceDetailsResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/{experienceId}", "put", "ExperienceProfileUpdateRequest", "ExperienceDetailsResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/{experienceId}/logs", "get", null, "Chapter11ObjectResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/script/resolve", "get", null, "Chapter11ObjectResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/script/details", "get", null, "Chapter11ObjectResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/script/permission", "get", null, "Chapter11ObjectResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/script/location", "get", null, "Chapter11ObjectResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/script/kv", "post", "Chapter11MutationRequest", "Chapter11ObjectResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/script/kv", "post", "ExperienceKvRequest", "ExperienceKvResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/script/search", "get", null, "ExperiencePublicSearchResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/script/info", "get", null, "ExperiencePublicInfoResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/script/resolve", "get", null, "ExperienceScriptResolveResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/script/details", "get", null, "ExperienceDetailsResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/script/permission", "get", null, "ExperienceScriptPermissionResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/script/location", "get", null, "ExperienceScriptLocationResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/viewer/permissions", "get", null, "ExperienceViewerPermissionReadResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/viewer/permissions", "put", "ExperienceViewerDecisionRequest", "ExperienceViewerDecisionResponse", "200");
ApplyJsonContract(paths, "/api/v1/experiences/viewer/group", "get", null, "ExperienceViewerGroupResponse", "200");
// Simulator Experience bridges: exactly the query names and bounds
// consumed by NexExperienceModule/NexExperiencesApi.
AddOperationParameters(paths, "/api/v1/experiences/script/search", "get",
QueryParameter("q", false, "Namens-Teiltext, begrenzt durch Simulator-CAP."),
PaginationParameter("offset", 0, 0, 1000000),
PaginationParameter("limit", 20, 1, 50));
AddOperationParameters(paths, "/api/v1/experiences/script/info", "get",
QueryParameter("ids", true, "Kommagetrennte 1 bis 64 Experience-UUIDs, max. 4000 Zeichen."));
AddOperationParameters(paths, "/api/v1/experiences/script/resolve", "get",
QueryParameter("script_id", true, "UUID der Script-Inventory-Instanz."));
AddOperationParameters(paths, "/api/v1/experiences/script/details", "get",
QueryParameter("experience_id", false, "Experience-UUID; alternativ script_id."),
QueryParameter("script_id", false, "Script-UUID wenn experience_id fehlt."));
AddOperationParameters(paths, "/api/v1/experiences/script/permission", "get",
QueryParameter("script_id", true, "Gebundene Script-UUID."),
QueryParameter("resident_id", true, "Avatar-UUID; nur intern vertrauter Script-Dienst."));
AddOperationParameters(paths, "/api/v1/experiences/script/location", "get",
QueryParameter("script_id", true, "Gebundene Script-UUID."),
QueryParameter("estate_id", false, "Optionale Estate UUID."),
QueryParameter("parcel_id", false, "Optionale Parcel UUID."));
AddOperationParameters(paths, "/api/v1/experiences/viewer/permissions", "get",
QueryParameter("resident_id", true, "Vom authentifizierten Avatar-CAP serverseitig gebundene UUID."),
QueryParameter("experience_id", false, "Optional: Einzeleinstellung statt aller Listen."));
AddOperationParameters(paths, "/api/v1/experiences/viewer/group", "get",
QueryParameter("group_id", true, "UUID der angefragten Gruppe."));
ApplyJsonContract(paths, "/api/v1/banking/transactions", "get", null, "BankingTransactionsResponse", "200");
ApplyJsonContract(paths, "/api/v1/banking/statements", "get", null, "BankingStatementResponse", "200");
ApplyJsonContract(paths, "/api/v1/banking/reconciliation", "get", null, "BankingReconciliationResponse", "200");
@@ -1332,11 +1378,11 @@ namespace NexVerse.Server.Api
codename = NexVersePlatform.MilestoneCodename,
status = "development",
published = "2026-10-09",
compatibility = "OpenGenesisLINK v0.9.3.10 Dev — OGLVoice und Pathfinding gemeinsamer Release-Train",
compatibility = "OpenGenesisLINK v0.9.3.10 Dev — native Navigation und NexExperiences in Abnahme; Firestorm-NavMesh und OGLVoice zurueckgestellt",
highlights = new[]
{
"0.9.3.9 OGLVoice und Runtime-Modernisierung sowie 0.9.3.10 Pathfinding werden gemeinsam entwickelt",
"Native Pathfinding-A*-Kernkomponente und .NET-ThreadPool-Bereinigung im Entwicklungsstand; keine Voice- oder NavMesh-Produktivfreigabe",
"0.9.3.9/0.9.3.10 bilden einen gemeinsamen Entwicklungsstand ohne separate Stable-0.9.3.9-Freigabe",
"Nativer OGL-3D-Pathfinding-A*-Kern, NPC-Wegpunkte und NexExperiences-Simulator-CAPS als Opt-in; keine abgeschlossene reale Viewer-/LSL-/Mehrregionen-Abnahme",
"0.9.3.8 bleibt die letzte offiziell freigegebene Stable-Version"
}
},
@@ -2196,6 +2242,40 @@ namespace NexVerse.Server.Api
return result;
}
private static object SimulatorBridgeOperations(
params (string method, string summary, string scope, string successCode)[] operations)
{
// These endpoints require a dedicated trusted simulator credential.
// In particular a resident OAuth/Bearer principal must not be
// mistaken for the live avatar whose CAPS delegated the request.
Dictionary<string, object> result =
(Dictionary<string, object>)AuthenticatedOperations(operations);
foreach (KeyValuePair<string, object> entry in result)
{
Dictionary<string, object> operation = (Dictionary<string, object>)entry.Value;
operation["security"] = new object[]
{
new Dictionary<string, string[]>
{
["apiKeyAuth"] = Array.Empty<string>()
}
};
operation["x-nexverse-audience"] = new[] { "service" };
operation["x-nexverse-ai-instruction"] =
"Nur ein verifizierter Simulator darf diese interne World-API-Bridge verwenden. " +
"Das resident_id-Feld ist durch die aktuelle, widerrufbare Viewer-CAP-Sitzung zu binden; " +
"niemals aus einer ChatGPT-Eingabe oder URL eines Dritten übernehmen.";
operation["x-nexverse-security-constraints"] = new[]
{
"Nur separat administrativ vergebene API-Schlüssel mit experiences:viewer:permissions.",
"Kein Einwohner-Bearer-Token, keine Endnutzer- oder LSL-Verwendung.",
"Live Root-Agent, CAPS-Lease und Regionsbindung muss der Simulator vor dem Aufruf prüfen.",
"Allow, Block und Forget nur nach expliziter Viewerentscheidung; Audit erforderlich."
};
}
return result;
}
private static string[] AudienceForScope(
string scope)
{
@@ -2956,6 +3036,226 @@ namespace NexVerse.Server.Api
["mature_publish"] = new { type = "boolean" }
}
},
// NexExperiences contracts are intentionally explicit. The
// previous generic Chapter11ObjectResponse hid the actual
// API payload, required fields and privileged boundaries.
["ExperienceApiRecord"] = new
{
type = "object",
required = new[] { "experience_id", "name", "owner_id", "maturity", "enabled" },
properties = new Dictionary<string, object>
{
["experience_id"] = new { type = "string", format = "uuid" },
["name"] = new { type = "string", minLength = 3, maxLength = 64 },
["description"] = new { type = "string" },
["owner_id"] = new { type = "string", format = "uuid" },
["group_id"] = new { type = new[] { "string", "null" }, format = "uuid" },
["maturity"] = new { type = "string", @enum = new[] { "general", "moderate", "adult" } },
["enabled"] = new { type = "boolean" },
["admins"] = UuidArraySchema(),
["contributors"] = UuidArraySchema(),
["allowed_residents"] = UuidArraySchema(),
["blocked_residents"] = UuidArraySchema(),
["allowed_estates"] = UuidArraySchema(),
["blocked_estates"] = UuidArraySchema(),
["allowed_parcels"] = UuidArraySchema(),
["blocked_parcels"] = UuidArraySchema(),
["key_value_count"] = new { type = "integer", minimum = 0 },
["created_at"] = new { type = "string", format = "date-time" },
["updated_at"] = new { type = "string", format = "date-time" }
}
},
["ExperienceDetailsResponse"] = new
{
type = "object",
required = new[] { "experience", "correlation_id" },
properties = new Dictionary<string, object>
{
["experience"] = SchemaRef("ExperienceApiRecord"),
["correlation_id"] = new { type = "string" }
}
},
["ExperienceSearchResponse"] = new
{
type = "object",
required = new[] { "experiences", "offset", "limit", "correlation_id" },
properties = new Dictionary<string, object>
{
["experiences"] = new { type = "array", items = SchemaRef("ExperienceApiRecord") },
["offset"] = new { type = "integer", minimum = 0 },
["limit"] = new { type = "integer", minimum = 1, maximum = 500 },
["correlation_id"] = new { type = "string" }
}
},
["ExperienceProfileUpdateRequest"] = new
{
type = "object",
properties = new Dictionary<string, object>
{
["actor_id"] = new { type = "string", format = "uuid" },
["name"] = new { type = "string", minLength = 3, maxLength = 64 },
["description"] = new { type = "string" },
["group_id"] = new { type = new[] { "string", "null" }, format = "uuid" },
["maturity"] = new { type = "string", @enum = new[] { "general", "moderate", "adult" } },
["enabled"] = new { type = "boolean" }
}
},
["ExperiencePublicRecord"] = new
{
type = "object",
required = new[] { "experience_id", "name", "description", "owner_id", "group_id", "maturity", "enabled" },
properties = new Dictionary<string, object>
{
["experience_id"] = new { type = "string", format = "uuid" },
["name"] = new { type = "string" },
["description"] = new { type = "string" },
["owner_id"] = new { type = "string", format = "uuid" },
["group_id"] = new { type = "string", format = "uuid" },
["maturity"] = new { type = "integer", @enum = new[] { 0, 1, 2 } },
["enabled"] = new { type = "boolean" }
}
},
["ExperiencePublicSearchResponse"] = new
{
type = "object",
required = new[] { "experiences", "correlation_id" },
properties = new Dictionary<string, object>
{
["experiences"] = new { type = "array", items = SchemaRef("ExperiencePublicRecord") },
["correlation_id"] = new { type = "string" }
}
},
["ExperiencePublicInfoResponse"] = new
{
type = "object",
required = new[] { "experiences", "error_ids", "correlation_id" },
properties = new Dictionary<string, object>
{
["experiences"] = new { type = "array", items = SchemaRef("ExperiencePublicRecord") },
["error_ids"] = UuidArraySchema(),
["correlation_id"] = new { type = "string" }
}
},
["ExperienceScriptResolveResponse"] = new
{
type = "object",
required = new[] { "script_id", "experience_id", "correlation_id" },
properties = new Dictionary<string, object>
{
["script_id"] = new { type = "string", format = "uuid" },
["experience_id"] = new { type = new[] { "string", "null" }, format = "uuid" },
["correlation_id"] = new { type = "string" }
}
},
["ExperienceScriptPermissionResponse"] = new
{
type = "object",
required = new[] { "script_id", "resident_id", "experience_id", "status", "allowed", "correlation_id" },
properties = new Dictionary<string, object>
{
["script_id"] = new { type = "string", format = "uuid" },
["resident_id"] = new { type = "string", format = "uuid" },
["experience_id"] = new { type = new[] { "string", "null" }, format = "uuid" },
["status"] = new { type = "string", @enum = new[] { "none", "allowed", "blocked" } },
["allowed"] = new { type = "boolean" },
["correlation_id"] = new { type = "string" }
}
},
["ExperienceScriptLocationResponse"] = new
{
type = "object",
required = new[] { "experience_id", "allowed", "correlation_id" },
properties = new Dictionary<string, object>
{
["experience_id"] = new { type = new[] { "string", "null" }, format = "uuid" },
["allowed"] = new { type = "boolean" },
["correlation_id"] = new { type = "string" }
}
},
["ExperienceKvRequest"] = new
{
type = "object",
required = new[] { "script_id", "operation" },
properties = new Dictionary<string, object>
{
["script_id"] = new { type = "string", format = "uuid" },
["operation"] = new { type = "string", @enum = new[] { "create", "read", "update", "delete", "stats", "keys" } },
["key"] = new { type = "string", maxLength = 1011 },
["value"] = new { type = "string", maxLength = 4095 },
["check_original"] = new { type = "boolean" },
["original_value"] = new { type = "string" },
["start"] = new { type = "integer", minimum = 0 },
["count"] = new { type = "integer", minimum = 1 }
}
},
["ExperienceKvResponse"] = new
{
type = "object",
required = new[] { "success", "code", "message", "result", "experience_id", "correlation_id" },
properties = new Dictionary<string, object>
{
["success"] = new { type = "boolean" },
["code"] = new { type = "string" },
["message"] = new { type = "string" },
["result"] = new { },
["experience_id"] = new { type = "string", format = "uuid" },
["correlation_id"] = new { type = "string" }
}
},
["ExperienceViewerListsResponse"] = new
{
type = "object",
required = new[] { "experiences", "blocked", "experience_ids", "admin_ids", "contributor_ids", "correlation_id" },
properties = new Dictionary<string, object>
{
["experiences"] = UuidArraySchema(),
["blocked"] = UuidArraySchema(),
["experience_ids"] = UuidArraySchema(),
["admin_ids"] = UuidArraySchema(),
["contributor_ids"] = UuidArraySchema(),
["correlation_id"] = new { type = "string" }
}
},
["ExperienceViewerDecisionRequest"] = new
{
type = "object",
required = new[] { "resident_id", "experience_id", "status" },
properties = new Dictionary<string, object>
{
["resident_id"] = new { type = "string", format = "uuid" },
["experience_id"] = new { type = "string", format = "uuid" },
["status"] = new { type = "string", @enum = new[] { "allowed", "blocked", "none" } }
}
},
["ExperienceViewerDecisionResponse"] = new
{
type = "object",
required = new[] { "experience_id", "status", "correlation_id" },
properties = new Dictionary<string, object>
{
["experience_id"] = new { type = "string", format = "uuid" },
["status"] = new { type = "string", @enum = new[] { "allowed", "blocked", "none" } },
["correlation_id"] = new { type = "string" }
}
},
["ExperienceViewerPermissionReadResponse"] = new
{
oneOf = new[]
{
SchemaRef("ExperienceViewerListsResponse"),
SchemaRef("ExperienceViewerDecisionResponse")
}
},
["ExperienceViewerGroupResponse"] = new
{
type = "object",
required = new[] { "experience_ids", "correlation_id" },
properties = new Dictionary<string, object>
{
["experience_ids"] = UuidArraySchema(),
["correlation_id"] = new { type = "string" }
}
},
["NexExperienceCreateRequest"] = new
{
type = "object",
+38 -2
View File
@@ -6,11 +6,47 @@ Current stable server release: **OpenGenesisLINK v0.9.3.8 — NexSearch, Places,
World API v1 was completed as the 0.9.3.2 development checkpoint on 3 October 2026 and remains the control-plane API foundation for the active OpenGenesisLINK development line. NexVerse continues as the deployment/grid identity.
Current development endpoint:
Current development deployment base (confirm against the active `[NexVerseWorldApi] PublicBaseUrl` and installed runtime):
`http://world.stadt-nexverse.de/api/v1`
NexVerse currently runs Robust directly on TCP port 80 without a reverse proxy. Therefore `world.stadt-nexverse.de` should resolve to the same Robust host as the public grid endpoint. The World API uses its own `/api/v1` path namespace.
The endpoint above reflects the historically documented direct HTTP/port-80 deployment, **not a guarantee of live reachability, HTTPS or TLS protection**. Secure authenticated API traffic using an HTTPS reverse proxy or a comparably protected trusted network. Do not transmit bearer tokens, passwords or service API keys across plain public HTTP. The World API uses its own `/api/v1` namespace, whereas OAuth/OIDC endpoints include `/oauth/...` and `/.well-known/openid-configuration`. Paths in OpenAPI may depend on `EnablePrivilegedEndpoints`, configured services and simulator-side CAPS.
## Aktueller Dokumentationsvertrag (0.9.3.10 Dev, 11.10.2026)
Die **drei dynamisch generierten ChatGPT-MD-Anweisungen** und die **OpenAPI 3.1** werden vom Robust-Prozess geliefert. Verwende fuer einen konkreten Grid-Betrieb die Antworten derselben laufenden Version und nicht eine alte aus Git ausgecheckte Datei. Dieser Repository-Stand dokumentiert den **Quellcode**, nicht das automatische Deployment von /opt/robust und /opt/developer.
| Ressource | HTTP-Methode und Pfad | Verwendungszweck |
| --- | --- | --- |
| OpenAPI | `GET /api/v1/openapi.json` | Autoritativer Maschinenvertrag inklusive `x-nexverse-*`-Hinweisen |
| HTML-Explorer | `GET /api/v1/docs` | Durchsuchbarer Katalog; optionale Services koennen deaktiviert sein |
| Gesamtanweisung | `GET /api/v1/chatgpt-instructions.md` | Einwohner, Admin und interne Dienste strikt getrennt |
| Buergerportal | `GET /api/v1/chatgpt-buergerportal.md` | Self-/OAuth-Zugriff, niemals Admin-Impersonation |
| Adminbereich | `GET /api/v1/chatgpt-admin.md` | Explizit autorisierte Mutationen, Scope-/Audit-Regeln |
Anweisungen enthalten die Basis-URL aus der Runtime-Konfiguration. Sie **berechtigen** ChatGPT nicht, ohne angebundene Authentifizierung zu handeln. Der OpenAPI-Katalog ist ein technischer Vertrag, **kein Beleg** dafuer, dass jeder optionale Endpunkt in einem bestimmten Deployment aktiv oder bereits durch reale Viewer-Tests abgenommen ist.
### NexExperiences – korrekte Service- und Viewer-Grenzen
| Endpunkt | Methode | Scope | Zielgruppe |
| --- | --- | --- | --- |
| `/api/v1/experiences` | GET / POST | `experiences:read` / `experiences:manage` | Authentifizierte Verwaltung, ggf. Owner-/Admin-Grenze |
| `/api/v1/experiences/{experienceId}` | GET / PUT / DELETE | `experiences:read` / `experiences:manage` | Authentifizierte Verwaltung |
| `/api/v1/experiences/script/search` | GET | `experiences:script` | Simulator-Viewer-Metadatensuche |
| `/api/v1/experiences/script/info` | GET | `experiences:script` | Simulator-Viewer-Kurzprofile mit `ids` (1–64 UUIDs, max. 4000 Zeichen) |
| `/api/v1/experiences/script/resolve` | GET | `experiences:script` | Script-Bindung |
| `/api/v1/experiences/script/details` | GET | `experiences:script` | Script-/Experience-Details |
| `/api/v1/experiences/script/permission` | GET | `experiences:script` | Script-/Avatar-Berechtigung |
| `/api/v1/experiences/script/location` | GET | `experiences:script` | Estate-/Parzellenfreigabe |
| `/api/v1/experiences/script/kv` | POST | `experiences:script` | `create`, `read`, `update` (CAS), `delete`, `stats`, `keys` |
| `/api/v1/experiences/viewer/permissions` | GET / PUT | `experiences:viewer:permissions` | Nur vertrauenswuerdiger Simulator, nicht Bewohner-Token |
| `/api/v1/experiences/viewer/group` | GET | `experiences:viewer:permissions` | Nur vertrauenswuerdiger Simulator |
`GET /viewer/permissions?resident_id=<uuid>` liefert ID-Listen (`experiences`, `blocked`, `experience_ids`, `admin_ids`, `contributor_ids`). Mit `&experience_id=<uuid>` liefert es stattdessen `status: none|allowed|blocked`; `PUT` erwartet `resident_id`, `experience_id` und `status: allowed|blocked|none`. Alle Browser-/Firestorm-Zugriffe muessen zuerst durch eine gueltige *avatar- und regionsgebundene Simulator-CAP* laufen. Die zentrale HTTP-Route allein authentifiziert keinen Einwohner nur anhand von `resident_id`. Der dedizierte Viewer-Permissions-Schluessel darf weder mit `experiences:script` noch mit einem Admin- oder Einwohner-Token verwechselt werden.
Beim zentralen Experience-JSON-Store ist derzeit nur `SingleWriterJson` mit lokalem Writer-Lease implementiert. Ein verteilter SQL-/Active-Active-Store ist noch **nicht freigegeben**. Der Firestorm-Experience-Kauf/Editor ist im derzeitigen freigegebenen **main**-Stand noch **nicht als funktional abgenommen**; eine separate Entwicklungsarbeit hierfuer laeuft. Firestorm-Havok-`RetrieveNavMeshSrc` bleibt im jetzigen Viewer bewusst nicht behauptet und OGLVoice ist verschoben.
**Konsistenzschutz:** `tools/ci/verify_worldapi_chatgpt_openapi.py` gleicht die expliziten Experience-Routen mit OpenAPI ab. Der GitHub-Robust-Smoke-Test laedt die echte `openapi.json`, validiert die Viewer-Service-Sicherheitsmetadaten, JSON-Schemas und alle drei MD-Downloads.
#### Bürgerportal-Weltkarte
@@ -0,0 +1,72 @@
#!/usr/bin/env python3
"""Guard that runtime ChatGPT Markdown and OpenAPI describe real API routes.
Static checks run before .NET build. The CI Robust smoke test separately
fetches the generated /api/v1/openapi.json and asserts runtime semantics.
"""
import re
from pathlib import Path
root = Path(__file__).resolve().parents[2]
api = (root / "NexVerse/Server/Api/NexExperiencesApi.cs").read_text(encoding="utf-8")
spec = (root / "NexVerse/Server/Api/NexVerseWorldApiHandlers.cs").read_text(encoding="utf-8")
md = (root / "NexVerse/Server/Api/NexChatGptInstructionDownloads.cs").read_text(encoding="utf-8")
explorer = (root / "NexVerse/Server/Api/NexApiDocsPage.cs").read_text(encoding="utf-8")
# Every explicitly registered Experience route must be in the spec; not just
# the old generic management CRUD endpoints.
actual = set(re.findall(r'if\s*\(path\s*==\s*"(/api/v1/experiences/[^"]+)"\)', api))
actual.update(("/api/v1/experiences", "/api/v1/experiences/{experienceId}"))
specified = set(re.findall(r'\["(/api/v1/experiences[^"]*)"\]\s*=\s*', spec))
assert actual <= specified, "Experience paths absent from OpenAPI: " + str(sorted(actual - specified))
for path in (
"/api/v1/experiences/script/info",
"/api/v1/experiences/script/search",
"/api/v1/experiences/script/resolve",
"/api/v1/experiences/script/details",
"/api/v1/experiences/script/permission",
"/api/v1/experiences/script/location",
"/api/v1/experiences/script/kv",
"/api/v1/experiences/viewer/permissions",
"/api/v1/experiences/viewer/group",
):
assert path in specified, path
# Ensure typed JSON contracts have schema definitions, not a fall-through
# Chapter11ObjectResponse which prevents API agents from building correct bodies.
contracts = {
"ExperienceDetailsResponse", "ExperienceSearchResponse",
"ExperienceApiRecord", "ExperienceProfileUpdateRequest",
"ExperiencePublicRecord", "ExperiencePublicSearchResponse",
"ExperiencePublicInfoResponse", "ExperienceScriptResolveResponse",
"ExperienceScriptPermissionResponse", "ExperienceScriptLocationResponse",
"ExperienceKvRequest", "ExperienceKvResponse",
"ExperienceViewerListsResponse", "ExperienceViewerDecisionRequest",
"ExperienceViewerDecisionResponse", "ExperienceViewerPermissionReadResponse",
"ExperienceViewerGroupResponse",
}
for name in contracts:
assert f'["{name}"] = new' in spec, "Missing OpenAPI schema: " + name
assert name in spec, "Unreferenced schema: " + name
for marker in ("SimulatorBridgeOperations(", "apiKeyAuth",
'operation["x-nexverse-audience"] = new[] { "service" }',
"experiences:viewer:permissions", "AddOperationParameters(paths",
"max. 4000 Zeichen", "ExperienceKvRequest",
"ExperienceViewerPermissionReadResponse"):
assert marker in spec, "Missing API machine contract/security: " + marker
for marker in ("/script/info", "/script/search", "/script/kv",
"/experiences/viewer/permissions", "experiences:script",
"experiences:viewer:permissions", "Viewer-CAPS",
"OpenAPI", "0.9.3.10", "0.9.3.8",
"AppendCitizenSection", "AppendAdminSection"):
assert marker in md, "ChatGPT Markdown generator missing: " + marker
for marker in ("/api/v1/chatgpt-instructions.md",
"/api/v1/chatgpt-buergerportal.md",
"/api/v1/chatgpt-admin.md",
"/api/v1/openapi.json"):
assert marker in explorer, "Explorer link missing: " + marker
print(f"OpenAPI / ChatGPT docs consistency: {len(actual)} explicit Experience paths covered")