export interface GitObjectHeader {
    oid: string;
    type: string;
    size: number;
    missing: boolean;
}
export interface GitObjectReadOptions {
    repoRoot: string;
    signal?: AbortSignal;
    /** Maximum total object-body bytes sent through one `cat-file` process. */
    maxBatchBytes?: number;
    /** Defaults true: do not apply replacement refs or fetch missing promisor objects. */
    physicalObjects?: boolean;
    /** Instrumentation hooks used by higher layers without coupling Git to them. */
    onCommandStart?: () => void;
    onBytesRead?: (bytes: number) => void;
}
/**
 * Object ids are written to a newline-delimited stdin protocol. Reject
 * anything other than a full SHA-1 or SHA-256 id before it can become another
 * request. Requiring the complete id also keeps the returned map keyed by the
 * exact caller-owned identifier instead of Git's expansion of an abbreviation.
 */
export declare function assertGitObjectId(oid: string): void;
/** Read object type and size without materializing object bodies. */
export declare function readGitObjectHeaders(oids: readonly string[], options: GitObjectReadOptions): Promise<Map<string, GitObjectHeader>>;
/**
 * Read exact object bodies in byte-bounded batches. Reads are keyed by OID, so
 * duplicate requests are materialized once while callers retain occurrence
 * semantics separately.
 */
export declare function readGitObjects(oids: readonly string[], headers: ReadonlyMap<string, GitObjectHeader>, options: GitObjectReadOptions & {
    maxBatchBytes: number;
}): Promise<Map<string, Buffer>>;
/** Parse Git's length-prefixed `cat-file --batch` response without delimiters in content. */
export declare function parseGitBatchStream(buffer: Buffer, into: Map<string, Buffer>): void;
