From 5e3e6a16641e3dca966d234d53b96c08d4ddfcdb Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Tue, 6 Oct 2026 22:30:38 +0000 Subject: [PATCH] relay: app-state-grab playbook (two GETs of the installed app's state and chain feed, sent back through the relay; read-only) Co-Authored-By: Claude Fable 5.1 --- relay/playbooks/app-state-grab.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 relay/playbooks/app-state-grab.ps1 diff --git a/relay/playbooks/app-state-grab.ps1 b/relay/playbooks/app-state-grab.ps1 new file mode 100644 index 00000000..2b284606 --- /dev/null +++ b/relay/playbooks/app-state-grab.ps1 @@ -0,0 +1,15 @@ +# Igneum playbook: copy the installed app's live state and chain feed (two GETs) back through the relay, so a capture +# of the dashboard can be rendered elsewhere from this machine's real numbers. Read-only: never pauses, resumes or +# quits anything (the standing rule of 5 October 2026). +# Queue: packaging/ota/publish-jobs.sh add --kind run --target 1ccfe586 --script relay/playbooks/app-state-grab.ps1 --title "app state grab" +$ErrorActionPreference = 'Continue' +$urlFile = Join-Path $env:LOCALAPPDATA 'igneum\app\app.url' +if (-not (Test-Path $urlFile)) { Write-Host "ERROR: $urlFile missing (is the app running?)"; exit 2 } +$url = (Get-Content $urlFile -Raw).Trim() +$out = Join-Path $env:TEMP 'igneum-state'; New-Item -ItemType Directory -Force -Path $out | Out-Null +foreach ($pair in @(@('api/state', 'state.json'), @('api/live?window=120', 'live.json'))) { + $dest = Join-Path $out $pair[1] + try { Invoke-WebRequest -UseBasicParsing -Uri ($url + $pair[0]) -TimeoutSec 15 -OutFile $dest; Write-Host "RESULT file=$($pair[1]) bytes=$((Get-Item $dest).Length)"; & $env:RELAY_SEND -TaskId ([long]$env:RELAY_TASK_ID) -Title ("app " + $pair[1]) $dest } + catch { Write-Host "RESULT file=$($pair[1]) failed: $($_.Exception.Message)" } +} +exit 0