aether_core/events/observer.rs
1use crate::events::AgentEvent;
2use std::sync::Arc;
3
4/// Observer of the agent's event stream. Observers receive the same events
5/// the agent sends on its event channel, synchronously and in order —
6/// including events that channel consumers such as UIs and session
7/// persistence filter out downstream.
8pub trait AgentObserver: Send {
9 fn on_event(&mut self, message: &AgentEvent);
10}
11
12pub type ObserverFactory = Arc<dyn Fn() -> Box<dyn AgentObserver> + Send + Sync>;