HydraIssues

Move body-side operational scripts into a versioned repo (not ad-hoc on bodies)
open improvement Project: hydrabody Reporter: 22 Apr 2026 17:42

Description

## Context

On 2026-04-22 I wrote three helper scripts to `C:\hydrabody\streamdeck\` on wobbly:
- `kiosk-off.ps1` / `kiosk-on.ps1` (hit hydrabody's local kiosk API with embedded token)
- `kiosk-off.cmd` / `kiosk-on.cmd` (wrappers that invoke PowerShell with `-ExecutionPolicy Bypass`)

These scripts are production-relevant — the physical StreamDeck calls the .cmd wrappers. But they sit on the body's disk only, not versioned, not deployed via CI, not reviewable.

## Problems

- No source of truth: if someone edits them on wobbly, the drift is invisible.
- Can't be redeployed to a new body without copy-paste.
- Token is embedded in plaintext in the .ps1 files — if hydrabody rotates its token, every body's scripts must be regenerated manually.
- No PR review or audit trail.

## Proposal

Two options:

### Option A (lightweight)
Create `hydrabody/scripts/body-side/` in the hydrabody repo. Check in the `.ps1` / `.cmd` files. hydrabody's provisioning step extracts them to `C:\hydrabody\scripts\` on the body during install. The token can be templated in at provision time from the body's own config.

### Option B (tiered)
Separate repo `hydrabody-bodyscripts` (or similar), released and pulled by hydrabody alongside Sunshine. Overkill for current volume.

Recommend Option A for starters. Rolls out via existing hydrabody tag-triggered CI. No new deployment mechanism.

## Scope

- Move the four current scripts into the repo.
- Provisioning code writes them to disk with the body's current token substituted (or switch the PS side to read the token from body.yaml each invocation, so it auto-updates on rotation).
- Document the pattern so future physical-exposure helpers go the same route.

## References

- Physical-exposure body pattern plan: `/home/claude-user/.claude/plans/gentle-greeting-papert.md`
- Scripts currently live at `C:\hydrabody\streamdeck\` on wobbly (node-5f8b7b59).