openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
20 lines (19 loc) • 792 B
JavaScript
import { t as applyPluginAutoEnable } from "./plugin-auto-enable-CPcwS2II.mjs";
import { t as resolveCommandSecretRefsViaGateway } from "./command-secret-gateway-Dh_PhH7v.mjs";
//#region src/cli/command-config-resolution.ts
/** Resolve command-scoped secrets and return both raw resolved and effective config views. */
async function resolveCommandConfigWithSecrets(e) {
const { runtime: t, autoEnable: n, env: r, ...i } = e;
const { resolvedConfig: a, diagnostics: o } = await resolveCommandSecretRefsViaGateway(i);
if (t) for (const e of o) t.error(`[secrets] ${e}`);
return {
resolvedConfig: a,
effectiveConfig: n ? applyPluginAutoEnable({
config: a,
env: r ?? process.env
}).config : a,
diagnostics: o
};
}
//#endregion
export { resolveCommandConfigWithSecrets as t };