import type { Message } from "@kenkaiiii/gg-ai";
import type { AutopilotMarkerPayload, AppMarkerPayload, KenTurnPayload } from "./session-manager.js";
export interface HistoryAutopilotMarker extends AutopilotMarkerPayload {
    /** Stable seed derived from persisted marker data for deterministic UI copy. */
    copySeed: string;
}
export declare function autopilotMarkerCopySeed(marker: AutopilotMarkerPayload): string;
/**
 * Normalize persisted autopilot markers for transcript replay.
 *
 * Older compacted/continued sessions may carry markers whose original
 * `afterMessageCount` points beyond the restored message list. Replaying those
 * at EOF bunches old Ken all-clear bubbles at the bottom, so drop them. Also
 * dedupe exact marker payloads produced by old rewrite/re-persist paths.
 */
export declare function normalizeAutopilotMarkersForHistory(markers: readonly AutopilotMarkerPayload[], maxAfterMessageCount: number): HistoryAutopilotMarker[];
/**
 * Normalize persisted app transcript markers for replay: drop markers whose
 * anchor points beyond the restored message list (stale after compaction) and
 * dedupe exact payloads (old rewrite paths could re-append). Mirrors
 * {@link normalizeAutopilotMarkersForHistory}.
 */
export declare function normalizeAppMarkersForHistory(markers: readonly AppMarkerPayload[], maxAfterMessageCount: number): AppMarkerPayload[];
/**
 * Normalize persisted Ken turns for replay. Unlike autopilot/app markers, Ken
 * turns carry real conversation — an out-of-range anchor (stale after
 * compaction) is CLAMPED to the last message instead of dropped, so the
 * exchange still renders (at the end, in order) rather than vanishing. Exact
 * duplicate payloads (old rewrite/re-persist paths) are deduped.
 */
export declare function normalizeKenTurnsForHistory(turns: readonly KenTurnPayload[], maxAfterMessageCount: number): KenTurnPayload[];
export interface RestoredUserRow {
    /** The typed text as the live bubble showed it. */
    text: string;
    /** Attached image data URLs. */
    images: string[];
    /** True when the message carried a video the model could NOT watch natively
     *  (live showed an info row after the bubble). */
    videoWarning: boolean;
}
/** Rebuild the live user bubble from a persisted user message's content. */
export declare function restoreUserRow(content: Message["content"]): RestoredUserRow;
/**
 * Split a persisted assistant message into per-bubble texts. Live streaming
 * ends the assistant bubble at every server_tool_call (see useAgentEvents'
 * server_tool_call case), so pre- and post-tool text render as separate rows.
 * Persisted content keeps that structure as separate text blocks — emit one
 * text per block instead of gluing them into a single row on resume.
 */
export declare function restoreAssistantTexts(content: Message["content"]): string[];
//# sourceMappingURL=session-history.d.ts.map