Skip to content

fix(status): add missing platforms to hermes status output - #23655

Closed
mehmetkr-31 wants to merge 1 commit into
NousResearch:mainfrom
mehmetkr-31:fix/status-add-missing-platforms
Closed

mehmetkr-31 wants to merge 1 commit into
NousResearch:mainfrom
mehmetkr-31:fix/status-add-missing-platforms

Conversation

@mehmetkr-31

Copy link
Copy Markdown
Contributor

Adds Matrix, Mattermost, HomeAssistant, API Server, and Webhook to the platform status list so
┌─────────────────────────────────────────────────────────┐
│ ⚕ Hermes Agent Status │
└─────────────────────────────────────────────────────────┘

◆ Environment
Project: /Users/mehmetkar/cryptoDev/HermesAgent
Python: 3.11.4
.env file: ✓ exists

◆ API Keys
OpenRouter ✗ (not set)
Anthropic ✗ (not set)
OpenAI ✗ (not set)
Firecrawl ✗ (not set)
Browserbase ✗ (not set)
FAL ✗ (not set)
Tinker ✗ (not set)
WandB ✗ (not set)
ElevenLabs ✗ (not set)
GitHub ✗ (not set)

◆ Auth Providers
Nous Portal ✗ not logged in (run: hermes model)
OpenAI Codex ✗ not logged in (run: hermes model)

◆ Terminal Backend
Backend: local
Sudo: ✗ disabled

◆ Messaging Platforms
Telegram ✓ configured
Discord ✗ not configured
WhatsApp ✗ not configured

◆ Gateway Service
Status: ✗ not loaded
Manager: launchd

◆ Scheduled Jobs
Jobs: 0

◆ Sessions
Active: 1 session(s)

────────────────────────────────────────────────────────────
Run 'hermes doctor' for detailed diagnostics
Run 'hermes setup' to configure shows their configuration state alongside the other 15 platforms. Previously, these 5 platforms were invisible in status output even when fully configured.

@alt-glitch alt-glitch added type/feature New feature or request comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels May 11, 2026
@mehmetkr-31
mehmetkr-31 force-pushed the fix/status-add-missing-platforms branch from cccb95d to ba827f5 Compare June 3, 2026 06:49

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for identifying that hermes status omits these platforms; current main still has that gap in hermes_cli/status.py:438-454.

Problems

  • The added Matrix entry checks MATRIX_HOMESERVER_URL (hermes_cli/status.py:442 in this PR), but current runtime configuration requires MATRIX_HOMESERVER plus MATRIX_ACCESS_TOKEN or MATRIX_PASSWORD (gateway/config.py:1653-1667).
  • Mattermost and Home Assistant use MATTERMOST_TOKEN and HASS_TOKEN, not the variables added at PR lines 443-444 (gateway/config.py:1635-1642, gateway/config.py:1688-1697).
  • API Server/Webhook flags require truthy parsing; a non-empty "false" is not enabled (gateway/config.py:1739, gateway/config.py:1766-1779).

Suggested changes

  • Reuse or extract semantics equivalent to hermes_cli/gateway.py:5142-5219 rather than adding five independent single-env-var checks.
  • Add status-output coverage in tests/hermes_cli/test_status.py for configured and disabled cases.

Automated hermes-sweeper review.

Comment thread hermes_cli/status.py Outdated
@@ -439,6 +439,11 @@ def _resolve_env(env_ref) -> str:
"BlueBubbles": ("BLUEBUBBLES_SERVER_URL", "BLUEBUBBLES_HOME_CHANNEL"),
"QQBot": ("QQ_APP_ID", "QQ_HOME_CHANNEL"),
"Yuanbao": ("YUANBAO_APP_ID", "YUANBAO_HOME_CHANNEL"),
"Matrix": ("MATRIX_HOMESERVER_URL", "MATRIX_HOME_CHANNEL"),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MATRIX_HOMESERVER_URL is not the runtime key, and a homeserver alone is incomplete. Gateway configuration requires MATRIX_HOMESERVER plus MATRIX_ACCESS_TOKEN or MATRIX_PASSWORD (gateway/config.py:1653-1667); please use the same composite status predicate.

