semantic-prompt-mcp
Version:
MCP server for semantic prompt framework - NLP-inspired adaptive reasoning engine for LLM orchestration
87 lines • 2.42 kB
TypeScript
/**
* Unified Command Handler
* Implements intelligent framework detection, parameter normalization, and routing
* Core implementation of DRY, SSOT, KISS principles
*/
interface Framework {
name: string;
enabled: boolean;
prefix: string;
alternativePrefixes: string[];
paths: Record<string, string>;
features: Record<string, boolean>;
}
export declare class UnifiedCommandHandler {
private bridge;
private normalizer;
private cache;
private sessionDocuments;
constructor();
/**
* Loads the framework bridge configuration
*/
private loadBridgeConfiguration;
/**
* Provides default bridge configuration
*/
private getDefaultBridge;
/**
* Detects which framework should handle the command
*/
detectFramework(command: string): string;
/**
* Normalizes parameters based on bridge configuration
*/
normalizeParameters(params: any, tool?: string): Record<string, any>;
/**
* Routes command to appropriate framework handler
*/
route(command: string, params: any): Promise<any>;
/**
* Handles command execution for specific framework
*/
private handleFrameworkCommand;
/**
* Validates cross-framework call permissions
*/
canCrossCall(from: string, to: string): boolean;
/**
* Gets available agents across frameworks
*/
getAvailableAgents(): string[];
/**
* Gets available MCP servers across frameworks
*/
getAvailableMCPServers(): string[];
/**
* Handles parameter translation between frameworks
*/
translateParameters(params: any, fromFramework: string, toFramework: string): any;
/**
* Clears cache
*/
clearCache(): void;
/**
* Gets framework configuration
*/
getFrameworkConfig(framework: string): Framework | undefined;
/**
* Checks if a feature is available in a framework
*/
hasFeature(framework: string, feature: string): boolean;
/**
* Document tracking for session management
*/
trackDocument(document: string): void;
/**
* Check if document was already read in session
*/
isDocumentRead(document: string): boolean;
/**
* Reset session state
*/
resetSession(): void;
}
export declare const commandHandler: UnifiedCommandHandler;
export {};
//# sourceMappingURL=commandHandler.d.ts.map