# Astra Game Arena A reproducible, screen-only arena for testing whether a Codex model can complete a natural-language goal in a locally installed Steam game. Patrick's Parabox (364 official levels) is the first fully verified adapter; other installed games use the same best-effort private desktop and input boundary. The model receives a natural-language goal, rendered game frames, keyboard/mouse actions, and two self-inspection tools for elapsed time and token usage. It receives no walkthrough, level data, or save contents. Native web search and network browsers default to disabled; normal Codex capabilities such as Shell, skills, plugins, memory, and sub-agents remain available. > This repository contains no game binary, game assets, save data, or recorded footage. A legitimately purchased Steam copy of Patrick's Parabox is required. ## Why this architecture The native game window remains the sole source of truth. It runs inside Cage's headless wlroots compositor and private Xwayland display. A local MCP bridge requests compositor screenshots and sends isolated mouse/keyboard events. A separate Chrome instance renders the director dashboard in another private Xvfb display. Neither window is mapped to the operator's physical desktop. ```text ┌─ observe_screen / computer-use ─┐ Codex model (Codex) ┤ ├─ Native game in Cage headless Xwayland └─ challenge_time / tokens ───┤ │ Codex JSONL + rollout usage ── Arena controller ──┼─ Director dashboard Game save (referee only) ─────────────────────────┘ │ Cage screencopy + dashboard Xvfb ── FFmpeg → continuous CFR parts ``` The browser is a read-only control/monitoring plane, never a game reimplementation. It lets the operator configure a run and view the unmodified native game beside an exact Codex transcript. It is always served on loopback by the watchdog; no physical browser is opened by default. Use `http://127.0.0.1:4317/control` for configuration and `http://127.0.0.1:4317/live` as the complete 1920×1080 OBS Browser Source. ## Formal layout sample Generate a fresh six-second 1920×1080 sample from the installed game without using model tokens: ```bash node dist/src/cli.js smoke-headless ``` The command writes a playable `recordings/challenge-part-0001.mkv` under `.arena/`, with the native game on the left and the compact director dashboard on the right. It also verifies 30 FPS, changing native pixels, a 48 kHz stereo Opus stream from the private game sink, and save restoration. ## Requirements The current implementation targets Linux with: - Node.js 22+ - Codex CLI with `gpt-6-astra` - Patrick's Parabox (Steam app `1260520`) - Cage with its headless wlroots backend and Xwayland - Xvfb, `xprop`, `wlr-randr`, `grim`, FFmpeg, Steam, Google Chrome, PipeWire/PulseAudio compatibility (`pactl`), a C compiler, and X11/XTest headers - optional: `v4l2loopback` for presenting the live production layout as a virtual camera; its switch also creates a PipeWire virtual microphone carrying only the private game audio On Arch Linux the additional runtime packages are: ```bash sudo pacman -S cage xorg-server-xvfb xorg-xprop grim wf-recorder libxtst ``` Install and verify: ```bash npm install npm run build npm run doctor ``` By default, the harness uses `~/.codex-official` when that directory contains `auth.json`, then falls back to the normal Codex home. Override it with `--codex-home PATH` or `ASTRA_CODEX_HOME`. Credentials are never copied into run artifacts. If two or more separately authenticated homes exist under `~/.codex-game-arena-accounts/