UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 1.18 kB
import{l as normalizeOptionalString}from"./string-coerce-CpTFcSwY.mjs";import{i as listAgentIds}from"./agent-roster-4XrgUgPK.mjs";import{O as tryResolveAmbientOwnerAgentId,t as AgentSelectionRequiredError,w as resolveSessionAgentIdsStrict,z as resolvePersistedSessionStoreOwnerForKey}from"./agent-scope-config-CG9CFpGX.mjs";import"./agent-scope-Dw5XRSEh.mjs"; //!src/plugin-sdk/agent-scope-runtime.ts function listAgentIdsCompatibility(e){return[...listAgentIds(e)]}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})}}function resolveSessionAgentIdCompatibility(e){return resolveSessionAgentIdsCompatibility(e).sessionAgentId}export{resolveSessionAgentIdCompatibility as n,resolveSessionAgentIdsCompatibility as r,listAgentIdsCompatibility as t};