1use thiserror::Error;
3
4#[derive(Debug, Error)]
6pub enum Error {
7 #[error("BPF LSM not available: {0}")]
8 BpfNotAvailable(String),
9
10 #[error("cgroup v2 not available: {0}")]
11 CgroupNotAvailable(String),
12
13 #[error("Landlock not available: {0}")]
14 LandlockNotAvailable(String),
15
16 #[error("seccomp not available: {0}")]
17 SeccompNotAvailable(String),
18
19 #[error("eBPF not available: {0}")]
20 EbpfNotAvailable(String),
21
22 #[error("Security operation failed: {0}")]
23 SecurityOperation(String),
24
25 #[error("Guard not initialized")]
26 NotInitialized,
27
28 #[error("Invalid configuration: {0}")]
29 InvalidConfig(String),
30
31 #[error("MCP broker error: {0}")]
32 McpBroker(String),
33}
34
35pub type Result<T> = std::result::Result<T, Error>;