openagent-aegis-policy · lineage
Declared module signatures, types, configuration, and source documentation.
Source: aegis/openagent-aegis-policy/src/lineage.rs. SHA-256: f8f831d7a059cdd1915b904f69c08c4c2040cb0640998174f1b6bae5c366896c.
This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.
lineage::LineagePolicy
Lineage policy dimensions.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct LineagePolicy {
/// Minimum conformance level required (0, 1, or 2).
pub min_conformance_level: Option<u8>,
/// Maximum allowed lineage depth (hops to human root).
pub max_lineage_depth: Option<u32>,
/// Required human root liveness period in days. If the human root's
/// liveness status is not `Active`, the interaction may be denied or
/// warned depending on the status.
pub required_human_root_liveness: Option<u32>,
/// Required attestation types that must be present. Currently checked
/// against `VerificationResult::warnings` for documentation purposes;
/// a full implementation would check an attestation registry.
pub required_attestations: Vec<String>,
/// DIDs of human roots that are banned.
pub banned_human_roots: Vec<String>
}Source line: 17.
lineage::LineagePolicyEvaluator
Evaluates lineage-aware policy constraints.
pub struct LineagePolicyEvaluator;Source line: 35.
lineage::LineagePolicyEvaluator::evaluate
Evaluate a lineage policy against a verification result.
Checks the following dimensions in order:
- Banned human roots -- deny if the human root is in the banned list.
- Conformance level -- deny if below minimum.
- Lineage depth -- deny if exceeds maximum.
- Human root liveness -- deny if liveness status is not Active.
- Signature and lineage validity -- deny if not valid.
Returns a deny PolicyDecision with reason on the first violation found.
Returns an allow PolicyDecision on success.
pub fn evaluate(
policy: &LineagePolicy,
verification: &VerificationResult,
) -> Result<PolicyDecision, PolicyError>;Source line: 49.