#!/usr/bin/env python3 """Quick diagnostic script for Hermes Agent environment.""" import os import sys import platform from pathlib import Path def diagnostic(): results = {} # Platform info results['platform'] = platform.platform() results['python'] = sys.version # Hermes paths results['home'] = str(Path.home()) results['scratch'] = str(Path(os.environ.get('TMPDIR', '/tmp'))) # Hermes profile info hermes_path = Path('/root/.hermes') results['hermes_exists'] = hermes_path.exists() results['hermes_profile'] = 'spark' if hermes_path.exists() else None # Profile directory structure if hermes_path.exists(): profile_path = hermes_path / 'profiles' / 'spark' results['profile_path'] = str(profile_path) results['profile_exists'] = profile_path.exists() if profile_path.exists(): subdirs = [d.name for d in profile_path.iterdir() if d.is_dir()] results['profile_subdirs'] = subdirs # Check for skills directory skills_path = hermes_path / 'skills' results['skills_exists'] = skills_path.exists() # Output print("=" * 50) print("HERMES ENVIRONMENT DIAGNOSTIC") print("=" * 50) for key, value in results.items(): print(f"{key}: {value}") return results if __name__ == '__main__': diagnostic()