import type { Server } from "node:http";
import { type DaemonStatusSnapshot, type SidecarStamp } from "@open-design/sidecar-proto";
import { type SidecarRuntimeContext } from "@open-design/sidecar";
/**
 * PR #974 round 6 (mrcfps): pure wrapper that overlays the live
 * `desktopAuthGateActive` flag on a cached startup snapshot. The
 * STATUS IPC handler and the public `status()` method both call this
 * so the gate flag is always read fresh (it flips after
 * REGISTER_DESKTOP_AUTH and stays sticky), even though the rest of
 * the snapshot is captured once at boot. Exported so the daemon
 * test suite can pin the wiring without booting a real IPC server.
 */
export declare function withCurrentDesktopAuthGate(snapshot: DaemonStatusSnapshot): DaemonStatusSnapshot;
export type DaemonSidecarHandle = {
    status(): Promise<DaemonStatusSnapshot>;
    stop(): Promise<void>;
    waitUntilStopped(): Promise<void>;
};
export declare function closeHttpServer(server: Server, { closeTimeoutMs, idleCloseMs }?: {
    closeTimeoutMs?: number | undefined;
    idleCloseMs?: number | undefined;
}): Promise<void>;
export declare function startDaemonSidecar(runtime: SidecarRuntimeContext<SidecarStamp>): Promise<DaemonSidecarHandle>;
