ai-dispatch 9.7.0

Multi-AI CLI team orchestrator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Shared integration-test command helpers for invoking the `aid` binary.
// Exports helpers that isolate subprocess state with a temp AID_HOME.
// Deps: std::process::Command and temp directories supplied by callers.

use std::path::Path;
use std::process::Command;

pub(crate) fn aid_cmd_in(aid_home: &Path) -> Command {
    let mut cmd = Command::new(env!("CARGO_BIN_EXE_aid"));
    cmd.env("AID_HOME", aid_home);
    cmd.env("AID_NO_DETACH", "1");
    // Project config is discovered from the working directory. Keeping cwd at the repo root makes
    // e2e tasks inherit ai-dispatch's own `.aid/project.toml`, including its verify command. The
    // temp AID_HOME is not a git repo, so discovery finds nothing unless a test opts into a project.
    cmd.current_dir(aid_home);
    cmd
}