14 Commits

Author SHA1 Message Date
Stephen Chin
965d0ff1d4 fix(hermesagent): remove redundant guards from hermes-setup; restore completion message wording 2026-05-24 13:18:43 -07:00
Stephen Chin
c80dbaa5e6 feat(hermesagent): add hermes-setup helper script for first-time setup
- Add /usr/bin/hermes-setup that runs hermes setup as root, allowing
  optional components (TTS engines, browsers, etc.) to be installed,
  then restores ownership and permissions on /home/hermes
- Update login hint to reference hermes-setup
- Update completion message to guide users to hermes-setup and note
  that the gateway service should be installed as a user service
- Update JSON note to reflect new setup flow
2026-05-24 11:58:58 -07:00
Sam Heinz
8e477b1fca set 'var_arm64' to no for all cts 2026-05-22 23:44:47 +10:00
Stephen Chin
0c45a4700c Update ct/hermesagent.sh
Removed an unnecessary space.

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2026-05-14 20:49:44 -07:00
Stephen Chin
96d7c7d61d fix(hermesagent): replace ${APP} with literal name in msg lines
Resolve  to 'Hermes Agent' in all msg_info/msg_ok/msg_error
calls per CrazyWolf13 review feedback — improves readability for users
reading install output.
2026-05-11 17:27:51 -07:00
Stephen Chin
84f20e8b15 fix(hermesagent): clean up footer, login hint, JSON notes and config_path 2026-05-10 17:14:48 -07:00
Stephen Chin
46746538a0 fix(hermesagent): source /etc/default/hermes via setsid; drop inline env vars and HERMES_HOME 2026-05-10 15:39:22 -07:00
Stephen Chin
9919be3dac fix(hermesagent): show API key file location in CT footer 2026-05-10 14:10:39 -07:00
Stephen Chin
0b11ce1681 fix(hermesagent): add external script warning and remove redundant check
Adds third-party script warning with user confirmation before running
the upstream installer (install) and updater (update), matching the
kasm/pihole pattern. Removes redundant binary existence check per
reviewer feedback. Adds corresponding JSON warning note.
2026-05-09 11:50:57 -07:00
Stephen Chin
434e170ee3 fix(hermesagent): move service details from CT footer to MOTD
Trims the verbose 12-line CT footer to the standard pattern plus
essential first-run setup steps. API server, API key, and dashboard
SSH tunnel details are now displayed on every SSH login via
/etc/profile.d/hermes-hint.sh instead.

Addresses PR feedback from CrazyWolf13.
2026-05-09 10:27:37 -07:00
Stephen Chin
a0bffe7a4f feat(hermesagent): replace shim+system-unit pattern with hermes-native user services
The previous approach used a /usr/bin/hermes shim to proxy commands from root
to the hermes user, and a hand-crafted system-level systemd unit for the
gateway. This worked for the default profile but broke down for named profiles:

- hermes profile create <name> generates an alias script in
  ~/.local/bin/<name> that calls hermes with -p <name>. These aliases live
  in the hermes user's PATH, not root's, so root could not invoke them.
- Maintaining parity would require per-profile shims, a watcher daemon to
  create/remove them, and system-unit mirrors for each profile gateway — all
  of which would need to stay in sync with hermes internals across updates.

New approach — work with hermes, not around it:

- loginctl enable-linger hermes: ensures the hermes user's systemd session
  starts at boot and persists without login. All user-unit gateways (default
  and per-profile) now survive reboots automatically.
- Gateway service management delegated entirely to hermes: 'hermes gateway
  install' / 'hermes setup' create and enable the user unit natively.
  The install script no longer pre-installs the gateway; hermes prompts the
  user to do so at the end of 'hermes setup'.
- hermes-dashboard.service remains a system unit (no native install command
  exists for it). Its After= no longer references hermes-gateway.service
  since there is no system-unit gateway to depend on.
- /usr/bin/hermes shim removed. Root is guided to 'su - hermes' via a two-
  line /etc/profile.d/hermes-hint.sh message on login, with a one-liner to
  make the switch automatic. Once logged in as hermes, all hermes commands,
  profile aliases, and gateway management work natively.
- update_script simplified: only hermes-dashboard (our unit) is stopped and
  restarted. hermes update --yes handles gateway service lifecycle itself.
2026-05-03 15:22:11 -07:00
Stephen Chin
be8d55fb83 fix(hermesagent): pass --yes to hermes update to avoid interactive prompt
hermes update prompts "Restore local changes now? [Y/n]" when run
in a TTY context. --yes skips all interactive prompts.
2026-05-02 12:21:18 -07:00
Stephen Chin
aa975798a1 fix(hermesagent): correct SSH access instructions
The hermes service account has no password or SSH keys and cannot
be used to log in. Access is via root (standard PVE Helper Scripts
pattern). Also add -fN flags to the dashboard tunnel command so it
runs in the background without opening a shell session.
2026-05-02 12:09:56 -07:00
Stephen Chin
06d9c62e54 fix(hermes-agent): rename files to match NSAPP derivation
APP='Hermes Agent' produces NSAPP='hermesagent' via build.func's
lowercase+strip-spaces logic. Rename ct/, install/, json/, and
header files to match.
2026-05-02 09:45:59 -07:00