pub struct ConductorImpl<Host: ConductorHostRole> { /* private fields */ }Expand description
The conductor manages the proxy chain lifecycle and message routing.
It maintains connections to all components in the chain and routes messages bidirectionally between the editor, components, and agent.
Implementations§
Source§impl<Host: ConductorHostRole> ConductorImpl<Host>
impl<Host: ConductorHostRole> ConductorImpl<Host>
pub fn new( host: Host, name: impl ToString, instantiator: Host::Instantiator, mcp_bridge_mode: McpBridgeMode, ) -> Self
Source§impl ConductorImpl<Agent>
impl ConductorImpl<Agent>
Sourcepub fn new_agent(
name: impl ToString,
instantiator: impl InstantiateProxiesAndAgent + 'static,
mcp_bridge_mode: McpBridgeMode,
) -> Self
pub fn new_agent( name: impl ToString, instantiator: impl InstantiateProxiesAndAgent + 'static, mcp_bridge_mode: McpBridgeMode, ) -> Self
Create a conductor in agent mode (the last component is an agent).
Source§impl ConductorImpl<Proxy>
impl ConductorImpl<Proxy>
Sourcepub fn new_proxy(
name: impl ToString,
instantiator: impl InstantiateProxies + 'static,
mcp_bridge_mode: McpBridgeMode,
) -> Self
pub fn new_proxy( name: impl ToString, instantiator: impl InstantiateProxies + 'static, mcp_bridge_mode: McpBridgeMode, ) -> Self
Create a conductor in proxy mode (forwards to another conductor).
Source§impl<Host: ConductorHostRole> ConductorImpl<Host>
impl<Host: ConductorHostRole> ConductorImpl<Host>
Sourcepub fn trace_to(self, dest: impl WriteEvent) -> Self
pub fn trace_to(self, dest: impl WriteEvent) -> Self
Enable trace logging to a custom destination.
Use sacp-trace-viewer to view the trace as an interactive sequence diagram.
Sourcepub fn trace_to_path(self, path: impl AsRef<Path>) -> Result<Self>
pub fn trace_to_path(self, path: impl AsRef<Path>) -> Result<Self>
Enable trace logging to a file path.
Events will be written as newline-delimited JSON (.jsons format).
Use sacp-trace-viewer to view the trace as an interactive sequence diagram.
Sourcepub fn with_trace_writer(self, writer: TraceWriter) -> Self
pub fn with_trace_writer(self, writer: TraceWriter) -> Self
Enable trace logging with an existing TraceWriter.
Trait Implementations§
Source§impl<Host: ConductorHostRole> ConnectTo<<Host as Role>::Counterpart> for ConductorImpl<Host>
impl<Host: ConductorHostRole> ConnectTo<<Host as Role>::Counterpart> for ConductorImpl<Host>
Auto Trait Implementations§
impl<Host> Freeze for ConductorImpl<Host>where
<Host as Role>::Counterpart: Sized,
Host: Freeze,
<Host as ConductorHostRole>::Instantiator: Freeze,
impl<Host> !RefUnwindSafe for ConductorImpl<Host>
impl<Host> Send for ConductorImpl<Host>
impl<Host> !Sync for ConductorImpl<Host>
impl<Host> Unpin for ConductorImpl<Host>where
<Host as Role>::Counterpart: Sized,
Host: Unpin,
<Host as ConductorHostRole>::Instantiator: Unpin,
impl<Host> UnsafeUnpin for ConductorImpl<Host>where
<Host as Role>::Counterpart: Sized,
Host: UnsafeUnpin,
<Host as ConductorHostRole>::Instantiator: UnsafeUnpin,
impl<Host> !UnwindSafe for ConductorImpl<Host>
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