rnxsim 0.1.364 → 0.1.366

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 (184) hide show
  1. package/README.md +2 -0
  2. package/cli/bridge-flow-runner.ts +2 -2
  3. package/cli/commands/control.ts +3 -44
  4. package/cli/commands/detox.ts +18 -1
  5. package/cli/commands/flow.ts +2 -1
  6. package/detox/index.ts +3 -1
  7. package/dist-cli/bin.js +5 -5
  8. package/dist-cli/chunks/{agent-TPAN64UJ.js → agent-SO6IOPRK.js} +2 -2
  9. package/dist-cli/chunks/{agent-wrapper-GFB3KBNY.js → agent-wrapper-PMYCB2KO.js} +2 -2
  10. package/dist-cli/chunks/{app-fonts-DF5BO6AK.js → app-fonts-LULQGFY7.js} +2 -2
  11. package/dist-cli/chunks/{assert-VVKTC5YX.js → assert-WGNCD4ZU.js} +2 -2
  12. package/dist-cli/chunks/{auth-C7SRVIIX.js → auth-G7CCHH3M.js} +2 -2
  13. package/dist-cli/chunks/{beta-SZVR5QH2.js → beta-N4LXL5TO.js} +2 -2
  14. package/dist-cli/chunks/{camera-XKUQHX54.js → camera-4JHCYBQS.js} +2 -2
  15. package/dist-cli/chunks/{chunk-6TFSPDDE.js → chunk-2S7BKUP2.js} +2 -2
  16. package/dist-cli/chunks/{chunk-6OZZCDOK.js → chunk-2UXU53MG.js} +1 -1
  17. package/dist-cli/chunks/{chunk-GISQDTW6.js → chunk-34IQM22N.js} +2 -2
  18. package/dist-cli/chunks/{chunk-4OK2SZTF.js → chunk-3X6IBUBX.js} +2 -2
  19. package/dist-cli/chunks/{chunk-KXGBOYTB.js → chunk-5DAIA77C.js} +2 -2
  20. package/dist-cli/chunks/{chunk-6EALLMLO.js → chunk-5NMCF5VF.js} +1 -1
  21. package/dist-cli/chunks/{chunk-CDGPG6JU.js → chunk-5OK3LCEJ.js} +2 -2
  22. package/dist-cli/chunks/{chunk-CAP2EQ4P.js → chunk-6PL2CCGP.js} +2 -2
  23. package/dist-cli/chunks/{chunk-WKH7T3YK.js → chunk-77ZHQJZR.js} +2 -2
  24. package/dist-cli/chunks/chunk-7B37IZBN.js +15 -0
  25. package/dist-cli/chunks/{chunk-QECOXZY3.js → chunk-A5FXX5PJ.js} +1 -1
  26. package/dist-cli/chunks/{chunk-DSD2TMUC.js → chunk-AFV32WZT.js} +3 -3
  27. package/dist-cli/chunks/{chunk-VDEE37CY.js → chunk-CN6XYYEA.js} +12 -12
  28. package/dist-cli/chunks/{chunk-WK3QQTWE.js → chunk-CTG7HBCA.js} +1 -1
  29. package/dist-cli/chunks/{chunk-XXFZMO4I.js → chunk-DMPF2D24.js} +2 -2
  30. package/dist-cli/chunks/{chunk-SWIEVEPN.js → chunk-DW37EVX5.js} +1 -1
  31. package/dist-cli/chunks/{chunk-2UM2IFEM.js → chunk-DWFIH7CB.js} +2 -2
  32. package/dist-cli/chunks/{chunk-7RZI733Y.js → chunk-EFR5DVNP.js} +1 -1
  33. package/dist-cli/chunks/{chunk-LWOIQBVX.js → chunk-EGAGZHO6.js} +1 -1
  34. package/dist-cli/chunks/{chunk-AUHE5LTY.js → chunk-EQK5MJCU.js} +2 -2
  35. package/dist-cli/chunks/{chunk-T2U4BLWM.js → chunk-GAJQSITE.js} +1 -1
  36. package/dist-cli/chunks/{chunk-MPWM3TBY.js → chunk-GUI3PDH2.js} +2 -2
  37. package/dist-cli/chunks/{chunk-5OZJUMUS.js → chunk-GXAB52K7.js} +2 -2
  38. package/dist-cli/chunks/{chunk-3LSNLOZR.js → chunk-H23KWIKA.js} +2 -2
  39. package/dist-cli/chunks/{chunk-GJKVFQCF.js → chunk-HT6GFZOZ.js} +1 -1
  40. package/dist-cli/chunks/{chunk-475BITXX.js → chunk-I6KIM6PN.js} +1 -1
  41. package/dist-cli/chunks/{chunk-PSUX2SIK.js → chunk-IZKHOM37.js} +1 -1
  42. package/dist-cli/chunks/{chunk-GCMVAY4M.js → chunk-JHXETDVC.js} +1 -1
  43. package/dist-cli/chunks/{chunk-MUKHA5UF.js → chunk-KLF3K6ZZ.js} +1 -1
  44. package/dist-cli/chunks/{chunk-6CQSKBKG.js → chunk-LN3RNW6X.js} +2 -2
  45. package/dist-cli/chunks/{chunk-26XF67QW.js → chunk-M3BNCF7E.js} +2 -2
  46. package/dist-cli/chunks/{chunk-XXP4GLLC.js → chunk-M5QCGLXR.js} +3 -3
  47. package/dist-cli/chunks/{chunk-OXXWSZKI.js → chunk-M6SKQGAN.js} +2 -2
  48. package/dist-cli/chunks/{chunk-5GO3JI65.js → chunk-MGDSJZ37.js} +2 -2
  49. package/dist-cli/chunks/{chunk-JF6NYOSI.js → chunk-N3UC7HIX.js} +1 -1
  50. package/dist-cli/chunks/{chunk-GYC6VTQV.js → chunk-NAYLPOC5.js} +2 -2
  51. package/dist-cli/chunks/{chunk-BRU5PPUO.js → chunk-NM2L2QV4.js} +2 -2
  52. package/dist-cli/chunks/{chunk-6TAFS3GK.js → chunk-NQFJOCSF.js} +2 -2
  53. package/dist-cli/chunks/{chunk-QSGQVEGD.js → chunk-ONORMKWX.js} +2 -2
  54. package/dist-cli/chunks/{chunk-ONGTUKC3.js → chunk-ORWP2E7R.js} +2 -2
  55. package/dist-cli/chunks/{chunk-PG2B65PZ.js → chunk-OW5XHAA4.js} +1 -1
  56. package/dist-cli/chunks/{chunk-GXMNFFJJ.js → chunk-RYIMSKDO.js} +2 -2
  57. package/dist-cli/chunks/{chunk-2TL6BZCH.js → chunk-SA6XVI55.js} +1 -1
  58. package/dist-cli/chunks/{chunk-QWRQ7RY6.js → chunk-TIAEYO6I.js} +2 -2
  59. package/dist-cli/chunks/{chunk-FKAZFE5Z.js → chunk-TTASWLKM.js} +1 -1
  60. package/dist-cli/chunks/{chunk-X3N2H4A3.js → chunk-UCHW7ZHR.js} +2 -2
  61. package/dist-cli/chunks/{chunk-UDZI7GEV.js → chunk-VIND4SP3.js} +1 -1
  62. package/dist-cli/chunks/{chunk-ZOQAPVNV.js → chunk-XJU2QIRY.js} +2 -2
  63. package/dist-cli/chunks/{chunk-EP5FYRBT.js → chunk-XXNLYR64.js} +3 -3
  64. package/dist-cli/chunks/{chunk-PTOGXUOE.js → chunk-YCCCPFWT.js} +2 -2
  65. package/dist-cli/chunks/chunk-YGMEDJKJ.js +4 -0
  66. package/dist-cli/chunks/{chunk-S7OIWXIZ.js → chunk-YXXKSL6R.js} +1 -1
  67. package/dist-cli/chunks/{chunk-V7CAEDZT.js → chunk-ZFM24DOX.js} +2 -2
  68. package/dist-cli/chunks/{chunk-YJTZ77E4.js → chunk-ZJIS3CTW.js} +2 -2
  69. package/dist-cli/chunks/{chunk-IX2ZY3FI.js → chunk-ZLVRYXZ7.js} +1 -1
  70. package/dist-cli/chunks/{chunk-ZUKAXCGG.js → chunk-ZMJ75EDG.js} +2 -2
  71. package/dist-cli/chunks/{cleanup-KSK43W4F.js → cleanup-KRIATKFH.js} +2 -2
  72. package/dist-cli/chunks/cli-version-SYGNHGFR.js +4 -0
  73. package/dist-cli/chunks/{compat-ETLIMR6U.js → compat-6PTQ3QEA.js} +2 -2
  74. package/dist-cli/chunks/{config-GZKHF2OQ.js → config-ETGDUANO.js} +2 -2
  75. package/dist-cli/chunks/control-RBTNOLQM.js +4 -0
  76. package/dist-cli/chunks/daemon-N3SC5DK6.js +4 -0
  77. package/dist-cli/chunks/{debug-TCZOR7EX.js → debug-WIIB6ZKC.js} +3 -3
  78. package/dist-cli/chunks/{desktop-SXNUOCYY.js → desktop-TD7Q5LNB.js} +3 -3
  79. package/dist-cli/chunks/detox-7GNR33VM.js +52 -0
  80. package/dist-cli/chunks/{device-W7U63QOH.js → device-QOR3PGUF.js} +2 -2
  81. package/dist-cli/chunks/{diagnose-TNZKUJHP.js → diagnose-RRCBLP6E.js} +2 -2
  82. package/dist-cli/chunks/{disk-cleanup-3YIXIS5V.js → disk-cleanup-MJUGJPXT.js} +2 -2
  83. package/dist-cli/chunks/drivers-W6E3BZH4.js +4 -0
  84. package/dist-cli/chunks/{film-E4DAHL3T.js → film-D7Y64LID.js} +3 -3
  85. package/dist-cli/chunks/flow-7QAE2V5Y.js +4 -0
  86. package/dist-cli/chunks/help-NLD6KWVG.js +4 -0
  87. package/dist-cli/chunks/{hidden-runtime-alias-JGC3RNJM.js → hidden-runtime-alias-JGURVR2Z.js} +2 -2
  88. package/dist-cli/chunks/{home-paths-RMAJUXID.js → home-paths-4ICFIGXO.js} +2 -2
  89. package/dist-cli/chunks/inspect-C347BG52.js +4 -0
  90. package/dist-cli/chunks/install-desktop-YR6TWZYK.js +4 -0
  91. package/dist-cli/chunks/{login-AVAHLXIO.js → login-RU33QR2G.js} +2 -2
  92. package/dist-cli/chunks/{logout-FHY54N66.js → logout-2IUG3Y5J.js} +2 -2
  93. package/dist-cli/chunks/{maestro-4FOX653X.js → maestro-2MXTGG7I.js} +3 -3
  94. package/dist-cli/chunks/{maestro-generate-A5VA2C2L.js → maestro-generate-2PYIFGLR.js} +3 -3
  95. package/dist-cli/chunks/{mode-EEMUPUUN.js → mode-3DAPG3HF.js} +2 -2
  96. package/dist-cli/chunks/{optional-demo-registry-OOJVFEEM.js → optional-demo-registry-BWSDJF2Z.js} +2 -2
  97. package/dist-cli/chunks/{perf-KC3DWW2K.js → perf-2TKPWB4N.js} +2 -2
  98. package/dist-cli/chunks/{permissions-NYLB3HTV.js → permissions-5CSMHYNA.js} +2 -2
  99. package/dist-cli/chunks/privacy-PWWC2BXO.js +4 -0
  100. package/dist-cli/chunks/{record-W4VGQFZO.js → record-I2HJCFP3.js} +3 -3
  101. package/dist-cli/chunks/{report-issue-OV4TEQA4.js → report-issue-A4FZWBOC.js} +2 -2
  102. package/dist-cli/chunks/reset-Y3PBPFYA.js +4 -0
  103. package/dist-cli/chunks/runtime-IC6NVVGA.js +4 -0
  104. package/dist-cli/chunks/{screenshot-command-E5UQAWDL.js → screenshot-command-UFW5BFHP.js} +3 -3
  105. package/dist-cli/chunks/{screenshot-layers-FKOOWRTR.js → screenshot-layers-5BIAL4YN.js} +2 -2
  106. package/dist-cli/chunks/{screenshots-capture-75RRIMXV.js → screenshots-capture-EHYS3BV2.js} +2 -2
  107. package/dist-cli/chunks/{serve-FSKXPWZS.js → serve-O4FDM3AC.js} +2 -2
  108. package/dist-cli/chunks/setup-Y4QGSJBM.js +4 -0
  109. package/dist-cli/chunks/{skills-6KOGOICV.js → skills-ZK55SY32.js} +2 -2
  110. package/dist-cli/chunks/{state-MFXITPJO.js → state-KFLAZNEY.js} +2 -2
  111. package/dist-cli/chunks/{storage-Y6WMFSON.js → storage-WP33ISEM.js} +2 -2
  112. package/dist-cli/chunks/store-VEE22CAY.js +4 -0
  113. package/dist-cli/chunks/telemetry-PZV4BISJ.js +4 -0
  114. package/dist-cli/chunks/{timeline-ULQSPSUI.js → timeline-DKGW5S4I.js} +2 -2
  115. package/dist-cli/chunks/{upgrade-TXKMF6QG.js → upgrade-LL7G4B7G.js} +2 -2
  116. package/dist-cli/chunks/upload-Y4C3YZDK.js +4 -0
  117. package/dist-cli/chunks/{version-ELQDHWMV.js → version-YLWR5G4F.js} +2 -2
  118. package/dist-cli/chunks/{web-QDYHKVEF.js → web-QELZ4CP6.js} +2 -2
  119. package/dist-cli/chunks/welcome-ZPKA5PZJ.js +5 -0
  120. package/dist-cli/chunks/{what-happened-64IQA6AX.js → what-happened-MIOMZWM5.js} +2 -2
  121. package/dist-lib/agent-daemon-client.cjs +1 -1
  122. package/dist-lib/agent-events.cjs +1 -1
  123. package/dist-lib/agent-identity.cjs +1 -1
  124. package/dist-lib/agent-sessions.cjs +1 -1
  125. package/dist-lib/attached-projects.cjs +1 -1
  126. package/dist-lib/auth/shared-session.cjs +1 -1
  127. package/dist-lib/backend-origin.cjs +1 -1
  128. package/dist-lib/beta.cjs +1 -1
  129. package/dist-lib/beta.mjs +1 -1
  130. package/dist-lib/bridge-constants.cjs +1 -1
  131. package/dist-lib/bridge-contract.cjs +1 -1
  132. package/dist-lib/cli-constants.cjs +1 -1
  133. package/dist-lib/config.cjs +1 -1
  134. package/dist-lib/detox/index.cjs +4 -2
  135. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  136. package/dist-lib/home-paths.cjs +1 -1
  137. package/dist-lib/host/bridge-host.cjs +1 -1
  138. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  139. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  140. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  141. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  142. package/dist-lib/host/websocket-proxy.cjs +1 -1
  143. package/dist-lib/index.cjs +31 -1
  144. package/dist-lib/jump-to-source-babel.cjs +1 -1
  145. package/dist-lib/mcp.cjs +673 -0
  146. package/dist-lib/mcp.mjs +641 -0
  147. package/dist-lib/menu.cjs +1 -1
  148. package/dist-lib/menu.mjs +1 -1
  149. package/dist-lib/metro-production-bundle.cjs +1 -1
  150. package/dist-lib/metro-production-bundle.mjs +1 -1
  151. package/dist-lib/metro.cjs +1 -1
  152. package/dist-lib/profiles.cjs +1 -1
  153. package/dist-lib/public-brand.cjs +1 -1
  154. package/dist-lib/react-native-host-modules.cjs +1 -1
  155. package/dist-lib/react-native-host-modules.mjs +1 -1
  156. package/dist-lib/render-mode.cjs +1 -1
  157. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  158. package/dist-lib/sdk.cjs +31 -1
  159. package/dist-lib/sdk.mjs +31 -1
  160. package/dist-lib/skills.cjs +67 -53
  161. package/dist-lib/vite.cjs +1 -1
  162. package/package.json +7 -1
  163. package/src/app-url.ts +40 -0
  164. package/src/mcp.ts +791 -0
  165. package/src/sim-client.ts +12 -6
  166. package/dist-cli/chunks/chunk-2FLTYH6I.js +0 -15
  167. package/dist-cli/chunks/chunk-HFHQUP6D.js +0 -4
  168. package/dist-cli/chunks/cli-version-VMIKRJJR.js +0 -4
  169. package/dist-cli/chunks/control-GEI7BBKL.js +0 -4
  170. package/dist-cli/chunks/daemon-F4J2GDYQ.js +0 -4
  171. package/dist-cli/chunks/detox-3IE75WQS.js +0 -52
  172. package/dist-cli/chunks/drivers-EW637BG3.js +0 -4
  173. package/dist-cli/chunks/flow-FX5GS2R4.js +0 -4
  174. package/dist-cli/chunks/help-2GRNPHE6.js +0 -4
  175. package/dist-cli/chunks/inspect-G24KNRYH.js +0 -4
  176. package/dist-cli/chunks/install-desktop-FHESQL4S.js +0 -4
  177. package/dist-cli/chunks/privacy-FHOKJ2N7.js +0 -4
  178. package/dist-cli/chunks/reset-MUWZMMPE.js +0 -4
  179. package/dist-cli/chunks/runtime-TK4FTIEZ.js +0 -4
  180. package/dist-cli/chunks/setup-LAKKCS57.js +0 -4
  181. package/dist-cli/chunks/store-56XZIZGX.js +0 -4
  182. package/dist-cli/chunks/telemetry-OXQ57PD4.js +0 -4
  183. package/dist-cli/chunks/upload-S3BWN6EM.js +0 -4
  184. package/dist-cli/chunks/welcome-ZT56CZ2Z.js +0 -5
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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{randomUUID as x}from"node:crypto";import n from"node:fs";import{homedir as I}from"node:os";import i from"node:path";var $="SOOTSIM_HOME",B="active",M="daemon.json",T="dev-bridges",J="config.json",L=3e4;function s(){let e=process.env[$];return e&&e.length>0?i.resolve(e):i.join(I(),".sootsim")}function U(){if(process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1")return!1;let e=process.env.SOOTSIM_DEV;if(e==="1"||e==="true")return!0;if(e==="0"||e==="false")return!1;let t=process.argv[1];if(!t)return!1;try{return n.realpathSync(t).includes(`${i.sep}packages${i.sep}sootsim${i.sep}`)}catch{return!1}}function V(){return process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1"?!1:process.env.IS_TAMAGUI_DEV==="1"}function ce(){return U()||V()}function v(){return i.join(s(),"runtimes")}function H(e){return i.join(v(),e)}function w(){return i.join(v(),B)}function A(){return i.join(s(),"electron")}function se(){return i.join(A(),"userData")}function ae(e){return i.join(A(),e)}function G(){return i.join(s(),"profiles")}function ue(){return i.join(s(),"camera-fixtures")}function K(){return i.join(s(),"daemon-app")}function X(){return i.join(K(),"SootSim Daemon.app")}function fe(){return i.join(X(),"Contents","MacOS","sootsim-daemon")}function q(){return i.join(s(),"cache")}function m(){return i.join(s(),M)}function y(){return i.join(s(),T)}function O(e){if(!Number.isInteger(e)||e<=0)throw new Error(`invalid development bridge port: ${e}`);return i.join(y(),`${e}.json`)}function b(){return i.join(s(),J)}function p(){try{let e=n.readFileSync(b(),"utf8"),t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function P(e){h();let t=p(),r={...t,...e};e.settings&&typeof e.settings=="object"&&(r.settings={...t.settings&&typeof t.settings=="object"?t.settings:{},...e.settings});let c=`${b()}.tmp`;return n.writeFileSync(c,`${JSON.stringify(r,null,2)}
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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{k as n}from"./chunk-MPWM3TBY.js";import{M as t,j as r}from"./chunk-S7OIWXIZ.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};
4
+ import{k as n}from"./chunk-GUI3PDH2.js";import{M as t,j as r}from"./chunk-YXXKSL6R.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.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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{e as p}from"./chunk-GISQDTW6.js";import{a as c,b as l}from"./chunk-5OZJUMUS.js";import{a}from"./chunk-X3N2H4A3.js";async function g(e,i){if(i)return i.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let r=a();return r?.origin?r.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function x(e,i={}){let r=c();if(r||(process.stderr.write(`
4
+ import{e as p}from"./chunk-34IQM22N.js";import{a as c,b as l}from"./chunk-GXAB52K7.js";import{a}from"./chunk-UCHW7ZHR.js";async function g(e,i){if(i)return i.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let r=a();return r?.origin?r.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function x(e,i={}){let r=c();if(r||(process.stderr.write(`
5
5
  rnx ${e} needs auth before it can check recording access.
6
6
 
7
7
  pick one:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 a(){console.error(" no rnx desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" rnx desktop install"),console.error(""),console.error(" or install the recommended background service:"),console.error(" rnx daemon install"),console.error("")}function t(r){console.error(""),console.error(` no sim is connected to the rnx bridge on port ${r}.`),console.error(""),console.error(" start your app dev server, then open it in rnx:"),console.error(" npx expo start --localhost --port 8081"),console.error(" rnx open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" rnx describe")}async function d(r,n,s){let e=[];try{e=await r.listSims()}catch{}if(console.error(""),e.length===0){t(n);return}console.error(` no sim with id "${s}" is connected to the bridge on port ${n}.`),console.error(""),console.error(" connected sims:");for(let o of e){let i=[o.isPrimary?"primary":null,o.readyState,o.userVisible===!1?"hidden":o.userVisible===!0?"visible":null,o.userFocused?"focused":null].filter(Boolean).join(", ");console.error(` ${o.id} (${i})`)}console.error(""),console.error(" pass a valid --sim id, or run `rnx list` to see all sessions.")}export{a,t as b,d as c};
@@ -1,6 +1,6 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 C}from"./chunk-FKAZFE5Z.js";import{f as h}from"./chunk-WKH7T3YK.js";import{L as B,T as b,g as S}from"./chunk-S7OIWXIZ.js";import o from"node:fs";import c from"node:path";var g=1,k=`automatic-cleanup-v${g}.json`,x=`automatic-cleanup-v${g}.lock`,A=360*60*1e3;function w(){let i=c.join(S(),k);try{return JSON.parse(o.readFileSync(i,"utf8")).generation===g}catch{return!1}}function $(i){if(i<1024)return`${i} B`;let e=["KiB","MiB","GiB","TiB"],n=i/1024,r=e[0];for(let s=1;s<e.length&&n>=1024;s++)n/=1024,r=e[s];return`${n.toFixed(n>=10?1:2)} ${r}`}function p(i){let e;try{e=o.lstatSync(i)}catch{return 0}let n=e.blocks>0?e.blocks*512:e.size;if(!e.isDirectory()||e.isSymbolicLink())return n;let r=n;try{for(let s of o.readdirSync(i))r+=p(c.join(i,s))}catch{}return r}function E(i){for(let e of["SingletonLock","SingletonSocket","lockfile"])try{if(o.lstatSync(c.join(i,e)))return!0}catch{}return!1}function v(i,e){let n;try{n=o.readdirSync(i,{withFileTypes:!0})}catch{return[]}let r=E(e),s=[];for(let t of n){if(!t.isDirectory()||t.isSymbolicLink())continue;let a=c.join(i,t.name);if(C(t.name)){s.push({path:a,bytes:p(a),kind:"browser-cache",state:r?"in-use":"safe",selected:!r,detail:r?"browser profile is open; close it before cleanup":"disposable browser HTTP, bytecode, or GPU cache"});continue}s.push(...v(a,e))}return s}function P(i){let e=c.join(i,"profiles","playwright"),n;try{n=o.readdirSync(e,{withFileTypes:!0})}catch{return[]}return n.flatMap(r=>{if(!r.isDirectory()||r.isSymbolicLink())return[];let s=c.join(e,r.name);return v(s,s)})}function L(i){let e=c.join(i,"electron","userData");return v(e,e)}function R(i,e){let n=c.join(i,"recordings"),r;try{r=o.readdirSync(n,{withFileTypes:!0})}catch{return[]}return r.map(s=>{let t=c.join(n,s.name);return{path:t,bytes:p(t),kind:"recording",state:"aggressive",selected:e,detail:"user-created recording or captured-frame output"}})}function T(i,e){let n=c.join(i,"camera-fixtures"),r;try{r=o.readdirSync(n,{withFileTypes:!0})}catch{return[]}return r.map(s=>{let t=c.join(n,s.name);return{path:t,bytes:p(t),kind:"camera-fixture",state:"aggressive",selected:e,detail:"staged camera fixture video"}})}function U(i){let e=new Set(b()),n=[...e],r=h.planLocalRetention({retainVersions:2,protectVersions:n}),s=h.planLocalRetention({retainVersions:1,protectVersions:n}),t=new Set(r.removeVersions),a=new Set(s.removeVersions),l=new Set([...r.keepVersions,...r.removeVersions,...s.keepVersions,...s.removeVersions]),m=[];for(let u of[...l].sort()){let d=h.product.runtimeDir(u),y="retained",f="retained runtime";e.has(u)&&u!==r.activeVersion?(y="in-use",f="runtime is serving a connected simulator"):t.has(u)?(y="safe",f="inactive runtime outside the two-version rollback window"):a.has(u)?(y="aggressive",f="most recent rollback runtime"):u===r.activeVersion&&(f="active runtime; always protected"),m.push({path:d,bytes:p(d),kind:"runtime-version",state:y,selected:y==="safe"||y==="aggressive"&&i,detail:f})}for(let u of r.removeCacheFiles)m.push({path:u,bytes:p(u),kind:"runtime-archive",state:"safe",selected:!0,detail:"downloaded archive is unnecessary after successful extraction"});return{activeRuntime:r.activeVersion,entries:m}}function D(i={}){let e=i.aggressive===!0,n=S(),r=U(e),s=[...r.entries,...P(n),...L(n),...R(n,e),...T(n,e)].sort((t,a)=>a.bytes-t.bytes||t.path.localeCompare(a.path));return{home:n,activeRuntime:r.activeRuntime,entries:s,reclaimableBytes:s.reduce((t,a)=>t+(a.selected?a.bytes:0),0),protectedBytes:s.reduce((t,a)=>t+(a.selected?0:a.bytes),0),totalBytes:p(n)}}function I(i,e){let n=c.relative(i,e);if(!n||n.startsWith("..")||c.isAbsolute(n))throw new Error(`refusing cleanup target outside the rnx data home: ${e}`)}function V(i={}){let e=D(i),n=i.aggressive===!0?1:2;h.pruneLocalRetention({retainVersions:n,protectVersions:b()});for(let t of e.entries)if(t.selected&&!(t.kind==="runtime-archive"||t.kind==="runtime-version")){if(t.kind==="browser-cache"){let l=c.relative(e.home,t.path).split(c.sep),m=l[0]==="profiles"&&l[1]==="playwright"&&l[2]?c.join(e.home,"profiles","playwright",l[2]):l[0]==="electron"&&l[1]==="userData"?c.join(e.home,"electron","userData"):null;if(m&&E(m)){t.state="in-use",t.selected=!1,t.detail="browser profile opened while cleanup was starting";continue}}I(e.home,t.path),o.rmSync(t.path,{recursive:!0,force:!0})}let r=e.entries.filter(t=>t.selected&&!o.existsSync(t.path)).map(t=>t.path),s=p(e.home);return{...e,removedPaths:r,reclaimedBytes:Math.max(0,e.totalBytes-s),remainingBytes:s}}function M(){B();let i=S(),e=c.join(i,k),n=c.join(i,x);if(w())return{status:"already-complete",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};let r=null;for(let s=0;s<2&&r===null;s++)try{let t=o.openSync(n,"wx");try{o.writeFileSync(t,`${JSON.stringify({pid:process.pid,startedAt:Date.now()})}
4
+ import{b as C}from"./chunk-TTASWLKM.js";import{f as h}from"./chunk-77ZHQJZR.js";import{L as B,T as b,g as S}from"./chunk-YXXKSL6R.js";import o from"node:fs";import c from"node:path";var g=1,k=`automatic-cleanup-v${g}.json`,x=`automatic-cleanup-v${g}.lock`,A=360*60*1e3;function w(){let i=c.join(S(),k);try{return JSON.parse(o.readFileSync(i,"utf8")).generation===g}catch{return!1}}function $(i){if(i<1024)return`${i} B`;let e=["KiB","MiB","GiB","TiB"],n=i/1024,r=e[0];for(let s=1;s<e.length&&n>=1024;s++)n/=1024,r=e[s];return`${n.toFixed(n>=10?1:2)} ${r}`}function p(i){let e;try{e=o.lstatSync(i)}catch{return 0}let n=e.blocks>0?e.blocks*512:e.size;if(!e.isDirectory()||e.isSymbolicLink())return n;let r=n;try{for(let s of o.readdirSync(i))r+=p(c.join(i,s))}catch{}return r}function E(i){for(let e of["SingletonLock","SingletonSocket","lockfile"])try{if(o.lstatSync(c.join(i,e)))return!0}catch{}return!1}function v(i,e){let n;try{n=o.readdirSync(i,{withFileTypes:!0})}catch{return[]}let r=E(e),s=[];for(let t of n){if(!t.isDirectory()||t.isSymbolicLink())continue;let a=c.join(i,t.name);if(C(t.name)){s.push({path:a,bytes:p(a),kind:"browser-cache",state:r?"in-use":"safe",selected:!r,detail:r?"browser profile is open; close it before cleanup":"disposable browser HTTP, bytecode, or GPU cache"});continue}s.push(...v(a,e))}return s}function P(i){let e=c.join(i,"profiles","playwright"),n;try{n=o.readdirSync(e,{withFileTypes:!0})}catch{return[]}return n.flatMap(r=>{if(!r.isDirectory()||r.isSymbolicLink())return[];let s=c.join(e,r.name);return v(s,s)})}function L(i){let e=c.join(i,"electron","userData");return v(e,e)}function R(i,e){let n=c.join(i,"recordings"),r;try{r=o.readdirSync(n,{withFileTypes:!0})}catch{return[]}return r.map(s=>{let t=c.join(n,s.name);return{path:t,bytes:p(t),kind:"recording",state:"aggressive",selected:e,detail:"user-created recording or captured-frame output"}})}function T(i,e){let n=c.join(i,"camera-fixtures"),r;try{r=o.readdirSync(n,{withFileTypes:!0})}catch{return[]}return r.map(s=>{let t=c.join(n,s.name);return{path:t,bytes:p(t),kind:"camera-fixture",state:"aggressive",selected:e,detail:"staged camera fixture video"}})}function U(i){let e=new Set(b()),n=[...e],r=h.planLocalRetention({retainVersions:2,protectVersions:n}),s=h.planLocalRetention({retainVersions:1,protectVersions:n}),t=new Set(r.removeVersions),a=new Set(s.removeVersions),l=new Set([...r.keepVersions,...r.removeVersions,...s.keepVersions,...s.removeVersions]),m=[];for(let u of[...l].sort()){let d=h.product.runtimeDir(u),y="retained",f="retained runtime";e.has(u)&&u!==r.activeVersion?(y="in-use",f="runtime is serving a connected simulator"):t.has(u)?(y="safe",f="inactive runtime outside the two-version rollback window"):a.has(u)?(y="aggressive",f="most recent rollback runtime"):u===r.activeVersion&&(f="active runtime; always protected"),m.push({path:d,bytes:p(d),kind:"runtime-version",state:y,selected:y==="safe"||y==="aggressive"&&i,detail:f})}for(let u of r.removeCacheFiles)m.push({path:u,bytes:p(u),kind:"runtime-archive",state:"safe",selected:!0,detail:"downloaded archive is unnecessary after successful extraction"});return{activeRuntime:r.activeVersion,entries:m}}function D(i={}){let e=i.aggressive===!0,n=S(),r=U(e),s=[...r.entries,...P(n),...L(n),...R(n,e),...T(n,e)].sort((t,a)=>a.bytes-t.bytes||t.path.localeCompare(a.path));return{home:n,activeRuntime:r.activeRuntime,entries:s,reclaimableBytes:s.reduce((t,a)=>t+(a.selected?a.bytes:0),0),protectedBytes:s.reduce((t,a)=>t+(a.selected?0:a.bytes),0),totalBytes:p(n)}}function I(i,e){let n=c.relative(i,e);if(!n||n.startsWith("..")||c.isAbsolute(n))throw new Error(`refusing cleanup target outside the rnx data home: ${e}`)}function V(i={}){let e=D(i),n=i.aggressive===!0?1:2;h.pruneLocalRetention({retainVersions:n,protectVersions:b()});for(let t of e.entries)if(t.selected&&!(t.kind==="runtime-archive"||t.kind==="runtime-version")){if(t.kind==="browser-cache"){let l=c.relative(e.home,t.path).split(c.sep),m=l[0]==="profiles"&&l[1]==="playwright"&&l[2]?c.join(e.home,"profiles","playwright",l[2]):l[0]==="electron"&&l[1]==="userData"?c.join(e.home,"electron","userData"):null;if(m&&E(m)){t.state="in-use",t.selected=!1,t.detail="browser profile opened while cleanup was starting";continue}}I(e.home,t.path),o.rmSync(t.path,{recursive:!0,force:!0})}let r=e.entries.filter(t=>t.selected&&!o.existsSync(t.path)).map(t=>t.path),s=p(e.home);return{...e,removedPaths:r,reclaimedBytes:Math.max(0,e.totalBytes-s),remainingBytes:s}}function M(){B();let i=S(),e=c.join(i,k),n=c.join(i,x);if(w())return{status:"already-complete",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};let r=null;for(let s=0;s<2&&r===null;s++)try{let t=o.openSync(n,"wx");try{o.writeFileSync(t,`${JSON.stringify({pid:process.pid,startedAt:Date.now()})}
5
5
  `,"utf8"),r=t}catch(a){o.closeSync(t);try{o.unlinkSync(n)}catch{}throw a}}catch(t){if((t instanceof Error&&"code"in t?t.code:null)!=="EEXIST")throw t;let l=0,m=0,u=null;try{u=o.lstatSync(n);let d=JSON.parse(o.readFileSync(n,"utf8"));l=typeof d.pid=="number"?d.pid:0,m=typeof d.startedAt=="number"?d.startedAt:0}catch{}if(l>0&&m>0&&Date.now()-m<A)try{return process.kill(l,0),{status:"busy",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0}}catch{}if(!u)continue;try{let d=o.lstatSync(n);if(d.dev!==u.dev||d.ino!==u.ino)return{status:"busy",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};o.unlinkSync(n)}catch{}}if(r===null)return{status:"busy",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};try{if(w())return{status:"already-complete",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};let s=V(),t=s.entries.reduce((l,m)=>l+(m.state==="in-use"?m.bytes:0),0);if(t>0)return{status:"deferred",reclaimedBytes:s.reclaimedBytes,remainingBytes:s.remainingBytes,deferredInUseBytes:t};let a=`${e}.${process.pid}.tmp`;return o.writeFileSync(a,`${JSON.stringify({generation:g,completedAt:Date.now(),reclaimedBytes:s.reclaimedBytes})}
6
6
  `,"utf8"),o.renameSync(a,e),{status:"complete",reclaimedBytes:s.reclaimedBytes,remainingBytes:s.remainingBytes,deferredInUseBytes:0}}finally{o.closeSync(r);try{o.unlinkSync(n)}catch{}}}export{w as a,$ as b,D as c,V as d,M as e};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 r,c as g,d as f,e as v}from"./chunk-ZUKAXCGG.js";import"./chunk-FKAZFE5Z.js";import"./chunk-WKH7T3YK.js";import"./chunk-S7OIWXIZ.js";import"./chunk-6EALLMLO.js";import"./chunk-GCMVAY4M.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(`
4
+ import{b as r,c as g,d as f,e as v}from"./chunk-ZMJ75EDG.js";import"./chunk-TTASWLKM.js";import"./chunk-77ZHQJZR.js";import"./chunk-YXXKSL6R.js";import"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.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
5
  rnx cleanup \u2014 inspect and reclaim local rnx disk usage
6
6
 
7
7
  usage:
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.366 | (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-ONORMKWX.js";import"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.js";export{a as getCliVersion};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{d as a,g as i,i as d,j as r}from"./chunk-HFHQUP6D.js";import"./chunk-GCMVAY4M.js";import{existsSync as m,readFileSync as k}from"node:fs";import{resolve as f}from"node:path";async function P(e){if(e.includes("--help")||e.includes("-h")){console.log(`
4
+ import{d as a,g as i,i as d,j as r}from"./chunk-YGMEDJKJ.js";import"./chunk-JHXETDVC.js";import{existsSync as m,readFileSync as k}from"node:fs";import{resolve as f}from"node:path";async function P(e){if(e.includes("--help")||e.includes("-h")){console.log(`
5
5
  rnx compat \u2014 check package compatibility
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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{F as t,G as r,z as s}from"./chunk-S7OIWXIZ.js";import"./chunk-GCMVAY4M.js";function l(){let e=t(),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: ${s()}`);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 i(e){let n=e.find(o=>!o.startsWith("-"))?.toLowerCase();switch(n){case void 0:case"status":l();return;case"on":r({productAnalytics:!0,crashReports:!1}),console.log(" bounded diagnostics ON"),console.log(` config: ${s()}`);return;case"off":r({productAnalytics:!1,crashReports:!1}),console.log(" bounded diagnostics OFF"),console.log(` config: ${s()}`);return;default:console.error(` unknown telemetry action: ${n}`),console.error(" usage: rnx config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
4
+ import{F as t,G as r,z as s}from"./chunk-YXXKSL6R.js";import"./chunk-JHXETDVC.js";function l(){let e=t(),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: ${s()}`);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 i(e){let n=e.find(o=>!o.startsWith("-"))?.toLowerCase();switch(n){case void 0:case"status":l();return;case"on":r({productAnalytics:!0,crashReports:!1}),console.log(" bounded diagnostics ON"),console.log(` config: ${s()}`);return;case"off":r({productAnalytics:!1,crashReports:!1}),console.log(" bounded diagnostics OFF"),console.log(` config: ${s()}`);return;default:console.error(` unknown telemetry action: ${n}`),console.error(" usage: rnx config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
5
5
  rnx config \u2014 manage local CLI preferences
6
6
 
7
7
  usage:
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.366 | (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-7B37IZBN.js";import"./chunk-RYIMSKDO.js";import"./chunk-EGAGZHO6.js";import"./chunk-ORWP2E7R.js";import"./chunk-EQK5MJCU.js";import"./chunk-3X6IBUBX.js";import"./chunk-DW37EVX5.js";import"./chunk-5DAIA77C.js";import"./chunk-NQFJOCSF.js";import"./chunk-DMPF2D24.js";import"./chunk-SA6XVI55.js";import"./chunk-6PL2CCGP.js";import"./chunk-HT6GFZOZ.js";import"./chunk-M6SKQGAN.js";import"./chunk-XXNLYR64.js";import"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-I6KIM6PN.js";import"./chunk-TTASWLKM.js";import"./chunk-77ZHQJZR.js";import"./chunk-IZKHOM37.js";import"./chunk-YXXKSL6R.js";import"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.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};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.366 | (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-LN3RNW6X.js";import"./chunk-2S7BKUP2.js";import"./chunk-ZFM24DOX.js";import"./chunk-NM2L2QV4.js";import"./chunk-M6SKQGAN.js";import"./chunk-XXNLYR64.js";import"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-VIND4SP3.js";import"./chunk-YXXKSL6R.js";import"./chunk-ONORMKWX.js";import"./chunk-5NMCF5VF.js";import"./chunk-EFR5DVNP.js";import"./chunk-JHXETDVC.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,e as teardownDaemonService,d as teardownLegacyMacDaemonArtifacts,f as teardownSootsimHome};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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{f as b,m as C}from"./chunk-4OK2SZTF.js";import{L as N,M as D,N as O,O as T,P as k}from"./chunk-SWIEVEPN.js";import{q as A,s as _,u as S}from"./chunk-MPWM3TBY.js";import"./chunk-T2U4BLWM.js";import"./chunk-S7OIWXIZ.js";import"./chunk-GCMVAY4M.js";var B=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],F="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function R(){console.log(`
4
+ import{f as b,m as C}from"./chunk-3X6IBUBX.js";import{L as N,M as D,N as O,O as T,P as k}from"./chunk-DW37EVX5.js";import{q as A,s as _,u as S}from"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-YXXKSL6R.js";import"./chunk-JHXETDVC.js";var B=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],F="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function R(){console.log(`
5
5
  rnx debug \u2014 drive __sootsimDebug from the terminal
6
6
 
7
7
  usage:
@@ -181,7 +181,7 @@ examples:
181
181
  } : null,
182
182
  samples,
183
183
  }
184
- })()`}async function u(t,a){return S(t,a)}function z(t,a){let d=t.indexOf(a);if(d<0)return null;let m=Number(t[d+1]);return Number.isFinite(m)?m:null}async function J(t){await u(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'enable').then(() => 'enabled')"),await t.send({type:"screenshot"});let d=(await u(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 E(t){return t===null?" - ":t.toFixed(3).padStart(6)}function V(t){let a=t.sourceUri??t.testID??`node ${t.nodeId}`;return a.length<=58?a:`...${a.slice(-55)}`}function W(t,a,d){let f=t.rows.filter(c=>c.shortfall!==null).filter(c=>c.shortfall<d);if(console.log(` ${t.rows.length} images drawn (${t.draws} draws), ${f.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 x=`${c.decoded.width}x${c.decoded.height}`.padEnd(11),r=(c.vector?"vector":c.intrinsic?`${c.intrinsic.width}x${c.intrinsic.height}`:"?").padEnd(11),w=`${Math.round(c.needed.width)}x${Math.round(c.needed.height)}`.padEnd(12),y=`${Math.round(c.destination.width)}x${Math.round(c.destination.height)}`.padEnd(9);console.log(` ${E(c.shortfall)} ${E(c.effective.width)} ${x} ${r} ${w} ${y} ${c.dpr.toFixed(1)} ${V(c)}`)}}async function X(t,a){let d=A(t,{port:a.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),m=d.positional;(!m[0]||t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let c=d.wsPort,x=d.simId,r=!t.includes("--json"),w=x?` --sim ${x}`:"",y=m[0],l=m.slice(1);if(new Set(["state","js","perf","memory","sample-color"]).has(y)){let{runInspect:e}=await import("./inspect-G24KNRYH.js");await e(["debug",...t],{port:a.port,verbose:a.verbose});return}let o=_(d);try{switch(y){case"enable":{let e=I(l[0]);e.length===0&&(console.error(` usage: rnx debug enable <channel[,channel,...]>
184
+ })()`}async function u(t,a){return S(t,a)}function z(t,a){let d=t.indexOf(a);if(d<0)return null;let m=Number(t[d+1]);return Number.isFinite(m)?m:null}async function J(t){await u(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'enable').then(() => 'enabled')"),await t.send({type:"screenshot"});let d=(await u(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 E(t){return t===null?" - ":t.toFixed(3).padStart(6)}function V(t){let a=t.sourceUri??t.testID??`node ${t.nodeId}`;return a.length<=58?a:`...${a.slice(-55)}`}function W(t,a,d){let f=t.rows.filter(c=>c.shortfall!==null).filter(c=>c.shortfall<d);if(console.log(` ${t.rows.length} images drawn (${t.draws} draws), ${f.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 x=`${c.decoded.width}x${c.decoded.height}`.padEnd(11),r=(c.vector?"vector":c.intrinsic?`${c.intrinsic.width}x${c.intrinsic.height}`:"?").padEnd(11),w=`${Math.round(c.needed.width)}x${Math.round(c.needed.height)}`.padEnd(12),y=`${Math.round(c.destination.width)}x${Math.round(c.destination.height)}`.padEnd(9);console.log(` ${E(c.shortfall)} ${E(c.effective.width)} ${x} ${r} ${w} ${y} ${c.dpr.toFixed(1)} ${V(c)}`)}}async function X(t,a){let d=A(t,{port:a.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),m=d.positional;(!m[0]||t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let c=d.wsPort,x=d.simId,r=!t.includes("--json"),w=x?` --sim ${x}`:"",y=m[0],l=m.slice(1);if(new Set(["state","js","perf","memory","sample-color"]).has(y)){let{runInspect:e}=await import("./inspect-C347BG52.js");await e(["debug",...t],{port:a.port,verbose:a.verbose});return}let o=_(d);try{switch(y){case"enable":{let e=I(l[0]);e.length===0&&(console.error(` usage: rnx debug enable <channel[,channel,...]>
185
185
  known: ${B.join(", ")}`),process.exit(1));let s=await k(o,"enable",e);console.log(i({active:s},r));break}case"disable":{let e=I(l[0]),s=await k(o,"disable",e);console.log(i({active:s},r));break}case"toggle":{let e=l[0];e||(console.error(" usage: rnx debug toggle <channel>"),process.exit(1));let s=await u(o,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(i({[e]:s},r));break}case"status":{let e=await N(o);console.log(i(e,r));break}case"channels":{let e=await u(o,"window.__sootsimDebug.channels()");console.log(i(e,r));break}case"flags":{let e=await D(o);console.log(i(e,r));break}case"snapshot":{let e=l[0],s=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",n=await u(o,`(() => { const s = ${s}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(i(n,r));break}case"snapshots":{let e=await u(o,"window.__sootsimDebug.snapshots()");console.log(i(e,r));break}case"diff":{let e=l[0],s=l[1];(!e||!s)&&(console.error(" usage: rnx debug diff <labelA> <labelB>"),process.exit(1));let n=`(() => {
186
186
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(s)});
187
187
  if (!d) return null;
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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"./chunk-WK3QQTWE.js";import{a as f}from"./chunk-IX2ZY3FI.js";import{h as u}from"./chunk-2FLTYH6I.js";import"./chunk-GXMNFFJJ.js";import"./chunk-LWOIQBVX.js";import"./chunk-ONGTUKC3.js";import"./chunk-AUHE5LTY.js";import"./chunk-4OK2SZTF.js";import"./chunk-SWIEVEPN.js";import{a}from"./chunk-KXGBOYTB.js";import{c}from"./chunk-6TAFS3GK.js";import"./chunk-XXFZMO4I.js";import"./chunk-2TL6BZCH.js";import"./chunk-CAP2EQ4P.js";import"./chunk-GJKVFQCF.js";import"./chunk-OXXWSZKI.js";import"./chunk-EP5FYRBT.js";import"./chunk-MPWM3TBY.js";import"./chunk-T2U4BLWM.js";import{a as d}from"./chunk-GYC6VTQV.js";import{a as p}from"./chunk-475BITXX.js";import"./chunk-FKAZFE5Z.js";import"./chunk-WKH7T3YK.js";import"./chunk-PSUX2SIK.js";import{i as l}from"./chunk-JF6NYOSI.js";import"./chunk-S7OIWXIZ.js";import"./chunk-6EALLMLO.js";import"./chunk-GCMVAY4M.js";function k(e){let t=e.indexOf("--port");if(t<0)return;let o=e[t+1],n=o?Number(o):Number.NaN;return(!Number.isInteger(n)||n<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),n}async function v(e,t){let o=k(e)??t.port;return o?u(String(o)):void 0}async function m(e,t){(e.includes("--help")||e.includes("-h"))&&(console.log(`
4
+ import"./chunk-CTG7HBCA.js";import{a as f}from"./chunk-ZLVRYXZ7.js";import{g as u}from"./chunk-7B37IZBN.js";import"./chunk-RYIMSKDO.js";import"./chunk-EGAGZHO6.js";import"./chunk-ORWP2E7R.js";import"./chunk-EQK5MJCU.js";import"./chunk-3X6IBUBX.js";import"./chunk-DW37EVX5.js";import{a}from"./chunk-5DAIA77C.js";import{c}from"./chunk-NQFJOCSF.js";import"./chunk-DMPF2D24.js";import"./chunk-SA6XVI55.js";import"./chunk-6PL2CCGP.js";import"./chunk-HT6GFZOZ.js";import"./chunk-M6SKQGAN.js";import"./chunk-XXNLYR64.js";import"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import{a as d}from"./chunk-NAYLPOC5.js";import{a as p}from"./chunk-I6KIM6PN.js";import"./chunk-TTASWLKM.js";import"./chunk-77ZHQJZR.js";import"./chunk-IZKHOM37.js";import{i as l}from"./chunk-N3UC7HIX.js";import"./chunk-YXXKSL6R.js";import"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.js";function k(e){let t=e.indexOf("--port");if(t<0)return;let o=e[t+1],n=o?Number(o):Number.NaN;return(!Number.isInteger(n)||n<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),n}async function v(e,t){let o=k(e)??t.port;return o?u(String(o)):void 0}async function m(e,t){(e.includes("--help")||e.includes("-h"))&&(console.log(`
5
5
  rnx desktop \u2014 launch the desktop companion
6
6
 
7
7
  usage:
@@ -16,7 +16,7 @@ examples:
16
16
  rnx desktop
17
17
  rnx desktop --port 5173
18
18
  rnx desktop --profile qa
19
- `),process.exit(0));let o=e.find((g,s)=>e[s-1]==="--profile"),n=e.includes("--ephemeral");o&&n&&(console.error(" rnx desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let h=o?c(o).id:void 0,r=p();if(!r){if(f(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await l("run rnx desktop install now?",!0)){console.log();let{runInstallDesktop:s}=await import("./install-desktop-FHESQL4S.js");await s(["--yes"]),r=p()}r||process.exit(1)}console.log(` launching ${r.path}`);let x=await v(e,t),i=await a.launch({url:x,device:t.device,profileId:h,ephemeralProfile:n});i.launched||(console.error(` ${i.message}`),process.exit(1)),console.log(` ${i.message}`)}function w(){console.log(`
19
+ `),process.exit(0));let o=e.find((g,s)=>e[s-1]==="--profile"),n=e.includes("--ephemeral");o&&n&&(console.error(" rnx desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let h=o?c(o).id:void 0,r=p();if(!r){if(f(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await l("run rnx desktop install now?",!0)){console.log();let{runInstallDesktop:s}=await import("./install-desktop-YR6TWZYK.js");await s(["--yes"]),r=p()}r||process.exit(1)}console.log(` launching ${r.path}`);let x=await v(e,t),i=await a.launch({url:x,device:t.device,profileId:h,ephemeralProfile:n});i.launched||(console.error(` ${i.message}`),process.exit(1)),console.log(` ${i.message}`)}function w(){console.log(`
20
20
  rnx desktop \u2014 launch or install the desktop companion
21
21
 
22
22
  usage:
@@ -0,0 +1,52 @@
1
+ /*! rnx v0.1.366 | (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 J}from"./chunk-CN6XYYEA.js";import"./chunk-2UXU53MG.js";import"./chunk-ZJIS3CTW.js";import{c as N,d as $,e as k}from"./chunk-34IQM22N.js";import{a as E}from"./chunk-GXAB52K7.js";import"./chunk-UCHW7ZHR.js";import"./chunk-M5QCGLXR.js";import"./chunk-ZLVRYXZ7.js";import"./chunk-A5FXX5PJ.js";import"./chunk-XJU2QIRY.js";import"./chunk-7B37IZBN.js";import"./chunk-RYIMSKDO.js";import"./chunk-EGAGZHO6.js";import"./chunk-ORWP2E7R.js";import"./chunk-EQK5MJCU.js";import"./chunk-3X6IBUBX.js";import"./chunk-DW37EVX5.js";import"./chunk-5DAIA77C.js";import"./chunk-NQFJOCSF.js";import"./chunk-DMPF2D24.js";import"./chunk-SA6XVI55.js";import"./chunk-6PL2CCGP.js";import"./chunk-HT6GFZOZ.js";import"./chunk-NM2L2QV4.js";import"./chunk-M6SKQGAN.js";import"./chunk-XXNLYR64.js";import"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-I6KIM6PN.js";import"./chunk-KLF3K6ZZ.js";import"./chunk-MGDSJZ37.js";import"./chunk-VIND4SP3.js";import"./chunk-TTASWLKM.js";import"./chunk-77ZHQJZR.js";import"./chunk-IZKHOM37.js";import"./chunk-YXXKSL6R.js";import{a as M}from"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.js";import{spawn as q}from"child_process";import{existsSync as g,mkdirSync as H,readFileSync as V,writeFileSync as y,unlinkSync as A}from"fs";import{createRequire as z}from"module";import{tmpdir as U}from"os";import{dirname as K,resolve as c,join as w,relative as Q}from"path";function X(){try{let t=import.meta.resolve(`${M.packageName}/detox`);return K(t.startsWith("file://")?t.slice(7):t)}catch{return c(import.meta.dirname,"..","..","detox")}}var Y=`
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 fe(t,o={}){if((t.includes("--help")||t.includes("-h"))&&(console.log(Y),process.exit(0)),t[0]==="init")return se();let l=e=>{let s=t.indexOf(e);return s>=0?t[s+1]:void 0},n=e=>t.includes(e),u=n("--watch"),f=n("--headed"),d=n("--no-launch"),T=l("--config"),m=o.port||Number(process.env.SOOTSIM_PORT)||5173,C=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")}),L=t.flatMap((e,s)=>e==="--runInBand"||e.startsWith("--maxWorkers=")||e.startsWith("--shard=")?[e]:(e==="--maxWorkers"||e==="--shard")&&t[s+1]?[e,t[s+1]]:[]),I=["e2e","test/e2e","detox"],a=process.env.SOOTSIM_TEST_DIR?c(process.cwd(),process.env.SOOTSIM_TEST_DIR):null;if(!a)for(let e of I){let s=c(process.cwd(),e);if(g(s)){a=s;break}}a||(console.error(` error: no detox tests found. expected one of: ${I.join(", ")}
19
+ run 'rnx detox init' to scaffold a starter suite.`),process.exit(1)),d||await te(m);let r=["jest"],x=T||ee(["sootsim-detox.config.cjs","jest.config.cjs","jest.config.js"]),p=null;if(x)r.push("--config",c(process.cwd(),x));else{let e=c(X(),"jest-preset.cjs");p=w(U(),`sootsim-detox-${process.pid}.config.cjs`);let s={rootDir:a,roots:["<rootDir>"],testMatch:["<rootDir>/**/*.test.ts","<rootDir>/**/*.test.js"]};y(p,`module.exports = { ...require(${JSON.stringify(e)}), ...${JSON.stringify(s)} }
20
+ `),r.push("--config",p)}u&&r.push("--watch");let j=l("-t")||l("--testNamePattern")||l("--grep");j&&r.push("-t",j);let v=E(),b=!u&&N({uploadedShare:!1,auth:v}),h=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):b&&(h=w(U(),`sootsim-detox-results-${process.pid}.json`),r.push("--json","--outputFile",h)),r.push(...L),r.push(...C),console.log(" rnx detox"),console.log(` test dir: ${a}`),console.log(` port: ${m}${f?" (headed)":""}`),x&&console.log(` config: ${x}`);let R=process.env.CONFORMANCE_PROOF==="1"||!!process.env.CONFORMANCE_PROOF_DIR,W=R?"node":"npx",G=R?["--no-maglev",z(w(process.cwd(),"package.json")).resolve("jest/bin/jest"),...r.slice(1)]:r,S=q(W,G,{cwd:process.cwd(),stdio:"inherit",env:{...process.env,SOOTSIM_TEST_DIR:a,SOOTSIM_PORT:String(m),SOOTSIM_HEADED:f?"1":"",SOOTSIM_URL:process.env.SOOTSIM_URL||`http://localhost:${m}`}}),_=e=>()=>{S.kill(e)},F=_("SIGTERM"),P=_("SIGINT");process.on("SIGTERM",F),process.on("SIGINT",P);let B=Date.now(),O=await new Promise((e,s)=>{S.once("error",s),S.once("exit",(i,D)=>{if(D){console.error(` error: jest terminated by ${D}`),e(1);return}e(i??1)})});if(process.off("SIGTERM",F),process.off("SIGINT",P),p)try{A(p)}catch{}if(b){let e=h?Z(h):null,s=await k(),i=await $({origin:s,kind:"detox",name:Q(process.cwd(),a)||"e2e",status:O===0?"passed":"failed",summary:e?`${e.numPassedTests}/${e.numTotalTests} tests passed`:null,failureMessage:O===0?null:e?.firstFailure??null,stepCount:e?.numTotalTests??null,failedStepIndex:e?.firstFailedIndex??null,durationMs:Date.now()-B,auth:v});i&&console.log(` run: ${i.id}`)}process.exit(O)}function Z(t){try{let o=JSON.parse(V(t,"utf8")),l=null,n=null,u=0;for(let f of o.testResults??[])for(let d of f.testResults??[]){if(n==null&&d.status==="failed"){n=u;let T=d.failureMessages?.[0]?.split(`
21
+ `)[0];l=[d.fullName,T].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{A(t)}catch{}}}function ee(t){for(let o of t)if(g(c(process.cwd(),o)))return o;return null}async function te(t){await J()||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 se(){let t=process.cwd(),o=c(t,"sootsim-detox.config.cjs");g(o)?console.log(` skip: ${o} already exists`):(y(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=c(t,"e2e"),n=c(l,"example.test.ts");g(n)?console.log(` skip: ${n} already exists`):(H(l,{recursive:!0}),y(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"),process.exit(0)}export{fe as runDetox};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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"./chunk-LWOIQBVX.js";import"./chunk-XXFZMO4I.js";import"./chunk-OXXWSZKI.js";import{b as c,c as s,d as m}from"./chunk-EP5FYRBT.js";import{q as d,s as l,v as a}from"./chunk-MPWM3TBY.js";import"./chunk-T2U4BLWM.js";import"./chunk-S7OIWXIZ.js";import"./chunk-GCMVAY4M.js";function h(){console.log(`
4
+ import"./chunk-EGAGZHO6.js";import"./chunk-DMPF2D24.js";import"./chunk-M6SKQGAN.js";import{b as c,c as s,d as m}from"./chunk-XXNLYR64.js";import{q as d,s as l,v as a}from"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-YXXKSL6R.js";import"./chunk-JHXETDVC.js";function h(){console.log(`
5
5
  rnx device \u2014 inspect or change the live device preset for a sim
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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{e as v,q as E,s as x,v as b}from"./chunk-MPWM3TBY.js";import"./chunk-T2U4BLWM.js";import"./chunk-S7OIWXIZ.js";import"./chunk-GCMVAY4M.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(`
4
+ import{e as v,q as E,s as x,v as b}from"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-YXXKSL6R.js";import"./chunk-JHXETDVC.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
5
  rnx get diagnosis \u2014 compact "what just went wrong?" report
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a,b,c,d,e}from"./chunk-ZUKAXCGG.js";import"./chunk-FKAZFE5Z.js";import"./chunk-WKH7T3YK.js";import"./chunk-S7OIWXIZ.js";import"./chunk-6EALLMLO.js";import"./chunk-GCMVAY4M.js";export{e as applyAutomaticSootsimCleanup,d as applySootsimCleanup,b as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,c as planSootsimCleanup};
4
+ import{a,b,c,d,e}from"./chunk-ZMJ75EDG.js";import"./chunk-TTASWLKM.js";import"./chunk-77ZHQJZR.js";import"./chunk-YXXKSL6R.js";import"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.js";export{e as applyAutomaticSootsimCleanup,d as applySootsimCleanup,b as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,c as planSootsimCleanup};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.366 | (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-CTG7HBCA.js";import{a,b,c,d,e,f,g}from"./chunk-5DAIA77C.js";import"./chunk-NQFJOCSF.js";import"./chunk-GAJQSITE.js";import"./chunk-I6KIM6PN.js";import"./chunk-TTASWLKM.js";import"./chunk-YXXKSL6R.js";import"./chunk-JHXETDVC.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,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 R,d as L}from"./chunk-26XF67QW.js";import{q as x,s as A,w as b}from"./chunk-MPWM3TBY.js";import"./chunk-T2U4BLWM.js";import"./chunk-S7OIWXIZ.js";import"./chunk-GCMVAY4M.js";import{spawnSync as T}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
4
+ import{c as R,d as L}from"./chunk-M3BNCF7E.js";import{q as x,s as A,w as b}from"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-YXXKSL6R.js";import"./chunk-JHXETDVC.js";import{spawnSync as T}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
5
5
  rnx film \u2014 record a flow flat, replay it on the 3d stage, save a clip
6
6
 
7
7
  usage:
@@ -35,7 +35,7 @@ examples:
35
35
  rnx film flows/swap.yaml --script hero-arc --background gradient-tide --out ~/Desktop/swap-3d.mp4
36
36
  rnx film flows/login.yaml --colorway deep-blue --environment on --env-shape pane --room on
37
37
  `),0;let s=e.find(d=>!d.startsWith("--")&&/\.ya?ml$/.test(d));if(!s||!V(I(s)))return console.error(` film: flow file not found: ${s??"(none given)"}`),1;let P=Number.parseInt(c(e,"--fps")??"30",10),h=c(e,"--script")??"hero-arc",z=e.includes("--keep-three"),v=s.replace(/^.*\//,"").replace(/\.ya?ml$/,""),O=c(e,"--out"),l=I(O??K(j(),"Desktop","sootsim-films",`${v}.webm`)),S=H(l).toLowerCase()===".mp4";if(S&&T("ffmpeg",["-version"]).status!==0)return console.error(" film: --out ends in .mp4 but ffmpeg is not installed"),console.error(" install ffmpeg or use a .webm output path"),1;let C=x(e,{port:a.port,stripValueFlags:[...X,...Q],stripBooleanFlags:J}),t=A({...C,commandTimeoutMs:6e4});try{let d=await r(t,`(() => { const s = window.SootSim?.bridges?.settings?.get?.() || {}
38
- return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(t,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let D=Date.now();await n(500);let{runFlowPlayback:G}=await import("./flow-FX5GS2R4.js"),m=[s],y=c(e,"--sim");y&&m.push("--sim",y);let k=c(e,"--slow");k&&m.push("--slow",k);let f=await G(m);await n(400);let u=Math.min(Date.now()-D,Y);if(await r(t,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let F=!1;for(let o=0;o<50;o++){await n(400);let i=await r(t,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
38
+ return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(t,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let D=Date.now();await n(500);let{runFlowPlayback:G}=await import("./flow-7QAE2V5Y.js"),m=[s],y=c(e,"--sim");y&&m.push("--sim",y);let k=c(e,"--slow");k&&m.push("--slow",k);let f=await G(m);await n(400);let u=Math.min(Date.now()-D,Y);if(await r(t,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let F=!1;for(let o=0;o<50;o++){await n(400);let i=await r(t,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
39
39
  return { state: s?.state, hasBlob: !!s?.lastVideoBlob } })()`);if(i?.state==="idle"&&i.hasBlob){F=!0;break}}if(!F)return console.error(" film: flow recording never produced a video blob"),1;console.log(` film: flow captured (${(u/1e3).toFixed(1)}s)`),await r(t,"window.SootSim?.bridges?.settings?.set?.('threeMode', true)"),await R(t),await n(1400),await r(t,"window.SootSim?.bridges?.settings?.set?.('threeRecordingEditor', true)");let _=!1;for(let o=0;o<60;o++)if(await n(250),await r(t,`(() => { const rs = window.SootSim?.replayStore
40
40
  return rs?.value?.preview?.surface === 'video' && !!rs?.value?.preview?.flowVideoUrl })()`)){_=!0;break}if(!_)return console.error(" film: recording editor did not seed the replay store"),1;let p=L(e);delete p.script,p.resetPose=!0,await b(t,"SootSim.bridges.threeMode.configure",p),await n(2400),console.log(` film: filming the 3d stage (script: ${h})`);let M=await r(t,`(() => {
41
41
  const c = window.SootSim?.bridges?.threeMode?.getCanvas?.()
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.366 | (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,d,e,f,g,h,i}from"./chunk-CN6XYYEA.js";import"./chunk-2UXU53MG.js";import"./chunk-ZJIS3CTW.js";import"./chunk-34IQM22N.js";import"./chunk-GXAB52K7.js";import"./chunk-UCHW7ZHR.js";import{a,b}from"./chunk-M5QCGLXR.js";import"./chunk-ZLVRYXZ7.js";import"./chunk-A5FXX5PJ.js";import"./chunk-XJU2QIRY.js";import"./chunk-7B37IZBN.js";import"./chunk-RYIMSKDO.js";import"./chunk-EGAGZHO6.js";import"./chunk-ORWP2E7R.js";import"./chunk-EQK5MJCU.js";import"./chunk-3X6IBUBX.js";import"./chunk-DW37EVX5.js";import"./chunk-5DAIA77C.js";import"./chunk-NQFJOCSF.js";import"./chunk-DMPF2D24.js";import"./chunk-SA6XVI55.js";import"./chunk-6PL2CCGP.js";import"./chunk-HT6GFZOZ.js";import"./chunk-NM2L2QV4.js";import"./chunk-M6SKQGAN.js";import"./chunk-XXNLYR64.js";import"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-I6KIM6PN.js";import"./chunk-KLF3K6ZZ.js";import"./chunk-MGDSJZ37.js";import"./chunk-VIND4SP3.js";import"./chunk-TTASWLKM.js";import"./chunk-77ZHQJZR.js";import"./chunk-IZKHOM37.js";import"./chunk-YXXKSL6R.js";import"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.js";export{f as discoverSootsimUrl,c as getLastFlowPreviewUploadResult,d as getLastFlowTraceSteps,h as hoistLeadingSimFlag,a as parseFlowFile,e as resolveAppFrontmatterTarget,g as runFlowPlayback,i as runMaestroAuthoring,b as validateFlowFile};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.366 | (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}from"./chunk-2S7BKUP2.js";import"./chunk-ZFM24DOX.js";import"./chunk-NM2L2QV4.js";import"./chunk-M6SKQGAN.js";import"./chunk-XXNLYR64.js";import"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-VIND4SP3.js";import"./chunk-YXXKSL6R.js";import"./chunk-ONORMKWX.js";import"./chunk-5NMCF5VF.js";import"./chunk-EFR5DVNP.js";import"./chunk-JHXETDVC.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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"./chunk-5GO3JI65.js";import{b as n}from"./chunk-UDZI7GEV.js";import"./chunk-GCMVAY4M.js";var e=["do","get"];function i(t){if(t.command)return t;let o=t.commandArgs.find(r=>!r.startsWith("-"));if(!o)return t;for(let r of e)if(n(r,o))return{...t,command:r};return t}export{i as resolveHiddenRuntimeAlias};
4
+ import"./chunk-MGDSJZ37.js";import{b as n}from"./chunk-VIND4SP3.js";import"./chunk-JHXETDVC.js";var e=["do","get"];function i(t){if(t.command)return t;let o=t.commandArgs.find(r=>!r.startsWith("-"));if(!o)return t;for(let r of e)if(n(r,o))return{...t,command:r};return t}export{i as resolveHiddenRuntimeAlias};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-S7OIWXIZ.js";import"./chunk-GCMVAY4M.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGES_DIR,a as SOOTSIM_HOME_ENV,O as activeRuntimeDir,m as activeRuntimeFile,v as cacheDir,r as cameraFixturesDir,W as claimDaemonLockfile,z as configFilePath,K as consumeRuntimeUpgradeNotice,t as daemonAppBundlePath,s as daemonAppDir,u as daemonAppLauncherPath,w as daemonLockfilePath,y as devBridgeLockfilePath,x as devBridgesDir,n as electronDir,o as electronUserDataDir,p as electronVersionDir,L as ensureSootsimHome,R as isDaemonLockfileFresh,S as isDevBridgeLockfileFresh,i as isDevWorkstation,C as isOnboardingComplete,h as isSootsimDevCheckout,q as profilesDir,M as readActiveRuntime,P as readDaemonLockfile,Q as readDevBridgeLockfiles,T as readLiveRuntimeVersions,H as readOrCreateAnonymousId,F as readPrivacyPreferences,A as readSharedConfig,D as readSimulatorDriverPreference,X as removeDaemonLockfile,Y as removeDevBridgeLockfile,l as runtimeDir,I as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,N as writeActiveRuntime,U as writeDaemonLockfile,V as writeDevBridgeLockfile,E as writeOnboardingPreferences,G as writePrivacyPreferences,J as writeRuntimeUpgradeNotice,B as writeSharedConfig};
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,X,Y,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-YXXKSL6R.js";import"./chunk-JHXETDVC.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGES_DIR,a as SOOTSIM_HOME_ENV,O as activeRuntimeDir,m as activeRuntimeFile,v as cacheDir,r as cameraFixturesDir,W as claimDaemonLockfile,z as configFilePath,K as consumeRuntimeUpgradeNotice,t as daemonAppBundlePath,s as daemonAppDir,u as daemonAppLauncherPath,w as daemonLockfilePath,y as devBridgeLockfilePath,x as devBridgesDir,n as electronDir,o as electronUserDataDir,p as electronVersionDir,L as ensureSootsimHome,R as isDaemonLockfileFresh,S as isDevBridgeLockfileFresh,i as isDevWorkstation,C as isOnboardingComplete,h as isSootsimDevCheckout,q as profilesDir,M as readActiveRuntime,P as readDaemonLockfile,Q as readDevBridgeLockfiles,T as readLiveRuntimeVersions,H as readOrCreateAnonymousId,F as readPrivacyPreferences,A as readSharedConfig,D as readSimulatorDriverPreference,X as removeDaemonLockfile,Y as removeDevBridgeLockfile,l as runtimeDir,I as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,N as writeActiveRuntime,U as writeDaemonLockfile,V as writeDevBridgeLockfile,E as writeOnboardingPreferences,G as writePrivacyPreferences,J as writeRuntimeUpgradeNotice,B as writeSharedConfig};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{h as a,i as b}from"./chunk-M5QCGLXR.js";import"./chunk-ZLVRYXZ7.js";import"./chunk-A5FXX5PJ.js";import"./chunk-XJU2QIRY.js";import"./chunk-7B37IZBN.js";import"./chunk-RYIMSKDO.js";import"./chunk-EGAGZHO6.js";import"./chunk-ORWP2E7R.js";import"./chunk-EQK5MJCU.js";import"./chunk-3X6IBUBX.js";import"./chunk-DW37EVX5.js";import"./chunk-5DAIA77C.js";import"./chunk-NQFJOCSF.js";import"./chunk-DMPF2D24.js";import"./chunk-SA6XVI55.js";import"./chunk-6PL2CCGP.js";import"./chunk-HT6GFZOZ.js";import"./chunk-NM2L2QV4.js";import"./chunk-M6SKQGAN.js";import"./chunk-XXNLYR64.js";import"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-I6KIM6PN.js";import"./chunk-KLF3K6ZZ.js";import"./chunk-MGDSJZ37.js";import"./chunk-VIND4SP3.js";import"./chunk-TTASWLKM.js";import"./chunk-77ZHQJZR.js";import"./chunk-IZKHOM37.js";import"./chunk-YXXKSL6R.js";import"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.js";export{a as printShellPerfReport,b as runInspect};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.366 | (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-NAYLPOC5.js";import"./chunk-I6KIM6PN.js";import"./chunk-N3UC7HIX.js";import"./chunk-JHXETDVC.js";export{a as runInstallDesktop};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 p,d as k}from"./chunk-X3N2H4A3.js";import"./chunk-S7OIWXIZ.js";import{a as b}from"./chunk-6EALLMLO.js";import"./chunk-GCMVAY4M.js";import{exec as x}from"node:child_process";import{randomBytes as T}from"node:crypto";import R from"node:http";var w=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev";function L(t){return t||(process.env.SOOTSIM_AUTH_ORIGIN?process.env.SOOTSIM_AUTH_ORIGIN:process.env.SOOTSIM_UPLOAD_ORIGIN?process.env.SOOTSIM_UPLOAD_ORIGIN:w)}function _(){console.log(`
4
+ import{b as p,d as k}from"./chunk-UCHW7ZHR.js";import"./chunk-YXXKSL6R.js";import{a as b}from"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.js";import{exec as x}from"node:child_process";import{randomBytes as T}from"node:crypto";import R from"node:http";var w=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev";function L(t){return t||(process.env.SOOTSIM_AUTH_ORIGIN?process.env.SOOTSIM_AUTH_ORIGIN:process.env.SOOTSIM_UPLOAD_ORIGIN?process.env.SOOTSIM_UPLOAD_ORIGIN:w)}function _(){console.log(`
5
5
  rnx login \u2014 sign in so uploads can attach to your account
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as e,c as t}from"./chunk-X3N2H4A3.js";import"./chunk-S7OIWXIZ.js";import"./chunk-GCMVAY4M.js";async function r(){let o=e();if(!o?.token){console.log(" not signed in");return}try{await fetch(`${o.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${o.token}`}})}catch{}t(),console.log(" signed out")}export{r as runLogout};
4
+ import{a as e,c as t}from"./chunk-UCHW7ZHR.js";import"./chunk-YXXKSL6R.js";import"./chunk-JHXETDVC.js";async function r(){let o=e();if(!o?.token){console.log(" not signed in");return}try{await fetch(`${o.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${o.token}`}})}catch{}t(),console.log(" signed out")}export{r as runLogout};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 E,d as O,g as L,h as R,i as U}from"./chunk-VDEE37CY.js";import"./chunk-6OZZCDOK.js";import"./chunk-YJTZ77E4.js";import{b as $,c as F,d as M,e as T}from"./chunk-GISQDTW6.js";import{a as k}from"./chunk-5OZJUMUS.js";import"./chunk-X3N2H4A3.js";import{a as A}from"./chunk-XXP4GLLC.js";import"./chunk-IX2ZY3FI.js";import"./chunk-QECOXZY3.js";import{a as S}from"./chunk-ZOQAPVNV.js";import"./chunk-2FLTYH6I.js";import"./chunk-GXMNFFJJ.js";import"./chunk-LWOIQBVX.js";import"./chunk-ONGTUKC3.js";import"./chunk-AUHE5LTY.js";import"./chunk-4OK2SZTF.js";import"./chunk-SWIEVEPN.js";import"./chunk-KXGBOYTB.js";import"./chunk-6TAFS3GK.js";import"./chunk-XXFZMO4I.js";import"./chunk-2TL6BZCH.js";import"./chunk-CAP2EQ4P.js";import"./chunk-GJKVFQCF.js";import"./chunk-BRU5PPUO.js";import"./chunk-OXXWSZKI.js";import"./chunk-EP5FYRBT.js";import"./chunk-MPWM3TBY.js";import"./chunk-T2U4BLWM.js";import"./chunk-475BITXX.js";import"./chunk-MUKHA5UF.js";import"./chunk-5GO3JI65.js";import"./chunk-UDZI7GEV.js";import"./chunk-FKAZFE5Z.js";import"./chunk-WKH7T3YK.js";import"./chunk-PSUX2SIK.js";import"./chunk-S7OIWXIZ.js";import"./chunk-6EALLMLO.js";import"./chunk-GCMVAY4M.js";import*as n from"fs";import*as a from"path";var I=[".maestro","maestro"];function W(){console.log(`
4
+ import{c as E,d as O,g as L,h as R,i as U}from"./chunk-CN6XYYEA.js";import"./chunk-2UXU53MG.js";import"./chunk-ZJIS3CTW.js";import{b as $,c as F,d as M,e as T}from"./chunk-34IQM22N.js";import{a as k}from"./chunk-GXAB52K7.js";import"./chunk-UCHW7ZHR.js";import{a as A}from"./chunk-M5QCGLXR.js";import"./chunk-ZLVRYXZ7.js";import"./chunk-A5FXX5PJ.js";import{a as S}from"./chunk-XJU2QIRY.js";import"./chunk-7B37IZBN.js";import"./chunk-RYIMSKDO.js";import"./chunk-EGAGZHO6.js";import"./chunk-ORWP2E7R.js";import"./chunk-EQK5MJCU.js";import"./chunk-3X6IBUBX.js";import"./chunk-DW37EVX5.js";import"./chunk-5DAIA77C.js";import"./chunk-NQFJOCSF.js";import"./chunk-DMPF2D24.js";import"./chunk-SA6XVI55.js";import"./chunk-6PL2CCGP.js";import"./chunk-HT6GFZOZ.js";import"./chunk-NM2L2QV4.js";import"./chunk-M6SKQGAN.js";import"./chunk-XXNLYR64.js";import"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-I6KIM6PN.js";import"./chunk-KLF3K6ZZ.js";import"./chunk-MGDSJZ37.js";import"./chunk-VIND4SP3.js";import"./chunk-TTASWLKM.js";import"./chunk-77ZHQJZR.js";import"./chunk-IZKHOM37.js";import"./chunk-YXXKSL6R.js";import"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.js";import*as n from"fs";import*as a from"path";var I=[".maestro","maestro"];function W(){console.log(`
5
5
  rnx maestro \u2014 author and run Maestro YAML flows against rnx
6
6
 
7
7
  usage:
@@ -95,7 +95,7 @@ appId: com.example.app
95
95
  - inputText: "secret123"
96
96
  - tapOn: "Sign in"
97
97
  - assertVisible: "Welcome"
98
- `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: rnx maestro test .maestro/login.yaml"),0)}async function Q(r,s={}){if(r.includes("--help")||r.includes("-h"))return W(),0;if(r.includes("--list-compat"))return D(),0;let e;try{e=N(r)}catch(o){return console.error(` error: ${o.message}`),1}e=R(e);let t=process.cwd(),i=e[0];if(i==="init")return _(t);if(i==="generate"){let{runMaestroGenerate:o}=await import("./maestro-generate-A5VA2C2L.js");return o(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return U(e);e=J(e);let c=null,f;if(i==="test"){let o=e.slice(1).find(u=>!j(u));o?(c=a.resolve(t,o),f=e.slice(1).filter(u=>u!==o)):(c=P(t),f=e.slice(1))}else i&&!j(i)?(c=a.resolve(t,i),f=e.slice(1)):(c=P(t),f=e);if(!c)return console.error(`
98
+ `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: rnx maestro test .maestro/login.yaml"),0)}async function Q(r,s={}){if(r.includes("--help")||r.includes("-h"))return W(),0;if(r.includes("--list-compat"))return D(),0;let e;try{e=N(r)}catch(o){return console.error(` error: ${o.message}`),1}e=R(e);let t=process.cwd(),i=e[0];if(i==="init")return _(t);if(i==="generate"){let{runMaestroGenerate:o}=await import("./maestro-generate-2PYIFGLR.js");return o(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return U(e);e=J(e);let c=null,f;if(i==="test"){let o=e.slice(1).find(u=>!j(u));o?(c=a.resolve(t,o),f=e.slice(1).filter(u=>u!==o)):(c=P(t),f=e.slice(1))}else i&&!j(i)?(c=a.resolve(t,i),f=e.slice(1)):(c=P(t),f=e);if(!c)return console.error(`
99
99
  error: no maestro flows found.
100
100
  expected one of: ${I.map(o=>`./${o}/`).join(", ")}
101
101
  or pass a flow explicitly: rnx maestro test path/to/flow.yaml
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 O,d as A,e as E}from"./chunk-GISQDTW6.js";import{a as S,b as T}from"./chunk-5OZJUMUS.js";import"./chunk-X3N2H4A3.js";import{a as x}from"./chunk-ZOQAPVNV.js";import"./chunk-ONGTUKC3.js";import"./chunk-AUHE5LTY.js";import{f as v}from"./chunk-SWIEVEPN.js";import"./chunk-2TL6BZCH.js";import"./chunk-GJKVFQCF.js";import{q as y,s as b}from"./chunk-MPWM3TBY.js";import"./chunk-T2U4BLWM.js";import"./chunk-S7OIWXIZ.js";import"./chunk-6EALLMLO.js";import"./chunk-GCMVAY4M.js";import{mkdtempSync as B,writeFileSync as N}from"fs";import{tmpdir as C}from"os";import{join as k}from"path";var J=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",_=18e3,j=18e4;function f(e,t){let r=e.indexOf(t);return r>=0?e[r+1]:void 0}function V(e,t){for(let r of t){let o=f(e,r);if(o)return o}}var F=new Set(["--origin","--preview-origin","--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]);function G(e){for(let t=0;t<e.length;t++){let r=e[t];if(r){if(F.has(r)){t+=1;continue}if(!r.startsWith("-"))return{prompt:r,index:t}}}return null}function H(e,t){return e.filter((r,o)=>o!==t)}async function Y(e,t){let r=H(e,t),o=y(r,{stripBooleanFlags:["--new","--headless","--headed","--electron","--preview-open"],stripValueFlags:[...F]}),i=b(o);try{let n=await v(i,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),s=[n.shell?`shell: ${JSON.stringify(n.shell)}`:"",n.keyboard?`keyboard: ${JSON.stringify(n.keyboard)}`:"",typeof n.nodeCount=="number"?`nodes: ${n.nodeCount}`:"",n.tree||""].filter(Boolean).join(`
4
+ import{b as O,d as A,e as E}from"./chunk-34IQM22N.js";import{a as S,b as T}from"./chunk-GXAB52K7.js";import"./chunk-UCHW7ZHR.js";import{a as x}from"./chunk-XJU2QIRY.js";import"./chunk-ORWP2E7R.js";import"./chunk-EQK5MJCU.js";import{f as v}from"./chunk-DW37EVX5.js";import"./chunk-SA6XVI55.js";import"./chunk-HT6GFZOZ.js";import{q as y,s as b}from"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-YXXKSL6R.js";import"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.js";import{mkdtempSync as B,writeFileSync as N}from"fs";import{tmpdir as C}from"os";import{join as k}from"path";var J=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",_=18e3,j=18e4;function f(e,t){let r=e.indexOf(t);return r>=0?e[r+1]:void 0}function V(e,t){for(let r of t){let o=f(e,r);if(o)return o}}var F=new Set(["--origin","--preview-origin","--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]);function G(e){for(let t=0;t<e.length;t++){let r=e[t];if(r){if(F.has(r)){t+=1;continue}if(!r.startsWith("-"))return{prompt:r,index:t}}}return null}function H(e,t){return e.filter((r,o)=>o!==t)}async function Y(e,t){let r=H(e,t),o=y(r,{stripBooleanFlags:["--new","--headless","--headed","--electron","--preview-open"],stripValueFlags:[...F]}),i=b(o);try{let n=await v(i,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),s=[n.shell?`shell: ${JSON.stringify(n.shell)}`:"",n.keyboard?`keyboard: ${JSON.stringify(n.keyboard)}`:"",typeof n.nodeCount=="number"?`nodes: ${n.nodeCount}`:"",n.tree||""].filter(Boolean).join(`
5
5
  `);return s.length>_?s.slice(0,_)+`
6
6
  [tree truncated]`:s}finally{i.close()}}var K=`
7
7
  You write Maestro-compatible rnx YAML flows from a user's plain-language test goal.
@@ -32,5 +32,5 @@ ${t||"[no tree available]"}
32
32
 
33
33
  Generate the shortest replayable flow that verifies the goal from this current state.
34
34
  `.trim()}async function z(e){let t=await fetch(`${e.origin.replace(/\/$/,"")}/api/llm`,{method:"POST",headers:{"content-type":"application/json",authorization:e.authHeader},body:JSON.stringify({modelId:J,context:{systemPrompt:K,messages:[{role:"user",content:X(e.prompt,e.describe),timestamp:Date.now()}]},options:{maxTokens:1800,temperature:.2},threadId:null}),signal:AbortSignal.timeout(j)});if(!t.ok||!t.body){let a=await t.text().catch(()=>"");throw new Error(`/api/llm ${t.status}${a?`: ${a}`:""}`)}let r=t.body.getReader(),o=new TextDecoder,i=[],n="",c=a=>{let l=a.trim();if(!l)return;let u=JSON.parse(l);if(u.type==="text_delta"&&u.delta)i.push(u.delta);else if(u.type==="error")throw new Error(u.errorMessage||"llm error")};for(;;){let{value:a,done:l}=await r.read();if(l)break;n+=o.decode(a,{stream:!0});let u;for(;(u=n.indexOf(`
35
- `))>=0;)c(n.slice(0,u)),n=n.slice(u+1)}n+=o.decode(),n.trim()&&c(n);let s=i.join("").trim();if(!s)throw new Error("llm returned an empty test flow");return s}function W(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),r=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(r)}function P(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function q(e){let t=W(e);if(!P(t))throw new Error("llm did not return a JSON object");let r=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"rnx generated test",o=t.steps;if(!Array.isArray(o)||o.length===0)throw new Error("llm returned no flow steps");let i=o.map((n,c)=>{if(!P(n))throw new Error(`flow step ${c+1} is not an object`);return n});return{summary:r,steps:i,yamlText:x.stringify(i)}}function Q(e,t,r,o){let i=[r,"--preview","--preview-origin",o,"--billing-kind","test_run"],n=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),c=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let s=0;s<e.length;s++){if(s===t)continue;let a=e[s];if(a==="--origin"||a==="--preview-origin"){s+=1;continue}if(a==="--public-origin"){let l=e[s+1];l&&i.push("--preview-public-origin",l),s+=1;continue}if(n.has(a)){let l=e[s+1];l&&i.push(a,l),s+=1;continue}c.has(a)&&i.push(a)}return i}async function le(e){let t=G(e);if(!t)return console.error(' usage: rnx maestro generate "test goal"'),1;let{prompt:r,index:o}=t,i=S();if(!i||i.kind==="github")return console.error(' rnx maestro generate "<goal>" needs a login or RNX_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),1;let n=T(i),c=await E(V(e,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let s=await Y(e,o);console.log(" generating Maestro flow\u2026");let a=await z({prompt:r,describe:s,origin:c,authHeader:n}),l=q(a),u=B(k(C(),"sootsim-maestro-generate-")),p=k(u,"flow.yaml");N(p,l.yamlText),console.log(` flow: ${p}`);let M=Date.now(),{runFlowPlayback:I,getLastFlowPreviewUploadResult:$,getLastFlowTraceSteps:D}=await import("./flow-FX5GS2R4.js"),L=Q(e,o,p,c),w=await I(L),m=$(),h=D(),R=h.find(U=>U.status==="failure"),g=w===0?"passed":"failed",d=await A({origin:c,kind:"maestro",prompt:r,summary:l.summary,status:g,failureMessage:g==="failed"?R?.error??"flow playback failed":null,previewShareId:m?.shareId??null,owner:f(e,"--owner")??null,repo:f(e,"--repo")??null,durationMs:Date.now()-M,flowYamlSizeBytes:Buffer.byteLength(l.yamlText,"utf8"),...O(h),auth:i});return console.log(`
35
+ `))>=0;)c(n.slice(0,u)),n=n.slice(u+1)}n+=o.decode(),n.trim()&&c(n);let s=i.join("").trim();if(!s)throw new Error("llm returned an empty test flow");return s}function W(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),r=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(r)}function P(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function q(e){let t=W(e);if(!P(t))throw new Error("llm did not return a JSON object");let r=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"rnx generated test",o=t.steps;if(!Array.isArray(o)||o.length===0)throw new Error("llm returned no flow steps");let i=o.map((n,c)=>{if(!P(n))throw new Error(`flow step ${c+1} is not an object`);return n});return{summary:r,steps:i,yamlText:x.stringify(i)}}function Q(e,t,r,o){let i=[r,"--preview","--preview-origin",o,"--billing-kind","test_run"],n=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),c=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let s=0;s<e.length;s++){if(s===t)continue;let a=e[s];if(a==="--origin"||a==="--preview-origin"){s+=1;continue}if(a==="--public-origin"){let l=e[s+1];l&&i.push("--preview-public-origin",l),s+=1;continue}if(n.has(a)){let l=e[s+1];l&&i.push(a,l),s+=1;continue}c.has(a)&&i.push(a)}return i}async function le(e){let t=G(e);if(!t)return console.error(' usage: rnx maestro generate "test goal"'),1;let{prompt:r,index:o}=t,i=S();if(!i||i.kind==="github")return console.error(' rnx maestro generate "<goal>" needs a login or RNX_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),1;let n=T(i),c=await E(V(e,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let s=await Y(e,o);console.log(" generating Maestro flow\u2026");let a=await z({prompt:r,describe:s,origin:c,authHeader:n}),l=q(a),u=B(k(C(),"sootsim-maestro-generate-")),p=k(u,"flow.yaml");N(p,l.yamlText),console.log(` flow: ${p}`);let M=Date.now(),{runFlowPlayback:I,getLastFlowPreviewUploadResult:$,getLastFlowTraceSteps:D}=await import("./flow-7QAE2V5Y.js"),L=Q(e,o,p,c),w=await I(L),m=$(),h=D(),R=h.find(U=>U.status==="failure"),g=w===0?"passed":"failed",d=await A({origin:c,kind:"maestro",prompt:r,summary:l.summary,status:g,failureMessage:g==="failed"?R?.error??"flow playback failed":null,previewShareId:m?.shareId??null,owner:f(e,"--owner")??null,repo:f(e,"--repo")??null,durationMs:Date.now()-M,flowYamlSizeBytes:Buffer.byteLength(l.yamlText,"utf8"),...O(h),auth:i});return console.log(`
36
36
  result: ${g}`),d&&console.log(` run: ${d.id}`),m?.previewUrl&&console.log(` preview: ${m.previewUrl}`),d?.traceUrl&&console.log(` replay: ${d.traceUrl}`),w}export{le as runMaestroGenerate};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as r,b as s}from"./chunk-26XF67QW.js";import"./chunk-MPWM3TBY.js";import"./chunk-T2U4BLWM.js";import"./chunk-S7OIWXIZ.js";import"./chunk-GCMVAY4M.js";async function i(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
4
+ import{a as r,b as s}from"./chunk-M3BNCF7E.js";import"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-YXXKSL6R.js";import"./chunk-JHXETDVC.js";async function i(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
5
5
  rnx mode screenshot \u2014 toggle the screenshot-mode chrome overlay
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a,b,c,d}from"./chunk-2TL6BZCH.js";import"./chunk-GCMVAY4M.js";export{d as __withOptionalDemoAppsForTests,a as findInternalDemoRegistry,b as loadOptionalDemoApps,c as optionalDemoAppsSync};
4
+ import{a,b,c,d}from"./chunk-SA6XVI55.js";import"./chunk-JHXETDVC.js";export{d as __withOptionalDemoAppsForTests,a as findInternalDemoRegistry,b as loadOptionalDemoApps,c as optionalDemoAppsSync};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.364 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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{i as N}from"./chunk-XXP4GLLC.js";import"./chunk-IX2ZY3FI.js";import"./chunk-QECOXZY3.js";import"./chunk-ZOQAPVNV.js";import"./chunk-2FLTYH6I.js";import"./chunk-GXMNFFJJ.js";import"./chunk-LWOIQBVX.js";import"./chunk-ONGTUKC3.js";import"./chunk-AUHE5LTY.js";import"./chunk-4OK2SZTF.js";import"./chunk-SWIEVEPN.js";import"./chunk-KXGBOYTB.js";import"./chunk-6TAFS3GK.js";import"./chunk-XXFZMO4I.js";import"./chunk-2TL6BZCH.js";import"./chunk-CAP2EQ4P.js";import"./chunk-GJKVFQCF.js";import"./chunk-BRU5PPUO.js";import"./chunk-OXXWSZKI.js";import"./chunk-EP5FYRBT.js";import{q as P,s as R,v as d,w as x}from"./chunk-MPWM3TBY.js";import"./chunk-T2U4BLWM.js";import"./chunk-475BITXX.js";import"./chunk-MUKHA5UF.js";import"./chunk-5GO3JI65.js";import"./chunk-UDZI7GEV.js";import"./chunk-FKAZFE5Z.js";import"./chunk-WKH7T3YK.js";import"./chunk-PSUX2SIK.js";import"./chunk-S7OIWXIZ.js";import"./chunk-6EALLMLO.js";import"./chunk-GCMVAY4M.js";import{mkdirSync as D,writeFileSync as W}from"fs";import{dirname as A,resolve as J}from"path";import{WebSocket as B}from"ws";var C=e=>new Promise(o=>setTimeout(o,e)),S=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(o){this.ws=new B(o,{maxPayload:1<<28}),this.ready=new Promise((r,n)=>{this.ws.once("open",()=>r()),this.ws.once("error",n)}),this.ws.on("message",r=>{let n=JSON.parse(r.toString());if(n.id&&this.pending.has(n.id)){let{res:t,rej:s}=this.pending.get(n.id);this.pending.delete(n.id),n.error?s(new Error(JSON.stringify(n.error))):t(n.result)}else if(n.method)for(let t of this.listeners)t(n.method,n.params)})}waitOpen(){return this.ready}on(o){this.listeners.add(o)}send(o,r={},n){let t=this.nextId++;return new Promise((s,a)=>{this.pending.set(t,{res:s,rej:a}),this.ws.send(JSON.stringify({id:t,method:o,params:r,...n?{sessionId:n}:{}}))})}close(){try{this.ws.close()}catch{}}};async function O(e,o){let r=Number(h(e,"--duration")??"5");if(!Number.isFinite(r)||r<=0)return console.error(" --duration must be a positive number (seconds)"),1;let n=Number(h(e,"--sample-interval")??"0.1"),t=Number(h(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=h(e,"--match")??"/rn/",a=h(e,"--output")??h(e,"-o"),i=J(process.cwd(),a??"/tmp/sootsim.cpuprofile"),l=[];try{l=await(await fetch(`http://localhost:${t}/json/list`)).json()}catch{return E(t),1}let f=l.find(m=>m.type==="page"&&m.url.includes(s));if(!f)return console.error(` no page target matching "${s}" on CDP :${t}`),console.error(` open targets: ${l.map(m=>m.url).join(", ")||"(none)"}`),1;let u=new S(f.webSocketDebuggerUrl);await u.waitOpen();try{let m=new Map;if(u.on((c,p)=>{c==="Target.attachedToTarget"&&p.targetInfo?.type==="worker"&&m.set(p.sessionId,p.targetInfo.url),c==="Target.detachedFromTarget"&&m.delete(p.sessionId)}),await u.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await C(500),m.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let c of m.keys())await u.send("Profiler.enable",{},c),await u.send("Profiler.setSamplingInterval",{interval:n*1e3},c),await u.send("Profiler.start",{},c);console.log(` recording ${r}s across ${m.size} worker(s) \u2014 interact now\u2026`),await C(r*1e3);let b=[];for(let[c,p]of m){let{profile:y}=await u.send("Profiler.stop",{},c);b.push({url:p,profile:y})}return b.sort((c,p)=>p.profile.samples.length-c.profile.samples.length),D(A(i),{recursive:!0}),b.forEach((c,p)=>{let y=p===0?i:i.replace(/(\.[^.]+)?$/,`.worker${p}$1`);if(W(y,JSON.stringify(c.profile)),console.log(` ${v(c.url)}: ${c.profile.samples.length} samples \u2192 ${y}`),o.verbose&&c.profile.samples.length>0)for(let $ of U(c.profile,12))console.log(` ${$.pct.toFixed(1).padStart(5)}% ${$.name} ${$.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{u.close()}}function E(e){console.error(` perf cpu needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` rnx open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` rnx perf cpu --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox \\"),console.error(" --use-gl=angle --use-angle=metal \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function v(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function U(e,o){let r=e.samples.length||1,n=new Map;for(let t of e.nodes){let s=t.callFrame,a=`${s.functionName||"(anonymous)"}@${v(s.url)}:${s.lineNumber}`,i=n.get(a)??{self:0,name:s.functionName||"(anonymous)",url:`${v(s.url)}:${s.lineNumber}`};i.self+=t.hitCount??0,n.set(a,i)}return[...n.values()].map(t=>({...t,pct:t.self/r*100})).sort((t,s)=>s.self-t.self).slice(0,o)}function h(e,o){let r=e.indexOf(o);if(!(r<0||r===e.length-1))return e[r+1]}function j(){console.log(`
4
+ import{i as N}from"./chunk-M5QCGLXR.js";import"./chunk-ZLVRYXZ7.js";import"./chunk-A5FXX5PJ.js";import"./chunk-XJU2QIRY.js";import"./chunk-7B37IZBN.js";import"./chunk-RYIMSKDO.js";import"./chunk-EGAGZHO6.js";import"./chunk-ORWP2E7R.js";import"./chunk-EQK5MJCU.js";import"./chunk-3X6IBUBX.js";import"./chunk-DW37EVX5.js";import"./chunk-5DAIA77C.js";import"./chunk-NQFJOCSF.js";import"./chunk-DMPF2D24.js";import"./chunk-SA6XVI55.js";import"./chunk-6PL2CCGP.js";import"./chunk-HT6GFZOZ.js";import"./chunk-NM2L2QV4.js";import"./chunk-M6SKQGAN.js";import"./chunk-XXNLYR64.js";import{q as P,s as R,v as d,w as x}from"./chunk-GUI3PDH2.js";import"./chunk-GAJQSITE.js";import"./chunk-I6KIM6PN.js";import"./chunk-KLF3K6ZZ.js";import"./chunk-MGDSJZ37.js";import"./chunk-VIND4SP3.js";import"./chunk-TTASWLKM.js";import"./chunk-77ZHQJZR.js";import"./chunk-IZKHOM37.js";import"./chunk-YXXKSL6R.js";import"./chunk-5NMCF5VF.js";import"./chunk-JHXETDVC.js";import{mkdirSync as D,writeFileSync as W}from"fs";import{dirname as A,resolve as J}from"path";import{WebSocket as B}from"ws";var C=e=>new Promise(o=>setTimeout(o,e)),S=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(o){this.ws=new B(o,{maxPayload:1<<28}),this.ready=new Promise((r,n)=>{this.ws.once("open",()=>r()),this.ws.once("error",n)}),this.ws.on("message",r=>{let n=JSON.parse(r.toString());if(n.id&&this.pending.has(n.id)){let{res:t,rej:s}=this.pending.get(n.id);this.pending.delete(n.id),n.error?s(new Error(JSON.stringify(n.error))):t(n.result)}else if(n.method)for(let t of this.listeners)t(n.method,n.params)})}waitOpen(){return this.ready}on(o){this.listeners.add(o)}send(o,r={},n){let t=this.nextId++;return new Promise((s,a)=>{this.pending.set(t,{res:s,rej:a}),this.ws.send(JSON.stringify({id:t,method:o,params:r,...n?{sessionId:n}:{}}))})}close(){try{this.ws.close()}catch{}}};async function O(e,o){let r=Number(h(e,"--duration")??"5");if(!Number.isFinite(r)||r<=0)return console.error(" --duration must be a positive number (seconds)"),1;let n=Number(h(e,"--sample-interval")??"0.1"),t=Number(h(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=h(e,"--match")??"/rn/",a=h(e,"--output")??h(e,"-o"),i=J(process.cwd(),a??"/tmp/sootsim.cpuprofile"),l=[];try{l=await(await fetch(`http://localhost:${t}/json/list`)).json()}catch{return E(t),1}let f=l.find(m=>m.type==="page"&&m.url.includes(s));if(!f)return console.error(` no page target matching "${s}" on CDP :${t}`),console.error(` open targets: ${l.map(m=>m.url).join(", ")||"(none)"}`),1;let u=new S(f.webSocketDebuggerUrl);await u.waitOpen();try{let m=new Map;if(u.on((c,p)=>{c==="Target.attachedToTarget"&&p.targetInfo?.type==="worker"&&m.set(p.sessionId,p.targetInfo.url),c==="Target.detachedFromTarget"&&m.delete(p.sessionId)}),await u.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await C(500),m.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let c of m.keys())await u.send("Profiler.enable",{},c),await u.send("Profiler.setSamplingInterval",{interval:n*1e3},c),await u.send("Profiler.start",{},c);console.log(` recording ${r}s across ${m.size} worker(s) \u2014 interact now\u2026`),await C(r*1e3);let b=[];for(let[c,p]of m){let{profile:y}=await u.send("Profiler.stop",{},c);b.push({url:p,profile:y})}return b.sort((c,p)=>p.profile.samples.length-c.profile.samples.length),D(A(i),{recursive:!0}),b.forEach((c,p)=>{let y=p===0?i:i.replace(/(\.[^.]+)?$/,`.worker${p}$1`);if(W(y,JSON.stringify(c.profile)),console.log(` ${v(c.url)}: ${c.profile.samples.length} samples \u2192 ${y}`),o.verbose&&c.profile.samples.length>0)for(let $ of U(c.profile,12))console.log(` ${$.pct.toFixed(1).padStart(5)}% ${$.name} ${$.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{u.close()}}function E(e){console.error(` perf cpu needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` rnx open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` rnx perf cpu --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox \\"),console.error(" --use-gl=angle --use-angle=metal \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function v(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function U(e,o){let r=e.samples.length||1,n=new Map;for(let t of e.nodes){let s=t.callFrame,a=`${s.functionName||"(anonymous)"}@${v(s.url)}:${s.lineNumber}`,i=n.get(a)??{self:0,name:s.functionName||"(anonymous)",url:`${v(s.url)}:${s.lineNumber}`};i.self+=t.hitCount??0,n.set(a,i)}return[...n.values()].map(t=>({...t,pct:t.self/r*100})).sort((t,s)=>s.self-t.self).slice(0,o)}function h(e,o){let r=e.indexOf(o);if(!(r<0||r===e.length-1))return e[r+1]}function j(){console.log(`
5
5
  rnx perf react \u2014 inspect React component render cost in the tenant worker
6
6
 
7
7
  usage: