hermes-agent/apps/desktop/src/store
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
..
activity.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
background-delegation.test.ts feat(desktop): add $backgroundResume store for parked delegate_task 2026-06-25 19:57:45 -05:00
background-delegation.ts feat(desktop): add $backgroundResume store for parked delegate_task 2026-06-25 19:57:45 -05:00
boot.ts feat(desktop): persist i18n language in config 2026-06-05 10:32:26 -07:00
clarify.test.ts fix(desktop): surface background-session clarify prompts instead of hanging 2026-06-03 21:07:33 -05:00
clarify.ts fix(desktop): surface background-session clarify prompts instead of hanging 2026-06-03 21:07:33 -05:00
coding-status.test.ts feat(desktop): add project and coding stores 2026-06-25 16:40:27 -05:00
coding-status.ts feat(desktop): make the git cockpit work over a remote gateway 2026-06-28 14:26:09 -05:00
command-palette.ts feat(desktop): floating pet, pop-out overlay + Cmd+K picker 2026-06-20 14:18:40 -05:00
compaction.test.ts fix(desktop): polish compaction indicator and preserve scrollback 2026-06-14 02:48:48 -05:00
compaction.ts fix(desktop): polish compaction indicator and preserve scrollback 2026-06-14 02:48:48 -05:00
completion-sound.ts feat(desktop): add curated completion cue for agent turn completion (#42480) 2026-06-14 00:21:40 -05:00
composer-input-history.test.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
composer-input-history.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
composer-popout.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
composer-queue.test.ts fix(desktop): stop stranding queued prompts across backend bounces 2026-06-13 00:20:51 -05:00
composer-queue.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
composer-status.test.ts feat(desktop): keep active sessions aligned with cwd 2026-06-25 16:40:27 -05:00
composer-status.ts feat(desktop): keep active sessions aligned with cwd 2026-06-25 16:40:27 -05:00
composer.test.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
composer.ts feat(desktop): strict per-thread drafts on decoupled composer 2026-06-11 00:01:06 -05:00
cron.ts fix(desktop): cron overlay mutations sync the sidebar instantly 2026-06-06 16:47:46 -05:00
embed-consent.ts feat(desktop): consent gate for inline embeds (per-embed / per-service) 2026-06-26 13:35:01 -05:00
file-actions.ts feat(desktop): add Codex-style review pane 2026-06-25 16:40:27 -05:00
gateway.ts refactor(desktop+dashboard): extract shared WebSocket/JSON-RPC layer 2026-06-28 21:20:35 -05:00
haptics.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
keybinds.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
layout.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
model-presets.test.ts feat(desktop): per-model effort/fast presets in the picker 2026-06-16 00:08:20 -05:00
model-presets.ts feat(desktop): per-model effort/fast presets in the picker 2026-06-16 00:08:20 -05:00
model-visibility.test.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
model-visibility.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
native-notifications.test.ts feat(pets): quality-first OpenRouter model chain + stronger atlas gates + global pet-gen notifications 2026-06-24 23:11:21 -05:00
native-notifications.ts feat(pets): quality-first OpenRouter model chain + stronger atlas gates + global pet-gen notifications 2026-06-24 23:11:21 -05:00
notifications.ts feat(desktop): persist i18n language in config 2026-06-05 10:32:26 -07:00
onboarding.test.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
onboarding.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
panes.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
panes.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
pet-gallery.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
pet-generate.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
pet-overlay.ts feat(desktop): Alt+wheel to scale the pet, never cropped 2026-06-26 00:33:22 -05:00
pet.test.ts feat(desktop): floating pet, pop-out overlay + Cmd+K picker 2026-06-20 14:18:40 -05:00
pet.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
preview-edit.ts feat(desktop): in-app spot editor for the file preview pane 2026-06-25 19:50:25 -05:00
preview-status.test.ts feat(desktop): detect tool previews into composer status stack 2026-06-22 19:22:11 -05:00
preview-status.ts feat(desktop): detect tool previews into composer status stack 2026-06-22 19:22:11 -05:00
preview.test.ts fix(desktop): toggle preview rail and open in browser 2026-06-22 19:22:11 -05:00
preview.ts feat(desktop): add Codex-style review pane 2026-06-25 16:40:27 -05:00
profile.test.ts test(desktop): cover $connection resync on profile switch 2026-06-15 07:11:02 -07:00
profile.ts feat(desktop): add project and coding stores 2026-06-25 16:40:27 -05:00
projects.test.ts fix(desktop): remote project picker UX and profile-scoped fs/git routing 2026-06-28 16:23:39 -05:00
projects.ts fix(desktop): remote project picker UX and profile-scoped fs/git routing 2026-06-28 16:23:39 -05:00
prompts.test.ts fix(desktop): treat a pending prompt as paused-on-you, not working 2026-06-26 03:55:34 -05:00
prompts.ts fix(desktop): treat a pending prompt as paused-on-you, not working 2026-06-26 03:55:34 -05:00
review.ts feat(desktop): make the git cockpit work over a remote gateway 2026-06-28 14:26:09 -05:00
session-switcher.test.ts feat(desktop): Mac-style session switcher (^Tab / ^⇧Tab / ^1-9) (#43111) 2026-06-09 20:12:46 -05:00
session-switcher.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
session-sync.ts fix(desktop): sync new sessions across windows 2026-06-15 20:59:57 -05:00
session-watchdog.test.ts fix(desktop): let the session watchdog heal a stuck "looping" turn 2026-06-24 18:36:17 -05:00
session.test.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
session.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
subagents.test.ts fix(desktop): make Agents indicator match the Spawn-tree panel 2026-06-24 18:16:14 -05:00
subagents.ts fix(desktop): make Agents indicator match the Spawn-tree panel 2026-06-24 18:16:14 -05:00
system-actions.ts feat(desktop): restart the gateway from Cmd+K, with statusbar spinner feedback 2026-06-19 10:02:54 -05:00
thread-scroll.ts fix(desktop): rebuild thread autoscroll on use-stick-to-bottom 2026-06-13 01:57:30 -05:00
todos.test.ts feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -05:00
todos.ts feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -05:00
tool-diffs.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
tool-dismiss.ts fix(desktop): persist tool-row dismissal across virtualization; keep caret hittable 2026-06-12 17:34:48 -05:00
tool-view.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
translucency.ts feat(desktop): window translucency slider in Appearance settings (#45086) 2026-06-12 12:02:38 -05:00
updates.test.ts Merge pull request #52828 from helix4u/fix/desktop-backend-update-indicator 2026-06-26 11:49:07 -05:00
updates.ts Merge pull request #52828 from helix4u/fix/desktop-backend-update-indicator 2026-06-26 11:49:07 -05:00
voice-playback.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
windows.test.ts feat(desktop): open new sessions in compact windows 2026-06-15 20:59:57 -05:00
windows.ts feat(desktop): open new sessions in compact windows 2026-06-15 20:59:57 -05:00
workspace-events.ts feat(desktop): add project and coding stores 2026-06-25 16:40:27 -05:00