Commit Graph

9 Commits

Author SHA1 Message Date
Dom
2cb53901a1 fix(vwb): Supprimer debug /tmp et corriger import UIElement
- Supprimer le bloc debug qui écrivait dans /tmp/vwb_debug.log
- Corriger l'import UIElement (core.models.ui_element au lieu de
  screen_state) — supprime le warning au démarrage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:58:14 +01:00
Dom
4c9a6d293f feat(vwb): Améliorer outils IA et supprimer fallback statique
Backend:
- analyser_avec_ia.py: centraliser URL Ollama via os.environ.get()
- action_contracts.py: assouplir le contrat ai_analyze_text (mode texte
  sans ancre visuelle, accepter prompt ou analysis_prompt)
- intelligent_executor.py: supprimer le fallback coordonnées statiques
  quand la vision échoue — renvoyer not_found pour self-healing
- workflow.py: ajouter endpoints validate et export-training

run.sh:
- Corriger les ports (3000 → 3002) et le venv (venv_v3 → .venv)
- Lancer run_v4.sh au lieu de l'ancien run.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:56:17 +01:00
Dom
3ff36e3c79 refactor(audit): Nettoyage dette technique phases 1-4
Phase 1 — Code mort et duplication :
- Supprimer catalog_routes.py (-1832 lignes, doublon de v2_vlm)
- Mettre à jour app.py et app_lightweight.py vers catalog_routes_v2_vlm
- Nettoyer 9 imports inutilisés dans catalog_routes_v2_vlm.py
- Supprimer get_required_params inutilisé dans execute.py

Phase 2 — Centraliser la configuration :
- Ollama URL via os.environ.get() dans verify_text_content.py et extraire_tableau.py
- MODEL_PATH relatif au projet + var env UI_DETR_MODEL_PATH dans ui_detection_service.py

Phase 3 — Thread-safety de l'exécution :
- Ajouter _execution_lock (RLock) pour protéger _execution_state
- Remplacer le polling self-healing par threading.Event
- Initialiser 'variables' dans le dict initial (plus de création dynamique)
- Corriger bare except → except Exception as db_err avec message

Phase 4 — Logging minimal :
- Ajouter logger dans execute.py, remplacer print() critiques par logger
- Configurer RotatingFileHandler (5MB, 3 backups) dans app.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 08:11:45 +01:00
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
Dom
21bfa3b337 feat(vwb): Ajouter SeeClick, Self-Healing interactif et Dashboard confiance
## Nouvelles fonctionnalités

### 1. SeeClick Adapter (visual grounding fallback)
- Nouvel adapter pour le modèle SeeClick (HuggingFace)
- Intégré dans la chaîne de fallback: CLIP → Template → SeeClick → Static
- Localise les éléments GUI à partir de descriptions textuelles

### 2. Self-Healing Interactif
- Dialogue qui propose des alternatives quand l'ancre n'est pas trouvée
- L'utilisateur peut choisir: candidat alternatif, coords statiques, ou sauter
- Nouveaux endpoints: /healing/status, /healing/choose, /healing/candidates
- État "waiting_for_choice" pour mettre l'exécution en pause

### 3. Dashboard Confiance (temps réel)
- Affiche les scores de confiance pendant l'exécution
- Montre: méthode utilisée, distance, taux de succès
- Interface pliable en bas à droite
- Visible uniquement en mode intelligent/debug

## Fichiers ajoutés
- core/detection/seeclick_adapter.py
- frontend_v4/src/components/SelfHealingDialog.tsx
- frontend_v4/src/components/ConfidenceDashboard.tsx

## Fichiers modifiés
- core/detection/__init__.py
- backend/services/intelligent_executor.py
- backend/api_v3/execute.py
- frontend_v4/src/App.tsx
- frontend_v4/src/services/api.ts
- docs/VISION_RPA_INTELLIGENT.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 02:34:01 +01:00
Dom
f04f156144 fix(vision): Corriger les seuils CLIP/Template pour éviter les clics erronés
Problème résolu:
- Le workflow cliquait au mauvais endroit (200-500px de distance)
- Les seuils de matching étaient trop permissifs

Corrections apportées:
- CLIP: MAX_DISTANCE=120px, MIN_SCORE=0.55, MIN_COMBINED=0.5
- Template zonée: MAX_DISTANCE=150px
- Template global: MAX_DISTANCE=150px (était 500px)
- Ajout de logs détaillés pour debug des candidats rejetés
- Désactivation de l'overlay debug (polling intensif inutile)

Fichiers modifiés:
- intelligent_executor.py: Seuils stricts + logs
- execute.py: Logique d'exécution modes basic/intelligent/debug
- ui_detection_service.py: Backend UI-DETR-1
- App.tsx: Overlay désactivé
- ExecutionOverlay.tsx: URLs API corrigées

Documentation:
- docs/REFERENCE_VISION_RPA.md: Guide complet de référence

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 02:15:04 +01:00
Dom
d8d086dac5 feat(vwb): Intégration UI-DETR-1 + Toggle mode Basique/Intelligent/Debug
- Toggle 3 modes dans le header: Basique (coords fixes), Intelligent (vision IA), Debug (overlay)
- Service UI-DETR-1 pour détection d'éléments UI (510MB model, ~800ms/image)
- API endpoints: /api/ui-detection/detect, /preload, /status, /find-element
- Overlay des bboxes détectées en mode Debug (miniature + plein écran)
- Clic sur élément détecté pour le sélectionner comme ancre
- Document de vision produit: docs/VISION_RPA_INTELLIGENT.md
- Configuration CORS étendue pour ports locaux

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:13:32 +01:00
Dom
38a1a5ddd8 feat(coaching): Implement complete COACHING mode infrastructure
Add comprehensive COACHING mode system with:

Backend:
- core/coaching module with session persistence and metrics
- CoachingSessionPersistence for pause/resume sessions
- CoachingMetricsCollector with learning progress tracking
- REST API blueprint for coaching sessions management
- Execution integration with COACHING mode support

Frontend:
- CoachingPanel component with keyboard shortcuts
- Decision buttons (accept/reject/correct/manual/skip)
- Real-time stats display and correction editor
- CorrectionPacksDashboard for pack visualization
- WebSocket hooks for real-time COACHING events

Metrics & Monitoring:
- WorkflowLearningMetrics with confidence scoring
- GlobalCoachingMetrics for system-wide analytics
- AUTO mode readiness detection (85% acceptance threshold)
- Learning progress levels (OBSERVATION → COACHING → AUTO)

Tests:
- E2E tests for complete OBSERVATION → AUTO journey
- Session persistence and recovery tests
- Metrics threshold validation tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 08:40:54 +01:00
Dom
c636f7f163 Feat: Intégration système d'apprentissage VWB
- Création service learning_integration.py (pont VWB <-> LearningManager)
- Enregistrement automatique des workflows à la création
- Enregistrement des résultats d'exécution (succès/échec + confiance)
- Endpoints API: /workflows/<id>/feedback et /workflows/<id>/learning
- Boutons feedback (pouce vert/rouge) dans VWBExecutorExtension
- Fix: VariableAutocomplete inputRef pour setSelectionRange
- Amélioration: Chips cliquables pour insérer les variables

Le système apprend maintenant des exécutions et feedbacks utilisateur.
États: OBSERVATION -> COACHING -> AUTO_CANDIDATE -> AUTO_CONFIRMED

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 21:30:23 +01:00