新增Slack适配器全套核心模块,包括消息处理流水线、会话管理、配置适配、权限控制等完整功能: 1. 新增语音、视觉相关的TTS和图像分析导出接口 2. 实现消息预处理、路由、线程上下文处理的完整流水线 3. 新增账号管理、缓存机制、房间上下文提取功能 4. 支持Webhook和Socket Mode两种事件接收方式 5. 实现权限白名单、审批配对、自动状态管理功能 6. 新增配置迁移、作用域校验、重连策略等辅助模块
39 lines
903 B
Python
39 lines
903 B
Python
from __future__ import annotations
|
|
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
|
|
class ResolvedSlackAccount(BaseModel):
|
|
account_id: str = "default"
|
|
enabled: bool = True
|
|
name: str = ""
|
|
|
|
bot_token: str = ""
|
|
app_token: str = ""
|
|
user_token: str = ""
|
|
|
|
bot_token_source: str = "none"
|
|
app_token_source: str = "none"
|
|
user_token_source: str = "none"
|
|
|
|
bot_user_id: str = ""
|
|
bot_id: str = ""
|
|
team: str = ""
|
|
team_id: str = ""
|
|
|
|
dm_policy: str = "allowlist"
|
|
group_policy: str = "allowlist"
|
|
require_mention: bool = False
|
|
allow_from: set[str] = set()
|
|
|
|
mode: str = "socket"
|
|
signing_secret: str = ""
|
|
|
|
text_chunk_limit: int = 8000
|
|
max_media_size_mb: int = 100
|
|
thread_history_scope: str = "channel"
|
|
thread_inherit_parent: bool = False
|
|
thread_require_explicit_mention: bool = False
|
|
|
|
model_config = ConfigDict(extra="allow")
|