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.
2 lines • 346 B
JavaScript
async function e(e,n,r){if(e.json){let{printJson:e}=await import(`./json.js`);e({success:!0,data:n});return}let i=await r?.();i&&t(i)}function t(e){process.stdout.write(e.endsWith(`
`)?e:`${e}\n`)}async function n(t,n){!t.json&&n.stderr&&process.stderr.write(n.stderr),await e(t,t.json?n.jsonData??n.data:n.data,()=>n.text)}export{e as n,n as t};