44 lines
1.3 KiB
Python
44 lines
1.3 KiB
Python
#!/usr/bin/env python3
|
|
"""Analyze available Hermes tools and generate a report."""
|
|
|
|
import json
|
|
import inspect
|
|
import os
|
|
|
|
def analyze_tools():
|
|
"""Analyze tools and return a summary dict."""
|
|
# Check environment
|
|
env_vars = {k: v[:20] if len(v) > 20 else v for k, v in os.environ.items()
|
|
if k in ['PATH', 'HOME', 'USER', 'FORGE_TOKEN']}
|
|
|
|
# Check if hermes_tools is available
|
|
hermes_available = False
|
|
tool_count = 0
|
|
|
|
try:
|
|
from hermes_tools import web_search, web_extract, read_file, write_file, terminal
|
|
hermes_available = True
|
|
tool_count = 5 # We know these imports work
|
|
except ImportError:
|
|
pass
|
|
|
|
# Check for specific tool files
|
|
tool_files = [
|
|
'/root/.hermes/wizard-outputs/spark/tools_analyzer.py',
|
|
]
|
|
|
|
return {
|
|
'hermes_available': hermes_available,
|
|
'known_tools_count': tool_count,
|
|
'env_check': env_vars,
|
|
'python_version': os.sys.version
|
|
}
|
|
|
|
if __name__ == '__main__':
|
|
report = analyze_tools()
|
|
print(json.dumps(report, indent=2))
|
|
|
|
# Write to output file
|
|
os.makedirs('/root/.hermes/wizard-outputs/spark', exist_ok=True)
|
|
with open('/root/.hermes/wizard-outputs/spark/analysis_report.json', 'w') as f:
|
|
json.dump(report, f, indent=2) |