/**
 * PID File Manager
 * Issue #96: npm install CLI support
 * Issue #136: Phase 2 - Task 2.4 - Added factory functions for Issue number support
 * SF-1: SRP - Separated from daemon.ts for single responsibility
 * MF-SEC-2: TOCTOU protection with O_EXCL atomic writes
 */
/**
 * PID file manager for daemon process tracking
 */
export declare class PidManager {
    private readonly pidFilePath;
    constructor(pidFilePath: string);
    /**
     * Check if PID file exists
     */
    exists(): boolean;
    /**
     * Read PID from file
     * @returns PID number or null if file doesn't exist or is invalid
     */
    readPid(): number | null;
    /**
     * Write PID to file atomically
     * MF-SEC-2: Uses O_EXCL to prevent TOCTOU race conditions
     *
     * @returns true if successful, false if file already exists
     * @throws Error for other filesystem errors
     */
    writePid(pid: number): boolean;
    /**
     * Remove PID file
     */
    removePid(): void;
    /**
     * Check if the process recorded in PID file is running
     * NTH-1: ISP - Lightweight process check API
     *
     * @returns true if process is running, false otherwise
     */
    isProcessRunning(): boolean;
}
/**
 * Factory function to create PidManager instance
 * Issue #136: Uses PidPathResolver for path resolution
 *
 * @param issueNo - Optional issue number for worktree-specific PID
 * @returns PidManager instance
 *
 * @example
 * ```typescript
 * // Main server PID manager
 * const mainManager = createPidManager();
 *
 * // Worktree-specific PID manager
 * const issueManager = createPidManager(135);
 * ```
 */
export declare function createPidManager(issueNo?: number): PidManager;
/**
 * Factory function to create PidManager for a specific issue
 * Issue #136: Convenience function for worktree PID management
 *
 * @param issueNo - Issue number
 * @returns PidManager instance for the specified issue
 *
 * @example
 * ```typescript
 * const manager = createIssuePidManager(135);
 * if (manager.isProcessRunning()) {
 *   console.log('Worktree server for issue #135 is running');
 * }
 * ```
 */
export declare function createIssuePidManager(issueNo: number): PidManager;
//# sourceMappingURL=pid-manager.d.ts.map