rnxsim 0.1.366 → 0.1.368

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-GXCQMYV4.js} +2 -2
  31. package/dist-cli/chunks/{agent-wrapper-PMYCB2KO.js → agent-wrapper-Y3PQAL6I.js} +2 -2
  32. package/dist-cli/chunks/{app-fonts-LULQGFY7.js → app-fonts-MDD3W4VN.js} +2 -2
  33. package/dist-cli/chunks/{assert-WGNCD4ZU.js → assert-BSRQBRH7.js} +3 -3
  34. package/dist-cli/chunks/{auth-G7CCHH3M.js → auth-SLPHDPCF.js} +2 -2
  35. package/dist-cli/chunks/{beta-N4LXL5TO.js → beta-R4IZ5SWO.js} +2 -2
  36. package/dist-cli/chunks/box-2NQYYY3B.js +1709 -0
  37. package/dist-cli/chunks/{camera-4JHCYBQS.js → camera-ER66WWAX.js} +2 -2
  38. package/dist-cli/chunks/chunk-2YK5J2D2.js +24 -0
  39. package/dist-cli/chunks/{chunk-I6KIM6PN.js → chunk-3MPFC3DS.js} +1 -1
  40. package/dist-cli/chunks/{chunk-77ZHQJZR.js → chunk-3S2J6IVC.js} +2 -2
  41. package/dist-cli/chunks/chunk-3XMEIZEV.js +4 -0
  42. package/dist-cli/chunks/chunk-42TLK75A.js +497 -0
  43. package/dist-cli/chunks/{chunk-OW5XHAA4.js → chunk-4FLQYRGN.js} +1 -1
  44. package/dist-cli/chunks/{chunk-EFR5DVNP.js → chunk-4VA2ISWX.js} +1 -1
  45. package/dist-cli/chunks/chunk-57LITN73.js +7 -0
  46. package/dist-cli/chunks/{chunk-EQK5MJCU.js → chunk-7B22IPSC.js} +2 -2
  47. package/dist-cli/chunks/{chunk-EGAGZHO6.js → chunk-7V3S2DY2.js} +1 -1
  48. package/dist-cli/chunks/{chunk-IZKHOM37.js → chunk-AUPJX4KI.js} +1 -1
  49. package/dist-cli/chunks/{chunk-2S7BKUP2.js → chunk-BWJOLJOK.js} +2 -2
  50. package/dist-cli/chunks/{chunk-CN6XYYEA.js → chunk-CKNNO6ZG.js} +27 -27
  51. package/dist-cli/chunks/{chunk-MGDSJZ37.js → chunk-DJSPNOF6.js} +2 -2
  52. package/dist-cli/chunks/{chunk-YXXKSL6R.js → chunk-E6XYIIJK.js} +1 -1
  53. package/dist-cli/chunks/{chunk-ONORMKWX.js → chunk-ECXDCED5.js} +2 -2
  54. package/dist-cli/chunks/chunk-EHA65UVJ.js +5 -0
  55. package/dist-cli/chunks/chunk-ESVUVW3R.js +32 -0
  56. package/dist-cli/chunks/{chunk-XJU2QIRY.js → chunk-FDAFSRQE.js} +2 -2
  57. package/dist-cli/chunks/{chunk-NM2L2QV4.js → chunk-FSPZY4AI.js} +2 -2
  58. package/dist-cli/chunks/chunk-FVODUDPS.js +4 -0
  59. package/dist-cli/chunks/{chunk-H23KWIKA.js → chunk-GFWUIGGY.js} +2 -2
  60. package/dist-cli/chunks/{chunk-CTG7HBCA.js → chunk-GS5VUDCF.js} +1 -1
  61. package/dist-cli/chunks/{chunk-ORWP2E7R.js → chunk-GXHCJRKE.js} +2 -2
  62. package/dist-cli/chunks/{chunk-TTASWLKM.js → chunk-HKQXGCQT.js} +1 -1
  63. package/dist-cli/chunks/{chunk-5OK3LCEJ.js → chunk-IXRVFQMT.js} +2 -2
  64. package/dist-cli/chunks/{chunk-TIAEYO6I.js → chunk-JFGW75UL.js} +2 -2
  65. package/dist-cli/chunks/{chunk-RYIMSKDO.js → chunk-JHYXRORU.js} +2 -2
  66. package/dist-cli/chunks/chunk-LAKWOJ5Y.js +5 -0
  67. package/dist-cli/chunks/{chunk-GAJQSITE.js → chunk-LPAOOJIW.js} +1 -1
  68. package/dist-cli/chunks/chunk-M7COA4BE.js +312 -0
  69. package/dist-cli/chunks/{chunk-6PL2CCGP.js → chunk-MCO7V4VN.js} +2 -2
  70. package/dist-cli/chunks/{chunk-YGMEDJKJ.js → chunk-MGOAQHMO.js} +2 -2
  71. package/dist-cli/chunks/chunk-NERY6HGZ.js +4 -0
  72. package/dist-cli/chunks/chunk-NGWUGNPV.js +4 -0
  73. package/dist-cli/chunks/{chunk-ZMJ75EDG.js → chunk-NPSPWMBO.js} +2 -2
  74. package/dist-cli/chunks/{chunk-2UXU53MG.js → chunk-OXCDE3DD.js} +1 -1
  75. package/dist-cli/chunks/{chunk-ZLVRYXZ7.js → chunk-OZJMWTGA.js} +1 -1
  76. package/dist-cli/chunks/{chunk-HT6GFZOZ.js → chunk-PNBQBBG5.js} +1 -1
  77. package/dist-cli/chunks/{chunk-JHXETDVC.js → chunk-Q65KH25G.js} +1 -1
  78. package/dist-cli/chunks/{chunk-NQFJOCSF.js → chunk-QKOY7UW5.js} +2 -2
  79. package/dist-cli/chunks/{chunk-5DAIA77C.js → chunk-QMVBWZH2.js} +2 -2
  80. package/dist-cli/chunks/chunk-RRALQ4WM.js +38 -0
  81. package/dist-cli/chunks/{chunk-GXAB52K7.js → chunk-SHMLYTNH.js} +2 -2
  82. package/dist-cli/chunks/chunk-SSUPPM6K.js +130 -0
  83. package/dist-cli/chunks/chunk-T2MGLXY5.js +27 -0
  84. package/dist-cli/chunks/{chunk-ZJIS3CTW.js → chunk-T4ZZ26A2.js} +2 -2
  85. package/dist-cli/chunks/{chunk-YCCCPFWT.js → chunk-TC6DNQL6.js} +2 -2
  86. package/dist-cli/chunks/chunk-TE645QCO.js +423 -0
  87. package/dist-cli/chunks/{chunk-UCHW7ZHR.js → chunk-TOE5O6JE.js} +2 -2
  88. package/dist-cli/chunks/{chunk-N3UC7HIX.js → chunk-TPIPKXJL.js} +1 -1
  89. package/dist-cli/chunks/chunk-UBH2BWCY.js +4 -0
  90. package/dist-cli/chunks/{chunk-AFV32WZT.js → chunk-UXROQPIN.js} +3 -3
  91. package/dist-cli/chunks/{chunk-SA6XVI55.js → chunk-WF2CRNYF.js} +1 -1
  92. package/dist-cli/chunks/chunk-WFAFAGMG.js +4 -0
  93. package/dist-cli/chunks/{chunk-A5FXX5PJ.js → chunk-WJQB6AXZ.js} +1 -1
  94. package/dist-cli/chunks/{chunk-5NMCF5VF.js → chunk-WVVAYLWZ.js} +1 -1
  95. package/dist-cli/chunks/chunk-WXRDFUR7.js +4 -0
  96. package/dist-cli/chunks/{chunk-M3BNCF7E.js → chunk-X5MXQB3L.js} +2 -2
  97. package/dist-cli/chunks/{chunk-LN3RNW6X.js → chunk-YSHJ3LMQ.js} +2 -2
  98. package/dist-cli/chunks/{chunk-34IQM22N.js → chunk-YYPTSF6W.js} +15 -15
  99. package/dist-cli/chunks/{cleanup-KRIATKFH.js → cleanup-WHGLBAJ2.js} +2 -2
  100. package/dist-cli/chunks/cli-version-DMXIXBIM.js +4 -0
  101. package/dist-cli/chunks/{compat-6PTQ3QEA.js → compat-MGBKGYGQ.js} +2 -2
  102. package/dist-cli/chunks/{config-ETGDUANO.js → config-TRDOMP4T.js} +2 -2
  103. package/dist-cli/chunks/connect-N4FV3DDV.js +4 -0
  104. package/dist-cli/chunks/control-5GRBZVYK.js +4 -0
  105. package/dist-cli/chunks/daemon-MBT5E3ZC.js +4 -0
  106. package/dist-cli/chunks/{debug-WIIB6ZKC.js → debug-AHEK43AJ.js} +3 -3
  107. package/dist-cli/chunks/{desktop-TD7Q5LNB.js → desktop-LDRIXOVV.js} +3 -3
  108. package/dist-cli/chunks/{detox-7GNR33VM.js → detox-6HAKYISO.js} +2 -2
  109. package/dist-cli/chunks/{device-QOR3PGUF.js → device-QM3S7OVU.js} +2 -2
  110. package/dist-cli/chunks/{diagnose-RRCBLP6E.js → diagnose-WDP3CVIX.js} +2 -2
  111. package/dist-cli/chunks/{disk-cleanup-MJUGJPXT.js → disk-cleanup-JRT5MKFW.js} +2 -2
  112. package/dist-cli/chunks/do-chain-7FDMO56C.js +5 -0
  113. package/dist-cli/chunks/drivers-AJL2EVXH.js +4 -0
  114. package/dist-cli/chunks/env-YIBOMB24.js +4 -0
  115. package/dist-cli/chunks/{film-D7Y64LID.js → film-R3EQADMG.js} +3 -3
  116. package/dist-cli/chunks/flow-BDAA6BWL.js +4 -0
  117. package/dist-cli/chunks/help-5EJD6LJF.js +4 -0
  118. package/dist-cli/chunks/{hidden-runtime-alias-JGURVR2Z.js → hidden-runtime-alias-6M4UERRQ.js} +2 -2
  119. package/dist-cli/chunks/{home-paths-4ICFIGXO.js → home-paths-QJNOHZJO.js} +2 -2
  120. package/dist-cli/chunks/inspect-S3LR3R2A.js +4 -0
  121. package/dist-cli/chunks/install-desktop-GXE6K7BJ.js +4 -0
  122. package/dist-cli/chunks/{login-RU33QR2G.js → login-ISWDW4WU.js} +2 -2
  123. package/dist-cli/chunks/{logout-2IUG3Y5J.js → logout-VNJX2IEW.js} +2 -2
  124. package/dist-cli/chunks/{maestro-2MXTGG7I.js → maestro-SQS2OS2D.js} +3 -3
  125. package/dist-cli/chunks/{maestro-generate-2PYIFGLR.js → maestro-generate-GWVPISG5.js} +5 -5
  126. package/dist-cli/chunks/{mode-3DAPG3HF.js → mode-3URDGBZB.js} +2 -2
  127. package/dist-cli/chunks/{optional-demo-registry-BWSDJF2Z.js → optional-demo-registry-L3LRBQHG.js} +2 -2
  128. package/dist-cli/chunks/{perf-2TKPWB4N.js → perf-XLPC4UKR.js} +2 -2
  129. package/dist-cli/chunks/{permissions-5CSMHYNA.js → permissions-QRHWVMDP.js} +2 -2
  130. package/dist-cli/chunks/platform-F47URZNB.js +6 -0
  131. package/dist-cli/chunks/privacy-BF23T67T.js +4 -0
  132. package/dist-cli/chunks/{record-I2HJCFP3.js → record-2DN3OUE5.js} +3 -3
  133. package/dist-cli/chunks/{report-issue-A4FZWBOC.js → report-issue-D3BQPSLU.js} +2 -2
  134. package/dist-cli/chunks/reset-T5CNZ7D3.js +4 -0
  135. package/dist-cli/chunks/resolve-target-KAAS274S.js +4 -0
  136. package/dist-cli/chunks/runtime-AQJDBR3X.js +4 -0
  137. package/dist-cli/chunks/{screenshot-command-UFW5BFHP.js → screenshot-command-RK7IJHVK.js} +3 -3
  138. package/dist-cli/chunks/{screenshot-layers-5BIAL4YN.js → screenshot-layers-DP2QKSMN.js} +2 -2
  139. package/dist-cli/chunks/{screenshots-capture-EHYS3BV2.js → screenshots-capture-MA7P3FUT.js} +2 -2
  140. package/dist-cli/chunks/{serve-O4FDM3AC.js → serve-UBXNGLNP.js} +3 -3
  141. package/dist-cli/chunks/setup-GH7OW4GC.js +4 -0
  142. package/dist-cli/chunks/sim-client-VTKFEDJX.js +4 -0
  143. package/dist-cli/chunks/{skills-ZK55SY32.js → skills-HPK25R4B.js} +2 -2
  144. package/dist-cli/chunks/state-273XJPUE.js +14 -0
  145. package/dist-cli/chunks/{storage-WP33ISEM.js → storage-RTDFWIY7.js} +2 -2
  146. package/dist-cli/chunks/store-DLKNNM4L.js +4 -0
  147. package/dist-cli/chunks/telemetry-7CWDXEOO.js +4 -0
  148. package/dist-cli/chunks/{timeline-DKGW5S4I.js → timeline-IF2PGK7C.js} +2 -2
  149. package/dist-cli/chunks/{upgrade-LL7G4B7G.js → upgrade-R74NVHKG.js} +2 -2
  150. package/dist-cli/chunks/upload-3JFFVCZ4.js +4 -0
  151. package/dist-cli/chunks/{version-YLWR5G4F.js → version-RTFCYQZ7.js} +2 -2
  152. package/dist-cli/chunks/{web-QELZ4CP6.js → web-35SSKBRU.js} +2 -2
  153. package/dist-cli/chunks/welcome-N5V352SE.js +5 -0
  154. package/dist-cli/chunks/{what-happened-MIOMZWM5.js → what-happened-WXTP6EPR.js} +2 -2
  155. package/dist-cli/chunks/ws-bridge-JXQUAWFA.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,303 @@
