pub trait ChannelFactory: Send + Sync {
// Required methods
fn channel_type(&self) -> &str;
fn build_review(
&self,
config: &Value,
) -> Result<Box<dyn ReviewChannel>, ReviewChannelError>;
fn build_session(
&self,
config: &Value,
) -> Result<Box<dyn SessionChannel>, SessionChannelError>;
fn capabilities(&self) -> ChannelCapabilitySet;
}Expand description
Factory trait for creating channel instances.
Each channel plugin (terminal, Slack, Discord, email, webhook) implements this trait. The registry holds factories, and the routing config decides which factory handles which concern.
Required Methods§
Sourcefn channel_type(&self) -> &str
fn channel_type(&self) -> &str
Channel type name (e.g., “terminal”, “slack”, “discord”, “email”, “webhook”).
Sourcefn build_review(
&self,
config: &Value,
) -> Result<Box<dyn ReviewChannel>, ReviewChannelError>
fn build_review( &self, config: &Value, ) -> Result<Box<dyn ReviewChannel>, ReviewChannelError>
Create a ReviewChannel for human review interactions.
Sourcefn build_session(
&self,
config: &Value,
) -> Result<Box<dyn SessionChannel>, SessionChannelError>
fn build_session( &self, config: &Value, ) -> Result<Box<dyn SessionChannel>, SessionChannelError>
Create a SessionChannel for agent-human streaming.
Sourcefn capabilities(&self) -> ChannelCapabilitySet
fn capabilities(&self) -> ChannelCapabilitySet
What this channel type supports.