import { CodeBuddyTool } from "../codebuddy/client.js";
import { ToolMetadata, RegisteredTool } from "./types.js";
/**
 * Centralized registry for all CodeBuddy tools.
 *
 * Implements the Singleton pattern to ensure a single source of truth for:
 * - Available tools
 * - Tool metadata
 * - Tool enablement state
 *
 * This registry is used by the `ToolSelector` and agents to discover and access tools.
 */
export declare class ToolRegistry {
    private static instance;
    private tools;
    private constructor();
    /**
     * Get the singleton instance of ToolRegistry.
     * Creates the instance if it doesn't exist.
     */
    static getInstance(): ToolRegistry;
    /**
     * Register a single tool with the registry.
     *
     * @param definition - The tool definition (name, description, parameters)
     * @param metadata - Additional metadata (category, keywords, priority)
     * @param isEnabled - Optional callback to determine if the tool is enabled at runtime (default: always true)
     */
    registerTool(definition: CodeBuddyTool, metadata: ToolMetadata, isEnabled?: () => boolean): void;
    /**
     * Register multiple tools at once.
     *
     * @param tools - Array of tool objects containing definition, metadata, and optional isEnabled callback
     */
    registerTools(tools: {
        definition: CodeBuddyTool;
        metadata: ToolMetadata;
        isEnabled?: () => boolean;
    }[]): void;
    /**
     * Get all registered tools that are currently enabled.
     *
     * @returns Array of tool definitions for use with the LLM
     */
    getEnabledTools(): CodeBuddyTool[];
    /**
     * Get metadata for all enabled tools.
     * Useful for tool selection algorithms (RAG) and UI display.
     *
     * @returns Array of tool metadata objects
     */
    getEnabledToolMetadata(): ToolMetadata[];
    /**
     * Get a specific registered tool by name.
     *
     * @param name - The name of the tool to retrieve
     * @returns The registered tool object or undefined if not found
     */
    getTool(name: string): RegisteredTool | undefined;
    /**
     * Check if a tool is registered and currently enabled.
     *
     * @param name - The name of the tool to check
     * @returns True if the tool exists and isEnabled() returns true
     */
    isToolEnabled(name: string): boolean;
    /**
     * Clear all registered tools.
     * Mainly used for testing to reset the registry state.
     */
    clear(): void;
    /**
     * Get all registered tools (including disabled ones).
     *
     * @returns Array of all tool definitions
     */
    getAllTools(): CodeBuddyTool[];
}
/**
 * Helper to get the tool registry singleton.
 */
export declare const getToolRegistry: () => ToolRegistry;
