agent-device 0.21.15 → 0.21.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/android/ime-helper/dist/{agent-device-android-ime-helper-0.21.15.apk → agent-device-android-ime-helper-0.21.16.apk} +0 -0
  2. package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.16.apk.sha256 +1 -0
  3. package/android/ime-helper/dist/{agent-device-android-ime-helper-0.21.15.manifest.json → agent-device-android-ime-helper-0.21.16.manifest.json} +4 -4
  4. package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.21.15.apk → agent-device-android-snapshot-helper-0.21.16.apk} +0 -0
  5. package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.16.apk.sha256 +1 -0
  6. package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.21.15.manifest.json → agent-device-android-snapshot-helper-0.21.16.manifest.json} +6 -6
  7. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m +1 -4
  8. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedTextEntry.h +9 -9
  9. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedTextEntry.m +13 -22
  10. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSystemSurfaceHostPolicy.swift +0 -9
  11. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedTextEntry.swift +202 -73
  12. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift +17 -2
  13. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextTyping.swift +109 -128
  14. package/dist/src/adapter.js +1 -1
  15. package/dist/src/adb-executor.js +1 -1
  16. package/dist/src/adb-failure.js +1 -1
  17. package/dist/src/adb-transport.js +1 -1
  18. package/dist/src/agent-browser-provider.js +1 -1
  19. package/dist/src/agent-browser-tool.js +1 -1
  20. package/dist/src/agent-device-client.js +2 -2
  21. package/dist/src/ai-sdk.js +1 -1
  22. package/dist/src/alert-runtime.js +1 -1
  23. package/dist/src/android-input-ownership.js +1 -1
  24. package/dist/src/app-catalog.js +1 -1
  25. package/dist/src/app-deployment-resolution.js +1 -1
  26. package/dist/src/app-inventory.js +1 -1
  27. package/dist/src/app-launch.js +1 -1
  28. package/dist/src/app-lifecycle.js +1 -1
  29. package/dist/src/app-lifecycle2.js +1 -1
  30. package/dist/src/app-log-files.js +1 -1
  31. package/dist/src/app-log-runtime2.js +1 -1
  32. package/dist/src/app-resolution.js +1 -1
  33. package/dist/src/apple-runner-platform.js +1 -1
  34. package/dist/src/application-lifecycle-interaction.js +1 -1
  35. package/dist/src/archive.js +1 -1
  36. package/dist/src/artifact-download.js +1 -1
  37. package/dist/src/auth-session.js +1 -1
  38. package/dist/src/auth.js +1 -1
  39. package/dist/src/backend-snapshot-options.js +1 -1
  40. package/dist/src/boot-diagnostics.js +1 -1
  41. package/dist/src/capture-disclosure.js +1 -1
  42. package/dist/src/capture.js +1 -1
  43. package/dist/src/cli-config.js +1 -1
  44. package/dist/src/cli-help.js +3 -2
  45. package/dist/src/cli.js +4 -4
  46. package/dist/src/click-button.js +1 -1
  47. package/dist/src/client-metro.js +1 -1
  48. package/dist/src/client-types.d.ts +1 -1
  49. package/dist/src/clipboard-shell-response.js +1 -1
  50. package/dist/src/command-schema.js +1 -1
  51. package/dist/src/command-tools.js +2 -2
  52. package/dist/src/connection-runtime.js +1 -1
  53. package/dist/src/connection.js +5 -5
  54. package/dist/src/contracts.js +1 -1
  55. package/dist/src/daemon-client-lease-beat.js +1 -0
  56. package/dist/src/daemon-client-lifecycle.js +1 -1
  57. package/dist/src/daemon-client-transport.js +1 -0
  58. package/dist/src/daemon-shutdown-report.js +1 -1
  59. package/dist/src/daemon.js +1 -1
  60. package/dist/src/debug-symbols-facade.js +1 -1
  61. package/dist/src/device-claim-inspection.js +1 -1
  62. package/dist/src/device-claim-rule.js +2 -2
  63. package/dist/src/device-inventory-context.js +1 -1
  64. package/dist/src/device-rotation.js +1 -1
  65. package/dist/src/device-selection-resolver.js +1 -1
  66. package/dist/src/device-session.js +1 -1
  67. package/dist/src/device-shell.js +1 -1
  68. package/dist/src/device.js +1 -1
  69. package/dist/src/device2.js +1 -1
  70. package/dist/src/devicectl.js +1 -1
  71. package/dist/src/diagnostics.js +1 -1
  72. package/dist/src/dispatch-resolve.js +1 -1
  73. package/dist/src/doctor-facade.js +1 -1
  74. package/dist/src/doctor2.js +1 -1
  75. package/dist/src/durable-resource.js +1 -1
  76. package/dist/src/engine-eval-script.js +1 -1
  77. package/dist/src/error.js +1 -1
  78. package/dist/src/exec.js +1 -1
  79. package/dist/src/file.js +1 -1
  80. package/dist/src/find.js +1 -1
  81. package/dist/src/format.js +1 -1
  82. package/dist/src/gesture-admission.js +1 -1
  83. package/dist/src/gesture-plan.js +1 -1
  84. package/dist/src/gesture-runtime.js +1 -1
  85. package/dist/src/harmonyos.js +1 -1
  86. package/dist/src/helper.js +1 -1
  87. package/dist/src/host.js +1 -1
  88. package/dist/src/human-control-contract.js +1 -1
  89. package/dist/src/human-control.js +1 -1
  90. package/dist/src/index.js +1 -1
  91. package/dist/src/input-actions.js +1 -1
  92. package/dist/src/input-actions2.js +1 -1
  93. package/dist/src/install-artifact-facade.js +1 -1
  94. package/dist/src/install-source-network-transport.js +1 -1
  95. package/dist/src/install-source2.js +1 -1
  96. package/dist/src/interaction-positionals.js +1 -1
  97. package/dist/src/interaction-ref-policy.js +1 -1
  98. package/dist/src/interaction2.js +1 -1
  99. package/dist/src/interactor-operation-binding.js +1 -1
  100. package/dist/src/interactor.js +5 -4
  101. package/dist/src/interactor2.js +1 -1
  102. package/dist/src/interactors.js +1 -1
  103. package/dist/src/internal/bin.js +1 -1
  104. package/dist/src/internal/daemon.js +2 -2
  105. package/dist/src/internal/png-worker.js +1 -1
  106. package/dist/src/internal/run-script-http-child.js +1 -1
  107. package/dist/src/inventory.js +1 -1
  108. package/dist/src/inventory2.js +1 -1
  109. package/dist/src/inventory3.js +1 -1
  110. package/dist/src/inventory5.js +1 -1
  111. package/dist/src/ios-snapshot-engine.js +1 -1
  112. package/dist/src/ios-snapshot-runtime.js +1 -1
  113. package/dist/src/lease-context.js +1 -1
  114. package/dist/src/lease-scope.js +1 -1
  115. package/dist/src/lease.js +1 -1
  116. package/dist/src/limrun-download-file.js +1 -1
  117. package/dist/src/limrun-runtime-dependencies.js +1 -1
  118. package/dist/src/linux.js +1 -1
  119. package/dist/src/location-coordinates.js +1 -1
  120. package/dist/src/managed-device-scope.js +1 -1
  121. package/dist/src/mechanics.js +15 -15
  122. package/dist/src/multitouch-support.js +1 -1
  123. package/dist/src/native-build-cache.js +1 -1
  124. package/dist/src/observation.js +1 -1
  125. package/dist/src/overlay.js +2 -2
  126. package/dist/src/parameterized-recorded-fill.js +1 -1
  127. package/dist/src/perf-facade.js +1 -1
  128. package/dist/src/perf-runtime-operation-builder.js +1 -1
  129. package/dist/src/perf-runtime-plan.js +1 -1
  130. package/dist/src/perf-target.js +1 -1
  131. package/dist/src/perf.js +1 -1
  132. package/dist/src/physical-device-control.js +1 -1
  133. package/dist/src/platform-request-scope.js +1 -1
  134. package/dist/src/platform-runtime-managed-owner.js +1 -1
  135. package/dist/src/platform-runtime-open-target.js +1 -1
  136. package/dist/src/platform-runtime-operation-host.js +2 -2
  137. package/dist/src/platform-runtime-runtime-hints.js +1 -1
  138. package/dist/src/platform-runtime-screen-recording-apple-simulator-host.js +1 -1
  139. package/dist/src/platform-runtime-screen-recording-finalizer-host.js +1 -1
  140. package/dist/src/platform-runtime-screen-recording-process-host.js +1 -1
  141. package/dist/src/platform-runtime-unavailable.js +1 -1
  142. package/dist/src/platform-runtime.js +1 -1
  143. package/dist/src/platform-runtime2.js +1 -1
  144. package/dist/src/png-crop-bytes.js +1 -1
  145. package/dist/src/png-size.js +1 -1
  146. package/dist/src/png-worker-client.js +1 -1
  147. package/dist/src/png.js +1 -1
  148. package/dist/src/prepare-kind.js +1 -1
  149. package/dist/src/provider-session-ownership.js +1 -1
  150. package/dist/src/provider-webdriver.js +1 -1
  151. package/dist/src/proxy.js +1 -1
  152. package/dist/src/quality-warnings.js +1 -1
  153. package/dist/src/react-native.js +1 -1
  154. package/dist/src/record-runtime.js +1 -1
  155. package/dist/src/recording.js +1 -1
  156. package/dist/src/rect-center.js +1 -1
  157. package/dist/src/register-builtins.js +1 -1
  158. package/dist/src/registry.js +13 -13
  159. package/dist/src/remote-config2.js +1 -1
  160. package/dist/src/replay-divergence.js +1 -1
  161. package/dist/src/replay.js +1 -1
  162. package/dist/src/reporting.js +1 -1
  163. package/dist/src/request-admission.js +1 -1
  164. package/dist/src/request-cancel.js +1 -1
  165. package/dist/src/request-runtime-binding.js +1 -1
  166. package/dist/src/result-serialization.js +1 -1
  167. package/dist/src/retry.js +1 -1
  168. package/dist/src/runner-artifact-manifest.js +1 -0
  169. package/dist/src/runner-cache-metadata.js +3 -2
  170. package/dist/src/runner-client.js +1 -1
  171. package/dist/src/runner-dev-tools-security.js +1 -1
  172. package/dist/src/runner-device-readiness.js +1 -1
  173. package/dist/src/runner-disposal.js +1 -1
  174. package/dist/src/runner-error-classification.js +3 -3
  175. package/dist/src/runner-operations-facade.js +1 -1
  176. package/dist/src/runner.js +1 -1
  177. package/dist/src/runtime-transport-hints.js +1 -1
  178. package/dist/src/runtime.js +1 -1
  179. package/dist/src/runtime10.js +2 -2
  180. package/dist/src/runtime2.js +3 -3
  181. package/dist/src/runtime3.js +1 -1
  182. package/dist/src/runtime4.js +4 -4
  183. package/dist/src/runtime5.js +1 -1
  184. package/dist/src/runtime6.js +1 -1
  185. package/dist/src/runtime7.js +1 -1
  186. package/dist/src/runtime8.js +1 -1
  187. package/dist/src/runtime9.js +1 -1
  188. package/dist/src/screen-recording-admission-ledger.js +1 -1
  189. package/dist/src/screen-recording-completion.js +1 -1
  190. package/dist/src/screen-recording-options.js +1 -1
  191. package/dist/src/screen-recording-resource-recovery.js +1 -1
  192. package/dist/src/screen-recording-transport.js +1 -1
  193. package/dist/src/screenshot-density.js +1 -1
  194. package/dist/src/screenshot-image.js +1 -1
  195. package/dist/src/screenshot-runtime.js +1 -1
  196. package/dist/src/screenshot.js +1 -1
  197. package/dist/src/screenshot3.js +1 -1
  198. package/dist/src/script.js +1 -1
  199. package/dist/src/scroll-command.js +1 -1
  200. package/dist/src/scroll-gesture.js +1 -1
  201. package/dist/src/sdk-batch-runner.js +2 -2
  202. package/dist/src/sdk-batch.js +1 -1
  203. package/dist/src/sdk-contracts.js +2 -2
  204. package/dist/src/sdk-device.js +1 -1
  205. package/dist/src/sdk-io.js +1 -1
  206. package/dist/src/sdk-remote-config.js +1 -1
  207. package/dist/src/selector-runtime.js +1 -1
  208. package/dist/src/server.js +1 -1
  209. package/dist/src/session-allocation.js +1 -1
  210. package/dist/src/session-routing.js +1 -1
  211. package/dist/src/session-runtime-admission.js +1 -1
  212. package/dist/src/session-snapshot.js +1 -1
  213. package/dist/src/session-store.js +3 -3
  214. package/dist/src/session2.js +3 -3
  215. package/dist/src/settings.js +1 -1
  216. package/dist/src/settings2.js +1 -1
  217. package/dist/src/simctl.js +1 -1
  218. package/dist/src/simulator-boot.js +1 -1
  219. package/dist/src/simulator.js +1 -1
  220. package/dist/src/snapshot-runtime-binding.js +1 -1
  221. package/dist/src/snapshot-runtime.js +1 -1
  222. package/dist/src/snapshot-state.js +1 -1
  223. package/dist/src/snapshot2.js +1 -1
  224. package/dist/src/snapshot3.js +1 -1
  225. package/dist/src/snapshot4.js +1 -1
  226. package/dist/src/src.js +1 -1
  227. package/dist/src/src7.js +1 -1
  228. package/dist/src/src8.js +1 -1
  229. package/dist/src/stop-sequence.js +1 -1
  230. package/dist/src/string-enum.js +1 -1
  231. package/dist/src/takeover.js +1 -1
  232. package/dist/src/text-entry-focus.js +1 -1
  233. package/dist/src/tool-provider.js +1 -1
  234. package/dist/src/tool-provider2.js +1 -1
  235. package/dist/src/touch-runtime.js +1 -1
  236. package/dist/src/transport.js +1 -1
  237. package/dist/src/tv-remote.js +1 -1
  238. package/dist/src/type-text-runtime.js +1 -1
  239. package/dist/src/verified-file.js +1 -1
  240. package/dist/src/video.js +1 -1
  241. package/dist/src/viewport.js +1 -1
  242. package/dist/src/web.js +1 -1
  243. package/dist/src/web2.js +1 -1
  244. package/dist/src/webdriver-source.js +1 -1
  245. package/package.json +2 -2
  246. package/server.json +2 -2
  247. package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.15.apk.sha256 +0 -1
  248. package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.15.apk.sha256 +0 -1
