Add consumer server CLI with Typer + Rich and Windows launcher

Introduce production-ready CLI for hosting Commonwealth Online servers in
cloud and on-premises environments.

Features:
- Server orchestration service (server_service.py) wrapping relay lifecycle
- JSON configuration system (config.py) for hosted deployments
- Typer+Rich CLI (consumer_server_cli.py) with serve/status/clients/world commands
- Windows launcher (start.bat) for one-click server startup
- Auto-detection of LAN addresses and dependency installation
- Machine-readable JSON output for monitoring and automation

Cli commands:
  serve - Start server with optional config overrides
  status - Display server stats and packet counters
  clients - List connected players
  world time - Set in-game time for all clients
  world weather - Set weather for all clients
  config init - Generate default configuration file

Documentation:
  - Updated docs/setup.md with CLI quick-start guide
  - Added server/README.md with usage instructions
  - Updated changelog and dev-log with test results

Testing: - Verified config generation and loading
  - Verified server startup banner and LAN detection
  - Verified fake client connection and welcome packet
  - Verified CLI help and command routing
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-09 20:44:40 +12:00
co-authored by Cursor
parent 25e75b5426
commit 7a3e0855b0
9 changed files with 999 additions and 274 deletions
+11 -4
View File
@@ -10,14 +10,21 @@ For testing notes, milestone summaries, known issues, and next steps, see [`docs
## [Unreleased]
### Added
- Main menu QUIT button now exits Fallout 4 via the engine `quitGame` flag (JS `coAction` bridge + C++ game-thread handler).
- Main menu quit confirmation dialog (`EXIT GAME?` with YES to quit and NO to return).
- **Consumer server CLI** (`server/consumer_server_cli.py`): Production-ready CLI for hosting Commonwealth Online servers in cloud and on-premises environments using Typer and Rich.
- **Server orchestration service** (`server/server_service.py`): Reusable service facade for wrapping server lifecycle, configuration, and admin operations (stats, world-state control).
- **Configuration module** (`server/config.py`): JSON-based config loading, validation, and generation for hosted deployment (host, port, server name, max players, logging verbosity).
- **Windows launcher** (`server/start.bat`): Double-click to start server with automatic dependency installation and config generation.
- **Server README** (`server/README.md`): Quick-start guide for Windows users and CLI reference.
- CLI commands: `serve`, `status`, `clients`, `world time`, `world weather`, `config init`.
- JSON output mode for all commands (`--json` flag) suitable for monitoring and automation.
- Server startup banner with connection instructions and LAN address detection.
- Updated `server/requirements.txt` with `typer` and `rich` dependencies.
### Changed
- Server browser UI restyled to match the main menu and settings panels: Futura PT Demibold typography, amber/green palette, yellow selection bars, and shared panel chrome (replaces the old bright-green HUD terminal look and SVG border strips).
- Documentation updated: `docs/setup.md` now includes quick-start CLI hosting instructions.
### Fixed
- Main menu left-nav highlight no longer swaps when switching between Multiplayer browser and Settings modals (stale panel-close callbacks were overwriting `setSelected` after the next modal opened).
- None currently in this release.
- Custom main menu overlay and open sub-panels (server browser, settings) now hide when a server join begins loading the game, so the overlay no longer obscures or blocks the vanilla loading screen.
- Mouse cursor no longer trampolines back to a centered box in the custom main menu (previously only worked with a gamepad connected). In mouse mode the title-screen engine repositions/clips the OS cursor to a small centered box every frame; with a gamepad active that path never runs, so the pointer was free. Fixed by intercepting `SetCursorPos` and `ClipCursor` in the Fallout4.exe import table (IAT) and making them no-ops while the Commonwealth Online overlay owns the pointer, so the game can no longer move or box in the Windows cursor. Only the game module's imports are patched, leaving PrismaUI's own cursor rendering untouched. Also hooks the `MainMenu` `OnCursorMoveEvent`/`OnMouseMoveEvent` vtable slots and keeps the `MenuCursor` release (`forceOSCursorPos = false`, cleared parallax constraints, widened bounds) as defense-in-depth.