Files
hapi/shared/fixtures/chat/event-turn-duration.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

108 lines
3.6 KiB
JSON

{
"description": "Event family: a turn-duration event (durationMs + targetMessageId) is consumed by the reducer — folded into the targeted block, never surfacing as a chat block; durationMs itself is advisory and outside the normative projection.",
"expected": {
"blocks": [
{
"createdAt": 1755000000000,
"id": "msg-user-361",
"kind": "user-text",
"localId": null,
"text": "Give me a one-line status."
},
{
"createdAt": 1755000002200,
"id": "msg-agent-362:0",
"kind": "agent-text",
"localId": null,
"text": "Migration is applied; tests are green."
}
],
"hasReadyEvent": false,
"latestUsage": null,
"visibleBlocks": [
{
"createdAt": 1755000000000,
"id": "msg-user-361",
"kind": "user-text",
"localId": null,
"text": "Give me a one-line status."
},
{
"createdAt": 1755000002200,
"id": "msg-agent-362:0",
"kind": "agent-text",
"localId": null,
"text": "Migration is applied; tests are green."
}
]
},
"fixtureVersion": 1,
"input": {
"agentState": null,
"messages": [
{
"content": {
"content": {
"text": "Give me a one-line status.",
"type": "text"
},
"role": "user"
},
"createdAt": 1755000000000,
"id": "msg-user-361",
"localId": null,
"seq": 1
},
{
"content": {
"content": {
"data": {
"message": {
"content": [
{
"text": "Migration is applied; tests are green.",
"type": "text"
}
],
"model": "claude-opus-4-1-20250805",
"role": "assistant"
},
"parentUuid": null,
"type": "assistant",
"uuid": "d6b7d7e9-2e4f-4a5e-9c8b-d9e0f1a2b362"
},
"type": "output"
},
"role": "agent"
},
"createdAt": 1755000002200,
"id": "msg-agent-362",
"localId": null,
"seq": 2
},
{
"content": {
"content": {
"data": {
"durationMs": 2214,
"targetMessageId": "msg-agent-362",
"type": "turn-duration"
},
"id": "e7c8e8fa-3f5a-4b6f-8d9c-e0f1a2b3c363",
"type": "event"
},
"role": "agent"
},
"createdAt": 1755000002450,
"id": "msg-event-363",
"localId": null,
"seq": 3
}
],
"options": {
"hasMoreMessages": false
}
},
"name": "event-turn-duration"
}