mirror of
https://github.com/profullstack/agentbbs.git
synced 2026-08-13 14:27:27 +00:00
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> |
||
|---|---|---|
| .. | ||
| plugin.go | ||