Files

94 lines
2.7 KiB
Bash
Executable File

#!/bin/bash
# Hermes Environment Status Snapshot
# Generated: $(date -u '+%Y-%m-%d %H:%M:%S UTC')
set -e
HERMES_ROOT="/root/.hermes"
OUTPUT_DIR="/root/.hermes/wizard-outputs/spark"
echo "=== HERMES ENVIRONMENT STATUS ==="
echo "Generated: $(date -u '+%Y-%F %T UTC')"
echo ""
# Check Hermes root exists
if [ -d "$HERMES_ROOT" ]; then
echo "✓ Hermes root accessible: $HERMES_ROOT"
else
echo "✗ Hermes root NOT found: $HERMES_ROOT"
exit 1
fi
# Profile analysis
echo ""
echo "=== PROFILES ==="
PROFILE_COUNT=$(find "$HERMES_ROOT/profiles" -maxdepth 1 -type d | wc -l)
echo "Total profiles: $((PROFILE_COUNT - 1))"
# Current session profile
CURRENT_PROFILE="spark"
echo "Active profile (this session): $CURRENT_PROFILE"
if [ -d "$HERMES_ROOT/profiles/$CURRENT_PROFILE" ]; then
echo "✓ Active profile exists"
PROFILE_SIZE=$(du -sh "$HERMES_ROOT/profiles/$CURRENT_PROFILE" 2>/dev/null | cut -f1)
echo " Profile size: $PROFILE_SIZE"
else
echo "⚠ Active profile directory not found"
fi
# Skills inventory
echo ""
echo "=== SKILLS ==="
SKILLS_DIR="$HERMES_ROOT/skills"
if [ -d "$SKILLS_DIR" ]; then
SKILL_COUNT=$(find "$SKILLS_DIR" -maxdepth 2 -name "SKILL.md" | wc -l)
TOTAL_SKILL_SIZE=$(du -sh "$SKILLS_DIR" 2>/dev/null | cut -f1)
echo "✓ Skills directory: $SKILLS_DIR"
echo " Total skills: $SKILL_COUNT"
echo " Total size: $TOTAL_SKILL_SIZE"
# List a few skill names
echo " Sample skills:"
find "$SKILLS_DIR" -maxdepth 2 -name "SKILL.md" -exec dirname {} \; | head -10 | while read d; do
basename "$d"
done | sed 's/^/ - /'
else
echo "✗ Skills directory not found"
fi
# Config snapshot
echo ""
echo "=== CONFIG ==="
CONFIG_FILE="$HERMES_ROOT/profiles/$CURRENT_PROFILE/config.yaml"
if [ -f "$CONFIG_FILE" ]; then
echo "✓ Profile config: $CONFIG_FILE"
# Extract key settings
MODEL_SETTING=$(grep -E "^model:" "$CONFIG_FILE" 2>/dev/null | head -1 || echo "not set")
PROVIDER_SETTING=$(grep -E "^provider:" "$CONFIG_FILE" 2>/dev/null | head -1 || echo "not set")
echo " Model: ${MODEL_SETTING:-default}"
echo " Provider: ${PROVIDER_SETTING:-default}"
else
echo "⚠ Profile config not found"
fi
# Cache/Session state
echo ""
echo "=== SESSION STATE ==="
SESSIONS_DIR="$HERMES_ROOT/profiles/$CURRENT_PROFILE/sessions"
if [ -d "$SESSIONS_DIR" ]; then
SESSION_COUNT=$(ls -1 "$SESSIONS_DIR" | wc -l)
echo "✓ Sessions directory"
echo " Active sessions: $SESSION_COUNT"
fi
# Output artifacts
echo ""
echo "=== OUTPUT TO ARTIFACT ==="
mkdir -p "$OUTPUT_DIR"
echo "Output directory: $OUTPUT_DIR"
echo "Files in output directory:"
ls -la "$OUTPUT_DIR" 2>/dev/null || echo " (empty)"
echo ""
echo "=== END STATUS ==="