/** * File watcher for watch command * * Uses chokidar to monitor Claude Code project directories for JSONL changes. */ import type { FSWatcher } from "chokidar"; /** * Event types emitted by the watcher */ export type WatcherEvents = { type: "add" | "change"; filePath: string; }; /** * Watcher instance with ready promise */ export type WatcherInstance = { watcher: FSWatcher; ready: Promise; }; /** * Create a file watcher for files matching the filter * * @param args - Configuration arguments * @param args.watchDir - Directory to watch * @param args.onEvent - Callback for file events * @param args.fileFilter - Optional function to filter files (default: .jsonl files) * * @returns The watcher instance with ready promise */ export declare const createWatcher: (args: { watchDir: string; onEvent: (event: WatcherEvents) => void; fileFilter?: ((filePath: string) => boolean) | null; }) => WatcherInstance; /** * Wait for a specific watcher to be ready * * @param args - Configuration arguments * @param args.instance - The watcher instance to wait for */ export declare const waitForWatcherReady: (args?: { instance?: WatcherInstance | null; }) => Promise; /** * Stop a specific watcher or all watchers * * @param args - Configuration arguments * @param args.instance - Optional specific watcher to stop (stops all if not provided) */ export declare const stopWatcher: (args?: { instance?: WatcherInstance | null; }) => void; /** * Check if any watcher is active * * @returns True if at least one watcher is running, false otherwise */ export declare const isWatcherActive: () => boolean; //# sourceMappingURL=watcher.d.ts.map