Align Aetheria live provider contracts

This commit is contained in:
Meta Vens 2026-07-14 00:50:13 +01:00
commit a45c3f9801
11 changed files with 44 additions and 22 deletions

View file

@ -20,6 +20,11 @@ internal static class AetheriaDaemonZoneGenerator
.Where(value => !string.IsNullOrWhiteSpace(value))
.OrderBy(value => value, StringComparer.Ordinal)
.ToArray();
if (corporationKeys.Length == 0)
{
throw new InvalidDataException(
"Terminus generation requires at least one typed corporation with a stable corporation key.");
}
var homeZones = corporationKeys.ToDictionary(value => value, _ => 0, StringComparer.Ordinal);
var availabilityFactions = new Dictionary<string, string>(StringComparer.Ordinal)
{

View file

@ -449,13 +449,15 @@ static async Task PublishCommittedFactAsync(
applied ? "reconciled" : "denied",
"Aetheria",
fact.SourceDaemonId,
"aetheria.daemon",
"aetheria",
AetheriaRuntimeDaemonGameSurfaceBuilder.SurfaceId,
applied ? "Command applied by authoritative daemon." : "Command rejected by authoritative daemon.",
fact.CommittedAtUtc,
Math.Max(fact.SourceFrameId, 0));
await node.Database.PutAsync(AetheriaRuntimeVerseRecordKeys.EveReceiptForCommand(receipt.CommandId), receipt)
.ConfigureAwait(false);
if (string.Equals(Environment.GetEnvironmentVariable("AETHERIA_TRACE_EVE_SNAPSHOTS"), "1", StringComparison.Ordinal))
Console.WriteLine($"Eve command receipt command={receipt.CommandId} state={receipt.State} provider={receipt.ProviderId}");
}
static RudpCultNetSchemaServer StartClientCultMeshHost(
@ -1644,7 +1646,8 @@ static EveProviderAdvertisementDocument BuildCoreProviderAdvertisement(
"interactive-world",
interaction)
},
Array.Empty<EveAdvertisedCommand>());
Array.Empty<EveAdvertisedCommand>(),
new[] { AetheriaRuntimeDaemonSoaFramePublisher.ProducerId });
}
static async Task PublishDaemonMenuSurfacesAsync(

View file

@ -298,6 +298,16 @@ foreach (var nameFile in parsedNameFiles)
await node.FlushAsync();
var runtimeCatalog = await node.RuntimeCatalog().LatestAsync().ConfigureAwait(false);
var importedCorporationKeys = runtimeCatalog.Corporations
.Select(corporation => corporation.CorporationKey)
.Where(key => !string.IsNullOrWhiteSpace(key))
.Distinct(StringComparer.Ordinal)
.ToArray();
if (importedCorporationKeys.Length != corporations.Length)
{
throw new InvalidDataException(
$"Runtime catalog projected {importedCorporationKeys.Length} corporation keys from {corporations.Length} typed corporation documents.");
}
var runtimeMines = runtimeCatalog.Items
.Where(item => string.Equals(item.WeaponType, "Mine", StringComparison.Ordinal))
.ToArray();
@ -327,6 +337,7 @@ Console.WriteLine($"Catalog: {catalog.RelativePath} {catalog.Bytes} bytes {catal
Console.WriteLine($"Name files: {nameFiles.Length}");
Console.WriteLine($"Mapped items: {itemDefinitions.Length}");
Console.WriteLine($"Mapped factions: {corporations.Length}");
Console.WriteLine($"Runtime corporation keys: {string.Join(", ", importedCorporationKeys)}");
Console.WriteLine($"Mapped name files: {parsedNameFiles.Length}");
Console.WriteLine($"Mapped mine weapons: {string.Join(", ", runtimeMines.Select(item => item.Name + " (" + item.ItemKey + ")"))}");

View file

@ -5,6 +5,7 @@ using Aetheria.State.Documents;
using GameCult.Aetheria.State.Verse;
using GameCult.Mesh;
using EveCommandTemplate = GameCult.Eve.Surface.EveCommandTemplate;
using EveCommandReceiptDocument = GameCult.Eve.Surface.EveCommandReceiptDocument;
using EveAdvertisedCommand = GameCult.Eve.Surface.EveAdvertisedCommand;
using EveAdvertisedSurface = GameCult.Eve.Surface.EveAdvertisedSurface;
using EveProviderAdvertisementDocument = GameCult.Eve.Surface.EveProviderAdvertisementDocument;
@ -295,7 +296,8 @@ public static class AetheriaEveSurfaceDocuments
schemas,
witnesses,
AetheriaRuntimeEveSurfaceCatalog.All.Select(ToProviderSurface).ToArray(),
commands);
commands,
new[] { AetheriaRuntimeDaemonSoaFramePublisher.ProducerId });
}
private static EveProviderWitness Witness(string kind, string reference, string summary) =>
@ -313,9 +315,9 @@ public static class AetheriaEveSurfaceDocuments
surface.WorldInteraction.StateSchemas,
surface.WorldInteraction.CommandBoundary,
AetheriaRuntimeVerseRecordKeys.DaemonCommandBoundary.ToString(),
surface.WorldInteraction.ReceiptSchema,
"",
"",
EveCommandReceiptDocument.SchemaId,
AetheriaRuntimeVerseRecordKeys.EveReceiptRecordPrefix,
AetheriaRuntimeVerseRecordKeys.EveAssetCatalog.ToString(),
surface.WorldInteraction.LoweringTargets,
surface.WorldInteraction.Ownership);
return new EveAdvertisedSurface(

View file

@ -17,5 +17,5 @@ public sealed class AetheriaGameSessionState
[Key(4)] public string EntrySurfaceId { get; set; } = "aetheria.pilot";
[Key(5)] public string LastStartCommandId { get; set; } = "";
[Key(6)] public string UpdatedAtUtc { get; set; } = "";
[Key(7)] public double SimulationRate { get; set; }
[Key(7)] public double SimulationRate { get; set; } = 1;
}

