Skip to content

feat(gateway): simplex channel enumeration + show configured platforms in hermes send --list - #77110

Merged
teknium1 merged 3 commits into
mainfrom
hermes/hermes-df351149
Aug 2, 2026
Merged

teknium1 merged 3 commits into
mainfrom
hermes/hermes-df351149

Conversation

@teknium1

@teknium1 teknium1 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

hermes send --list now shows every configured platform (with a targeting hint when no channels are discovered yet), and the SimpleX adapter enumerates its contacts and groups into the channel directory via a new generic list_channels() adapter hook.

Previously a platform configured only via env vars — e.g. a fresh SimpleX setup used for outbound hermes send — was invisible in --list (the directory only contains gateway-discovered channels), leaving users guessing at platform names. And SimpleX itself could never populate the directory: only session-history discovery ran for it, which requires inbound traffic.

Builds on the adapter list_channels() hook cherry-picked from #43545 by @Guoen0 (credit preserved).

Changes

  • gateway/channel_directory.py: adapter list_channels() hook consulted before platform-specific/session discovery (from Support adapter channel directory enumeration #43545); format_directory_for_display() accepts an explicit platforms view and renders empty platforms with a "(no channels discovered yet — send directly with <platform>:<chat_id>)" hint instead of hiding them
  • plugins/platforms/simplex/adapter.py: implement list_channels() — enumerates contacts (/contacts) and allowed groups (/groups) over the live daemon WebSocket; returns None when the WS is down so the directory falls back to session discovery instead of wiping known targets
  • hermes_cli/send_cmd.py: --list merges configured-but-undiscovered platforms (via get_connected_platforms()) into both the human and --json output; infra pseudo-platforms (local, api_server, webhook) excluded
  • website/docs/user-guide/messaging/simplex.md: hermes send targeting section
  • Tests: adapter enumeration (dict + [groupInfo, summary] pair forms, disconnect/timeout → None), --list merge behavior, display formatter hints

Validation

Before After
hermes send --list with configured SimpleX, no gateway run platform omitted entirely Simplex: + targeting hint
Channel directory with gateway running simplex empty until inbound traffic contacts + groups enumerated every refresh
Daemon WS down during refresh n/a returns None, directory falls back to session discovery
Targeted tests 37 passed (test_channel_directory.py, test_simplex_plugin.py, test_send_cmd.py)

E2E-validated with real imports against a temp HERMES_HOME: real build_channel_directory() → on-disk channel_directory.jsonresolve_channel_name("simplex", "hermes-testers") == "group:12".

Reported by Fedpostoffice on Discord (SimpleX missing from hermes send --list, leading to guessed platform names simplex-chat/simplex-relay).

Infographic

simplex discovery infographic

Guoen0 and others added 2 commits August 2, 2026 14:41
…s in hermes send --list

Builds on the adapter list_channels() hook (cherry-picked from #43545 by
@Guoen0):

- plugins/platforms/simplex: implement list_channels() — enumerates
  contacts (/contacts) and groups (/groups) over the live daemon
  WebSocket into the channel directory. Returns None when the WS is
  down so the directory falls back to session discovery instead of
  wiping known targets.
- hermes send --list: merge configured-but-undiscovered platforms into
  the listing. Previously a platform configured only via env (e.g. a
  fresh SimpleX setup used for outbound sends) was silently omitted,
  leaving users guessing at platform names.
- format_directory_for_display(): accept an explicit platforms view and
  render empty platforms with a targeting hint instead of hiding them.
- docs: simplex hermes-send section.

Reported by Fedpostoffice on Discord (simplex missing from
hermes send --list; guessed platform names simplex-chat/simplex-relay).
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 23f8aa1

all good!

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins labels Aug 2, 2026
@teknium1
teknium1 merged commit 9158b4b into main Aug 2, 2026
41 checks passed
@teknium1
teknium1 deleted the hermes/hermes-df351149 branch August 2, 2026 22:08
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 comp/gateway Gateway runner, session dispatch, delivery comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants