ji ruo
ec4ef35fff
feat: 支持漏洞关联多条流量证据
2026-09-10 13:03:20 +08:00
Autumn-27
5327f88ebc
refactor(worker): 收敛 work agent 默认工具集与资产写回提示
...
work agent 只负责单条意图的执行与写回,读上下文/跨 work 复盘属规划职责:
- 从 WorkerTools() 移除 list_facts / node_detail / list_companies 及跨 work 检索
(search_all_worker_traces / list_worker_traces / get_worker_trace),只留
list_findings(报漏洞前查重) + add_finding/record_fact + insert_assets/list_assets。
- 旧库迁移 seedWorkerReadToolsUnbind(flag worker_readtools_unbind_v1):逐个
RemoveAgentFromTool 把上述工具从 worker 默认绑定剥离,planner/main 同名绑定不动。
- worker 提示词「查上下文」段收敛为 list_assets/list_findings;insert_assets 段删掉
与工具 schema 冲突的陈旧字段(type=tech/on_url/props/props.http),字段填法交回工具
自身说明,只留路由与边界。reseedWorkerPrompt 版本 bump v3→v4 下发旧库。
2026-09-09 13:59:47 -04:00
Autumn-27
7d4223c535
refactor(worker): record_fact 删否定结论段、confidence 与穷尽解耦、facts 分条收紧
...
worker 默认提示词的 record_fact 段易误导规划者:
- 删掉「否定类结论只写观察+试探性读法」整句,worker 不再被引导写“看不出/放弃”式判断
- confidence(observed/inferred) 与「是否穷尽本意图手段」解耦,回归“直接看到 vs 据现象推断”
- facts 数组分条收紧为「彼此完全独立、无法归并」的极少数例外,默认写一条并进 detail
reseedWorkerPrompt flag bump v2→v3,存量库再刷一次新默认。
2026-09-08 12:39:40 -04:00
Autumn-27
1dffe05728
refactor(prompts): 精简 planner/worker 正文并修正实战问题,reseed 推送存量库
...
- planner/worker 默认正文精简(合并重复复述,逻辑无损)
- planner: recent_done 按 state 区分处理(blocked/exhausted 先查 trace 再决定,
不当死路也不无脑重跑);否定结论改为“观察/存疑、非定论”、采信前看 evidence、
inferred 默认派复核意图且至多一次;目标未达成且无 open/running 意图必须产出(硬底线);
“克制”降级为仅去重;深度优先于覆盖度
- worker: 否定类结论只写“观察+试探性读法”、判决权归 planner;
跨意图线索写进 fact 的 summary 交规划者、不自己追
- terminalreason: 修正 blocked 描述(传输层故障、需查执行过程,非“此路不通”)
- reseed flag 均 bump 至 v2:存量旧库启动时把新默认追加为新版本并切过去,
旧版本/用户自定义保留在历史可回滚
2026-09-08 10:32:43 -04:00
Autumn-27
3d71196774
feat(tools): planner 默认绑定 list_assets
...
新库经 PlannerTools() 并入 list_assets 绑定;老库由
seedPlannerListAssetsBinding() 一次性回填(flag 幂等,不覆盖用户解绑)。
planner 现同时具备 list_assets(DSL 全库检索)与 list_untested_assets(范围内未测)。
2026-09-08 08:53:50 -04:00
Autumn-27
1e7fe8550e
feat(tools): add_company_scope 默认绑定由 worker 改为 planner
...
- WorkerTools 移除 add_company_scope,PlannerTools 新增
- 新库 seed 默认绑定变为 mainagent/planner/auto
- 老库加一次性迁移 seedCompanyScopeRebind:加 planner、去 worker
2026-09-07 11:35:07 -04:00
Autumn-27
21656cc2e3
fix: restore changes dropped by the upstream sync merge
...
The manual v0.3.6 sync (22132a4 ) was incomplete, and the follow-up merge
(d803ae2 ) resolved conflicts in favour of that copy, silently reverting three
shipped changes. main is already an ancestor of this branch, so re-merging
cannot bring them back; restore them explicitly.
- schema.sql: re-add the idempotent llm_profiles_format_check migration.
CREATE TABLE IF NOT EXISTS leaves an existing table alone, so databases
created before openai-responses kept the old two-value CHECK and rejected
every openai-responses profile.
- orchestration.go: re-add the reseedPlannerPrompt/reseedWorkerPrompt calls,
dropped by a comment-alignment hunk while the functions stayed behind as
dead code. Without them existing installs never receive the quantified
acceptance check or the negative-conclusion evidence threshold.
- CHANGELOG.md: restore the 0.3.6 entries, the @neouks credit and the correct
norma version range.
Also close three recovery gaps in the new cold-archive path:
- traffic: write the staging journal even when no legacy host directory
exists. Modern installs keep traffic in SQLite only, so a crash between the
PostgreSQL commit and the SQLite commit left the archived task's exclusive
traffic in the hot store with nothing for recovery to act on.
- recoverTaskArchiveStages: treat a missing journal.json as a discardable
directory instead of an error, which used to set recoveryFailed and stop the
archive worker from starting for the rest of the process lifetime.
- stageTaskArchiveFiles: replay the journal's renames when resuming an
existing staging root. The journal is written before the first rename, so
its presence did not guarantee a complete payload, and a resumed round could
package an archive missing transcripts or workspace files.
2026-08-29 01:37:46 -04:00
pphua
d803ae2b11
merge: sync official main into PR branch
2026-08-28 14:14:41 +08:00
pphua
22132a4d21
chore: sync upstream v0.3.6 changes
2026-08-28 14:03:07 +08:00
Autumn-27
10f6a4fbc7
feat(agent): list_facts 改为分页+关键词过滤,避免上下文膨胀
...
fact 多时旧的 list_facts 一次返回每任务至多 500 条且 summary 不截断,
一次调用就可能撑爆上下文。改为分页(默认 20,最新在前)+ q 关键词过滤,
返回 {facts, total, has_more, next_before},summary 超长按 rune 截断。
- db: listByKindPageFiltered/countByKindFiltered(payload->>'summary' ILIKE)
+ ListByKindPageWithSources 跨本任务/继承任务合并分页
- agent: list_facts 加 limit/before/q 参数,compactFact 截断 summary;
worker/planner 提示词同步说明分页语义
- server: 旧库一次性迁移把 list_facts 新 schema 刷进 tools 目录表
(SeedTool 首插入only,否则工具管理页显示「无参数」);flag bump 到 v7
2026-08-27 12:15:02 -04:00
Autumn-27
99ac96da2f
feat(agent): 优化 planner/worker 提示词并加量化验收核对
...
- planner 判目标新增「量化验收核对」:覆盖度/flag 数/权限等可量化目标
未达标时禁止 prove_goal,修复覆盖度要求 100%、实测 40% 却被判完成
- 重写 planner「0 意图」判定:仅在「方向已被现有意图覆盖」或「下一步
依赖在跑 work 的产出」两种情况才 0 意图,避免目标未达成时过早收手
- 强化 worker 否定结论证据门槛:未穷尽手段/证据弱一律标 inferred,
避免轻率的 observed 否定把整条路线焊死
- 加 reseedPlannerPrompt / reseedWorkerPrompt 一次性迁移,旧库追加新
默认版本并切换,旧版保留在历史可恢复
2026-08-25 12:19:04 -04:00
Autumn-27
01018a2161
feat(tasks): 目标完成后支持主 agent 直投意图执行(goalless)
...
所有目标达成后,主 agent 经 add_intent 下发的意图可被 worker 直接执行、跑完
即止;planner 在任务无 open 目标时不再运行,避免其重判目标达成而 cancelExec
杀掉直投意图;frontier 抽干后任务回到 done。
- db: 新增 HasOpenGoal 谓词(零迁移,读现有 goal 状态)
- engine: plannerLoop 加 goalless 门(无 open 目标则不进 planner,抽干则收尾)
- tools: add_intent 成功后调 resumeTask 复活任务(仅主 agent 生效,planner 为 nil)
- mainagent: 提示加入「目标达成后反问是否登记为正式目标」引导
- orchestration: reseedMainAgentPrompt 让旧库收到新提示(一次性,同构 reseedGoalsPrompt)
已知边角问题(paused/exhausted 意图的收官判据、零 goal 窗口、TOCTOU 等)
待后续讨论后再修。
2026-08-24 11:58:02 -04:00
Autumn-27
43edb86720
revert(tasks): 从 main 移除误并入 4cf36c7 的 goalless 直投意图改动
...
这几处 goalless(目标完成后主 agent 直投意图执行)改动被打包进了「任务列表
按 id 降序」提交(4cf36c7 ),与该提交主题无关,且尚在评审阶段不应留在 main。
此处仅做正向移除,不改写历史;功能改由独立分支 feat/goalless-intent-execution
承载,评审通过后再合入。
2026-08-24 11:57:28 -04:00
Autumn-27
412a993c25
feat(agent): get_worker_trace 的 step_ids 超限改为降级返回而非报错
...
原先 step_ids 超过 5 个直接报错,逼 Agent 重新组织调用、白跑一轮。改为优雅
降级:先去重、剔除非法 id,超出 5 个则返回前 5 步的完整内容,并在结果里用
returned_step_ids / omitted_step_ids / notice 告知本次取了哪些、还有哪些没取,
并提示「若已足够则无需再取剩余」。Agent 立刻拿到数据,是否再取由它自行判断。
保留数量上限的原因不变:detail 是完整原文、不截断,上限用于兜住单个 tool
result 的大小。get_task_worker_trace 经 delegateToTask 复用同一实现,一并生效;
两处工具描述同步更新。
验证: 新增 TestGetWorkerTraceStepIDsDegradeGracefully(含去重/非法 id/前5/
omitted/notice/在限内不加提示),连本地 PG 实跑通过;agent 全量无回归。
2026-08-24 11:35:49 -04:00
Autumn-27
4cf36c7896
fix(tasks): 任务列表改按 id 降序,消除同刻创建任务的抖动
...
原先按 created_at 降序排,但没有二级排序键。同一时刻创建的多个任务时间戳
相同,排序不稳定;叠加前端每 10 秒轮询、以及 Manager 用内存 map 存任务
(遍历顺序随机、每次 List 都要重排),这些任务就会在列表里频繁互换位置。
改用 id 降序:id 由 BIGSERIAL 单调递增分配,即插入顺序,唯一且稳定,最新
创建的在最前。db.ListTasks 的 ORDER BY 与 Manager.List 的内存排序同步改。
验证: 新增 TestListTasksOrderByIDDesc 连本地 PG 实跑通过;db/server 全量
无新增失败(仅剩既有的 TestCompanyScopeInvalid)。
2026-08-24 11:08:10 -04:00
Autumn-27
27c3248844
feat(constraints): 操作约束抽取→注入 planner/worker 提示→总览管理
...
- 新表 task_constraints(allow/deny),CREATE TABLE IF NOT EXISTS 无需迁移
- 新工具 set_constraints:目标拆解器 round-0 先抽约束再拆目标、主 agent 运行时可补;
拆解器提示词要求约束自包含(把「当前目标」等指代替换成具体域名/端口)
- constraintBlock 按最高优先级注入 planner+worker 系统提示;去偏:多样性/拓面显式服从约束
- 注入范围可配置(constraints_inject_planner/worker,默认都开,每轮读、即时生效)
- 总览「约束管理」卡片 + CRUD 接口(增删改不通知 planner,下轮规划自然读到)
- goals 提示词把抽约束步并入可编辑正文;旧库经 flag 守卫的一次性 reseed 追加新默认版本
2026-08-23 12:48:01 -04:00
Autumn-27
22ae280584
feat(insert_assets): 资产可标记是否与当前任务相关(related)
...
insert_assets 每条资产新增 related 入参(默认 true):仅在任务开启资产
覆盖度功能时生效——true 才自动纳入覆盖度(测试范围分母),false 则只入
共享资产库、不计入本任务覆盖度(如顺带发现的旁站/无关资产)。
- Call 内部按 related + coverageDisabled 双重 gate 决定是否 AddAutoScope
- 覆盖度关闭时 related 无意义,经 StripCoverageParams 从最终工具 schema
剔除(必须在 ToolResolve 的 DB schema 覆盖之后做,故在装配链末端处理)
- 旧库经 refreshBuiltinToolSchemas(flag v6) 刷新 insert_assets schema,
否则首插入only 的 seed 收不到新参数
- 补 StripCoverageParams 回归测试(开启保留/关闭隐藏/不改原始 schema)
Claude-Session: https://claude.ai/code/session_01Jm87Gr5fq5aso6SfLyguhx
2026-08-22 10:26:11 -04:00
pphua
d3183dbbd2
feat(tasks): add templates findings workflows and batch controls
2026-08-21 21:01:39 +08:00
pphua
9793b522d9
feat(tasks): add inherited context and resilient LLM execution
...
Add read-only task context inheritance, ordered task-level LLM failover, live Worker controls, cascading task cleanup, FIFO task concurrency, cancellation diagnostics, UI updates, tests, build script, and changelog.
2026-08-20 18:34:24 +08:00
Autumn-27
a6bd18050c
feat(agent): 诊断 run 取消/终止原因,取代笼统的中断提示
...
- 新增 AbortCause(cancelcause.go):各取消点用 WithCancelCause/WithTimeoutCause
附上原因(暂停/删除/kill_work/目标达成/drain 兜底/聊天停止/进程关闭/硬超时…),
captureRun 用 context.Cause 还原出到底是谁、为何取消。
- 新增 terminalreason.go:把终端状态转成可读的一行摘要 + 多行详情(取消原因、
终止 reason、轮数、卡住的工具),替换原来固定那句猜测式提示。
- engine/worker/planner/capture 及 conversations/orchestration/server 接入;
cmd/artex/main.go、前端 llm/main-content 相应调整。
- 配套测试 terminalreason_test.go / engine_cancelcause_test.go。
2026-08-19 09:20:10 -04:00
Autumn-27
87221be586
tweak: reporter 触发运行策略默认改为 parallel + merge=none
...
一漏洞一报告:多个 finding 并发各写各的,避免串行排队积压。
merge 设 none(而非默认 all)——否则一波 finding 会被合并成一次运行,并行失效;
maxParallel=5 限制同时的报告会话数。
2026-08-18 12:27:26 -04:00
Autumn-27
6cad678699
feat: 预置「报告撰写」自定义 agent,发现漏洞时自动写详细报告
...
- 新增 host 工具 update_finding_report(finding_id, report):按 node_id 写
findings.report(任务无关,无需 task 上下文);get_task_node_detail(task_id, id)
读取漏洞完整证据/PoC。均注册进 orchestrationTools。
- promptcatalog 新增 ReporterDefaultPrompt:详述报告应含的结构(概述/影响/
受影响范围/复现步骤/证据PoC/根因/修复建议)与只据实证撰写的纪律。
- seedReporterAgent(一次性,flag 守卫):预置 builtin=false 的自定义 agent
「报告撰写」(reporter),UI 可编辑/删除;绑定 update_finding_report + 任务
查询工具(node_detail/worker_trace/findings/graph);建 on_tool_call 触发器
(tool_names=[report_finding]) —— 每登记漏洞即唤起它写报告并回写。
- 移除上一提交里绑到 worker/planner/mainagent 的 in-task update_finding_report
工具及 ExplorationStore 包装(触发态是会话上下文,须用 host 工具);保留
db.SetFindingReportByNodeID;新增 ToolSet.NodeDetailTool 访问器。
go build / agent / server 测试通过。reporter 为自定义 agent,不影响内置 agent 计数。
2026-08-18 12:19:14 -04:00
Autumn-27
bf2410baee
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)。
2026-08-17 09:26:59 -04:00
Autumn-27
a94ce679a6
feat: spawn_task 补 seed_first_intent + 破坏性/外泄 gating 移入可删除的 DB 拦截规则
...
- spawn_task 新增 seed_first_intent 参数(默认 false),与 HTTP createTask 对齐;
简单任务可开启直接下发一条种子意图开跑测试
- guard.go 删除写死的 reDestructive/reExfil gating,preToolUse 仅记审计后走拦截规则
- db 新增 seedDefaultInterceptRulesV2:破坏性系统命令(默认开)/数据外泄管道(默认关)
以普通[内置]规则 seed,可禁用可删除;独立 v2 迁移标志兼容老库
2026-08-15 05:30:47 -04:00
Autumn-27
80fcf528dc
feat: 提示词新增全局变量 DataDir + 触发合并/种子意图默认值调整
...
- prompt: 新增全局运行时变量 {{.DataDir}}(服务端数据根目录 s.m.dir),
与 {{.Now}} 一样对所有 agent(planner/worker/mainagent/goals/chat 及自定义)可用;
各 Vars 结构体加 DataDir 字段并在渲染时填入根 workDir,globalPromptVars 登记以便
校验/UI 变量列表/预览识别(纯运行时变量,不入库,无需迁移)。
- trigger_merge_mode 默认 by_task→all(schema/config/后端兜底/前端初值同步)。
- seed_first_intent 默认 true→false(走标准先规划再执行);spawn_task 不再暴露该参数,
工具建任务一律 false。
2026-08-15 00:19:14 -04:00
Autumn-27
c85b2397e8
chore(plan): planner 心跳默认/下限 300s(5min) → 600s(10min)
2026-08-13 12:23:42 -04:00
Autumn-27
47ba58bda6
feat(planner): finding 当场唤醒 + planner N 秒心跳触发(任务参数,默认5min)
...
触发机制补两条(见 docs/planner-trigger-impl-plan.md):
1) finding 当场唤醒:worker 飞行中 report_finding 落库即唤醒本任务 planner,
不再等 worker 整趟收工才反应。
- worker.Execute 加 notify 入参并 SetNotify(补上 worker toolset 之前缺失的接线)
- addFinding 写 KindFinding 成功后调 notify(只对 finding,不对 fact)
- engine 两处 worker.Execute 调用传 t.Notify
2) planner N 秒心跳:距上轮规划结束/任务开始满 N 秒且期间无触发 → 触发一轮,
兜底卡死 + 唤醒去监督飞行中的 worker(steer/kill) + 周期复查。
- plannerLoop 重构为 runRound 闭包 + 三臂 select(ctx/notify/heartbeat)
- 心跳在 loop 入口臂 = 从任务 start 计时(覆盖 seed 跳过首轮),每轮结束重臂
- 新增任务参数 plan_heartbeat_seconds,下限=默认=300(5min),低于自动抬到300
- DB 迁移:schema.sql 加列 + ALTER ADD COLUMN IF NOT EXISTS 补旧库
- 全链路接线:db.CreateTask/manager/server HTTP/orchestration spawn_task
- 前端:api.createTask 传参 + 建任务表单新增"planner 心跳(分钟)"字段
2026-08-12 11:18:07 -04:00
Autumn-27 and Claude Opus 4.8
f86885ec3d
feat(task): 创建任务可选下发种子意图,worker 免等首轮规划直接开跑
...
新增 seed_first_intent(默认开启):创建即把"描述+目标"作为一条意图
写入 frontier,worker 轮询领取立即执行,省掉开跑前的首轮 planner LLM;
跑完由 NotifyDone 正常唤醒 planner 判定/补充。CTF 场景常一 work 解决。
- Engine.Run 首轮 kick 改为"frontier 为空才触发",一处覆盖普通/种子/恢复三种情况
- HTTP createTask 与 spawn_task 工具同步支持;bump 工具 schema 刷新 flag 使旧库生效
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-08-09 02:19:40 -04:00
Autumn-27 and Claude Opus 4.8
0ef8561411
chore: ARTEX 初始化
...
ARTEX — AI 自主渗透测试系统(Go 后端 + Next.js 前端,单二进制内嵌)。
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected] >
2026-07-26 04:27:45 -04:00