feat(gateway): simplex channel enumeration + show configured platforms in hermes send --list - #77110
Merged
Merged
Conversation
…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).
Contributor
૮ >ﻌ< ა ci reviewran on 23f8aa1 all good! |
1 task
1 task
76 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hermes send --listnow 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 genericlist_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: adapterlist_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 themplugins/platforms/simplex/adapter.py: implementlist_channels()— enumerates contacts (/contacts) and allowed groups (/groups) over the live daemon WebSocket; returnsNonewhen the WS is down so the directory falls back to session discovery instead of wiping known targetshermes_cli/send_cmd.py:--listmerges configured-but-undiscovered platforms (viaget_connected_platforms()) into both the human and--jsonoutput; infra pseudo-platforms (local,api_server,webhook) excludedwebsite/docs/user-guide/messaging/simplex.md:hermes sendtargeting section[groupInfo, summary]pair forms, disconnect/timeout →None),--listmerge behavior, display formatter hintsValidation
hermes send --listwith configured SimpleX, no gateway runSimplex:+ targeting hintNone, directory falls back to session discoverytest_channel_directory.py,test_simplex_plugin.py,test_send_cmd.py)E2E-validated with real imports against a temp
HERMES_HOME: realbuild_channel_directory()→ on-diskchannel_directory.json→resolve_channel_name("simplex", "hermes-testers") == "group:12".Reported by Fedpostoffice on Discord (SimpleX missing from
hermes send --list, leading to guessed platform namessimplex-chat/simplex-relay).Infographic