Integrate CultMesh UI and URP cleanup

This commit is contained in:
Meta Vens 2026-06-30 19:14:49 +01:00
commit 4d7bb65868
131 changed files with 7209 additions and 5084 deletions

View file

@ -387,7 +387,7 @@ function render(enums, documents) {
.map(document => renderSlotBlock(document.exportName, document.slots))
.join("\n\n");
return `// <auto-generated />\n// Generated by scripts/generate-rts-bindings.mjs from Aetheria C# MessagePack documents.\n\nimport { CultMesh } from "cultmesh-ts";\nimport type { CultMeshLiveFeedDiagnostic, CultMeshOperationContext, CultMeshOperationReceipt, CultMeshProjectionSource, CultMeshQueryContext, CultMeshQuerySurfaceDiagnostic, CultMeshQueryWatcher, CultMeshRouteHint, CultMeshSurfaceCatalogDiagnostic, CultMeshSurfaceCatalogIndexDiagnostic, CultMeshUnsubscribe, CultMeshVerseContext, CultMeshViewportRequest } from "cultmesh-ts";\nimport type { IpcMain } from "electron";\n\nexport const AetheriaRtsSchemas = {\n${schemas}\n} as const;\n\n${enumBlocks}\n\nexport const AetheriaRtsIpcChannels = {\n${renderIpcChannelLines()}\n} as const;\n\n${slotBlocks}\n\n${renderProjectionTypes("CultMeshViewportRequest")}\n\n${renderRtsOperations()}\n`;
return `// <auto-generated />\n// Generated by scripts/generate-rts-bindings.mjs from Aetheria C# MessagePack documents.\n\nimport { CultMesh } from "cultmesh-ts";\nimport type { CultMeshLiveFeedDiagnostic, CultMeshOperationContext, CultMeshOperationReceipt, CultMeshQuerySource, CultMeshQueryContext, CultMeshQuerySurfaceDiagnostic, CultMeshQueryWatcher, CultMeshRouteHint, CultMeshSurfaceCatalogDiagnostic, CultMeshSurfaceCatalogIndexDiagnostic, CultMeshUnsubscribe, CultMeshVerseContext, CultMeshViewportRequest } from "cultmesh-ts";\nimport type { IpcMain } from "electron";\n\nexport const AetheriaRtsSchemas = {\n${schemas}\n} as const;\n\n${enumBlocks}\n\nexport const AetheriaRtsIpcChannels = {\n${renderIpcChannelLines()}\n} as const;\n\n${slotBlocks}\n\n${renderRtsDocumentTypes("CultMeshViewportRequest")}\n\n${renderRtsOperations()}\n`;
}
function renderEnumBlock(exportName, entries) {
@ -442,12 +442,12 @@ export type AetheriaRuntimeViewportFeedRequest = {
export type AetheriaRuntimeViewportFeedSnapshot = {
viewport: ViewportResponse;
selectedObject: SelectedObjectProjection | null;
inventory: InventoryProjection | null;
daemonHealth: DaemonHealthProjection;
authorityStatus: AuthorityStatusProjection;
starbridgeSession: StarbridgeSessionProjection;
assetManifest: AssetManifestProjection;
selectedObject: SelectedObjectDocument | null;
inventory: InventoryDocument | null;
daemonHealth: DaemonHealthDocument;
authorityStatus: AuthorityStatusDocument;
starbridgeSession: StarbridgeSessionDocument;
assetManifest: AssetManifestDocument;
receivedAtUtc: string;
sampleMs: number;
};
@ -456,12 +456,12 @@ export type AetheriaRtsMainClient = {
mapViewport(request: CultMeshViewportRequest): Promise<ViewportResponse>;
objectsViewport(request: CultMeshViewportRequest): Promise<ObjectsViewportResponse>;
gravityViewport(request: CultMeshViewportRequest): Promise<GravityViewportResponse>;
selectedObject(request: AetheriaRuntimeSelectedObjectRequest): Promise<SelectedObjectProjection>;
inventory(request: AetheriaRuntimeSelectedObjectRequest): Promise<InventoryProjection>;
daemonHealth(): Promise<DaemonHealthProjection>;
authorityStatus(): Promise<AuthorityStatusProjection>;
starbridgeSession(): Promise<StarbridgeSessionProjection>;
assetManifest(): Promise<AssetManifestProjection>;
selectedObject(request: AetheriaRuntimeSelectedObjectRequest): Promise<SelectedObjectDocument>;
inventory(request: AetheriaRuntimeSelectedObjectRequest): Promise<InventoryDocument>;
daemonHealth(): Promise<DaemonHealthDocument>;
authorityStatus(): Promise<AuthorityStatusDocument>;
starbridgeSession(): Promise<StarbridgeSessionDocument>;
assetManifest(): Promise<AssetManifestDocument>;
watchViewportFeed(request: AetheriaRuntimeViewportFeedRequest, callback: (snapshot: AetheriaRuntimeViewportFeedSnapshot) => void): CultMeshUnsubscribe;
setMoveVector(request: AetheriaRuntimeSetMoveVectorRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
setTarget(request: AetheriaRuntimeSetTargetRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
@ -535,27 +535,27 @@ export type AetheriaRuntimeRtsQueryExecutors = {
mapViewport: AetheriaRuntimeViewportQueryExecutor<ViewportResponse>;
objectsViewport: AetheriaRuntimeViewportQueryExecutor<ObjectsViewportResponse>;
gravityViewport: AetheriaRuntimeViewportQueryExecutor<GravityViewportResponse>;
selectedObject: AetheriaRuntimeQueryExecutor<AetheriaRuntimeSelectedObjectRequest, SelectedObjectProjection>;
inventory: AetheriaRuntimeQueryExecutor<AetheriaRuntimeSelectedObjectRequest, InventoryProjection>;
daemonHealth: AetheriaRuntimeQueryExecutor<void, DaemonHealthProjection>;
authorityStatus: AetheriaRuntimeQueryExecutor<void, AuthorityStatusProjection>;
starbridgeSession: AetheriaRuntimeQueryExecutor<void, StarbridgeSessionProjection>;
assetManifest: AetheriaRuntimeQueryExecutor<void, AssetManifestProjection>;
selectedObject: AetheriaRuntimeQueryExecutor<AetheriaRuntimeSelectedObjectRequest, SelectedObjectDocument>;
inventory: AetheriaRuntimeQueryExecutor<AetheriaRuntimeSelectedObjectRequest, InventoryDocument>;
daemonHealth: AetheriaRuntimeQueryExecutor<void, DaemonHealthDocument>;
authorityStatus: AetheriaRuntimeQueryExecutor<void, AuthorityStatusDocument>;
starbridgeSession: AetheriaRuntimeQueryExecutor<void, StarbridgeSessionDocument>;
assetManifest: AetheriaRuntimeQueryExecutor<void, AssetManifestDocument>;
};
export type AetheriaRuntimeRtsQueryWatchers = Partial<{
mapViewport: CultMeshQueryWatcher<CultMeshViewportRequest, ViewportResponse>;
objectsViewport: CultMeshQueryWatcher<CultMeshViewportRequest, ObjectsViewportResponse>;
gravityViewport: CultMeshQueryWatcher<CultMeshViewportRequest, GravityViewportResponse>;
selectedObject: CultMeshQueryWatcher<AetheriaRuntimeSelectedObjectRequest, SelectedObjectProjection>;
inventory: CultMeshQueryWatcher<AetheriaRuntimeSelectedObjectRequest, InventoryProjection>;
daemonHealth: CultMeshQueryWatcher<void, DaemonHealthProjection>;
authorityStatus: CultMeshQueryWatcher<void, AuthorityStatusProjection>;
starbridgeSession: CultMeshQueryWatcher<void, StarbridgeSessionProjection>;
assetManifest: CultMeshQueryWatcher<void, AssetManifestProjection>;
selectedObject: CultMeshQueryWatcher<AetheriaRuntimeSelectedObjectRequest, SelectedObjectDocument>;
inventory: CultMeshQueryWatcher<AetheriaRuntimeSelectedObjectRequest, InventoryDocument>;
daemonHealth: CultMeshQueryWatcher<void, DaemonHealthDocument>;
authorityStatus: CultMeshQueryWatcher<void, AuthorityStatusDocument>;
starbridgeSession: CultMeshQueryWatcher<void, StarbridgeSessionDocument>;
assetManifest: CultMeshQueryWatcher<void, AssetManifestDocument>;
}>;
export type AetheriaRuntimeRtsProjectionDiagnostic = CultMeshQuerySurfaceDiagnostic;
export type AetheriaRuntimeRtsQueryDiagnostic = CultMeshQuerySurfaceDiagnostic;
export type AetheriaRuntimeRtsLiveFeedDiagnostic = CultMeshLiveFeedDiagnostic;
@ -577,24 +577,24 @@ export type AetheriaRuntimeRtsDocumentResolvers = Partial<{
export type AetheriaRuntimeRtsStatePointerResolvers = AetheriaRuntimeRtsDocumentResolvers;
export const AetheriaRuntimeRtsProjectionSources = {
daemonFrame: CultMesh.projectionSource("daemon:aetheria.frame.latest.v1", {
export const AetheriaRuntimeRtsDocumentSources = {
daemonFrame: CultMesh.querySource("daemon:aetheria.frame.latest.v1", {
schemaId: AetheriaRtsSchemas.daemonFrame,
description: "latest daemon frame"
}),
daemonHealth: CultMesh.projectionSource("daemon:aetheria.health.latest.v1", {
daemonHealth: CultMesh.querySource("daemon:aetheria.health.latest.v1", {
schemaId: AetheriaRtsSchemas.daemonHealth,
description: "latest daemon health"
}),
authorityPolicy: CultMesh.projectionSource("daemon:aetheria.authority.policy.latest.v1", {
authorityPolicy: CultMesh.querySource("daemon:aetheria.authority.policy.latest.v1", {
schemaId: AetheriaRtsSchemas.verseAuthorityPolicy,
description: "latest Verse authority policy"
}),
starbridgeSession: CultMesh.projectionSource("daemon:aetheria.starbridge.session.latest.v1", {
starbridgeSession: CultMesh.querySource("daemon:aetheria.starbridge.session.latest.v1", {
schemaId: AetheriaRtsSchemas.starbridgeSessionSummary,
description: "latest Starbridge session summary"
}),
assetManifest: CultMesh.projectionSource("daemon:aetheria.asset_manifest.latest.v1", {
assetManifest: CultMesh.querySource("daemon:aetheria.asset_manifest.latest.v1", {
schemaId: AetheriaRtsSchemas.assetManifest,
description: "latest daemon asset manifest"
})
@ -606,48 +606,48 @@ export function createAetheriaRuntimeRtsDocuments(
) {
return {
daemonFrame: CultMesh.document(
AetheriaRuntimeRtsProjectionSources.daemonFrame.sourceId,
AetheriaRuntimeRtsDocumentSources.daemonFrame.sourceId,
{ schemaId: AetheriaRtsSchemas.daemonFrame },
async (context) => resolvers.daemonFrame?.(context),
{
routeHint,
sources: [AetheriaRuntimeRtsProjectionSources.daemonFrame],
sources: [AetheriaRuntimeRtsDocumentSources.daemonFrame],
},
),
daemonHealth: CultMesh.document(
AetheriaRuntimeRtsProjectionSources.daemonHealth.sourceId,
AetheriaRuntimeRtsDocumentSources.daemonHealth.sourceId,
{ schemaId: AetheriaRtsSchemas.daemonHealth },
async (context) => resolvers.daemonHealth?.(context),
{
routeHint,
sources: [AetheriaRuntimeRtsProjectionSources.daemonHealth],
sources: [AetheriaRuntimeRtsDocumentSources.daemonHealth],
},
),
authorityPolicy: CultMesh.document(
AetheriaRuntimeRtsProjectionSources.authorityPolicy.sourceId,
AetheriaRuntimeRtsDocumentSources.authorityPolicy.sourceId,
{ schemaId: AetheriaRtsSchemas.verseAuthorityPolicy },
async (context) => resolvers.authorityPolicy?.(context),
{
routeHint,
sources: [AetheriaRuntimeRtsProjectionSources.authorityPolicy],
sources: [AetheriaRuntimeRtsDocumentSources.authorityPolicy],
},
),
starbridgeSession: CultMesh.document(
AetheriaRuntimeRtsProjectionSources.starbridgeSession.sourceId,
AetheriaRuntimeRtsDocumentSources.starbridgeSession.sourceId,
{ schemaId: AetheriaRtsSchemas.starbridgeSessionSummary },
async (context) => resolvers.starbridgeSession?.(context),
{
routeHint,
sources: [AetheriaRuntimeRtsProjectionSources.starbridgeSession],
sources: [AetheriaRuntimeRtsDocumentSources.starbridgeSession],
},
),
assetManifest: CultMesh.document(
AetheriaRuntimeRtsProjectionSources.assetManifest.sourceId,
AetheriaRuntimeRtsDocumentSources.assetManifest.sourceId,
{ schemaId: AetheriaRtsSchemas.assetManifest },
async (context) => resolvers.assetManifest?.(context),
{
routeHint,
sources: [AetheriaRuntimeRtsProjectionSources.assetManifest],
sources: [AetheriaRuntimeRtsDocumentSources.assetManifest],
},
),
} as const;
@ -661,60 +661,51 @@ export function createAetheriaRuntimeRtsQueryHandles(
watchers: AetheriaRuntimeRtsQueryWatchers = {},
) {
return {
mapViewport: CultMesh.projectionRecipe<CultMeshViewportRequest, ViewportResponse>(
mapViewport: CultMesh.query<CultMeshViewportRequest, ViewportResponse>(
AetheriaRtsSchemas.rtsViewport,
[AetheriaRuntimeRtsProjectionSources.daemonFrame],
executors.mapViewport,
{ routeHint, watchProjection: watchers.mapViewport },
).asQuerySurface(),
objectsViewport: CultMesh.projectionRecipe<CultMeshViewportRequest, ObjectsViewportResponse>(
{ routeHint, sources: [AetheriaRuntimeRtsDocumentSources.daemonFrame], watchQuery: watchers.mapViewport },
),
objectsViewport: CultMesh.query<CultMeshViewportRequest, ObjectsViewportResponse>(
AetheriaRtsSchemas.objectsViewport,
[AetheriaRuntimeRtsProjectionSources.daemonFrame],
executors.objectsViewport,
{ routeHint, watchProjection: watchers.objectsViewport },
).asQuerySurface(),
gravityViewport: CultMesh.projectionRecipe<CultMeshViewportRequest, GravityViewportResponse>(
{ routeHint, sources: [AetheriaRuntimeRtsDocumentSources.daemonFrame], watchQuery: watchers.objectsViewport },
),
gravityViewport: CultMesh.query<CultMeshViewportRequest, GravityViewportResponse>(
AetheriaRtsSchemas.gravityViewport,
[AetheriaRuntimeRtsProjectionSources.daemonFrame],
executors.gravityViewport,
{ routeHint, watchProjection: watchers.gravityViewport },
).asQuerySurface(),
selectedObject: CultMesh.projectionRecipe<AetheriaRuntimeSelectedObjectRequest, SelectedObjectProjection>(
{ routeHint, sources: [AetheriaRuntimeRtsDocumentSources.daemonFrame], watchQuery: watchers.gravityViewport },
),
selectedObject: CultMesh.query<AetheriaRuntimeSelectedObjectRequest, SelectedObjectDocument>(
AetheriaRtsSchemas.selectedObject,
[AetheriaRuntimeRtsProjectionSources.daemonFrame],
executors.selectedObject,
{ routeHint, watchProjection: watchers.selectedObject },
).asQuerySurface(),
inventory: CultMesh.projectionRecipe<AetheriaRuntimeSelectedObjectRequest, InventoryProjection>(
{ routeHint, sources: [AetheriaRuntimeRtsDocumentSources.daemonFrame], watchQuery: watchers.selectedObject },
),
inventory: CultMesh.query<AetheriaRuntimeSelectedObjectRequest, InventoryDocument>(
AetheriaRtsSchemas.inventory,
[AetheriaRuntimeRtsProjectionSources.daemonFrame],
executors.inventory,
{ routeHint, watchProjection: watchers.inventory },
).asQuerySurface(),
daemonHealth: CultMesh.projectionRecipe<void, DaemonHealthProjection>(
{ routeHint, sources: [AetheriaRuntimeRtsDocumentSources.daemonFrame], watchQuery: watchers.inventory },
),
daemonHealth: CultMesh.query<void, DaemonHealthDocument>(
AetheriaRtsSchemas.daemonHealth,
[AetheriaRuntimeRtsProjectionSources.daemonHealth],
executors.daemonHealth,
{ routeHint, watchProjection: watchers.daemonHealth },
).asQuerySurface(),
authorityStatus: CultMesh.projectionRecipe<void, AuthorityStatusProjection>(
{ routeHint, sources: [AetheriaRuntimeRtsDocumentSources.daemonHealth], watchQuery: watchers.daemonHealth },
),
authorityStatus: CultMesh.query<void, AuthorityStatusDocument>(
AetheriaRtsSchemas.verseAuthorityPolicy,
[AetheriaRuntimeRtsProjectionSources.authorityPolicy],
executors.authorityStatus,
{ routeHint, watchProjection: watchers.authorityStatus },
).asQuerySurface(),
starbridgeSession: CultMesh.projectionRecipe<void, StarbridgeSessionProjection>(
{ routeHint, sources: [AetheriaRuntimeRtsDocumentSources.authorityPolicy], watchQuery: watchers.authorityStatus },
),
starbridgeSession: CultMesh.query<void, StarbridgeSessionDocument>(
AetheriaRtsSchemas.starbridgeSessionSummary,
[AetheriaRuntimeRtsProjectionSources.starbridgeSession],
executors.starbridgeSession,
{ routeHint, watchProjection: watchers.starbridgeSession },
).asQuerySurface(),
assetManifest: CultMesh.projectionRecipe<void, AssetManifestProjection>(
{ routeHint, sources: [AetheriaRuntimeRtsDocumentSources.starbridgeSession], watchQuery: watchers.starbridgeSession },
),
assetManifest: CultMesh.query<void, AssetManifestDocument>(
AetheriaRtsSchemas.assetManifest,
[AetheriaRuntimeRtsProjectionSources.assetManifest],
executors.assetManifest,
{ routeHint, watchProjection: watchers.assetManifest },
).asQuerySurface(),
{ routeHint, sources: [AetheriaRuntimeRtsDocumentSources.assetManifest], watchQuery: watchers.assetManifest },
),
} as const;
}
@ -769,15 +760,15 @@ export function describeAetheriaRuntimeRtsSurfaceCatalog(
function describeAetheriaRuntimeRtsQuerySurface(surface: {
queryId: string;
routeHint: CultMeshRouteHint;
sources: readonly CultMeshProjectionSource[];
}): AetheriaRuntimeRtsProjectionDiagnostic {
sources: readonly CultMeshQuerySource[];
}): AetheriaRuntimeRtsQueryDiagnostic {
return CultMesh.describeQuerySurface(surface);
}
export function describeAetheriaRuntimeRtsLiveFeedSurface(surface: {
feedId: string;
routeHint: CultMeshRouteHint;
sources: readonly CultMeshProjectionSource[];
sources: readonly CultMeshQuerySource[];
}): AetheriaRuntimeRtsLiveFeedDiagnostic {
return CultMesh.describeLiveFeed(surface);
}
@ -824,9 +815,9 @@ export function createAetheriaRuntimeRtsOperationHandles(
} as const;
}
export type AetheriaRuntimeRtsVerseFacade = ReturnType<typeof createAetheriaRuntimeRtsVerseFacade>;
export type AetheriaRuntimeRtsVerseHandles = ReturnType<typeof createAetheriaRuntimeRtsVerseHandles>;
export function createAetheriaRuntimeRtsVerseFacade(
export function createAetheriaRuntimeRtsVerseHandles(
queryVerse: CultMeshVerseContext,
commandVerse: CultMeshVerseContext,
queries: ReturnType<typeof createAetheriaRuntimeRtsQueryHandles>,
@ -1027,28 +1018,28 @@ export type AetheriaRuntimeViewportFeedRequest = {
export type AetheriaRuntimeViewportFeedSnapshot = {
viewport: ViewportResponse;
selectedObject: SelectedObjectProjection | null;
inventory: InventoryProjection | null;
daemonHealth: DaemonHealthProjection;
authorityStatus: AuthorityStatusProjection;
starbridgeSession: StarbridgeSessionProjection;
assetManifest: AssetManifestProjection;
selectedObject: SelectedObjectDocument | null;
inventory: InventoryDocument | null;
daemonHealth: DaemonHealthDocument;
authorityStatus: AuthorityStatusDocument;
starbridgeSession: StarbridgeSessionDocument;
assetManifest: AssetManifestDocument;
receivedAtUtc: string;
sampleMs: number;
};
${renderProjectionTypes("Viewport")}
${renderRtsDocumentTypes("Viewport")}
export type AetheriaRtsApi = {
mapViewport(request: Viewport): Promise<ViewportResponse>;
objectsViewport(request: Viewport): Promise<ObjectsViewportResponse>;
gravityViewport(request: Viewport): Promise<GravityViewportResponse>;
selectedObject(request: AetheriaRuntimeSelectedObjectRequest): Promise<SelectedObjectProjection>;
inventory(request: AetheriaRuntimeSelectedObjectRequest): Promise<InventoryProjection>;
daemonHealth(): Promise<DaemonHealthProjection>;
authorityStatus(): Promise<AuthorityStatusProjection>;
starbridgeSession(): Promise<StarbridgeSessionProjection>;
assetManifest(): Promise<AssetManifestProjection>;
selectedObject(request: AetheriaRuntimeSelectedObjectRequest): Promise<SelectedObjectDocument>;
inventory(request: AetheriaRuntimeSelectedObjectRequest): Promise<InventoryDocument>;
daemonHealth(): Promise<DaemonHealthDocument>;
authorityStatus(): Promise<AuthorityStatusDocument>;
starbridgeSession(): Promise<StarbridgeSessionDocument>;
assetManifest(): Promise<AssetManifestDocument>;
watchViewportFeed(request: AetheriaRuntimeViewportFeedRequest, callback: (snapshot: AetheriaRuntimeViewportFeedSnapshot) => void): () => void;
setMoveVector(request: AetheriaRuntimeSetMoveVectorRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
setTarget(request: AetheriaRuntimeSetTargetRequest): Promise<AetheriaRuntimeDaemonCommandReceipt>;
@ -1059,7 +1050,7 @@ export type AetheriaRtsApi = {
`;
}
function renderProjectionTypes(viewportTypeName) {
function renderRtsDocumentTypes(viewportTypeName) {
return `export type ViewportResponse = {
schema: string;
frameId: number;
@ -1141,7 +1132,7 @@ export type InventoryItem = {
iconAsset: AssetRef;
};
export type SelectedObjectProjection = {
export type SelectedObjectDocument = {
schema: string;
frameId: number;
runId: string;
@ -1150,7 +1141,7 @@ export type SelectedObjectProjection = {
selected: ViewObject | null;
};
export type InventoryProjection = {
export type InventoryDocument = {
schema: string;
frameId: number;
runId: string;
@ -1162,7 +1153,7 @@ export type InventoryProjection = {
cargo: InventoryItem[];
};
export type DaemonHealthProjection = {
export type DaemonHealthDocument = {
schema: string;
daemonId: string;
verseId: string;
@ -1178,7 +1169,7 @@ export type DaemonHealthProjection = {
commandBoundaryPath: string;
};
export type AuthorityStatusProjection = {
export type AuthorityStatusDocument = {
schema: string;
verseId: string;
policyId: string;
@ -1186,10 +1177,10 @@ export type AuthorityStatusProjection = {
hostRuntimeId: string;
defaultMode: string;
updatedAtUtc: string;
rules: AuthorityRuleProjection[];
rules: AuthorityRuleDocument[];
};
export type AuthorityRuleProjection = {
export type AuthorityRuleDocument = {
ruleId: string;
subjectPrefix: string;
claimKinds: string[];
@ -1199,7 +1190,7 @@ export type AuthorityRuleProjection = {
priority: number;
};
export type StarbridgeSessionProjection = {
export type StarbridgeSessionDocument = {
schema: string;
frameId: number;
publishedAtUtc: string;
@ -1211,13 +1202,13 @@ export type StarbridgeSessionProjection = {
zoneName: string;
phase: string;
currentWaveIndex: number;
baseStatus: StarbridgeBaseStatusProjection;
stationStock: StarbridgeStationStockItemProjection[];
waveForecast: StarbridgeWaveForecastProjection[];
runtimeRoles: StarbridgeRuntimeRoleProjection[];
baseStatus: StarbridgeBaseStatusDocument;
stationStock: StarbridgeStationStockItemDocument[];
waveForecast: StarbridgeWaveForecastDocument[];
runtimeRoles: StarbridgeRuntimeRoleDocument[];
};
export type StarbridgeBaseStatusProjection = {
export type StarbridgeBaseStatusDocument = {
entityKey: string;
displayName: string;
hull: number;
@ -1226,7 +1217,7 @@ export type StarbridgeBaseStatusProjection = {
isActive: boolean;
};
export type StarbridgeStationStockItemProjection = {
export type StarbridgeStationStockItemDocument = {
itemKey: string;
quantity: number;
quality: number;
@ -1235,7 +1226,7 @@ export type StarbridgeStationStockItemProjection = {
iconAsset: AssetRef;
};
export type AssetManifestProjection = {
export type AssetManifestDocument = {
schema: string;
publishedAtUtc: string;
runId: string;
@ -1261,7 +1252,7 @@ export type AssetRef = {
metadata: Record<string, string>;
};
export type StarbridgeWaveForecastProjection = {
export type StarbridgeWaveForecastDocument = {
waveIndex: number;
displayName: string;
attackerKeys: string[];
@ -1269,7 +1260,7 @@ export type StarbridgeWaveForecastProjection = {
recoveredTechnologyKeys: string[];
};
export type StarbridgeRuntimeRoleProjection = {
export type StarbridgeRuntimeRoleDocument = {
runtimeId: string;
role: string;
entityKey: string;

View file

@ -146,8 +146,8 @@ $requiredGeneratedBindingSymbols = @(
'aetheriaRuntimeDaemonCommandDocumentSlots',
'encodeSetMoveVectorCommand',
'encodeSetTargetCommand',
'AetheriaRuntimeRtsProjectionSources',
'AetheriaRuntimeRtsProjectionDiagnostic',
'AetheriaRuntimeRtsDocumentSources',
'AetheriaRuntimeRtsQueryDiagnostic',
'AetheriaRuntimeRtsLiveFeedDiagnostic',
'AetheriaRuntimeRtsSurfaceCatalogDiagnostic',
'AetheriaRuntimeRtsDocuments',
@ -161,9 +161,9 @@ $requiredGeneratedBindingSymbols = @(
'surfaceCatalogIndexDiagnostics(): CultMeshSurfaceCatalogIndexDiagnostic',
'ipcMain.handle(AetheriaRtsIpcChannels.surfaceCatalog',
'ipcMain.handle(AetheriaRtsIpcChannels.surfaceCatalogIndex',
'CultMesh.projectionSource',
'CultMesh.projectionRecipe',
'CultMeshProjectionSource',
'CultMesh.querySource',
'CultMesh.query',
'CultMeshQuerySource',
'routeHint: CultMeshRouteHint',
'CultMeshQueryWatcher',
'AetheriaRuntimeRtsQueryWatchers',
@ -171,9 +171,8 @@ $requiredGeneratedBindingSymbols = @(
'CultMesh.document',
'CultMesh.bindDocument',
'CultMesh.describeSurface(documents.daemonFrame)',
'routeHint, watchProjection',
'watchProjection: watchers.objectsViewport',
'.asQuerySurface()',
'watchQuery: watchers.objectsViewport',
'sources: [AetheriaRuntimeRtsDocumentSources.daemonFrame]',
'describeAetheriaRuntimeRtsQueryHandles',
'describeAetheriaRuntimeRtsLiveFeedSurface',
'describeAetheriaRuntimeRtsSurfaceCatalog',
@ -186,19 +185,19 @@ $requiredGeneratedBindingSymbols = @(
'CultMesh.operation',
'CultMesh.operationReceipt',
'AetheriaRuntimeRtsOperationHandles',
'AetheriaRuntimeRtsVerseFacade',
'createAetheriaRuntimeRtsVerseFacade',
'AetheriaRuntimeRtsVerseHandles',
'createAetheriaRuntimeRtsVerseHandles',
'CultMesh.bindQuery',
'CultMesh.bindOperation',
'zone: (_zoneId =',
'visibleWithin',
'entity: (entityKey: string)',
'pilot',
'selectedObject: CultMesh.projectionRecipe',
'inventory: CultMesh.projectionRecipe',
'daemonHealth: CultMesh.projectionRecipe',
'authorityStatus: CultMesh.projectionRecipe',
'starbridgeSession: CultMesh.projectionRecipe'
'selectedObject: CultMesh.query',
'inventory: CultMesh.query',
'daemonHealth: CultMesh.query',
'authorityStatus: CultMesh.query',
'starbridgeSession: CultMesh.query'
)
foreach ($symbol in $requiredGeneratedBindingSymbols) {
@ -208,17 +207,17 @@ foreach ($symbol in $requiredGeneratedBindingSymbols) {
}
}
$forbiddenGeneratedQuerySurfaceHits = & rg -n 'CultMesh\.query\s*[<(]' Electron/aetheria-rts-generated-bindings.ts 2>$null
$forbiddenGeneratedQuerySurfaceHits = & rg -n 'CultMesh\.(projectionRecipe|projectionSource)\s*[<(]' Electron/aetheria-rts-generated-bindings.ts 2>$null
if ($LASTEXITCODE -eq 0) {
Write-Error "Stage 7B verifier failed: generated RTS read surfaces should use CultMesh projection recipes, not raw query wrappers.`n$forbiddenGeneratedQuerySurfaceHits"
Write-Error "Stage 7B verifier failed: generated RTS read surfaces should use CultMesh query/document handles, not projection recipes or projection sources.`n$forbiddenGeneratedQuerySurfaceHits"
}
if ($LASTEXITCODE -gt 1) {
Write-Error "Stage 7B verifier could not run rg for generated projection recipe checks."
Write-Error "Stage 7B verifier could not run rg for generated projection vocabulary checks."
}
$forbiddenGeneratedContextPlumbingHits = & rg -n 'CultMesh\.(queryContextFromVerse|operationContextFromVerse)|\.execute\([^,\n]+,\s*queryContext\(|\.invoke\([^,\n]+,\s*operationContext\(' Electron/aetheria-rts-generated-bindings.ts 2>$null
if ($LASTEXITCODE -eq 0) {
Write-Error "Stage 7B verifier failed: generated RTS facade should bind surfaces to Verse contexts instead of threading context plumbing.`n$forbiddenGeneratedContextPlumbingHits"
Write-Error "Stage 7B verifier failed: generated RTS handles should bind surfaces to Verse contexts instead of threading context plumbing.`n$forbiddenGeneratedContextPlumbingHits"
}
if ($LASTEXITCODE -gt 1) {
Write-Error "Stage 7B verifier could not run rg for generated Verse binding checks."
@ -247,7 +246,7 @@ if (-not $clientText.Contains('this.verse = CultMesh.verse("aetheria.local", thi
if (-not $clientText.Contains('? this.verse.withRoute("network", this.publicationDescription)') -or
-not $clientText.Contains(': this.verse.withRoute("shared-memory", this.publicationDescription)')) {
Write-Error "Stage 7B verifier failed: RTS client is not deriving publication-mode Verse views for projection reads."
Write-Error "Stage 7B verifier failed: RTS client is not deriving publication-mode Verse views for query reads."
}
if (-not $clientText.Contains('this.commandVerse = this.verse') -or
@ -257,14 +256,14 @@ if (-not $clientText.Contains('this.commandVerse = this.verse') -or
}
if (-not $clientText.Contains('this.publicationDescription = publicationMode === "remote" ? this.endpoint : statePath')) {
Write-Error "Stage 7B verifier failed: RTS client projection route metadata does not include the local publication source description."
Write-Error "Stage 7B verifier failed: RTS client query route metadata does not include the local publication source description."
}
if (-not $clientText.Contains('return this.queryVerse.queryContext();')) {
Write-Error "Stage 7B verifier failed: RTS query call sites should derive query contexts from the shared Verse primitive."
}
if (-not $clientText.Contains('this.aetheria = createAetheriaRuntimeRtsVerseFacade(')) {
if (-not $clientText.Contains('this.aetheria = createAetheriaRuntimeRtsVerseHandles(')) {
Write-Error "Stage 7B verifier failed: RTS client should bind generated Aetheria domain sugar to its Verse contexts."
}
@ -282,12 +281,12 @@ if ($LASTEXITCODE -gt 1) {
Write-Error "Stage 7B verifier could not run rg for raw context checks."
}
if (-not $clientText.Contains('projectionDiagnostics()')) {
Write-Error "Stage 7B verifier failed: RTS client does not expose generated projection diagnostics."
if (-not $clientText.Contains('queryDiagnostics()')) {
Write-Error "Stage 7B verifier failed: RTS client does not expose generated query diagnostics."
}
if (-not $clientText.Contains('describeAetheriaRuntimeRtsQueryHandles(this.queries)')) {
Write-Error "Stage 7B verifier failed: RTS projection diagnostics should be read from generated query handle metadata."
Write-Error "Stage 7B verifier failed: RTS query diagnostics should be read from generated query handle metadata."
}
if (-not $clientText.Contains('liveFeedDiagnostics()')) {
@ -374,20 +373,20 @@ if ($LASTEXITCODE -ne 0) {
Write-Error "Stage 7B verifier failed: Electron main is not using generated RTS IPC handler registration."
}
$forbiddenClientDirectProjectionReturns = @(
$forbiddenClientDirectDocumentReturns = @(
'return projectSelectedObjectFromFrame',
'return projectInventoryFromFrame',
'return projectDaemonHealth',
'return projectAuthorityStatus',
'return projectStarbridgeSessionSummary'
)
$forbiddenClientDirectProjectionPattern = ($forbiddenClientDirectProjectionReturns -join '|')
$forbiddenClientDirectProjectionHits = & rg -n $forbiddenClientDirectProjectionPattern Electron/aetheria-cultmesh.ts 2>$null
$forbiddenClientDirectDocumentPattern = ($forbiddenClientDirectDocumentReturns -join '|')
$forbiddenClientDirectDocumentHits = & rg -n $forbiddenClientDirectDocumentPattern Electron/aetheria-cultmesh.ts 2>$null
if ($LASTEXITCODE -eq 0) {
Write-Error "Stage 7B verifier failed: RTS client read methods bypass generated query handles.`n$forbiddenClientDirectProjectionHits"
Write-Error "Stage 7B verifier failed: RTS client read methods bypass generated query handles.`n$forbiddenClientDirectDocumentHits"
}
if ($LASTEXITCODE -gt 1) {
Write-Error "Stage 7B verifier could not run rg for direct projection return checks."
Write-Error "Stage 7B verifier could not run rg for direct document return checks."
}
$requiredRendererContractSymbols = @(
@ -462,30 +461,30 @@ if ($LASTEXITCODE -gt 1) {
Write-Error "Stage 7B verifier could not run rg for stale binding checks."
}
& rg -q 'projectViewportFromFrame' Electron/aetheria-rts-local-projection.ts
& rg -q 'buildViewportDocumentFromFrame' Electron/aetheria-rts-local-documents.ts
if ($LASTEXITCODE -ne 0) {
Write-Error "Stage 7B verifier failed: local RTS frame projection entry point was not found."
Write-Error "Stage 7B verifier failed: local RTS frame document entry point was not found."
}
$requiredProjectionSymbols = @(
'projectObjectsViewportFromFrame',
'projectGravityViewportFromFrame',
$requiredLocalDocumentSymbols = @(
'buildObjectsViewportDocumentFromFrame',
'buildGravityViewportDocumentFromFrame',
'AetheriaRtsSchemas.objectsViewport',
'AetheriaRtsSchemas.gravityViewport',
'projectSelectedObjectFromFrame',
'projectInventoryFromFrame',
'buildSelectedObjectDocumentFromFrame',
'buildInventoryDocumentFromFrame',
'AetheriaRtsSchemas.selectedObject',
'AetheriaRtsSchemas.inventory',
'projectDaemonHealth',
'projectAuthorityStatus',
'projectStarbridgeSessionSummary',
'readDaemonHealthDocument',
'readAuthorityStatusDocument',
'readStarbridgeSessionSummaryDocument',
'AetheriaRtsSchemas.starbridgeSessionSummary'
)
foreach ($symbol in $requiredProjectionSymbols) {
& rg -q $symbol Electron/aetheria-rts-local-projection.ts
foreach ($symbol in $requiredLocalDocumentSymbols) {
& rg -q $symbol Electron/aetheria-rts-local-documents.ts
if ($LASTEXITCODE -ne 0) {
Write-Error "Stage 7B verifier failed: expected local RTS projection symbol '$symbol' was not found."
Write-Error "Stage 7B verifier failed: expected local RTS document symbol '$symbol' was not found."
}
}
@ -507,9 +506,17 @@ if ($LASTEXITCODE -ne 0) {
Write-Error "Stage 7B verifier failed: Starbridge summary publication binding was not found."
}
& rg -q '.daemon.starbridge.session.cc' Electron/aetheria-cultmesh.ts
$forbiddenLocalPublicationSidecars = & rg -n '\.(daemon\.frame|daemon\.health|authority\.policy|daemon\.starbridge\.session|daemon\.assets)\.cc' Electron/aetheria-cultmesh.ts 2>$null
if ($LASTEXITCODE -eq 0) {
Write-Error "Stage 7B verifier failed: RTS client should read local publications from the canonical daemon store, not obsolete sidecar files.`n$forbiddenLocalPublicationSidecars"
}
if ($LASTEXITCODE -gt 1) {
Write-Error "Stage 7B verifier could not run rg for obsolete local publication sidecar checks."
}
& rg -q 'localPath: statePath' Electron/aetheria-cultmesh.ts
if ($LASTEXITCODE -ne 0) {
Write-Error "Stage 7B verifier failed: RTS client is not reading the daemon Starbridge sidecar publication."
Write-Error "Stage 7B verifier failed: RTS client local publication bindings do not point at the canonical daemon store."
}
$requiredGeneratedBindingSymbols = @(

View file

@ -15,10 +15,17 @@ $statePath = Join-Path $tempRoot "aetheria-rts.cc"
$endpoint = $null
try {
$daemonOutput = dotnet run --project (Join-Path $repoRoot "Aetheria.State.Daemon\Aetheria.State.Daemon.csproj") -- `
--state $statePath `
--once `
--rts-cultmesh-port 0 2>&1
$previousErrorActionPreference = $ErrorActionPreference
$ErrorActionPreference = "Continue"
try {
$daemonOutput = dotnet run --project (Join-Path $repoRoot "Aetheria.State.Daemon\Aetheria.State.Daemon.csproj") -- `
--state $statePath `
--once `
--rts-cultmesh-port 0 2>&1
}
finally {
$ErrorActionPreference = $previousErrorActionPreference
}
$daemonOutput | Out-Host
if ($LASTEXITCODE -ne 0) {
Write-Error "Stage 7C verifier failed: one-shot daemon did not complete."
@ -52,9 +59,9 @@ const viewport = await client.mapViewport({ minX: -5000, minY: -5000, maxX: 5000
const objectsViewport = await client.objectsViewport({ minX: -5000, minY: -5000, maxX: 5000, maxY: 5000 });
const gravityViewport = await client.gravityViewport({ minX: -5000, minY: -5000, maxX: 5000, maxY: 5000 });
if (!Number.isFinite(viewport.frameId))
throw new Error("Viewport projection did not produce a frame id.");
throw new Error("Viewport query did not produce a frame id.");
if (!Array.isArray(viewport.objects) || viewport.objects.length === 0)
throw new Error("Viewport projection did not expose visible objects.");
throw new Error("Viewport query did not expose visible objects.");
if (objectsViewport.schema !== "gamecult.aetheria.objects_viewport.v1")
throw new Error(`Objects viewport used unexpected schema: ${objectsViewport.schema}`);
if (gravityViewport.schema !== "gamecult.aetheria.gravity_viewport.v1")
@ -66,19 +73,19 @@ if (!Array.isArray(gravityViewport.gravityInfluences) || gravityViewport.gravity
const selectedIndex = viewport.controlledEntityIndices[0] ?? viewport.objects[0]?.entityIndex;
if (!Number.isFinite(selectedIndex))
throw new Error("No entity was available for selected-object projection.");
throw new Error("No entity was available for the selected-object query.");
const selected = await client.selectedObject({ entityIndex: selectedIndex });
if (!selected.selected)
throw new Error(`Selected-object projection did not resolve entity ${selectedIndex}.`);
throw new Error(`Selected-object query did not resolve entity ${selectedIndex}.`);
const inventory = await client.inventory({ entityIndex: selectedIndex });
if (!Array.isArray(inventory.equipment) || !Array.isArray(inventory.cargo))
throw new Error("Inventory projection did not return equipment and cargo arrays.");
throw new Error("Inventory query did not return equipment and cargo arrays.");
const health = await client.daemonHealth();
if (health.status !== "healthy")
throw new Error(`Daemon health projection was not healthy: ${health.status}`);
throw new Error(`Daemon health document was not healthy: ${health.status}`);
const authority = await client.authorityStatus();
if (authority.policyId !== "aetheria.trusted-coop.v1")
@ -146,7 +153,7 @@ console.log(JSON.stringify({
$env:AETHERIA_STAGE7C_CLIENT_MODULE = Join-Path $root "electron-dist\aetheria-cultmesh.js"
node $smokeScript
if ($LASTEXITCODE -ne 0) {
Write-Error "Stage 7C verifier failed: local Electron runtime facade could not read daemon publications."
Write-Error "Stage 7C verifier failed: local Electron runtime handles could not read daemon publications."
}
}
finally {