hermes-agent/website
kshitijk4poor d0964c5150 feat(dashboard): log HTTP access + WebSocket lifecycle to the gui surface
The messaging gateway logs every inbound message to gateway.log, but its
dashboard/TUI twin (gui.log) was nearly silent: the dashboard FastAPI app had
host-header/auth-gate/auth middlewares but no access log, and 3 of 4 WebSocket
endpoints logged nothing at all. Worst of these, /api/pty logged 'pty accepted'
on connect but was completely silent on close — a PTY EOF (backend crash), a
send failure, or a client drop left no trace, so user-reported 'chat
disconnected / TUI froze' was unreproducible.

Extend the convention tui_gateway/ws.py::handle_ws already establishes (a
structured 'ws closed peer=... reason=... <counters>' line) across the whole
surface, at the same INFO granularity as gateway.log, into the gui.log that is
already sized for it (10MB x5):

- HTTP access-log middleware (registered LIFO-outermost so it captures the
  final status, including 400/401 from the middlewares above): one INFO line
  per request with method, path, status, latency, request id, peer. Path only,
  never the query string (tokens ride in query on some routes). UA/referer at
  DEBUG (-v). Reads/echoes X-Request-ID for client/proxy correlation.
- /api/pty: structured close line covering all exit paths
  (client_disconnect | pty_eof | send_failed | error) with duration and
  bytes_in/out counters.
- /api/pub + /api/events: accept + structured close (reason/duration/frames)
  + all reject paths.
- /api/ws: reject paths logged; request id threaded into handle_ws and stamped
  on its accept/close lines so a WS session correlates with the HTTP upgrade.

Metadata only — no request/response bodies, no WS frame payloads, no
headers/cookies on the INFO lines. Opt-in body capture is a separate change so
this stays clear of the debug-share privacy surface.

handle_ws gains an optional rid=None arg, backward-compatible with the stdio
entry-point (tui_gateway.entry) which calls handle_ws(ws).

Tests (behavior-contract style, not frozen strings): HTTP access line shape +
query-string redaction + 401-still-logged + X-Request-ID round-trip; WS
accept/close lines for /api/pub and /api/events; WS reject logging; rid
propagation through handle_ws.
2026-06-19 17:45:17 +05:30
..
docs feat(dashboard): log HTTP access + WebSocket lifecycle to the gui surface 2026-06-19 17:45:17 +05:30
i18n/zh-Hans/docusaurus-plugin-content-docs/current feat(skills): add html-artifact skill, fold in sketch + architecture-diagram + concept-diagrams (#48899) 2026-06-19 08:02:31 +00:00
scripts refactor(cron): rebrand Cron Recipes -> Automation Blueprints 2026-06-11 10:49:47 -07:00
src refactor(cron): rebrand Cron Recipes -> Automation Blueprints 2026-06-11 10:49:47 -07:00
static feat: add z-ai/glm-5.2 to OpenRouter and Nous model lists 2026-06-16 23:35:45 +05:30
.gitignore feat(skills-hub): health checks, freshness badge, and a watchdog cron (#32345) 2026-05-25 23:10:45 -07:00
docusaurus.config.ts docs: point desktop download links to site root (deprecate /desktop) (#46795) 2026-06-15 15:02:24 -04:00
package-lock.json docs(website): redirect old automation-templates URL to automation-blueprints 2026-06-12 09:46:27 -07:00
package.json docs(website): redirect old automation-templates URL to automation-blueprints 2026-06-12 09:46:27 -07:00
README.md docs: replace ASCII diagrams with Mermaid/lists, add linting note 2026-03-21 17:58:30 -07:00
sidebars.ts feat(skills): add html-artifact skill, fold in sketch + architecture-diagram + concept-diagrams (#48899) 2026-06-19 08:02:31 +00:00
tsconfig.json change(tooling): typecheck in CI, update ts to 6 2026-06-10 11:59:34 -04:00

Website

This website is built using Docusaurus, a modern static website generator.

Installation

yarn

Local Development

yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

Using SSH:

USE_SSH=true yarn deploy

Not using SSH:

GIT_USER=<Your GitHub username> yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.

Diagram Linting

CI runs ascii-guard to lint docs for ASCII box diagrams. Use Mermaid (````mermaid`) or plain lists/tables instead of ASCII boxes to avoid CI failures.