import type { EntityIndex } from './store.js';
import type { LiveEntityIndex } from './resolve.js';
import type { TestRecognizer } from '../tests.js';
import type { OccEntityErrorCode } from './api-types.js';
/**
 * Answering a question about a past revision.
 *
 * `ref` is answered from the event log alone — no tree is listed and no blob is
 * read. An event already describes both sides of the change it records, so
 * replaying the log up to a commit reconstructs which entities were alive then
 * and what each looked like. That keeps the cost O(events) and per-query, which
 * is what a historical question should cost; snapshotting the tree at the ref
 * would pay the cold-index price again for every ref asked about.
 *
 * The reconstruction is therefore bounded by the same window everything else is:
 * an entity with no event in the indexed window is one this view cannot see.
 * That is stated in the result rather than hidden, and it is the same limit
 * `blame` and `history` already carry.
 */
export interface EntitiesAtRef {
    /** The ref as the caller wrote it. */
    ref: string;
    /** The commit it resolved to. */
    commit: string;
    /** Its position in the indexed window. */
    commitOrder: number;
    index: LiveEntityIndex;
}
export type EntitiesAtRefOutcome = {
    status: 'resolved';
    at: EntitiesAtRef;
} | {
    status: 'error';
    code: OccEntityErrorCode;
    message: string;
};
export interface ResolveEntitiesAtRefOptions {
    ref: string;
    repoRoot: string;
    entityIndex: EntityIndex;
    recognizer: TestRecognizer;
    signal?: AbortSignal;
}
export interface ProjectEntitiesAtCommitOptions {
    /** The ref as supplied by the caller, retained only for result provenance. */
    ref: string;
    /** A commit SHA resolved and pinned by the caller. No Git lookup is performed. */
    commit: string;
    entityIndex: EntityIndex;
    recognizer: TestRecognizer;
}
export declare function resolveEntitiesAtRef(options: ResolveEntitiesAtRefOptions): Promise<EntitiesAtRefOutcome>;
/**
 * Project historical entity state at an already-resolved commit.
 *
 * Kept separate from ref resolution so a compound operation can resolve a
 * mutable ref once, pin the SHA, then reuse the event-log replay without a
 * second Git lookup. The replay itself remains private to this module.
 */
export declare function projectEntitiesAtCommit(options: ProjectEntitiesAtCommitOptions): EntitiesAtRefOutcome;
