/** * Auto-Resource Generator * Creates efficient resource endpoints from existing tools for direct access */ import { ResourceCandidate, ParameterMapping } from './auto-resource-detector.js'; import { NCPOrchestrator } from '../orchestrator/ncp-orchestrator.js'; export interface GeneratedResource { uri: string; name: string; description: string; mimeType: string; sourceToolName: string; sourceMcpName: string; parameterMappings: ParameterMapping[]; accessPattern: 'direct' | 'templated'; } export interface ResourceExecutionResult { success: boolean; content: string; error?: string; sourceData?: any; processingTime?: number; } export declare class AutoResourceGenerator { private generatedResources; private orchestrator; constructor(orchestrator: NCPOrchestrator); /** * Generate resource endpoints from detected candidates */ generateResources(candidates: ResourceCandidate[]): Promise; /** * Generate resource endpoints from cached candidates (non-blocking) */ generateResourcesFromCache(candidates: ResourceCandidate[]): Promise; /** * Create resource definition from candidate */ private createResourceFromCandidate; /** * Execute resource access by calling underlying tool and formatting response */ executeResource(uri: string, parameters?: Record): Promise; /** * Format tool response for optimal resource consumption */ private formatResourceContent; /** * Format file content for direct consumption */ private formatFileContent; /** * Format directory listing for readability */ private formatDirectoryListing; /** * Format status/health information */ private formatStatusInfo; /** * Format search results for easy scanning */ private formatSearchResults; /** * Generic response formatting */ private formatGenericResponse; /** * Map URI parameters back to tool parameters */ private mapUriParametersToTool; /** * Extract parameters from URI path */ private extractPathParameters; /** * Convert parameter to appropriate type */ private convertParameterType; /** * Get resource template from specific URI */ private getResourceTemplate; /** * Check if URI matches template pattern */ private uriMatchesTemplate; /** * Determine appropriate MIME type for resource */ private determineMimeType; /** * Generate usage hint for resource */ private generateUsageHint; /** * Format file size for display */ private formatFileSize; /** * Get all generated resources for listing */ getGeneratedResources(): GeneratedResource[]; /** * Get efficiency statistics */ getEfficiencyStats(): { totalGenerated: number; directAccess: number; templatedAccess: number; coverageByMcp: Record; }; } //# sourceMappingURL=auto-resource-generator.d.ts.map