export interface RecoverWedgedDeps { /** SIGTERM the rc scope (clean exit 143 / escalated SIGKILL). Awaited. * Task 1276 — returns stopSession's `scopeOutcome`. When it is a * confirmed-exit outcome (see `stopConfirmsExit`), the resume skips the * pid-liveness poll, which a kernel pid-reuse could otherwise defeat. */ stop(sessionId: string): Promise<{ scopeOutcome: string; }>; /** True once the wedged process has exited (its pid is no longer alive). */ processGone(sessionId: string): boolean; /** Drive a plain `--resume` rc-spawn (loopback POST, no recover flag). * `spawned` reflects whether the manager bound a live PTY for the session. * Task 1322 — `accountId` is the session's own resolved account (null when * unresolvable); the implementation forwards it as `targetAccountId` so the * resume never falls through to /rc-spawn's default-to-house behavior. */ resumeSpawn(sessionId: string, accountId: string | null): Promise<{ spawned: boolean; }>; logger: (l: string) => void; sleep(ms: number): Promise; /** Max wait for the SIGTERM'd process to exit before abandoning the resume. */ exitTimeoutMs: number; /** Poll interval while waiting for the process exit. */ pollMs: number; } /** Task 1276 — stopSession outcomes that prove the wedged process is dead. * Each of these three is returned only after stopScopeUnit's own * `isAlive(pid)` check confirmed the pid is gone at kill time * (pid-reuse-immune), unlike a later pid-liveness poll: `ok` (pid absent or * dead after `systemctl stop`), `escalated-term` (SIGTERM cleared it), * `escalated-kill` (SIGKILL cleared it). * * `already-gone` is deliberately NOT confirmed: stopScopeUnit returns it on * `systemctl stop` exit code 5 (unit not loaded) BEFORE any pid check, so a * pid reparented outside a collapsed cgroup can still be alive (the exact * case Task 451's post-flight check hardened against). It falls through to * the poll, alongside the other ambiguous / possibly-alive outcomes * (`failed-pid-survives`, `error`, `no-store-entry` — the last being the * detached-survivor class the manager never owned as a tracker). */ export declare function stopConfirmsExit(scopeOutcome: string): boolean; export declare function recoverWedgedSession(deps: RecoverWedgedDeps, sessionId: string, accountId: string | null): Promise; //# sourceMappingURL=stuck-turn-recover.d.ts.map