重构: tool_registry拆分及多批改进

This commit is contained in:
2026-06-19 00:10:14 +08:00
parent a2871a66e0
commit 60b01d03ee
33 changed files with 703 additions and 247 deletions

View File

@@ -10,6 +10,5 @@ serde_json = { workspace = true }
tokio = { workspace = true }
async-trait = { workspace = true }
futures = "0.3"
thiserror = { workspace = true }
anyhow = { workspace = true }
tracing = { workspace = true }

View File

@@ -1,7 +1,6 @@
//! 事件总线 — 基于 tokio::sync::broadcast 的发布/订阅
use tokio::sync::broadcast;
use tokio::sync::broadcast::error::SendError;
use df_types::events::WorkflowEvent;
/// 事件总线
@@ -39,11 +38,6 @@ impl EventBus {
pub fn subscribe(&self) -> EventSubscriber {
self.sender.subscribe()
}
/// 发送人工审批请求
pub fn emit_human_approval_request(&self, event: WorkflowEvent) -> Result<usize, SendError<WorkflowEvent>> {
self.sender.send(event)
}
}
impl Default for EventBus {