Date: 2026-05-11
Time: 15:36
This is an FTL2 AI-loop rule that ensures the catbeez-arcade Python wheel and associated game files (HTML, JS, WASM) are uploaded and installed in a Python 3.13 uv-managed virtualenv on the arcade host. It follows the observe/condition/action pattern used by FTL2's reconciliation loop.
This rule is not called directly — it's picked up by the FTL2 AI reconciliation loop. The loop evaluates observe to gather state, runs condition() to decide if action is needed, then calls action() if the condition is true.
The rule targets a single host "arcade" and uses three module types via ftl["arcade"]:
await ftl["arcade"].shell(cmd="...") # Run shell commands
await ftl["arcade"].copy(src=..., dest=..., owner=..., group=...) # Upload files
await ftl["arcade"].file(path=..., state="directory", owner=..., group=...) # Ensure directory exists
arcade — must be defined in FTL2 inventoryshell module to check if catbeez-arcade is pip-installed and if .wasm game files exist under ~/games/dist/catbeez_arcade-0.1.0-py3-none-any.whl — the wheel to upload (relative to the rule's working directory)~/git/catbeez-games/games/ — local directory containing game files (HTML, JS, WASM)~/.venv/ — Python 3.13 uv venv/home/admin/ — wheel upload destination/home/admin/games/ — game file destinationadmin:admincatbeez-arcade is not found in pip output, or (2) the observe command returns a non-zero exit code (game files missing).uv venv) overwrites any existing venv.glob and os inside the action to dynamically discover local game files rather than hardcoding filenames.0.1.0) — updating the wheel requires editing this rule.shell, copy, file — standard FTL2 automation modulesuv being pre-installed on the arcade host for venv and pip management~/git/catbeez-games/games/, the wheel from dist/ftl2-deployments — single-host observe/condition/action with file upload and shell provisioning