agent-device
Version:
Open source device layer for AI coding agents: a CLI, MCP server, and typed Node.js API to control mobile, web, TV, and desktop apps on devices and simulators, locally or in the cloud.
1 lines • 337 B
JavaScript
import{t as e}from"./await-with-signal.js";function t(){let t=new Set;return{wait:async(n,r)=>{let i,a=new Promise(e=>{i=()=>{t.delete(a),e()}});return t.add(a),await e(n.finally(i),r)},[Symbol.asyncDispose]:async()=>{for(;t.size>0;)await Promise.all(t)}}}async function n(t,n,r){return await(t?t.wait(n,r):e(n,r))}export{t as n,n as t};