rho-coding-agent 3.13.0

A fast Rust agent harness with a small footprint and opinionated defaults
Documentation
//! Generic ACP client mechanics: transport, handshake, turns, and run artifacts.
//!
//! Agent-specific argv, configuration, permission policy, and extension answers
//! belong to the owning runtime, never to this driver.

pub(crate) mod adapters;
pub(crate) mod agent_tools;
mod asks;
pub(crate) mod config_probe;
mod connection;
mod deciders;
mod driver;
mod elicitation;
mod handshake;
pub(crate) mod one_shot;
pub(crate) mod permission;
pub(crate) mod person;
pub(crate) mod policy;
pub(crate) mod runtime_children;
mod session;
mod steering;
mod transport;
mod turn;
mod v2;

pub(crate) use policy::{
    AcpAgentPolicy, AcpProtocol, AcpSpawnPlan, AgentToolCallRef, ExtensionAnswer, NestedAgents,
    SessionConfigChoice,
};
pub(crate) use session::AcpSessionRequest;

/// Run one delegated ACP process through the shared artifact boundary.
/// The implementation mechanics and single terminal-write gate live in session.
pub(crate) async fn run_session<P: AcpAgentPolicy>(
    mut request: AcpSessionRequest,
    policy: P,
) -> anyhow::Result<()> {
    let mut sink = session::open_sink(&mut request, &policy)?;
    let mut renderer =
        crate::cli_runtime::agent_event::render::EventRenderer::new(request.cwd.clone());
    let outcome = session::run_child(&mut request, policy, &mut renderer, &mut sink).await;
    session::run_ended(&mut renderer, &mut sink);
    if let Some(inbox) = request.parent_messages.as_ref() {
        inbox.seal();
    }
    session::settle(sink, outcome).await;
    Ok(())
}

// Debug builds also serve it as `rho __acp-fixture-agent` for offline E2E.
#[cfg(any(test, debug_assertions))]
pub(crate) mod scripted_agent;

#[cfg(test)]
mod test_support;

#[cfg(test)]
#[path = "attended_tests.rs"]
mod attended_tests;
#[cfg(all(test, unix))]
#[path = "process_tests.rs"]
mod process_tests;
#[cfg(test)]
#[path = "session_tests.rs"]
mod tests;
#[cfg(test)]
#[path = "session_v2_tests.rs"]
mod v2_tests;