UNPKG

mcp-adr-analysis-server

Version:

MCP server for analyzing Architectural Decision Records and project architecture

45 lines 1.66 kB
/** * Output masking middleware for MCP responses * Automatically applies content masking to all tool and resource outputs */ export interface MaskingConfig { enabled: boolean; strategy: 'full' | 'partial' | 'placeholder' | 'environment'; customPatterns?: string[]; skipPatterns?: string[]; } /** * Apply content masking to MCP response content */ export declare function maskMcpResponse(response: any, config?: MaskingConfig): Promise<any>; /** * Generate AI-powered masking for sensitive content */ export declare function generateAiMasking(content: string, contentType?: 'code' | 'documentation' | 'configuration' | 'logs' | 'general'): Promise<{ maskedContent: string; analysisPrompt: string; }>; /** * Create masking configuration from environment or defaults */ export declare function createMaskingConfig(overrides?: Partial<MaskingConfig>): MaskingConfig; /** * Validate masking configuration */ export declare function validateMaskingConfig(config: MaskingConfig): { isValid: boolean; errors: string[]; }; /** * Middleware wrapper for MCP tool responses */ export declare function withContentMasking<T extends (..._args: any[]) => Promise<any>>(toolFunction: T, config?: MaskingConfig): T; /** * Apply progressive masking based on content sensitivity */ export declare function applyProgressiveMasking(content: string, sensitivityLevel?: 'low' | 'medium' | 'high' | 'critical'): Promise<string>; /** * Detect content sensitivity level using heuristics */ export declare function detectContentSensitivity(content: string): 'low' | 'medium' | 'high' | 'critical'; //# sourceMappingURL=output-masking.d.ts.map