/**
 * Dynamic Tool Filtering
 *
 * Research-based implementation of "Less-is-More" tool filtering.
 * Pre-filters tools to only the most relevant based on task context.
 *
 * Expected Impact:
 * - 70% reduction in execution time
 * - 40% reduction in power consumption
 * - Improved tool selection accuracy
 *
 * Reference: "Less is More: Optimizing Function Calling for LLM Execution" (arXiv 2024)
 */
import type { ChatCompletionFunctionTool } from "openai/resources/chat/completions";
/**
 * Task context for tool filtering
 */
export interface TaskContext {
    /** The user's message/request */
    userMessage: string;
    /** Current file being worked on */
    currentFile?: string;
    /** File extensions in context */
    fileExtensions?: string[];
    /** Keywords extracted from context */
    keywords?: string[];
    /** Task type classification */
    taskType?: TaskType;
    /** Files mentioned in the conversation */
    mentionedFiles?: string[];
    /** Whether the task involves file operations */
    involvesFileOps?: boolean;
    /** Whether the task involves code execution */
    involvesExecution?: boolean;
    /** Whether the task involves search */
    involvesSearch?: boolean;
}
/**
 * Task type classifications
 */
export type TaskType = "file_read" | "file_write" | "file_search" | "code_execution" | "code_analysis" | "refactoring" | "debugging" | "documentation" | "git_operations" | "testing" | "general";
/**
 * Classify task type from context
 */
export declare function classifyTaskType(context: TaskContext): TaskType;
/**
 * Extract keywords from user message
 */
export declare function extractKeywords(message: string): string[];
/**
 * Detect file operations in message
 */
export declare function detectFileOps(message: string): boolean;
/**
 * Detect execution needs in message
 */
export declare function detectExecution(message: string): boolean;
/**
 * Detect search needs in message
 */
export declare function detectSearch(message: string): boolean;
/**
 * Build task context from user message
 */
export declare function buildTaskContext(userMessage: string, currentFile?: string, mentionedFiles?: string[]): TaskContext;
/**
 * Filter tools based on task context
 *
 * Returns only the most relevant tools (default: top 10)
 */
export declare function filterTools(allTools: ChatCompletionFunctionTool[], context: TaskContext, maxTools?: number, minRelevance?: number): ChatCompletionFunctionTool[];
/**
 * Get filtering statistics for debugging
 */
export declare function getFilteringStats(allTools: ChatCompletionFunctionTool[], context: TaskContext): {
    totalTools: number;
    filteredCount: number;
    taskType: TaskType;
    topTools: Array<{
        name: string;
        relevance: number;
        reasons: string[];
    }>;
};
declare const _default: {
    filterTools: typeof filterTools;
    buildTaskContext: typeof buildTaskContext;
    classifyTaskType: typeof classifyTaskType;
    extractKeywords: typeof extractKeywords;
    getFilteringStats: typeof getFilteringStats;
};
export default _default;
