d7f0c45164
新增业务中立的 function-calling harness 与公共提示词协议 统一画布 Agent 工具路由约束和待确认控制语义 保留失败前输出并事务化收口 memory、deadline 与取消状态 迁移画布 Agent 和 API 编排并同步架构文档与项目记忆
15 lines
435 B
Rust
15 lines
435 B
Rust
use crate::run::{TextFlow, ToolCallFlow};
|
|
use crate::tool::ToolCall;
|
|
|
|
pub trait Hook: Send + Sync {
|
|
fn on_text_reply(&self, _text: &str) -> TextFlow {
|
|
TextFlow::Continue
|
|
}
|
|
fn before_tool_call(&self, _tool_call: &ToolCall) -> ToolCallFlow {
|
|
ToolCallFlow::Continue
|
|
}
|
|
fn after_tool_call(&self, _tool_name: &str, _output: &mut serde_json::Value) -> ToolCallFlow {
|
|
ToolCallFlow::Continue
|
|
}
|
|
}
|