/**
 * @fileoverview RalphFixPlanWatcher - Watches @fix_plan.md for changes
 *
 * Monitors the @fix_plan.md file in the session's working directory
 * for changes, parsing todo items from the markdown format.
 *
 * Extracted from ralph-tracker.ts as part of domain splitting.
 *
 * @module ralph-fix-plan-watcher
 */
import { EventEmitter } from 'node:events';
import type { RalphTodoPriority, RalphTodoItem } from './types.js';
/**
 * Generate @fix_plan.md content from todo items.
 * Groups todos by priority and status.
 *
 * @param todos - Array of todo items
 * @returns Markdown content for @fix_plan.md
 */
export declare function generateFixPlanMarkdown(todos: RalphTodoItem[]): string;
/**
 * Parse @fix_plan.md content and return parsed todo items.
 *
 * @param content - Markdown content from @fix_plan.md
 * @param parsePriority - Function to parse priority from content text
 * @param generateTodoId - Function to generate stable todo ID from content
 * @returns Array of parsed todo items
 */
export declare function importFixPlanMarkdown(content: string, parsePriority: (content: string) => RalphTodoPriority, generateTodoId: (content: string) => string): RalphTodoItem[];
/**
 * RalphFixPlanWatcher - Watches @fix_plan.md for changes.
 *
 * Events emitted:
 * - `todosLoaded` - Emits parsed todo items when @fix_plan.md is loaded/changed
 * - `enabled` - Emits when tracker should be auto-enabled (todos loaded from file)
 */
export declare class RalphFixPlanWatcher extends EventEmitter {
    /** Working directory for @fix_plan.md watching */
    private _workingDir;
    /** Path to the @fix_plan.md file being watched */
    private _fixPlanPath;
    /** File watcher for @fix_plan.md */
    private _fixPlanWatcher;
    /** Error handler for FSWatcher (stored for cleanup to prevent memory leak) */
    private _fixPlanWatcherErrorHandler;
    /** Debounce timer for file change events */
    private _fixPlanReloadTimer;
    /** Priority parser injected from parent (for importFixPlanMarkdown) */
    private _parsePriority;
    /** Todo ID generator injected from parent */
    private _generateTodoId;
    constructor(parsePriority: (content: string) => RalphTodoPriority, generateTodoId: (content: string) => string);
    /**
     * When @fix_plan.md is active, treat it as the source of truth for todo status.
     * This prevents output-based detection from overriding file-based status.
     */
    get isFileAuthoritative(): boolean;
    /**
     * Set the working directory and start watching @fix_plan.md.
     * Automatically loads existing @fix_plan.md if present.
     * @param workingDir - The session's working directory
     */
    setWorkingDir(workingDir: string): void;
    /**
     * Load @fix_plan.md from disk if it exists.
     * Called on initialization and when file changes are detected.
     */
    loadFixPlanFromDisk(): Promise<number>;
    /**
     * Start watching @fix_plan.md for changes.
     * Reloads todos when the file is modified.
     */
    private startWatchingFixPlan;
    /**
     * Handle @fix_plan.md file change with debouncing.
     */
    private handleFixPlanChange;
    /**
     * Stop watching @fix_plan.md.
     */
    stopWatchingFixPlan(): void;
    /**
     * Stop watching and clean up all resources.
     */
    stop(): void;
    /**
     * Clean up all resources.
     */
    destroy(): void;
}
//# sourceMappingURL=ralph-fix-plan-watcher.d.ts.map