eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
1 lines • 933 B
JavaScript
import{bundleAuthoredModuleForGeneration,bundleAuthoredModuleMapForGeneration}from"#internal/authored-module-loader.js";import{resolveInstrumentationLayout}from"#internal/instrumentation-layout.js";import{mapConcurrent}from"#shared/map-concurrent.js";async function prepareAuthoredRuntimeModules(e){let{authoredWorkflowModules:t,code:n,workflowSourceFingerprint:r}=await bundleAuthoredModuleMapForGeneration(e),i=resolveInstrumentationLayout({agentRoot:e.manifest.agentRoot}),a=e.manifest.config.build?.externalDependencies??[],bundleInstrumentationModule=async e=>await bundleAuthoredModuleForGeneration(e,{externalDependencies:a});return{authoredWorkflowModules:t,instrumentation:{kind:`directory`,moduleCodeBySlot:Object.fromEntries(await mapConcurrent(Object.entries(i.modulePathsBySlot),async([e,t])=>[e,await bundleInstrumentationModule(t)]))},moduleMapCode:n,workflowSourceFingerprint:r}}export{prepareAuthoredRuntimeModules};