rnxsim 0.1.375 → 0.1.377

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 (295) hide show
  1. package/README.md +28 -25
  2. package/cli/app-config.ts +9 -12
  3. package/cli/app-fonts.ts +3 -3
  4. package/cli/app-project.ts +8 -8
  5. package/cli/auth.ts +7 -9
  6. package/cli/bin.ts +16 -31
  7. package/cli/bridge-flow-runner.ts +3 -3
  8. package/cli/browser-backend.ts +44 -0
  9. package/cli/command-contract.ts +221 -0
  10. package/cli/command-registry.ts +291 -0
  11. package/cli/commands/agent-wrapper.ts +2 -2
  12. package/cli/commands/app-fonts.ts +2 -2
  13. package/cli/commands/assert.ts +3 -3
  14. package/cli/commands/auth.ts +1 -1
  15. package/cli/commands/box/cloud-box.ts +1 -1
  16. package/cli/commands/box/plane-share.ts +2 -2
  17. package/cli/commands/box.ts +4 -6
  18. package/cli/commands/compat.ts +1 -1
  19. package/cli/commands/config.ts +2 -2
  20. package/cli/commands/control.ts +42 -28
  21. package/cli/commands/cpu-profile.ts +7 -7
  22. package/cli/commands/daemon-mac-app.ts +7 -7
  23. package/cli/commands/daemon.ts +10 -10
  24. package/cli/commands/debug.ts +11 -11
  25. package/cli/commands/detox.ts +13 -13
  26. package/cli/commands/diagnose.ts +6 -6
  27. package/cli/commands/do-chain.ts +1 -2
  28. package/cli/commands/electron.ts +1 -3
  29. package/cli/commands/film.ts +3 -3
  30. package/cli/commands/flow.ts +43 -43
  31. package/cli/commands/inspect/count.ts +1 -1
  32. package/cli/commands/inspect/describe.ts +1 -1
  33. package/cli/commands/inspect/env.ts +2 -2
  34. package/cli/commands/inspect/get-layout.ts +1 -1
  35. package/cli/commands/inspect/keyboard.ts +1 -1
  36. package/cli/commands/inspect/list.ts +1 -1
  37. package/cli/commands/inspect/memory.ts +1 -1
  38. package/cli/commands/inspect/resolve-target.ts +1 -1
  39. package/cli/commands/inspect/screens.ts +1 -1
  40. package/cli/commands/inspect/tree.ts +1 -1
  41. package/cli/commands/inspect/url.ts +1 -1
  42. package/cli/commands/inspect/wait-event.ts +5 -5
  43. package/cli/commands/inspect.ts +34 -34
  44. package/cli/commands/install-desktop.ts +3 -3
  45. package/cli/commands/login.ts +6 -6
  46. package/cli/commands/maestro-generate.ts +5 -5
  47. package/cli/commands/maestro.ts +5 -5
  48. package/cli/commands/profile.ts +1 -1
  49. package/cli/commands/record.ts +9 -9
  50. package/cli/commands/runtime.ts +18 -18
  51. package/cli/commands/screenshot-command.ts +1 -1
  52. package/cli/commands/screenshot-layers.ts +5 -5
  53. package/cli/commands/screenshot-mode.ts +1 -1
  54. package/cli/commands/screenshot.ts +8 -8
  55. package/cli/commands/screenshots-capture.ts +5 -5
  56. package/cli/commands/serve.ts +3 -3
  57. package/cli/commands/setup.ts +20 -12
  58. package/cli/commands/skills.ts +5 -5
  59. package/cli/commands/slides.ts +1 -1
  60. package/cli/commands/telemetry.ts +1 -1
  61. package/cli/commands/three-mode.ts +1 -1
  62. package/cli/commands/timeline.ts +8 -8
  63. package/cli/commands/upgrade.ts +116 -131
  64. package/cli/commands/upload.ts +12 -12
  65. package/cli/commands/version.ts +7 -7
  66. package/cli/commands/what-happened.ts +9 -9
  67. package/cli/current-sim.ts +3 -3
  68. package/cli/desktop-companion.ts +1 -1
  69. package/cli/drivers/playwright.ts +9 -9
  70. package/cli/drivers/registry.ts +1 -1
  71. package/cli/drivers/types.ts +1 -1
  72. package/cli/flow-file.ts +2 -2
  73. package/cli/flow-session.ts +1 -1
  74. package/cli/help-core.ts +136 -0
  75. package/cli/help.ts +17 -53
  76. package/cli/hints.ts +5 -5
  77. package/cli/inspect-notice-state.ts +1 -1
  78. package/cli/maestro-js.ts +1 -1
  79. package/cli/outbound-endpoints.ts +23 -5
  80. package/cli/parse-args.ts +19 -66
  81. package/cli/recording-access.ts +1 -1
  82. package/cli/registry.ts +1 -0
  83. package/cli/run-registry.ts +1 -1
  84. package/cli/run-rnx-core.ts +148 -0
  85. package/cli/run-rnx.ts +6 -9
  86. package/cli/runtime-notes.ts +3 -3
  87. package/cli/standalone.ts +4 -0
  88. package/cli/ws-bridge.ts +8 -8
  89. package/detox/config-loader.ts +2 -2
  90. package/detox/index.ts +8 -8
  91. package/detox/jest-preset.cjs +1 -1
  92. package/detox/navigation.ts +2 -2
  93. package/dist-lib/agent-daemon-client.cjs +5 -5
  94. package/dist-lib/agent-events.cjs +1 -1
  95. package/dist-lib/agent-identity.cjs +2 -2
  96. package/dist-lib/agent-sessions.cjs +10 -10
  97. package/dist-lib/attached-projects.cjs +6 -6
  98. package/dist-lib/auth/shared-session.cjs +6 -6
  99. package/dist-lib/backend-origin.cjs +1 -1
  100. package/dist-lib/beta.cjs +1 -1
  101. package/dist-lib/beta.mjs +1 -1
  102. package/dist-lib/bridge-constants.cjs +1 -1
  103. package/dist-lib/bridge-contract-input.cjs +1 -1
  104. package/dist-lib/bridge-contract-input.mjs +1 -1
  105. package/dist-lib/bridge-contract.cjs +1 -1
  106. package/dist-lib/bridge-contract.mjs +1 -1
  107. package/dist-lib/cli-constants.cjs +1 -1
  108. package/dist-lib/config.cjs +25 -25
  109. package/dist-lib/detox/index.cjs +9 -9
  110. package/dist-lib/detox/jest-preset.cjs +1 -1
  111. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  112. package/dist-lib/home-paths.cjs +29 -29
  113. package/dist-lib/host/bridge-host.cjs +274 -181
  114. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  115. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  116. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  117. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  118. package/dist-lib/host/websocket-proxy.cjs +1 -1
  119. package/dist-lib/index.cjs +14 -14
  120. package/dist-lib/jump-to-source-babel.cjs +1 -1
  121. package/dist-lib/menu.cjs +1 -1
  122. package/dist-lib/menu.mjs +1 -1
  123. package/dist-lib/metro-production-bundle.cjs +1 -1
  124. package/dist-lib/metro-production-bundle.mjs +1 -1
  125. package/dist-lib/metro.cjs +8 -8
  126. package/dist-lib/profiles.cjs +12 -12
  127. package/dist-lib/public-brand.cjs +1 -1
  128. package/dist-lib/react-native-host-modules.cjs +1 -1
  129. package/dist-lib/react-native-host-modules.mjs +1 -1
  130. package/dist-lib/render-mode.cjs +1 -1
  131. package/dist-lib/scripts/dev-server-scanner.cjs +25 -11
  132. package/dist-lib/sdk.cjs +1 -1
  133. package/dist-lib/sdk.mjs +1 -1
  134. package/dist-lib/skills.cjs +470 -322
  135. package/dist-lib/vite.cjs +9 -9
  136. package/package.json +4 -11
  137. package/scripts/dev-server-scanner.ts +25 -7
  138. package/scripts/optional-demo-registry.ts +1 -1
  139. package/skills/contrast/SKILL.md +3 -3
  140. package/skills/rnx-debug/SKILL.md +1 -1
  141. package/skills/rnx-test/SKILL.md +2 -2
  142. package/src/agent-identity.ts +1 -1
  143. package/src/agent-sessions.ts +7 -5
  144. package/src/cli-version.ts +12 -4
  145. package/src/config.ts +26 -28
  146. package/src/disk-cleanup.ts +11 -11
  147. package/src/home-paths.ts +28 -28
  148. package/src/host/bridge-host.ts +16 -16
  149. package/src/metro-plugin.ts +2 -2
  150. package/src/profiles.ts +2 -2
  151. package/src/runtime-assets.ts +7 -7
  152. package/src/runtime-delivery.ts +13 -13
  153. package/src/screenshots/orchestrate.ts +1 -1
  154. package/src/screenshots/schema.ts +2 -2
  155. package/src/skills/builtin/a11y-review.ts +2 -2
  156. package/src/skills/builtin/compat-check.ts +2 -2
  157. package/src/skills/builtin/maestro-test.ts +2 -2
  158. package/src/skills/builtin/perf-profile.ts +2 -2
  159. package/src/skills/builtin/screenshot-all.ts +2 -2
  160. package/src/skills/builtin/visual-diff.ts +2 -2
  161. package/src/skills/registry.ts +8 -8
  162. package/src/skills/types.ts +1 -1
  163. package/src/vite-plugin-one.ts +3 -3
  164. package/src/vite-plugin.ts +15 -2
  165. package/dist-cli/bin.js +0 -15
  166. package/dist-cli/chunks/agent-JJN7U6FR.js +0 -48
  167. package/dist-cli/chunks/agent-wrapper-AVVUJ3WF.js +0 -17
  168. package/dist-cli/chunks/app-fonts-QJ22CNAZ.js +0 -4
  169. package/dist-cli/chunks/assert-PZZKIY3K.js +0 -49
  170. package/dist-cli/chunks/auth-5AVDJO33.js +0 -12
  171. package/dist-cli/chunks/beta-PFRGP266.js +0 -4
  172. package/dist-cli/chunks/box-ILC2O7ZO.js +0 -1730
  173. package/dist-cli/chunks/camera-J3V62PP7.js +0 -33
  174. package/dist-cli/chunks/chunk-25KRGDZT.js +0 -4
  175. package/dist-cli/chunks/chunk-2BRBFLWA.js +0 -38
  176. package/dist-cli/chunks/chunk-2GXNAZHB.js +0 -74
  177. package/dist-cli/chunks/chunk-2IUMRRYV.js +0 -7
  178. package/dist-cli/chunks/chunk-4ALPWIMP.js +0 -10
  179. package/dist-cli/chunks/chunk-4CEZZKRY.js +0 -4
  180. package/dist-cli/chunks/chunk-4EUKOIAV.js +0 -4
  181. package/dist-cli/chunks/chunk-4IKE4YUS.js +0 -32
  182. package/dist-cli/chunks/chunk-4ZXR2M3D.js +0 -4
  183. package/dist-cli/chunks/chunk-5CGJFU27.js +0 -7
  184. package/dist-cli/chunks/chunk-5HHWECGT.js +0 -4
  185. package/dist-cli/chunks/chunk-5PZVYF42.js +0 -312
  186. package/dist-cli/chunks/chunk-7NCPUZ52.js +0 -27
  187. package/dist-cli/chunks/chunk-7OSIJCBR.js +0 -107
  188. package/dist-cli/chunks/chunk-AQ5TMOAI.js +0 -4
  189. package/dist-cli/chunks/chunk-BQCEI37V.js +0 -5
  190. package/dist-cli/chunks/chunk-C6B5FOP3.js +0 -4
  191. package/dist-cli/chunks/chunk-CCMZSHJB.js +0 -71
  192. package/dist-cli/chunks/chunk-CX7VCKAT.js +0 -14
  193. package/dist-cli/chunks/chunk-DQUPSAHE.js +0 -4
  194. package/dist-cli/chunks/chunk-DSD2UBZI.js +0 -4
  195. package/dist-cli/chunks/chunk-EWPAI4MO.js +0 -7
  196. package/dist-cli/chunks/chunk-EZXV6U2N.js +0 -497
  197. package/dist-cli/chunks/chunk-F5F7FIPM.js +0 -6
  198. package/dist-cli/chunks/chunk-FUTYK55H.js +0 -30
  199. package/dist-cli/chunks/chunk-FW6AN7I2.js +0 -3
  200. package/dist-cli/chunks/chunk-FZDRA7Z4.js +0 -4
  201. package/dist-cli/chunks/chunk-GDLE4NIV.js +0 -4
  202. package/dist-cli/chunks/chunk-GEX7RVHY.js +0 -5
  203. package/dist-cli/chunks/chunk-H4MYYOYJ.js +0 -5
  204. package/dist-cli/chunks/chunk-HEV7BAPE.js +0 -11
  205. package/dist-cli/chunks/chunk-HNDWYCND.js +0 -506
  206. package/dist-cli/chunks/chunk-HNPHODBD.js +0 -4
  207. package/dist-cli/chunks/chunk-HWDVC6YA.js +0 -11
  208. package/dist-cli/chunks/chunk-JOHJZUGG.js +0 -4
  209. package/dist-cli/chunks/chunk-JWUDT4QK.js +0 -5
  210. package/dist-cli/chunks/chunk-K7QQWKGE.js +0 -4
  211. package/dist-cli/chunks/chunk-LAOKTKT4.js +0 -4
  212. package/dist-cli/chunks/chunk-LD7I266X.js +0 -24
  213. package/dist-cli/chunks/chunk-LMHBU5LZ.js +0 -4
  214. package/dist-cli/chunks/chunk-LSOGXSDV.js +0 -535
  215. package/dist-cli/chunks/chunk-MP2GPO4T.js +0 -4
  216. package/dist-cli/chunks/chunk-MXJ2UWRV.js +0 -4
  217. package/dist-cli/chunks/chunk-OJNKRIZF.js +0 -15
  218. package/dist-cli/chunks/chunk-PBOWUNXO.js +0 -4
  219. package/dist-cli/chunks/chunk-PNRJFHX4.js +0 -4
  220. package/dist-cli/chunks/chunk-QJQOK34O.js +0 -28
  221. package/dist-cli/chunks/chunk-RLCQLMFF.js +0 -142
  222. package/dist-cli/chunks/chunk-S65CK3RI.js +0 -9
  223. package/dist-cli/chunks/chunk-SWBUNMQS.js +0 -4
  224. package/dist-cli/chunks/chunk-SXBFGGAM.js +0 -4
  225. package/dist-cli/chunks/chunk-T4ISWS5H.js +0 -4
  226. package/dist-cli/chunks/chunk-TPPVAA7Z.js +0 -5
  227. package/dist-cli/chunks/chunk-USM3P74H.js +0 -4
  228. package/dist-cli/chunks/chunk-V4EJJHF5.js +0 -4
  229. package/dist-cli/chunks/chunk-V7RGRZOL.js +0 -423
  230. package/dist-cli/chunks/chunk-XUBV77WH.js +0 -130
  231. package/dist-cli/chunks/chunk-XYSDYGKC.js +0 -4
  232. package/dist-cli/chunks/chunk-YNHRSDVG.js +0 -5
  233. package/dist-cli/chunks/chunk-YX52RJKO.js +0 -4
  234. package/dist-cli/chunks/chunk-Z5O5H4O7.js +0 -99
  235. package/dist-cli/chunks/chunk-Z6LOIW46.js +0 -7
  236. package/dist-cli/chunks/chunk-ZXFVBYJY.js +0 -5
  237. package/dist-cli/chunks/cleanup-KPUW4SFK.js +0 -25
  238. package/dist-cli/chunks/cli-version-APGT6GAT.js +0 -4
  239. package/dist-cli/chunks/compat-XXRFD2TW.js +0 -23
  240. package/dist-cli/chunks/config-DDMFDQ7F.js +0 -13
  241. package/dist-cli/chunks/connect-IPG47YXM.js +0 -4
  242. package/dist-cli/chunks/control-O22Z3UJ5.js +0 -4
  243. package/dist-cli/chunks/daemon-PADUIMJV.js +0 -4
  244. package/dist-cli/chunks/debug-MYIP46TM.js +0 -200
  245. package/dist-cli/chunks/desktop-ENFFBQAA.js +0 -31
  246. package/dist-cli/chunks/detox-J5WVK6OH.js +0 -52
  247. package/dist-cli/chunks/device-RAVQVL75.js +0 -18
  248. package/dist-cli/chunks/diagnose-PJMPXKJY.js +0 -43
  249. package/dist-cli/chunks/disk-cleanup-YLAY445J.js +0 -4
  250. package/dist-cli/chunks/do-chain-UBE7GIOU.js +0 -5
  251. package/dist-cli/chunks/drivers-ZFNX3T5Z.js +0 -4
  252. package/dist-cli/chunks/env-Y5XJSNRD.js +0 -4
  253. package/dist-cli/chunks/film-W3V6VURB.js +0 -74
  254. package/dist-cli/chunks/flow-VMLI7BYM.js +0 -4
  255. package/dist-cli/chunks/help-PKZCWHJJ.js +0 -4
  256. package/dist-cli/chunks/hidden-runtime-alias-S5DJ7EDF.js +0 -4
  257. package/dist-cli/chunks/home-paths-5O4IZPYV.js +0 -4
  258. package/dist-cli/chunks/inspect-LT4MXK37.js +0 -4
  259. package/dist-cli/chunks/install-desktop-EXCFMXFS.js +0 -4
  260. package/dist-cli/chunks/login-V6TZ54ZH.js +0 -26
  261. package/dist-cli/chunks/logout-SPMLFWYA.js +0 -4
  262. package/dist-cli/chunks/maestro-5ISTBAZE.js +0 -108
  263. package/dist-cli/chunks/maestro-generate-WUI64NHR.js +0 -36
  264. package/dist-cli/chunks/mode-QPNBYXUF.js +0 -26
  265. package/dist-cli/chunks/optional-demo-registry-CBSYF4CG.js +0 -4
  266. package/dist-cli/chunks/perf-T6N5PVYV.js +0 -48
  267. package/dist-cli/chunks/permissions-YZ7RRSZJ.js +0 -13
  268. package/dist-cli/chunks/platform-XDQAA72X.js +0 -6
  269. package/dist-cli/chunks/privacy-54FIGXLT.js +0 -4
  270. package/dist-cli/chunks/record-QGYXRUKP.js +0 -72
  271. package/dist-cli/chunks/report-issue-VUUTGX7V.js +0 -29
  272. package/dist-cli/chunks/reset-CGO52KBW.js +0 -4
  273. package/dist-cli/chunks/resolve-target-NNQCALDM.js +0 -4
  274. package/dist-cli/chunks/runtime-4EP6YJVL.js +0 -4
  275. package/dist-cli/chunks/screenshot-command-NZCMSJ4P.js +0 -159
  276. package/dist-cli/chunks/screenshot-layers-VMTQ6XIU.js +0 -20
  277. package/dist-cli/chunks/screenshots-capture-K3MWIDBK.js +0 -42
  278. package/dist-cli/chunks/serve-QJRIB2BV.js +0 -56
  279. package/dist-cli/chunks/setup-6XXEJQVF.js +0 -4
  280. package/dist-cli/chunks/sim-client-5YUVL45C.js +0 -4
  281. package/dist-cli/chunks/skills-T3CS7CXK.js +0 -50
  282. package/dist-cli/chunks/state-AJC3VK3G.js +0 -14
  283. package/dist-cli/chunks/storage-KVGZKC3Y.js +0 -37
  284. package/dist-cli/chunks/store-AWUMOQUH.js +0 -4
  285. package/dist-cli/chunks/telemetry-W5ZDGWK6.js +0 -4
  286. package/dist-cli/chunks/timeline-DXDCAZUA.js +0 -24
  287. package/dist-cli/chunks/upgrade-SRPTJACU.js +0 -7
  288. package/dist-cli/chunks/upload-ZDV4BFED.js +0 -4
  289. package/dist-cli/chunks/version-SOLPSBMG.js +0 -6
  290. package/dist-cli/chunks/web-RT75LD7A.js +0 -4
  291. package/dist-cli/chunks/welcome-IJ55EC7U.js +0 -5
  292. package/dist-cli/chunks/what-happened-CEIWJIWK.js +0 -25
  293. package/dist-cli/chunks/ws-bridge-YK5R3HOI.js +0 -4
  294. package/scripts/postinstall.cjs +0 -3
  295. package/scripts/preuninstall.cjs +0 -118
