agentbbs/plugins/arcade
Anthony Ettinger 481e715d89 fix(arcade): give ncurses games a TERM so they launch
The 80s arcade classics (Space Invaders/nInvaders, Pac-Man/pacman4console,
Tetris/tint, Moon Patrol/moon-buggy) are ncurses programs: initscr() fails
with "Error opening terminal" when TERM is unset. Game subprocesses were
built with exec.Command and no Env, so they inherited the agentbbs systemd
daemon's environment — which has no TERM — and every game exited before
drawing a frame. DOOM was unaffected because doom-ascii writes ANSI directly
and never touches terminfo.

Thread the client PTY's TERM through plugin.Context and hand each sandboxed
game a curated environment (TERM, PATH, HOME, LANG=C.UTF-8) instead of the
daemon's. Curating the env also stops leaking operator secrets (e.g.
COINPAY_API_KEY) into third-party game binaries.

Verified live on bbs.profullstack.com: Space Invaders and Pac-Man now render;
previously all four died instantly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 12:01:26 +00:00
..
arcade.go fix(arcade): give ncurses games a TERM so they launch 2026-06-18 12:01:26 +00:00
board.go Fix/pod public html bind mount (#30) 2026-06-15 08:06:32 -07:00
ptyexec.go AgentBBS: M0 core hub, M1 arcade, pods with CoinPay membership 2026-06-11 11:08:17 +00:00
snake.go AgentBBS: M0 core hub, M1 arcade, pods with CoinPay membership 2026-06-11 11:08:17 +00:00