eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
1 lines • 398 B
JavaScript
import{resumeHook}from"#internal/workflow/runtime.js";import{HookNotFoundError}from"#compiled/@workflow/errors/index.js";async function forwardTurnCancellationStep(e){"use step";for(let t=0;t<50;t+=1)try{return await resumeHook(e.token,e.payload),!0}catch(e){if(!HookNotFoundError.is(e))throw e;if(t===49)return!1;await new Promise(e=>setTimeout(e,20))}return!1}export{forwardTurnCancellationStep};