openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
2 lines • 639 B
JavaScript
//!src/plugins/runtime/load-context-state.ts
const pluginRuntimeLoadContext=Symbol.for(`openclaw.pluginRuntimeLoadContext`);function bindPluginRuntimeLoadContextState(e,t){Object.defineProperty(e,pluginRuntimeLoadContext,{value:()=>t,configurable:true,writable:true,enumerable:true})}function getPluginRuntimeLoadContextState(e){return e?.[pluginRuntimeLoadContext]?.()}function getSelectedContextEngineOwner(e,t){const n=getPluginRuntimeLoadContextState(e)?.selectedContextEngine;return n?.engineId===t?n.owner:void 0}export{getPluginRuntimeLoadContextState as n,getSelectedContextEngineOwner as r,bindPluginRuntimeLoadContextState as t};