Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions hermes_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12022,7 +12022,19 @@ def cmd_dashboard(args):

from hermes_cli.web_server import start_server

embedded_chat = args.tui or os.environ.get("HERMES_DASHBOARD_TUI") == "1"
# Embedded chat (the /api/ws JSON-RPC transport the desktop GUI connects
# to, plus the in-browser /chat PTY tab) is ON BY DEFAULT — plain
# `hermes dashboard` must produce a dashboard the GUI can actually talk to.
# Explicit opt-out for hardened public binds: `--no-tui` or
# HERMES_DASHBOARD_TUI=0/false/off. `--tui` / HERMES_DASHBOARD_TUI=1 remain
# as explicit-on (and win over a stale =0 env) for backward compatibility.
_tui_env = os.environ.get("HERMES_DASHBOARD_TUI", "").strip().lower()
if args.tui or _tui_env in ("1", "true", "yes", "on"):
embedded_chat = True
elif getattr(args, "no_tui", False) or _tui_env in ("0", "false", "no", "off"):
embedded_chat = False
else:
embedded_chat = True
start_server(
host=args.host,
port=args.port,
Expand Down Expand Up @@ -15318,8 +15330,18 @@ def cmd_acp(args):
"--tui",
action="store_true",
help=(
"Expose the in-browser Chat tab (embedded `hermes --tui` via PTY/WebSocket). "
"Alternatively set HERMES_DASHBOARD_TUI=1."
"Force the in-browser Chat tab on (embedded `hermes --tui` via "
"PTY/WebSocket). On by default; this flag is only needed to override "
"HERMES_DASHBOARD_TUI=0. Alternatively set HERMES_DASHBOARD_TUI=1."
),
)
dashboard_parser.add_argument(
"--no-tui",
action="store_true",
help=(
"Disable the in-browser Chat tab and its WebSocket transport. Use "
"for hardened public binds where the shell-capable embedded agent "
"should not be reachable. Alternatively set HERMES_DASHBOARD_TUI=0."
),
)
dashboard_parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion hermes_cli/web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -8678,7 +8678,7 @@ def start_server(
open_browser: bool = True,
allow_public: bool = False,
*,
embedded_chat: bool = False,
embedded_chat: bool = True,
):
"""Start the web UI server."""
import uvicorn
Expand Down