From 2fe9e91005f8f4044990c8d9c7bc2f2ddf880a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Thu, 14 May 2026 22:19:05 +0200 Subject: [PATCH] hive-ag3nt: echo turn (placeholder until claude integration) --- hive-ag3nt/src/bin/hive-ag3nt.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hive-ag3nt/src/bin/hive-ag3nt.rs b/hive-ag3nt/src/bin/hive-ag3nt.rs index 021c400..58327eb 100644 --- a/hive-ag3nt/src/bin/hive-ag3nt.rs +++ b/hive-ag3nt/src/bin/hive-ag3nt.rs @@ -62,6 +62,18 @@ async fn serve(socket: &std::path::Path, interval: Duration) -> Result<()> { match client::request(socket, AgentRequest::Recv).await { Ok(AgentResponse::Message { from, body }) => { tracing::info!(%from, %body, "inbox"); + // Placeholder "turn": echo back, prefixed. Phase 3c replaces this + // with `claude --print` once API-key plumbing exists. Don't echo + // an echo, so a manual `send` produces exactly one reply. + if !body.starts_with("echo: ") { + let reply = AgentRequest::Send { + to: from.clone(), + body: format!("echo: {body}"), + }; + if let Err(e) = client::request(socket, reply).await { + tracing::warn!(error = ?e, "send reply failed"); + } + } } Ok(AgentResponse::Empty) => {} Ok(AgentResponse::Ok) => {