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 • 859 B
JavaScript
import{r as e}from"./rolldown-runtime.js";import{m as t}from"./sdk-device.js";var n=e({hasDeviceSelectionInput:()=>s,hasExplicitDeviceSelector:()=>a,hasLockableDeviceSelector:()=>c,hasSelectorValue:()=>l,normalizeFreshForegroundOpenSelection:()=>o});const r=[`platform`,`target`],i=[`iosSimulatorDeviceSet`,`androidDeviceAllowlist`];function a(e){return t({deviceName:e?.device,udid:e?.udid,serial:e?.serial})}function o(e){return e.command!==`open`||e.flags?.foreground!==!0||e.positionals?.[0]||e.flags.udid!==void 0||e.flags.device!==void 0||e.flags.platform!==void 0&&e.flags.platform!==`ios`?e:{...e,flags:{...e.flags,platform:`ios`}}}function s(e){return a(e)||u(e,r)}function c(e){return s(e)||u(e,i)}function l(e){return typeof e==`string`&&e.trim().length>0}function u(e,t){return e?t.some(t=>l(e[t])):!1}export{l as a,c as i,s as n,o,a as r,n as t};