/**
 * In-memory persistence adapter for WARP graph storage.
 *
 * Implements the same GraphPersistencePort contract as GitGraphAdapter
 * but stores all data in Maps. Designed for fast unit/integration tests.
 */
import type { CommitLogChunk, CommitNodeOptions, CommitNodeWithTreeOptions, LogNodesOptions, NodeInfo, PingResult } from '../../ports/CommitPort.ts';
import type { ListRefsOptions } from '../../ports/RefPort.ts';
import GraphPersistencePort from '../../ports/GraphPersistencePort.ts';
import WarpStream from '../../domain/stream/WarpStream.ts';
import type TreeEntryLimit from '../../domain/tree/TreeEntryLimit.ts';
import TreeEntryPath from '../../domain/tree/TreeEntryPath.ts';
import TreeEntryPrefixBatch from '../../domain/tree/TreeEntryPrefixBatch.ts';
import type { TreeEntryProbeResult } from '../../ports/TreeEntryProbePort.ts';
import { type HashFn } from './inMemoryHashing.ts';
interface InMemoryAdapterOptions {
    readonly author?: string;
    readonly clock?: {
        now(): number;
    };
    readonly hash?: HashFn;
}
export default class InMemoryGraphAdapter extends GraphPersistencePort {
    private readonly _author;
    private readonly _clock;
    private readonly _hash;
    private readonly _cryptoReady;
    private readonly _commits;
    private readonly _blobs;
    private readonly _trees;
    private readonly _treeEntryIndexes;
    private readonly _refs;
    private readonly _config;
    constructor(options?: InMemoryAdapterOptions);
    get emptyTree(): string;
    writeTree(entries: string[]): Promise<string>;
    readTreeOids(treeOid: string): Promise<Record<string, string>>;
    readTreeEntryOid(treeOid: string, path: TreeEntryPath): Promise<TreeEntryProbeResult>;
    readTreeEntryPrefix(treeOid: string, prefix: TreeEntryPath, limit: TreeEntryLimit): Promise<TreeEntryPrefixBatch>;
    readTree(treeOid: string): Promise<Record<string, Uint8Array>>;
    private _requireTreeEntries;
    private _requireTreeEntryIndex;
    writeBlob(content: Uint8Array | string): Promise<string>;
    readBlob(oid: string): Promise<Uint8Array>;
    commitNode({ message, parents }: CommitNodeOptions): Promise<string>;
    commitNodeWithTree({ treeOid, parents, message }: CommitNodeWithTreeOptions): Promise<string>;
    showNode(sha: string): Promise<string>;
    getNodeInfo(sha: string): Promise<NodeInfo>;
    getCommitTree(sha: string): Promise<string>;
    nodeExists(sha: string): Promise<boolean>;
    countNodes(ref: string): Promise<number>;
    logNodes({ ref, limit, format: _format }: LogNodesOptions): Promise<string>;
    logNodesStream({ ref, limit, format: _format }: LogNodesOptions): Promise<WarpStream<CommitLogChunk>>;
    ping(): Promise<PingResult>;
    updateRef(ref: string, oid: string): Promise<void>;
    readRef(ref: string): Promise<string | null>;
    deleteRef(ref: string): Promise<void>;
    compareAndSwapRef(ref: string, newOid: string, expectedOid: string | null): Promise<void>;
    listRefs(prefix: string, options?: ListRefsOptions): Promise<string[]>;
    configGet(key: string): Promise<string | null>;
    configSet(key: string, value: string): Promise<void>;
    private _filterRefsByPrefix;
    private _createCommit;
    private _ensureHashReady;
    private _resolveRef;
    private _walkLog;
    private _countReachable;
    private _collectCommits;
    private _formatCommitRecord;
}
export {};
