UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

20 lines • 1.51 kB
import { XO as mutateConfigFile, ZO as replaceConfigFile, ik as ConfigWriteAfterWrite, nk as readConfigFileSnapshotForWrite, qj as ProviderModelRef, rk as ConfigWriteOptions } from "../config-contracts--zSNHFlu.js"; import { cr as AgentModelEntryConfig, r as OpenClawConfig } from "../types.openclaw-A0y1x1SF.js"; import { n as RuntimeEnv } from "../runtime-C7vMCRi6.js"; import "../model-input-D1q2pxsy.js"; type LogConfigUpdatedOptions = { path?: string; backupPath?: string | false; suffix?: string; }; /** Emits the standard config-updated message through the active runtime logger. */ export declare function logConfigUpdated(runtime: RuntimeEnv, opts?: LogConfigUpdatedOptions): void; type UpdateConfigContext = { runtimeConfig: OpenClawConfig; providerRegistryAvailable?: boolean; canonicalModelKeys?: ReadonlyMap<string, string | undefined>; restoreSourceEntry: (from: string, to: string, entry: AgentModelEntryConfig) => AgentModelEntryConfig; }; /** Reads source config, applies a mutator, and writes only the source-form config. */ export declare function updateConfig(mutator: (cfg: OpenClawConfig, context: UpdateConfigContext) => OpenClawConfig | Promise<OpenClawConfig>, selectModelRefs?: (cfg: OpenClawConfig, context: UpdateConfigContext) => readonly (ProviderModelRef | undefined)[], beforeCommit?: () => void, writeOptions?: ConfigWriteOptions): Promise<OpenClawConfig>; export { type ConfigWriteAfterWrite, mutateConfigFile, readConfigFileSnapshotForWrite, replaceConfigFile };