Files
html/api/wtp-golive-gap5-widget-root.sh
Opus 1a91e34885
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
auto-sync via WEVIA git_sync_all intent 2026-04-23T23:27:22+02:00
2026-04-23 23:27:22 +02:00

28 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Gap 5: Widget racine + inventaire memoire chatbots
# Check if widget bridge is on root index + count chatbots with persistence
# Check widget at root
ROOT_WIDGET_REFS=0
for f in /var/www/html/index.html /var/www/html/weval-technology-platform.html; do
[ ! -f "$f" ] && continue
REFS=$(grep -cE "wevia-chat-v2|wevia-chat-bridge|chatmem" "$f" 2>/dev/null || echo 0)
ROOT_WIDGET_REFS=$((ROOT_WIDGET_REFS + REFS))
done
# Redis memory count (persistence for internal chatbots)
REDIS_CHATBOTS=$(redis-cli -n 5 --scan --pattern 'chatmem:*' 2>&1 | awk -F: '{print $2}' | sort -u | wc -l)
REDIS_TOTAL=$(redis-cli -n 5 --scan --pattern 'chatmem:*' 2>&1 | wc -l)
# Count chatbots migrated doctrine 141/142/146
MIGRATED=0
for chatbot in l99-chat openclaw-proxy wevia-chat-v2-direct weval-chatbot-api saas-chat claude-pattern-api; do
f="/var/www/html/api/${chatbot}.php"
if [ -f "$f" ]; then
refs=$(grep -c "DOCTRINE-14[12346]\|chatmem:" "$f" 2>/dev/null || echo 0)
[ "$refs" -gt 0 ] && MIGRATED=$((MIGRATED+1))
fi
done
echo "WIDGET-ROOT-STATUS: root_refs=$ROOT_WIDGET_REFS · redis_chatbots_unique=$REDIS_CHATBOTS · redis_total_keys=$REDIS_TOTAL · migrated_chatbots=$MIGRATED/6"