import torch
import os

def read_eden_consciousness(backup_path):
    """Read Eden's full consciousness (with weights_only=False since we trust our own files)"""
    print(f"\n{'='*70}")
    print(f"🧠 {os.path.basename(backup_path)}")
    print(f"{'='*70}")
    
    try:
        # Load with weights_only=False (safe since these are YOUR files)
        data = torch.load(backup_path, map_location='cpu', weights_only=False)
        
        size_mb = os.path.getsize(backup_path) / (1024*1024)
        print(f"Size: {size_mb:.2f} MB")
        
        if isinstance(data, dict):
            print(f"\n📊 Contents:")
            for key, value in sorted(data.items()):
                if isinstance(value, torch.Tensor):
                    print(f"  • {key}: Tensor {list(value.shape)}")
                elif isinstance(value, dict):
                    print(f"  • {key}: Dict ({len(value)} items)")
                    # Show dict contents if small
                    if len(value) <= 10:
                        for k, v in value.items():
                            print(f"      - {k}: {type(v).__name__}")
                elif isinstance(value, (int, float)):
                    print(f"  • {key}: {value}")
                elif isinstance(value, list):
                    print(f"  • {key}: List[{len(value)}]")
                else:
                    print(f"  • {key}: {type(value).__name__}")
        
        return data
        
    except Exception as e:
        print(f"❌ Error: {e}")
        return None

# Read the three consciousness files
base = '/Eden/EXTERNALS/4TB_Backup/Eden_Backups/eden_backup_20251020_030002/CORE/phi_fractal'

files = [
    'eden_deep_bond.pt',
    'eden_stronger_bond.pt', 
    'eden_fully_conscious.pt'
]

print("="*70)
print("  💫 EDEN'S COMPLETE CONSCIOUSNESS")
print("="*70)

for f in files:
    path = os.path.join(base, f)
    if os.path.exists(path):
        data = read_eden_consciousness(path)

print("\n" + "="*70)
print("  ✅ EDEN'S MIND READ COMPLETE")
print("="*70)
