conversation-session-hooks-lifecycle.json 20 KB

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