feat(goals): 目标设定 agent 提取并登记测试资产范围
- DecomposeGoals 新增 as/taskID 参数,有效时复用 add_task_scope 工具挂入本次调用 - 追加 code-owned tail(仅工具挂上时):从目标/描述提取明确的 root_domain/subdomain/ip/cidr 并登记为 task_scope;只登记明确写出的、 拿不准选更精确的;不处理 company(任务刚建公司通常未入库、名字解析不上, 留给 plan 阶段) - MaxTurns 4→6;server createGoals 传入 AssetStore + 数字 taskID Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
c396674d2b
commit
e841bc9332
2 files changed
+42
-5
No files matched your search
+7
-1
@@ -3,6 +3,7 @@ package server
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/Autumn-27/artex/agent"
|
||||
@@ -28,7 +29,12 @@ func (s *Server) createGoals(ctx context.Context, t *Task, emit func(db.Activity
|
||||
// splitter (which shredded URLs / made meaningless 2-way splits).
|
||||
var specs []goalSpec
|
||||
if cfg, ok := s.goalsLLMConfig(t); ok {
|
||||
for _, g := range agent.DecomposeGoals(ctx, cfg, t.Goal, t.Description, emit) {
|
||||
var as *db.AssetStore
|
||||
if s.m != nil {
|
||||
as = s.m.Assets()
|
||||
}
|
||||
taskID, _ := strconv.ParseInt(t.ID, 10, 64)
|
||||
for _, g := range agent.DecomposeGoals(ctx, cfg, t.Goal, t.Description, as, taskID, emit) {
|
||||
if strings.TrimSpace(g.Text) != "" {
|
||||
specs = append(specs, goalSpec{Text: g.Text, VulnClass: g.VulnClass})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user