import type CodecPort from '../../../ports/CodecPort.ts';
/**
 * ProvenanceIndex - Node-to-Patch SHA Index
 *
 * Implements HG/IO/2: Build nodeId-to-patchSha index from I/O declarations.
 * This enables quick answers to "which patches affected node X?" without
 * replaying all patches.
 *
 * The index maps:
 * - nodeId -> Set<patchSha> (patches that read or wrote this node)
 *
 * @module domain/services/provenance/ProvenanceIndex
 */
declare class ProvenanceIndex {
    #private;
    constructor(initialIndex?: Map<string, Set<string>>);
    static empty(): ProvenanceIndex;
    addPatch(patchSha: string, reads: string[] | undefined, writes: string[] | undefined): ProvenanceIndex;
    patchesFor(entityId: string): string[];
    has(entityId: string): boolean;
    get size(): number;
    entities(): string[];
    clear(): ProvenanceIndex;
    merge(other: ProvenanceIndex): ProvenanceIndex;
    clone(): ProvenanceIndex;
    serialize({ codec }?: {
        codec?: CodecPort;
    }): Uint8Array;
    static deserialize(buffer: Uint8Array, { codec }?: {
        codec?: CodecPort;
    }): ProvenanceIndex;
    toJSON(): {
        version: number;
        entries: Array<[string, string[]]>;
    };
    static fromJSON(json: {
        version?: number;
        entries?: Array<[string, string[]]>;
    }): ProvenanceIndex;
    [Symbol.iterator](): Iterator<[string, string[]]>;
}
export default ProvenanceIndex;
export { ProvenanceIndex };
