import { type DaemonBrokerClient } from "./client.js"; import type { DaemonSnapshot } from "@oh-my-pi/pi-tui/tools/daemon"; /** Snapshot a broker daemon, treating "unknown daemon" and broker errors as absent. */ export declare function describeQuietly(client: DaemonBrokerClient, name: string, label: string, signal?: AbortSignal): Promise; /** * What {@link describeDaemon} established. `absent` means the broker listed its * daemons without this name; `unknown` means no answer settled it (timeout, * dropped socket, or a rejection the list could not resolve), so the daemon may * still be running. */ export type DaemonDescription = { status: "found"; daemon: DaemonSnapshot; } | { status: "absent"; } | { status: "unknown"; }; /** * Snapshot a broker daemon, telling an unregistered name apart from a failed * lookup. The broker reports an unknown name only as a rejection, and rejects * requests for other reasons (authentication, validation) the same way, so a * rejected `describe` is settled by the broker's daemon list. Use this instead * of {@link describeQuietly} when absence authorizes a step that would harm a * running daemon. */ export declare function describeDaemon(client: DaemonBrokerClient, name: string, label: string, signal?: AbortSignal): Promise; /** Block until the daemon reports ready; undefined on timeout or pre-ready exit. */ export declare function waitReady(client: DaemonBrokerClient, name: string, label: string, signal?: AbortSignal, timeoutMs?: number): Promise; /** * Best-effort stop before replacing a wedged or endpoint-less daemon. Resolves * with the broker's post-stop snapshot when one arrived, so callers that need * proof the daemon actually ended can require a terminal state; a rejected, * unanswered, or aborted stop resolves `undefined` — like the other quiet * helpers here, the RPC failure is logged and absorbed rather than thrown. * With `id`, a generation another process started since is left running and * its snapshot returned. */ export declare function stopQuietly(client: DaemonBrokerClient, name: string, label: string, signal?: AbortSignal, id?: string): Promise;