/** * Shared filesystem watcher factory for mountable adapters. * * Uses chokidar for cross-platform, debounced file watching. * * Automatically reads .gitignore from the watched directory and merges * those patterns into chokidar's ignore list. This prevents scanning * large generated directories (node_modules, dist, .next, etc.) that * most projects already declare as ignored. */ import type { ConnectorChangeEvent } from "./connector-types.js"; import type { WatchHandle, WatchOptions } from "./shared-types.js"; /** Default chokidar `awaitWriteFinish` stability threshold (ms). */ export declare const DEFAULT_DEBOUNCE_MS = 150; /** * Create a cross-platform filesystem watcher on `rootDir` using chokidar. * Auto-reads `.gitignore` from `rootDir` and merges those patterns into the ignore list. * @param rootDir - Absolute path to the directory to watch. * @param callback - Called with each `ConnectorChangeEvent` (create / edit / delete). * @param options - Debounce interval and additional ignore patterns. * @returns A `WatchHandle` — call `.close()` to stop watching. * @docLink packages/connectors/api-reference#create-fs-watcher */ export declare function createFsWatcher(rootDir: string, callback: (event: ConnectorChangeEvent) => void, options?: WatchOptions): Promise; //# sourceMappingURL=watcher.d.ts.map