statehouse-daemon 0.1.0

Strongly consistent state and memory engine for AI agents
use std::process::Command;

fn main() {
    // Get git SHA at build time
    let git_sha = Command::new("git")
        .args(&["rev-parse", "--short", "HEAD"])
        .output()
        .ok()
        .and_then(|output| {
            if output.status.success() {
                String::from_utf8(output.stdout).ok()
            } else {
                None
            }
        })
        .map(|s| s.trim().to_string())
        .unwrap_or_else(|| "unknown".to_string());

    println!("cargo:rustc-env=GIT_SHA={}", git_sha);
    
    // Rerun if .git/HEAD changes (new commit)
    println!("cargo:rerun-if-changed=../../.git/HEAD");
}