新增864 provider并打通server_key配置

- 新增 server_864 独立 provider 目录,接入登录、消息轮询、联系人、群资料、用户资料与朋友圈基础能力

- 扩展 gateway、robot 与配置归一化逻辑,支持 server_864/864 别名和 WECHAT_SERVER_KEY

- 更新配置示例与多版本适配路线图,明确 864 第一版接入范围和后续待补项
This commit is contained in:
liuwei
2026-05-07 11:24:33 +08:00
parent 86f8d57874
commit ff33edb0d1
18 changed files with 1174 additions and 7 deletions

View File

@@ -0,0 +1,38 @@
from wechat_ipad.provider_base import WechatProviderBase
from wechat_ipad.providers.server_864.base import Server864APIClientBase
from wechat_ipad.providers.server_864.friend_circle import FriendCircleMixin
from wechat_ipad.providers.server_864.friends import FriendMixin
from wechat_ipad.providers.server_864.group import ChatroomMixin
from wechat_ipad.providers.server_864.login import LoginMixin
from wechat_ipad.providers.server_864.message import MessageMixin
from wechat_ipad.providers.server_864.runtime import Server864RuntimeMixin
from wechat_ipad.providers.server_864.user import UserMixin
class Server864WechatClient(
LoginMixin,
MessageMixin,
FriendCircleMixin,
FriendMixin,
ChatroomMixin,
UserMixin,
Server864RuntimeMixin,
WechatProviderBase,
):
"""864 风格 server 的独立 provider。
说明:
1. 这里保持与 855 provider 类似的模块拆分方式,方便未来继续并行维护多个 server
2. 但内部实现完全独立,不在 855 provider 里堆 `if server_type == 864` 分支;
3. 第一版优先覆盖当前项目真实主链路与常用管理能力,后续再按需要补更多高级接口。
"""
provider_name = "server_864"
server_type = "server_864"
def __init__(self, ip: str, port: int, **kwargs):
"""初始化 864 provider。"""
server_key = str(kwargs.pop("server_key", "") or "").strip()
Server864APIClientBase.__init__(self, ip, port, server_key=server_key, **kwargs)
MessageMixin.__init__(self)
self._init_runtime_state()