Expand description
Local context probes a detector plugin can ask about, through the gated
host functions in super::runtime (#156, slice 5).
These are the host-performed reads: the plugin never touches the OS
itself — it calls a host function, and the host runs the probe here and
returns only a boolean. The matching logic is pure and unit-tested; the
sysinfo process read is cross-platform (so it’s exercised on every OS,
per the coverage policy) rather than a per-OS FFI shim.
Constants§
- MAX_
FLAG_ 🔒BYTES - Maximum sentinel-flag file we’ll read. A flag is a tiny truthy marker, so anything larger is treated as not-a-flag rather than read into memory.
Functions§
- flag_
is_ truthy - Whether the trimmed, lowercased contents are a recognised truthy token. Pure — the testable core of the file probe.
- process_
running - Whether any running process’s name matches
pattern, using the same token-aware semantics as the app-pause guard (process_match_lower) — sozoommatches Zoom but notzoominfo. Refreshes the process list on each call; callers throttle. Cross-platform viasysinfo, so no per-OS shim. - read_
flag - Whether the sentinel file at
pathexists and holds a truthy value. A missing, oversized, or unreadable file reads asfalse(no signal). Reusescrate::secure_io::read_cappedfor the size-bounded read.