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.
 * - Otherwise → adopt persisted fully.
 *
 * Note:
 * - We intentionally do NOT merge counters from an older persisted config into a newer in-memory config.
 *   A stopMessage "set" is expected to re-arm/reset counters; allowing older lastUsedAt to overwrite
 *   would make re-arming flaky until the async persistence catches up.
 */
export declare function mergeStopMessageFromPersisted(existing: StopMessageSubset, persisted: StopMessageSubset | null): StopMessageSubset;
export {};
