| 92 | } |
| 93 | |
| 94 | fn request(reference: &RepositoryRef, event_type: &str) -> DispatchTurnEventRequest { |
| 95 | DispatchTurnEventRequest { |
| 96 | repository: Some(reference.clone()), |
| 97 | agent_id: "opencode".to_string(), |
| 98 | agent_display_name: Some("OpenCode".to_string()), |
| 99 | event: Some(TurnEventBody { |
| 100 | session_id: "service-health".to_string(), |
| 101 | event_type: event_type.to_string(), |
| 102 | ..Default::default() |
| 103 | }), |
| 104 | ..Default::default() |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | fn read_health(root: &std::path::Path) -> HookHealth { |
| 109 | let store = atomic_repository::redb_change_store::RedbChangeStore::open_existing( |