41 Commits
Author SHA1 Message Date
BaaRai c0e713d32f feat(engine): intent claim heartbeat, TTL and fencing token (S3c)
An intent claim was atomic but had no heartbeat, no expiry and no owner
token: startup reset every running intent to open unconditionally, so a
second instance on the same database stole live claims, and the worker
that lost its intent could still write the result.

- schema: last_heartbeat_at and unclaim_token on exploration_nodes
  (idempotent ADD COLUMN IF NOT EXISTS, nullable, no CHECK, no backfill).
- db: every claim (open->running and the paused->running message path)
  gets a fresh crypto/rand token and starts its lease in the same UPDATE.
  HeartbeatIntentClaim renews it for that token only.
- TTL: db.IntentClaimTTL = 90s, heartbeat every 15s
  (db.IntentClaimHeartbeatInterval), both on the database clock.
- takeover: ResetRunningIntents now reopens only claims whose heartbeat
  is older than the TTL, or NULL (rows claimed before the columns
  existed). The engine runs it per task every 15s as well as at startup.
- fencing: a heartbeat or result write whose token is not the current
  one returns db.ErrIntentClaimLost and writes nothing. All intent state
  writes in runIntent go through the fenced SettleIntentClaim /
  SettleIntentClaimBlocked; a rejected heartbeat cancels the stale run
  with the new work_claim_lost cause.

Behaviour change: after a restart, intents that were in flight are
resumed once their claim expires (at most 105s) instead of immediately.

Not in this change: fencing of the facts, findings and activity a worker
writes during its run; they are not guarded by the token.
2026-11-10 17:45:11 +01:00
BaaRai f57cf659b5 feat: planner quiet-mode skips edge rounds while work runs and goals hold
Every worker write-back fired a full planning round even when the open-goal set had not changed; on a live three-worker task that was 7 rounds in 45 minutes. Edge-triggered rounds are now dropped while active intents exist and the open-goal fingerprint recorded at the end of the last round is unchanged; heartbeat rounds, goal-set changes and frontier drains still plan immediately. Fails open on store errors.
2026-10-12 18:36:44 +02:00
BaaRai e233c02314 Translate all Chinese text to English
Comments, doc comments, UI labels, log and error messages, LLM prompt
strings, markdown docs, test data and assertions. Identifiers, enum
keys, routes, placeholders and code structure are unchanged.

Notes:
- docs/漏洞流量证据.md renamed to docs/vulnerability-traffic-evidence.md
- tests that exercised CJK specific handling (GBK zip names, Chinese
  full text search) now use ASCII equivalents; go build passes and the
  test suite matches the pre translation baseline (remaining failures
  need a PostgreSQL DSN and fail identically on the original)
- frontend mention syntax now uses English kinds (finding, asset, ...)
  matching the backend, chat mentions tests pass
2026-10-08 23:14:34 +02:00
Autumn-27 1a10c153b0 feat(tasks): 漏洞列改为按严重度分档显示 严/高/中/低
- TaskListMetricsAll 用 COUNT(*) FILTER 按 severity 分四档统计(同一条查询)
- TaskListMetrics.Findings 及 TaskDTO.findings 由数字改为 {critical,high,medium,low}
- 列表页「漏洞」列渲染 x/x/x/x,配色沿用 severity 语义、为 0 的档位弱化
- severity 为空/白名单外的记录不计入任一档;mock 同步为对象结构
2026-09-24 13:32:45 -04:00
Autumn-27 ee33f91bc1 feat(tasks): 任务列表新增漏洞数量列,描述/目标列收窄
- 任务列表接口 TaskListMetricsAll 批量统计每任务的漏洞数(findings 表,
  按 task_id),经 TaskDTO.findings 下发;列表页新增「漏洞」列,>0 高亮
- 描述/目标列宽 max-w-xs → max-w-40,目标列补 title 悬浮全文
- mock data/handler 同步补 findings 字段
2026-09-24 13:26:22 -04:00
Autumn-27 408144cc7f refactor(graph_overview): 概览各列表加数量上限,止住上下文膨胀
用"最新一窗 + 计数/pull 兜底"替换 hot/cold 拆分与 balancedCap:
- recent_facts 20、recent_done_intents 12、open_intents 30(按 priority)
- cold_digests 15,按最新成员时间(max member id)降序,溢出的更旧 digest
  只给裸 id(cold_digests_more),仍可 expand_digest 展开
