ARTEX/agent
榆木 6b146d6c1b fix(llm): 一次性 LLM 调用补挂 session id,让自定义会话头真正生效 (#175)
自定义会话头(profile 的 session_header_key)的头值取自请求 context 上的
session id,而该 id 由 agentcore 仅在挂载 transcript store 时才写入 context
(agentcore.Prompt 中 `if s.writer != nil` 那一行)。

目标拆解(第 0 轮,DecomposeGoalsWithProvider)与冷节点压缩(§4 body 调用)
都是不挂 store 的一次性调用,context 上没有 session id,quotaAwareTransport
因此跳过该头。对 opencode zen 这类「缺 x-opencode-session 直接 400
MissingSessionID」的端点,表现为「第 0 轮目标拆解 400 失败、后续 planner
轮次却完全正常」;压缩失败则只留一行日志,极难关联到本设置。

改为在这两条路径显式挂上按探索稳定的 session id(exp<N>-goals /
exp<N>-compactor),与旁路问答、连接测试已有的做法一致。附带修好用量归因:
这两个 id 能被 llmrec.parseSession 正确解析,此前这两条路径的 token 完全
记不进 llm_usage。
2026-09-29 18:21:30 +08:00
..
assembly.go fix(agent): 探索图工具在无任务上下文时拒绝而非 nil 崩溃 2026-09-14 13:56:56 -04:00
blackboard_inheritance_test.go refactor(overview): graph_overview 不再平铺 hosts,新增 done_intents_total 2026-09-08 11:19:18 -04:00
cancelcause.go feat(intent): 意图删除支持假删除/真删除两种模式 2026-09-17 12:52:57 -04:00
capture.go feat(intercept): 模型审查补充任务上下文与裁决说明 (#124) 2026-09-15 20:08:12 +08:00
capture_approval_test.go feat(intercept): 模型审查补充任务上下文与裁决说明 (#124) 2026-09-15 20:08:12 +08:00
capture_usage_test.go chore: sync upstream v0.3.6 changes 2026-08-28 14:03:07 +08:00
chat.go Merge branch 'feat/noa-experimental':noa 实验性上下文压缩 2026-09-15 12:09:24 -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 fix(llm): 一次性 LLM 调用补挂 session id,让自定义会话头真正生效 (#175) 2026-09-29 18:21:30 +08:00
constraints.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 fix(llm): 一次性 LLM 调用补挂 session id,让自定义会话头真正生效 (#175) 2026-09-29 18:21:30 +08:00
insert_assets_test.go fix(assets): ip 字段拒收主机名,并告诉调用方该怎么改 2026-08-24 10:32:10 -04:00
mainagent.go Merge branch 'feat/noa-experimental':noa 实验性上下文压缩 2026-09-15 12:09:24 -04:00
noa.go refactor(noa): 归档集中到 <workDir>/noa 下,不再分散在任务目录 2026-09-15 12:01:38 -04:00
planner.go refactor(graph_overview): finding_list 限最新 10 条,findings 计数改名 findings_total 2026-09-24 12:32:43 -04: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 fix(llm): 测试连接补发自定义会话头,修 opencode zen 400 2026-09-11 10:45:27 -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
review_context_test.go 精简动作审查输入并支持审批来源定位 (#125) 2026-09-15 23:51:37 +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
side_questions.go feat(agent): 支持持久化 /btw 旁路提问 2026-09-10 21:42:25 +08:00
side_questions_test.go feat(agent): 支持持久化 /btw 旁路提问 2026-09-10 21:42:25 +08: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(graph_overview): related_tasks 冷区统一走 coldDigestsRecent 并封顶 2026-09-24 13:11:28 -04:00
tools_digest.go refactor(graph_overview): related_tasks 冷区统一走 coldDigestsRecent 并封顶 2026-09-24 13:11:28 -04:00
tools_insert.go refactor(graph_overview): 精简态势概览字段 2026-09-24 12:24:01 -04:00
tools_nil_store_test.go fix(agent): 探索图工具在无任务上下文时拒绝而非 nil 崩溃 2026-09-14 13:56:56 -04:00
tools_overview_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
worker.go fix(agent): 使用通用网络安全平台角色描述 (#138) 2026-09-16 23:07:51 +08: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