Cursor `stop` hook handler (fire-and-forget). Fires at the end of an agent turn and performs the primary transcript ingest: a time-boxed incremental catch-up that picks up bounded transcript tails appended during the turn. The `stop` output is informational only, so we emit an empty object and never ask the agent to continue. Fail-open.
()
| 200 | /// tails appended during the turn. The `stop` output is informational only, so |
| 201 | /// we emit an empty object and never ask the agent to continue. Fail-open. |
| 202 | pub async fn hook_cursor_stop() -> i32 { |
| 203 | let event = read_hook_event!(); |
| 204 | let root = cursor_project_root_from_event(&event); |
| 205 | record_hook_invoked(root.as_deref(), HintAgent::Cursor, "stop", &event); |
| 206 | ingest_cursor_transcript_for_event( |
| 207 | &event, |
| 208 | Some(CURSOR_CATCH_UP_INGEST_MAX_BYTES), |
| 209 | CURSOR_STOP_INGEST_BUDGET, |
| 210 | ) |
| 211 | .await; |
| 212 | println!("{}", serde_json::json!({})); |
| 213 | 0 |
| 214 | } |
| 215 | |
| 216 | /// Cursor `preCompact` hook handler. |
| 217 | /// |
no test coverage detected