@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
22 lines • 1.02 kB
TypeScript
/**
* The readiness gate of a host this process just spawned: poll `get_protocol_info` until the host
* answers compatibly, the budget runs out, or the spawned supervisor exits. A compatible answer
* comes with the attach hold of the connection it arrived on (see host-attach-hold.ts).
*/
import type { HostAttachHold } from "./host-attach-hold.ts";
import type { HostProtocolInfo } from "./host-decision.ts";
export type ChildExit = {
readonly code: number | null;
readonly signal: NodeJS.Signals | null;
};
export type ProtocolPollResult = {
readonly ready: true;
readonly protocol: HostProtocolInfo;
readonly hold: HostAttachHold;
} | {
readonly ready: false;
readonly protocol?: HostProtocolInfo;
readonly exited?: ChildExit;
};
export declare function pollProtocolInfo(socket: string, timeoutMs: number, isCompatible: (protocol: HostProtocolInfo | undefined) => boolean, childExit?: Promise<ChildExit>): Promise<ProtocolPollResult>;
//# sourceMappingURL=host-readiness.d.ts.map