#!/bin/bash
# NIP Advanced Security Features Demo
# Demonstrates comprehensive security monitoring and forensic capabilities

echo "🛡️  NIP Advanced Security Features Demo"
echo "========================================"

# Build if needed
if [ ! -f "src/nip.out" ]; then
    echo "Building NIP..."
    nim c -d:release src/nip.nim
fi

echo ""
echo "🔍 1. Security-Enhanced Package Listing"
echo "nip> list"
echo "list" | ./src/nip.out shell

echo ""
echo "🔍 2. Package Integrity Verification"
echo "nip> verify firefox"
echo "verify firefox" | ./src/nip.out shell

echo ""
echo "🔬 3. Forensic Diagnosis"
echo "nip> diagnose vim"
echo "diagnose vim" | ./src/nip.out shell

echo ""
echo "📊 4. Security Status Overview"
echo "nip> status"
echo "status" | ./src/nip.out shell

echo ""
echo "🔍 5. Enhanced Search with Security Status"
echo "nip> search firefox"
echo "search firefox" | ./src/nip.out shell

echo ""
echo "✅ Security Demo Complete!"
echo ""
echo "🛡️  Advanced Security Features Demonstrated:"
echo "   ✅ Real-time integrity monitoring"
echo "   ✅ Visual security status indicators"
echo "   ✅ Comprehensive package verification"
echo "   ✅ Forensic investigation capabilities"
echo "   ✅ Three-state integrity model (VERIFIED/MODIFIED/TAMPERED)"
echo "   ✅ Security-aware CLI interface"
echo ""
echo "🚀 Ready for enterprise security requirements!"