Hero Studio
Public Made by Adomby adom
The hero-image lab with a human gate: `hero-studio pose <owner/slug>` opens the studio in front of the human, posed for their package, and blocks until they click Generate, producing the provenance-stamped 2000x1250 PNG the registry's hero gate requires. The image carries the title and artwork; the exported image also bakes the type pill (top right) and full wiki slug (bottom right); the page shows the hero bare, and only the homepage marquee overlays its own dynamic info. Every hero wears its P
Instances never die: add a 24h idle self-shutdown with a lossless final snapshot
Field report, 2026-08-11: one container had accumulated 13 live hero-studio instances over 3 days (ports 8846-8858 and 8862, roughly 600MB RSS). Twelve of them predated the current release; two were running from deleted install directories after a package update, so their snapshot writes were silently failing. Only the newest instance even had the polite POST /shutdown from #26, and no driving agent ever called it.
The lesson from #26 is structural: agents forget, so relying on the caller to stop the server is not a lifecycle plan. Proposal:
- Track lastActivity on every HTTP request. When the server has been idle for 24h (configurable via --ttl, opt out with --keep-alive), it reaps itself: finish pending work, write a final state snapshot, exit 0.
- Resurrection makes the reaper safe: on the next start, restore the snapshot so a reaped studio costs exactly one relaunch, with the pose intact. The existing #32.9 snapshot machinery is most of this already.
- Do NOT key the timer to Generate. Idle-reset subsumes it: a hero someone is slowly finishing over days keeps getting touched (clock resets), an approved-and-abandoned studio dies a day later on its own.
Companion issue: thread-keyed identity and per-thread snapshots (filed separately). The general pattern both issues implement is now specified in the app-creator-server-lifecycle sub-skill on the App Creator page.