pub struct RuntimeHook<B: RuntimeBridge = NoBridge> {
pub bridge: B,
/* private fields */
}Fields§
§bridge: BBridge to server-specific functionality.
Implementations§
Source§impl<B: RuntimeBridge> RuntimeHook<B>
impl<B: RuntimeBridge> RuntimeHook<B>
Sourcepub fn new(
skills: SkillHandler,
mcp: McpHandler,
cwd: PathBuf,
memory: Option<Memory>,
bridge: B,
) -> Self
pub fn new( skills: SkillHandler, mcp: McpHandler, cwd: PathBuf, memory: Option<Memory>, bridge: B, ) -> Self
Create a new RuntimeHook with the given backends.
Sourcepub fn register_scope(&mut self, name: String, config: &AgentConfig)
pub fn register_scope(&mut self, name: String, config: &AgentConfig)
Register an agent’s scope for dispatch enforcement.
Source§impl<B: RuntimeBridge> RuntimeHook<B>
impl<B: RuntimeBridge> RuntimeHook<B>
pub async fn dispatch_mcp(&self, args: &str, agent: &str) -> String
Source§impl<B: RuntimeBridge> RuntimeHook<B>
impl<B: RuntimeBridge> RuntimeHook<B>
pub async fn dispatch_recall(&self, args: &str) -> String
pub async fn dispatch_remember(&self, args: &str) -> String
pub async fn dispatch_forget(&self, args: &str) -> String
pub async fn dispatch_memory(&self, args: &str) -> String
Source§impl<B: RuntimeBridge> RuntimeHook<B>
impl<B: RuntimeBridge> RuntimeHook<B>
Source§impl<B: RuntimeBridge> RuntimeHook<B>
impl<B: RuntimeBridge> RuntimeHook<B>
pub async fn dispatch_skill(&self, args: &str, agent: &str) -> String
Trait Implementations§
Source§impl<B: RuntimeBridge + 'static> Hook for RuntimeHook<B>
impl<B: RuntimeBridge + 'static> Hook for RuntimeHook<B>
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<B = NoBridge> !Freeze for RuntimeHook<B>
impl<B = NoBridge> !RefUnwindSafe for RuntimeHook<B>
impl<B> Send for RuntimeHook<B>
impl<B> Sync for RuntimeHook<B>
impl<B> Unpin for RuntimeHook<B>where
B: Unpin,
impl<B> UnsafeUnpin for RuntimeHook<B>where
B: UnsafeUnpin,
impl<B = NoBridge> !UnwindSafe for RuntimeHook<B>
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