package/dist/src/video.js CHANGED
@@ -1,4 +1,4 @@
1
- import{A as e}from"./sdk-contracts.js";import{or as t}from"./sdk-batch.js";import{x as n}from"./owner-identity.js";import{c as r}from"./exec.js";import{t as i}from"./timeouts.js";import{n as a,t as o}from"./file.js";import"./command.js";import"./retry.js";import"./process.js";import s from"node:path";import c from"node:fs";import{createHash as l}from"node:crypto";import u from"node:os";import{fileURLToPath as d}from"node:url";const f=`apple/runner/AgentDeviceRunner/RecordingScripts`;function p(e,t,n,r){let i=`${f}/${e}`,a=`dist/${i}`;return[s.resolve(t,e),s.resolve(n,i),s.resolve(t,`../${i}`),s.resolve(t,`../../${i}`),s.resolve(t,`../../../${i}`),s.resolve(n,a),s.resolve(r,i)]}function m(t,n,r=s.dirname(d(import.meta.url)),i=process.cwd()){let a=p(t,r,n,i);for(let e of a)if(c.existsSync(e))return e;throw new e(`COMMAND_FAILED`,`Missing recording helper script: ${t}`,{hint:`Ensure ${f} is present in this checkout or bundled under dist/${f} in the package.`,scriptName:t,searchedPaths:a})}function h(e=process.env){let t=v(),n=s.join(t,`home`),r=s.join(t,`module-cache`);return c.mkdirSync(n,{recursive:!0}),c.mkdirSync(r,{recursive:!0}),{...e,HOME:n,CLANG_MODULE_CACHE_PATH:r}}async function g(e){let t=[e.sourcePath,...e.extraSourcePaths??[]],n=t.map(e=>({sourcePath:e,stat:c.statSync(e),source:c.readFileSync(e)})),r=S(e.cacheName??s.basename(e.sourcePath,s.extname(e.sourcePath))),i=C([`2`,process.platform,process.arch,...n.flatMap(({sourcePath:e,stat:t,source:n})=>[s.resolve(e),t.size,n])]),a=s.join(v(),`bin`,`${r}-${i}`);return await y({sourcePaths:t,executablePath:a,timeoutMs:e.timeoutMs}),a}async function _(e){let t=S(e.cacheName),n=C([`2`,process.platform,process.arch,e.source]),r=s.join(v(),`sources`,`${t}-${n}.swift`),i=s.join(v(),`bin`,`${t}-${n}`);return await y({sourcePaths:[r],executablePath:i,sourceText:e.source,timeoutMs:e.timeoutMs}),i}function v(){let e=process.env.AGENT_DEVICE_SWIFT_CACHE_DIR?.trim();return e?s.resolve(e):s.join(u.tmpdir(),`agent-device-swift-cache`)}async function y(e){if(x(e.executablePath))return;let t=s.dirname(e.executablePath);c.mkdirSync(t,{recursive:!0});let n=e.timeoutMs??12e4;await a({acquire:()=>b(`${e.executablePath}.lock`,n),task:async()=>{if(x(e.executablePath))return;let i=c.mkdtempSync(s.join(t,`.${s.basename(e.executablePath)}.${process.pid}.`)),a=s.join(i,s.basename(e.executablePath));try{let[t]=e.sourcePaths;e.sourceText!==void 0&&t&&!c.existsSync(t)&&(c.mkdirSync(s.dirname(t),{recursive:!0}),c.writeFileSync(t,e.sourceText)),await r(`xcrun`,[`swiftc`,...e.sourcePaths,`-o`,a],{timeoutMs:n,env:h()}),c.renameSync(a,e.executablePath)}finally{c.rmSync(i,{recursive:!0,force:!0})}}})}async function b(t,r){try{return await o({lockDirPath:t,owner:{pid:process.pid,startTime:n(process.pid),acquiredAtMs:Date.now()},timeoutMs:r,pollMs:25,ownerGraceMs:r,description:`Swift cache lock: ${t} (${r}ms)`})}catch(n){throw n instanceof e&&n.message.startsWith(`Timed out waiting for Swift cache lock:`)?new e(`COMMAND_FAILED`,n.message,{...n.details,lockDir:t,timeoutMs:r,hint:`Another agent-device process may still be compiling this Swift helper. Retry shortly; if no agent-device process is active, remove "${t}" and retry.`}):n}}function x(e){try{return c.accessSync(e,c.constants.X_OK),c.statSync(e).isFile()}catch{return!1}}function S(e){return t(e.replaceAll(/[^A-Za-z0-9._-]/g,`-`))||`swift-helper`}function C(e){let t=l(`sha256`);for(let n of e)t.update(Buffer.isBuffer(n)?n:String(n)),t.update(`\0`);return t.digest(`hex`).slice(0,16)}const w={block:161,blockGroup:160,cluster:524531317,codecId:134,documentType:17026,ebml:440786851,segment:408125543,simpleBlock:163,trackEntry:174,trackNumber:215,tracks:374648427,trackType:131};function T(e){let t=E(e);if(!t)return!1;let{bytes:n,fileSize:r}=t,i=L(n,0,n.length,r);if(!i||i.id!==w.ebml||!i.complete||i.unknownSize||!D(n,i))return!1;let a=L(n,i.nextOffset,n.length,r);return!a||a.id!==w.segment||!V(a,r)?!1:O(n,a,r)}function E(e){try{let t=c.openSync(e,`r`);try{let e=c.fstatSync(t).size;if(e<=0)return;let n=Buffer.alloc(Math.min(e,1048576));return c.readSync(t,n,0,n.length,0)===n.length?{bytes:n,fileSize:e}:void 0}finally{c.closeSync(t)}}catch{return}}function D(e,t){let n=I(e,t)?.find(e=>e.id===w.documentType);return n!==void 0&&e.toString(`ascii`,n.dataStart,n.dataEnd)===`webm`}function O(e,t,n){let r=new Set,i=new Set;for(let a=t.dataStart;a<t.dataEnd;){let o=L(e,a,t.dataEnd,n);if(!o||!V(o,n))return!1;if(o.id===w.tracks&&k(e,o,r),o.id===w.cluster&&j(e,o,n,i),H(r,i))return!0;if(!o.complete||o.unknownSize)return!1;a=o.nextOffset}return!1}function k(e,t,n){let r=I(e,t);if(r){for(let t of r)if(t.id===w.trackEntry){let r=A(e,t);r!==void 0&&n.add(r)}}}function A(e,t){let n=I(e,t),r=F(e,n,w.trackNumber),i=F(e,n,w.trackType),a=n?.find(e=>e.id===w.codecId),o=a?e.toString(`ascii`,a.dataStart,a.dataEnd):void 0;return i===1&&o?.startsWith(`V_`)?r:void 0}function j(e,t,n,r){for(let i=t.dataStart;i<t.dataEnd;){let a=L(e,i,t.dataEnd,n);if(!a||!V(a,n)||(a.id===w.simpleBlock&&N(e,a,r),a.id===w.blockGroup&&M(e,a,r),!a.complete||a.unknownSize))return;i=a.nextOffset}}function M(e,t,n){let r=I(e,t)?.find(e=>e.id===w.block);r&&N(e,r,n)}function N(e,t,n){if(!t.complete||t.unknownSize)return;let r=z(e,t.dataStart);!r||r.unknown||t.dataEnd-t.dataStart<r.length+4||n.add(r.value)}function P(e,t){let n=t.dataEnd-t.dataStart;if(n<1||n>6)return;let r=0;for(let n=t.dataStart;n<t.dataEnd;n+=1)r=r*256+e[n];return Number.isSafeInteger(r)?r:void 0}function F(e,t,n){let r=t?.find(e=>e.id===n);return r?P(e,r):void 0}function I(e,t){if(!t.complete||t.unknownSize)return;let n=[];for(let r=t.dataStart;r<t.dataEnd;){let i=L(e,r,t.dataEnd,e.length);if(!i||!i.complete||i.unknownSize)return;n.push(i),r=i.nextOffset}return n}function L(e,t,n,r){let i=R(e,t);if(!i)return;let a=z(e,t+i.length);if(!a)return;let o=t+i.length+a.length;if(o>n)return;let s=a.unknown?r:o+a.value;if(!(!Number.isSafeInteger(s)||s<o))return{id:i.value,dataStart:o,dataEnd:Math.min(s,n),nextOffset:s,complete:s<=n,unknownSize:a.unknown}}function R(e,t){let n=B(e,t,4);if(!n)return;let r=0;for(let i=0;i<n;i+=1)r=r*256+e[t+i];return{length:n,value:r}}function z(e,t){let n=B(e,t,8);if(!n)return;let r=e[t],i=128>>n-1;if((r&i-1)==i-1&&e.subarray(t+1,t+n).every(e=>e===255))return{length:n,value:0,unknown:!0};let a=r&i-1;for(let r=1;r<n;r+=1)a=a*256+e[t+r];return Number.isSafeInteger(a)?{length:n,value:a,unknown:!1}:void 0}function B(e,t,n){let r=e[t];if(r===void 0||r===0)return;let i=128,a=1;for(;(r&i)===0;)i>>=1,a+=1;return a<=n&&t+a<=e.length?a:void 0}function V(e,t){return e.unknownSize||e.nextOffset<=t}function H(e,t){for(let n of e)if(t.has(n))return!0;return!1}let U;async function W(e,t={}){let n=t.pollMs??150,r=t.attempts??12,a,o=0;for(let t=0;t<r;t+=1){let t=0;try{t=c.statSync(e).size}catch{t=0}if(t>0&&t===a){if(o+=1,o>=2)return}else o=0;a=t,await i(n)}}async function G(e){let t=await Z(e);if(!t)return!1;if(t===`webm`)return!0;try{let t=await K(),n=await r(t,[e],{allowFailure:!0,timeoutMs:1e4,env:h()});return n.exitCode===0||Y(n.stderr,n.stdout)}catch(e){if(q(e))return!0;throw e}}async function K(){U??=_({source:`import Foundation
1
+ import{M as e}from"./sdk-contracts.js";import{or as t}from"./sdk-batch.js";import{x as n}from"./owner-identity.js";import{c as r}from"./exec.js";import{t as i}from"./timeouts.js";import{n as a,t as o}from"./file.js";import"./command.js";import"./retry.js";import"./process.js";import s from"node:path";import c from"node:fs";import{createHash as l}from"node:crypto";import u from"node:os";import{fileURLToPath as d}from"node:url";const f=`apple/runner/AgentDeviceRunner/RecordingScripts`;function p(e,t,n,r){let i=`${f}/${e}`,a=`dist/${i}`;return[s.resolve(t,e),s.resolve(n,i),s.resolve(t,`../${i}`),s.resolve(t,`../../${i}`),s.resolve(t,`../../../${i}`),s.resolve(n,a),s.resolve(r,i)]}function m(t,n,r=s.dirname(d(import.meta.url)),i=process.cwd()){let a=p(t,r,n,i);for(let e of a)if(c.existsSync(e))return e;throw new e(`COMMAND_FAILED`,`Missing recording helper script: ${t}`,{hint:`Ensure ${f} is present in this checkout or bundled under dist/${f} in the package.`,scriptName:t,searchedPaths:a})}function h(e=process.env){let t=v(),n=s.join(t,`home`),r=s.join(t,`module-cache`);return c.mkdirSync(n,{recursive:!0}),c.mkdirSync(r,{recursive:!0}),{...e,HOME:n,CLANG_MODULE_CACHE_PATH:r}}async function g(e){let t=[e.sourcePath,...e.extraSourcePaths??[]],n=t.map(e=>({sourcePath:e,stat:c.statSync(e),source:c.readFileSync(e)})),r=S(e.cacheName??s.basename(e.sourcePath,s.extname(e.sourcePath))),i=C([`2`,process.platform,process.arch,...n.flatMap(({sourcePath:e,stat:t,source:n})=>[s.resolve(e),t.size,n])]),a=s.join(v(),`bin`,`${r}-${i}`);return await y({sourcePaths:t,executablePath:a,timeoutMs:e.timeoutMs}),a}async function _(e){let t=S(e.cacheName),n=C([`2`,process.platform,process.arch,e.source]),r=s.join(v(),`sources`,`${t}-${n}.swift`),i=s.join(v(),`bin`,`${t}-${n}`);return await y({sourcePaths:[r],executablePath:i,sourceText:e.source,timeoutMs:e.timeoutMs}),i}function v(){let e=process.env.AGENT_DEVICE_SWIFT_CACHE_DIR?.trim();return e?s.resolve(e):s.join(u.tmpdir(),`agent-device-swift-cache`)}async function y(e){if(x(e.executablePath))return;let t=s.dirname(e.executablePath);c.mkdirSync(t,{recursive:!0});let n=e.timeoutMs??12e4;await a({acquire:()=>b(`${e.executablePath}.lock`,n),task:async()=>{if(x(e.executablePath))return;let i=c.mkdtempSync(s.join(t,`.${s.basename(e.executablePath)}.${process.pid}.`)),a=s.join(i,s.basename(e.executablePath));try{let[t]=e.sourcePaths;e.sourceText!==void 0&&t&&!c.existsSync(t)&&(c.mkdirSync(s.dirname(t),{recursive:!0}),c.writeFileSync(t,e.sourceText)),await r(`xcrun`,[`swiftc`,...e.sourcePaths,`-o`,a],{timeoutMs:n,env:h()}),c.renameSync(a,e.executablePath)}finally{c.rmSync(i,{recursive:!0,force:!0})}}})}async function b(t,r){try{return await o({lockDirPath:t,owner:{pid:process.pid,startTime:n(process.pid),acquiredAtMs:Date.now()},timeoutMs:r,pollMs:25,ownerGraceMs:r,description:`Swift cache lock: ${t} (${r}ms)`})}catch(n){throw n instanceof e&&n.message.startsWith(`Timed out waiting for Swift cache lock:`)?new e(`COMMAND_FAILED`,n.message,{...n.details,lockDir:t,timeoutMs:r,hint:`Another agent-device process may still be compiling this Swift helper. Retry shortly; if no agent-device process is active, remove "${t}" and retry.`}):n}}function x(e){try{return c.accessSync(e,c.constants.X_OK),c.statSync(e).isFile()}catch{return!1}}function S(e){return t(e.replaceAll(/[^A-Za-z0-9._-]/g,`-`))||`swift-helper`}function C(e){let t=l(`sha256`);for(let n of e)t.update(Buffer.isBuffer(n)?n:String(n)),t.update(`\0`);return t.digest(`hex`).slice(0,16)}const w={block:161,blockGroup:160,cluster:524531317,codecId:134,documentType:17026,ebml:440786851,segment:408125543,simpleBlock:163,trackEntry:174,trackNumber:215,tracks:374648427,trackType:131};function T(e){let t=E(e);if(!t)return!1;let{bytes:n,fileSize:r}=t,i=L(n,0,n.length,r);if(!i||i.id!==w.ebml||!i.complete||i.unknownSize||!D(n,i))return!1;let a=L(n,i.nextOffset,n.length,r);return!a||a.id!==w.segment||!V(a,r)?!1:O(n,a,r)}function E(e){try{let t=c.openSync(e,`r`);try{let e=c.fstatSync(t).size;if(e<=0)return;let n=Buffer.alloc(Math.min(e,1048576));return c.readSync(t,n,0,n.length,0)===n.length?{bytes:n,fileSize:e}:void 0}finally{c.closeSync(t)}}catch{return}}function D(e,t){let n=I(e,t)?.find(e=>e.id===w.documentType);return n!==void 0&&e.toString(`ascii`,n.dataStart,n.dataEnd)===`webm`}function O(e,t,n){let r=new Set,i=new Set;for(let a=t.dataStart;a<t.dataEnd;){let o=L(e,a,t.dataEnd,n);if(!o||!V(o,n))return!1;if(o.id===w.tracks&&k(e,o,r),o.id===w.cluster&&j(e,o,n,i),H(r,i))return!0;if(!o.complete||o.unknownSize)return!1;a=o.nextOffset}return!1}function k(e,t,n){let r=I(e,t);if(r){for(let t of r)if(t.id===w.trackEntry){let r=A(e,t);r!==void 0&&n.add(r)}}}function A(e,t){let n=I(e,t),r=F(e,n,w.trackNumber),i=F(e,n,w.trackType),a=n?.find(e=>e.id===w.codecId),o=a?e.toString(`ascii`,a.dataStart,a.dataEnd):void 0;return i===1&&o?.startsWith(`V_`)?r:void 0}function j(e,t,n,r){for(let i=t.dataStart;i<t.dataEnd;){let a=L(e,i,t.dataEnd,n);if(!a||!V(a,n)||(a.id===w.simpleBlock&&N(e,a,r),a.id===w.blockGroup&&M(e,a,r),!a.complete||a.unknownSize))return;i=a.nextOffset}}function M(e,t,n){let r=I(e,t)?.find(e=>e.id===w.block);r&&N(e,r,n)}function N(e,t,n){if(!t.complete||t.unknownSize)return;let r=z(e,t.dataStart);!r||r.unknown||t.dataEnd-t.dataStart<r.length+4||n.add(r.value)}function P(e,t){let n=t.dataEnd-t.dataStart;if(n<1||n>6)return;let r=0;for(let n=t.dataStart;n<t.dataEnd;n+=1)r=r*256+e[n];return Number.isSafeInteger(r)?r:void 0}function F(e,t,n){let r=t?.find(e=>e.id===n);return r?P(e,r):void 0}function I(e,t){if(!t.complete||t.unknownSize)return;let n=[];for(let r=t.dataStart;r<t.dataEnd;){let i=L(e,r,t.dataEnd,e.length);if(!i||!i.complete||i.unknownSize)return;n.push(i),r=i.nextOffset}return n}function L(e,t,n,r){let i=R(e,t);if(!i)return;let a=z(e,t+i.length);if(!a)return;let o=t+i.length+a.length;if(o>n)return;let s=a.unknown?r:o+a.value;if(!(!Number.isSafeInteger(s)||s<o))return{id:i.value,dataStart:o,dataEnd:Math.min(s,n),nextOffset:s,complete:s<=n,unknownSize:a.unknown}}function R(e,t){let n=B(e,t,4);if(!n)return;let r=0;for(let i=0;i<n;i+=1)r=r*256+e[t+i];return{length:n,value:r}}function z(e,t){let n=B(e,t,8);if(!n)return;let r=e[t],i=128>>n-1;if((r&i-1)==i-1&&e.subarray(t+1,t+n).every(e=>e===255))return{length:n,value:0,unknown:!0};let a=r&i-1;for(let r=1;r<n;r+=1)a=a*256+e[t+r];return Number.isSafeInteger(a)?{length:n,value:a,unknown:!1}:void 0}function B(e,t,n){let r=e[t];if(r===void 0||r===0)return;let i=128,a=1;for(;(r&i)===0;)i>>=1,a+=1;return a<=n&&t+a<=e.length?a:void 0}function V(e,t){return e.unknownSize||e.nextOffset<=t}function H(e,t){for(let n of e)if(t.has(n))return!0;return!1}let U;async function W(e,t={}){let n=t.pollMs??150,r=t.attempts??12,a,o=0;for(let t=0;t<r;t+=1){let t=0;try{t=c.statSync(e).size}catch{t=0}if(t>0&&t===a){if(o+=1,o>=2)return}else o=0;a=t,await i(n)}}async function G(e){let t=await Z(e);if(!t)return!1;if(t===`webm`)return!0;try{let t=await K(),n=await r(t,[e],{allowFailure:!0,timeoutMs:1e4,env:h()});return n.exitCode===0||Y(n.stderr,n.stdout)}catch(e){if(q(e))return!0;throw e}}async function K(){U??=_({source:`import Foundation
2
2
  import AVFoundation
3
3
 
4
4
  let url = URL(fileURLWithPath: CommandLine.arguments[1])
@@ -1 +1 @@
1
- import{A as e}from"./sdk-contracts.js";function t(t,n){let r=t===void 0?NaN:Number(t);if(!Number.isInteger(r)||r<1)throw new e(`INVALID_ARGS`,`viewport ${n} must be a positive integer`);return r}function n(n){if(n.length!==2)throw new e(`INVALID_ARGS`,`viewport requires exactly two arguments: <width> <height>`);return{width:t(n[0],`width`),height:t(n[1],`height`)}}export{n as t};
1
+ import{M as e}from"./sdk-contracts.js";function t(t,n){let r=t===void 0?NaN:Number(t);if(!Number.isInteger(r)||r<1)throw new e(`INVALID_ARGS`,`viewport ${n} must be a positive integer`);return r}function n(n){if(n.length!==2)throw new e(`INVALID_ARGS`,`viewport requires exactly two arguments: <width> <height>`);return{width:t(n[0],`width`),height:t(n[1],`height`)}}export{n as t};
package/dist/src/web.js CHANGED
@@ -1,2 +1,2 @@
1
- import{A as e}from"./sdk-contracts.js";import{printJson as t}from"./json.js";function n(){return Object.freeze({setup:async e=>{let{setupManagedAgentBrowser:t}=await import(`./src6.js`).then(e=>e.i);return await t(e)},doctor:async e=>{let{doctorManagedAgentBrowser:t}=await import(`./src6.js`).then(e=>e.i);return await t(e)}})}const r=n();async function i(t,n){switch(t[0]){case`setup`:{a(n.flags.json);let e=await r.setup({stateDir:n.stateDir});return o(n.flags.json,e),0}case`doctor`:{let e=await r.doctor({stateDir:n.stateDir});return s(n.flags.json,e.exitCode===0?`Web backend is healthy.`:`Web backend doctor reported issues.`,e),e.exitCode}default:throw new e(`INVALID_ARGS`,`web requires setup or doctor`)}}function a(e){e||process.stdout.write(`Setting up managed agent-browser backend (downloads if needed)...
1
+ import{M as e}from"./sdk-contracts.js";import{printJson as t}from"./json.js";function n(){return Object.freeze({setup:async e=>{let{setupManagedAgentBrowser:t}=await import(`./src6.js`).then(e=>e.i);return await t(e)},doctor:async e=>{let{doctorManagedAgentBrowser:t}=await import(`./src6.js`).then(e=>e.i);return await t(e)}})}const r=n();async function i(t,n){switch(t[0]){case`setup`:{a(n.flags.json);let e=await r.setup({stateDir:n.stateDir});return o(n.flags.json,e),0}case`doctor`:{let e=await r.doctor({stateDir:n.stateDir});return s(n.flags.json,e.exitCode===0?`Web backend is healthy.`:`Web backend doctor reported issues.`,e),e.exitCode}default:throw new e(`INVALID_ARGS`,`web requires setup or doctor`)}}function a(e){e||process.stdout.write(`Setting up managed agent-browser backend (downloads if needed)...
2
2
  `)}function o(e,n){if(e){t({success:!0,data:{status:c(n)}});return}process.stdout.write(`Managed web backend installed.\nagent-browser available at: ${n.binaryPath}\n`)}function s(e,n,r){if(e){t({success:!0,data:l(r)});return}process.stdout.write(`${n}\n`)}function c(e){let{socketDir:t,...n}=e;return n}function l(e){let t=e.status;return u(t)?{...e,status:c(t)}:e}function u(e){return typeof e==`object`&&!!e&&`socketDir`in e&&`installDir`in e&&`binaryPath`in e}export{i as runWebCommand};
package/dist/src/web2.js CHANGED
@@ -1 +1 @@
1
- import{A as e}from"./sdk-contracts.js";import{r as t}from"./interaction-positionals.js";import{c as n}from"./diagnostics.js";import"./diagnostics2.js";import{n as r}from"./src6.js";function i(t){let n=async n=>{throw new e(`UNSUPPORTED_OPERATION`,`${n} is not supported on ${t}`)};return{open:()=>n(`open`),openDevice:()=>n(`openDevice`),close:()=>n(`close`),tap:()=>n(`tap`),longPress:()=>n(`longPress`),focus:()=>n(`focus`),type:()=>n(`type`),fill:()=>n(`fill`),scroll:()=>n(`scroll`),screenshot:()=>n(`screenshot`),snapshot:()=>n(`snapshot`),back:()=>n(`back`),setOrientation:()=>n(`setOrientation`),setSetting:()=>n(`setSetting`)}}async function a(a){let o=a??await r(),s=o.clickRef,c=o.hover,l=o.hoverRef,u=o.fillRef;return{...i(`web`),open:(e,t)=>o.open(t?.url??e,{url:t?.url}),openDevice:()=>o.open(`about:blank`),close:e=>o.close(e),tap:(e,t)=>o.click(e,t),...s?{tapRef:async e=>(await s(e),{ref:t(e)})}:{},...c?{hover:async(e,t)=>await c(e,t)}:{},...l?{hoverRef:async e=>(await l(e),{ref:t(e)})}:{},focus:(e,t)=>o.click(e,t),type:(e,t)=>o.typeText(e,{delayMs:t}),fill:(e,t,n,r)=>o.fill(e,t,n,{delayMs:r}),...u?{fillRef:async(e,n,r)=>(await u(e,n,{delayMs:r}),{ref:t(e),text:n,delayMs:r??0})}:{},scroll:(e,t)=>o.scroll(e,t),screenshot:(e,t)=>o.screenshot(e,t),setViewport:(e,t)=>o.setViewport(e,t),snapshot:async e=>{let t=await n(`snapshot_capture`,async()=>await o.snapshot(e),{backend:`web`});return{nodes:t.nodes,truncated:t.truncated??!1,backend:`web`,producer:`agent-browser`}},setOrientation:async()=>{throw new e(`UNSUPPORTED_OPERATION`,`orientation is not supported on web`)}}}export{a as createWebInteractor};
1
+ import{M as e}from"./sdk-contracts.js";import{r as t}from"./interaction-positionals.js";import{c as n}from"./diagnostics.js";import"./diagnostics2.js";import{n as r}from"./src6.js";function i(t){let n=async n=>{throw new e(`UNSUPPORTED_OPERATION`,`${n} is not supported on ${t}`)};return{open:()=>n(`open`),openDevice:()=>n(`openDevice`),close:()=>n(`close`),tap:()=>n(`tap`),longPress:()=>n(`longPress`),focus:()=>n(`focus`),type:()=>n(`type`),fill:()=>n(`fill`),scroll:()=>n(`scroll`),screenshot:()=>n(`screenshot`),snapshot:()=>n(`snapshot`),back:()=>n(`back`),setOrientation:()=>n(`setOrientation`),setSetting:()=>n(`setSetting`)}}async function a(a){let o=a??await r(),s=o.clickRef,c=o.hover,l=o.hoverRef,u=o.fillRef;return{...i(`web`),open:(e,t)=>o.open(t?.url??e,{url:t?.url}),openDevice:()=>o.open(`about:blank`),close:e=>o.close(e),tap:(e,t)=>o.click(e,t),...s?{tapRef:async e=>(await s(e),{ref:t(e)})}:{},...c?{hover:async(e,t)=>await c(e,t)}:{},...l?{hoverRef:async e=>(await l(e),{ref:t(e)})}:{},focus:(e,t)=>o.click(e,t),type:(e,t)=>o.typeText(e,{delayMs:t}),fill:(e,t,n,r)=>o.fill(e,t,n,{delayMs:r}),...u?{fillRef:async(e,n,r)=>(await u(e,n,{delayMs:r}),{ref:t(e),text:n,delayMs:r??0})}:{},scroll:(e,t)=>o.scroll(e,t),screenshot:(e,t)=>o.screenshot(e,t),setViewport:(e,t)=>o.setViewport(e,t),snapshot:async e=>{let t=await n(`snapshot_capture`,async()=>await o.snapshot(e),{backend:`web`});return{nodes:t.nodes,truncated:t.truncated??!1,backend:`web`,producer:`agent-browser`}},setOrientation:async()=>{throw new e(`UNSUPPORTED_OPERATION`,`orientation is not supported on web`)}}}export{a as createWebInteractor};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime.js";import{A as t}from"./sdk-contracts.js";import{t as n}from"./bounds.js";import{t as r}from"./parser.js";var i=e({parseWebDriverSourceFacts:()=>p});function a(e){try{return r(e)}catch(e){throw new t(`COMMAND_FAILED`,`Failed to parse WebDriver page source XML: ${e instanceof Error?e.message:String(e)}`,void 0,e)}}function o(e){let t=n(e.bounds??null);if(t)return t;let r=d(e.x),i=d(e.y),a=d(e.width),o=d(e.height);if(r!==void 0&&i!==void 0&&a!==void 0&&o!==void 0)return{x:r,y:i,width:a,height:o}}function s(e,t){for(let n of t){let t=c(e[n]);if(t!==void 0)return t}}function c(e){return e||void 0}function l(e,t){return e===void 0?t:e===`true`||e===`1`?!0:e===`false`||e===`0`?!1:t===void 0&&void 0}function u(e){return!!(e&&e.width>0&&e.height>0)}function d(e){if(e===void 0||e===``)return;let t=Number(e);return Number.isFinite(t)?t:void 0}function f(e,t){return c(t.class)??c(e.replace(/^XCUIElementType/,``).toLowerCase())}function p(e,t=`ios`){let n=a(e),r=[],i=[];for(let e of n)m(r,e,void 0,0,i,t);return{nodes:r,roots:i}}function m(e,t,n,r,i,a){let o=h(t,a)?n:g(e,t,n,r,i,a),s=o===n?r:r+1;for(let n of t.children)m(e,n,o,s,i,a)}function h(e,t){if(Object.keys(e.attributes).length===0)return!0;let n=e.name.toLowerCase();return t===`ios`&&(n===`hierarchy`||n===`appiumaut`)}function g(e,t,n,r,i,a){let s=e.length,c=o(t.attributes);return e.push(_(s,t.name,t.attributes,n,r,c,a)),n===void 0&&i.push({type:t.name,...c?{rect:c}:{},rectStatus:x(t.attributes,c)}),s}function _(e,t,n,r,i,a,o){return{index:e,type:t,role:f(t,n),label:s(n,[`content-desc`,`label`,`text`,`name`]),value:c(n.value),identifier:s(n,[`resource-id`,`id`,`accessibility-id`,`name`]),rect:a,...v(n,a,o),depth:i,parentIndex:r}}function v(e,t,n){let r=n===`android`||void 0,i=l(e.enabled,r),a=l(e.displayed??e.visible,r);return n===`android`?{enabled:i,selected:l(e.selected,!1),focused:l(e.focused,!1),visibleToUser:a,hittable:a===!0&&i===!0&&u(t)}:{...y(`enabled`,i),...y(`selected`,l(e.selected)),...y(`focused`,l(e.focused)),...y(`visibleToUser`,a),...b(e.hittable)}}function y(e,t){return t===void 0?{}:{[e]:t}}function b(e){let t=l(e);return t===void 0?{}:{hittable:t}}function x(e,t){let n=e.bounds!==void 0,r=[`x`,`y`,`width`,`height`].every(t=>e[t]!==void 0);return!n&&!r?`not-provided`:u(t)?`reported`:`invalid`}export{i as n,p as t};
1
+ import{r as e}from"./rolldown-runtime.js";import{M as t}from"./sdk-contracts.js";import{t as n}from"./bounds.js";import{t as r}from"./parser.js";var i=e({parseWebDriverSourceFacts:()=>p});function a(e){try{return r(e)}catch(e){throw new t(`COMMAND_FAILED`,`Failed to parse WebDriver page source XML: ${e instanceof Error?e.message:String(e)}`,void 0,e)}}function o(e){let t=n(e.bounds??null);if(t)return t;let r=d(e.x),i=d(e.y),a=d(e.width),o=d(e.height);if(r!==void 0&&i!==void 0&&a!==void 0&&o!==void 0)return{x:r,y:i,width:a,height:o}}function s(e,t){for(let n of t){let t=c(e[n]);if(t!==void 0)return t}}function c(e){return e||void 0}function l(e,t){return e===void 0?t:e===`true`||e===`1`?!0:e===`false`||e===`0`?!1:t===void 0&&void 0}function u(e){return!!(e&&e.width>0&&e.height>0)}function d(e){if(e===void 0||e===``)return;let t=Number(e);return Number.isFinite(t)?t:void 0}function f(e,t){return c(t.class)??c(e.replace(/^XCUIElementType/,``).toLowerCase())}function p(e,t=`ios`){let n=a(e),r=[],i=[];for(let e of n)m(r,e,void 0,0,i,t);return{nodes:r,roots:i}}function m(e,t,n,r,i,a){let o=h(t,a)?n:g(e,t,n,r,i,a),s=o===n?r:r+1;for(let n of t.children)m(e,n,o,s,i,a)}function h(e,t){if(Object.keys(e.attributes).length===0)return!0;let n=e.name.toLowerCase();return t===`ios`&&(n===`hierarchy`||n===`appiumaut`)}function g(e,t,n,r,i,a){let s=e.length,c=o(t.attributes);return e.push(_(s,t.name,t.attributes,n,r,c,a)),n===void 0&&i.push({type:t.name,...c?{rect:c}:{},rectStatus:x(t.attributes,c)}),s}function _(e,t,n,r,i,a,o){return{index:e,type:t,role:f(t,n),label:s(n,[`content-desc`,`label`,`text`,`name`]),value:c(n.value),identifier:s(n,[`resource-id`,`id`,`accessibility-id`,`name`]),rect:a,...v(n,a,o),depth:i,parentIndex:r}}function v(e,t,n){let r=n===`android`||void 0,i=l(e.enabled,r),a=l(e.displayed??e.visible,r);return n===`android`?{enabled:i,selected:l(e.selected,!1),focused:l(e.focused,!1),visibleToUser:a,hittable:a===!0&&i===!0&&u(t)}:{...y(`enabled`,i),...y(`selected`,l(e.selected)),...y(`focused`,l(e.focused)),...y(`visibleToUser`,a),...b(e.hittable)}}function y(e,t){return t===void 0?{}:{[e]:t}}function b(e){let t=l(e);return t===void 0?{}:{hittable:t}}function x(e,t){let n=e.bounds!==void 0,r=[`x`,`y`,`width`,`height`].every(t=>e[t]!==void 0);return!n&&!r?`not-provided`:u(t)?`reported`:`invalid`}export{i as n,p as t};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-device",
3
- "version": "0.21.15",
3
+ "version": "0.21.16",
4
4
  "description": "Mobile app automation and verification for AI coding agents. CLI, MCP server, and typed Node.js API for iOS, Android, HarmonyOS, TV, web, macOS, and Linux.",
5
5
  "mcpName": "io.github.callstack/agent-device",
6
6
  "license": "MIT",
@@ -161,7 +161,7 @@
161
161
  "check:xctest-selection": "node --experimental-strip-types scripts/check-xctest-selection.ts",
162
162
  "check:packaged-runner-swift": "node --experimental-strip-types scripts/check-packaged-runner-swift.ts",
163
163
  "check:tmpdir-leaks": "node --experimental-strip-types scripts/check-tmpdir-leaks.ts",
164
- "check:tmpdir-leaks:test": "node --experimental-strip-types scripts/node-test-tmpdir.ts --experimental-strip-types --test scripts/check-tmpdir-leaks-model.test.ts scripts/vitest-tmpdir-global-setup.test.ts scripts/node-test-tmpdir.test.ts scripts/swift-toolchain-tmpdir.test.ts",
164
+ "check:tmpdir-leaks:test": "node --experimental-strip-types scripts/node-test-tmpdir.ts --experimental-strip-types --test --test-concurrency=1 scripts/check-tmpdir-leaks-model.test.ts scripts/vitest-tmpdir-global-setup.test.ts scripts/node-test-tmpdir.test.ts scripts/swift-toolchain-tmpdir.test.ts",
165
165
  "check:freerange": "fr",
166
166
  "check:quick": "pnpm lint && pnpm typecheck",
167
167
  "sync:mcp-metadata": "node scripts/sync-mcp-metadata.mjs",
package/server.json CHANGED
@@ -7,12 +7,12 @@
7
7
  "url": "https://github.com/callstack/agent-device",
8
8
  "source": "github"
9
9
  },
10
- "version": "0.21.15",
10
+ "version": "0.21.16",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "agent-device",
15
- "version": "0.21.15",
15
+ "version": "0.21.16",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },
@@ -1 +0,0 @@
1
- 2f8d38e6705542b327057b059c77cf3a6358fa2fc9a53e4bf5ecfb6279c441bf agent-device-android-ime-helper-0.21.15.apk
@@ -1 +0,0 @@
1
- af733a540d518ede88f0336564d6d4d03b05191732130b65a3094228fa1bed54 agent-device-android-snapshot-helper-0.21.15.apk