eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
1 lines • 418 B
JavaScript
import{ContextKey}from"#context/key.js";const PendingToolInterruptsKey=new ContextKey(`eve.pendingToolInterrupts`);function stashToolInterrupt(e,t,n){let r=e.get(PendingToolInterruptsKey)??{};asContainer(e).setVirtualContext(PendingToolInterruptsKey,{...r,[t]:n})}function readToolInterrupt(e,t){return e.get(PendingToolInterruptsKey)?.[t]}function asContainer(e){return e}export{readToolInterrupt,stashToolInterrupt};