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,423 @@
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
+ async function p({bridge:t,simId:a,maxMs:n,pollMs:s=50,stablePolls:o=3,strict:i=!1}){let c=await t.send({type:"evaluate",simId:a,code:`(async () => {
5
+ const start = Date.now()
6
+ const deadline = start + ${Math.max(0,Math.round(n))}
7
+ const pollMs = ${Math.max(1,Math.round(s))}
8
+ const requiredStablePolls = ${Math.max(1,Math.round(o))}
9
+ const strict = ${i?"true":"false"}
10
+ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
11
+
12
+ // route-aware settle: a tap that pushes/pops a screen is async \u2014 the
13
+ // old screen still renders for a moment, then the new one mounts and
14
+ // its content loads. a pure layout-hash check reports "idle" on the
15
+ // outgoing screen or on the incoming skeleton, so a driver re-taps
16
+ // and stacks duplicate navigations. drain any in-flight screen
17
+ // transition FIRST, bounded by the overall budget. when no
18
+ // transition is happening this returns in ~80ms (startWindowMs), so
19
+ // a plain button tap barely pays for it.
20
+ try {
21
+ const wfst = window.__sootsimTest?.waitForScreenTransitions
22
+ if (typeof wfst === 'function') {
23
+ const remaining = deadline - Date.now()
24
+ if (remaining > 120) {
25
+ await wfst({
26
+ timeoutMs: Math.min(remaining - 80, 4000),
27
+ settleMs: 64,
28
+ startWindowMs: 80,
29
+ })
30
+ }
31
+ }
32
+ } catch {}
33
+
34
+ const readSnapshot = async () => {
35
+ let animating = false
36
+ let layoutDirty = false
37
+ let pendingFetches = 0
38
+ let requestTotal = 0
39
+ let requestInFlight = 0
40
+ let renderStatsAvailable = false
41
+ try {
42
+ const stats = await window.__sootsimRenderHost?.queryStats?.()
43
+ if (stats) {
44
+ renderStatsAvailable = true
45
+ animating =
46
+ stats.hasActiveAnims === true ||
47
+ stats.hasActiveNativeAnimations === true ||
48
+ stats.hasPendingAnimationFrames === true
49
+ layoutDirty =
50
+ stats.layoutDirty === true && stats.renderRequested === true
51
+ // a freshly-pushed screen showing a skeleton is layout-stable
52
+ // but not actually settled \u2014 its data/images are still in
53
+ // flight. treat bounded image-loader fetches as not-idle so
54
+ // settle waits for real content, capped by the budget.
55
+ const pf = stats.memory && stats.memory.imageLoader
56
+ ? stats.memory.imageLoader.pendingFetches
57
+ : 0
58
+ pendingFetches = typeof pf === 'number' ? pf : 0
59
+ }
60
+ } catch {}
61
+ try {
62
+ const counts = await window.__sootsimTest?.getRequestCounts?.()
63
+ requestTotal = typeof counts?.total === 'number' ? counts.total : 0
64
+ requestInFlight = typeof counts?.inFlight === 'number' ? counts.inFlight : 0
65
+ } catch {}
66
+ const root = window.__sootsimRoot
67
+ const nodes = []
68
+ if (root) {
69
+ const walk = (n) => {
70
+ if (n.layout && n.layout.width > 0) {
71
+ nodes.push(Math.round(n.layout.x) + ',' + Math.round(n.layout.y) + ',' + Math.round(n.layout.width))
72
+ }
73
+ for (const c of n.children || []) walk(c)
74
+ }
75
+ walk(root)
76
+ }
77
+ return { layout: nodes.join(';'), animating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
78
+ }
79
+
80
+ // how long generic background network is allowed to keep us waiting AFTER
81
+ // the screen is otherwise visually settled. apps with continuous traffic
82
+ // (polling, realtime sockets, a tap that fires 20-50 fetches) never reach
83
+ // requestInFlight===0 / a stable requestTotal, so requiring full network
84
+ // quiet burns the ENTIRE budget on every command \u2014 the leading idle that
85
+ // failed PR-preview recordings for network-heavy apps (3pc fight-pulse).
86
+ // layout-stability + the image-loader already prove visible content
87
+ // loaded (a data load changes layout; an image load shows in the loader),
88
+ // so the generic request counters are a courtesy, not a gate: honor them
89
+ // only within this grace once the screen is visually still.
90
+ const networkQuietGraceMs = 1200
91
+ let lastLayout = ''
92
+ let lastRequestTotal = -1
93
+ let stable = 0
94
+ let visuallyStillSince = 0
95
+ while (Date.now() < deadline) {
96
+ const snapshot = await readSnapshot()
97
+ const strictOk =
98
+ !strict ||
99
+ (snapshot.renderStatsAvailable && !snapshot.animating && !snapshot.layoutDirty)
100
+ // visually settled: no animations, no image content loading, layout
101
+ // unchanged since the last poll.
102
+ const visuallyStill =
103
+ strictOk && snapshot.pendingFetches === 0 && snapshot.layout === lastLayout
104
+ // generic network quiet: nothing in flight and no new requests issued.
105
+ const networkQuiet =
106
+ snapshot.requestInFlight === 0 && snapshot.requestTotal === lastRequestTotal
107
+ if (visuallyStill) {
108
+ stable++
109
+ if (visuallyStillSince === 0) visuallyStillSince = Date.now()
110
+ // settle once the screen has held still long enough AND either the
111
+ // network is genuinely quiet OR it has refused to quiet within the
112
+ // grace (continuous background traffic must not block forever).
113
+ if (
114
+ stable >= requiredStablePolls &&
115
+ (networkQuiet || Date.now() - visuallyStillSince >= networkQuietGraceMs)
116
+ ) {
117
+ return { settled: true, elapsed: Date.now() - start }
118
+ }
119
+ } else {
120
+ stable = 0
121
+ visuallyStillSince = 0
122
+ }
123
+ lastLayout = snapshot.layout
124
+ lastRequestTotal = snapshot.requestTotal
125
+ await sleep(pollMs)
126
+ }
127
+ return { settled: false, elapsed: Date.now() - start }
128
+ })()`},{timeoutMs:n+1e3}),{elapsed:r,settled:e}=c??{};return{elapsed:typeof r=="number"?r:n,settled:e===!0}}var g=`(() => {
129
+ const spec = window.SootSim?.state?.engineSnapshot?.windowState?.deviceSpec
130
+ return spec && spec.width > 0 && spec.height > 0
131
+ ? { width: spec.width, height: spec.height }
132
+ : null
133
+ })()`,m={initialWaitMs:3e3,deadlineMs:5e3,retryWaitMs:700},b={initialWaitMs:1200,deadlineMs:2500,retryWaitMs:700};function T(t,a={}){return{...t?m:b,...a}}function x(t){return!(!t||t.hit===!1||t.ok===!1||t.requestedTargetMatched===!1||t.pointerTapHandled===!1&&!t.keyboardOpened&&!t.isTextInput)}function I(t,a){return{nodeId:t.target?.nodeId??t.match?.nodeId??t.node?.nodeId??null,id:t.target?.id??t.match?.id??t.node?.id??null,testID:t.target?.testID??t.match?.testID??t.node?.testID??null,text:t.target?.text??t.target?.accessibilityLabel??t.match?.text??t.match?.accessibilityLabel??t.node?.text??a??null,type:t.target?.type??t.match?.type??t.node?.type??null}}async function h(t,a){let n=T(!!a.agent,a.timing),s=0,o=null,i=null;try{await p({bridge:t,maxMs:n.initialWaitMs,pollMs:32,stablePolls:2})}catch{}let c=Date.now()+n.deadlineMs,r=null;for(;Date.now()<=c||s===0;){s++;let e=await a.resolve();if(o=e,e?.error==="bridge-not-ready"||e?.ambiguous||e?.nthOutOfRange)return{payload:e,result:null,attempts:s,failure:"special"};if(e&&typeof e.cx=="number"&&typeof e.cy=="number")if(e.offscreen){i={hit:!1,reason:"offscreen",x:e.cx,y:e.cy,screen:e.screen};let d=`${Math.round(e.cx)},${Math.round(e.cy)}`;if(r===d)return{payload:e,result:i,attempts:s,failure:"missed"};r=d}else{r=null;let d=I(e,a.textFallback),l=await t.send({type:"evaluate",code:`(async () => {
134
+ const t = window.__sootsimTest
135
+ if (
136
+ !t ||
137
+ typeof t.inspectAt !== 'function' ||
138
+ typeof t.resolveTapTarget !== 'function'
139
+ ) {
140
+ return { error: 'tap-target-inspection-unavailable' }
141
+ }
142
+ const requestedTarget = ${JSON.stringify(d)}
143
+ const inspected = await t.inspectAt(${e.cx}, ${e.cy})
144
+ const resolved =
145
+ inspected && typeof inspected.nodeId === 'number'
146
+ ? await t.resolveTapTarget(inspected.nodeId)
147
+ : null
148
+ const node = (resolved && resolved.target) || inspected
149
+ const coordinateTarget = node
150
+ ? {
151
+ nodeId: node.nodeId ?? null,
152
+ id: node.id ?? null,
153
+ testID: node.testID ?? null,
154
+ text: node.text ?? node.accessibilityLabel ?? null,
155
+ type: node.type ?? null,
156
+ }
157
+ : null
158
+ const coordinateAncestors = Array.isArray(inspected?.ancestors)
159
+ ? inspected.ancestors
160
+ : []
161
+ const ancestorMatchesRequested = coordinateAncestors.some(
162
+ (ancestor) =>
163
+ (typeof requestedTarget.nodeId === 'number' &&
164
+ ancestor?.nodeId === requestedTarget.nodeId) ||
165
+ (requestedTarget.testID &&
166
+ ancestor?.testID === requestedTarget.testID) ||
167
+ (requestedTarget.id && ancestor?.id === requestedTarget.id),
168
+ )
169
+ const requestedTargetMatched =
170
+ coordinateTarget === null
171
+ ? false
172
+ : typeof requestedTarget.nodeId === 'number' &&
173
+ typeof coordinateTarget.nodeId === 'number'
174
+ ? requestedTarget.nodeId === coordinateTarget.nodeId ||
175
+ ancestorMatchesRequested
176
+ : requestedTarget.testID && coordinateTarget.testID
177
+ ? requestedTarget.testID === coordinateTarget.testID
178
+ || ancestorMatchesRequested
179
+ : requestedTarget.id && coordinateTarget.id
180
+ ? requestedTarget.id === coordinateTarget.id
181
+ || ancestorMatchesRequested
182
+ : ancestorMatchesRequested
183
+ if (!requestedTargetMatched) {
184
+ return {
185
+ requestedTargetMatched,
186
+ requestedTarget,
187
+ coordinateTarget,
188
+ }
189
+ }
190
+ if (typeof t.activatePressAt !== 'function') {
191
+ return { error: 'tap-target-activation-unavailable' }
192
+ }
193
+ const activation = await t.activatePressAt(
194
+ ${e.cx},
195
+ ${e.cy},
196
+ requestedTarget.nodeId,
197
+ )
198
+ if (activation?.ok) {
199
+ window.dispatchEvent(
200
+ new CustomEvent('sootsim:agentAction', {
201
+ detail: {
202
+ type: 'tap',
203
+ x: ${e.cx},
204
+ y: ${e.cy},
205
+ target: requestedTarget,
206
+ },
207
+ }),
208
+ )
209
+ }
210
+ return {
211
+ activation,
212
+ requestedTargetMatched,
213
+ requestedTarget,
214
+ coordinateTarget,
215
+ }
216
+ })()`});if(l?.error)return{payload:e,result:{hit:!1,reason:l.error,requestedTarget:d},attempts:s,failure:"special"};if(l?.requestedTargetMatched===!1)return{payload:e,result:{hit:!1,reason:"target-covered",...l},attempts:s,failure:"missed"};let y=l?.activation?.tap??l?.activation,f=y&&typeof y=="object"?{...y,...l?.activation,...l}:{hit:!!y,...l};if(i=f,x(f))return{payload:e,result:f,attempts:s}}let u=c-Date.now();if(u<=0)break;try{await p({bridge:t,maxMs:Math.min(u,n.retryWaitMs),pollMs:32,stablePolls:2})}catch{await new Promise(d=>setTimeout(d,Math.min(120,u)))}}return{payload:o,result:i,attempts:s,failure:o&&typeof o.cx=="number"?"missed":"not-found"}}async function F(t,a,n,s){return t.send({type:"tap",x:a,y:n,...s?{target:s}:{}})}async function q(t,a,n={}){let s=JSON.stringify(a);return h(t,{agent:n.agent,timing:n.timing,resolve:()=>t.send({type:"evaluate",code:`(async () => {
217
+ const t = window.__sootsimTest
218
+ if (!t) return null
219
+ const n = (await t.findByTestId(${s})) || (await t.findById(${s}))
220
+ if (!n || !n.absolutePosition || !n.layout) return { cx: null }
221
+ const resolved =
222
+ typeof n.nodeId === 'number' && typeof t.resolveTapTarget === 'function'
223
+ ? await t.resolveTapTarget(n.nodeId)
224
+ : null
225
+ const target = (resolved && resolved.target) || n
226
+ const cx =
227
+ resolved && typeof resolved.cx === 'number'
228
+ ? resolved.cx
229
+ : n.absolutePosition.x + (n.layout.width || 0) / 2
230
+ const cy =
231
+ resolved && typeof resolved.cy === 'number'
232
+ ? resolved.cy
233
+ : n.absolutePosition.y + (n.layout.height || 0) / 2
234
+ const scr = ${g}
235
+ const offscreen =
236
+ !!scr && (cx < 0 || cy < 0 || cx > scr.width || cy > scr.height)
237
+ return {
238
+ cx,
239
+ cy,
240
+ ...(offscreen ? { offscreen: true, screen: scr } : {}),
241
+ match: {
242
+ nodeId: n.nodeId ?? null,
243
+ id: n.id,
244
+ testID: n.testID,
245
+ text: n.text ?? n.accessibilityLabel ?? null,
246
+ type: n.type,
247
+ },
248
+ target: {
249
+ nodeId: target.nodeId ?? null,
250
+ id: target.id,
251
+ testID: target.testID,
252
+ text:
253
+ target.text ??
254
+ target.accessibilityLabel ??
255
+ n.text ??
256
+ n.accessibilityLabel ??
257
+ null,
258
+ type: target.type,
259
+ },
260
+ strategy: (resolved && resolved.strategy) || 'matched-node',
261
+ }
262
+ })()`})})}async function M(t,a,n={},s={}){let o=JSON.stringify({query:a,exact:!!n.exact,role:n.role??null,within:n.within??null,minX:n.minX??null,maxX:n.maxX??null,minY:n.minY??null,maxY:n.maxY??null,near:n.near??null,nth:n.nth??null,first:!!n.first});return h(t,{agent:s.agent,timing:s.timing,textFallback:a,resolve:()=>t.send({type:"evaluate",code:`(async () => {
263
+ const t = window.__sootsimTest
264
+ if (!t) return { error: 'bridge-not-ready' }
265
+ const F = ${o}
266
+
267
+ const res = await t.queryTextCandidates({
268
+ query: F.query,
269
+ exact: !!F.exact,
270
+ ...(F.role ? { role: F.role } : {}),
271
+ })
272
+
273
+ let candidates = res.candidates || []
274
+
275
+ candidates = candidates.filter((c) => {
276
+ const ax = c.info.absolutePosition && c.info.absolutePosition.x
277
+ const ay = c.info.absolutePosition && c.info.absolutePosition.y
278
+ if (F.minX !== null && !(ax >= F.minX)) return false
279
+ if (F.maxX !== null && !(ax <= F.maxX)) return false
280
+ if (F.minY !== null && !(ay >= F.minY)) return false
281
+ if (F.maxY !== null && !(ay <= F.maxY)) return false
282
+ if (F.within && !c.ancestorTestIDs.includes(F.within)) return false
283
+ return true
284
+ })
285
+
286
+ if (F.near) {
287
+ candidates.sort((a, b) => {
288
+ const ax = (a.info.absolutePosition && a.info.absolutePosition.x) || 0
289
+ const ay = (a.info.absolutePosition && a.info.absolutePosition.y) || 0
290
+ const bx = (b.info.absolutePosition && b.info.absolutePosition.x) || 0
291
+ const by = (b.info.absolutePosition && b.info.absolutePosition.y) || 0
292
+ return (
293
+ Math.hypot(ax - F.near.x, ay - F.near.y) -
294
+ Math.hypot(bx - F.near.x, by - F.near.y)
295
+ )
296
+ })
297
+ } else {
298
+ candidates.sort((a, b) => {
299
+ const ay = (a.info.absolutePosition && a.info.absolutePosition.y) || 0
300
+ const by = (b.info.absolutePosition && b.info.absolutePosition.y) || 0
301
+ if (Math.abs(ay - by) > 2) return ay - by
302
+ const ax = (a.info.absolutePosition && a.info.absolutePosition.x) || 0
303
+ const bx = (b.info.absolutePosition && b.info.absolutePosition.x) || 0
304
+ return ax - bx
305
+ })
306
+ }
307
+
308
+ const total = candidates.length
309
+ if (total === 0) return { matched: 0, total: 0 }
310
+
311
+ let idx = 0
312
+ if (F.nth !== null) {
313
+ idx = F.nth < 0 ? total + F.nth : F.nth
314
+ if (idx < 0 || idx >= total) {
315
+ return { matched: 0, total, nthOutOfRange: true, nth: F.nth }
316
+ }
317
+ } else if (total > 1 && !F.first && !F.near) {
318
+ return {
319
+ ambiguous: true,
320
+ total,
321
+ candidates: candidates.slice(0, 10).map((c, i) => ({
322
+ idx: i,
323
+ nodeId: c.info.nodeId,
324
+ type: c.info.type,
325
+ testID: c.info.testID,
326
+ text: (c.info.text || '').slice(0, 60),
327
+ abs: c.info.absolutePosition,
328
+ layout: c.info.layout
329
+ ? {
330
+ width: Math.round(c.info.layout.width || 0),
331
+ height: Math.round(c.info.layout.height || 0),
332
+ }
333
+ : null,
334
+ ancestorTestIDs: (c.ancestorTestIDs || []).slice(0, 5),
335
+ })),
336
+ }
337
+ }
338
+
339
+ const picked = candidates[idx]
340
+ const n = picked.info
341
+ if (!n.absolutePosition || !n.layout) return { matched: 0, total }
342
+
343
+ const resolved =
344
+ typeof n.nodeId === 'number' &&
345
+ typeof t.resolveTapTarget === 'function'
346
+ ? await t.resolveTapTarget(n.nodeId)
347
+ : null
348
+ const target = (resolved && resolved.target) || n
349
+ const cx =
350
+ resolved && typeof resolved.cx === 'number'
351
+ ? resolved.cx
352
+ : n.absolutePosition.x + (n.layout.width || 0) / 2
353
+ const cy =
354
+ resolved && typeof resolved.cy === 'number'
355
+ ? resolved.cy
356
+ : n.absolutePosition.y + (n.layout.height || 0) / 2
357
+ const scr = ${g}
358
+ const offscreen =
359
+ !!scr && (cx < 0 || cy < 0 || cx > scr.width || cy > scr.height)
360
+ return {
361
+ cx,
362
+ cy,
363
+ ...(offscreen ? { offscreen: true, screen: scr } : {}),
364
+ match: {
365
+ nodeId: n.nodeId ?? null,
366
+ id: n.id,
367
+ testID: n.testID,
368
+ type: n.type,
369
+ },
370
+ target: {
371
+ nodeId: target.nodeId ?? null,
372
+ id: target.id,
373
+ testID: target.testID,
374
+ text:
375
+ target.text ??
376
+ target.accessibilityLabel ??
377
+ n.text ??
378
+ n.accessibilityLabel ??
379
+ null,
380
+ type: target.type,
381
+ },
382
+ strategy: (resolved && resolved.strategy) || 'matched-node',
383
+ total,
384
+ idx,
385
+ }
386
+ })()`})})}async function P(t,a,n={}){let s=JSON.stringify(a);return h(t,{agent:n.agent,timing:n.timing,textFallback:a,resolve:async()=>{let o=await t.send({type:"evaluate",code:`(async () => {
387
+ const t = window.__sootsimTest
388
+ if (!t) return { error: 'bridge-not-ready' }
389
+ const byTestId =
390
+ (await t.findByTestId(${s})) || (await t.findById(${s}))
391
+ if (byTestId && byTestId.absolutePosition && byTestId.layout) {
392
+ return {
393
+ strategy: 'testid',
394
+ node: {
395
+ nodeId: byTestId.nodeId ?? null,
396
+ id: byTestId.id,
397
+ testID: byTestId.testID,
398
+ type: byTestId.type,
399
+ text: byTestId.text,
400
+ absolutePosition: byTestId.absolutePosition,
401
+ layout: byTestId.layout,
402
+ },
403
+ screen: ${g},
404
+ }
405
+ }
406
+ const byText = await t.findByText(${s})
407
+ if (byText && byText.absolutePosition && byText.layout) {
408
+ return {
409
+ strategy: 'text',
410
+ node: {
411
+ nodeId: byText.nodeId ?? null,
412
+ id: byText.id,
413
+ testID: byText.testID,
414
+ type: byText.type,
415
+ text: byText.text,
416
+ absolutePosition: byText.absolutePosition,
417
+ layout: byText.layout,
418
+ },
419
+ screen: ${g},
420
+ }
421
+ }
422
+ return { strategy: 'none' }
423
+ })()`});if(!o||!("node"in o))return o;let i=o.node,c=i.absolutePosition.x+i.layout.width/2,r=i.absolutePosition.y+i.layout.height/2,e=o.screen??null,u=!!e&&(c<0||r<0||c>e.width||r>e.height);return{...o,cx:c,cy:r,...u?{offscreen:!0,screen:e}:{},target:{id:i.id,testID:i.testID,text:o.strategy==="text"?a:i.text,type:i.type}}}})}export{p as a,x as b,h as c,F as d,q as e,M as f,P as g};
@@ -1,5 +1,5 @@
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{o as d}from"./chunk-YXXKSL6R.js";import{chmodSync as S,existsSync as f,mkdirSync as A,readFileSync as k,rmSync as o,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,isAdmin:e.isAdmin===!0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",i=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:i,validatedAt:h}}function b(){let t=a();if(!f(t))return null;try{let e=JSON.parse(k(t,"utf8")),r=v(e);return r||(o(t,{force:!0}),null)}catch{return o(t,{force:!0}),null}}function O(t){let e=a();A(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
4
+ import{o as d}from"./chunk-E6XYIIJK.js";import{chmodSync as S,existsSync as f,mkdirSync as A,readFileSync as k,rmSync as o,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,isAdmin:e.isAdmin===!0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",i=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:i,validatedAt:h}}function b(){let t=a();if(!f(t))return null;try{let e=JSON.parse(k(t,"utf8")),r=v(e);return r||(o(t,{force:!0}),null)}catch{return o(t,{force:!0}),null}}function O(t){let e=a();A(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
5
5
  `);try{S(e,384)}catch{}return r}function l(){o(a(),{force:!0})}async function E(t){let e=b();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return l(),null;if(!n.ok)return e;let i=await n.json();return i.user?.id?O({token:e.token,user:i.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{b as a,O as b,l as c,E as d};
@@ -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
4
  var f="\x1B[0m",p="\x1B[1m",a="\x1B[2m",m="\x1B[38;2;42;95;255m",x="\x1B[38;5;84m",d="\x1B[38;5;203m";function c(n,t){return!process.stdout.isTTY||process.env.NO_COLOR!==void 0?t:`${n}${t}${f}`}function s(n){return c(m,n)}function u(n){return c(p,n)}function i(n){return c(a,n)}function w(n){return c(x,n)}function h(n){return c(d,n)}function v(n){console.log(),console.log(` ${s("\u25E4\u25E2")} ${u("rnx")}`),n&&console.log(` ${i(n)}`)}function y(n,t){console.log(`
@@ -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 as F,b as h,e as f,f as W,g as B}from"./chunk-TE645QCO.js";import{b as l}from"./chunk-NGWUGNPV.js";import{b as P}from"./chunk-3XMEIZEV.js";import{E as y,G as D,d as T,e as u,h as v,k as I,l as R,o as O,p as $,r as M,s as A,x as N,z as _}from"./chunk-M7COA4BE.js";var o=class extends Error{constructor(e){super(e),this.name=new.target.name}},m=class extends o{},w=class extends o{status;constructor(e){super(`sim not ready: ${O(e)}`),this.status=e}},d=class extends o{outcome;constructor(e,t=null){super(e),this.outcome=t}},b=class extends o{},g=class extends o{result;constructor(e){let t=e.steps.find(n=>!n.ok),s=t?`${t.index} (${t.type})`:String(e.completed),r=t?.error??e.error;super(`perform failed at step ${s}${r?`: ${r}`:""}`),this.result=e}},x=class extends o{result;constructor(e){super(`reset (${e.strategy}) failed${e.error?`: ${e.error}`:""}`),this.result=e}};function U(i){return new Promise(e=>setTimeout(e,i))}function C(i){if(typeof i!="string"||!i.startsWith("data:image/png;base64,"))throw new o(`screenshot bridge returned a non-png payload: ${JSON.stringify(typeof i=="string"?i.slice(0,80):i)}`);let e=i.slice(22),t=atob(e),s=new Uint8Array(t.length);for(let r=0;r<t.length;r++)s[r]=t.charCodeAt(r);return{dataUrl:i,bytes:s}}var J=["bundle","demo","app","open","port","inspectOpen","appFonts","appSplash"];function K(i,e){let t=new URL(i);for(let a of J)t.searchParams.delete(a);let s=t.pathname.replace(/\/+$/,"")||"/",r=s==="/__soot"||s.startsWith("/__soot/")?"/__soot":"",n=String(e).trim();return/^\d+$/.test(n)?t.pathname=`${r}/rn/${n}`:(t.pathname=`${r}/rn`,t.searchParams.set("open",n)),t.toString()}function j(i){return typeof i=="object"&&"text"in i&&typeof i.text=="string"&&!("layout"in i)&&!("absolutePosition"in i)}var k=class{simId;bridge;closed=!1;constructor(e,t,s={}){this.bridge=e,this.simId=t}send(e,t){if(this.closed)return Promise.reject(new m("sim client is closed"));let s=e.simId===void 0?{...e,simId:this.simId}:e;return this.bridge.send(s,t)}listSims(){return this.bridge.listSims()}focusSim(e=this.simId){return this.bridge.focusSim(e)}closeSim(e=this.simId){return this.bridge.closeSim(e)}claim(e=this.simId,t){return this.bridge.claim(e,t)}close(){this.closed||(this.closed=!0,this.bridge.close())}async open(e,t={}){let r=(await this.listSims()).find(c=>c.id===this.simId);if(!r)throw new m(`sim ${this.simId} is no longer connected`);let n=r.url??r.origin;if(!n)throw new m(`sim ${this.simId} reported no URL to derive the shell from`);let a=K(n,e),p=new URL(a);await this.send({type:"evaluate",code:`window.location.href = ${JSON.stringify(a)}`});let L=Date.now()+(t.timeoutMs??3e4);for(;Date.now()<L;){await U(250);try{let{url:c}=await u(this),S=new URL(c);if(S.pathname===p.pathname&&S.searchParams.get("open")===p.searchParams.get("open"))return}catch{}}throw new m(`timed out waiting for sim ${this.simId} to load ${a}`)}openUrl(e){return P(this,e)}async waitReady(e={}){let t=await $(this,e.timeoutMs??2e4,{onProgress:e.onProgress});if(!t.ready)throw new w(t);return t}settle(e={}){return F({bridge:this,maxMs:e.maxMs??3e3,strict:e.strict})}async find(e){return(await this.findAll(e))[0]??null}async findAll(e){let t={testId:e.testId??null,role:e.role??null,type:e.type??null,text:e.text??null,pressable:e.pressable},s=await R(this,t);if(!s)throw new o("find() needs at least one of testId, text, role, type, or pressable");let{result:r}=s;return Array.isArray(r)?r:r?[r]:[]}async tree(e=5){let{tree:t}=await T(this,e);return Array.isArray(t)?t:[]}resolve(e){return this.send({type:"resolve",selector:e})}describe(e={}){return v(this,{describe:!0,verbose:e.verbose??!1,filter:e.filter??"",compact:!e.verbose,hideXy:!1,fullText:!0})}accessibilityTree(){return I(this)}async logs(e={}){return _(await N(this),e)}errors(e=20){return M(this,e)}warnings(e=20){return A(this,e)}keyboard(){return y(this)}shellState(e=0){return D(this,e)}async url(){let{url:e}=await u(this);return e}async screenshot(e={}){let t=await this.send({type:"screenshot",...e.layers?{layers:e.layers}:{},...e.crop?{crop:e.crop}:{}});return C(t)}async tap(e){if(typeof e=="string")return this.throwUnlessTapped(await B(this,e),e);if("testId"in e&&typeof e.testId=="string")return this.throwUnlessTapped(await f(this,e.testId),e.testId);if(j(e)){let{text:r,...n}=e;return this.throwUnlessTapped(await W(this,r,n),r)}if("testID"in e&&typeof e.testID=="string")return this.throwUnlessTapped(await f(this,e.testID),e.testID);let t=this.coordsForTapTarget(e),s=await this.send({type:"tap",x:t.x,y:t.y});if(!h(s))throw new d(`tap at ${t.x},${t.y} missed: ${JSON.stringify(s)}`)}async longPress(e,t={}){let s=await this.resolveCoords(e);if(!(await this.send({type:"longPress",x:s.x,y:s.y,durationMs:t.durationMs??600},{timeoutMs:(t.durationMs??600)+15e3}))?.ok)throw new d(`longPress at ${s.x},${s.y} missed`)}async type(e){await this.requireVisibleKeyboard("type"),await this.send({type:"keyboard",action:"type",text:e})}async press(e){await this.requireVisibleKeyboard("press"),await this.send({type:"keyboard",action:"press",text:e})}async dismissKeyboard(){await this.send({type:"keyboard",action:"dismiss"})}async perform(e,t){let s=[];for(let a of e){if(a.type!=="tapText"){s.push(a);continue}let p=await l(this,{mode:"text",value:a.text});if(!p)throw new d(`perform tapText: no node with text ${JSON.stringify(a.text)}`);s.push({type:"tap",x:p.x,y:p.y,target:{testID:p.testID??void 0,text:p.text??void 0,type:p.type??void 0}})}let r=t?.timeoutMs??3e4,n=await this.send({type:"perform",steps:s,...t?{performOptions:t}:{}},{timeoutMs:r+5e3});if(!n?.ok)throw new g(n);return n}state(e){return this.send({type:"state",...e?{stateOptions:e}:{}})}async reset(e){let t=await this.send({type:"reset",...e?{resetOptions:e}:{}},{timeoutMs:6e4});if(!t?.ok)throw new x(t);return t}throwUnlessTapped(e,t){if(!e.failure&&h(e.result))return;let s=e.failure==="not-found"?"no matching node":e.failure==="missed"?e.result?.reason??"press missed":e.payload?.ambiguous?`ambiguous: ${e.payload.total} matches`:e.result?.reason??e.payload?.error??"tap failed";throw new d(`tap ${JSON.stringify(t)} failed: ${s}`,e)}coordsForTapTarget(e){if(typeof e=="object"&&"x"in e&&"y"in e&&typeof e.x=="number"&&typeof e.y=="number")return{x:e.x,y:e.y};if(typeof e=="object"&&"absolutePosition"in e&&e.absolutePosition&&e.layout)return{x:e.absolutePosition.x+(e.layout.width??0)/2,y:e.absolutePosition.y+(e.layout.height??0)/2};throw new o("tap target needs coordinates, a testId, text, or a node from find()")}async resolveCoords(e){if(typeof e=="string"){let t=await l(this,{mode:"testid",value:e})??await l(this,{mode:"text",value:e});if(!t)throw new d(`no node matching ${JSON.stringify(e)}`);return t}if("testId"in e&&typeof e.testId=="string"){let t=await l(this,{mode:"testid",value:e.testId});if(!t)throw new d(`no node with testID ${JSON.stringify(e.testId)}`);return t}if("text"in e&&typeof e.text=="string"&&!("layout"in e)){let t=await l(this,{mode:"text",value:e.text});if(!t)throw new d(`no node with text ${JSON.stringify(e.text)}`);return t}return this.coordsForTapTarget(e)}async requireVisibleKeyboard(e){let t=Date.now()+1500;for(;;){let s=await y(this);if(!("error"in s)&&s.visible)return;if(Date.now()>=t)throw new b(`${e} requires the iOS keyboard to be visible \u2014 focus an input first (tap a TextInput)`);await U(150)}}};export{o as a,m as b,w as c,d,b as e,g as f,x as g,K as h,k as i};
@@ -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{b as $}from"./chunk-6PL2CCGP.js";import{n as x}from"./chunk-GUI3PDH2.js";import{b as y,c as R,d as f,e as w,f as a}from"./chunk-77ZHQJZR.js";import{L as g,M as u,N as d,T as h,l as p}from"./chunk-YXXKSL6R.js";import O from"fs";import{WebSocket as E}from"ws";function C(t){if(!t||typeof t!="object")return!1;let e=Reflect.get(t,"sections");return typeof Reflect.get(t,"title")=="string"&&Array.isArray(e)&&e.every(o=>o&&typeof o=="object"&&typeof Reflect.get(o,"title")=="string"&&Array.isArray(Reflect.get(o,"items"))&&Reflect.get(o,"items").every(n=>n&&typeof n=="object"&&typeof Reflect.get(n,"summary")=="string"&&typeof Reflect.get(n,"hash")=="string"))}async function b(t,e=fetch){try{let o=new URL(w);o.searchParams.set("version",t);let n=await e(o,{headers:{accept:"application/json"},signal:AbortSignal.timeout(5e3)});if(!n.ok)return null;let s=await n.json();if(!s||typeof s!="object")return null;let i=Reflect.get(s,"entries");return!Array.isArray(i)||!C(i[0])?null:i[0]}catch{return null}}function A(t,e){let o=[`what's new in rnx engine v${t}:`];if(!e||e.sections.length===0)o.push(" release notes are not available yet");else for(let n of e.sections){o.push(` ${n.title}:`);for(let s of n.items)o.push(` \u2022 ${s.summary}`)}return o.push(` full changelog: ${f}`),o.join(`
4
+ import{b as $}from"./chunk-MCO7V4VN.js";import{q as x}from"./chunk-T2MGLXY5.js";import{b as y,c as R,d as f,e as w,f as a}from"./chunk-3S2J6IVC.js";import{L as g,M as u,N as d,T as h,l as p}from"./chunk-E6XYIIJK.js";import O from"fs";import{WebSocket as E}from"ws";function C(t){if(!t||typeof t!="object")return!1;let e=Reflect.get(t,"sections");return typeof Reflect.get(t,"title")=="string"&&Array.isArray(e)&&e.every(o=>o&&typeof o=="object"&&typeof Reflect.get(o,"title")=="string"&&Array.isArray(Reflect.get(o,"items"))&&Reflect.get(o,"items").every(n=>n&&typeof n=="object"&&typeof Reflect.get(n,"summary")=="string"&&typeof Reflect.get(n,"hash")=="string"))}async function b(t,e=fetch){try{let o=new URL(w);o.searchParams.set("version",t);let n=await e(o,{headers:{accept:"application/json"},signal:AbortSignal.timeout(5e3)});if(!n.ok)return null;let s=await n.json();if(!s||typeof s!="object")return null;let i=Reflect.get(s,"entries");return!Array.isArray(i)||!C(i[0])?null:i[0]}catch{return null}}function A(t,e){let o=[`what's new in rnx engine v${t}:`];if(!e||e.sections.length===0)o.push(" release notes are not available yet");else for(let n of e.sections){o.push(` ${n.title}:`);for(let s of n.items)o.push(` \u2022 ${s.summary}`)}return o.push(` full changelog: ${f}`),o.join(`
5
5
  `)}async function Q(t,e={}){let[o,...n]=t;if(!o||o==="--help"||o==="-h"){S();return}switch(o){case"install":return L(n,e);case"list":return j(n);case"use":return T(n);case"remove":return D(n);case"which":return G();case"notes":return U(n);default:console.error(` unknown runtime subcommand: ${o}`),S(),process.exit(1)}}function S(){console.log(`
6
6
  rnx runtime \u2014 manage engine runtimes under ~/.sootsim/runtimes/
7
7
 
@@ -27,4 +27,4 @@ examples:
27
27
  rnx runtime install --channel beta
28
28
  rnx runtime use 1.2.3
29
29
  rnx runtime notes
30
- `)}async function L(t,e){let{version:o,flags:n}=F(t),s=n.channel??e.channel??"stable",i=n.force===!0,l=n.setActive!==!1;g(),console.log("rnx runtime install"),console.log(` cdn: ${a.resolveCdnOrigin()}`);try{let r=await a.install({version:o,channel:s,force:i,setActive:l,protectVersions:h()});return console.log(` version: ${r.version} (channel: ${r.channel})`),r.installed?console.log(` installed ${r.version}`):console.log(` already installed at ${r.runtimeDir}`),l&&await k(r.version),r}catch(r){console.error(` ${I(r)}`),process.exit(1)}}async function k(t){d(t),console.log(` active: ${t}`),await _(t)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${t})`)}async function _(t){let{isDaemonLockfileFresh:e,readDaemonLockfile:o}=await import("./home-paths-4ICFIGXO.js"),n=o();if(!e(n))return!1;let s=x();return new Promise(i=>{let l=!1,r=!1,m=N=>{l||(l=!0,i(N))},c=new E(`ws://127.0.0.1:${s}`,{handshakeTimeout:800}),v=setTimeout(()=>{try{c.close()}catch{}m(r)},1500);c.on("open",()=>{try{c.send(JSON.stringify({type:"runtime:use",version:t,id:0})),r=!0}catch{}setTimeout(()=>{try{c.close()}catch{}},100)}),c.on("close",()=>{clearTimeout(v),m(r)}),c.on("error",()=>{clearTimeout(v),m(!1)})})}async function j(t){g();let e=a.listInstalled(),o=u();if(console.log("installed:"),e.length===0)console.log(" (none)");else for(let n of e)console.log(` ${n===o?"*":" "} ${n}`);try{let n=await a.fetchManifest();console.log("available (latest per channel):");for(let[i,l]of Object.entries(n.channels))console.log(` ${i.padEnd(8)} ${l.latest}`);let s=Object.keys(n.versions).sort(y).reverse();if(s.length>1){console.log("hosted versions:");for(let i of s)console.log(` ${i}`)}}catch(n){console.log(`available: (could not fetch manifest: ${I(n)})`)}}async function T(t){let e=t[0];e||(console.error(" usage: rnx runtime use <version>"),process.exit(1));let o=a.listInstalled();o.includes(e)||(console.error(` version ${e} is not installed`),console.error(` installed: ${o.join(", ")||"(none)"}`),console.error(` run \`rnx runtime install ${e}\` first`),process.exit(1)),await k(e)}async function D(t){let e=t[0];e||(console.error(" usage: rnx runtime remove <version>"),process.exit(1)),u()===e&&(console.error(` cannot remove active runtime ${e}`),console.error(" switch with `rnx runtime use <other>` first, or install another version"),process.exit(1)),h().includes(e)&&(console.error(` cannot remove runtime ${e} while a project is using it`),process.exit(1));let n=p(e);if(!O.existsSync(n)){console.error(` ${e} is not installed`);return}O.rmSync(n,{recursive:!0,force:!0}),console.log(` removed ${e}`)}async function G(){let t=u();if(!t){console.log(" no active runtime");return}console.log(t)}async function U(t){t.length>0&&(console.error(" usage: rnx runtime notes"),process.exit(1));let{config:e}=await $(),o=e?.runtimeVersion??u();if(!o){console.log(" no active runtime"),console.log(` release notes: ${f}`);return}console.log(A(o,await b(o)))}function F(t){let e={},o=[];for(let n=0;n<t.length;n++){let s=t[n];if(s==="--channel"&&n+1<t.length){e.channel=t[n+1],n++;continue}if(s.startsWith("--channel=")){e.channel=s.slice(10);continue}if(s==="--force"){e.force=!0;continue}if(s==="--set-active=false"||s==="--no-set-active"){e.setActive=!1;continue}o.push(s)}return{version:o[0]??null,flags:e}}function I(t){return t instanceof Error?t.message:String(t)}export{b as a,A as b,Q as c};
30
+ `)}async function L(t,e){let{version:o,flags:n}=F(t),s=n.channel??e.channel??"stable",i=n.force===!0,l=n.setActive!==!1;g(),console.log("rnx runtime install"),console.log(` cdn: ${a.resolveCdnOrigin()}`);try{let r=await a.install({version:o,channel:s,force:i,setActive:l,protectVersions:h()});return console.log(` version: ${r.version} (channel: ${r.channel})`),r.installed?console.log(` installed ${r.version}`):console.log(` already installed at ${r.runtimeDir}`),l&&await k(r.version),r}catch(r){console.error(` ${I(r)}`),process.exit(1)}}async function k(t){d(t),console.log(` active: ${t}`),await _(t)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${t})`)}async function _(t){let{isDaemonLockfileFresh:e,readDaemonLockfile:o}=await import("./home-paths-QJNOHZJO.js"),n=o();if(!e(n))return!1;let s=x();return new Promise(i=>{let l=!1,r=!1,m=N=>{l||(l=!0,i(N))},c=new E(`ws://127.0.0.1:${s}`,{handshakeTimeout:800}),v=setTimeout(()=>{try{c.close()}catch{}m(r)},1500);c.on("open",()=>{try{c.send(JSON.stringify({type:"runtime:use",version:t,id:0})),r=!0}catch{}setTimeout(()=>{try{c.close()}catch{}},100)}),c.on("close",()=>{clearTimeout(v),m(r)}),c.on("error",()=>{clearTimeout(v),m(!1)})})}async function j(t){g();let e=a.listInstalled(),o=u();if(console.log("installed:"),e.length===0)console.log(" (none)");else for(let n of e)console.log(` ${n===o?"*":" "} ${n}`);try{let n=await a.fetchManifest();console.log("available (latest per channel):");for(let[i,l]of Object.entries(n.channels))console.log(` ${i.padEnd(8)} ${l.latest}`);let s=Object.keys(n.versions).sort(y).reverse();if(s.length>1){console.log("hosted versions:");for(let i of s)console.log(` ${i}`)}}catch(n){console.log(`available: (could not fetch manifest: ${I(n)})`)}}async function T(t){let e=t[0];e||(console.error(" usage: rnx runtime use <version>"),process.exit(1));let o=a.listInstalled();o.includes(e)||(console.error(` version ${e} is not installed`),console.error(` installed: ${o.join(", ")||"(none)"}`),console.error(` run \`rnx runtime install ${e}\` first`),process.exit(1)),await k(e)}async function D(t){let e=t[0];e||(console.error(" usage: rnx runtime remove <version>"),process.exit(1)),u()===e&&(console.error(` cannot remove active runtime ${e}`),console.error(" switch with `rnx runtime use <other>` first, or install another version"),process.exit(1)),h().includes(e)&&(console.error(` cannot remove runtime ${e} while a project is using it`),process.exit(1));let n=p(e);if(!O.existsSync(n)){console.error(` ${e} is not installed`);return}O.rmSync(n,{recursive:!0,force:!0}),console.log(` removed ${e}`)}async function G(){let t=u();if(!t){console.log(" no active runtime");return}console.log(t)}async function U(t){t.length>0&&(console.error(" usage: rnx runtime notes"),process.exit(1));let{config:e}=await $(),o=e?.runtimeVersion??u();if(!o){console.log(" no active runtime"),console.log(` release notes: ${f}`);return}console.log(A(o,await b(o)))}function F(t){let e={},o=[];for(let n=0;n<t.length;n++){let s=t[n];if(s==="--channel"&&n+1<t.length){e.channel=t[n+1],n++;continue}if(s.startsWith("--channel=")){e.channel=s.slice(10);continue}if(s==="--force"){e.force=!0;continue}if(s==="--set-active=false"||s==="--no-set-active"){e.setActive=!1;continue}o.push(s)}return{version:o[0]??null,flags:e}}function I(t){return t instanceof Error?t.message:String(t)}export{b as a,A as b,Q as c};
@@ -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
4
  import{existsSync as s}from"node:fs";import{basename as a,dirname as p,join as l}from"node:path";import{fileURLToPath as m,pathToFileURL as c}from"node:url";var u="packages/sootsim/scripts/demo-app-registry.ts",f=8;function A(o){let r=o;for(let e=0;e<f;e++){if(a(r)==="node_modules")return null;let n=l(r,u);if(s(n))return n;let i=p(r);if(i===r)return null;r=i}return null}var t=null;async function S(){if(t)return t;let o=A(p(m(import.meta.url)));if(!o)return t=[],t;try{let r=await import(c(o).href);t=Array.isArray(r.APPS)?r.APPS:[]}catch{t=[]}return t}function D(){return t??[]}function O(o){let r=t;return t=o,{restore:()=>{t=r}}}export{A as a,S as b,D as c,O as d};
