feat: auth surface exposée + ChatService partagé (v0.19.0)

Auth login fort : mot de passe scrypt + TOTP 2FA (otplib) + JWT HS256
(jose), login tout-ou-rien sans indice. ChatService factorise le tour
d'agent pour toutes les surfaces (Telegram refactoré). 60 tests, 0 vuln.

Palier de risque : reversible (logique d'auth ; surface API câblée en v0.20).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Kantin-Petit
2026-06-23 02:06:32 +02:00
parent b617487d0d
commit e322ed1167
7 changed files with 299 additions and 13 deletions
+8
View File
@@ -6,6 +6,14 @@ incompatibles. Chaque ligne renvoie à un commit dédié (un artefact = un commi
## [Unreleased]
## [0.19.0] — 2026-06-23 — début Phase 4 (UI : auth + service chat)
### Added
- `src/api/auth.ts` : auth surface exposée — mot de passe scrypt (`node:crypto`),
TOTP 2FA (`otplib`), JWT HS256 (`jose`), `login` tout-ou-rien. 10 tests.
- `src/agent/chat-service.ts` : `ChatService` (un tour d'agent par message),
partagé par toutes les surfaces. Telegram refactoré pour l'utiliser.
- Deps épinglées `jose` 6.2.3, `otplib` 13.4.1 (`npm audit` 0 vuln).
## [0.18.0] — 2026-06-23 — fin Phase 3 (alertes)
### Added
- `workflows-n8n/chlova-alerts.v1.0.0.json` : workflow n8n webhook → mail (formate