import type { ReadChatSyncResult, SessionChatTailUpdate, SessionModalUpdate } from '../shared-types.js';
export interface ChatTailSubscriptionCursor {
    knownMessageCount: number;
    lastMessageSignature: string;
    tailLimit: number;
}
export type SessionChatTailCommandResult = Partial<Omit<ReadChatSyncResult, 'activeModal'>> & {
    success?: boolean;
    activeModal?: unknown;
};
export interface PrepareSessionChatTailUpdateInput {
    key: string;
    sessionId: string;
    historySessionId?: string;
    seq: number;
    timestamp: number;
    interactionId?: string;
    cursor: ChatTailSubscriptionCursor;
    lastDeliveredSignature: string;
    result: SessionChatTailCommandResult | null | undefined;
}
export interface PreparedSessionChatTailUpdate {
    cursor: ChatTailSubscriptionCursor;
    seq: number;
    lastDeliveredSignature: string;
    update: SessionChatTailUpdate | null;
}
export interface PrepareSessionModalUpdateInput {
    key: string;
    sessionId: string;
    status: string;
    title?: string;
    activeModal?: unknown;
    seq: number;
    timestamp: number;
    interactionId?: string;
    lastDeliveredSignature: string;
}
export interface PreparedSessionModalUpdate {
    seq: number;
    lastDeliveredSignature: string;
    update: SessionModalUpdate | null;
}
export declare function normalizeChatTailActiveModal(activeModal: unknown): {
    message: string;
    buttons: string[];
} | null;
export declare function normalizeSessionModalFields(activeModal: unknown): {
    modalMessage?: string;
    modalButtons: string[];
};
export declare function prepareSessionChatTailUpdate(input: PrepareSessionChatTailUpdateInput): PreparedSessionChatTailUpdate;
export declare function prepareSessionModalUpdate(input: PrepareSessionModalUpdateInput): PreparedSessionModalUpdate;
