docs: repoint remaining stale gateway/platforms adapter refs to plugins/platforms

Sibling-site follow-up to the AGENTS.md token-lock fix (#50481). Platform
adapters migrated from gateway/platforms/<name>.py to
plugins/platforms/<name>/adapter.py; a handful (signal, weixin, bluebubbles,
qqbot, yuanbao, msgraph_webhook, webhook, api_server) still live in
gateway/platforms/.

- adding-platform-adapters.md: new-adapter creation path + reference-impl table
- gateway-internals.md: rewrite the adapter tree to reflect the actual split
- zh-Hans mirrors of both kept in parity
- scripts/release.py: add TutkuEroglu to AUTHOR_MAP (CI gate)
This commit is contained in:
Hermes Agent 2026-06-21 19:04:22 -07:00 committed by Teknium
parent 0768ed3b33
commit 4c1934dd87
5 changed files with 51 additions and 40 deletions

View file

@ -45,6 +45,7 @@ ACP_REGISTRY_MANIFEST = REPO_ROOT / "acp_registry" / "agent.json"
# Auto-extracted from noreply emails + manual overrides
AUTHOR_MAP = {
"rrandqua@gmail.com": "TutkuEroglu", # PR #50481 salvage (AGENTS.md stale token-lock adapter path)
"pedro.m.simoes@gmail.com": "pmos69", # PR #29474 salvage (native Antigravity OAuth provider; Gemini CLI sunset #29294/#49701)
"mediratta01.pally@gmail.com": "orbisai0security", # PR #9560 salvage (session.py path-traversal guard, V-009)
"panghuer023@users.noreply.github.com": "panghuer023", # PR #37994 salvage (interrupt unblocks pending gateway approval; #8697)

View file

@ -476,7 +476,7 @@ class Platform(str, Enum):
### 2. Adapter File
Create `gateway/platforms/newplat.py`:
Create `plugins/platforms/newplat/adapter.py`:
```python
from gateway.config import Platform, PlatformConfig
@ -689,4 +689,4 @@ async def disconnect(self):
| `bluebubbles.py` | REST + webhook | Medium | Simple REST API integration |
| `weixin.py` | Long-poll + CDN | High | Media handling, encryption |
| `wecom_callback.py` | Callback/webhook | Medium | HTTP server, AES crypto, multi-app |
| `telegram.py` | Long-poll + Bot API | High | Full-featured adapter with groups, threads |
| `plugins/platforms/irc/adapter.py` | Long-poll + IRC protocol | High | Full-featured plugin adapter with scoped token lock |

View file

@ -143,32 +143,37 @@ Unlike the CLI (which uses `load_cli_config()` with hardcoded defaults), the gat
## Platform Adapters
Each messaging platform has an adapter in `gateway/platforms/`:
Most messaging platforms ship as plugin adapters under `plugins/platforms/<name>/adapter.py`; a few legacy adapters still live directly in `gateway/platforms/`. All extend `BasePlatformAdapter` from `gateway/platforms/base.py`:
```text
gateway/platforms/
├── base.py # BaseAdapter — shared logic for all platforms
├── telegram.py # Telegram Bot API (long polling or webhook)
├── discord.py # Discord bot via discord.py
├── slack.py # Slack Socket Mode
├── whatsapp.py # WhatsApp Business Cloud API
plugins/platforms/ # plugin-packaged adapters (one dir each)
├── telegram/adapter.py # Telegram Bot API (long polling or webhook)
├── discord/adapter.py # Discord bot via discord.py
├── slack/adapter.py # Slack Socket Mode
├── whatsapp/adapter.py # WhatsApp Business Cloud API
├── matrix/adapter.py # Matrix via mautrix (optional E2EE)
├── mattermost/adapter.py # Mattermost WebSocket API
├── email/adapter.py # Email via IMAP/SMTP
├── sms/adapter.py # SMS via Twilio
├── dingtalk/adapter.py # DingTalk WebSocket
├── feishu/adapter.py # Feishu/Lark WebSocket or webhook
├── wecom/adapter.py # WeCom (WeChat Work) callback
├── line/adapter.py # LINE Messaging API
├── teams/adapter.py # Microsoft Teams
├── irc/adapter.py # IRC (canonical scoped-lock example)
├── homeassistant/adapter.py # Home Assistant conversation integration
└── … # google_chat, ntfy, photon, raft, simplex, …
gateway/platforms/ # core base + legacy direct adapters
├── base.py # BasePlatformAdapter — shared logic for all platforms
├── signal.py # Signal via signal-cli REST API
├── matrix.py # Matrix via mautrix (optional E2EE)
├── mattermost.py # Mattermost WebSocket API
├── email.py # Email via IMAP/SMTP
├── sms.py # SMS via Twilio
├── dingtalk.py # DingTalk WebSocket
├── feishu.py # Feishu/Lark WebSocket or webhook
├── wecom.py # WeCom (WeChat Work) callback
├── weixin.py # Weixin (personal WeChat) via iLink Bot API
├── bluebubbles.py # Apple iMessage via BlueBubbles macOS server
├── qqbot/ # QQ Bot (Tencent QQ) via Official API v2 (sub-package: adapter.py, crypto.py, keyboards.py, …)
├── qqbot/ # QQ Bot (Tencent QQ) via Official API v2 (sub-package)
├── yuanbao.py # Yuanbao (Tencent) DM/group adapter
├── feishu_comment.py # Feishu document/drive comment-reply handler
├── msgraph_webhook.py # Microsoft Graph change-notification webhook (Teams, Outlook, etc.)
├── webhook.py # Inbound/outbound webhook adapter
├── api_server.py # REST API server adapter
└── homeassistant.py # Home Assistant conversation integration
└── api_server.py # REST API server adapter
```
Experimental connector-backed platforms use the generic relay adapter in `gateway/relay/` instead of a direct platform module. When `GATEWAY_RELAY_URL` or `gateway.relay_url` is configured, the gateway registers the `relay` platform, dials the connector over an outbound WebSocket, and receives `descriptor`, `inbound`, and `interrupt_inbound` frames on that same socket. The connector advertises a `CapabilityDescriptor`; Hermes can send normal outbound replies, token-less `follow_up` operations, and interrupt frames back through the relay. The source-grounded wire contract lives in [`docs/relay-connector-contract.md`](https://github.com/NousResearch/hermes-agent/blob/main/docs/relay-connector-contract.md).

View file

@ -472,7 +472,7 @@ class Platform(str, Enum):
### 2. 适配器文件
创建 `gateway/platforms/newplat.py`
创建 `plugins/platforms/newplat/adapter.py`
```python
from gateway.config import Platform, PlatformConfig
@ -685,4 +685,4 @@ async def disconnect(self):
| `bluebubbles.py` | REST + webhook | 中 | 简单 REST API 集成 |
| `weixin.py` | 长轮询 + CDN | 高 | 媒体处理、加密 |
| `wecom_callback.py` | 回调/webhook | 中 | HTTP 服务器、AES 加密、多应用 |
| `telegram.py` | 长轮询 + Bot API | 高 | 支持群组、线程的全功能适配器 |
| `plugins/platforms/irc/adapter.py` | 长轮询 + IRC 协议 | 高 | 带作用域令牌锁的全功能插件适配器 |

View file

@ -143,32 +143,37 @@ Gateway 从多个来源读取配置:
## 平台适配器
每个消息平台在 `gateway/platforms/` 下均有对应适配器
大多数消息平台以插件适配器形式位于 `plugins/platforms/<name>/adapter.py`;少数旧适配器仍直接位于 `gateway/platforms/`。它们都继承 `gateway/platforms/base.py` 中的 `BasePlatformAdapter`
```text
gateway/platforms/
├── base.py # BaseAdapter — 所有平台的共享逻辑
├── telegram.py # Telegram Bot API长轮询或 webhook
├── discord.py # Discord bot通过 discord.py
├── slack.py # Slack Socket Mode
├── whatsapp.py # WhatsApp Business Cloud API
plugins/platforms/ # 插件打包的适配器(每个一个目录)
├── telegram/adapter.py # Telegram Bot API长轮询或 webhook
├── discord/adapter.py # Discord bot通过 discord.py
├── slack/adapter.py # Slack Socket Mode
├── whatsapp/adapter.py # WhatsApp Business Cloud API
├── matrix/adapter.py # Matrix通过 mautrix可选 E2EE
├── mattermost/adapter.py # Mattermost WebSocket API
├── email/adapter.py # 电子邮件(通过 IMAP/SMTP
├── sms/adapter.py # 短信(通过 Twilio
├── dingtalk/adapter.py # 钉钉 WebSocket
├── feishu/adapter.py # 飞书/Lark WebSocket 或 webhook
├── wecom/adapter.py # 企业微信WeCom回调
├── line/adapter.py # LINE Messaging API
├── teams/adapter.py # Microsoft Teams
├── irc/adapter.py # IRC作用域锁的标准示例
├── homeassistant/adapter.py # Home Assistant 对话集成
└── … # google_chat、ntfy、photon、raft、simplex 等
gateway/platforms/ # 核心 base 与旧的直接适配器
├── base.py # BasePlatformAdapter — 所有平台的共享逻辑
├── signal.py # Signal通过 signal-cli REST API
├── matrix.py # Matrix通过 mautrix可选 E2EE
├── mattermost.py # Mattermost WebSocket API
├── email.py # 电子邮件(通过 IMAP/SMTP
├── sms.py # 短信(通过 Twilio
├── dingtalk.py # 钉钉 WebSocket
├── feishu.py # 飞书/Lark WebSocket 或 webhook
├── wecom.py # 企业微信WeCom回调
├── weixin.py # 微信(个人版,通过 iLink Bot API
├── bluebubbles.py # Apple iMessage通过 BlueBubbles macOS 服务端)
├── qqbot/ # QQ Bot腾讯 QQ通过官方 API v2子包adapter.py、crypto.py、keyboards.py 等)
├── qqbot/ # QQ Bot腾讯 QQ通过官方 API v2子包
├── yuanbao.py # 元宝(腾讯)私信/群组适配器
├── feishu_comment.py # 飞书文档/云盘评论回复处理器
├── msgraph_webhook.py # Microsoft Graph 变更通知 webhookTeams、Outlook 等)
├── webhook.py # 入站/出站 webhook 适配器
├── api_server.py # REST API 服务器适配器
└── homeassistant.py # Home Assistant 对话集成
└── api_server.py # REST API 服务器适配器
```
适配器实现统一接口: