You've already forked agentic-coding-workflow
ACP / MCP 完善
This commit is contained in:
@@ -332,13 +332,14 @@ func extractToolName(toolCall json.RawMessage) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// allowlistHit 判断工具是否在白名单内。含 "*" 表示全部放行;toolName 为空时不放行。
|
||||
// allowlistHit 判断工具是否在白名单内。含 "*" 表示放行全部可识别的工具;
|
||||
// toolName 为空(无法识别的 tool call)时一律不放行,保守走人工审批。
|
||||
func allowlistHit(allowlist []string, toolName string) bool {
|
||||
if toolName == "" {
|
||||
return false
|
||||
}
|
||||
for _, a := range allowlist {
|
||||
if a == "*" {
|
||||
return true
|
||||
}
|
||||
if toolName != "" && a == toolName {
|
||||
if a == "*" || a == toolName {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user