diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index 2b6ef583b..d4219044d 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -11,6 +11,7 @@ RequireGameplaySourcePurity(root); RequirePackageSerializerBoundary(root); RequireSharedEvePackagesImportedFromEveRepo(root); RequireSharedRuntimeSurfaceCommandsUseCultMeshTransport(root); +RequireSharedRuntimeSurfacesUseClientNeutralVocabulary(root); RequireTypedPendingCommitKeys(root); RequireTypedRuntimeFactionKeys(root); RequireTypedGalaxyFactionRelationships(root); @@ -748,6 +749,39 @@ static void RequireSharedRuntimeSurfaceCommandsUseCultMeshTransport(string root) Console.WriteLine("Shared runtime surface commands: command templates advertise CultMesh transport instead of Unity UI Toolkit"); } +static void RequireSharedRuntimeSurfacesUseClientNeutralVocabulary(string root) +{ + var runtimePath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime"); + if (!Directory.Exists(runtimePath)) + { + throw new InvalidOperationException( + "Shared runtime surface vocabulary cannot be verified because the state runtime package is missing."); + } + + var forbiddenSurfaceVocabulary = new[] + { + "Unity supplies", + "Unity projects", + "Unity reads", + "Unity must observe", + "Unity runtime shells" + }; + var hits = Directory.EnumerateFiles(runtimePath, "*.cs", SearchOption.TopDirectoryOnly) + .SelectMany(path => File.ReadLines(path) + .Select((line, index) => new { Path = path, LineNumber = index + 1, Line = line })) + .Where(line => forbiddenSurfaceVocabulary.Any(symbol => line.Line.Contains(symbol, StringComparison.Ordinal))) + .Select(line => $"{Path.GetRelativePath(root, line.Path)}:{line.LineNumber}: {line.Line.Trim()}") + .ToArray(); + if (hits.Length > 0) + { + throw new InvalidOperationException( + "Shared runtime surfaces still describe their contract as Unity-owned instead of client-neutral CultMesh API: " + + string.Join("; ", hits)); + } + + Console.WriteLine("Shared runtime surfaces: surface copy uses client-neutral observer vocabulary"); +} + static void RequirePackageSerializerBoundary(string root) { var packageRuntimeRoot = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime"); @@ -3993,7 +4027,7 @@ static void RequireTradeCargoSelectorUseEveSurface(string root) "public static string ShipBayCommand(", "public static AetheriaRuntimeSurfaceDocument Build(", "providerKind: \"trade.menu\"", - "Unity projects available cargo targets; the shared runtime surface owns the cargo selector contract." + "The observing client projects available cargo targets; the shared runtime surface owns the cargo selector contract." }; var missingBuilderSymbols = requiredBuilderSymbols .Where(symbol => !tradeCargoSelectorSurfaceBuilder.Contains(symbol, StringComparison.Ordinal)) @@ -4211,7 +4245,7 @@ static void RequireTradeItemDetailsUseEveSurface(string root) "AetheriaRuntimeTradeItemMetric", "public static AetheriaRuntimeSurfaceDocument Build(", "providerKind: \"trade.menu\"", - "Unity supplies the selected market row; the shared runtime surface owns trade item inspection layout." + "The observing client supplies the selected market row; the shared runtime surface owns trade item inspection layout." }; var missingBuilderSymbols = requiredBuilderSymbols .Where(symbol => !tradeItemDetailsSurfaceBuilder.Contains(symbol, StringComparison.Ordinal)) @@ -4322,7 +4356,7 @@ static void RequireInventoryDropdownUseEveSurface(string root) "public static string LoadoutCommand(", "public static AetheriaRuntimeSurfaceDocument Build(", "providerKind: \"inventory.panel\"", - "Unity projects available inventory navigation; the shared runtime surface owns the dropdown contract." + "The observing client projects available inventory navigation; the shared runtime surface owns the dropdown contract." }; var missingBuilderSymbols = requiredBuilderSymbols .Where(symbol => !inventoryDropdownSurfaceBuilder.Contains(symbol, StringComparison.Ordinal)) diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeCargoItemDetailsSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeCargoItemDetailsSurfaceBuilder.cs index 13df0fcc3..c8e03b9f9 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeCargoItemDetailsSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeCargoItemDetailsSurfaceBuilder.cs @@ -115,7 +115,7 @@ namespace GameCult.Aetheria.State.Verse : state.Description), Text( $"{SurfaceId}.note", - "Unity supplies the selected item; the shared runtime surface owns cargo-item inspection layout."), + "The observing client supplies the selected item; the shared runtime surface owns cargo-item inspection layout."), Metric($"{SurfaceId}.manufacturer", "Manufacturer", state.Manufacturer), Metric($"{SurfaceId}.mass", "Mass", state.Mass)) }; diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeClientTargetSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeClientTargetSurfaceBuilder.cs index 1c8362432..5dadfd7c3 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeClientTargetSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeClientTargetSurfaceBuilder.cs @@ -127,7 +127,7 @@ namespace GameCult.Aetheria.State.Verse ? state.BootFailureMessage : string.Equals(state.TargetSource, "state-path-override", StringComparison.Ordinal) ? "AETHERIA_STATE_PATH is overriding the persisted client target. Update the environment if you want boot to follow the saved target again." - : "Client target edits persist in aetheria-client.cc. Verse discovery and selection mutate the same typed owner. Verse visibility changes append provider-owned Eve requests for the daemon bridge. Remote Verse targets hydrate a cache-only local replica before Unity reads them."; + : "Client target edits persist in aetheria-client.cc. Verse discovery and selection mutate the same typed owner. Verse visibility changes append provider-owned Eve requests for the daemon bridge. Remote Verse targets hydrate a cache-only local replica before observers read them."; var discoveryChildren = new List { diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonSoaViewIndex.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonSoaViewIndex.cs index 9a0d7d9f7..0bfa3e2d3 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonSoaViewIndex.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonSoaViewIndex.cs @@ -104,7 +104,7 @@ namespace GameCult.Aetheria.State.Verse if (requireObserverReadOnly && buffer.ObserverWritable) { - errors.Add($"SoA buffer '{buffer.BufferId}' is observer-writable; Unity must observe daemon state read-only."); + errors.Add($"SoA buffer '{buffer.BufferId}' is observer-writable; clients must observe daemon state read-only."); } buffersById.Add(buffer.BufferId, buffer); diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeEquippedItemDetailsSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeEquippedItemDetailsSurfaceBuilder.cs index cf6943aea..8ba821026 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeEquippedItemDetailsSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeEquippedItemDetailsSurfaceBuilder.cs @@ -196,7 +196,7 @@ namespace GameCult.Aetheria.State.Verse : state.Description), Text( $"{SurfaceId}.note", - "Unity projects the selected equipment; the shared runtime surface owns equipped-item inspection layout and commands."), + "The observing client projects the selected equipment; the shared runtime surface owns equipped-item inspection layout and commands."), Metric($"{SurfaceId}.manufacturer", "Manufacturer", state.Manufacturer), Metric($"{SurfaceId}.mass", "Mass", state.Mass)), Card( diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeInventoryDropdownSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeInventoryDropdownSurfaceBuilder.cs index 9e349fb6e..75e4a0386 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeInventoryDropdownSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeInventoryDropdownSurfaceBuilder.cs @@ -101,7 +101,7 @@ namespace GameCult.Aetheria.State.Verse string.IsNullOrWhiteSpace(state.CurrentView) ? "None" : state.CurrentView), Text( $"{SurfaceId}.note", - "Unity projects available inventory navigation; the shared runtime surface owns the dropdown contract.")) + "The observing client projects available inventory navigation; the shared runtime surface owns the dropdown contract.")) }; foreach (var group in state.Groups) diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeShipSettingsSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeShipSettingsSurfaceBuilder.cs index 82344892a..fe2e875e4 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeShipSettingsSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeShipSettingsSurfaceBuilder.cs @@ -57,7 +57,7 @@ namespace GameCult.Aetheria.State.Verse state.ShutdownPerformance), Text( $"{SurfaceId}.note", - "Unity projects selected ship state; shutdown changes are sent as daemon operations."), + "The observing client projects selected ship state; shutdown changes are sent as daemon operations."), ButtonRow( $"{SurfaceId}.shutdown.buttons", Button($"{SurfaceId}.shutdown.decrement", "Threshold -", DecrementShutdownThreshold), diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateReader.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateReader.cs index e72e3151f..b07b3b001 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateReader.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateReader.cs @@ -7,7 +7,7 @@ using GameCult.Eve.Surface; namespace GameCult.Aetheria.State.Verse { - // Unity runtime shells acquire typed state through this port so the transport can move to the daemon without spelunking every consumer. + // Runtime shells acquire typed state through this port so the transport can move to the daemon without spelunking every consumer. public static class AetheriaRuntimeStateReader { public static AetheriaRuntimeCatalogSnapshot OpenRuntimeCatalog(string stateFilePath) diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeCargoSelectorSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeCargoSelectorSurfaceBuilder.cs index 2d0dd1caa..f80260412 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeCargoSelectorSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeCargoSelectorSurfaceBuilder.cs @@ -78,7 +78,7 @@ namespace GameCult.Aetheria.State.Verse Metric($"{SurfaceId}.current", "Current", state.CurrentTarget), Text( $"{SurfaceId}.note", - "Unity projects available cargo targets; the shared runtime surface owns the cargo selector contract."), + "The observing client projects available cargo targets; the shared runtime surface owns the cargo selector contract."), ButtonColumn( $"{SurfaceId}.options", targets diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeInteractionSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeInteractionSurfaceBuilder.cs index 282195bad..4381e0029 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeInteractionSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeInteractionSurfaceBuilder.cs @@ -128,7 +128,7 @@ namespace GameCult.Aetheria.State.Verse "Trade Filters", Text( $"{FilterSurfaceId}.note", - "Unity projects available trade filters; the shared runtime surface owns the filter selector contract."), + "The observing client projects available trade filters; the shared runtime surface owns the filter selector contract."), Text($"{FilterSurfaceId}.active", state.FilterSummary)) }; @@ -200,7 +200,7 @@ namespace GameCult.Aetheria.State.Verse Text($"{RowActionSurfaceId}.title", state.Title), Text( $"{RowActionSurfaceId}.note", - "Unity projects available row actions; the shared runtime surface owns the row action contract."), + "The observing client projects available row actions; the shared runtime surface owns the row action contract."), ButtonColumn( $"{RowActionSurfaceId}.options", state.Actions diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeItemDetailsSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeItemDetailsSurfaceBuilder.cs index dae7965dc..3e643111d 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeItemDetailsSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeItemDetailsSurfaceBuilder.cs @@ -106,7 +106,7 @@ namespace GameCult.Aetheria.State.Verse : state.Description), Text( $"{SurfaceId}.note", - "Unity supplies the selected market row; the shared runtime surface owns trade item inspection layout."), + "The observing client supplies the selected market row; the shared runtime surface owns trade item inspection layout."), Metric($"{SurfaceId}.manufacturer", "Manufacturer", state.Manufacturer), Metric($"{SurfaceId}.mass", "Mass", state.Mass), Metric($"{SurfaceId}.price", "Price", state.Price.ToString("N0")))