Files
hapi/shared/fixtures/chat/codex-context-compacted.json
T
weishu c1ecb4798e feat(fixtures): batch 2 — events, permissions, sidechains, flavors, catalogs (K6)
34 new golden chat fixtures generated from the web pipeline, plus a
machine-generated modes catalog:

- Claude output: away_summary/microcompact_boundary/compact_boundary system
  subtypes, <task-notification> summary extraction, multi-block assistant
  message with an array-of-parts (text+image) tool_result
- AgentEvent union completed: switch/message/error/title-changed(+dedupe)/
  limit-warning(pipe text)/api-error folding/turn-duration/compact-summary/
  abort-restore/unknown-type passthrough; thread-goal updated+cleared (silent)
- Permission lifecycle via agentState.completedRequests: approved_for_session
  (mode+allowTools), denied with reason, canceled, AskUserQuestion flat
  answers, request_user_input nested answers (all with explicit createdAt)
- Sidechain: Task tool_use with parentToolUseId-grouped subagent children
- codex family: error, context_compacted, generated-image, review JSON,
  thread-goal messages, CodexBash call/result pair, exploration tool group
- cli-output: cli-origin command block + stdout merge
- agy flavor (output envelope): agy_message, agy_tool_action run_command
  mapping; cursor ACP plan snapshot (copilot skipped: identical codex shapes)
- generator now also emits shared/fixtures/catalogs/modes.json from
  shared/src/modes.ts (per-flavor permission modes with labels/tones);
  self-conformance test covers it; README documents the catalogs contract
2026-08-17 12:04:22 +08:00

87 lines
2.5 KiB
JSON

{
"description": "Codex family: context_compacted maps to an agent-event of type compact with trigger and preTokens (accepting the snake_case pre_tokens wire key).",
"expected": {
"blocks": [
{
"createdAt": 1755000000000,
"id": "msg-user-511",
"kind": "user-text",
"localId": null,
"text": "Carry on."
},
{
"createdAt": 1755000003100,
"event": {
"preTokens": 186211,
"trigger": "auto",
"type": "compact"
},
"id": "msg-codex-512",
"kind": "agent-event"
}
],
"hasReadyEvent": false,
"latestUsage": null,
"visibleBlocks": [
{
"createdAt": 1755000000000,
"id": "msg-user-511",
"kind": "user-text",
"localId": null,
"text": "Carry on."
},
{
"createdAt": 1755000003100,
"event": {
"preTokens": 186211,
"trigger": "auto",
"type": "compact"
},
"id": "msg-codex-512",
"kind": "agent-event"
}
]
},
"fixtureVersion": 1,
"input": {
"agentState": null,
"messages": [
{
"content": {
"content": {
"text": "Carry on.",
"type": "text"
},
"role": "user"
},
"createdAt": 1755000000000,
"id": "msg-user-511",
"localId": null,
"seq": 1
},
{
"content": {
"content": {
"data": {
"pre_tokens": 186211,
"thread_id": "thread-42",
"trigger": "auto",
"type": "context_compacted"
},
"type": "codex"
},
"role": "agent"
},
"createdAt": 1755000003100,
"id": "msg-codex-512",
"localId": null,
"seq": 2
}
],
"options": {
"hasMoreMessages": false
}
},
"name": "codex-context-compacted"
}