import PatchJournalPort, { type ReadPatchOptions } from '../../ports/PatchJournalPort.ts';
import WarpStream from '../../domain/stream/WarpStream.ts';
import PatchEntry from '../../domain/artifacts/PatchEntry.ts';
import type Patch from '../../domain/types/Patch.ts';
import type BlobStoragePort from '../../ports/BlobStoragePort.ts';
import type CodecPort from '../../ports/CodecPort.ts';
import { type PatchStorageRoute, type default as CommitMessageCodecPort } from '../../ports/CommitMessageCodecPort.ts';
import { type SubstrateCompatibilityPolicyValue } from './SubstrateCompatibilityPolicy.ts';
interface BlobPort {
    readBlob(oid: string): Promise<Uint8Array>;
    writeBlob(content: Uint8Array | string): Promise<string>;
}
interface CommitPort {
    getNodeInfo(sha: string): Promise<{
        sha: string;
        message: string;
        author: string;
        date: string;
        parents: string[];
    }>;
}
/**
 * CBOR-backed implementation of PatchJournalPort.
 *
 * Owns the codec and raw blob persistence. Domain services pass Patch
 * objects in and get Patch objects back — no bytes leak across the
 * port boundary.
 *
 * Supports both plain Git blob storage (BlobPort) and encrypted external
 * storage (BlobStoragePort) via the optional `patchBlobStorage` parameter.
 */
export declare class CborPatchJournalAdapter extends PatchJournalPort {
    private readonly _codec;
    private readonly _blobPort;
    private readonly _commitPort;
    private readonly _blobStorage;
    private readonly _legacyPatchBlobStorage;
    private readonly _writeStorage;
    private readonly _commitMessageCodec;
    private readonly _compatibilityPolicy;
    constructor({ codec, blobPort, commitPort, patchBlobStorage, blobStorage, legacyPatchBlobStorage, writeStorage, commitMessageCodec, compatibilityPolicy }: {
        codec: CodecPort;
        blobPort: BlobPort;
        commitPort?: CommitPort;
        patchBlobStorage?: BlobStoragePort | null;
        blobStorage?: BlobStoragePort | null;
        legacyPatchBlobStorage?: BlobStoragePort | null;
        writeStorage?: PatchStorageRoute;
        commitMessageCodec?: CommitMessageCodecPort;
        compatibilityPolicy?: SubstrateCompatibilityPolicyValue;
    });
    writePatch(patch: Patch): Promise<string>;
    readPatch(patchOid: string, { storage, encrypted }?: ReadPatchOptions): Promise<Patch>;
    private _requireReadableStorage;
    private _isConfiguredWriteRoute;
    get writeStorage(): PatchStorageRoute;
    /**
     * Scans patches in a writer's chain between two SHAs, yielding
     * PatchEntry instances in chronological order (oldest first).
     */
    scanPatchRange(writerId: string, fromSha: string | null, toSha: string): WarpStream<PatchEntry>;
}
export {};
