export interface LiveAgentScan { /** pids we PROVED are running this agent right now. */ running: number[]; /** * pids that are alive but whose identity we could not read. Never folded into * `running` — "we could not look" is not "we saw an agent" — and never dropped * either, so the caller can fail closed on it deliberately. */ unverified: number[]; /** * True when this platform HAS a process table to walk and the walk itself * could not run (a /proc readdir failure). The walk is the only thing that * finds an agent nobody wrote down — the very scenario the detector exists * for — so "we could not look at the table" must stay distinguishable from * "we looked and it was empty": the same could-not-tell channel as an * unverified pid, minus the pid we do not have. The caller fails closed on it * on the same terms. Platforms with no table to walk (macOS) report false — * there was nothing to fail at, and the recorded pid is their only source by * design. */ scanFailed: boolean; } /** * Every agent process on this machine that is not US. * * Two sources, because neither alone is enough: * - the pid run.ts recorded in state.json, which is the only handle we have on * a platform without /proc, and which is VERIFIED rather than trusted (see * classify): the file outlives its process — clearState() runs only from the * SIGINT/SIGTERM handler, so a worker killed by SIGKILL or an unhandled throw * leaves it behind for the rest of the boot — and a pid recorded an hour ago * may belong to something else entirely by now; * - on Linux, a walk of /proc, which is what finds the processes state.json * knows NOTHING about: the hand-started run whose state write failed, an * agent installed somewhere this command does not manage (a NAS data * volume), the survivor of a previous botched install. It also makes the * supervisor/worker pair (supervisor.ts) fall out for free — they share an exe * and an argv — where state.json records only the worker. */ export declare function findRunningAgents(): LiveAgentScan;