- 新增 CountOpenIntents,frontier_open 报开放意图真实总数(与截断视图解耦)
- 删除 balancedCap/unfoldedCap/unfolded_truncated 及其测试

掉出窗口的节点不丢:facts/done_intents_total/frontier_open/findings_total
计数在,list_facts/list_findings/node_detail/expand_digest 可按需回捞
2026-09-24 13:05:27 -04:00
Autumn bafedf7fb6 Merge pull request #150 from Autumn-27/feat/broadcast-search-node-id
feat(web): 播报板搜索支持按节点 id 筛选
2026-09-18 01:09:30 +08:00
Autumn-27 6f295f48f8 feat(intent): 意图删除支持假删除/真删除两种模式
删除入口区分两种模式(待领/运行中/已暂停的意图均可删除):

- 假删除(默认):意图置 state='deleted'、删除原因记入新字段 delete_reason,
  保留节点与全部产出/血缘,不再在图上另挂 fact。
- 真删除:物理删除意图及「仅由它支撑」的独占子孙(沿 yields/derived_from
  级联到叶子),避免孤立数据;共享节点、目标、任务根事实保留。被删意图先做
  token rollup 并清理 activity/副会话,被删 finding 先删 findings 行。

两种模式都照常用 cancelled 触发通知 planner(带删除前捕获的意图摘要 + 原因),
planner 文案不再声称原因挂为事实。

- DB: 新增 SoftDeleteIntent、重写 CancelIntent 为深度独占级联;schema 加
  delete_reason 列与 intent 的 deleted 状态(含旧库迁移)。
- 前端: 删除对话框加模式切换与动态说明,状态徽章/图标新增「已删除」,
  播报板展开展示删除原因。
2026-09-17 12:52:57 -04:00
Autumn-27 075b907a7c feat(web): 播报板搜索支持按节点 id 筛选
搜索框在内容/来源之外,新增节点 id 匹配:纯数字或 UI 展示的「#41」形式
都会精确命中该节点。服务端 NodesPage 在 payload/origin ILIKE 的 OR 组里
追加 id 精确匹配;mock 同步;补 NodesPage id 搜索测试。
2026-09-17 11:31:27 -04:00
Autumn-27 b932888b49 feat(web): 任务详情页新增探索链路播报板
按创建时间分页平铺展示探索节点,作为探索链路图的时间轴视图,
复用同一份 exploration_nodes 数据,不影响链路图。

- 后端 NodesPage/NodesByIDs/EdgesTouching:分页下推 SQL,
  支持 kind/state 过滤、payload/origin 搜索、正倒序,
  并补出当页节点的相邻边与对端节点
- 新增 GET /api/exploration/nodes(仅本任务节点,不含继承)
- 播报板:时间轴分行、按天分组、类型快筛、搜索防抖、
  自动刷新、直播位未读提示、展开看上下游与 payload
- 补 mock,NEXT_PUBLIC_MOCK=1 下可无后端预览
2026-09-17 08:42:49 -04:00
Autumn-27 d8344d838d fix(db): side_question checkpoint 入库前剥除 jsonb 不支持的 NUL 转义
HTTP/工具响应含裸 NUL 字节时,json.Marshal 将其编码为 \u0000 转义,
PostgreSQL jsonb 列拒绝并抛 SQLSTATE 22P05,导致 SaveSideSnapshot 的
INSERT 每秒失败数十次刷屏。新增 jsonbClean 在 marshal 后剥除真正的
\u0000 转义(按前置反斜杠奇偶判断,避免误伤字面 \\u0000),并订正
exploration.go 中 "json.Marshal already sanitizes" 的错误注释。

Closes #111, Closes #112
2026-09-12 03:00:28 -04:00
ji ruo 7604c763f5 Merge upstream/main into codex/btw-side-question
同步官方 main 的任务会话与 spawn_task 更新,保留 /btw 旁路上下文能力。
2026-09-11 08:47:57 +08:00
Autumn-27 2954781cb7 feat(agent): 任务内主 Agent 支持多会话,可切换且上下文可重置
主 Agent 会话原为一个任务恒定单例,对话历史随 transcript 只增不减、
上下文越滚越大。现引入会话分段(seq):新建会话切一个干净的 transcript
段,任务的图谱/资产/目标共享保留,旧段以只读历史随时切回查看。

