ARTEX/agent
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
..
assembly.go feat: 由报告 Agent 自动关联流量证据 2026-09-10 14:26:15 +08:00
blackboard_inheritance_test.go refactor(overview): graph_overview 不再平铺 hosts,新增 done_intents_total 2026-09-08 11:19:18 -04:00
cancelcause.go 重构 worker 对话:复用 resume 机制,改专属 goroutine 运行 2026-08-31 09:00:21 -04:00
capture.go feat(intercept): 增加审批记录详情与执行审计 2026-09-10 15:10:50 +08:00
capture_approval_test.go feat(intercept): 增加审批记录详情与执行审计 2026-09-10 15:10:50 +08:00
capture_usage_test.go chore: sync upstream v0.3.6 changes 2026-08-28 14:03:07 +08:00
chat.go feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名 2026-08-31 12:20:31 -04:00
coldcap_test.go feat(digest): 探索图冷节点压缩(cold-digest) 2026-09-09 11:52:15 -04:00
coldgraph.go feat(digest): 探索图冷节点压缩(cold-digest) 2026-09-09 11:52:15 -04:00
coldgraph_test.go feat(digest): 探索图冷节点压缩(cold-digest) 2026-09-09 11:52:15 -04:00
compaction.go feat(digest): 探索图冷节点压缩(cold-digest) 2026-09-09 11:52:15 -04:00
constraints.go 同步 2026-08-24 14:14:15 +08:00
coverage_params_test.go 同步 2026-08-24 14:14:15 +08:00
deferred.go feat: 增加 Agent 流量绑定开关并补齐证据交接 2026-09-10 14:08:40 +08:00
deferred_test.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
finding_recorder.go feat: 支持漏洞关联多条流量证据 2026-09-10 13:03:20 +08:00
finding_recorder_test.go feat: 增加 Agent 流量绑定开关并补齐证据交接 2026-09-10 14:08:40 +08:00
finding_workflow.go fix: 修复合并后审查发现的 6 个中/高问题 2026-09-10 10:15:24 -04:00
finding_workflow_test.go feat: 增加 Agent 流量绑定开关并补齐证据交接 2026-09-10 14:08:40 +08:00
goals.go feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名 2026-08-31 12:20:31 -04:00
insert_assets_test.go fix(assets): ip 字段拒收主机名,并告诉调用方该怎么改 2026-08-24 10:32:10 -04:00
mainagent.go feat(agent): 任务内主 Agent 支持多会话,可切换且上下文可重置 2026-09-10 12:56:59 -04:00
planner.go feat: 支持漏洞关联多条流量证据 2026-09-10 13:03:20 +08:00
prompt.go feat: 提示词新增全局变量 DataDir + 触发合并/种子意图默认值调整 2026-08-15 00:19:14 -04:00
prompt_now_test.go feat: 提示词新增全局变量 DataDir + 触发合并/种子意图默认值调整 2026-08-15 00:19:14 -04:00
prompt_test.go feat: 增加 Agent 流量绑定开关并补齐证据交接 2026-09-10 14:08:40 +08:00
promptcatalog.go feat: 支持漏洞关联多条流量证据 2026-09-10 13:03:20 +08:00
provider.go feat(llm): 五层重试的次数与间隔可配 2026-09-09 13:35:04 -04:00
provider_capture_e2e_test.go feat(llmrec): 录制 LLM 请求/响应 HTTP 原文 2026-08-25 09:40:05 -04:00
provider_capture_test.go feat(llm): 每个 LLM 配置支持自定义会话头 2026-09-07 11:21:50 -04:00
provider_quota_test.go feat(llm): add profile failover and pool health 2026-08-24 19:28:18 +08:00
provider_responses_test.go feat(llm): 支持 OpenAI Responses API 格式的 LLM 配置 2026-08-25 11:39:24 -04:00
proxyenv_test.go feat(proxy): 新增全局出口代理配置 2026-09-07 10:43:38 -04:00
retester.go feat: 支持会话级漏洞复测与运行状态展示 2026-09-10 16:06:08 +08:00
runinfo.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
session_header_test.go feat(llm): 每个 LLM 配置支持自定义会话头 2026-09-07 11:21:50 -04:00
taskclock.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
terminalreason.go feat(agent): 墙钟超时改为就地收尾,移除外部硬 ctx 兜底 2026-09-09 13:49:59 -04:00
terminalreason_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
testmain_test.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
toolcatalog.go 同步 2026-08-24 14:14:15 +08:00
toolcatalog_test.go feat(coverage): 资产测试覆盖度(task_scope 范围 + fact 派生已测) 2026-08-08 09:09:38 -04:00
tools.go refactor(tools): get_worker_output 移除 terminated 与 worker_name 字段 2026-09-10 10:19:19 -04:00
tools_digest.go feat(digest): related_tasks 只读折叠(§2 跨任务) 2026-09-09 12:09:01 -04:00
tools_insert.go refactor: 升级 norma v0.3.7 并精简 insert_assets/list_assets 描述 2026-09-10 10:46:47 -04:00
tools_overview_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
worker.go refactor(agent): 精简 worker 默认提示词 2026-09-10 11:08:06 -04:00
worker_intervention_test.go 新增worker直接对话 2026-08-29 21:55:27 +08:00
wrapup.go feat: 收尾默认轮数统一改为 10 2026-08-17 09:54:04 -04:00