Files
html/api/d93-persona-verify.sh
2026-04-18 03:47:27 +02:00

45 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
# D93 WEVIA Master intent: verify persona unified across 6 agent screens
# Returns: JSON with per-screen marker status + v2 registry health + dicebear img count
cd /var/www/html
SCREENS=("enterprise-complete.html" "wevia-meeting-rooms.html" "agents-archi.html" "enterprise-model.html" "paperclip.html" "paperclip-hub.html")
RESULTS=()
for F in "${SCREENS[@]}"; do
if [ ! -f "$F" ]; then
RESULTS+=("\"$F\":{\"ok\":false,\"err\":\"not_found\"}")
continue
fi
D91=$(grep -c 'WEVAL-D91-PERSONA-AVATAR\|WEVAL-D91-AGENTS-ARCHI-PERSONA\|V73 AVATAR UNIFIER' "$F" 2>/dev/null)
D92=$(grep -c 'WEVAL-D92-LAYOUT-UNIFIED' "$F" 2>/dev/null)
HLP=$(grep -c 'weval-avatar-helper' "$F" 2>/dev/null)
DIC=$(grep -c 'dicebear\|robohash' "$F" 2>/dev/null)
RESULTS+=("\"$F\":{\"d91\":$D91,\"d92\":$D92,\"helper\":$HLP,\"legacy_img\":$DIC}")
done
# Check v2 registry
V2_SIZE=$(stat -c%s /var/www/html/api/agent-avatars-v2.json 2>/dev/null || echo 0)
V2_ENTRIES=$(python3 -c "import json; print(len(json.load(open('/var/www/html/api/agent-avatars-v2.json'))))" 2>/dev/null || echo 0)
HLP_SIZE=$(stat -c%s /var/www/html/api/weval-avatar-helper.js 2>/dev/null || echo 0)
# HTTP live checks (bypass SSO by using internal)
CODES=""
for F in "${SCREENS[@]}"; do
C=$(curl -skI -o /dev/null -w "%{http_code}" "https://weval-consulting.com/$F" --max-time 5)
CODES+="$F:$C "
done
JOINED=$(IFS=,; echo "${RESULTS[*]}")
cat <<JSON
{
"ts":"$(date -Iseconds)",
"screens":{$JOINED},
"v2_registry":{"size":$V2_SIZE,"entries":$V2_ENTRIES},
"avatar_helper":{"size":$HLP_SIZE},
"http_live":"$CODES"
}
JSON