Abhinav
7bd44085e1
Add SessionEnd hooks for thread teardown ( #33895 )
...
## What changed
- Add the `SessionEnd` hook event to hook configuration, protocol schemas, analytics, and the hooks browser.
- Run matching hooks for root threads during shutdown, including app-server archive, delete, idle unload, and graceful shutdown. Flush the transcript first and provide the session ID, transcript path, working directory, and `reason: "other"`.
- Keep teardown bounded: hook output is advisory, the default timeout is one second, configured timeouts are capped at three seconds, and async hooks run synchronously with a warning.
## Testing
- Cover transcript availability, matcher selection, timeout normalization, ignored control output, subagent exclusion, archive/delete ordering, and graceful shutdown of multiple loaded threads.
GitOrigin-RevId: 5d19a658677a137caf836ed5042dcb43f5eb6d1a
2026-07-17 19:58:56 +00:00
..
2026-07-17 15:33:32 +00:00
2026-06-25 18:15:48 -07:00
2026-07-17 15:23:35 +00:00
2026-07-16 16:43:38 +00:00
2026-07-16 17:46:36 +00:00
2026-07-08 14:13:59 -07:00
2026-07-09 00:17:38 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-16 04:45:05 +00:00
2026-07-08 00:15:49 +00:00
2026-05-28 14:54:39 -07:00
2026-07-06 10:17:15 -07:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-15 05:21:13 +00:00
2026-07-08 00:15:49 +00:00
2026-07-14 01:49:16 +00:00
2026-06-27 19:34:10 +00:00
2026-07-08 14:13:59 -07:00
2026-07-08 14:13:59 -07:00
2026-07-17 15:54:33 +00:00
2026-07-08 14:13:59 -07:00
2026-07-17 16:14:36 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 14:13:59 -07:00
2026-07-15 20:59:21 +00:00
2026-07-16 19:31:26 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 14:13:59 -07:00
2026-07-08 00:15:49 +00:00
2026-07-15 10:18:51 +00:00
2026-07-14 04:41:08 +00:00
2026-07-08 00:15:49 +00:00
2026-07-17 19:58:56 +00:00
2026-07-10 16:11:58 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-09 12:16:15 -04:00
2026-07-11 01:11:37 +00:00
2026-07-10 21:13:38 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-14 22:43:26 +00:00
2026-07-17 15:54:33 +00:00
2026-07-08 14:13:59 -07:00
2026-07-08 00:15:49 +00:00
2026-07-15 21:25:24 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-15 15:29:13 +00:00
2026-07-08 00:15:49 +00:00
2026-07-17 15:45:48 +00:00
2026-07-14 04:41:08 +00:00
2026-07-17 19:58:56 +00:00
2026-07-08 14:13:59 -07:00
2026-07-14 21:01:54 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-15 02:35:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 14:13:59 -07:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-07-08 00:15:49 +00:00
2026-05-12 18:40:53 -07:00
2026-07-15 21:25:24 +00:00
2026-07-16 01:23:52 +00:00
2026-07-15 15:29:13 +00:00
2026-07-14 04:41:08 +00:00
2026-07-08 14:13:59 -07:00
2026-07-15 15:29:13 +00:00
2026-07-14 00:38:04 +00:00
2026-07-15 21:25:24 +00:00
2026-07-08 14:13:59 -07:00
2026-07-08 14:13:59 -07:00
2026-07-17 15:18:47 +00:00
2026-07-16 04:45:05 +00:00
2026-07-08 14:13:59 -07:00
2026-07-16 19:31:26 +00:00
2026-07-08 00:15:49 +00:00