systemprompt-sync 0.9.0

Cloud sync services for systemprompt.io AI governance infrastructure. File, database, and crate deployment across governance tenants in the MCP governance pipeline.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Pure-function diff calculators for content.
//!
//! Each calculator hashes the disk-side and database-side representations
//! and emits a structured diff (`added`/`modified`/`removed`/`unchanged`)
//! without mutating either side.

mod content;

pub use content::ContentDiffCalculator;

use sha2::{Digest, Sha256};

pub fn compute_content_hash(body: &str, title: &str) -> String {
    let mut hasher = Sha256::new();
    hasher.update(title.as_bytes());
    hasher.update(body.as_bytes());
    hex::encode(hasher.finalize())
}