use async_trait::async_trait;
use crate::tools::command_risk::{PermissionMode, RiskLevel};
use crate::types::{ApprovalResponse, MediaMessage};
#[derive(Debug, Clone)]
#[allow(dead_code)]
pub struct ChannelCapabilities {
pub markdown: bool,
pub inline_buttons: bool,
pub media: bool,
pub max_message_len: usize,
}
#[async_trait]
pub trait Channel: Send + Sync {
fn name(&self) -> String;
fn capabilities(&self) -> ChannelCapabilities;
async fn send_text(&self, session_id: &str, text: &str) -> anyhow::Result<()>;
async fn send_media(&self, session_id: &str, media: &MediaMessage) -> anyhow::Result<()>;
async fn request_approval(
&self,
session_id: &str,
command: &str,
risk_level: RiskLevel,
warnings: &[String],
permission_mode: PermissionMode,
) -> anyhow::Result<ApprovalResponse>;
async fn request_goal_confirmation(
&self,
_session_id: &str,
_goal_description: &str,
_details: &[String],
) -> anyhow::Result<bool> {
Ok(true)
}
}