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 • 494 B
JavaScript
import{r as e}from"./rolldown-runtime.js";import{AsyncLocalStorage as t}from"node:async_hooks";var n=e({createScopedProvider:()=>r,withMethodScope:()=>i});function r(e,n=e=>e){let r=new t;return{resolve(t){return t?n(t):r.getStore()??e},async run(e,t){return e?await r.run(n(e),t):await t()},hasScope(){return!!r.getStore()}}}function i(e,t){return new Proxy(e,{get(e,n,r){let i=Reflect.get(e,n,r);return typeof i==`function`?(...n)=>t(async()=>await i.apply(e,n)):i}})}export{n,i as r,r as t};