ForcePilot/backend/package/yuxi/channel/domain/__init__.py
Kris 9a8a27bf36 feat(channel): 新增渠道网关模块完整实现
本次提交新增了完整的多渠道消息网关系统,包括:
1. 支持飞书、钉钉、Web、Hook 四种渠道的适配器与配置
2. 领域模型层:消息、会话、绑定、出箱等核心实体
3. 应用服务层:管道、中间件、DTO 与业务逻辑
4. 基础设施层:持久化、过滤器、队列等端口实现
5. 接口层:REST API、SSE、WebSocket 通信端点
6. 前端页面与路由配置,添加渠道管理菜单
7. 新增相关依赖包与 docker-compose 部署配置
2026-05-30 21:53:09 +08:00

69 lines
3.1 KiB
Python

_LAZY_IMPORTS = {
"AgentError": "yuxi.channel.domain.event",
"MessageBlocked": "yuxi.channel.domain.event",
"MessageReceived": "yuxi.channel.domain.event",
"MessageReplied": "yuxi.channel.domain.event",
"ABORT_CODE_TO_HTTP": "yuxi.channel.domain.exception",
"AgentCrashError": "yuxi.channel.domain.exception",
"ChannelError": "yuxi.channel.domain.exception",
"RecoverableError": "yuxi.channel.domain.exception",
"UnrecoverableError": "yuxi.channel.domain.exception",
"CallNext": "yuxi.channel.domain.middleware",
"Configurable": "yuxi.channel.domain.middleware",
"Middleware": "yuxi.channel.domain.middleware",
"Attachment": "yuxi.channel.domain.model",
"ChannelBinding": "yuxi.channel.domain.model",
"ChannelCapabilities": "yuxi.channel.domain.model",
"ChannelSession": "yuxi.channel.domain.model",
"ChannelType": "yuxi.channel.domain.model",
"DispatchResult": "yuxi.channel.domain.model",
"MessagePriority": "yuxi.channel.domain.model",
"MessageType": "yuxi.channel.domain.model",
"OutboxEntry": "yuxi.channel.domain.model",
"Peer": "yuxi.channel.domain.model",
"SendResult": "yuxi.channel.domain.model",
"StreamChatRequest": "yuxi.channel.domain.model",
"UnifiedMessage": "yuxi.channel.domain.model",
"AgentPort": "yuxi.channel.domain.port",
"BotLoopGuardPort": "yuxi.channel.domain.port",
"KeywordMatcherPort": "yuxi.channel.domain.port",
"CachePort": "yuxi.channel.domain.port",
"ChannelAdapterPort": "yuxi.channel.domain.port",
"ChannelRouteContributor": "yuxi.channel.domain.port",
"CircuitBreakerPort": "yuxi.channel.domain.port",
"ConfigReloadPort": "yuxi.channel.domain.port",
"ContentFilterPort": "yuxi.channel.domain.port",
"DomainEvent": "yuxi.channel.domain.port",
"EventPublisherPort": "yuxi.channel.domain.port",
"FilterResult": "yuxi.channel.domain.port",
"MetricsPort": "yuxi.channel.domain.port",
"QueuePort": "yuxi.channel.domain.port",
"RateLimitPort": "yuxi.channel.domain.port",
"SignatureVerifyPort": "yuxi.channel.domain.port",
"SsePushPort": "yuxi.channel.domain.port",
"WsConnectionPort": "yuxi.channel.domain.port",
"BindingRepositoryPort": "yuxi.channel.domain.repository",
"ChannelMessageData": "yuxi.channel.domain.repository",
"MessageLogData": "yuxi.channel.domain.repository",
"MessageLogQuery": "yuxi.channel.domain.repository",
"MessageLogRepositoryPort": "yuxi.channel.domain.repository",
"MessageRepositoryPort": "yuxi.channel.domain.repository",
"OutboxRepositoryPort": "yuxi.channel.domain.repository",
"SessionRepositoryPort": "yuxi.channel.domain.repository",
"MessageContext": "yuxi.channel.domain.service",
"Span": "yuxi.channel.domain.service",
"Pipeline": "yuxi.channel.domain.service",
"PipelineBuilder": "yuxi.channel.domain.service",
}
def __getattr__(name: str):
if name in _LAZY_IMPORTS:
module = __import__(_LAZY_IMPORTS[name], fromlist=[name])
return getattr(module, name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
def __dir__():
return sorted(set(globals()) | set(_LAZY_IMPORTS.keys()))