diff --git a/Aetheria.State.Daemon/Program.cs b/Aetheria.State.Daemon/Program.cs index 3aa7604cf..e45d583c6 100644 --- a/Aetheria.State.Daemon/Program.cs +++ b/Aetheria.State.Daemon/Program.cs @@ -751,10 +751,10 @@ static async Task PublishDaemonApiDocumentsAsync( AetheriaRuntimeDaemonTickResult result) { await node.PutDaemonFrameAsync(result.Frame).ConfigureAwait(false); - if (AetheriaRuntimeDaemonSoaViewStore.TryReadView(node.StatePath, out var soaView) && - string.Equals(soaView.Schema, AetheriaRuntimeDaemonSchemas.SoaView, StringComparison.Ordinal)) + if (result.SoaView != null && + string.Equals(result.SoaView.Schema, AetheriaRuntimeDaemonSchemas.SoaView, StringComparison.Ordinal)) { - await node.PutDaemonSoaViewAsync(soaView).ConfigureAwait(false); + await node.PutDaemonSoaViewAsync(result.SoaView).ConfigureAwait(false); } if (result.ProviderAdvertisement != null) diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index d732c98c7..56cf88e2c 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -8882,6 +8882,7 @@ static void RequireDaemonVersePublication(string root) "AetheriaRuntimeDaemonEditorSurfaceBuilder.Build", "AetheriaRuntimeDaemonPublicationStore.PublishEditorSurface", "AetheriaRuntimeDaemonPublicationStore.PublishEditorTuiSurface", + "SoaView = soaView", "ProviderAdvertisement = providerAdvertisement", "Health = health", "CommandBoundary = commandBoundary", @@ -8920,6 +8921,7 @@ static void RequireDaemonVersePublication(string root) "discoveryHost.Update(", "PublishDaemonApiDocumentsAsync(node, result)", "PutDaemonFrameAsync(result.Frame)", + "PutDaemonSoaViewAsync(result.SoaView)", "PutDaemonProviderAdvertisementAsync(result.ProviderAdvertisement)", "PutDaemonHealthAsync(result.Health)", "PutDaemonCommandBoundaryAsync(result.CommandBoundary)", @@ -8964,10 +8966,11 @@ static void RequireDaemonVersePublication(string root) var apiPublicationBlock = apiPublicationStart >= 0 && apiPublicationEnd > apiPublicationStart ? daemonHostSource.Substring(apiPublicationStart, apiPublicationEnd - apiPublicationStart) : ""; - if (apiPublicationBlock.Contains("AetheriaRuntimeDaemonPublicationStore.TryRead", StringComparison.Ordinal)) + if (apiPublicationBlock.Contains("AetheriaRuntimeDaemonPublicationStore.TryRead", StringComparison.Ordinal) || + apiPublicationBlock.Contains("AetheriaRuntimeDaemonSoaViewStore.TryRead", StringComparison.Ordinal)) { throw new InvalidOperationException( - "Daemon API document publication must use typed tick result documents instead of reopening publication-store witness files."); + "Daemon API document publication must use typed tick result documents instead of reopening witness files."); } if (daemonTickRunner.Contains("AetheriaRuntimeDaemonPublicationStore.TryReadHealth(stateFilePath", StringComparison.Ordinal)) diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonTickRunner.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonTickRunner.cs index aae1eb11e..997f5c78f 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonTickRunner.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonTickRunner.cs @@ -47,6 +47,7 @@ namespace GameCult.Aetheria.State.Verse string gameTuiSurfacePath, string editorSurfacePath, string editorTuiSurfacePath, + AetheriaRuntimeDaemonSoaViewDocument? soaView = null, AetheriaRuntimeDaemonProviderAdvertisementDocument? providerAdvertisement = null, AetheriaRuntimeDaemonHealthDocument? health = null, AetheriaRuntimeDaemonCommandBoundaryDocument? commandBoundary = null, @@ -70,6 +71,7 @@ namespace GameCult.Aetheria.State.Verse GameTuiSurfacePath = gameTuiSurfacePath ?? ""; EditorSurfacePath = editorSurfacePath ?? ""; EditorTuiSurfacePath = editorTuiSurfacePath ?? ""; + SoaView = soaView; ProviderAdvertisement = providerAdvertisement; Health = health; CommandBoundary = commandBoundary; @@ -91,6 +93,7 @@ namespace GameCult.Aetheria.State.Verse public string GameTuiSurfacePath { get; } public string EditorSurfacePath { get; } public string EditorTuiSurfacePath { get; } + public AetheriaRuntimeDaemonSoaViewDocument? SoaView { get; } public AetheriaRuntimeDaemonProviderAdvertisementDocument? ProviderAdvertisement { get; } public AetheriaRuntimeDaemonHealthDocument? Health { get; } public AetheriaRuntimeDaemonCommandBoundaryDocument? CommandBoundary { get; } @@ -207,7 +210,7 @@ namespace GameCult.Aetheria.State.Verse } var framePath = AetheriaRuntimeDaemonFrameStore.PublishFrame(stateFilePath, frame); - AetheriaRuntimeDaemonSoaFramePublisher.PublishCurrentZoneEntities(stateFilePath, frame); + var soaView = AetheriaRuntimeDaemonSoaFramePublisher.PublishCurrentZoneEntities(stateFilePath, frame); var commandBoundary = AetheriaRuntimeDaemonCommandBoundaryDocument.Create(options.DaemonId); var commandBoundaryPath = AetheriaRuntimeDaemonPublicationStore.PublishCommandBoundary( stateFilePath, @@ -291,6 +294,7 @@ namespace GameCult.Aetheria.State.Verse gameTuiSurfacePath, editorSurfacePath, editorTuiSurfacePath, + soaView, providerAdvertisement, health, commandBoundary,