feat(desktop): add "Connect to existing Hermes" option to first-run onboarding - #70907
Conversation
…nboarding Adds a first-run Desktop choice between installing Hermes locally and connecting to an existing remote Hermes gateway. The choice appears after backend resolution but before ensureRuntime(), so selecting remote cannot accidentally trigger local bootstrap. New modules: - first-run-setup-gate: concurrent first-run decision gate and reset semantics - primary-backend-startup: Electron-free orchestration seam (saved remote resolution, gate decision, remote re-resolution, local continuation) - primary-connection-rehome: prevents dual-owner race where both cold boot() and renderer softSwitch() could connect simultaneously - first-run-remote-form: extracted remote form with stale-result guards Reuses existing connection-config IPC, encrypted token storage, OAuth session partition, and primary backend resolution. Fixes #38602 Fixes #36970
૮ >ﻌ< ა ci reviewran on 7dd2b2d all good! |
|
How do I get this to work? The installer still does the same thing it always did before. No option to just install the Desktop. Now I have a bunch of junk installed on my laptop that I don't want or need. |
|
Great to have this merged now! It could be much easier to have another desktop frontend deployed.
-I believe it's only changed behavior for the first-run, right? so for existing desktop deployed, it does not remove that backend/bootstrap installed. A fresh deploy might be needed if you want to make a simple client-only desktop. |
|
New release, but the Desktop installer still doesn't have this implemented. Am I doing something wrong? |
|
For anyone wondering why this isn't working as you have expected, this PR is not related to the current Desktop installer shipped on Hermes' website. There are two kinds of installer for Hermes. One is built from However, that kind of installer is NOT pre-built and shipped by Hermes, so you have to build it yourself: So instead of setting up a full Python environment, now you need to set up a full Node environment 😅 |
|
Thank you! So to be clear, there is no version for Linux? |
There are several packaging options for Linux, all within the same command: |
Thanks. Yes, in the meantime I read the README and figured out how to run the installer build. It failed at the step where it creates the .deb, but I am running the appimage (eeewww) and so far it is working. Thanks again. Not the smoothest UX but I'll take what I can get. :) |
…rst-run-remote feat(desktop): add "Connect to existing Hermes" option to first-run onboarding
Adds a first-run Desktop choice between installing Hermes locally and connecting to an existing remote Hermes gateway. When Desktop can't find a usable local runtime or saved remote connection, users can connect to a running gateway without first installing Python, cloning the agent, or creating a local virtualenv. The unsupported packaged-install screen gets the same remote escape hatch.
The decision gate sits after backend resolution and before
ensureRuntime(), so choosing remote can never fall through into local bootstrap. Remote credentials flow through the existinghermes:connection-config:applyIPC, encrypted token storage, and OAuth session partition — no new credential path, no new model tools, no prompt-cache or public-config changes, no new env vars.This is a rebase/salvage of #60489 by @cat-thats-fat onto current
main. The original was ~939 commits behind and GitHub-merge-conflicted afterapps/desktop/electron/main.tswas reworked; the only real conflict was a single import collision, resolved by keeping both imports. The extracted orchestration seams (primary-backend-startup,primary-connection-rehome,first-run-setup-gate) re-integrate cleanly into the evolvedstartHermes()— verified bytypecheck, the desktop test suite, and lint.The main-process integration test (
first-run-setup-main-process.test.ts) covers the exact gap flagged in review: a first-runbootstrap-neededremote apply connects remotely withensureRuntime/runBootstrapcalled zero times.Validation
npm run typecheck(renderer + electron + e2e) — cleannpx vitest runon the 5 new/changed test files — 30 passednpm run lint— 0 errorsSupersedes #60489
Fixes #38602
Fixes #36970
Co-authored-by: cat-thats-fat declanbatesmith@outlook.com