fix: add bounded AgentRun event detail

This commit is contained in:
Codex
2026-07-12 08:12:57 +02:00
parent 0992b8f21d
commit 69192e3e2e
8 changed files with 633 additions and 6 deletions
@@ -15,6 +15,7 @@ bun scripts/cli.ts agentrun describe task/<taskId>
bun scripts/cli.ts agentrun describe task/<taskId> --input -o json
bun scripts/cli.ts agentrun describe aipodspec/<name>
bun scripts/cli.ts agentrun events run/<runId> --limit 20
bun scripts/cli.ts agentrun events run/<runId> --detail-seq <seq> -o json
bun scripts/cli.ts agentrun logs session/<sessionId> --tail 120
bun scripts/cli.ts agentrun result command/<commandId> --run <runId>
bun scripts/cli.ts agentrun get attempts --task <taskId>
@@ -16,7 +16,15 @@
- 默认 human、`-o json``-o yaml` 最多返回 20 条同构事件摘要,并用一条 lookahead 披露 `hasMore``nextAfterSeq`
- tool call 只展示 identity、seq/type/status、commandId、工具、命令首行、exit/duration、output bytes/hash、truncation 与 `outputOmitted`
- 默认不得展开 stdout、stderr、skill 正文或完整 payload,也不得通过提高全局 stdout 阈值掩盖 dump
- 完整事件使用显式 `--full``--raw`,或按 `item.identity``afterSeq=item.seq-1 --limit 1 --full` 下钻;
- 单事件有界详情使用 `--detail-seq <seq>`
- human、JSON 和 YAML 使用同一 `EventDetail` 投影;
- 固定读取同一 run 的 durable event,并校验返回 seq 完全一致;
- 投影保留 identity、correlation、phase-specific evidence、count/bytes/hash/omitted
- durable `resolutionAuthority` 保持原事实或显式脱敏,基于其他字段的非权威判断只进入独立 inference 字段;
- 标准 Git URL 移除 userinfo、query 和 fragmentSCP-like 与未知 remote 只披露不可逆 fingerprint
- credential value 和 URL credential 固定脱敏,`valuesPrinted=false`
- `--detail-seq``--after-seq``--limit``--full``--raw` 互斥,并在请求 manager 前 fail closed
- 完整事件继续使用显式 `--full``--raw`,或按 `afterSeq=item.seq-1 --limit 1 --full` 下钻;
- 该 CLI 只渲染 AgentRun durable facts,不删除事件、不按正文去重,也不改变 Kafka/SSE 事件链。
AipodSpec describe 必须遵守以下边界: