Remove RTS menu shell shortcuts

This commit is contained in:
Meta Vens 2026-07-05 16:59:06 +01:00
commit e4b155576f
23 changed files with 265 additions and 1532 deletions

View file

@ -3,8 +3,8 @@ import { resolve } from "node:path";
const root = resolve(import.meta.dirname, "..");
const source = resolve(root, "Electron", "preload.cjs");
const legacyOutput = resolve(root, "electron-dist", "preload.js");
const previousPreloadOutput = resolve(root, "electron-dist", "preload.js");
const output = resolve(root, "electron-dist", "preload.cjs");
rmSync(legacyOutput, { force: true });
rmSync(previousPreloadOutput, { force: true });
copyFileSync(source, output);

View file

@ -43,7 +43,6 @@ const ipcChannels = [
["surfaceCatalogIndex", "aetheria-rts:surface-catalog-index"],
["eveSurface", "aetheria-rts:eve-surface"],
["submitEveCommand", "aetheria-rts:submit-eve-command"],
["mainMenuSurface", "aetheria-rts:main-menu-surface"],
["debugSurface", "aetheria-rts:debug-surface"],
["debugSurfaceWatch", "aetheria-rts:debug-surface-watch"],
["debugSurfaceWatchStop", "aetheria-rts:debug-surface-watch-stop"],
@ -481,13 +480,6 @@ export type AetheriaRuntimeViewportFeedSnapshot = {
sampleMs: number;
};
export type AetheriaMenuSurfaceRequest = {
surfaceId?: string;
inGame?: boolean;
canOpenRuntimeInputScreen?: boolean;
panelOnly?: boolean;
};
export type AetheriaEveSurfaceRequest = {
surfaceId?: string;
recordKey?: string;
@ -1151,13 +1143,6 @@ export type AetheriaRuntimeViewportFeedSnapshot = {
${renderRtsDocumentTypes("Viewport")}
export type AetheriaMenuSurfaceRequest = {
surfaceId?: string;
inGame?: boolean;
canOpenRuntimeInputScreen?: boolean;
panelOnly?: boolean;
};
export type AetheriaEveSurfaceRequest = {
surfaceId?: string;
recordKey?: string;
@ -1232,7 +1217,6 @@ export type AetheriaRtsApi = {
surfaceCatalogIndex(): Promise<CultMeshSurfaceCatalogIndexDiagnostic>;
eveSurface(request: AetheriaEveSurfaceRequest): Promise<AetheriaMenuSurfaceDocument>;
submitEveCommand(request: AetheriaEveCommandRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
mainMenuSurface(request: AetheriaMenuSurfaceRequest): Promise<AetheriaMenuSurfaceDocument>;
debugSurface(): Promise<AetheriaMenuSurfaceDocument>;
watchDebugSurface(callback: (surface: AetheriaMenuSurfaceDocument) => void): () => void;
windowControl(action: "minimize" | "maximize" | "close"): Promise<void>;

View file

@ -50,32 +50,21 @@ foreach ($symbol in $required) {
}
}
if (-not (Get-Content Client/app.ts -Raw).Contains('window.aetheriaRts.surfaceCatalogIndex()')) {
Write-Error "Stage 7B verifier failed: RTS renderer does not read the shared CultMesh surface catalog index."
}
$rendererText = Get-Content Client/app.ts -Raw
if (-not $rendererText.Contains('surface.routeHint.kind') -or -not $rendererText.Contains('surface.sources.length')) {
Write-Error "Stage 7B verifier failed: RTS renderer does not expose CultMesh surface route and source metadata."
if (-not $rendererText.Contains('window.aetheriaRts.eveSurface') -or
-not $rendererText.Contains('renderEveSurface') -or
-not $rendererText.Contains('resolveEveDocument') -or
-not $rendererText.Contains('submitEveCommand')) {
Write-Error "Stage 7B verifier failed: RTS renderer is not lowering daemon Eve through the generated preload API."
}
if (-not $rendererText.Contains('latestOperationReceipt') -or
-not $rendererText.Contains('receipt.commandId') -or
-not $rendererText.Contains('receipt.operationId') -or
-not $rendererText.Contains('receipt.accepted') -or
-not $rendererText.Contains('receipt.route.kind')) {
Write-Error "Stage 7B verifier failed: RTS renderer does not expose CultMesh operation receipt metadata."
}
if (-not (Get-Content wwwroot/index.html -Raw).Contains('runtime-surface-details')) {
Write-Error "Stage 7B verifier failed: RTS renderer does not expose runtime surface diagnostics in the shell."
$indexText = Get-Content wwwroot/index.html -Raw
if (-not $indexText.Contains('eve-surface-host')) {
Write-Error "Stage 7B verifier failed: RTS renderer is not mounting the daemon Eve surface host."
}
$transportLayoutPatterns = @(
'\[[0-9]+\]',
'new Array<unknown>',
'command\[',
'value\[',
'bounds\[',
'viewportSchema',
'commandSchema',
@ -426,17 +415,20 @@ if ($LASTEXITCODE -gt 1) {
Write-Error "Stage 7B verifier could not run rg for duplicated renderer contract checks."
}
$forbiddenRendererPollingHits = & rg -n 'setInterval|objectsViewport\(viewport\)|gravityViewport\(viewport\)' Client/app.ts 2>$null
if ($LASTEXITCODE -eq 0) {
Write-Error "Stage 7B verifier failed: renderer still owns the RTS viewport polling loop instead of subscribing to the generated feed.`n$forbiddenRendererPollingHits"
}
if ($LASTEXITCODE -gt 1) {
Write-Error "Stage 7B verifier could not run rg for renderer polling checks."
}
$requiredEveRendererSymbols = @(
'renderEveSurface',
'eve-surface-host',
'window.aetheriaRts.eveSurface',
'resolveEveDocument',
'gamecult.eve.surface.v1',
'aetheria.daemon.game'
)
& rg -q 'watchViewportFeed' Client/app.ts
if ($LASTEXITCODE -ne 0) {
Write-Error "Stage 7B verifier failed: renderer is not subscribing to the generated viewport feed."
foreach ($symbol in $requiredEveRendererSymbols) {
& rg -F -q $symbol Client/app.ts wwwroot/index.html
if ($LASTEXITCODE -ne 0) {
Write-Error "Stage 7B verifier failed: expected daemon Eve renderer symbol '$symbol' was not found."
}
}
$forbiddenBindingPatterns = @(

View file

@ -5,48 +5,50 @@ Set-Location $root
npm run build
if ($LASTEXITCODE -ne 0) {
Write-Error "Stage 7C Electron shell verifier failed: RTS build failed."
Write-Error "Stage 7C Electron RTS verifier failed: RTS build failed."
}
if (-not (Get-Content wwwroot\index.html -Raw).Contains('runtime-surface-details')) {
Write-Error "Stage 7C Electron shell verifier failed: built renderer markup does not expose runtime surface diagnostics."
if (-not (Get-Content wwwroot\index.html -Raw).Contains('eve-surface-host')) {
Write-Error "Stage 7C Electron RTS verifier failed: built renderer markup does not host the daemon Eve surface."
}
if (-not (Get-Content wwwroot\app.js -Raw).Contains('window.aetheriaRts.surfaceCatalogIndex()')) {
Write-Error "Stage 7C Electron shell verifier failed: built renderer script does not read the CultMesh surface catalog index."
$appText = Get-Content wwwroot\app.js -Raw
if (-not $appText.Contains('window.aetheriaRts.eveSurface') -or
$appText.Contains('legacyViewportMode') -or
$appText.Contains('mainMenuSurface') -or
$appText.Contains('main-menu-mode')) {
Write-Error "Stage 7C Electron RTS verifier failed: renderer is not daemon-Eve-only."
}
$mainText = Get-Content Electron\main.ts -Raw
if (-not $mainText.Contains('await api.surfaceCatalog()') -or -not $mainText.Contains('await api.surfaceCatalogIndex()')) {
Write-Error "Stage 7C Electron shell verifier failed: Electron smoke does not call the preload CultMesh surface catalog APIs."
Write-Error "Stage 7C Electron RTS verifier failed: Electron smoke does not call the preload CultMesh surface catalog APIs."
}
if (-not $mainText.Contains('await api.renderSplatsViewport') -or
-not $mainText.Contains('eveFieldSurface') -or
-not $mainText.Contains('embeddedDocuments') -or
-not $mainText.Contains('fog.tint')) {
Write-Error "Stage 7C Electron shell verifier failed: Electron smoke does not verify daemon Eve field document lowering."
Write-Error "Stage 7C Electron RTS verifier failed: Electron smoke does not verify daemon Eve field document lowering."
}
if (-not $mainText.Contains('await api.submitEveCommand') -or
-not $mainText.Contains('eveReceipt?.commandId') -or
-not $mainText.Contains('eveReceipt?.accepted') -or
-not $mainText.Contains('eveReceipt?.route')) {
Write-Error "Stage 7C Electron shell verifier failed: Electron smoke does not verify typed operation receipts through preload."
Write-Error "Stage 7C Electron RTS verifier failed: Electron smoke does not verify typed operation receipts through preload."
}
if (-not $mainText.Contains('AETHERIA_RTS_RESOLVED_RUDP_ENDPOINT has been removed') -or
-not $mainText.Contains('AETHERIA_RTS_PEER_CULTMESH_ENDPOINTS has been removed') -or
-not $mainText.Contains('AETHERIA_RTS_VERSE_ID') -or
if (-not $mainText.Contains('AETHERIA_RTS_VERSE_ID') -or
-not $mainText.Contains('--verse-id') -or
-not $mainText.Contains('AETHERIA_RTS_DAEMON_ID') -or
-not $mainText.Contains('--daemon-id')) {
Write-Error "Stage 7C Electron shell verifier failed: Electron launcher does not enforce CultMesh URI daemon targeting."
Write-Error "Stage 7C Electron RTS verifier failed: Electron launcher does not configure daemon Verse identity."
}
$electron = Join-Path $root "node_modules\electron\dist\electron.exe"
if (!(Test-Path -LiteralPath $electron)) {
Write-Error "Stage 7C Electron shell verifier failed: electron.exe was not found at $electron."
Write-Error "Stage 7C Electron RTS verifier failed: electron.exe was not found at $electron."
}
$tempRoot = Join-Path ([System.IO.Path]::GetTempPath()) ("aetheria-stage7c-electron-" + [Guid]::NewGuid().ToString("N"))
@ -65,16 +67,16 @@ try {
$env:AETHERIA_RTS_ELECTRON_SMOKE_RESULT = $resultPath
$process = Start-Process -FilePath $electron -ArgumentList "." -WorkingDirectory $root -Wait -PassThru
if ($process.ExitCode -ne 0) {
Write-Error "Stage 7C Electron shell verifier failed: Electron exited with code $($process.ExitCode)."
Write-Error "Stage 7C Electron RTS verifier failed: Electron exited with code $($process.ExitCode)."
}
if (!(Test-Path -LiteralPath $resultPath)) {
Write-Error "Stage 7C Electron shell verifier failed: Electron did not write a smoke result."
Write-Error "Stage 7C Electron RTS verifier failed: Electron did not write a smoke result."
}
$result = Get-Content -Raw -LiteralPath $resultPath | ConvertFrom-Json
if ($result.ok -ne $true) {
Write-Error "Stage 7C Electron shell verifier failed: $($result.error)"
Write-Error "Stage 7C Electron RTS verifier failed: $($result.error)"
}
}
finally {
@ -83,10 +85,8 @@ finally {
Remove-Item Env:\AETHERIA_RTS_CULTMESH_PORT -ErrorAction SilentlyContinue
Remove-Item Env:\AETHERIA_RTS_VERSE_ID -ErrorAction SilentlyContinue
Remove-Item Env:\AETHERIA_RTS_DAEMON_ID -ErrorAction SilentlyContinue
Remove-Item Env:\AETHERIA_RTS_PEER_CULTMESH_ENDPOINTS -ErrorAction SilentlyContinue
Remove-Item Env:\AETHERIA_RTS_RESOLVED_RUDP_ENDPOINT -ErrorAction SilentlyContinue
Remove-Item Env:\AETHERIA_RTS_ELECTRON_SMOKE_RESULT -ErrorAction SilentlyContinue
Remove-Item -LiteralPath $tempRoot -Recurse -Force -ErrorAction SilentlyContinue
}
Write-Host "Stage 7C Electron shell verifier passed."
Write-Host "Stage 7C Electron RTS verifier passed."