Repository navigation
feat: Hermes single-harness edition + premium dual, with dashboard SSO #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 67 commits
4a8b8dc
c329988
c0afff9
370100d
8406be7
b124c44
dddce8b
42b3d3a
d49d0fb
8cb04db
597a09d
8c40ebf
a7d4a19
63d96b9
195b988
4f64db9
45c388f
af40c7a
c46a8dd
9307e6e
eb1eb54
d01faf1
c3ca70b
f89db70
dbbab79
ed16bbb
905ea0a
4e7f17d
da37e43
fb0ad89
51ff215
52ede0c
0f5cfca
a0930cd
fadab6f
bad006c
aca6ed6
4903175
b07ee0f
6520724
03c2d04
6322008
59770bf
a53add9
0779a3a
4e4325f
907ebc3
c8efbbc
f5e7c75
b6cff63
d3cbe1b
0280e53
6d96d3d
80afc1a
acda2c4
ea95176
dd644d2
188b758
d4177fc
c3c9a48
3af5726
c9daefa
4a6bf85
a7f1c34
daf484e
8deae1c
66a2a24
adf66c8
b081fa1
8dcaf71
e354704
c306674
8d27ad0
106956f
f591eef
0a7b36a
f6876e3
e721dc3
a821e27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| [Unit] | ||
| Description=ClawBox Hermes Dashboard Auth Proxy (LAN :8090, clawbox_session-gated) | ||
| After=clawbox-hermes-dashboard.service clawbox-setup.service | ||
| Wants=clawbox-hermes-dashboard.service | ||
|
|
||
| [Service] | ||
| Type=simple | ||
| User=clawbox | ||
| WorkingDirectory=/home/clawbox/clawbox | ||
| Environment=HOME=/home/clawbox | ||
| Environment=CLAWBOX_ROOT=/home/clawbox/clawbox | ||
| Environment=HERMES_DASH_PROXY_PORT=8090 | ||
| ExecStart=/usr/bin/node /home/clawbox/clawbox/scripts/hermes-dashboard-proxy.js | ||
| Restart=always | ||
| RestartSec=3 | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
|
|
||
| # ── Sandboxing ───────────────────────────────────────────────────────────── | ||
| # This process only READS (the session secret, the dashboard password) and | ||
| # forwards TCP to 127.0.0.2:9119, so it can be locked down harder than the | ||
| # dashboard itself. ProtectSystem=full rather than strict so a future need to | ||
| # write under /home doesn't turn into a silent read-only failure. | ||
| NoNewPrivileges=yes | ||
| PrivateTmp=yes | ||
| ProtectSystem=full | ||
| ProtectKernelTunables=yes | ||
| ProtectKernelModules=yes | ||
| ProtectControlGroups=yes | ||
| RestrictSUIDSGID=yes | ||
| LockPersonality=yes | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| [Unit] | ||
| Description=ClawBox Hermes Dashboard (host-local web UI, gated auth) | ||
| After=network-online.target | ||
| Wants=network-online.target | ||
|
Comment on lines
+1
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value Add restart rate limiting.
🤖 Prompt for AI AgentsSource: Path instructions |
||
|
|
||
| [Service] | ||
| Type=simple | ||
| User=clawbox | ||
| WorkingDirectory=/home/clawbox | ||
| Environment=HOME=/home/clawbox | ||
| Environment=PATH=/home/clawbox/.local/bin:/usr/local/bin:/usr/bin:/bin | ||
| # Stop any stray hermes server first so this instance can bind :9119 cleanly | ||
| # (avoids an "address already in use" crash loop if a serve/dashboard from a | ||
| # CLI chat or a prior run is still holding the port). Best-effort (`-`). | ||
| ExecStartPre=-/home/clawbox/.local/bin/hermes dashboard --stop | ||
| # Re-assert the dashboard's password auth provider on every start. This is what | ||
| # makes a factory reset survivable: the reset wipes ~/.hermes (previous owner's | ||
| # provider keys, OAuth tokens, chat DB, dashboard signing secret) and data/ | ||
| # (the proxy's copy of the password), and nothing else on the box would ever | ||
| # re-create them — install.sh does not run at boot, so the dashboard would come | ||
| # up with no auth provider on its non-loopback bind and crash-loop forever. | ||
| # The script is idempotent: it verifies the stored hash against the stored | ||
| # password and exits early when they already agree. | ||
| # `-` prefix: a provisioning failure is logged to the journal but must not stop | ||
| # the dashboard from starting (install-time validation catches a dead proxy). | ||
| ExecStartPre=-/bin/bash /home/clawbox/clawbox/scripts/setup-hermes-dashboard-auth.sh | ||
| # Bind 127.0.0.2, NOT 127.0.0.1: Hermes only engages its cookie-session auth | ||
| # gate on a non-loopback bind (plain loopback uses a legacy shared-token mode | ||
| # that ignores session cookies, which a reverse proxy can't satisfy). 127.0.0.2 | ||
| # is still inside 127.0.0.0/8 — host-local, never LAN-reachable — so the | ||
| # clawbox_session-gated proxy stays the only way in. | ||
| # `hermes dashboard` builds the web dist on first run, so allow a generous | ||
| # start window before the health check gives up. | ||
| ExecStart=/home/clawbox/.local/bin/hermes dashboard --host 127.0.0.2 --port 9119 --no-open | ||
| Restart=always | ||
| RestartSec=5 | ||
| TimeoutStartSec=300 | ||
|
|
||
| # ── Sandboxing ───────────────────────────────────────────────────────────── | ||
| # Matches config/clawbox-codex-auth-sync.service. Deliberately conservative: | ||
| # ProtectSystem=full (NOT strict) because Hermes builds its web dist and writes | ||
| # its config/logs/memories under /home/clawbox — strict would make the whole | ||
| # hierarchy read-only and turn every start into a failure. No PrivateTmp: the | ||
| # ExecStartPre `dashboard --stop` above has to be able to see a stray hermes | ||
| # started from a CLI chat in the host /tmp namespace. | ||
| NoNewPrivileges=yes | ||
| ProtectSystem=full | ||
| ProtectKernelTunables=yes | ||
| ProtectKernelModules=yes | ||
| ProtectControlGroups=yes | ||
| RestrictSUIDSGID=yes | ||
| LockPersonality=yes | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🔵 Trivial | 💤 Low value
Wants=omitsclawbox-setup.service.Line 3 orders the proxy after
clawbox-setup.service, but Line 4 requests only the dashboard. Ordering without a dependency has no effect whenclawbox-setup.serviceis not otherwise pulled into the transaction. The proxy readsdata/.session-secretanddata/config.json, both owned by the main app, so state the dependency explicitly.♻️ Proposed change
📝 Committable suggestion
🤖 Prompt for AI Agents
Source: Path instructions