import { EventEmitter } from 'events';
export type HookType = 'pre-commit' | 'post-commit' | 'pre-edit' | 'post-edit' | 'pre-create' | 'post-create' | 'pre-bash' | 'post-bash' | 'on-file-change' | 'on-error' | 'on-session-start' | 'on-session-end';
export interface Hook {
    type: HookType;
    command: string;
    enabled: boolean;
    timeout?: number;
    continueOnError?: boolean;
    description?: string;
}
export interface HooksConfig {
    hooks: Hook[];
    globalTimeout?: number;
    enabled?: boolean;
}
export interface HookResult {
    success: boolean;
    output?: string;
    error?: string;
    exitCode?: number;
    skipped?: boolean;
    timedOut?: boolean;
}
export interface HookContext {
    file?: string;
    files?: string[];
    command?: string;
    oldContent?: string;
    newContent?: string;
    error?: Error;
    [key: string]: unknown;
}
/**
 * Hook System - Inspired by Claude Code
 * Allows automatic actions at specific points like pre-commit, post-edit, etc.
 */
export declare class HookSystem extends EventEmitter {
    private hooks;
    private workingDirectory;
    private configPaths;
    private globalTimeout;
    private enabled;
    constructor(workingDirectory?: string);
    /**
     * Load hooks from configuration files
     */
    private loadHooks;
    /**
     * Execute hooks of a specific type
     */
    executeHooks(type: HookType, context?: HookContext): Promise<HookResult[]>;
    /**
     * Execute a single hook
     */
    private executeHook;
    /**
     * Interpolate placeholders in hook command
     * SECURITY: All values are escaped to prevent command injection
     */
    private interpolateCommand;
    /**
     * Check if any hooks are registered for a type
     */
    hasHooks(type: HookType): boolean;
    /**
     * Get hooks of a specific type
     */
    getHooks(type: HookType): Hook[];
    /**
     * Get all hooks
     */
    getAllHooks(): Map<HookType, Hook[]>;
    /**
     * Add a hook programmatically
     */
    addHook(hook: Hook): void;
    /**
     * Remove hooks of a specific type
     */
    removeHooks(type: HookType): void;
    /**
     * Enable or disable the hook system
     */
    setEnabled(enabled: boolean): void;
    /**
     * Check if hook system is enabled
     */
    isEnabled(): boolean;
    /**
     * Reload hooks from configuration
     */
    reload(): void;
    /**
     * Save current hooks to project configuration
     */
    saveHooks(): void;
    /**
     * Create default hooks configuration template
     */
    createDefaultConfig(): string;
    /**
     * Escape shell special characters for safe interpolation
     */
    private escapeShellArg;
    /**
     * Dispose the hook system and clean up resources
     */
    dispose(): void;
    /**
     * Format hooks status for display
     */
    formatStatus(): string;
}
export declare function getHookSystem(workingDirectory?: string): HookSystem;
export declare function resetHookSystem(): void;
