feat: add buttons to update hermes and restart gateway#13526
Merged
Conversation
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
…d-action-buttons feat: add buttons to update hermes and restart gateway
aj-nt
pushed a commit
to aj-nt/hermes-agent
that referenced
this pull request
May 1, 2026
…d-action-buttons feat: add buttons to update hermes and restart gateway
Luminet2023
pushed a commit
to Luminet2023/hermes-agent
that referenced
this pull request
May 1, 2026
…d-action-buttons feat: add buttons to update hermes and restart gateway
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…d-action-buttons feat: add buttons to update hermes and restart gateway
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…d-action-buttons feat: add buttons to update hermes and restart gateway
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…d-action-buttons feat: add buttons to update hermes and restart gateway
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds two quality-of-life buttons to the Hermes Agent web dashboard's Status page — Restart Gateway and Update Hermes — so operators can run
hermes gateway restartandhermes updatewithout dropping into a terminal. Each click spawns the corresponding CLI command as a detached subprocess (stdin closed, stdout/stderr streamed to a per-action log file under~/.hermes/logs/), and the UI opens a live log panel that polls the backend every ~1.5 s, showing the real command output with a running/finished/failed status pill. This gives visible confirmation that the action is actually happening — not just a fire-and-forget toast.The approach reuses the existing CLI commands (
hermes gateway restart,hermes update) rather than re-implementing restart/update logic in the web server, keeping a single source of truth and inheriting every edge case those commands already handle (systemd/launchd, autostash, fork detection, etc.).Related Issue
Fixes #
Type of Change
Changes Made
Backend —
hermes_cli/web_server.pyPOST /api/gateway/restart— spawnshermes gateway restartdetached, logs to~/.hermes/logs/gateway-restart.log.POST /api/hermes/update— spawnshermes updatedetached, logs to~/.hermes/logs/hermes-update.log.GET /api/actions/{name}/status?lines=N— tails the action log and reports{running, exit_code, pid, lines}by callingPopen.poll()on the tracked process handle._spawn_hermes_action()and_tail_lines(); module-level_ACTION_PROCSdict keyed by short action name.Frontend —
web/src/lib/api.ts— addedapi.restartGateway(),api.updateHermes(),api.getActionStatus()and theActionResponse/ActionStatusResponsetypes.pages/StatusPage.tsx— new "Actions" card between the top status tiles and the Platforms card:RotateCwfor restart,Downloadfor update) that disable while any action is in flight.<pre>tail, running/finished/failed status pill, and a dismiss (X) button.running: falseand fires a success/error toast with the exit code.i18n/types.ts,i18n/en.ts,i18n/zh.ts— addedactions,actionFailed,actionFinished,restartGateway,restartingGateway,updateHermes,updatingHermes,startedInBackground,waitingForOutputkeys (EN + ZH).How to Test
=== gateway-restart started … ===, then✓ Stopped gateway…/Starting gateway…).Starting/Stoppedand then back toRunningas the restart completes.exit_code: 0; a success toast appears.⚕ Updating Hermes Agent… → Fetching updates… → Pulling updates…matching the terminal output ofhermes update.~/.hermes/logs/gateway-restart.logand~/.hermes/logs/hermes-update.logcontain the same output for post-hoc inspection.curl -i -X POST http://127.0.0.1:9119/api/gateway/restart # expect: 401 Unauthorized (session-token middleware)Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Example
~/.hermes/logs/hermes-update.logoutput (visible live in the dashboard):