Add EveElectron plugin projection shells

This commit is contained in:
Meta Vens 2026-07-09 13:20:30 +01:00
commit 88068c35ae
11 changed files with 260 additions and 53 deletions

View file

@ -39,13 +39,30 @@ if (-not $manifest.incubation.splitHandoff.manifestPath) {
throw "EveElectron manifest missing split handoff path"
}
foreach ($feature in @("providerAdvertisements", "commandTransport", "surfaceTreeProjection", "embeddedDocuments")) {
foreach ($feature in @("providerAdvertisements", "commandTransport", "surfaceTreeProjection", "embeddedDocuments", "pluginProjection")) {
if (-not (@($manifest.supportedFeatures) -contains $feature)) {
throw "EveElectron manifest missing provider-shell feature: $feature"
}
}
if (@($manifest.supportedPlugins).Count -ne 0) {
throw "EveElectron must not claim plugin projection before runtime projection adapters for sidecar-advertised capabilities exist"
$expectedPlugins = @{
"sai.vn" = @("vn.stage", "story.choose", "story.continue", "story.jump")
"norn.graph" = @("embed.norn")
"tex.math" = @("embed.tex", "tex.inline", "tex.block")
}
foreach ($pluginId in $expectedPlugins.Keys) {
$supported = @($manifest.supportedPlugins) | Where-Object { $_.pluginId -eq $pluginId } | Select-Object -First 1
if (-not $supported) {
throw "EveElectron manifest missing supported plugin declaration: $pluginId"
}
foreach ($capability in $expectedPlugins[$pluginId]) {
if (-not (@($supported.capabilities) -contains $capability)) {
throw "EveElectron supported plugin $pluginId missing capability: $capability"
}
}
if ($supported.projectionAdapter -ne "EveElectronShell.buildPluginProjection") {
throw "EveElectron supported plugin $pluginId has unexpected projection adapter: $($supported.projectionAdapter)"
}
}
$worldSurfaceLoweringClaims = @()
@ -72,10 +89,10 @@ foreach ($evidencePath in @($worldSurfaceLoweringClaim.evidencePaths)) {
}
}
foreach ($pluginId in @("sai.vn", "norn.graph", "tex.math")) {
foreach ($pluginId in $expectedPlugins.Keys) {
$unsupported = @($manifest.unsupportedPlugins) | Where-Object { $_.pluginId -eq $pluginId } | Select-Object -First 1
if (-not $unsupported) {
throw "EveElectron manifest missing unsupported plugin declaration: $pluginId"
if ($unsupported) {
throw "EveElectron manifest must not report $pluginId unsupported while the shell projection is declared"
}
}

View file

@ -24,12 +24,19 @@ if ($manifest.lifecycle.test.status -ne "provider-shell-contract-skeleton") {
throw "Unexpected EveElectron provider shell status: $($manifest.lifecycle.test.status)"
}
foreach ($feature in @("providerAdvertisements", "commandTransport", "surfaceTreeProjection")) {
foreach ($feature in @("providerAdvertisements", "commandTransport", "surfaceTreeProjection", "pluginProjection")) {
if (-not (@($manifest.supportedFeatures) -contains $feature)) {
throw "EveElectron provider shell missing supported feature: $feature"
}
}
foreach ($pluginId in @("sai.vn", "norn.graph", "tex.math")) {
$supported = @($manifest.supportedPlugins) | Where-Object { $_.pluginId -eq $pluginId } | Select-Object -First 1
if (-not $supported) {
throw "EveElectron provider shell missing supported plugin projection: $pluginId"
}
}
$worldSurfaceLoweringClaims = @()
if ($null -ne $manifest.worldSurfaceLowering) {
$worldSurfaceLoweringClaims = @($manifest.worldSurfaceLowering)
@ -80,14 +87,14 @@ foreach ($relativePath in $expectedFiles) {
}
$shellSource = Get-Content -LiteralPath (Join-Path $projectRoot "runtimes\incubating\eve-electron\src\eve-electron-shell.mjs") -Raw
foreach ($symbol in @("EveElectronShell", "selectSurface", "lowerSurface", "createCommandIntent", "normalizeSurfaceDocument", "buildShellNode", "shellElementKind", "worldInteraction", "commandBoundary", "receiptSchema", "electron-shell")) {
foreach ($symbol in @("EveElectronShell", "selectSurface", "lowerSurface", "createCommandIntent", "normalizeSurfaceDocument", "buildShellNode", "buildPluginProjection", "shellElementKind", "sai.vn", "norn.graph", "tex.math", "sidecar-advertised-plugin-abi", "worldInteraction", "commandBoundary", "receiptSchema", "electron-shell")) {
if (-not $shellSource.Contains($symbol)) {
throw "EveElectron provider shell source missing symbol: $symbol"
}
}
$testSource = Get-Content -LiteralPath (Join-Path $projectRoot "runtimes\incubating\eve-electron\test\eve-electron-shell.test.mjs") -Raw
foreach ($symbol in @("selects the active advertised provider surface", "lowers provider surface trees into an Electron shell projection", "rejects surface documents that do not match the advertised target", "command intents carry provider-advertised boundaries", "aetheria.daemon.commands", "aetheria.eve_command_acceptance_status.v1")) {
foreach ($symbol in @("selects the active advertised provider surface", "lowers provider surface trees into an Electron shell projection", "lowers Sai, Norn, and TeX sidecar plugin shells without owning semantics", "sai-vn-stage-shell", "norn-graph-shell", "tex-math-shell", "rejects surface documents that do not match the advertised target", "command intents carry provider-advertised boundaries", "aetheria.daemon.commands", "aetheria.eve_command_acceptance_status.v1")) {
if (-not $testSource.Contains($symbol)) {
throw "EveElectron provider shell test missing symbol: $symbol"
}

View file

@ -34,7 +34,7 @@ if ($handoff.runtimeId -ne "electron-shell") {
}
$moveSets = @($handoff.moveSets)
foreach ($stage in @("runtime-body", "command", "world-surface-lowering", "capture")) {
foreach ($stage in @("runtime-body", "command", "world-surface-lowering", "plugin-projection", "capture")) {
$moveSet = $moveSets | Where-Object { $_.stage -eq $stage } | Select-Object -First 1
if (-not $moveSet) {
throw "EveElectron split handoff missing move set for stage: $stage"
@ -77,6 +77,20 @@ if (@($captureMoveSet.currentPaths).Count -eq 0) {
throw "EveElectron capture lifecycle move set must declare currentPaths"
}
$pluginMoveSet = $moveSets | Where-Object { $_.id -eq "electron-plugin-projection" } | Select-Object -First 1
if (-not $pluginMoveSet) {
throw "EveElectron split handoff missing move set: electron-plugin-projection"
}
foreach ($relativePath in @(
"runtimes/incubating/eve-electron/src/eve-electron-shell.mjs",
"runtimes/incubating/eve-electron/test/eve-electron-shell.test.mjs",
"web/fixtures/sai-vn-surface.json"
)) {
if (-not (@($pluginMoveSet.currentPaths) -contains $relativePath)) {
throw "EveElectron plugin projection move set missing current path: $relativePath"
}
}
foreach ($contract in @(
"gamecult.eve.surface.v1",
"gamecult.eve.command.v1",
@ -96,4 +110,14 @@ foreach ($proof in @($handoff.requiredExternalProofs)) {
}
}
foreach ($forbiddenImport in @(
"Sai story state, VN/Ink semantics, or story command interpretation as Electron shell authority",
"Norn graph layout, graph state, or command semantics as Electron shell authority",
"TeX parsing, typesetting, baseline metrics, or render-cache semantics as Electron shell authority"
)) {
if (-not (@($handoff.forbiddenImports) -contains $forbiddenImport)) {
throw "EveElectron split handoff missing forbidden import: $forbiddenImport"
}
}
Write-Host "EveElectron split handoff smoke passed: $absoluteHandoffPath"

View file

@ -67,6 +67,7 @@ node $consumerScript $consumerExport `
--expect-runtime-feature electron-shell:commandTransport `
--expect-runtime-feature electron-shell:surfaceTreeProjection `
--expect-runtime-feature electron-shell:embeddedDocuments `
--expect-runtime-feature electron-shell:pluginProjection `
--expect-runtime-feature unity-scene:embeddedDocuments `
--expect-runtime-feature tui:providerAdvertisements `
--expect-runtime-feature tui:commandTransport `
@ -95,7 +96,9 @@ node $consumerScript $consumerExport `
--expect-runtime-plugin-projection unity-scene:sai.vn:supported:EveUnity `
--expect-runtime-plugin-projection unity-scene:norn.graph:supported:EveUnity `
--expect-runtime-plugin-projection unity-scene:tex.math:supported:EveUnity `
--expect-runtime-plugin-projection electron-shell:sai.vn:unsupported:EveElectron `
--expect-runtime-plugin-projection electron-shell:sai.vn:supported:EveElectron `
--expect-runtime-plugin-projection electron-shell:norn.graph:supported:EveElectron `
--expect-runtime-plugin-projection electron-shell:tex.math:supported: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 `
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:unity-uitoolkit:sai.vn:supported:EveUnity `
@ -104,11 +107,11 @@ node $consumerScript $consumerExport `
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:unity-scene:sai.vn:supported:EveUnity `
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:unity-scene:norn.graph:optional-supported:EveUnity `
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:unity-scene:tex.math:optional-supported:EveUnity `
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:electron-shell:sai.vn:supported:EveElectron `
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:electron-shell:norn.graph:optional-supported:EveElectron `
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:electron-shell:tex.math:optional-supported:EveElectron `
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:ios-uikit:sai.vn:unsupported-runtime-projection:EveIOS `
--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 electron-shell:sai.vn:EveElectron `
--expect-runtime-plugin-gap electron-shell:norn.graph:EveElectron `
--expect-runtime-plugin-gap electron-shell:tex.math:EveElectron `
--expect-runtime-plugin-gap tui:sai.vn:EveTui `
--expect-runtime-plugin-gap tui:norn.graph:EveTui `
--expect-runtime-plugin-gap tui:tex.math:EveTui `

View file

@ -66,6 +66,7 @@ try {
--expect-split-handoff-move EveElectron:electron-shell:electron-shell-runtime:current:exists:eve-electron-shell.mjs `
--expect-split-handoff-move EveElectron:electron-shell:electron-command-transport:current:exists:eve-electron-shell.mjs `
--expect-split-handoff-move EveElectron:electron-shell:electron-world-surface-lowering:current:exists:eve-electron-shell.mjs `
--expect-split-handoff-move EveElectron:electron-shell:electron-plugin-projection:current:exists:sai-vn-surface.json `
--expect-split-handoff-move EveElectron:electron-shell:electron-capture-lifecycle:current:exists:eveelectron-capture-contract.mjs `
--expect-split-handoff-move EveElectron:electron-shell:electron-shell-runtime:observed-provider:exists:Aetheria.Rts.Web/Electron `
--expect-split-handoff-move EveElectron:electron-shell:electron-command-transport:observed-provider:exists:Aetheria.Rts.Web/Client/app.ts `