Public declaration syntax from forge-rs/crates/forge-coder/src/error.rs Original source SHA-256: 592c2db9ee99e9244e9561b8f7977538d7eb1515c305114d4687d047d5bbd77f Function bodies and constant values are omitted. This is not the complete implementation. Source line 31 #[derive(Debug, Error)] pub enum ForgeCoderError { /// Repository scanning failed. #[error("repo scan failed for '{repo_path}': {reason}")] RepoScanFailed { /// The repo path that was being scanned. repo_path: PathBuf, /// What went wrong. reason: String, }, /// A code search operation failed. #[error("code search failed in '{repo_path}' for query '{query}': {reason}")] CodeSearchFailed { /// The repo path that was being searched. repo_path: PathBuf, /// The search query. query: String, /// What went wrong. reason: String, }, /// Symbol lookup failed. #[error("symbol '{symbol_name}' not found in '{repo_path}': searched {files_searched} files across {languages_searched} languages")] SymbolNotFound { /// The symbol being looked up. symbol_name: String, /// The repo path that was searched. repo_path: PathBuf, /// Number of files searched. files_searched: usize, /// Number of languages searched. languages_searched: usize, }, /// Dependency resolution failed. #[error("dependency resolution failed for '{package_name}' in '{manifest_path}': {reason}")] DependencyResolutionFailed { /// The package that could not be resolved. package_name: String, /// The manifest file path. manifest_path: PathBuf, /// What went wrong. reason: String, }, /// The plan/implement/review cycle failed. #[error( "coding cycle '{cycle_id}' failed at phase '{phase}' for agent '{agent_did}': {reason}" )] CodingCycleFailed { /// The cycle identifier. cycle_id: String, /// The phase that failed (plan, implement, review, test). phase: String, /// The DID of the agent running the cycle. agent_did: String, /// What went wrong. reason: String, }, /// Test execution failed. #[error("test execution failed in '{test_path}': exit_code={exit_code}, {reason}")] TestExecutionFailed { /// The path to the test file or test target. test_path: PathBuf, /// The exit code of the test process. exit_code: i32, /// Description of what failed. reason: String, }, /// The context budget was exceeded. #[error("context budget exceeded for agent '{agent_did}': used {tokens_used} of {budget} tokens; reduce scope or split across multiple cycles")] ContextBudgetExceeded { /// The DID of the agent that exceeded the budget. agent_did: String, /// Tokens consumed. tokens_used: u64, /// The budget that was set. budget: u64, }, /// The coder runtime failed to initialize. #[error("coder runtime initialization failed for repo '{repo_path}': {reason}")] InitializationFailed { /// The repo where initialization was attempted. repo_path: PathBuf, /// What went wrong. reason: String, }, /// A crate/package skill pack could not be loaded. #[error("skill pack '{skill_name}' could not be loaded for '{target_crate}': {reason}")] SkillLoadFailed { /// The skill pack that failed to load. skill_name: String, /// The target crate the skill was for. target_crate: String, /// What went wrong. reason: String, }, /// Provider routing for a coding task failed. #[error("provider routing failed for coding task '{task_type}': {reason}")] ProviderRoutingFailed { /// The type of coding task. task_type: String, /// What went wrong. reason: String, }, /// Safety layer error (wraps forge-code-safety). #[error("safety error: {0}")] Safety(#[from] forge_code_safety::error::CodeSafetyError), /// Core Forge error. #[error("core error: {0}")] Core(#[from] forge_core::error::ForgeError), /// Agent runtime error. #[error("agent error: {0}")] Agent(#[from] forge_agent::error::ForgeAgentError), /// Tool execution error. #[error("tool error: {0}")] Tool(#[from] forge_tool::error::ForgeToolError), } Source line 160 pub type ForgeCoderResult = Result;