/** One daemon per .staves dir. The lockfile says where it is. */ export declare function lockPath(dir: string): string; export declare function readLock(dir: string): { port: number; pid: number; url: string; since: string; } | null; export declare function alive(url: string): Promise; /** Find a live daemon for this dir, or start one in the background and wait for it. */ export declare function ensureDaemon(dir: string, preferPort?: number, log?: (s: string) => void): Promise; /** Run as the daemon: own the store and the page, write the lockfile, exit when told. */ export declare function runDaemon(dir: string, port: number, idleMs?: number): Promise; /** The web service writes the same lockfile so doctor, open and the MCP clients find it. */ export declare function writeLock(dir: string, url: string): void; export declare function liveIdle(dir: string, idleMs: number): void;