hermes - ✅(Solved) Fix [Bug]: No Webhooks Option in Gateway Setup [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#24911Fetched 2026-05-14 03:50:41
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×5cross-referenced ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fix / Workaround

There is also a naming mismatch in the setup dispatch table in hermes_cli/gateway.py:

The platform key used elsewhere is singular webhook, but the dispatch table uses plural webhooks. So even if the menu added a "webhook" entry, it would not dispatch to _setup_webhooks() unless this mapping is fixed.

Add webhook to the built-in gateway setup platform list, and align the setup dispatch key with the runtime platform key.

PR fix notes

PR #24921: fix(cli): surface webhook in hermes gateway setup picker (#24911)

Description (problem / solution / changelog)

Summary

  • Add a webhook entry to _PLATFORMS so hermes gateway setup lists it alongside the other messaging platforms.
  • Add a singular webhook key to _builtin_setup_fn so the existing _setup_webhooks() flow is reachable from the picker.

The bug

gateway/config.py already supports the webhook platform (Platform.WEBHOOK = "webhook", env-driven config bridge around gateway/config.py:1428-1442), and hermes_cli/setup.py:_setup_webhooks ships a bespoke interactive flow. But the platform picker built by hermes gateway setup enumerates _PLATFORMS in hermes_cli/gateway.py, and that list had no webhook entry — so the option silently never appeared.

Even if a caller had a way to feed key="webhook" into the picker, the dispatch table in _builtin_setup_fn only had a "webhooks" (plural) key, which never matched any platform key. Every other platform key in the runtime is singular (matches Platform.<NAME> values).

The fix

hermes_cli/gateway.py:

  1. New _PLATFORMS entry for webhook with token_var: "WEBHOOK_ENABLED" so _platform_status mirrors the env-driven bridge — picker correctly reports "configured" / "not configured". No vars schema; webhook setup is bespoke and dispatches through _setup_webhooks, not _setup_standard_platform.
  2. _builtin_setup_fn gains a "webhook": _s._setup_webhooks entry. The existing "webhooks" plural alias is kept defensively in case any external caller relies on it.

Test plan

  • Focused regression test: tests/hermes_cli/test_gateway_setup_webhook.py (3 tests):
    • test_webhook_present_in_gateway_setup_menu_all_platforms() includes webhook.
    • test_webhook_has_builtin_setup_fn_builtin_setup_fn("webhook") is _setup_webhooks.
    • test_webhook_entry_has_token_var — entry uses WEBHOOK_ENABLED so _platform_status works.
  • Adjacent suite: tests/hermes_cli/test_gateway.py, test_gateway_platform_gating.py, test_setup_openclaw_migration.py — 67 passed.
  • Regression guard: stashed the hermes_cli/gateway.py change, reran focused tests — all 3 fail (one with assert "webhook" not in {...}, one with assert None is _setup_webhooks, one with StopIteration). Restored, all 3 pass.

Related

  • Fixes #24911

Changed files

  • hermes_cli/gateway.py (modified, +29/-0)
  • tests/hermes_cli/test_gateway_setup_webhook.py (added, +88/-0)
  • tests/hermes_cli/test_setup_openclaw_migration.py (modified, +4/-1)

Code Example

Select a platform to configure:
  ↑↓ navigate  ENTER/SPACE select  ESC cancel

   () 📱 Telegram  (not configured)
   () 💬 Discord  (not configured)
   () 💼 Slack  (not configured)
   () 🔐 Matrix  (not configured)
   () 💬 Mattermost  (not configured)
   () 📲 WhatsApp  (not configured)
   () 📡 Signal  (not configured)
   () 📧 Email  (not configured)
   () 📱 SMS (Twilio)  (not configured)
   () 💬 DingTalk  (not configured)
   () 🪽 Feishu / Lark  (not configured)
   () 💬 WeCom (Enterprise WeChat)  (not configured)
   () 💬 WeCom Callback (Self-Built App)  (not configured)
   () 💬 Weixin / WeChat  (not configured)
   () 💬 BlueBubbles (iMessage)  (not configured)
   () 🐧 QQ Bot  (not configured)
   () 💎 Yuanbao  (not configured)
   () 💬 Google Chat  (not configured)
   () 💬 IRC  (not configured)
   () 💚 LINE  (not configured)
   () 💼 Microsoft Teams  (not configured)
  () Done

---

Report       https://dpaste.com/8GN5DPHLR
agent.log    https://dpaste.com/38B6WGC8R
gateway.log  https://dpaste.com/CZTVMDPTN

---



---

class Platform(Enum):
    ...
    API_SERVER = "api_server"
    WEBHOOK = "webhook"
    MSGRAPH_WEBHOOK = "msgraph_webhook"

---

# Webhook platform
webhook_enabled = os.getenv("WEBHOOK_ENABLED", "").lower() in {"true", "1", "yes"}
webhook_port = os.getenv("WEBHOOK_PORT")
webhook_secret = os.getenv("WEBHOOK_SECRET", "")
if webhook_enabled:
    if Platform.WEBHOOK not in config.platforms:
        config.platforms[Platform.WEBHOOK] = PlatformConfig()
    config.platforms[Platform.WEBHOOK].enabled = True
    ...

---

def _setup_webhooks():
    """Configure webhook integration."""
    print_header("Webhooks")
    existing = get_env_value("WEBHOOK_ENABLED")
    ...
    save_env_value("WEBHOOK_ENABLED", "true")

---

_PLATFORMS = [
    {
        "key": "telegram",
        "label": "Telegram",
        ...
    },
    ...
    {
        "key": "yuanbao",
        "label": "Yuanbao",
        ...
    },
]

---

def _builtin_setup_fn(key: str):
    from hermes_cli import setup as _s
    return {
        ...
        "webhooks": _s._setup_webhooks,
        ...
    }.get(key)

---

{
    "key": "webhook",
    "label": "Webhook",
    "emoji": "🔗",
    "token_var": "WEBHOOK_ENABLED",
},

---

"webhook": _s._setup_webhooks,

---

"webhook": _s._setup_webhooks,
"webhooks": _s._setup_webhooks,

---

def test_webhook_present_in_gateway_setup_menu():
    import hermes_cli.gateway as gateway_mod

    keys = {p["key"] for p in gateway_mod._all_platforms()}
    assert "webhook" in keys


def test_webhook_has_builtin_setup_fn():
    import hermes_cli.gateway as gateway_mod

    assert gateway_mod._builtin_setup_fn("webhook") is not None
RAW_BUFFERClick to expand / collapse

Bug Description

I want to setup webhook for Gitlab, but found that the Webhooks doc Via setup wizard option not in platform list:

Select a platform to configure:
  ↑↓ navigate  ENTER/SPACE select  ESC cancel

   () 📱 Telegram  (not configured)
   () 💬 Discord  (not configured)
   () 💼 Slack  (not configured)
   () 🔐 Matrix  (not configured)
   () 💬 Mattermost  (not configured)
   () 📲 WhatsApp  (not configured)
   () 📡 Signal  (not configured)
   () 📧 Email  (not configured)
   () 📱 SMS (Twilio)  (not configured)
   () 💬 DingTalk  (not configured)
   () 🪽 Feishu / Lark  (not configured)
   () 💬 WeCom (Enterprise WeChat)  (not configured)
   () 💬 WeCom Callback (Self-Built App)  (not configured)
   () 💬 Weixin / WeChat  (not configured)
   () 💬 BlueBubbles (iMessage)  (not configured)
   () 🐧 QQ Bot  (not configured)
   () 💎 Yuanbao  (not configured)
   () 💬 Google Chat  (not configured)
   () 💬 IRC  (not configured)
   () 💚 LINE  (not configured)
   () 💼 Microsoft Teams  (not configured)
() Done

Steps to Reproduce

  1. Run hermes update
  2. Run hermes gateway setup

Expected Behavior

Can see a option that guide to enable webhook

Actual Behavior

No webhook option

Affected Component

Setup / Installation

Messaging Platform (if gateway-related)

N/A (CLI only)

Debug Report

Report       https://dpaste.com/8GN5DPHLR
agent.log    https://dpaste.com/38B6WGC8R
gateway.log  https://dpaste.com/CZTVMDPTN

Operating System

macOS

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

The gateway runtime already supports the webhook platform, but hermes gateway setup builds its platform picker from a separate hard-coded list that does not include it.

Relevant code:

  1. Runtime/config support exists in gateway/config.py:
class Platform(Enum):
    ...
    API_SERVER = "api_server"
    WEBHOOK = "webhook"
    MSGRAPH_WEBHOOK = "msgraph_webhook"

In the current checkout this is around gateway/config.py:102-104.

Webhook env-based config is also loaded in gateway/config.py:

# Webhook platform
webhook_enabled = os.getenv("WEBHOOK_ENABLED", "").lower() in {"true", "1", "yes"}
webhook_port = os.getenv("WEBHOOK_PORT")
webhook_secret = os.getenv("WEBHOOK_SECRET", "")
if webhook_enabled:
    if Platform.WEBHOOK not in config.platforms:
        config.platforms[Platform.WEBHOOK] = PlatformConfig()
    config.platforms[Platform.WEBHOOK].enabled = True
    ...

Around gateway/config.py:1428-1442.

  1. The interactive setup function exists in hermes_cli/setup.py:
def _setup_webhooks():
    """Configure webhook integration."""
    print_header("Webhooks")
    existing = get_env_value("WEBHOOK_ENABLED")
    ...
    save_env_value("WEBHOOK_ENABLED", "true")

Around hermes_cli/setup.py:2316-2348.

  1. But the menu source for hermes gateway setup is _PLATFORMS in hermes_cli/gateway.py:
_PLATFORMS = [
    {
        "key": "telegram",
        "label": "Telegram",
        ...
    },
    ...
    {
        "key": "yuanbao",
        "label": "Yuanbao",
        ...
    },
]

Around hermes_cli/gateway.py:3270-3651.

This list currently contains Telegram, Discord, Slack, Matrix, Mattermost, WhatsApp, Signal, Email, SMS, DingTalk, Feishu, WeCom, WeCom Callback, Weixin, BlueBubbles, QQBot, and Yuanbao, but no webhook entry.

There is also a naming mismatch in the setup dispatch table in hermes_cli/gateway.py:

def _builtin_setup_fn(key: str):
    from hermes_cli import setup as _s
    return {
        ...
        "webhooks": _s._setup_webhooks,
        ...
    }.get(key)

Around hermes_cli/gateway.py:4703-4725.

The platform key used elsewhere is singular webhook, but the dispatch table uses plural webhooks. So even if the menu added a "webhook" entry, it would not dispatch to _setup_webhooks() unless this mapping is fixed.

Proposed Fix (optional)

Add webhook to the built-in gateway setup platform list, and align the setup dispatch key with the runtime platform key.

In hermes_cli/gateway.py, add a webhook entry to _PLATFORMS, for example near SMS / API-style platforms:

{
    "key": "webhook",
    "label": "Webhook",
    "emoji": "🔗",
    "token_var": "WEBHOOK_ENABLED",
},

Then change the setup dispatch mapping from plural to singular:

"webhook": _s._setup_webhooks,

Optionally keep the plural alias for backward compatibility:

"webhook": _s._setup_webhooks,
"webhooks": _s._setup_webhooks,

Suggested regression test:

def test_webhook_present_in_gateway_setup_menu():
    import hermes_cli.gateway as gateway_mod

    keys = {p["key"] for p in gateway_mod._all_platforms()}
    assert "webhook" in keys


def test_webhook_has_builtin_setup_fn():
    import hermes_cli.gateway as gateway_mod

    assert gateway_mod._builtin_setup_fn("webhook") is not None

This should make hermes gateway setup show Webhook in the platform list and correctly launch the existing _setup_webhooks() flow.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Bug]: No Webhooks Option in Gateway Setup [1 pull requests, 1 participants]