/**
 * File Watcher — CC filesystem change tracking parity.
 *
 * Fires hook events when files in the project change:
 *   - file.changed (created/modified/deleted)
 *   - cwd.changed (working directory switch)
 *
 * Uses Node.js fs.watch for project-level file monitoring.
 * Does NOT use chokidar or other heavyweight watchers —
 * this is a lightweight change-awareness system.
 *
 * Watched paths:
 *   - .qlogicagent/settings.json → permission hot-reload
 *   - INSTRUCTIONS.md / .qlogicagent/INSTRUCTIONS.md → instruction re-load
 *   - configurable additional patterns
 *
 * Reference: claude-code file-watcher usage throughout lifecycle
 */
import type { HookRegistry } from "../../contracts/hooks.js";
export interface FileWatcherDeps {
    /** Project root directory (base for relative paths) */
    projectRoot: string;
    /** Session ID for hook context */
    sessionId: string;
    /** Hook registry for file.changed / cwd.changed events */
    hooks: HookRegistry;
    /** Logger */
    log?: (msg: string) => void;
    /** Callback to reset instruction cache when instructions change (injected, decoupled from prompt/) */
    onInstructionCacheReset?: () => void;
}
export type ChangeType = "created" | "modified" | "deleted";
export interface FileChangeEvent {
    filePath: string;
    changeType: ChangeType;
    relativePath: string;
}
export declare class FileWatcher {
    private watchers;
    private deps;
    private debounceTimers;
    private _cwd;
    constructor(deps: FileWatcherDeps);
    get cwd(): string;
    /**
     * Start watching files.
     * Watches each path in WATCHED_PATHS that exists on disk.
     */
    start(): Promise<void>;
    /**
     * Watch a single path. If it's a directory, watches recursively.
     */
    private watchPath;
    /**
     * Handle a file change event (debounced).
     */
    private handleChange;
    /**
     * Update the current working directory.
     * Fires cwd.changed hook if the directory actually changed.
     */
    setCwd(newCwd: string): void;
    /**
     * Stop all watchers.
     */
    stop(): void;
}
/**
 * Create and start a file watcher.
 * Returns the watcher instance (call .stop() to clean up).
 */
export declare function createFileWatcher(deps: FileWatcherDeps): Promise<FileWatcher>;
