import type { Orckit } from '../orchestrator/orchestrator.js'; export interface SessionTrackerOptions { /** Directory for the session file. Created on demand. */ dir: string; /** * How often (ms) to re-walk each managed process's descendant tree. One `ps` * per interval regardless of process count. Default 15s — frequent enough * that a force-quit rarely loses more than the newest children, cheap enough * to leave running for a whole dev session. */ refreshMs?: number; } export interface SessionTrackerHandle { /** Absolute-or-relative path of the session file being maintained. */ dir: string; /** Stop tracking and delete the session file (a clean exit leaves nothing). */ dispose(): void; } /** * Reporter-style consumer that keeps an on-disk record of the process groups * this orckit spawned, so the NEXT `orc start` can detect and reap them if this * one dies without running any teardown (SIGKILL, force quit, OOM killer). * * Adds a record when a process spawns, drops it when the process stops, fails * or finishes, and deletes the file entirely on `dispose()` — so the file * existing at boot means "the previous session did not exit cleanly". */ export declare function attachSessionTracker(orckit: Orckit, opts: SessionTrackerOptions): SessionTrackerHandle; //# sourceMappingURL=session-tracker.d.ts.map