conversation-session-hooks-lifecycle.json 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-hooks-lifecycle",
  4. "spec": "./test/e2e/conversation-session/hooks/conversation-session-hooks-lifecycle.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "hooks-full-chain-title",
  8. "description": "Full-chain Hooks case title response.",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "Title generation is outside the Hooks runtime contract."
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_HOOKS_FULL_CHAIN"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": {
  24. "content-type": "application/json; charset=utf-8"
  25. },
  26. "body": "{\"id\":\"hooks-full-chain-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Hooks Full Chain\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"output_tokens\":12}}"
  27. }
  28. },
  29. {
  30. "id": "hooks-full-chain-write",
  31. "description": "Initial request receives lifecycle context and asks for a Write whose input Hooks modify twice.",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "A deterministic Write proves PreToolUse and PermissionRequest input effects."
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_HOOKS_FULL_CHAIN"],
  43. "bodyIncludes": ["E2E_HOOKS_FULL_CHAIN", "HOOK_SESSION_CONTEXT", "HOOK_PROMPT_CONTEXT"],
  44. "bodyExcludes": [
  45. "Generate a concise title",
  46. "HOOK_ASYNC_CONTEXT_MUST_BE_IGNORED",
  47. "toolu_e2e_hooks_full_write"
  48. ]
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "toolUse": {
  53. "id": "toolu_e2e_hooks_full_write",
  54. "messageId": "msg_e2e_hooks_full_write",
  55. "name": "Write",
  56. "input": {
  57. "file_path": "hooks-full-e2e/original.txt",
  58. "content": "provider original content\n"
  59. }
  60. }
  61. }
  62. },
  63. {
  64. "id": "hooks-full-chain-read",
  65. "description": "Modified Write continuation receives pre/post context and asks for a failing Read.",
  66. "metadata": {
  67. "kind": "main",
  68. "timingPolicy": "fast-text",
  69. "source": "synthetic",
  70. "syntheticReason": "The missing Read deterministically exercises PostToolUseFailure."
  71. },
  72. "maxMatches": 1,
  73. "match": {
  74. "method": "POST",
  75. "pathIncludes": "/messages",
  76. "bodyIncludes": [
  77. "E2E_HOOKS_FULL_CHAIN",
  78. "toolu_e2e_hooks_full_write",
  79. "hooks-full-e2e/final.txt",
  80. "HOOK_PRE_MODIFY_CONTEXT",
  81. "HOOK_POST_SUCCESS_CONTEXT"
  82. ],
  83. "bodyExcludes": [
  84. "Generate a concise title",
  85. "HOOK_ASYNC_CONTEXT_MUST_BE_IGNORED",
  86. "toolu_e2e_hooks_full_read_missing"
  87. ]
  88. },
  89. "response": {
  90. "statusCode": 200,
  91. "toolUse": {
  92. "id": "toolu_e2e_hooks_full_read_missing",
  93. "messageId": "msg_e2e_hooks_full_read_missing",
  94. "name": "Read",
  95. "input": {
  96. "file_path": "hooks-full-e2e/missing.txt"
  97. }
  98. }
  99. }
  100. },
  101. {
  102. "id": "hooks-full-chain-final",
  103. "description": "Failed Read continuation receives recovery context and completes the full-chain case.",
  104. "metadata": {
  105. "kind": "main",
  106. "timingPolicy": "fast-text",
  107. "source": "synthetic",
  108. "syntheticReason": "The final marker proves failure recovery context reached the model."
  109. },
  110. "maxMatches": 1,
  111. "match": {
  112. "method": "POST",
  113. "pathIncludes": "/messages",
  114. "bodyIncludes": [
  115. "E2E_HOOKS_FULL_CHAIN",
  116. "toolu_e2e_hooks_full_read_missing",
  117. "HOOK_PRE_READ_CONTEXT",
  118. "HOOK_POST_FAILURE_CONTEXT"
  119. ],
  120. "bodyExcludes": ["Generate a concise title", "HOOK_ASYNC_CONTEXT_MUST_BE_IGNORED"]
  121. },
  122. "response": {
  123. "statusCode": 200,
  124. "text": {
  125. "id": "upstream-e2e-hooks-full-chain-final",
  126. "inputTokens": 220,
  127. "outputTokens": 12,
  128. "text": "E2E_HOOKS_FULL_CHAIN_OK"
  129. }
  130. }
  131. },
  132. {
  133. "id": "hooks-early-failures-title",
  134. "description": "Early-failure Hooks case title response.",
  135. "metadata": {
  136. "kind": "common",
  137. "timingPolicy": "fast-text",
  138. "source": "synthetic",
  139. "syntheticReason": "Title generation is outside the Hooks runtime contract."
  140. },
  141. "match": {
  142. "method": "POST",
  143. "pathIncludes": "/messages",
  144. "bodyIncludes": ["Generate a concise title", "E2E_HOOKS_EARLY_FAILURES"]
  145. },
  146. "response": {
  147. "statusCode": 200,
  148. "statusMessage": "OK",
  149. "headers": {
  150. "content-type": "application/json; charset=utf-8"
  151. },
  152. "body": "{\"id\":\"hooks-early-failures-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Hooks Early Failures\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"output_tokens\":12}}"
  153. }
  154. },
  155. {
  156. "id": "hooks-early-pre-deny",
  157. "description": "Initial early-failure request asks for a PreToolUse-denied Write.",
  158. "metadata": {
  159. "kind": "main",
  160. "timingPolicy": "fast-text",
  161. "source": "synthetic",
  162. "syntheticReason": "A deterministic path selects the PreToolUse deny branch."
  163. },
  164. "maxMatches": 1,
  165. "match": {
  166. "method": "POST",
  167. "pathIncludes": "/messages",
  168. "lastUserMessageIncludes": ["E2E_HOOKS_EARLY_FAILURES"],
  169. "bodyIncludes": ["E2E_HOOKS_EARLY_FAILURES", "HOOK_SESSION_CONTEXT", "HOOK_PROMPT_CONTEXT"],
  170. "bodyExcludes": ["Generate a concise title", "toolu_e2e_hooks_early_pre_deny"]
  171. },
  172. "response": {
  173. "statusCode": 200,
  174. "toolUse": {
  175. "id": "toolu_e2e_hooks_early_pre_deny",
  176. "messageId": "msg_e2e_hooks_early_pre_deny",
  177. "name": "Write",
  178. "input": {
  179. "file_path": "hooks-full-e2e/pre-deny.txt",
  180. "content": "must not be written\n"
  181. }
  182. }
  183. }
  184. },
  185. {
  186. "id": "hooks-early-invalid-update",
  187. "description": "PreToolUse-denied continuation sees context and asks for an invalid Hook update.",
  188. "metadata": {
  189. "kind": "main",
  190. "timingPolicy": "fast-text",
  191. "source": "synthetic",
  192. "syntheticReason": "A deterministic path selects the invalid updatedInput branch."
  193. },
  194. "maxMatches": 1,
  195. "match": {
  196. "method": "POST",
  197. "pathIncludes": "/messages",
  198. "bodyIncludes": [
  199. "E2E_HOOKS_EARLY_FAILURES",
  200. "toolu_e2e_hooks_early_pre_deny",
  201. "HOOK_PRE_DENY_CONTEXT"
  202. ],
  203. "bodyExcludes": ["Generate a concise title", "toolu_e2e_hooks_early_invalid"]
  204. },
  205. "response": {
  206. "statusCode": 200,
  207. "toolUse": {
  208. "id": "toolu_e2e_hooks_early_invalid",
  209. "messageId": "msg_e2e_hooks_early_invalid",
  210. "name": "Write",
  211. "input": {
  212. "file_path": "hooks-full-e2e/invalid-update.txt",
  213. "content": "must not be written\n"
  214. }
  215. }
  216. }
  217. },
  218. {
  219. "id": "hooks-early-permission-deny",
  220. "description": "Invalid-updatedInput continuation sees context and asks for a permission-denied Write.",
  221. "metadata": {
  222. "kind": "main",
  223. "timingPolicy": "fast-text",
  224. "source": "synthetic",
  225. "syntheticReason": "A deterministic path selects the PermissionRequest deny branch."
  226. },
  227. "maxMatches": 1,
  228. "match": {
  229. "method": "POST",
  230. "pathIncludes": "/messages",
  231. "bodyIncludes": [
  232. "E2E_HOOKS_EARLY_FAILURES",
  233. "toolu_e2e_hooks_early_invalid",
  234. "HOOK_PRE_INVALID_UPDATE_CONTEXT"
  235. ],
  236. "bodyExcludes": ["Generate a concise title", "toolu_e2e_hooks_early_permission_deny"]
  237. },
  238. "response": {
  239. "statusCode": 200,
  240. "toolUse": {
  241. "id": "toolu_e2e_hooks_early_permission_deny",
  242. "messageId": "msg_e2e_hooks_early_permission_deny",
  243. "name": "Write",
  244. "input": {
  245. "file_path": "hooks-full-e2e/permission-deny.txt",
  246. "content": "must not be written\n"
  247. }
  248. }
  249. }
  250. },
  251. {
  252. "id": "hooks-early-final",
  253. "description": "Permission-denied continuation sees context and completes the early-failure case.",
  254. "metadata": {
  255. "kind": "main",
  256. "timingPolicy": "fast-text",
  257. "source": "synthetic",
  258. "syntheticReason": "The final marker proves all early-return context reached the model."
  259. },
  260. "maxMatches": 1,
  261. "match": {
  262. "method": "POST",
  263. "pathIncludes": "/messages",
  264. "bodyIncludes": [
  265. "E2E_HOOKS_EARLY_FAILURES",
  266. "toolu_e2e_hooks_early_permission_deny",
  267. "HOOK_PRE_PERMISSION_DENY_CONTEXT",
  268. "HOOK_PERMISSION_DENY_REASON"
  269. ],
  270. "bodyExcludes": ["Generate a concise title"]
  271. },
  272. "response": {
  273. "statusCode": 200,
  274. "text": {
  275. "id": "upstream-e2e-hooks-early-final",
  276. "inputTokens": 260,
  277. "outputTokens": 12,
  278. "text": "E2E_HOOKS_EARLY_FAILURES_OK"
  279. }
  280. }
  281. },
  282. {
  283. "id": "hooks-stop-cap-title",
  284. "description": "Stop continuation cap case title response.",
  285. "metadata": {
  286. "kind": "common",
  287. "timingPolicy": "fast-text",
  288. "source": "synthetic",
  289. "syntheticReason": "Title generation is outside the Hooks runtime contract."
  290. },
  291. "match": {
  292. "method": "POST",
  293. "pathIncludes": "/messages",
  294. "bodyIncludes": ["Generate a concise title", "E2E_HOOKS_STOP_CAP"]
  295. },
  296. "response": {
  297. "statusCode": 200,
  298. "statusMessage": "OK",
  299. "headers": {
  300. "content-type": "application/json; charset=utf-8"
  301. },
  302. "body": "{\"id\":\"hooks-stop-cap-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Hooks Stop Cap\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"output_tokens\":12}}"
  303. }
  304. },
  305. {
  306. "id": "hooks-stop-step-0",
  307. "description": "Initial Stop-cap request returns the first assistant draft.",
  308. "metadata": {
  309. "kind": "main",
  310. "timingPolicy": "fast-text",
  311. "source": "synthetic",
  312. "syntheticReason": "Four deterministic assistant drafts prove the three-continuation cap."
  313. },
  314. "maxMatches": 1,
  315. "match": {
  316. "method": "POST",
  317. "pathIncludes": "/messages",
  318. "lastUserMessageIncludes": ["E2E_HOOKS_STOP_CAP"],
  319. "bodyIncludes": ["E2E_HOOKS_STOP_CAP", "HOOK_PROMPT_CONTEXT"],
  320. "bodyExcludes": ["Generate a concise title", "HOOK_STOP_CONTEXT_1"]
  321. },
  322. "response": {
  323. "statusCode": 200,
  324. "text": {
  325. "id": "upstream-e2e-hooks-stop-step-0",
  326. "inputTokens": 100,
  327. "outputTokens": 8,
  328. "text": "E2E_HOOKS_STOP_CAP_STEP_0"
  329. }
  330. }
  331. },
  332. {
  333. "id": "hooks-stop-step-1",
  334. "description": "First Stop continuation consumes context 1.",
  335. "metadata": {
  336. "kind": "main",
  337. "timingPolicy": "fast-text",
  338. "source": "synthetic",
  339. "syntheticReason": "Four deterministic assistant drafts prove the three-continuation cap."
  340. },
  341. "maxMatches": 1,
  342. "match": {
  343. "method": "POST",
  344. "pathIncludes": "/messages",
  345. "bodyIncludes": ["E2E_HOOKS_STOP_CAP", "HOOK_STOP_CONTEXT_1"],
  346. "bodyExcludes": ["Generate a concise title", "HOOK_STOP_CONTEXT_2"]
  347. },
  348. "response": {
  349. "statusCode": 200,
  350. "text": {
  351. "id": "upstream-e2e-hooks-stop-step-1",
  352. "inputTokens": 120,
  353. "outputTokens": 8,
  354. "text": "E2E_HOOKS_STOP_CAP_STEP_1"
  355. }
  356. }
  357. },
  358. {
  359. "id": "hooks-stop-step-2",
  360. "description": "Second Stop continuation consumes context 2.",
  361. "metadata": {
  362. "kind": "main",
  363. "timingPolicy": "fast-text",
  364. "source": "synthetic",
  365. "syntheticReason": "Four deterministic assistant drafts prove the three-continuation cap."
  366. },
  367. "maxMatches": 1,
  368. "match": {
  369. "method": "POST",
  370. "pathIncludes": "/messages",
  371. "bodyIncludes": ["E2E_HOOKS_STOP_CAP", "HOOK_STOP_CONTEXT_2"],
  372. "bodyExcludes": ["Generate a concise title", "HOOK_STOP_CONTEXT_3"]
  373. },
  374. "response": {
  375. "statusCode": 200,
  376. "text": {
  377. "id": "upstream-e2e-hooks-stop-step-2",
  378. "inputTokens": 140,
  379. "outputTokens": 8,
  380. "text": "E2E_HOOKS_STOP_CAP_STEP_2"
  381. }
  382. }
  383. },
  384. {
  385. "id": "hooks-stop-step-3",
  386. "description": "Third and final allowed Stop continuation consumes context 3.",
  387. "metadata": {
  388. "kind": "main",
  389. "timingPolicy": "fast-text",
  390. "source": "synthetic",
  391. "syntheticReason": "Four deterministic assistant drafts prove the three-continuation cap."
  392. },
  393. "maxMatches": 1,
  394. "match": {
  395. "method": "POST",
  396. "pathIncludes": "/messages",
  397. "bodyIncludes": ["E2E_HOOKS_STOP_CAP", "HOOK_STOP_CONTEXT_3"],
  398. "bodyExcludes": ["Generate a concise title", "HOOK_STOP_CONTEXT_4"]
  399. },
  400. "response": {
  401. "statusCode": 200,
  402. "text": {
  403. "id": "upstream-e2e-hooks-stop-step-3",
  404. "inputTokens": 160,
  405. "outputTokens": 8,
  406. "text": "E2E_HOOKS_STOP_CAP_STEP_3"
  407. }
  408. }
  409. },
  410. {
  411. "id": "hooks-prompt-block-title",
  412. "description": "Prompt-block Hooks case title response when title generation runs.",
  413. "metadata": {
  414. "kind": "common",
  415. "timingPolicy": "fast-text",
  416. "source": "synthetic",
  417. "syntheticReason": "Title generation is outside the Hooks runtime contract."
  418. },
  419. "match": {
  420. "method": "POST",
  421. "pathIncludes": "/messages",
  422. "bodyIncludes": ["Generate a concise title", "E2E_HOOKS_PROMPT_BLOCK"]
  423. },
  424. "response": {
  425. "statusCode": 200,
  426. "statusMessage": "OK",
  427. "headers": {
  428. "content-type": "application/json; charset=utf-8"
  429. },
  430. "body": "{\"id\":\"hooks-prompt-block-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Hooks Prompt Block\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"output_tokens\":12}}"
  431. }
  432. },
  433. {
  434. "id": "hooks-prompt-error-title",
  435. "description": "Prompt-error Hooks case title response when title generation runs.",
  436. "metadata": {
  437. "kind": "common",
  438. "timingPolicy": "fast-text",
  439. "source": "synthetic",
  440. "syntheticReason": "Title generation is outside the Hooks runtime contract."
  441. },
  442. "match": {
  443. "method": "POST",
  444. "pathIncludes": "/messages",
  445. "bodyIncludes": ["Generate a concise title", "E2E_HOOKS_PROMPT_ERROR"]
  446. },
  447. "response": {
  448. "statusCode": 200,
  449. "statusMessage": "OK",
  450. "headers": {
  451. "content-type": "application/json; charset=utf-8"
  452. },
  453. "body": "{\"id\":\"hooks-prompt-error-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Hooks Prompt Error\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"output_tokens\":12}}"
  454. }
  455. },
  456. {
  457. "id": "hooks-prompt-error-main",
  458. "description": "Main response proves a failed UserPromptSubmit hook does not block the model.",
  459. "metadata": {
  460. "kind": "main",
  461. "timingPolicy": "fast-text",
  462. "source": "synthetic",
  463. "syntheticReason": "The provider response isolates hook process failure from model transport."
  464. },
  465. "maxMatches": 1,
  466. "match": {
  467. "method": "POST",
  468. "pathIncludes": "/messages",
  469. "bodyIncludes": ["E2E_HOOKS_PROMPT_ERROR"],
  470. "bodyExcludes": ["Generate a concise title"]
  471. },
  472. "response": {
  473. "statusCode": 200,
  474. "text": {
  475. "id": "hooks-prompt-error-main",
  476. "inputTokens": 100,
  477. "outputTokens": 8,
  478. "text": "HOOK_PROCESS_FAILURE_REACHED_MODEL"
  479. }
  480. }
  481. },
  482. {
  483. "id": "hooks-compact-first-title",
  484. "description": "Compact-first Hooks case title response when title generation runs.",
  485. "metadata": {
  486. "kind": "common",
  487. "timingPolicy": "fast-text",
  488. "source": "synthetic",
  489. "syntheticReason": "Title generation is outside the Hooks runtime contract."
  490. },
  491. "match": {
  492. "method": "POST",
  493. "pathIncludes": "/messages",
  494. "bodyIncludes": ["Generate a concise title", "E2E_HOOKS_COMPACT_FIRST_FOLLOW_UP"]
  495. },
  496. "response": {
  497. "statusCode": 200,
  498. "statusMessage": "OK",
  499. "headers": {
  500. "content-type": "application/json; charset=utf-8"
  501. },
  502. "body": "{\"id\":\"hooks-compact-first-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Hooks Compact First\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"output_tokens\":12}}"
  503. }
  504. },
  505. {
  506. "id": "hooks-compact-first-follow-up",
  507. "description": "Follow-up prompt after a first-action /compact: the SessionStart summary must anchor to this real turn, not the compact maintenance turn (HK17).",
  508. "metadata": {
  509. "kind": "main",
  510. "timingPolicy": "fast-text",
  511. "source": "synthetic",
  512. "syntheticReason": "Deterministic final text proves the SessionStart summary lands on the next real turn after /compact."
  513. },
  514. "maxMatches": 1,
  515. "match": {
  516. "method": "POST",
  517. "pathIncludes": "/messages",
  518. "lastUserMessageIncludes": ["E2E_HOOKS_COMPACT_FIRST_FOLLOW_UP"],
  519. "bodyIncludes": ["E2E_HOOKS_COMPACT_FIRST_FOLLOW_UP", "HOOK_SESSION_CONTEXT"],
  520. "bodyExcludes": ["Generate a concise title"]
  521. },
  522. "response": {
  523. "statusCode": 200,
  524. "statusMessage": "OK",
  525. "headers": {
  526. "cache-control": "no-cache",
  527. "content-type": "text/event-stream; charset=utf-8"
  528. },
  529. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"hooks-compact-first-follow-up\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":96,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_HOOKS_COMPACT_FIRST_FOLLOW_UP_OK\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":96,\"output_tokens\":8,\"service_tier\":\"standard\"}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  530. }
  531. }
  532. ]
  533. }