pub struct DaemonHook {
pub memory: InMemory,
pub skills: SkillHandler,
pub mcp: McpHandler,
pub os: OsHook,
}Expand description
Stateful Hook implementation for the daemon.
Composes memory, skill, MCP, and OS sub-hooks. Each sub-hook
self-registers its tools via on_register_tools. All tool dispatch
is routed through dispatch_tool.
Fields§
§memory: InMemory§skills: SkillHandler§mcp: McpHandler§os: OsHookImplementations§
Source§impl DaemonHook
impl DaemonHook
Sourcepub fn new(memory: InMemory, skills: SkillHandler, mcp: McpHandler) -> Self
pub fn new(memory: InMemory, skills: SkillHandler, mcp: McpHandler) -> Self
Create a new DaemonHook with the given backends.
Sourcepub async fn dispatch_tool(&self, name: &str, args: &str) -> String
pub async fn dispatch_tool(&self, name: &str, args: &str) -> String
Route a tool call by name to the appropriate handler.
This is the single dispatch entry point — event.rs calls this
and never matches on tool names itself. Unrecognised names are
forwarded to the MCP bridge after a warn-level log.
Trait Implementations§
Source§impl Hook for DaemonHook
impl Hook for DaemonHook
Source§fn on_build_agent(&self, config: AgentConfig) -> AgentConfig
fn on_build_agent(&self, config: AgentConfig) -> AgentConfig
Source§async fn on_register_tools(&self, tools: &mut ToolRegistry)
async fn on_register_tools(&self, tools: &mut ToolRegistry)
Called by
Runtime::new() to register tool schemas into the registry. Read moreAuto Trait Implementations§
impl !Freeze for DaemonHook
impl !RefUnwindSafe for DaemonHook
impl Send for DaemonHook
impl Sync for DaemonHook
impl Unpin for DaemonHook
impl UnsafeUnpin for DaemonHook
impl !UnwindSafe for DaemonHook
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> Erasable for T
impl<T> Erasable for T
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 more