pub trait PostActHook: Send + Sync {
// Required method
fn on_completed(
&self,
result: &mut ActResult,
tool_definitions: &[ToolDefinition],
) -> Vec<PostActAction>;
}Expand description
Hook that runs after ActAtom finishes executing tools.
Hooks inspect the completed results and may:
- Set
waiting_for_tool_resultsonActResult - Return actions for ActAtom to execute (e.g. emit events)
Hooks are pure: they return declarative actions rather than touching the event emitter directly. This makes them trivially testable.
Required Methods§
Sourcefn on_completed(
&self,
result: &mut ActResult,
tool_definitions: &[ToolDefinition],
) -> Vec<PostActAction>
fn on_completed( &self, result: &mut ActResult, tool_definitions: &[ToolDefinition], ) -> Vec<PostActAction>
Inspect completed results, optionally mutate the result and return actions.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".