/** * Daemon entry-point logic extracted for testability. * * All functions in this module are pure filesystem / process utilities that * can be exercised in unit tests without forking a real daemon process. */ /** * Write the daemon startup confirmation file to tmpdir. * * Returns the absolute path of the file written so the caller can log it * or pass it to cleanupOnShutdown. */ export declare function writeStartupFile(pid: number, port: number): string; /** * Remove daemon-owned files during graceful shutdown. * * Only removes the PID and auth files if the PID recorded in them matches * this process. A new daemon may have already written its own files while * this process was shutting down — deleting them would orphan the successor. * * The startup file is always removed because it is PID-specific. * * Silently ignores ENOENT — any file that is already absent is fine. * Any other filesystem error is re-thrown. */ export declare function cleanupOnShutdown(pid: number): void; /** * Read the package version from package.json in cwd. * * Falls back to "0.0.0" when the file cannot be found or parsed — this keeps * the daemon running even in unusual deploy layouts. */ export declare function getPackageVersion(): string; //# sourceMappingURL=entry-logic.d.ts.map