View file

@ -8,7 +8,7 @@
"com.unity.render-pipelines.universal": "17.4.0",
"org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.10",
"org.gamecult.eve.plugin-fields": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.1.1",
"org.gamecult.eve.surface": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.0",
"org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.0"
"org.gamecult.eve.surface": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.1",
"org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.15"
}
}

View file

@ -133,25 +133,25 @@
"hash": "0b099274a4e2b4c301eced4322166837792f585a"
},
"org.gamecult.eve.surface": {
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.0",
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.1",
"depth": 0,
"source": "git",
"dependencies": {
"org.gamecult.cultlib": "1.0.8"
},
"hash": "010ddeff90b70ce5278da373ce2dd0bb2c9eb9ac"
"hash": "d0aa50d31f3b6da96bffc194fdc3aa358f37e332"
},
"org.gamecult.eve.unity-scene": {
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.0",
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.15",
"depth": 0,
"source": "git",
"dependencies": {
"org.gamecult.cultlib": "1.0.10",
"org.gamecult.eve.plugin-fields": "0.1.1",
"org.gamecult.eve.surface": "0.2.0",
"org.gamecult.eve.surface": "0.2.1",
"com.unity.mathematics": "1.3.2"
},
"hash": "e45171952030dbb7ea3997f7abdc0af96b483b26"
"hash": "474cadac1c173e24b2c9b9ddde7b781059dbae4c"
},
"com.unity.modules.assetbundle": {
"version": "1.0.0",

View file

@ -99,7 +99,7 @@ namespace GameCult.Aetheria.State.Verse
WeaponStateItems(entity, run, zone)));
return new AetheriaRuntimeSurfaceDocument(
providerId: "aetheria.daemon",
providerId: "aetheria",
providerKind: "game.daemon",
title: "Aetheria Daemon",
version: frame.FrameId,
@ -150,7 +150,7 @@ namespace GameCult.Aetheria.State.Verse
BuildStarbridgeRuntimeRolesCard(starbridge));
return new AetheriaRuntimeSurfaceDocument(
"aetheria.daemon",
"aetheria",
"game.daemon",
"Starbridge Commander",
frame.FrameId,

View file

@ -405,7 +405,7 @@ public sealed class AetheriaRuntimeDaemonOperationsClient
{
envelope = null;
if (request == null ||
!string.Equals(request.ProviderId, "aetheria.daemon", StringComparison.Ordinal) ||
!string.Equals(request.ProviderId, "aetheria", StringComparison.Ordinal) ||
!TryResolveSurfaceCommandKind(request, out var kind))
{
return false;

View file

@ -61,7 +61,8 @@ namespace GameCult.Aetheria.State.Verse
if (cache == null) throw new ArgumentNullException(nameof(cache));
_localPublisher = new CultMeshFrameBodyPublisher(
BodyId, BodySchemaId, LayoutVersion, Capacity, producerEpoch,
checked((int)EntityHotSlabLayout.Create(Capacity).TotalByteLength));
checked((int)EntityHotSlabLayout.Create(Capacity).TotalByteLength),
TimeSpan.FromSeconds(30));
_networkPublisher = new CultMeshNetworkBodyPublisher(
cache,
generation => string.Equals(generation.ProducerId, ProducerId, StringComparison.Ordinal));

View file

@ -17,11 +17,11 @@ $expected = @{
"https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.10",
"085aa2c0756328770623474c4e9fbacd7218b390")
"org.gamecult.eve.surface" = @(
"https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.0",
"010ddeff90b70ce5278da373ce2dd0bb2c9eb9ac")
"https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.1",
"d0aa50d31f3b6da96bffc194fdc3aa358f37e332")
"org.gamecult.eve.unity-scene" = @(
"https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.0",
"e45171952030dbb7ea3997f7abdc0af96b483b26")
"https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.15",
"474cadac1c173e24b2c9b9ddde7b781059dbae4c")
}
foreach ($packageName in $expected.Keys) {