/**
 * Hook Manager
 *
 * Central orchestrator for the hooks system. Handles configuration loading,
 * validation, and hook execution across all supported events.
 */
import { type HookEvent, type HookExecutionContext, type ExtendedHookExecutionContext, type HookExecutionResult, type HookValidationResult } from "../types/hooks.js";
import type { WaveConfiguration, PartialHookConfiguration } from "../types/configuration.js";
import { HookMatcher } from "../utils/hookMatcher.js";
import type { MessageManager } from "./messageManager.js";
import { Container } from "../utils/container.js";
export declare class HookManager {
    private container;
    private configuration;
    private readonly matcher;
    private readonly workdir;
    constructor(container: Container, workdir: string, matcher?: HookMatcher);
    /**
     * Load and merge hook configurations from user and project settings
     * Project settings take precedence over user settings
     */
    loadConfiguration(userHooks?: PartialHookConfiguration, projectHooks?: PartialHookConfiguration): void;
    /**
     * Load hooks configuration from a pre-loaded WaveConfiguration
     * Configuration loading is now handled by ConfigurationService
     */
    loadConfigurationFromWaveConfig(waveConfig: WaveConfiguration | null): void;
    /**
     * Execute hooks for a specific event
     */
    executeHooks(event: HookEvent, context: HookExecutionContext | ExtendedHookExecutionContext): Promise<HookExecutionResult[]>;
    /**
     * Process hook execution results and determine appropriate actions
     * based on exit codes and hook event type
     */
    processHookResults(event: HookEvent, results: HookExecutionResult[], messageManager?: MessageManager, toolId?: string, toolParameters?: string): {
        shouldBlock: boolean;
        errorMessage?: string;
    };
    /**
     * Handle successful hook execution (exit code 0)
     */
    private handleHookSuccess;
    /**
     * Handle blocking error (exit code 2) - behavior varies by hook type
     */
    private handleBlockingError;
    /**
     * Handle non-blocking error (other exit codes)
     */
    private handleNonBlockingError;
    /**
     * Check if hooks are configured for an event/tool combination
     */
    hasHooks(event: HookEvent, toolName?: string): boolean;
    /**
     * Validate Wave configuration structure and content
     */
    validateConfiguration(config: WaveConfiguration): HookValidationResult;
    /**
     * Validate partial hook configuration structure and content
     */
    private validatePartialConfiguration;
    /**
     * Get current configuration
     */
    getConfiguration(): PartialHookConfiguration | undefined;
    /**
     * Clear current configuration
     */
    clearConfiguration(): void;
    /**
     * Validate execution context for a specific event
     */
    private validateExecutionContext;
    /**
     * Generate a summary of hook execution results
     */
    private generateExecutionSummary;
    /**
     * Merge hook configurations, with the second taking precedence
     */
    private mergeHooksConfiguration;
    /**
     * Check if a hook configuration applies to the current context
     */
    private configApplies;
    /**
     * Validate a single event configuration
     */
    private validateEventConfig;
    /**
     * Get statistics about current configuration
     */
    getConfigurationStats(): {
        totalEvents: number;
        totalConfigs: number;
        totalCommands: number;
        eventBreakdown: Record<HookEvent, number>;
    };
    /**
     * Register hooks provided by a plugin
     */
    registerPluginHooks(hooks: PartialHookConfiguration): void;
}
//# sourceMappingURL=hookManager.d.ts.map