feat(feishu): add FEISHU_IGNORE_AT_ALL env to skip @everyone triggers - #64807
Closed
banserchen wants to merge 3 commits into
Closed
feat(feishu): add FEISHU_IGNORE_AT_ALL env to skip @everyone triggers#64807banserchen wants to merge 3 commits into
banserchen wants to merge 3 commits into
Conversation
By default Hermes treats @_all (@everyone) as a mention of the bot, so the bot responds whenever someone @everyone's in a group. This adds FEISHU_IGNORE_AT_ALL=true to make @everyone NOT trigger the bot — it only responds to explicit @bot mentions. - Modify _mentions_self() in feishu adapter to check the env var - Add tests for both ignore=true (skip) and ignore=false (default) cases
Collaborator
Duplicate of #60910 — same mechanism (opt-in |
1 task
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.
What does this PR do?
Code
☑ I've read the hermes-agent/CONTRIBUTING.md at main · NousResearch/hermes-agent · GitHub
☑ My commit messages follow /en/ (feat(scope):, fix(scope):, etc.)
☑ I searched for existing PRs to make sure this isn't a duplicate
☑ My PR contains only changes related to this fix/feature (no unrelated commits)
☑ I've run pytest tests/ -q and all tests pass
☑ I've added tests for my changes (required for bug fixes, strongly encouraged for features)
☑ I've tested on my platform: WSL2 (Ubuntu 24.04)
Documentation & Housekeeping
☑ I've updated relevant documentation — or N/A
☑ I've updated cli-config.yaml.example if I added/changed config keys — or N/A
☑ I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
☑ I've considered cross-platform impact (Windows, macOS) per the hermes-agent/CONTRIBUTING.md at main · NousResearch/hermes-agent · GitHub —or N/A
☑ I've updated tool descriptions/schemas if I changed tool behavior — or N/A
Screenshots / Logs
Gateway log before the fix (bot responds to @everyone):
[Lark] [INFO] connected to wss://msg-frontier.feishu.cn/ws/v2/...
[Feishu] Inbound group message received: ... text='@ALL 请注意'
After setting FEISHU_IGNORE_AT_ALL=true (bot ignores @everyone):
[Lark] [INFO] connected to wss://msg-frontier.feishu.cn/ws/v2/...
No inbound log for @everyone messages — bot stays silent
Test output:
$ python3 -m pytest tests/gateway/test_feishu.py::TestGroupMentionAtAll -v -o addopts=""
test_at_all_in_content_accepts_without_explicit_bot_mention PASSED
test_at_all_still_requires_policy_gate PASSED
test_at_all_ignored_when_env_set PASSED
test_at_all_still_triggers_when_env_unset_or_false PASSED
======================== 4 passed, 10 warnings in 5.15s ========================