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 • 682 B
function e(e){return Object.freeze({async observeRunnerSession(e){let{readRunnerSessionLiveness:t}=await import(`./runner-client.js`).then(e=>e.n),n=t(e);return n?{alive:n.liveness!==`gone`,sessionId:n.sessionId}:void 0},async resolveSoleForegroundApp(t={}){try{let n=await e.listLocalDevices({platform:`ios`,iosSimulatorSetPath:t.simulatorSetPath,kind:`simulator`,booted:!0});if(n.length!==1)return;let[r]=n;if(!r)return;let{detectSoleRunningIosSimulatorApp:i}=await import(`./app-resolution.js`).then(e=>e.t),a=await i(r);return a?{device:r,app:{bundleId:a.bundleId}}:void 0}catch(t){if(e.shouldPropagateProbeError(t))throw t;return}}})}export{e as createAppleSessionObservation};