| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- """
- 飞书渠道(Gateway Python 包)
- **Python 模块**
- - ``types``:规范化入站事件 ``IncomingFeishuEvent``、回复上下文 ``FeishuReplyContext``
- - ``connector``:请求飞书 HTTP 适配层(通常即本目录旁的 Node 服务)
- - ``identity``:``open_id`` 等 → 渠道 ``user_id``
- - ``protocols``:收窄的 ``FeishuExecutorBackend`` / ``FeishuUserIdentityResolver``
- - ``router``:``FeishuMessageRouter``(Trace 会话准备 → 调执行器 → 绑定 Agent ``trace_id``)
- - ``bridge``:``FeishuHttpRunApiExecutor``(Agent Trace HTTP 建链/续跑、WS 跟单、assistant 回推飞书)
- - ``manager``:``FeishuChannelManager`` 组装 Connector / Lifecycle / bridge / router
- - ``api``:FastAPI 挂载 ``/api/channels/feishu/...``
- **同目录非 Python 包(勿当模块 import)**
- - ``openclaw-lark/``:git 子模块,飞书适配上游;Docker 见 ``docker/Dockerfile.feishu``
- - ``openclaw-lark-patch/``:构建时覆盖补丁;compose 可挂 ``config.yml`` 等
- 类名 ``FeishuHttpRunApiExecutor`` 保留历史含义(调用 Agent Trace HTTP);实现位于 ``bridge``。
- """
- from gateway.core.channels.feishu.bridge import FeishuHttpRunApiExecutor
- from gateway.core.channels.feishu.api import FeishuChannelApi
- from gateway.core.channels.feishu.connector import FeishuConnector, TYPING_REACTION_EMOJI
- from gateway.core.channels.feishu.identity import DefaultUserIdentityResolver
- from gateway.core.channels.feishu.manager import FeishuChannelConfig, FeishuChannelManager
- from gateway.core.channels.feishu.protocols import FeishuExecutorBackend, FeishuUserIdentityResolver
- from gateway.core.channels.feishu.router import FeishuMessageRouter
- from gateway.core.channels.feishu.types import (
- FeishuReplyContext,
- IncomingFeishuEvent,
- feishu_event_to_mapping,
- mapping_to_feishu_event,
- )
- __all__ = [
- "FeishuChannelApi",
- "FeishuHttpRunApiExecutor",
- "DefaultUserIdentityResolver",
- "FeishuChannelConfig",
- "FeishuChannelManager",
- "FeishuConnector",
- "TYPING_REACTION_EMOJI",
- "FeishuExecutorBackend",
- "FeishuMessageRouter",
- "FeishuReplyContext",
- "FeishuUserIdentityResolver",
- "IncomingFeishuEvent",
- "feishu_event_to_mapping",
- "mapping_to_feishu_event",
- ]
|