UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

36 lines (35 loc) 1.7 kB
import { l as normalizeOptionalString } from "./string-coerce-CIXf7egm.js"; import { t as AgentSelectionRequiredError, w as tryResolveAmbientOwnerAgentId } from "./agent-scope-config-DcbEhP0R.js"; import { b as resolveSessionAgentIdsStrict } from "./agent-scope-DbtJyKUL.js"; import { n as resolvePersistedSessionStoreOwnerForKey } from "./session-store-owner-CR2Ag3xK.js"; //#region src/plugin-sdk/agent-scope-runtime.ts /** * @deprecated Use `resolveSessionAgentIdsStrict` with an explicit or prepared * owner. Retained through 2026-11-29 for plugins shipped before strict * multi-agent ownership was introduced. */ function resolveSessionAgentIdsCompatibility(params) { try { return resolveSessionAgentIdsStrict(params); } catch (error) { const requestedAgentId = normalizeOptionalString(params.agentId) ?? normalizeOptionalString(params.fallbackAgentId); const config = params.config ?? {}; if (!(error instanceof AgentSelectionRequiredError) || requestedAgentId || resolvePersistedSessionStoreOwnerForKey(config, params.sessionKey).kind !== "none") throw error; const ambientAgentId = tryResolveAmbientOwnerAgentId(config); if (!ambientAgentId) throw error; return resolveSessionAgentIdsStrict({ ...params, fallbackAgentId: ambientAgentId }); } } /** * @deprecated Use `resolveSessionAgentIdStrict` with an explicit or prepared * owner. Retained through 2026-11-29 for plugins shipped before strict * multi-agent ownership was introduced. */ function resolveSessionAgentIdCompatibility(params) { return resolveSessionAgentIdsCompatibility(params).sessionAgentId; } //#endregion export { resolveSessionAgentIdsCompatibility as n, resolveSessionAgentIdCompatibility as t };