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.87 kB
JavaScript
import{r as e}from"./rolldown-runtime.js";import{v as t}from"./sdk-contracts.js";import{g as n}from"./sdk-batch-runner.js";import{A as r,C as i,H as a,I as o,K as s,L as c,N as l,Ot as u,Q as d,St as f,W as p,Y as m,et as h,gt as g,it as _,lt as v,s as y,st as b,vt as x,w as S}from"./sdk-io.js";import"./diagnostics.js";import{n as C,o as w}from"./file.js";import{a as T,r as E}from"./version.js";import"./command.js";import{s as D}from"./device-shell.js";import{n as O}from"./keyed-lock.js";import{n as k}from"./runtime-slots.js";import"./retry.js";import{n as A,t as ee}from"./boot-diagnostics.js";import{d as j,f as M,l as N,n as P}from"./request.js";import{r as F}from"./host2.js";import{b as I}from"./runner-contract.js";import{D as L}from"./runner-error-classification.js";import{l as R}from"./src8.js";import{i as z}from"./runner-lease.js";import{a as B}from"./runner-lifecycle.js";import{a as V,c as H,i as U,s as W}from"./tool-provider.js";import{t as G}from"./physical-device-control.js";import{n as K,r as q,t as J}from"./runner-owner-state.js";import{d as Y,r as X}from"./simctl.js";const Z={runCmdStreaming:b,runCmdBackground:_,requireExecSuccess:h,isCommandTimeoutError:d,commandDeveloperDir:m,hostEnvironment:()=>{let e=J();if(!e)throw new t(`COMMAND_FAILED`,`Apple runner configuration has no bound host.`,{reason:`apple_runner_host_unbound`});return e},shellQuote:D,emitDiagnostic:f,withDiagnosticTimer:u,retryWithPolicy:s,isEnvTruthy:p,deadlineFromTimeoutMs:(e,t)=>a.fromTimeoutMs(e,t),isProcessAlive:i,isProcessGroupAlive:S,readProcessStartTime:o,readProcessCommand:l,signalPidsBestEffort:c,signalProcessGroupBestEffort:v,findProjectRoot:E,readVersion:T,acquireProcessLock:C,withProcessLock:w,withKeyedLock:O,publishFileSync:g,classifyOwnerLiveness:y,readHostCpuArchSync:r,parseBooleanLiteral:x,isRecord:n,emitRequestProgress:P,getRequestReadOnlyDeadlineMs:N,getRequestSignal:j,isRequestCanceled:M,classifyBootFailure:A,bootFailureHint:ee,runAppleToolCommand:W,runXcrun:H,enableIosSimulatorAppAccessibility:async e=>{let{enableIosSimulatorAppAccessibility:t}=await import(`./ios-simulator-accessibility.js`);await t(e)},readApplePlistJson:V,hasScopedAppleToolProvider:U,buildSimctlArgsForDevice:X,simulatorAddressFor:Y,wasSimulatorRecentlyObservedBooted:async e=>(await import(`./simulator.js`).then(e=>e.a)).wasSimulatorRecentlyObservedBooted(e),resolveIosPhysicalDeviceControl:G,leaseOwnerStateDir:q,runnerRuntimeSlot:k,hasDeviceClaimAuthority:e=>K()?.(e)??!1};var Q=e({RUNNER_STARTUP_TIMEOUT_MS:()=>RUNNER_STARTUP_TIMEOUT_MS,cleanupRunnerLeasesForOwner:()=>z,readRunnerSessionLiveness:()=>B,runAppleRunnerCommand:()=>$});F(Z);async function $(e,t,n={}){switch(L(t)){case`none`:case`resolved-modal`:return await R(e,t,n)}let{nameRunnerRequestLitPanel:r}=await import(`./runner-panel.js`);return await R(e,await r(e,t,I(n)),n)}export{Q as n,$ as t};