# Reusing a Hermes surface instead of building a client, and reaching it from a phone For "can I build an app to read/edit from my phone?" questions. Answer by enumerating what already ships, probing it live, and naming the one real gap (almost always network reach + auth, not missing functionality). ## The three doors a Hermes feature usually already has 1. **Slash command over messaging.** Read the feature's `CommandDef` in `hermes_cli/commands.py`. `cli_only: False` with no `gateway_config_gate` means the command is already dispatchable from Telegram/Discord today, and it appears in the bot menu. Confirm through the registry rather than by eye: ```python from hermes_cli.commands import GATEWAY_KNOWN_COMMANDS, COMMAND_REGISTRY from hermes_cli.commands_platforms import telegram_bot_commands ``` A `busy_policy="dispatch"` command also works mid-run, which matters for a board the user wants to edit while an agent is working. 2. **Dashboard plugin tab + REST router.** A feature with `plugins//dashboard/manifest.json` ships a UI tab (`tab.path`) and, when `manifest.api` is set, a FastAPI router mounted at `/api/plugins//*`. That router is a complete remote API — enumerate it with `grep -n '@router\.\(get\|post\|patch\|put\|delete\)' /dashboard/plugin_api.py`. 3. **CLI**, for anything scriptable from a shell on the host. Recommend the browser/PWA path when door 2 covers the need; reserve a native client for what a browser genuinely cannot do (offline drafting, push notifications). ## Probing the dashboard REST API on loopback `/api/*` returns `401 {"detail":"Unauthorized"}` without the session token even on loopback. The token is injected into the served HTML and travels in a dedicated header (`Authorization` is left free for reverse proxies): ```bash hermes dashboard --no-open --port 9119 # background; wait for HERMES_DASHBOARD_READY TOK=$(curl -s http://127.0.0.1:9119/ | grep -o '__HERMES_SESSION_TOKEN__="[^"]*"' | sed 's/.*="//;s/"//') curl -s -H "X-Hermes-Session-Token: $TOK" http://127.0.0.1:9119/api/plugins// ``` `/api/status` answers 200 unauthenticated, so a 200 there plus a 401 elsewhere means the token is missing, not that the plugin router failed to mount. Check `GET /api/dashboard/plugins` to confirm the plugin was discovered at all. A **user**-sourced plugin's Python `api` file is imported only when the plugin is listed in `plugins.enabled`; bundled plugins load without it. An installed-but-not-enabled user plugin is served as 404, not 401 — do not read that as a broken route. ## Verifying writes without leaving residue Route decorators prove only that paths are mounted. Exercise a disposable record end to end and confirm the store returns to its prior state: ```bash NEW=$(curl -s -X POST -H "X-Hermes-Session-Token: $TOK" -H 'Content-Type: application/json' \ -d '{"title":"API PROBE - disposable"}' .../tasks) ID=$(echo "$NEW" | sed -n 's/.*"id"[: ]*"\([^"]*\)".*/\1/p') curl -s -o /dev/null -w 'patch=%{http_code}\n' -X PATCH ... .../tasks/$ID curl -s -o /dev/null -w 'delete=%{http_code}\n' -X DELETE ... .../tasks/$ID ``` Then re-list through the CLI (`hermes kanban ls`) and show the count matching the pre-probe state. Name the probe record so it is obviously disposable and delete it in the same call. ## Reaching it from a phone The blocker is reach plus auth, not capability: - A non-loopback bind **always** requires an auth provider; `--insecure` is a deprecated no-op and does not disable the gate. Configure `dashboard.basic_auth` or `dashboard.oauth` first — both are empty by default. When that gate is active, cookie auth becomes authoritative and the loopback session-token shortcut is deliberately ignored, so do not hand the user a token-in-URL recipe. - Prefer a private overlay network (e.g. Tailscale) over `--host 0.0.0.0` on the LAN: it works off the home network and does not expose the port to every device on the Wi-Fi. Report whether the daemon is actually running, not merely installed. - Judge mobile readiness from the shipped assets, not assumption: the dashboard's `web/index.html` carries `viewport-fit=cover`, and a plugin bundle that uses `pointerdown` plus `env(safe-area-inset-*)` already has a touch/drag fallback. "Add to Home Screen" then gives an app-like surface with no code written. Cloud-browser screenshots are not a route for verifying a loopback dashboard; drive the REST API with curl and read the shipped CSS/bundle instead. - **Phone app login fails with `SocketTimeoutException` on `http://10.0.2.2:9119`:** that host is the Android emulator's alias for the dev machine and routes nowhere on a real phone. Give the tailnet HTTPS address that `tailscale serve status` lists for the dashboard port (e.g. `https://..ts.net:9119`), with the app's embedded Tailscale on. A WingWire connect QR is `wingwire://connect?url=&user=` (never a password); render it with `qrencode -o qr.png -s 12 ''` and open it on the Mac screen, since a phone cannot scan its own screen. The dashboard password lives in plain text under `dashboard.basic_auth` in `~/.hermes/config.yaml`: point the user to it, never paste it into chat. ## Replies go back only to the surface the message came from One session can be written from Telegram and from a dashboard client (WingWire, Desktop, TUI), but a reply is delivered only to the surface that submitted that turn. Hermes mirrors foreign input into Telegram (`platforms.telegram.mirror_foreign_inputs`, default on) in two ways: - **Gateway admission path** (`SessionAuthority.submit`): The user's text is posted as "Başka cihazdan yazdın" and the agent's reply is anchored to it in Telegram, so both sides are shown. - **Legacy local path** (`tui prompt accepted` in the log; used when the Telegram owner is idle): only the user's words are mirrored; the reply cannot reach Telegram from that process. When the user says "the app's answer is missing in Telegram", check which path the turn took in `~/.hermes/logs/agent.log` before promising a fix; full mirroring needs the client to submit through the gateway admission path, which is client work, not a Hermes setting. ## Report the side findings you tripped over A surface probe often surfaces unrelated real breakage (a card that silently fell to `blocked` because its dispatcher cannot spawn the worker binary). Mention it with the status change and the underlying error; it is the kind of thing the user cannot see from the UI.