assay-cli 7.0.1

Policy-as-code gate for MCP agent tool calls, with verifiable evidence and Linux kernel enforcement.
1
2
3
4
5
6
7
8
9
10
use anyhow::{bail, Result};

// Receipt schema bound, distinct from the narrower Trust Basis claim rules.
// Preserve accepted references verbatim; JSON Schema length counts Unicode scalars.
pub(super) fn validate_source_artifact_ref(reference: &str) -> Result<()> {
    if !(1..=512).contains(&reference.chars().count()) {
        bail!("source-artifact-ref must contain 1 to 512 Unicode scalar values");
    }
    Ok(())
}