export type ProcessIdentity = { pid: number; startIdentity: string; }; /** * Tracks supervised process groups by PID and operating-system start identity. * A later server kills a recorded process only when both values still match. */ export declare class ServerProcessRegistry { private readonly filePath; private readonly processes; constructor(storeDir: string); register(pid: number): ProcessIdentity; unregister(pid: number): void; get size(): number; /** Kill one exact registered process group and remove its durable record. */ kill(pid: number): boolean; /** Kill every process that still has its registered start identity. */ killAll(): void; /** Reap only exact stale process identities recorded by an older server. */ reapOrphans(): number[]; private readFile; private persist; } /** Return the operating-system parent PID for a live process. */ export declare function processParentPid(pid: number): number | undefined; /** Return an operating-system process start value that fences PID reuse. */ export declare function processStartIdentity(pid: number): string | undefined; export declare function matchesProcessIdentity(identity: ProcessIdentity): boolean;