feat: 添加MinIO文件系统支持并优化外部连接器功能

- 添加MinIO用户文件系统配置选项(BEAVER_MINIO_ROOT_USER等)
- 更新外部连接器配置结构,包括BASE_URL和认证令牌设置
- 改进connector provider支持更多类型(official, feishu_bot等)
- 实现Mistral模型推理模式支持reasoning_effort参数
- 增强外部连接器策略配置和运行时配置管理
- 添加connector bridge事件验证和安全保护机制
- 优化任务路由逻辑,区分simple_chat和new_task场景
- 更新初始技能工具提示配置,分离authoring admin功能
This commit is contained in:
2026-06-05 11:46:40 +08:00
parent 236ac19789
commit 2c5205b06e
120 changed files with 8321 additions and 1865 deletions

View File

@ -45,6 +45,7 @@ class WeixinIlinkProvider:
self.start_receivers = start_receivers
self._receiver_stops: dict[str, threading.Event] = {}
self._receiver_lock = threading.Lock()
self._start_existing_connected_receivers()
def connectors(self) -> list[dict[str, Any]]:
return [
@ -303,13 +304,45 @@ class WeixinIlinkProvider:
self._receiver_stops[session.connection_id] = stop
thread = threading.Thread(target=self._receiver_loop, args=(session.connection_id, stop), daemon=True)
thread.start()
print(
json.dumps(
{
"event": "weixin_receiver_started",
"connectionId": session.connection_id,
"channelId": session.channel_id,
},
ensure_ascii=False,
),
flush=True,
)
return None
def _start_existing_connected_receivers(self) -> None:
if not self.start_receivers:
return None
for session in self.store.list_sessions():
if session.kind != "weixin" or session.status != "connected":
continue
if _has_connection_material(session):
self._ensure_receiver(session)
return None
def _receiver_loop(self, connection_id: str, stop: threading.Event) -> None:
while not stop.is_set():
try:
self.poll_once(connection_id)
except Exception:
except Exception as exc:
print(
json.dumps(
{
"event": "weixin_receiver_error",
"connectionId": connection_id,
"error": str(exc)[:300],
},
ensure_ascii=False,
),
flush=True,
)
time.sleep(5)
stop.wait(1)