diff --git a/Aetheria.Unity/Packages/manifest.json b/Aetheria.Unity/Packages/manifest.json index 845b8de25..325af1865 100644 --- a/Aetheria.Unity/Packages/manifest.json +++ b/Aetheria.Unity/Packages/manifest.json @@ -6,9 +6,9 @@ "com.unity.modules.physics": "1.0.0", "com.unity.modules.uielements": "1.0.0", "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.7", + "org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.8", "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#b6f001b300a88aff0bc13372b5c1dbc2002954f8", - "org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#b6f001b300a88aff0bc13372b5c1dbc2002954f8" + "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.2.0" } } diff --git a/Aetheria.Unity/Packages/packages-lock.json b/Aetheria.Unity/Packages/packages-lock.json index 382c03f59..e201d114e 100644 --- a/Aetheria.Unity/Packages/packages-lock.json +++ b/Aetheria.Unity/Packages/packages-lock.json @@ -119,11 +119,11 @@ } }, "org.gamecult.cultlib": { - "version": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.7", + "version": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.8", "depth": 0, "source": "git", "dependencies": {}, - "hash": "1f8f832a788e2bdf59df90fb91da583574d3a42d" + "hash": "b73e04e01173ff0fc753727c0dc9e2eff2ce10c7" }, "org.gamecult.eve.plugin-fields": { "version": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.1.1", @@ -133,25 +133,25 @@ "hash": "0b099274a4e2b4c301eced4322166837792f585a" }, "org.gamecult.eve.surface": { - "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#b6f001b300a88aff0bc13372b5c1dbc2002954f8", + "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.0", "depth": 0, "source": "git", "dependencies": { - "org.gamecult.cultlib": "1.0.6" + "org.gamecult.cultlib": "1.0.8" }, - "hash": "b6f001b300a88aff0bc13372b5c1dbc2002954f8" + "hash": "010ddeff90b70ce5278da373ce2dd0bb2c9eb9ac" }, "org.gamecult.eve.unity-scene": { - "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#b6f001b300a88aff0bc13372b5c1dbc2002954f8", + "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.2.0", "depth": 0, "source": "git", "dependencies": { - "org.gamecult.cultlib": "1.0.6", + "org.gamecult.cultlib": "1.0.8", "org.gamecult.eve.plugin-fields": "0.1.1", - "org.gamecult.eve.surface": "0.1.0", + "org.gamecult.eve.surface": "0.2.0", "com.unity.mathematics": "1.3.2" }, - "hash": "b6f001b300a88aff0bc13372b5c1dbc2002954f8" + "hash": "010ddeff90b70ce5278da373ce2dd0bb2c9eb9ac" }, "com.unity.modules.assetbundle": { "version": "1.0.0", diff --git a/scripts/verify-aetheria-unity-client.ps1 b/scripts/verify-aetheria-unity-client.ps1 new file mode 100644 index 000000000..4135af9c9 --- /dev/null +++ b/scripts/verify-aetheria-unity-client.ps1 @@ -0,0 +1,64 @@ +param( + [string] $ProjectPath = (Join-Path (Split-Path $PSScriptRoot -Parent) "Aetheria.Unity") +) + +$ErrorActionPreference = "Stop" + +function Assert-Equal([object] $Actual, [object] $Expected, [string] $Label) { + if ($Actual -ne $Expected) { + throw "$Label expected '$Expected', got '$Actual'." + } +} + +$manifest = Get-Content (Join-Path $ProjectPath "Packages/manifest.json") -Raw | ConvertFrom-Json +$lock = Get-Content (Join-Path $ProjectPath "Packages/packages-lock.json") -Raw | ConvertFrom-Json +$expected = @{ + "org.gamecult.cultlib" = @( + "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.8", + "b73e04e01173ff0fc753727c0dc9e2eff2ce10c7") + "org.gamecult.eve.surface" = @( + "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.0", + "010ddeff90b70ce5278da373ce2dd0bb2c9eb9ac") + "org.gamecult.eve.unity-scene" = @( + "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.2.0", + "010ddeff90b70ce5278da373ce2dd0bb2c9eb9ac") +} + +foreach ($packageName in $expected.Keys) { + $dependency = $manifest.dependencies.$packageName + $resolved = $lock.dependencies.$packageName + Assert-Equal $dependency $expected[$packageName][0] "$packageName manifest ref" + Assert-Equal $resolved.version $dependency "$packageName lock ref" + Assert-Equal $resolved.hash $expected[$packageName][1] "$packageName resolved hash" +} + +$cultLibPackage = Get-ChildItem (Join-Path $ProjectPath "Library/PackageCache") -Directory | + Where-Object Name -Like "org.gamecult.cultlib@*" | + Select-Object -First 1 +if (-not $cultLibPackage) { throw "Resolved CultLib package is missing from Library/PackageCache." } + +$meshAssembly = Join-Path $cultLibPackage.FullName "Runtime/Plugins/GameCult.Mesh.dll" +if (-not (Test-Path $meshAssembly)) { throw "Resolved GameCult.Mesh.dll is missing." } +$meshApi = & rg -a -o "CultMesh[A-Za-z]+" $meshAssembly 2>&1 +if ($LASTEXITCODE -ne 0) { throw "Unable to inspect GameCult.Mesh.dll metadata.`n$meshApi" } +$bodyApiNames = @("CultMeshBodyPublicationDocument", "CultMeshBodyPublicationHandle", "CultMeshFrameBodyPublisher") +foreach ($apiName in $bodyApiNames) { + if (-not ($meshApi | Where-Object { $_ -eq $apiName })) { + throw "Resolved GameCult.Mesh.dll does not expose $apiName." + } +} + +$assemblies = Get-ChildItem (Join-Path $ProjectPath "Library/ScriptAssemblies") -Filter *.dll -ErrorAction Stop | + Select-Object -ExpandProperty Name +$forbidden = $assemblies | Where-Object { $_ -match "^(Aetheria|GameCult\.Aetheria)(\.|$)|ServerShared" } +if ($forbidden) { throw "Aetheria gameplay/ServerShared assemblies entered the Unity client: $($forbidden -join ', ')" } + +$bootstrapSource = Get-Content (Join-Path $ProjectPath "Assets/AetheriaUnityClient.cs") -Raw +foreach ($required in @("EVEUNITY_RENDEZVOUS_ENDPOINT", "EveUnityCultMeshPlayableWorldProvider", "ConfigureProvider")) { + if ($bootstrapSource -notmatch [regex]::Escape($required)) { throw "Client bootstrap is missing discovery input '$required'." } +} +foreach ($forbiddenInput in @("AetheriaRuntimeVerseSchemas", "AetheriaRuntimeVerseRecordKeys", "productSchema", "recordKey")) { + if ($bootstrapSource -match [regex]::Escape($forbiddenInput)) { throw "Client bootstrap depends on forbidden product input '$forbiddenInput'." } +} + +Write-Host "Aetheria Unity client dependency and bootstrap verification passed."