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,4 @@
1
+ /*! rnx v0.1.368 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c,d}from"./chunk-TC6DNQL6.js";import"./chunk-IXRVFQMT.js";import"./chunk-TPIPKXJL.js";import"./chunk-AUPJX4KI.js";import"./chunk-E6XYIIJK.js";import"./chunk-Q65KH25G.js";export{a as buildCliDiagnosticEvent,d as flushCliTelemetry,b as trackCliDiagnostic,c as trackCliError};
@@ -1,7 +1,7 @@
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
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{q as m,s as d,v as i}from"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-YXXKSL6R.js";import"./chunk-JHXETDVC.js";import{writeFileSync as g}from"fs";function u(){console.log(`
4
+ import{t as m,v as d,y as i}from"./chunk-T2MGLXY5.js";import"./chunk-LPAOOJIW.js";import"./chunk-E6XYIIJK.js";import"./chunk-Q65KH25G.js";import{writeFileSync as g}from"fs";function u(){console.log(`
5
5
  rnx timeline \u2014 control the semantic event timeline
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
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
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as h,b as v,c as $}from"./chunk-AFV32WZT.js";import{b as p}from"./chunk-6PL2CCGP.js";import"./chunk-HT6GFZOZ.js";import"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import{b as g}from"./chunk-77ZHQJZR.js";import{M as a,g as m,h as u,l as d}from"./chunk-YXXKSL6R.js";import{a as f}from"./chunk-ONORMKWX.js";import"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.js";import{spawn as y}from"node:child_process";import x from"node:fs";import R from"node:os";import s from"node:path";var b="https://registry.npmjs.org/rnxsim/latest";async function W(t){let n=t.indexOf("--channel"),e=n>=0&&t[n+1]?t[n+1]:void 0;console.log(`rnx upgrade
4
+ import{a as h,b as v,c as $}from"./chunk-UXROQPIN.js";import{b as p}from"./chunk-MCO7V4VN.js";import"./chunk-PNBQBBG5.js";import"./chunk-T2MGLXY5.js";import"./chunk-LPAOOJIW.js";import{b as g}from"./chunk-3S2J6IVC.js";import{M as a,g as m,h as u,l as d}from"./chunk-E6XYIIJK.js";import{a as f}from"./chunk-ECXDCED5.js";import"./chunk-WVVAYLWZ.js";import"./chunk-Q65KH25G.js";import{spawn as y}from"node:child_process";import x from"node:fs";import R from"node:os";import s from"node:path";var b="https://registry.npmjs.org/rnxsim/latest";async function W(t){let n=t.indexOf("--channel"),e=n>=0&&t[n+1]?t[n+1]:void 0;console.log(`rnx upgrade
5
5
  `),console.log("runtime:");let o=a(),{config:l}=await p(),r=l?.runtimeVersion,c=r?x.existsSync(s.join(d(r),"index.html")):!1;r&&console.log(` project config: v${r}`);let i=(r&&c?null:await $(["install",...r?[r,"--set-active=false"]:[],...e?["--channel",e]:[]],{}))?.version??r??a();i&&console.log(r?c?` result: v${i} already installed for this project`:` result: not installed \u2192 v${i} for this project`:o&&o!==i?` result: v${o} \u2192 v${i}`:o?` result: v${i} already current`:` result: not installed \u2192 v${i}`);let k=i?await h(i):null;console.log(`
6
6
  cli:`),await j(),i&&console.log(`
7
7
  ${v(i,k)}`)}function w(){if(u())return{kind:"dev"};let t=process.argv[1]??"";try{t=x.realpathSync(t)}catch{}let n=s.sep;if(t.includes(`${n}_npx${n}`)||t.includes(`${n}.bunx${n}`))return{kind:"npx"};if(t.includes(`${n}.bun${n}`))return{kind:"global",command:"bun",args:["add","-g","rnxsim@latest"]};if(t.includes(`${n}pnpm${n}`))return{kind:"global",command:"pnpm",args:["add","-g","rnxsim@latest"]};let e=s.join(m(),"cli");if(t.startsWith(`${e}${n}`))return{kind:"global",command:"npm",args:["i","-g","--prefix",e,"rnxsim@latest"]};let o=s.resolve(process.env.SOOTSIM_CLI_PREFIX||s.join(R.homedir(),".local"));return t.startsWith(`${o}${n}`)?{kind:"global",command:"npm",args:["i","-g","--prefix",o,"rnxsim@latest"]}:{kind:"global",command:"npm",args:["i","-g","rnxsim@latest"]}}async function j(){let t=f(),n=await C();if(!n){console.log(` v${t} \u2014 couldn't reach the npm registry, skipped`);return}if(g(n,t)<=0){console.log(` v${t} (latest)`);return}let e=w();if(console.log(` v${t} \u2192 v${n}`),e.kind==="dev"){console.log(" running from the Contrast dev checkout \u2014 pull instead of upgrading");return}if(e.kind==="npx"){console.log(" running from the npx cache \u2014 get the latest with:"),console.log(" npx rnxsim@latest");return}let o=`${e.command} ${e.args.join(" ")}`;console.log(` updating global install (${o})\u2026`),await S(e.command,e.args)?console.log(` updated to v${n}`):(console.log(" update failed \u2014 run it yourself:"),console.log(` ${o}`))}function S(t,n){return new Promise(e=>{let o=y(t,n,{stdio:"inherit"});o.on("error",()=>e(!1)),o.on("exit",l=>e(l===0))})}async function C(){try{let t=await fetch(b,{headers:{accept:"application/json"},signal:AbortSignal.timeout(8e3)});if(!t.ok)return null;let n=await t.json();return typeof n.version=="string"&&n.version?n.version:null}catch{return null}}export{W as runUpgrade};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.368 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{e as a,f as b,g as c}from"./chunk-YYPTSF6W.js";import"./chunk-SHMLYTNH.js";import"./chunk-TOE5O6JE.js";import"./chunk-GXHCJRKE.js";import"./chunk-7B22IPSC.js";import"./chunk-WF2CRNYF.js";import"./chunk-PNBQBBG5.js";import"./chunk-T2MGLXY5.js";import"./chunk-LPAOOJIW.js";import"./chunk-E6XYIIJK.js";import"./chunk-WVVAYLWZ.js";import"./chunk-Q65KH25G.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};
@@ -1,6 +1,6 @@
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
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as a}from"./chunk-6PL2CCGP.js";import"./chunk-HT6GFZOZ.js";import{a as m}from"./chunk-ZFM24DOX.js";import"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import{d as s,f as t}from"./chunk-77ZHQJZR.js";import{l as r}from"./chunk-YXXKSL6R.js";import{a as l}from"./chunk-ONORMKWX.js";import"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.js";import g from"node:fs";import d from"node:path";async function R($){let{IS_BETA:c,BETA_LABEL:u}=await import("./beta-N4LXL5TO.js"),f=c?` \xB7 ${u}`:"";console.log(`rnx v${l()}${f}`);let o=m(),n=t.resolveChannel();o.isDevBridge?(console.log(o.primary),o.installedRuntime&&console.log(`${o.installedRuntime} \xB7 ${n}`)):o.primary==="runtime not installed"?console.log("runtime not installed \u2014 run `rnx runtime install`"):console.log(`${o.primary} \xB7 ${n}`);let{config:e}=await a();if(e?.runtimeVersion){let p=g.existsSync(d.join(r(e.runtimeVersion),"index.html"));console.log(`project runtime v${e.runtimeVersion} \xB7 configured \xB7 ${p?"installed":"installs on open"}`)}let i=await t.checkUpToDate({channel:n});i.outdated&&i.latest&&console.log(`
4
+ import{b as a}from"./chunk-MCO7V4VN.js";import"./chunk-PNBQBBG5.js";import{a as m}from"./chunk-WXRDFUR7.js";import"./chunk-T2MGLXY5.js";import"./chunk-LPAOOJIW.js";import{d as s,f as t}from"./chunk-3S2J6IVC.js";import{l as r}from"./chunk-E6XYIIJK.js";import{a as l}from"./chunk-ECXDCED5.js";import"./chunk-WVVAYLWZ.js";import"./chunk-Q65KH25G.js";import g from"node:fs";import d from"node:path";async function R($){let{IS_BETA:c,BETA_LABEL:u}=await import("./beta-R4IZ5SWO.js"),f=c?` \xB7 ${u}`:"";console.log(`rnx v${l()}${f}`);let o=m(),n=t.resolveChannel();o.isDevBridge?(console.log(o.primary),o.installedRuntime&&console.log(`${o.installedRuntime} \xB7 ${n}`)):o.primary==="runtime not installed"?console.log("runtime not installed \u2014 run `rnx runtime install`"):console.log(`${o.primary} \xB7 ${n}`);let{config:e}=await a();if(e?.runtimeVersion){let p=g.existsSync(d.join(r(e.runtimeVersion),"index.html"));console.log(`project runtime v${e.runtimeVersion} \xB7 configured \xB7 ${p?"installed":"installs on open"}`)}let i=await t.checkUpToDate({channel:n});i.outdated&&i.latest&&console.log(`
5
5
  \u2191 default runtime v${i.latest} available; run \`rnx upgrade\``),console.log(`
6
6
  what's new: ${s}`)}export{R as runVersion};
@@ -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
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a,b,c,d,e,f,g,h,i,j}from"./chunk-YGMEDJKJ.js";import"./chunk-JHXETDVC.js";export{b as COMPAT_CATEGORIES,j as COMPAT_RESULT_CAVEAT,c as POLYFILL_REGISTRY,a as UNSUPPORTABLE,f as countScanResults,i as formatDetailedScanLines,h as formatPackageStatus,g as formatScanCounts,d as scanDeps,e as scanDepsWithData};
4
+ import{a,b,c,d,e,f,g,h,i,j}from"./chunk-MGOAQHMO.js";import"./chunk-Q65KH25G.js";export{b as COMPAT_CATEGORIES,j as COMPAT_RESULT_CAVEAT,c as POLYFILL_REGISTRY,a as UNSUPPORTABLE,f as countScanResults,i as formatDetailedScanLines,h as formatPackageStatus,g as formatScanCounts,d as scanDeps,e as scanDepsWithData};
@@ -0,0 +1,5 @@
1
+ /*! rnx v0.1.368 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a as t}from"./chunk-ESVUVW3R.js";import"./chunk-NERY6HGZ.js";import"./chunk-2YK5J2D2.js";import{q as e}from"./chunk-57LITN73.js";import"./chunk-JHYXRORU.js";import"./chunk-7V3S2DY2.js";import"./chunk-QMVBWZH2.js";import"./chunk-QKOY7UW5.js";import"./chunk-GXHCJRKE.js";import"./chunk-7B22IPSC.js";import"./chunk-3MPFC3DS.js";import"./chunk-RRALQ4WM.js";import"./chunk-3XMEIZEV.js";import"./chunk-M7COA4BE.js";import"./chunk-WFAFAGMG.js";import"./chunk-WF2CRNYF.js";import"./chunk-MCO7V4VN.js";import"./chunk-PNBQBBG5.js";import"./chunk-YSHJ3LMQ.js";import"./chunk-BWJOLJOK.js";import"./chunk-WXRDFUR7.js";import"./chunk-FSPZY4AI.js";import"./chunk-4VA2ISWX.js";import"./chunk-LAKWOJ5Y.js";import"./chunk-EHA65UVJ.js";import"./chunk-T2MGLXY5.js";import"./chunk-LPAOOJIW.js";import"./chunk-SSUPPM6K.js";import"./chunk-HKQXGCQT.js";import"./chunk-3S2J6IVC.js";import"./chunk-TC6DNQL6.js";import{a as r}from"./chunk-IXRVFQMT.js";import{f as o}from"./chunk-TPIPKXJL.js";import"./chunk-AUPJX4KI.js";import{C as n}from"./chunk-E6XYIIJK.js";import"./chunk-ECXDCED5.js";import"./chunk-WVVAYLWZ.js";import"./chunk-Q65KH25G.js";async function u(){return!n()&&r()?(await t([],{launchConnectRN:!0}),0):(o("Run any React Native app in a local simulator."),console.log(`
5
+ Opening ConnectRN`),await e(["ConnectRN","--no-describe","--quiet"]),0)}export{u as runWelcome};
@@ -1,7 +1,7 @@
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
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{D as F,E as T,G as y,R as A,S as b,T as S}from"./chunk-DW37EVX5.js";import{e as k,q as x,s as N}from"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-YXXKSL6R.js";import"./chunk-JHXETDVC.js";function O(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--since"&&e+1<n.length){t.push(e,e+1);let s=n[e+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let c=Number(l[1]),u=l[2]??"ms",v=u==="s"?c*1e3:u==="m"?c*6e4:c;return{since:Date.now()-v,consumed:t}}let i=Number(s);if(Number.isFinite(i)&&i>1e12)return{since:i,consumed:t}}return{consumed:t}}function B(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--kinds"&&e+1<n.length)return t.push(e,e+1),{kinds:n[e+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:t};return{consumed:t}}function D(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--limit"&&e+1<n.length){t.push(e,e+1);let s=Number(n[e+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:t}}return{consumed:t}}function _(n){let t=[],e={label:"initial state",events:[],startedAt:n[0]?.t??null};t.push(e);for(let s of n)if(e.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,i=l?.phase;if(!i||i==="enter"||i==="appear"||i==="active"){let c=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;t.length===1&&e.events.length===1?e.label=`${s.kind}: ${c}`:(e={label:`${s.kind}: ${c}`,events:[],startedAt:s.t},t.push(e))}}return t}async function J(n,t){let e=x(n,{port:t.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow","--noisy"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
4
+ import{A as F,B as T,D as y,O as A,P as b,Q as S}from"./chunk-M7COA4BE.js";import{e as k,t as x,v as N}from"./chunk-T2MGLXY5.js";import"./chunk-LPAOOJIW.js";import"./chunk-E6XYIIJK.js";import"./chunk-Q65KH25G.js";function O(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--since"&&e+1<n.length){t.push(e,e+1);let s=n[e+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let c=Number(l[1]),u=l[2]??"ms",v=u==="s"?c*1e3:u==="m"?c*6e4:c;return{since:Date.now()-v,consumed:t}}let i=Number(s);if(Number.isFinite(i)&&i>1e12)return{since:i,consumed:t}}return{consumed:t}}function B(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--kinds"&&e+1<n.length)return t.push(e,e+1),{kinds:n[e+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:t};return{consumed:t}}function D(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--limit"&&e+1<n.length){t.push(e,e+1);let s=Number(n[e+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:t}}return{consumed:t}}function _(n){let t=[],e={label:"initial state",events:[],startedAt:n[0]?.t??null};t.push(e);for(let s of n)if(e.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,i=l?.phase;if(!i||i==="enter"||i==="appear"||i==="active"){let c=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;t.length===1&&e.events.length===1?e.label=`${s.kind}: ${c}`:(e={label:`${s.kind}: ${c}`,events:[],startedAt:s.t},t.push(e))}}return t}async function J(n,t){let e=x(n,{port:t.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow","--noisy"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
5
5
  rnx what-happened \u2014 show recent events from the semantic timeline
6
6
 
7
7
  usage:
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.368 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{k as a,l as b,m as c,n as d,o as e,p as f,q as g,r as h,s as i,t as j,u as k,v as l,w as m,x as n,y as o,z as p}from"./chunk-T2MGLXY5.js";import"./chunk-LPAOOJIW.js";import"./chunk-E6XYIIJK.js";import"./chunk-Q65KH25G.js";export{i as BridgeSimLockedError,a as RNX_PLACEMENT_ENV,f as bridgePortForShellBaseUrl,c as bridgeWsUrl,o as callInBridge,p as callInBridgeWrite,m as checkSimHealth,k as createBridge,l as createBridgeFromParsed,n as evalInBridge,j as parseBridgeCliArgs,h as printBridgeWorldNotice,d as resolveBridgeWorld,g as resolveDefaultBridgePort,b as resolvePlacement,e as worldForBridgePort};
@@ -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
  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;
@@ -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;
package/dist-lib/beta.cjs CHANGED
@@ -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;
package/dist-lib/beta.mjs CHANGED
@@ -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/beta.ts
4
4
  var IS_BETA = true;
@@ -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;
@@ -0,0 +1,336 @@
1
+ /*! rnx v0.1.368 | (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
+ });