- Copy working src/frontend code into packages/frontend/src
- Add vite.config.js and index.html to packages/frontend
- Add real backend WebSocket server source
- Switch flake from pnpm to npm builds
- Force-add npm lockfiles (gitignored) for Nix source inclusion
- Set correct npmDepsHash for both packages
Implements packages/backend/src/index.ts:
- Creates WebSocket server on port 18790 (configurable via WS_PORT)
- Instantiates OpenClawBridge and connects to OpenClaw GW
- Transforms bridge agentStateChanged events into frontend-compatible state.diff messages (agent.activity / agent.position ops)
- Sends state.full snapshot on new client connection
- Broadcasts heartbeat pings every 15 seconds
- Handles graceful shutdown on SIGINT/SIGTERM