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 • 1.67 kB
import{x as e}from"./sdk-io.js";import{w as t}from"./sdk-device.js";import{n}from"./toolchain-probe.js";import{a as r}from"./src8.js";import{v as i}from"./runner-disposal.js";import"./runner-client.js";async function a(){let e=await n(`xcodebuild`,[`-version`]);return e?s({selectedPath:await n(`xcode-select`,[`-p`]),versionLine:e}):u()}async function o(n,a){if(!(!t(n)||n.kind!==`simulator`)&&!(e()!==`darwin`||a.isProviderDevice(n)))return a.emitProgress(`Checking iOS runner build cache (${n.name})...`),await i(n)?{id:`ios-runner-cache`,status:`pass`,summary:`iOS runner artifact cached; first open skips the runner build`}:(r(n,{}),a.emitProgress(`Warming iOS runner build cache in the background (${n.name})...`),{id:`ios-runner-cache`,status:`pass`,summary:`iOS runner build started in the background; the first open gets faster once it completes`,hint:"Run `agent-device prepare ios-runner` to wait for a fully warmed runner instead."})}function s(e){return{id:`toolchain`,status:c(e),summary:l(e),evidence:{selectedPath:e.selectedPath??null,xcodeVersion:e.versionLine??null}}}function c(e){return e.versionLine?`pass`:`info`}function l(e){return e.versionLine?e.selectedPath?`Apple toolchain: ${e.versionLine}; xcode-select ${e.selectedPath}.`:`Apple toolchain: ${e.versionLine}; xcode-select path unavailable.`:`Apple toolchain: xcodebuild version check failed.`}function u(){return{id:`toolchain`,status:`info`,summary:`Apple toolchain: xcodebuild version check failed.`,hint:`Install/select Xcode and complete first launch/license setup if xcodebuild reports it.`,command:`xcodebuild -version`}}export{o as appleRunnerWarmupCheck,a as appleToolchainCheck};