rho-coding-agent 3.13.0

A fast Rust agent harness with a small footprint and opinionated defaults
Documentation
use pretty_assertions::assert_eq;

use super::*;

// Covers: the run writes the exact agy agent file at the path agy discovers
// (`<root>/.agents/agents/<name>.md`) with the kept tools as its allowlist,
// and the MCP servers the agent may use, none listed when it gets none,
// under a name no other run (or project) shares. Kills: rho's server left
// out of `mcpServers:` (agy hides its tools from the run's agent).
// Owner: Antigravity agent file; the live agy E2E proves agy honors it.
#[test]
fn writes_the_allowlist_where_agy_discovers_agents() {
    let run_dir = tempfile::tempdir().unwrap();
    let tools = [AntigravityTool::ReadFile, AntigravityTool::RunCommand];
    let mut written = Vec::new();
    for servers in [&[][..], &["rho"]] {
        let agent = write(run_dir.path(), &tools, servers).unwrap();
        let file = agent.root.join(format!(".agents/agents/{}.md", agent.name));
        let text = std::fs::read_to_string(file).unwrap();
        written.push((agent.root, text.replace(&agent.name, "<name>")));
    }
    let root = run_dir.path().join("agy");
    assert_eq!(
        written,
        vec![
            (
                root.clone(),
                "---\nname: <name>\ndescription: Rho delegated run.\ntools:\n  - read_file\n  - run_command\n---\n".to_owned()
            ),
            (
                root,
                "---\nname: <name>\ndescription: Rho delegated run.\ntools:\n  - read_file\n  - run_command\nmcpServers:\n  - rho\n---\n".to_owned()
            ),
        ]
    );
    let first = write(run_dir.path(), &tools, &[]).unwrap().name;
    assert_ne!(write(run_dir.path(), &tools, &[]).unwrap().name, first);
}