openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 2.29 kB
JavaScript
import{E as e,T as t}from"./openclaw-state-read-map-size-DJbMcZYM.mjs";import{v as n}from"./openclaw-state-read-home-dir-BQZX1pD2.mjs";import"./openclaw-state-read-agent-database-preparation-context-Cw99Iadw.mjs";import"node:util";Object.getOwnPropertyDescriptor(Promise.prototype,`then`),Object.getOwnPropertyDescriptor(Promise,Symbol.species);const r=n(Symbol.for(`openclaw.pluginRuntimeExecutionFrame`),()=>class RuntimeFrame extends t{constructor(e,t,n,r=e.invocation){super(e,r),this.gatewayScope=t,this.generationRegistry=n}get runtimePluginId(){return this.gatewayScope?.pluginId}get canUseInteractiveStateReadCapacity(){return this.gatewayScope?.canUseInteractiveStateReadCapacity?.()===!0}withScopes(e){return new RuntimeFrame(e,this.gatewayScope,this.generationRegistry)}});function getPluginRuntimeExecutionFrame(t=e()){return t instanceof r?t:void 0}const{gatewayContextBindingOwnerKey:i,GatewayContextBindingOwner:a}=n(Symbol.for(`openclaw.gatewayContextBindingOwner`),()=>{class BindingOwner{#e;constructor(e){this.#e=e,Object.setPrototypeOf(this,null)}static read(e,t){return typeof e==`object`&&e&&#e in e&&e.#e===t?e:void 0}}return{gatewayContextBindingOwnerKey:Symbol(`gatewayContextBindingOwner`),GatewayContextBindingOwner:BindingOwner}}),{gatewayContextBindingKey:o,gatewayContextLifetimeKey:s,GatewayContextBinding:c,GatewayContextLifetime:l}=n(Symbol.for(`openclaw.gatewayContextBindings`),()=>{class Binding{#e;#t;constructor(e){this.#e=e,Object.setPrototypeOf(this,null)}static read(e,t){return typeof e==`object`&&e&&#e in e&&e.#e===t?e:void 0}static get(e){return e.#t}static set(e,t){e.#t=t}}class Lifetime{#e;#t=new AbortController;constructor(e){this.#e=e,Object.setPrototypeOf(this,null)}static read(e,t){return typeof e==`object`&&e&&#e in e&&e.#e===t?e.#t:void 0}}return{gatewayContextBindingKey:Symbol(`gatewayContextBinding`),gatewayContextLifetimeKey:Symbol(`gatewayContextLifetime`),GatewayContextBinding:Binding,GatewayContextLifetime:Lifetime}});n(Symbol.for(`openclaw.expiredPluginRegistryScopeError`),()=>class extends Error{constructor(){super(`Plugin registry scope is no longer available`)}});function getPluginRuntimeGatewayRequestScope(){return getPluginRuntimeExecutionFrame()?.gatewayScope}export{getPluginRuntimeGatewayRequestScope as t};