(dir: &Path, run_id: &str)
| 757 | } |
| 758 | |
| 759 | fn remove_lifecycle(dir: &Path, run_id: &str) -> CliResult<()> { |
| 760 | validate_run_id(run_id)?; |
| 761 | match fs::remove_file(lifecycle_path(dir, run_id)) { |
| 762 | Ok(()) => Ok(()), |
| 763 | Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(()), |
| 764 | Err(e) => Err(CliError::Internal(anyhow!( |
| 765 | "failed to remove managed lifecycle '{}': {}", |
| 766 | run_id, |
| 767 | e |
| 768 | ))), |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | fn sessions_for_run(dot_dir: &Path, run_id: &str) -> Vec<AgentSession> { |
| 773 | let Ok(store) = SessionStore::new(dot_dir.join("sessions")) else { |
no test coverage detected