/**
 * Output Validator - Output Schema Binding
 *
 * Validates agent output against allowed schemas and scans for prohibited patterns.
 * Prevents data exfiltration and ensures output conforms to expected formats.
 *
 * Features:
 * - JSON Schema validation for structured output
 * - Prohibited pattern detection (PII, credentials, etc.)
 * - External endpoint allowlist/blocklist
 * - Output sanitization
 *
 * @packageDocumentation
 * @module @vorion/semantic-governance/output-validator
 */
import { VorionError } from '../common/errors.js';
import type { OutputBinding, ProhibitedPattern, OutputValidationResult, PatternScanResult, SanitizedOutput } from './types.js';
/**
 * Error thrown when output validation fails
 */
export declare class OutputValidationError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * Built-in prohibited patterns for common sensitive data
 */
export declare const BUILT_IN_PROHIBITED_PATTERNS: ProhibitedPattern[];
/**
 * Output Validator
 *
 * Validates agent output against configured schemas and patterns.
 */
export declare class OutputValidator {
    private readonly config;
    private readonly ajv;
    private readonly schemaValidators;
    private readonly compiledPatterns;
    private readonly allowedEndpointPatterns;
    private readonly blockedEndpointPatterns;
    /**
     * Create a new OutputValidator
     *
     * @param config - Output binding configuration
     */
    constructor(config: OutputBinding);
    /**
     * Validate output against allowed schemas
     *
     * @param output - Output to validate
     * @returns Validation result
     */
    validateOutput(output: unknown): OutputValidationResult;
    /**
     * Scan content for prohibited patterns
     *
     * @param content - Content to scan
     * @returns Pattern scan result
     */
    scanForProhibitedPatterns(content: string): PatternScanResult;
    /**
     * Check if an external endpoint is allowed
     *
     * @param url - URL to check
     * @returns Whether the endpoint is allowed
     */
    validateExternalEndpoint(url: string): boolean;
    /**
     * Sanitize output by removing prohibited content
     *
     * @param output - Output to sanitize
     * @returns Sanitized output
     */
    sanitizeOutput(output: unknown): SanitizedOutput;
    /**
     * Extract all URLs from content
     *
     * @param content - Content to scan
     * @returns Array of extracted URLs
     */
    extractUrls(content: string): string[];
    /**
     * Validate all URLs in content against endpoint rules
     *
     * @param content - Content to validate
     * @returns Array of invalid URLs
     */
    validateAllUrls(content: string): string[];
    /**
     * Convert a glob pattern to a regex
     *
     * @param glob - Glob pattern
     * @returns Compiled regex
     */
    private globToRegex;
    /**
     * Find all matches for a pattern in content
     *
     * @param content - Content to search
     * @param pattern - Pattern to match
     * @returns Array of matches
     */
    private findPatternMatches;
    /**
     * Escape special regex characters
     *
     * @param str - String to escape
     * @returns Escaped string
     */
    private escapeRegex;
    /**
     * Get the higher severity level
     *
     * @param a - First severity
     * @param b - Second severity
     * @returns Higher severity
     */
    private getHigherSeverity;
    /**
     * Convert output to string for scanning
     *
     * @param output - Output to stringify
     * @returns String representation
     */
    private stringifyOutput;
}
/**
 * Create an OutputValidator with default configuration
 *
 * @param additionalPatterns - Additional prohibited patterns to include
 * @returns OutputValidator with secure defaults
 */
export declare function createDefaultOutputValidator(additionalPatterns?: ProhibitedPattern[]): OutputValidator;
//# sourceMappingURL=output-validator.d.ts.map