import type { HookPluginHandler, HookEngineStatus, WatcherEvent, FileHookType, ExtendedHookResult } from '../../types/file-hooks.js';
import { EventBus } from './event-bus.js';
/**
 * Orchestrates all hook handlers with plugin support, priority ordering,
 * async non-blocking execution, and telemetry.
 */
export declare class HookEngine {
    private readonly handlers;
    private readonly telemetry;
    private readonly eventBus;
    private running;
    private pendingCount;
    constructor(eventBus?: EventBus);
    /**
     * Register a hook handler with optional priority.
     * Lower priority = executed first (default: 100).
     */
    register(handler: HookPluginHandler): void;
    /**
     * Unregister a handler by name.
     */
    unregister(name: string): boolean;
    /**
     * Start the engine (marks as running).
     */
    start(): void;
    /**
     * Stop the engine. Non-blocking by design — in-flight dispatches continue
     * until their try/finally decrements pendingCount. Use drain() to await
     * full quiescence before teardown.
     */
    stop(): void;
    /**
     * Wait for all pending handler executions to complete.
     * Polls at 10ms intervals — intended for graceful shutdown only.
     */
    drain(): Promise<void>;
    /**
     * Dispatch an event to all matching handlers (async, non-blocking).
     * Each handler is wrapped in try/catch — errors don't propagate.
     */
    dispatch(event: WatcherEvent, hookType: FileHookType): Promise<ExtendedHookResult[]>;
    /**
     * Get current engine status including telemetry.
     */
    status(): HookEngineStatus;
    /**
     * Get the underlying event bus.
     */
    getEventBus(): EventBus;
    /**
     * Get registered handler count.
     */
    getHandlerCount(): number;
    private updateTelemetry;
}
//# sourceMappingURL=hook-engine.d.ts.map