aivcs_core/role_orchestration/
error.rs1#[derive(Debug, thiserror::Error)]
5pub enum RoleError {
6 #[error("role {role} does not accept handoffs from {from}")]
7 UnauthorizedHandoff { role: String, from: String },
8
9 #[error("handoff token integrity check failed: {reason}")]
10 InvalidHandoffToken { reason: String },
11
12 #[error("task decomposition produced no subtasks for role {role}")]
13 EmptyDecomposition { role: String },
14
15 #[error("role conflict: {description}")]
16 ConflictDetected { description: String },
17
18 #[error("parallel role execution error: {detail}")]
19 ParallelExecutionFailed { detail: String },
20
21 #[error("domain error: {0}")]
22 Domain(#[from] crate::domain::error::AivcsError),
23}
24
25pub type RoleResult<T> = std::result::Result<T, RoleError>;