feat(agent): remontée des détections agent → central (Fixes #57)

- DetectionReporterService : POST /api/events (API Key auth), anti-spam par
  cooldown (caméra, type) — motion 30 s, autres 10 s — échec réseau drop +
  compteur (jamais bloquant), mapping YOLO/COCO → EventType
- SnapshotPipelineService : événement MotionDetected sur la transition
  idle → active (front montant), événements typés PersonDetected/
  VehicleDetected pour chaque détection de l'analyseur (avec bbox en metadata)
- Tests : 11 (mapping COCO, agent non enregistré → pas d'appel, pas de throw)
This commit is contained in:
Arnaud Dartois committed 2026-08-12 09:18:42 +02:00
1 parent 332be83915
commit bce39a1034
5 files changed
+247 -2

No files matched your search

+2
View File
@@ -69,6 +69,8 @@ builder.Services.AddSingleton<HomeKitMdnsProbe>();
builder.Services.AddSingleton<ICameraDatabase, SqliteCameraDatabase>();
builder.Services.AddSingleton<CameraStatusReporterService>();
builder.Services.AddSingleton<ICameraStatusReporter>(sp => sp.GetRequiredService<CameraStatusReporterService>());
builder.Services.AddSingleton<DetectionReporterService>();
builder.Services.AddSingleton<IDetectionReporter>(sp => sp.GetRequiredService<DetectionReporterService>());
builder.Services.AddSingleton<DiscoveryScanTrigger>();
builder.Services.AddSingleton<AgentCredentialStore>();
builder.Services.AddSingleton<RuntimeLogLevel>();