0013: Apps run from recipes by our runner; pads go through one daemon
- Status: Accepted (owner, 2026-11-14)
- Date: 2026-11-14
Context
With Gamescope on the TV (ADR 0009) and Wolf leaving (ADR 0011), apps need a starter and pads need a router. Wolf's runner is compiled into Wolf and tied to its event bus. Pads read by every app container (evdev allows many readers) reach background apps too: Dolphin reads input when not focused (BackgroundInput=True), and no app can own a Home button.
Decision
A recipe per app (pinned image, launch command, memory limit, devices, mounts, pad rules, config overlay). Recipes never hold host paths: mounts name a household folder (roms, bios, media, ...) whose path comes from .env, written by setup or the wizard, so each household's own storage layout works without editing recipes. A small Python runner on the Docker API starts and stops app containers from recipes as clients of a screen, with memory caps and a total memory budget; a recipe says whether a second copy of its app is safe (copies: one | many), and opening an app that runs on another screen offers "Join" or, where safe, "Start my own". A pad daemon grabs every real pad and remote pad and feeds one inputtino virtual Xbox pad per player, whose node it puts only into the container of the app in front; Guide goes Home (long press for apps that use Guide).
Consequences
- Every app image is built on our own base image (owner, 2026-11-14); Wildlife Dockerfiles are credited reference for how to install each app, not runtime images.
- Emulator mappings made for Wolf's virtual pad keep working if the virtual pad keeps the same name and layout.
- The runner also carries the Home Assistant control that the TV supervisor has today (ADR 0006).