/** * Per-session control endpoint — a Unix domain socket served by the RuntimeOwner so * stateless `gjc harness` CLI calls can route owner-routed primitives (submit, observe, * recover, retire) to the live owner. One JSON request line in, one JSON response line out. * * The owner is the only listener; clients connect per call. When no socket is reachable * the caller falls back to the no-owner behavior (read-only observe, owner-not-live submit). * * FIFO fallback (for platforms/paths where AF_UNIX is unavailable or path-length limited) * is a documented seam tracked as an ADR follow-up. */ export interface EndpointRequest { verb: string; input: Record; } export type EndpointHandler = (req: EndpointRequest) => Promise; export declare class ControlServer { #private; readonly socketPath: string; private readonly handler; constructor(socketPath: string, handler: EndpointHandler); listen(): Promise; close(): Promise; } export declare class EndpointUnreachableError extends Error { readonly socketPath: string; readonly reason: string; constructor(socketPath: string, reason?: string); } /** Call the owner's control endpoint. Rejects with {@link EndpointUnreachableError} when no owner listens or responds. */ export declare function callEndpoint(socketPath: string, req: EndpointRequest, timeoutMs?: number): Promise;