Comment thread hermes_cli/status.py Outdated
@@ -439,6 +439,11 @@ def _resolve_env(env_ref) -> str:
"BlueBubbles": ("BLUEBUBBLES_SERVER_URL", "BLUEBUBBLES_HOME_CHANNEL"),
"QQBot": ("QQ_APP_ID", "QQ_HOME_CHANNEL"),
"Yuanbao": ("YUANBAO_APP_ID", "YUANBAO_HOME_CHANNEL"),
"Matrix": ("MATRIX_HOMESERVER_URL", "MATRIX_HOME_CHANNEL"),
"Mattermost": ("MATTERMOST_BOT_TOKEN", "MATTERMOST_HOME_CHANNEL"),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configured Mattermost credential is MATTERMOST_TOKEN, not MATTERMOST_BOT_TOKEN (gateway/config.py:1635-1642, hermes_cli/gateway.py:4902). This row would remain unconfigured for valid current setups.

Comment thread hermes_cli/status.py Outdated
@@ -439,6 +439,11 @@ def _resolve_env(env_ref) -> str:
"BlueBubbles": ("BLUEBUBBLES_SERVER_URL", "BLUEBUBBLES_HOME_CHANNEL"),
"QQBot": ("QQ_APP_ID", "QQ_HOME_CHANNEL"),
"Yuanbao": ("YUANBAO_APP_ID", "YUANBAO_HOME_CHANNEL"),
"Matrix": ("MATRIX_HOMESERVER_URL", "MATRIX_HOME_CHANNEL"),
"Mattermost": ("MATTERMOST_BOT_TOKEN", "MATTERMOST_HOME_CHANNEL"),
"HomeAssistant": ("HOMEASSISTANT_WEBHOOK_URL", "HOMEASSISTANT_HOME_CHANNEL"),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Home Assistant is enabled from HASS_TOKEN (with optional HASS_URL), not HOMEASSISTANT_WEBHOOK_URL (gateway/config.py:1688-1697). Please align this check with the runtime configuration contract.

Comment thread hermes_cli/status.py Outdated
"Matrix": ("MATRIX_HOMESERVER_URL", "MATRIX_HOME_CHANNEL"),
"Mattermost": ("MATTERMOST_BOT_TOKEN", "MATTERMOST_HOME_CHANNEL"),
"HomeAssistant": ("HOMEASSISTANT_WEBHOOK_URL", "HOMEASSISTANT_HOME_CHANNEL"),
"API Server": ("API_SERVER_ENABLED", None),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The surrounding code treats any non-empty string as configured, so API_SERVER_ENABLED=false would display as configured. Runtime parsing uses is_truthy_value (gateway/config.py:1739); use that semantic or a shared predicate.

Comment thread hermes_cli/status.py Outdated
"Mattermost": ("MATTERMOST_BOT_TOKEN", "MATTERMOST_HOME_CHANNEL"),
"HomeAssistant": ("HOMEASSISTANT_WEBHOOK_URL", "HOMEASSISTANT_HOME_CHANNEL"),
"API Server": ("API_SERVER_ENABLED", None),
"Webhook": ("WEBHOOK_SECRET", "WEBHOOK_HOME_CHANNEL"),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WEBHOOK_SECRET is optional and does not enable the platform. Runtime enables Webhook only when WEBHOOK_ENABLED is truthy (gateway/config.py:1766-1779), so this can report a disabled webhook service as configured.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 13, 2026
@mehmetkr-31
mehmetkr-31 force-pushed the fix/status-add-missing-platforms branch from ba827f5 to 408bbc6 Compare July 14, 2026 16:30
@mehmetkr-31

Copy link
Copy Markdown
Contributor Author

Reworked per the sweeper review — the five entries now mirror the gateway env ingestion semantics in gateway/config.py instead of single-env-var presence:

  • Matrix: MATRIX_HOMESERVER plus MATRIX_ACCESS_TOKEN or MATRIX_PASSWORD (home channel: MATRIX_HOME_ROOM)
  • Mattermost: MATTERMOST_TOKEN; Home Assistant: HASS_TOKEN
  • API Server: truthy API_SERVER_ENABLED or API_SERVER_KEY set
  • Webhook: truthy WEBHOOK_ENABLED only (a bare WEBHOOK_SECRET does not enable it)

Truthy parsing uses the shared utils.is_truthy_value, so a non-empty "false" no longer shows as configured. Added 13 status-output tests in tests/hermes_cli/test_status.py covering configured and disabled cases for each platform (29 tests passing).

`hermes status` listed neither Matrix, Mattermost, nor Home Assistant, so a
user debugging a silent platform got no signal at all for three the gateway
supports.

