feat(hermes): expose built-in dashboard#4391
Conversation
Signed-off-by: Shannon Sands <shannon.sands.1979@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a baked Hermes browser dashboard and treats it as a first-class UI: builds the web bundle into images, updates manifest/dashboard metadata (auth/health), manages separate dashboard port forwarding and socat forwarders, wires verification probes per-dashboard, returns plain dashboard URLs for session-auth agents, and updates tests/docs. ChangesHermes TUI Dashboard Implementation
Sequence DiagramsequenceDiagram
participant User as User / CLI
participant Start as agents/hermes/start.sh
participant Hermes as hermes CLI
participant Socat as socat
participant Host as Host
User->>Start: onboard sandbox
Start->>Start: resolve ports (API:8642, Dashboard:18789)
Start->>Hermes: launch hermes --tui dashboard (bind to internal ports)
Start->>Socat: start_socat_forwarder Dashboard 18789->DASHBOARD_INTERNAL_PORT
Start->>Socat: start_socat_forwarder API 8642->API_INTERNAL_PORT
Socat->>Host: expose 0.0.0.0:18789 and 0.0.0.0:8642
User->>User: run `nemohermes <name> dashboard-url`
User-->>User: receives http://127.0.0.1:18789/ (plain URL for session-auth agents)
Note over Hermes,Host: verification probes target dashboard and gateway health endpoints separately
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/reference/commands.mdx (1)
471-473: 💤 Low valueConsider clarifying the subject for improved readability.
Lines 472-473 use "this" as the subject. While grammatically correct, explicitly naming "the command" or "the URL" would make these sentences more direct and easier to scan.
✍️ Suggested rewording
Print the browser dashboard URL for a running sandbox. -For OpenClaw sandboxes this includes the authenticated URL fragment. -For agent dashboards that manage their own session, such as Hermes Agent, this prints the plain dashboard URL. +For OpenClaw sandboxes, the command prints the authenticated URL fragment. +For agent dashboards that manage their own session, such as Hermes Agent, the command prints the plain dashboard URL.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/reference/commands.mdx` around lines 471 - 473, Replace the vague pronoun "this" in the two explanatory sentences so the subject is explicit: change "For OpenClaw sandboxes this includes the authenticated URL fragment." to something like "For OpenClaw sandboxes, the command prints the authenticated URL fragment." and change "For agent dashboards that manage their own session, such as Hermes Agent, this prints the plain dashboard URL." to "For agent dashboards that manage their own session, such as Hermes Agent, the command prints the plain dashboard URL." so readers immediately know the subject being described.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/onboard/dashboard.ts`:
- Around line 239-249: The code currently marks a port as stopped in
stoppedPorts before calling bestEffortForwardStopForSandbox; change
stopForwardForSandbox so it first checks stoppedPorts and returns null if
present, then call bestEffortForwardStopForSandbox (using deps.runOpenshell and
the runCapture wrapper) and only if that call indicates success add the portKey
to stoppedPorts and return the result; ensure you treat the specific failure
sentinel (e.g., "list-failed") as a non-success and do not add to stoppedPorts,
preserving the original return value from bestEffortForwardStopForSandbox and
keeping the same parameter names (stopForwardForSandbox, stoppedPorts,
bestEffortForwardStopForSandbox, deps.runOpenshell, deps.runCaptureOpenshell,
sandboxName).
---
Nitpick comments:
In `@docs/reference/commands.mdx`:
- Around line 471-473: Replace the vague pronoun "this" in the two explanatory
sentences so the subject is explicit: change "For OpenClaw sandboxes this
includes the authenticated URL fragment." to something like "For OpenClaw
sandboxes, the command prints the authenticated URL fragment." and change "For
agent dashboards that manage their own session, such as Hermes Agent, this
prints the plain dashboard URL." to "For agent dashboards that manage their own
session, such as Hermes Agent, the command prints the plain dashboard URL." so
readers immediately know the subject being described.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 6239ed9e-6724-467a-9747-c5a4c138d042
📒 Files selected for processing (29)
agents/hermes/Dockerfileagents/hermes/Dockerfile.baseagents/hermes/manifest.yamlagents/hermes/start.shdocs/get-started/quickstart-hermes.mdxdocs/reference/commands.mdxscripts/convert-docs-to-fern.mjssrc/commands/sandbox/dashboard-url.tssrc/lib/agent/base-image.test.tssrc/lib/agent/defs.test.tssrc/lib/agent/defs.tssrc/lib/agent/onboard.test.tssrc/lib/agent/onboard.tssrc/lib/agent/runtime.test.tssrc/lib/dashboard-url-command.test.tssrc/lib/dashboard-url-command.tssrc/lib/dashboard/contract.test.tssrc/lib/dashboard/contract.tssrc/lib/inference/local.test.tssrc/lib/inference/local.tssrc/lib/onboard.tssrc/lib/onboard/dashboard.tssrc/lib/verify-deployment.test.tssrc/lib/verify-deployment.tstest/cli.test.tstest/hermes-start.test.tstest/onboard-dashboard.test.tstest/onboard.test.tstest/sandbox-provisioning.test.ts
Signed-off-by: Shannon Sands <shannon.sands.1979@gmail.com>
|
✨ Thanks for submitting this detailed PR that exposes the Hermes Agent built-in dashboard as NemoClaw's browser surface. This proposes a way to improve the onboarding experience by providing a built-in dashboard and updates the documentation to reflect the changes. |
Summary
Expose the Hermes Agent built-in dashboard as NemoClaw's browser surface and keep the OpenAI-compatible API on its existing route. The image now prebakes Hermes dashboard assets and exports
HERMES_WEB_DISTsohermes dashboardworks inside the sandbox without trying to run npm at runtime.Changes
HERMES_WEB_DISTfor service and connect shells.Type of Change
Verification
Focused checks run:
npm run build:cli;git diff --check;npx vitest run test/sandbox-provisioning.test.ts test/hermes-start.test.ts test/onboard-dashboard.test.ts src/lib/dashboard/contract.test.ts src/lib/dashboard-url-command.test.ts src/lib/verify-deployment.test.ts src/lib/agent/defs.test.ts src/lib/agent/onboard.test.ts src/lib/agent/runtime.test.ts test/onboard.test.ts --maxWorkers=1 --testTimeout=30000; local rebuild/smoke ofnemohermes hermes rebuild --yes --verbose; in-sandboxhermes dashboardsmoke.npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Shannon Sands shannon.sands.1979@gmail.com
Summary by CodeRabbit
New Features
Behavior Changes
Documentation
Tests