Repository navigation
Agent Power Guard v1.2.2
🛡️⚡ Agent Power Guard v1.2.2 Release
A lightweight, 100% native desktop utility written in Rust (egui + glow) that puts your workstation to sleep only when you AND your AI coding agents are truly idle.
🌟 What's New & Fixed in v1.2.2 (Full Upgrade Since v1.0.3)
🧠 Intent-Aware Sleep Engine & Signal Conditioning (v1.2.x)
- Signal-Conditioning Layer: Every analog metric (Agent CPU, Downloads, PC CPU, Attributed Disk, Default-Route Network, GPU) passes through a rolling-window duty-cycle filter with hysteresis (
Pending->Busy->Quiet). Single 1-second spikes andPendingwindows never reset the countdown or kill Stage 1 display-off. - Explicit Intent Classification: Unified top-level intent hierarchy (
BestPerformance->GuardOff->ExplicitHold->MeetingLive->PassiveMedia->ActiveWork->HumanActive->IdleReady) controlling Stage 1 display-off and Stage 2 sleep independently. - 3 Top-Level Operational Modes & Dedicated OS Wake Lock: Switch between Smart Guard (watchdog actively manages display-off & sleep), Guard Off (watchdog pauses so normal OS power settings apply), and Best Performance (explicitly disables sleep & display-off via a dedicated OS wake-lock thread using
SetThreadExecutionState/systemd-inhibit/caffeinate, with optional1h / 2h / ∞timers). - Live Blocker Transparency & Built-in
(i)Guide: Every active blocker shows#, condition, offending owner/process, live value, hold duration, and inline+ Ignoreacross desktop GUI, tray tooltip, and web dashboard. - Adaptive GPU Baseline + Multi-Adapter NVML Power Draw: Learns your idle desktop compositor floor (
floor + margin), polls all NVML devices including board power draw, never triggers on VRAM allocation alone, and surfaces aProbe Unavailablebadge when NVML is absent. - Per-Process Disk Attribution & Default-Route NIC Filtering: Subtracts background noise (
MsMpEng,SearchIndexer,TiWorker, cloud sync clients) and reports the exact culprit (cargo.exe 14.2 MB/s); filters network traffic to default-route interfaces (0.0.0.0/0,::/0) ignoring loopback, WSL vEthernet, Hyper-V, and Docker virtual adapters; subtracts self-CPU overhead. - Process-Tree Agent CPU Attribution: Separates idle IDE shells (
code.exe,cursor.exe) from active compiler/agent worker child processes. - Passive Media Detection & Monitor Audio Protection: CoreAudio render sessions + WinRT SMTC (
GlobalSystemMediaTransportControls) detect playback and raise a non-focus-stealing topmost prompt (Keep Awake / Sleep Now / Hide) bound strictly to session identity (app + session) rather than track title, clearing automatically after pause grace (default 60s). Stage 1 display-off stays allowed for audio-only playback unless audio plays through monitor/HDMI speakers (DigitalAudioDisplayDevice). - Mic/Cam Signal Presence & App Categories: Measures real CoreAudio capture peak energy (
Dead / Ambient / Active) alongside ConsentStore/webcam checks — strict protection for calls (Zoom,Teams,Meet,Discord) even when muted, while creative tools (Premiere,Resolve,Audacity,OBS) block only on active acoustic/camera capture. - Cond 9 Power Requests Visibility & Safe Degradation: Surfaces active
powercfg /requestslock owners with 1-tap ignore, suppresses stale silent browserDISPLAYlocks (>60s paused), and clearly displaysProbe Unavailableunder standard-user (AsInvoker) execution rather than failing silently. - Zombie Agent Lease Watchdog & Wake Classification: Detects PID-bound leases stuck at ~0% subtree CPU & disk (
lease_idle_mins), alerts before optional expiry, registersPowerRegisterSuspendResumeNotification(GUI & headless daemon) to classify user wakes vs unattended wakes (120sfast return timer) without disabling wake events, and suggests adaptive idle baseline floors. - Packaging & Release Fixes: Fixed GitHub Actions
secretsconditional syntax blocking release publishing, resolvedsysinfointerface name&OsStringhandling, updated QR encoder corner separators and security audit fixes, and eliminated cross-platform compiler warnings.
🚀 Previous Upgrades Now Included in This Release (v1.1.0 Milestones)
- 🔒 Secure Local API & Pure Evaluator: 256-bit API token auth (
0600on Unix,%APPDATA%on Windows), constant-time verification, 10-fail/min IP rate limiting, DNS-rebinding protection + CORS support for fleet polling, andAsInvokermanifest so CLI commands run without UAC prompts. - 🤖 AI Coding Agent Integration:
agent-power-guard run [--max-mins N] -- <cmd>PID-bound wrapper, built-inmcpstdio server for Claude Code / Cursor / Antigravity, and 8 agent profiles. - 📊 Block History, Notifications & Update Check: Local JSONL timeline answering "what kept my PC awake?" with CSV/JSON export, ntfy / Telegram / webhook alerts, and opt-in daily GitHub Releases check.
- ⏱️ Power Modes, Quiet Hours, Battery Profiles & Wake Timers: Balanced / Work / Night / Away presets, quiet-hours downshift, "Sleep After Lease Ends", OS RTC wake timers (
rtcwake, Task Scheduler,pmset), laptop AC vs battery thresholds + low-battery emergency suspend, and carbon grid / currency accounting. - 📱 Mobile PWA Dashboard, Fleet View & Wake-on-LAN: QR code pairing, live SVG sparklines, 1-tap
+ Ignore, multi-machine Fleet View tab,agent-power-guard daemonheadless mode,agent-power-guard relayWake-on-LAN server, and native.deb, universal macOS.app, and Windows MSI installers.
📦 Download & Installation Guide
| Platform / Architecture | Download Asset | Description & Format |
|---|---|---|
| Windows 10 / 11 (Installer) | AgentPowerGuard-windows-x64.msi |
Recommended for Windows. Start Menu, desktop shortcuts, Add/Remove Programs. |
| Windows 10 / 11 (Portable) | agent-power-guard-windows-x64.exe |
Portable single-file binary. Runs as standard user (AsInvoker) without UAC prompts. |
| Debian / Ubuntu Linux | agent-power-guard_1.2.2_amd64.deb |
Native .deb package with desktop integration and systemd user unit. |
| Linux (Generic tarball) | agent-power-guard-linux-x86_64.tar.gz |
Standalone Linux x86_64 binary supporting X11 & Wayland. |
| macOS (Universal Bundle) | AgentPowerGuard-macos-universal.zip |
Universal .app bundle for both Apple Silicon (M1–M4) and Intel Macs. |
| macOS (Apple Silicon) | agent-power-guard-macos-aarch64.tar.gz |
Raw standalone ARM64 binary. |
| macOS (Intel Core x86_64) | agent-power-guard-macos-x86_64.tar.gz |
Raw standalone x86_64 binary. |
🚀 Quick Start & Installation
Windows
- Installer: Double-click
AgentPowerGuard-windows-x64.msito install, or run silently with:msiexec /i AgentPowerGuard-windows-x64.msi /qn
- Portable: Download
agent-power-guard-windows-x64.exeand double-click to launch.
Linux
sudo apt update
sudo apt install -y pkg-config libx11-dev libxext-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxss-dev libxkbcommon-dev libwayland-dev xprintidle libgtk-3-dev libayatana-appindicator3-dev
tar -xzvf agent-power-guard-linux-x86_64.tar.gz
cd agent-power-guard
./agent-power-guardmacOS
tar -xzvf agent-power-guard-macos-aarch64.tar.gz
./agent-power-guard💡 Staged Power-Saving Strategy
- Stage 1 (Monitor Off): Turns off your display first (saves 50–100W immediately and protects screen/OLED) while leaving CPU/GPU active so background agents continue working.
- Stage 2 (Sleep Mode): Once the monitor is off and all 11 conditions pass, the entire workstation enters deep sleep (< 1W draw).
⏱️ Quick Presets Included
15s Test: Instant hands-off countdown test.3m ★: Default balanced setting (Display off at 2m -> Sleep at 3m).5m,10m,15m,30m,45m,1h,2h,3hpreset buttons.- Custom sliders adjustable from 10s up to 3 hours.