Skip to main content

Module interfaces

Module interfaces 

Source
Expand description

Trait interfaces for ToolRegistry subsystems.

Each trait isolates a single responsibility from the monolithic ToolRegistry, enabling independent testing and substitutability. Implementors can be swapped for test doubles without constructing the full 35-field registry.

§Design Principles

  • One trait per concern: security, PTY, MCP, resilience, catalog, metrics.
  • Async where needed: methods that touch I/O or locks are async.
  • Send + Sync bounds: all traits require thread-safety for Arc<dyn Trait> usage.
  • Return owned types: avoid lifetime entanglement with the implementor.

Traits§

McpBridge
Model Context Protocol (MCP) tool bridge.
PtySessionControl
PTY (pseudo-terminal) session lifecycle management.
ToolCatalog
Tool catalog: registration, lookup, and schema access.
ToolMetrics
Tool execution metrics and history tracking.
ToolRegistryApi
Full tool registry API: the union of all subsystem traits.
ToolResilience
Execution resilience: circuit breakers, adaptive timeouts, failure tracking.
ToolSecurity
Security and policy enforcement for tool execution.

Type Aliases§

SharedRegistry
Type alias for a shared, dynamically-dispatched tool registry.