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
c84bba477f
feat(agent): 支持为每个 agent 绑定 LLM 配置(agent 级默认模型)
...
按优先级 Agent 绑定 > 任务/会话指定 > 全局激活 解析每个 agent 运行的模型,
使 planner/worker/goals/mainagent/自定义 agent 可各自走不同 profile(如 plan 用
强模型、work 用弱模型)。未绑定时行为与原先完全一致。
- db: Agent 增 llm_profile_id + SetAgentLLMProfile;schema 幂等兜底 ALTER
- server: 新增 effectiveProfileForAgent/providerForProfile/providerForAgent;
buildPlannerWorker 让 planner/worker 各自解析 provider;provider 按 profile id
缓存以共享限速器;goals/会话链同步走绑定;绑定变更热重载
- api: agent 配置接口收 llm_profile_id(三态) + 返回可选 profile 列表
- web: agent 编辑器「配置与提示词」页新增「默认模型」下拉
2026-08-11 12:15:38 -04:00
Autumn-27
052c35a954
Merge PR #18 : delete traffic targets and LLM task conversations from UI (laohuan12138)
...
- Traffic 页:按 host 多选精确批量删 + 子串删 + 删后 _blobs 内容寻址块 GC 回收;新增 GET /api/traffic/hosts
- LLM 记录页:按 task_id 下拉选择 + 按任务删除
- 修复 host 选择器 Popover 高度渲染;.gitignore 加 /dist/
- 新增 traffic/traffic_test.go(DeleteHost/DeleteHostsExact/Hosts/GC 共 4 个测试)
本地已验证:go build/vet、traffic 测试、前端 tsc/build 均通过;与当前 main 无冲突。
2026-08-11 09:38:12 -04:00
Autumn-27
79493d5a4a
feat(activity): 任务会话历史反向分页 + SSE 可靠性整改
...
后端:
- ActivityPage(会话过滤 main/plan/intent + before 反向分页)、ActivityMaxID
(任务级快照游标)、ListByKindPage(Intent 列表分页,突破固定 300 上限)
- 新增 GET /api/exploration/activity/history(items/snapshot_cursor/
earliest_cursor/has_more);snapshot_cursor 为任务级游标
- streamActivity:一次 2000 → 循环补偿追平;输出标准 SSE id 行;支持
Last-Event-ID;补偿查询错误记录日志并关闭连接
- intents 支持分页形态(?before/?page → {items,has_more}),无参数保持旧裸数组
- 新增 idx_act_worker(exploration_id, worker, id) 支撑 Main/Plan 反向翻页
(schema.sql 幂等,旧库启动自动补建,无迁移)
前端:
- sessions-tab 单一 allActivity → 分会话缓存;首屏只加载 Main 最新页并据其
快照游标建唯一任务级 SSE;Plan/Worker 点击懒加载
- 统一 mergeBySeq 合并去重;未激活会话只维护 lastTs/unread;向上滚动分页
加载旧历史并保持滚动位置;每会话内存上限裁剪
- 按 session_key 写各自缓存 + 每 key 请求令牌防会话切换串数据;SSE 连接状态
可见、加载失败可重试,异常不再静默为"暂无消息"
- api 新增 activityHistory / intentsPage
测试:db/activity_page_test.go 覆盖多 Agent 过滤、反向翻页无重复无遗漏、
快照游标、Intent 超页分页(已对真实 PostgreSQL 通过)
2026-08-11 09:13:12 -04:00
Autumn-27
ea833ad992
feat(activity): 写失败时带 expID,并对外键(23503)现场诊断
...
- AppendActivity 失败日志补上 store.expID,直观看到写的是哪个 exploration
- 丢弃记录时若为外键违反(SQLSTATE 23503),调用新增的 ExplorationDiag 现场查库:
exploration 是否存在 / 引用它的 task 数 / 当前 MAX(exploration.id),
一行日志区分「父行真没了」vs「expID 拿错了」vs「外键未按 RESTRICT 建」
- 系统日志页时间戳补上年月日(原来只有时分秒)
2026-08-11 08:44:55 -04:00
FileShare Developer
c76d0f4c93
feat: delete traffic targets and LLM task conversations from UI
...
Add delete controls to the Traffic and LLM Records pages so users can
purge recorded data without hand-editing the data volume.
Traffic page:
- Host target picker (Popover with checkboxes + select-all toggle)
- Exact-match batch delete for multiple hosts (DELETE /api/traffic/hosts)
- Substring delete for the host-filter input (DELETE /api/traffic?host=)
- Orphaned content-addressed blob garbage collection after deletes
- Distinct-hosts endpoint (GET /api/traffic/hosts) for the picker
LLM Records page:
- Task picker dropdown (distinct task_id + record counts)
- Per-task delete (DELETE /api/llm/records?task=)
Other:
- Add /dist/ to .gitignore (build artifact)
- Extend traffic_test.go with DeleteHost, DeleteHostsExact, Hosts tests
- Fix Popover render bug (replace ScrollArea that broke height calc)
- Remove fade/zoom animation on the host picker Popover
2026-08-10 11:10:58 +08:00
Autumn-27 and Claude Opus 4.8
a121e8967c
fix(scope): add_task_scope 支持 host:port 目标,入库前剥端口
...
ip/root_domain/subdomain 三类范围入库前统一 stripHostPort:
- ip 带端口(如 10.0.188.136:3000)之前直接报"无效 ip/cidr"
- 域名带端口更隐蔽,不报错却存下匹配不到资产的垃圾键
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-08-09 09:09:59 -04:00
Autumn-27 and Claude Opus 4.8
e30218f948
feat(asset): 新增按 host 精确删除资产的工具 delete_assets_by_host
...
DeleteByHost(host):DomainKey 归一化后按 domain/root_domain/ip 精确等值删除,
连带该 host 下的 service/endpoint;传根域名会连带其子域名。exploration_anchors
为 ON DELETE CASCADE,删除不被外键阻塞。工具层 delete_assets_by_host 返回按类型
分组的删除计数。硬删除、作用于全局资产库、不可撤销。
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-08-09 04:18:21 -04:00
Autumn-27 and Claude Opus 4.8
4cf622593a
feat(trigger): 新增"任务创建"触发机制(on_task_create)
...
自定义 agent 触发条件从 5 种扩展到 6 种,新增任务被创建时触发。
用 tasks.id 单调水位线 + scheduler_state 防重复,重启不补触发;
触发消息完整分行给出任务ID/描述/目标。DB 加列并带 ALTER 迁移。
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-08-09 02:19:29 -04:00
Autumn-27 and Claude Opus 4.8
e35c766e6a
feat(coverage): 覆盖图节点用 lucide 图标 + 精简 label + 抽屉展示关联意图/事实
...
- 节点图标 emoji → 平台一致的 lucide 图标(白色 SVG data URI,iconSrc)
- 图内 label:服务显示 端口·标题·状态码(不再完整 URL),端点只显示 path
- 点节点抽屉新增「关联意图/关联事实/关联发现」:按 exploration_anchors
反查本任务锚定该资产的节点
- db AssetRefs(assetID);server GET /api/tasks/{id}/asset-refs?asset_id=X
- types/api taskAssetRefs;抽屉按 node.asset_id 拉取渲染
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-08-09 00:28:19 -04:00
Autumn-27 and Claude Opus 4.8
9c1591ad8e
fix(worker): search_all_worker_traces 排除调用者自身的意图 trace
...
之前走 ActivityTraceSearch(nil) 会把 worker 自己这条意图的步骤也搜出来
(纯噪声,本就在其上下文里)。新增 ActivityTraceSearchExcluding(node_id<>x),
工具传 t.ownerNode:worker=自身意图→排除自己;planner/mainagent 不受影响。
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-08-08 13:24:35 -04:00
Autumn-27 and Claude Opus 4.8
c396674d2b
feat(coverage): 任务新增「资产覆盖图」力导向图 tab
...
后端(只读,无迁移):
- db BuildCoverageGraph(taskID,expID) 复用 covTargetCTE 拉范围内全部类型资产 +
tested 标记,补连接节点(缺失根域名/公司,灰),按字段派生 child→parent 边
- server GET /api/tasks/{id}/coverage-graph
前端:
- 新 tab coverage-graph-tab:xyflow 渲染 + d3-force 静态力导向布局
- 已测=实色高亮、范围内未测=灰、范围外连接节点=灰虚线;点节点看详情抽屉
- 折叠/分页:同父同类型子节点默认展示 20(已测优先),超出收进折叠节点,
抽屉「展示更多(+20)」把下一批拉进图;布局仅在可见集合变化时重算
- types/api + d3-force 依赖声明 + 注册 tab
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-08-08 12:30:41 -04:00
Autumn-27 and Claude Opus 5
4c4f65f40a
refactor(coverage): 覆盖度改按类型统计 + 新增 list_untested_assets 工具
...
- 去掉 backlog(避免把未测清单塞进提示词引导 plan),改由 plan 自行判断。
- Coverage 去 Backlog、加 by_type [{type,total,tested}];TaskCoverage 改 GROUP BY type,
累加得总分母/总已测。
- 新增 db.ListUntestedAssets(范围内未测资产,可按类型过滤 + 分页)与 list_untested_assets
工具(type + page/page_size,默认页大小 10),绑 planner、随 BuiltinToolSeeds 播种。
- graph_overview 的 coverage 现为 {denominator,tested,pct,by_type,note};note 提示按需调
list_untested_assets 自行判断,不再推送 backlog。
- /api/tasks/{id}/coverage 去掉 backlog 参数;前端覆盖度卡改为按类型「已测/总数」徽章。
Co-Authored-By: Claude Opus 5 (1M context) <[email protected] >
2026-08-08 11:50:51 -04:00
Autumn-27 and Claude Opus 5
aeadd0d48b
feat(coverage): 资产测试覆盖度(task_scope 范围 + fact 派生已测)
...
按 docs/任务覆盖度设计-最终版.md 实现(轻量版,粗估供 agent 参考):
- 新表 task_scope(覆盖度分母 + per-task 授权边界):CREATE TABLE IF NOT EXISTS 进
schema.sql,随 db.go 每次启动 Exec,旧库自动生效。
- db/task_scope.go:AddAutoScope(insertAssets 按资产类型保守入范围)、AddAgentScope
(add_task_scope 工具:company/root_domain/subdomain/ip/cidr)、ListTaskScope、
TaskCoverage(范围内资产中被 fact 节点锚定过的占比 + backlog 取样)。
- insertAssets 顶层循环按 worker 显式插入的资产类型自动入范围(source=auto);
side-effect 派生的资产不触发(钩子在 handler 顶层、派生在 db 层内部),范围不盲目扩大。
- add_task_scope 工具绑 planner,随 BuiltinToolSeeds 播种(新库/旧库皆 seed)。
- graph_overview 注入 coverage(denominator/tested/backlog_sample + 粗估提示)供 planner 参考。
- HTTP:GET /api/tasks/{id}/coverage、/scope;任务总览页覆盖度卡(含 backlog)。
- 修 toolcatalog_test(record_fact 绑定断言,早前 mainagent 加 recordFact 后未同步)。
验证:go build / vet / agent test / 前端 tsc 均通过。注:DB 层 SQL 尚未经 live Postgres 运行验证。
Co-Authored-By: Claude Opus 5 (1M context) <[email protected] >
2026-08-08 09:09:38 -04:00
Autumn-27 and Claude Opus 5
1025938dd9
fix(asset): insert_assets 由程序权威赋 task_id + service/endpoint 补建 subdomain/root_domain
...
- insert_assets 不再把 task_id 暴露给模型/依赖模型传:schema 去掉 task_id,handler 直接用 SetTaskID 设的 t.taskID,避免模型漏传/错传导致资产未归任务或归错任务。
- UpsertHTTPService/UpsertOtherService/UpsertEndpoint 新增 side effect linkHostAssets:把 host 反向登记为独立 root_domain + subdomain 资产(非 apex、非 IP 才建 subdomain);endpoint 原来无任何 side effect,现补建 root_domain/subdomain/IP。
Co-Authored-By: Claude Opus 5 (1M context) <[email protected] >
2026-08-08 07:54:17 -04:00
Autumn-27 and Claude Opus 4.8
e01b659097
feat(assets): 资产页新增「应用」Tab + app 字段可搜
...
- 资产页 TABS 补 app 分类,新增应用列表(应用名/Bundle ID/分类/ICP 备案)+勾选/删除
- DSL 搜索白名单补 bundle_id/category/app_icp(原仅 app_name),前端搜索建议同步
- list/count 本就按 type 通用,app 自动适配;补齐后 app 资产可看/可搜/可删
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-08-08 06:19:11 -04:00
Autumn-27 and Claude Opus 4.8
6d8fa5bc48
feat(agent): 触发后处理可配置(运行模式/合并模式/并发上限) + 修复抽屉内下拉误关
...
每个自定义 agent 可配置触发后如何调度运行:
- 运行模式 serial|parallel:串行排队一次一个 / 每次触发各自并发一个会话
- 合并模式 by_task|all|none(仅 serial):同任务合并 / 全部合并成一条 / 不合并
- parallel 带每 agent 最大并发上限(0=不限),超限排队等空位
实现:
- DB: agents 加 trigger_run_mode/trigger_merge_mode/trigger_max_parallel 三列
(schema + 幂等 ALTER 迁移,已发版补旧库);Agent 结构/scan/SetAgentTriggerBehavior
- 调度重构: triggerRun bool → triggerActive 计数 + triggerCfg 缓存;
StartTriggeredRun 走 pumpLocked/runAndPump 统一泵模型,nextTriggerRun 按合并模式
取(新增 mergeAllRuns);并发安全(session 按 conv-id 隔离,已确认)
- config 接口暴露/接收三字段;max_turns 改可选指针,避免触发 tab 部分 patch 清零
- 前端: 触发 tab 顶部加运行/合并模式下拉 + 最大并发输入,改动即存
修复: 抽屉(Sheet)内 Select 下拉 portal 到抽屉外,点选项/点别处被当成点击外部
误关抽屉。SelectContent 改 position=popper,并给 SheetContent 加 onInteractOutside
守卫(按 e.detail.originalEvent.target 判定弹层内点击则不关)。
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-08-08 04:23:09 -04:00
Autumn-27 and Claude Opus 4.8
f9716269ea
feat(agent): 触发器新增「工具调用」条件 + 定时触发改为复选框展开
...
- 定时触发统一为前置复选框,勾选后展开「每 N 秒」+ 消息(与其它条件一致)
- 新增工具调用触发(P3 第 5 种条件):
- 选中系统工具列表(至少一个),任务执行中这些工具每次调用完成即触发 agent
- 触发消息带上任务 id/描述/目标 + 工具名 + 入参 + 返回内容(各截断 1500 字)
- 只读任务执行的 activity,触发跑的会话写 conversation_activities,天然无自触发循环
- DB: agent_triggers 加 on_tool_call/tool_call_message/tool_names 三列;
已发版,附幂等 ALTER TABLE ADD COLUMN IF NOT EXISTS 供旧库升级补列
- scheduler: 新增 last_toolcall_id 水位线(首启 seed) + fireToolCalls,以 tool_result
为水位、回连 tool_use 取入参,按选中工具集合匹配后触发
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-08-08 02:59:07 -04:00
Autumn-27 and Claude Opus 5
5000aadd8f
fix(chat): 修复会话刷新丢失最终答案( #3 ) + 反向分页/详情懒加载/会话URL持久化
...
- 后端消息列表默认按 id 升序取最旧一页,长会话刷新后最终答案落在页外而丢失
(发新消息推进游标才重现)。改为:
- db.ConvActivityPage:反向分页,取最新/更早一页 + hasMore
- 消息接口按 since(增量)/before(更早页)/最新页 三种模式返回
- 前端聊天页:
- 打开会话仅加载最新一页,滚动到顶部再反向加载更早(保持滚动位置不跳)
- Transcript 的 UserRow/AnswerBlock 改为进入视口才拉 detail,避免打开会话即对
整页每步发详情请求
- 选中会话 id 持久化到 URL(?c=<id>),刷新回到当前会话
- 修复新建会话后被"清理失效 id"effect 误清导致停留在新建页、输入框内容与灰色
发送按钮卡死:移除该 effect + onStarted 乐观插入
Co-Authored-By: Claude Opus 5 (1M context) <[email protected] >
2026-08-07 11:45:33 -04:00
Autumn-27 and Claude Opus 4.8
ad9f14f140
feat: LLM 录制开关、模型列表第三方回退、命令页改为工具执行
...
在 review PR5 基础上的三处改进:
1. LLM 录制开关(默认关,settings.llm_record)
- 录制页数据大小下拉框旁加开关;关闭时 Recorder.Stream 直接透传,
不序列化、不累积、不写库,零开销。切换即时生效,无需重建 agent。
2. 模型列表拉取支持 Anthropic 兼容第三方
- pgListModels 改为按序尝试多个候选端点:anthropic 的 /v1/models 拿不到时,
剥掉 /anthropic 回退到 OpenAI 式 /models(自动切 Bearer 头)。
修复 DeepSeek(anthropic) 加载模型 404。
3. 命令页改为「工具执行」列表
- ListCommands 去掉 tool='Bash' 过滤,覆盖所有 tool_use;返回工具名列,
搜索匹配工具名或参数。前端加「工具」列、标题/侧边栏改为「工具执行」。
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-08-07 09:32:01 -04:00
lornlee
5b58330f01
feat: 添加LLM模型清单、命令执行记录录制和LLM请求记录录制功能
2026-07-30 15:18:40 +08:00
Autumn-27 and Claude Opus 4.8
3f798ec74e
chore(docker): 预装 Playwright MCP/CLI 及 chromium
...
镜像内全局预装 @playwright/mcp、@playwright/cli、playwright,并
`playwright install --with-deps chromium` 预置浏览器及系统依赖,运行时
不再联网下载。browser MCP 启动参数去掉 -y 与 @latest(改用已装好的本地版本)。
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected] >
2026-07-28 11:52:53 -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