feat(agent): 主 agent 默认工具集增加 report_finding/record_fact

- MainAgentTools 加入 addFinding/recordFact,主 agent 确证漏洞或事实时可直接登记
- report_finding 描述前置[重要]标注,强化调用约束
- gofmt 对齐 tools_insert 参数缩进与 import 顺序

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Autumn-27andClaude Opus 5 committed 2026-08-07 10:04:21 -04:00
1 parent 3c8a9f74f8
commit 349b0d104d
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -575,7 +575,7 @@ func (t *ToolSet) goalMet() actool.CoreTool {
// --- worker write tools --- // --- worker write tools ---
func (t *ToolSet) addFinding() actool.CoreTool { func (t *ToolSet) addFinding() actool.CoreTool {
return writeTool("report_finding", "发现漏洞时必须调用该工具!记录一个确认的漏洞发现。在任务上下文中 intent_id 必填(当前正在执行的意图 id);在会话上下文中 intent_id 可不填。", return writeTool("report_finding", "[重要]发现漏洞时必须调用该工具进行记录!记录一个确认的漏洞发现。在任务上下文中 intent_id 必填(当前正在执行的意图 id);在会话上下文中 intent_id 可不填。",
obj(map[string]any{ obj(map[string]any{
"vulnclass": str("漏洞类"), "vulnclass": str("漏洞类"),
"severity": str("high|medium|low"), "severity": str("high|medium|low"),
+2 -1
View File
@@ -5,8 +5,8 @@ import (
"encoding/json" "encoding/json"
"strings" "strings"
actool "github.com/Autumn-27/norma/tool"
"github.com/Autumn-27/artex/db" "github.com/Autumn-27/artex/db"
actool "github.com/Autumn-27/norma/tool"
) )
// ===================================================================== // =====================================================================
@@ -489,6 +489,7 @@ func (t *ToolSet) MainAgentTools() []actool.CoreTool {
t.getWorkerOutput(), t.getWorkerTrace(), t.searchAllWorkerTraces(), t.addHint(), t.addIntent(), t.getWorkerOutput(), t.getWorkerTrace(), t.searchAllWorkerTraces(), t.addHint(), t.addIntent(),
// asset management (handlers guard nil store internally) // asset management (handlers guard nil store internally)
t.insertAssets(), t.addCompanyScope(), t.listAssets(), t.insertAssets(), t.addCompanyScope(), t.listAssets(),
t.addFinding(), t.recordFact(),
} }
} }