@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
21 lines • 1.25 kB
TypeScript
/**
* IS-6: a graceful stop of a host child that is alive but measurably stalled WAITS for it instead of
* SIGKILLing it after five seconds - a stalled host is still serving, and the SIGTERM it was sent is
* handled the moment its loop runs again. The wait is bounded (`SENPI_RPC_CHILD_STALLED_STOP_MAX_MS`),
* re-reads the evidence every slice, and is reported in `stop-progress.json` so a caller holding a
* deadline on this supervisor extends it instead of killing the supervisor mid-wait (senpi#2566).
*/
import type { ChildProcess } from "node:child_process";
import type { HostGenerationPaths } from "./host-daemon-paths.ts";
/**
* Waits past the ordinary stop window while the child stays stalled, in slices, up to the bound
* measured from `signalledAt`. Returns how long it waited beyond the ordinary window (0 when the child
* was not stalled at all, so the ordinary escalation is unchanged).
*/
export declare function waitOutStalledChild(options: {
readonly child: ChildProcess;
readonly generation: HostGenerationPaths;
readonly signalledAt: number;
readonly waitForExit: (child: ChildProcess, timeoutMs: number) => Promise<boolean>;
}): Promise<number>;
//# sourceMappingURL=host-lifecycle-stall-wait.d.ts.map