spaxel/mothership/internal/api
jedarden bf40673b72 feat: wire anomaly detection & security mode API endpoints
AnomalyDetector is initialized in main() with periodic model updates.
Anomaly events are pushed to dashboard WS as 'alert' messages via
BroadcastAlert callback. Security mode arm/disarm state persists
across restarts via SQLite learning_state table.

Endpoints:
- GET /api/anomalies?since=24h — list recent anomaly events
- POST /api/security/arm — enable security mode
- POST /api/security/disarm — disable security mode
- GET /api/security/status — armed, learning_until, anomaly_count_24h

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 14:36:59 -04:00
..
backup.go feat: implement SQLite Online Backup API streaming endpoint 2026-04-07 02:15:51 -04:00
backup_test.go feat: implement SQLite Online Backup API streaming endpoint 2026-04-07 02:15:51 -04:00
ble_test.go feat: add security mode persistence and tracker blob lifecycle events 2026-04-07 10:14:51 -04:00
events.go feat: wire anomaly detection & security mode API endpoints 2026-04-07 14:36:59 -04:00
events_test.go feat: wire anomaly detection & security mode API endpoints 2026-04-07 13:20:54 -04:00
notifications.go feat: implement Notifications REST endpoints 2026-04-07 09:11:01 -04:00
notifications_test.go feat: add security mode persistence and tracker blob lifecycle events 2026-04-07 10:14:51 -04:00
replay.go feat: implement Replay/Time-Travel REST endpoints 2026-04-07 09:19:36 -04:00
replay_test.go feat: add security mode persistence and tracker blob lifecycle events 2026-04-07 10:14:51 -04:00
security.go feat: wire anomaly detection & security mode API endpoints 2026-04-07 13:20:54 -04:00
security_test.go fix: wire anomaly detection & security mode API endpoints 2026-04-07 12:10:01 -04:00
settings.go feat: implement Settings REST endpoints 2026-04-07 09:04:55 -04:00
settings_test.go feat: implement Settings REST endpoints 2026-04-07 09:04:55 -04:00
triggers.go feat: implement automation triggers CRUD REST endpoints 2026-04-07 11:38:34 -04:00
triggers_test.go fix: correct no-op trigger update test expectation 2026-04-07 10:21:02 -04:00
utils.go feat: verify dashboard WebSocket feed supports events, alerts, BLE, triggers, health 2026-04-07 09:54:14 -04:00
volume_triggers.go feat: implement automation triggers CRUD REST endpoints 2026-04-07 11:38:34 -04:00
volume_triggers_test.go fix: resolve TestTimeoutDoesNotDisable hang in trigger tests 2026-04-07 12:34:35 -04:00
zones.go feat: wire anomaly detection & security mode API endpoints 2026-04-07 14:36:59 -04:00
zones_test.go feat: wire anomaly detection & security mode API endpoints 2026-04-07 14:36:59 -04:00