- db: 新增 main_sessions 表与 activity.main_seg 列(ALTER ADD COLUMN
  IF NOT EXISTS 兼容旧库);ActivitySessionFilter 按段过滤(段 0 兼容
  旧 NULL 行);新增 CurrentMainSeg/ListMainSessions/NewMainSession;
  per-session token 统计按 main:<seg> 分段
- agent: MainAgent.Chat 增加 mainSeg,transcript SessionID 分段
  (段 0 保留旧名 exp<id>-main 兼容既有对话)
- server: parseActivitySession 支持 main:<seq>;chat handler 每轮
  stamp 当前段;新增 GET main-sessions / POST main-session/new
- web: 主 Agent 分组渲染多段会话,支持新建(轻确认)、切换、旧段只读
2026-09-10 12:56:59 -04:00
ji ruo f62f1cc1a4 Merge origin/main into codex/btw-side-question
合入 main 的 norma v0.3.7、会话分组与流量证据更新,保留 /btw 快照和输入布局。同步自动放行、关闭流量绑定的测试断言,并等待归档测试夹具的旁路后台退出。
2026-09-11 00:54:51 +08:00
ji ruo aacc303706 feat(agent): 支持持久化 /btw 旁路提问 2026-09-10 21:42:25 +08:00
ji ruo e820cfcb86 feat: 增加 Agent 流量绑定开关并补齐证据交接 2026-09-10 14:08:40 +08:00
Autumn-27 2faee6ed99 feat(digest): 探索图冷节点压缩(cold-digest)
把老且长期不活跃的意图/事实折叠成 digest 节点进 graph_overview 展示,
原始节点永久保留、按 id 可完整还原(存储无损、只压呈现、折叠可逆)。

- 数据模型:KindDigest 节点 + RelCovers 边(真相源);新列 content_version、
  cold_since_round(节点级)、round_no(任务级 planner 轮次);均带旧库迁移。
- 纯算法(coldgraph.go):冷热判定(逆向可达 + 任一活分支即热) + R=6 轮防抖 +
  连通分量分组(§3) + §3.1 同父兄弟归组(救"热 hub+扁平死叶") + §5.3 签名。
- 后台压缩(compaction.go):minor 折未覆盖冷块(tiered)、major 回源重压合并碎片;
  签名幂等复用 body;提交时活跃度复核(绝不覆盖已复活节点);60s 冷却 + 互斥。
- 概览折叠(§6):recent_* 剔除已折成员 + 渲染时复活检查;cold_digests + 按资产
  索引 cold_index(§6.2);expand_digest/expand_index 还原;covered_members 反查
  悬空血缘 id;60 兜底截断均衡保 live。
- planner 每轮 OnPlannerRound 维护戳记并触发后台压缩,绝不上热路径。

纯算法单测覆盖 §附/§3.1/§2.3/§5.3;已对 437 节点真实图验证:热 86、冷候选 324、
§3.1 分组 47 块 + 14 孤立冷点(对齐设计文档实测校验)。
2026-09-09 11:52:15 -04:00
Autumn-27 57fa1dba3a feat(tasks): 任务列表新增「运行中 Worker」列
TaskListMetricsAll 增加一个 LATERAL 子查询统计 kind='intent' 且
state='running' 的节点数,随 TaskDTO.in_flight 一并返回,口径与任务
详情页概览的「运行中 Worker」完全一致。列表页在「目标进度」后新增该
列,无运行中 Worker 时显示 0。
2026-09-08 14:25:49 -04:00
Autumn-27 083defc8c0 feat(planner): done 触发块列出本意图新产生的 fact id
worker 结束触发规划时,除输出结论外,追加该意图经 yields 边产生的
fact id 列表,让规划者聚焦本轮增量、可直接 node_detail 查详情。
新增 ExplorationStore.FactsYielded 查询。
2026-09-08 12:15:48 -04:00
Autumn-27 fee0f448d7 refactor(overview): graph_overview 不再平铺 hosts,新增 done_intents_total
- coverage 块移除 hosts 列表(大范围任务里每轮携带最多 500 个 host 字符串,
  对规划决策价值有限),只保留 host_count;具体主机按需 list_assets 查
