feat: add ACP server skeleton with stdout-purity test

This commit is contained in:
2026-07-27 17:31:47 -06:00
parent f1415067f2
commit f11d4ca760
5 changed files with 242 additions and 5 deletions
+15
View File
@@ -234,6 +234,10 @@ pub struct Cli {
/// prompting. Implies --dangerously-skip-permissions. Incompatible with REPL mode (requires a prompt).
#[arg(long, help_heading = "Sandbox")]
pub headless: bool,
/// Run as an ACP agent server over stdio (JSON-RPC 2.0). Every stdout byte must be valid JSON-RPC.
/// Implies --headless. Single session per process.
#[arg(long, help_heading = "Sandbox")]
pub acp_server: bool,
/// Display information
#[arg(long, help_heading = "Diagnostics & Tools")]
pub info: bool,
@@ -505,6 +509,17 @@ mod tests {
assert!(!parse(&[]).headless);
}
#[test]
fn parse_acp_server_flag() {
let cli = parse(&["--acp-server"]);
assert!(cli.acp_server);
}
#[test]
fn parse_acp_server_default_off() {
assert!(!parse(&[]).acp_server);
}
#[test]
fn parse_sync_models_flag() {
let cli = parse(&["--sync-models"]);