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 • 567 B
JavaScript
import{v as e}from"./sdk-contracts.js";import{t}from"./scoped-provider.js";function n(){return Promise.reject(new e(`COMMAND_FAILED`,`The web provider is not composed for this request.`,{reason:`web-provider-missing`}))}const r=t({open:()=>n(),close:()=>n(),snapshot:()=>n(),screenshot:()=>n(),setViewport:()=>n(),click:()=>n(),fill:()=>n(),typeText:()=>n(),scroll:()=>n()});function i(e){return r.resolve(e)}function a(){return r.hasScope()}async function o(e,t){return await r.run(e,t)}export{a as hasScopedWebProvider,i as resolveWebProvider,o as withWebProvider};