UNPKG

remcode

Version:

Turn your AI assistant into a codebase expert. Intelligent code analysis, semantic search, and software engineering guidance through MCP integration.

46 lines (45 loc) 1.26 kB
/** * MCP Validation Guard * Ensures all MCP tools validate permissions before executing */ import { ComprehensiveValidation } from './permission-validator'; export interface MCPResponse { success: boolean; data?: any; error?: string; setupRequired?: boolean; setupGuidance?: { github?: string; huggingface?: string; pinecone?: string; message: string; }; } /** * Validation guard for all MCP operations * Implements one-shot validation approach */ export declare class MCPValidationGuard { private static validationCache; private static cacheTimestamp; private static readonly CACHE_DURATION; /** * Execute MCP operation with validation guard */ static executeWithValidation<T>(operation: () => Promise<T>, operationName: string, requiresRepositoryAccess?: { owner: string; repo: string; }): Promise<MCPResponse>; /** * Get validation results with caching */ private static getValidation; /** * Clear validation cache (force re-validation) */ static clearCache(): void; /** * Quick validation check without full operation execution */ static validateOnly(): Promise<ComprehensiveValidation>; }