use localharness::{Agent, MockAgentConfig, MockConnection};
#[tokio::main]
async fn main() -> localharness::Result<()> {
let backend = MockConnection::builder()
.turn(|t| t.text("Hello from localharness — this is a scripted reply."))
.turn(|t| t.text("And here is the second turn, replayed in order."))
.build();
let agent = Agent::start_mock(MockAgentConfig::new(backend)).await?;
let first = agent.chat("anything — the mock ignores the prompt").await?;
println!("turn 1: {}", first.text().await?);
let second = agent.chat("again").await?;
println!("turn 2: {}", second.text().await?);
agent.shutdown().await?;
Ok(())
}