Files
rpa_vision_v3/scripts/start_vwb_complete_palette_fixee_10jan2026.sh
Dom a27b74cf22 v1.0 - Version stable: multi-PC, détection UI-DETR-1, 3 modes exécution
- Frontend v4 accessible sur réseau local (192.168.1.40)
- Ports ouverts: 3002 (frontend), 5001 (backend), 5004 (dashboard)
- Ollama GPU fonctionnel
- Self-healing interactif
- Dashboard confiance

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:23:51 +01:00

186 lines
5.5 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
"""
Script de Démarrage VWB - Palette d'Outils Corrigée
Auteur : Dom, Alice, Kiro - 10 janvier 2026
Ce script démarre le Visual Workflow Builder avec la palette d'outils
complètement fonctionnelle, incluant les 3 actions VisionOnly RPA.
RÉSOLUTION APPLIQUÉE:
- Backend VWB sur le port 5005 avec Flask et routes catalogue
- Frontend React avec service catalogue corrigé
- 3 actions VisionOnly disponibles dans la palette
"""
set -e # Arrêter en cas d'erreur
echo "============================================================"
echo " DÉMARRAGE VWB - PALETTE D'OUTILS CORRIGÉE"
echo "============================================================"
echo "Auteur : Dom, Alice, Kiro - 10 janvier 2026"
echo ""
# Couleurs pour les messages
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Fonction pour afficher les messages colorés
print_info() {
echo -e "${BLUE} $1${NC}"
}
print_success() {
echo -e "${GREEN}$1${NC}"
}
print_warning() {
echo -e "${YELLOW}⚠️ $1${NC}"
}
print_error() {
echo -e "${RED}$1${NC}"
}
# Vérifier que nous sommes dans le bon répertoire
if [ ! -f "visual_workflow_builder/backend/app_lightweight.py" ]; then
print_error "Script doit être exécuté depuis le répertoire racine rpa_vision_v3"
exit 1
fi
print_info "Vérification de l'environnement..."
# Vérifier l'environnement virtuel
if [ ! -d "venv_v3" ]; then
print_error "Environnement virtuel venv_v3 non trouvé"
print_info "Créez l'environnement avec: python3 -m venv venv_v3"
exit 1
fi
print_success "Environnement virtuel trouvé"
# Activer l'environnement virtuel
print_info "Activation de l'environnement virtuel..."
source venv_v3/bin/activate
# Vérifier Flask
print_info "Vérification des dépendances..."
if ! python3 -c "import flask, flask_cors" 2>/dev/null; then
print_warning "Installation des dépendances Flask..."
pip install flask flask-cors
fi
print_success "Dépendances Flask disponibles"
# Vérifier si le port 5005 est libre
print_info "Vérification du port 5005..."
if lsof -Pi :5005 -sTCP:LISTEN -t >/dev/null 2>&1; then
print_warning "Port 5005 déjà utilisé - tentative d'arrêt du processus..."
pkill -f "app_lightweight.py" || true
sleep 2
fi
# Démarrer le backend VWB
print_info "Démarrage du backend VWB sur le port 5005..."
echo ""
echo "🚀 Backend VWB - Catalogue d'Actions VisionOnly"
echo " URL: http://localhost:5005"
echo " API Catalogue: http://localhost:5005/api/vwb/catalog/actions"
echo " Santé: http://localhost:5005/api/vwb/catalog/health"
echo ""
# Démarrer le backend en arrière-plan
PORT=5005 python3 visual_workflow_builder/backend/app_lightweight.py &
BACKEND_PID=$!
# Attendre que le backend démarre
print_info "Attente du démarrage du backend..."
sleep 3
# Vérifier que le backend est accessible
for i in {1..10}; do
if curl -s http://localhost:5005/health >/dev/null 2>&1; then
print_success "Backend VWB démarré avec succès"
break
fi
if [ $i -eq 10 ]; then
print_error "Backend VWB n'a pas démarré dans les temps"
kill $BACKEND_PID 2>/dev/null || true
exit 1
fi
sleep 1
done
# Tester l'API catalogue
print_info "Test de l'API catalogue..."
CATALOG_RESPONSE=$(curl -s http://localhost:5005/api/vwb/catalog/actions)
ACTION_COUNT=$(echo "$CATALOG_RESPONSE" | python3 -c "import sys, json; data=json.load(sys.stdin); print(len(data.get('actions', [])))" 2>/dev/null || echo "0")
if [ "$ACTION_COUNT" -ge 3 ]; then
print_success "API catalogue fonctionnelle - $ACTION_COUNT actions VisionOnly disponibles"
echo ""
echo "📋 Actions VisionOnly disponibles:"
echo "$CATALOG_RESPONSE" | python3 -c "
import sys, json
try:
data = json.load(sys.stdin)
for action in data.get('actions', []):
print(f' - {action[\"id\"]}: {action[\"name\"]} ({action[\"category\"]})')
except:
pass
" 2>/dev/null || echo " (Détails non disponibles)"
else
print_warning "API catalogue accessible mais nombre d'actions insuffisant: $ACTION_COUNT"
fi
echo ""
print_success "BACKEND VWB PRÊT"
echo ""
echo "🎯 RÉSOLUTION APPLIQUÉE:"
echo " ✅ Backend VWB démarré sur le port 5005"
echo " ✅ Routes du catalogue VWB enregistrées"
echo " ✅ Service catalogService.ts corrigé (port 5005)"
echo " ✅ 3 actions VisionOnly RPA disponibles"
echo ""
echo "📱 PALETTE D'OUTILS VWB:"
echo " La palette devrait maintenant afficher:"
echo " 📂 Actions Web (par défaut) - 2 actions"
echo " 📂 Vision UI (VisionOnly) - 2 actions"
echo " 📂 Contrôle Vision (VisionOnly) - 1 action"
echo " 📂 Logique (par défaut) - 1 action"
echo " 📂 Données (par défaut) - 1 action"
echo " 📂 Contrôle (par défaut) - 1 action"
echo ""
# Instructions pour le frontend
print_info "INSTRUCTIONS FRONTEND:"
echo ""
echo "1. Ouvrir un nouveau terminal"
echo "2. Naviguer vers: visual_workflow_builder/frontend/"
echo "3. Installer les dépendances: npm install"
echo "4. Démarrer le frontend: npm start"
echo "5. Ouvrir: http://localhost:3000"
echo ""
echo "La palette d'outils devrait maintenant afficher toutes les actions VisionOnly !"
echo ""
# Fonction de nettoyage
cleanup() {
print_info "Arrêt du backend VWB..."
kill $BACKEND_PID 2>/dev/null || true
print_success "Backend arrêté"
}
# Capturer Ctrl+C pour nettoyer
trap cleanup EXIT INT TERM
print_info "Backend VWB en cours d'exécution (PID: $BACKEND_PID)"
print_info "Appuyez sur Ctrl+C pour arrêter"
# Attendre que l'utilisateur arrête le script
wait $BACKEND_PID