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 • 615 B
import{r as e}from"./rolldown-runtime.js";var t=e({awaitLimrunWithinBudget:()=>n,joinOutcomeFailures:()=>a,keepLimrunObserved:()=>r,workOutstandingFailure:()=>i});async function n(e,t){let n=Promise.resolve(e).then(e=>({ok:!0,value:e}),e=>({ok:!1,rejected:!0,error:e})),r;try{return await Promise.race([n,new Promise(e=>{r=setTimeout(()=>e({ok:!1,expired:!0}),t),r.unref?.()})])}finally{r!==void 0&&clearTimeout(r)}}function r(e){return e.catch(()=>void 0),e}function i(e,t){return`${e} had not answered within ${String(t/1e3)} s`}function a(e,t){return e===void 0?t:t===void 0?e:`${e}; ${t}`}export{t as n,n as t};