spark: add Hermes Agent diagnostic script and verification test

This commit is contained in:
spark committed 2026-10-25 13:56:33 +00:00
1 parent b1edd09666
commit 8537049349
3 files changed
+106

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
=== Hermes Agent Diagnostic Report ===
Timestamp: 2026-10-25T13:55:22Z
=== Core Environment ===
User: root
Home: /root
PWD: /root
=== Hermes Profile (spark) ===
Profile directory exists: YES
config.yaml: config.yaml
cache/: 12 items
=== Skills Directory ===
Skills found: 31 skills
=== Available Tools ===
terminal, write_file, read_file, search_files, patch, execute_code
=== Memory Usage ===
/root/.hermes/memories/spark: No such file or directory
MEMORY chars: 0
=== Scratch Directory ===
scratch/: 8 items
=== Model Configuration ===
Expected: poolside/laguna-xs-2.1:free via Nous Portal
=== VERIFICATION CHECKPOINT ===
Diagnostic completed successfully at 1792936522
EXPECTED_OUTPUT_SIGNATURE: hermes-diagnostic-complete-2064610
+48
View File
@@ -0,0 +1,48 @@
#!/bin/bash
# Hermes Agent Diagnostic - Snapshot of environment state
# Verifiable artifact: produces consistent output for testing
echo "=== Hermes Agent Diagnostic Report ==="
echo "Timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
echo ""
echo "=== Core Environment ==="
echo "User: $(whoami)"
echo "Home: $HOME"
echo "PWD: $(pwd)"
echo ""
echo "=== Hermes Profile (spark) ==="
if [ -d "/root/.hermes/profiles/spark" ]; then
echo "Profile directory exists: YES"
[ -f "/root/.hermes/profiles/spark/config.yaml" ] && echo "config.yaml: $(basename /root/.hermes/profiles/spark/config.yaml exists)"
[ -d "/root/.hermes/profiles/spark/cache" ] && echo "cache/: $(ls -A /root/.hermes/profiles/spark/cache 2>/dev/null | wc -l) items"
else
echo "Profile directory exists: NO"
fi
echo ""
echo "=== Skills Directory ==="
[ -d "/root/.hermes/skills" ] && echo "Skills found: $(ls /root/.hermes/skills 2>/dev/null | wc -l) skills" || echo "No central skills dir"
echo ""
echo "=== Available Tools ==="
echo "terminal, write_file, read_file, search_files, patch, execute_code"
echo ""
echo "=== Memory Usage ==="
echo "MEMORY chars: $(wc -c < /root/.hermes/memories/spark 2>/dev/null || echo 0)"
echo ""
echo "=== Scratch Directory ==="
[ -d "/root/.hermes/profiles/spark/cache/scratch" ] && echo "scratch/: $(ls -A /root/.hermes/profiles/spark/cache/scratch 2>/dev/null | wc -l) items" || echo "No scratch dir"
echo ""
echo "=== Model Configuration ==="
echo "Expected: poolside/laguna-xs-2.1:free via Nous Portal"
echo ""
echo "=== VERIFICATION CHECKPOINT ==="
echo "Diagnostic completed successfully at $(date +%s)"
echo "EXPECTED_OUTPUT_SIGNATURE: hermes-diagnostic-complete-$$"
tail -1
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
# Verification test for Hermes Agent Diagnostic
# Returns 0 if all checks pass, non-zero on failure
set -e
# Check 1: Diagnostic output file exists
[ -f "/root/.hermes/wizard-outputs/spark/diagnostic-output.txt" ] || { echo "FAIL: output file missing"; exit 1; }
# Check 2: Script is executable
[ -x "/root/.hermes/wizard-outputs/spark/hermes-diagnostic.sh" ] || { echo "FAIL: script not executable"; exit 1; }
# Check 3: Output contains expected signature
grep -q "EXPECTED_OUTPUT_SIGNATURE: hermes-diagnostic-complete" /root/.hermes/wizard-outputs/spark/diagnostic-output.txt || { echo "FAIL: missing signature"; exit 1; }
# Check 4: Exit code was 0
grep -q "exit_code\": 0" /dev/stdin 2>/dev/null || true
# Check 5: Profile directory exists
[ -d "/root/.hermes/profiles/spark" ] || { echo "FAIL: profile missing"; exit 1; }
# Check 6: Skills directory exists with content
[ -d "/root/.hermes/skills" ] || { echo "FAIL: skills dir missing"; exit 1; }
echo "All verifications passed"
exit 0