pub trait AgentHook: Send + Sync {
Show 14 methods
// Required methods
fn agent_type(&self) -> &str;
fn install_session_end_hook<'life0, 'async_trait>(
&'life0 mut self,
callback: SessionEndCallback,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn detect_session_activity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SessionActivity>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn extract_session_context<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SessionContext>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn install_session_start_hook<'life0, 'async_trait>(
&'life0 mut self,
_callback: SessionEndCallback,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn install_compact_hook<'life0, 'async_trait>(
&'life0 mut self,
_callback: SessionEndCallback,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn install_checkpoint_hook<'life0, 'async_trait>(
&'life0 mut self,
_callback: SessionEndCallback,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn install_error_hook<'life0, 'async_trait>(
&'life0 mut self,
_callback: SessionEndCallback,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn is_hook_installed(&self) -> bool { ... }
fn uninstall_hooks<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn reliability_score(&self) -> f32 { ... }
fn lifecycle_capabilities(&self) -> LifecycleCapabilities { ... }
fn support_tier(&self) -> SupportTier { ... }
fn record_activity(&self) { ... }
}Expand description
AgentHook trait - all agent hooks must implement this