fix: 收敛 commandExecution toolcall 摘要 (#70)

Co-authored-by: Codex <codex@pikas.tech>
This commit is contained in:
Lyon
2026-06-02 10:28:35 +08:00
committed by GitHub
parent 5efa0cfa31
commit ebc5bdb8b1
4 changed files with 67 additions and 6 deletions
@@ -71,6 +71,8 @@ Adapter 输出给 runner 的 event 类型至少包括:
Codex app-server 的低价值内部 notification 必须在 AgentRun adapter 层收敛,不得要求 HWLAB Web/CLI 或其他消费侧自行过滤。以下事件默认不作为 durable trace event 持久化:`item/reasoning/textDelta`、纯 `reasoning` item 的 `item/started|item/completed`、非 `commandExecution` item 的通用 `item/started|item/completed``thread/tokenUsage/updated``account/rateLimits/updated`、普通 `warning``configWarning`。adapter 可以输出一条有界 `backend_status.phase=codex-app-server-notifications-suppressed` 摘要,只包含计数、method 和 item type,不包含 reasoning 文本、Secret、token 或 env value。真实 `agentMessage``commandExecution``command_output`、error、terminal 和关键生命周期事件必须继续保留。
`commandExecution``tool_call` event 只能输出面向人和消费侧的扁平字段,例如 `method``itemId``toolName``type``command``cwd``status``processId``valuesPrinted=false`。不得把 Codex app-server 的原始 `item` JSON、`itemPreview` 或嵌套协议摘要写入 `message``outputSummary``stdoutSummary` 或 payload;命令实际 stdout/stderr 只通过 `command_output` 或 completed `commandExecution` 摘要输出。
## Failure Mapping
Adapter 必须把 backend 错误映射为稳定 failureKind