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 • 701 B
import{Pt as e}from"./sdk-batch.js";import{r as t}from"./success-text.js";import{n}from"./snapshot-runtime-capture-input.js";import{t as r}from"./validation.js";import{i}from"./runtime-admission.js";function a(e){return r(e,`focus requires x y`)}function o(e,t){return{point:e,...t.appBundleId===void 0?{}:{options:{appBundleId:t.appBundleId}},execution:n(t)}}async function s(t){let n=a(t.positionals);return await i({command:`focus`,device:t.device,use:e,inspectFacts:t.inspectFacts,platformServices:t.platformServices,bindDevice:t.bindDevice},(e,t)=>c(e,n,t))}async function c(e,n,r){return await e.operations.focusPoint(o(n,r)),{x:n.x,y:n.y,...t(`Focused (${n.x}, ${n.y})`)}}export{s as n,c as t};