Cursor `sessionEnd` hook handler (fire-and-forget). Final transcript-ingest flush when a conversation ends (including `window_close` / `user_close`, which the end-of-turn `stop` hook can miss). `sessionEnd` receives the common-schema `transcript_path`, so the regular capped catch-up ingest applies. The response is logged but unused, so an empty object is emitted. Fail-open.
()
| 180 | /// regular capped catch-up ingest applies. The response is logged but unused, |
| 181 | /// so an empty object is emitted. Fail-open. |
| 182 | pub async fn hook_cursor_session_end() -> i32 { |
| 183 | let event = read_hook_event!(); |
| 184 | let root = cursor_project_root_from_event(&event); |
| 185 | record_hook_invoked(root.as_deref(), HintAgent::Cursor, "sessionEnd", &event); |
| 186 | ingest_cursor_transcript_for_event( |
| 187 | &event, |
| 188 | Some(CURSOR_CATCH_UP_INGEST_MAX_BYTES), |
| 189 | CURSOR_STOP_INGEST_BUDGET, |
| 190 | ) |
| 191 | .await; |
| 192 | println!("{}", serde_json::json!({})); |
| 193 | 0 |
| 194 | } |
| 195 | |
| 196 | /// Cursor `stop` hook handler (fire-and-forget). |
| 197 | /// |
no test coverage detected