pub struct ServiceRegistry {
pub tools: BTreeMap<String, Arc<ServiceHandle>>,
pub query: BTreeMap<String, Arc<ServiceHandle>>,
pub tool_schemas: Vec<Tool>,
}Expand description
Capability-indexed runtime state built during handshake.
Fields§
§tools: BTreeMap<String, Arc<ServiceHandle>>Tool name → owning service handle.
query: BTreeMap<String, Arc<ServiceHandle>>Service name → handle (for ServiceQuery routing).
tool_schemas: Vec<Tool>Tool schemas collected from all extension services.
Implementations§
Source§impl ServiceRegistry
impl ServiceRegistry
Sourcepub async fn dispatch_tool(
&self,
name: &str,
args: &str,
agent: &str,
task_id: Option<u64>,
) -> Option<String>
pub async fn dispatch_tool( &self, name: &str, args: &str, agent: &str, task_id: Option<u64>, ) -> Option<String>
Dispatch a tool call to the owning extension service.
Returns None if the tool is not in the registry.
Sourcepub async fn register_tools(&self, tools: &mut ToolRegistry)
pub async fn register_tools(&self, tools: &mut ToolRegistry)
Register tool schemas into the tool registry.
Trait Implementations§
Source§impl Default for ServiceRegistry
impl Default for ServiceRegistry
Source§fn default() -> ServiceRegistry
fn default() -> ServiceRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ServiceRegistry
impl !RefUnwindSafe for ServiceRegistry
impl Send for ServiceRegistry
impl Sync for ServiceRegistry
impl Unpin for ServiceRegistry
impl UnsafeUnpin for ServiceRegistry
impl !UnwindSafe for ServiceRegistry
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