openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 1.34 kB
JavaScript
import{s as runWithPluginExecutionFrame}from"./plugin-instance-invocation-na_CYyUz.mjs";import{n as createRegistryScope,s as runOutsidePluginRuntimeRegistryScope}from"./gateway-request-scope-7deHmsb_.mjs";import{n as getPluginRuntimeExecutionFrame,t as PluginRuntimeExecutionFrame}from"./execution-frame-Dr3M9DJS.mjs";import{n as createPluginMetadataSnapshotFrame,s as runOutsidePluginMetadataSnapshotScope}from"./current-plugin-metadata-snapshot-CYi8VAby.mjs";import{n as runOutsidePluginRuntimeGenerationRegistryScope}from"./generation-state-Bed3DvwS.mjs";import{t as createEmptyPluginRegistry}from"./registry-empty-DczuQDzf.mjs";
//!src/plugins/runtime/generation-scope.ts
function withPluginRuntimeGenerationScope(e,t){const n=e.pluginRegistry??createEmptyPluginRegistry();const r=createPluginMetadataSnapshotFrame(e.metadataSnapshot,{trustConfigIdentity:true});return runWithPluginExecutionFrame(new PluginRuntimeExecutionFrame(r,createRegistryScope(n,getPluginRuntimeExecutionFrame(r)?.gatewayScope,e.metadataSnapshot.declaredProviderOwners),n),t)}function runOutsidePluginRuntimeGenerationScope(e){return runOutsidePluginRuntimeGenerationRegistryScope(()=>runOutsidePluginMetadataSnapshotScope(()=>runOutsidePluginRuntimeRegistryScope(e)))}export{withPluginRuntimeGenerationScope as n,runOutsidePluginRuntimeGenerationScope as t};