hermes-agent/web/src/lib
Brooklyn Nicholson dfb561a3ae refactor(desktop+dashboard): extract shared WebSocket/JSON-RPC layer
The Electron desktop app and the web dashboard each carried their own
copy of the tui_gateway JSON-RPC WebSocket client plus near-identical
auth'd WS-URL construction. The dashboard's copy was the historical
source of the "is the dashboard required to run the desktop app?"
confusion, since the two surfaces looked coupled.

Consolidate the genuinely shared transport into the existing
framework-agnostic `@hermes/shared` package so both surfaces consume it
independently — neither app depends on the other:

- Move `resolveGatewayWsUrl` + `GatewayReauthRequiredError` (single-use
  OAuth ticket re-mint vs long-lived token fallback) into
  `@hermes/shared`; desktop now imports them directly.
- Add `buildHermesWebSocketUrl`, one base-path/scheme/auth-aware URL
  builder, and route every dashboard WS endpoint through it
  (`/api/ws`, `/api/events`, `/api/pty`, plugin WS URLs).
- Reduce the dashboard `GatewayClient` to a thin subclass of the shared
  `JsonRpcGatewayClient`, deleting ~210 lines of duplicated pending-call
  /event-dispatch/connect plumbing while keeping its dashboard-specific
  ticket-vs-token auth selection.
- Drop the stale "start it with --tui" chat banner, which implied the
  dashboard flag was required.

Behavior is preserved on both surfaces; the dashboard additionally
inherits the shared client's 15s connect timeout (previously
desktop-only), so a hung connect now fails fast instead of pinning the
composer in "connecting".
2026-06-28 21:20:35 -05:00
..
api.ts refactor(desktop+dashboard): extract shared WebSocket/JSON-RPC layer 2026-06-28 21:20:35 -05:00
chat-title.test.ts fix dashboard chat session titles 2026-06-21 22:44:02 -07:00
chat-title.ts fix dashboard chat session titles 2026-06-21 22:44:02 -07:00
cron-job.test.ts feat(dashboard): expose cron job execution fields 2026-06-27 03:20:32 -07:00
cron-job.ts refactor(dashboard): tighten cron-job form helpers 2026-06-27 03:20:32 -07:00
dashboard-flags.ts feat(dashboard): always enable embedded chat; remove dashboard --tui flag 2026-06-04 03:03:35 -07:00
format.ts feat(web): add context window support to dashboard config 2026-04-13 22:04:35 -07:00
fuzzy.ts feat: fuzzy search for the model picker (WebUI + TUI) 2026-06-01 16:58:58 -07:00
gatewayClient.ts refactor(desktop+dashboard): extract shared WebSocket/JSON-RPC layer 2026-06-28 21:20:35 -05:00
nested.ts
reasoning-effort.test.ts feat(dashboard): add a reasoning-effort picker to the chat sidebar (#49141) 2026-06-19 11:37:40 -07:00
reasoning-effort.ts feat(dashboard): add a reasoning-effort picker to the chat sidebar (#49141) 2026-06-19 11:37:40 -07:00
resolve-page-title.ts fix(dashboard): UI polish — modals, layout, consistency, test fixes 2026-05-12 13:59:22 -04:00
schedule.test.ts feat(dashboard): expose cron job execution fields 2026-06-27 03:20:32 -07:00
schedule.ts feat(dashboard): expose cron job execution fields 2026-06-27 03:20:32 -07:00
session-refresh.test.ts fix(dashboard): refresh Sessions list in real time when new sessions are created 2026-06-19 17:26:11 +05:30
session-refresh.ts fix(dashboard): refresh Sessions list in real time when new sessions are created 2026-06-19 17:26:11 +05:30
slashExec.ts feat(web): add /api/pty WebSocket bridge to embed TUI in dashboard 2026-04-24 10:51:49 -04:00
utils.ts refactor(web): dashboard typography & contrast pass 2026-05-22 19:50:32 -07:00