[codex] Add Discord mention pattern wake phrases - #29393
Closed
alvinycheung wants to merge 3 commits into
Closed
Conversation
alvinycheung
marked this pull request as ready for review
May 27, 2026 14:26
19 tasks
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the focused Discord wake-phrase implementation; the feature premise is still present on current main: plugins/platforms/discord/adapter.py:6212-6214 only accepts native explicit mentions when the gate applies.
Problems
scripts/gateway-watchdog.py:10-12is unrelated to Discord mention patterns and hardcodes contributor-local macOS paths; it also hardcodes profile homes at lines 67-69. Please remove it from this PR. Hermes already has the portable system-service command inhermes_cli/subcommands/gateway.py:152-156.- Current main uses
_self_is_explicitly_mentioned(message)atplugins/platforms/discord/adapter.py:6213; preserve that helper when integrating the pattern condition rather than reviving the stale directmessage.mentionscheck in this diff. - The stated documentation update is not present in
website/docs/user-guide/messaging/discord.md:314-322, and the tests only set the private_mention_patternsfield instead of covering the config bridge atgateway/config.py:1209,1267.
Suggested changes
- Keep the PR to the Discord feature, document
discord.mention_patterns, and add a YAML-to-adapter configuration-path test.
Automated hermes-sweeper review.
|
|
||
| STATE_FILE = Path("~/.hermes/gateway_watchdog_state.json").expanduser() | ||
| HERMES_BIN = Path("/Users/alvin/.local/bin/hermes") | ||
| PYTHON_BIN = Path("/Users/alvin/personal/hermes-agent/venv/bin/python") |
Contributor
There was a problem hiding this comment.
Please remove this watchdog from the Discord wake-phrase PR. It hardcodes a contributor-local macOS executable, and the adjacent constants plus later HERMES_HOME assignments make the script non-portable and not profile-safe; hermes gateway install is the supported cross-platform service mechanism.
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
Adds reusable text wake phrase support for the Discord gateway via
discord.mention_patterns. Configured regex patterns can satisfyrequire_mention, matching the behavior teams often expect from name-based bot aliases while keeping Discord native @mention behavior intact.Changes
require_mentionis enabled.discord.mention_patternsdefault config key.Validation
python -m pytest tests/gateway/test_discord_free_response.py tests/gateway/test_discord_allowed_channels.py tests/gateway/test_discord_bot_filter.py tests/gateway/test_discord_connect.py -qgit diff --checkSecurity / local config
No local Hermes/OpenClaw config, tokens, OAuth files,
.envfiles, user IDs, or bot credentials are included in this PR. Only source and test files are changed.