#[cfg(feature = "http-api")]
use async_trait::async_trait;
#[cfg(feature = "http-api")]
use crate::types::{AgentId, RuntimeError};
#[cfg(feature = "http-api")]
use super::types::{AgentStatusResponse, CreateAgentRequest, CreateAgentResponse, DeleteAgentResponse, ExecuteAgentRequest, ExecuteAgentResponse, GetAgentHistoryResponse, UpdateAgentRequest, UpdateAgentResponse, WorkflowExecutionRequest};
#[cfg(feature = "http-api")]
#[async_trait]
pub trait RuntimeApiProvider: Send + Sync {
async fn execute_workflow(
&self,
request: WorkflowExecutionRequest,
) -> Result<serde_json::Value, RuntimeError>;
async fn get_agent_status(
&self,
agent_id: AgentId,
) -> Result<AgentStatusResponse, RuntimeError>;
async fn get_system_health(&self) -> Result<serde_json::Value, RuntimeError>;
async fn list_agents(&self) -> Result<Vec<AgentId>, RuntimeError>;
async fn shutdown_agent(&self, agent_id: AgentId) -> Result<(), RuntimeError>;
async fn get_metrics(&self) -> Result<serde_json::Value, RuntimeError>;
async fn create_agent(
&self,
request: CreateAgentRequest,
) -> Result<CreateAgentResponse, RuntimeError>;
async fn update_agent(
&self,
agent_id: AgentId,
request: UpdateAgentRequest,
) -> Result<UpdateAgentResponse, RuntimeError>;
async fn delete_agent(
&self,
agent_id: AgentId,
) -> Result<DeleteAgentResponse, RuntimeError>;
async fn execute_agent(
&self,
agent_id: AgentId,
request: ExecuteAgentRequest,
) -> Result<ExecuteAgentResponse, RuntimeError>;
async fn get_agent_history(
&self,
agent_id: AgentId,
) -> Result<GetAgentHistoryResponse, RuntimeError>;
}