import type { KaijiBotConfig } from "./types.js";
export type RuntimeConfigSnapshotRefreshParams = {
    sourceConfig: KaijiBotConfig;
};
export type RuntimeConfigSnapshotRefreshHandler = {
    refresh: (params: RuntimeConfigSnapshotRefreshParams) => boolean | Promise<boolean>;
    clearOnRefreshFailure?: () => void;
};
export type RuntimeConfigWriteNotification = {
    configPath: string;
    sourceConfig: KaijiBotConfig;
    runtimeConfig: KaijiBotConfig;
    persistedHash: string;
    writtenAtMs: number;
};
export declare function setRuntimeConfigSnapshot(config: KaijiBotConfig, sourceConfig?: KaijiBotConfig): void;
export declare function resetConfigRuntimeState(): void;
export declare function clearRuntimeConfigSnapshot(): void;
export declare function getRuntimeConfigSnapshot(): KaijiBotConfig | null;
export declare function getRuntimeConfigSourceSnapshot(): KaijiBotConfig | null;
export declare function setRuntimeConfigSnapshotRefreshHandler(refreshHandler: RuntimeConfigSnapshotRefreshHandler | null): void;
export declare function getRuntimeConfigSnapshotRefreshHandler(): RuntimeConfigSnapshotRefreshHandler | null;
export declare function registerRuntimeConfigWriteListener(listener: (event: RuntimeConfigWriteNotification) => void): () => void;
export declare function notifyRuntimeConfigWriteListeners(event: RuntimeConfigWriteNotification): void;
export declare function loadPinnedRuntimeConfig(loadFresh: () => KaijiBotConfig): KaijiBotConfig;
export declare function finalizeRuntimeSnapshotWrite(params: {
    nextSourceConfig: KaijiBotConfig;
    hadRuntimeSnapshot: boolean;
    hadBothSnapshots: boolean;
    loadFreshConfig: () => KaijiBotConfig;
    notifyCommittedWrite: () => void;
    createRefreshError: (detail: string, cause: unknown) => Error;
    formatRefreshError: (error: unknown) => string;
}): Promise<void>;
