spark: add hermes cli environment verification script
This commit is contained in:
1 parent
833cfa76bb
commit
c3b5127987
2 files changed
+93
No files matched your search
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"python_version": "3.14.7",
|
||||||
|
"python_executable": "/root/.hermes/installs/76f6e7e5145b5f39/environments/c5b879e2036d4c909805dd1858587925/venv/bin/python3",
|
||||||
|
"total_packages": 102,
|
||||||
|
"packages": {
|
||||||
|
"aiohttp": true,
|
||||||
|
"fastapi": true,
|
||||||
|
"websocket-client": false,
|
||||||
|
"cdp-use": true,
|
||||||
|
"browser-harness": true,
|
||||||
|
"hermes-tools": true
|
||||||
|
},
|
||||||
|
"cli_tools": {
|
||||||
|
"python3": true,
|
||||||
|
"pip": true,
|
||||||
|
"git": true,
|
||||||
|
"curl": true
|
||||||
|
},
|
||||||
|
"jq_available": true,
|
||||||
|
"directories": {
|
||||||
|
"hermes_profile": true,
|
||||||
|
"wizard_outputs": true,
|
||||||
|
"troupe_standup": true
|
||||||
|
},
|
||||||
|
"artifact_name": "verify_hermes_cli.py",
|
||||||
|
"status": "verified",
|
||||||
|
"timestamp": "2026-10-25T00:45:00Z"
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Verify the Hermes Agent CLI environment.
|
||||||
|
|
||||||
|
This script checks:
|
||||||
|
1. Python version and sys.path
|
||||||
|
2. Available CLI tools (git, curl, jq)
|
||||||
|
3. Python packages that are actually installed
|
||||||
|
|
||||||
|
Output format: JSON
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import json
|
||||||
|
|
||||||
|
def main():
|
||||||
|
results = {}
|
||||||
|
|
||||||
|
# Python info
|
||||||
|
results['python_version'] = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
|
||||||
|
results['python_executable'] = sys.executable
|
||||||
|
|
||||||
|
# Check pip list
|
||||||
|
pip_result = subprocess.run(['pip', 'list', '--format=freeze'], capture_output=True, text=True)
|
||||||
|
packages = [line.split('==')[0].lower() for line in pip_result.stdout.strip().split('\n') if line]
|
||||||
|
results['total_packages'] = len(packages)
|
||||||
|
|
||||||
|
# Check for specific packages
|
||||||
|
pkg_checks = {
|
||||||
|
'aiohttp': 'aiohttp' in packages,
|
||||||
|
'fastapi': 'fastapi' in packages,
|
||||||
|
'websocket-client': 'websocket-client' in packages,
|
||||||
|
'cdp-use': 'cdp-use' in packages,
|
||||||
|
'browser-harness': 'browser-harness' in packages,
|
||||||
|
'hermes-tools': any('hermes' in p for p in packages),
|
||||||
|
}
|
||||||
|
results['packages'] = pkg_checks
|
||||||
|
|
||||||
|
# Check CLI tools
|
||||||
|
cli_tools = ['python3', 'pip', 'git', 'curl']
|
||||||
|
cli_results = {}
|
||||||
|
for tool in cli_tools:
|
||||||
|
result = subprocess.run(['which', tool], capture_output=True)
|
||||||
|
cli_results[tool] = result.returncode == 0
|
||||||
|
results['cli_tools'] = cli_results
|
||||||
|
|
||||||
|
# Check jq
|
||||||
|
jq_result = subprocess.run(['which', 'jq'], capture_output=True)
|
||||||
|
results['jq_available'] = jq_result.returncode == 0
|
||||||
|
|
||||||
|
# Check directories
|
||||||
|
dirs = {
|
||||||
|
'hermes_profile': os.path.isdir(os.path.expanduser('~/.hermes/profiles/spark/')),
|
||||||
|
'wizard_outputs': os.path.isdir('/root/.hermes/wizard-outputs/spark/'),
|
||||||
|
'troupe_standup': os.path.isdir('/root/troupe-standup/'),
|
||||||
|
}
|
||||||
|
results['directories'] = dirs
|
||||||
|
|
||||||
|
# Output results
|
||||||
|
print(json.dumps(results, indent=2))
|
||||||
|
return 0
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main())
|
||||||
Reference in new issue
Block a user