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 • 544 B
import{a as e}from"./sdk-batch-runner.js";import{r as t}from"./app-deployment-resolution.js";import{n}from"./window-state.js";async function r(n,r){if(!(n.platform!==`android`||!r||e(r)))try{let e=await t(n,r);return e.type===`package`?e.value:void 0}catch{return}}async function i(e,t,n,r){if(n)return n;if(e.platform!==`android`||!t)return;let i=r??await a(e);return i&&i!==`android`?i:void 0}async function a(e){try{return(await n(e)).package?.trim()}catch{return}}export{i as inferAndroidPackageAfterOpen,r as resolveAndroidPackageForOpen};