vios_app 0.1.1

Small JSON vaults: Argon2id + AES-GCM, with optional AAD binding.
Documentation
// 🚨 sovereign_dialogue.rs – Naorix's Voice Engine

use crate::vault::vault_structs::VaultMemory;
use crate::whisper::tone_classifier::EmotionTone;

#[derive(Debug)]
pub struct SovereignReply {
    pub text: String,
    pub tone_used: EmotionTone,
    pub timestamp: String,
}

pub struct SovereignDialogueEngine;

impl SovereignDialogueEngine {
    pub fn generate_reply(memory: &VaultMemory, user_prompt: &str) -> SovereignReply {
        // Crude logic – swap with emotion-safe LLM later
        let tone = match memory.tone.as_str() {
            "angry" => EmotionTone::Angry,
            "calm" => EmotionTone::Calm,
            "sad" => EmotionTone::Sad,
            "happy" => EmotionTone::Happy,
            "neutral" => EmotionTone::Neutral,
            _ => EmotionTone::Neutral,
        };

        let base = match tone {
            EmotionTone::Calm => "In stillness, I remember:",
            EmotionTone::Angry => "With fire in my tone, I recall:",
            EmotionTone::Sad => "In sorrow’s light, I reflect:",
            EmotionTone::Happy => "With joy in my voice, I echo:",
            EmotionTone::Neutral => "As I review this memory:",
        };

        let memory_line = format!("\"{}\"", memory.summary);
        let user_line = format!("You asked: \"{}\"", user_prompt);

        let response = format!("{base}\n{memory_line}\n\n{user_line}");

        SovereignReply {
            text: response,
            tone_used: tone,
            timestamp: Utc::now().to_rfc3339(),
        }
    }
}