@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
21 lines • 1.43 kB
TypeScript
import { type EndpointKind, type HostDaemonDirectory } from "./host-daemon-paths.ts";
import type { HostEndpointEntry } from "./host-endpoints.ts";
export type EndpointLiveness = "routable" | "live_unresponsive" | "dead";
/**
* A TUI answers from the user's terminal process: a suspended (`^Z`) or busy one must cost a caller
* at most this long, so one stopped terminal never stalls a listing of every endpoint.
*/
export declare const TUI_PROBE_TIMEOUT_MS = 1500;
/** The probe budget for one endpoint of `kind`; a `tui` endpoint never gets more than TUI_PROBE_TIMEOUT_MS. */
export declare function endpointProbeTimeoutMs(kind: EndpointKind, requestedMs?: number): number;
/** Probes the endpoint once, under its kind's budget, and judges it. Reads only. */
export declare function classifyEndpointLiveness(entry: Pick<HostEndpointEntry, "socket" | "dir" | "endpoint_kind">, options?: {
readonly timeoutMs?: number;
}): Promise<EndpointLiveness>;
/**
* The verdict from an answer already in hand, for a reader that probed the socket itself
* (`status --all`): `undefined` when nothing answered, `null` when a host answered without naming its
* instance, else the instance id it named. Anything that answered is never `dead`.
*/
export declare function judgeEndpointLiveness(paths: HostDaemonDirectory, answered: string | null | undefined): Promise<EndpointLiveness>;
//# sourceMappingURL=host-endpoint-liveness.d.ts.map