agengo 0.3.0

Orchestrate AI coding agents (Claude Code) to build, verify, review and integrate tasks in isolated Git worktrees
//! Typed failures that the engine reacts to.
//!
//! Recovery decisions used to depend on matching error message text. These
//! types let callers branch with `downcast_ref` instead.

use std::fmt;

/// A dispatched task's starting commit lacks an integrated dependency.
#[derive(Debug)]
pub struct DependencyMissing {
    pub task: String,
    pub start: String,
    pub dependency: String,
}
impl fmt::Display for DependencyMissing {
    fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(
            formatter,
            "{} starting commit {} does not contain integrated dependency {}",
            self.task, self.start, self.dependency
        )
    }
}
impl std::error::Error for DependencyMissing {}

/// The task's own verification commands failed on a builder candidate.
#[derive(Debug)]
pub struct VerifyFailed(pub String);
impl fmt::Display for VerifyFailed {
    fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
        formatter.write_str(&self.0)
    }
}
impl std::error::Error for VerifyFailed {}

/// The Python duplicate gate found new duplicated functions.
#[derive(Debug)]
pub struct DuplicatesFound(pub String);
impl fmt::Display for DuplicatesFound {
    fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
        formatter.write_str(&self.0)
    }
}
impl std::error::Error for DuplicatesFound {}