import { type LkgEntryNote, type LkgSlot } from "./lkg-slot";
import type { MessageLike } from "./transform-operations";
export interface LkgModelKeys {
    modelKey: string | null;
    providerKey: string | null;
}
export declare function resolveLkgModelKeys(messages: MessageLike[]): LkgModelKeys;
export interface LkgEntryProjection {
    id: string | null;
    role: string | undefined;
    synthetic: boolean;
    timeCreated: number | null;
    finish: unknown;
    hasIncompleteTool: boolean;
}
export declare function projectLkgEntry(messages: MessageLike[]): LkgEntryProjection[];
export interface LkgCaptureInput {
    sessionId: string;
    input: LkgEntryProjection[] | MessageLike[];
    output: MessageLike[];
    modelKey: string | null;
    providerKey: string | null;
    capturedAt?: number;
}
export type LkgValidationFailure = "lkg_model_mismatch" | "lkg_invalidated_reshape" | "lkg_unsafe_seam" | "lkg_seam_invalid";
export declare function findLkgAnchor(messages: LkgEntryProjection[]): number | null;
export declare function buildLkgPrefix(input: LkgEntryProjection[] | MessageLike[], output: MessageLike[]): {
    anchorIndex: number;
    anchorMessageId: string;
    inputIdSeq: string[];
    prefix: MessageLike[];
} | null;
export declare function captureLkgSlot(args: LkgCaptureInput): boolean;
export declare function validateLkgSeamBoundary(prefix: MessageLike[], tail: MessageLike[]): boolean;
export declare function validateLkgSeam(prefix: MessageLike[], tail: MessageLike[], providerKey: string | null): boolean;
export declare function replayLkg(args: {
    sessionId: string;
    messages: MessageLike[];
    modelKey: string | null;
    providerKey: string | null;
    entry?: LkgEntryNote | null;
    skipSeamValidation?: boolean;
}): {
    ok: true;
    messages: MessageLike[];
} | {
    ok: false;
    reason: LkgValidationFailure;
};
export declare function validateLkgEntry(slot: LkgSlot, entryIds: string[]): boolean;
//# sourceMappingURL=lkg-replay.d.ts.map