Skip to content

The agent that grows with you

refactor(dashboard): channel cards and env-value checks read the plugin's PlatformEntry

Teknium28e4da48fed6
diff --git a/gateway/platform_registry.py b/gateway/platform_registry.py
index c26c82730f3..8a6043d0b67 100644
--- a/gateway/platform_registry.py
+++ b/gateway/platform_registry.py
@@ -146,6 +146,20 @@ class PlatformEntry:
target_ref_syntax_fn: Optional[Callable[[str], Any]] = None
# ``gateway.platforms.send_targets.StandaloneSendPolicy`` or None (generic send routing).
standalone_send: Optional[Any] = None
+ # --- dashboard ---
+ # Channels-page card metadata (hermes_cli/web_server_messaging.py, Desktop + web dashboard).
+ # Every field defaults to "not declared": the card then falls back to ``label`` / ``install_hint``
+ # / ``required_env`` + prefix-discovered env vars.
+ dashboard_label: str = "" # card title when it differs from ``label`` (status/CLI keep ``label``)
+ dashboard_description: str = "" # human description; ``install_hint`` is a dependency note
+ docs_url: str = "" # setup guide linked from the card
+ dashboard_env_vars: tuple = () # card fields shown first, in this order, before discovered vars
+ # Credentials the card treats as "configured"; None = ``required_env`` (which also drives
+ # ``hermes setup`` and the child-env scrub, so the card may legitimately ask for a different set).
+ dashboard_required_env: Optional[tuple] = None
+ # ``{ENV_KEY: (accepts(value) -> bool, 400 detail)}``: the dashboard PUT rejects a non-empty value
+ # the predicate refuses, catching credentials pasted into the wrong field.
+ env_value_rules: dict = field(default_factory=dict)
def core_ships_platform(name: str) -> bool:
diff --git a/hermes_cli/web_routers/messaging.py b/hermes_cli/web_routers/messaging.py
index a7c4a8dd91c..0801f4a65ad 100644
--- a/hermes_cli/web_routers/messaging.py
+++ b/hermes_cli/web_routers/messaging.py
@@ -99,41 +99,21 @@ _MESSAGING_ENV_FALLBACKS: dict[str, dict[str, Any]] = {
}
-# Kept in sync with the corresponding frontend validation in ChannelsPage.tsx.
-_TELEGRAM_BOT_TOKEN_RE = re.compile(r"\d+:[A-Za-z0-9_-]{30,}")
-_TELEGRAM_USER_ID_RE = re.compile(r"\d+")
-_SLACK_MEMBER_ID_RE = re.compile(r"[UW][A-Z0-9]{2,}")
-
-
-def _csv_ids(value: str) -> list[str]:
- """Split like the gateway parsers (gateway/platforms/*.py): comma, strip, drop
- empties — so a trailing/interior comma isn't rejected when the runtime accepts it."""
- return [part.strip() for part in value.split(",") if part.strip()]
-
-
-# (platform, env key) -> (accepts(value), 400 detail). Rejects credentials that
-# are clearly in the wrong field. "*" is Slack's allow-all wildcard.
-_ENV_VALUE_RULES: dict[tuple[str, str], tuple[Any, str]] = {
- ("telegram", "TELEGRAM_BOT_TOKEN"): (
- _TELEGRAM_BOT_TOKEN_RE.fullmatch,
- "Telegram bot token must be the complete token from @BotFather, such as 123456789:ABC…"),
- ("telegram", "TELEGRAM_ALLOWED_USERS"): (
- lambda v: all(_TELEGRAM_USER_ID_RE.fullmatch(u) for u in _csv_ids(v)),
- "Telegram allowed users must be comma-separated numeric user IDs."),
- ("slack", "SLACK_BOT_TOKEN"): (
- lambda v: v.startswith("xoxb-"),
- "Slack Bot Token must start with xoxb-. Paste the bot token from OAuth & Permissions."),
- ("slack", "SLACK_APP_TOKEN"): (
- lambda v: v.startswith("xapp-"),
- "Slack App Token must start with xapp-. Paste the app-level token from Basic Information > App-Level Tokens."),
- ("slack", "SLACK_ALLOWED_USERS"): (
- lambda v: all(u == "*" or _SLACK_MEMBER_ID_RE.fullmatch(u) for u in _csv_ids(v)),
- "Slack allowed user IDs must be comma-separated member IDs like U01ABC2DEF3."),
-}
+def _env_value_rules(platform_id: str) -> dict[str, tuple[Any, str]]:
+ """``{env key: (accepts(value), 400 detail)}`` declared on the platform plugin's PlatformEntry
+ (``env_value_rules``; e.g. Telegram/Slack reject credentials clearly in the wrong field).
+
+ Resolve this in the request's own scope, right after :func:`_require_platform`: the catalog build
+ there has just materialized every plugin entry, so the lookup imports nothing, whereas inside
+ ``_profile_scope`` the registry's profile overlay may not hold the entry and every rule would
+ silently stop applying."""
+ from gateway.platform_registry import platform_registry
+ entry = platform_registry.get(platform_id)
+ return dict(entry.env_value_rules) if entry is not None else {}
-def _validate_messaging_env_value(platform_id: str, key: str, value: str) -> None:
- rule = _ENV_VALUE_RULES.get((platform_id, key))
+def _validate_messaging_env_value(rules: dict[str, tuple[Any, str]], key: str, value: str) -> None:
+ rule = rules.get(key)
if value and rule and not rule[0](value):
raise HTTPException(status_code=400, detail=rule[1])
@@ -675,6 +655,9 @@ def _prune_telegram_onboarding_pairings() -> None:
_telegram_onboarding_pairings.pop(pairing_id, None)
+_TELEGRAM_USER_ID_RE = re.compile(r"\d+")
+
+
def _normalize_telegram_user_id(value: Any) -> str | None:
normalized = str(value or "").strip()
return normalized if _TELEGRAM_USER_ID_RE.fullmatch(normalized) else None
@@ -874,6 +857,7 @@ def _multiplex_port_binding_conflict(platform_id: str, requested_profile: Option
@router.put("/api/messaging/platforms/{platform_id}")
async def update_messaging_platform(platform_id: str, body: MessagingPlatformUpdate, profile: Optional[str] = None):
entry = _require_platform(platform_id)
+ env_value_rules = _env_value_rules(platform_id)
target_profile = body.profile or profile
if body.enabled:
@@ -907,7 +891,7 @@ async def update_messaging_platform(platform_id: str, body: MessagingPlatformUpd
continue
if is_redacted_credential_preview(trimmed):
raise HTTPException(status_code=400, detail=REDACTED_CREDENTIAL_WRITE_DETAIL)
- _validate_messaging_env_value(platform_id, key, trimmed)
+ _validate_messaging_env_value(env_value_rules, key, trimmed)
updates[key] = trimmed
for key in body.clear_env:
diff --git a/hermes_cli/web_server_messaging.py b/hermes_cli/web_server_messaging.py
index c3ee77663c1..584674b1758 100644
--- a/hermes_cli/web_server_messaging.py
+++ b/hermes_cli/web_server_messaging.py
@@ -18,165 +18,11 @@ from hermes_cli.version_info import get_version_info
_log = logging.getLogger("hermes_cli.web_server")
-# Entries omit fields they don't need to override; the catalog builder fills
-# in env_vars from OPTIONAL_ENV_VARS via prefix matching when not specified,
-# and pulls required_env from a plugin's PlatformEntry when available.
+# Card metadata for core-only platforms (no plugin, so no PlatformEntry to declare it). Plugin
+# platforms declare theirs on their PlatformEntry (``dashboard_*`` / ``docs_url``, see
+# :func:`_plugin_card_fields`). Entries omit fields they don't need; the catalog builder fills in
+# env_vars from OPTIONAL_ENV_VARS via prefix matching when not specified.
_PLATFORM_OVERRIDES: dict[str, dict[str, Any]] = {
- "telegram": {
- "name": "Telegram", "description": "Run Hermes from Telegram DMs, groups, and topics.",
- "docs_url": "https://core.telegram.org/bots/features#botfather",
- "env_vars": ("TELEGRAM_BOT_TOKEN", "TELEGRAM_ALLOWED_USERS", "TELEGRAM_PROXY"),
- "required_env": ("TELEGRAM_BOT_TOKEN",),
- },
- "discord": {
- "name": "Discord", "description": "Connect Hermes to Discord DMs, channels, and threads.",
- "docs_url": "https://discord.com/developers/applications",
- "env_vars": ("DISCORD_BOT_TOKEN", "DISCORD_ALLOWED_USERS"),
- "required_env": ("DISCORD_BOT_TOKEN",),
- },
- "slack": {
- "name": "Slack",
- "description": "Use Hermes from Slack via Socket Mode. Add allowed Slack member IDs so connected bots can respond.",
- "docs_url": "https://api.slack.com/apps",
- "env_vars": ("SLACK_BOT_TOKEN", "SLACK_APP_TOKEN", "SLACK_ALLOWED_USERS"),
- "required_env": ("SLACK_BOT_TOKEN", "SLACK_APP_TOKEN"),
- },
- "mattermost": {
- "name": "Mattermost",
- "description": "Connect Hermes to Mattermost channels and direct messages.",
- "docs_url": "https://mattermost.com/deploy/",
- "env_vars": ("MATTERMOST_URL", "MATTERMOST_TOKEN", "MATTERMOST_ALLOWED_USERS"),
- "required_env": ("MATTERMOST_URL", "MATTERMOST_TOKEN"),
- },
- "matrix": {
- "name": "Matrix", "description": "Use Hermes in Matrix rooms and direct messages.",
- "docs_url": "https://matrix.org/ecosystem/servers/",
- "env_vars": (
- "MATRIX_HOMESERVER", "MATRIX_ACCESS_TOKEN", "MATRIX_USER_ID", "MATRIX_ALLOWED_USERS",
- ),
- "required_env": ("MATRIX_HOMESERVER", "MATRIX_ACCESS_TOKEN", "MATRIX_USER_ID"),
- },
- "signal": {
- "name": "Signal", "description": "Connect through a signal-cli REST bridge.",
- "docs_url": "https://github.com/bbernhard/signal-cli-rest-api",
- "env_vars": ("SIGNAL_HTTP_URL", "SIGNAL_ACCOUNT", "SIGNAL_ALLOWED_USERS"),
- "required_env": ("SIGNAL_HTTP_URL", "SIGNAL_ACCOUNT"),
- },
- "whatsapp": {
- "name": "WhatsApp",
- "description": "Use Hermes through the bundled WhatsApp bridge with QR-based auth.",
- "docs_url": "https://github.com/tulir/whatsmeow",
- "env_vars": (
- "WHATSAPP_ENABLED", "WHATSAPP_MODE", "WHATSAPP_DM_POLICY", "WHATSAPP_ALLOWED_USERS",
- ),
- "required_env": (),
- },
- "email": {
- "name": "Email", "description": "Talk to Hermes through an IMAP/SMTP mailbox.",
- "docs_url": "https://hermes-agent.nousresearch.com/docs/user-guide/messaging/",
- "env_vars": ("EMAIL_ADDRESS", "EMAIL_PASSWORD", "EMAIL_IMAP_HOST", "EMAIL_SMTP_HOST"),
- "required_env": ("EMAIL_ADDRESS", "EMAIL_PASSWORD", "EMAIL_IMAP_HOST", "EMAIL_SMTP_HOST"),
- },
- "sms": {
- "name": "SMS (Twilio)", "description": "Send and receive text messages via Twilio.",
- "docs_url": "https://www.twilio.com/console",
- "env_vars": ("TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN"),
- "required_env": ("TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN"),
- },
- "dingtalk": {
- "name": "DingTalk", "description": "Connect Hermes to DingTalk groups (钉钉).",
- "docs_url": "https://open.dingtalk.com/document/orgapp/the-robot-development-process",
- "env_vars": ("DINGTALK_CLIENT_ID", "DINGTALK_CLIENT_SECRET"),
- "required_env": ("DINGTALK_CLIENT_ID", "DINGTALK_CLIENT_SECRET"),
- },
- "feishu": {
- "name": "Feishu / Lark", "description": "Use Hermes inside Feishu / Lark.",
- "docs_url": "https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/intro",
- "env_vars": (
- "FEISHU_APP_ID", "FEISHU_APP_SECRET", "FEISHU_ENCRYPT_KEY", "FEISHU_VERIFICATION_TOKEN",
- ),
- "required_env": ("FEISHU_APP_ID", "FEISHU_APP_SECRET"),
- },
- "google_chat": {
- "name": "Google Chat", "description": "Connect Hermes to Google Chat via Cloud Pub/Sub.",
- "docs_url": "https://hermes-agent.nousresearch.com/docs/user-guide/messaging/google_chat",
- },
- "wecom": {
- "name": "WeCom (group bot)", "description": "Send-only WeCom group bot via webhook.",
- "docs_url": "https://developer.work.weixin.qq.com/document/path/91770",
- "env_vars": ("WECOM_BOT_ID", "WECOM_SECRET"), "required_env": ("WECOM_BOT_ID",),
- },
- "wecom_callback": {
- "name": "WeCom (app)", "description": "Two-way WeCom integration via callback app.",
- "docs_url": "https://developer.work.weixin.qq.com/document/path/90930",
- "env_vars": (
- "WECOM_CALLBACK_CORP_ID", "WECOM_CALLBACK_CORP_SECRET", "WECOM_CALLBACK_AGENT_ID",
- "WECOM_CALLBACK_TOKEN", "WECOM_CALLBACK_ENCODING_AES_KEY",
- ),
- "required_env": (
- "WECOM_CALLBACK_CORP_ID", "WECOM_CALLBACK_CORP_SECRET", "WECOM_CALLBACK_AGENT_ID",
- ),
- },
- "weixin": {
- "name": "Weixin / WeChat (Personal)",
- "description": "Connect a personal WeChat account through Tencent's iLink Bot API.",
- "docs_url": "https://hermes-agent.nousresearch.com/docs/user-guide/messaging/weixin/",
- "env_vars": ("WEIXIN_ACCOUNT_ID", "WEIXIN_TOKEN", "WEIXIN_BASE_URL"),
- "required_env": ("WEIXIN_ACCOUNT_ID", "WEIXIN_TOKEN"),
- },
- "bluebubbles": {
- "name": "BlueBubbles (iMessage)",
- "description": "Use Hermes through iMessage via a BlueBubbles server.",
- "docs_url": "https://bluebubbles.app/",
- "env_vars": (
- "BLUEBUBBLES_SERVER_URL", "BLUEBUBBLES_PASSWORD", "BLUEBUBBLES_ALLOWED_USERS",
- ),
- "required_env": ("BLUEBUBBLES_SERVER_URL", "BLUEBUBBLES_PASSWORD"),
- },
- "qqbot": {
- "name": "QQ Bot", "description": "Connect Hermes to a QQ Bot from the QQ Open Platform.",
- "docs_url": "https://q.qq.com",
- "env_vars": ("QQ_APP_ID", "QQ_CLIENT_SECRET", "QQ_ALLOWED_USERS"),
- "required_env": ("QQ_APP_ID", "QQ_CLIENT_SECRET"),
- },
- # Teams ships as a platform plugin, so its name/env vars come from the
- # plugin registry. Only the docs link needs an override here so the
- # Channels page can point at the Microsoft Teams setup guide.
- "teams": {
- "description": "Connect Hermes to Microsoft Teams chats via the Bot Framework.",
- "docs_url": "https://hermes-agent.nousresearch.com/docs/user-guide/messaging/teams",
- },
- # Bundled platform plugins: name comes from the plugin registry label;
- # give each a human description (the registry's install_hint is a
- # dependency note, not a description) and a docs link.
- "irc": {
- "description": "Relay messages between an IRC channel (or DMs) and Hermes.",
- "docs_url": "https://hermes-agent.nousresearch.com/docs/user-guide/messaging/irc",
- },
- "line": {
- "description": "Use Hermes from LINE via the LINE Messaging API webhook.",
- "docs_url": "https://hermes-agent.nousresearch.com/docs/user-guide/messaging/line",
- },
- "ntfy": {
- "description": "Chat with Hermes over ntfy push topics (ntfy.sh or self-hosted).",
- "docs_url": "https://hermes-agent.nousresearch.com/docs/user-guide/messaging/ntfy",
- },
- "photon": {
- "description": "Use Hermes through iMessage via Photon's managed Spectrum platform.",
- "docs_url": "https://hermes-agent.nousresearch.com/docs/user-guide/messaging/photon",
- },
- "raft": {
- "description": "Join a Raft workspace as an external agent.",
- "docs_url": "https://hermes-agent.nousresearch.com/docs/user-guide/messaging/raft",
- },
- "simplex": {
- "description": "Talk to Hermes over SimpleX Chat via a local simplex-chat daemon.",
- "docs_url": "https://hermes-agent.nousresearch.com/docs/user-guide/messaging/simplex",
- },
- "yuanbao": {
- "name": "Yuanbao (元宝)", "description": "Connect Hermes to Tencent Yuanbao.", "docs_url": "",
- "required_env": (),
- },
"api_server": {
"name": "API server",
"description": "Expose Hermes as an OpenAI-compatible HTTP API for tools like Open WebUI.",
@@ -199,11 +45,6 @@ _PLATFORM_OVERRIDES: dict[str, dict[str, Any]] = {
"docs_url": "https://hermes-agent.nousresearch.com/docs/user-guide/messaging/msgraph-webhook",
"required_env": (),
},
- "whatsapp_cloud": {
- "name": "WhatsApp Cloud API",
- "description": "Use Hermes via Meta's hosted WhatsApp Cloud API (no local bridge).",
- "docs_url": "https://hermes-agent.nousresearch.com/docs/user-guide/messaging/whatsapp-cloud",
- },
"relay": {
"name": "Relay (experimental)",
"description": "Generic relay adapter fronted by the Hermes Relay connector.",
@@ -225,7 +66,8 @@ def _messaging_platform_catalog() -> tuple[dict[str, Any], ...]:
Built-ins come from ``gateway.config.Platform`` (LOCAL excluded); plugin platforms from
``platform_registry.plugin_entries()`` so new adapters appear without a code change here.
- UI metadata lives in :data:`_PLATFORM_OVERRIDES`; the rest is derived from id/required_env.
+ UI metadata comes from each plugin's PlatformEntry, or :data:`_PLATFORM_OVERRIDES` for core-only
+ platforms; the rest is derived from id/required_env.
"""
from gateway.config import Platform
@@ -305,8 +147,23 @@ def _merge_platform_env_vars(platform_id: str, override: dict[str, Any], plugin_
return discovered
+def _plugin_card_fields(plugin_entry: Any) -> dict[str, Any]:
+ """A plugin's declared card metadata in override shape; undeclared fields are left out so
+ the builder falls back exactly as for a platform with no metadata."""
+ fields: dict[str, Any] = {
+ "name": plugin_entry.dashboard_label, "description": plugin_entry.dashboard_description,
+ "docs_url": plugin_entry.docs_url,
+ }
+ if plugin_entry.dashboard_env_vars:
+ fields["env_vars"] = plugin_entry.dashboard_env_vars
+ if plugin_entry.dashboard_required_env is not None:
+ fields["required_env"] = plugin_entry.dashboard_required_env
+ return fields
+
+
def _build_catalog_entry(platform_id: str, plugin_entry: Any | None = None) -> dict[str, Any]:
- override = _PLATFORM_OVERRIDES.get(platform_id, {})
+ override = _PLATFORM_OVERRIDES.get(platform_id) or (
+ _plugin_card_fields(plugin_entry) if plugin_entry is not None else {})
if "required_env" in override:
required_env = tuple(override["required_env"])
else:
diff --git a/plugins/platforms/bluebubbles/adapter.py b/plugins/platforms/bluebubbles/adapter.py
index 90440365ffc..0e2f0e5bdef 100644
--- a/plugins/platforms/bluebubbles/adapter.py
+++ b/plugins/platforms/bluebubbles/adapter.py
@@ -702,6 +702,9 @@ def register(ctx) -> None:
"""Plugin entry point — called by the Hermes plugin system."""
ctx.register_platform(
name="bluebubbles", label="BlueBubbles (iMessage)", adapter_factory=BlueBubblesAdapter,
+ dashboard_description="Use Hermes through iMessage via a BlueBubbles server.",
+ docs_url="https://bluebubbles.app/",
+ dashboard_env_vars=("BLUEBUBBLES_SERVER_URL", "BLUEBUBBLES_PASSWORD", "BLUEBUBBLES_ALLOWED_USERS"),
check_fn=check_bluebubbles_requirements, is_connected=_is_connected,
config_connected_fn=config_connected_extra("server_url", "password"),
required_env=["BLUEBUBBLES_SERVER_URL", "BLUEBUBBLES_PASSWORD"], install_hint=_INSTALL_HINT,
diff --git a/plugins/platforms/dingtalk/adapter.py b/plugins/platforms/dingtalk/adapter.py
index 472823676cd..5b38c411481 100644
--- a/plugins/platforms/dingtalk/adapter.py
+++ b/plugins/platforms/dingtalk/adapter.py
@@ -852,6 +852,9 @@ def register(ctx) -> None:
ctx.register_platform(
standalone_send=StandaloneSendPolicy(text_direct=True),
name="dingtalk", label="DingTalk", adapter_factory=DingTalkAdapter, check_fn=dingtalk_deps_present,
+ dashboard_description="Connect Hermes to DingTalk groups (钉钉).",
+ docs_url="https://open.dingtalk.com/document/orgapp/the-robot-development-process",
+ dashboard_env_vars=("DINGTALK_CLIENT_ID", "DINGTALK_CLIENT_SECRET"),
ensure_deps_fn=ensure_dingtalk_deps, is_connected=_is_connected, validate_config=_is_connected,
required_env=["DINGTALK_CLIENT_ID", "DINGTALK_CLIENT_SECRET"], install_hint="pip install 'dingtalk-stream>=0.20' httpx",
setup_fn=interactive_setup, apply_yaml_config_fn=_apply_yaml_config, allowed_users_env="DINGTALK_ALLOWED_USERS",
diff --git a/plugins/platforms/discord/adapter.py b/plugins/platforms/discord/adapter.py
index b8a7db873bd..70744128c3e 100644
--- a/plugins/platforms/discord/adapter.py
+++ b/plugins/platforms/discord/adapter.py
@@ -4328,13 +4328,6 @@ class DiscordAdapter(DiscordAuthorizationMixin, DiscordMediaMixin, DiscordThread
except Exception as e:
logger.debug("[Discord] Admin notify via %s failed: %s", target, e)
-
-
-
-
-
-
-
async def send_typing(self, chat_id: str, metadata=None) -> None:
"""Start a persistent typing loop (POST typing every 12s; indicator lasts ~10s).
TYPING_START is unreliable for bots in DMs; 429 sleeps ``retry_after``; CancelledError ends it."""
@@ -7379,9 +7372,11 @@ def register(ctx) -> None:
from plugins.platforms.discord.send_targets import SEND_ENTRY_KWARGS
from plugins.platforms.discord.onboarding import interactive_setup
+ from .dashboard_card import DASHBOARD_CARD
ctx.register_platform(
**SEND_ENTRY_KWARGS, # send_message target syntax + routing
name="discord",
+ **DASHBOARD_CARD,
label="Discord",
adapter_factory=DiscordAdapter,
check_fn=discord_deps_present,
diff --git a/plugins/platforms/discord/dashboard_card.py b/plugins/platforms/discord/dashboard_card.py
new file mode 100644
index 00000000000..6d905093f93
--- /dev/null
+++ b/plugins/platforms/discord/dashboard_card.py
@@ -0,0 +1,8 @@
+"""Discord's Channels-page card (Desktop + web dashboard): the PlatformEntry ``dashboard_*`` /
+``docs_url`` fields register() spreads in. Kept apart from adapter.py, which is over its size cap."""
+
+DASHBOARD_CARD = dict(
+ dashboard_description="Connect Hermes to Discord DMs, channels, and threads.",
+ docs_url="https://discord.com/developers/applications",
+ dashboard_env_vars=("DISCORD_BOT_TOKEN", "DISCORD_ALLOWED_USERS"),
+)
diff --git a/plugins/platforms/email/adapter.py b/plugins/platforms/email/adapter.py
index 0accaad7ae1..b5a40a8fc14 100644
--- a/plugins/platforms/email/adapter.py
+++ b/plugins/platforms/email/adapter.py
@@ -1015,6 +1015,10 @@ def register(ctx) -> None:
target_ref_syntax_fn=regex_stripped_parser(_SEND_TARGET_RE),
standalone_send=StandaloneSendPolicy(text_direct=True),
name="email", label="Email", adapter_factory=EmailAdapter, check_fn=check_email_requirements, is_connected=_is_connected,
+ dashboard_description="Talk to Hermes through an IMAP/SMTP mailbox.",
+ docs_url="https://hermes-agent.nousresearch.com/docs/user-guide/messaging/",
+ dashboard_env_vars=("EMAIL_ADDRESS", "EMAIL_PASSWORD", "EMAIL_IMAP_HOST", "EMAIL_SMTP_HOST"),
+ dashboard_required_env=("EMAIL_ADDRESS", "EMAIL_PASSWORD", "EMAIL_IMAP_HOST", "EMAIL_SMTP_HOST"),
required_env=["EMAIL_ADDRESS", "EMAIL_PASSWORD", "EMAIL_SMTP_HOST"],
install_hint="Email uses the Python stdlib (smtplib/imaplib) — no extra deps", allowed_users_env="EMAIL_ALLOWED_USERS",
allow_all_env="EMAIL_ALLOW_ALL_USERS", cron_deliver_env_var="EMAIL_HOME_ADDRESS", standalone_sender_fn=_standalone_send,
diff --git a/plugins/platforms/feishu/adapter.py b/plugins/platforms/feishu/adapter.py
index 63e190e76ba..7e16b35a8e3 100644
--- a/plugins/platforms/feishu/adapter.py
+++ b/plugins/platforms/feishu/adapter.py
@@ -4481,9 +4481,11 @@ def register(ctx) -> None:
"""Plugin entry point — called by the Hermes plugin system."""
from plugins.platforms.feishu.adapter_hint import PLATFORM_HINT
from plugins.platforms.feishu.send_targets import SEND_ENTRY_KWARGS
+ from .dashboard_card import DASHBOARD_CARD
ctx.register_platform(
**SEND_ENTRY_KWARGS, # send_message target syntax + routing
name="feishu", label="Feishu / Lark", adapter_factory=FeishuAdapter,
+ **DASHBOARD_CARD,
check_fn=feishu_deps_present, ensure_deps_fn=check_feishu_requirements,
is_connected=_is_connected, validate_config=_is_connected,
required_env=["FEISHU_APP_ID", "FEISHU_APP_SECRET"],
diff --git a/plugins/platforms/feishu/dashboard_card.py b/plugins/platforms/feishu/dashboard_card.py
new file mode 100644
index 00000000000..0cb36e5ec19
--- /dev/null
+++ b/plugins/platforms/feishu/dashboard_card.py
@@ -0,0 +1,10 @@
+"""Feishu / Lark's Channels-page card (Desktop + web dashboard): the PlatformEntry ``dashboard_*`` /
+``docs_url`` fields register() spreads in. Kept apart from adapter.py, which is over its size cap."""
+
+DASHBOARD_CARD = dict(
+ dashboard_description="Use Hermes inside Feishu / Lark.",
+ docs_url="https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/intro",
+ dashboard_env_vars=(
+ "FEISHU_APP_ID", "FEISHU_APP_SECRET", "FEISHU_ENCRYPT_KEY", "FEISHU_VERIFICATION_TOKEN",
+ ),
+)
diff --git a/plugins/platforms/google_chat/adapter.py b/plugins/platforms/google_chat/adapter.py
index 8ef7ddc507d..9e4fed8dcdf 100644
--- a/plugins/platforms/google_chat/adapter.py
+++ b/plugins/platforms/google_chat/adapter.py
@@ -1751,6 +1751,8 @@ def register(ctx) -> None:
"""Plugin entry point: registers the ``google_chat`` adapter with the platform registry."""
ctx.register_platform(
name="google_chat",
+ dashboard_description="Connect Hermes to Google Chat via Cloud Pub/Sub.",
+ docs_url="https://hermes-agent.nousresearch.com/docs/user-guide/messaging/google_chat",
label="Google Chat",
adapter_factory=lambda cfg: GoogleChatAdapter(cfg),
check_fn=_check_for_registry,
diff --git a/plugins/platforms/irc/adapter.py b/plugins/platforms/irc/adapter.py
index 942c6f5cfd3..e237ab84c06 100644
--- a/plugins/platforms/irc/adapter.py
+++ b/plugins/platforms/irc/adapter.py
@@ -588,6 +588,8 @@ def register(ctx):
"""Plugin entry point: called by the Hermes plugin system."""
ctx.register_platform(
name="irc",
+ dashboard_description="Relay messages between an IRC channel (or DMs) and Hermes.",
+ docs_url="https://hermes-agent.nousresearch.com/docs/user-guide/messaging/irc",
label="IRC",
adapter_factory=IRCAdapter,
check_fn=check_requirements,
diff --git a/plugins/platforms/line/adapter.py b/plugins/platforms/line/adapter.py
index 70936e03df9..b5fd05f44f6 100644
--- a/plugins/platforms/line/adapter.py
+++ b/plugins/platforms/line/adapter.py
@@ -978,6 +978,8 @@ def interactive_setup() -> None:
def register(ctx) -> None:
ctx.register_platform(
name="line", label="LINE", adapter_factory=lambda cfg: LineAdapter(cfg), check_fn=check_requirements,
+ dashboard_description="Use Hermes from LINE via the LINE Messaging API webhook.",
+ docs_url="https://hermes-agent.nousresearch.com/docs/user-guide/messaging/line",
validate_config=validate_config, is_connected=is_connected,
required_env=["LINE_CHANNEL_ACCESS_TOKEN", "LINE_CHANNEL_SECRET"], install_hint="pip install aiohttp",
setup_fn=interactive_setup, env_enablement_fn=_env_enablement, cron_deliver_env_var="LINE_HOME_CHANNEL",
diff --git a/plugins/platforms/matrix/adapter.py b/plugins/platforms/matrix/adapter.py
index e6bcce93fc7..eeb222d6ec5 100644
--- a/plugins/platforms/matrix/adapter.py
+++ b/plugins/platforms/matrix/adapter.py
@@ -3258,9 +3258,11 @@ def _is_connected(config) -> bool:
def register(ctx) -> None:
from plugins.platforms.matrix.adapter_hint import PLATFORM_HINT
from plugins.platforms.matrix.send_targets import SEND_ENTRY_KWARGS
+ from .dashboard_card import DASHBOARD_CARD
ctx.register_platform(
**SEND_ENTRY_KWARGS, # send_message target syntax + routing
name="matrix", label="Matrix", adapter_factory=MatrixAdapter, check_fn=matrix_deps_present,
+ **DASHBOARD_CARD,
ensure_deps_fn=ensure_matrix_deps, is_connected=_is_connected,
required_env=["MATRIX_HOMESERVER", "MATRIX_ACCESS_TOKEN"], install_hint="pip install 'mautrix[encryption]'",
setup_fn=interactive_setup, apply_yaml_config_fn=_apply_yaml_config, allowed_users_env="MATRIX_ALLOWED_USERS",
diff --git a/plugins/platforms/matrix/dashboard_card.py b/plugins/platforms/matrix/dashboard_card.py
new file mode 100644
index 00000000000..cc022fdd165
--- /dev/null
+++ b/plugins/platforms/matrix/dashboard_card.py
@@ -0,0 +1,11 @@
+"""Matrix's Channels-page card (Desktop + web dashboard): the PlatformEntry ``dashboard_*`` /
+``docs_url`` fields register() spreads in. Kept apart from adapter.py, which is over its size cap."""
+
+DASHBOARD_CARD = dict(
+ dashboard_description="Use Hermes in Matrix rooms and direct messages.",
+ docs_url="https://matrix.org/ecosystem/servers/",
+ dashboard_env_vars=(
+ "MATRIX_HOMESERVER", "MATRIX_ACCESS_TOKEN", "MATRIX_USER_ID", "MATRIX_ALLOWED_USERS",
+ ),
+ dashboard_required_env=("MATRIX_HOMESERVER", "MATRIX_ACCESS_TOKEN", "MATRIX_USER_ID"),
+)
diff --git a/plugins/platforms/mattermost/adapter.py b/plugins/platforms/mattermost/adapter.py
index 290c8bbeedd..0d862da8976 100644
--- a/plugins/platforms/mattermost/adapter.py
+++ b/plugins/platforms/mattermost/adapter.py
@@ -728,6 +728,9 @@ def register(ctx) -> None:
"""Plugin entry point — called by the Hermes plugin system."""
ctx.register_platform(
name="mattermost", label="Mattermost", adapter_factory=MattermostAdapter,
+ dashboard_description="Connect Hermes to Mattermost channels and direct messages.",
+ docs_url="https://mattermost.com/deploy/",
+ dashboard_env_vars=("MATTERMOST_URL", "MATTERMOST_TOKEN", "MATTERMOST_ALLOWED_USERS"),
check_fn=check_mattermost_requirements, validate_config=validate_mattermost_config,
is_connected=_is_connected, required_env=["MATTERMOST_URL", "MATTERMOST_TOKEN"],
install_hint="pip install aiohttp", setup_fn=interactive_setup,
diff --git a/plugins/platforms/ntfy/adapter.py b/plugins/platforms/ntfy/adapter.py
index d3852888914..df3ed2d513c 100644
--- a/plugins/platforms/ntfy/adapter.py
+++ b/plugins/platforms/ntfy/adapter.py
@@ -360,6 +360,8 @@ def register(ctx) -> None:
ctx.register_platform(
target_ref_syntax_fn=parse_nonempty,
name="ntfy", label="ntfy", adapter_factory=lambda cfg: NtfyAdapter(cfg),
+ dashboard_description="Chat with Hermes over ntfy push topics (ntfy.sh or self-hosted).",
+ docs_url="https://hermes-agent.nousresearch.com/docs/user-guide/messaging/ntfy",
check_fn=check_requirements, validate_config=validate_config, is_connected=is_connected,
required_env=["NTFY_TOPIC"], install_hint="pip install httpx # already a Hermes dependency",
env_enablement_fn=_env_enablement, # env-only setups show in `gateway status`
diff --git a/plugins/platforms/photon/adapter.py b/plugins/platforms/photon/adapter.py
index 07dad6b845c..9dfe3d98d06 100644
--- a/plugins/platforms/photon/adapter.py
+++ b/plugins/platforms/photon/adapter.py
@@ -1703,6 +1703,8 @@ def register(ctx) -> None:
# DM GUIDs are adapter-native ids (mirrors the react handler).
target_ref_syntax_fn=regex_stripped_parser(_SEND_DM_GUID_RE),
name="photon", label="iMessage via Photon", adapter_factory=lambda cfg: PhotonAdapter(cfg),
+ dashboard_description="Use Hermes through iMessage via Photon's managed Spectrum platform.",
+ docs_url="https://hermes-agent.nousresearch.com/docs/user-guide/messaging/photon",
check_fn=check_requirements, validate_config=validate_config, is_connected=is_connected,
required_env=["PHOTON_PROJECT_ID", "PHOTON_PROJECT_SECRET"],
install_hint=(
diff --git a/plugins/platforms/qqbot/register.py b/plugins/platforms/qqbot/register.py
index 9c5554e413f..8e53a15a9cf 100644
--- a/plugins/platforms/qqbot/register.py
+++ b/plugins/platforms/qqbot/register.py
@@ -135,6 +135,9 @@ def register(ctx) -> None:
ctx.register_platform(
standalone_send=StandaloneSendPolicy(label="QQ Bot", media=True, captionable=True, text_direct=True),
name="qqbot",
+ dashboard_description="Connect Hermes to a QQ Bot from the QQ Open Platform.",
+ docs_url="https://q.qq.com",
+ dashboard_env_vars=("QQ_APP_ID", "QQ_CLIENT_SECRET", "QQ_ALLOWED_USERS"),
label="QQ Bot",
adapter_factory=QQAdapter,
check_fn=check_qq_requirements,
diff --git a/plugins/platforms/raft/adapter.py b/plugins/platforms/raft/adapter.py
index 415eac8606f..af5561fe65c 100644
--- a/plugins/platforms/raft/adapter.py
+++ b/plugins/platforms/raft/adapter.py
@@ -553,6 +553,8 @@ def register(ctx) -> None:
"""Plugin entry point — called by the Hermes plugin system."""
ctx.register_platform(
name="raft",
+ dashboard_description="Join a Raft workspace as an external agent.",
+ docs_url="https://hermes-agent.nousresearch.com/docs/user-guide/messaging/raft",
label="Raft",
adapter_factory=RaftAdapter,
check_fn=check_raft_requirements,
diff --git a/plugins/platforms/signal/register.py b/plugins/platforms/signal/register.py
index ec844d97cb0..89618c50c04 100644
--- a/plugins/platforms/signal/register.py
+++ b/plugins/platforms/signal/register.py
@@ -57,6 +57,9 @@ def register(ctx) -> None:
standalone_send=StandaloneSendPolicy(label="Signal", media=True, empty_list_between_chunks=True,
text_direct=True),
name="signal", label="Signal", adapter_factory=SignalAdapter,
+ dashboard_description="Connect through a signal-cli REST bridge.",
+ docs_url="https://github.com/bbernhard/signal-cli-rest-api",
+ dashboard_env_vars=("SIGNAL_HTTP_URL", "SIGNAL_ACCOUNT", "SIGNAL_ALLOWED_USERS"),
check_fn=check_signal_requirements, validate_config=_validate_config,
is_connected=_is_connected, required_env=["SIGNAL_HTTP_URL", "SIGNAL_ACCOUNT"],
config_connected_fn=config_connected_extra("http_url"),
diff --git a/plugins/platforms/simplex/adapter.py b/plugins/platforms/simplex/adapter.py
index 4591bdc4294..9b7b88c2034 100644
--- a/plugins/platforms/simplex/adapter.py
+++ b/plugins/platforms/simplex/adapter.py
@@ -697,6 +697,8 @@ def interactive_setup() -> None:
def register(ctx) -> None:
ctx.register_platform(
name="simplex", label="SimpleX Chat", adapter_factory=lambda cfg: SimplexAdapter(cfg),
+ dashboard_description="Talk to Hermes over SimpleX Chat via a local simplex-chat daemon.",
+ docs_url="https://hermes-agent.nousresearch.com/docs/user-guide/messaging/simplex",
check_fn=check_requirements, validate_config=validate_config, is_connected=is_connected,
required_env=["SIMPLEX_WS_URL"],
install_hint=("pip install websockets # SimpleX adapter requires the websockets package"),
diff --git a/plugins/platforms/slack/adapter.py b/plugins/platforms/slack/adapter.py
index aa3b8fcd9e0..e25c5c12483 100644
--- a/plugins/platforms/slack/adapter.py
+++ b/plugins/platforms/slack/adapter.py
@@ -6912,9 +6912,11 @@ def register(ctx) -> None:
"""Plugin entry point — called by the Hermes plugin system."""
from plugins.platforms.slack.adapter_hint import PLATFORM_HINT
from plugins.platforms.slack.send_targets import SEND_ENTRY_KWARGS
+ from .dashboard_card import DASHBOARD_CARD
ctx.register_platform(
**SEND_ENTRY_KWARGS, # send_message target syntax + routing
name="slack",
+ **DASHBOARD_CARD,
label="Slack",
adapter_factory=SlackAdapter,
check_fn=slack_deps_present,
diff --git a/plugins/platforms/slack/dashboard_card.py b/plugins/platforms/slack/dashboard_card.py
new file mode 100644
index 00000000000..20561fde18f
--- /dev/null
+++ b/plugins/platforms/slack/dashboard_card.py
@@ -0,0 +1,27 @@
+"""Slack's Channels-page card (Desktop + web dashboard): the PlatformEntry ``dashboard_*`` /
+``docs_url`` fields register() spreads in. Kept apart from adapter.py, which is over its size cap."""
+
+import re
+
+# Write checks (kept in sync with ChannelsPage.tsx): reject tokens pasted into the wrong field.
+# "*" is the allow-all wildcard; allowlists split like the adapter's parser.
+_MEMBER_ID_RE = re.compile(r"[UW][A-Z0-9]{2,}")
+_ENV_VALUE_RULES = {
+ "SLACK_BOT_TOKEN": (
+ lambda v: v.startswith("xoxb-"),
+ "Slack Bot Token must start with xoxb-. Paste the bot token from OAuth & Permissions."),
+ "SLACK_APP_TOKEN": (
+ lambda v: v.startswith("xapp-"),
+ "Slack App Token must start with xapp-. Paste the app-level token from Basic Information > App-Level Tokens."),
+ "SLACK_ALLOWED_USERS": (
+ lambda v: all(u == "*" or _MEMBER_ID_RE.fullmatch(u)
+ for u in (p.strip() for p in v.split(",")) if u),
+ "Slack allowed user IDs must be comma-separated member IDs like U01ABC2DEF3."),
+}
+
+DASHBOARD_CARD = dict(
+ dashboard_description="Use Hermes from Slack via Socket Mode. Add allowed Slack member IDs so connected bots can respond.",
+ docs_url="https://api.slack.com/apps",
+ dashboard_env_vars=("SLACK_BOT_TOKEN", "SLACK_APP_TOKEN", "SLACK_ALLOWED_USERS"),
+ env_value_rules=_ENV_VALUE_RULES,
+)
diff --git a/plugins/platforms/sms/adapter.py b/plugins/platforms/sms/adapter.py
index 3f0935ad2e1..2d73bacd9c6 100644
--- a/plugins/platforms/sms/adapter.py
+++ b/plugins/platforms/sms/adapter.py
@@ -342,6 +342,10 @@ def register(ctx) -> None:
ctx.register_platform(
standalone_send=StandaloneSendPolicy(text_direct=True),
name="sms", label="SMS (Twilio)", adapter_factory=SmsAdapter,
+ dashboard_description="Send and receive text messages via Twilio.",
+ docs_url="https://www.twilio.com/console",
+ dashboard_env_vars=("TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN"),
+ dashboard_required_env=("TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN"),
check_fn=check_sms_requirements, is_connected=_is_connected,
required_env=["TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN", "TWILIO_PHONE_NUMBER"],
install_hint="pip install aiohttp", allowed_users_env="SMS_ALLOWED_USERS",
diff --git a/plugins/platforms/teams/adapter.py b/plugins/platforms/teams/adapter.py
index 496351bbb98..51aa1d05d61 100644
--- a/plugins/platforms/teams/adapter.py
+++ b/plugins/platforms/teams/adapter.py
@@ -839,6 +839,8 @@ def _install_hint() -> str:
def register(ctx) -> None:
ctx.register_platform(
name="teams", label="Microsoft Teams", adapter_factory=lambda cfg: TeamsAdapter(cfg),
+ dashboard_description="Connect Hermes to Microsoft Teams chats via the Bot Framework.",
+ docs_url="https://hermes-agent.nousresearch.com/docs/user-guide/messaging/teams",
check_fn=check_requirements, # PASSIVE probe — never installs
ensure_deps_fn=check_teams_requirements, # ACTIVE lazy-installer, run by create_adapter()
validate_config=validate_config, is_connected=is_connected,
diff --git a/plugins/platforms/telegram/adapter.py b/plugins/platforms/telegram/adapter.py
index 0facabfa8a1..63aaf87aad6 100644
--- a/plugins/platforms/telegram/adapter.py
+++ b/plugins/platforms/telegram/adapter.py
@@ -7163,8 +7163,6 @@ class TelegramAdapter(TelegramHeldInboundMixin, BasePlatformAdapter):
# -- Plugin registration glue: register(ctx) plus the hook implementations (adapter factory, YAML→env/extra
# config, setup wizard, standalone sender).
-
-
# ────────────────────────────────────────────────────────────────────────── Plugin migration glue (#41112 /
# #3823) Added when the Telegram adapter (+ its telegram_network satellite) moved from gateway/platforms/
# into this bundled plugin. Mirrors the Discord (#24356) / Slack migrations: a register(ctx) entry point
@@ -7311,8 +7309,10 @@ def _apply_yaml_config(yaml_cfg: dict, telegram_cfg: dict) -> dict | None:
def register(ctx) -> None:
"""Plugin entry point — called by the Hermes plugin system."""
from plugins.platforms.telegram.adapter_hint import PLATFORM_HINT
+ from .dashboard_card import DASHBOARD_CARD
ctx.register_platform(
name="telegram", label="Telegram", adapter_factory=_build_adapter, check_fn=telegram_deps_present,
+ **DASHBOARD_CARD,
ensure_deps_fn=check_telegram_requirements, is_connected=_is_connected, required_env=["TELEGRAM_BOT_TOKEN"],
install_hint=t("platform.telegram.install_hint"), setup_fn=interactive_setup, apply_yaml_config_fn=_apply_yaml_config,
allowed_users_env="TELEGRAM_ALLOWED_USERS", allow_all_env="TELEGRAM_ALLOW_ALL_USERS", cron_deliver_env_var="TELEGRAM_HOME_CHANNEL",
diff --git a/plugins/platforms/telegram/dashboard_card.py b/plugins/platforms/telegram/dashboard_card.py
new file mode 100644
index 00000000000..030e49a4e59
--- /dev/null
+++ b/plugins/platforms/telegram/dashboard_card.py
@@ -0,0 +1,25 @@
+"""Telegram's Channels-page card (Desktop + web dashboard): the PlatformEntry ``dashboard_*`` /
+``docs_url`` fields register() spreads in. Kept apart from adapter.py, which is over its size cap."""
+
+import re
+
+# Write checks (kept in sync with ChannelsPage.tsx): reject credentials
+# pasted into the wrong field. Allowlists split like the adapter's parser (comma, strip, drop
+# empties) so a trailing comma the runtime accepts is not refused here.
+_BOT_TOKEN_RE = re.compile(r"\d+:[A-Za-z0-9_-]{30,}")
+_USER_ID_RE = re.compile(r"\d+")
+_ENV_VALUE_RULES = {
+ "TELEGRAM_BOT_TOKEN": (
+ _BOT_TOKEN_RE.fullmatch,
+ "Telegram bot token must be the complete token from @BotFather, such as 123456789:ABC…"),
+ "TELEGRAM_ALLOWED_USERS": (
+ lambda v: all(_USER_ID_RE.fullmatch(u.strip()) for u in v.split(",") if u.strip()),
+ "Telegram allowed users must be comma-separated numeric user IDs."),
+}
+
+DASHBOARD_CARD = dict(
+ dashboard_description="Run Hermes from Telegram DMs, groups, and topics.",
+ docs_url="https://core.telegram.org/bots/features#botfather",
+ dashboard_env_vars=("TELEGRAM_BOT_TOKEN", "TELEGRAM_ALLOWED_USERS", "TELEGRAM_PROXY"),
+ env_value_rules=_ENV_VALUE_RULES,
+)
diff --git a/plugins/platforms/wecom/adapter.py b/plugins/platforms/wecom/adapter.py
index 56b4fe37c4f..af037617c5c 100644
--- a/plugins/platforms/wecom/adapter.py
+++ b/plugins/platforms/wecom/adapter.py
@@ -851,6 +851,11 @@ def register(ctx) -> None:
target_ref_syntax_fn=parse_nonempty,
standalone_send=StandaloneSendPolicy(text_direct=True),
name="wecom", label="WeCom (Enterprise WeChat)", adapter_factory=WeComAdapter, check_fn=check_wecom_requirements,
+ dashboard_label="WeCom (group bot)",
+ dashboard_description="Send-only WeCom group bot via webhook.",
+ docs_url="https://developer.work.weixin.qq.com/document/path/91770",
+ dashboard_env_vars=("WECOM_BOT_ID", "WECOM_SECRET"),
+ dashboard_required_env=("WECOM_BOT_ID",),
is_connected=_is_connected, validate_config=_is_connected, required_env=["WECOM_BOT_ID", "WECOM_SECRET"],
setup_fn=interactive_setup, allowed_users_env="WECOM_ALLOWED_USERS", allow_all_env="WECOM_ALLOW_ALL_USERS",
cron_deliver_env_var="WECOM_HOME_CHANNEL", standalone_sender_fn=_standalone_send, max_message_length=4000, **common,
@@ -863,6 +868,16 @@ def register(ctx) -> None:
from plugins.platforms.wecom.callback_adapter import check_wecom_callback_requirements, ensure_wecom_callback_requirements
ctx.register_platform(
name="wecom_callback", label="WeCom Callback (self-built apps)", adapter_factory=_build_callback_adapter,
+ dashboard_label="WeCom (app)",
+ dashboard_description="Two-way WeCom integration via callback app.",
+ docs_url="https://developer.work.weixin.qq.com/document/path/90930",
+ dashboard_env_vars=(
+ "WECOM_CALLBACK_CORP_ID", "WECOM_CALLBACK_CORP_SECRET", "WECOM_CALLBACK_AGENT_ID",
+ "WECOM_CALLBACK_TOKEN", "WECOM_CALLBACK_ENCODING_AES_KEY",
+ ),
+ dashboard_required_env=(
+ "WECOM_CALLBACK_CORP_ID", "WECOM_CALLBACK_CORP_SECRET", "WECOM_CALLBACK_AGENT_ID",
+ ),
check_fn=check_wecom_callback_requirements, ensure_deps_fn=ensure_wecom_callback_requirements,
is_connected=_callback_is_connected, validate_config=_callback_is_connected,
required_env=["WECOM_CALLBACK_CORP_ID", "WECOM_CALLBACK_CORP_SECRET"],
diff --git a/plugins/platforms/weixin/adapter.py b/plugins/platforms/weixin/adapter.py
index b469445f1c9..a565af42216 100644
--- a/plugins/platforms/weixin/adapter.py
+++ b/plugins/platforms/weixin/adapter.py
@@ -1408,6 +1408,10 @@ def register(ctx) -> None:
target_ref_syntax_fn=regex_groups_parser(_SEND_TARGET_RE, thread_group=False),
standalone_send=StandaloneSendPolicy(label="Weixin", media=True),
name="weixin", label="Weixin / WeChat", adapter_factory=WeixinAdapter, check_fn=check_weixin_requirements,
+ dashboard_label="Weixin / WeChat (Personal)",
+ dashboard_description="Connect a personal WeChat account through Tencent's iLink Bot API.",
+ docs_url="https://hermes-agent.nousresearch.com/docs/user-guide/messaging/weixin/",
+ dashboard_env_vars=("WEIXIN_ACCOUNT_ID", "WEIXIN_TOKEN", "WEIXIN_BASE_URL"),
is_connected=_is_connected, required_env=["WEIXIN_ACCOUNT_ID", "WEIXIN_TOKEN"], install_hint=_INSTALL_HINT,
config_connected_fn=_config_connected,
setup_fn=interactive_setup, allowed_users_env="WEIXIN_ALLOWED_USERS", allow_all_env="WEIXIN_ALLOW_ALL_USERS",
diff --git a/plugins/platforms/whatsapp/adapter.py b/plugins/platforms/whatsapp/adapter.py
index b5188859158..daa0cc74434 100644
--- a/plugins/platforms/whatsapp/adapter.py
+++ b/plugins/platforms/whatsapp/adapter.py
@@ -1253,6 +1253,12 @@ def register(ctx) -> None:
standalone_send=StandaloneSendPolicy(label="WhatsApp", media=True, captionable=True,
forward_force_document=True, mentions=True, text_direct=True),
name="whatsapp", label="WhatsApp", adapter_factory=WhatsAppAdapter, check_fn=check_whatsapp_requirements,
+ dashboard_description="Use Hermes through the bundled WhatsApp bridge with QR-based auth.",
+ docs_url="https://github.com/tulir/whatsmeow",
+ dashboard_env_vars=(
+ "WHATSAPP_ENABLED", "WHATSAPP_MODE", "WHATSAPP_DM_POLICY", "WHATSAPP_ALLOWED_USERS",
+ ),
+ dashboard_required_env=(),
is_connected=_is_connected, required_env=["WHATSAPP_ENABLED"],
install_hint="WhatsApp requires a Node.js bridge — see the WhatsApp messaging docs",
setup_fn=interactive_setup, apply_yaml_config_fn=_apply_yaml_config, allowed_users_env="WHATSAPP_ALLOWED_USERS",
diff --git a/plugins/platforms/whatsapp_cloud/adapter.py b/plugins/platforms/whatsapp_cloud/adapter.py
index eaaff53d13b..6facab8b614 100644
--- a/plugins/platforms/whatsapp_cloud/adapter.py
+++ b/plugins/platforms/whatsapp_cloud/adapter.py
@@ -1106,6 +1106,9 @@ def register(ctx) -> None:
WhatsApp Cloud sender in core either, and ``send()`` chunks itself."""
ctx.register_platform(
name="whatsapp_cloud", label="WhatsApp Business (Cloud)", adapter_factory=WhatsAppCloudAdapter,
+ dashboard_label="WhatsApp Cloud API",
+ dashboard_description="Use Hermes via Meta's hosted WhatsApp Cloud API (no local bridge).",
+ docs_url="https://hermes-agent.nousresearch.com/docs/user-guide/messaging/whatsapp-cloud",
check_fn=check_whatsapp_cloud_requirements, is_connected=_is_connected,
config_connected_fn=config_connected_extra("phone_number_id", "access_token"),
required_env=["WHATSAPP_CLOUD_PHONE_NUMBER_ID", "WHATSAPP_CLOUD_ACCESS_TOKEN"],
diff --git a/plugins/platforms/yuanbao/register.py b/plugins/platforms/yuanbao/register.py
index a5433f0aeb0..c77fa7aab46 100644
--- a/plugins/platforms/yuanbao/register.py
+++ b/plugins/platforms/yuanbao/register.py
@@ -96,6 +96,9 @@ def register(ctx) -> None:
target_ref_syntax_fn=_parse_send_target,
standalone_send=StandaloneSendPolicy(label="Yuanbao", media=True, text_direct=True),
name="yuanbao", label="Yuanbao", adapter_factory=YuanbaoAdapter,
+ dashboard_label="Yuanbao (元宝)",
+ dashboard_description="Connect Hermes to Tencent Yuanbao.",
+ dashboard_required_env=(),
check_fn=check_yuanbao_requirements, is_connected=_is_connected,
config_connected_fn=config_connected_extra("app_id", "app_secret"),
required_env=["YUANBAO_APP_ID", "YUANBAO_APP_SECRET"], install_hint=_INSTALL_HINT,
diff --git a/tests/hermes_cli/test_messaging_catalog_plugin_metadata.py b/tests/hermes_cli/test_messaging_catalog_plugin_metadata.py
new file mode 100644
index 00000000000..8f5bdc28fe7
--- /dev/null
+++ b/tests/hermes_cli/test_messaging_catalog_plugin_metadata.py
@@ -0,0 +1,36 @@
+"""A platform plugin's PlatformEntry is the single source of its dashboard card and write checks."""
+
+import pytest
+from fastapi import HTTPException
+
+from gateway.platform_registry import PlatformEntry, platform_registry
+
+
+def test_plugin_entry_declares_card_metadata_and_env_value_rules():
+ from hermes_cli.web_routers.messaging import _env_value_rules, _validate_messaging_env_value
+ from hermes_cli.web_server_messaging import _build_catalog_entry
+
+ entry = PlatformEntry(
+ name="cardtest", label="Card Test", adapter_factory=lambda cfg: None, check_fn=lambda: True,
+ required_env=["CARDTEST_TOKEN", "CARDTEST_HOST"], install_hint="pip install cardtest",
+ dashboard_label="Card Test (beta)", dashboard_description="Talk to Hermes over Card Test.",
+ docs_url="https://example.invalid/cardtest", dashboard_env_vars=("CARDTEST_TOKEN",),
+ dashboard_required_env=("CARDTEST_TOKEN",),
+ env_value_rules={"CARDTEST_TOKEN": (lambda v: v.startswith("ct-"), "must start with ct-")},
+ )
+ platform_registry.register(entry, scope=platform_registry.current_scope_key())
+ try:
+ card = _build_catalog_entry("cardtest", entry)
+ assert card["name"] == "Card Test (beta)"
+ assert card["description"] == "Talk to Hermes over Card Test."
+ assert card["docs_url"] == "https://example.invalid/cardtest"
+ assert card["env_vars"][0] == "CARDTEST_TOKEN"
+ assert card["required_env"] == ("CARDTEST_TOKEN",)
+
+ rules = _env_value_rules("cardtest")
+ _validate_messaging_env_value(rules, "CARDTEST_TOKEN", "ct-123")
+ with pytest.raises(HTTPException) as exc:
+ _validate_messaging_env_value(rules, "CARDTEST_TOKEN", "nope")
+ assert exc.value.status_code == 400 and exc.value.detail == "must start with ct-"
+ finally:
+ platform_registry.unregister("cardtest", scope=platform_registry.current_scope_key())