/**
 * Generated Code Validator
 *
 * Validates code produced by LLMs before writing to filesystem.
 * Checks for:
 * - Security vulnerabilities (SQLi, XSS, command injection)
 * - Hardcoded secrets
 * - Suspicious imports/requires
 * - Prototype pollution patterns
 * - Unsafe deserialization
 *
 * Integrates with text-editor and apply-patch before file writes.
 */
import { PatternSeverity } from './dangerous-patterns.js';
export interface CodeValidationFinding {
    severity: PatternSeverity;
    name: string;
    description: string;
    line: number;
    evidence: string;
    category: string;
}
export interface CodeValidationResult {
    /** Whether the code passes validation (no critical/high findings) */
    safe: boolean;
    /** All findings */
    findings: CodeValidationFinding[];
    /** Summary counts by severity */
    counts: Record<PatternSeverity, number>;
    /** Language that was validated */
    language: string;
}
type SupportedLanguage = 'typescript' | 'javascript' | 'python' | 'ruby' | 'go' | 'java' | 'shell' | 'sql' | 'html' | 'unknown';
/**
 * Detect the language from file extension or content heuristics.
 */
export declare function detectLanguage(filePath?: string, code?: string): SupportedLanguage;
/**
 * Validate generated code for security issues.
 *
 * @param code - The code content to validate
 * @param language - Language hint (auto-detected if not provided)
 * @param filePath - Optional file path for better language detection
 * @returns Validation result with findings
 */
export declare function validateGeneratedCode(code: string, language?: string, filePath?: string): CodeValidationResult;
/**
 * Format validation result as human-readable report.
 */
export declare function formatValidationReport(result: CodeValidationResult): string;
export {};
