import type { InterfaceCapabilityDescriptor } from "./interfaceCapabilityExtraction.js";
import type { InterfaceFormatDescriptor } from "./interfaceFormatExtraction.js";
import type { InterfaceScopeDecision } from "./interfaceScope.js";
export type CompatibilityProtectorTrace = {
    correlationId?: string;
    bridgeId?: string;
};
export type CompatibilityProtectorRequest = {
    providerId?: string;
    interfaceId?: string;
    availableCapabilities?: readonly InterfaceCapabilityDescriptor[];
    requiredCapabilities?: readonly string[];
    availableFormats?: readonly InterfaceFormatDescriptor[];
    requiredFormats?: readonly string[];
    scopeDecision?: InterfaceScopeDecision;
    trace?: CompatibilityProtectorTrace;
};
export type CompatibilityGapKind = "capability" | "format" | "scope";
export type CompatibilityGap = {
    kind: CompatibilityGapKind;
    requested: string;
    reason: string;
};
export type CompatibilityProtectionReport = {
    providerId: string;
    interfaceId: string;
    compatible: boolean;
    requiredCapabilities: readonly string[];
    requiredFormats: readonly string[];
    capabilityGaps: readonly CompatibilityGap[];
    formatGaps: readonly CompatibilityGap[];
    scopeGaps: readonly CompatibilityGap[];
    bridgeable: boolean;
    trace: CompatibilityProtectorTrace;
    unsafeSideEffects: false;
};
export type CompatibilityProtectorErrorCode = "MISSING_PROVIDER_ID" | "MISSING_INTERFACE_ID" | "MISSING_AVAILABLE_CAPABILITIES" | "MISSING_AVAILABLE_FORMATS";
export type CompatibilityProtectorError = {
    code: CompatibilityProtectorErrorCode;
    message: string;
    boundary: "input" | "contract";
    publicSafe: true;
};
export type CompatibilityProtectorResult = {
    ok: true;
    report: CompatibilityProtectionReport;
    events: readonly string[];
} | {
    ok: false;
    error: CompatibilityProtectorError;
    events: readonly string[];
};
export declare function protectCapabilityCompatibility(request?: CompatibilityProtectorRequest): CompatibilityProtectorResult;
