Repository navigation
Install Hermes as the self-updating runtime in every flow - #12836
spencerbull wants to merge 2 commits into
Conversation
Choosing Hermes as the default agent installed it through mise as a pipx tool, while Install > AI set up the runtime upstream's installer makes under ~/.hermes. Only the second can take an update: `hermes update` fast-forwards a git checkout, and a pipx environment has none, so it exits with "Not a git repository", and `mise up` rebuilt the tool against whichever interpreter it found. omarchy-install-hermes-cli now sets up that same runtime from the hermes-agent package, which ships upstream's install.sh, the runtime patch and the commit the release was built from. --now installs the package, runs the installer pinned to that commit, starts main there with connected history, applies the patch and checks the command runs the seeded sessions omarchy-agent starts; a runtime that is already in place but lost its commands gets them back through upstream's launcher stage, whose success is checked against what it actually wrote. --check answers whether a usable Hermes is present without running the old stub, which would build one through mise, and --now leaves a working Hermes the user installed elsewhere alone. --replace is for the desktop installer, which needs the runtime itself: it takes the hermes name over whatever held it, saving the bytes aside first, and only then adds the app package, so a package that cannot be installed yet leaves nothing half done. The installer records the runtime it set up by path, and only a recorded runtime is maintained or removed: upstream's own installer writes the same bootstrap marker into the same place, so the marker says nothing about who ran it. Remove Hermes takes the app, the runtime and both packages together, follows the record to a custom home, and deletes nothing the record names that is not a Hermes runtime. omarchy-agent launches the command the installer vets rather than whichever hermes PATH resolves first.
The stub user provisioning wrote on every machine built Hermes through mise when first run, so it could never update itself. Provisioning no longer writes it and Remove Preinstalls no longer looks for it. A migration hands the stub to the installer's --migrate, which reinstalls Hermes the new way only where it was in use, mise had built it or it is the default agent, and retires a stub nobody ran without replacing it. Nothing is taken until the package and the checkout have been checked, the copy mise built goes last, once the runtime answers, and a pending mark makes the next run carry on after a failure rather than read the missing stub as nothing left to do. The migration also records a runtime the desktop installer seeded before the record existed, by the packaged app it copied in. The earlier wrapper migration is neutralised, so a late updater running both in order does not get the stub written back before it is retired.
|
Three ownership/selection issues remain at Verified: The isolated fresh-install checks exercise release pinning, connected Git history, patch application and a local fast-forward. The ordinary migration checks retire the modeled mise copy only after the replacement answers. The issues below concern existing installations and unusual custom homes. Missing-command repair modifies an unowned runtimeIn An independently installed, unrecorded runtime at the packaged release behaves differently when only
The Git changes were executed with real Git; mise operations were logged stubs. The repaired runtime remains unrecorded. Impact: Restoring one launcher also maintains a user-owned checkout and requests removal of another tool, despite the explicit ownership boundary. Suggested change: Separate launcher restoration from checkout maintenance. Require recorded ownership before preparing an existing runtime or retiring its companion mise installation on this path too. A usable foreign command is mistaken for the managed runtimeThe fast path at lines 294-315 combines facts about two potentially different installations: With the selected command a direct symlink into a separate synthetic mise installation, modeled uninstall removes that backend. A related retry case also returns zero and clears a pending migration marker while the modeled mise copy remains: a working foreign command is present, but no runtime is recorded or installed. No retirement is attempted. Impact: Default-agent setup can report success after requesting removal of its selected command's backend. Desktop installation can retain a different CLI installation despite requesting replacement, and pending migration work can lose its retry state. The desktop split is not universally new; the new fast path fails its preservation/replacement contract. Suggested change: Handle working foreign commands explicitly. Plain Bound custom homes before offering recursive removalThe installer accepts Impact: With this unusual configuration, removal can delete unrelated documents and pictures. Whole-HOME deletion occurred only after an explicit yes to a default-no question naming HOME; declining preserved the unrelated document. This is not silent deletion or a confirmation bypass, and active-process checks can also prevent removal. Suggested change: Reject normalized data roots equal to HOME, its ancestors or filesystem roots, and independently validate destructive targets in the remover. A runtime receipt should not imply ownership of its entire shared parent directory. Review informationTest scope: Targeted isolated Bash/Git/filesystem checks with synthetic homes; package, mise, bootstrap and Hermes responses modeled. Whole-HOME removal used a modeled affirmative answer. No real package installation, Hermes session, Electron UI or theme handoff was exercised. Companion package PR #584 remains an external dependency, not a verified published installation. Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review. Automated AI review: Astra initial source inspection, independent Opus 5 xhigh and Astra Xhigh technical assessments, followed by synthesis and verification against targeted evidence. A separate fresh Astra Medium check assessed presentation only. |
|
It looks like #12844 (also yours, merged 2026-09-25) has landed this on Can this be closed as superseded by #12844? Anything from the review threads here that didn't make it into #12844 (for example, the ownership checks on the missing-launcher repair path) could go in a small follow-up against current |
Choosing Hermes as the default agent installed it through mise as a pipx tool, while Install > AI set up the runtime upstream's installer makes under
~/.hermes. Only the second can take an update:hermes updatefast-forwards a git checkout, and a pipx environment has none, so it exits with "Not a git repository. Please reinstall", andmise uprebuilt the tool against whichever interpreter it found. Two flows, two Hermes, and the terminal one could never move.omarchy-install-hermes-clinow sets up that same runtime from the newhermes-agentpackage (omacom/omarchy-pkgs#584), which ships upstream'sinstall.sh, the runtime patch and the commit the release was built from.--nowinstalls the package, runs the installer pinned to that commit with setup skipped, startsmainthere with connected history so the firsthermes updatehas somewhere to go, applies the patch, and checks that the command runs the seeded--tui --querysessionsomarchy-agentstarts. A runtime that is already in place but lost its commands gets them back through upstream's own launcher stage rather than a reinstall, and what that stage wrote is checked before it is trusted, because upstream reports success even when it writes nothing.--checkanswers whether a usable Hermes is present without ever running the old stub, which would build one through mise.omarchy-install-ai-hermesasks for the runtime first, with--replace, and only then adds the app package and lays the Electron app on top, so the terminal, the default agent and the app are one installation whichever came first, and a package that cannot be installed yet leaves nothing half done. Remove > AI > Hermes takes the app, the runtime and both packages together.omarchy-agentlaunches~/.local/bin/hermes, the command the installer vets, rather than whicheverhermesPATH resolves first.Whose Hermes it is decides what may be replaced, maintained or removed.
--checktreats a working Hermes the user installed elsewhere as ready and--nowleaves it be, so the default agent runs it.--replaceis for the app, which needs the runtime itself: whatever held~/.local/bin/hermes,hermes-agentorhermes-acpis copied into a backup directory, named in the output, before upstream's installer takes the names. The installer records the runtime it set up by path, and only a recorded runtime is prepared for updates, has a leftover mise copy retired, or is deleted on removal, because upstream's own installer writes the same bootstrap marker into the same place. The remover follows the record only to something that is a Hermes runtime, so a stale record deletes nothing, and it asks about the recorded home even when that runtime is gone. The migration records a runtime the desktop installer seeded before the record existed, by the packaged app it copied in byte for byte, which is the same population the old remover treated as the app's.The mise copy is retired rather than left beside the runtime, and it goes last:
--migrate, run by the new migration, reinstalls Hermes the new way only where it was in use, mise had built it or it is the default agent. Nothing is taken until the package and the checkout have been checked, the mise tool and stub are removed once the runtime answers, so a replacement that fails part way leaves the old Hermes working, and a pending mark keeps the migration open until the copy is actually gone, while the default agent keeps running the Hermes that works in the meantime. A stub nobody ran is deleted and nothing replaces it; choosing Hermes installs the runtime then. The earlier wrapper migration is neutralised so a late updater does not get the stub written back before it is retired, user provisioning no longer writes it, and Remove Preinstalls no longer looks for it.Consequences that follow from the change and are left as decisions rather than fixed here: Hermes is no longer on PATH from first boot, so typing
hermeson a machine that never chose it says command not found instead of installing, asopenclawdoes today; a runtime the packaged Electron app bootstraps on its own, without Omarchy's installer, is never recorded and so survives Remove Hermes as leftover files, which the removal's data question still offers to take; upstream's launcher stage removes each command before rewriting it, so a disk failure in that instant leaves the backup copy as the onlyhermesuntil the next run; the theme hand-over still happens only when the desktop app is installed; and Remove Hermes removes the runtime even when the user only wanted the app gone, as it did before.Requires omacom/omarchy-pkgs#584 published first. Until then the installer reports that the package cannot be installed and to run
omarchy update, nothing else is installed, and the migration stays pending on machines where Hermes was in use.🤖 Generated by Fable 5.1 in T3 Code. Reviewed by Codex XHigh.