/**
 * Daemon lockfile. Stores the PID, IPC socket path, and start time so the
 * TUI can find the daemon and `nanocoder daemon status` can tell whether
 * one is running.
 *
 * Atomicity: writes go to a sibling `*.tmp` file and rename in place, so a
 * partially-written lockfile is never observable.
 *
 * Stale detection: a lockfile pointing at a dead PID is reaped on first
 * read by any caller that cares (start, status).
 *
 * See `agents/2026-05-20-skills-unification-plan.md` step 19.
 */
export interface DaemonLock {
    pid: number;
    socketPath: string;
    startedAt: number;
    projectRoot: string;
}
export declare function getLockfilePath(projectRoot: string): string;
/**
 * IPC endpoint path. Unix-like: a project-local AF_UNIX socket file. Windows:
 * a named pipe whose name embeds a hash of the project root so multiple
 * projects each get their own pipe namespace. The path is stored verbatim
 * in the lockfile, so clients read it back regardless of platform.
 */
export declare function getSocketPath(projectRoot: string): string;
export declare function readLockfile(projectRoot: string): Promise<DaemonLock | null>;
export declare function writeLockfile(lock: DaemonLock): Promise<void>;
export declare function removeLockfile(projectRoot: string): Promise<void>;
/**
 * Probe whether the PID in the lockfile is still alive. Uses signal 0 so
 * no signal is actually delivered - the kernel just reports whether
 * sending would have been allowed.
 */
export declare function isProcessAlive(pid: number): boolean;
/**
 * Read the lockfile and verify the daemon is actually running. Removes
 * stale lockfiles as a side effect so subsequent `daemon start` calls
 * have a clean slate.
 */
export declare function readLiveLockfile(projectRoot: string): Promise<DaemonLock | null>;
//# sourceMappingURL=lockfile.d.ts.map