UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

1 lines 643 B
import{ConnectionRegistryKey,ConnectionRegistryKey as ConnectionRegistryKey$1}from"#context/providers/connection-key.js";import{ConnectionRegistryImpl}from"#runtime/connections/registry.js";import{BundleKey}from"#runtime/sessions/runtime-context-keys.js";import{getActiveRuntimeNode}from"#context/node.js";const connectionProvider={key:ConnectionRegistryKey$1,create(e,t){if(e.get(BundleKey)===void 0)return;let n=getActiveRuntimeNode(e).agent;if(n===void 0)return;let r=n.connections;if(r.length!==0||(n.dynamicConnectionResolvers?.length??0)!==0)return{value:new ConnectionRegistryImpl(r)}}};export{ConnectionRegistryKey,connectionProvider};