mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
The web bridge (previous commit) made the renderer boot in a browser; this makes an instance actually serve it, end to end, plus the Phase 1 UI gating. Web bridge + renderer: - petOverlay/terminal/updates/uninstall/themes become OPTIONAL bridge members, absent on web rather than stubbed inert — every caller already ?.-guards, so features hide through existing branches (typecheck-verified) - Gateway settings nav entry absent on web (connection IS the serving origin); About hides the Updates section behind a capability check on window.hermesDesktop?.updates (version + release notes stay) - notify requests Notification permission at point of first use - getVersion reports the renderer package version via a vite define Serving (web_server.py): - APP_DIST/mount_app: /app/assets static mount, /app 307-canonicalized to /app/ (relative asset URLs), index served with the same bootstrap-global injection contract as the dashboard SPA (token in loopback mode, cookie + ws-ticket in gated mode); same traversal guard, same auth-gate coverage - Mounts ONLY when HERMES_APP_DIST is explicitly set: no path fallback, so a regular desktop build leaving a dist at apps/desktop/dist can't silently enable /app. Env set but dist missing logs a WARNING (a Docker image with a broken frontend build should not surface as a mystery 404) Build + image: - apps/desktop build:web script: renderer-only build (typecheck + vite), no Electron packaging steps - Dockerfile: desktop manifest joins the cached npm-install layer (ELECTRON_SKIP_BINARY_DOWNLOAD=1 keeps the ~100MB binary out), build:web appended to the frontend-build layer, HERMES_APP_DIST set at runtime - .dockerignore: apps/desktop source enters the build context; node_modules/ dist/build/release re-excluded after the negation (last-match-wins would otherwise re-include them — a stale local dist would clobber the image-built one via COPY . ., and a Windows node_modules would clobber the image's Linux natives) Verified: build:web dist served at /app/ from a real gateway (token injected server-side, host:'web', gateway WS connected, zero console errors); mount contract curl-verified in both directions (no env var = /app falls through to the dashboard SPA even with a dist present on disk). Image build itself pending a docker-capable machine. No-op for every install that doesn't set HERMES_APP_DIST; zero behavior change for Electron users. |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||