/** * Coder mode (#359): find a full-access turn's processes by an inherited * environment marker instead of by timing. * * `agent-runner-claude-fullaccess.ts` puts `MONOMIND_EXEC_TREE=` in the `claude` child's env. Every descendant inherits it — * including a `nohup cmd &` job that was reparented to init/a subreaper * after its launching Bash-tool shell exited (live-verified against the * installed Claude Code CLI) — so a scan at kill/report time finds it no * matter how briefly the shell lived. A process that clears or rewrites * its own environment (`env -i`, some daemons) escapes this scan; the * sampled process-group tracking in process-tree.ts still covers those * when a sample caught their launching shell. * * Only processes of the same user are readable (`/proc//environ` is * owner-only; `ps -E` shows only one's own env), which is exactly the set * a full-access turn can start. */ export declare const EXEC_TREE_ENV = "MONOMIND_EXEC_TREE"; export interface MarkerScan { /** Pids whose environment carries `EXEC_TREE_ENV=`. */ marked: number[]; /** Pids that carry `EXEC_TREE_ENV` with any OTHER value (`''` included): * setup daemons a session hook started (#366) or another turn's tree. * They have left this turn's tree — never killed or reported by it. */ foreign: Set; } /** One pass over the process table for `token`, excluding this process. * Best effort: unreadable entries are skipped, never fatal. */ export declare function scanMarkers(token: string, plat?: NodeJS.Platform): MarkerScan; /** Pids whose environment carries `EXEC_TREE_ENV=`, excluding this * process. */ export declare function pidsWithMarker(token: string, plat?: NodeJS.Platform): number[]; //# sourceMappingURL=process-tree-marker.d.ts.map