refactor(config): migrate plugin config access

This commit is contained in:
Peter Steinberger
2026-04-27 12:16:48 +01:00
parent 48ebed3ed3
commit 7f3f108521
531 changed files with 3502 additions and 1646 deletions

View File

@@ -1,4 +1,7 @@
import { resolveLivePluginConfigObject } from "openclaw/plugin-sdk/config-runtime";
import {
resolveLivePluginConfigObject,
type OpenClawConfig,
} from "openclaw/plugin-sdk/config-runtime";
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
import { createCodexAppServerAgentHarness } from "./harness.js";
import { buildCodexMediaUnderstandingProvider } from "./media-understanding-provider.js";
@@ -16,7 +19,9 @@ export default definePluginEntry({
register(api) {
const resolveCurrentPluginConfig = () =>
resolveLivePluginConfigObject(
api.runtime.config?.loadConfig,
api.runtime.config?.current
? () => api.runtime.config.current() as OpenClawConfig
: undefined,
"codex",
api.pluginConfig as Record<string, unknown>,
) ?? api.pluginConfig;