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 • 618 B
JavaScript
function e(e){return e?.presentation??(e?.nodes.length?{}:{interactiveOnly:!0})}function t(e){return{nodes:e?.nodes??[],...e?.iosSystemSurfaceBundleId?{surfaceBundleId:e.iosSystemSurfaceBundleId}:{},...e?.presentedSurface?{presentedSurface:e.presentedSurface}:{},...e?.presentation?{presentation:e.presentation}:{}}}async function n(e){let{isSameSnapshotPresentation:t}=await import(`./sdk-contracts.js`).then(e=>e._t),{frame:n}=e,r=n&&n.nodes.length>0?n.presentation:void 0;return e.candidates.find(e=>e!==void 0&&e.nodes.length>0&&(!n?.nodes.length||t(e.presentation,r)))??n??{nodes:[]}}export{e as n,t as r,n as t};