rnxsim 0.1.366 → 0.1.367

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 (239) hide show
  1. package/README.md +14 -2
  2. package/cli/bin.ts +18 -0
  3. package/cli/bridge-flow-runner.ts +14 -151
  4. package/cli/commands/assert.ts +1 -1
  5. package/cli/commands/box/checkout-plane.ts +126 -0
  6. package/cli/commands/box/rnx-command.ts +68 -0
  7. package/cli/commands/box.ts +200 -0
  8. package/cli/commands/control.ts +12 -32
  9. package/cli/commands/do-chain.ts +412 -0
  10. package/cli/commands/flow.ts +0 -10
  11. package/cli/commands/inspect/core.ts +302 -725
  12. package/cli/commands/inspect/describe.ts +3 -76
  13. package/cli/commands/inspect/find.ts +3 -6
  14. package/cli/commands/inspect/get-layout.ts +14 -1
  15. package/cli/commands/inspect/resolve-target.ts +41 -47
  16. package/cli/commands/inspect/shared.ts +28 -123
  17. package/cli/commands/inspect/tree.ts +6 -15
  18. package/cli/commands/inspect/wait-ready.ts +2 -2
  19. package/cli/commands/inspect/wait-selector.ts +4 -8
  20. package/cli/commands/inspect.ts +23 -17
  21. package/cli/commands/install-desktop.ts +44 -7
  22. package/cli/commands/maestro-generate.ts +0 -2
  23. package/cli/commands/platform.ts +68 -0
  24. package/cli/commands/state.ts +5 -2
  25. package/cli/outbound-endpoints.ts +6 -1
  26. package/cli/parse-args.ts +13 -2
  27. package/cli/ws-bridge.ts +30 -2
  28. package/detox/index.ts +34 -17
  29. package/dist-cli/bin.js +5 -5
  30. package/dist-cli/chunks/{agent-SO6IOPRK.js → agent-EKKIAKP5.js} +2 -2
  31. package/dist-cli/chunks/{agent-wrapper-PMYCB2KO.js → agent-wrapper-MHLQUGA6.js} +2 -2
  32. package/dist-cli/chunks/{app-fonts-LULQGFY7.js → app-fonts-HN6ADRTQ.js} +2 -2
  33. package/dist-cli/chunks/{assert-WGNCD4ZU.js → assert-IMR6QCN6.js} +3 -3
  34. package/dist-cli/chunks/{auth-G7CCHH3M.js → auth-27LPMQNH.js} +2 -2
  35. package/dist-cli/chunks/{beta-N4LXL5TO.js → beta-6RXBB5AI.js} +2 -2
  36. package/dist-cli/chunks/box-DORLF3GP.js +1709 -0
  37. package/dist-cli/chunks/{camera-4JHCYBQS.js → camera-2G7JZ5DL.js} +2 -2
  38. package/dist-cli/chunks/{chunk-2UXU53MG.js → chunk-3QZJLNYY.js} +1 -1
  39. package/dist-cli/chunks/{chunk-YXXKSL6R.js → chunk-3VBVEDDA.js} +1 -1
  40. package/dist-cli/chunks/{chunk-ZJIS3CTW.js → chunk-4BWGLTKU.js} +2 -2
  41. package/dist-cli/chunks/chunk-4XSNO374.js +423 -0
  42. package/dist-cli/chunks/{chunk-RYIMSKDO.js → chunk-5DGMFUZG.js} +2 -2
  43. package/dist-cli/chunks/{chunk-M3BNCF7E.js → chunk-6DBS5EGX.js} +2 -2
  44. package/dist-cli/chunks/{chunk-ONORMKWX.js → chunk-6SO6I3D5.js} +2 -2
  45. package/dist-cli/chunks/chunk-75EFOPXE.js +32 -0
  46. package/dist-cli/chunks/{chunk-5NMCF5VF.js → chunk-A5AJFVOF.js} +1 -1
  47. package/dist-cli/chunks/{chunk-N3UC7HIX.js → chunk-AM2ODYAN.js} +1 -1
  48. package/dist-cli/chunks/{chunk-I6KIM6PN.js → chunk-AVOROGA3.js} +1 -1
  49. package/dist-cli/chunks/chunk-AXMMLO7D.js +130 -0
  50. package/dist-cli/chunks/{chunk-ORWP2E7R.js → chunk-BSEXEYNX.js} +2 -2
  51. package/dist-cli/chunks/{chunk-NQFJOCSF.js → chunk-CM6ZKZW7.js} +2 -2
  52. package/dist-cli/chunks/{chunk-ZMJ75EDG.js → chunk-DNVABCEC.js} +2 -2
  53. package/dist-cli/chunks/{chunk-2S7BKUP2.js → chunk-E33A4AIR.js} +2 -2
  54. package/dist-cli/chunks/{chunk-GXAB52K7.js → chunk-EFMOXYDD.js} +2 -2
  55. package/dist-cli/chunks/{chunk-TIAEYO6I.js → chunk-EV4P5UBP.js} +2 -2
  56. package/dist-cli/chunks/{chunk-JHXETDVC.js → chunk-G5IUIGGC.js} +1 -1
  57. package/dist-cli/chunks/chunk-GMLOCV3E.js +312 -0
  58. package/dist-cli/chunks/{chunk-ZLVRYXZ7.js → chunk-GRN2FHVW.js} +1 -1
  59. package/dist-cli/chunks/{chunk-A5FXX5PJ.js → chunk-HFFXPUEP.js} +1 -1
  60. package/dist-cli/chunks/chunk-HG6T4OOR.js +4 -0
  61. package/dist-cli/chunks/{chunk-OW5XHAA4.js → chunk-HNT2OXPZ.js} +1 -1
  62. package/dist-cli/chunks/chunk-IPEURNLI.js +24 -0
  63. package/dist-cli/chunks/chunk-IR44SFBA.js +5 -0
  64. package/dist-cli/chunks/chunk-JMSLXZFW.js +4 -0
  65. package/dist-cli/chunks/{chunk-EFR5DVNP.js → chunk-JPXQKLNH.js} +1 -1
  66. package/dist-cli/chunks/chunk-K3EC6JDE.js +4 -0
  67. package/dist-cli/chunks/{chunk-YGMEDJKJ.js → chunk-KHX65HAU.js} +2 -2
  68. package/dist-cli/chunks/{chunk-EQK5MJCU.js → chunk-LWOVKHRC.js} +2 -2
  69. package/dist-cli/chunks/{chunk-5OK3LCEJ.js → chunk-MQN5DWTI.js} +2 -2
  70. package/dist-cli/chunks/{chunk-TTASWLKM.js → chunk-N3BXQEUF.js} +1 -1
  71. package/dist-cli/chunks/{chunk-UCHW7ZHR.js → chunk-N5OSV26B.js} +2 -2
  72. package/dist-cli/chunks/chunk-PHNURIH3.js +4 -0
  73. package/dist-cli/chunks/{chunk-AFV32WZT.js → chunk-PP2KNVXP.js} +3 -3
  74. package/dist-cli/chunks/{chunk-XJU2QIRY.js → chunk-PROKNJVY.js} +2 -2
  75. package/dist-cli/chunks/chunk-QXLLY4IM.js +7 -0
  76. package/dist-cli/chunks/{chunk-HT6GFZOZ.js → chunk-RNQTOGM7.js} +1 -1
  77. package/dist-cli/chunks/{chunk-CN6XYYEA.js → chunk-RPNKKVBN.js} +27 -27
  78. package/dist-cli/chunks/{chunk-LN3RNW6X.js → chunk-RSNLI2NH.js} +2 -2
  79. package/dist-cli/chunks/{chunk-YCCCPFWT.js → chunk-RZGHV2WI.js} +2 -2
  80. package/dist-cli/chunks/chunk-SGGL3AFV.js +497 -0
  81. package/dist-cli/chunks/chunk-SH5ETJKG.js +4 -0
  82. package/dist-cli/chunks/{chunk-77ZHQJZR.js → chunk-T6J4YP56.js} +2 -2
  83. package/dist-cli/chunks/{chunk-MGDSJZ37.js → chunk-TWUE7WF5.js} +2 -2
  84. package/dist-cli/chunks/{chunk-SA6XVI55.js → chunk-U44VEQRN.js} +1 -1
  85. package/dist-cli/chunks/{chunk-IZKHOM37.js → chunk-URLVQHC3.js} +1 -1
  86. package/dist-cli/chunks/{chunk-GAJQSITE.js → chunk-VANZFTUE.js} +1 -1
  87. package/dist-cli/chunks/{chunk-EGAGZHO6.js → chunk-VB2YBH46.js} +1 -1
  88. package/dist-cli/chunks/{chunk-H23KWIKA.js → chunk-VFU2SJ7M.js} +2 -2
  89. package/dist-cli/chunks/{chunk-34IQM22N.js → chunk-VUBJ6FXU.js} +15 -15
  90. package/dist-cli/chunks/{chunk-NM2L2QV4.js → chunk-W5PATILQ.js} +2 -2
  91. package/dist-cli/chunks/chunk-WI5V4TYG.js +38 -0
  92. package/dist-cli/chunks/{chunk-6PL2CCGP.js → chunk-XTRHQAOV.js} +2 -2
  93. package/dist-cli/chunks/chunk-XWUTJLBM.js +27 -0
  94. package/dist-cli/chunks/{chunk-5DAIA77C.js → chunk-XYRUQQUR.js} +2 -2
  95. package/dist-cli/chunks/chunk-YBFB3RM7.js +4 -0
  96. package/dist-cli/chunks/chunk-YGQVQ2VG.js +4 -0
  97. package/dist-cli/chunks/{chunk-CTG7HBCA.js → chunk-YINACV32.js} +1 -1
  98. package/dist-cli/chunks/chunk-YV7ERO2V.js +5 -0
  99. package/dist-cli/chunks/{cleanup-KRIATKFH.js → cleanup-GVFHQ3KH.js} +2 -2
  100. package/dist-cli/chunks/cli-version-DPX5MA2M.js +4 -0
  101. package/dist-cli/chunks/{compat-6PTQ3QEA.js → compat-AYRTXYAM.js} +2 -2
  102. package/dist-cli/chunks/{config-ETGDUANO.js → config-K7LOOV62.js} +2 -2
  103. package/dist-cli/chunks/connect-H3CNY4IO.js +4 -0
  104. package/dist-cli/chunks/control-SMHZ2CF5.js +4 -0
  105. package/dist-cli/chunks/daemon-TEZUNI73.js +4 -0
  106. package/dist-cli/chunks/{debug-WIIB6ZKC.js → debug-ELGHG57T.js} +3 -3
  107. package/dist-cli/chunks/{desktop-TD7Q5LNB.js → desktop-4G7FK3MP.js} +3 -3
  108. package/dist-cli/chunks/{detox-7GNR33VM.js → detox-JKXGEJIZ.js} +2 -2
  109. package/dist-cli/chunks/{device-QOR3PGUF.js → device-IV3AR6KG.js} +2 -2
  110. package/dist-cli/chunks/{diagnose-RRCBLP6E.js → diagnose-3ERGF7EW.js} +2 -2
  111. package/dist-cli/chunks/{disk-cleanup-MJUGJPXT.js → disk-cleanup-ALFEVZ4B.js} +2 -2
  112. package/dist-cli/chunks/do-chain-K2B4OHM7.js +5 -0
  113. package/dist-cli/chunks/drivers-KJYXA3M3.js +4 -0
  114. package/dist-cli/chunks/env-2KF6IYZE.js +4 -0
  115. package/dist-cli/chunks/{film-D7Y64LID.js → film-UQXJFAD5.js} +3 -3
  116. package/dist-cli/chunks/flow-ASTUH56E.js +4 -0
  117. package/dist-cli/chunks/help-SNNYFELA.js +4 -0
  118. package/dist-cli/chunks/{hidden-runtime-alias-JGURVR2Z.js → hidden-runtime-alias-VJCWCFVO.js} +2 -2
  119. package/dist-cli/chunks/{home-paths-4ICFIGXO.js → home-paths-EGUZZ6J6.js} +2 -2
  120. package/dist-cli/chunks/inspect-XANAADQT.js +4 -0
  121. package/dist-cli/chunks/install-desktop-JKQA7UY6.js +4 -0
  122. package/dist-cli/chunks/{login-RU33QR2G.js → login-6KQGD7HK.js} +2 -2
  123. package/dist-cli/chunks/{logout-2IUG3Y5J.js → logout-2FCOVLBC.js} +2 -2
  124. package/dist-cli/chunks/{maestro-2MXTGG7I.js → maestro-HPSSEVJD.js} +3 -3
  125. package/dist-cli/chunks/{maestro-generate-2PYIFGLR.js → maestro-generate-KQQ6JHMR.js} +5 -5
  126. package/dist-cli/chunks/{mode-3DAPG3HF.js → mode-SH7KRZET.js} +2 -2
  127. package/dist-cli/chunks/{optional-demo-registry-BWSDJF2Z.js → optional-demo-registry-NAMCAVFX.js} +2 -2
  128. package/dist-cli/chunks/{perf-2TKPWB4N.js → perf-LWKAHXUL.js} +2 -2
  129. package/dist-cli/chunks/{permissions-5CSMHYNA.js → permissions-EZTKWTXV.js} +2 -2
  130. package/dist-cli/chunks/platform-KSOJIVN5.js +6 -0
  131. package/dist-cli/chunks/privacy-EJULWP7L.js +4 -0
  132. package/dist-cli/chunks/{record-I2HJCFP3.js → record-2IC7BAQN.js} +3 -3
  133. package/dist-cli/chunks/{report-issue-A4FZWBOC.js → report-issue-MMX6HOQO.js} +2 -2
  134. package/dist-cli/chunks/reset-PKFZA4NC.js +4 -0
  135. package/dist-cli/chunks/resolve-target-AFKU3BRE.js +4 -0
  136. package/dist-cli/chunks/runtime-XHWWPOIN.js +4 -0
  137. package/dist-cli/chunks/{screenshot-command-UFW5BFHP.js → screenshot-command-JYUXDVSA.js} +3 -3
  138. package/dist-cli/chunks/{screenshot-layers-5BIAL4YN.js → screenshot-layers-OGRY6AA3.js} +2 -2
  139. package/dist-cli/chunks/{screenshots-capture-EHYS3BV2.js → screenshots-capture-QHDN65XS.js} +2 -2
  140. package/dist-cli/chunks/{serve-O4FDM3AC.js → serve-W4BKAG4J.js} +3 -3
  141. package/dist-cli/chunks/setup-WJPMPSAC.js +4 -0
  142. package/dist-cli/chunks/sim-client-UOQGFBPO.js +4 -0
  143. package/dist-cli/chunks/{skills-ZK55SY32.js → skills-OPPXOD63.js} +2 -2
  144. package/dist-cli/chunks/state-TDAN7BOM.js +14 -0
  145. package/dist-cli/chunks/{storage-WP33ISEM.js → storage-CFB2YGLY.js} +2 -2
  146. package/dist-cli/chunks/store-4TEED4ZU.js +4 -0
  147. package/dist-cli/chunks/telemetry-S6N7CV6G.js +4 -0
  148. package/dist-cli/chunks/{timeline-DKGW5S4I.js → timeline-ASOOVP4C.js} +2 -2
  149. package/dist-cli/chunks/{upgrade-LL7G4B7G.js → upgrade-6MVJISHG.js} +2 -2
  150. package/dist-cli/chunks/upload-CBNIRFEW.js +4 -0
  151. package/dist-cli/chunks/{version-YLWR5G4F.js → version-5GS7CWRL.js} +2 -2
  152. package/dist-cli/chunks/{web-QELZ4CP6.js → web-QRRMYMV4.js} +2 -2
  153. package/dist-cli/chunks/welcome-33FXMAMB.js +5 -0
  154. package/dist-cli/chunks/{what-happened-MIOMZWM5.js → what-happened-GAZJGKXX.js} +2 -2
  155. package/dist-cli/chunks/ws-bridge-DIXUAPLQ.js +4 -0
  156. package/dist-lib/agent-daemon-client.cjs +1 -1
  157. package/dist-lib/agent-events.cjs +1 -1
  158. package/dist-lib/agent-identity.cjs +1 -1
  159. package/dist-lib/agent-sessions.cjs +1 -1
  160. package/dist-lib/attached-projects.cjs +1 -1
  161. package/dist-lib/auth/shared-session.cjs +1 -1
  162. package/dist-lib/backend-origin.cjs +1 -1
  163. package/dist-lib/beta.cjs +1 -1
  164. package/dist-lib/beta.mjs +1 -1
  165. package/dist-lib/bridge-constants.cjs +1 -1
  166. package/dist-lib/bridge-contract-input.cjs +336 -0
  167. package/dist-lib/bridge-contract-input.mjs +303 -0
  168. package/dist-lib/bridge-contract.cjs +29 -1
  169. package/dist-lib/bridge-contract.mjs +19 -0
  170. package/dist-lib/cli-constants.cjs +1 -1
  171. package/dist-lib/config.cjs +1 -1
  172. package/dist-lib/detox/index.cjs +32 -18
  173. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  174. package/dist-lib/home-paths.cjs +1 -1
  175. package/dist-lib/host/bridge-host.cjs +5 -1
  176. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  177. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  178. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  179. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  180. package/dist-lib/host/websocket-proxy.cjs +1 -1
  181. package/dist-lib/index.cjs +214 -594
  182. package/dist-lib/jump-to-source-babel.cjs +1 -1
  183. package/dist-lib/menu.cjs +1 -1
  184. package/dist-lib/menu.mjs +1 -1
  185. package/dist-lib/metro-production-bundle.cjs +1 -1
  186. package/dist-lib/metro-production-bundle.mjs +1 -1
  187. package/dist-lib/metro.cjs +1 -1
  188. package/dist-lib/profiles.cjs +1 -1
  189. package/dist-lib/public-brand.cjs +1 -1
  190. package/dist-lib/react-native-host-modules.cjs +1 -1
  191. package/dist-lib/react-native-host-modules.mjs +1 -1
  192. package/dist-lib/render-mode.cjs +1 -1
  193. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  194. package/dist-lib/sdk.cjs +273 -657
  195. package/dist-lib/sdk.mjs +271 -652
  196. package/dist-lib/skills.cjs +190 -287
  197. package/dist-lib/vite.cjs +1 -1
  198. package/package.json +9 -6
  199. package/skills/contrast/SKILL.md +3 -0
  200. package/skills/rnx-debug/SKILL.md +8 -0
  201. package/skills/rnx-test/SKILL.md +21 -0
  202. package/src/bridge-contract-input.ts +359 -0
  203. package/src/bridge-contract.ts +121 -1
  204. package/src/host/bridge-host.ts +7 -12
  205. package/src/index.ts +7 -0
  206. package/src/sim-client.ts +12 -3
  207. package/dist-cli/chunks/chunk-3X6IBUBX.js +0 -38
  208. package/dist-cli/chunks/chunk-7B37IZBN.js +0 -15
  209. package/dist-cli/chunks/chunk-DMPF2D24.js +0 -4
  210. package/dist-cli/chunks/chunk-DW37EVX5.js +0 -767
  211. package/dist-cli/chunks/chunk-DWFIH7CB.js +0 -32
  212. package/dist-cli/chunks/chunk-GUI3PDH2.js +0 -27
  213. package/dist-cli/chunks/chunk-KLF3K6ZZ.js +0 -4
  214. package/dist-cli/chunks/chunk-M5QCGLXR.js +0 -944
  215. package/dist-cli/chunks/chunk-M6SKQGAN.js +0 -5
  216. package/dist-cli/chunks/chunk-NAYLPOC5.js +0 -24
  217. package/dist-cli/chunks/chunk-VIND4SP3.js +0 -124
  218. package/dist-cli/chunks/chunk-XXNLYR64.js +0 -5
  219. package/dist-cli/chunks/chunk-ZFM24DOX.js +0 -4
  220. package/dist-cli/chunks/cli-version-SYGNHGFR.js +0 -4
  221. package/dist-cli/chunks/control-RBTNOLQM.js +0 -4
  222. package/dist-cli/chunks/daemon-N3SC5DK6.js +0 -4
  223. package/dist-cli/chunks/drivers-W6E3BZH4.js +0 -4
  224. package/dist-cli/chunks/flow-7QAE2V5Y.js +0 -4
  225. package/dist-cli/chunks/help-NLD6KWVG.js +0 -4
  226. package/dist-cli/chunks/inspect-C347BG52.js +0 -4
  227. package/dist-cli/chunks/install-desktop-YR6TWZYK.js +0 -4
  228. package/dist-cli/chunks/privacy-PWWC2BXO.js +0 -4
  229. package/dist-cli/chunks/reset-Y3PBPFYA.js +0 -4
  230. package/dist-cli/chunks/runtime-IC6NVVGA.js +0 -4
  231. package/dist-cli/chunks/setup-Y4QGSJBM.js +0 -4
  232. package/dist-cli/chunks/state-KFLAZNEY.js +0 -14
  233. package/dist-cli/chunks/store-VEE22CAY.js +0 -4
  234. package/dist-cli/chunks/telemetry-PZV4BISJ.js +0 -4
  235. package/dist-cli/chunks/upload-Y4C3YZDK.js +0 -4
  236. package/dist-cli/chunks/welcome-ZPKA5PZJ.js +0 -5
  237. package/dist-lib/mcp.cjs +0 -673
  238. package/dist-lib/mcp.mjs +0 -641
  239. package/src/mcp.ts +0 -791
