reagent-rs 0.2.7

A Rust library for building AI agents with MCP & custom tools
Documentation
use tokio::sync::mpsc::Sender;

use crate::{Notification, NotificationHandler};

pub struct NotificationOutputChannel {
    sender: Option<Sender<Notification>>,
    name: String,
}

impl NotificationOutputChannel {
    pub fn new(sender: Option<Sender<Notification>>, name: String) -> Self {
        Self { sender, name }
    }
}

impl NotificationHandler for NotificationOutputChannel {
    fn get_outgoing_channel(&self) -> &Option<Sender<Notification>> {
        &self.sender
    }

    fn get_channel_name(&self) -> &String {
        &self.name
    }
}