import { EventEmitter } from 'node:events';
import type { FileWatcherOptions } from '../../types/file-hooks.js';
/**
 * Convert a glob pattern to a RegExp. Supports:
 * - `**` matches any path segment (including nested)
 * - `*` matches any characters except path separator
 * - `?` matches a single character
 */
export declare function globToRegex(pattern: string): RegExp;
/**
 * Test whether `filePath` matches a glob pattern.
 */
export declare function matchesGlobPattern(filePath: string, pattern: string): boolean;
/**
 * Returns true if filePath matches any include pattern
 * and does not match any exclude pattern.
 */
export declare function matchesPatterns(filePath: string, include?: string[], exclude?: string[]): boolean;
export declare class FileWatcher extends EventEmitter {
    private watcher;
    private readonly rootDir;
    private readonly include;
    private readonly exclude;
    /** Track known files to distinguish create vs modify */
    private readonly knownFiles;
    private closed;
    constructor(options: FileWatcherOptions);
    /**
     * Start watching. Emits 'change' events with WatcherEvent payloads.
     * Emits 'error' on watch failure — never throws.
     */
    start(): void;
    /**
     * Mark a file as known (pre-existing). Call this for initial file scan.
     */
    addKnownFile(relPath: string): void;
    /**
     * Mark multiple files as known.
     */
    addKnownFiles(paths: string[]): void;
    /**
     * Graceful shutdown: release all handles.
     */
    close(): void;
    private handleFsEvent;
    private determineEventType;
}
//# sourceMappingURL=file-watcher.d.ts.map