Module: Brute::Hooks
- Defined in:
- lib/brute/hooks.rb,
lib/brute.rb
Overview
Lifecycle hook system modeled after forgecode’s Hook struct.
Six lifecycle events fire during the orchestrator loop:
:start — conversation processing begins
:end — conversation processing ends
:request — before each LLM API call
:response — after each LLM response
:toolcall_start — before a tool executes
:toolcall_end — after a tool executes
Hooks receive (event_name, context_hash) and can inspect or mutate the orchestrator state via the context hash.