fn register_by_name( agent: &str, lost: &Arc<LostReason>, on_lost: Arc<dyn Fn(String) + Send + Sync>, )