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

@@ -210,7 +210,7 @@ class TrainingQualityValidator:
# 3. Vérifier observations par node
nodes = getattr(workflow, 'nodes', [])
for node in nodes:
obs_count = getattr(node, 'observation_count', 0)
obs_count = (node.metadata.get('observation_count', 0) if getattr(node, 'metadata', None) else 0)
if obs_count < self.config.min_observations_per_node:
recommendations.append(
f"Node '{getattr(node, 'node_id', 'unknown')}' a seulement {obs_count} observations "
@@ -240,7 +240,7 @@ class TrainingQualityValidator:
len(outlier_indices) <= len(embeddings) * self.config.max_outlier_ratio and
(validation_result is None or validation_result.is_valid) and
all(
getattr(node, 'observation_count', 0) >= self.config.min_observations_per_node
(node.metadata.get('observation_count', 0) if getattr(node, 'metadata', None) else 0) >= self.config.min_observations_per_node
for node in nodes
)
)