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 • 2.59 kB
JavaScript
import{n as e,r as t}from"./interactor-operation-binding.js";import{S as n,a as r,b as i,c as a,d as o,f as s,g as c,i as l,m as u,n as d,s as f,t as p,u as m,w as h,y as g}from"./tv-remote-runtime.js";import{c as _,l as v}from"./application-lifecycle-interaction.js";const y=[{operation:`back`,label:`back`,bind:h},{operation:`home`,label:u.home,bind:(e,t)=>c(`home`,e,t)},{operation:`setOrientation`,label:`orientation`,bind:l},{operation:`unlockOrientation`,label:`orientation auto`,bind:r},{operation:`tvRemote`,label:p,bind:d},{operation:`keyboardStatus`,label:f.keyboardStatus,bind:(e,t)=>a(`keyboardStatus`,e,t)},{operation:`keyboardDismiss`,label:f.keyboardDismiss,bind:(e,t)=>a(`keyboardDismiss`,e,t)},{operation:`keyboardEnter`,label:f.keyboardEnter,bind:(e,t)=>a(`keyboardEnter`,e,t)},{operation:`readClipboard`,label:m.readClipboard,bind:o},{operation:`writeClipboard`,label:m.writeClipboard,bind:s},{operation:`appSwitcher`,label:u.appSwitcher,bind:(e,t)=>c(`appSwitcher`,e,t)},{operation:`actionButton`,label:u.actionButton,bind:(e,t)=>c(`actionButton`,e,t)},{operation:`volumeUp`,label:u.volumeUp,bind:(e,t)=>c(`volumeUp`,e,t)},{operation:`volumeDown`,label:u.volumeDown,bind:(e,t)=>c(`volumeDown`,e,t)},{operation:`power`,label:u.power,bind:(e,t)=>c(`power`,e,t)},{operation:`mute`,label:u.mute,bind:(e,t)=>c(`mute`,e,t)},{operation:`sleep`,label:u.sleep,bind:(e,t)=>c(`sleep`,e,t)},{operation:`wake`,label:u.wake,bind:(e,t)=>c(`wake`,e,t)},{operation:`mediaPlayPause`,label:u.mediaPlayPause,bind:(e,t)=>c(`mediaPlayPause`,e,t)},{operation:`mediaNext`,label:u.mediaNext,bind:(e,t)=>c(`mediaNext`,e,t)},{operation:`mediaPrevious`,label:u.mediaPrevious,bind:(e,t)=>c(`mediaPrevious`,e,t)},{operation:`mediaRewind`,label:u.mediaRewind,bind:(e,t)=>c(`mediaRewind`,e,t)},{operation:`mediaFastForward`,label:u.mediaFastForward,bind:(e,t)=>c(`mediaFastForward`,e,t)},{operation:`triggerAppEvent`,label:`trigger-app-event`,bind:g},{operation:`setSetting`,label:`settings`,bind:v},{operation:`readSetting`,label:`settings read`,bind:_},{operation:`readAlert`,label:i.readAlert,bind:(e,t)=>n(`readAlert`,e,t)},{operation:`awaitAlert`,label:i.awaitAlert,bind:(e,t)=>n(`awaitAlert`,e,t)},{operation:`acceptAlert`,label:i.acceptAlert,bind:(e,t)=>n(`acceptAlert`,e,t)},{operation:`dismissAlert`,label:i.dismissAlert,bind:(e,t)=>n(`dismissAlert`,e,t)}];function b(e,t){let n={};for(let r of y)e.facts[r.operation]?.available&&Object.assign(n,r.bind(e.signal,t(r)));return n}function x(t){return b(t,()=>e(t))}function S(e){return b(e,n=>t({...e,operation:n.label}))}export{S as n,x as t};