zeroclaw/src/heartbeat
argenis de la rosa f0b56fd25e
feat(heartbeat): add health metrics, adaptive intervals, and task history
- Add HeartbeatMetrics struct with uptime, consecutive success/failure
  counts, EMA tick duration, and total ticks
- Add compute_adaptive_interval() for exponential backoff on failures
  and faster polling when high-priority tasks are present
- Add SQLite-backed task run history (src/heartbeat/store.rs) mirroring
  the cron/store.rs pattern with output truncation and pruning
- Add dead-man's switch that alerts if heartbeat stops ticking
- Wire metrics, history recording, and adaptive sleep into daemon worker
- Add config fields: adaptive, min/max_interval_minutes,
  deadman_timeout_minutes, deadman_channel, deadman_to, max_run_history
- All new fields are backward-compatible with serde defaults
2026-03-24 15:17:14 +03:00
..
engine.rs feat(heartbeat): add health metrics, adaptive intervals, and task history 2026-03-24 15:17:14 +03:00
mod.rs feat(heartbeat): add health metrics, adaptive intervals, and task history 2026-03-24 15:17:14 +03:00
store.rs feat(heartbeat): add health metrics, adaptive intervals, and task history 2026-03-24 15:17:14 +03:00