import { type AnonymizationContract, type AnonymizationDomain, type AnonymizationMapping, type LargeTraceStreamProgress } from '../types/sparkContracts';
/**
 * Stable anonymizer. Same input value always maps to same placeholder for
 * the same domain — order-independent, no shared mutable counter.
 */
export declare class Anonymizer {
    private mappings;
    /**
     * Reverse lookup so we can detect collisions and assign a numeric
     * `collisionIndex` if two distinct originals hash to the same suffix.
     * Keyed by `${domain}:${placeholder}` to keep domains separate.
     */
    private placeholderOwners;
    private keyOf;
    /** Map a value to its placeholder, creating one on first sight. */
    redact(domain: AnonymizationDomain, original: string): string;
    /** Replace every original-value occurrence in a free-form string. */
    redactString(domain: AnonymizationDomain, original: string, body: string): string;
    /**
     * Full mapping table including raw `original` values. Operators who own
     * the Anonymizer instance use this to reverse a redacted artifact back
     * to identifying values — DO NOT attach this to a public contract.
     */
    exportRawMappings(): AnonymizationMapping[];
    /**
     * Public-safe mapping snapshot — `original` is stripped so a redacted
     * contract attached to an exported artifact cannot leak package names,
     * paths, or user IDs. Codex round 8 caught the previous behavior as a
     * P1 because `getMappings()` was returning sensitive originals inside
     * a contract whose `state: 'redacted'` advertised it as safe to ship.
     */
    getMappings(): AnonymizationMapping[];
    /** Build a contract describing the current redaction state. */
    toContract(opts?: {
        state?: 'raw' | 'partial' | 'redacted';
        pendingDomains?: AnonymizationDomain[];
        streamProgress?: LargeTraceStreamProgress;
        /**
         * Set true ONLY when the contract is consumed by an operator who
         * already has access to the raw trace (e.g. for in-process diff/
         * correlation). Defaults false — public/exported contracts must
         * never include raw originals.
         */
        includeRawMappings?: boolean;
    }): AnonymizationContract;
}
/** Streaming progress reporter for large-trace ingestion. */
export declare class LargeTraceStreamReporter {
    private totalBytes;
    private startedAt;
    private chunksEmitted;
    private processedBytes;
    private lastChunkAt;
    private done;
    constructor(totalBytes: number);
    /** Record progress after a chunk is processed. */
    report(chunkBytes: number): LargeTraceStreamProgress;
    /** Mark the stream as completed. */
    complete(): LargeTraceStreamProgress;
}
//# sourceMappingURL=anonymizer.d.ts.map