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 • 604 B
import{F as e}from"./sdk-contracts.js";import{t}from"./runtime-transport-hints.js";import{s as n}from"./app-resolution.js";async function r(r,i){if(!i.appBundleId||i.runtimeLaunchUrl?.trim())return;let a=t({metroHost:i.runtimeHints.metroHost,metroPort:i.runtimeHints.metroPort?Number(i.runtimeHints.metroPort):void 0,bundleUrl:i.runtimeHints.bundleUrl});if(!a)return;let o;try{o=await n(r,i.appBundleId,{timeoutMs:3e3})}catch(t){if(e(t))throw t;return}return o?`${o}://expo-development-client/?url=${encodeURIComponent(a.toString().replace(/\/+$/,``))}`:void 0}export{r as resolveExpoDevClientLaunchUrl};