Repository navigation
Add hermes-desktop - #166
Merged
Merged
Conversation
Hermes pins every one of its ~120 dependencies with == and declares Requires-Python >=3.11,<3.14, so it can neither be built against Arch's Python 3.14 nor share the python-* packages, and Arch's next Python bump would break any venv this package built. So it ships a wrapper instead and lets mise give Hermes a private environment -- the arrangement omarchy-mise-install already makes for the other coding agents. Two things the wrapper has to work around. mise reads [...] as its own tool options rather than as Python extras, so the extras have to be spelled [extras=all]; written [all] they are dropped without a word and the install comes out byte-identical to a bare one. And given no compatible interpreter to hand, uv builds the venv against the system Python in violation of Hermes' own bound, reports success, and leaves the breakage to surface later inside some dependency. The interpreter is therefore pinned on install and re-checked on every run, since mise up reinstalls without the pin. The icon is upstream's own 1024x1024 app icon -- the mark the site serves as its favicon -- downscaled at build time so menus don't smudge it themselves.
Both files changed after the sums were generated -- the wrapper learned to fall back to hermes when invoked under an unknown name, and the desktop entry dropped its second main category -- so makepkg rejected them.
Install > AI is for GUI apps, so the package becomes the desktop shell and the terminal agent moves to a lazy mise stub that omarchy installs itself. Nous builds Hermes Desktop for macOS and Windows only -- their download page offers a .dmg and an .exe and points Linux users at a terminal install -- so there is no vendor binary to repackage the way grok-bot repackages xAI's deb. Their electron-builder config does carry a Linux target though, untested by upstream but working: npm ci at the workspace root, npm run pack in apps/desktop, and electron-builder stages node-pty and get-windows for linux-x64 on its own. 337 MB unpacked, 129 MB packaged. The app is only a shell -- it runs `hermes serve` against a CLI it does not ship, and clones its own unpinned copy into ~/.hermes when it finds none. So /usr/bin/hermes-desktop makes sure the CLI is there before handing over, and says so plainly rather than bootstrapping a second Hermes where Omarchy's installer isn't around to do it properly.
Chromium falls back to XWayland often enough to matter, and the result is a blurry window on every scaled display -- the same reason the ChatGPT and Grok Bot launchers set this. Skipped when the caller has already named a platform.
Pin the build stamp. write-build-stamp.mjs resolves the commit the app pins its first-launch bootstrap to, preferring $GITHUB_SHA and otherwise running `git rev-parse`. That fallback is wrong under makepkg: the build happens inside this repository, so git ascends out of srcdir and stamps the app with an omarchy-pkgs commit that means nothing upstream. Confirmed by rebuilding -- the stamp now reads the tag's own commit rather than this repo's HEAD. Ship upstream's MIT licence. The package declares MIT and was installing only Electron's licence text. Repair a drifted CLI before launching rather than only a missing one. `mise up` can leave Hermes rebuilt against the system Python, and a stub can be there but cold; either way the wrapper's own repair takes minutes while the app allows 15 seconds before bootstrapping its own copy. Running the installer unconditionally costs nothing when Hermes is healthy. Register the hermes:// scheme. The desktop entry took %U while declaring no MimeType, so the scheme electron-builder configures went unhandled.
The launcher only delegated to omarchy-install-hermes-cli and, when that was absent, printed a warning to stderr -- which nothing sees under a graphical launch -- and started the app anyway. The app then offered to install Hermes itself, and that copy wins permanently: it checks ~/.hermes/hermes-agent before it checks PATH, so installing the CLI afterwards changes nothing until that directory is deleted. So install it here when omarchy's script isn't around, with the same interpreter pin and the same exported cooldown, and hand the app the real executable by putting the mise install's bin directory on PATH instead of leaving it to search. Its probe allows 15 seconds; resolving this way takes 0.2. mise and uv become dependencies, which is what makes the package self-sufficient on a machine without Omarchy.
Built from v2026.8.18 against the CLI on PyPI, the app never starts: it resolves the CLI, launches the backend, and then fails its readiness probe with 401 Unauthorized. The two have to agree on the dashboard session-token handshake -- the app scrapes window.__HERMES_SESSION_TOKEN__ out of the served HTML, and web_server.py falls back to a random token when it cannot agree, so every probe after that is rejected. A month separated the two: the tag was 2026-08-18, hermes-agent 0.19.0 on PyPI was 2026-07-20. Upstream never meets this because their installer builds the app from the same checkout it installs the CLI from. Pinning the CLI forward to the app's commit is not open to us either -- Hermes refuses a non-editable install from a git checkout and tells you to use `uv sync` instead. So the app is pinned back instead, to the tag PyPI's current release was cut from. Verified on a worker: the desktop reaches "Hermes backend is ready" and maps its window, where the newer build stopped at the 401 every time.
Pairing the app with the mise CLI does not work, and pinning the app back to the tag behind PyPI's release does not rescue it: v2026.7.20's desktop reaches "backend is ready" and then hangs without ever opening a window, against its own matching runtime. Only the newest app against a runtime built from its own commit starts, which is the arrangement upstream ships. So the package returns to the newest tag and the launcher sets HERMES_DESKTOP_IGNORE_EXISTING, which keeps the app off whatever hermes is on PATH -- on Omarchy that is the mise CLI installed for the terminal agent, a different release, and the version gap is what produced the 401. The app provisions ~/.hermes itself on first launch instead. mise and uv are no longer dependencies, since the launcher no longer installs anything; git and curl are, because the app's own bootstrap needs them.
Greptile SummaryAdds an Arch package for Hermes Desktop, building the upstream Electron application and allowing it to provision a commit-matched Hermes runtime.
Confidence Score: 4/5The PR is not yet safe to merge because the packaged Chromium sandbox can be unusable on target systems whose user-namespace support differs from the build host. The package still derives Files Needing Attention: pkgbuilds/hermes-desktop/PKGBUILD
|
| Filename | Overview |
|---|---|
| pkgbuilds/hermes-desktop/PKGBUILD | Builds and installs Hermes Desktop, but its sandbox permission decision still depends on the build host rather than the installation target. |
| pkgbuilds/hermes-desktop/hermes-desktop.sh | Launches the packaged application with an isolated Hermes runtime and selects native Wayland unless the caller supplied an Ozone platform. |
| pkgbuilds/hermes-desktop/hermes-desktop.desktop | Registers Hermes Desktop as a graphical application and handler for Hermes URLs. |
Reviews (2): Last reviewed commit: "Reconcile Hermes ownership on every laun..." | Re-trigger Greptile
Comment on lines
+128
to
+132
| # are unavailable; where they work, setuid root is the worse of the two. | ||
| if ! { [[ -L /proc/self/ns/user ]] && unshare --user true; }; then | ||
| chmod 4755 "${pkgdir}/opt/${pkgname}/chrome-sandbox" | ||
| else | ||
| chmod 0755 "${pkgdir}/opt/${pkgname}/chrome-sandbox" |
There was a problem hiding this comment.
Tidying the terminal agent's Hermes away only happened in the menu installer, so `pacman -S hermes-desktop` on its own, or an install interrupted after the package landed, left two Hermeses -- and by then the menu entry that would have noticed is disabled, because we are installed. Co-Authored-By: Codex XHigh <noreply@openai.com>
4 tasks done
maralcbr
referenced
this pull request
in maralcbr/omarchy-pkgs
Sep 20, 2026
Report disk shortfalls with numbers before downloading (#166)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
hermes-desktop— Hermes as a desktop app.Nous builds it for macOS and Windows only: their download page offers a
.dmgand an.exeand points Linux users at a terminal install, so there is no vendor artifact to repackage. Theirelectron-builderconfig does carry a Linux target they never ship, and it builds clean —npm ciat the workspace root,npm run packinapps/desktop, withnode-ptyandget-windowsstaged forlinux-x64on its own. Electron 40.10.2, 337 MB unpacked, 129 MB packaged.The app owns its Hermes runtime
Hermes Desktop is a shell around a Hermes runtime, and it only runs against one built from its own commit: the two agree on a dashboard session-token handshake, and a version gap fails the app's readiness probe with
401 Unauthorized. PyPI trails the tags, so no published CLI can satisfy it, and Hermes refuses a non-editable install from a git checkout, so the CLI cannot be pinned to the app's commit either.So
/usr/bin/hermes-desktopsetsHERMES_DESKTOP_IGNORE_EXISTING=1, which keeps the app off whateverhermesis onPATH, and the app provisions and manages its own runtime under~/.hermeson first launch — the arrangement upstream ships, and the only one that starts.gitandcurlare dependencies because that bootstrap needs them.That first launch is slow and large: a git clone plus a uv venv, past 2 GB. omacom/omarchy#7469 makes the terminal agent defer to this installation, so a machine ends up with one Hermes whichever way it got there.
Details worth knowing
$GITHUB_SHA.write-build-stamp.mjspins the app's first-launch bootstrap to a commit and otherwise resolves it withgit rev-parse— which is wrong undermakepkg, since the build happens inside this repository and git ascends out ofsrcdirto stamp the app with an omarchy-pkgs commit.chrome-sandboxtakes setuid root only where unprivileged user namespaces are unavailable, matchinggrok-bot.