import type { Session } from '../types.js';
export declare const COMPLETED_REACTION_EMOJI_TYPE = "GoGoGo";
type PendingResponseSession = Pick<Session, 'pendingResponseCardId' | 'pendingResponseCardState' | 'lastPatchedResponseCardId'>;
export declare function isPendingResponseCardOpen(session: Pick<Session, 'pendingResponseCardId' | 'pendingResponseCardState'>): boolean;
/** Sync only the cross-process pending-response fields from a fresher Session. */
export declare function syncPendingResponseState(target: PendingResponseSession, source: PendingResponseSession | undefined): void;
export declare function mergePendingResponseState<T extends PendingResponseSession>(incoming: T, existing: PendingResponseSession | undefined): T;
export declare function shouldPatchPendingOnExplicitSend(session: Pick<Session, 'pendingResponseCardId' | 'pendingResponseCardState'>, opts: {
    msgType: string;
    sendTopLevel: boolean;
    overrideChatId: boolean;
    sendInto: boolean;
    hasNotificationMentions: boolean;
}): boolean;
export declare function shouldReplyPendingInThread(scope: 'thread' | 'chat'): boolean;
export declare function shouldMarkPendingAsMentionedSend(opts: {
    msgType: string;
    sendTopLevel: boolean;
    overrideChatId: boolean;
    sendInto: boolean;
    hasNotificationMentions: boolean;
}): boolean;
export declare function shouldWithdrawPreviousPendingOnNewTurn(_session: Pick<Session, 'pendingResponseCardId' | 'pendingResponseCardState'>): boolean;
/** A patched marker means the Feishu PATCH returned, but session save may not have. */
export declare function shouldTreatPendingCardAsPatchedByMarker(pendingCardId: string | undefined, marker: {
    cardId?: string;
    state?: string;
} | undefined): boolean;
export declare function createPendingResponseQueue(): {
    run<T>(key: string, work: () => Promise<T>): Promise<T>;
    size(): number;
};
export declare function startPendingResponseTurn(session: PendingResponseSession, messageId: string): void;
/** Mark the current open placeholder as patched; keep its id for diagnostics. */
export declare function markPendingResponseCardPatched(session: PendingResponseSession): void;
export declare function markPendingResponseCardPatchedIfCurrent(session: PendingResponseSession, cardId: string): boolean;
/** Read the open placeholder id without claiming it until PATCH succeeds. */
export declare function claimPendingResponseCard(session: PendingResponseSession): string | undefined;
export {};
//# sourceMappingURL=pending-response.d.ts.map