feat: chat unifié, GestureCatalog, Copilot, Léa UI, extraction données, vérification replay

Refonte majeure du système Agent Chat et ajout de nombreux modules :

- Chat unifié : suppression du dual Workflows/Agent Libre, tout passe par /api/chat
  avec résolution en 3 niveaux (workflow → geste → "montre-moi")
- GestureCatalog : 38 raccourcis clavier universels Windows avec matching sémantique,
  substitution automatique dans les replays, et endpoint /api/gestures
- Mode Copilot : exécution pas-à-pas des workflows avec validation humaine via WebSocket
  (approve/skip/abort) avant chaque action
- Léa UI (agent_v0/lea_ui/) : interface PyQt5 pour Windows avec overlay transparent
  pour feedback visuel pendant le replay
- Data Extraction (core/extraction/) : moteur d'extraction visuelle de données
  (OCR + VLM → SQLite), avec schémas YAML et export CSV/Excel
- ReplayVerifier (agent_v0/server_v1/) : vérification post-action par comparaison
  de screenshots, avec logique de retry (max 3)
- IntentParser durci : meilleur fallback regex, type GREETING, patterns améliorés
- Dashboard : nouvelles pages gestures, streaming, extractions
- Tests : 63 tests GestureCatalog, 47 tests extraction, corrections tests existants
- Dépréciation : /api/agent/plan et /api/agent/execute retournent HTTP 410,
  suppression du code hardcodé _plan_to_replay_actions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dom
2026-03-15 10:02:09 +01:00
parent 74a1cb4e03
commit cf495dd82f
93 changed files with 12463 additions and 1080 deletions

View File

@@ -303,7 +303,7 @@ class HierarchicalMatcher:
if not window_info:
return 0.5 # Score neutre si pas d'info
template = getattr(node, 'screen_template', None)
template = getattr(node, 'template', None)
if not template:
return 0.5
@@ -311,7 +311,7 @@ class HierarchicalMatcher:
# Matching du titre
current_title = window_info.get('title', '')
template_pattern = getattr(template, 'window_title_pattern', None)
template_pattern = getattr(template.window, 'title_pattern', None) if getattr(template, 'window', None) else None
if template_pattern and current_title:
if self.config.use_regex_title_matching:
@@ -329,7 +329,7 @@ class HierarchicalMatcher:
# Matching du processus
current_process = window_info.get('process_name', '')
template_process = getattr(template, 'process_name', None)
template_process = getattr(template.window, 'process_name', None) if getattr(template, 'window', None) else None
if template_process and current_process:
if current_process.lower() == template_process.lower():
@@ -367,12 +367,12 @@ class HierarchicalMatcher:
Returns:
Score de confiance 0.0-1.0
"""
template = getattr(node, 'screen_template', None)
template = getattr(node, 'template', None)
if not template:
return 0.5
# Récupérer embedding prototype du template
prototype = getattr(template, 'embedding_prototype', None)
prototype = getattr(template.embedding, 'vector_id', None) if getattr(template, 'embedding', None) else None
if prototype is None:
return 0.5
@@ -445,7 +445,7 @@ class HierarchicalMatcher:
if not detected_elements:
return 0.5
template = getattr(node, 'screen_template', None)
template = getattr(node, 'template', None)
if not template:
return 0.5