import type { ConfigAccessOptions } from './types.js';
/** Original source hash required by the explicit settings save request. */
export interface WriteConfigOptions extends ConfigAccessOptions {
    /** Hash received by the client, or undefined only for a missing config. */
    expectedHash: string | undefined;
}
/** Hashes exact config bytes for disk-conflict detection. */
export declare function hashConfigCode(code: string): string;
/** Reads a validated config hash, returning undefined only when file is absent. */
export declare function configFileHash(file: string, options?: ConfigAccessOptions): Promise<string | undefined>;
/** Writes a parsed preview atomically, preserving a rollback copy for this session. */
export declare function writeConfig(file: string, code: string, options: WriteConfigOptions): Promise<{
    hash: string;
    backup?: string;
}>;
/** Restores a session backup only while the just-saved config is still current. */
export declare function restoreConfigBackup(file: string, backup: string, options: WriteConfigOptions): Promise<{
    hash: string;
}>;
/** Removes only backups allocated by this runtime when its dev session ends. */
export declare function cleanupConfigBackups(root: string): Promise<void>;
//# sourceMappingURL=write.d.ts.map