/**
 * WorkspaceWatcher — native recursive file system watching, inspired by VS Code's
 * @parcel/watcher integration (src/vs/platform/files/node/watcher/parcel/parcelWatcher.ts).
 *
 * Uses @parcel/watcher for OS-native events (FSEvents on macOS, inotify on Linux,
 * ReadDirectoryChangesW on Windows) with event coalescing and throttled emission
 * so that burst writes (e.g. `git checkout`, `npm install`) don't flood clients.
 */
import { EventEmitter } from "node:events";
export type FileChangeType = "created" | "updated" | "deleted";
export interface FileChangeEvent {
    /** Workspace-relative path (forward slashes) */
    path: string;
    type: FileChangeType;
}
export interface WorkspaceWatcherOptions {
    /**
     * Glob patterns to ignore.  Defaults include .git, node_modules, dist, etc.
     */
    ignore?: string[];
    /**
     * Coalesce window in ms — events are buffered and deduplicated within this
     * window before being emitted.  Default: 150 (VS Code uses 75 + 200 throttle).
     */
    coalesceMs?: number;
    /**
     * Maximum events per emission batch.  Prevents memory blow-up during
     * large operations.  Default: 500.
     */
    maxBatchSize?: number;
}
export declare class WorkspaceWatcher extends EventEmitter {
    private subscription;
    private buffer;
    private flushTimer;
    private _root;
    private options;
    constructor(opts?: WorkspaceWatcherOptions);
    get root(): string | null;
    get watching(): boolean;
    /**
     * Start watching a workspace root directory.
     * Stops any previous watcher first.
     */
    watch(workspaceRoot: string): Promise<void>;
    /** Stop watching and flush any pending events. */
    stop(): Promise<void>;
    private handleRawEvents;
    private flush;
}
//# sourceMappingURL=workspace-watcher.d.ts.map