- 新增顶层 done_intents_total:已结束意图(done/blocked/exhausted)总数,与
  recent_done_intents(≤15 截断视图)平行命名,让 planner 去重时知道有无被截,
  key 即自描述、无需写进提示词
- db: 新增 ExplorationStore.CountFinishedIntents
- 测试:blackboard 继承用例改用 host_count 断言,移除随之无用的 containsString
2026-09-08 11:19:18 -04:00
pphua 3675f7e530 chore: sync upstream v0.3.6 changes 2026-08-28 14:03:07 +08:00
pphua 028a2e9a6c 修复BUG: 1、当存在较多任务时,系统会发生卡顿,加载对话或者加载界面时候存在明显卡顿,优化性能找出问题 2026-08-28 08:00:36 +08:00
Autumn-27 c66c97f3da 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 2c9ea0c5d5 revert(tasks): 从 main 移除误并入 6a14b60 的 goalless 直投意图改动
这几处 goalless(目标完成后主 agent 直投意图执行)改动被打包进了「任务列表
按 id 降序」提交(6a14b60),与该提交主题无关,且尚在评审阶段不应留在 main。
此处仅做正向移除,不改写历史;功能改由独立分支 feat/goalless-intent-execution
承载,评审通过后再合入。
2026-08-24 11:57:28 -04:00
Autumn-27 6a14b606ed 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 83e78643e4 feat(goals): 总览新增目标管理(增/删/改),同步通知 planner 并复活任务
- 总览页新增「目标管理」卡片,支持人工查看/新增/修改/删除目标
- 新增/修改:通知 planner(新增了目标/由 old 变为 new)并复活任务
- 删除:硬删除 goal 节点(级联删边/锚点),通知 planner,不复活任务
- 无 schema 变更:目标仍存 exploration_nodes(kind='goal'),仅加查询方法
2026-08-23 11:41:53 -04:00
Autumn-27 b4c192d77a feat(intents): 删除 work 改为「停止+记录原因」,不再销毁数据
删除不再删意图与其产出,而是:停到 stopped、要求填写删除原因、把原因作为
事实挂到该意图上、并写进意图 payload,规划者收到 cancelled 触发(意图内容+原因)。

- db: StopIntentWithReason —— 标 stopped + 建原因事实 + 连边 + 合并 payload
  (cancelled_by_user/cancel_reason),单事务;旧 CancelIntent 保留不再被调用
- agent/server: renderTriggers 加 cancelled 分支;Task.NotifyCancelled;
  controlIntent/applyIntentControl 接收并要求 reason
- web: 删除弹窗改为必填原因的 Textarea;列表用红色垃圾桶+删除线+「已删除」徽标
  区分;选中会话顶部横幅展示删除原因;controlIntent 传 reason

Claude-Session: https://claude.ai/code/session_019QXSCDmzimwnjntBNCgUD7
2026-08-23 11:14:04 -04:00
pphua bdeafdc9f7 feat(tasks): add templates findings workflows and batch controls 2026-08-21 21:01:39 +08:00
pphua 6e92923612 init 2026-08-21 11:16:19 +08:00
pphua 6bf99d2a32 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 2ed46ce633 feat: 漏洞详情页删除证据/元数据 Tab,新增「链路图」
链路图展示该漏洞所属任务探索图里,从初始节点(任务根)追溯到本漏洞节点的
那条链路:漏洞节点 + 其全部祖先(沿边反向可达)+ 之间的关系边。

- db.ExplorationStore.FindingLineage(nodeID):递归 CTE 取祖先子图(节点+边),
  下游(如 finding→proves→goal)与无关节点不纳入
- GET /api/exploration/findings/{id}/lineage:解析 finding 的 node_id/task_id →
  返回 {nodes,edges};无节点/任务已删 → 空图
- 前端 api.findingLineage;详情页 Tab 改为「概览 / 链路图」
- lineage.tsx:按深度拓扑排序,自根到漏洞纵向展示节点卡片 + 入边关系标注,
  漏洞节点高亮
- db 测试补 FindingLineage 断言(含祖先/排除下游 goal/排除无关意图)

go build / db / server 测试通过。
2026-08-18 13:08:03 -04:00
Autumn-27 8ac04e4787 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 0ee59baed4 feat: 新增 update_finding_report 工具,写入漏洞 report 字段
- 新增 agent 写工具 update_finding_report(finding_id + report[Markdown]),
  整段覆盖该漏洞的详细报告;finding_id 传 report_finding 返回的 id
