pub struct RuntimeHookManager { /* private fields */ }Implementations§
Source§impl RuntimeHookManager
impl RuntimeHookManager
pub fn new(hooks: Vec<Arc<dyn RuntimeHook>>) -> Self
pub fn is_empty(&self) -> bool
pub fn has_hooks(&self) -> bool
pub fn apply_before_memory_compact( &self, task: &AgentTask, cycle_index: u32, messages: Vec<Message>, shared_state: &BTreeMap<String, Value>, ) -> Vec<Message>
pub fn apply_before_llm( &self, task: &AgentTask, cycle_index: u32, messages: Vec<Message>, tool_schemas: Vec<Value>, shared_state: &BTreeMap<String, Value>, ) -> (Vec<Message>, Vec<Value>)
pub fn apply_after_llm( &self, task: &AgentTask, cycle_index: u32, messages: &[Message], tool_schemas: &[Value], response: LLMResponse, shared_state: &BTreeMap<String, Value>, ) -> LLMResponse
pub fn apply_before_tool_call( &self, task: &AgentTask, cycle_index: u32, call: ToolCall, context: &ToolContext, ) -> (ToolCall, Option<ToolExecutionResult>)
pub fn apply_after_tool_call( &self, task: &AgentTask, cycle_index: u32, call: &ToolCall, context: &ToolContext, result: ToolExecutionResult, ) -> ToolExecutionResult
Trait Implementations§
Source§impl Default for RuntimeHookManager
impl Default for RuntimeHookManager
Source§fn default() -> RuntimeHookManager
fn default() -> RuntimeHookManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeHookManager
impl !UnwindSafe for RuntimeHookManager
impl Freeze for RuntimeHookManager
impl Send for RuntimeHookManager
impl Sync for RuntimeHookManager
impl Unpin for RuntimeHookManager
impl UnsafeUnpin for RuntimeHookManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.