Skip to content

feat(agents): hermes home-normalization + system-scope gateway (closes #437)#440

Open
thinmintdev wants to merge 6 commits into
mainfrom
feat/hermes-home-normal-location-system-gateway
Open

feat(agents): hermes home-normalization + system-scope gateway (closes #437)#440
thinmintdev wants to merge 6 commits into
mainfrom
feat/hermes-home-normal-location-system-gateway

Conversation

@thinmintdev
Copy link
Copy Markdown
Contributor

Runs Hermes entirely as the hal0 system user, out of root, on the normalized hermes default home, with the messaging gateway as a system-scope service.

What changed

  • HERMES_HOME → /var/lib/hal0/.hermes everywhere (provisioner default, hal0-agent@hermes override.conf, installer script, both wrappers, personas/shim path refs).
  • Gateway → system service, User=hal0_phase_gateway_secrets_wire writes the idempotent secrets drop-in to /etc/systemd/system/hermes-gateway.service.d/10-hal0-secrets.conf (survives hermes gateway install regenerating the main .service). No linger, no /root.
  • Installer wires the gateway: install.sh now runs hermes gateway install --system --run-as-user hal0 + enable --now (HERMES_HOME unset so the generator bakes the .hermes default), so a fresh install boots with Telegram/Discord connected.
  • Canonical CLI /usr/local/bin/hermes (no HERMES_HOME pin); hal0-hermes → back-compat symlink.
  • Fixed HERMES_WEB_DIST to the real venv site-packages path (was crash-looping the dashboard with --skip-build).
  • Reconciled the stale status() test against the W9 real-health contract (stub systemd/port probes + a live-unit guard test).
  • Tests + docs (spec & plan under docs/internal/).

Live cutover

This box was cut over in-place 2026-06-03, preserving all state (37 sessions, kanban, memories): both services now run as hal0 on .hermes, telegram+discord connected, dashboard 200.

Follow-ups (tracked, not in this PR)

  • A bootstrap test running as root can write a pytest-tmp EnvironmentFile into the real /etc/systemd/system/... (patches HERMES_SECRETS_ENV but not the dropin path) — test-isolation fix.
  • Legacy /var/lib/hal0/agents/hermes retained pending an audit of AGENTS_ROOT-based code (budget/personas/restart).

Closes #437.

thinmintdev and others added 6 commits June 3, 2026 01:30
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ay secrets drop-in (#437)

- HERMES_HOME default -> /var/lib/hal0/.hermes everywhere (provisioner, override.conf, installer, wrappers, personas/shim)
- canonical /usr/local/bin/hermes wrapper (no HERMES_HOME pin); hal0-hermes -> back-compat symlink
- _phase_gateway_secrets_wire: system-scope /etc/systemd/system/hermes-gateway.service.d/10-hal0-secrets.conf (idempotent + daemon-reload)
- reconcile stale status() test against W9 real-health contract (stub systemd/port probes; add live-unit guard test)
- tests + docs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…h install

The provisioner only writes the secrets drop-in; the gateway main unit
was never created on install, so Telegram/Discord never started on a
fresh box. install.sh now runs hermes gateway install --system
--run-as-user hal0 (HERMES_HOME unset so it bakes the ~/.hermes default),
daemon-reloads to pick up the drop-in, and enables the unit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ate)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The override.conf shipped a web_dist path missing python3.12/site-packages/,
so hal0-agent@hermes --skip-build could not find the dashboard dist and the
unit crash-looped. Point at the real package location.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hermes_provision: write user-scope gateway secrets drop-in (Telegram/Discord regress on reinstall)

1 participant