mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-20 09:31:54 -06:00
c7e7ac2728
* docs(secrets): remove retired web credential paths * refactor(web): remove retired provider compatibility paths * refactor(providers): delete retired compatibility routes * refactor(secrets): remove retired credential aliases * refactor(plugin-sdk): delete retired compatibility surfaces * docs(plugin-sdk): remove retired migration guidance * chore(plugin-sdk): refresh rebased surface budgets * chore(plugin-sdk): refresh API removal baseline * refactor(compat): migrate retired internal callers * chore(plugin-sdk): refresh current-main baselines * test(config): migrate plugin-owned secret assertions * test(gateway): narrow plugin secret refs * fix(plugin-sdk): preserve private boundary type identity * chore(compat): remove stale sweep references * chore(lint): lower max-lines budget * refactor(secrets): remove unused web helper * build(plugin-sdk): drop removed compat entries * chore(plugin-sdk): refresh rebased API baseline * chore(plugin-sdk): use Linux API baseline hash * fix(plugin-sdk): preserve private bundled build entries * fix(plugin-sdk): package private runtime facades * fix(plugins): preserve external credential contracts
24 lines
749 B
TypeScript
24 lines
749 B
TypeScript
// Runtime config helpers expose scoped OpenClaw config reads to plugin runtimes.
|
|
import { getRuntimeConfig } from "../../config/config.js";
|
|
import {
|
|
mutateConfigFile as mutateConfigFileInternal,
|
|
replaceConfigFile as replaceConfigFileInternal,
|
|
} from "../../config/mutate.js";
|
|
import type { PluginRuntime } from "./types.js";
|
|
|
|
export function createRuntimeConfig(): PluginRuntime["config"] {
|
|
return {
|
|
current: getRuntimeConfig,
|
|
mutateConfigFile: async (params) =>
|
|
await mutateConfigFileInternal({
|
|
...params,
|
|
writeOptions: params.writeOptions,
|
|
}),
|
|
replaceConfigFile: async (params) =>
|
|
await replaceConfigFileInternal({
|
|
...params,
|
|
writeOptions: params.writeOptions,
|
|
}),
|
|
};
|
|
}
|