/** * Configuration and Meta Tools - V2.0 Phase 6 * * Configuration management and system metadata tools. * Provides introspection and control over KERNL's operation. * * Phase 6 Tools: * - sys_get_config: Get current KERNL configuration * - sys_set_config_value: Update configuration value * - sys_get_usage_stats: Get tool usage statistics * - sys_get_tool_info: Get information about available tools */ import { type Tool } from '@modelcontextprotocol/sdk/types.js'; import { ProjectDatabase } from '../storage/database.js'; export declare const configMetaTools: Tool[]; /** * Get Config Handler */ declare function getConfigHandler(): Promise<{ success: boolean; config: { database: { path: string; version: string; }; paths: { dataDir: string; projectsDir: string; tempDir: string; }; version: string; features: { crashRecovery: boolean; semanticSearch: boolean; crossProjectLearning: boolean; gitIntegration: boolean; chromeExport: boolean; systemControl: boolean; }; limits: { maxCheckpointSize: number; maxSessionDuration: number; maxSearchResults: number; maxFileSize: number; }; }; error?: undefined; } | { success: boolean; error: { code: string; message: string; }; config?: undefined; }>; /** * Set Config Value Handler */ declare function setConfigValueHandler(params: { key: string; value: any; }): Promise<{ success: boolean; key: string; oldValue: any; newValue: any; message: string; error?: undefined; } | { success: boolean; error: { code: string; message: string; }; key?: undefined; oldValue?: undefined; newValue?: undefined; message?: undefined; }>; /** * Get Usage Stats Handler */ declare function getUsageStatsHandler(params: { limit?: number; }): Promise<{ success: boolean; stats: { totalCalls: number; successRate: number; averageDuration: number; toolBreakdown: Record; topTools: { name: string; calls: number; }[]; recentActivity: { timestamp: string; tool: string; duration: number; success: boolean; }[]; }; error?: undefined; } | { success: boolean; error: { code: string; message: string; }; stats?: undefined; }>; /** * Get Tool Info Handler */ declare function getToolInfoHandler(params: { category?: string; detailed?: boolean; }): Promise; /** * Track tool usage (called by server before/after tool execution) */ export declare function trackToolUsage(toolName: string, duration: number, success: boolean): void; /** * Register tools for introspection */ export declare function registerTools(tools: Array<{ name: string; category: string; description: string; }>): void; /** * Update config version (called by server on init) */ export declare function setConfigVersion(version: string): void; export declare function createConfigMetaHandlers(db: ProjectDatabase): { sys_get_config: typeof getConfigHandler; sys_set_config_value: typeof setConfigValueHandler; sys_get_usage_stats: typeof getUsageStatsHandler; sys_get_tool_info: typeof getToolInfoHandler; }; export {}; //# sourceMappingURL=config-meta.d.ts.map