@@ -0,0 +1,336 @@
1
+ /*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
+ "use strict";
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+
22
+ // src/bridge-contract-input.ts
23
+ var bridge_contract_input_exports = {};
24
+ __export(bridge_contract_input_exports, {
25
+ BridgeInputError: () => BridgeInputError,
26
+ SEMANTIC_WAIT_MAX_TIMEOUT_MS: () => SEMANTIC_WAIT_MAX_TIMEOUT_MS,
27
+ parsePerformStep: () => parsePerformStep,
28
+ parseResetOptions: () => parseResetOptions,
29
+ parseScreenshotOptions: () => parseScreenshotOptions,
30
+ parseSemanticQuery: () => parseSemanticQuery,
31
+ parseSemanticResolveSelector: () => parseSemanticResolveSelector,
32
+ parseSemanticWaitOptions: () => parseSemanticWaitOptions,
33
+ parseStateOptions: () => parseStateOptions
34
+ });
35
+ module.exports = __toCommonJS(bridge_contract_input_exports);
36
+ var BridgeInputError = class extends Error {
37
+ constructor(message) {
38
+ super(message);
39
+ this.name = "BridgeInputError";
40
+ }
41
+ };
42
+ var SEMANTIC_WAIT_MAX_TIMEOUT_MS = 3e4;
43
+ function validationFailure(path, expectation) {
44
+ throw new BridgeInputError(`${path} ${expectation}`);
45
+ }
46
+ function isRecordValue(value) {
47
+ return value !== null && typeof value === "object" && !Array.isArray(value);
48
+ }
49
+ function recordValue(value, path) {
50
+ if (!isRecordValue(value)) {
51
+ validationFailure(path, "must be an object");
52
+ }
53
+ return value;
54
+ }
55
+ function stringValue(value, path) {
56
+ if (typeof value !== "string") validationFailure(path, "must be a string");
57
+ return value;
58
+ }
59
+ function numberValue(value, path) {
60
+ if (typeof value !== "number" || !Number.isFinite(value)) {
61
+ validationFailure(path, "must be a finite number");
62
+ }
63
+ return value;
64
+ }
65
+ function booleanValue(value, path) {
66
+ if (typeof value !== "boolean") validationFailure(path, "must be a boolean");
67
+ return value;
68
+ }
69
+ function optionalNumber(record, key, path) {
70
+ return record[key] === void 0 ? void 0 : numberValue(record[key], `${path}.${key}`);
71
+ }
72
+ function optionalBoolean(record, key, path) {
73
+ return record[key] === void 0 ? void 0 : booleanValue(record[key], `${path}.${key}`);
74
+ }
75
+ function semanticWaitTimeout(record, path) {
76
+ const timeoutMs = optionalNumber(record, "timeoutMs", path);
77
+ if (timeoutMs !== void 0 && timeoutMs > SEMANTIC_WAIT_MAX_TIMEOUT_MS) {
78
+ validationFailure(
79
+ `${path}.timeoutMs`,
80
+ `must be at most ${SEMANTIC_WAIT_MAX_TIMEOUT_MS}`
81
+ );
82
+ }
83
+ return timeoutMs;
84
+ }
85
+ function parsePerformStep(value, index) {
86
+ const path = `perform.steps[${index}]`;
87
+ const step = recordValue(value, path);
88
+ const type = stringValue(step.type, `${path}.type`);
89
+ switch (type) {
90
+ case "touchDown":
91
+ case "touchMove":
92
+ case "touchUp": {
93
+ const pointerId = optionalNumber(step, "pointerId", path);
94
+ return {
95
+ type,
96
+ x: numberValue(step.x, `${path}.x`),
97
+ y: numberValue(step.y, `${path}.y`),
98
+ ...pointerId === void 0 ? {} : { pointerId }
99
+ };
100
+ }
101
+ case "touchCancel": {
102
+ const pointerId = optionalNumber(step, "pointerId", path);
103
+ return { type, ...pointerId === void 0 ? {} : { pointerId } };
104
+ }
105
+ case "tap":
106
+ return {
107
+ type,
108
+ x: numberValue(step.x, `${path}.x`),
109
+ y: numberValue(step.y, `${path}.y`)
110
+ };
111
+ case "tapId":
112
+ return { type, id: stringValue(step.id, `${path}.id`) };
113
+ case "tapText":
114
+ return { type, text: stringValue(step.text, `${path}.text`) };
115
+ case "doubleTap": {
116
+ const gapMs = optionalNumber(step, "gapMs", path);
117
+ return {
118
+ type,
119
+ x: numberValue(step.x, `${path}.x`),
120
+ y: numberValue(step.y, `${path}.y`),
121
+ ...gapMs === void 0 ? {} : { gapMs }
122
+ };
123
+ }
124
+ case "longPress": {
125
+ const durationMs = optionalNumber(step, "durationMs", path);
126
+ return {
127
+ type,
128
+ x: numberValue(step.x, `${path}.x`),
129
+ y: numberValue(step.y, `${path}.y`),
130
+ ...durationMs === void 0 ? {} : { durationMs }
131
+ };
132
+ }
133
+ case "drag": {
134
+ const steps = optionalNumber(step, "steps", path);
135
+ const stepMs = optionalNumber(step, "stepMs", path);
136
+ return {
137
+ type,
138
+ fromX: numberValue(step.fromX, `${path}.fromX`),
139
+ fromY: numberValue(step.fromY, `${path}.fromY`),
140
+ toX: numberValue(step.toX, `${path}.toX`),
141
+ toY: numberValue(step.toY, `${path}.toY`),
142
+ ...steps === void 0 ? {} : { steps },
143
+ ...stepMs === void 0 ? {} : { stepMs }
144
+ };
145
+ }
146
+ case "pinch": {
147
+ const steps = optionalNumber(step, "steps", path);
148
+ const stepMs = optionalNumber(step, "stepMs", path);
149
+ return {
150
+ type,
151
+ fromX1: numberValue(step.fromX1, `${path}.fromX1`),
152
+ fromY1: numberValue(step.fromY1, `${path}.fromY1`),
153
+ fromX2: numberValue(step.fromX2, `${path}.fromX2`),
154
+ fromY2: numberValue(step.fromY2, `${path}.fromY2`),
155
+ toX1: numberValue(step.toX1, `${path}.toX1`),
156
+ toY1: numberValue(step.toY1, `${path}.toY1`),
157
+ toX2: numberValue(step.toX2, `${path}.toX2`),
158
+ toY2: numberValue(step.toY2, `${path}.toY2`),
159
+ ...steps === void 0 ? {} : { steps },
160
+ ...stepMs === void 0 ? {} : { stepMs }
161
+ };
162
+ }
163
+ case "scroll": {
164
+ const x = optionalNumber(step, "x", path);
165
+ const y = optionalNumber(step, "y", path);
166
+ const animated = optionalBoolean(step, "animated", path);
167
+ return {
168
+ type,
169
+ id: stringValue(step.id, `${path}.id`),
170
+ ...x === void 0 ? {} : { x },
171
+ ...y === void 0 ? {} : { y },
172
+ ...animated === void 0 ? {} : { animated }
173
+ };
174
+ }
175
+ case "type":
176
+ return { type, text: stringValue(step.text, `${path}.text`) };
177
+ case "key":
178
+ return { type, key: stringValue(step.key, `${path}.key`) };
179
+ case "dismissKeyboard":
180
+ return { type };
181
+ case "wait":
182
+ return { type, ms: numberValue(step.ms, `${path}.ms`) };
183
+ case "waitFor": {
184
+ const timeoutMs = semanticWaitTimeout(step, path);
185
+ const selector = step.testID === void 0 ? { id: stringValue(step.id, `${path}.id`) } : { testID: stringValue(step.testID, `${path}.testID`) };
186
+ return {
187
+ type,
188
+ ...selector,
189
+ ...timeoutMs === void 0 ? {} : { timeoutMs }
190
+ };
191
+ }
192
+ default:
193
+ return validationFailure(`${path}.type`, "is not a supported perform step");
194
+ }
195
+ }
196
+ function parseStateOptions(value) {
197
+ const input = recordValue(value, "state");
198
+ const route = optionalBoolean(input, "route", "state");
199
+ const errors = optionalBoolean(input, "errors", "state");
200
+ const depth = optionalNumber(input, "depth", "state");
201
+ const errorLimit = optionalNumber(input, "errorLimit", "state");
202
+ const layers = input.layers === void 0 ? void 0 : stringValue(input.layers, "state.layers");
203
+ if (layers !== void 0 && layers !== "full" && layers !== "tenant" && layers !== "shell") {
204
+ return validationFailure("state.layers", "must be full, tenant, or shell");
205
+ }
206
+ return {
207
+ screenshot: optionalBoolean(input, "screenshot", "state") ?? true,
208
+ tree: optionalBoolean(input, "tree", "state") ?? true,
209
+ ...route === void 0 ? {} : { route },
210
+ ...errors === void 0 ? {} : { errors },
211
+ ...depth === void 0 ? {} : { depth },
212
+ ...layers === void 0 ? {} : { layers },
213
+ ...errorLimit === void 0 ? {} : { errorLimit }
214
+ };
215
+ }
216
+ function parseSemanticSelector(value, path) {
217
+ const selector = recordValue(value, path);
218
+ if (selector.testID !== void 0) {
219
+ return { testID: stringValue(selector.testID, `${path}.testID`) };
220
+ }
221
+ if (selector.text !== void 0) {
222
+ return { text: stringValue(selector.text, `${path}.text`) };
223
+ }
224
+ if (selector.role !== void 0) {
225
+ return { role: stringValue(selector.role, `${path}.role`) };
226
+ }
227
+ if (selector.type !== void 0) {
228
+ return { type: stringValue(selector.type, `${path}.type`) };
229
+ }
230
+ if (selector.pressable !== void 0) {
231
+ if (booleanValue(selector.pressable, `${path}.pressable`) !== true) {
232
+ return validationFailure(`${path}.pressable`, "must be true");
233
+ }
234
+ return { pressable: true };
235
+ }
236
+ if (selector.visible !== void 0) {
237
+ if (booleanValue(selector.visible, `${path}.visible`) !== true) {
238
+ return validationFailure(`${path}.visible`, "must be true");
239
+ }
240
+ return { visible: true };
241
+ }
242
+ return validationFailure(
243
+ path,
244
+ "must select testID, text, role, type, pressable, or visible"
245
+ );
246
+ }
247
+ function parseSemanticQuery(value) {
248
+ const query = recordValue(value, "query");
249
+ const kind = stringValue(query.kind, "query.kind");
250
+ if (kind === "count") return { kind };
251
+ if (kind === "tree") {
252
+ const depth = optionalNumber(query, "depth", "query");
253
+ return { kind, ...depth === void 0 ? {} : { depth } };
254
+ }
255
+ if (kind === "find") {
256
+ return { kind, selector: parseSemanticSelector(query.selector, "query.selector") };
257
+ }
258
+ return validationFailure("query.kind", "must be tree, find, or count");
259
+ }
260
+ function parseSemanticResolveSelector(value) {
261
+ const selector = recordValue(value, "selector");
262
+ if (selector.testID !== void 0) {
263
+ return { testID: stringValue(selector.testID, "selector.testID") };
264
+ }
265
+ if (selector.text !== void 0) {
266
+ return { text: stringValue(selector.text, "selector.text") };
267
+ }
268
+ return validationFailure("selector", "must select testID or text");
269
+ }
270
+ function parseSemanticWaitOptions(value) {
271
+ const input = recordValue(value, "waitFor");
272
+ const condition = recordValue(input.condition, "waitFor.condition");
273
+ const type = stringValue(condition.type, "waitFor.condition.type");
274
+ const timeoutMs = semanticWaitTimeout(input, "waitFor");
275
+ if (type === "ready") {
276
+ return {
277
+ condition: { type },
278
+ ...timeoutMs === void 0 ? {} : { timeoutMs }
279
+ };
280
+ }
281
+ if (type !== "present" && type !== "absent") {
282
+ return validationFailure(
283
+ "waitFor.condition.type",
284
+ "must be ready, present, or absent"
285
+ );
286
+ }
287
+ return {
288
+ condition: {
289
+ type,
290
+ testID: stringValue(condition.testID, "waitFor.condition.testID")
291
+ },
292
+ ...timeoutMs === void 0 ? {} : { timeoutMs }
293
+ };
294
+ }
295
+ function parseResetOptions(value) {
296
+ const input = recordValue(value, "reset");
297
+ const strategy = input.strategy === void 0 ? "data" : stringValue(input.strategy, "reset.strategy");
298
+ if (strategy !== "data" && strategy !== "full") {
299
+ return validationFailure("reset.strategy", "must be data or full");
300
+ }
301
+ return {
302
+ strategy,
303
+ relaunch: optionalBoolean(input, "relaunch", "reset") ?? true
304
+ };
305
+ }
306
+ function parseScreenshotOptions(value) {
307
+ const input = recordValue(value, "screenshot");
308
+ const layers = input.layers === void 0 ? void 0 : stringValue(input.layers, "screenshot.layers");
309
+ if (layers !== void 0 && layers !== "full" && layers !== "tenant" && layers !== "shell") {
310
+ return validationFailure("screenshot.layers", "must be full, tenant, or shell");
311
+ }
312
+ const crop = input.crop === void 0 ? void 0 : recordValue(input.crop, "screenshot.crop");
313
+ return {
314
+ ...layers === void 0 ? {} : { layers },
315
+ ...crop === void 0 ? {} : {
316
+ crop: {
317
+ x: numberValue(crop.x, "screenshot.crop.x"),
318
+ y: numberValue(crop.y, "screenshot.crop.y"),
319
+ w: numberValue(crop.w, "screenshot.crop.w"),
320
+ h: numberValue(crop.h, "screenshot.crop.h")
321
+ }
322
+ }
323
+ };
324
+ }
325
+ // Annotate the CommonJS export names for ESM import in node:
326
+ 0 && (module.exports = {
327
+ BridgeInputError,
328
+ SEMANTIC_WAIT_MAX_TIMEOUT_MS,
329
+ parsePerformStep,
330
+ parseResetOptions,
331
+ parseScreenshotOptions,
332
+ parseSemanticQuery,
333
+ parseSemanticResolveSelector,
334
+ parseSemanticWaitOptions,
335
+ parseStateOptions
336
+ });
@@ -0,0 +1,303 @@
1
+ /*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+
3
+ // src/bridge-contract-input.ts
4
+ var BridgeInputError = class extends Error {
5
+ constructor(message) {
6
+ super(message);
7
+ this.name = "BridgeInputError";
8
+ }
9
+ };
10
+ var SEMANTIC_WAIT_MAX_TIMEOUT_MS = 3e4;
11
+ function validationFailure(path, expectation) {
12
+ throw new BridgeInputError(`${path} ${expectation}`);
13
+ }
14
+ function isRecordValue(value) {
15
+ return value !== null && typeof value === "object" && !Array.isArray(value);
16
+ }
17
+ function recordValue(value, path) {
18
+ if (!isRecordValue(value)) {
19
+ validationFailure(path, "must be an object");
20
+ }
21
+ return value;
22
+ }
23
+ function stringValue(value, path) {
24
+ if (typeof value !== "string") validationFailure(path, "must be a string");
25
+ return value;
26
+ }
27
+ function numberValue(value, path) {
28
+ if (typeof value !== "number" || !Number.isFinite(value)) {
29
+ validationFailure(path, "must be a finite number");
30
+ }
31
+ return value;
32
+ }
33
+ function booleanValue(value, path) {
34
+ if (typeof value !== "boolean") validationFailure(path, "must be a boolean");
35
+ return value;
36
+ }
37
+ function optionalNumber(record, key, path) {
38
+ return record[key] === void 0 ? void 0 : numberValue(record[key], `${path}.${key}`);
39
+ }
40
+ function optionalBoolean(record, key, path) {
41
+ return record[key] === void 0 ? void 0 : booleanValue(record[key], `${path}.${key}`);
42
+ }
43
+ function semanticWaitTimeout(record, path) {
44
+ const timeoutMs = optionalNumber(record, "timeoutMs", path);
45
+ if (timeoutMs !== void 0 && timeoutMs > SEMANTIC_WAIT_MAX_TIMEOUT_MS) {
46
+ validationFailure(
47
+ `${path}.timeoutMs`,
48
+ `must be at most ${SEMANTIC_WAIT_MAX_TIMEOUT_MS}`
49
+ );
50
+ }
51
+ return timeoutMs;
52
+ }
53
+ function parsePerformStep(value, index) {
54
+ const path = `perform.steps[${index}]`;
55
+ const step = recordValue(value, path);
56
+ const type = stringValue(step.type, `${path}.type`);
57
+ switch (type) {
58
+ case "touchDown":
59
+ case "touchMove":
60
+ case "touchUp": {
61
+ const pointerId = optionalNumber(step, "pointerId", path);
62
+ return {
63
+ type,
64
+ x: numberValue(step.x, `${path}.x`),
65
+ y: numberValue(step.y, `${path}.y`),
66
+ ...pointerId === void 0 ? {} : { pointerId }
67
+ };
68
+ }
69
+ case "touchCancel": {
70
+ const pointerId = optionalNumber(step, "pointerId", path);
71
+ return { type, ...pointerId === void 0 ? {} : { pointerId } };
72
+ }
73
+ case "tap":
74
+ return {
75
+ type,
76
+ x: numberValue(step.x, `${path}.x`),
77
+ y: numberValue(step.y, `${path}.y`)
78
+ };
79
+ case "tapId":
80
+ return { type, id: stringValue(step.id, `${path}.id`) };
81
+ case "tapText":
82
+ return { type, text: stringValue(step.text, `${path}.text`) };
83
+ case "doubleTap": {
84
+ const gapMs = optionalNumber(step, "gapMs", path);
85
+ return {
86
+ type,
87
+ x: numberValue(step.x, `${path}.x`),
88
+ y: numberValue(step.y, `${path}.y`),
89
+ ...gapMs === void 0 ? {} : { gapMs }
90
+ };
91
+ }
92
+ case "longPress": {
93
+ const durationMs = optionalNumber(step, "durationMs", path);
94
+ return {
95
+ type,
96
+ x: numberValue(step.x, `${path}.x`),
97
+ y: numberValue(step.y, `${path}.y`),
98
+ ...durationMs === void 0 ? {} : { durationMs }
99
+ };
100
+ }
101
+ case "drag": {
102
+ const steps = optionalNumber(step, "steps", path);
103
+ const stepMs = optionalNumber(step, "stepMs", path);
104
+ return {
105
+ type,
106
+ fromX: numberValue(step.fromX, `${path}.fromX`),
107
+ fromY: numberValue(step.fromY, `${path}.fromY`),
108
+ toX: numberValue(step.toX, `${path}.toX`),
109
+ toY: numberValue(step.toY, `${path}.toY`),
110
+ ...steps === void 0 ? {} : { steps },
111
+ ...stepMs === void 0 ? {} : { stepMs }
112
+ };
113
+ }
114
+ case "pinch": {
115
+ const steps = optionalNumber(step, "steps", path);
116
+ const stepMs = optionalNumber(step, "stepMs", path);
117
+ return {
118
+ type,
119
+ fromX1: numberValue(step.fromX1, `${path}.fromX1`),
120
+ fromY1: numberValue(step.fromY1, `${path}.fromY1`),
121
+ fromX2: numberValue(step.fromX2, `${path}.fromX2`),
122
+ fromY2: numberValue(step.fromY2, `${path}.fromY2`),
123
+ toX1: numberValue(step.toX1, `${path}.toX1`),
124
+ toY1: numberValue(step.toY1, `${path}.toY1`),
125
+ toX2: numberValue(step.toX2, `${path}.toX2`),
126
+ toY2: numberValue(step.toY2, `${path}.toY2`),
127
+ ...steps === void 0 ? {} : { steps },
128
+ ...stepMs === void 0 ? {} : { stepMs }
129
+ };
130
+ }
131
+ case "scroll": {
132
+ const x = optionalNumber(step, "x", path);
133
+ const y = optionalNumber(step, "y", path);
134
+ const animated = optionalBoolean(step, "animated", path);
135
+ return {
136
+ type,
137
+ id: stringValue(step.id, `${path}.id`),
138
+ ...x === void 0 ? {} : { x },
139
+ ...y === void 0 ? {} : { y },
140
+ ...animated === void 0 ? {} : { animated }
141
+ };
142
+ }
143
+ case "type":
144
+ return { type, text: stringValue(step.text, `${path}.text`) };
145
+ case "key":
146
+ return { type, key: stringValue(step.key, `${path}.key`) };
147
+ case "dismissKeyboard":
148
+ return { type };
149
+ case "wait":
150
+ return { type, ms: numberValue(step.ms, `${path}.ms`) };
151
+ case "waitFor": {
152
+ const timeoutMs = semanticWaitTimeout(step, path);
153
+ const selector = step.testID === void 0 ? { id: stringValue(step.id, `${path}.id`) } : { testID: stringValue(step.testID, `${path}.testID`) };
154
+ return {
155
+ type,
156
+ ...selector,
157
+ ...timeoutMs === void 0 ? {} : { timeoutMs }
158
+ };
159
+ }
160
+ default:
161
+ return validationFailure(`${path}.type`, "is not a supported perform step");
162
+ }
163
+ }
164
+ function parseStateOptions(value) {
165
+ const input = recordValue(value, "state");
166
+ const route = optionalBoolean(input, "route", "state");
167
+ const errors = optionalBoolean(input, "errors", "state");
168
+ const depth = optionalNumber(input, "depth", "state");
169
+ const errorLimit = optionalNumber(input, "errorLimit", "state");
170
+ const layers = input.layers === void 0 ? void 0 : stringValue(input.layers, "state.layers");
171
+ if (layers !== void 0 && layers !== "full" && layers !== "tenant" && layers !== "shell") {
172
+ return validationFailure("state.layers", "must be full, tenant, or shell");
173
+ }
174
+ return {
175
+ screenshot: optionalBoolean(input, "screenshot", "state") ?? true,
176
+ tree: optionalBoolean(input, "tree", "state") ?? true,
177
+ ...route === void 0 ? {} : { route },
178
+ ...errors === void 0 ? {} : { errors },
179
+ ...depth === void 0 ? {} : { depth },
180
+ ...layers === void 0 ? {} : { layers },
181
+ ...errorLimit === void 0 ? {} : { errorLimit }
182
+ };
183
+ }
184
+ function parseSemanticSelector(value, path) {
185
+ const selector = recordValue(value, path);
186
+ if (selector.testID !== void 0) {
187
+ return { testID: stringValue(selector.testID, `${path}.testID`) };
188
+ }
189
+ if (selector.text !== void 0) {
190
+ return { text: stringValue(selector.text, `${path}.text`) };
191
+ }
192
+ if (selector.role !== void 0) {
193
+ return { role: stringValue(selector.role, `${path}.role`) };
194
+ }
195
+ if (selector.type !== void 0) {
196
+ return { type: stringValue(selector.type, `${path}.type`) };
197
+ }
198
+ if (selector.pressable !== void 0) {
199
+ if (booleanValue(selector.pressable, `${path}.pressable`) !== true) {
200
+ return validationFailure(`${path}.pressable`, "must be true");
201
+ }
202
+ return { pressable: true };
203
+ }
204
+ if (selector.visible !== void 0) {
205
+ if (booleanValue(selector.visible, `${path}.visible`) !== true) {
206
+ return validationFailure(`${path}.visible`, "must be true");
207
+ }
208
+ return { visible: true };
209
+ }
210
+ return validationFailure(
211
+ path,
212
+ "must select testID, text, role, type, pressable, or visible"
213
+ );
214
+ }
215
+ function parseSemanticQuery(value) {
216
+ const query = recordValue(value, "query");
217
+ const kind = stringValue(query.kind, "query.kind");
218
+ if (kind === "count") return { kind };
219
+ if (kind === "tree") {
220
+ const depth = optionalNumber(query, "depth", "query");
221
+ return { kind, ...depth === void 0 ? {} : { depth } };
222
+ }
223
+ if (kind === "find") {
224
+ return { kind, selector: parseSemanticSelector(query.selector, "query.selector") };
225
+ }
226
+ return validationFailure("query.kind", "must be tree, find, or count");
227
+ }
228
+ function parseSemanticResolveSelector(value) {
229
+ const selector = recordValue(value, "selector");
230
+ if (selector.testID !== void 0) {
231
+ return { testID: stringValue(selector.testID, "selector.testID") };
232
+ }
233
+ if (selector.text !== void 0) {
234
+ return { text: stringValue(selector.text, "selector.text") };
235
+ }
236
+ return validationFailure("selector", "must select testID or text");
237
+ }
238
+ function parseSemanticWaitOptions(value) {
239
+ const input = recordValue(value, "waitFor");
240
+ const condition = recordValue(input.condition, "waitFor.condition");
241
+ const type = stringValue(condition.type, "waitFor.condition.type");
242
+ const timeoutMs = semanticWaitTimeout(input, "waitFor");
243
+ if (type === "ready") {
244
+ return {
245
+ condition: { type },
246
+ ...timeoutMs === void 0 ? {} : { timeoutMs }
247
+ };
248
+ }
249
+ if (type !== "present" && type !== "absent") {
250
+ return validationFailure(
251
+ "waitFor.condition.type",
252
+ "must be ready, present, or absent"
253
+ );
254
+ }
255
+ return {
256
+ condition: {
257
+ type,
258
+ testID: stringValue(condition.testID, "waitFor.condition.testID")
259
+ },
260
+ ...timeoutMs === void 0 ? {} : { timeoutMs }
261
+ };
262
+ }
263
+ function parseResetOptions(value) {
264
+ const input = recordValue(value, "reset");
265
+ const strategy = input.strategy === void 0 ? "data" : stringValue(input.strategy, "reset.strategy");
266
+ if (strategy !== "data" && strategy !== "full") {
267
+ return validationFailure("reset.strategy", "must be data or full");
268
+ }
269
+ return {
270
+ strategy,
271
+ relaunch: optionalBoolean(input, "relaunch", "reset") ?? true
272
+ };
273
+ }
274
+ function parseScreenshotOptions(value) {
275
+ const input = recordValue(value, "screenshot");
276
+ const layers = input.layers === void 0 ? void 0 : stringValue(input.layers, "screenshot.layers");
277
+ if (layers !== void 0 && layers !== "full" && layers !== "tenant" && layers !== "shell") {
278
+ return validationFailure("screenshot.layers", "must be full, tenant, or shell");
279
+ }
280
+ const crop = input.crop === void 0 ? void 0 : recordValue(input.crop, "screenshot.crop");
281
+ return {
282
+ ...layers === void 0 ? {} : { layers },
283
+ ...crop === void 0 ? {} : {
284
+ crop: {
285
+ x: numberValue(crop.x, "screenshot.crop.x"),
286
+ y: numberValue(crop.y, "screenshot.crop.y"),
287
+ w: numberValue(crop.w, "screenshot.crop.w"),
288
+ h: numberValue(crop.h, "screenshot.crop.h")
289
+ }
290
+ }
291
+ };
292
+ }
293
+ export {
294
+ BridgeInputError,
295
+ SEMANTIC_WAIT_MAX_TIMEOUT_MS,
296
+ parsePerformStep,
297
+ parseResetOptions,
298
+ parseScreenshotOptions,
299
+ parseSemanticQuery,
300
+ parseSemanticResolveSelector,
301
+ parseSemanticWaitOptions,
302
+ parseStateOptions
303
+ };
@@ -1,10 +1,14 @@
1
- /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
8
12
  var __copyProps = (to, from, except, desc) => {
9
13
  if (from && typeof from === "object" || typeof from === "function") {
10
14
  for (let key of __getOwnPropNames(from))
@@ -17,4 +21,28 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
17
21
 
18
22
  // src/bridge-contract.ts
19
23
  var bridge_contract_exports = {};
24
+ __export(bridge_contract_exports, {
25
+ SEMANTIC_READY_CONTENT_NODE_FLOOR: () => SEMANTIC_READY_CONTENT_NODE_FLOOR,
26
+ SEMANTIC_READY_NODE_STABLE_MS: () => SEMANTIC_READY_NODE_STABLE_MS,
27
+ SEMANTIC_READY_POLL_MS: () => SEMANTIC_READY_POLL_MS,
28
+ readyProbeHasContent: () => readyProbeHasContent,
29
+ readyProbeHasTargetContent: () => readyProbeHasTargetContent
30
+ });
20
31
  module.exports = __toCommonJS(bridge_contract_exports);
32
+ var SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
33
+ var SEMANTIC_READY_NODE_STABLE_MS = 750;
34
+ var SEMANTIC_READY_POLL_MS = 150;
35
+ function readyProbeHasContent(probe) {
36
+ return probe.liveFrameActive || probe.targets > 0 || probe.nodes >= SEMANTIC_READY_CONTENT_NODE_FLOOR;
37
+ }
38
+ function readyProbeHasTargetContent(probe) {
39
+ return probe.liveFrameActive || probe.targets > 0;
40
+ }
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ SEMANTIC_READY_CONTENT_NODE_FLOOR,
44
+ SEMANTIC_READY_NODE_STABLE_MS,
45
+ SEMANTIC_READY_POLL_MS,
46
+ readyProbeHasContent,
47
+ readyProbeHasTargetContent
48
+ });