From dcccccc7abd0e61aea3c8e74a498be12bcc40991 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 10 Jul 2026 07:22:56 +0100 Subject: [PATCH] Prove Norn as a live Eve sidecar --- crates/norn-eve-plugin/src/main.rs | 1 + scripts/run-eve-plugin-witness.ps1 | 31 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 scripts/run-eve-plugin-witness.ps1 diff --git a/crates/norn-eve-plugin/src/main.rs b/crates/norn-eve-plugin/src/main.rs index cc9b178..860fd2f 100644 --- a/crates/norn-eve-plugin/src/main.rs +++ b/crates/norn-eve-plugin/src/main.rs @@ -8,6 +8,7 @@ fn main() -> io::Result<()> { let mut stdout = io::stdout().lock(); for line in stdin.lock().lines() { let line = line?; + let line = line.trim_start_matches('\u{feff}'); if line.trim().is_empty() { continue; } diff --git a/scripts/run-eve-plugin-witness.ps1 b/scripts/run-eve-plugin-witness.ps1 new file mode 100644 index 0000000..209bb6e --- /dev/null +++ b/scripts/run-eve-plugin-witness.ps1 @@ -0,0 +1,31 @@ +param( + [string] $EveRoot = "E:\Projects\Eve", + [string] $OutputPath = "artifacts\eve-plugin\runtime-witness.json" +) + +$ErrorActionPreference = "Stop" +$repoRoot = Split-Path -Parent $PSScriptRoot +$output = if ([IO.Path]::IsPathRooted($OutputPath)) { $OutputPath } else { Join-Path $repoRoot $OutputPath } +$launcher = Join-Path $EveRoot "tools\plugins\run-sidecar-witness.mjs" +$advertisement = Join-Path $repoRoot "plugins\norn-graph.plugin-advertisement.json" +$fixture = Join-Path $repoRoot "plugins\norn-graph.plugin-abi-fixture.json" + +foreach ($required in @($launcher, $advertisement, $fixture)) { + if (-not (Test-Path -LiteralPath $required)) { throw "Norn Eve plugin witness path not found: $required" } +} + +cargo build --quiet -p norn-eve-plugin +if ($LASTEXITCODE -ne 0) { throw "norn-eve-plugin build failed with exit code $LASTEXITCODE" } +$executable = Join-Path $repoRoot "target\debug\norn-eve-plugin.exe" +if (-not (Test-Path -LiteralPath $executable)) { throw "Norn sidecar executable was not produced: $executable" } + +node $launcher ` + --advertisement $advertisement ` + --fixture $fixture ` + --output $output ` + --witness-id "norn.graph.owner-sidecar" ` + --cwd $repoRoot ` + --command $executable +if ($LASTEXITCODE -ne 0) { throw "Norn Eve plugin witness failed with exit code $LASTEXITCODE" } + +Write-Host "Norn Eve plugin witness: $output"