The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(hermes_cli): gateway.py _PLATFORMS table compact data layout (literal-equal)
Teknium3e0c47b24bbe
diff --git a/hermes_cli/gateway.py b/hermes_cli/gateway.pyindex dd896b90c8b..ee1b6a86a1c 100644--- a/hermes_cli/gateway.py+++ b/hermes_cli/gateway.py@@ -5168,10 +5168,7 @@ def run_gateway(verbose: int = 0, quiet: bool = False, replace: bool = False, fo# SMS, etc. live in plugins/platforms/<name>/ and are discovered via the platform registry._PLATFORMS = [{- "key": "mattermost",- "label": "Mattermost",- "emoji": "π¬",- "token_var": "MATTERMOST_TOKEN",+ "key": "mattermost", "label": "Mattermost", "emoji": "π¬", "token_var": "MATTERMOST_TOKEN","setup_instructions": ["1. In Mattermost: Integrations β Bot Accounts β Add Bot Account"," (System Console β Integrations β Bot Accounts must be enabled)",@@ -5183,46 +5180,26 @@ _PLATFORMS = ["5. To get a channel ID: click the channel name β View Info β copy the ID",],"vars": [- {- "name": "MATTERMOST_URL",- "prompt": "Server URL (e.g. https://mm.example.com)",- "password": False,- "help": "Your Mattermost server URL. Works with any self-hosted instance.",- },- {- "name": "MATTERMOST_TOKEN",- "prompt": "Bot token",- "password": True,- "help": "Paste the bot token from step 2 above.",- },- {- "name": "MATTERMOST_ALLOWED_USERS",- "prompt": "Allowed user IDs (comma-separated)",- "password": False,- "is_allowlist": True,- "help": "Your Mattermost user ID from step 4 above.",- },- {- "name": "MATTERMOST_HOME_CHANNEL",- "prompt": "Home channel ID (for cron/notification delivery, or empty to set later with /set-home)",- "password": False,- "help": "Channel ID where Hermes delivers cron results and notifications.",- },- {- "name": "MATTERMOST_REPLY_MODE",- "prompt": "Reply mode β 'off' for flat messages, 'thread' for threaded replies (default: off)",- "password": False,- "help": "off = flat channel messages, thread = replies nest under your message.",- },+ {"name": "MATTERMOST_URL", "prompt": "Server URL (e.g. https://mm.example.com)",+ "password": False, "help": "Your Mattermost server URL. Works with any self-hosted instance."},+ {"name": "MATTERMOST_TOKEN", "prompt": "Bot token", "password": True,+ "help": "Paste the bot token from step 2 above."},+ {"name": "MATTERMOST_ALLOWED_USERS", "prompt": "Allowed user IDs (comma-separated)",+ "password": False, "is_allowlist": True, "help": "Your Mattermost user ID from step 4 above."},+ {"name": "MATTERMOST_HOME_CHANNEL",+ "prompt": "Home channel ID (for cron/notification delivery, or empty to set later with /set-home)",+ "password": False, "help": "Channel ID where Hermes delivers cron results and notifications."},+ {"name": "MATTERMOST_REPLY_MODE",+ "prompt": "Reply mode β 'off' for flat messages, 'thread' for threaded replies (default: off)",+ "password": False,+ "help": "off = flat channel messages, thread = replies nest under your message."},],},{"key": "signal", "label": "Signal", "emoji": "π‘", "token_var": "SIGNAL_HTTP_URL"},{"key": "weixin", "label": "Weixin / WeChat", "emoji": "π¬", "token_var": "WEIXIN_ACCOUNT_ID"},{- "key": "bluebubbles",- "label": "BlueBubbles (iMessage)",- "emoji": "π¬",- "token_var": "BLUEBUBBLES_SERVER_URL",+ "key": "bluebubbles", "label": "BlueBubbles (iMessage)",+ "emoji": "π¬", "token_var": "BLUEBUBBLES_SERVER_URL","setup_instructions": ["1. Install BlueBubbles on a Mac that will act as your iMessage server:"," https://bluebubbles.app/",@@ -5235,38 +5212,23 @@ _PLATFORMS = [" Share the code β the user sends it via iMessage to get approved",],"vars": [- {- "name": "BLUEBUBBLES_SERVER_URL",- "prompt": "BlueBubbles server URL (e.g. http://192.168.1.10:1234)",- "password": False,- "help": "The URL shown in BlueBubbles Settings β API.",- },- {- "name": "BLUEBUBBLES_PASSWORD",- "prompt": "BlueBubbles server password",- "password": True,- "help": "The password shown in BlueBubbles Settings β API.",- },- {- "name": "BLUEBUBBLES_ALLOWED_USERS",- "prompt": "Pre-authorized phone numbers or iMessage IDs (comma-separated, or leave empty for DM pairing)",- "password": False,- "is_allowlist": True,- "help": "Optional β pre-authorize specific users. Leave empty to use DM pairing instead (recommended).",- },- {- "name": "BLUEBUBBLES_HOME_CHANNEL",- "prompt": "Home channel (phone number or iMessage ID for cron/notifications, or empty)",- "password": False,- "help": "Phone number or Apple ID to deliver cron results and notifications to.",- },+ {"name": "BLUEBUBBLES_SERVER_URL",+ "prompt": "BlueBubbles server URL (e.g. http://192.168.1.10:1234)", "password": False,+ "help": "The URL shown in BlueBubbles Settings β API."},+ {"name": "BLUEBUBBLES_PASSWORD", "prompt": "BlueBubbles server password", "password": True,+ "help": "The password shown in BlueBubbles Settings β API."},+ {"name": "BLUEBUBBLES_ALLOWED_USERS",+ "prompt": "Pre-authorized phone numbers or iMessage IDs (comma-separated, or leave empty for DM pairing)",+ "password": False, "is_allowlist": True,+ "help": "Optional β pre-authorize specific users. Leave empty to use DM pairing instead (recommended)."},+ {"name": "BLUEBUBBLES_HOME_CHANNEL",+ "prompt": "Home channel (phone number or iMessage ID for cron/notifications, or empty)",+ "password": False,+ "help": "Phone number or Apple ID to deliver cron results and notifications to."},],},{- "key": "qqbot",- "label": "QQ Bot",- "emoji": "π§",- "token_var": "QQ_APP_ID",+ "key": "qqbot", "label": "QQ Bot", "emoji": "π§", "token_var": "QQ_APP_ID","setup_instructions": ["1. Register a QQ Bot application at q.qq.com","2. Note your App ID and App Secret from the application page",@@ -5274,38 +5236,21 @@ _PLATFORMS = ["4. Configure sandbox or publish the bot",],"vars": [- {- "name": "QQ_APP_ID",- "prompt": "QQ Bot App ID",- "password": False,- "help": "Your QQ Bot App ID from q.qq.com.",- },- {- "name": "QQ_CLIENT_SECRET",- "prompt": "QQ Bot App Secret",- "password": True,- "help": "Your QQ Bot App Secret from q.qq.com.",- },- {- "name": "QQ_ALLOWED_USERS",- "prompt": "Allowed user OpenIDs (comma-separated, leave empty for open access)",- "password": False,- "is_allowlist": True,- "help": "Optional β restrict DM access to specific user OpenIDs.",- },- {- "name": "QQBOT_HOME_CHANNEL",- "prompt": "Home channel (user/group OpenID for cron delivery, or empty)",- "password": False,- "help": "OpenID to deliver cron results and notifications to.",- },+ {"name": "QQ_APP_ID", "prompt": "QQ Bot App ID", "password": False,+ "help": "Your QQ Bot App ID from q.qq.com."},+ {"name": "QQ_CLIENT_SECRET", "prompt": "QQ Bot App Secret", "password": True,+ "help": "Your QQ Bot App Secret from q.qq.com."},+ {"name": "QQ_ALLOWED_USERS",+ "prompt": "Allowed user OpenIDs (comma-separated, leave empty for open access)",+ "password": False, "is_allowlist": True,+ "help": "Optional β restrict DM access to specific user OpenIDs."},+ {"name": "QQBOT_HOME_CHANNEL",+ "prompt": "Home channel (user/group OpenID for cron delivery, or empty)", "password": False,+ "help": "OpenID to deliver cron results and notifications to."},],},{- "key": "yuanbao",- "label": "Yuanbao",- "emoji": "π",- "token_var": "YUANBAO_APP_ID",+ "key": "yuanbao", "label": "Yuanbao", "emoji": "π", "token_var": "YUANBAO_APP_ID","setup_instructions": ["1. Download the Yuanbao app from https://yuanbao.tencent.com/","2. In the app, go to PAI β My Bot and create a new bot",@@ -5313,18 +5258,10 @@ _PLATFORMS = ["4. Enter them below and Hermes will connect automatically over WebSocket",],"vars": [- {- "name": "YUANBAO_APP_ID",- "prompt": "App ID",- "password": False,- "help": "The App ID from your Yuanbao IM Bot credentials.",- },- {- "name": "YUANBAO_APP_SECRET",- "prompt": "App Secret",- "password": True,- "help": "The App Secret (used for HMAC signing) from your Yuanbao IM Bot.",- },+ {"name": "YUANBAO_APP_ID", "prompt": "App ID", "password": False,+ "help": "The App ID from your Yuanbao IM Bot credentials."},+ {"name": "YUANBAO_APP_SECRET", "prompt": "App Secret", "password": True,+ "help": "The App Secret (used for HMAC signing) from your Yuanbao IM Bot."},],},]