59 lines
2.0 KiB
Python
59 lines
2.0 KiB
Python
#!/usr/bin/env python3
|
|
"""Verify Hermes Agent tools are available and working."""
|
|
|
|
import subprocess
|
|
import sys
|
|
import os
|
|
|
|
def check_cmd_exists(cmd):
|
|
"""Check if a command exists using which."""
|
|
result = subprocess.run(['which', cmd], capture_output=True)
|
|
return result.returncode == 0
|
|
|
|
def main():
|
|
print("=== Hermes Tools Verification ===\n")
|
|
|
|
# Check basic tools
|
|
tools = ['python3', 'pip', 'git', 'curl']
|
|
print("Basic CLI tools:")
|
|
for tool in tools:
|
|
status = "OK" if check_cmd_exists(tool) else "MISSING"
|
|
print(f" {tool}: {status}")
|
|
|
|
# Check jq availability
|
|
jq_result = subprocess.run(['which', 'jq'], capture_output=True)
|
|
jq_status = "OK" if jq_result.returncode == 0 else "MISSING"
|
|
print(f" jq: {jq_status}")
|
|
|
|
# Check Python version
|
|
print(f"\nPython version: {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}")
|
|
|
|
# Check hermes_tools import
|
|
print("\nHermes Python packages:")
|
|
try:
|
|
import hermes_tools
|
|
print(f" hermes_tools: AVAILABLE at {hermes_tools.__file__}")
|
|
except ImportError as e:
|
|
print(f" hermes_tools: NOT AVAILABLE - {e}")
|
|
|
|
# Check pip packages
|
|
print("\nKey packages (pip list check):")
|
|
result = subprocess.run(['pip', 'list', '--format=freeze'], capture_output=True, text=True)
|
|
packages = result.stdout.strip().split('\n') if result.stdout.strip() else []
|
|
|
|
for pkg in ['aiohttp', 'fastapi', 'browser-harness', 'cdp-use']:
|
|
found = any(p.split('==')[0].lower() == pkg.lower() for p in packages if p)
|
|
print(f" {pkg}: {'OK' if found else 'MISSING'}")
|
|
|
|
# Check Hermes directories
|
|
print("\nHermes directories:")
|
|
for d in ['~/.hermes/profiles/spark/', '~/.hermes/skills/', '/root/troupe-standup/']:
|
|
expanded = os.path.expanduser(d)
|
|
exists = os.path.isdir(expanded)
|
|
print(f" {d}: {'EXISTS' if exists else 'MISSING'}")
|
|
|
|
print("\n=== Verification Complete ===")
|
|
return 0
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(main()) |