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 • 828 B
JavaScript
import{r as e}from"./rolldown-runtime.js";import{t}from"./string-enum.js";const n=[`app`,`frontmost-app`,`desktop`,`menubar`],r=t(n,{normalize:e=>e.trim().toLowerCase(),message:e=>`Invalid surface: ${e}. Use ${n.join(`|`)}.`});function i(e){return r.parse(e)}const a=[`xctest`,`native`],o=`AGENT_DEVICE_MACOS_APP_BACKEND`,s=t(a,{normalize:e=>e.trim().toLowerCase(),message:e=>`Invalid ${o}: ${e}. Use ${a.join(`|`)}.`});function c(e){let t=e(o);return t===void 0||t.trim()===``?`xctest`:s.parse(t)}const l={"frontmost-app":`macos-helper`,desktop:`macos-helper`,menubar:`macos-helper`};function u(e,t){let n=e??`app`;return n===`app`?t===`native`?`macos-helper`:`xctest`:l[n]}function d(e,t){let n=e??`app`;return u(n,t)===`macos-helper`?n:void 0}var f=e({readMacOsAppBackend:()=>c});export{i as a,u as i,n,c as o,d as r,f as t};