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 • 650 B
import{r as e}from"./rolldown-runtime.js";import{T as t,v as n}from"./sdk-contracts.js";var r=e({localInteractorSource:()=>a,providerInteractorSource:()=>o,requireInteractorMethod:()=>i});function i(e,n){if(e)return e;throw t(`${n} was admitted but its bound interactor has no implementation.`)}function a(e){return async t=>await e.resolveInteractor(e.device,t)}function o(e){return async t=>{let r=e.resolveInteractor(t);if(r)return r;throw new n(`UNSUPPORTED_OPERATION`,`Provider-owned ${e.operation} operation has no bound provider interactor.`,{reason:`provider-runtime-interactor-missing`,deviceId:e.device.id})}}export{i,a as n,o as r,r as t};