import type { EntityIndex } from './store.js';
import type { LiveEntity } from './resolve.js';
import type { WalkBackResult } from './walkback.js';
import type { OccEntityHistoryOptions, OccEntityHistoryPayload } from './api-types.js';
/**
 * One entity's history, newest first.
 *
 * The chain is read from the lineage id rather than from a path, which is what
 * lets it cross renames and moves: an entity that was `parse` in `reader.ts`
 * and is now `parseHeader` in `header.ts` has one history, not three fragments.
 */
export interface EntityHistoryContext {
    entityIndex: EntityIndex;
    /**
     * Read history as of a past commit rather than as of the working tree.
     *
     * Set when the caller named a `ref`. What happened after it had not happened
     * yet from the vantage point asked about.
     */
    atCommitOrder?: number;
    /**
     * Changes found outside the indexed window, keyed by `walkBackKeyFor`.
     *
     * Consulted only when the window itself holds nothing: inside it the lineage
     * events are richer evidence, and mixing the two orderings would be worse than
     * either alone.
     */
    walkBack?: WalkBackResult;
    /** The entity's walk-back key, which needs the record the caller resolved. */
    walkBackKey?: string;
}
export declare function entityHistory(entity: LiveEntity, options: OccEntityHistoryOptions, context: EntityHistoryContext): OccEntityHistoryPayload;
