refactor(crates): kernel/generation module split + DeerFlow optimizations + middleware + dead code cleanup
- Split zclaw-kernel/kernel.rs (1486 lines) into 9 domain modules - Split zclaw-kernel/generation.rs (1080 lines) into 3 modules - Add DeerFlow-inspired middleware: DanglingTool, SubagentLimit, ToolError, ToolOutputGuard - Add PromptBuilder for structured system prompt assembly - Add FactStore (zclaw-memory) for persistent fact extraction - Add task builtin tool for agent task management - Driver improvements: Anthropic/OpenAI extended thinking, Gemini safety settings - Replace let _ = with proper log::warn! across SaaS handlers - Remove unused dependency (url) from zclaw-hands
This commit is contained in:
@@ -41,7 +41,7 @@ impl AgentMiddleware for LoopGuardMiddleware {
|
||||
match result {
|
||||
LoopGuardResult::CircuitBreaker => {
|
||||
tracing::warn!("[LoopGuardMiddleware] Circuit breaker triggered by tool '{}'", tool_name);
|
||||
Ok(ToolCallDecision::Block("检测到工具调用循环,已自动终止".to_string()))
|
||||
Ok(ToolCallDecision::AbortLoop("检测到工具调用循环,已自动终止".to_string()))
|
||||
}
|
||||
LoopGuardResult::Blocked => {
|
||||
tracing::warn!("[LoopGuardMiddleware] Tool '{}' blocked", tool_name);
|
||||
|
||||
Reference in New Issue
Block a user