use anyhow::Result;
use async_trait::async_trait;
use super::types::{RuntimeEventRecord, ThreadRecord, TurnRecord};
use super::{CreateThreadRequest, StartTurnRequest};
#[async_trait]
pub trait RuntimeThreadTaskPort: Send + Sync {
async fn create_thread(&self, req: CreateThreadRequest) -> Result<ThreadRecord>;
async fn start_turn(&self, thread_id: &str, req: StartTurnRequest) -> Result<TurnRecord>;
async fn interrupt_turn(&self, thread_id: &str, turn_id: &str) -> Result<TurnRecord>;
async fn events_since_async(
&self,
thread_id: &str,
since_seq: Option<u64>,
) -> Result<Vec<RuntimeEventRecord>>;
}