UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

21 lines (20 loc) • 1.17 kB
import { n as normalizeAgentId } from "./agent-id-D1-Q6vR4.mjs"; import { n as setRetainedLegacyDefaultAgentId, t as getRetainedLegacyDefaultAgentId } from "./legacy.default-agent-owner-state-BIemD7B0.mjs"; import { E as tryResolveLegacyDataOwnerAgentId } from "./agent-scope-config-BU4qc9bA.mjs"; //#region src/config/legacy.default-agent-owner.ts function retainLegacyDefaultAgentId(config, agentId) { setRetainedLegacyDefaultAgentId(config, agentId ? normalizeAgentId(agentId) : void 0); return config; } function inheritLegacyDefaultAgentId(source, target) { return retainLegacyDefaultAgentId(target, tryGetLegacyDefaultAgentId(source)); } function tryGetLegacyDefaultAgentId(config) { return getRetainedLegacyDefaultAgentId(config); } function resolveSessionStoreCompatibilityAgentId(config) { const persistedAgentId = config.agents?.defaults?.sessionStore?.agentId?.trim(); return persistedAgentId ? normalizeAgentId(persistedAgentId) : tryResolveLegacyDataOwnerAgentId(config) ?? "main"; } //#endregion export { tryGetLegacyDefaultAgentId as i, resolveSessionStoreCompatibilityAgentId as n, retainLegacyDefaultAgentId as r, inheritLegacyDefaultAgentId as t };