pub trait HookCallback: Send + Sync {
// Required method
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
input: &'life1 HookInput,
tool_use_id: Option<&'life2 str>,
context: &'life3 HookContext,
) -> Pin<Box<dyn Future<Output = Result<HookJSONOutput, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Hook callback trait with strongly-typed inputs and outputs
This trait is used to implement custom hook callbacks that can intercept and modify Claude’s behavior at various points in the conversation.