UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

28 lines (27 loc) • 1.31 kB
import { a as resolveAgentDir } from "./agent-scope-config-BEk6-ThS.mjs"; import "./agent-scope-bJOokm5r.mjs"; import { l as getRuntimeConfigSourceSnapshot } from "./runtime-snapshot-De_QxZI9.mjs"; import "./config-VnHbY_QV.mjs"; import { t as assertAuthProfileStoreAgentOwner } from "./sqlite-Bk_bX_Ka.mjs"; import { o as getActiveSecretsRuntimeConfigSnapshot } from "./runtime-state-B9uZIjU9.mjs"; //#region src/cli/capability-cli/local-account-secrets.ts /** * Prepare the selected agent's account-owned SecretRefs for one standalone local * capability run. Every agent-scoped local runner calls this before provider auth. */ async function prepareLocalCapabilityAccountSecrets(params) { const agentDir = resolveAgentDir(params.cfg, params.agentId); assertAuthProfileStoreAgentOwner(agentDir, params.agentId); if (getActiveSecretsRuntimeConfigSnapshot()) return; const secretsRuntime = await import("./runtime-BysBwmpO.mjs"); const snapshot = await secretsRuntime.prepareSecretsRuntimeSnapshot({ config: getRuntimeConfigSourceSnapshot() ?? params.cfg, assignmentConfig: params.cfg, agentDirs: [agentDir], includeConfigRefs: false, allowUnavailableSecretOwners: true }); secretsRuntime.activateSecretsRuntimeSnapshot(snapshot); } //#endregion export { prepareLocalCapabilityAccountSecrets };