| 727 | } |
| 728 | |
| 729 | fn heartbeat_payload(&self) -> HeartbeatEvent { |
| 730 | let snapshot = self.runtime_snapshot(); |
| 731 | HeartbeatEvent { |
| 732 | uptime_ms: snapshot.uptime_ms, |
| 733 | total_events_processed: snapshot.total_events_processed, |
| 734 | current_state: snapshot.current_state, |
| 735 | cpu_percent: None, |
| 736 | memory_bytes: None, |
| 737 | active_tools: Some(snapshot.active_tools), |
| 738 | pending_actions: Some(snapshot.pending_actions), |
| 739 | queue_depth: Some(snapshot.queue_depth), |
| 740 | tokens_used: Some(snapshot.tokens_used), |
| 741 | } |
| 742 | } |
| 743 | |
| 744 | /// Map A3S Code hook event to AHP event |
| 745 | fn map_event(&self, event: &HookEvent) -> Option<AhpEvent> { |