use async_trait::async_trait;
use atomr_agents_core::{Result, Value};
use serde::{Deserialize, Serialize};
use crate::state::HarnessState;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum StepOutcome {
Continue { working_memory: Value, label: String },
Done { output: Value, label: String },
}
#[async_trait]
pub trait LoopStrategy: Send + Sync + 'static {
async fn step(&self, state: &mut HarnessState) -> Result<StepOutcome>;
}
#[async_trait]
impl LoopStrategy for Box<dyn LoopStrategy> {
async fn step(&self, state: &mut HarnessState) -> Result<StepOutcome> {
(**self).step(state).await
}
}