use async_trait::async_trait;
use turul_a2a_types::{Artifact, Message};
use crate::error::SinkError;
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ProgressState {
Working,
InputRequired,
AuthRequired,
}
#[async_trait]
pub trait SkillProgressSink: Send + Sync {
async fn set_status(
&self,
state: ProgressState,
message: Option<Message>,
) -> Result<(), SinkError>;
async fn emit_artifact(
&self,
artifact: Artifact,
append: bool,
last_chunk: bool,
) -> Result<(), SinkError>;
fn is_closed(&self) -> bool {
false
}
}
const _: fn() = || {
fn assert<T: ?Sized + SkillProgressSink>() {}
assert::<dyn SkillProgressSink>();
};