$ account 10000ge10000
This repository is the `luci-app-openclaw` package for OpenWrt routers, providing a complete web UI (via LuCI) and command-line management surface for the OpenClaw AI gateway. The system handles installation and lifecycle of a Node.js runtime and the OpenClaw npm package, configures AI model and messaging channel settings (Telegram, WeChat, etc.), manages device pairing approvals, offers an interactive terminal (xterm.js) via WebSocket, and supports backup/restore with atomic writes. The architecture is a monolithic OpenWrt plugin that integrates with procd for service management, UCI for configuration, and relies on external Node.js binaries plus the OpenClaw gateway software. The codebase exhibits strong engineering practices: a comprehensive contract-test suite with mutation testing, atomic configuration writes with pre-write backups, CSRF protection on all state-changing endpoints, a shell/JS menu engine for interactive configuration, and an upgrade state machine with rollback. It is actively maintained with frequent adjustments to upstream OpenClaw versions and security hardening.