ableton-mcp-server-rag
Version:
Ableton Live MCP depend on Ableton JS
66 lines (65 loc) • 2.02 kB
TypeScript
import { ToolMetadata } from './tool-vector.js';
export interface QueryPart {
type: 'knowledge' | 'action';
content: string;
confidence: number;
}
export interface HybridResponse {
knowledgeAnswer: string;
relevantTools: ToolMetadata[];
combinedResponse: string;
queryAnalysis: {
hasKnowledge: boolean;
hasActions: boolean;
detectedParts: QueryPart[];
};
}
export declare class HybridQueryProcessor {
private static DEBUG_CLASSIFICATION;
private static KNOWLEDGE_INDICATORS;
private static ACTION_INDICATORS;
static processHybridQuery(query: string): Promise<HybridResponse>;
private static splitQuery;
/**
* Multi-stage classification pipeline for 100% accuracy
*/
private static classifyWithPipeline;
/**
* Stage 1: Verb-based classification with context analysis
*/
private static classifyByVerbAnalysis;
/**
* Stage 2: Pattern matching for query structures
*/
private static classifyByPatterns;
/**
* Stage 3: Tool-aware classification using available tools
*/
private static classifyByToolAnalysis;
private static generateCombinedResponse;
/**
* Test function to validate the enhanced classification system
* Can be called during development to verify accuracy
*/
static testClassification(): void;
/**
* Enable or disable debug logging for classification pipeline
*/
static setDebugMode(enabled: boolean): void;
/**
* Get contextual tools based on query content - ENSURES ESSENTIAL TOOLS ARE INCLUDED
*/
private static getContextualTools;
/**
* Detect simple conversational queries that don't need RAG knowledge
*/
private static isSimpleConversationalQuery;
/**
* Compress knowledge to prevent token bloat
*/
private static compressKnowledge;
/**
* Add this method to find functionally correct tools
*/
private static findFunctionallyRelevantTools;
}