typesec_agent/executor.rs
1//! Task execution infrastructure.
2
3/// Error type for task execution failures.
4#[derive(Debug, thiserror::Error)]
5pub enum TaskError {
6 /// The action itself returned an error.
7 #[error("task error: {0}")]
8 ActionFailed(String),
9 /// A capability was required but could not be obtained.
10 #[error("capability error: {0}")]
11 Capability(#[from] typesec_core::policy::CapabilityError),
12}
13
14/// The result type for task execution.
15pub type TaskResult<T = ()> = Result<T, TaskError>;