Commit graph

2 commits

Author SHA1 Message Date
17d8d21704 feat(backend): WebSocket server wiring bridge to frontend
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
2026-05-19 18:14:57 -07:00
bb06f2c48c build: add Nix flake and NixOS module for reproducible builds
- flake.nix: devShell, frontend package, backend package, combined default
- spatial-office.nix: standalone NixOS module for importing into n97 config
- packages/frontend: React + @react-three/fiber + Zustand (Vite build)
- packages/backend: Node.js + ws + Zod (WebSocket server, port 18790)
- pnpm-workspace.yaml: monorepo workspace config

nix build .#frontend  — bundled static site
nix build .#backend   — runnable WebSocket server
nix build             — full spatial-office application
nix develop           — dev shell with Node.js 22 + pnpm
2026-05-19 16:25:24 -07:00