UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

27 lines • 1.73 kB
import { P as OpenClawConfig, hr as AgentModelEntryConfig } from "../types-D3g9JHH2.js"; import "../plugin-metadata-snapshot-CWiro_gA.js"; import { o as ProviderModelRef } from "../model-fallback.types-DksCI2kd.js"; import { n as RuntimeEnv } from "../runtime-M_jncu14.js"; import "../defaults-CrnmaOmj.js"; import { c as readConfigFileSnapshotForWrite, l as ConfigWriteOptions, n as mutateConfigFile, r as replaceConfigFile, u as ConfigWriteAfterWrite } from "../config-CqQp4yQQ.js"; import "../model-input-DCnomfWa.js"; //#region src/config/logging.d.ts 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; //#endregion //#region src/commands/models/shared.d.ts 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>; //#endregion export { type ConfigWriteAfterWrite, mutateConfigFile, readConfigFileSnapshotForWrite, replaceConfigFile };