Lower Electron RTS through daemon Eve surface

This commit is contained in:
Meta Vens 2026-07-05 00:32:49 +01:00
commit fbc4848231
9 changed files with 549 additions and 52 deletions

View file

@ -37,6 +37,8 @@ const ipcChannels = [
["setTarget", "aetheria-rts:set-target"],
["surfaceCatalog", "aetheria-rts:surface-catalog"],
["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"],
@ -458,6 +460,62 @@ export type AetheriaRuntimeViewportFeedSnapshot = {
sampleMs: number;
};
export type AetheriaMenuSurfaceRequest = {
surfaceId?: string;
inGame?: boolean;
canOpenRuntimeInputScreen?: boolean;
};
export type AetheriaEveSurfaceRequest = {
surfaceId?: string;
recordKey?: string;
};
export type AetheriaEveCommandRequest = {
providerId?: string;
surfaceId?: string;
command?: string;
clientId?: string;
issuedAtUtc?: string;
payload?: Record<string, unknown>;
};
export type AetheriaMenuSurfaceDocument = {
providerId: string;
providerKind: string;
title: string;
version: number;
updatedAtUtc: string;
surface: AetheriaMenuSurfaceTree;
commands: AetheriaMenuSurfaceCommand[];
};
export type AetheriaMenuSurfaceTree = {
id: string;
root: AetheriaMenuSurfaceComponent;
styles: AetheriaMenuStyleToken[];
};
export type AetheriaMenuSurfaceComponent = {
id: string;
kind: string;
props: Record<string, string>;
layout?: Record<string, string>;
style?: Record<string, string>;
children: AetheriaMenuSurfaceComponent[];
};
export type AetheriaMenuStyleToken = {
name: string;
value: string;
};
export type AetheriaMenuSurfaceCommand = {
command: string;
label: string;
transport: string;
};
export type AetheriaRtsMainClient = {
mapViewport(request: CultMeshViewportRequest): Promise<ViewportResponse>;
objectsViewport(request: CultMeshViewportRequest): Promise<ObjectsViewportResponse>;
@ -471,6 +529,8 @@ export type AetheriaRtsMainClient = {
watchViewportFeed(request: AetheriaRuntimeViewportFeedRequest, callback: (snapshot: AetheriaRuntimeViewportFeedSnapshot) => void): CultMeshUnsubscribe;
setMoveVector(request: AetheriaRuntimeSetMoveVectorRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
setTarget(request: AetheriaRuntimeSetTargetRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
eveSurface(request: AetheriaEveSurfaceRequest): Promise<AetheriaMenuSurfaceDocument>;
submitEveCommand(request: AetheriaEveCommandRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
surfaceCatalogDiagnostics(): CultMeshSurfaceCatalogDiagnostic;
surfaceCatalogIndexDiagnostics(): CultMeshSurfaceCatalogIndexDiagnostic;
};
@ -515,6 +575,10 @@ export function registerAetheriaRtsIpcHandlers(
getClient().setMoveVector(request));
ipcMain.handle(AetheriaRtsIpcChannels.setTarget, async (_event, request: AetheriaRuntimeSetTargetRequest) =>
getClient().setTarget(request));
ipcMain.handle(AetheriaRtsIpcChannels.eveSurface, async (_event, request: AetheriaEveSurfaceRequest) =>
getClient().eveSurface(request));
ipcMain.handle(AetheriaRtsIpcChannels.submitEveCommand, async (_event, request: AetheriaEveCommandRequest) =>
getClient().submitEveCommand(request));
ipcMain.handle(AetheriaRtsIpcChannels.surfaceCatalog, () => getClient().surfaceCatalogDiagnostics());
ipcMain.handle(AetheriaRtsIpcChannels.surfaceCatalogIndex, () => getClient().surfaceCatalogIndexDiagnostics());
ipcMain.handle(AetheriaRtsIpcChannels.health, () => getHealth());
@ -1042,6 +1106,20 @@ export type AetheriaMenuSurfaceRequest = {
canOpenRuntimeInputScreen?: boolean;
};
export type AetheriaEveSurfaceRequest = {
surfaceId?: string;
recordKey?: string;
};
export type AetheriaEveCommandRequest = {
providerId?: string;
surfaceId?: string;
command?: string;
clientId?: string;
issuedAtUtc?: string;
payload?: Record<string, unknown>;
};
export type AetheriaMenuSurfaceDocument = {
providerId: string;
providerKind: string;
@ -1091,6 +1169,8 @@ export type AetheriaRtsApi = {
setTarget(request: AetheriaRuntimeSetTargetRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
surfaceCatalog(): Promise<CultMeshSurfaceCatalogDiagnostic>;
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;