pub fn add_function_hook(
set_app_state: &dyn Fn(&dyn Fn(&mut Value)),
session_id: &str,
event: &HookEvent,
matcher: &str,
callback: Arc<dyn Fn(&[Value]) -> bool + Send + Sync>,
error_message: String,
timeout: Option<u64>,
id: Option<String>,
) -> StringExpand description
Add a function hook to the session. Function hooks execute TypeScript callbacks in-memory for validation. Returns the hook ID (for removal)