/** * Resolved per call rather than captured at import, the way daemonConfig does: * os.homedir() tracks $HOME, and a module-level constant freezes whatever it * was when the file was first loaded — which makes this unverifiable in a test * and wrong in any process that changes HOME. */ export declare function decibelHome(): string; /** * DECIBEL_DAEMON_SIDECAR= marks a second daemon run beside the real one * (a branch build on another port, decibel-hq ADR-0018 testing). Its pid, * meta and logs live in , so it never takes over the machine's * advertisement, and server.ts skips the machine singletons (peer broker, * presence, HQ command dispatch, chat). Config, env and projects stay shared. */ export declare function sidecarDir(): string | null; /** Where this daemon's pid, meta and logs live: the sidecar dir, else ~/.decibel. */ export declare function daemonStateDir(): string; export declare function metaPath(): string; /** The port the daemon binds when nothing says otherwise. */ export declare const DEFAULT_DAEMON_PORT = 4888; export interface DaemonMeta { started_at: string; crash_count: number; port?: number; pid?: number; } /** * Is this pid a process that currently exists? * * Signal 0 performs the permission and existence checks without delivering * anything. EPERM means the process is there and owned by someone else, which * is still alive — only ESRCH means gone. */ export declare function isPidAlive(pid: number | undefined): boolean; export declare function readDaemonMeta(): DaemonMeta | null; /** * The advertised port, or undefined when there is no usable advertisement. * * An entry whose pid is dead is treated as absent rather than followed. That is * the whole point: a stale port is worse than no port, because callers fall * back to the default when there is nothing to read and dial a corpse when * there is. */ export declare function advertisedPort(): number | undefined; /** Discovery order shared by every client: explicit > env > meta > default. */ export declare function resolveDaemonPort(explicit?: number): number; /** * True when someone else is currently advertising — a live pid that is not us. * Taking discovery from a running daemon is how a second instance silently * breaks the first one's clients, so callers refuse rather than overwrite. */ export declare function heldByAnotherProcess(): DaemonMeta | null; //# sourceMappingURL=daemonMeta.d.ts.map