Let the app own its Hermes runtime

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.
This commit is contained in:
Omabot committed 2026-08-19 06:12:11 -07:00
1 parent 1a394eae60
commit 9b0dd041f8
2 files changed
+21 -42

No files matched your search

+8 -29
View File
@@ -1,35 +1,14 @@
#!/bin/bash
set -euo pipefail
# The desktop app is only a shell: it runs `hermes serve` against a Hermes CLI
# it does not ship. Finding none it offers to install its own, which clones an
# unpinned checkout into ~/.hermes/hermes-agent -- and that copy then wins
# forever, because the app checks ~/.hermes before it checks PATH.
#
# So guarantee the CLI here rather than relying on anything else having run.
tool='pipx:hermes-agent[extras=all]'
python='3.13'
# Hermes declares Requires-Python <3.14; left to itself uv builds the venv
# against Arch's 3.14 anyway and only fails later, inside a dependency. The
# cooldown override is exported so the version resolved to run is the one just
# installed. Both mirror omarchy-install-hermes-cli -- keep them in step.
export UV_PYTHON="$python"
export MISE_MINIMUM_RELEASE_AGE=0
if command -v omarchy-install-hermes-cli >/dev/null 2>&1; then
omarchy-install-hermes-cli --now
elif ! [[ -d "$(mise where "$tool" 2>/dev/null)/hermes-agent/lib/python$python" ]]; then
echo "Installing the Hermes CLI (this takes a minute)..." >&2
mise use -g --quiet --force "$tool" || true
fi
# Hand the app the real executable rather than leaving it to search. Its PATH
# probe allows 15 seconds, which nothing that still has installing to do can
# meet.
hermes_bin="$(mise where "$tool" 2>/dev/null)/bin"
[[ -d $hermes_bin ]] && export PATH="$hermes_bin:$PATH"
# Hermes Desktop is a shell around a Hermes runtime, and it only works against
# one built from its own commit. A CLI from PyPI is always a different release
# -- PyPI trails the tags -- and the mismatch fails the app's readiness probe
# with 401 Unauthorized. So keep it away from whatever `hermes` is on PATH,
# which on Omarchy is the mise CLI installed for the terminal agent, and let
# the app provision and manage its own runtime under ~/.hermes. That is the
# arrangement upstream ships, and the only one that starts.
export HERMES_DESKTOP_IGNORE_EXISTING=1
# Chromium's own Ozone detection falls back to XWayland often enough to matter,
# and the result is a blurry window on every scaled display. Ask for Wayland