feat(gateway): add native QQ bot support#1000
Closed
AXONAI9000 wants to merge 2 commits intoNousResearch:mainfrom
Closed
feat(gateway): add native QQ bot support#1000AXONAI9000 wants to merge 2 commits intoNousResearch:mainfrom
AXONAI9000 wants to merge 2 commits intoNousResearch:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class QQ bot integration to the Hermes gateway, enabling QQ connectivity via qq-botpy, QQ message routing, and configuration/CLI support, with accompanying tests to ensure the integration is wired throughout the gateway stack.
Changes:
- Introduces a native QQ gateway adapter (
QQAdapter) and wires QQ into adapter creation, authorization, channel directory, cron delivery, and prompt hints. - Extends
send_messagetool routing to supportqq:group:.../qq:user:...targets, including a REST-based standalone sender. - Adds QQ-specific tests and updates toolset consistency checks; updates dependency extras to include
qq-botpy.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| toolsets.py | Registers hermes-qq toolset and includes it in hermes-gateway. |
| tools/send_message_tool.py | Adds QQ target format + routing + REST sender implementation. |
| tests/test_toolsets.py | Ensures hermes-qq shares the same core tool list as other platforms. |
| tests/gateway/test_qq.py | Adds coverage for QQ env/config loading, adapter behavior, and integration wiring checks. |
| requirements.txt | Adds qq-botpy to messaging integration dependencies. |
| pyproject.toml | Adds qq extra and includes it in messaging and all extras. |
| hermes_cli/gateway.py | Adds QQ to interactive gateway setup and status checks. |
| hermes_cli/config.py | Adds QQ-related env var metadata for config prompting. |
| gateway/run.py | Adds QQ adapter factory branch, auth env maps, and toolset/platform mappings. |
| gateway/platforms/qq.py | Implements the native QQ adapter using qq-botpy (gateway receive + send). |
| gateway/config.py | Adds Platform.QQ and env loading for QQ credentials/home channel. |
| gateway/channel_directory.py | Includes QQ in session-derived directory building. |
| cron/scheduler.py | Adds QQ to cron delivery platform map. |
| agent/prompt_builder.py | Adds QQ-specific prompt hint for response formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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?
Adds native QQ bot gateway support so Hermes can connect to QQ using the official qq-botpy SDK, receive C2C/group messages, and send replies back through the QQ bot API.
Related Issue
N/A
Type of Change
Changes Made
gateway/platforms/qq.pyusingqq-botpysend_messageand cron delivery, including standalone REST sending supportHow to Test
qq-botpy.QQ_BOT_APP_IDandQQ_BOT_SECRETin~/.hermes/.env.python -m hermes_cli.main gateway run.python -m pytest -o addopts="" tests/gateway/test_qq.py tests/test_toolsets.py tests/gateway/test_config.py tests/tools/test_send_message_tool.py tests/gateway/test_delivery.py tests/gateway/test_signal.py -qChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
GET /users/@me, gateway connect, inbound QQ message receipt, and outbound reply delivery.