- 绑定 worker / planner / mainagent 三个 agent,经 BuiltinToolSeeds 自动入
  tools 目录(首插不覆盖,旧库升级重启即出现,可在 UI 管理/勾选)
- db.SetFindingReportByNodeID / ExplorationStore.SetFindingReport:按 finding
  节点 id 更新独立 findings 行的 report
- 详情页概览已渲染 report,写入后即可展示

go build / agent / server 测试通过。
2026-08-18 11:56:43 -04:00
Autumn-27 30b790154e feat: 漏洞新增 severity=critical(严重) 与 name(漏洞名称)字段
severity 严重级:
- report_finding 工具 severity 说明改为 critical|high|medium|low
- DB 排序 CASE、report 报告 sevRank、FindingStats 增加 critical
- 前端 Severity 类型、status.ts 新增 rose 色调(实心高强调,视觉高于高危)、
  发现页严重度筛选/统计卡、任务发现 Tab 排序、dashboard 汇总均加入严重

name 漏洞名称:
- findings 表加 name 列(schema + ALTER TABLE ADD COLUMN IF NOT EXISTS 补旧库)
- report_finding 工具新增 name 入参(非必填),写入 node payload 与独立 findings 行
- DBFinding/AddFinding/AddStandaloneFinding、FindingDTO、findingPayload、report 全链路透传
- 发现列表页与任务发现 Tab 展示 name,为空时回退 vulnclass;vulnclass 移到展开详情「类型」
- report 报告标题优先 name,回退 vulnclass

无 CHECK 约束,旧库仅需补 name 列;critical/name 均向后兼容。
db 测试补充 critical 排序/统计与 name 往返断言。
2026-08-18 11:21:08 -04:00
Autumn-27 d8ddccec65 feat: 出错(blocked)意图可一键重跑 + 概览页按钮
worker 因 LLM 网络/连接等错误 model_error 收场、耗尽引擎层 2 次自动重试后意图标
blocked,此前无手动恢复入口。现支持一键重跑:置回 open→worker 重新认领、从头再跑
(已写回图谱的 fact/finding/asset 保留);任务若已终态/暂停会自动复活。

- db: ReopenIntent(blocked/exhausted/stopped→open)、ReopenBlockedIntents(批量 blocked→open)。
- server: resumeTaskForGoal 泛化为 reviveTask(set_goals 与重跑复用同一复活逻辑);
  新增 POST /tasks/{id}/intents/{iid}/rerun 与 /tasks/{id}/intents/rerun-blocked,
  reopen 后 reviveTask 确保 worker 循环存活并重认领。
- web: api.rerunIntent/rerunBlocked;概览页新增「被拦/出错意图」卡片,每条「重跑」+
  顶部「全部重跑」,乐观更新 + 3s 轮询兜底。
2026-08-17 09:56:59 -04:00
Autumn-27 de479b6c50 fix(engine): 种子意图任务误触发首轮 planner(Frontier 只数 open 与 worker claim 竞态)
Run 里「跳过首轮」依赖种子意图让 frontier 非空,但 Frontier 只数 state='open',
而 Run 先起 worker、后查 frontier——worker 抢先 claim 种子意图(open→running)后,
Frontier(open) 变空 → 误发 t.Notify() → 首轮 planner 立刻触发(日志 "edge 触发")。

改为 HasActiveIntent(open 或 running):种子无论 open 还是已被 claim 成 running 都算
「有活干」,一律跳过首轮。首轮延后到种子 worker 收工(NotifyDone)/出 finding/心跳。
顺带修好重启恢复时只剩 running 意图也会误 kick 的情况。
2026-08-12 11:37:54 -04:00
Autumn-27 4a00729300 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 7d500d0a9d 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
Autumn-27andClaude Opus 4.8 6e37cb276f 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 <noreply@anthropic.com>
2026-08-09 00:28:19 -04:00
Autumn-27andClaude Opus 4.8 5731830b44 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 <noreply@anthropic.com>
2026-08-08 13:24:35 -04:00
Autumn-27andClaude Opus 4.8 0ef8561411 chore: ARTEX 初始化
ARTEX — AI 自主渗透测试系统(Go 后端 + Next.js 前端,单二进制内嵌)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-26 04:27:45 -04:00