import type { ConfigFileSnapshot } from "./types.openclaw.js"; export type ObserveRecoveryDeps = { fs: { promises: { stat(path: string): Promise<{ mtimeMs?: number; ctimeMs?: number; dev?: number | bigint; ino?: number | bigint; mode?: number; nlink?: number; uid?: number; gid?: number; } | null>; readFile(path: string, encoding: BufferEncoding): Promise; writeFile(path: string, data: string, options?: { encoding?: BufferEncoding; mode?: number; flag?: string; }): Promise; copyFile(src: string, dest: string): Promise; chmod?(path: string, mode: number): Promise; mkdir(path: string, options?: { recursive?: boolean; mode?: number; }): Promise; readdir(path: string): Promise; rmdir(path: string): Promise; appendFile(path: string, data: string, options?: { encoding?: BufferEncoding; mode?: number; }): Promise; }; statSync(path: string, options?: { throwIfNoEntry?: boolean; }): { mtimeMs?: number; ctimeMs?: number; dev?: number | bigint; ino?: number | bigint; mode?: number; nlink?: number; uid?: number; gid?: number; } | null; readFileSync(path: string, encoding: BufferEncoding): string; writeFileSync(path: string, data: string, options?: { encoding?: BufferEncoding; mode?: number; flag?: string; }): unknown; copyFileSync(src: string, dest: string): unknown; chmodSync?(path: string, mode: number): unknown; mkdirSync(path: string, options?: { recursive?: boolean; mode?: number; }): unknown; readdirSync(path: string): string[]; rmdirSync(path: string): unknown; appendFileSync(path: string, data: string, options?: { encoding?: BufferEncoding; mode?: number; }): unknown; }; json5: { parse(value: string): unknown; }; env: NodeJS.ProcessEnv; homedir: () => string; logger: Pick; }; export declare function resolveLastKnownGoodConfigPath(configPath: string): string; export declare function maybeRecoverSuspiciousConfigRead(params: { deps: ObserveRecoveryDeps; configPath: string; raw: string; parsed: unknown; }): Promise<{ raw: string; parsed: unknown; }>; export declare function maybeRecoverSuspiciousConfigReadSync(params: { deps: ObserveRecoveryDeps; configPath: string; raw: string; parsed: unknown; }): { raw: string; parsed: unknown; }; export declare function promoteConfigSnapshotToLastKnownGood(params: { deps: ObserveRecoveryDeps; snapshot: ConfigFileSnapshot; logger?: Pick; }): Promise; export declare function recoverConfigFromLastKnownGood(params: { deps: ObserveRecoveryDeps; snapshot: ConfigFileSnapshot; reason: string; }): Promise;