pub mod dsse;
pub mod executable_ban;
pub mod installer;
pub mod jcs_canonical;
pub mod manifest;
pub mod reader;
pub mod statement;
pub mod validator;
pub mod writer;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum MuragentError {
#[error("schema version mismatch: expected 'mur-agent/2', got '{0}'")]
SchemaMismatch(String),
#[error("manifest YAML parse error: {0}")]
ManifestParse(String),
#[error("manifest.signed.json mismatch: re-derived canonical JSON does not match embedded")]
SignedJsonMismatch,
#[error("DSSE verification failed: {0}")]
DsseError(String),
#[error("subject hash mismatch for '{path}': expected {expected}, got {actual}")]
SubjectHashMismatch {
path: String,
expected: String,
actual: String,
},
#[error("missing subject in tarball: '{0}'")]
MissingSubject(String),
#[error("extra file in tarball not in statement subjects: '{0}'")]
ExtraFile(String),
#[error("executable content detected: {0}")]
ExecutableContent(String),
#[error("forbidden MCP command: {0}")]
ForbiddenMcpCommand(String),
#[error("signature invalid for keyid '{0}'")]
InvalidSignature(String),
#[error("trust refused: {0}")]
TrustRefused(String),
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("{0}")]
Other(String),
}