use crate::provider::{GenerationRequest, GenerationResponse};
use std::sync::Arc;
pub trait EngineObserver: Send + Sync {
fn on_start(&self, id: &str, template: &str, slot: &str, request: &GenerationRequest);
fn on_success(&self, id: &str, response: &GenerationResponse);
fn on_healing_step(&self, id: &str, attempt: u32, error: &str);
fn on_failure(&self, id: &str, error: &str);
fn on_metadata(&self, _id: &str, _key: &str, _value: serde_json::Value) {}
}
pub type ObserverPtr = Arc<dyn EngineObserver>;