/**
 * Watch Service
 *
 * Monitors file system for changes and triggers workflow processing.
 * Uses chokidar for efficient file watching with debouncing.
 */
import { WatchConfig } from './config-loader.js';
export interface WatchEvent {
    type: 'add' | 'change' | 'unlink';
    path: string;
    timestamp: Date;
}
export type WatchCallback = (event: WatchEvent) => Promise<void>;
export interface WatchStats {
    filesWatched: number;
    eventsProcessed: number;
    errors: number;
    startTime: Date;
    lastEvent?: Date;
}
/**
 * File watching service with debouncing
 */
export declare class WatchService {
    private watcher;
    private callbacks;
    private debounceTimers;
    private debounceMs;
    private stats;
    private isRunning;
    constructor();
    /**
     * Start watching files
     */
    start(patterns: string[], config: WatchConfig): Promise<void>;
    /**
     * Stop watching
     */
    stop(): Promise<void>;
    /**
     * Register callback for file changes
     */
    onFileChange(callback: WatchCallback): void;
    /**
     * Remove callback
     */
    removeCallback(callback: WatchCallback): void;
    /**
     * Set debounce time
     */
    debounce(ms: number): void;
    /**
     * Get watch statistics
     */
    getStats(): WatchStats;
    /**
     * Check if service is running
     */
    running(): boolean;
    /**
     * Get list of watched files
     */
    getWatchedFiles(): string[];
    private handleEvent;
    private processEvent;
    /**
     * Add pattern to watch
     */
    addPattern(pattern: string): void;
    /**
     * Remove pattern from watch
     */
    removePattern(pattern: string): void;
    /**
     * Reset statistics
     */
    resetStats(): void;
}
//# sourceMappingURL=watch-service.d.ts.map