Rework Odin transport ownership and service names

This commit is contained in:
Meta Vens 2026-07-04 22:38:43 +01:00
commit 4ad8bdb481
109 changed files with 11191 additions and 4551 deletions

View file

@ -1,243 +0,0 @@
param(
[string] $RavenHost = "raven",
[string] $MuninnExe = "C:\Meta\Odin\Muninn\muninn.exe",
[string] $StorePath = "C:\Meta\Odin\state\muninn.activate.cc",
[string] $LoopbackScript = "C:\Meta\Odin\Muninn\scripts\wasapi-loopback-capture.ps1",
[string] $LogRoot = "C:\Meta\Odin\logs\muninn",
[string] $Ffmpeg = "C:\Users\Madman's Lullaby\AppData\Local\Microsoft\WinGet\Links\ffmpeg.exe",
[string] $TargetHost = "10.77.0.2",
[int] $Port = 5204,
[string] $MediaTransport = "rudp",
[string] $ObsTargetHost = "10.77.0.2",
[int] $ObsPort = 5204,
[string] $AudioDevice = "Realtek",
[switch] $NoObsTarget
)
$ErrorActionPreference = "Stop"
function Set-AsciiFile {
param(
[Parameter(Mandatory = $true)] [string] $Path,
[Parameter(Mandatory = $true)] [string] $Content
)
[System.IO.File]::WriteAllText($Path, ($Content -replace "`r?`n", "`r`n"), [System.Text.Encoding]::ASCII)
}
function ConvertTo-PowerShellStringLiteral {
param(
[Parameter(Mandatory = $true)] [string] $Value
)
return "'" + $Value.Replace("'", "''") + "'"
}
function ConvertTo-PowerShellArrayLiteral {
param(
[Parameter(Mandatory = $true)] [string[]] $Values
)
$lines = $Values | ForEach-Object { " {0}" -f (ConvertTo-PowerShellStringLiteral $_) }
return "@(`r`n{0}`r`n)" -f ($lines -join ",`r`n")
}
function New-HiddenPowerShellVbsLauncherContent {
param(
[Parameter(Mandatory = $true)] [string] $PsPath
)
return (@'
Set fso = CreateObject("Scripting.FileSystemObject")
scriptDir = fso.GetParentFolderName(WScript.ScriptFullName)
psLauncher = "{0}"
Set shell = CreateObject("WScript.Shell")
shell.CurrentDirectory = scriptDir
shell.Run "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -WindowStyle Hidden -File """ & psLauncher & """", 0, False
'@) -f $PsPath
}
function New-WscriptCmdLauncherContent {
param(
[Parameter(Mandatory = $true)] [string] $WorkingDirectory,
[Parameter(Mandatory = $true)] [string] $VbsPath
)
return (@'
@echo off
cd /d "{0}"
wscript.exe //B //Nologo "{1}"
'@) -f $WorkingDirectory, $VbsPath
}
function Invoke-RavenUploadedPowerShell {
param(
[Parameter(Mandatory = $true)] [string] $RavenHost,
[Parameter(Mandatory = $true)] [string] $RemoteScriptContent,
[Parameter(Mandatory = $true)] [object[]] $UploadSpecs,
[Parameter(Mandatory = $true)] [string] $TempPrefix
)
$uploadId = [guid]::NewGuid().ToString("N")
$localTempRoot = Join-Path $env:TEMP "$TempPrefix-$uploadId"
$localRemoteScript = Join-Path $localTempRoot "$TempPrefix-$uploadId.ps1"
$localSftpBatch = Join-Path $localTempRoot "$TempPrefix-$uploadId.sftp"
$remoteSftpPath = "C:/Windows/Temp/$TempPrefix-$uploadId.ps1"
$remotePsPath = "C:\Windows\Temp\$TempPrefix-$uploadId.ps1"
try {
New-Item -ItemType Directory -Force -Path $localTempRoot | Out-Null
Set-AsciiFile -Path $localRemoteScript -Content $RemoteScriptContent
$batchLines = @()
foreach ($spec in $UploadSpecs) {
$batchLines += 'put "{0}" "{1}"' -f $spec.LocalPath, $spec.RemotePath
}
$batchLines += 'put "{0}" "{1}"' -f $localRemoteScript, $remoteSftpPath
Set-AsciiFile -Path $localSftpBatch -Content ($batchLines -join "`r`n")
& sftp.exe -b $localSftpBatch $RavenHost
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
$remoteRunner = @"
`$ErrorActionPreference = "Stop"
try {
& "$remotePsPath"
`$code = `$LASTEXITCODE
} finally {
Remove-Item -LiteralPath "$remotePsPath" -Force -ErrorAction SilentlyContinue
}
exit `$code
"@
$encodedRunner = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($remoteRunner))
& ssh.exe -o BatchMode=yes -o ConnectTimeout=10 $RavenHost "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -EncodedCommand $encodedRunner"
} finally {
Remove-Item -LiteralPath $localTempRoot -Recurse -Force -ErrorAction SilentlyContinue
}
}
$muninnDir = Split-Path -Parent $MuninnExe
$activateCmdPath = Join-Path $muninnDir "activate-raven-av-srt.cmd"
$activatePsPath = Join-Path $muninnDir "activate-raven-av-srt.ps1"
$activateVbsPath = Join-Path $muninnDir "activate-raven-av-srt-hidden.vbs"
$activateArguments = @(
"request-stream",
"--store", $StorePath,
"--host", "raven",
"--stream", "muninn.raven.av.rudp",
"--stream-action", "start",
"--target-host", $TargetHost,
"--port", $Port.ToString(),
"--media-transport", $MediaTransport
)
if ($NoObsTarget.IsPresent -or $MediaTransport -ne "srt" -or ($TargetHost -eq $ObsTargetHost -and $Port -eq $ObsPort)) {
$activateArguments += "--no-obs-target"
} else {
$activateArguments += @("--obs-target-host", $ObsTargetHost, "--obs-port", $ObsPort.ToString())
}
$activateArguments += @(
"--audio-device", $AudioDevice,
"--ffmpeg", $Ffmpeg,
"--loopback-script", $LoopbackScript,
"--log-root", $LogRoot
)
$activatePsContent = (@'
$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
New-Item -ItemType Directory -Force -Path (Split-Path -Parent {0}) | Out-Null
New-Item -ItemType Directory -Force -Path {1} | Out-Null
$arguments = {2}
function Quote-NativeArgument([string] $Value) {{
if ($Value -match '[\s"]') {{
return '"' + $Value.Replace('"', '\"') + '"'
}}
return $Value
}}
$argumentLine = ($arguments | ForEach-Object {{ Quote-NativeArgument $_ }}) -join ' '
$process = Start-Process -FilePath {3} -ArgumentList $argumentLine -WindowStyle Hidden -PassThru -RedirectStandardOutput {4} -RedirectStandardError {5}
$process.Id | Set-Content -Encoding ASCII -LiteralPath {6}
'@) -f
(ConvertTo-PowerShellStringLiteral $StorePath),
(ConvertTo-PowerShellStringLiteral $LogRoot),
(ConvertTo-PowerShellArrayLiteral $activateArguments),
(ConvertTo-PowerShellStringLiteral $MuninnExe),
(ConvertTo-PowerShellStringLiteral (Join-Path $LogRoot "muninn-activate.out.log")),
(ConvertTo-PowerShellStringLiteral (Join-Path $LogRoot "muninn-activate.err.log")),
(ConvertTo-PowerShellStringLiteral (Join-Path $LogRoot "muninn-activate.pid"))
$uploadRoot = Join-Path $env:TEMP ("odin-raven-muninn-activate-" + [guid]::NewGuid().ToString("N"))
try {
New-Item -ItemType Directory -Force -Path $uploadRoot | Out-Null
$localActivatePs = Join-Path $uploadRoot "activate-raven-av-srt.ps1"
$localActivateVbs = Join-Path $uploadRoot "activate-raven-av-srt-hidden.vbs"
$localActivateCmd = Join-Path $uploadRoot "activate-raven-av-srt.cmd"
Set-AsciiFile -Path $localActivatePs -Content $activatePsContent
Set-AsciiFile -Path $localActivateVbs -Content (New-HiddenPowerShellVbsLauncherContent -PsPath $activatePsPath)
Set-AsciiFile -Path $localActivateCmd -Content (New-WscriptCmdLauncherContent -WorkingDirectory $muninnDir -VbsPath $activateVbsPath)
$remoteScript = @"
`$ErrorActionPreference = "Stop"
`$ProgressPreference = "SilentlyContinue"
if (-not (Test-Path -LiteralPath "$MuninnExe")) {
throw "Muninn executable not found at $MuninnExe"
}
if (-not (Test-Path -LiteralPath "$LoopbackScript")) {
throw "Muninn loopback script not found at $LoopbackScript"
}
if (-not (Test-Path -LiteralPath "$Ffmpeg")) {
throw "FFmpeg executable not found at $Ffmpeg"
}
foreach (`$path in @(
"$activatePsPath",
"$activateVbsPath"
)) {
if (-not (Test-Path -LiteralPath `$path)) {
throw "Required launcher path not found at `$path"
}
}
Get-CimInstance Win32_Process |
Where-Object {
(`$_.Name -like "muninn*.exe" -and `$_.CommandLine -like "*activate*") -or
(`$_.Name -ieq "ffmpeg.exe" -and `$_.CommandLine -like "*srt://$TargetHost*") -or
(`$_.Name -ieq "powershell.exe" -and `$_.CommandLine -like "*wasapi-loopback-capture.ps1*")
} |
ForEach-Object {
& taskkill.exe /PID `$_.ProcessId /T /F | Out-Null
}
New-Item -ItemType Directory -Force -Path "$LogRoot" | Out-Null
New-Item -ItemType Directory -Force -Path (Split-Path -Parent "$StorePath") | Out-Null
`$vbs = Get-Content -LiteralPath "$activateVbsPath" -Raw
if (`$vbs -match 'cmdPath\s*=') {
throw "GameCult-Muninn-Activate hidden launcher at $activateVbsPath still routes through a cmdPath trampoline"
}
if (`$vbs -notmatch '\.ps1') {
throw "GameCult-Muninn-Activate hidden launcher at $activateVbsPath does not reference a PowerShell launcher"
}
if (Get-ScheduledTask -TaskName "GameCult-Muninn-Activate" -ErrorAction SilentlyContinue) {
Unregister-ScheduledTask -TaskName "GameCult-Muninn-Activate" -Confirm:`$false | Out-Null
}
Start-Process -FilePath "wscript.exe" -ArgumentList "//B //Nologo ""$activateVbsPath""" -WindowStyle Hidden | Out-Null
"@
$uploadSpecs = @(
@{ LocalPath = $localActivatePs; RemotePath = ($activatePsPath -replace "\\", "/") },
@{ LocalPath = $localActivateVbs; RemotePath = ($activateVbsPath -replace "\\", "/") },
@{ LocalPath = $localActivateCmd; RemotePath = ($activateCmdPath -replace "\\", "/") }
)
Invoke-RavenUploadedPowerShell -RavenHost $RavenHost -RemoteScriptContent $remoteScript -UploadSpecs $uploadSpecs -TempPrefix "odin-raven-muninn-activate"
} finally {
Remove-Item -LiteralPath $uploadRoot -Recurse -Force -ErrorAction SilentlyContinue
}
exit $LASTEXITCODE

View file

@ -0,0 +1 @@
throw "activate-muninn-raven-media.ps1 archived: Muninn media activation is daemon-owned and target resolution is through Odin/CultMesh. Redeploy Muninn through Idunn and publish a typed muninn.capture_stream_command with a cultmesh:// media target URI."

View file

@ -3,4 +3,8 @@ if not "%IDUNN_ACTUATOR%"=="1" (
echo This deployment wrapper is an Idunn actuator. Configure Idunn; do not deploy manually.
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo This deployment wrapper is an Idunn actuator. Configure Idunn; do not deploy manually.
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\deploy-nightwing-gjallar.ps1

View file

@ -5,8 +5,8 @@ param(
[string] $SshTarget = "nwroot",
[string] $RemoteDir = "/opt/gamecult/gjallar",
[string] $CultCachePath = "/var/lib/gamecult/gjallar/cultcache/gjallar.service.cc",
[string] $OdinCultNetRudp = "192.168.1.66:17871",
[string] $IdunnRudpHealth = "10.77.0.2:17870",
[string] $OdinCultMeshUri = $(if ($env:GJALLAR_ODIN_CULTMESH_URI) { $env:GJALLAR_ODIN_CULTMESH_URI } elseif ($env:ODIN_CULTMESH_URI) { $env:ODIN_CULTMESH_URI } else { "cultmesh://odin/rendezvous/provider-catalog" }),
[string] $IdunnRudpHealth = $(if ($env:GJALLAR_IDUNN_RUDP_HEALTH) { $env:GJALLAR_IDUNN_RUDP_HEALTH } else { $env:IDUNN_RUDP_HEALTH }),
[string] $IdunnDaemon = "nightwing-gjallar",
[string] $IdunnHealthContract = "gjallar.cultnet-rudp-framebuffer-composition-health",
[string] $UpstreamRemote = "origin",
@ -54,9 +54,18 @@ function Export-GitArchive {
}
}
if ($env:IDUNN_ACTUATOR -ne "1") {
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "This deployment script is an Idunn actuator. Agents must configure Idunn release targets and let Idunn run deployment; do not invoke deploy scripts manually."
}
if ($env:GJALLAR_ODIN_CULTNET_RUDP -or $env:ODIN_CULTNET_RUDP) {
throw "GJALLAR_ODIN_CULTNET_RUDP and ODIN_CULTNET_RUDP were removed. Configure GJALLAR_ODIN_CULTMESH_URI or ODIN_CULTMESH_URI with a cultmesh:// Odin route."
}
if ([string]::IsNullOrWhiteSpace($OdinCultMeshUri) -or -not $OdinCultMeshUri.StartsWith("cultmesh://", [StringComparison]::OrdinalIgnoreCase)) {
throw "Odin CultMesh URI must be supplied by GJALLAR_ODIN_CULTMESH_URI, ODIN_CULTMESH_URI, or -OdinCultMeshUri and must start with cultmesh://."
}
if ([string]::IsNullOrWhiteSpace($IdunnRudpHealth)) {
throw "Idunn RUDP health endpoint must be supplied by GJALLAR_IDUNN_RUDP_HEALTH, IDUNN_RUDP_HEALTH, or -IdunnRudpHealth; no WireGuard endpoint default is allowed."
}
$sourceRef = "$UpstreamRemote/$UpstreamBranch"
$scratchRoot = Join-Path $GjallarRoot "scratch"
@ -132,7 +141,7 @@ $cultCacheDir = if ($CultCachePath.LastIndexOf('/') -gt 0) { $CultCachePath.Subs
$dropIn = @"
[Service]
Environment=GJALLAR_CULTCACHE_PATH=$CultCachePath
Environment=GJALLAR_ODIN_CULTNET_RUDP=$OdinCultNetRudp
Environment=GJALLAR_ODIN_CULTMESH_URI=$OdinCultMeshUri
Environment=GJALLAR_IDUNN_RUDP_HEALTH=$IdunnRudpHealth
Environment=GJALLAR_IDUNN_DAEMON=$IdunnDaemon
Environment=GJALLAR_IDUNN_HEALTH_CONTRACT=$IdunnHealthContract

View file

@ -1,10 +1,10 @@
param(
[string] $RavenHost = "raven",
[string] $RavenHost = "raven.Home",
[string] $MuninnExe = "C:\Meta\Odin\Muninn\muninn.exe",
[string] $LocalMuninnExe = "",
[int] $ConnectTimeoutSeconds = 10,
[string] $SshUser = "",
[string] $IdentityFile = "",
[string] $SshUser = "madman's lullaby",
[string] $IdentityFile = "C:\Users\Meta\.ssh\id_ed25519_192_168_1_84",
[switch] $SkipBuild,
[switch] $SkipRestart,
[switch] $PreflightOnly
@ -251,7 +251,8 @@ if (Test-Path -LiteralPath `$target) {
Copy-Item -LiteralPath `$target -Destination `$backup -Force
}
Move-Item -LiteralPath `$incoming -Destination `$target -Force
Copy-Item -LiteralPath `$incoming -Destination `$target -Force
Remove-Item -LiteralPath `$incoming -Force -ErrorAction SilentlyContinue
`$item = Get-Item -LiteralPath `$target
Write-Output ("muninn.exe deployed length={0} path={1}" -f `$item.Length, `$item.FullName)
`$global:LASTEXITCODE = 0

View file

@ -0,0 +1,92 @@
param(
[string] $LocalSleipnirExe = "E:\Projects\Odin\target\release\sleipnir.exe",
[string] $RavenHost = "raven",
[string] $RemoteSleipnirExe = "C:\Meta\Odin\Sleipnir\sleipnir.exe",
[string] $SshUser = "madman's lullaby",
[string] $IdentityFile = "C:\Users\Meta\.ssh\id_ed25519_192_168_1_84",
[int] $ConnectTimeoutSeconds = 10
)
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "deploy-raven-sleipnir.ps1 is an Idunn actuator body. Deploy by poking Idunn; direct binary copy is not an owned path."
}
if (-not (Test-Path -LiteralPath $LocalSleipnirExe)) {
throw "Local Sleipnir release binary not found at $LocalSleipnirExe"
}
function ConvertTo-PowerShellStringLiteral {
param([Parameter(Mandatory = $true)] [string] $Value)
return "'" + $Value.Replace("'", "''") + "'"
}
function Get-SshTarget {
if ([string]::IsNullOrWhiteSpace($SshUser)) {
return $RavenHost
}
return "${SshUser}@${RavenHost}"
}
$sshArgs = @(
"-o", "BatchMode=yes",
"-o", "ConnectTimeout=$ConnectTimeoutSeconds",
"-o", "ConnectionAttempts=1"
)
if (-not [string]::IsNullOrWhiteSpace($IdentityFile)) {
$sshArgs += @("-i", $IdentityFile)
}
$target = Get-SshTarget
$remoteNew = "$RemoteSleipnirExe.new"
$remoteDir = Split-Path -Parent $RemoteSleipnirExe
$remoteNewSftp = $remoteNew.Replace("\", "/")
$prepare = @"
`$ErrorActionPreference = "Stop"
`$ProgressPreference = "SilentlyContinue"
New-Item -ItemType Directory -Force -Path $(ConvertTo-PowerShellStringLiteral $remoteDir) | Out-Null
Get-CimInstance Win32_Process |
Where-Object { `$_.Name -ieq "sleipnir.exe" } |
ForEach-Object { taskkill.exe /PID `$_.ProcessId /T /F | Out-Null }
Remove-Item -LiteralPath $(ConvertTo-PowerShellStringLiteral $remoteNew) -Force -ErrorAction SilentlyContinue
exit 0
"@
$encodedPrepare = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($prepare))
& ssh.exe @sshArgs $target "powershell.exe -NoProfile -ExecutionPolicy Bypass -EncodedCommand $encodedPrepare"
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
$sftpBatch = New-TemporaryFile
try {
$sftpLines = @(
"put `"$LocalSleipnirExe`" `"$remoteNewSftp`""
)
Set-Content -LiteralPath $sftpBatch.FullName -Value $sftpLines -Encoding ASCII
& sftp.exe @sshArgs -b $sftpBatch.FullName $target
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
} finally {
Remove-Item -LiteralPath $sftpBatch.FullName -Force -ErrorAction SilentlyContinue
}
$install = @"
`$ErrorActionPreference = "Stop"
`$ProgressPreference = "SilentlyContinue"
if (Test-Path -LiteralPath $(ConvertTo-PowerShellStringLiteral $RemoteSleipnirExe)) {
Remove-Item -LiteralPath $(ConvertTo-PowerShellStringLiteral $RemoteSleipnirExe) -Force
}
Move-Item -LiteralPath $(ConvertTo-PowerShellStringLiteral $remoteNew) -Destination $(ConvertTo-PowerShellStringLiteral $RemoteSleipnirExe) -Force
exit 0
"@
$encodedInstall = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($install))
& ssh.exe @sshArgs $target "powershell.exe -NoProfile -ExecutionPolicy Bypass -EncodedCommand $encodedInstall"
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
& "$PSScriptRoot\restart-raven-sleipnir.ps1" -RavenHost $RavenHost -SleipnirExe $RemoteSleipnirExe -SshUser $SshUser -IdentityFile $IdentityFile -ConnectTimeoutSeconds $ConnectTimeoutSeconds
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}

View file

@ -3,4 +3,8 @@ if not "%IDUNN_ACTUATOR%"=="1" (
echo This deployment wrapper is an Idunn actuator. Configure Idunn; do not deploy manually.
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo This deployment wrapper is an Idunn actuator. Configure Idunn; do not deploy manually.
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\deploy-yggdrasil-heimdall.ps1

View file

@ -16,7 +16,7 @@ param(
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1") {
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "This deployment script is an Idunn actuator. Agents must configure Idunn release targets and let Idunn run deployment; do not invoke deploy scripts manually."
}
@ -105,7 +105,7 @@ sudo -n install -o '$AppUser' -g '$AppUser' -m 600 '$remoteSourceTarball' '$targ
sudo -n install -o '$AppUser' -g '$AppUser' -m 600 '$remoteCultLibTarball' '$targetCultLibTarball'
sudo -n install -m 644 '$remoteManifest' '$targetManifest'
chmod +x '$remoteDeploy' '$remoteCheck'
sudo -n bash '$remoteDeploy'
sudo -n env GAMECULT_IDUNN_REMOTE_ACTUATOR=1 IDUNN_COMMAND_AUTHORITY=idunn-daemon bash '$remoteDeploy'
check_ok=0
for i in `$(seq 1 30); do

View file

@ -3,4 +3,8 @@ if not "%IDUNN_ACTUATOR%"=="1" (
echo This deployment wrapper is an Idunn actuator. Configure Idunn; do not deploy manually.
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo This deployment wrapper is an Idunn actuator. Configure Idunn; do not deploy manually.
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\deploy-yggdrasil-repixelizer.ps1

View file

@ -16,7 +16,7 @@ param(
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1") {
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "This deployment script is an Idunn actuator. Agents must configure Idunn release targets and let Idunn run deployment; do not invoke deploy scripts manually."
}
@ -106,7 +106,7 @@ sudo -n install -o '$AppUser' -g '$AppUser' -m 600 '$remoteSourceTarball' '$targ
sudo -n install -o '$AppUser' -g '$AppUser' -m 600 '$remoteCultLibTarball' '$targetCultLibTarball'
sudo -n install -m 644 '$remoteManifest' '$targetManifest'
chmod +x '$remoteDeploy' '$remoteCheck'
sudo -n bash '$remoteDeploy'
sudo -n env GAMECULT_IDUNN_REMOTE_ACTUATOR=1 IDUNN_COMMAND_AUTHORITY=idunn-daemon bash '$remoteDeploy'
check_ok=0
for i in `$(seq 1 30); do

View file

@ -3,4 +3,8 @@ if not "%IDUNN_ACTUATOR%"=="1" (
echo This deployment wrapper is an Idunn actuator. Configure Idunn; do not deploy manually.
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo This deployment wrapper is an Idunn actuator. Configure Idunn; do not deploy manually.
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\deploy-yggdrasil-streampixels.ps1

View file

@ -16,7 +16,7 @@ param(
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1") {
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "This deployment script is an Idunn actuator. Agents must configure Idunn release targets and let Idunn run deployment; do not invoke deploy scripts manually."
}
@ -105,7 +105,7 @@ sudo -n install -o '$AppUser' -g '$AppUser' -m 600 '$remoteSourceTarball' '$targ
sudo -n install -o '$AppUser' -g '$AppUser' -m 600 '$remoteCultLibTarball' '$targetCultLibTarball'
sudo -n install -m 644 '$remoteManifest' '$targetManifest'
chmod +x '$remoteDeploy' '$remoteCheck'
sudo -n bash '$remoteDeploy'
sudo -n env GAMECULT_IDUNN_REMOTE_ACTUATOR=1 IDUNN_COMMAND_AUTHORITY=idunn-daemon bash '$remoteDeploy'
check_ok=0
for i in `$(seq 1 30); do

View file

@ -0,0 +1,24 @@
param(
[int[]] $Ports = @(17870, 17871, 17874, 17886, 17887, 17888)
)
$ErrorActionPreference = "Stop"
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).
IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
throw "Run this script from an elevated PowerShell session on Starfire."
}
foreach ($port in $Ports) {
$name = "GameCult LAN RUDP UDP $port"
& netsh.exe advfirewall firewall delete rule name="$name" | Out-Null 2>$null
& netsh.exe advfirewall firewall add rule `
name="$name" `
dir=in `
action=allow `
protocol=UDP `
localport=$port `
profile=private,domain,public | Out-Null
Write-Host "Allowed inbound UDP $port for GameCult LAN RUDP."
}

View file

@ -0,0 +1,14 @@
param(
[string] $BaseUrl = $(if ($env:HERMODR_BASE_URL) { $env:HERMODR_BASE_URL } else { "http://127.0.0.1:8798" })
)
$ErrorActionPreference = "Stop"
$healthUrl = $BaseUrl.TrimEnd("/") + "/health"
$response = Invoke-RestMethod -Uri $healthUrl -Method Get -TimeoutSec 3
if ($response.authority -ne "lowering-only") {
throw "Hermodr responded, but did not report lowering-only authority."
}
Write-Host "Hermodr browser lowering responds at $BaseUrl; authority=$($response.authority). This is not daemon health or Verse discovery authority."

View file

@ -4,7 +4,7 @@ $ErrorActionPreference = "Stop"
$unknown = @($IdunnDeploymentTargets | Where-Object { $_.Status -notin @("enforced", "runtime-enforced", "blocked", "external-owned", "not-runtime") })
$enforcedWithoutDeploy = @($IdunnDeploymentTargets | Where-Object { $_.Status -eq "enforced" -and [string]::IsNullOrWhiteSpace($_.Deploy) })
$enforcedWithoutHealth = @($IdunnDeploymentTargets | Where-Object { $_.Status -in @("enforced", "runtime-enforced") -and [string]::IsNullOrWhiteSpace($_.Health) })
$enforcedWithoutHealth = @($IdunnDeploymentTargets | Where-Object { $_.Status -in @("enforced", "runtime-enforced") -and $_.Id -ne "idunn" -and [string]::IsNullOrWhiteSpace($_.Health) })
$enforcedWithoutUpstream = @($IdunnDeploymentTargets | Where-Object { $_.Status -eq "enforced" -and ([string]::IsNullOrWhiteSpace($_.UpstreamRemote) -or [string]::IsNullOrWhiteSpace($_.UpstreamBranch)) })
$enforcedWithoutRollout = @($IdunnDeploymentTargets | Where-Object { $_.Status -eq "enforced" -and ([string]::IsNullOrWhiteSpace($_.RolloutStrategy) -or [string]::IsNullOrWhiteSpace($_.StateMigration) -or [string]::IsNullOrWhiteSpace($_.ZeroDowntime)) })
$blockedWithoutReason = @($IdunnDeploymentTargets | Where-Object { $_.Status -in @("blocked", "external-owned") -and [string]::IsNullOrWhiteSpace($_.Reason) })
@ -16,6 +16,27 @@ $deployScriptsWithoutIdunnGuard = @(
-not ((Get-Content -Raw -LiteralPath $_.Deploy) -match 'IDUNN_ACTUATOR')
}
)
$knownActuatorPaths = @{}
foreach ($target in $IdunnDeploymentTargets) {
foreach ($path in @($target.Deploy, $target.Restart) + @($target.Aliases)) {
if (-not [string]::IsNullOrWhiteSpace($path)) {
$knownActuatorPaths[[System.IO.Path]::GetFullPath($path).ToLowerInvariant()] = $target.Id
}
}
}
foreach ($path in $IdunnDeploymentSharedActuators) {
if (-not [string]::IsNullOrWhiteSpace($path)) {
$knownActuatorPaths[[System.IO.Path]::GetFullPath($path).ToLowerInvariant()] = "shared"
}
}
$guardedActuatorsWithoutCatalog = @(
Get-ChildItem -LiteralPath $PSScriptRoot -File |
Where-Object {
$_.Name -match '^(deploy|restart)-.*\.(ps1|cmd)$' -and
(Get-Content -Raw -LiteralPath $_.FullName) -match 'IDUNN_ACTUATOR' -and
-not $knownActuatorPaths.ContainsKey([System.IO.Path]::GetFullPath($_.FullName).ToLowerInvariant())
}
)
$issues = @()
if ($unknown.Count) {
@ -36,6 +57,9 @@ if ($enforcedWithoutRollout.Count) {
if ($deployScriptsWithoutIdunnGuard.Count) {
$issues += "enforced deploy script missing Idunn actuator guard: $($deployScriptsWithoutIdunnGuard.Id -join ', ')"
}
if ($guardedActuatorsWithoutCatalog.Count) {
$issues += "guarded deploy/restart actuator missing Idunn catalog entry: $($guardedActuatorsWithoutCatalog.Name -join ', ')"
}
if ($blockedWithoutReason.Count) {
$issues += "blocked/external target missing reason: $($blockedWithoutReason.Id -join ', ')"
}
@ -48,4 +72,4 @@ $enforced = @($IdunnDeploymentTargets | Where-Object { $_.Status -eq "enforced"
$runtimeEnforced = @($IdunnDeploymentTargets | Where-Object { $_.Status -eq "runtime-enforced" })
$blocked = @($IdunnDeploymentTargets | Where-Object { $_.Status -eq "blocked" })
$external = @($IdunnDeploymentTargets | Where-Object { $_.Status -eq "external-owned" })
Write-Host "Idunn deployment catalog coherent: $($IdunnDeploymentTargets.Count) targets, $($enforced.Count) deploy-enforced with upstream rollout contracts, $($runtimeEnforced.Count) runtime-enforced, $($blocked.Count) blocked, $($external.Count) external-owned."
Write-Host "Idunn deployment catalog coherent: $($IdunnDeploymentTargets.Count) targets, $($enforced.Count) deploy-enforced with upstream rollout contracts, $($runtimeEnforced.Count) runtime-enforced, $($blocked.Count) blocked, $($external.Count) external-owned, $($knownActuatorPaths.Count) cataloged actuator paths."

View file

@ -1,2 +1,3 @@
@echo off
curl.exe -fsS http://127.0.0.1:8795/health >NUL
echo health-mimir-eve-dashboard.cmd archived: Mimir Eve dashboard health is daemon-published over CultNet/RUDP as mimir.cultnet-rudp-provider-health. Do not probe localhost HTTP for daemon health. 1>&2
exit /b 2

View file

@ -1,2 +1,3 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-muninn.ps1
echo health-muninn.cmd archived: Raven Muninn health is daemon-published over CultNet/RUDP as muninn.cultnet-rudp-remote-telemetry-health. Use health-muninn.ps1 only as an explicit witness inspection, not Idunn health truth.
exit /b 2

View file

@ -5,8 +5,7 @@ param(
[string] $ActivateStorePath = "C:\Meta\Odin\state\muninn.activate.cc",
[string] $LogRoot = "C:\Meta\Odin\logs\muninn",
[int] $MaxStoreAgeSeconds = 180,
[string] $IdunnRudpHealth = "192.168.1.66:17870",
[string] $CaptureCommandRudpBind = "0.0.0.0:17883",
[string] $IdunnRudpHealth = $env:IDUNN_RUDP_HEALTH,
[int] $ConnectTimeoutSeconds = 10,
[string] $SshUser = "madman's lullaby",
[string] $IdentityFile = ""
@ -14,6 +13,10 @@ param(
$ErrorActionPreference = "Stop"
if ([string]::IsNullOrWhiteSpace($IdunnRudpHealth)) {
throw "Idunn RUDP health endpoint must be supplied by -IdunnRudpHealth or IDUNN_RUDP_HEALTH; no Starfire LAN default is allowed."
}
function Set-AsciiFile {
param(
[Parameter(Mandatory = $true)] [string] $Path,
@ -97,8 +100,7 @@ if (-not (Test-Path -LiteralPath "$MuninnExe")) {
}
`$muninnDir = Split-Path -Parent "$MuninnExe"
`$taskExpectations = @(
@{ Name = "GameCult-Muninn"; Launcher = "powershell"; Vbs = Join-Path `$muninnDir "start-muninn-serve-hidden.vbs"; Ps = Join-Path `$muninnDir "start-muninn-serve.ps1" },
@{ Name = "GameCult-Muninn-VideoProof"; Launcher = "wscript"; Vbs = Join-Path `$muninnDir "muninn-raven-video-to-starfire-obs-hidden.vbs"; Ps = Join-Path `$muninnDir "muninn-raven-video-to-starfire-obs.ps1" }
@{ Name = "GameCult-Muninn"; Launcher = "powershell"; Vbs = Join-Path `$muninnDir "start-muninn-serve-hidden.vbs"; Ps = Join-Path `$muninnDir "start-muninn-serve.ps1" }
)
foreach (`$expectation in `$taskExpectations) {
`$task = Get-ScheduledTask -TaskName `$expectation.Name -ErrorAction Stop
@ -137,33 +139,6 @@ foreach (`$expectation in `$taskExpectations) {
if (`$psContent -notmatch 'Start-Process') {
throw "`$(`$expectation.Ps) does not launch a hidden process"
}
if (`$expectation.Name -eq "GameCult-Muninn-VideoProof" -and `$psContent -notmatch 'ffmpeg\.exe') {
throw "`$(`$expectation.Ps) does not launch ffmpeg.exe"
}
if (`$expectation.Name -eq "GameCult-Muninn-VideoProof" -and `$psContent -notmatch 'srt://.+:\d+\?mode=caller') {
throw "`$(`$expectation.Ps) does not carry the expected SRT caller target"
}
if (`$expectation.Name -eq "GameCult-Muninn-VideoProof") {
foreach (`$requiredPair in @(
@("'-c:v'\s*,\s*'h264_nvenc'", "h264_nvenc video encoder"),
@("'-preset'\s*,\s*'p1'", "NVENC p1 preset"),
@("'-tune'\s*,\s*'ull'", "ultra-low-latency tune"),
@("'-zerolatency'\s*,\s*'1'", "zero-latency encoder flag"),
@("'-bf'\s*,\s*'0'", "disabled B-frames"),
@("'-delay'\s*,\s*'0'", "zero encoder delay"),
@("'-rc'\s*,\s*'cbr'", "CBR rate control"),
@("'-rc-lookahead'\s*,\s*'0'", "disabled lookahead"),
@("'-bufsize'\s*,\s*'400k'", "one-frame VBV buffer"),
@("'-forced-idr'\s*,\s*'1'", "forced IDR keyframes")
)) {
if (`$psContent -notmatch `$requiredPair[0]) {
throw "`$(`$expectation.Ps) does not carry `$(`$requiredPair[1])"
}
}
if (`$psContent -match "'-preset'\s*,\s*'p4'|24000k") {
throw "`$(`$expectation.Ps) still carries legacy buffered NVENC settings"
}
}
`$vbs = Get-Content -LiteralPath `$expectation.Vbs -Raw
if (`$vbs -match 'cmdPath\s*=') {
throw "`$(`$expectation.Vbs) still routes through a cmdPath trampoline"
@ -175,6 +150,9 @@ foreach (`$expectation in `$taskExpectations) {
if (Get-ScheduledTask -TaskName "GameCult-Muninn-Activate" -ErrorAction SilentlyContinue) {
throw "Obsolete GameCult-Muninn-Activate task is still present on Raven"
}
if (Get-ScheduledTask -TaskName "GameCult-Muninn-VideoProof" -ErrorAction SilentlyContinue) {
throw "Obsolete GameCult-Muninn-VideoProof task is still present on Raven"
}
`$servePidPath = Join-Path "$LogRoot" "muninn-serve.pid"
`$servePid = `$null
if (Test-Path -LiteralPath `$servePidPath) {
@ -200,7 +178,6 @@ if (`$null -eq `$process) {
foreach (`$pattern in @(
"--host raven",
"--activate-store $ActivateStorePath",
"--capture-command-rudp-bind $CaptureCommandRudpBind",
"--idunn-rudp-health $IdunnRudpHealth",
"--idunn-daemon muninn",
"--idunn-health-contract muninn.cultnet-rudp-remote-telemetry-health"

View file

@ -1,2 +1,3 @@
@echo off
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File "%~dp0health-nightwing-eve-browser-reference.ps1" %*
echo health-nightwing-eve-browser-reference.cmd archived: Nightwing Eve browser reference health is daemon-published over CultNet/RUDP as nightwing.cultnet-rudp-browser-reference-health. Use health-nightwing-eve-browser-reference.ps1 only as an explicit witness inspection, not Idunn health truth.
exit /b 2

View file

@ -265,8 +265,8 @@ if ($inspection.commandBoundary.writesAccepted) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve browser reference command boundary unexpectedly accepts writes."
}
if ($inspection.commandBoundary.lifecycleAuthority -notmatch "nightwing-eve-browser-reference\.service") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve browser reference lifecycle authority is '$($inspection.commandBoundary.lifecycleAuthority)', expected the systemd service to remain the compatibility lifecycle witness."
if ($inspection.commandBoundary.lifecycleAuthority -ne "idunn-supervisor-command.restart") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve browser reference lifecycle authority is '$($inspection.commandBoundary.lifecycleAuthority)', expected 'idunn-supervisor-command.restart'."
}
if ($null -eq $inspection.transportProfile) {
@ -277,8 +277,8 @@ if ($inspection.transportProfile.currentState -ne "partial-rudp-health-and-provi
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve browser reference transport profile state is '$($inspection.transportProfile.currentState)', expected 'partial-rudp-health-and-provider-store-live'."
}
if ($inspection.transportProfile.inputTransport -ne "compatibility.http-static-lowering") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve browser reference input transport is '$($inspection.transportProfile.inputTransport)', expected 'compatibility.http-static-lowering'."
if ($inspection.transportProfile.inputTransport -ne "http-static-lowering") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve browser reference input transport is '$($inspection.transportProfile.inputTransport)', expected 'http-static-lowering'."
}
if ($inspection.transportProfile.outputTransport -ne "daemon-owned-cultcache-boundary-store + daemon-published-rudp-health") {

View file

@ -1,2 +1,3 @@
@echo off
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File "%~dp0health-nightwing-eve-dashboard.ps1" %*
echo health-nightwing-eve-dashboard.cmd archived: Nightwing Eve dashboard broker health is not daemon truth. Rebuild typed CultMesh/Odin dashboard state before restoring a health check. 1>&2
exit /b 2

View file

@ -1,431 +1 @@
param(
[string] $SshTarget = "nightwing",
[string] $RemoteCultMeshState = "/var/lib/gamecult/eve-dashboard/cultmesh/eve-dashboard.ccmp",
[string] $RemoteCultCacheWitness = "/var/lib/gamecult/eve-dashboard/cultcache/eve-dashboard.service.cc",
[string] $LegacyWindowsWitness = "/opt/gamecult/eve-dashboard/E:\\Projects\\Mimir\\state\\eve-dashboard-cultnet.ccmp",
[int] $MaxWitnessAgeSeconds = 120,
[int] $MinProviders = 1
)
$ErrorActionPreference = "Stop"
function Fail-IdunnHealth {
param(
[string] $State,
[string] $Message
)
Write-Output "idunn.health.state=$State"
throw $Message
}
function Invoke-SshText {
param(
[string] $Command,
[string] $FailureMessage,
[string] $FailureState = "failed"
)
$output = ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $SshTarget $Command
if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($output)) {
Fail-IdunnHealth -State $FailureState -Message $FailureMessage
}
return $output
}
function Get-CultCacheInspection {
param(
[string] $WitnessCopyPath,
[string] $InspectorPackageJson,
[string] $Mode
)
$nodeScript = @'
const fs = require("fs");
const { createRequire } = require("module");
const witnessCopyPath = process.argv[2];
const inspectorPackageJson = process.argv[3];
const mode = process.argv[4];
const requireCultCacheInspection = createRequire(inspectorPackageJson);
const { inspectCultCacheBytes } = requireCultCacheInspection("cultcache-ts");
const inspection = inspectCultCacheBytes(witnessCopyPath, fs.readFileSync(witnessCopyPath));
function firstRecord(schemaName) {
return inspection.records.find((record) => record.schemaName === schemaName) ?? null;
}
function allRecords(schemaName) {
return inspection.records.filter((record) => record.schemaName === schemaName);
}
function previewArray(record) {
return Array.isArray(record && record.payloadPreview) ? record.payloadPreview : [];
}
function normalizeDashboardState(record) {
if (!record) {
return null;
}
const preview = previewArray(record);
const surface = Array.isArray(preview[7]) ? preview[7] : [];
const root = Array.isArray(surface[3]) ? surface[3] : [];
const children = Array.isArray(root[11]) ? root[11] : [];
return {
schemaName: record.schemaName,
storedAt: record.storedAt,
providerId: preview[0] ?? "",
title: preview[1] ?? "",
version: preview[2] ?? 0,
updatedAtUtc: preview[3] ?? "",
selectedNodeId: preview[4] ?? "",
lutPreset: preview[5] ?? "",
nodeCount: Array.isArray(preview[6]) ? preview[6].length : 0,
surfaceSchema: surface[0] ?? "",
surfaceId: surface[1] ?? "",
surfaceTitle: surface[2] ?? "",
surfaceRootKind: root[1] ?? "",
surfaceChildCount: children.length,
assetCount: Array.isArray(surface[4]) ? surface[4].length : 0,
};
}
function normalizeManifest(record) {
if (!record) {
return null;
}
const preview = previewArray(record);
return {
schemaName: record.schemaName,
storedAt: record.storedAt,
providerId: preview[0] ?? "",
title: preview[1] ?? "",
description: preview[2] ?? "",
version: preview[3] ?? "",
endpoint: preview[4] ?? "",
capabilityCount: Array.isArray(preview[5]) ? preview[5].length : 0,
usesCultMesh: preview[6] === true,
transport: preview[7] ?? "",
};
}
function normalizeCommandBoundary(record) {
if (!record) {
return null;
}
const preview = previewArray(record);
return {
schemaName: record.schemaName,
storedAt: record.storedAt,
daemonId: preview[0] ?? "",
updatedAtUtc: preview[1] ?? "",
mode: preview[2] ?? "",
writesAccepted: preview[3] === true,
operatorInputAuthority: preview[4] ?? "",
lifecycleAuthority: preview[5] ?? "",
acceptedCommands: Array.isArray(preview[6]) ? preview[6] : [],
rejectedCommands: Array.isArray(preview[7]) ? preview[7] : [],
};
}
function normalizeTransportProfile(record) {
if (!record) {
return null;
}
const preview = previewArray(record);
return {
schemaName: record.schemaName,
storedAt: record.storedAt,
daemonId: preview[0] ?? "",
updatedAtUtc: preview[1] ?? "",
currentState: preview[2] ?? "",
inputTransport: preview[3] ?? "",
outputTransport: preview[4] ?? "",
healthContract: preview[5] ?? "",
idunnRudpHealth: preview[6] ?? "",
witnessPath: preview[7] ?? "",
currentCutLine: preview[8] ?? "",
};
}
function normalizeDaemonHealth(record) {
if (!record) {
return null;
}
const preview = previewArray(record);
return {
schemaName: record.schemaName,
storedAt: record.storedAt,
daemonId: preview[0] ?? "",
state: preview[1] ?? "",
detail: preview[2] ?? "",
observedAt: preview[3] ?? "",
healthContract: preview[4] ?? "",
publicationSource: preview[5] ?? "",
transport: preview[6] ?? "",
};
}
let payload;
switch (mode) {
case "dashboard-state":
payload = {
format: inspection.format,
schemaVersions: inspection.catalog.map((entry) => entry.schemaVersion),
dashboardState: normalizeDashboardState(firstRecord("mimir.eve_dashboard_state")),
};
break;
case "dashboard-boundary":
payload = {
format: inspection.format,
schemaVersions: inspection.catalog.map((entry) => entry.schemaVersion),
brokerManifest: normalizeManifest(allRecords("mimir.eve_dashboard_manifest").find((record) => record.key === "eve.dashboard.broker") ?? null),
providerManifests: allRecords("mimir.eve_dashboard_manifest")
.filter((record) => record.key !== "eve.dashboard.broker")
.map(normalizeManifest),
commandBoundary: normalizeCommandBoundary(firstRecord("mimir.eve_dashboard_command_boundary")),
transportProfile: normalizeTransportProfile(firstRecord("mimir.eve_dashboard_transport_profile")),
daemonHealthRecords: allRecords("idunn.daemon_health").map(normalizeDaemonHealth),
};
break;
default:
throw new Error(`Unknown inspection mode '${mode}'.`);
}
console.log(JSON.stringify(payload));
'@
$inspectionJson = $nodeScript | node - $WitnessCopyPath $InspectorPackageJson $Mode
if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($inspectionJson)) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard witness inspection failed for mode '$Mode'."
}
try {
return $inspectionJson | ConvertFrom-Json
} catch {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard witness inspection returned malformed JSON for mode '$Mode'."
}
}
ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $SshTarget "systemctl is-active --quiet nightwing-eve-dashboard.service"
if ($LASTEXITCODE -ne 0) {
Fail-IdunnHealth -State "failed" -Message "nightwing-eve-dashboard.service is not active on Nightwing."
}
$cultMeshStateStat = Invoke-SshText `
-Command "stat -c '%s %Y' '$RemoteCultMeshState' 2>/dev/null" `
-FailureMessage "Nightwing Eve dashboard CultMesh state witness is missing at $RemoteCultMeshState."
$cultMeshStateParts = $cultMeshStateStat.Trim() -split '\s+'
if ($cultMeshStateParts.Length -lt 2) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultMesh state stat output was malformed: $cultMeshStateStat"
}
$cultMeshStateSize = [int64]$cultMeshStateParts[0]
$cultMeshStateModifiedUtc = [DateTimeOffset]::FromUnixTimeSeconds([int64]$cultMeshStateParts[1])
$cultMeshStateAgeSeconds = ([DateTimeOffset]::UtcNow - $cultMeshStateModifiedUtc).TotalSeconds
if ($cultMeshStateSize -le 0) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultMesh state witness at $RemoteCultMeshState is empty."
}
if ($cultMeshStateAgeSeconds -gt $MaxWitnessAgeSeconds) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultMesh state witness is stale ($([math]::Round($cultMeshStateAgeSeconds))s old)."
}
$cultCacheStat = Invoke-SshText `
-Command "stat -c '%s %Y' '$RemoteCultCacheWitness' 2>/dev/null" `
-FailureMessage "Nightwing Eve dashboard CultCache witness is missing at $RemoteCultCacheWitness."
$cultCacheParts = $cultCacheStat.Trim() -split '\s+'
if ($cultCacheParts.Length -lt 2) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultCache witness stat output was malformed: $cultCacheStat"
}
$cultCacheSize = [int64]$cultCacheParts[0]
$cultCacheModifiedUtc = [DateTimeOffset]::FromUnixTimeSeconds([int64]$cultCacheParts[1])
$cultCacheAgeSeconds = ([DateTimeOffset]::UtcNow - $cultCacheModifiedUtc).TotalSeconds
if ($cultCacheSize -le 0) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultCache witness at $RemoteCultCacheWitness is empty."
}
if ($cultCacheAgeSeconds -gt $MaxWitnessAgeSeconds) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultCache witness is stale ($([math]::Round($cultCacheAgeSeconds))s old)."
}
try {
$cultCacheInspectorPackageJson = (Resolve-Path (Join-Path $PSScriptRoot "..\..\CultLib\packages\cultcache-ts\package.json")).Path
} catch {
Fail-IdunnHealth -State "failed" -Message "CultCache inspector package is missing from the local Odin body."
}
$cultMeshWitnessCopy = Join-Path ([System.IO.Path]::GetTempPath()) ("nightwing-eve-dashboard-state-" + [Guid]::NewGuid().ToString("N") + ".ccmp")
$cultCacheWitnessCopy = Join-Path ([System.IO.Path]::GetTempPath()) ("nightwing-eve-dashboard-boundary-" + [Guid]::NewGuid().ToString("N") + ".cc")
try {
$remoteCultMeshBase64 = Invoke-SshText `
-Command "base64 -w0 '$RemoteCultMeshState' 2>/dev/null" `
-FailureMessage "Nightwing Eve dashboard CultMesh witness could not be copied from Nightwing."
[System.IO.File]::WriteAllBytes($cultMeshWitnessCopy, [Convert]::FromBase64String($remoteCultMeshBase64.Trim()))
$cultMeshInspection = Get-CultCacheInspection -WitnessCopyPath $cultMeshWitnessCopy -InspectorPackageJson $cultCacheInspectorPackageJson -Mode "dashboard-state"
$remoteCultCacheBase64 = Invoke-SshText `
-Command "base64 -w0 '$RemoteCultCacheWitness' 2>/dev/null" `
-FailureMessage "Nightwing Eve dashboard CultCache witness could not be copied from Nightwing."
[System.IO.File]::WriteAllBytes($cultCacheWitnessCopy, [Convert]::FromBase64String($remoteCultCacheBase64.Trim()))
$cultCacheInspection = Get-CultCacheInspection -WitnessCopyPath $cultCacheWitnessCopy -InspectorPackageJson $cultCacheInspectorPackageJson -Mode "dashboard-boundary"
} catch [FormatException] {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard witness copy was not valid base64."
} finally {
foreach ($temporaryWitness in @($cultMeshWitnessCopy, $cultCacheWitnessCopy)) {
if (Test-Path $temporaryWitness) {
Remove-Item $temporaryWitness -Force -ErrorAction SilentlyContinue
}
}
}
if ($cultMeshInspection.format -ne "cultcache.store.v1") {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultMesh witness has unexpected format '$($cultMeshInspection.format)'."
}
$requiredCultMeshSchemas = @(
"mimir.eve_dashboard_state.v1"
)
$publishedCultMeshSchemas = @($cultMeshInspection.schemaVersions)
foreach ($schema in $requiredCultMeshSchemas) {
if ($publishedCultMeshSchemas -notcontains $schema) {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard CultMesh witness is missing schema '$schema'."
}
}
if ($null -eq $cultMeshInspection.dashboardState) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultMesh witness is missing its dashboard-state record."
}
if ([string]::IsNullOrWhiteSpace($cultMeshInspection.dashboardState.providerId)) {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard CultMesh state is missing a providerId."
}
if ([string]::IsNullOrWhiteSpace($cultMeshInspection.dashboardState.selectedNodeId)) {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard CultMesh state is missing a selectedNodeId."
}
if ([string]::IsNullOrWhiteSpace($cultMeshInspection.dashboardState.title)) {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard CultMesh state is missing a title."
}
if ([int]$cultMeshInspection.dashboardState.nodeCount -le 0) {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard CultMesh state has no nodes."
}
if ($cultCacheInspection.format -ne "cultcache.store.v1") {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultCache witness has unexpected format '$($cultCacheInspection.format)'."
}
$requiredCultCacheSchemas = @(
"mimir.eve_dashboard_manifest.v1",
"mimir.eve_dashboard_command_boundary.v1",
"mimir.eve_dashboard_transport_profile.v1",
"idunn.daemon_health.v1"
)
$publishedCultCacheSchemas = @($cultCacheInspection.schemaVersions)
foreach ($schema in $requiredCultCacheSchemas) {
if ($publishedCultCacheSchemas -notcontains $schema) {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard CultCache witness is missing schema '$schema'."
}
}
if ($null -eq $cultCacheInspection.brokerManifest) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultCache witness is missing its broker manifest record."
}
if ($cultCacheInspection.brokerManifest.providerId -ne "eve.dashboard.broker") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard broker manifest advertises provider '$($cultCacheInspection.brokerManifest.providerId)', expected 'eve.dashboard.broker'."
}
if ([int]@($cultCacheInspection.providerManifests).Count -lt $MinProviders) {
Fail-IdunnHealth -State "dependency-unavailable" -Message "Nightwing Eve dashboard has too few provider manifests in its daemon-owned witness: providers=$(@($cultCacheInspection.providerManifests).Count), expected at least $MinProviders."
}
if ($null -eq $cultCacheInspection.commandBoundary) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultCache witness is missing its command boundary record."
}
if ($cultCacheInspection.commandBoundary.mode -ne "operator-write-through-broker") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard command boundary mode is '$($cultCacheInspection.commandBoundary.mode)', expected 'operator-write-through-broker'."
}
if (-not $cultCacheInspection.commandBoundary.writesAccepted) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard command boundary unexpectedly rejects writes."
}
if ($cultCacheInspection.commandBoundary.lifecycleAuthority -notmatch "nightwing-eve-dashboard\.service") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard lifecycle authority is '$($cultCacheInspection.commandBoundary.lifecycleAuthority)', expected the systemd service to remain the compatibility lifecycle witness."
}
if ($null -eq $cultCacheInspection.transportProfile) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard CultCache witness is missing its transport profile record."
}
if ($cultCacheInspection.transportProfile.currentState -ne "partial-rudp-health-and-provider-store-live") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard transport profile state is '$($cultCacheInspection.transportProfile.currentState)', expected 'partial-rudp-health-and-provider-store-live'."
}
if ($cultCacheInspection.transportProfile.inputTransport -ne "compatibility.http-websocket-client-lowering + compatibility.websocket-binary-command-lowering") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard input transport is '$($cultCacheInspection.transportProfile.inputTransport)', expected 'compatibility.http-websocket-client-lowering + compatibility.websocket-binary-command-lowering'."
}
if ($cultCacheInspection.transportProfile.outputTransport -ne "daemon-owned-cultcache-provider-store + daemon-published-rudp-health") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard output transport is '$($cultCacheInspection.transportProfile.outputTransport)', expected 'daemon-owned-cultcache-provider-store + daemon-published-rudp-health'."
}
if ($cultCacheInspection.transportProfile.idunnRudpHealth -ne "idunn.health-published-separately") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard transport profile Idunn health publication is '$($cultCacheInspection.transportProfile.idunnRudpHealth)', expected 'idunn.health-published-separately'."
}
if ($cultCacheInspection.transportProfile.witnessPath -ne $RemoteCultCacheWitness) {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard transport profile witness path is '$($cultCacheInspection.transportProfile.witnessPath)', expected '$RemoteCultCacheWitness'."
}
$matchingHealthRecord = @($cultCacheInspection.daemonHealthRecords | Where-Object {
$_.healthContract -eq $cultCacheInspection.transportProfile.healthContract
}) | Select-Object -First 1
if ($null -eq $matchingHealthRecord) {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard has no daemon-health record matching contract '$($cultCacheInspection.transportProfile.healthContract)'."
}
if ($matchingHealthRecord.state -ne "healthy") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard daemon-health state is '$($matchingHealthRecord.state)', expected 'healthy'."
}
if ($matchingHealthRecord.publicationSource -ne "daemon-published") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard daemon-health publication source is '$($matchingHealthRecord.publicationSource)', expected 'daemon-published'."
}
if ($matchingHealthRecord.transport -ne "cultnet.transport.rudp.v0") {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard daemon-health transport is '$($matchingHealthRecord.transport)', expected 'cultnet.transport.rudp.v0'."
}
try {
$matchingHealthObservedAtUtc = [DateTimeOffset]::Parse($matchingHealthRecord.observedAt)
} catch {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard daemon-health observedAt is malformed: '$($matchingHealthRecord.observedAt)'."
}
$matchingHealthAgeSeconds = ([DateTimeOffset]::UtcNow - $matchingHealthObservedAtUtc.ToUniversalTime()).TotalSeconds
if ($matchingHealthAgeSeconds -gt $MaxWitnessAgeSeconds) {
Fail-IdunnHealth -State "failed" -Message "Nightwing Eve dashboard daemon-health record is stale ($([math]::Round($matchingHealthAgeSeconds))s old)."
}
$legacyWitnessStillExists = ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $SshTarget "test ! -e '$LegacyWindowsWitness'"
if ($LASTEXITCODE -ne 0) {
Fail-IdunnHealth -State "degraded" -Message "Nightwing Eve dashboard still has the legacy Windows-shaped witness file at $LegacyWindowsWitness."
}
Write-Host "Nightwing Eve dashboard is active, its CultMesh and CultCache witnesses are fresh, and the daemon-owned boundary store advertises $(@($cultCacheInspection.providerManifests).Count) providers."
throw "health-nightwing-eve-dashboard.ps1 archived: Nightwing Eve dashboard broker health is not daemon truth. Inspect typed CultMesh/Odin dashboard state after the publisher is rebuilt."

View file

@ -1,2 +1,3 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-nightwing-gjallar.ps1
echo health-nightwing-gjallar.cmd archived: Gjallar health is daemon-published over CultNet/RUDP as gjallar.cultnet-rudp-framebuffer-composition-health. Use health-nightwing-gjallar.ps1 only as an explicit witness inspection, not Idunn health truth.
exit /b 2

View file

@ -1,2 +1,3 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-nightwing-muninn.ps1
echo health-nightwing-muninn.cmd archived: Nightwing Muninn health is daemon-published over CultNet/RUDP as muninn.cultnet-rudp-remote-telemetry-and-move-hid. Use health-nightwing-muninn.ps1 only as an explicit witness inspection, not Idunn health truth.
exit /b 2

View file

@ -6,11 +6,15 @@ param(
[string[]] $MoveState = @(),
[int] $IntervalSeconds = 15,
[int] $MaxStoreAgeSeconds = 180,
[string] $IdunnRudpHealth = "10.77.0.2:17870"
[string] $IdunnRudpHealth = $env:IDUNN_RUDP_HEALTH
)
$ErrorActionPreference = "Stop"
if ([string]::IsNullOrWhiteSpace($IdunnRudpHealth)) {
throw "Idunn RUDP health endpoint must be supplied by -IdunnRudpHealth or IDUNN_RUDP_HEALTH; no WireGuard endpoint default is allowed."
}
function Set-AsciiFile {
param(
[Parameter(Mandatory = $true)] [string] $Path,

View file

@ -1,2 +1,3 @@
@echo off
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-odin.ps1
echo health-odin.cmd archived: Odin health is daemon-published over CultNet/RUDP as odin.cultnet-rudp-provider-health. Use health-odin.ps1 only as an explicit daemon witness inspection, not Idunn health truth.
exit /b 2

View file

@ -1,5 +1,4 @@
param(
[int] $Port = 8797,
[string] $StateDir = "E:\Projects\Odin\scratch\odin",
[int] $MaxSilenceSeconds = 120,
[string] $CultNetRudpBind = "0.0.0.0:17871"
@ -10,6 +9,7 @@ $ErrorActionPreference = "Stop"
$pidPath = Join-Path $StateDir "odin.pid"
$outLog = Join-Path $StateDir "odin.out.log"
$errLog = Join-Path $StateDir "odin.err.log"
$cachePath = Join-Path $StateDir "odin.ccmp"
if (-not (Test-Path -LiteralPath $pidPath)) {
throw "Odin PID file is missing at $pidPath"
@ -28,7 +28,6 @@ if ($null -eq $process) {
foreach ($pattern in @(
'node.exe',
'src\odin-coordinator.cjs',
"--port $Port",
"--stateDir $StateDir",
"--cultnet-rudp-bind $CultNetRudpBind",
'--idunn-daemon odin',
@ -50,23 +49,12 @@ $newestLogWriteUtc = @($outLog, $errLog) |
Sort-Object -Descending |
Select-Object -First 1
$logAgeSeconds = ([DateTime]::UtcNow - $newestLogWriteUtc).TotalSeconds
$healthUri = "http://127.0.0.1:$Port/health"
try {
$health = Invoke-RestMethod -Uri $healthUri -TimeoutSec 10
} catch {
throw "Odin health endpoint is unavailable at ${healthUri}: $($_.Exception.Message)"
if ($logAgeSeconds -gt $MaxSilenceSeconds) {
throw "Odin logs have been silent for $([math]::Round($logAgeSeconds))s, exceeding $MaxSilenceSeconds seconds"
}
if (-not $health.ok) {
throw "Odin health endpoint reports ok=false"
}
$tcpListener = Get-NetTCPConnection -State Listen -LocalPort $Port -ErrorAction SilentlyContinue |
Where-Object { $_.OwningProcess -eq [int]$pidText } |
Select-Object -First 1
if ($null -eq $tcpListener) {
throw "Odin is not listening on TCP port $Port as process $pidText"
if (-not (Test-Path -LiteralPath $cachePath)) {
throw "Odin CultMesh store is missing at $cachePath"
}
$rudpPort = [int](($CultNetRudpBind -split ':')[-1])
@ -77,4 +65,4 @@ if ($null -eq $udpListener) {
throw "Odin is not listening on UDP port $rudpPort as process $pidText"
}
Write-Host "Odin healthy: pid=$pidText tcp=$Port udp=$rudpPort log_age=$([math]::Round($logAgeSeconds))s"
Write-Host "Odin healthy: pid=$pidText cultmesh_rudp_udp=$rudpPort store=$cachePath log_age=$([math]::Round($logAgeSeconds))s"

View file

@ -1,2 +1,3 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-muninn.ps1
echo health-raven-capture-mux.cmd archived: Raven capture mux no longer owns Muninn daemon health; Muninn publishes muninn.cultnet-rudp-remote-telemetry-health over CultNet/RUDP.
exit /b 2

View file

@ -1,7 +1,2 @@
param(
[string] $RavenHost = "raven"
)
$script = Join-Path $PSScriptRoot "health-muninn.ps1"
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File $script -RavenHost $RavenHost
exit $LASTEXITCODE
Write-Error "health-raven-capture-mux.ps1 archived: Raven capture mux no longer owns Muninn daemon health; Muninn publishes muninn.cultnet-rudp-remote-telemetry-health over CultNet/RUDP."
exit 2

View file

@ -1,2 +1,3 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-starfire-muninn.ps1
echo health-starfire-muninn.cmd archived: Starfire Muninn health is daemon-published over CultNet/RUDP as muninn.cultnet-rudp-local-telemetry-and-quest-access. Use health-starfire-muninn.ps1 only as an explicit witness inspection, not Idunn health truth.
exit /b 2

View file

@ -4,11 +4,15 @@ param(
[string] $LogRoot = "C:\Meta\Odin\logs\starfire-muninn",
[string[]] $MoveState = @(),
[int] $MaxStoreAgeSeconds = 180,
[string] $IdunnRudpHealth = "127.0.0.1:17870"
[string] $IdunnRudpHealth = $env:IDUNN_RUDP_HEALTH
)
$ErrorActionPreference = "Stop"
if ([string]::IsNullOrWhiteSpace($IdunnRudpHealth)) {
throw "Idunn RUDP health endpoint must be supplied by -IdunnRudpHealth or IDUNN_RUDP_HEALTH; no Starfire LAN default is allowed."
}
if (-not (Test-Path -LiteralPath $MuninnExe)) {
throw "Muninn executable not found at $MuninnExe"
}

View file

@ -1,2 +1,3 @@
@echo off
curl.exe -fsS http://127.0.0.1:8802/health >NUL
echo health-stonks.cmd archived: Stonks health is daemon-published over CultNet/RUDP as stonks.cultnet-rudp-market-health. Do not probe localhost HTTP for daemon health. 1>&2
exit /b 2

View file

@ -1,2 +1,3 @@
@echo off
curl.exe -fsS http://10.77.0.4:8824/health >nul
echo health-vili.cmd archived: Vili health is daemon-published over CultNet/RUDP as vili.cultnet-rudp-animation-health. Do not probe HTTP for daemon health. 1>&2
exit /b 2

View file

@ -1,2 +1,3 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-voidbot.ps1
echo health-voidbot.cmd archived: VoidBot health is daemon-published over CultNet/RUDP as voidbot.cultnet-rudp-stack-health. Use health-voidbot.ps1 only as an explicit witness inspection, not Idunn health truth. 1>&2
exit /b 2

View file

@ -1,2 +1,3 @@
@echo off
call E:\Projects\weksa\scripts\health-weksa-daemon.cmd
echo health-weksa.cmd archived: Weksa health is daemon-published over CultNet/RUDP as weksa.cultnet-rudp-provider-health. Do not run local command health for daemon truth. 1>&2
exit /b 2

View file

@ -1,2 +1,3 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-yggdrasil-source-app.ps1 -AppId yggdrasil-heimdall -RepoRoot E:\Projects\Heimdall -RemoteAppHome /srv/heimdall -CheckScript E:\Projects\gamecult-ops\scripts\check-heimdall.sh
echo health-yggdrasil-heimdall.cmd archived: Heimdall health is daemon-published over CultNet/RUDP as heimdall.cultnet-rudp-provider-health. Use health-yggdrasil-source-app.ps1 only as an explicit deployment witness, not Idunn health truth.
exit /b 2

View file

@ -1,2 +1,3 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-yggdrasil-source-app.ps1 -AppId yggdrasil-repixelizer -RepoRoot E:\Projects\repixelizer -RemoteAppHome /srv/repixelizer -CheckScript E:\Projects\gamecult-ops\scripts\check-repixelizer-gui.sh
echo health-yggdrasil-repixelizer.cmd archived: Repixelizer health is daemon-published over CultNet/RUDP as repixelizer.cultnet-rudp-service-health. Use health-yggdrasil-source-app.ps1 only as an explicit deployment witness, not Idunn health truth.
exit /b 2

View file

@ -1,2 +1,3 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-yggdrasil-source-app.ps1 -AppId yggdrasil-streampixels -RepoRoot E:\Projects\StreamPixels -RemoteAppHome /srv/streampixels -CheckScript E:\Projects\gamecult-ops\scripts\check-streampixels-preview.sh
echo health-yggdrasil-streampixels.cmd archived: StreamPixels health is daemon-published over CultNet/RUDP as streampixels.cultnet-rudp-service-health. Use health-yggdrasil-source-app.ps1 only as an explicit deployment witness, not Idunn health truth.
exit /b 2

View file

@ -1,6 +1,75 @@
$repoRoot = Split-Path -Parent $PSScriptRoot
$IdunnDeploymentSharedActuators = @(
"$repoRoot\scripts\deploy-yggdrasil-source-app.ps1"
)
$IdunnDeploymentTargets = @(
[pscustomobject]@{
Id = "odin"
Repo = "Odin"
LocalPath = "E:\Projects\Odin"
Host = "starfire"
Service = "odin-coordinator"
Status = "runtime-enforced"
Health = "daemon-published-rudp:odin.cultnet-rudp-provider-health"
Deploy = $null
Restart = "$repoRoot\scripts\restart-odin.ps1"
Aliases = @("$repoRoot\scripts\restart-odin.cmd")
Reason = "Central Idunn keeps Odin's all-seer/rendezvous daemon alive; Odin owns Verse discovery while Idunn owns lifecycle actuation."
},
[pscustomobject]@{
Id = "idunn"
Repo = "Odin"
LocalPath = "E:\Projects\Odin"
Host = "starfire"
Service = "idunn swarm supervisor"
Status = "runtime-enforced"
Health = $null
Deploy = $null
Restart = $null
Aliases = @()
Reason = "start-idunn-local.ps1 is the bootstrap for Idunn itself; it is not a deploy/restart actuator over another daemon."
},
[pscustomobject]@{
Id = "stonks"
Repo = "Stonks"
LocalPath = "E:\Projects\Stonks"
Host = "starfire"
Service = "stonks daemon"
Status = "runtime-enforced"
Health = "daemon-published-rudp:stonks.cultnet-rudp-market-health"
Deploy = $null
Restart = "$repoRoot\scripts\restart-stonks.cmd"
Aliases = @()
Reason = "Stonks publishes market/provider state and daemon health through CultMesh/CultNet; local restart is an Idunn actuator only."
},
[pscustomobject]@{
Id = "weksa"
Repo = "weksa"
LocalPath = "E:\Projects\weksa"
Host = "starfire"
Service = "weksa daemon"
Status = "runtime-enforced"
Health = "daemon-published-rudp:weksa.cultnet-rudp-provider-health"
Deploy = $null
Restart = "$repoRoot\scripts\restart-weksa.cmd"
Aliases = @()
Reason = "Weksa provider state and health are daemon-owned CultMesh/CultNet records; local restart is an Idunn actuator only."
},
[pscustomobject]@{
Id = "voidbot"
Repo = "VoidBot"
LocalPath = "E:\Projects\VoidBot"
Host = "starfire"
Service = "VoidBot local stack"
Status = "runtime-enforced"
Health = "daemon-published-rudp:voidbot.cultnet-rudp-stack-health"
Deploy = $null
Restart = "$repoRoot\scripts\restart-voidbot.cmd"
Aliases = @()
Reason = "VoidBot stack health and provider state publish through daemon-owned CultMesh/CultNet records; restart is an Idunn actuator only."
},
[pscustomobject]@{
Id = "starfire-muninn"
Repo = "Odin"
@ -8,11 +77,25 @@ $IdunnDeploymentTargets = @(
Host = "starfire"
Service = "muninn serve --host starfire"
Status = "runtime-enforced"
Health = "$repoRoot\scripts\health-starfire-muninn.ps1"
Health = "daemon-published-rudp:muninn.cultnet-rudp-local-telemetry-and-quest-access"
Deploy = $null
Restart = "$repoRoot\scripts\restart-starfire-muninn.ps1"
Aliases = @("$repoRoot\scripts\restart-starfire-muninn.cmd")
Reason = "Central Idunn keeps Starfire-local Muninn alive for Quest access and local telemetry surfaces."
},
[pscustomobject]@{
Id = "raven-muninn"
Repo = "Odin"
LocalPath = "E:\Projects\Odin"
Host = "raven"
Service = "muninn serve --host raven"
Status = "runtime-enforced"
Health = "daemon-published-rudp:muninn.cultnet-rudp-remote-telemetry-health"
Deploy = $null
Restart = "$repoRoot\scripts\restart-muninn.ps1"
Aliases = @("$repoRoot\scripts\restart-muninn.cmd")
Reason = "Central Idunn keeps Raven Muninn's remote telemetry posture alive without activating A/V capture as part of keepalive."
},
[pscustomobject]@{
Id = "nightwing-muninn"
Repo = "Odin"
@ -20,11 +103,38 @@ $IdunnDeploymentTargets = @(
Host = "nightwing"
Service = "muninn serve --host nightwing"
Status = "runtime-enforced"
Health = "$repoRoot\scripts\health-nightwing-muninn.ps1"
Health = "daemon-published-rudp:muninn.cultnet-rudp-remote-telemetry-and-move-hid"
Deploy = $null
Restart = "$repoRoot\scripts\restart-nightwing-muninn.ps1"
Aliases = @("$repoRoot\scripts\restart-nightwing-muninn.cmd")
Reason = "Central Idunn reaches Nightwing over SSH and keeps the host-local Muninn Move HID daemon alive."
},
[pscustomobject]@{
Id = "vili"
Repo = "Vili"
LocalPath = "E:\Projects\Vili"
Host = "raven"
Service = "GameCult\\Vili"
Status = "runtime-enforced"
Health = "daemon-published-rudp:vili.cultnet-rudp-animation-health"
Deploy = $null
Restart = "$repoRoot\scripts\restart-vili.cmd"
Aliases = @("$repoRoot\scripts\restart-vili.ps1")
Reason = "Central Idunn keeps Raven Vili's typed motion daemon alive; command requests and health are CultMesh/CultNet-owned."
},
[pscustomobject]@{
Id = "raven-sleipnir"
Repo = "Odin"
LocalPath = "E:\Projects\Odin"
Host = "raven"
Service = "sleipnir --host raven"
Status = "runtime-enforced"
Health = "daemon-published-rudp:sleipnir.cultnet-rudp-input-mirror-health"
Deploy = "$repoRoot\scripts\deploy-raven-sleipnir.ps1"
Restart = "$repoRoot\scripts\restart-raven-sleipnir.ps1"
Aliases = @()
Reason = "Central Idunn reaches Raven over SSH and keeps Sleipnir's hidden scheduled task alive while Sleipnir publishes daemon-owned RUDP health."
},
[pscustomobject]@{
Id = "nightwing-gjallar"
Repo = "Gjallar"
@ -32,9 +142,10 @@ $IdunnDeploymentTargets = @(
Host = "nightwing"
Service = "gjallar.service"
Status = "enforced"
Health = "$repoRoot\scripts\health-nightwing-gjallar.ps1"
Health = "daemon-published-rudp:gjallar.cultnet-rudp-framebuffer-composition-health"
Deploy = "$repoRoot\scripts\deploy-nightwing-gjallar.ps1"
Restart = "$repoRoot\scripts\restart-nightwing-gjallar.ps1"
Aliases = @("$repoRoot\scripts\deploy-nightwing-gjallar.cmd", "$repoRoot\scripts\restart-nightwing-gjallar.cmd")
UpstreamRemote = "origin"
UpstreamBranch = "main"
RolloutStrategy = "restart-after-verified-build"
@ -52,6 +163,7 @@ $IdunnDeploymentTargets = @(
Health = $null
Deploy = $null
Restart = $null
Aliases = @()
Reason = "Committed Bifrost HEAD currently expects UserAccounts.HeimdallAccountId, but Yggdrasil's production database lacks that column and EF reports no pending migration. Idunn must not enforce Bifrost freshness until the Bifrost schema migration path is fixed."
},
[pscustomobject]@{
@ -61,9 +173,10 @@ $IdunnDeploymentTargets = @(
Host = "yggdrasil"
Service = "streampixels-service/streampixels-web"
Status = "enforced"
Health = "$repoRoot\scripts\health-yggdrasil-streampixels.cmd"
Health = "daemon-published-rudp:streampixels.cultnet-rudp-service-health"
Deploy = "$repoRoot\scripts\deploy-yggdrasil-streampixels.cmd"
Restart = $null
Aliases = @("$repoRoot\scripts\deploy-yggdrasil-streampixels.ps1")
UpstreamRemote = "origin"
UpstreamBranch = "main"
RolloutStrategy = "restart-after-verified-build"
@ -78,9 +191,10 @@ $IdunnDeploymentTargets = @(
Host = "yggdrasil"
Service = "heimdall.service"
Status = "enforced"
Health = "$repoRoot\scripts\health-yggdrasil-heimdall.cmd"
Health = "daemon-published-rudp:heimdall.cultnet-rudp-provider-health"
Deploy = "$repoRoot\scripts\deploy-yggdrasil-heimdall.cmd"
Restart = $null
Aliases = @("$repoRoot\scripts\deploy-yggdrasil-heimdall.ps1")
UpstreamRemote = "origin"
UpstreamBranch = "main"
RolloutStrategy = "restart-after-verified-build"
@ -95,9 +209,10 @@ $IdunnDeploymentTargets = @(
Host = "yggdrasil"
Service = "repixelizer-gui.service"
Status = "enforced"
Health = "$repoRoot\scripts\health-yggdrasil-repixelizer.cmd"
Health = "daemon-published-rudp:repixelizer.cultnet-rudp-service-health"
Deploy = "$repoRoot\scripts\deploy-yggdrasil-repixelizer.cmd"
Restart = $null
Aliases = @("$repoRoot\scripts\deploy-yggdrasil-repixelizer.ps1")
UpstreamRemote = "origin"
UpstreamBranch = "main"
RolloutStrategy = "restart-after-verified-build"
@ -115,6 +230,7 @@ $IdunnDeploymentTargets = @(
Health = $null
Deploy = $null
Restart = $null
Aliases = @()
Reason = "GitHub Actions/Pages owns deployment freshness; Idunn should ingest workflow/deployment status before claiming automatic deploy authority."
},
[pscustomobject]@{
@ -127,6 +243,7 @@ $IdunnDeploymentTargets = @(
Health = $null
Deploy = $null
Restart = $null
Aliases = @()
Reason = "Jailbroken iPad native app deployment exists only as an operator runbook; no safe noninteractive Idunn deploy command yet."
},
[pscustomobject]@{
@ -139,6 +256,33 @@ $IdunnDeploymentTargets = @(
Health = $null
Deploy = $null
Restart = $null
Aliases = @()
Reason = "Android USB install requires on-device approval; Idunn must not claim automatic deploy authority until that boundary is solved."
},
[pscustomobject]@{
Id = "nightwing-eve-dashboard"
Repo = "Mimir"
LocalPath = "E:\Projects\Mimir"
Host = "nightwing"
Service = "nightwing-eve-dashboard.service"
Status = "archived"
Health = $null
Deploy = $null
Restart = $null
Aliases = @("$repoRoot\scripts\restart-nightwing-eve-dashboard.cmd")
Reason = "Nightwing Eve dashboard's old HTTP/WebSocket broker is archived. Rebuild it only as typed CultMesh/Odin state publication plus renderer lowering before restoring Idunn lifecycle authority."
},
[pscustomobject]@{
Id = "nightwing-eve-browser-reference"
Repo = "Eve"
LocalPath = "E:\Projects\Eve"
Host = "nightwing"
Service = "nightwing-eve-browser-reference.service"
Status = "runtime-enforced"
Health = "daemon-published-rudp:nightwing.cultnet-rudp-browser-reference-health"
Deploy = $null
Restart = "$repoRoot\scripts\restart-nightwing-eve-browser-reference.ps1"
Aliases = @("$repoRoot\scripts\restart-nightwing-eve-browser-reference.cmd")
Reason = "Nightwing Eve browser reference publishes daemon-owned boundary witnesses and RUDP health; systemd restart is an Idunn actuator only."
}
)

View file

@ -48,10 +48,14 @@ for js in /dev/input/js*; do
props="$(udevadm info -q property -n "$js" 2>/dev/null || true)"
uevent="/sys/class/input/$(basename "$js")/device/device/uevent"
uevent_text="$(cat "$uevent" 2>/dev/null || true)"
is_nav=0
case "$props
$uevent_text" in
*ID_VENDOR_ID=054c*ID_MODEL_ID=03d5*|*ID_MODEL=Motion_Controller*|*HID_ID=0005:0000054C:000003D5*|*HID_ID=0003:0000054C:000003D5*)
;;
*ID_MODEL=Navigation_Controller*|*ID_USB_MODEL=Navigation_Controller*|*ID_MODEL_ID=042f*ID_VENDOR_ID=054c*|*ID_VENDOR_ID=054c*ID_MODEL_ID=042f*|*HID_ID=0005:0000054C:0000042F*|*HID_ID=0003:0000054C:0000042F*|*Sony_Navigation_Controller*|*Sony\ Navigation\ Controller*)
is_nav=1
;;
*)
continue
;;
@ -66,7 +70,13 @@ $uevent_text" in
controller_id="$(controller_id_from_hidraw "$hidraw" 2>/dev/null || true)"
fi
if [ -n "$controller_id" ]; then
if [ "$is_nav" = "1" ] && [ -n "$uniq" ]; then
id="nav-$uniq"
elif [ "$is_nav" = "1" ] && [ -n "$path_tag" ]; then
id="nav-usb-$path_tag"
elif [ "$is_nav" = "1" ]; then
id="nav-$(basename "$js")"
elif [ -n "$controller_id" ]; then
id="move-$controller_id"
elif [ "$bus" = "bluetooth" ] && [ -n "$uniq" ]; then
id="move-$uniq"

View file

@ -0,0 +1,16 @@
param(
[string] $HostAddress = $(if ($env:HERMODR_BIND_HOST) { $env:HERMODR_BIND_HOST } else { "127.0.0.1" }),
[int] $Port = $(if ($env:HERMODR_PORT) { [int]$env:HERMODR_PORT } else { 8798 }),
[string] $OdinCultMeshUri = $(if ($env:HERMODR_ODIN_CULTMESH_URI) { $env:HERMODR_ODIN_CULTMESH_URI } elseif ($env:ODIN_CULTMESH_URI) { $env:ODIN_CULTMESH_URI } else { "cultmesh://odin/rendezvous/provider-catalog" })
)
$ErrorActionPreference = "Stop"
$stop = Join-Path $PSScriptRoot "stop-hermodr.ps1"
$start = Join-Path $PSScriptRoot "start-hermodr.ps1"
if (Test-Path -LiteralPath $stop) {
& $stop
}
& $start -HostAddress $HostAddress -Port $Port -OdinCultMeshUri $OdinCultMeshUri -NoWindow

View file

@ -1,2 +1,10 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo restart-muninn.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo restart-muninn.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\restart-muninn.ps1

View file

@ -1,5 +1,5 @@
param(
[string] $RavenHost = "raven-local",
[string] $RavenHost = "raven.Home",
[string] $MuninnExe = "C:\Meta\Odin\Muninn\muninn.exe",
[string] $StorePath = "C:\Meta\Odin\state\muninn.telemetry.cc",
[string] $ActivateStorePath = "C:\Meta\Odin\state\muninn.activate.cc",
@ -7,32 +7,42 @@ param(
[string] $LocalLoopbackScript = (Join-Path $PSScriptRoot "wasapi-loopback-capture.ps1"),
[string] $LoopbackScript = "C:\Meta\Odin\Muninn\scripts\wasapi-loopback-capture.ps1",
[string] $Ffmpeg = "C:\Users\Madman's Lullaby\AppData\Local\Microsoft\WinGet\Links\ffmpeg.exe",
[string] $TargetHost = "192.168.1.66",
[int] $Port = 5204,
[string] $MediaTransport = "rudp",
[string] $ObsTargetHost = "192.168.1.66",
[int] $ObsPort = 5204,
[string] $MediaTargetUri = $env:MUNINN_MEDIA_TARGET_URI,
[string] $AudioDevice = "Realtek",
[string[]] $VideoSources = @(),
[string[]] $AudioSources = @(),
[string] $IdunnRudpHealth = "192.168.1.66:17870",
[string] $IdunnRudpHealth = $env:IDUNN_RUDP_HEALTH,
[string] $IdunnDaemon = "muninn",
[string] $IdunnHealthContract = "muninn.cultnet-rudp-remote-telemetry-health",
[string] $OdinCultMeshRudp = "",
[string] $CaptureCommandRudpBind = "0.0.0.0:17883",
[string] $CaptureCommandRudpTarget = "127.0.0.1:17883",
[string] $ObsCatalogRudpTarget = "192.168.1.66:17874",
[string] $OdinCultMeshUri = $(if ($env:ODIN_CULTMESH_URI) { $env:ODIN_CULTMESH_URI } else { "cultmesh://odin/rendezvous/provider-catalog" }),
[string[]] $MoveStates = @("xbox-raven=xinput://0"),
[string] $HidControllerRudpTarget = "",
[string] $HidControllerRudpBind = "0.0.0.0:17887",
[string] $HidControllerRudpAdvertise = $env:MUNINN_HID_CONTROLLER_RUDP_ADVERTISE,
[int] $ConnectTimeoutSeconds = 10,
[int] $ServeStartTimeoutSeconds = 20,
[string] $SshUser = "madman's lullaby",
[string] $IdentityFile = ""
[string] $IdentityFile = "C:\Users\Meta\.ssh\id_ed25519_192_168_1_84"
)
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "restart-muninn.ps1 is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path."
}
if (-not (Test-Path -LiteralPath $LocalLoopbackScript)) {
throw "Local Muninn loopback script not found at $LocalLoopbackScript"
}
if ([string]::IsNullOrWhiteSpace($IdunnRudpHealth)) {
throw "Idunn RUDP health endpoint must be supplied by -IdunnRudpHealth or IDUNN_RUDP_HEALTH; no Starfire LAN default is allowed."
}
if ([string]::IsNullOrWhiteSpace($MediaTargetUri) -or -not $MediaTargetUri.StartsWith("cultmesh://", [System.StringComparison]::OrdinalIgnoreCase)) {
throw "Muninn media target URI must be supplied by -MediaTargetUri or MUNINN_MEDIA_TARGET_URI and must start with cultmesh://."
}
if (-not [string]::IsNullOrWhiteSpace($HidControllerRudpBind) -and [string]::IsNullOrWhiteSpace($HidControllerRudpAdvertise)) {
throw "HID controller RUDP advertise endpoint must be supplied by -HidControllerRudpAdvertise or MUNINN_HID_CONTROLLER_RUDP_ADVERTISE when HID RUDP bind is enabled; no Raven LAN default is allowed."
}
function Set-AsciiFile {
param(
@ -356,12 +366,6 @@ $muninnDir = Split-Path -Parent $MuninnExe
$serveCmdPath = Join-Path $muninnDir "start-muninn-serve.cmd"
$servePsPath = Join-Path $muninnDir "start-muninn-serve.ps1"
$serveVbsPath = Join-Path $muninnDir "start-muninn-serve-hidden.vbs"
$activateCmdPath = Join-Path $muninnDir "activate-raven-av-srt.cmd"
$activatePsPath = Join-Path $muninnDir "activate-raven-av-srt.ps1"
$activateVbsPath = Join-Path $muninnDir "activate-raven-av-srt-hidden.vbs"
$videoProofCmdPath = Join-Path $muninnDir "muninn-raven-video-to-starfire-obs.cmd"
$videoProofPsPath = Join-Path $muninnDir "muninn-raven-video-to-starfire-obs.ps1"
$videoProofVbsPath = Join-Path $muninnDir "muninn-raven-video-to-starfire-obs-hidden.vbs"
$serveArguments = @(
"serve",
@ -370,12 +374,20 @@ $serveArguments = @(
"--log-root", $LogRoot,
"--host", "raven",
"--stream", "muninn.raven.av.rudp",
"--target-host", $TargetHost,
"--port", $Port.ToString(),
"--media-transport", $MediaTransport
"--target-host", $MediaTargetUri,
"--media-transport", "rudp"
)
if (-not [string]::IsNullOrWhiteSpace($OdinCultMeshRudp)) {
$serveArguments += @("--odin-cultmesh-rudp", $OdinCultMeshRudp)
if (-not [string]::IsNullOrWhiteSpace($OdinCultMeshUri)) {
$serveArguments += @("--odin-cultmesh-uri", $OdinCultMeshUri)
}
if (-not [string]::IsNullOrWhiteSpace($HidControllerRudpTarget)) {
$serveArguments += @("--hid-controller-rudp-target", $HidControllerRudpTarget)
}
if (-not [string]::IsNullOrWhiteSpace($HidControllerRudpBind)) {
$serveArguments += @("--hid-controller-rudp-bind", $HidControllerRudpBind)
}
if (-not [string]::IsNullOrWhiteSpace($HidControllerRudpAdvertise)) {
$serveArguments += @("--hid-controller-rudp-advertise", $HidControllerRudpAdvertise)
}
foreach ($videoSource in $VideoSources) {
$serveArguments += @("--video-source", $videoSource)
@ -383,18 +395,20 @@ foreach ($videoSource in $VideoSources) {
foreach ($audioSource in $AudioSources) {
$serveArguments += @("--audio-source", $audioSource)
}
foreach ($moveState in $MoveStates) {
if (-not [string]::IsNullOrWhiteSpace($moveState)) {
$serveArguments += @("--move-state", $moveState)
}
}
$serveArguments += @(
"--audio-device", $AudioDevice,
"--ffmpeg", $Ffmpeg,
"--loopback-script", $LoopbackScript,
"--interval-seconds", "15",
"--capture-command-rudp-bind", $CaptureCommandRudpBind,
"--obs-catalog-rudp-target", $ObsCatalogRudpTarget,
"--idunn-rudp-health", $IdunnRudpHealth,
"--idunn-daemon", $IdunnDaemon,
"--idunn-health-contract", $IdunnHealthContract
)
$serveDynamicArgumentsScript = @'
function Test-LikelyVirtualDisplayToken {
param([Parameter(Mandatory = $true)] [string] $Token)
@ -664,68 +678,6 @@ if (-not $hasExplicitAudioSources) {
}
'@
$activateArguments = @(
"request-stream",
"--store", $StorePath,
"--activate-store", $ActivateStorePath,
"--capture-command-rudp-target", $CaptureCommandRudpTarget,
"--host", "raven",
"--stream", "muninn.raven.av.rudp",
"--stream-action", "start",
"--target-host", $TargetHost,
"--port", $Port.ToString(),
"--media-transport", $MediaTransport
)
if ($MediaTransport -ne "srt" -or ($TargetHost -eq $ObsTargetHost -and $Port -eq $ObsPort)) {
$activateArguments += "--no-obs-target"
} else {
$activateArguments += @("--obs-target-host", $ObsTargetHost, "--obs-port", $ObsPort.ToString())
}
$activateArguments += @(
"--audio-device", $AudioDevice,
"--ffmpeg", $Ffmpeg,
"--loopback-script", $LoopbackScript,
"--log-root", $LogRoot
)
$videoProofFramerate = 30
$videoProofBitrateKbps = 12000
$videoProofVbvKbits = [Math]::Ceiling($videoProofBitrateKbps / $videoProofFramerate)
$videoProofArguments = @(
"-hide_banner",
"-loglevel", "info",
"-fflags", "nobuffer",
"-flags", "low_delay",
"-thread_queue_size", "1024",
"-f", "lavfi",
"-i", ("ddagrab=framerate={0}:output_idx=0:draw_mouse=1" -f $videoProofFramerate),
"-thread_queue_size", "1024",
"-f", "lavfi",
"-i", "anullsrc=channel_layout=stereo:sample_rate=48000",
"-map", "0:v:0",
"-map", "1:a:0",
"-c:v", "h264_nvenc",
"-preset", "p1",
"-tune", "ull",
"-zerolatency", "1",
"-bf", "0",
"-delay", "0",
"-rc", "cbr",
"-rc-lookahead", "0",
"-b:v", ("{0}k" -f $videoProofBitrateKbps),
"-maxrate", ("{0}k" -f $videoProofBitrateKbps),
"-bufsize", ("{0}k" -f $videoProofVbvKbits),
"-g", $videoProofFramerate.ToString(),
"-forced-idr", "1",
"-c:a", "aac",
"-b:a", "192k",
"-ar", "48000",
"-ac", "2",
"-f", "mpegts",
("srt://{0}:{1}?mode=caller&latency=120000&timeout=30000000" -f $ObsTargetHost, $ObsPort)
)
$servePsContent = New-HiddenNativeLauncherPowerShellContent `
-StorePath $StorePath `
-LogRoot $LogRoot `
@ -736,24 +688,6 @@ $servePsContent = New-HiddenNativeLauncherPowerShellContent `
-PidPath (Join-Path $LogRoot "muninn-serve.pid") `
-DynamicArgumentsScript $serveDynamicArgumentsScript
$activatePsContent = New-HiddenNativeLauncherPowerShellContent `
-StorePath $ActivateStorePath `
-LogRoot $LogRoot `
-Arguments $activateArguments `
-FilePath $MuninnExe `
-StdoutPath (Join-Path $LogRoot "muninn-activate.out.log") `
-StderrPath (Join-Path $LogRoot "muninn-activate.err.log") `
-PidPath (Join-Path $LogRoot "muninn-activate.pid")
$videoProofPsContent = New-HiddenNativeLauncherPowerShellContent `
-LogRoot $LogRoot `
-Arguments $videoProofArguments `
-FilePath $Ffmpeg `
-StdoutPath (Join-Path $LogRoot "muninn-video-proof.out.log") `
-StderrPath (Join-Path $LogRoot "muninn-video-proof.err.log") `
-PidPath (Join-Path $LogRoot "muninn-video-proof.pid") `
-WorkingDirectory $muninnDir
$uploadRoot = Join-Path $env:TEMP ("odin-raven-muninn-launchers-" + [guid]::NewGuid().ToString("N"))
try {
@ -762,22 +696,10 @@ try {
$localServePs = Join-Path $uploadRoot "start-muninn-serve.ps1"
$localServeVbs = Join-Path $uploadRoot "start-muninn-serve-hidden.vbs"
$localServeCmd = Join-Path $uploadRoot "start-muninn-serve.cmd"
$localActivatePs = Join-Path $uploadRoot "activate-raven-av-srt.ps1"
$localActivateVbs = Join-Path $uploadRoot "activate-raven-av-srt-hidden.vbs"
$localActivateCmd = Join-Path $uploadRoot "activate-raven-av-srt.cmd"
$localVideoProofPs = Join-Path $uploadRoot "muninn-raven-video-to-starfire-obs.ps1"
$localVideoProofVbs = Join-Path $uploadRoot "muninn-raven-video-to-starfire-obs-hidden.vbs"
$localVideoProofCmd = Join-Path $uploadRoot "muninn-raven-video-to-starfire-obs.cmd"
Set-AsciiFile -Path $localServePs -Content $servePsContent
Set-AsciiFile -Path $localServeVbs -Content (New-HiddenPowerShellVbsLauncherContent -PsPath $servePsPath)
Set-AsciiFile -Path $localServeCmd -Content (New-WscriptCmdLauncherContent -WorkingDirectory $muninnDir -VbsPath $serveVbsPath)
Set-AsciiFile -Path $localActivatePs -Content $activatePsContent
Set-AsciiFile -Path $localActivateVbs -Content (New-HiddenPowerShellVbsLauncherContent -PsPath $activatePsPath)
Set-AsciiFile -Path $localActivateCmd -Content (New-WscriptCmdLauncherContent -WorkingDirectory $muninnDir -VbsPath $activateVbsPath)
Set-AsciiFile -Path $localVideoProofPs -Content $videoProofPsContent
Set-AsciiFile -Path $localVideoProofVbs -Content (New-HiddenPowerShellVbsLauncherContent -PsPath $videoProofPsPath)
Set-AsciiFile -Path $localVideoProofCmd -Content (New-WscriptCmdLauncherContent -WorkingDirectory $muninnDir -VbsPath $videoProofVbsPath)
$remoteScript = @"
`$ErrorActionPreference = "Stop"
@ -794,11 +716,7 @@ if (-not (Test-Path -LiteralPath "$Ffmpeg")) {
}
foreach (`$path in @(
"$servePsPath",
"$serveVbsPath",
"$activatePsPath",
"$activateVbsPath",
"$videoProofPsPath",
"$videoProofVbsPath"
"$serveVbsPath"
)) {
if (-not (Test-Path -LiteralPath `$path)) {
throw "Required launcher path not found at `$path"
@ -809,6 +727,10 @@ foreach (`$path in @(
if (`$null -ne `$obsoleteActivateTask) {
Unregister-ScheduledTask -TaskName "GameCult-Muninn-Activate" -Confirm:`$false | Out-Null
}
`$obsoleteVideoProofTask = Get-ScheduledTask -TaskName "GameCult-Muninn-VideoProof" -ErrorAction SilentlyContinue
if (`$null -ne `$obsoleteVideoProofTask) {
Unregister-ScheduledTask -TaskName "GameCult-Muninn-VideoProof" -Confirm:`$false | Out-Null
}
Get-CimInstance Win32_Process |
Where-Object { `$_.Name -like "muninn*.exe" } |
@ -818,9 +740,12 @@ Get-CimInstance Win32_Process |
New-Item -ItemType Directory -Force -Path "$LogRoot" | Out-Null
New-Item -ItemType Directory -Force -Path (Split-Path -Parent "$StorePath") | Out-Null
`$captureCommandUdpPort = ([string] "$CaptureCommandRudpBind").Split(':')[-1]
& netsh.exe advfirewall firewall delete rule name="GameCult Muninn Capture Command RUDP" | Out-Null 2>`$null
& netsh.exe advfirewall firewall add rule name="GameCult Muninn Capture Command RUDP" dir=in action=allow protocol=UDP localport=`$captureCommandUdpPort | Out-Null
if (-not [string]::IsNullOrWhiteSpace("$HidControllerRudpBind")) {
`$hidControllerUdpPort = ([string] "$HidControllerRudpBind").Split(':')[-1]
& netsh.exe advfirewall firewall delete rule name="GameCult Muninn HID Controller RUDP" | Out-Null 2>`$null
& netsh.exe advfirewall firewall add rule name="GameCult Muninn HID Controller RUDP" dir=in action=allow protocol=UDP localport=`$hidControllerUdpPort | Out-Null
}
function Register-HiddenVbsTask {
param(
@ -902,10 +827,8 @@ function Assert-HiddenPowerShellTask {
}
Register-HiddenPowerShellTask -TaskName "GameCult-Muninn" -PsPath "$servePsPath"
Register-HiddenVbsTask -TaskName "GameCult-Muninn-VideoProof" -VbsPath "$videoProofVbsPath"
Assert-HiddenPowerShellTask -TaskName "GameCult-Muninn" -PsPath "$servePsPath"
Assert-HiddenVbsTask -TaskName "GameCult-Muninn-VideoProof" -VbsPath "$videoProofVbsPath" -PsPath "$videoProofPsPath"
Start-ScheduledTask -TaskName "GameCult-Muninn"
@ -938,13 +861,7 @@ foreach (`$pattern in @(
@{ LocalPath = $LocalLoopbackScript; RemotePath = ($LoopbackScript -replace "\\", "/") },
@{ LocalPath = $localServePs; RemotePath = ($servePsPath -replace "\\", "/") },
@{ LocalPath = $localServeVbs; RemotePath = ($serveVbsPath -replace "\\", "/") },
@{ LocalPath = $localServeCmd; RemotePath = ($serveCmdPath -replace "\\", "/") },
@{ LocalPath = $localActivatePs; RemotePath = ($activatePsPath -replace "\\", "/") },
@{ LocalPath = $localActivateVbs; RemotePath = ($activateVbsPath -replace "\\", "/") },
@{ LocalPath = $localActivateCmd; RemotePath = ($activateCmdPath -replace "\\", "/") },
@{ LocalPath = $localVideoProofPs; RemotePath = ($videoProofPsPath -replace "\\", "/") },
@{ LocalPath = $localVideoProofVbs; RemotePath = ($videoProofVbsPath -replace "\\", "/") },
@{ LocalPath = $localVideoProofCmd; RemotePath = ($videoProofCmdPath -replace "\\", "/") }
@{ LocalPath = $localServeCmd; RemotePath = ($serveCmdPath -replace "\\", "/") }
)
Invoke-RavenUploadedPowerShell -RavenHost $RavenHost -RemoteScriptContent $remoteScript -UploadSpecs $uploadSpecs -TempPrefix "odin-raven-muninn-restart"
@ -952,39 +869,4 @@ foreach (`$pattern in @(
Remove-Item -LiteralPath $uploadRoot -Recurse -Force -ErrorAction SilentlyContinue
}
$restartExit = $LASTEXITCODE
if ($restartExit -eq 0) {
Start-Sleep -Seconds 2
$healthScript = Join-Path $PSScriptRoot "health-muninn.ps1"
$healthArgs = @(
"-NoProfile",
"-ExecutionPolicy",
"Bypass",
"-File",
$healthScript,
"-RavenHost",
$RavenHost,
"-MuninnExe",
$MuninnExe,
"-StorePath",
$StorePath,
"-ActivateStorePath",
$ActivateStorePath,
"-IdunnRudpHealth",
$IdunnRudpHealth,
"-CaptureCommandRudpBind",
$CaptureCommandRudpBind,
"-ConnectTimeoutSeconds",
$ConnectTimeoutSeconds.ToString(),
"-MaxStoreAgeSeconds",
([Math]::Max(180, $ServeStartTimeoutSeconds + 60)).ToString()
)
if (-not [string]::IsNullOrWhiteSpace($SshUser)) {
$healthArgs += @("-SshUser", $SshUser)
}
if (-not [string]::IsNullOrWhiteSpace($IdentityFile)) {
$healthArgs += @("-IdentityFile", $IdentityFile)
}
& powershell.exe @healthArgs
}
exit $restartExit
exit $LASTEXITCODE

View file

@ -1,2 +1,10 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo restart-nightwing-eve-browser-reference.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo restart-nightwing-eve-browser-reference.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\restart-nightwing-eve-browser-reference.ps1

View file

@ -5,6 +5,10 @@ param(
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "restart-nightwing-eve-browser-reference.ps1 is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path."
}
ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $SshTarget "systemctl restart $Service && systemctl is-active --quiet $Service"
if ($LASTEXITCODE -ne 0) {
throw "Remote restart failed for $Service on $SshTarget with exit code $LASTEXITCODE"

View file

@ -1,2 +1,3 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\restart-nightwing-eve-dashboard.ps1
echo restart-nightwing-eve-dashboard.cmd archived: Mimir.EveDashboard's HTTP/WebSocket broker is cut. Rebuild a typed CultMesh/Odin dashboard publisher before restoring Idunn lifecycle authority. 1>&2
exit /b 2

View file

@ -1,13 +1 @@
param(
[string] $SshTarget = "nwroot",
[string] $Service = "nightwing-eve-dashboard.service"
)
$ErrorActionPreference = "Stop"
ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $SshTarget "systemctl restart $Service && systemctl is-active --quiet $Service"
if ($LASTEXITCODE -ne 0) {
throw "Remote restart failed for $Service on $SshTarget with exit code $LASTEXITCODE"
}
Write-Host "Restarted $Service on $SshTarget."
throw "restart-nightwing-eve-dashboard.ps1 archived: Mimir.EveDashboard's HTTP/WebSocket broker is cut. Rebuild a typed CultMesh/Odin dashboard publisher before restoring Idunn lifecycle authority."

View file

@ -1,2 +1,10 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo restart-nightwing-gjallar.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo restart-nightwing-gjallar.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\restart-nightwing-gjallar.ps1

View file

@ -5,6 +5,10 @@ param(
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "restart-nightwing-gjallar.ps1 is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path."
}
ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $SshTarget "systemctl restart $Service && systemctl is-active --quiet $Service"
if ($LASTEXITCODE -ne 0) {
throw "Remote restart failed for $Service on $SshTarget with exit code $LASTEXITCODE"

View file

@ -1,2 +1,10 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo restart-nightwing-muninn.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo restart-nightwing-muninn.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\restart-nightwing-muninn.ps1 -DiscoverMoveState -ClaimUsbMoves

View file

@ -8,14 +8,27 @@ param(
[switch] $ClaimUsbMoves,
[string] $MoveEvidenceStream = "muninn:nightwing:move-evidence",
[int] $IntervalSeconds = 15,
[string] $IdunnRudpHealth = "10.77.0.2:17870",
[string] $IdunnRudpHealth = $env:IDUNN_RUDP_HEALTH,
[string] $IdunnDaemon = "nightwing-muninn",
[string] $IdunnHealthContract = "muninn.cultnet-rudp-remote-telemetry-and-move-hid",
[string] $OdinCultMeshRudp = "10.77.0.2:17871"
[string] $OdinCultMeshUri = $(if ($env:ODIN_CULTMESH_URI) { $env:ODIN_CULTMESH_URI } else { "cultmesh://odin/rendezvous/provider-catalog" }),
[string] $HidControllerRudpBind = "0.0.0.0:17888",
[string] $HidControllerRudpAdvertise = $env:MUNINN_HID_CONTROLLER_RUDP_ADVERTISE
)
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "restart-nightwing-muninn.ps1 is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path."
}
if ([string]::IsNullOrWhiteSpace($IdunnRudpHealth)) {
throw "Idunn RUDP health endpoint must be supplied by -IdunnRudpHealth or IDUNN_RUDP_HEALTH; no Starfire LAN default is allowed."
}
if (-not [string]::IsNullOrWhiteSpace($HidControllerRudpBind) -and [string]::IsNullOrWhiteSpace($HidControllerRudpAdvertise)) {
throw "HID controller RUDP advertise endpoint must be supplied by -HidControllerRudpAdvertise or MUNINN_HID_CONTROLLER_RUDP_ADVERTISE when HID RUDP bind is enabled; no Nightwing LAN default is allowed."
}
function Quote-ShSingle([string] $Value) {
return "'" + ($Value -replace "'", "'\''") + "'"
}
@ -85,10 +98,18 @@ if ($moveStateSpecs.Count -gt 0) {
$moveRuntimeSetLines += "set -- ""`$@"" --move-evidence-stream $(Quote-ShSingle $MoveEvidenceStream)"
}
$moveRuntimeSetBlock = ($moveRuntimeSetLines -join "`n")
$odinCultMeshRudpSetBlock = ""
if (-not [string]::IsNullOrWhiteSpace($OdinCultMeshRudp)) {
$odinCultMeshRudpSetBlock = "set -- ""`$@"" --odin-cultmesh-rudp $(Quote-ShSingle $OdinCultMeshRudp)"
$odinCultMeshUriSetBlock = ""
if (-not [string]::IsNullOrWhiteSpace($OdinCultMeshUri)) {
$odinCultMeshUriSetBlock = "set -- ""`$@"" --odin-cultmesh-uri $(Quote-ShSingle $OdinCultMeshUri)"
}
$hidControllerRudpSetLines = @()
if (-not [string]::IsNullOrWhiteSpace($HidControllerRudpBind)) {
$hidControllerRudpSetLines += "set -- ""`$@"" --hid-controller-rudp-bind $(Quote-ShSingle $HidControllerRudpBind)"
}
if (-not [string]::IsNullOrWhiteSpace($HidControllerRudpAdvertise)) {
$hidControllerRudpSetLines += "set -- ""`$@"" --hid-controller-rudp-advertise $(Quote-ShSingle $HidControllerRudpAdvertise)"
}
$hidControllerRudpSetBlock = ($hidControllerRudpSetLines -join "`n")
$remoteScript = @"
set -eu
@ -114,7 +135,8 @@ set -- "`$@" \
--idunn-rudp-health '$IdunnRudpHealth' \
--idunn-daemon '$IdunnDaemon' \
--idunn-health-contract '$IdunnHealthContract'
$odinCultMeshRudpSetBlock
$odinCultMeshUriSetBlock
$hidControllerRudpSetBlock
nohup '$MuninnExe' "`$@" \
> '$LogRoot/muninn-serve.out.log' \
2> '$LogRoot/muninn-serve.err.log' \

View file

@ -1,2 +1,10 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo restart-odin.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo restart-odin.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\restart-odin.ps1

View file

@ -1,35 +1,46 @@
param(
[int] $Port = 8797,
[string] $StateDir = "E:\Projects\Odin\scratch\odin",
[string] $CultNetRudpBind = "0.0.0.0:17871",
[string] $IdunnRudpHealth = "127.0.0.1:17870",
[string] $IdunnRudpHealth = $(if ($env:ODIN_IDUNN_RUDP_HEALTH) { $env:ODIN_IDUNN_RUDP_HEALTH } else { $env:IDUNN_RUDP_HEALTH }),
[string] $IdunnDaemon = "odin",
[string] $IdunnHealthContract = "odin.cultnet-rudp-provider-health"
)
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "restart-odin.ps1 is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path."
}
$repoRoot = Split-Path -Parent $PSScriptRoot
$stopScript = Join-Path $PSScriptRoot "stop-odin.ps1"
$startScript = Join-Path $PSScriptRoot "start-odin.ps1"
$healthScript = Join-Path $PSScriptRoot "health-odin.ps1"
$powerShellExe = Join-Path $env:WINDIR "System32\WindowsPowerShell\v1.0\powershell.exe"
if (-not (Test-Path -LiteralPath $powerShellExe)) {
throw "PowerShell executable is missing at $powerShellExe"
}
$startArgs = @(
"-NoProfile",
"-ExecutionPolicy", "Bypass",
"-File", $startScript,
"-StateDir", $StateDir,
"-CultNetRudpBind", $CultNetRudpBind,
"-IdunnDaemon", $IdunnDaemon,
"-IdunnHealthContract", $IdunnHealthContract
)
if (-not [string]::IsNullOrWhiteSpace($IdunnRudpHealth)) {
$startArgs += @("-IdunnRudpHealth", $IdunnRudpHealth)
}
& $powerShellExe -NoProfile -ExecutionPolicy Bypass -File $stopScript -StateDir $StateDir
if ($LASTEXITCODE -ne 0) {
throw "stop-odin.ps1 failed with exit code $LASTEXITCODE"
}
& $powerShellExe -NoProfile -ExecutionPolicy Bypass -File $startScript `
-Port $Port `
-StateDir $StateDir `
-CultNetRudpBind $CultNetRudpBind `
-IdunnRudpHealth $IdunnRudpHealth `
-IdunnDaemon $IdunnDaemon `
-IdunnHealthContract $IdunnHealthContract
& $powerShellExe -NoProfile -ExecutionPolicy Bypass -File $healthScript `
-Port $Port `
-StateDir $StateDir `
-CultNetRudpBind $CultNetRudpBind
& $powerShellExe @startArgs
if ($LASTEXITCODE -ne 0) {
throw "start-odin.ps1 failed with exit code $LASTEXITCODE"
}

View file

@ -0,0 +1,155 @@
param(
[string] $RavenHost = "raven",
[string] $SleipnirExe = "C:\Meta\Odin\Sleipnir\sleipnir.exe",
[string] $StorePath = "C:\Meta\Odin\state\raven.sleipnir.cc",
[string] $LogRoot = "C:\Meta\Odin\logs\Sleipnir",
[string] $HostId = "raven",
[string] $OdinCultMeshUri = $(if ($env:ODIN_CULTMESH_URI) { $env:ODIN_CULTMESH_URI } else { "cultmesh://odin/rendezvous/provider-catalog" }),
[string] $RudpBind = "0.0.0.0:17890",
[string] $CommandRoute = $(if ($env:SLEIPNIR_COMMAND_ROUTE) { $env:SLEIPNIR_COMMAND_ROUTE } else { "cultmesh://odin/command/sleipnir/input_mapping" }),
[string] $IdunnRudpHealth = $env:IDUNN_RUDP_HEALTH,
[string] $IdunnDaemon = "raven-sleipnir",
[string] $IdunnHealthContract = "sleipnir.cultnet-rudp-input-mirror-health",
[string] $IntervalMs = "8",
[string] $SshUser = "madman's lullaby",
[string] $IdentityFile = "C:\Users\Meta\.ssh\id_ed25519_192_168_1_84",
[int] $ConnectTimeoutSeconds = 10
)
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "restart-raven-sleipnir.ps1 is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path."
}
if ([string]::IsNullOrWhiteSpace($OdinCultMeshUri) -or -not $OdinCultMeshUri.StartsWith("cultmesh://", [System.StringComparison]::OrdinalIgnoreCase)) {
throw "Sleipnir Odin publication requires -OdinCultMeshUri or ODIN_CULTMESH_URI and must be a cultmesh:// URI."
}
if ([string]::IsNullOrWhiteSpace($CommandRoute) -or -not $CommandRoute.StartsWith("cultmesh://")) {
throw "Sleipnir command route must be a cultmesh:// URI supplied by -CommandRoute or SLEIPNIR_COMMAND_ROUTE."
}
if ([string]::IsNullOrWhiteSpace($IdunnRudpHealth)) {
throw "Sleipnir Idunn health endpoint requires -IdunnRudpHealth or IDUNN_RUDP_HEALTH; no Starfire LAN default is allowed."
}
function ConvertTo-PowerShellStringLiteral {
param([Parameter(Mandatory = $true)] [string] $Value)
return "'" + $Value.Replace("'", "''") + "'"
}
function Get-SshTarget {
if ([string]::IsNullOrWhiteSpace($SshUser)) {
return $RavenHost
}
return "${SshUser}@${RavenHost}"
}
$sshArgs = @(
"-o", "BatchMode=yes",
"-o", "ConnectTimeout=$ConnectTimeoutSeconds",
"-o", "ConnectionAttempts=1"
)
if (-not [string]::IsNullOrWhiteSpace($IdentityFile)) {
$sshArgs += @("-i", $IdentityFile)
}
$argPairs = @(
@("--store", $StorePath),
@("--host", $HostId),
@("--odin-cultmesh-uri", $OdinCultMeshUri),
@("--rudp-bind", $RudpBind),
@("--command-route", $CommandRoute),
@("--idunn-rudp-health", $IdunnRudpHealth),
@("--idunn-daemon", $IdunnDaemon),
@("--idunn-health-contract", $IdunnHealthContract),
@("--interval-ms", $IntervalMs)
)
$flatArgumentLiterals = @()
foreach ($pair in $argPairs) {
$flatArgumentLiterals += ConvertTo-PowerShellStringLiteral $pair[0]
$flatArgumentLiterals += ConvertTo-PowerShellStringLiteral $pair[1]
}
if ($env:SLEIPNIR_TRACE -eq "1") {
$flatArgumentLiterals += ConvertTo-PowerShellStringLiteral "--trace"
}
$argumentLiteral = "@(" + ($flatArgumentLiterals -join ", ") + ")"
$remote = @"
`$ErrorActionPreference = "Stop"
`$ProgressPreference = "SilentlyContinue"
`$PSDefaultParameterValues["*:ProgressAction"] = "SilentlyContinue"
if (-not (Test-Path -LiteralPath $(ConvertTo-PowerShellStringLiteral $SleipnirExe))) {
throw "Sleipnir executable not found at $SleipnirExe"
}
Get-CimInstance Win32_Process |
Where-Object { `$_.Name -ieq "sleipnir.exe" -and `$_.CommandLine -like "*--store*$StorePath*" } |
ForEach-Object { taskkill.exe /PID `$_.ProcessId /T /F | Out-Null }
New-Item -ItemType Directory -Force -Path $(ConvertTo-PowerShellStringLiteral $LogRoot) | Out-Null
`$storeParent = Split-Path -Parent $(ConvertTo-PowerShellStringLiteral $StorePath)
if (-not [string]::IsNullOrWhiteSpace(`$storeParent)) {
New-Item -ItemType Directory -Force -Path `$storeParent | Out-Null
}
`$taskName = "Odin-Sleipnir-Raven"
`$arguments = $argumentLiteral
`$outLog = Join-Path $(ConvertTo-PowerShellStringLiteral $LogRoot) "sleipnir.out.log"
`$errLog = Join-Path $(ConvertTo-PowerShellStringLiteral $LogRoot) "sleipnir.err.log"
function Quote-RemotePowerShellString([string] `$Value) {
return "'" + `$Value.Replace("'", "''") + "'"
}
`$child = @'
`$ErrorActionPreference = "Continue"
`$ProgressPreference = "SilentlyContinue"
& __SLEIPNIR_EXE__ __SLEIPNIR_ARGS__ 1>> __OUT_LOG__ 2>> __ERR_LOG__
'@
`$child = `$child.Replace("__SLEIPNIR_EXE__", $(ConvertTo-PowerShellStringLiteral $SleipnirExe))
`$child = `$child.Replace("__SLEIPNIR_ARGS__", (`$arguments | ForEach-Object { "'" + `$_.Replace("'", "''") + "'" }) -join " ")
`$child = `$child.Replace("__OUT_LOG__", (Quote-RemotePowerShellString `$outLog))
`$child = `$child.Replace("__ERR_LOG__", (Quote-RemotePowerShellString `$errLog))
`$encodedChild = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes(`$child))
`$action = New-ScheduledTaskAction -Execute "`$env:WINDIR\System32\WindowsPowerShell\v1.0\powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -EncodedCommand `$encodedChild"
`$trigger = New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(5)
`$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit ([TimeSpan]::Zero)
Register-ScheduledTask -TaskName `$taskName -Action `$action -Trigger `$trigger -Settings `$settings -Force | Out-Null
Remove-Item -LiteralPath `$outLog -Force -ErrorAction SilentlyContinue
Remove-Item -LiteralPath `$errLog -Force -ErrorAction SilentlyContinue
Start-ScheduledTask -TaskName `$taskName
Start-Sleep -Seconds 5
`$running = Get-CimInstance Win32_Process | Where-Object { `$_.Name -ieq "sleipnir.exe" -and `$_.CommandLine -like "*--store*$StorePath*" } | Select-Object -First 1
if (`$null -eq `$running) {
`$errorText = if (Test-Path -LiteralPath `$errLog) { Get-Content -LiteralPath `$errLog -Raw } else { "" }
throw "Sleipnir did not stay running. `$errorText"
}
"Sleipnir Raven restarted under scheduled task `$taskName pid=`$(`$running.ProcessId)"
"@
$target = Get-SshTarget
$remoteScript = "$SleipnirExe.idunn-restart.ps1"
$remoteScriptSftp = $remoteScript.Replace("\", "/")
$localScript = New-TemporaryFile
$sftpBatch = New-TemporaryFile
try {
Set-Content -LiteralPath $localScript.FullName -Value $remote -Encoding ASCII
Set-Content -LiteralPath $sftpBatch.FullName -Value @("put `"$($localScript.FullName)`" `"$remoteScriptSftp`"") -Encoding ASCII
& sftp.exe @sshArgs -b $sftpBatch.FullName $target
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
$invoke = @"
`$ErrorActionPreference = "Stop"
try {
& $(ConvertTo-PowerShellStringLiteral $remoteScript) 3>`$null
`$code = if (`$null -eq `$LASTEXITCODE) { 0 } else { `$LASTEXITCODE }
} finally {
Remove-Item -LiteralPath $(ConvertTo-PowerShellStringLiteral $remoteScript) -Force -ErrorAction SilentlyContinue
}
exit `$code
"@
$encodedInvoke = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($invoke))
& ssh.exe @sshArgs $target "powershell.exe -NoProfile -ExecutionPolicy Bypass -EncodedCommand $encodedInvoke"
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
} finally {
Remove-Item -LiteralPath $localScript.FullName -Force -ErrorAction SilentlyContinue
Remove-Item -LiteralPath $sftpBatch.FullName -Force -ErrorAction SilentlyContinue
}

View file

@ -1,2 +1,10 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo restart-starfire-muninn.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo restart-starfire-muninn.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\restart-starfire-muninn.ps1

View file

@ -6,17 +6,29 @@ param(
[string] $MoveBluetoothHost = "5C:93:A2:9C:A8:A8",
[string[]] $MoveState = @(),
[switch] $EnableUsbMoveState,
[string] $IdunnRudpHealth = "127.0.0.1:17870",
[string] $IdunnRudpHealth = $env:IDUNN_RUDP_HEALTH,
[string] $IdunnDaemon = "starfire-muninn",
[string] $IdunnHealthContract = "muninn.cultnet-rudp-local-telemetry-and-quest-access",
[string] $OdinCultMeshRudp = "127.0.0.1:17871"
[string] $OdinCultMeshUri = $(if ($env:ODIN_CULTMESH_URI) { $env:ODIN_CULTMESH_URI } else { "cultmesh://odin/rendezvous/provider-catalog" }),
[string] $HidControllerRudpBind = "0.0.0.0:17888",
[string] $HidControllerRudpAdvertise = $env:MUNINN_HID_CONTROLLER_RUDP_ADVERTISE
)
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "restart-starfire-muninn.ps1 is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path."
}
if (-not (Test-Path -LiteralPath $MuninnExe)) {
throw "Muninn executable not found at $MuninnExe"
}
if ([string]::IsNullOrWhiteSpace($IdunnRudpHealth)) {
throw "Idunn RUDP health endpoint must be supplied by -IdunnRudpHealth or IDUNN_RUDP_HEALTH; no Starfire LAN default is allowed."
}
if (-not [string]::IsNullOrWhiteSpace($HidControllerRudpBind) -and [string]::IsNullOrWhiteSpace($HidControllerRudpAdvertise)) {
throw "HID controller RUDP advertise endpoint must be supplied by -HidControllerRudpAdvertise or MUNINN_HID_CONTROLLER_RUDP_ADVERTISE when HID RUDP bind is enabled; no Starfire LAN default is allowed."
}
Get-CimInstance Win32_Process |
Where-Object {
@ -50,8 +62,14 @@ $arguments = @(
"--idunn-daemon", $IdunnDaemon,
"--idunn-health-contract", $IdunnHealthContract
)
if (-not [string]::IsNullOrWhiteSpace($OdinCultMeshRudp)) {
$arguments += @("--odin-cultmesh-rudp", $OdinCultMeshRudp)
if (-not [string]::IsNullOrWhiteSpace($OdinCultMeshUri)) {
$arguments += @("--odin-cultmesh-uri", $OdinCultMeshUri)
}
if (-not [string]::IsNullOrWhiteSpace($HidControllerRudpBind)) {
$arguments += @("--hid-controller-rudp-bind", $HidControllerRudpBind)
}
if (-not [string]::IsNullOrWhiteSpace($HidControllerRudpAdvertise)) {
$arguments += @("--hid-controller-rudp-advertise", $HidControllerRudpAdvertise)
}
if (-not [string]::IsNullOrWhiteSpace($MoveBluetoothHost)) {
$arguments += @("--move-host", $MoveBluetoothHost)
@ -142,6 +160,3 @@ foreach ($pattern in @(
throw "Starfire Muninn serve command line is missing ${pattern}: $($processCheck.CommandLine)"
}
}
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "health-starfire-muninn.ps1") `
-MuninnExe $MuninnExe `
-StorePath $StorePath

View file

@ -1,2 +1,10 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo restart-stonks.cmd is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo restart-stonks.cmd is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\restart-stonks.ps1

View file

@ -1,2 +1,10 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo restart-vili.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo restart-vili.cmd is an Idunn actuator wrapper. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "%~dp0restart-vili.ps1" %*

View file

@ -6,7 +6,7 @@ param(
[int] $Port = 8824,
[string] $HostName = "0.0.0.0",
[string] $StateRoot = "E:\Projects\Vili\.vili",
[string] $IdunnRudpHealth = "10.77.0.2:17870",
[string] $IdunnRudpHealth = $(if ($env:VILI_IDUNN_RUDP_HEALTH) { $env:VILI_IDUNN_RUDP_HEALTH } else { $env:IDUNN_RUDP_HEALTH }),
[string] $IdunnDaemon = "vili",
[string] $IdunnHealthContract = "vili.cultnet-rudp-animation-health",
[int] $IdunnHealthIntervalSeconds = 15
@ -14,10 +14,17 @@ param(
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
throw "restart-vili.ps1 is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path."
}
if ([string]::IsNullOrWhiteSpace($IdunnRudpHealth)) {
throw "Idunn RUDP health endpoint must be supplied by VILI_IDUNN_RUDP_HEALTH, IDUNN_RUDP_HEALTH, or -IdunnRudpHealth; no WireGuard endpoint default is allowed."
}
$localFiles = @(
(Join-Path $LocalViliRoot "package.json"),
(Join-Path $LocalViliRoot "package-lock.json"),
(Join-Path $LocalViliRoot "scripts\health-vili-daemon.cmd"),
(Join-Path $LocalViliRoot "scripts\idunn-rudp.cjs"),
(Join-Path $LocalViliRoot "scripts\install-vili-task.ps1"),
(Join-Path $LocalViliRoot "scripts\restart-vili-daemon.cmd"),
@ -33,8 +40,7 @@ $localFiles = @(
(Join-Path $LocalCultLibRoot "node_modules\fast-uri"),
(Join-Path $LocalCultLibRoot "node_modules\json-schema-traverse"),
(Join-Path $LocalCultLibRoot "node_modules\require-from-string"),
(Join-Path $LocalViliRoot "node_modules\@msgpack"),
(Join-Path $LocalViliRoot "node_modules\ws")
(Join-Path $LocalViliRoot "node_modules\@msgpack")
)
foreach ($path in $localFiles) {
@ -93,7 +99,6 @@ try {
Copy-Item -LiteralPath (Join-Path `$syncRoot "package-lock.json") -Destination (Join-Path `$remoteRoot "package-lock.json") -Force
`$scriptFiles = @(
"health-vili-daemon.cmd",
"idunn-rudp.cjs",
"install-vili-task.ps1",
"restart-vili-daemon.cmd",
@ -180,13 +185,13 @@ try {
throw "Vili process command line does not include the Idunn RUDP health arguments."
}
`$statePath = Join-Path `$stateRoot "operator-state.json"
`$operatorStatePath = Join-Path `$stateRoot "operator-state.json"
`$deadline = (Get-Date).AddSeconds(30)
`$state = `$null
while ((Get-Date) -lt `$deadline) {
if (Test-Path -LiteralPath `$statePath) {
if (Test-Path -LiteralPath `$operatorStatePath) {
try {
`$state = Get-Content -LiteralPath `$statePath -Raw | ConvertFrom-Json
`$state = Get-Content -LiteralPath `$operatorStatePath -Raw | ConvertFrom-Json
if (`$null -ne `$state.idunnRudpHealth -and `$state.idunnRudpHealth.status -eq "published") {
break
}
@ -196,7 +201,7 @@ try {
Start-Sleep -Seconds 1
}
if (`$null -eq `$state -or `$null -eq `$state.idunnRudpHealth) {
throw "Vili operator-state.json did not publish idunnRudpHealth after restart."
throw "Vili daemon state file did not report idunnRudpHealth after restart."
}
if (`$state.idunnRudpHealth.status -ne "published") {
throw "Vili idunnRudpHealth status is `$(`$state.idunnRudpHealth.status): `$(`$state.idunnRudpHealth.error)"
@ -227,14 +232,12 @@ try {
@{ Source = (Join-Path $LocalCultLibRoot "node_modules\fast-uri"); Destination = (Join-Path $localBundleNodeModules "fast-uri") },
@{ Source = (Join-Path $LocalCultLibRoot "node_modules\json-schema-traverse"); Destination = (Join-Path $localBundleNodeModules "json-schema-traverse") },
@{ Source = (Join-Path $LocalCultLibRoot "node_modules\require-from-string"); Destination = (Join-Path $localBundleNodeModules "require-from-string") },
@{ Source = (Join-Path $LocalViliRoot "node_modules\@msgpack"); Destination = (Join-Path $localBundleNodeModules "@msgpack") },
@{ Source = (Join-Path $LocalViliRoot "node_modules\ws"); Destination = (Join-Path $localBundleNodeModules "ws") }
@{ Source = (Join-Path $LocalViliRoot "node_modules\@msgpack"); Destination = (Join-Path $localBundleNodeModules "@msgpack") }
)
New-Item -ItemType Directory -Force -Path $localBundleScripts, $localBundleNodeModules | Out-Null
Copy-Item -LiteralPath (Join-Path $LocalViliRoot "package.json") -Destination (Join-Path $localBundleRoot "package.json") -Force
Copy-Item -LiteralPath (Join-Path $LocalViliRoot "package-lock.json") -Destination (Join-Path $localBundleRoot "package-lock.json") -Force
$scriptCopies = @(
"health-vili-daemon.cmd",
"idunn-rudp.cjs",
"install-vili-task.ps1",
"restart-vili-daemon.cmd",
@ -281,11 +284,4 @@ exit `$code
}
$restartExit = $LASTEXITCODE
if ($restartExit -eq 0) {
Start-Sleep -Seconds 2
try {
& curl.exe -fsS --max-time 15 "http://10.77.0.4:$Port/operator-state" | Out-Null
} catch {
}
}
exit $restartExit

View file

@ -1,2 +1,10 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo restart-voidbot.cmd is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo restart-voidbot.cmd is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\VoidBot\scripts\start-voidbot-stack.ps1

View file

@ -1,2 +1,10 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo restart-weksa.cmd is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo restart-weksa.cmd is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
call E:\Projects\weksa\scripts\restart-weksa-daemon.cmd

47
scripts/start-hermodr.ps1 Normal file
View file

@ -0,0 +1,47 @@
param(
[string] $HostAddress = $(if ($env:HERMODR_BIND_HOST) { $env:HERMODR_BIND_HOST } else { "127.0.0.1" }),
[int] $Port = $(if ($env:HERMODR_PORT) { [int]$env:HERMODR_PORT } else { 8798 }),
[string] $OdinCultMeshUri = $(if ($env:HERMODR_ODIN_CULTMESH_URI) { $env:HERMODR_ODIN_CULTMESH_URI } elseif ($env:ODIN_CULTMESH_URI) { $env:ODIN_CULTMESH_URI } else { "cultmesh://odin/rendezvous/provider-catalog" }),
[string] $StateDir = $(Join-Path $PSScriptRoot "..\scratch\Hermodr"),
[switch] $NoWindow
)
$ErrorActionPreference = "Stop"
foreach ($name in @(
"HERMODR_ODIN_HTTP_BASE",
"HERMODR_ODIN_WS_BASE",
"HERMODR_ODIN_STATE_PATH",
"HERMODR_SLEIPNIR_COMMAND_RUDP",
"HERMODR_SLEIPNIR_COMMAND_ENDPOINT",
"HERMODR_MUNINN_RUDP",
"HERMODR_AETHERIA_COMMAND_RUDP",
"HERMODR_ODIN_CULTMESH_STORE",
"ODIN_CULTMESH_STORE"
)) {
if (-not [string]::IsNullOrWhiteSpace([Environment]::GetEnvironmentVariable($name))) {
throw "$name was removed. Hermodr lowers Odin/CultMesh state for browsers and may only publish typed CultMesh command documents."
}
}
if (-not [string]::IsNullOrWhiteSpace($env:HERMODR_COMMAND_STORE)) {
throw "HERMODR_COMMAND_STORE was removed. Hermodr publishes typed commands through provider-advertised CultMesh routes and records visible witnesses in Odin's CultMesh cache."
}
$node = "node"
$Hermodr = Join-Path $PSScriptRoot "..\src\hermodr-daemon.cjs"
$arguments = @(
$Hermodr,
"--host", $HostAddress,
"--port", $Port,
"--odin-cultmesh-uri", $OdinCultMeshUri
)
if ($NoWindow) {
New-Item -ItemType Directory -Force -Path $StateDir | Out-Null
$proc = Start-Process -FilePath $node -ArgumentList $arguments -WindowStyle Hidden -PassThru
$proc.Id | Set-Content -Encoding ASCII -LiteralPath (Join-Path $StateDir "hermodr.pid")
Write-Host "Started Hermodr browser lowering at http://${HostAddress}:${Port}/"
return
}
& $node @arguments

View file

@ -1,8 +1,7 @@
param(
[int] $Port = 8797,
[string] $StateDir = "E:\Projects\Odin\scratch\odin",
[string] $CultNetRudpBind = "0.0.0.0:17871",
[string] $IdunnRudpHealth = "127.0.0.1:17870",
[string] $IdunnRudpHealth = $(if ($env:ODIN_IDUNN_RUDP_HEALTH) { $env:ODIN_IDUNN_RUDP_HEALTH } else { $env:IDUNN_RUDP_HEALTH }),
[string] $IdunnDaemon = "odin",
[string] $IdunnHealthContract = "odin.cultnet-rudp-provider-health",
[switch] $Foreground
@ -15,6 +14,17 @@ $scriptPath = Join-Path $repoRoot "src\odin-coordinator.cjs"
$pidPath = Join-Path $StateDir "odin.pid"
$outLog = Join-Path $StateDir "odin.out.log"
$errLog = Join-Path $StateDir "odin.err.log"
$nodeExe = (Get-Command node.exe -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty Source)
if (-not $nodeExe) {
$nodeExe = "C:\Program Files\nodejs\node.exe"
}
if (-not (Test-Path -LiteralPath $nodeExe)) {
throw "Node.js executable is missing; checked PATH and $nodeExe"
}
if ([string]::IsNullOrWhiteSpace($IdunnRudpHealth)) {
throw "Odin Idunn health publication requires -IdunnRudpHealth, ODIN_IDUNN_RUDP_HEALTH, or IDUNN_RUDP_HEALTH; no localhost default is assumed."
}
New-Item -ItemType Directory -Force -Path $StateDir | Out-Null
@ -32,7 +42,6 @@ if (Test-Path $pidPath) {
$env:NODE_PATH = "E:\Projects\CultLib\packages"
$args = @(
$scriptPath,
"--port", "$Port",
"--stateDir", $StateDir,
"--cultnet-rudp-bind", $CultNetRudpBind,
"--idunn-rudp-health", $IdunnRudpHealth,
@ -41,11 +50,11 @@ $args = @(
)
if ($Foreground) {
& node @args
& $nodeExe @args
exit $LASTEXITCODE
}
$proc = Start-Process -FilePath "node" -ArgumentList $args -WorkingDirectory $repoRoot -WindowStyle Hidden -PassThru -RedirectStandardOutput $outLog -RedirectStandardError $errLog
$proc = Start-Process -FilePath $nodeExe -ArgumentList $args -WorkingDirectory $repoRoot -WindowStyle Hidden -PassThru -RedirectStandardOutput $outLog -RedirectStandardError $errLog
$proc.Id | Set-Content -Encoding ASCII -LiteralPath $pidPath
Start-Sleep -Seconds 1
if ($proc.HasExited) {
@ -56,6 +65,4 @@ if ($proc.HasExited) {
}
Write-Host "Odin started as PID $($proc.Id)."
Write-Host "Health: http://127.0.0.1:$Port/health"
Write-Host "Eve deck: ws://127.0.0.1:$Port/eve/deck"
Write-Host "CultMesh/RUDP document catalog: $CultNetRudpBind"

View file

@ -0,0 +1 @@
throw "start-starfire-sleipnir.ps1 archived: Sleipnir lifecycle is Idunn-owned and service discovery is Odin/CultMesh-owned. Add a typed Idunn daemon target and redeploy by poking Idunn; do not start Sleipnir through a direct local launcher."

View file

@ -1,3 +1,8 @@
param(
[string] $NightwingEndpointFallback = $env:STARFIRE_WIREGUARD_NIGHTWING_ENDPOINT_FALLBACK,
[string] $StarfireLanAddress = $env:STARFIRE_LAN_ADDRESS
)
$ErrorActionPreference = "Stop"
$serviceName = "WireGuardTunnel`$wg-gamecult-starfire"
@ -23,10 +28,13 @@ try {
$configChanged = $false
$backupPath = $null
if (-not $nightwingHomeResolves -and $config -match "Endpoint\s*=\s*Nightwing\.Home:51820") {
if ([string]::IsNullOrWhiteSpace($NightwingEndpointFallback)) {
throw "Nightwing.Home does not resolve; supply -NightwingEndpointFallback or STARFIRE_WIREGUARD_NIGHTWING_ENDPOINT_FALLBACK instead of using a baked LAN endpoint."
}
$stamp = Get-Date -Format "yyyyMMdd-HHmmss"
$backupPath = "$configPath.bak-nightwing-home-$stamp"
Copy-Item -LiteralPath $configPath -Destination $backupPath
$config = $config -replace "Endpoint\s*=\s*Nightwing\.Home:51820", "Endpoint = 192.168.1.75:51820"
$config = $config -replace "Endpoint\s*=\s*Nightwing\.Home:51820", "Endpoint = $NightwingEndpointFallback"
Set-Content -Encoding ASCII -LiteralPath $configPath -Value $config
$configChanged = $true
}
@ -36,10 +44,9 @@ try {
$service = Get-Service -Name $serviceName
$ipAddresses = Get-NetIPAddress |
Where-Object { $_.IPAddress -match "^10\.77\." -or $_.IPAddress -eq "192.168.1.66" } |
Where-Object { $_.IPAddress -match "^10\.77\." -or ((-not [string]::IsNullOrWhiteSpace($StarfireLanAddress)) -and $_.IPAddress -eq $StarfireLanAddress) } |
Select-Object InterfaceAlias, IPAddress, PrefixLength
$portProxy = netsh interface portproxy show all
$ollamaTags = & curl.exe -fsS --connect-timeout 5 --max-time 10 http://127.0.0.1:11434/api/tags
@(
"completedAt=$((Get-Date).ToString("o"))"
@ -56,9 +63,6 @@ try {
""
"portProxy:"
($portProxy | Out-String)
""
"ollamaTags:"
$ollamaTags
) | Set-Content -Encoding UTF8 -LiteralPath $logPath
} catch {
@(

22
scripts/stop-hermodr.ps1 Normal file
View file

@ -0,0 +1,22 @@
param(
[string] $StateDir = "E:\Projects\Odin\scratch\Hermodr"
)
$ErrorActionPreference = "Stop"
$pidPath = Join-Path $StateDir "hermodr.pid"
if (-not (Test-Path $pidPath)) {
Write-Host "No Hermodr PID file found at $pidPath."
exit 0
}
$HermodrPid = (Get-Content -Raw $pidPath).Trim()
if ($HermodrPid -match "^\d+$") {
$process = Get-Process -Id ([int] $HermodrPid) -ErrorAction SilentlyContinue
if ($process) {
Stop-Process -Id $process.Id
Write-Host "Stopped Hermodr PID $HermodrPid."
}
}
Remove-Item -LiteralPath $pidPath -Force

View file

@ -205,9 +205,9 @@ function buildPersonaState() {
}),
],
incubation: [
thought("csharp-cultmesh-body", "Gjallar now has an executable C# Nightwing body that consumes Odin's Eve deck and renders the live multi-scale terminal dashboard.", {
thought("csharp-cultmesh-body", "Gjallar has an executable C# Nightwing body that consumes Odin's accepted provider-state snapshot over CultNet/RUDP and renders the live multi-scale terminal dashboard.", {
status: "active",
question: "Which native CultMesh subscription should replace the current Odin WebSocket deck bridge when the protocol is ready?",
question: "Which native CultMesh subscription should become Gjallar's long-lived input once the snapshot contract is no longer enough?",
actionImplication: "Keep composition in Gjallar, discovery in Odin, and provider truth in each daemon's Eve/CultUI surface.",
intensity: 0.76,
tags: ["csharp", "nightwing", "runtime"],
@ -239,8 +239,8 @@ function buildPersonaState() {
readiness: "waiting",
riskLevel: "medium",
target: target("runtime", "gjallar-native-cultmesh", "Gjallar native CultMesh input path"),
summary: "Promote Gjallar's Odin input from the current WebSocket deck bridge to a native CultMesh subscription when the deck contract is ready.",
rationale: "Gjallar's C# Nightwing body exists; the remaining migration debt is the input transport, not the ownership model.",
summary: "Promote Gjallar's Odin input from CultNet/RUDP snapshots to a native CultMesh subscription when the subscription contract is ready.",
rationale: "Gjallar's C# Nightwing body exists; the remaining work is subscription ergonomics, not a web bridge migration.",
urgency: 0.62,
confidence: 0.74,
constraints: [