UNPKG

eve

Version:

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

1 lines 1.06 kB
import{bundleAuthoredModuleForGeneration,bundleAuthoredModuleMapForGeneration}from"#internal/authored-module-loader.js";import{resolveInstrumentationLayout}from"#internal/instrumentation-layout.js";async function prepareAuthoredRuntimeModules(e){let{authoredWorkflowModules:t,code:n,workflowSourceFingerprint:r}=await bundleAuthoredModuleMapForGeneration(e),i=e.manifest.config.experimental?.instrumentationProviders??!1?resolveInstrumentationLayout({agentRoot:e.manifest.agentRoot,providersEnabled:!0}):void 0,a=e.manifest.config.build?.externalDependencies??[],bundleInstrumentationModule=async e=>await bundleAuthoredModuleForGeneration(e,{externalDependencies:a}),o;if(i?.kind===`directory`){let e={};for(let[t,n]of Object.entries(i.modulePathsBySlot))e[t]=await bundleInstrumentationModule(n);o={kind:`directory`,moduleCodeBySlot:e}}return o===void 0?{authoredWorkflowModules:t,moduleMapCode:n,workflowSourceFingerprint:r}:{authoredWorkflowModules:t,instrumentation:o,moduleMapCode:n,workflowSourceFingerprint:r}}export{prepareAuthoredRuntimeModules};