UNPKG

eve

Version:

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

1 lines 519 B
const DEFAULT_WORKFLOW_MAX_SUBAGENTS=100;function countResolvedWorkflowSubagentCalls(e){let t=0;for(let n of e.continuation.ledger)n.kind===`tool`&&n.status!==`interrupted`&&(t+=1);return t}function planWorkflowSubagentDispatch(e){let t=e.maxSubagents??100,n=countResolvedWorkflowSubagentCalls(e.interrupt),r=Math.max(0,t-n);return{allowed:e.actions.slice(0,r),blocked:e.actions.slice(r),maxSubagents:t,usedCalls:n}}export{DEFAULT_WORKFLOW_MAX_SUBAGENTS,countResolvedWorkflowSubagentCalls,planWorkflowSubagentDispatch};