UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

22 lines (21 loc) • 1 kB
import { o as reloadSharedAuthStoreOwnership } from "./path-resolve-caruxX2d.mjs"; import { _ as prepareModelRuntimeSnapshot } from "./prepared-model-runtime-l04jZgyc.mjs"; import { s as refreshActiveProviderAuthRuntimeSnapshot } from "./runtime-fLuYb9ac.mjs"; import { t as resolveModelAuthAgentScope } from "./model-auth-agent-scope-B923NrPi.mjs"; import { t as clearModelAuthStatusUsageCache } from "./models-auth-status-usage-cache-Cxh94v2T.mjs"; //#region src/gateway/model-auth-refresh.ts async function refreshModelAuthStateAfterMutation(getRuntimeConfig, agentId) { reloadSharedAuthStoreOwnership(); clearModelAuthStatusUsageCache(); await refreshActiveProviderAuthRuntimeSnapshot(); const config = getRuntimeConfig(); const scope = resolveModelAuthAgentScope(config, agentId); if (!scope.ok) throw new Error(scope.error.message); await prepareModelRuntimeSnapshot({ config, agentId, agentDir: scope.agentDir }); } //#endregion export { refreshModelAuthStateAfterMutation as t };