Hermes CLI ground truth: install paths, --check semantics, version output #35

Closed
opened 2026-08-29 09:36:14 +02:00 by AlexKucera · 1 comment
Owner

Part of #12

Question

What are the ground-truth facts about the user-installed Hermes CLI that the Engine gate depends on?

  • What does hermes acp --check actually verify (ACP deps? profile? credentials?) — read the installed source under ~/.hermes/hermes-agent.
  • Exit codes and output for pass, fail, broken install, and hang — what can Swift's Process reliably branch on?
  • What does hermes --version emit, and is the version line stable across install methods?
  • Where does a user-installed hermes binary live across install methods (pipx at ~/.local/bin, git install, Homebrew)? Which candidate paths should a GUI app probe, given launchd's PATH excludes user-local dirs?

Known on this machine (2026-08-28): hermes acp --check → stdout Hermes ACP check OK, exit 0; hermes --version → first line Hermes Agent v0.20.5 (2026.8.19) · upstream 36b0a96d plus install dir/method/Python lines; binary at ~/.local/bin/hermes.

[Generated by AI]

Part of #12 ## Question What are the ground-truth facts about the user-installed Hermes CLI that the Engine gate depends on? - What does `hermes acp --check` actually verify (ACP deps? profile? credentials?) — read the installed source under `~/.hermes/hermes-agent`. - Exit codes and output for pass, fail, broken install, and hang — what can Swift's `Process` reliably branch on? - What does `hermes --version` emit, and is the version line stable across install methods? - Where does a user-installed `hermes` binary live across install methods (pipx at `~/.local/bin`, git install, Homebrew)? Which candidate paths should a GUI app probe, given launchd's PATH excludes user-local dirs? Known on this machine (2026-08-28): `hermes acp --check` → stdout `Hermes ACP check OK`, exit 0; `hermes --version` → first line `Hermes Agent v0.20.5 (2026.8.19) · upstream 36b0a96d` plus install dir/method/Python lines; binary at `~/.local/bin/hermes`. [Generated by AI]
AlexKucera added the wayfinder:research label 2026-08-29 09:36:14 +02:00
AlexKucera added a new dependency 2026-08-29 09:36:43 +02:00
AlexKucera self-assigned this 2026-08-29 09:37:03 +02:00
Author
Owner

Resolution

hermes acp --check verifies imports only — the optional acp package plus the ACP adapter's import graph (a meaningful slice of the agent stack: schema, auth, events, permissions, provenance, session, tools). It never touches profile, credentials, config, or network. A machine can pass --check and still fail at first session from missing credentials — auth failure is a distinct, non-gate failure class.

Facts the gate builds on (cited from ~/.hermes/hermes-agent source)