@@ -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{d as P,m,n as S,o as R,p as _,q as v}from"./chunk-EHA65UVJ.js";var k="sootsim:settings",d=["productAnalytics","crashReports","colorScheme","reduceMotion","boldText","fontSize","largerAccessibilitySizes","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","alwaysShowLiveWebViews","showFrame","showMenuBar","showRail","solidWindow","ambientGlow","agentProvider"];function p(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function l(e){let t={};for(let n of d){if(!(n in e))continue;let o=e[n],i=S[n];i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||(t[n]=o)}return t}function K(e){let t={};for(let n of d)t[n]=e[n];return t}function M(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(k);return e?l(JSON.parse(e)):{}}catch{return{}}}function T(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(k,JSON.stringify(e))}catch{}}function x(){let t=p()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:l(t)}function A(e){let t=p();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:e})}catch{}}async function L(e){let t=p();return t?.writeSharedConfig?(await t.writeSharedConfig({settings:e}),!0):!1}function b(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function O(){let e=b()?.settings;return!e||typeof e!="object"?{}:l(e)}function B(e){if(!b())return;let t={settings:e};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}async function F(e){if(!b()||typeof fetch>"u")return!1;let t=await fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:e}),keepalive:!0});if(!t.ok)throw new Error(`shared settings reset failed with HTTP ${t.status}`);return await t.text(),!0}function D(){let e=M(),t=O(),n=x();return{...e,...t,...n}}function V(e,t={}){let n=K(e);for(let o of d)t[o]!==void 0&&(n[o]=t[o]);T(n),A(n),B(n)}async function I(e,t={}){let n=K(e);for(let o of d)t[o]!==void 0&&(n[o]=t[o]);T(n),!await L(n)&&await F(n)}function j(e){if(typeof window>"u")return()=>{};let t=r=>{if(!(r.key!==k||r.newValue==null))try{e(l(JSON.parse(r.newValue)))}catch{}};window.addEventListener("storage",t);let n=p(),o;n?.onSharedConfigChanged&&(o=n.onSharedConfigChanged(r=>{let f=r?.settings;!f||typeof f!="object"||e(l(f))}));let a=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(r=>{let f=r?.settings;!f||typeof f!="object"||e(l(f))});return()=>{window.removeEventListener("storage",t),o?.(),a?.()}}var N=_(),q=v(),y=D(),c=new Set,g={};for(let e of d)N[e]!==void 0&&(c.add(e),y[e]!==void 0&&(g[e]=y[e]),delete y[e]);var s={...q,...y},w=[],u=null;function h(){for(let e of w)e()}function E(){h(),V(s,g)}function C(e,t){let n=S[e];return n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]===t?!1:(s={...s,[e]:t},e==="deviceModel"&&(u=null),!0)}j(e=>{let t={...s},n=!1;for(let[o,i]of Object.entries(e)){let a=o;if(c.has(a)){g[a]=i;continue}t[a]!==i&&(t[a]=i,n=!0)}n&&(s=t,u=null,h())});var z={get(e){return s[e]},set(e,t){C(e,t)&&E()},setRuntime(e,t){c.has(e)||(c.add(e),d.includes(e)&&(g[e]=s[e])),C(e,t)&&h()},isRuntimeControlled(e){return c.has(e)},getAll(){return s},apply(e){let t=!1,n={...s};for(let[o,i]of Object.entries(e)){if(i===void 0)continue;let a=o,r=S[a];r&&(r.validate&&!r.validate(i)||r.options&&!r.options.includes(i)||n[a]!==i&&(n[a]=i,t=!0))}t&&(s=n,u=null,E())},applyRuntime(e){let t=!1;for(let n of Object.keys(e)){let o=e[n];o!==void 0&&(c.has(n)||(c.add(n),d.includes(n)&&(g[n]=s[n])),C(n,o)&&(t=!0))}t&&h()},reset(){s=v(),u=null,E()},async resetDeviceContent(){let e=m.filter(n=>!c.has(n)).map(n=>[n,R[n]]),t=e.some(([n,o])=>s[n]!==o);s={...s,...Object.fromEntries(e)};for(let n of m)c.has(n)&&(g[n]=R[n]);t&&h(),await I(s,g)},subscribe(e){return w.push(e),()=>{w=w.filter(t=>t!==e)}},getDeviceSpec(){return u||(u=P(s.deviceModel)),u},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{z as a};
@@ -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
4
  function t(_){return`(async () => {
@@ -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
4
  var n=Object.freeze({name:"rnx",packageName:"rnxsim",commandName:"rnx",domain:"rnxsim.com",origin:"https://rnxsim.com"});export{n as a};
@@ -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{n}from"./chunk-T2MGLXY5.js";import{M as t,j as r}from"./chunk-E6XYIIJK.js";function l(){let e=t(),i=r()?n():null;return i?.source==="dev-bridge"?{primary:`engine dev source (:${i.bridgePort})`,installedRuntime:e?`installed runtime v${e}`:null,isDevBridge:!0}:{primary:e?`runtime v${e}`:"runtime not installed",installedRuntime:null,isDevBridge:!1}}export{l as a};
@@ -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 j,s as A,v as K,w as v}from"./chunk-GUI3PDH2.js";import{createHash as Y}from"node:crypto";import{mkdirSync as L,readFileSync as W,readdirSync as Q,unlinkSync as X,writeFileSync as D}from"node:fs";import{dirname as q,extname as Z,resolve as B}from"node:path";function H(t){let e=t[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function U(t,e,n){let o=j(t,{port:e.port}),i=H(o.positional),u=A({...o,commandTimeoutMs:5e3});try{let a=!!(await K(u,"SootSim.bridges.settings.get"))?.[n.modeKey],m=i==="on"?!0:i==="off"?!1:!a;if(a===m)return console.log(` ${n.displayName}: already ${m?"on":"off"}`),{current:a,target:m,changed:!1};if(!await u.send({type:"evaluate",acquireLock:!0,code:`(async () => {
4
+ import{t as j,v as A,y as K,z as v}from"./chunk-T2MGLXY5.js";import{createHash as Y}from"node:crypto";import{mkdirSync as L,readFileSync as W,readdirSync as Q,unlinkSync as X,writeFileSync as D}from"node:fs";import{dirname as q,extname as Z,resolve as B}from"node:path";function H(t){let e=t[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function U(t,e,n){let o=j(t,{port:e.port}),i=H(o.positional),u=A({...o,commandTimeoutMs:5e3});try{let a=!!(await K(u,"SootSim.bridges.settings.get"))?.[n.modeKey],m=i==="on"?!0:i==="off"?!1:!a;if(a===m)return console.log(` ${n.displayName}: already ${m?"on":"off"}`),{current:a,target:m,changed:!1};if(!await u.send({type:"evaluate",acquireLock:!0,code:`(async () => {
5
5
  const modeKey = ${JSON.stringify(n.modeKey)}
6
6
  const target = ${JSON.stringify(m)}
7
7
  window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
@@ -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{c as V}from"./chunk-2S7BKUP2.js";import{P as j,R as M,g as F,j as I,s as U,t as D,u as O}from"./chunk-YXXKSL6R.js";import{a as H}from"./chunk-ONORMKWX.js";import{a as k}from"./chunk-5NMCF5VF.js";import{execFileSync as J,spawnSync as c}from"child_process";import{existsSync as s,mkdirSync as P,readFileSync as ae,realpathSync as le,rmSync as h,writeFileSync as X}from"fs";import{homedir as v}from"os";import{basename as ue,dirname as C,resolve as u,sep as Q}from"path";import{execFileSync as te}from"child_process";import{chmodSync as re,mkdirSync as A,rmSync as oe,writeFileSync as T}from"fs";import{dirname as _}from"path";var ne="dev.sootsim.daemon",Y="SootSim Daemon",G="0.1.36";function q(e,t,r){let n=D(),o=O(),a=_(_(o)),l=_(o),d=`${a}/Resources`;oe(n,{recursive:!0,force:!0}),A(U(),{recursive:!0}),A(l,{recursive:!0}),A(d,{recursive:!0}),T(`${a}/Info.plist`,se()),T(`${a}/PkgInfo`,"APPL????"),T(o,ie(e,t,r)),re(o,493);try{te("codesign",["--force","--sign","-","--deep",n],{stdio:"pipe"})}catch(i){let f=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${n} failed: ${f}
4
+ import{c as V}from"./chunk-BWJOLJOK.js";import{P as j,R as M,g as F,j as I,s as U,t as D,u as O}from"./chunk-E6XYIIJK.js";import{a as H}from"./chunk-ECXDCED5.js";import{a as k}from"./chunk-WVVAYLWZ.js";import{execFileSync as J,spawnSync as c}from"child_process";import{existsSync as s,mkdirSync as P,readFileSync as ae,realpathSync as le,rmSync as h,writeFileSync as X}from"fs";import{homedir as v}from"os";import{basename as ue,dirname as C,resolve as u,sep as Q}from"path";import{execFileSync as te}from"child_process";import{chmodSync as re,mkdirSync as A,rmSync as oe,writeFileSync as T}from"fs";import{dirname as _}from"path";var ne="dev.sootsim.daemon",Y="SootSim Daemon",G="0.1.36";function q(e,t,r){let n=D(),o=O(),a=_(_(o)),l=_(o),d=`${a}/Resources`;oe(n,{recursive:!0,force:!0}),A(U(),{recursive:!0}),A(l,{recursive:!0}),A(d,{recursive:!0}),T(`${a}/Info.plist`,se()),T(`${a}/PkgInfo`,"APPL????"),T(o,ie(e,t,r)),re(o,493);try{te("codesign",["--force","--sign","-","--deep",n],{stdio:"pipe"})}catch(i){let f=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${n} failed: ${f}
5
5
  the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:n,launcherPath:o}}function se(){return`<?xml version="1.0" encoding="UTF-8"?>
6
6
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
7
7
  <plist version="1.0">