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 <noreply@anthropic.com>
This commit is contained in:
parent
a73992bacb
commit
6d5dc15f6e
1 changed files with 15 additions and 0 deletions
15
relay/playbooks/app-state-grab.ps1
Normal file
15
relay/playbooks/app-state-grab.ps1
Normal file
|
|
@ -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
|
||||
Loading…
Reference in a new issue