import type { RoutingInstructionState } from './routing-instructions.js';
type StopMessageSubset = Pick<RoutingInstructionState, 'stopMessageSource' | 'stopMessageText' | 'stopMessageMaxRepeats' | 'stopMessageUsed' | 'stopMessageStageMode' | 'stopMessageAiMode' | 'stopMessageAiSeedPrompt' | 'stopMessageAiHistory' | 'stopMessageUpdatedAt' | 'stopMessageLastUsedAt'>;
/**
 * Decide whether we should overwrite in-memory stopMessage fields with persisted ones.
 *
 * Key invariant:
 * - In-memory state may be ahead of disk because persistence is async (tmp+rename).
 * - Persisted state must still be able to update usage counters (stop_message_auto).
 *
 * Strategy:
 * - If existing has a newer stopMessageUpdatedAt than persisted → keep existing config by default.
 * - However, when persisted carries the same stopMessage config but newer usage progress,
 *   prefer the persisted counters so Virtual Router logs/state reflect real stop_message_auto consumption.
 * - Otherwise → adopt persisted fully.
 */
export declare function mergeStopMessageFromPersisted(existing: StopMessageSubset, persisted: StopMessageSubset | null): StopMessageSubset;
export {};
