#!/bin/bash # Quick verification script for Hermes Agent tools # Tests core functionality without external dependencies REPORT="/root/.hermes/wizard-outputs/spark/verification_report.json" STATUS="ok" echo "{\"status\": \"$STATUS\", \"checks\": [" > "$REPORT" # Check 1: Verify terminal works PING_RESULT=$(echo "hermes-terminal-pong" 2>&1) if echo "$PING_RESULT" | grep -q "hermes-terminal-pong"; then echo "{\"name\": \"terminal\", \"status\": \"passed\", \"output\": \"$PING_RESULT\"}," >> "$REPORT" else echo "{\"name\": \"terminal\", \"status\": \"failed\", \"output\": \"$PING_RESULT\"}," >> "$REPORT" STATUS="error" fi # Check 2: Verify search_files - check if hermes_tools directory exists if [ -d "/root/.hermes/skills" ]; then SKILL_COUNT=$(find /root/.hermes/skills -name "*.py" -type f 2>/dev/null | wc -l) echo "{\"name\": \"search_files\", \"status\": \"passed\", \"hits\": $SKILL_COUNT}," >> "$REPORT" else echo "{\"name\": \"search_files\", \"status\": \"failed\"}," >> "$REPORT" STATUS="error" fi # Check 3: Verify JSON parsing with Python JSON_TEST=$(python3 -c "import json; d=json.loads('{\"test\": \"value\"}'); print(d['test'])" 2>/dev/null) if [ "$JSON_TEST" = "value" ]; then echo "{\"name\": \"json_parse\", \"status\": \"passed\"}," >> "$REPORT" else echo "{\"name\": \"json_parse\", \"status\": \"failed\"}," >> "$REPORT" STATUS="error" fi # Check 4: Verify we can read config file if [ -f "/root/.hermes/profiles/spark/config.yaml" ]; then PREVIEW=$(head -c 50 /root/.hermes/profiles/spark/config.yaml) echo "{\"name\": \"file_read\", \"status\": \"passed\", \"preview\": \"$PREVIEW\"}" >> "$REPORT" else echo "{\"name\": \"file_read\", \"status\": \"failed\"}" >> "$REPORT" STATUS="error" fi echo "]}" >> "$REPORT" # Fix status in JSON sed -i "s/\"status\": \"$STATUS\"/\"status\": \"$STATUS\"/" "$REPORT" echo "$REPORT" echo "" cat "$REPORT"