Add ACP agent steps, JUnit reports and session detail screen
- acp.rs: ACP client for hx serve --acp, hx/* events into the event table - tests/fake_acp_hx.py: Python fake hx for the runner tests - runner.rs: agent steps, blocked catches, failure context, junit test events - junit.rs: JUnit XML parser (counts, failing tests, locations) - detail.rs + tui/session.rs: session detail screen with machine view - tui: enter/esc navigation, pagers for test output, diff and transcript Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d66a014bc5
commit
5b659fa8ba
14 files changed
+2676
-91
No files matched your search
+10
-2
@@ -1,5 +1,8 @@
|
||||
mod acp;
|
||||
mod adapter;
|
||||
mod db;
|
||||
mod detail;
|
||||
mod junit;
|
||||
mod lock;
|
||||
mod machine;
|
||||
mod policy;
|
||||
@@ -70,7 +73,7 @@ enum Cmd {
|
||||
#[arg(long)]
|
||||
check: bool,
|
||||
},
|
||||
/// Create a state-machine session in REPO and run it to the end (computer steps only for now).
|
||||
/// Create a state-machine session in REPO and run it to the end (human steps are not supported yet).
|
||||
Session {
|
||||
#[arg(long)]
|
||||
repo: PathBuf,
|
||||
@@ -82,6 +85,9 @@ enum Cmd {
|
||||
/// Value for {{scope}} in machine commands.
|
||||
#[arg(long, default_value = "")]
|
||||
scope: String,
|
||||
/// Profile that says how to start hx for agent steps.
|
||||
#[arg(long, default_value = "default")]
|
||||
profile: String,
|
||||
},
|
||||
/// hx extension that enforces a run's tool allowlist (started by hx, not by hand).
|
||||
#[command(hide = true)]
|
||||
@@ -129,7 +135,9 @@ fn main() -> Result<std::process::ExitCode> {
|
||||
machine,
|
||||
name,
|
||||
scope,
|
||||
profile,
|
||||
} => {
|
||||
let profile = profile::Profile::load(&profile)?;
|
||||
let repo = repo.canonicalize()?;
|
||||
let m = machine::Machine::find(&machine, &repo)?;
|
||||
let db = db::Db::open(&repo.join(".hx/orch.db"))?;
|
||||
@@ -137,7 +145,7 @@ fn main() -> Result<std::process::ExitCode> {
|
||||
let base = repo.file_name().unwrap_or_default();
|
||||
let wts = state_dir().join("worktrees").join(base);
|
||||
let s = runner::create(&db, &wts, &name, "", &machine)?;
|
||||
let status = runner::run_session(&db, &m, &s.id, &repo, &scope)?;
|
||||
let status = runner::run_session(&db, &m, &s.id, &repo, &scope, &profile)?;
|
||||
println!("{} {} -> {status}", s.id, s.branch);
|
||||
Ok(code(status == "merged"))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user