feat: goal_met 默认不绑任何 agent + 去掉 planner 相关提示词
- goal_met 绕过逐个 prove_goal 直接宣布整个任务完成,权重大、有误判风险,又与 「prove_goal 标记最后一个目标→自动收官」重复,故默认不给任何 agent(仍入目录、 web 可见、可手动按需绑)。 - toolcatalog 新增 defaultUnbound 集合:goal_met seed 时绑定强制为空 [](保留在 PlannerTools base 里,手动绑回后运行时仍可用)。 - db 新增 RemoveAgentFromTool(agentKey,toolKey);server 新增一次性迁移 unbindGoalMetDefault(flag goal_met_unbind_default_v1)剥掉旧库 goal_met 的 planner 绑定,只剥 planner、不动用户手动加的其它绑定,flag 守卫故重启不重复。 - planner 提示词去掉两处 goal_met 引导(system 模板 + 每轮 input 结尾),保留 prove_goal 与自动收官说明。任务收官不受影响(prove_goal 自动置 GoalMet)。
This commit is contained in:
1 parent
8e03043548
commit
bf2410baee
4 files changed
+44
-5
No files matched your search
@@ -397,6 +397,7 @@ func (s *Server) seedOrchestrationTools() {
|
||||
s.seedAutoDefaultBindings()
|
||||
s.seedPlannerDefaultBindings()
|
||||
s.seedAutoReportFindingBinding()
|
||||
s.unbindGoalMetDefault()
|
||||
// 注:pentest 的默认工具绑定无需迁移——BuiltinToolSeeds 在全新初始化时就把
|
||||
// list_assets/insert_assets/report_finding/list_findings/list_companies 连同
|
||||
// pentest 一起 seed 好了(项目尚无旧库,不做迁移)。
|
||||
@@ -434,6 +435,23 @@ func (s *Server) refreshBuiltinToolSchemas() {
|
||||
log.Printf("[tools] 已刷新 orchestration/platform 工具 schema 到代码默认(一次性)")
|
||||
}
|
||||
|
||||
// unbindGoalMetDefault removes goal_met's default "planner" binding ONCE (guarded by
|
||||
// a settings flag), so existing DBs match the new default of NO agent. goal_met bypasses
|
||||
// per-goal prove_goal to declare the whole task done — powerful/risky and redundant with
|
||||
// the prove_goal→auto-complete path — so it ships unbound; users can re-bind it per agent
|
||||
// in the UI. A user's own binding to another agent is untouched (we only strip planner).
|
||||
func (s *Server) unbindGoalMetDefault() {
|
||||
const flag = "goal_met_unbind_default_v1"
|
||||
if v, _, _ := s.m.pg.GetSetting(flag); v == "true" {
|
||||
return
|
||||
}
|
||||
if err := s.m.pg.RemoveAgentFromTool("planner", "goal_met"); err != nil {
|
||||
log.Printf("[tools] goal_met 解绑 planner 失败: %v", err)
|
||||
return
|
||||
}
|
||||
_ = s.m.pg.SetSetting(flag, "true")
|
||||
}
|
||||
|
||||
// seedAutoReportFindingBinding adds "auto" to report_finding's binding ONCE so
|
||||
// conversation-context agents can call it without requiring an intent_id.
|
||||
func (s *Server) seedAutoReportFindingBinding() {
|
||||
|
||||
Reference in new issue
Block a user