/**
 * Formal Tool Registry
 *
 * Centralized registry for all tools with:
 * - Type-safe registration via ITool interface
 * - Query and filtering capabilities
 * - Execution tracking and metrics
 * - Event emission for monitoring
 */
import { EventEmitter } from 'events';
import type { ITool, IToolRegistry, IRegisteredTool, IToolRegistrationOptions, IToolQueryOptions, IToolExecutionContext, IToolExecutionResult, IRegistryStats, ToolSchema, IToolRegistryEvents, ToolRegistryEventHandler } from './types.js';
/**
 * Formal tool registry implementing IToolRegistry interface.
 *
 * Features:
 * - Singleton pattern for global access
 * - Type-safe tool registration
 * - Query and filter tools
 * - Execution tracking with metrics
 * - Event emission for tool lifecycle
 */
export declare class FormalToolRegistry extends EventEmitter implements IToolRegistry {
    private static instance;
    private tools;
    private executionStats;
    private constructor();
    /**
     * Get singleton instance
     */
    static getInstance(): FormalToolRegistry;
    /**
     * Reset singleton (for testing)
     */
    static reset(): void;
    /**
     * Register a tool
     */
    register(tool: ITool, options?: IToolRegistrationOptions): void;
    /**
     * Unregister a tool
     */
    unregister(name: string): boolean;
    /**
     * Get a tool by name
     */
    get(name: string): IRegisteredTool | undefined;
    /**
     * Check if a tool is registered
     */
    has(name: string): boolean;
    /**
     * Check if a tool is enabled
     */
    isEnabled(name: string): boolean;
    /**
     * Get all registered tool names
     */
    getNames(): string[];
    /**
     * Get all registered tools
     */
    getAll(): IRegisteredTool[];
    /**
     * Query tools with filters
     */
    query(options?: IToolQueryOptions): IRegisteredTool[];
    /**
     * Get tool schemas for LLM
     */
    getSchemas(options?: IToolQueryOptions): ToolSchema[];
    /**
     * Execute a tool by name
     */
    execute(name: string, input: Record<string, unknown>, context?: IToolExecutionContext): Promise<IToolExecutionResult>;
    /**
     * Clear all tools
     */
    clear(): void;
    /**
     * Get registry statistics
     */
    getStats(): IRegistryStats;
    /**
     * Type-safe event subscription
     */
    on<K extends keyof IToolRegistryEvents>(event: K, handler: ToolRegistryEventHandler<K>): this;
    /**
     * Type-safe event emission
     */
    emit<K extends keyof IToolRegistryEvents>(event: K, data: IToolRegistryEvents[K]): boolean;
}
/**
 * Get the singleton tool registry instance
 */
export declare function getFormalToolRegistry(): FormalToolRegistry;
/**
 * Create a test registry (non-singleton)
 */
export declare function createTestToolRegistry(): FormalToolRegistry;
