pub trait Hook {
type Output: Captured;
type Config: Serialize + for<'de> Deserialize<'de>;
// Required methods
fn id(&self) -> String;
fn config(&self) -> &Self::Config;
fn run(&self, params: &RuntimeParams) -> CapsulaResult<Self::Output>;
// Provided method
fn config_as_json(&self) -> Result<Value, Error> { ... }
}