UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

44 lines (43 loc) • 1.81 kB
import { l as normalizeOptionalString } from "./string-coerce-CCIiB4H7.mjs"; import { i as listAgentIds } from "./agent-roster-t1ooUdXp.mjs"; import { O as tryResolveAmbientOwnerAgentId, t as AgentSelectionRequiredError, w as resolveSessionAgentIdsStrict, z as resolvePersistedSessionStoreOwnerForKey } from "./agent-scope-config-DmXgFGKP.mjs"; import "./agent-scope-BwB8YH6y.mjs"; //#region src/plugin-sdk/agent-scope-runtime.ts /** Preserve the SDK's writable array while core readers share immutable roster facts. */ function listAgentIdsCompatibility(e) { return [...listAgentIds(e)]; } /** * @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(e) { const t = { ...e, agentId: normalizeOptionalString(e.agentId) }; try { return resolveSessionAgentIdsStrict(t); } catch (n) { const r = t.agentId ?? normalizeOptionalString(e.fallbackAgentId); const i = e.config ?? {}; if (!(n instanceof AgentSelectionRequiredError) || r || resolvePersistedSessionStoreOwnerForKey(i, e.sessionKey).kind !== "none") throw n; const a = tryResolveAmbientOwnerAgentId(i); if (!a) throw n; return resolveSessionAgentIdsStrict({ ...t, fallbackAgentId: a }); } } /** * @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(e) { return resolveSessionAgentIdsCompatibility(e).sessionAgentId; } //#endregion export { resolveSessionAgentIdCompatibility as n, resolveSessionAgentIdsCompatibility as r, listAgentIdsCompatibility as t };