pub struct DaemonHook {
pub skills: SkillHandler,
pub mcp: McpHandler,
pub tasks: Arc<Mutex<TaskSet>>,
pub downloads: Arc<Mutex<DownloadRegistry>>,
pub permissions: PermissionConfig,
pub sandboxed: bool,
pub memory: Option<Memory>,
/* private fields */
}Fields§
§skills: SkillHandler§mcp: McpHandler§tasks: Arc<Mutex<TaskSet>>§downloads: Arc<Mutex<DownloadRegistry>>§permissions: PermissionConfig§sandboxed: boolWhether the daemon is running as the walrus OS user (sandbox active).
memory: Option<Memory>Built-in memory.
Implementations§
Source§impl DaemonHook
impl DaemonHook
Sourcepub fn new(
skills: SkillHandler,
mcp: McpHandler,
tasks: Arc<Mutex<TaskSet>>,
downloads: Arc<Mutex<DownloadRegistry>>,
permissions: PermissionConfig,
sandboxed: bool,
memory: Option<Memory>,
registry: Option<Arc<ServiceRegistry>>,
event_tx: DaemonEventSender,
) -> Self
pub fn new( skills: SkillHandler, mcp: McpHandler, tasks: Arc<Mutex<TaskSet>>, downloads: Arc<Mutex<DownloadRegistry>>, permissions: PermissionConfig, sandboxed: bool, memory: Option<Memory>, registry: Option<Arc<ServiceRegistry>>, event_tx: DaemonEventSender, ) -> Self
Create a new DaemonHook with the given backends.
Sourcepub async fn dispatch_tool(
&self,
name: &str,
args: &str,
agent: &str,
sender: &str,
) -> String
pub async fn dispatch_tool( &self, name: &str, args: &str, agent: &str, sender: &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§fn preprocess(&self, agent: &str, content: &str) -> String
fn preprocess(&self, agent: &str, content: &str) -> String
Called by Runtime to preprocess user content before it becomes a message. Read more
Source§fn on_before_run(&self, agent: &str, history: &[Message]) -> Vec<Message>
fn on_before_run(&self, agent: &str, history: &[Message]) -> Vec<Message>
Called by Runtime before each agent run (send_to / stream_to). Read more
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