1
+ /*! rnx v0.1.368 | (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.368 | (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
+ });
@@ -0,0 +1,19 @@
1
+ /*! rnx v0.1.368 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+
3
+ // src/bridge-contract.ts
4
+ var SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
5
+ var SEMANTIC_READY_NODE_STABLE_MS = 750;
6
+ var SEMANTIC_READY_POLL_MS = 150;
7
+ function readyProbeHasContent(probe) {
8
+ return probe.liveFrameActive || probe.targets > 0 || probe.nodes >= SEMANTIC_READY_CONTENT_NODE_FLOOR;
9
+ }
10
+ function readyProbeHasTargetContent(probe) {
11
+ return probe.liveFrameActive || probe.targets > 0;
12
+ }
13
+ export {
14
+ SEMANTIC_READY_CONTENT_NODE_FLOOR,
15
+ SEMANTIC_READY_NODE_STABLE_MS,
16
+ SEMANTIC_READY_POLL_MS,
17
+ readyProbeHasContent,
18
+ readyProbeHasTargetContent
19
+ };
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.368 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.368 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.368 | (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 __create = Object.create;
@@ -1958,27 +1958,41 @@ async function captureSootsimPngFast(opts) {
1958
1958
  }
1959
1959
  return decodePngDataUrl(dataUrl);
1960
1960
  }
1961
+ async function setSootsimCursorCaptureActive(page, active) {
1962
+ await page.evaluate(async (captureActive) => {
1963
+ const bridge = window.__sootsimTest;
1964
+ if (typeof bridge?.setCursorCaptureActive !== "function") {
1965
+ throw new Error("sootsim cursor capture control is not installed");
1966
+ }
1967
+ await bridge.setCursorCaptureActive(captureActive);
1968
+ }, active);
1969
+ }
1961
1970
  async function captureSootsimPng(opts) {
1962
1971
  const page = getPage();
1963
- const deadline = Date.now() + 8e3;
1964
- let previous = null;
1965
- let identicalFrames = 1;
1966
- let attempts = 0;
1967
- while (Date.now() < deadline) {
1968
- await waitForSootsimIdle(page, Math.max(1, deadline - Date.now()), true);
1969
- const current = await captureSootsimPngFast(opts);
1970
- attempts++;
1971
- if ((0, import_proof_frame.framesIdentical)(previous, current)) {
1972
- identicalFrames++;
1973
- if (identicalFrames >= import_proof_frame.REQUIRED_IDENTICAL_PROOF_FRAMES) return current;
1974
- } else {
1975
- identicalFrames = 1;
1972
+ await setSootsimCursorCaptureActive(page, true);
1973
+ try {
1974
+ const deadline = Date.now() + 8e3;
1975
+ let previous = null;
1976
+ let identicalFrames = 1;
1977
+ let attempts = 0;
1978
+ while (Date.now() < deadline) {
1979
+ await waitForSootsimIdle(page, Math.max(1, deadline - Date.now()), true);
1980
+ const current = await captureSootsimPngFast(opts);
1981
+ attempts++;
1982
+ if ((0, import_proof_frame.framesIdentical)(previous, current)) {
1983
+ identicalFrames++;
1984
+ if (identicalFrames >= import_proof_frame.REQUIRED_IDENTICAL_PROOF_FRAMES) return current;
1985
+ } else {
1986
+ identicalFrames = 1;
1987
+ }
1988
+ previous = current;
1976
1989
  }
1977
- previous = current;
1990
+ throw new Error(
1991
+ `sootsim screenshot did not reach ${import_proof_frame.REQUIRED_IDENTICAL_PROOF_FRAMES} identical idle frames in ${attempts} captures`
1992
+ );
1993
+ } finally {
1994
+ await setSootsimCursorCaptureActive(page, false);
1978
1995
  }
1979
- throw new Error(
1980
- `sootsim screenshot did not reach ${import_proof_frame.REQUIRED_IDENTICAL_PROOF_FRAMES} identical idle frames in ${attempts} captures`
1981
- );
1982
1996
  }
1983
1997
  async function writeSootsimScreenshot(name, opts) {
1984
1998
  ensureScreenshotDir();
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.368 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.368 | (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 __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.368 | (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 __create = Object.create;
@@ -5955,6 +5955,10 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
5955
5955
  return msg?.action === "type" ? "typed text" : "used keyboard";
5956
5956
  case "tree":
5957
5957
  return "dumped tree";
5958
+ case "query":
5959
+ return "queried semantic tree";
5960
+ case "resolve":
5961
+ return "resolved semantic selector";
5958
5962
  case "focus":
5959
5963
  return "focused sim";
5960
5964
  case "close":
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.368 | (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 __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.368 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.368 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/host/fetch-proxy-overrides.ts
4
4
  var FETCH_PROXY_BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.368 | (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 __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.368 | (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;