use crate::{DriverScheduler, WorkflowCallback, WorkflowExecutor, WorkflowMode};
use serde::{Deserialize, Serialize};
use std::sync::Arc;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct IntentAnalysisResult {
pub categories: Vec<String>,
pub clean_intent: String,
}
#[derive(Debug, Clone)]
pub struct WorkflowExecResult {
pub json_output: String,
pub original_input: String,
}
#[derive(Debug, Clone)]
pub struct FormatResult {
pub final_output: String,
pub was_converted: bool,
}
#[async_trait::async_trait]
pub trait Pipeline: Send + Sync {
async fn intent_analysis(&self, scheduler: &DriverScheduler, input: &str, task_id: &str) -> anyhow::Result<IntentAnalysisResult>;
async fn workflow_execution(
&self,
mode: WorkflowMode,
executor: &WorkflowExecutor,
scheduler: &DriverScheduler,
input: &str,
disabled_drivers: Option<&[String]>,
) -> WorkflowExecResult;
async fn response_formatting(&self, scheduler: &DriverScheduler, original_input: &str, json_output: &str, task_id: &str) -> FormatResult;
}