Add Unity scene Norn projection boundary

This commit is contained in:
Meta Vens 2026-07-09 12:55:32 +01:00
commit 7aba6a8ec4
11 changed files with 213 additions and 54 deletions

View file

@ -44,8 +44,18 @@ foreach ($feature in @("providerAdvertisements", "commandTransport", "sceneGraph
throw "EveUnity scene manifest missing provider-shell feature: $feature"
}
}
if (@($manifest.supportedPlugins).Count -ne 0) {
throw "EveUnity scene must not claim plugin projection before runtime projection adapters for sidecar-advertised capabilities exist"
if (@($manifest.supportedPlugins).Count -ne 1) {
throw "EveUnity scene must claim exactly one plugin projection adapter"
}
$nornProjection = @($manifest.supportedPlugins) | Where-Object { $_.pluginId -eq "norn.graph" } | Select-Object -First 1
if (-not $nornProjection) {
throw "EveUnity scene manifest missing supported Norn projection adapter"
}
if ($nornProjection.projectionAdapter -ne "NornGraphUnitySceneProjectionAdapter") {
throw "Unexpected EveUnity scene Norn projection adapter: $($nornProjection.projectionAdapter)"
}
if (-not (@($nornProjection.capabilities) -contains "embed.norn")) {
throw "EveUnity scene Norn projection adapter must claim embed.norn"
}
$worldSurfaceLoweringClaims = @()
if ($null -ne $manifest.worldSurfaceLowering) {
@ -71,12 +81,15 @@ foreach ($evidencePath in @($worldSurfaceLoweringClaim.evidencePaths)) {
}
}
foreach ($pluginId in @("sai.vn", "norn.graph", "tex.math")) {
foreach ($pluginId in @("sai.vn", "tex.math")) {
$unsupported = @($manifest.unsupportedPlugins) | Where-Object { $_.pluginId -eq $pluginId } | Select-Object -First 1
if (-not $unsupported) {
throw "EveUnity scene manifest missing unsupported plugin declaration: $pluginId"
}
}
if (@($manifest.unsupportedPlugins) | Where-Object { $_.pluginId -eq "norn.graph" } | Select-Object -First 1) {
throw "EveUnity scene must not report norn.graph unsupported while the projection adapter is declared"
}
if ($manifest.commandTransport.schema -ne "gamecult.eve.command.v1") {
throw "Unexpected EveUnity scene command schema: $($manifest.commandTransport.schema)"

View file

@ -64,6 +64,7 @@ $expectedFiles = @(
"runtimes\incubating\eve-unity-scene\package.json",
"runtimes\incubating\eve-unity-scene\Runtime\GameCult.Eve.UnityScene.asmdef",
"runtimes\incubating\eve-unity-scene\Runtime\EveUnitySceneSurfaceLowerer.cs",
"runtimes\incubating\eve-unity-scene\Runtime\NornGraphUnitySceneProjectionAdapter.cs",
"runtimes\incubating\eve-unity-scene\Tests\Editor\GameCult.Eve.UnityScene.Tests.asmdef",
"runtimes\incubating\eve-unity-scene\Tests\Editor\EveUnitySceneSurfaceLowererTests.cs"
)
@ -76,14 +77,21 @@ foreach ($relativePath in $expectedFiles) {
}
$lowererSource = Get-Content -LiteralPath (Join-Path $projectRoot "runtimes\incubating\eve-unity-scene\Runtime\EveUnitySceneSurfaceLowerer.cs") -Raw
foreach ($symbol in @("EveUnitySceneSurfaceLowerer", "EveUnitySceneProviderSurfaceAdvertisement", "WorldInteraction", "CommandBoundary", "ReceiptSchema", "EveSurfaceCommandRequest", "BuildSceneGraph", "EveUnitySceneNode", "SceneObjectKind", "unity-scene")) {
foreach ($symbol in @("EveUnitySceneSurfaceLowerer", "EveUnitySceneProviderSurfaceAdvertisement", "WorldInteraction", "CommandBoundary", "ReceiptSchema", "EveSurfaceCommandRequest", "BuildSceneGraph", "BuildPluginProjection", "EveUnityScenePluginProjection", "EveUnitySceneNode", "SceneObjectKind", "unity-scene")) {
if (-not $lowererSource.Contains($symbol)) {
throw "EveUnity scene provider shell lowerer missing symbol: $symbol"
}
}
$nornAdapterSource = Get-Content -LiteralPath (Join-Path $projectRoot "runtimes\incubating\eve-unity-scene\Runtime\NornGraphUnitySceneProjectionAdapter.cs") -Raw
foreach ($symbol in @("NornGraphUnitySceneProjectionAdapter", "norn.graph", "embed.norn", "gamecult.eve.plugin_abi.v1", "sidecar-advertised-plugin-abi", "Norn")) {
if (-not $nornAdapterSource.Contains($symbol)) {
throw "EveUnity scene Norn projection adapter missing symbol: $symbol"
}
}
$testSource = Get-Content -LiteralPath (Join-Path $projectRoot "runtimes\incubating\eve-unity-scene\Tests\Editor\EveUnitySceneSurfaceLowererTests.cs") -Raw
foreach ($symbol in @("LowerCarriesProviderAdvertisedWorldBoundary", "LowerBuildsProviderAgnosticSceneGraphFromSurfaceTree", "CommandIntentCarriesAdvertisedBoundaryWithoutOwningReceipts", "world-projection-node", "plugin-placeholder", "aetheria.daemon.commands", "aetheria.eve_command_acceptance_status.v1")) {
foreach ($symbol in @("LowerCarriesProviderAdvertisedWorldBoundary", "LowerBuildsProviderAgnosticSceneGraphFromSurfaceTree", "CommandIntentCarriesAdvertisedBoundaryWithoutOwningReceipts", "world-projection-node", "norn-graph-scene-projection", "norn.graph", "sidecar-advertised-plugin-abi", "aetheria.daemon.commands", "aetheria.eve_command_acceptance_status.v1")) {
if (-not $testSource.Contains($symbol)) {
throw "EveUnity scene provider shell tests missing symbol: $symbol"
}

View file

@ -93,6 +93,8 @@ node $consumerScript $consumerExport `
--expect-runtime-plugin-projection unity-uitoolkit:norn.graph:supported:EveUnity `
--expect-runtime-plugin-projection unity-uitoolkit:tex.math:unsupported:EveUnity `
--expect-runtime-plugin-projection unity-scene:sai.vn:unsupported:EveUnity `
--expect-runtime-plugin-projection unity-scene:norn.graph:supported:EveUnity `
--expect-runtime-plugin-projection unity-scene:tex.math:unsupported:EveUnity `
--expect-runtime-plugin-projection electron-shell:sai.vn:unsupported:EveElectron `
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:web:sai.vn:supported:Eve `
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:web:tex.math:optional-supported:Eve `
@ -103,7 +105,6 @@ node $consumerScript $consumerExport `
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:ios-uikit:norn.graph:optional-unsupported-runtime-projection:EveIOS `
--expect-runtime-plugin-gap unity-uitoolkit:tex.math:EveUnity `
--expect-runtime-plugin-gap unity-scene:sai.vn:EveUnity `
--expect-runtime-plugin-gap unity-scene:norn.graph:EveUnity `
--expect-runtime-plugin-gap unity-scene:tex.math:EveUnity `
--expect-runtime-plugin-gap electron-shell:sai.vn:EveElectron `
--expect-runtime-plugin-gap electron-shell:norn.graph:EveElectron `