/**
 * SyncTrustGate -- Encapsulates trust evaluation for sync operations.
 *
 * Evaluates whether inbound patch authors are trusted according to the
 * trust record chain. Used by SyncController to validate HTTP sync
 * responses before applying patches.
 *
 * @module domain/services/sync/SyncTrustGate
 * @see B1 -- Signed sync ingress
 */
import type LoggerPort from '../../../ports/LoggerPort.ts';
export type TrustMode = 'enforce' | 'log-only' | 'off';
export interface TrustGateResult {
    allowed: boolean;
    untrustedWriters: string[];
    verdict: string;
}
export interface TrustEvaluator {
    evaluateWriters(writerIds: string[]): Promise<{
        trusted: Set<string>;
    }>;
}
export default class SyncTrustGate {
    private readonly _evaluator;
    private readonly _mode;
    private readonly _logger;
    constructor(options?: {
        trustEvaluator?: TrustEvaluator;
        trustMode?: TrustMode;
        logger?: LoggerPort;
    });
    evaluate(writerIds: string[], context?: Record<string, unknown>): Promise<TrustGateResult>;
    private _checkEarlyExit;
    private _decide;
    private _handleError;
    static extractWritersFromPatches(patches: Array<{
        writerId: string;
    }>): string[];
}