Env var names are taken from the gateway's own ingestion rather than
guessed — MATRIX_ACCESS_TOKEN and MATTERMOST_TOKEN are the entries in
gateway/config.py's PLATFORM_TOKEN_ENV_NAMES, HASS_TOKEN is what the Home
Assistant block reads, and Matrix additionally accepts MATRIX_PASSWORD in
place of the access token, matching the real `matrix_token or
getenv("MATRIX_PASSWORD")` gate.

Rows were also decided by mere presence of the env var. The gateway parses
flag-style vars through is_truthy_value(), so `WHATSAPP_ENABLED=false` is
disabled while a presence check reported it configured — the command stated
the opposite of the truth. That row now parses the value, reusing
utils.is_truthy_value rather than re-deriving the rule.

Rebuilt on current main rather than rebased — the branch was ~4200 commits
behind, and the earlier version used invented names (MATRIX_HOMESERVER_URL
and friends) that could never match. The scripts/release.py addition to the
frozen LEGACY_AUTHOR_MAP is dropped; contributors/emails/mehmet.kar@std.yildiz.edu.tr
already exists on main.

A test pins the two token names against PLATFORM_TOKEN_ENV_NAMES, so a
future move of the canonical map fails here instead of silently making the
rows wrong again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mehmetkr-31
mehmetkr-31 force-pushed the fix/status-add-missing-platforms branch from 408bbc6 to 3ff3ec3 Compare July 31, 2026 05:35
@mehmetkr-31

Copy link
Copy Markdown
Contributor Author

Rebuilt on current origin/main (the branch was ~4200 commits behind).

You were right about every env var name, and the fix is to stop inventing them. The names now come from the gateway's own ingestion:

  • Matrix → MATRIX_ACCESS_TOKEN — the entry in gateway/config.py's PLATFORM_TOKEN_ENV_NAMES, not MATRIX_HOMESERVER_URL. The row also accepts MATRIX_PASSWORD, matching the real gate (matrix_token or getenv("MATRIX_PASSWORD")).
  • Mattermost → MATTERMOST_TOKEN, likewise from PLATFORM_TOKEN_ENV_NAMES.
  • Home Assistant → HASS_TOKEN, what the Home Assistant block actually reads.

A test pins those two against PLATFORM_TOKEN_ENV_NAMES directly, so if the canonical map ever moves, this fails loudly instead of silently making the rows wrong again — which is exactly how the first version got it wrong.

On truthy parsing — this turned out to be a live bug on main, not just something my new rows needed. The loop decides every row with has_token = bool(token), but the gateway reads flag-style vars through is_truthy_value(). So WHATSAPP_ENABLED=false has been reporting configured on main: the status command states the opposite of the truth for the one platform already using a flag. That row now parses the value, reusing utils.is_truthy_value rather than re-deriving the rule.

I did not touch API Server / Webhook. Their real gate isn't a flag at all — gateway/config.py requires a usable key (_has_usable_api_server_key, min length 16) and explicitly notes that API_SERVER_ENABLED alone would load an unauthenticated platform. A presence-or-truthy row would misreport that too, so it needs its own treatment rather than being folded in here.

Tests — tests/hermes_cli/test_status_platform_rows.py, 13 tests: each new platform has a row; each row responds to the documented var; the canonical-map invariant; Matrix accepts either credential; and both WHATSAPP_ENABLED=false / =true cases.

Verified against main's status.py: 7 of the 13 fail, including test_whatsapp_false_is_not_configured — the pre-existing bug.

Regression check: tests/hermes_cli/ -k status produces an identical failure set on this branch and on a pristine main checkout (6 on both, zero introduced).

Attribution hunk dropped — scripts/release.py untouched; contributors/emails/mehmet.kar@std.yildiz.edu.tr already exists on main.

@mehmetkr-31

Copy link
Copy Markdown
Contributor Author

Closing this myself to clear stale work, not because anything here was reviewed and found wanting.

Measuring this repo's merge behaviour: across four separate weekly samples, 157 externally-authored PRs were merged and not one took longer than 24 hours — median ~20 minutes. A PR that has been open for a month is not queued behind anything; the decision window closed long ago, and leaving it open just adds noise to a list maintainers scan.

The branch and its commits are untouched, so if any of this is still wanted, say so and I will rebase it onto current main and reopen rather than have you dig it out of a stale diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants