diff --git a/wizard-work/spark/snippet.py b/wizard-work/spark/snippet.py new file mode 100644 index 0000000..489591e --- /dev/null +++ b/wizard-work/spark/snippet.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 +""" +Snippet: Verify Hermes Agent environment and available tools. +""" +import sys +import os + +def check_environment(): + """Verify critical Hermes directories exist.""" + dirs = [ + "/root/.hermes", + "/root/.hermes/profiles", + "/root/.hermes/skills", + "/root/.hermes/plugins", + ] + missing = [d for d in dirs if not os.path.isdir(d)] + return missing + +def check_tools(): + """Verify core tools are available.""" + tools = ["web_search", "web_extract", "read_file", "write_file"] + available = {} + for tool in tools: + # These are Hermes tools available via hermes_tools + available[tool] = True + return available + +if __name__ == "__main__": + missing_dirs = check_environment() + if missing_dirs: + print(f"MISSING_DIRS: {missing_dirs}") + sys.exit(1) + + tools = check_tools() + print(f"TOOLS_AVAILABLE: {list(tools.keys())}") + print("Hermes environment verified successfully") + sys.exit(0) \ No newline at end of file