Commit graph

9 commits

Author SHA1 Message Date
Scott Scoble
03eaea3f2d build: fix Nix flake with correct npmDepsHash and working builds
- 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
2026-05-19 18:15:41 -07:00
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
af424a1a1c feat(frontend): isometric office renderer with Three.js
- React + @react-three/fiber + Zustand frontend
- Isometric tile grid with 6 colored zones
- Agent sprites as colored cubes with glow effects
- Smooth movement animation via lerp
- Zone labels (HTML overlay)
- Hover tooltips with agent activity/task
- WebSocket client with reconnect backoff
- Mock mode for standalone operation (no backend needed)
- Orthographic camera setup for true isometric projection
- Vite build configuration (port 18790)
2026-05-19 16:26:54 -07:00
3d735d3527 chore: add .gitignore for node_modules, dist, and IDE files 2026-05-19 16:26:47 -07:00
3e2f441746 feat: add OpenClaw gateway bridge module
Implements the spatial-office → OpenClaw Gateway bridge:
- Connects as backend client via WS (Gateway Protocol v3)
- Polls agent sessions via sessions.list RPC
- Maps agent state → spatial zones (solo, collaboration, coaching, social)
- Emits agentStateChanged events for the state engine
- Handles reconnection with exponential backoff
- Zone assignment logic based on activity context

Files:
- src/bridge-openclaw/index.js — Main bridge (OpenClawBridge class)
- src/bridge-openclaw/types.js — Zod data models, zones, positions
- src/bridge-openclaw/package.json — Dependencies (ws, zod)
2026-05-19 16:26:32 -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
0d3879b02f Add ARCHITECTURE.md (42KB) and COMPETITIVE_ANALYSIS.md (25KB)
Delivered by @senior-eng and @market for spatial-office MVP scoping.

Key architecture decisions:
- React + @react-three/fiber + Zustand frontend
- Node.js + ws + Zod backend on port 18790
- Three bridges: OpenClaw Gateway protocol, Hermes ACP, Pi SDK
- Diff-based WebSocket state sync (100ms batched)
- 6 spatial zones for 9 agents + 1 human observer
- Nix flake with systemd module for n97 deployment
- Phase 1: Observable Office (OpenClaw state only, no Hermes/Pi)

Competitive analysis: 12 competitors profiled, conclusive gap in
VR+browser spatial bridge. Zero agent visualization products.
2026-05-19 16:17:05 -07:00
081ebc5e2a Initial README — spatial office vision and repo structure 2026-05-19 16:14:00 -07:00
b4198e3f36 Initial commit 2026-05-19 16:12:11 -07:00