/**
 * One request over a shared RPC socket, answered by the line carrying its id. A leaf on purpose: the lifecycle
 * supervisor asks the endpoint who answers it (`host-supersession`), and its import graph has a module budget
 * (`test/supervisor-import-graph.test.ts`), so this file must not reach the protocol-info parser or anything
 * behind it. `host-probe` builds the typed questions on top of it.
 */
import { type Socket } from "node:net";
import { type RpcKeyOptions } from "./rpc-auth-client.ts";
export declare const PROBE_REQUEST_ID = "ensure-host-probe";
/** One probe's outcome: whether the socket accepted a connection, and the answer if one arrived. */
export interface ProbeOutcome {
    readonly connected: boolean;
    readonly answer: unknown;
    /** The answering connection, left open, when the caller asked to keep it. */
    readonly kept?: Socket;
}
/** Sends one command and returns its `data`, or `undefined` for any failure to get a usable answer. */
export declare function requestOnSocket(socketPath: string, command: Readonly<Record<string, unknown>>, timeoutMs: number, options?: RpcKeyOptions): Promise<unknown>;
export declare function connectAndAsk(socketPath: string, request: Readonly<Record<string, unknown>>, timeoutMs: number, keep?: boolean, options?: RpcKeyOptions): Promise<ProbeOutcome>;
export declare function readAnswer(text: string, id?: string): unknown;
export declare function isRecord(value: unknown): value is Readonly<Record<string, unknown>>;
//# sourceMappingURL=host-socket-request.d.ts.map