@@ -1,7 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{execFileSync as m,spawn as g}from"child_process";import{existsSync as s,readdirSync as x}from"fs";import{dirname as h,join as c,resolve as a}from"path";import{fileURLToPath as w}from"url";var l;function p(){if(l!==void 0)return l;try{l=h(w(import.meta.resolve("sootsim-engine/package.json")))}catch{l=null}return l}var k="dev.sootsim.simulator";function v(){let e=p();if(!e)return null;let n=c(e,"dist-electron/main.cjs");if(!s(n))return null;let i=P(e);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:e}:null}function I(){let e=p();return e?s(c(e,"src-electron/main.ts")):!1}function P(e){let n=e;for(let i=0;i<6;i++){let r=c(n,"node_modules/.bin/electron");if(s(r))return r;let t=h(n);if(t===n)break;n=t}return null}function b(){let e=p(),i=["/Applications/rnx.app",a(process.env.HOME||"","Applications/rnx.app"),...e?[a(e,"app/rnx.app")]:[]].find(r=>s(r));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let r=m("mdfind",[`kMDItemCFBundleIdentifier == "${k}"`],{encoding:"utf8",timeout:3e3}).trim();if(r)return{path:r.split(`
5
- `)[0],platform:"darwin",kind:"mac-app"}}catch{}return null}function f(e){if(!s(e))return null;let n=x(e).filter(i=>i.startsWith("rnx")&&i.endsWith(".AppImage")).sort().reverse()[0];return n?c(e,n):null}function C(){let e=p(),i=[a(process.env.HOME||"","Applications/rnx.AppImage"),a(process.env.HOME||"",".local/bin/rnx.AppImage"),"/opt/rnx/rnx.AppImage","/opt/rnx/rnx",...e?[a(e,"app/rnx.AppImage"),a(e,"release/linux-unpacked/rnx")]:[]].find(t=>s(t));if(i)return{path:i,platform:"linux",kind:i.endsWith(".AppImage")?"linux-appimage":"linux-binary"};let r=e?f(a(e,"app"))||f(a(e,"release")):null;return r?{path:r,platform:"linux",kind:"linux-appimage"}:null}function D(){for(let e of["HKCU","HKLM"])try{let n=m("reg",["query",`${e}\\Software\\Classes\\rnx\\shell\\open\\command`,"/ve"],{encoding:"utf8",timeout:3e3}),i=/"([^"\r\n]+\.exe)"/i.exec(n)?.[1];if(i&&s(i))return{path:i,platform:"win32",kind:"win-exe"}}catch{}return null}function A(){let e=v();if(e)return e;if(I()){let n=p(),i=c(n,"dist-electron/main.cjs");return s(i)?console.error(` no node_modules/.bin/electron found near ${n}. run \`bun install\`.`):console.error(` dist-electron/main.cjs missing in ${n}.
6
- run: bun run --cwd packages/sootsim-engine build:electron-main
7
- (or keep it fresh with: bun run watch:sootsim:electron-main)`),null}return process.platform==="darwin"?b():process.platform==="linux"?C():process.platform==="win32"?D():null}async function d(e,n,i={}){let r=i.inheritStdio?["ignore","inherit","inherit"]:"ignore";await new Promise((t,o)=>{let u=g(e,n,{detached:!0,stdio:r});u.once("error",o),u.once("spawn",()=>{u.unref(),t()})})}async function R(e,n=A(),i={}){if(!n)return{launched:!1};let r=[];if(i.device&&r.push(`--device=${i.device}`),i.profileId&&r.push(`--profile=${i.profileId}`),i.ephemeralProfile&&r.push("--ephemeral-profile"),i.ownerPid&&i.ownerPid>1&&r.push(`--owner-pid=${i.ownerPid}`),n.kind==="mac-app"){let o=["-g","-a",n.path];return e&&o.push(S(e,i)),r.length>0&&o.push("--args",...r),await d("open",o),{launched:!0,via:"mac-app",target:n.path}}if(n.kind==="dev-electron"){let o=["--no-sandbox",n.engineDir||p()];return e&&o.push(e),r.length>0&&o.push(...r),await d(n.path,o,{inheritStdio:!0}),{launched:!0,via:"dev-electron",target:n.path}}let t=[];return e&&t.push(e),r.length>0&&t.push(...r),await d(n.path,t),{launched:!0,via:n.kind,target:n.path}}function S(e,n){if(!n.profileId&&!n.ephemeralProfile&&!n.ownerPid)return e;let i=new URL("rnx://dev");return i.searchParams.set("url",e),n.profileId&&i.searchParams.set("profile",n.profileId),n.ephemeralProfile&&i.searchParams.set("ephemeral","1"),n.ownerPid&&n.ownerPid>1&&i.searchParams.set("ownerPid",String(n.ownerPid)),i.toString()}export{A as a,R as b};
@@ -1,5 +0,0 @@
1
- /*! rnx v0.1.375 | (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 f}from"./chunk-7NCPUZ52.js";import{existsSync as m,mkdirSync as g,readFileSync as h,writeFileSync as S,rmSync as F}from"fs";import{tmpdir as y}from"os";import{dirname as b,join as p}from"path";var w=new Map;function o(e,n){w.set(e,n)}var s=1;function a(){return p(y(),`sootsim-cli-hints-${f()}.json`)}function d(){return p(y(),"sootsim-cli-hints-global.json")}function u(e){if(!m(e))return{version:s,shown:{}};try{let n=JSON.parse(h(e,"utf8"));return n?.version!==s||!n?.shown?{version:s,shown:{}}:n}catch{return{version:s,shown:{}}}}function l(e,n){try{g(b(e),{recursive:!0}),S(e,JSON.stringify(n)+`
5
- `)}catch{}}function v(){let e=(process.env.SOOTSIM_HINTS||"").toLowerCase();return e==="off"||e==="0"||e==="false"?"off":e==="always"||e==="verbose"?"always":"normal"}function x(e,n){let i=v();if(i==="off")return!1;if(i==="always"||n==="always")return!0;let t=Date.now();if(n==="once-per-identity"){let r=u(a());return r.shown[e]?!1:(r.shown[e]=t,l(a(),r),!0)}if(n==="once-ever"){let r=u(d());return r.shown[e]?!1:(r.shown[e]=t,l(d(),r),!0)}if(typeof n=="object"&&"cooldownMs"in n){let r=u(a()),c=r.shown[e]??0;return t-c<n.cooldownMs?!1:(r.shown[e]=t,l(a(),r),!0)}return!0}function A(e,...n){let i=w.get(e);if(!i)return process.env.SOOTSIM_HINTS_DEBUG&&console.error(` [hints] no hint registered for id "${e}"`),!1;if(!x(e,i.frequency))return!1;let t=i.render(...n);if(t==null)return!1;let r=Array.isArray(t)?t:[t];for(let c of r)console.error(` hint: ${c}`);return!0}o("app-still-loading",{frequency:{cooldownMs:6e4},render:e=>`app may still be loading (${e} nodes). run \`rnx wait ready\` first.`});o("wait-selector-for-missing-testid",{frequency:"once-per-identity",render:e=>`rnx wait selector ${e}`});o("prefer-cli-over-eval",{frequency:"once-per-identity",render:e=>e.length?["try the CLI shortcut instead:",...e.map(n=>` ${n}`)]:null});o("describe-use-filters",{frequency:"once-per-identity",render:()=>["describe output is long. narrow it with:"," rnx describe --only '*Bottom Sheet*'"," rnx describe --testid-like 'swap-*'"," rnx describe --subtree <testID>"]});o("describe-filter-context",{frequency:"once-per-identity",render:()=>["filtered describe is search output, not current-route proof.","run `rnx describe` without filters after navigation; clipped nodes are marked `(clipped:...)`."]});o("subtree-root-not-found",{frequency:"always",render:e=>`no node with testID/id "${e}" \u2014 try \`rnx find --testid ${e}\` to discover available ids.`});o("clean-uninstall",{frequency:"once-ever",render:()=>["to remove the background daemon and all ~/.sootsim data, run `rnx daemon uninstall`.","the optional desktop app and its macOS preference plist are separate from the daemon."]});export{A as a};
@@ -1,25 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as r,d as g,e as f,f as v}from"./chunk-2IUMRRYV.js";import"./chunk-K7QQWKGE.js";import"./chunk-F5F7FIPM.js";import"./chunk-HWDVC6YA.js";import"./chunk-25KRGDZT.js";import"./chunk-DQUPSAHE.js";var $={"browser-cache":"browser caches","camera-fixture":"staged camera fixture videos",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(s){let i=new Map;for(let o of s){let n=i.get(o.kind)??{bytes:0,count:0};n.bytes+=o.bytes,n.count++,i.set(o.kind,n)}return[...i].sort((o,n)=>n[1].bytes-o[1].bytes).map(([o,n])=>` ${$[o]}: ${r(n.bytes)} (${n.count} ${n.count===1?"item":"items"})`)}function h(){console.log(`
5
- rnx cleanup \u2014 inspect and reclaim local rnx disk usage
6
-
7
- usage:
8
- rnx cleanup
9
- rnx cleanup --apply
10
- rnx cleanup --aggressive
11
- rnx cleanup --apply --aggressive
12
-
13
- The default is a read-only preview. --apply removes downloaded runtime archives,
14
- old runtimes outside a two-version rollback window, and disposable browser
15
- caches. It never removes the active runtime, a runtime serving a connected
16
- simulator, cookies, localStorage, IndexedDB, service workers, or other persistent
17
- app storage.
18
-
19
- --aggressive additionally removes the rollback runtime plus user-created
20
- recordings and captured frames. It still preserves the active runtime and app storage.
21
- `)}async function S(s){if(s.length===1&&s[0]==="--automatic-worker")try{let e=v();return e.status==="complete"?process.stderr.write(e.reclaimedBytes>0?` rnx automatic cleanup reclaimed ${r(e.reclaimedBytes)}; active runtimes and app data were kept.
22
- `:` rnx automatic cleanup found no obsolete local data.
23
- `):e.status==="deferred"&&process.stderr.write(` rnx automatic cleanup reclaimed ${r(e.reclaimedBytes)}; ${r(e.deferredInUseBytes)} is in use and will be retried on a later run.
24
- `),0}catch(e){return process.stderr.write(` rnx automatic cleanup will retry on the next run: ${e instanceof Error?e.message:String(e)}
25
- `),0}if(s.includes("--help")||s.includes("-h"))return h(),0;let i=new Set(["--aggressive","--apply"]),o=s.find(e=>!i.has(e));if(o)return console.error(` cleanup: unknown option ${o}`),h(),1;let n=s.includes("--aggressive"),l=s.includes("--apply"),t=g({aggressive:n}),c=t.entries.filter(e=>e.selected).filter(e=>e.state==="safe"),u=t.entries.filter(e=>e.state==="aggressive"&&e.selected),d=t.entries.filter(e=>e.state==="in-use"),m=d.filter(e=>e.kind==="browser-cache"),w=d.filter(e=>e.kind==="runtime-version"),p=t.entries.find(e=>e.kind==="runtime-version"&&e.state==="aggressive");console.log(` rnx data home: ${t.home}`),console.log(` current size: ${r(t.totalBytes)}`),console.log(` active runtime: ${t.activeRuntime??"(none installed)"}`),console.log(""),console.log(l?" safe items selected for removal:":" safe to reclaim:");for(let e of y(c))console.log(e);if(c.length===0&&console.log(" nothing"),u.length>0){console.log(""),console.log(" aggressive additions:");for(let e of y(u))console.log(e)}console.log(""),console.log(" protected:"),t.activeRuntime&&console.log(` active runtime ${t.activeRuntime} (in use)`);for(let e of w)console.log(` running daemon runtime ${e.path}`);if(p&&!n&&console.log(` rollback runtime ${p.path}`),console.log(" cookies, localStorage, IndexedDB, service workers, and profile data"),n||console.log(" recordings and captured frames (use --aggressive to remove)"),m.length>0&&console.log(` ${r(m.reduce((e,b)=>e+b.bytes,0))} of browser cache is open; close rnx and rerun cleanup`),console.log(""),console.log(` reclaimable now: ${r(t.reclaimableBytes)}`),!l)return console.log(` preview only \u2014 run \`rnx cleanup --apply${n?" --aggressive":""}\` to remove these items`),0;let a=f({aggressive:n});return console.log(` removed ${a.removedPaths.length} ${a.removedPaths.length===1?"item":"items"}; reclaimed ${r(a.reclaimedBytes)}`),console.log(` remaining rnx data: ${r(a.remainingBytes)}`),0}export{S as runCleanup};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (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}from"./chunk-4EUKOIAV.js";import"./chunk-25KRGDZT.js";import"./chunk-DQUPSAHE.js";export{a as getCliVersion};
@@ -1,23 +0,0 @@
1
- /*! rnx v0.1.375 | (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,g as m,i as w,j as y}from"./chunk-V4EJJHF5.js";import"./chunk-DQUPSAHE.js";import{existsSync as $,readFileSync as O}from"node:fs";import{dirname as E,join as V,relative as M,resolve as j}from"node:path";import{existsSync as a,readFileSync as g,readdirSync as R,statSync as C}from"fs";import{basename as N,dirname as J,join as c}from"path";var b=["ts","js","cjs","mjs","mts","cts"];function v(e){let n=e;for(;;){if(a(c(n,"turbo.json"))||a(c(n,"nx.json"))||a(c(n,"lerna.json"))||a(c(n,"pnpm-workspace.yaml")))return n;let t=c(n,"package.json");if(a(t))try{if(JSON.parse(g(t,"utf8")).workspaces)return n}catch{}let s=J(n);if(s===n)break;n=s}return e}function T(e){return a(c(e,"bun.lock"))||a(c(e,"bun.lockb"))?"bun":a(c(e,"pnpm-lock.yaml"))?"pnpm":a(c(e,"yarn.lock"))?"yarn":"npm"}function F(e){if(a(c(e,"turbo.json")))return"turbo";if(a(c(e,"nx.json")))return"nx";if(a(c(e,"pnpm-workspace.yaml")))return"pnpm";let n=c(e,"package.json");if(a(n))try{if(JSON.parse(g(n,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function W(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function h(e){let n=c(e,"package.json");if(!a(n))return null;let t;try{t=JSON.parse(g(n,"utf8"))}catch{return null}let s={...t.dependencies,...t.devDependencies},r=W(s);return r==="unknown"?null:{dir:e,name:t.name||N(e),framework:r,hasViteConfig:b.some(o=>a(c(e,`vite.config.${o}`))),hasMetroConfig:b.some(o=>a(c(e,`metro.config.${o}`))),devCommand:t.scripts?.dev||null}}function A(e){let n=[],t=c(e,"pnpm-workspace.yaml");if(a(t)){let o=g(t,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(o){let i=o[1].split(`
5
- `).filter(Boolean);for(let f of i){let p=f.replace(/^\s*-\s*['"]?/,"").replace(/['"]?\s*$/,"");p&&n.push(...P(e,p))}}return n}let s=c(e,"package.json");if(a(s))try{let r=JSON.parse(g(s,"utf8")),o=Array.isArray(r.workspaces)?r.workspaces:r.workspaces?.packages||[];for(let i of o)n.push(...P(e,i))}catch{}return n}function P(e,n){let t=n.replace(/\/\*\*?$/,"").replace(/\*$/,""),s=c(e,t);if(!a(s))return[];try{return R(s).map(o=>c(s,o)).filter(o=>{try{return C(o).isDirectory()&&a(c(o,"package.json"))}catch{return!1}})}catch{return[]}}function S(e){let n=F(e),t=T(e);if(n==="single"){let i=h(e);return{root:e,type:n,packageManager:t,apps:i?[i]:[]}}let s=A(e),r=[],o=h(e);o&&r.push(o);for(let i of s){if(i===e)continue;let f=h(i);f&&r.push(f)}return{root:e,type:n,packageManager:t,apps:r}}async function z(e){if(e.includes("--help")||e.includes("-h")){console.log(`
6
- rnx compat \u2014 check package compatibility
7
-
8
- usage:
9
- rnx compat [package-name]
10
- rnx compat --json
11
- rnx compat --brief
12
-
13
- flags:
14
- --json machine-readable output
15
- --brief one-line summary
16
- --app <dir> target directory (default: cwd)
17
- `);return}let n=e.indexOf("--app"),t=n>=0&&e[n+1]?j(e[n+1]):process.cwd(),s=e.find((p,l)=>!p.startsWith("-")&&(n<0||l!==n+1)),r=D(t);if(!r){console.error(` no package.json found in ${t}`),process.exitCode=1;return}if(s){k(e,_(t,r,s));return}let o=d(x(t,r));if(o.packages.length>0||n>=0){k(e,o);return}let i=v(t),f=S(i).apps.flatMap(p=>{if(j(p.dir)===t)return[];let l=D(p.dir);if(!l)return[];let u=d(x(p.dir,l));return u.packages.length>0?[{dir:p.dir,result:u}]:[]});if(f.length===1){let p=f[0];console.log(`
18
- scanning ${M(t,p.dir)||"."}`),k(e,p.result);return}if(f.length>1){console.log(`
19
- this workspace has more than one app. scan one with --app:`);for(let p of f)console.log(` rnx compat --app ${M(t,p.dir)}`);console.log();return}k(e,o)}function k(e,n){if(e.includes("--json")){console.log(JSON.stringify(n,null,2));return}if(e.includes("--brief")){console.log(` ${m(n)}`),console.log(` ${y}`);return}console.log(`
20
- rnx compatibility report`),console.log(` ${m(n)}
21
- `);for(let r of w(n))console.log(` ${r}`);let t=n.packages.filter(r=>r.status==="full").length;t>0&&console.log(` supported: ${t} packages`);let s=n.packages.filter(r=>r.status==="not-relevant").length;s>0&&console.log(` not relevant at runtime: ${s} packages`),n.packages.length===0&&console.log(" no React Native ecosystem packages detected"),console.log(`
22
- ${y}
23
- `)}function x(e,n){let t=(r,o)=>{let i=e;for(;;){let f=V(i,"node_modules",r,"package.json");if($(f)){try{let l=JSON.parse(O(f,"utf8"));if(l&&typeof l=="object"&&"version"in l){let u=l.version;if(typeof u=="string")return u}}catch{}return o}let p=E(i);if(p===i)return o;i=p}},s=r=>r&&Object.fromEntries(Object.entries(r).map(([o,i])=>[o,t(o,i)]));return{name:n.name,dependencies:s(n.dependencies),devDependencies:s(n.devDependencies)}}function D(e){let n=j(e,"package.json");if(!$(n))return null;let t=JSON.parse(O(n,"utf8"));return t&&typeof t=="object"?t:null}function _(e,n,t){let s=x(e,n),r=s.dependencies?.[t]??s.devDependencies?.[t]??"*";return d({dependencies:{[t]:r}})}export{z as runCompat};
@@ -1,13 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as r}from"./chunk-T4ISWS5H.js";import{F as i,G as s,z as t}from"./chunk-HWDVC6YA.js";import"./chunk-DQUPSAHE.js";function f(){let e=i(),n=e.configured&&e.productAnalytics;console.log(` bounded diagnostics are ${n?"ON":"OFF"}`),console.log(" permitted fields: package name/version/unsupported API or error class"),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function c(e){let n=e.find(o=>!o.startsWith("-"))?.toLowerCase();switch(n){case void 0:case"status":f();return;case"on":s({productAnalytics:!0,crashReports:!1}),console.log(" bounded diagnostics ON"),console.log(` config: ${t()}`);return;case"off":s({productAnalytics:!1,crashReports:!1}),console.log(" bounded diagnostics OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${n}`),console.error(" usage: rnx config telemetry [on|off|status]"),r(1)}}function l(){console.log(`
5
- rnx config \u2014 manage local CLI preferences
6
-
7
- usage:
8
- rnx config telemetry [on|off|status]
9
-
10
- environment:
11
- SOOTSIM_HINTS=off suppress CLI hints
12
- SOOTSIM_HINTS=always show every CLI hint every time
13
- `)}async function p(e){if(e.includes("--help")||e.includes("-h")){l();return}let n=e.find(o=>!o.startsWith("-"));if(n==="telemetry"){let o=e.indexOf(n);await c([...e.slice(0,o),...e.slice(o+1)]);return}console.error(` unknown config command: ${n??"(missing)"}`),l(),r(1)}export{p as runConfig};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as s,i as p}from"./chunk-LAOKTKT4.js";import"./chunk-V7RGRZOL.js";import"./chunk-YX52RJKO.js";import"./chunk-C6B5FOP3.js";import"./chunk-5PZVYF42.js";import{g as f,n as a,u as d}from"./chunk-7NCPUZ52.js";import"./chunk-GEX7RVHY.js";import"./chunk-HWDVC6YA.js";import"./chunk-DQUPSAHE.js";function g(c,i,o){let e=c.filter(n=>n.readyState==="open");if(i){let n=e.find(r=>r.id===i);if(!n)throw new s(`no sim connected with id ${i} on bridge :${o}`+(e.length?` \u2014 connected: ${e.map(r=>r.id).join(", ")}`:" \u2014 no sims connected; open one with `rnx open <port>`"));return n}let t=f();if(t){let n=e.find(r=>r.id===t);if(n)return n}let m=e.find(n=>n.isPrimary)??e[0];if(!m)throw new s(`no sims connected on bridge :${o} \u2014 open one with \`rnx open <port>\``);return m}async function S(c={}){let i=c.port??a().bridgePort,o=c.timeoutMs??15e3,e=d(i,{commandTimeoutMs:o,cliLabel:"sdk"}),t;try{t=g(await e.listSims(),c.sim,i)}catch(n){if(e.close(),n instanceof s)throw n;let r=n instanceof Error?n.message:String(n);throw new s(`${r} \u2014 is the rnx daemon or dev shell running?`)}e.close();let m=d(i,{commandTimeoutMs:o,cliLabel:"sdk",simId:t.id,simIdSource:"flag"});return new p(m,t.id,{commandTimeoutMs:o})}export{S as connect};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (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,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w}from"./chunk-EWPAI4MO.js";import"./chunk-XYSDYGKC.js";import"./chunk-PNRJFHX4.js";import"./chunk-HNDWYCND.js";import"./chunk-YNHRSDVG.js";import"./chunk-USM3P74H.js";import"./chunk-CX7VCKAT.js";import"./chunk-Z6LOIW46.js";import"./chunk-2BRBFLWA.js";import"./chunk-C6B5FOP3.js";import"./chunk-5PZVYF42.js";import"./chunk-FZDRA7Z4.js";import"./chunk-4ZXR2M3D.js";import"./chunk-PBOWUNXO.js";import"./chunk-MP2GPO4T.js";import"./chunk-TPPVAA7Z.js";import"./chunk-H4MYYOYJ.js";import"./chunk-7NCPUZ52.js";import"./chunk-GEX7RVHY.js";import"./chunk-T4ISWS5H.js";import"./chunk-K7QQWKGE.js";import"./chunk-F5F7FIPM.js";import"./chunk-LMHBU5LZ.js";import"./chunk-HWDVC6YA.js";import"./chunk-25KRGDZT.js";import"./chunk-DQUPSAHE.js";export{d as applyRuntimeGenerationOrigin,h as buildOpenUrl,g as buildShellUrl,u as closeSimsBulk,b as ensureBridgeForOpen,v as planBulkCloseTargets,m as playwrightHostPidForSim,j as printConnectedSims,c as resolveBundleTarget,e as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,f as resolveShellBaseUrlForBridgePort,t as runClaimCommand,w as runCloseCommand,s as runFocusCommand,p as runLinkCommand,q as runOpenCommand,r as runUseCommand,n as signalDriverLaunchConnected,i as summarizeSimUrl,o as terminatePlaywrightHostsForSims,k as waitForSimMatch,l as waitForSimMatchOrHostExit};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (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,e,f}from"./chunk-2GXNAZHB.js";import"./chunk-4ALPWIMP.js";import"./chunk-HNPHODBD.js";import"./chunk-ZXFVBYJY.js";import"./chunk-AQ5TMOAI.js";import"./chunk-TPPVAA7Z.js";import"./chunk-H4MYYOYJ.js";import"./chunk-7NCPUZ52.js";import"./chunk-GEX7RVHY.js";import"./chunk-T4ISWS5H.js";import"./chunk-XUBV77WH.js";import"./chunk-HWDVC6YA.js";import"./chunk-4EUKOIAV.js";import"./chunk-25KRGDZT.js";import"./chunk-DQUPSAHE.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,e as teardownDaemonService,d as teardownLegacyMacDaemonArtifacts,f as teardownSootsimHome};
@@ -1,200 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{f as b,m as I}from"./chunk-2BRBFLWA.js";import{I as O,J as T,K as C,L as R,M as A}from"./chunk-5PZVYF42.js";import{t as S,v as N,x as D}from"./chunk-7NCPUZ52.js";import"./chunk-GEX7RVHY.js";import{b as _,c as u}from"./chunk-T4ISWS5H.js";import"./chunk-HWDVC6YA.js";import"./chunk-DQUPSAHE.js";var L=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],H="__sootsimShellAnimationTrace",z="__sootsimDebugAnimation";function E(){console.log(`
5
- rnx debug \u2014 drive __sootsimDebug from the terminal
6
-
7
- usage:
8
- rnx debug <subcommand> [args]
9
-
10
- subcommands:
11
- enable <channels> turn on one or more debug channels
12
- channels: ${L.slice(0,-1).join(", ")}
13
- or 'all' for every channel
14
- disable <channels> turn off one or more debug channels (or 'all')
15
- toggle <channel> flip a single channel
16
- status list currently-enabled channels
17
- channels list every known channel name
18
- flags print the full DEBUG flag object
19
-
20
- state <kind> ... dump raw runtime state (diagnostic \u2014 not a getter)
21
- kinds: shell, worker, keyboard, node <id>,
22
- scroll <id>, scroll-hit <x> <y>,
23
- hit <x> <y>, gesture <x> <y>
24
-
25
- js <code> execute javascript in the running app. SootSim
26
- is the canonical state object \u2014 reach into its
27
- bridges / state / chrome / debug slots directly.
28
- e.g. SootSim.bridges.test.findByText("Sign in")
29
- eval <code> alias for js
30
- perf <sub> shell frame profiling: start, stop, transition
31
- memory [--watch [s]] per-worker object counts + heaps; --watch samples
32
- every --interval seconds and reports slopes
33
- sample-color <...> sample averaged color from canvas (same flags as
34
- screenshot)
35
-
36
- snapshot [label] capture a tree snapshot (layout + transform + opacity)
37
- snapshots list taken snapshot labels
38
- diff <a> <b> compare two snapshots by label
39
- clear-snapshots [label] drop a snapshot (or all if no label given)
40
-
41
- image-audit for every image the compositor actually drew, the
42
- source pixels it landed on each device pixel. a row
43
- whose shortfall is well under 1.0 is an image the
44
- pipeline under-resolved; 0.5 is half resolution.
45
- flags: --min <ratio> (default 0.98), --all, --json
46
- exits 1 when any image is under the ratio, and 2 when
47
- the audit observed no image draws at all
48
-
49
- find sheets dump Sheet.Frame-shaped nodes currently in the tree
50
- find portals dump portal-host / portal-view nodes
51
- find boundaries dump live paint boundaries (+ why scroll rows were
52
- rejected from the auto-retained raster tier)
53
-
54
- trace shell [cmd] opt-in shell animation trace
55
- cmds: on [limit], off, status, clear, [recentLimit]
56
- trace anim <sub> opt-in per-tick animation value trace
57
- subs: on <id|all> [limit], off [id|all],
58
- status, clear, <id> [limit]
59
- record [on|off] toggle event ring buffer recording
60
- recent [channel] [n] last N events (default 50), optionally filtered
61
- clear-events clear the event ring buffer
62
-
63
- options:
64
- --port <port> WS bridge port (default: ${7668})
65
- --sim <sim> target a specific connected sim
66
- --pretty format JSON output for humans (default)
67
- --json compact JSON output for pipelines
68
-
69
- examples:
70
- rnx debug enable sheets,portals
71
- rnx debug snapshot before
72
- rnx debug snapshot after
73
- rnx debug diff before after
74
- rnx debug image-audit per-image source pixels per device pixel
75
- rnx debug find sheets | jq '.[] | select(.translateY != null)'
76
- rnx debug trace shell on 240
77
- rnx debug trace shell 120
78
- rnx debug trace anim on 3 240
79
- rnx debug trace anim 3 60
80
- `)}function B(t){return t?t.split(",").map(a=>a.trim()).filter(Boolean):[]}function i(t,a){return t===void 0?"":JSON.stringify(t,null,a?2:0)}function x(t,a=240){let d=Number.isFinite(a)&&a>0?Math.max(1,Math.round(a)):240,g=JSON.stringify(H),p=JSON.stringify(z);return t==="on"?`(() => {
81
- const root = window
82
- const store = root[${g}] || (root[${g}] = {
83
- enabled: false,
84
- limit: ${d},
85
- seq: 0,
86
- samples: [],
87
- prevHook: undefined,
88
- hook: undefined,
89
- })
90
- store.limit = ${d}
91
- store.enabled = true
92
- const currentHook = root[${p}]
93
- if (store.hook !== currentHook) {
94
- store.prevHook = typeof currentHook === 'function' ? currentHook : undefined
95
- }
96
- if (typeof store.hook !== 'function') {
97
- store.hook = (sample) => {
98
- const target = root[${g}]
99
- if (!target || target.enabled !== true) return
100
- const samples = Array.isArray(target.samples) ? target.samples : (target.samples = [])
101
- target.seq = typeof target.seq === 'number' ? target.seq + 1 : 1
102
- samples.push({ seq: target.seq, ...sample })
103
- if (samples.length > target.limit) {
104
- samples.splice(0, samples.length - target.limit)
105
- }
106
- if (typeof target.prevHook === 'function') {
107
- try {
108
- target.prevHook(sample)
109
- } catch {}
110
- }
111
- }
112
- }
113
- root[${p}] = store.hook
114
- return {
115
- enabled: true,
116
- limit: store.limit,
117
- count: Array.isArray(store.samples) ? store.samples.length : 0,
118
- }
119
- })()`:t==="off"?`(() => {
120
- const root = window
121
- const store = root[${g}]
122
- if (!store) return { enabled: false, limit: 0, count: 0 }
123
- store.enabled = false
124
- if (root[${p}] === store.hook) {
125
- root[${p}] = typeof store.prevHook === 'function' ? store.prevHook : undefined
126
- }
127
- return {
128
- enabled: false,
129
- limit: typeof store.limit === 'number' ? store.limit : 0,
130
- count: Array.isArray(store.samples) ? store.samples.length : 0,
131
- }
132
- })()`:t==="clear"?`(() => {
133
- const store = window[${g}]
134
- if (!store) return { cleared: true, count: 0 }
135
- store.samples = []
136
- store.seq = 0
137
- return {
138
- cleared: true,
139
- enabled: store.enabled === true,
140
- limit: typeof store.limit === 'number' ? store.limit : 0,
141
- count: 0,
142
- }
143
- })()`:`(() => {
144
- const store = window[${g}]
145
- return {
146
- enabled: !!store?.enabled,
147
- limit: typeof store?.limit === 'number' ? store.limit : 0,
148
- count: Array.isArray(store?.samples) ? store.samples.length : 0,
149
- }
150
- })()`}function J(t=50){let a=Number.isFinite(t)&&t>0?Math.max(1,Math.round(t)):50;return`(() => {
151
- const store = window[${JSON.stringify(H)}]
152
- const all = Array.isArray(store?.samples) ? store.samples : []
153
- const samples = all.slice(-${a})
154
- const first = samples[0] ?? null
155
- const last = samples[samples.length - 1] ?? null
156
- const uniquePhases = [...new Set(samples.map((sample) => sample?.phase).filter(Boolean))]
157
- const metricRange = (key) => {
158
- const values = samples
159
- .map((sample) => (typeof sample?.[key] === 'number' ? sample[key] : null))
160
- .filter((value) => value != null)
161
- if (values.length === 0) return null
162
- return {
163
- min: Math.min(...values),
164
- max: Math.max(...values),
165
- }
166
- }
167
- return {
168
- enabled: !!store?.enabled,
169
- limit: typeof store?.limit === 'number' ? store.limit : 0,
170
- count: samples.length,
171
- total: all.length,
172
- summary: first && last ? {
173
- durationMs: last.ts - first.ts,
174
- phases: uniquePhases,
175
- start: first,
176
- end: last,
177
- zoomLevel: metricRange('zoomLevel'),
178
- horizontalZoom: metricRange('horizontalZoom'),
179
- launchProgress: metricRange('launchProgress'),
180
- dismissOffsetY: metricRange('dismissOffsetY'),
181
- } : null,
182
- samples,
183
- }
184
- })()`}async function m(t,a){return D(t,a)}function V(t,a){let d=t.indexOf(a);if(d<0)return null;let g=Number(t[d+1]);return Number.isFinite(g)?g:null}async function W(t){await m(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'enable').then(() => 'enabled')"),await t.send({type:"screenshot"});let d=(await m(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'disable').then((s) => ({ imageAudit: s.imageAudit }))"))?.imageAudit;if(!d)throw new Error("compositor returned no image audit");return d}function F(t){return t===null?" - ":t.toFixed(3).padStart(6)}function K(t){let a=t.sourceUri??t.testID??`node ${t.nodeId}`;return a.length<=58?a:`...${a.slice(-55)}`}function G(t,a,d){let p=t.rows.filter(c=>c.shortfall!==null).filter(c=>c.shortfall<d);if(console.log(` ${t.rows.length} images drawn (${t.draws} draws), ${p.length} below ${d} of what their source could deliver`),console.log(` sampling: mipmapped ${t.samplingCounts.mipmapped} \xB7 cubic ${t.samplingCounts.cubic} \xB7 repeat ${t.samplingCounts.repeat} \xB7 none ${t.samplingCounts.none}`),a.length===0){console.log(" every image delivered its source resolution");return}console.log(""),console.log(" short eff decoded source needed(dev) dest(pt) dpr image");for(let c of a){let $=`${c.decoded.width}x${c.decoded.height}`.padEnd(11),r=(c.vector?"vector":c.intrinsic?`${c.intrinsic.width}x${c.intrinsic.height}`:"?").padEnd(11),y=`${Math.round(c.needed.width)}x${Math.round(c.needed.height)}`.padEnd(12),v=`${Math.round(c.destination.width)}x${Math.round(c.destination.height)}`.padEnd(9);console.log(` ${F(c.shortfall)} ${F(c.effective.width)} ${$} ${r} ${y} ${v} ${c.dpr.toFixed(1)} ${K(c)}`)}}async function ne(t,a){let d=S(t,{port:a.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),g=d.positional;(!g[0]||t.includes("--help")||t.includes("-h"))&&(E(),u(0));let c=d.wsPort,$=d.simId,r=!t.includes("--json"),y=$?` --sim ${$}`:"",v=g[0],l=g.slice(1);if(new Set(["state","js","perf","memory","sample-color"]).has(v)){let{runInspect:e}=await import("./inspect-LT4MXK37.js");await e(["debug",...t],{port:a.port,verbose:a.verbose});return}let o=N(d);try{switch(v){case"enable":{let e=B(l[0]);e.length===0&&(console.error(` usage: rnx debug enable <channel[,channel,...]>
185
- known: ${L.join(", ")}`),u(1));let n=await A(o,"enable",e);console.log(i({active:n},r));break}case"disable":{let e=B(l[0]),n=await A(o,"disable",e);console.log(i({active:n},r));break}case"toggle":{let e=l[0];e||(console.error(" usage: rnx debug toggle <channel>"),u(1));let n=await m(o,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(i({[e]:n},r));break}case"status":{let e=await O(o);console.log(i(e,r));break}case"channels":{let e=await m(o,"window.__sootsimDebug.channels()");console.log(i(e,r));break}case"flags":{let e=await T(o);console.log(i(e,r));break}case"snapshot":{let e=l[0],n=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await m(o,`(() => { const s = ${n}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(i(s,r));break}case"snapshots":{let e=await m(o,"window.__sootsimDebug.snapshots()");console.log(i(e,r));break}case"diff":{let e=l[0],n=l[1];(!e||!n)&&(console.error(" usage: rnx debug diff <labelA> <labelB>"),u(1));let s=`(() => {
186
- const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(n)});
187
- if (!d) return null;
188
- return {
189
- a: d.a,
190
- b: d.b,
191
- counts: { added: d.added.length, removed: d.removed.length, changed: d.changed.length },
192
- added: d.added,
193
- removed: d.removed,
194
- changed: d.changed,
195
- };
196
- })()`,f=await m(o,s);console.log(i(f,r));break}case"clear-snapshots":{let e=l[0],n=e?`window.__sootsimDebug.clearSnapshots(${JSON.stringify(e)})`:"window.__sootsimDebug.clearSnapshots()";await m(o,n),console.log(i({cleared:e||"all"},r));break}case"image-audit":{let e=V(t,"--min")??.98,n=await W(o);n.draws===0&&(console.error(` the audit recorded zero image draws, so an empty result proves nothing.
197
- while it records, paint boundaries rebuild and raster blits are
198
- bypassed, so every image on screen should reach the draw path.
199
- zero draws means either nothing on screen is an image, or the audit
200
- is not attached to the surface that paints.`),u(2));let s=n.rows.filter(f=>f.shortfall!==null&&f.shortfall<e);r?G(n,t.includes("--all")?n.rows:s,e):console.log(i({...n,minimum:e,under:s.length},!1)),s.length>0&&u(1);break}case"find":{let e=l[0];if(e==="sheets"||e==="portals"||e==="boundaries"){let n=await C(o,e);console.log(i(n,r))}else console.error(" usage: rnx debug find <sheets|portals|boundaries>"),u(1);break}case"trace":{let e=l[0],n=l[1];if(e==="anim"){let s=l[1];if((!s||s==="--help"||s==="-h")&&(console.error(" usage: rnx debug trace anim <on|off|status|clear|<id>> [id|limit]"),u(1)),s==="on"){let h=l[2]??"all",w=l[3]?Number(l[3]):void 0,k=h==="all"?"all":Number(h);k!=="all"&&!Number.isFinite(k)&&(console.error(` invalid target: ${h}`),u(1)),await b(o,"enableAnimationTrace",k,w);let q=await b(o,"listAnimationTraces");console.log(i({enabled:k,traces:q},r));break}if(s==="off"){let h=l[2]??"all",w=h==="all"?"all":Number(h);w!=="all"&&!Number.isFinite(w)&&(console.error(` invalid target: ${h}`),u(1)),await b(o,"disableAnimationTrace",w),console.log(i({disabled:w},r));break}if(s==="status"||s==="clear"){s==="clear"&&await b(o,"disableAnimationTrace","all");let h=await b(o,"listAnimationTraces");console.log(i({traces:h},r));break}let f=Number(s);Number.isFinite(f)||(console.error(` invalid id: ${s}`),u(1));let j=l[2]?Number(l[2]):void 0,M=await b(o,"getAnimationTrace",f,j);console.log(i({id:f,samples:M},r));break}if(e!=="shell"&&(console.error(" usage: rnx debug trace <shell|anim> [args]"),u(1)),!n||/^[0-9]+$/.test(n)){let s=n?Number(n):50,f=await m(o,J(s));console.log(i(f,r));break}if(n==="on"){let s=l[2]?Number(l[2]):240,f=await m(o,x("on",s));console.log(i(f,r));break}if(n==="off"){let s=await m(o,x("off"));console.log(i(s,r));break}if(n==="clear"){let s=await m(o,x("clear"));console.log(i(s,r));break}if(n==="status"){let s=await m(o,x("status"));console.log(i(s,r));break}console.error(" usage: rnx debug trace shell [on [limit]|off|status|clear|recentLimit]"),u(1)}case"record":{let e=l[0],s=await m(o,`window.__sootsimDebug.record(${e==="on"?"true":e==="off"?"false":"undefined"})`);console.log(i({recording:s},r));break}case"recent":{let e=l[0],n=l[1]?Number(l[1]):50,s=await R(o,e,n);console.log(i(s,r));break}case"clear-events":{await m(o,"window.__sootsimDebug.clearEvents()"),console.log(i({cleared:!0},r));break}default:console.error(` unknown subcommand: ${v}`),E(),u(1)}}catch(e){_(e),console.error(` debug failed: ${e.message}`),await I(o,{errorsCommand:`rnx get errors 5${y}`,warningsCommand:`rnx get warnings 5${y}`,requestsCommand:`rnx get requests 5${y}`}),u(1)}finally{o.close()}}export{ne as runDebug};
@@ -1,31 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import"./chunk-FW6AN7I2.js";import{a as m}from"./chunk-MXJ2UWRV.js";import{a as f}from"./chunk-LD7I266X.js";import{g as d}from"./chunk-EWPAI4MO.js";import"./chunk-XYSDYGKC.js";import"./chunk-PNRJFHX4.js";import{a as u}from"./chunk-HNDWYCND.js";import{c as a}from"./chunk-YNHRSDVG.js";import"./chunk-USM3P74H.js";import"./chunk-CX7VCKAT.js";import{a as l}from"./chunk-Z6LOIW46.js";import"./chunk-2BRBFLWA.js";import"./chunk-C6B5FOP3.js";import"./chunk-5PZVYF42.js";import"./chunk-FZDRA7Z4.js";import"./chunk-4ZXR2M3D.js";import"./chunk-PBOWUNXO.js";import"./chunk-MP2GPO4T.js";import"./chunk-TPPVAA7Z.js";import"./chunk-H4MYYOYJ.js";import"./chunk-7NCPUZ52.js";import"./chunk-GEX7RVHY.js";import{c as r}from"./chunk-T4ISWS5H.js";import"./chunk-K7QQWKGE.js";import"./chunk-F5F7FIPM.js";import{i as c}from"./chunk-S65CK3RI.js";import"./chunk-LMHBU5LZ.js";import"./chunk-HWDVC6YA.js";import"./chunk-25KRGDZT.js";import"./chunk-DQUPSAHE.js";function v(e){let t=e.indexOf("--port");if(t<0)return;let n=e[t+1],o=n?Number(n):Number.NaN;return(!Number.isInteger(o)||o<=0)&&(console.error(` invalid --port value: ${n||"(missing)"}`),r(1)),o}async function w(e,t){let n=v(e)??t.port;return n?d(String(n)):void 0}async function h(e,t){(e.includes("--help")||e.includes("-h"))&&(console.log(`
5
- rnx desktop \u2014 launch the desktop companion
6
-
7
- usage:
8
- rnx desktop [options]
9
-
10
- options:
11
- --port <number> connect to running dev server on this port
12
- --profile <id> launch with an isolated persistent storage profile
13
- --ephemeral launch with a temporary isolated storage profile
14
-
15
- examples:
16
- rnx desktop
17
- rnx desktop --port 5173
18
- rnx desktop --profile qa
19
- `),r(0));let n=e.find((k,p)=>e[p-1]==="--profile"),o=e.includes("--ephemeral");n&&o&&(console.error(" rnx desktop: --profile cannot be combined with --ephemeral"),r(1));let x=n?a(n).id:void 0,i=l();if(!i){if(m(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await c("run rnx desktop install now?",!0)){console.log();let{runInstallDesktop:p}=await import("./install-desktop-EXCFMXFS.js");await p(["--yes"]),i=l()}i||r(1)}console.log(` launching ${i.path}`);let g=await w(e,t),s=await u.launch({url:g,device:t.device,profileId:x,ephemeralProfile:o});s.launched||(console.error(` ${s.message}`),r(1)),console.log(` ${s.message}`)}function b(){console.log(`
20
- rnx desktop \u2014 launch or install the desktop companion
21
-
22
- usage:
23
- rnx desktop [options]
24
- rnx desktop install [options]
25
-
26
- options:
27
- --port <number> connect to a running dev server on this port
28
- --profile <id> launch with an isolated persistent storage profile
29
- --ephemeral launch with a temporary isolated storage profile
30
- -y, --yes install without prompting
31
- `)}async function C(e,t){if(e.includes("--help")||e.includes("-h")){b();return}let n=e.find(o=>!o.startsWith("-"));if(n==="install"){let o=e.indexOf(n);await f([...e.slice(0,o),...e.slice(o+1)]);return}await h(e,t)}export{C as runDesktop};
@@ -1,52 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import{f as U}from"./chunk-LSOGXSDV.js";import"./chunk-BQCEI37V.js";import"./chunk-QJQOK34O.js";import"./chunk-EZXV6U2N.js";import"./chunk-MXJ2UWRV.js";import"./chunk-CCMZSHJB.js";import"./chunk-RLCQLMFF.js";import{c as $,d as k,e as J}from"./chunk-Z5O5H4O7.js";import{a as N}from"./chunk-HEV7BAPE.js";import"./chunk-JWUDT4QK.js";import"./chunk-V7RGRZOL.js";import"./chunk-YX52RJKO.js";import"./chunk-EWPAI4MO.js";import"./chunk-XYSDYGKC.js";import"./chunk-PNRJFHX4.js";import"./chunk-HNDWYCND.js";import"./chunk-YNHRSDVG.js";import"./chunk-USM3P74H.js";import"./chunk-CX7VCKAT.js";import"./chunk-Z6LOIW46.js";import"./chunk-2BRBFLWA.js";import"./chunk-C6B5FOP3.js";import"./chunk-5PZVYF42.js";import"./chunk-FZDRA7Z4.js";import"./chunk-4ZXR2M3D.js";import"./chunk-PBOWUNXO.js";import"./chunk-MP2GPO4T.js";import"./chunk-ZXFVBYJY.js";import"./chunk-TPPVAA7Z.js";import"./chunk-H4MYYOYJ.js";import"./chunk-7NCPUZ52.js";import"./chunk-GEX7RVHY.js";import"./chunk-4CEZZKRY.js";import{c as f}from"./chunk-T4ISWS5H.js";import"./chunk-JOHJZUGG.js";import"./chunk-XUBV77WH.js";import"./chunk-K7QQWKGE.js";import"./chunk-F5F7FIPM.js";import"./chunk-LMHBU5LZ.js";import"./chunk-HWDVC6YA.js";import{a as E}from"./chunk-25KRGDZT.js";import"./chunk-DQUPSAHE.js";import{spawn as H}from"child_process";import{existsSync as T,mkdirSync as V,readFileSync as z,writeFileSync as I,unlinkSync as C}from"fs";import{createRequire as K}from"module";import{tmpdir as A}from"os";import{dirname as Q,resolve as a,join as y,relative as X}from"path";function Y(){try{let t=import.meta.resolve(`${E.packageName}/detox`);return Q(t.startsWith("file://")?t.slice(7):t)}catch{return a(import.meta.dirname,"..","..","detox")}}var Z=`
5
- rnx detox \u2014 run detox-style tests against an rnx shell
6
-
7
- usage:
8
- rnx detox [testFiles...] run all tests under e2e/, test/e2e/, or detox/
9
- rnx detox --config <path> use a specific jest config
10
- rnx detox init scaffold sootsim-detox.config.cjs + sample test
11
- rnx detox --watch jest watch mode
12
- rnx detox --headed keep the rnx shell window visible
13
- rnx detox -t <pattern> pass a jest --testNamePattern
14
- rnx detox --no-launch skip auto-launching an rnx shell
15
-
16
- rnx detox auto-launches an rnx shell if none is running on the
17
- expected port. disable with --no-launch if you're managing the shell yourself.
18
- `;async function xe(t,o={}){if((t.includes("--help")||t.includes("-h"))&&(console.log(Z),f(0)),t[0]==="init")return oe();let l=e=>{let s=t.indexOf(e);return s>=0?t[s+1]:void 0},n=e=>t.includes(e),u=n("--watch"),m=n("--headed"),d=n("--no-launch"),S=l("--config"),x=o.port||Number(process.env.SOOTSIM_PORT)||5173,L=t.filter((e,s)=>{if(e.startsWith("--")||e==="-t"||e==="-h")return!1;let i=t[s-1];return!(i==="--config"||i==="-t"||i==="--testNamePattern"||i==="--grep"||i==="--maxWorkers"||i==="--shard")}),W=t.flatMap((e,s)=>e==="--runInBand"||e.startsWith("--maxWorkers=")||e.startsWith("--shard=")?[e]:(e==="--maxWorkers"||e==="--shard")&&t[s+1]?[e,t[s+1]]:[]),j=["e2e","test/e2e","detox"],c=process.env.SOOTSIM_TEST_DIR?a(process.cwd(),process.env.SOOTSIM_TEST_DIR):null;if(!c)for(let e of j){let s=a(process.cwd(),e);if(T(s)){c=s;break}}c||(console.error(` error: no detox tests found. expected one of: ${j.join(", ")}
19
- run 'rnx detox init' to scaffold a starter suite.`),f(1)),d||await se(x);let r=["jest"],h=S||te(["sootsim-detox.config.cjs","jest.config.cjs","jest.config.js"]),p=null;if(h)r.push("--config",a(process.cwd(),h));else{let e=a(Y(),"jest-preset.cjs");p=y(A(),`sootsim-detox-${process.pid}.config.cjs`);let s={rootDir:c,roots:["<rootDir>"],testMatch:["<rootDir>/**/*.test.ts","<rootDir>/**/*.test.js"]};I(p,`module.exports = { ...require(${JSON.stringify(e)}), ...${JSON.stringify(s)} }
20
- `),r.push("--config",p)}u&&r.push("--watch");let v=l("-t")||l("--testNamePattern")||l("--grep");v&&r.push("-t",v);let b=N(),R=!u&&$({uploadedShare:!1,auth:b}),g=process.env.SOOTSIM_JEST_OUTPUT_FILE||null;process.env.SOOTSIM_JEST_JSON==="1"&&r.push("--json"),process.env.SOOTSIM_JEST_OUTPUT_FILE?r.push("--outputFile",process.env.SOOTSIM_JEST_OUTPUT_FILE):R&&(g=y(A(),`sootsim-detox-results-${process.pid}.json`),r.push("--json","--outputFile",g)),r.push(...W),r.push(...L),console.log(" rnx detox"),console.log(` test dir: ${c}`),console.log(` port: ${x}${m?" (headed)":""}`),h&&console.log(` config: ${h}`);let _=process.env.CONFORMANCE_PROOF==="1"||!!process.env.CONFORMANCE_PROOF_DIR,G=_?"node":"npx",B=_?["--no-maglev",K(y(process.cwd(),"package.json")).resolve("jest/bin/jest"),...r.slice(1)]:r,O=H(G,B,{cwd:process.cwd(),stdio:"inherit",env:{...process.env,SOOTSIM_TEST_DIR:c,SOOTSIM_PORT:String(x),SOOTSIM_HEADED:m?"1":"",SOOTSIM_URL:process.env.SOOTSIM_URL||`http://localhost:${x}`}}),F=e=>()=>{O.kill(e)},P=F("SIGTERM"),D=F("SIGINT");process.on("SIGTERM",P),process.on("SIGINT",D);let q=Date.now(),w=await new Promise((e,s)=>{O.once("error",s),O.once("exit",(i,M)=>{if(M){console.error(` error: jest terminated by ${M}`),e(1);return}e(i??1)})});if(process.off("SIGTERM",P),process.off("SIGINT",D),p)try{C(p)}catch{}if(R){let e=g?ee(g):null,s=await J(),i=await k({origin:s,kind:"detox",name:X(process.cwd(),c)||"e2e",status:w===0?"passed":"failed",summary:e?`${e.numPassedTests}/${e.numTotalTests} tests passed`:null,failureMessage:w===0?null:e?.firstFailure??null,stepCount:e?.numTotalTests??null,failedStepIndex:e?.firstFailedIndex??null,durationMs:Date.now()-q,auth:b});i&&console.log(` run: ${i.id}`)}f(w)}function ee(t){try{let o=JSON.parse(z(t,"utf8")),l=null,n=null,u=0;for(let m of o.testResults??[])for(let d of m.testResults??[]){if(n==null&&d.status==="failed"){n=u;let S=d.failureMessages?.[0]?.split(`
21
- `)[0];l=[d.fullName,S].filter(Boolean).join(": ")||null}u+=1}return typeof o.numTotalTests!="number"?null:{numTotalTests:o.numTotalTests,numPassedTests:o.numPassedTests??0,firstFailure:l,firstFailedIndex:n}}catch{return null}finally{if(!process.env.SOOTSIM_JEST_OUTPUT_FILE)try{C(t)}catch{}}}function te(t){for(let o of t)if(T(a(process.cwd(),o)))return o;return null}async function se(t){await U()||console.warn(` warn: no rnx shell reachable on :${t}. start your app, then run \`rnx open <app-port>\`
22
- or pass --no-launch if you're managing the shell yourself.`)}function oe(){let t=process.cwd(),o=a(t,"sootsim-detox.config.cjs");T(o)?console.log(` skip: ${o} already exists`):(I(o,`// rnx detox jest config.
23
- // extends the sootsim preset, which rewrites \`import ... from 'detox'\`
24
- // to the sootsim driver and keeps your jest transforms intact.
25
-
26
- /** @type {import('@jest/types').Config.InitialOptions} */
27
- module.exports = {
28
- preset: 'rnxsim/detox/jest-preset',
29
- rootDir: __dirname,
30
- testMatch: ['<rootDir>/e2e/**/*.test.ts', '<rootDir>/e2e/**/*.test.js'],
31
- }
32
- `),console.log(` created ${o}`));let l=a(t,"e2e"),n=a(l,"example.test.ts");T(n)?console.log(` skip: ${n} already exists`):(V(l,{recursive:!0}),I(n,`// sample rnx detox test. resolve \`detox\` via the jest preset in
33
- // sootsim-detox.config.cjs \u2014 no extra imports required.
34
-
35
- import { by, device, element, expect, waitFor } from 'detox'
36
-
37
- describe('example', () => {
38
- beforeAll(async () => {
39
- await device.launchApp()
40
- })
41
-
42
- it('shows the welcome text', async () => {
43
- await waitFor(element(by.text('Welcome'))).toBeVisible().withTimeout(5000)
44
- })
45
-
46
- it('taps a button by id', async () => {
47
- await element(by.id('start-button')).tap()
48
- await expect(element(by.id('home-screen'))).toBeVisible()
49
- })
50
- })
51
- `),console.log(` created ${n}`)),console.log(`
52
- next:`),console.log(" rnx detox # run the sample"),console.log(" rnx detox --watch"),f(0)}export{xe as runDetox};
@@ -1,18 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import"./chunk-PNRJFHX4.js";import"./chunk-FZDRA7Z4.js";import"./chunk-TPPVAA7Z.js";import{b as d,d as c,e as h}from"./chunk-H4MYYOYJ.js";import{t as l,v as a,y as m}from"./chunk-7NCPUZ52.js";import"./chunk-GEX7RVHY.js";import{c as s}from"./chunk-T4ISWS5H.js";import"./chunk-HWDVC6YA.js";import"./chunk-DQUPSAHE.js";function v(){console.log(`
5
- rnx device \u2014 inspect or change the live device preset for a sim
6
-
7
- usage:
8
- rnx device
9
- rnx device get
10
- rnx device set <model> [--sim <id>]
11
- rnx device list
12
-
13
- examples:
14
- rnx device
15
- rnx device set iphone-14
16
- rnx device set iphone-16-pro-max --sim a7
17
- `)}function u(t){let n=c(t);console.log(` ${t.padEnd(14)} ${String(n.width).padStart(4)}x${String(n.height).padEnd(4)} pt ${String(n.width*n.scale).padStart(4)}x${String(n.height*n.scale).padEnd(4)} px ${n.name}`)}async function x(t){let n=a(t);try{let o=await m(n,"SootSim.bridges.settings.get")??{deviceModel:null},i=typeof o.deviceModel=="string"?o.deviceModel:null;if(!i||!(i in d))return null;let e=c(i);return{model:i,width:e.width,height:e.height,scale:e.scale,name:e.name}}finally{n.close()}}async function b(t,n){(t.includes("--help")||t.includes("-h"))&&(v(),s(0));let o=t[0];if(!o||o==="get"){let i=l(t,{port:n.port}),e=await x(i);e||(console.error(" error: could not read current device from the target sim"),s(1)),console.log(` ${e.model} ${e.width}x${e.height} pt ${e.width*e.scale}x${e.height*e.scale} px ${e.name}`);return}if(o==="list"){console.log(` available devices:
18
- `);for(let i of h())u(i);return}if(o==="set"){let i=t[1];i||(console.error(" error: device set expects a model"),s(1)),i in d||(console.error(` error: unknown device "${i}"`),console.error(" run `rnx device list` to see valid models"),s(1));let e=l(t,{port:n.port}),g=a(e);try{let p=await m(g,"SootSim.bridges.settings.set","deviceModel",i),r=c(i);console.log(` ${p?"set":"kept"} device: ${i} (${r.width}x${r.height} pt, ${r.width*r.scale}x${r.height*r.scale} px)${p?" \u2014 reloading sim":""}`)}finally{g.close()}return}v(),console.error(` unknown subcommand: ${o}`),s(1)}export{b as runDeviceCommand};
@@ -1,43 +0,0 @@
1
- /*! rnx v0.1.375 | (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 v,t as E,v as x,y as b}from"./chunk-7NCPUZ52.js";import"./chunk-GEX7RVHY.js";import"./chunk-HWDVC6YA.js";import"./chunk-DQUPSAHE.js";function j(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
5
- rnx get diagnosis \u2014 compact "what just went wrong?" report
6
-
7
- usage:
8
- rnx get diagnosis [--since <duration>] [--include <csv>] [--json]
9
-
10
- options:
11
- --since <d> absolute window for timeline + network (e.g. 90s, 2m, 500ms; default 90s)
12
- --include <csv> comma-separated dimensions: timeline, network, react, console, screen
13
- (default: all)
14
- --slow-threshold <n> network slow-request threshold in ms (default 1000)
15
- --limit <n> rows to print per react table (default 8)
16
- --json emit a single structured JSON document
17
-
18
- the diagnose report runs every dimension in parallel against the same
19
- sim and returns a grouped summary. use \`rnx what-happened\`
20
- for chronological events, \`rnx network\` for full request inspection,
21
- \`rnx perf react summary\` for the React tables on their own.
22
-
23
- examples:
24
- rnx get diagnosis
25
- rnx get diagnosis --since 30s --include network,react
26
- rnx get diagnosis --json > /tmp/diagnosis.json
27
- `)}function A(e,r){if(!e)return r;let o=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(e.trim());if(!o)return r;let s=Number(o[1]),t=o[2]??"ms";return t==="s"?s*1e3:t==="m"?s*6e4:s}function D(e){if(!e)return B;let r=new Set;for(let o of e.split(",")){let s=o.trim().toLowerCase();s&&r.add(s)}return r}function k(e,r){let o=e.indexOf(r);if(o>=0&&o+1<e.length)return e[o+1];let s=`${r}=`;return e.find(t=>t.startsWith(s))?.slice(s.length)}function R(e,r,o){let s=k(e,r);if(s===void 0)return o;let t=Number(s);return Number.isFinite(t)&&t>0?Math.round(t):o}async function O(e,r){let o={limit:500,since:Date.now()-r},t=(await b(e,"SootSim.bridges.timeline.recent",o)).events??[],i={},c=[],d=[],p=[];for(let u of t){i[u.kind]=(i[u.kind]??0)+1;let l=u.data,m=l&&typeof l=="object"?l.level:void 0;u.kind==="console"&&(m==="error"||m==="warn")&&c.push(u),(u.kind==="alert"||u.kind==="actionsheet"||u.kind==="picker")&&d.push(u),(u.kind==="screen"||u.kind==="route")&&p.push(u)}return{events:t,byKind:i,total:t.length,errors:c,alerts:d,screens:p}}async function L(e,r,o){let s=await e.send({type:"evaluate",code:`(() => {
28
- const obs = window.__sootsimObservability;
29
- if (!obs) return { ok: false };
30
- return { ok: true, entries: obs.network.getSnapshot() };
31
- })()`});if(!s||!s.ok)return{error:"observability bridge not installed"};let t=s.entries??[],i=Date.now()-r,c=t.filter(l=>(l.startTs??l.startedAt??0)>=i),d=c.filter(l=>!!l.error||l.status!=null&&l.status>=400),p=c.filter(l=>l.durationMs!=null&&l.durationMs>=o).sort((l,m)=>(m.durationMs??0)-(l.durationMs??0)),u=c.filter(l=>l.durationMs==null).length;return{total:c.length,failed:d,slow:p,inFlight:u,slowThresholdMs:o}}async function C(e,r){let[o,s]=await Promise.all([b(e,"SootSim.bridges.reactProfile.slow",{limit:r}),b(e,"SootSim.bridges.reactProfile.rerenders",{limit:r})]);return{commits:o.commits??s.commits??0,slow:o.rows??[],rerenders:s.rows??[],durationWarning:o.durationWarning,error:o.error??s.error}}async function _(e,r){let o=await e.send({type:"evaluate",code:`(() => {
32
- const obs = window.__sootsimObservability;
33
- if (!obs) return { ok: false };
34
- return { ok: true, entries: obs.logs.getSnapshot() };
35
- })()`});if(!o||!o.ok)return{error:"observability bridge not installed"};let s=Date.now()-r,i=(o.entries??[]).filter(c=>j(c)>=s&&(c.level==="error"||c.level==="warn"));return{entries:i.slice(-20),total:i.length}}function T(e){let r=e.error?"err":e.status!=null?String(e.status):"...",o=(e.method??"GET").padEnd(6),s=e.durationMs!=null?`${e.durationMs.toFixed(0)}ms`:"...",t=e.displayUrl??e.url,i=t.length>96?`${t.slice(0,92)}\u2026`:t;return` ${r.padStart(3)} ${o} ${s.padStart(7)} ${i} (${e.id})`}function N(e,r){let o=((e.t-r)/1e3).toFixed(2),s=e.t>=r?"-":"+",t=e.data,i="";if(t&&typeof t=="object"){let c=(t.message??"").toString().slice(0,120),d=(t.title??t.name??t.path??t.url??"").toString();i=[(t.phase??"").toString(),d,c].filter(Boolean).join(" \xB7 ")}return` -${o.padStart(5)}s [${e.kind}] ${i}`}function M(e,r,o){if(r.length===0)return`${o}(no rows)`;let s=e.map((i,c)=>Math.max(i.length,...r.map(d=>d[c]?.length??0))),t=i=>i.map((c,d)=>c.padEnd(s[d])).join(" ").trimEnd();return[t(e),t(e.map(i=>"-".repeat(i.length))),...r.map(t)].map(i=>`${o}${i}`).join(`
36
- `)}async function J(e,r){if(e.includes("--help")||e.includes("-h"))return P(),0;let o=E(e,{port:r.port,stripBooleanFlags:["--json","--help","-h"],stripValueFlags:["--since","--include","--limit","--slow-threshold"]}),s=o.positional[0]??"recent";if(s!=="recent")return console.error(` unknown subcommand: ${s}`),console.error(" did you mean: rnx get diagnosis ?"),1;let t=A(k(e,"--since"),9e4),i=D(k(e,"--include")),c=R(e,"--limit",8),d=R(e,"--slow-threshold",1e3),p=e.includes("--json"),u=x(o);try{let l=[],m=[];(i.has("timeline")||i.has("screen")||i.has("alert"))&&(m.push("timeline"),l.push(O(u,t))),(i.has("network")||i.has("fetch"))&&(m.push("network"),l.push(L(u,t,d))),i.has("react")&&(m.push("react"),l.push(C(u,c))),i.has("console")&&(m.push("console"),l.push(_(u,t)));let $=await u.send({type:"evaluate",code:"globalThis.__sootsimEngineBuild ?? null"}).then(n=>typeof n=="string"?n:null).catch(()=>null),F=await Promise.all(l),w={};for(let n=0;n<m.length;n++)w[m[n]]=F[n];if(p)return console.log(JSON.stringify({generatedAt:Date.now(),engineBuild:$,sinceMs:t,include:Array.from(i),slices:w},null,2)),0;let S=Date.now();if(console.log(` diagnose recent (last ${(t/1e3).toFixed(0)}s, include: ${Array.from(i).sort().join(",")}):`),console.log(` engine build: ${$??"unknown (no build stamp \u2014 likely a stale or pre-F20-5 engine)"}`),w.timeline){let n=w.timeline;console.log(`
37
- timeline \u2014 ${n.total} event(s) in window`);let f=Object.entries(n.byKind).sort((a,g)=>g[1]-a[1]).map(([a,g])=>`${g} ${a}`).join(" \xB7 ");if(f&&console.log(` summary: ${f}`),n.screens.length){let g=n.screens[n.screens.length-1].data,h=g?g.name??g.activeName??g.path??"?":"?";console.log(` last screen: ${String(h)}`)}if(n.alerts.length){console.log(` alerts (${n.alerts.length}):`);for(let a of n.alerts.slice(-5))console.log(N(a,S))}if(n.errors.length){console.log(` console errors/warns from timeline (${n.errors.length}):`);for(let a of n.errors.slice(-5))console.log(N(a,S))}}if(w.network){let n=w.network;if("error"in n)console.log(`
38
- network \u2014 ${n.error}`);else{if(console.log(`
39
- network \u2014 ${n.total} request(s), ${n.failed.length} failed, ${n.slow.length} slow (>${n.slowThresholdMs}ms), ${n.inFlight} in-flight`),n.failed.length){console.log(" failed:");for(let f of n.failed.slice(-8))console.log(T(f))}if(n.slow.length){console.log(" slowest:");for(let f of n.slow.slice(0,5))console.log(T(f))}}}if(w.react){let n=w.react;console.log(`
40
- react \u2014 ${n.commits} commit(s)`),n.error&&console.log(` warning: ${n.error}`),n.durationWarning&&console.log(` warning: ${n.durationWarning}`),n.slow.length>0&&n.slow.every(a=>a.totalMs<=0&&a.slowestMs<=0)&&!n.durationWarning&&console.log(" warning: every commit reports actualDuration=0ms \u2014 bundle has React profiler timer disabled"),n.slow.length&&(console.log(" slowest:"),console.log(M(["component","total","commits","slowest"],n.slow.slice(0,c).map(a=>[a.displayName,`${a.totalMs.toFixed(2)}ms`,String(a.commitCount),`${a.slowestMs.toFixed(2)}ms`])," "))),n.rerenders.length&&(console.log(" most rerenders:"),console.log(M(["component","renders","top causes"],n.rerenders.slice(0,c).map(a=>{let g=Object.entries(a.causes??{}).filter(([,h])=>h>0).sort((h,y)=>y[1]-h[1]).slice(0,3).map(([h,y])=>`${h}:${y}`).join(", ");return[a.displayName,String(a.renders??a.count??0),g||"-"]})," ")))}if(w.console){let n=w.console;if("error"in n)console.log(`
41
- console \u2014 ${n.error}`);else{console.log(`
42
- console errors/warns \u2014 ${n.total} in window`);for(let f of n.entries.slice(-8)){let a=((j(f)-S)/1e3).toFixed(2),g=W(f).slice(0,160);console.log(` -${a.padStart(5)}s [${f.level}] ${g}`)}}}return v()&&console.log(`
43
- next: rnx what-happened (cursor advances) \xB7 rnx network get <id> \xB7 rnx perf react why <fiber-id>`),0}catch(l){let m=l instanceof Error?l.message:String(l);return/no sim connected/i.test(m)?console.error(" no sim connected \u2014 open one first: rnx open <metroPort>"):console.error(` diagnose failed: ${m}`),1}finally{u.close()}}export{J as runDiagnose};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (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,e,f}from"./chunk-2IUMRRYV.js";import"./chunk-K7QQWKGE.js";import"./chunk-F5F7FIPM.js";import"./chunk-HWDVC6YA.js";import"./chunk-25KRGDZT.js";import"./chunk-DQUPSAHE.js";export{f as applyAutomaticSootsimCleanup,e as applySootsimCleanup,c as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,d as planSootsimCleanup,b as shouldSkipAutomaticSootsimCleanup};
@@ -1,5 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import"./chunk-DQUPSAHE.js";var p=class extends Error{constructor(s){super(s),this.name="BridgeInputError"}};var k=new Set(["tap","tap-id","tap-text","double-tap","long-press","type","type-into","key","key-sequence","dismiss","scroll","drag","swipe","pinch","touch","sleep"]);function O(a){return a.includes("--then")}function o(a,s){throw new p(`do chain action ${a+1} has invalid arguments; usage: rnx do ${s}`)}function r(a,s,l){let n=Number(a);return(a===void 0||!Number.isFinite(n))&&o(s,l),n}function D(a){let s=[[]];for(let l of a){if(l!=="--then"){s[s.length-1].push(l);continue}if(s[s.length-1].length===0)throw new p("do chain contains an empty action");s.push([])}if(s.length<2)throw new p("do chain needs at least two actions separated by --then");if(s[s.length-1].length===0)throw new p("do chain cannot end with --then");return s.flatMap((l,n)=>{let[d,...t]=l;if(!d)throw new p("do chain contains an empty action");if(!k.has(d))throw new p(`do chain action ${n+1} cannot batch ${JSON.stringify(d)}; run it as a separate rnx do command`);switch(d){case"tap":return t.length===1&&!Number.isFinite(Number(t[0]))?[{type:"tapId",id:t[0]}]:(t.length!==2&&o(n,"tap <testid> | <x> <y>"),[{type:"tap",x:r(t[0],n,"tap <testid> | <x> <y>"),y:r(t[1],n,"tap <testid> | <x> <y>")}]);case"tap-id":return t.length!==1&&o(n,"tap-id <id>"),[{type:"tapId",id:t[0]}];case"tap-text":{let e=t.join(" ");return e||o(n,"tap-text <text>"),[{type:"tapText",text:e}]}case"double-tap":{let e="double-tap <testid> [gapMs] | <x> <y> [gapMs]";return t.length>0&&!Number.isFinite(Number(t[0]))?(t.length>2&&o(n,e),[{type:"targetedDoubleTap",id:t[0],gapMs:t.length===2?Math.max(0,Math.round(r(t[1],n,e))):80}]):((t.length<2||t.length>3)&&o(n,e),[{type:"doubleTap",x:r(t[0],n,e),y:r(t[1],n,e),gapMs:t.length===3?Math.max(0,Math.round(r(t[2],n,e))):80}])}case"long-press":{let e="long-press <testid> [durationMs] | <x> <y> [durationMs]";return t.length>0&&!Number.isFinite(Number(t[0]))?(t.length>2&&o(n,e),[{type:"targetedLongPress",id:t[0],durationMs:t.length===2?Math.max(0,Math.round(r(t[1],n,e))):600}]):((t.length<2||t.length>3)&&o(n,e),[{type:"longPress",x:r(t[0],n,e),y:r(t[1],n,e),durationMs:t.length===3?Math.max(0,Math.round(r(t[2],n,e))):600}])}case"type":{let e=t.join(" ");return e||o(n,"type <text>"),[{type:"type",text:e}]}case"type-into":{let e=t.slice(1).join(" ");return(!t[0]||!e)&&o(n,"type-into <id> <text>"),[{type:"tapId",id:t[0]},{type:"type",text:e}]}case"key":return t.length!==1&&o(n,"key <name>"),[{type:"key",key:t[0]}];case"key-sequence":return t.length===0&&o(n,"key-sequence <key> [<key> ...]"),t.map(e=>({type:"key",key:e}));case"dismiss":return t.length!==0&&o(n,"dismiss"),[{type:"dismissKeyboard"}];case"scroll":{let e="scroll <id> <x> <y>";return t.length!==3&&o(n,e),[{type:"scroll",id:t[0],x:r(t[1],n,e),y:r(t[2],n,e),animated:!1}]}case"drag":case"swipe":{let e=`${d} <x1> <y1> <x2> <y2> [steps] [stepMs]`;(t.length<4||t.length>6)&&o(n,e);let i=d==="swipe"?10:12,y=d==="swipe"?8:16;return[{type:"drag",fromX:r(t[0],n,e),fromY:r(t[1],n,e),toX:r(t[2],n,e),toY:r(t[3],n,e),steps:t.length>=5?Math.max(1,Math.round(r(t[4],n,e))):i,stepMs:t.length===6?Math.max(0,Math.round(r(t[5],n,e))):y}]}case"pinch":{let e="pinch <x1> <y1> <x2> <y2> <x1'> <y1'> <x2'> <y2'> [steps] [stepMs]";return(t.length<8||t.length>10)&&o(n,e),[{type:"pinch",fromX1:r(t[0],n,e),fromY1:r(t[1],n,e),fromX2:r(t[2],n,e),fromY2:r(t[3],n,e),toX1:r(t[4],n,e),toY1:r(t[5],n,e),toX2:r(t[6],n,e),toY2:r(t[7],n,e),steps:t.length>=9?Math.max(1,Math.round(r(t[8],n,e))):12,stepMs:t.length===10?Math.max(0,Math.round(r(t[9],n,e))):16}]}case"touch":{let e="touch <down|move|up|cancel> <x> <y> [pointerId]";(t.length<3||t.length>4)&&o(n,e);let i=t[0];i!=="down"&&i!=="move"&&i!=="up"&&i!=="cancel"&&o(n,e);let y=t.length===4?Math.max(1,Math.round(r(t[3],n,e))):999;return i==="cancel"?[{type:"touchCancel",pointerId:y}]:[{type:i==="down"?"touchDown":i==="move"?"touchMove":"touchUp",x:r(t[1],n,e),y:r(t[2],n,e),pointerId:y}]}case"sleep":{let e="sleep [seconds]";t.length>1&&o(n,e);let i=t.length===1?r(t[0],n,e):.5;return i<0&&o(n,e),[{type:"wait",ms:Math.round(i*1e3)}]}default:throw new p(`do chain action ${n+1} cannot batch ${JSON.stringify(d)}`)}})}async function Y(a,s={}){let[l,n,d,t,e]=await Promise.all([import("./connect-IPG47YXM.js"),import("./sim-client-5YUVL45C.js"),import("./ws-bridge-YK5R3HOI.js"),import("./env-Y5XJSNRD.js"),import("./resolve-target-NNQCALDM.js")]),{connect:i}=l,{SimPerformError:y}=n,{checkSimHealth:M,parseBridgeCliArgs:S}=d,{isAgentEnv:$}=t,{resolveTargetCoords:x}=e,b=a.includes("--json"),I=a.includes("--no-wait")||process.env.SOOTSIM_NO_AUTO_WAIT==="1",m=S(a,{port:s.port,commandTimeoutMs:3e4,stripBooleanFlags:["--json","--no-wait"]});if(!Number.isFinite(m.commandTimeoutMs)||m.commandTimeoutMs<=0)return console.error(" do chain: --timeout must be a positive number"),1;let w;try{w=D(m.positional)}catch(u){return console.error(` do chain: ${u instanceof Error?u.message:u}`),1}let h=null;try{h=await i({port:m.wsPort,sim:m.simId,timeoutMs:m.commandTimeoutMs}),await M(h);let u=[];for(let c of w){if(c.type!=="targetedDoubleTap"&&c.type!=="targetedLongPress"){u.push(c);continue}let f=await x(h,{mode:"testid",value:c.id});if(!f)throw new p(`do chain could not find testID ${JSON.stringify(c.id)}`);u.push(c.type==="targetedDoubleTap"?{type:"doubleTap",x:f.x,y:f.y,gapMs:c.gapMs}:{type:"longPress",x:f.x,y:f.y,durationMs:c.durationMs})}let g=await h.perform(u,{timeoutMs:m.commandTimeoutMs});if(!I)try{let c=$()?400:200,f=await h.settle({maxMs:c});f.settled||process.stderr.write(` \u26A0 auto-wait timed out after ${f.elapsed??c}ms. next command may see mid-animation state. use \`rnx do settle\` for a longer wait.
5
- `)}catch{}return console.log(b?JSON.stringify(g):` completed ${g.completed} batched ${g.completed===1?"step":"steps"} in ${g.durationMs}ms`),0}catch(u){return u instanceof y&&b?console.log(JSON.stringify(u.result)):console.error(` do chain failed: ${u instanceof Error?u.message:u}`),1}finally{h?.close()}}export{O as hasDoChain,D as parseDoChainActions,Y as runDoChain};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import { createRequire as __sootsimCreateRequire } from 'node:module'
3
- var require = __sootsimCreateRequire(import.meta.url)
4
- import"./chunk-FW6AN7I2.js";import{a,b,c,d,e,f,g}from"./chunk-HNDWYCND.js";import"./chunk-YNHRSDVG.js";import"./chunk-Z6LOIW46.js";import"./chunk-GEX7RVHY.js";import"./chunk-K7QQWKGE.js";import"./chunk-HWDVC6YA.js";import"./chunk-DQUPSAHE.js";export{c as ALL_DRIVERS,g as buildDriverListRows,a as electronDriver,d as getAllDrivers,e as getDriver,b as playwrightDriver,f as resolveDriver};
@@ -1,4 +0,0 @@
1
- /*! rnx v0.1.375 | (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}from"./chunk-LMHBU5LZ.js";import"./chunk-DQUPSAHE.js";export{a as isAgentEnv};