Process counters come from a standalone Rust monitor
using sysinfo. Electron main supplies host power and Electron process metrics.
Keeping native collection outside Node isolates collector crashes and avoids a
Node/Electron addon ABI matrix. Desktop and CLI servers use the same child-process
protocol. A missing or failed collector leaves the server running.
The native child owns sampling and bounded in-memory history. The server requests continuous snapshots only while diagnostics has live subscribers and fetches history on demand. Consuming host power for background scheduling must not retain live diagnostics. There is no telemetry database or recurring shell-probe fallback.
History has independent bounds for age, snapshot count, process rows, and retained
bytes. A count limit alone cannot bound memory when command lines vary in size.
Large process trees therefore shorten the available history window. Linux task
enumeration is disabled because walking every /proc/<pid>/task/<tid> directory
makes sampling itself expensive.
Electron power updates travel over private inherited pipes, independent of the
renderer connection. Power events and slow heartbeats continue with diagnostics
closed; app.getAppMetrics() runs only on live demand. The receiver's stale deadline
must exceed the slowest configured heartbeat plus scheduling grace, or intentional
idle polling makes background policy oscillate between constrained and
unconstrained states. Headless servers leave unavailable power data unknown.
A WSL backend needs a Linux monitor even though Electron runs on Windows. Windows desktop packages currently supply only the Windows executable, so native process telemetry for the WSL backend is unavailable. The inherited Electron power feed still works.