Scenario stdout stderr exit
Pass Hermes ACP check OK — 0
ACP extra missing / ImportError — ACP dependencies not installed. + pip hint 1
Broken install (SyntaxError etc.) — Python traceback 1
Shim present, venv gone — bash exec error 126/127
Binary path missing — — Swift Process throws ENOENT
  • Branch on exit status 0 vs non-zero; stderr is advisory only. Do not distinguish "missing extra" from "broken install" — both close the gate.
  • --check cannot legitimately hang: no logging setup, no network, no stdin; measured 0.4 s. Use a defensive 5 s timeout and close stdin on the child. hermes acp without --check is a blocking stdio JSON-RPC server — never spawn it bare.
  • Version probe: hermes acp --version — prints bare semver (0.20.5), instant, no network. Do NOT parse hermes --version: line 1 varies by install method (git appends · upstream <sha>; pip/pipx/brew print the bare base line) and its synchronous update check can stall ~25 s behind a dead network. If it must ever be parsed: ^Hermes Agent v(\d+\.\d+\.\d+) \((\d{4}\.\d{1,2}\.\d{1,2})\).
  • Discovery probe order — absolute paths only, never bare hermes (launchd PATH excludes user-local dirs; Hermes documents this problem for its own gateway in website/docs/reference/faq.md:483-498):
    1. ~/.local/bin/hermes — documented per-user location
    2. ~/.local/bin/hermes-acp — ACP-host shim, accepts --check identically
    3. ~/.hermes/hermes-agent/venv/bin/hermes — survives a missing shim
    4. /opt/homebrew/bin/hermes, /usr/local/bin/hermes — Homebrew / root-mode (unsupported by Hermes, best-effort)
    5. /usr/local/lib/hermes-agent/venv/bin/hermes — root-mode fallback
    6. Optional: user-override setting + one-shot zsh -lc 'command -v hermes' (mirrors Hermes' own PATH-snapshot approach)
  • Documented layouts: per-user installer → code ~/.hermes/hermes-agent/, binary ~/.local/bin/hermes; root-mode → /usr/local/lib/hermes-agent/, /usr/local/bin/hermes. pipx/pypi and Homebrew installs are explicitly unsupported (website/docs/getting-started/platform-support.md:45-48).
  • Key citations: check handler acp_adapter/entry.py:158-162; ImportError path hermes_cli/main.py:12863-12866; version printer hermes_cli/_startup_fast.py:183-250 + hermes_cli/banner.py:646-661; bare-semver probe acp_adapter/entry.py:152-155; shim writer scripts/install.sh:1893-1935; documented install layouts website/docs/getting-started/installation.md:48-53.

Gate synthesis

The gate composes from three facts: (1) locate the binary by absolute-path probe — resolution is the gate's job, not the shell's; (2) health = <hermes> acp --check, stdin closed, ~5 s timeout, exit-status branching; (3) version = hermes acp --version. The gate proves install/adapter health, not session readiness — auth problems surface later at first session and are not the gate's failure to catch.

[Generated by AI]

## Resolution `hermes acp --check` verifies **imports only** — the optional `acp` package plus the ACP adapter's import graph (a meaningful slice of the agent stack: schema, auth, events, permissions, provenance, session, tools). It never touches profile, credentials, config, or network. **A machine can pass `--check` and still fail at first session from missing credentials** — auth failure is a distinct, non-gate failure class. ### Facts the gate builds on (cited from `~/.hermes/hermes-agent` source) | Scenario | stdout | stderr | exit | |---|---|---|---| | Pass | `Hermes ACP check OK` | — | 0 | | ACP extra missing / ImportError | — | `ACP dependencies not installed.` + pip hint | 1 | | Broken install (SyntaxError etc.) | — | Python traceback | 1 | | Shim present, venv gone | — | bash exec error | 126/127 | | Binary path missing | — | — | Swift `Process` throws ENOENT | - Branch on **exit status 0 vs non-zero**; stderr is advisory only. Do not distinguish "missing extra" from "broken install" — both close the gate. - `--check` cannot legitimately hang: no logging setup, no network, no stdin; measured 0.4 s. Use a defensive 5 s timeout and **close stdin on the child**. `hermes acp` *without* `--check` is a blocking stdio JSON-RPC server — never spawn it bare. - **Version probe: `hermes acp --version`** — prints bare semver (`0.20.5`), instant, no network. Do NOT parse `hermes --version`: line 1 varies by install method (git appends ` · upstream <sha>`; pip/pipx/brew print the bare base line) and its synchronous update check can stall ~25 s behind a dead network. If it must ever be parsed: `^Hermes Agent v(\d+\.\d+\.\d+) \((\d{4}\.\d{1,2}\.\d{1,2})\)`. - **Discovery probe order — absolute paths only, never bare `hermes`** (launchd PATH excludes user-local dirs; Hermes documents this problem for its own gateway in `website/docs/reference/faq.md:483-498`): 1. `~/.local/bin/hermes` — documented per-user location 2. `~/.local/bin/hermes-acp` — ACP-host shim, accepts `--check` identically 3. `~/.hermes/hermes-agent/venv/bin/hermes` — survives a missing shim 4. `/opt/homebrew/bin/hermes`, `/usr/local/bin/hermes` — Homebrew / root-mode (unsupported by Hermes, best-effort) 5. `/usr/local/lib/hermes-agent/venv/bin/hermes` — root-mode fallback 6. Optional: user-override setting + one-shot `zsh -lc 'command -v hermes'` (mirrors Hermes' own PATH-snapshot approach) - Documented layouts: per-user installer → code `~/.hermes/hermes-agent/`, binary `~/.local/bin/hermes`; root-mode → `/usr/local/lib/hermes-agent/`, `/usr/local/bin/hermes`. pipx/pypi and Homebrew installs are explicitly unsupported (`website/docs/getting-started/platform-support.md:45-48`). - Key citations: check handler `acp_adapter/entry.py:158-162`; ImportError path `hermes_cli/main.py:12863-12866`; version printer `hermes_cli/_startup_fast.py:183-250` + `hermes_cli/banner.py:646-661`; bare-semver probe `acp_adapter/entry.py:152-155`; shim writer `scripts/install.sh:1893-1935`; documented install layouts `website/docs/getting-started/installation.md:48-53`. ### Gate synthesis The gate composes from three facts: (1) locate the binary by absolute-path probe — resolution is the gate's job, not the shell's; (2) health = `<hermes> acp --check`, stdin closed, ~5 s timeout, exit-status branching; (3) version = `hermes acp --version`. The gate proves **install/adapter health, not session readiness** — auth problems surface later at first session and are not the gate's failure to catch. [Generated by AI]
Sign in to join this conversation.