27 lines
787 B
Python
Executable File
27 lines
787 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""Environment diagnostic script for Hermes Agent sessions."""
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
from datetime import datetime
|
|
|
|
def get_env_info():
|
|
return {
|
|
"timestamp": datetime.utcnow().isoformat() + "Z",
|
|
"hostname": os.uname().nodename,
|
|
"python_version": sys.version,
|
|
"platform": os.uname(),
|
|
"cwd": os.getcwd(),
|
|
"hermes_profile": Path.home() / ".hermes" / "profiles" / "spark",
|
|
"env_vars": {
|
|
"PATH": os.environ.get("PATH", "")[:200] + "...",
|
|
"HOME": os.environ.get("HOME", ""),
|
|
"SHELL": os.environ.get("SHELL", ""),
|
|
}
|
|
}
|
|
|
|
if __name__ == "__main__":
|
|
import json
|
|
info = get_env_info()
|
|
print(json.dumps(info, indent=2, default=str))
|