mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-09-27 19:51:45 +02:00
feat: exempt get_project_fact from HITL approval (#239)
This commit is contained in:
+1
-1
@@ -138,7 +138,7 @@ hitl:
|
|||||||
# 已决策审计日志保留天数(与 MCP 监控一致;省略默认 90;0 表示不自动清理)
|
# 已决策审计日志保留天数(与 MCP 监控一致;省略默认 90;0 表示不自动清理)
|
||||||
retention_days: 90
|
retention_days: 90
|
||||||
# 按你环境里的真实工具名增删(与侧栏一致、小写不敏感);不需要全局免审批可改为 []
|
# 按你环境里的真实工具名增删(与侧栏一致、小写不敏感);不需要全局免审批可改为 []
|
||||||
tool_whitelist: [read_file, list_dir, glob, grep, tool_search, upsert_project_fact]
|
tool_whitelist: [read_file, list_dir, glob, grep, tool_search, upsert_project_fact, get_project_fact]
|
||||||
# audit_agent_prompt: | # 审批模式;留空使用内置默认,可在「人机协同」页编辑
|
# audit_agent_prompt: | # 审批模式;留空使用内置默认,可在「人机协同」页编辑
|
||||||
# audit_agent_prompt_review_edit: | # 审查编辑模式;留空使用内置默认
|
# audit_agent_prompt_review_edit: | # 审查编辑模式;留空使用内置默认
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ var HitlExemptMetaTools = []string{
|
|||||||
"TaskUpdate",
|
"TaskUpdate",
|
||||||
"TaskList",
|
"TaskList",
|
||||||
"upsert_project_fact",
|
"upsert_project_fact",
|
||||||
|
"get_project_fact",
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsToolSearchTool reports whether name is the Eino dynamictool tool_search meta-tool.
|
// IsToolSearchTool reports whether name is the Eino dynamictool tool_search meta-tool.
|
||||||
|
|||||||
@@ -45,14 +45,19 @@ func TestMergeHitlExemptMetaTools_includesToolSearch(t *testing.T) {
|
|||||||
if !found {
|
if !found {
|
||||||
t.Fatalf("tool_search missing from %v", merged)
|
t.Fatalf("tool_search missing from %v", merged)
|
||||||
}
|
}
|
||||||
foundProjectFact := false
|
foundProjectFactTools := map[string]bool{
|
||||||
|
"upsert_project_fact": false,
|
||||||
|
"get_project_fact": false,
|
||||||
|
}
|
||||||
for _, name := range merged {
|
for _, name := range merged {
|
||||||
if strings.EqualFold(strings.TrimSpace(name), "upsert_project_fact") {
|
normalized := strings.ToLower(strings.TrimSpace(name))
|
||||||
foundProjectFact = true
|
if _, ok := foundProjectFactTools[normalized]; ok {
|
||||||
break
|
foundProjectFactTools[normalized] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !foundProjectFact {
|
for name, found := range foundProjectFactTools {
|
||||||
t.Fatalf("upsert_project_fact missing from %v", merged)
|
if !found {
|
||||||
|
t.Fatalf("%s missing from %v", name, merged)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user