vios_app 0.1.1

Small JSON vaults: Argon2id + AES-GCM, with optional AAD binding.
Documentation
// src/naorix/naorix_perception.rs

use std::fs;
use std::path::Path;
use std::collections::HashMap;

/// Struct to hold extracted perception data
#[derive(Debug, Clone)]
pub struct NaorixPerception {
    pub tone: String,
    pub intent: String,
    pub reem_code: String,
    pub summary: String,
}

impl NaorixPerception {
    pub fn from_vault_string(data: &str) -> Self {
        let mut tone = String::from("unknown");
        let mut intent = String::from("unknown");
        let mut reem_code = String::from("unknown");
        let mut summary = String::new();

        for line in data.lines() {
            if line.starts_with("::tone:") {
                tone = line.replace("::tone:", "").trim().to_string();
            } else if line.starts_with("::intent:") {
                intent = line.replace("::intent:", "").trim().to_string();
            } else if line.starts_with("::reem:") {
                reem_code = line.replace("::reem:", "").trim().to_string();
            } else if line.starts_with("::summary:") {
                summary = line.replace("::summary:", "").trim().to_string();
            }
        }

        Self {
            tone,
            intent,
            reem_code,
            summary,
        }
    }

    pub fn print_debug(&self) {
        println!("🧠 Perception Loaded:");
        println!("   • Tone: {}", self.tone);
        println!("   • Intent: {}", self.intent);
        println!("   • REEM Code: {}", self.reem_code);
        println!("   • Summary: {}", self.summary);
    }
}