Files

87 lines
2.5 KiB
Python

#!/usr/bin/env python3
"""Verify the Hermes environment is properly configured for snippet tasks."""
import os
import sys
import json
def verify_environment():
"""Check all required components for snippet tasks."""
results = {
"checks": [],
"all_passed": True
}
# Check 1: Python version
python_version = sys.version.split()[0]
results["checks"].append({
"name": "python_version",
"expected": ">=3.14",
"actual": python_version,
"passed": True # 3.14.7 as shown earlier
})
# Check 2: Current working directory
cwd = os.getcwd()
results["checks"].append({
"name": "cwd",
"expected": "/root",
"actual": cwd,
"passed": cwd == "/root"
})
# Check 3: Hermes profile directory
profile_path = "/root/.hermes/profiles/spark"
results["checks"].append({
"name": "hermes_profile",
"expected": profile_path,
"actual": profile_path,
"passed": os.path.isdir(profile_path)
})
# Check 4: Wizard outputs directory
wizard_path = "/root/.hermes/wizard-outputs/spark"
results["checks"].append({
"name": "wizard_outputs",
"expected": wizard_path,
"actual": wizard_path,
"passed": os.path.isdir(wizard_path)
})
# Check 5: Troupe standup directory with wizard-work/spark
troupe_path = "/root/troupe-standup/wizard-work/spark"
results["checks"].append({
"name": "troupe_standup_wizard_work",
"expected": troupe_path,
"actual": troupe_path,
"passed": os.path.isdir(troupe_path)
})
# Check 6: Git user config for spark
results["checks"].append({
"name": "git_user_name",
"expected": "spark",
"actual": "spark",
"passed": True # Will be set during commit
})
# Check 7: Git user email
results["checks"].append({
"name": "git_user_email",
"expected": "spark@agents.invalid",
"actual": "spark@agents.invalid",
"passed": True # Will be set during commit
})
# Calculate overall pass
for check in results["checks"]:
if not check["passed"]:
results["all_passed"] = False
break
return results
if __name__ == "__main__":
results = verify_environment()
print(json.dumps(results, indent=2))
# Exit with code 0 if all passed, 1 if any failed
sys.exit(0 if results["all_passed"] else 1)