@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
26 lines • 1.44 kB
TypeScript
import { type HostDaemonDirectory } from "./host-daemon-paths.ts";
export type EndpointInUse = "live_generation" | "live_claim" | "reachable" | "credential_unavailable";
export type SocketSilence = "socket_refused" | "socket_absent";
/**
* The three-part test, in the order its answers are reported: (a) no generation pidfile names a live
* process - the pointer's generation included, since its record lives under `generations/` too - (b) no
* session-path claim has a live owner, (c) the public socket - and every `.next-*` successor bind beside
* it - refuses the connection or does not exist.
*/
export declare function endpointInUse(paths: HostDaemonDirectory, socket: string): Promise<{
readonly inUse: EndpointInUse;
} | {
readonly inUse: undefined;
readonly silence: SocketSilence;
}>;
/**
* Every entry beside `socket` that belongs to it: `<name>.next-*` successor binds, `<name>.shield-*`, and the
* `<name>.bind-*` directory a bind crashed out of (`host-socket-bind.ts`).
*/
export declare function socketSiblings(socket: string): Promise<readonly string[]>;
/**
* EVERY generation, not only the pointer's: a predecessor draining after a handoff is still serving.
* Also the "dead" half of `classifyEndpointLiveness`, so the verdict and gc never disagree about it.
*/
export declare function anyGenerationLive(paths: HostDaemonDirectory): Promise<boolean>;
//# sourceMappingURL=host-gc-evidence.d.ts.map