import { i as OpenClawConfig, t as ConfigFileSnapshot } from "./types.openclaw-CpnoYlBx.js"; import { n as ConfigWriteFollowUp, t as ConfigWriteAfterWrite } from "./runtime-snapshot-B86eJRWU.js"; import { n as ConfigWriteResult, s as readConfigFileSnapshotForWrite, t as ConfigWriteOptions } from "./io-CVxZXMvy.js"; //#region src/config/mutate.d.ts /** Selects whether a mutation starts from runtime or source config shape. */ type ConfigMutationBase = "runtime" | "source"; type ConfigReplaceResult = { path: string; previousHash: string | null; snapshot: ConfigFileSnapshot; nextConfig: OpenClawConfig; persistedHash: string | null; afterWrite: ConfigWriteAfterWrite; followUp: ConfigWriteFollowUp; }; type ConfigMutationIO = { env?: NodeJS.ProcessEnv; readConfigFileSnapshotForWrite: typeof readConfigFileSnapshotForWrite; writeConfigFile: (cfg: OpenClawConfig, options?: ConfigWriteOptions) => Promise; }; type ConfigMutationContext = { snapshot: ConfigFileSnapshot; previousHash: string | null; attempt: number; }; type ConfigMutationResult = ConfigReplaceResult & { result: T | undefined; attempts: number; }; declare function replaceConfigFile(params: { nextConfig: OpenClawConfig; baseHash?: string; snapshot?: ConfigFileSnapshot; afterWrite?: ConfigWriteOptions["afterWrite"]; writeOptions?: ConfigWriteOptions; io?: ConfigMutationIO; }): Promise; declare function mutateConfigFile(params: { base?: ConfigMutationBase; baseHash?: string; afterWrite?: ConfigWriteOptions["afterWrite"]; writeOptions?: ConfigWriteOptions; io?: ConfigMutationIO; mutate: (draft: OpenClawConfig, context: ConfigMutationContext) => Promise | T | void; }): Promise>; //#endregion export { replaceConfigFile as i, ConfigReplaceResult as n, mutateConfigFile as r, ConfigMutationBase as t };