Skip to content
Open
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
14 changes: 9 additions & 5 deletions hermes_cli/web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -16823,11 +16823,15 @@ async def _serve():
app.state.bound_port = actual_port

_write_dashboard_ready_file(actual_port)
# Port-discovery sentinel parsed by the desktop spawn. `serve` is a
# plain backend, not a dashboard, so it announces a neutral token;
# `dashboard` keeps the legacy one. The desktop matches either.
ready_token = "HERMES_BACKEND_READY" if headless else "HERMES_DASHBOARD_READY"
print(f"{ready_token} port={actual_port}", flush=True)
# Port-discovery sentinel parsed by the desktop spawn. During the
# transition period (post-#55923), emit both tokens so pre-#55923
# desktop builds can still match the legacy sentinel while new
# builds use the neutral one. This avoids breaking users who run
# `hermes update` (CLI-only) without rebuilding the desktop app.
# The desktop regex already matches either sentinel since #55923.
print(f"HERMES_DASHBOARD_READY port={actual_port}", flush=True)
if headless:
print(f"HERMES_BACKEND_READY port={actual_port}", flush=True)
if headless:
# No SPA, and the JSON-RPC/WS endpoints are auth-gated — don't
# advertise a paste-and-connect URL, just announce the bind.
Expand Down
Loading