UNPKG

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 • 215 B
const e=new Map;async function t(t,n){let r=e.get(t);if(r){await r;return}let i,a=new Promise(e=>{i=e});e.set(t,a);try{await n()}finally{e.get(t)===a&&e.delete(t),i()}}async function n(t){await e.get(t)}export{n,t};