pub struct DaemonHook {
pub skills: SkillHandler,
pub mcp: McpHandler,
pub cwd: PathBuf,
pub memory: Option<Memory>,
/* private fields */
}Fields§
§skills: SkillHandler§mcp: McpHandler§cwd: PathBufWorking directory for agent commands (caller’s cwd at daemon startup).
memory: Option<Memory>Built-in memory.
Implementations§
Source§impl DaemonHook
impl DaemonHook
Sourcepub fn new(
skills: SkillHandler,
mcp: McpHandler,
cwd: PathBuf,
memory: Option<Memory>,
event_tx: DaemonEventSender,
) -> Self
pub fn new( skills: SkillHandler, mcp: McpHandler, cwd: PathBuf, memory: Option<Memory>, event_tx: DaemonEventSender, ) -> Self
Create a new DaemonHook with the given backends.
Sourcepub fn subscribe_events(&self) -> Receiver<AgentEventMsg>
pub fn subscribe_events(&self) -> Receiver<AgentEventMsg>
Subscribe to agent events (for console event streaming).
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,
session_id: u64,
history: &[Message],
) -> Vec<Message>
fn on_before_run( &self, agent: &str, session_id: u64, 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