rnxsim 0.1.334 → 0.1.336

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 (272) hide show
  1. package/README.md +104 -76
  2. package/cli/auth.ts +2 -2
  3. package/cli/bin.ts +7 -3
  4. package/cli/bridge-flow-runner.ts +2 -2
  5. package/cli/commands/agent-wrapper.ts +1 -1
  6. package/cli/commands/agent.ts +12 -12
  7. package/cli/commands/app-fonts.ts +1 -1
  8. package/cli/commands/assert.ts +7 -7
  9. package/cli/commands/auth.ts +4 -4
  10. package/cli/commands/camera.ts +13 -13
  11. package/cli/commands/cleanup.ts +6 -6
  12. package/cli/commands/compat.ts +4 -4
  13. package/cli/commands/config.ts +2 -2
  14. package/cli/commands/control.ts +37 -43
  15. package/cli/commands/cpu-profile.ts +2 -2
  16. package/cli/commands/daemon-mac-app.ts +2 -2
  17. package/cli/commands/daemon.ts +12 -12
  18. package/cli/commands/debug.ts +22 -22
  19. package/cli/commands/desktop.ts +3 -3
  20. package/cli/commands/detox.ts +17 -17
  21. package/cli/commands/device.ts +9 -9
  22. package/cli/commands/diagnose.ts +11 -11
  23. package/cli/commands/electron.ts +7 -7
  24. package/cli/commands/film.ts +6 -6
  25. package/cli/commands/inspect/core.ts +6 -7
  26. package/cli/commands/inspect/find.ts +2 -2
  27. package/cli/commands/inspect.ts +36 -36
  28. package/cli/commands/install-desktop.ts +8 -8
  29. package/cli/commands/login.ts +6 -6
  30. package/cli/commands/maestro-generate.ts +2 -2
  31. package/cli/commands/maestro.ts +23 -23
  32. package/cli/commands/mode.ts +4 -4
  33. package/cli/commands/no-bridge-hint.ts +9 -9
  34. package/cli/commands/perf.ts +11 -11
  35. package/cli/commands/permissions.ts +5 -5
  36. package/cli/commands/profile.ts +11 -11
  37. package/cli/commands/react.ts +15 -15
  38. package/cli/commands/record.ts +15 -15
  39. package/cli/commands/report-issue.ts +2 -2
  40. package/cli/commands/reset.ts +2 -2
  41. package/cli/commands/runtime.ts +18 -18
  42. package/cli/commands/screenshot-mode.ts +5 -5
  43. package/cli/commands/screenshot.ts +12 -12
  44. package/cli/commands/screenshots-capture.ts +7 -7
  45. package/cli/commands/screenshots.ts +6 -6
  46. package/cli/commands/serve.ts +6 -6
  47. package/cli/commands/setup.ts +13 -15
  48. package/cli/commands/skills.ts +14 -14
  49. package/cli/commands/slides.ts +19 -23
  50. package/cli/commands/state.ts +2 -2
  51. package/cli/commands/storage.ts +3 -3
  52. package/cli/commands/telemetry.ts +1 -1
  53. package/cli/commands/three-mode.ts +16 -16
  54. package/cli/commands/timeline.ts +4 -4
  55. package/cli/commands/upgrade.ts +1 -1
  56. package/cli/commands/upload.ts +11 -11
  57. package/cli/commands/version.ts +3 -5
  58. package/cli/commands/what-happened.ts +11 -11
  59. package/cli/drivers/electron.ts +3 -3
  60. package/cli/hints.ts +8 -8
  61. package/cli/recording-access.ts +1 -1
  62. package/cli/ws-bridge.ts +5 -5
  63. package/dist-cli/bin.js +5 -5
  64. package/dist-cli/chunks/{agent-XB27DMQ6.js → agent-PZLF36FY.js} +14 -14
  65. package/dist-cli/chunks/{agent-wrapper-B3HNORTW.js → agent-wrapper-6TA43SJ2.js} +3 -3
  66. package/dist-cli/chunks/app-fonts-MTZTCJUY.js +4 -0
  67. package/dist-cli/chunks/{assert-6CUEOSSO.js → assert-2CVO2TYX.js} +12 -12
  68. package/dist-cli/chunks/auth-LKXFRFOT.js +12 -0
  69. package/dist-cli/chunks/{beta-H5SAI4RD.js → beta-OATC5IPA.js} +2 -2
  70. package/dist-cli/chunks/camera-VX65VO5N.js +33 -0
  71. package/dist-cli/chunks/{chunk-R3JUSXCG.js → chunk-262YA5CJ.js} +2 -2
  72. package/dist-cli/chunks/{chunk-2W7J4B3D.js → chunk-2J4OBR7W.js} +18 -18
  73. package/dist-cli/chunks/{chunk-GO7WTRY4.js → chunk-2PFDFGOG.js} +1 -1
  74. package/dist-cli/chunks/{chunk-BH3NYOFU.js → chunk-2Q6S7X5O.js} +4 -4
  75. package/dist-cli/chunks/{chunk-JZFZ7NGF.js → chunk-2VOFUIKQ.js} +9 -9
  76. package/dist-cli/chunks/chunk-3QCSDI3B.js +5 -0
  77. package/dist-cli/chunks/{chunk-IZITFEO5.js → chunk-4532OPNZ.js} +3 -3
  78. package/dist-cli/chunks/{chunk-S5Q2TACY.js → chunk-5YCVNKD7.js} +23 -23
  79. package/dist-cli/chunks/{chunk-R5KHC7VZ.js → chunk-6ALTVOXE.js} +6 -6
  80. package/dist-cli/chunks/chunk-6TN3YWA6.js +124 -0
  81. package/dist-cli/chunks/{chunk-KSJTW5ZW.js → chunk-7FHAHI5V.js} +2 -2
  82. package/dist-cli/chunks/{chunk-TKTAVBKB.js → chunk-7PMNRG53.js} +4 -4
  83. package/dist-cli/chunks/{chunk-752UYKC6.js → chunk-ARFQOYRO.js} +1 -1
  84. package/dist-cli/chunks/chunk-BHXQ7MUW.js +5 -0
  85. package/dist-cli/chunks/{chunk-HMZS7LD4.js → chunk-BIZE6NBI.js} +1 -1
  86. package/dist-cli/chunks/{chunk-INV6BZQY.js → chunk-BOZARB6P.js} +2 -2
  87. package/dist-cli/chunks/chunk-BVGUTE2T.js +74 -0
  88. package/dist-cli/chunks/{chunk-K2NYE3XT.js → chunk-BYOFHYKS.js} +1 -1
  89. package/dist-cli/chunks/{chunk-TLAYQHXB.js → chunk-DMD24WAG.js} +1 -1
  90. package/dist-cli/chunks/{chunk-PSVQUW3M.js → chunk-EAPHUH2R.js} +2 -2
  91. package/dist-cli/chunks/{chunk-ELFSL6AX.js → chunk-FMWEQNK2.js} +2 -2
  92. package/dist-cli/chunks/{chunk-OJJUPWLY.js → chunk-FWGDP2J4.js} +2 -2
  93. package/dist-cli/chunks/{chunk-VCBH7RDB.js → chunk-G3FVXFPF.js} +2 -2
  94. package/dist-cli/chunks/{chunk-U5JW25P3.js → chunk-GI3GZ54J.js} +1 -1
  95. package/dist-cli/chunks/{chunk-AH7KCTAP.js → chunk-HDHHEWEA.js} +2 -2
  96. package/dist-cli/chunks/{chunk-G2UNJ4TN.js → chunk-JIWE66VU.js} +1 -1
  97. package/dist-cli/chunks/{chunk-7HXPSUI6.js → chunk-KDRDDPNN.js} +1 -1
  98. package/dist-cli/chunks/{chunk-ANO5CHPQ.js → chunk-KPL344LX.js} +2 -2
  99. package/dist-cli/chunks/{chunk-3OGSYYLZ.js → chunk-M2OWBYUG.js} +1 -1
  100. package/dist-cli/chunks/{chunk-7D2P57SZ.js → chunk-M2XGXP7G.js} +1 -1
  101. package/dist-cli/chunks/{chunk-KV653SVK.js → chunk-MARPC3GM.js} +2 -2
  102. package/dist-cli/chunks/{chunk-ZYWOBHVL.js → chunk-MQES3MTN.js} +2 -2
  103. package/dist-cli/chunks/{chunk-ZVBWTXV6.js → chunk-NDLRQH7U.js} +5 -5
  104. package/dist-cli/chunks/{chunk-DECDURI3.js → chunk-NJMBQLAU.js} +2 -2
  105. package/dist-cli/chunks/{chunk-X6LGVNYE.js → chunk-NL2HXO7U.js} +1 -1
  106. package/dist-cli/chunks/{chunk-XCI6HRMH.js → chunk-NVPZLIMW.js} +1 -1
  107. package/dist-cli/chunks/{chunk-CYXIDSTO.js → chunk-NWVH2X7F.js} +2 -2
  108. package/dist-cli/chunks/{chunk-PFOKFWHU.js → chunk-OUAYBJ4G.js} +2 -2
  109. package/dist-cli/chunks/{chunk-WJJYIBVW.js → chunk-OXRDTNVL.js} +2 -2
  110. package/dist-cli/chunks/{chunk-Q2KHHFU3.js → chunk-QIVOOERS.js} +2 -2
  111. package/dist-cli/chunks/{chunk-WXUWD5JK.js → chunk-RZ2PXHA7.js} +11 -11
  112. package/dist-cli/chunks/{chunk-32AHRTE2.js → chunk-S33NCWJV.js} +2 -2
  113. package/dist-cli/chunks/{chunk-YX7RESF2.js → chunk-STMCT3G3.js} +2 -2
  114. package/dist-cli/chunks/{chunk-25BPBDWK.js → chunk-SV6NVD7P.js} +1 -1
  115. package/dist-cli/chunks/{chunk-62GN45A4.js → chunk-TA4GBBGC.js} +2 -2
  116. package/dist-cli/chunks/{chunk-MCX66YUZ.js → chunk-TV457FWW.js} +2 -2
  117. package/dist-cli/chunks/chunk-UB3JHBDW.js +4 -0
  118. package/dist-cli/chunks/{chunk-CLJ5KDZQ.js → chunk-UU2KMAIA.js} +1 -1
  119. package/dist-cli/chunks/chunk-UZCNKUSS.js +15 -0
  120. package/dist-cli/chunks/{chunk-R7XQX7CV.js → chunk-V4OZDPTA.js} +1 -1
  121. package/dist-cli/chunks/{chunk-UBZ7VUVM.js → chunk-WBTT5WIO.js} +1 -1
  122. package/dist-cli/chunks/chunk-YYBC6VB2.js +30 -0
  123. package/dist-cli/chunks/{chunk-PPTUVZET.js → chunk-ZI6YQKD6.js} +2 -2
  124. package/dist-cli/chunks/{cleanup-L5RZFZHK.js → cleanup-ZC5OVBIM.js} +10 -10
  125. package/dist-cli/chunks/cli-version-NOYHDN6P.js +4 -0
  126. package/dist-cli/chunks/{compat-6UV3RZBK.js → compat-BS2E7XDD.js} +9 -9
  127. package/dist-cli/chunks/{config-PCDG3T44.js → config-VDCDUYMZ.js} +5 -5
  128. package/dist-cli/chunks/{control-3F5UWGSP.js → control-IKS3CUP4.js} +2 -2
  129. package/dist-cli/chunks/daemon-MM3C4O2B.js +4 -0
  130. package/dist-cli/chunks/{debug-U3AW3DE7.js → debug-BKMZ5SRR.js} +17 -17
  131. package/dist-cli/chunks/desktop-FZQHSNF7.js +31 -0
  132. package/dist-cli/chunks/detox-52AM3DKY.js +52 -0
  133. package/dist-cli/chunks/{device-Z7QIRPK3.js → device-7FL5Y542.js} +11 -11
  134. package/dist-cli/chunks/{diagnose-XTLKRGK4.js → diagnose-YT4BKJ7I.js} +12 -12
  135. package/dist-cli/chunks/{disk-cleanup-EGA7FHY2.js → disk-cleanup-O6ICYLAC.js} +2 -2
  136. package/dist-cli/chunks/drivers-YY3YRD2L.js +4 -0
  137. package/dist-cli/chunks/{film-VCD3LX7E.js → film-7YBOFSOZ.js} +9 -9
  138. package/dist-cli/chunks/flow-I4PVS52A.js +4 -0
  139. package/dist-cli/chunks/help-35ESSWJH.js +4 -0
  140. package/dist-cli/chunks/{hidden-runtime-alias-WIG4O25J.js → hidden-runtime-alias-M3UFKZB6.js} +2 -2
  141. package/dist-cli/chunks/{home-paths-35K3WNLQ.js → home-paths-VW7G7LVZ.js} +2 -2
  142. package/dist-cli/chunks/inspect-PCJ6C2BN.js +4 -0
  143. package/dist-cli/chunks/install-desktop-NGQWMGQO.js +4 -0
  144. package/dist-cli/chunks/{login-JMQOKJS4.js → login-5VAHTGHC.js} +6 -6
  145. package/dist-cli/chunks/{logout-SBZ42HSW.js → logout-CXZFNMYF.js} +2 -2
  146. package/dist-cli/chunks/{maestro-3ZOPLMLN.js → maestro-THMBR6L3.js} +25 -25
  147. package/dist-cli/chunks/{maestro-generate-UZ75KHE6.js → maestro-generate-R73J53KE.js} +3 -3
  148. package/dist-cli/chunks/mode-5RJYFW76.js +26 -0
  149. package/dist-cli/chunks/{optional-demo-registry-B5RN64RF.js → optional-demo-registry-U7SCVX5U.js} +2 -2
  150. package/dist-cli/chunks/{perf-HDAR6QCJ.js → perf-AW6LG6FW.js} +28 -28
  151. package/dist-cli/chunks/permissions-6JWNMXYT.js +13 -0
  152. package/dist-cli/chunks/record-LLPM3BJT.js +72 -0
  153. package/dist-cli/chunks/{report-issue-45ECETI7.js → report-issue-YO2NAMJS.js} +4 -4
  154. package/dist-cli/chunks/reset-5LDPRL3W.js +4 -0
  155. package/dist-cli/chunks/runtime-IAICY2UL.js +4 -0
  156. package/dist-cli/chunks/{screenshot-command-ZTTTH5DS.js → screenshot-command-X7ECU2SK.js} +34 -34
  157. package/dist-cli/chunks/{screenshot-layers-NBYY3W7W.js → screenshot-layers-E7GLIOHG.js} +2 -2
  158. package/dist-cli/chunks/{screenshots-capture-EPPIKH5Q.js → screenshots-capture-TKR2YV6U.js} +11 -11
  159. package/dist-cli/chunks/{serve-4I2GY23Q.js → serve-HFNYO3YS.js} +16 -16
  160. package/dist-cli/chunks/setup-2HQHROP3.js +32 -0
  161. package/dist-cli/chunks/{skills-FBQ52ZMO.js → skills-PFCCKOPW.js} +16 -16
  162. package/dist-cli/chunks/{state-LQEZWXEX.js → state-NOCC6IGB.js} +5 -5
  163. package/dist-cli/chunks/storage-4SYN4ZWP.js +37 -0
  164. package/dist-cli/chunks/store-7QDSVAZ4.js +4 -0
  165. package/dist-cli/chunks/telemetry-LGTXJEJC.js +4 -0
  166. package/dist-cli/chunks/{timeline-3AIKN2SF.js → timeline-E2SFUV76.js} +6 -6
  167. package/dist-cli/chunks/{upgrade-HYPCBXGF.js → upgrade-KD76JQCK.js} +2 -2
  168. package/dist-cli/chunks/upload-FI2TS5S7.js +4 -0
  169. package/dist-cli/chunks/version-B23A4BFH.js +6 -0
  170. package/dist-cli/chunks/{web-Q6TI7YFH.js → web-6OAWYV5Z.js} +2 -2
  171. package/dist-cli/chunks/{what-happened-4PNRFBVS.js → what-happened-IYXUFM72.js} +16 -16
  172. package/dist-lib/agent-daemon-client.cjs +5 -5
  173. package/dist-lib/agent-events.cjs +1 -1
  174. package/dist-lib/agent-identity.cjs +1 -1
  175. package/dist-lib/agent-sessions.cjs +4 -4
  176. package/dist-lib/attached-projects.cjs +1 -1
  177. package/dist-lib/auth/shared-session.cjs +1 -1
  178. package/dist-lib/backend-origin.cjs +1 -1
  179. package/dist-lib/beta.cjs +1 -1
  180. package/dist-lib/beta.mjs +1 -1
  181. package/dist-lib/bridge-constants.cjs +1 -1
  182. package/dist-lib/bridge-contract.cjs +1 -1
  183. package/dist-lib/cli-constants.cjs +1 -1
  184. package/dist-lib/config.cjs +1 -1
  185. package/dist-lib/detox/index.cjs +1 -1
  186. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  187. package/dist-lib/home-paths.cjs +1 -1
  188. package/dist-lib/host/bridge-host.cjs +7 -7
  189. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  190. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  191. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  192. package/dist-lib/host/websocket-proxy.cjs +1 -1
  193. package/dist-lib/index.cjs +248 -98
  194. package/dist-lib/jump-to-source-babel.cjs +1 -1
  195. package/dist-lib/menu.cjs +2 -2
  196. package/dist-lib/menu.mjs +2 -2
  197. package/dist-lib/metro-host-modules/react-dom.js +6 -0
  198. package/dist-lib/metro-host-modules/react-native-web.js +6 -0
  199. package/dist-lib/metro-host-modules/react-native.js +6 -0
  200. package/dist-lib/metro-host-modules/react.js +6 -0
  201. package/dist-lib/metro-host-modules/react__jsx-dev-runtime.js +6 -0
  202. package/dist-lib/metro-host-modules/react__jsx-runtime.js +6 -0
  203. package/dist-lib/metro-production-bundle.cjs +72 -0
  204. package/dist-lib/metro-production-bundle.mjs +44 -0
  205. package/dist-lib/metro.cjs +152 -8
  206. package/dist-lib/profiles.cjs +1 -1
  207. package/dist-lib/public-brand.cjs +2 -2
  208. package/dist-lib/react-native-host-modules.cjs +50 -0
  209. package/dist-lib/render-mode.cjs +1 -1
  210. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  211. package/dist-lib/sdk.cjs +6 -7
  212. package/dist-lib/sdk.mjs +6 -7
  213. package/dist-lib/skills.cjs +71 -77
  214. package/dist-lib/vite.cjs +104 -85
  215. package/package.json +15 -2
  216. package/scripts/preuninstall.cjs +1 -1
  217. package/skills/contrast/SKILL.md +67 -75
  218. package/skills/rnx-debug/SKILL.md +84 -84
  219. package/skills/rnx-perf/SKILL.md +8 -8
  220. package/skills/rnx-setup/SKILL.md +54 -54
  221. package/skills/rnx-test/SKILL.md +35 -35
  222. package/skills/rnx-visual/SKILL.md +18 -18
  223. package/src/agent-daemon-client.ts +2 -2
  224. package/src/agent-sessions.ts +2 -2
  225. package/src/connect.ts +6 -6
  226. package/src/disk-cleanup.ts +1 -1
  227. package/src/home-paths.ts +1 -1
  228. package/src/host/bridge-host.ts +6 -6
  229. package/src/index.ts +1 -1
  230. package/src/metro-host-modules/react-dom.js +6 -0
  231. package/src/metro-host-modules/react-native-web.js +6 -0
  232. package/src/metro-host-modules/react-native.js +6 -0
  233. package/src/metro-host-modules/react.js +6 -0
  234. package/src/metro-host-modules/react__jsx-dev-runtime.js +6 -0
  235. package/src/metro-host-modules/react__jsx-runtime.js +6 -0
  236. package/src/metro-plugin.ts +249 -10
  237. package/src/metro-production-bundle.ts +51 -0
  238. package/src/public-brand.ts +1 -1
  239. package/src/react-native-host-modules.ts +25 -0
  240. package/src/runtime-assets.ts +1 -1
  241. package/src/sim-client.ts +1 -1
  242. package/src/vite-plugin-one.ts +171 -145
  243. package/dist-cli/chunks/app-fonts-R3Z7ZW4A.js +0 -4
  244. package/dist-cli/chunks/auth-LAGALWLO.js +0 -12
  245. package/dist-cli/chunks/camera-QN6WUAYK.js +0 -33
  246. package/dist-cli/chunks/chunk-2A4XQAO5.js +0 -5
  247. package/dist-cli/chunks/chunk-CFRBWE4I.js +0 -124
  248. package/dist-cli/chunks/chunk-FSS73GUP.js +0 -4
  249. package/dist-cli/chunks/chunk-KKLCABLJ.js +0 -15
  250. package/dist-cli/chunks/chunk-L4JC72JR.js +0 -5
  251. package/dist-cli/chunks/chunk-LGO27KAL.js +0 -30
  252. package/dist-cli/chunks/chunk-ZS3IA2TO.js +0 -74
  253. package/dist-cli/chunks/cli-version-YLZLS2WD.js +0 -4
  254. package/dist-cli/chunks/daemon-7KWRXNTD.js +0 -4
  255. package/dist-cli/chunks/desktop-NXZL7FFL.js +0 -31
  256. package/dist-cli/chunks/detox-ZVCZR6RI.js +0 -52
  257. package/dist-cli/chunks/drivers-NCRG3DPA.js +0 -4
  258. package/dist-cli/chunks/flow-XTAZ54NO.js +0 -4
  259. package/dist-cli/chunks/help-HXJS23VT.js +0 -4
  260. package/dist-cli/chunks/inspect-FGQNWT3J.js +0 -4
  261. package/dist-cli/chunks/install-desktop-PRZH7KML.js +0 -4
  262. package/dist-cli/chunks/mode-PUJBFJV2.js +0 -26
  263. package/dist-cli/chunks/permissions-FG2BLOZH.js +0 -13
  264. package/dist-cli/chunks/record-2733FYSQ.js +0 -72
  265. package/dist-cli/chunks/reset-7RTBJQT7.js +0 -4
  266. package/dist-cli/chunks/runtime-FWAZCY6A.js +0 -4
  267. package/dist-cli/chunks/setup-FAQDSB56.js +0 -32
  268. package/dist-cli/chunks/storage-6CRLZNEX.js +0 -37
  269. package/dist-cli/chunks/store-PNV6NRDU.js +0 -4
  270. package/dist-cli/chunks/telemetry-ZS6SFANV.js +0 -4
  271. package/dist-cli/chunks/upload-EMRR47KT.js +0 -4
  272. package/dist-cli/chunks/version-P4NCNAW7.js +0 -6
@@ -1,11 +1,11 @@
1
- /*! rnx v0.1.334 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.336 | (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-R5KHC7VZ.js";import"./chunk-752UYKC6.js";import"./chunk-R7XQX7CV.js";import"./chunk-U5JW25P3.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
- rnxsim get diagnosis \u2014 compact "what just went wrong?" report
4
+ import{e as v,q as E,s as x,v as b}from"./chunk-6ALTVOXE.js";import"./chunk-ARFQOYRO.js";import"./chunk-V4OZDPTA.js";import"./chunk-GI3GZ54J.js";function j(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
5
+ rnx get diagnosis \u2014 compact "what just went wrong?" report
6
6
 
7
7
  usage:
8
- rnxsim get diagnosis [--since <duration>] [--include <csv>] [--json]
8
+ rnx get diagnosis [--since <duration>] [--include <csv>] [--json]
9
9
 
10
10
  options:
11
11
  --since <d> absolute window for timeline + network (e.g. 90s, 2m, 500ms; default 90s)
@@ -16,14 +16,14 @@ options:
16
16
  --json emit a single structured JSON document
17
17
 
18
18
  the diagnose report runs every dimension in parallel against the same
19
- sim and returns a grouped summary. use \`rnxsim what-happened\`
20
- for chronological events, \`rnxsim network\` for full request inspection,
21
- \`rnxsim perf react summary\` for the React tables on their own.
19
+ sim and returns a grouped summary. use \`rnx what-happened\`
20
+ for chronological events, \`rnx network\` for full request inspection,
21
+ \`rnx perf react summary\` for the React tables on their own.
22
22
 
23
23
  examples:
24
- rnxsim get diagnosis
25
- rnxsim get diagnosis --since 30s --include network,react
26
- rnxsim get diagnosis --json > /tmp/diagnosis.json
24
+ rnx get diagnosis
25
+ rnx get diagnosis --since 30s --include network,react
26
+ rnx get diagnosis --json > /tmp/diagnosis.json
27
27
  `)}function A(e,r){if(!e)return r;let o=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(e.trim());if(!o)return r;let s=Number(o[1]),t=o[2]??"ms";return t==="s"?s*1e3:t==="m"?s*6e4:s}function D(e){if(!e)return B;let r=new Set;for(let o of e.split(",")){let s=o.trim().toLowerCase();s&&r.add(s)}return r}function k(e,r){let o=e.indexOf(r);if(o>=0&&o+1<e.length)return e[o+1];let s=`${r}=`;return e.find(t=>t.startsWith(s))?.slice(s.length)}function R(e,r,o){let s=k(e,r);if(s===void 0)return o;let t=Number(s);return Number.isFinite(t)&&t>0?Math.round(t):o}async function O(e,r){let o={limit:500,since:Date.now()-r},t=(await b(e,"SootSim.bridges.timeline.recent",o)).events??[],i={},c=[],d=[],p=[];for(let u of t){i[u.kind]=(i[u.kind]??0)+1;let l=u.data,m=l&&typeof l=="object"?l.level:void 0;u.kind==="console"&&(m==="error"||m==="warn")&&c.push(u),(u.kind==="alert"||u.kind==="actionsheet"||u.kind==="picker")&&d.push(u),(u.kind==="screen"||u.kind==="route")&&p.push(u)}return{events:t,byKind:i,total:t.length,errors:c,alerts:d,screens:p}}async function L(e,r,o){let s=await e.send({type:"evaluate",code:`(() => {
28
28
  const obs = window.__sootsimObservability;
29
29
  if (!obs) return { ok: false };
@@ -33,11 +33,11 @@ examples:
33
33
  if (!obs) return { ok: false };
34
34
  return { ok: true, entries: obs.logs.getSnapshot() };
35
35
  })()`});if(!o||!o.ok)return{error:"observability bridge not installed"};let s=Date.now()-r,i=(o.entries??[]).filter(c=>j(c)>=s&&(c.level==="error"||c.level==="warn"));return{entries:i.slice(-20),total:i.length}}function T(e){let r=e.error?"err":e.status!=null?String(e.status):"...",o=(e.method??"GET").padEnd(6),s=e.durationMs!=null?`${e.durationMs.toFixed(0)}ms`:"...",t=e.displayUrl??e.url,i=t.length>96?`${t.slice(0,92)}\u2026`:t;return` ${r.padStart(3)} ${o} ${s.padStart(7)} ${i} (${e.id})`}function N(e,r){let o=((e.t-r)/1e3).toFixed(2),s=e.t>=r?"-":"+",t=e.data,i="";if(t&&typeof t=="object"){let c=(t.message??"").toString().slice(0,120),d=(t.title??t.name??t.path??t.url??"").toString();i=[(t.phase??"").toString(),d,c].filter(Boolean).join(" \xB7 ")}return` -${o.padStart(5)}s [${e.kind}] ${i}`}function M(e,r,o){if(r.length===0)return`${o}(no rows)`;let s=e.map((i,c)=>Math.max(i.length,...r.map(d=>d[c]?.length??0))),t=i=>i.map((c,d)=>c.padEnd(s[d])).join(" ").trimEnd();return[t(e),t(e.map(i=>"-".repeat(i.length))),...r.map(t)].map(i=>`${o}${i}`).join(`
36
- `)}async function J(e,r){if(e.includes("--help")||e.includes("-h"))return P(),0;let o=E(e,{port:r.port,stripBooleanFlags:["--json","--help","-h"],stripValueFlags:["--since","--include","--limit","--slow-threshold"]}),s=o.positional[0]??"recent";if(s!=="recent")return console.error(` unknown subcommand: ${s}`),console.error(" did you mean: rnxsim get diagnosis ?"),1;let t=A(k(e,"--since"),9e4),i=D(k(e,"--include")),c=R(e,"--limit",8),d=R(e,"--slow-threshold",1e3),p=e.includes("--json"),u=x(o);try{let l=[],m=[];(i.has("timeline")||i.has("screen")||i.has("alert"))&&(m.push("timeline"),l.push(O(u,t))),(i.has("network")||i.has("fetch"))&&(m.push("network"),l.push(L(u,t,d))),i.has("react")&&(m.push("react"),l.push(C(u,c))),i.has("console")&&(m.push("console"),l.push(_(u,t)));let $=await u.send({type:"evaluate",code:"globalThis.__sootsimEngineBuild ?? null"}).then(n=>typeof n=="string"?n:null).catch(()=>null),F=await Promise.all(l),w={};for(let n=0;n<m.length;n++)w[m[n]]=F[n];if(p)return console.log(JSON.stringify({generatedAt:Date.now(),engineBuild:$,sinceMs:t,include:Array.from(i),slices:w},null,2)),0;let S=Date.now();if(console.log(` diagnose recent (last ${(t/1e3).toFixed(0)}s, include: ${Array.from(i).sort().join(",")}):`),console.log(` engine build: ${$??"unknown (no build stamp \u2014 likely a stale or pre-F20-5 engine)"}`),w.timeline){let n=w.timeline;console.log(`
36
+ `)}async function J(e,r){if(e.includes("--help")||e.includes("-h"))return P(),0;let o=E(e,{port:r.port,stripBooleanFlags:["--json","--help","-h"],stripValueFlags:["--since","--include","--limit","--slow-threshold"]}),s=o.positional[0]??"recent";if(s!=="recent")return console.error(` unknown subcommand: ${s}`),console.error(" did you mean: rnx get diagnosis ?"),1;let t=A(k(e,"--since"),9e4),i=D(k(e,"--include")),c=R(e,"--limit",8),d=R(e,"--slow-threshold",1e3),p=e.includes("--json"),u=x(o);try{let l=[],m=[];(i.has("timeline")||i.has("screen")||i.has("alert"))&&(m.push("timeline"),l.push(O(u,t))),(i.has("network")||i.has("fetch"))&&(m.push("network"),l.push(L(u,t,d))),i.has("react")&&(m.push("react"),l.push(C(u,c))),i.has("console")&&(m.push("console"),l.push(_(u,t)));let $=await u.send({type:"evaluate",code:"globalThis.__sootsimEngineBuild ?? null"}).then(n=>typeof n=="string"?n:null).catch(()=>null),F=await Promise.all(l),w={};for(let n=0;n<m.length;n++)w[m[n]]=F[n];if(p)return console.log(JSON.stringify({generatedAt:Date.now(),engineBuild:$,sinceMs:t,include:Array.from(i),slices:w},null,2)),0;let S=Date.now();if(console.log(` diagnose recent (last ${(t/1e3).toFixed(0)}s, include: ${Array.from(i).sort().join(",")}):`),console.log(` engine build: ${$??"unknown (no build stamp \u2014 likely a stale or pre-F20-5 engine)"}`),w.timeline){let n=w.timeline;console.log(`
37
37
  timeline \u2014 ${n.total} event(s) in window`);let f=Object.entries(n.byKind).sort((a,g)=>g[1]-a[1]).map(([a,g])=>`${g} ${a}`).join(" \xB7 ");if(f&&console.log(` summary: ${f}`),n.screens.length){let g=n.screens[n.screens.length-1].data,h=g?g.name??g.activeName??g.path??"?":"?";console.log(` last screen: ${String(h)}`)}if(n.alerts.length){console.log(` alerts (${n.alerts.length}):`);for(let a of n.alerts.slice(-5))console.log(N(a,S))}if(n.errors.length){console.log(` console errors/warns from timeline (${n.errors.length}):`);for(let a of n.errors.slice(-5))console.log(N(a,S))}}if(w.network){let n=w.network;if("error"in n)console.log(`
38
38
  network \u2014 ${n.error}`);else{if(console.log(`
39
39
  network \u2014 ${n.total} request(s), ${n.failed.length} failed, ${n.slow.length} slow (>${n.slowThresholdMs}ms), ${n.inFlight} in-flight`),n.failed.length){console.log(" failed:");for(let f of n.failed.slice(-8))console.log(T(f))}if(n.slow.length){console.log(" slowest:");for(let f of n.slow.slice(0,5))console.log(T(f))}}}if(w.react){let n=w.react;console.log(`
40
40
  react \u2014 ${n.commits} commit(s)`),n.error&&console.log(` warning: ${n.error}`),n.durationWarning&&console.log(` warning: ${n.durationWarning}`),n.slow.length>0&&n.slow.every(a=>a.totalMs<=0&&a.slowestMs<=0)&&!n.durationWarning&&console.log(" warning: every commit reports actualDuration=0ms \u2014 bundle has React profiler timer disabled"),n.slow.length&&(console.log(" slowest:"),console.log(M(["component","total","commits","slowest"],n.slow.slice(0,c).map(a=>[a.displayName,`${a.totalMs.toFixed(2)}ms`,String(a.commitCount),`${a.slowestMs.toFixed(2)}ms`])," "))),n.rerenders.length&&(console.log(" most rerenders:"),console.log(M(["component","renders","top causes"],n.rerenders.slice(0,c).map(a=>{let g=Object.entries(a.causes??{}).filter(([,h])=>h>0).sort((h,y)=>y[1]-h[1]).slice(0,3).map(([h,y])=>`${h}:${y}`).join(", ");return[a.displayName,String(a.renders??a.count??0),g||"-"]})," ")))}if(w.console){let n=w.console;if("error"in n)console.log(`
41
41
  console \u2014 ${n.error}`);else{console.log(`
42
42
  console errors/warns \u2014 ${n.total} in window`);for(let f of n.entries.slice(-8)){let a=((j(f)-S)/1e3).toFixed(2),g=W(f).slice(0,160);console.log(` -${a.padStart(5)}s [${f.level}] ${g}`)}}}return v()&&console.log(`
43
- next: rnxsim what-happened (cursor advances) \xB7 rnxsim network get <id> \xB7 rnxsim perf react why <fiber-id>`),0}catch(l){let m=l instanceof Error?l.message:String(l);return/no sim connected/i.test(m)?console.error(" no sim connected \u2014 open one first: rnxsim open <metroPort>"):console.error(` diagnose failed: ${m}`),1}finally{u.close()}}export{J as runDiagnose};
43
+ next: rnx what-happened (cursor advances) \xB7 rnx network get <id> \xB7 rnx perf react why <fiber-id>`),0}catch(l){let m=l instanceof Error?l.message:String(l);return/no sim connected/i.test(m)?console.error(" no sim connected \u2014 open one first: rnx open <metroPort>"):console.error(` diagnose failed: ${m}`),1}finally{u.close()}}export{J as runDiagnose};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.334 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.336 | (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-OJJUPWLY.js";import"./chunk-7HXPSUI6.js";import"./chunk-ELFSL6AX.js";import"./chunk-R7XQX7CV.js";import"./chunk-Q2KHHFU3.js";import"./chunk-U5JW25P3.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-FWGDP2J4.js";import"./chunk-KDRDDPNN.js";import"./chunk-FMWEQNK2.js";import"./chunk-V4OZDPTA.js";import"./chunk-QIVOOERS.js";import"./chunk-GI3GZ54J.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.336 | (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-JIWE66VU.js";import{a,b,c,d,e,f,g}from"./chunk-ZI6YQKD6.js";import"./chunk-BYOFHYKS.js";import"./chunk-HDHHEWEA.js";import"./chunk-KDRDDPNN.js";import"./chunk-ARFQOYRO.js";import"./chunk-V4OZDPTA.js";import"./chunk-GI3GZ54J.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,11 +1,11 @@
1
- /*! rnx v0.1.334 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.336 | (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-S5Q2TACY.js";import{q as x,s as A,w as b}from"./chunk-R5KHC7VZ.js";import"./chunk-752UYKC6.js";import"./chunk-R7XQX7CV.js";import"./chunk-U5JW25P3.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
- rnxsim film \u2014 record a flow flat, replay it on the 3d stage, save a clip
4
+ import{c as R,d as L}from"./chunk-5YCVNKD7.js";import{q as x,s as A,w as b}from"./chunk-6ALTVOXE.js";import"./chunk-ARFQOYRO.js";import"./chunk-V4OZDPTA.js";import"./chunk-GI3GZ54J.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
+ rnx film \u2014 record a flow flat, replay it on the 3d stage, save a clip
6
6
 
7
7
  usage:
8
- rnxsim film <flow.yaml> [options]
8
+ rnx film <flow.yaml> [options]
9
9
 
10
10
  how it works:
11
11
  1. the flow runs at full speed on the flat canvas while the engine
@@ -24,18 +24,18 @@ options:
24
24
  --keep-three leave 3d mode + the recording editor on afterwards
25
25
  --sim <id> target a specific connected sim
26
26
 
27
- stage decor (same flags as \`rnxsim mode three configure\`):
27
+ stage decor (same flags as \`rnx mode three configure\`):
28
28
  --background <id> \xB7 --gradient <stops> \xB7 --gradient-angle <deg>
29
29
  --colorway <id> \xB7 --room on|off \xB7 --focus on|off \xB7 --focus-amount <id>
30
30
  --focus-range <id> \xB7 --environment on|off \xB7 --env-shape/spread/size/color
31
31
  --env-glow on|off \xB7 --env-plastic on|off
32
32
 
33
33
  examples:
34
- rnxsim film flows/feed-scroll.yaml
35
- rnxsim film flows/swap.yaml --script hero-arc --background gradient-tide --out ~/Desktop/swap-3d.mp4
36
- rnxsim film flows/login.yaml --colorway deep-blue --environment on --env-shape pane --room on
34
+ rnx film flows/feed-scroll.yaml
35
+ rnx film flows/swap.yaml --script hero-arc --background gradient-tide --out ~/Desktop/swap-3d.mp4
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-XTAZ54NO.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-I4PVS52A.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.336 | (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-2Q6S7X5O.js";import"./chunk-SV6NVD7P.js";import"./chunk-4532OPNZ.js";import{b as a,c as b}from"./chunk-2J4OBR7W.js";import"./chunk-UB3JHBDW.js";import"./chunk-NL2HXO7U.js";import"./chunk-OXRDTNVL.js";import"./chunk-UZCNKUSS.js";import"./chunk-TV457FWW.js";import"./chunk-M2XGXP7G.js";import"./chunk-S33NCWJV.js";import"./chunk-ZI6YQKD6.js";import"./chunk-BYOFHYKS.js";import"./chunk-HDHHEWEA.js";import"./chunk-RZ2PXHA7.js";import"./chunk-OUAYBJ4G.js";import"./chunk-NJMBQLAU.js";import"./chunk-MARPC3GM.js";import"./chunk-DMD24WAG.js";import"./chunk-262YA5CJ.js";import"./chunk-G3FVXFPF.js";import"./chunk-7PMNRG53.js";import"./chunk-NVPZLIMW.js";import"./chunk-BIZE6NBI.js";import"./chunk-STMCT3G3.js";import"./chunk-MQES3MTN.js";import"./chunk-7FHAHI5V.js";import"./chunk-KDRDDPNN.js";import"./chunk-FMWEQNK2.js";import"./chunk-3QCSDI3B.js";import"./chunk-BOZARB6P.js";import"./chunk-BHXQ7MUW.js";import"./chunk-6ALTVOXE.js";import"./chunk-ARFQOYRO.js";import"./chunk-6TN3YWA6.js";import"./chunk-V4OZDPTA.js";import"./chunk-QIVOOERS.js";import"./chunk-GI3GZ54J.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.336 | (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-TA4GBBGC.js";import"./chunk-KPL344LX.js";import"./chunk-3QCSDI3B.js";import"./chunk-BOZARB6P.js";import"./chunk-BHXQ7MUW.js";import"./chunk-6ALTVOXE.js";import"./chunk-ARFQOYRO.js";import"./chunk-6TN3YWA6.js";import"./chunk-V4OZDPTA.js";import"./chunk-EAPHUH2R.js";import"./chunk-QIVOOERS.js";import"./chunk-2PFDFGOG.js";import"./chunk-GI3GZ54J.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.334 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.336 | (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-YX7RESF2.js";import{b as n}from"./chunk-CFRBWE4I.js";import"./chunk-U5JW25P3.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-STMCT3G3.js";import{b as n}from"./chunk-6TN3YWA6.js";import"./chunk-GI3GZ54J.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.334 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.336 | (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,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-R7XQX7CV.js";import"./chunk-U5JW25P3.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,L as activeRuntimeDir,m as activeRuntimeFile,v as cacheDir,r as cameraFixturesDir,T as claimDaemonLockfile,z as configFilePath,H 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,I as ensureSootsimHome,O as isDaemonLockfileFresh,P as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,q as profilesDir,J as readActiveRuntime,M as readDaemonLockfile,N as readDevBridgeLockfiles,Q as readLiveRuntimeVersions,E as readOrCreateAnonymousId,C as readPrivacyPreferences,A as readSharedConfig,U as removeDaemonLockfile,V as removeDevBridgeLockfile,l as runtimeDir,F as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,K as writeActiveRuntime,R as writeDaemonLockfile,S as writeDevBridgeLockfile,D as writePrivacyPreferences,G 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,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-V4OZDPTA.js";import"./chunk-GI3GZ54J.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,L as activeRuntimeDir,m as activeRuntimeFile,v as cacheDir,r as cameraFixturesDir,T as claimDaemonLockfile,z as configFilePath,H 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,I as ensureSootsimHome,O as isDaemonLockfileFresh,P as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,q as profilesDir,J as readActiveRuntime,M as readDaemonLockfile,N as readDevBridgeLockfiles,Q as readLiveRuntimeVersions,E as readOrCreateAnonymousId,C as readPrivacyPreferences,A as readSharedConfig,U as removeDaemonLockfile,V as removeDevBridgeLockfile,l as runtimeDir,F as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,K as writeActiveRuntime,R as writeDaemonLockfile,S as writeDevBridgeLockfile,D as writePrivacyPreferences,G as writeRuntimeUpgradeNotice,B as writeSharedConfig};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.336 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{i as a,j as b}from"./chunk-2J4OBR7W.js";import"./chunk-UB3JHBDW.js";import"./chunk-NL2HXO7U.js";import"./chunk-OXRDTNVL.js";import"./chunk-UZCNKUSS.js";import"./chunk-TV457FWW.js";import"./chunk-M2XGXP7G.js";import"./chunk-S33NCWJV.js";import"./chunk-ZI6YQKD6.js";import"./chunk-BYOFHYKS.js";import"./chunk-HDHHEWEA.js";import"./chunk-NJMBQLAU.js";import"./chunk-MARPC3GM.js";import"./chunk-DMD24WAG.js";import"./chunk-262YA5CJ.js";import"./chunk-G3FVXFPF.js";import"./chunk-7PMNRG53.js";import"./chunk-NVPZLIMW.js";import"./chunk-BIZE6NBI.js";import"./chunk-STMCT3G3.js";import"./chunk-KDRDDPNN.js";import"./chunk-FMWEQNK2.js";import"./chunk-3QCSDI3B.js";import"./chunk-BOZARB6P.js";import"./chunk-BHXQ7MUW.js";import"./chunk-6ALTVOXE.js";import"./chunk-ARFQOYRO.js";import"./chunk-6TN3YWA6.js";import"./chunk-V4OZDPTA.js";import"./chunk-QIVOOERS.js";import"./chunk-GI3GZ54J.js";export{a as printShellPerfReport,b as runInspect};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.336 | (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-2VOFUIKQ.js";import"./chunk-BYOFHYKS.js";import"./chunk-WBTT5WIO.js";import"./chunk-GI3GZ54J.js";export{a as runInstallDesktop};
@@ -1,11 +1,11 @@
1
- /*! rnx v0.1.334 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.336 | (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 k,d as v}from"./chunk-KSJTW5ZW.js";import"./chunk-R7XQX7CV.js";import{a as b}from"./chunk-Q2KHHFU3.js";import"./chunk-U5JW25P3.js";import{exec as L}from"node:child_process";import{randomBytes as R}from"node:crypto";import P from"node:http";var O=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev",w="https://contrast.localhost:3000";async function A(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${w}/api/auth/me`)).ok)return w}catch{}return O}function C(){console.log(`
5
- rnxsim login \u2014 sign in so uploads can attach to your account
4
+ import{b as k,d as v}from"./chunk-7FHAHI5V.js";import"./chunk-V4OZDPTA.js";import{a as b}from"./chunk-QIVOOERS.js";import"./chunk-GI3GZ54J.js";import{exec as L}from"node:child_process";import{randomBytes as R}from"node:crypto";import P from"node:http";var O=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev",w="https://contrast.localhost:3000";async function A(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${w}/api/auth/me`)).ok)return w}catch{}return O}function C(){console.log(`
5
+ rnx login \u2014 sign in so uploads can attach to your account
6
6
 
7
7
  usage:
8
- rnxsim login [--origin <url>]
8
+ rnx login [--origin <url>]
9
9
 
10
10
  options:
11
11
  --origin <url> auth host (default: auto)
@@ -23,6 +23,6 @@ options:
23
23
  <p style="color:#ccc">${r}</p>
24
24
  </div>
25
25
  </body>
26
- </html>`}async function G(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"local dev-login unavailable"};if(!e.ok){let u=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${u}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function M(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function F(r){(r.includes("--help")||r.includes("-h"))&&(C(),process.exit(0));let e=[...r],t=await A(U(e,"--origin"));if(M(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let n=await G(t);if(n.ok){k({token:n.token,user:n.userId?{id:n.userId,email:n.email}:null,origin:t,source:"cli"});let s=await v(t),d=s?.user?.email||n.email||s?.user?.id||n.userId,{trackCliEvent:a,flushCliTelemetry:f}=await import("./telemetry-ZS6SFANV.js");a({event:"cli_login_succeeded",identity:{userId:n.userId??s?.user?.id??null},properties:{origin:t,mode:"dev"}}),await f(),console.log(` signed in${d?` as ${d}`:""} (dev)`);return}console.log(` dev-login not available (${n.error}); falling back to browser`)}let u=R(16).toString("hex");{let{trackCliEvent:n,flushCliTelemetry:s}=await import("./telemetry-ZS6SFANV.js");n({event:"cli_login_started",properties:{origin:t}}),await s()}let m=300*1e3,i=await new Promise(n=>{let s,d=!1,a=c=>{d||(d=!0,clearTimeout(s),n(c),f.close())},f=P.createServer((c,o)=>{try{let l=new URL(c.url||"/","http://127.0.0.1"),S=l.searchParams.get("state"),y=l.searchParams.get("token"),x=l.searchParams.get("email")||void 0,T=l.searchParams.get("userId")||void 0,p=l.searchParams.get("error");if(S!==u){o.statusCode=404,o.end("not found");return}if(o.setHeader("content-type","text/html; charset=utf-8"),p){o.end(g(`sign-in failed: ${p}`)),a({ok:!1,error:p});return}if(!y){o.end(g("missing token. close this tab and retry `rnxsim login`.")),a({ok:!1,error:"missing token"});return}o.end(g("sign-in complete. you can return to the terminal.")),a({ok:!0,token:y,email:x,userId:T})}catch(l){o.statusCode=500,o.end(g("sign-in callback failed. retry `rnxsim login`.")),a({ok:!1,error:l instanceof Error?l.message:"callback failed"})}});s=setTimeout(()=>{a({ok:!1,error:"timed out waiting for the browser sign-in (5 minutes). rerun `rnxsim login` and complete the github authorize screen if it appears."})},m),f.listen(0,"127.0.0.1",()=>{let c=f.address();if(!c||typeof c=="string"){a({ok:!1,error:"failed to bind callback server"});return}let o=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);o.searchParams.set("state",u),o.searchParams.set("port",String(c.port)),o.searchParams.set("contrast",t),console.log(" opening browser for rnxsim login..."),console.log(" first time here? github will show an authorize screen. approve it to continue."),console.log(" waiting up to 5 minutes for the browser (ctrl+c to cancel)"),console.log(` if nothing opens, visit:
26
+ </html>`}async function G(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"local dev-login unavailable"};if(!e.ok){let u=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${u}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function M(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function F(r){(r.includes("--help")||r.includes("-h"))&&(C(),process.exit(0));let e=[...r],t=await A(U(e,"--origin"));if(M(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let n=await G(t);if(n.ok){k({token:n.token,user:n.userId?{id:n.userId,email:n.email}:null,origin:t,source:"cli"});let s=await v(t),d=s?.user?.email||n.email||s?.user?.id||n.userId,{trackCliEvent:a,flushCliTelemetry:f}=await import("./telemetry-LGTXJEJC.js");a({event:"cli_login_succeeded",identity:{userId:n.userId??s?.user?.id??null},properties:{origin:t,mode:"dev"}}),await f(),console.log(` signed in${d?` as ${d}`:""} (dev)`);return}console.log(` dev-login not available (${n.error}); falling back to browser`)}let u=R(16).toString("hex");{let{trackCliEvent:n,flushCliTelemetry:s}=await import("./telemetry-LGTXJEJC.js");n({event:"cli_login_started",properties:{origin:t}}),await s()}let m=300*1e3,i=await new Promise(n=>{let s,d=!1,a=c=>{d||(d=!0,clearTimeout(s),n(c),f.close())},f=P.createServer((c,o)=>{try{let l=new URL(c.url||"/","http://127.0.0.1"),S=l.searchParams.get("state"),y=l.searchParams.get("token"),x=l.searchParams.get("email")||void 0,T=l.searchParams.get("userId")||void 0,p=l.searchParams.get("error");if(S!==u){o.statusCode=404,o.end("not found");return}if(o.setHeader("content-type","text/html; charset=utf-8"),p){o.end(g(`sign-in failed: ${p}`)),a({ok:!1,error:p});return}if(!y){o.end(g("missing token. close this tab and retry `rnx login`.")),a({ok:!1,error:"missing token"});return}o.end(g("sign-in complete. you can return to the terminal.")),a({ok:!0,token:y,email:x,userId:T})}catch(l){o.statusCode=500,o.end(g("sign-in callback failed. retry `rnx login`.")),a({ok:!1,error:l instanceof Error?l.message:"callback failed"})}});s=setTimeout(()=>{a({ok:!1,error:"timed out waiting for the browser sign-in (5 minutes). rerun `rnx login` and complete the github authorize screen if it appears."})},m),f.listen(0,"127.0.0.1",()=>{let c=f.address();if(!c||typeof c=="string"){a({ok:!1,error:"failed to bind callback server"});return}let o=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);o.searchParams.set("state",u),o.searchParams.set("port",String(c.port)),o.searchParams.set("contrast",t),console.log(" opening browser for rnx login..."),console.log(" first time here? github will show an authorize screen. approve it to continue."),console.log(" waiting up to 5 minutes for the browser (ctrl+c to cancel)"),console.log(` if nothing opens, visit:
27
27
  ${o.toString()}
28
- `),E(o.toString())})});if(!i.ok){let{trackCliEvent:n,flushCliTelemetry:s}=await import("./telemetry-ZS6SFANV.js");n({event:"cli_login_failed",properties:{origin:t,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}k({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:t,source:"cli"});let h=await v(t),I=h?.user?.email||i.email||h?.user?.id||i.userId,{trackCliEvent:$,flushCliTelemetry:_}=await import("./telemetry-ZS6SFANV.js");$({event:"cli_login_succeeded",identity:{userId:i.userId??h?.user?.id??null},properties:{origin:t}}),await _(),console.log(` signed in${I?` as ${I}`:""}`)}export{F as runLogin};
28
+ `),E(o.toString())})});if(!i.ok){let{trackCliEvent:n,flushCliTelemetry:s}=await import("./telemetry-LGTXJEJC.js");n({event:"cli_login_failed",properties:{origin:t,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}k({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:t,source:"cli"});let h=await v(t),I=h?.user?.email||i.email||h?.user?.id||i.userId,{trackCliEvent:$,flushCliTelemetry:_}=await import("./telemetry-LGTXJEJC.js");$({event:"cli_login_succeeded",identity:{userId:i.userId??h?.user?.id??null},properties:{origin:t}}),await _(),console.log(` signed in${I?` as ${I}`:""}`)}export{F as runLogin};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.334 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.336 | (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 i}from"./chunk-ZYWOBHVL.js";import{a as t,c as o}from"./chunk-KSJTW5ZW.js";import"./chunk-R7XQX7CV.js";import"./chunk-U5JW25P3.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
4
+ import{c as r,d as i}from"./chunk-MQES3MTN.js";import{a as t,c as o}from"./chunk-7FHAHI5V.js";import"./chunk-V4OZDPTA.js";import"./chunk-GI3GZ54J.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
@@ -1,18 +1,18 @@
1
- /*! rnx v0.1.334 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.336 | (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 P}from"./chunk-BH3NYOFU.js";import"./chunk-25BPBDWK.js";import"./chunk-IZITFEO5.js";import{b as k}from"./chunk-2W7J4B3D.js";import"./chunk-FSS73GUP.js";import"./chunk-X6LGVNYE.js";import{a as S}from"./chunk-WJJYIBVW.js";import"./chunk-KKLCABLJ.js";import"./chunk-MCX66YUZ.js";import"./chunk-7D2P57SZ.js";import"./chunk-32AHRTE2.js";import"./chunk-PPTUVZET.js";import"./chunk-K2NYE3XT.js";import"./chunk-AH7KCTAP.js";import{b as $,c as F,d as T,e as M}from"./chunk-WXUWD5JK.js";import{a as A}from"./chunk-PFOKFWHU.js";import"./chunk-DECDURI3.js";import"./chunk-KV653SVK.js";import"./chunk-TLAYQHXB.js";import"./chunk-R3JUSXCG.js";import"./chunk-VCBH7RDB.js";import"./chunk-TKTAVBKB.js";import"./chunk-XCI6HRMH.js";import"./chunk-HMZS7LD4.js";import"./chunk-YX7RESF2.js";import"./chunk-ZYWOBHVL.js";import"./chunk-KSJTW5ZW.js";import"./chunk-7HXPSUI6.js";import"./chunk-ELFSL6AX.js";import"./chunk-2A4XQAO5.js";import"./chunk-INV6BZQY.js";import"./chunk-L4JC72JR.js";import"./chunk-R5KHC7VZ.js";import"./chunk-752UYKC6.js";import"./chunk-CFRBWE4I.js";import"./chunk-R7XQX7CV.js";import"./chunk-Q2KHHFU3.js";import"./chunk-U5JW25P3.js";import*as n from"fs";import*as a from"path";var I=[".maestro","maestro"];function W(){console.log(`
5
- rnxsim maestro \u2014 author and run Maestro YAML flows against rnx
4
+ import{c as E,d as O,g as L,h as R,i as P}from"./chunk-2Q6S7X5O.js";import"./chunk-SV6NVD7P.js";import"./chunk-4532OPNZ.js";import{b as k}from"./chunk-2J4OBR7W.js";import"./chunk-UB3JHBDW.js";import"./chunk-NL2HXO7U.js";import{a as S}from"./chunk-OXRDTNVL.js";import"./chunk-UZCNKUSS.js";import"./chunk-TV457FWW.js";import"./chunk-M2XGXP7G.js";import"./chunk-S33NCWJV.js";import"./chunk-ZI6YQKD6.js";import"./chunk-BYOFHYKS.js";import"./chunk-HDHHEWEA.js";import{b as $,c as F,d as T,e as M}from"./chunk-RZ2PXHA7.js";import{a as A}from"./chunk-OUAYBJ4G.js";import"./chunk-NJMBQLAU.js";import"./chunk-MARPC3GM.js";import"./chunk-DMD24WAG.js";import"./chunk-262YA5CJ.js";import"./chunk-G3FVXFPF.js";import"./chunk-7PMNRG53.js";import"./chunk-NVPZLIMW.js";import"./chunk-BIZE6NBI.js";import"./chunk-STMCT3G3.js";import"./chunk-MQES3MTN.js";import"./chunk-7FHAHI5V.js";import"./chunk-KDRDDPNN.js";import"./chunk-FMWEQNK2.js";import"./chunk-3QCSDI3B.js";import"./chunk-BOZARB6P.js";import"./chunk-BHXQ7MUW.js";import"./chunk-6ALTVOXE.js";import"./chunk-ARFQOYRO.js";import"./chunk-6TN3YWA6.js";import"./chunk-V4OZDPTA.js";import"./chunk-QIVOOERS.js";import"./chunk-GI3GZ54J.js";import*as n from"fs";import*as a from"path";var I=[".maestro","maestro"];function W(){console.log(`
5
+ rnx maestro \u2014 author and run Maestro YAML flows against rnx
6
6
 
7
7
  usage:
8
- rnxsim maestro # discover .maestro/ or maestro/ in cwd, run all
9
- rnxsim maestro test <flow-or-dir> # mirrors "maestro test"
10
- rnxsim maestro test .maestro/ # every *.yaml / *.yml in a directory
11
- rnxsim maestro generate "<goal>" # generate, run, and upload a Maestro flow
12
- rnxsim maestro start|keep|end # author a flow from live CLI actions
13
- rnxsim maestro validate <flow> # validate a Maestro YAML file
14
- rnxsim maestro init # scaffold .maestro/login.yaml
15
- rnxsim maestro --list-compat # print supported/unsupported verbs
8
+ rnx maestro # discover .maestro/ or maestro/ in cwd, run all
9
+ rnx maestro test <flow-or-dir> # mirrors "maestro test"
10
+ rnx maestro test .maestro/ # every *.yaml / *.yml in a directory
11
+ rnx maestro generate "<goal>" # generate, run, and upload a Maestro flow
12
+ rnx maestro start|keep|end # author a flow from live CLI actions
13
+ rnx maestro validate <flow> # validate a Maestro YAML file
14
+ rnx maestro init # scaffold .maestro/login.yaml
15
+ rnx maestro --list-compat # print supported/unsupported verbs
16
16
 
17
17
  options:
18
18
  --env KEY=VALUE set env vars for \${KEY} interpolation (repeatable)
@@ -30,15 +30,15 @@ options:
30
30
  --slow <ms> delay between steps for natural pacing
31
31
 
32
32
  examples:
33
- rnxsim maestro test .maestro/login.yaml
34
- rnxsim maestro test .maestro/
35
- rnxsim maestro generate "log in and verify the welcome screen"
36
- rnxsim maestro start
37
- rnxsim maestro end --output .maestro/login.yaml --validate
38
- rnxsim maestro --env USERNAME=alice test .maestro/login.yaml
39
- rnxsim maestro init
33
+ rnx maestro test .maestro/login.yaml
34
+ rnx maestro test .maestro/
35
+ rnx maestro generate "log in and verify the welcome screen"
36
+ rnx maestro start
37
+ rnx maestro end --output .maestro/login.yaml --validate
38
+ rnx maestro --env USERNAME=alice test .maestro/login.yaml
39
+ rnx maestro init
40
40
  `)}function D(){console.log(`
41
- rnxsim maestro \u2014 compatibility matrix
41
+ rnx maestro \u2014 compatibility matrix
42
42
 
43
43
  supported verbs:
44
44
  launchApp, stopApp, clearState, clearKeychain (warn-only),
@@ -78,8 +78,8 @@ not yet implemented (will throw "unsupported maestro verb"):
78
78
  travel, setLocation, setAirplaneMode, killApp, faker,
79
79
  addMedia, startRecording, stopRecording (use --record flag),
80
80
  repeat.while (only repeat.times is supported).
81
- `)}function U(t){return t.startsWith("-")}function Y(t){let s=[];for(let e=0;e<t.length;e++){if(t[e]==="--env"||t[e]==="-e"){let r=t[e+1];if(!r||!r.includes("="))throw new Error(`--env expects KEY=VALUE (got ${JSON.stringify(r??"")})`);let i=r.indexOf("="),c=r.slice(0,i),p=r.slice(i+1);process.env[c]=p,e+=1;continue}s.push(t[e])}return s}function J(t){let s=[];for(let e=0;e<t.length;e++){let r=t[e];if(r==="--format"||r==="--output"||r==="--device"||r==="-d"){e+=1;continue}if(r==="--continuous"){console.warn(" warn: --continuous is not yet implemented in rnx \u2014 running once");continue}s.push(r)}return s}function j(t){for(let s of I){let e=a.join(t,s);if(n.existsSync(e)&&n.statSync(e).isDirectory())return e}return null}function N(t){let s=n.statSync(t);if(s.isFile())return[t];if(!s.isDirectory())throw new Error(`not a file or directory: ${t}`);let e={},r=["config.yaml","config.yml"].map(l=>a.join(t,l)).find(l=>n.existsSync(l));if(r){let l=S.parse(n.readFileSync(r,"utf8"));l&&typeof l=="object"&&(e=l)}let i=Array.isArray(e.flows)&&e.flows.length>0?e.flows:["*"],c=l=>{let u=a.basename(l);return!(u.startsWith(".")||!u.endsWith(".yaml")&&!u.endsWith(".yml")||u==="config.yaml"||u==="config.yml")},p=new Set;for(let l of i)for(let u of n.globSync(l,{cwd:t})){if(!c(u))continue;let d=a.join(t,u);n.existsSync(d)&&n.statSync(d).isFile()&&p.add(d)}let m=[...p].sort(),y=Array.isArray(e.includeTags)?e.includeTags:[],w=Array.isArray(e.excludeTags)?e.excludeTags:[];return(y.length>0||w.length>0)&&(m=m.filter(l=>{let{frontmatter:u}=k(n.readFileSync(l,"utf8")),d=Array.isArray(u.tags)?u.tags:[];return!(y.length>0&&!d.some(h=>y.includes(h))||d.some(h=>w.includes(h)))})),m}async function _(t){let s=a.join(t,".maestro");n.mkdirSync(s,{recursive:!0});let e=a.join(s,"login.yaml");return n.existsSync(e)?(console.error(` error: ${e} already exists`),1):(n.writeFileSync(e,`# rnxsim maestro starter flow \u2014 drop-in compatible with the maestro cli.
82
- # run: rnxsim maestro test .maestro/login.yaml
81
+ `)}function U(t){return t.startsWith("-")}function Y(t){let s=[];for(let e=0;e<t.length;e++){if(t[e]==="--env"||t[e]==="-e"){let r=t[e+1];if(!r||!r.includes("="))throw new Error(`--env expects KEY=VALUE (got ${JSON.stringify(r??"")})`);let i=r.indexOf("="),c=r.slice(0,i),p=r.slice(i+1);process.env[c]=p,e+=1;continue}s.push(t[e])}return s}function J(t){let s=[];for(let e=0;e<t.length;e++){let r=t[e];if(r==="--format"||r==="--output"||r==="--device"||r==="-d"){e+=1;continue}if(r==="--continuous"){console.warn(" warn: --continuous is not yet implemented in rnx \u2014 running once");continue}s.push(r)}return s}function j(t){for(let s of I){let e=a.join(t,s);if(n.existsSync(e)&&n.statSync(e).isDirectory())return e}return null}function N(t){let s=n.statSync(t);if(s.isFile())return[t];if(!s.isDirectory())throw new Error(`not a file or directory: ${t}`);let e={},r=["config.yaml","config.yml"].map(l=>a.join(t,l)).find(l=>n.existsSync(l));if(r){let l=S.parse(n.readFileSync(r,"utf8"));l&&typeof l=="object"&&(e=l)}let i=Array.isArray(e.flows)&&e.flows.length>0?e.flows:["*"],c=l=>{let u=a.basename(l);return!(u.startsWith(".")||!u.endsWith(".yaml")&&!u.endsWith(".yml")||u==="config.yaml"||u==="config.yml")},p=new Set;for(let l of i)for(let u of n.globSync(l,{cwd:t})){if(!c(u))continue;let d=a.join(t,u);n.existsSync(d)&&n.statSync(d).isFile()&&p.add(d)}let m=[...p].sort(),y=Array.isArray(e.includeTags)?e.includeTags:[],w=Array.isArray(e.excludeTags)?e.excludeTags:[];return(y.length>0||w.length>0)&&(m=m.filter(l=>{let{frontmatter:u}=k(n.readFileSync(l,"utf8")),d=Array.isArray(u.tags)?u.tags:[];return!(y.length>0&&!d.some(h=>y.includes(h))||d.some(h=>w.includes(h)))})),m}async function _(t){let s=a.join(t,".maestro");n.mkdirSync(s,{recursive:!0});let e=a.join(s,"login.yaml");return n.existsSync(e)?(console.error(` error: ${e} already exists`),1):(n.writeFileSync(e,`# rnx maestro starter flow \u2014 drop-in compatible with the maestro cli.
82
+ # run: rnx maestro test .maestro/login.yaml
83
83
  appId: com.example.app
84
84
  ---
85
85
  - launchApp
@@ -91,13 +91,13 @@ appId: com.example.app
91
91
  - inputText: "secret123"
92
92
  - tapOn: "Sign in"
93
93
  - assertVisible: "Welcome"
94
- `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: rnxsim maestro test .maestro/login.yaml"),0)}async function Q(t,s={}){if(t.includes("--help")||t.includes("-h"))return W(),0;if(t.includes("--list-compat"))return D(),0;let e;try{e=Y(t)}catch(o){return console.error(` error: ${o.message}`),1}e=R(e);let r=process.cwd(),i=e[0];if(i==="init")return _(r);if(i==="generate"){let{runMaestroGenerate:o}=await import("./maestro-generate-UZ75KHE6.js");return o(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return P(e);e=J(e);let c=null,p;if(i==="test"){let o=e.slice(1).find(f=>!U(f));o?(c=a.resolve(r,o),p=e.slice(1).filter(f=>f!==o)):(c=j(r),p=e.slice(1))}else i&&!U(i)?(c=a.resolve(r,i),p=e.slice(1)):(c=j(r),p=e);if(!c)return console.error(`
94
+ `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: rnx maestro test .maestro/login.yaml"),0)}async function Q(t,s={}){if(t.includes("--help")||t.includes("-h"))return W(),0;if(t.includes("--list-compat"))return D(),0;let e;try{e=Y(t)}catch(o){return console.error(` error: ${o.message}`),1}e=R(e);let r=process.cwd(),i=e[0];if(i==="init")return _(r);if(i==="generate"){let{runMaestroGenerate:o}=await import("./maestro-generate-R73J53KE.js");return o(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return P(e);e=J(e);let c=null,p;if(i==="test"){let o=e.slice(1).find(f=>!U(f));o?(c=a.resolve(r,o),p=e.slice(1).filter(f=>f!==o)):(c=j(r),p=e.slice(1))}else i&&!U(i)?(c=a.resolve(r,i),p=e.slice(1)):(c=j(r),p=e);if(!c)return console.error(`
95
95
  error: no maestro flows found.
96
96
  expected one of: ${I.map(o=>`./${o}/`).join(", ")}
97
- or pass a flow explicitly: rnxsim maestro test path/to/flow.yaml
98
- or scaffold a starter flow: rnxsim maestro init
97
+ or pass a flow explicitly: rnx maestro test path/to/flow.yaml
98
+ or scaffold a starter flow: rnx maestro init
99
99
  `),1;if(!n.existsSync(c))return console.error(` error: ${c} not found`),1;let m;try{m=N(c)}catch(o){return console.error(` error: ${o.message}`),1}if(m.length===0)return console.error(` error: no *.yaml or *.yml files found in ${c}`),1;console.log(`
100
- rnxsim maestro \u2014 ${m.length} flow${m.length===1?"":"s"}
100
+ rnx maestro \u2014 ${m.length} flow${m.length===1?"":"s"}
101
101
  root: ${a.relative(r,c)||"."}
102
102
  `);let y=A(),w=o=>{let f=p.indexOf(o);return f>=0?p[f+1]:void 0},l=null,u=()=>l??=M(w("--preview-origin")??w("--origin")),d=0,h=[];for(let o of m){console.log(`
103
103
  \u25B6 ${a.relative(r,o)}`);let f=[o,...p];s.port&&f.push("--port",String(s.port));let g=0,V=Date.now();try{g=await L(f)}catch(x){console.error(` x ${x.message}`),g=1}h.push({file:o,exit:g}),g!==0&&d===0&&(d=g);let b=E();if(F({uploadedShare:!!b,auth:y})){let x=O(),C=x.find(K=>K.status==="failure"),v=await T({origin:await u(),kind:"maestro",name:a.relative(r,o),status:g===0?"passed":"failed",failureMessage:g===0?null:C?.error??"flow playback failed",previewShareId:b?.shareId??null,owner:w("--owner")??null,repo:w("--repo")??null,durationMs:Date.now()-V,...$(x),auth:y});v&&console.log(` run: ${v.id}${v.traceUrl?` \xB7 replay: ${v.traceUrl}`:""}`)}}if(m.length>1){console.log(`
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.334 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.336 | (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 x}from"./chunk-WJJYIBVW.js";import{b as O,d as A,e as E}from"./chunk-WXUWD5JK.js";import{a as S,b as T}from"./chunk-PFOKFWHU.js";import"./chunk-DECDURI3.js";import"./chunk-KV653SVK.js";import"./chunk-TLAYQHXB.js";import{f as v}from"./chunk-TKTAVBKB.js";import"./chunk-XCI6HRMH.js";import"./chunk-ZYWOBHVL.js";import"./chunk-KSJTW5ZW.js";import{q as y,s as b}from"./chunk-R5KHC7VZ.js";import"./chunk-752UYKC6.js";import"./chunk-R7XQX7CV.js";import"./chunk-Q2KHHFU3.js";import"./chunk-U5JW25P3.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{a as x}from"./chunk-OXRDTNVL.js";import{b as O,d as A,e as E}from"./chunk-RZ2PXHA7.js";import{a as S,b as T}from"./chunk-OUAYBJ4G.js";import"./chunk-NJMBQLAU.js";import"./chunk-MARPC3GM.js";import"./chunk-DMD24WAG.js";import{f as v}from"./chunk-7PMNRG53.js";import"./chunk-NVPZLIMW.js";import"./chunk-MQES3MTN.js";import"./chunk-7FHAHI5V.js";import{q as y,s as b}from"./chunk-6ALTVOXE.js";import"./chunk-ARFQOYRO.js";import"./chunk-V4OZDPTA.js";import"./chunk-QIVOOERS.js";import"./chunk-GI3GZ54J.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: rnxsim maestro generate "test goal"'),1;let{prompt:r,index:o}=t,i=S();if(!i||i.kind==="github")return console.error(' rnxsim 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-XTAZ54NO.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-I4PVS52A.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};
@@ -0,0 +1,26 @@
1
+ /*! rnx v0.1.336 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a as r,b as s}from"./chunk-5YCVNKD7.js";import"./chunk-6ALTVOXE.js";import"./chunk-ARFQOYRO.js";import"./chunk-V4OZDPTA.js";import"./chunk-GI3GZ54J.js";async function i(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
5
+ rnx mode screenshot \u2014 toggle the screenshot-mode chrome overlay
6
+
7
+ usage:
8
+ rnx mode screenshot [on|off|toggle]
9
+
10
+ arguments:
11
+ on enable screenshot mode (enables showFrame if needed)
12
+ off disable screenshot mode
13
+ toggle flip the current state (default)
14
+
15
+ examples:
16
+ rnx mode screenshot
17
+ rnx mode screenshot on
18
+ rnx mode screenshot off
19
+ `),process.exit(0)),await r(e,o,{modeKey:"screenshotMode",displayName:"screenshot-mode",actionId:"toggle-screenshot-mode"})}var c=new Set(["--sim","--port","-p"]),d=new Set(["screenshot","three"]);function m(e){for(let o=0;o<e.length;o++){let n=e[o];if(n.startsWith("-")){c.has(n)&&o++;continue}return d.has(n)?{name:n,index:o}:null}return null}function h(e,o){return[...e.slice(0,o),...e.slice(o+1)]}function l(){console.log(`
20
+ rnx mode \u2014 toggle live display modes
21
+
22
+ usage:
23
+ rnx mode screenshot [on|off|toggle]
24
+ rnx mode three [on|off|toggle]
25
+ rnx mode three configure [options]
26
+ `)}async function g(e,o){if(e.includes("--help")||e.includes("-h")){l();return}let n=m(e);n||(l(),process.exit(1));let t=h(e,n.index);if(n.name==="screenshot"){await i(t,o);return}await s(t,o)}export{g as runMode};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.334 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.336 | (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-XCI6HRMH.js";import"./chunk-U5JW25P3.js";export{d as __withOptionalDemoAppsForTests,a as findInternalDemoRegistry,b as loadOptionalDemoApps,c as optionalDemoAppsSync};
4
+ import{a,b,c,d}from"./chunk-NVPZLIMW.js";import"./chunk-GI3GZ54J.js";export{d as __withOptionalDemoAppsForTests,a as findInternalDemoRegistry,b as loadOptionalDemoApps,c as optionalDemoAppsSync};
@@ -1,17 +1,17 @@
1
- /*! rnx v0.1.334 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.336 | (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{j as N}from"./chunk-2W7J4B3D.js";import"./chunk-FSS73GUP.js";import"./chunk-X6LGVNYE.js";import"./chunk-WJJYIBVW.js";import"./chunk-KKLCABLJ.js";import"./chunk-MCX66YUZ.js";import"./chunk-7D2P57SZ.js";import"./chunk-32AHRTE2.js";import"./chunk-PPTUVZET.js";import"./chunk-K2NYE3XT.js";import"./chunk-AH7KCTAP.js";import"./chunk-DECDURI3.js";import"./chunk-KV653SVK.js";import"./chunk-TLAYQHXB.js";import"./chunk-R3JUSXCG.js";import"./chunk-VCBH7RDB.js";import"./chunk-TKTAVBKB.js";import"./chunk-XCI6HRMH.js";import"./chunk-HMZS7LD4.js";import"./chunk-YX7RESF2.js";import"./chunk-7HXPSUI6.js";import"./chunk-ELFSL6AX.js";import"./chunk-2A4XQAO5.js";import"./chunk-INV6BZQY.js";import"./chunk-L4JC72JR.js";import{q as P,s as R,v as d,w as x}from"./chunk-R5KHC7VZ.js";import"./chunk-752UYKC6.js";import"./chunk-CFRBWE4I.js";import"./chunk-R7XQX7CV.js";import"./chunk-Q2KHHFU3.js";import"./chunk-U5JW25P3.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(` rnxsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` rnxsim 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
- rnxsim perf react \u2014 inspect React component render cost in the tenant worker
4
+ import{j as N}from"./chunk-2J4OBR7W.js";import"./chunk-UB3JHBDW.js";import"./chunk-NL2HXO7U.js";import"./chunk-OXRDTNVL.js";import"./chunk-UZCNKUSS.js";import"./chunk-TV457FWW.js";import"./chunk-M2XGXP7G.js";import"./chunk-S33NCWJV.js";import"./chunk-ZI6YQKD6.js";import"./chunk-BYOFHYKS.js";import"./chunk-HDHHEWEA.js";import"./chunk-NJMBQLAU.js";import"./chunk-MARPC3GM.js";import"./chunk-DMD24WAG.js";import"./chunk-262YA5CJ.js";import"./chunk-G3FVXFPF.js";import"./chunk-7PMNRG53.js";import"./chunk-NVPZLIMW.js";import"./chunk-BIZE6NBI.js";import"./chunk-STMCT3G3.js";import"./chunk-KDRDDPNN.js";import"./chunk-FMWEQNK2.js";import"./chunk-3QCSDI3B.js";import"./chunk-BOZARB6P.js";import"./chunk-BHXQ7MUW.js";import{q as P,s as R,v as d,w as x}from"./chunk-6ALTVOXE.js";import"./chunk-ARFQOYRO.js";import"./chunk-6TN3YWA6.js";import"./chunk-V4OZDPTA.js";import"./chunk-QIVOOERS.js";import"./chunk-GI3GZ54J.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
+ rnx perf react \u2014 inspect React component render cost in the tenant worker
6
6
 
7
7
  usage:
8
- rnxsim perf react profile start [--include-props] [--max-commits N]
9
- rnxsim perf react profile stop
10
- rnxsim perf react summary [--limit 10] [--json]
11
- rnxsim perf react slow [--limit 5] [--json]
12
- rnxsim perf react rerenders [--limit 5] [--json]
13
- rnxsim perf react tree [--depth 3] [--find <name>] [--json]
14
- rnxsim perf react why <fiber-id> [--json]
8
+ rnx perf react profile start [--include-props] [--max-commits N]
9
+ rnx perf react profile stop
10
+ rnx perf react summary [--limit 10] [--json]
11
+ rnx perf react slow [--limit 5] [--json]
12
+ rnx perf react rerenders [--limit 5] [--json]
13
+ rnx perf react tree [--depth 3] [--find <name>] [--json]
14
+ rnx perf react why <fiber-id> [--json]
15
15
 
16
16
  \`react summary\` is the demo-friendly shortcut: it runs both slow and
17
17
  rerenders in one round-trip, prints them as a single table per side,
@@ -19,30 +19,30 @@ and surfaces the duration-zero warning prominently when the bundle is
19
19
  running without React profiler timers.
20
20
 
21
21
  examples:
22
- rnxsim perf react profile start
23
- rnxsim do tap-text Inbox
24
- rnxsim perf react profile stop
25
- rnxsim perf react summary --limit 10
26
- rnxsim perf react slow --limit 10
27
- rnxsim perf react rerenders --json
22
+ rnx perf react profile start
23
+ rnx do tap-text Inbox
24
+ rnx perf react profile stop
25
+ rnx perf react summary --limit 10
26
+ rnx perf react slow --limit 10
27
+ rnx perf react rerenders --json
28
28
  `)}function F(e,o){let r=e.indexOf(o);if(r>=0&&r+1<e.length)return e[r+1];let n=`${o}=`,t=e.find(s=>s.startsWith(n));return t?t.slice(n.length):void 0}function w(e,o,r){let n=F(e,o);if(n===void 0)return r;let t=Number(n);return Number.isFinite(t)&&t>0?Math.round(t):r}function M(e,o){let r=e.map((t,s)=>Math.max(t.length,...o.map(a=>a[s]?.length??0))),n=t=>t.map((s,a)=>s.padEnd(r[a])).join(" ").trimEnd();return[n(e),n(e.map(t=>"-".repeat(t.length))),...o.map(n)].map(t=>` ${t}`).join(`
29
29
  `)}function g(e){console.log(JSON.stringify(e,null,2))}function T(e){e.error&&console.error(` warning: ${e.error}`),e.durationWarning&&console.error(` warning: ${e.durationWarning}`);let o=e.rows??[];if(o.length===0){console.log(` no React render samples yet (${e.commits??0} commit(s))`);return}console.log(M(["component","total","avg","commits","slowest"],o.map(r=>[r.displayName,`${r.totalMs.toFixed(2)}ms`,`${r.avgMs.toFixed(2)}ms`,String(r.commitCount),`#${r.slowestCommit} ${r.slowestMs.toFixed(2)}ms`])))}function k(e){e.error&&console.error(` warning: ${e.error}`);let o=e.rows??[];if(o.length===0){console.log(` no React render samples yet (${e.commits??0} commit(s))`);return}console.log(M(["component","renders","causes"],o.map(r=>{let n=Object.entries(r.causes??{}).filter(([,t])=>t>0).sort((t,s)=>s[1]-t[1]).slice(0,4).map(([t,s])=>`${t}:${s}`).join(", ");return[r.displayName,String(r.renders??r.count),n||"-"]})))}function _(e){e.error&&console.error(` warning: ${e.error}`);let o=e.rows??[];if(o.length===0){console.log(` no React tree data yet (${e.roots??0} root(s))`);return}for(let r of o){let n=" ".repeat(r.depth);console.log(` ${n}@${r.id} ${r.displayName} [${r.kind}] children=${r.childCount}`)}}function z(e){if(e.error){console.error(` ${e.error}`);return}let o=e.sample;if(!o){console.log(" no sample");return}if(console.log(` @${o.fiberId} ${o.displayName}`),console.log(` duration: ${Number(o.actualDuration??0).toFixed(2)}ms`),console.log(` causes: ${(o.causes??[]).join(", ")||"-"}`),o.propDiffs?.length){console.log(" props:");for(let r of o.propDiffs){let n="old"in r||"new"in r?` ${JSON.stringify(r.old)} \u2192 ${JSON.stringify(r.new)}`:"";console.log(` ${r.key}${n}`)}}o.parentChain?.length&&console.log(` parents: ${o.parentChain.join(" \u2190 ")}`)}async function I(e,o){let r=P(e,{port:o.port,stripBooleanFlags:["--json","--include-props","--help","-h"],stripValueFlags:["--limit","--depth","--find","--max-commits"]});if(e.includes("--help")||e.includes("-h"))return j(),0;let[n,t]=r.positional,s=e.includes("--json"),a=R(r);try{if(n==="profile"&&t==="start"){let i=await x(a,"SootSim.bridges.reactProfile.start",{includeProps:e.includes("--include-props"),maxCommits:w(e,"--max-commits",2e3)});return s?g(i):console.log(" React profile started"),0}if(n==="profile"&&t==="stop"){let i=await x(a,"SootSim.bridges.reactProfile.stop");return s?g(i):(console.log(` React profile stopped (${i.commits??0} commit(s))`),i.error&&console.error(` warning: ${i.error}`)),i.error?1:0}if(n==="summary"){let i=w(e,"--limit",10),[l,f]=await Promise.all([d(a,"SootSim.bridges.reactProfile.slow",{limit:i}),d(a,"SootSim.bridges.reactProfile.rerenders",{limit:i})]);if(s)return g({commits:l.commits??f.commits??0,slow:l,rerenders:f}),0;let u=l.commits??f.commits??0;console.log(` React profile summary (${u} commit(s)):`),l.error&&console.error(` warning: ${l.error}`),l.durationWarning&&console.error(` warning: ${l.durationWarning}`),f.error&&console.error(` warning: ${f.error}`),console.log(`
30
30
  slowest renders:`),T(l),console.log(`
31
31
  most rerenders:`),k(f);let m=l.rows?.[0];return(l.rows&&l.rows.length>0?l.rows.every(c=>c.totalMs<=0&&c.slowestMs<=0):!1)&&!l.durationWarning&&console.error(`
32
- warning: every commit reports actualDuration=0ms \u2014 the React profiler timer is disabled in this bundle (rerender counts are still accurate; ${m?.displayName?`top-listed: ${m.displayName}`:"no slow signal"}).`),0}if(n==="slow"){let i=await d(a,"SootSim.bridges.reactProfile.slow",{limit:w(e,"--limit",10)});return s?g(i):T(i),0}if(n==="rerenders"){let i=await d(a,"SootSim.bridges.reactProfile.rerenders",{limit:w(e,"--limit",10)});return s?g(i):k(i),0}if(n==="tree"){let i=await d(a,"SootSim.bridges.reactProfile.tree",{depth:w(e,"--depth",3),find:F(e,"--find")});return s?g(i):_(i),0}if(n==="why"){let i=Number(t);if(!Number.isFinite(i)||i<=0)return console.error(" usage: rnxsim perf react why <fiber-id>"),1;let l=await d(a,"SootSim.bridges.reactProfile.why",Math.round(i));return s?g(l):z(l),l.error?1:0}return j(),n?1:0}finally{a.close()}}var G=new Set(["--sim","--port","-p"]),L=new Set(["cpu","react","shell","scroll"]);function H(e){for(let o=0;o<e.length;o++){let r=e[o];if(r.startsWith("-")){G.has(r)&&o++;continue}return L.has(r)?{name:r,index:o}:null}return null}function V(e,o){return[...e.slice(0,o),...e.slice(o+1)]}function Z(){console.log(`
33
- rnxsim perf \u2014 performance profiling tools
32
+ warning: every commit reports actualDuration=0ms \u2014 the React profiler timer is disabled in this bundle (rerender counts are still accurate; ${m?.displayName?`top-listed: ${m.displayName}`:"no slow signal"}).`),0}if(n==="slow"){let i=await d(a,"SootSim.bridges.reactProfile.slow",{limit:w(e,"--limit",10)});return s?g(i):T(i),0}if(n==="rerenders"){let i=await d(a,"SootSim.bridges.reactProfile.rerenders",{limit:w(e,"--limit",10)});return s?g(i):k(i),0}if(n==="tree"){let i=await d(a,"SootSim.bridges.reactProfile.tree",{depth:w(e,"--depth",3),find:F(e,"--find")});return s?g(i):_(i),0}if(n==="why"){let i=Number(t);if(!Number.isFinite(i)||i<=0)return console.error(" usage: rnx perf react why <fiber-id>"),1;let l=await d(a,"SootSim.bridges.reactProfile.why",Math.round(i));return s?g(l):z(l),l.error?1:0}return j(),n?1:0}finally{a.close()}}var G=new Set(["--sim","--port","-p"]),L=new Set(["cpu","react","shell","scroll"]);function H(e){for(let o=0;o<e.length;o++){let r=e[o];if(r.startsWith("-")){G.has(r)&&o++;continue}return L.has(r)?{name:r,index:o}:null}return null}function V(e,o){return[...e.slice(0,o),...e.slice(o+1)]}function Z(){console.log(`
33
+ rnx perf \u2014 performance profiling tools
34
34
 
35
35
  usage:
36
- rnxsim perf cpu [options]
37
- rnxsim perf react <subcommand> [options]
38
- rnxsim perf shell <start|stop|transition> [options]
39
- rnxsim perf scroll <start|stop> [options]
36
+ rnx perf cpu [options]
37
+ rnx perf react <subcommand> [options]
38
+ rnx perf shell <start|stop|transition> [options]
39
+ rnx perf scroll <start|stop> [options]
40
40
 
41
41
  examples:
42
- rnxsim perf cpu --duration 5 --output /tmp/trace.cpuprofile
43
- rnxsim perf react summary --limit 10
44
- rnxsim perf shell start
45
- rnxsim perf shell stop --json
46
- rnxsim perf scroll start
47
- rnxsim perf scroll stop --json
42
+ rnx perf cpu --duration 5 --output /tmp/trace.cpuprofile
43
+ rnx perf react summary --limit 10
44
+ rnx perf shell start
45
+ rnx perf shell stop --json
46
+ rnx perf scroll start
47
+ rnx perf scroll stop --json
48
48
  `)}async function te(e,o){let r=H(e);if(!r)return Z(),e.includes("--help")||e.includes("-h")?0:1;let n=V(e,r.index);if(r.name==="cpu")return O(n,o);if(r.name==="react")return I(n,o);let t=n.includes("--help")||n.includes("-h")?[]:n;return await N(["debug","perf",...t],{...o,internalPerfCommand:r.name==="scroll"?"scroll":"shell"}),typeof process.exitCode=="number"?process.exitCode:0}export{te as runPerf};
@@ -0,0 +1,13 @@
1
+ /*! rnx v0.1.336 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{q as h,s as w,v as m,w as u}from"./chunk-6ALTVOXE.js";import"./chunk-ARFQOYRO.js";import"./chunk-V4OZDPTA.js";import"./chunk-GI3GZ54J.js";var A=["not-determined","restricted","denied","authorized","limited","provisional","ephemeral","unavailable"],E=["app-tracking-transparency","bluetooth","calendars","camera","contacts","face-id","local-network","location-always","location-when-in-use","media-library","microphone","motion","notifications","photo-library","photo-library-add-only","reminders","siri","speech-recognition"];function b(){console.log(`
5
+ rnx permissions \u2014 inspect and change simulated operating-system permissions
6
+
7
+ usage:
8
+ rnx permissions list [--json]
9
+ rnx permissions get <app-id> [--json]
10
+ rnx permissions set <app-id> <kind> <status> [--once] [--accuracy full|reduced] [--json]
11
+ rnx permissions reset <app-id> [kind] [--json]
12
+ `)}function S(n,i){console.log(i?JSON.stringify(n,null,2):n)}function $(n,i){let e=n.indexOf(i);return e>=0?n[e+1]:void 0}function P(n){return E.find(i=>i===n)??null}function j(n){return A.find(i=>i===n)??null}function x(n,i,e){switch(n){case"authorized":return{status:n,...i?{authorizationScope:"once"}:null,...e?{locationAccuracy:e}:null};case"not-determined":case"restricted":case"denied":case"limited":case"provisional":case"ephemeral":case"unavailable":return{status:n}}}async function B(n,i){if(n.includes("--help")||n.includes("-h"))return b(),0;let e=h(n,{port:i.port,stripBooleanFlags:["--json","--once"],stripValueFlags:["--accuracy"]}),[s,o,r,f]=e.positional;if(!s)return b(),1;let c=n.includes("--json"),t=w(e);try{if(s==="list"){let p=await m(t,"SootSim.bridges.test.permissionListApps");return S(c?p:p.map(l=>`${l.appId} ${l.displayName}`).join(`
13
+ `),c),0}if(!o)throw new Error(`${s} requires an app id`);if(s==="get"){let p=await m(t,"SootSim.bridges.test.permissionGetAppSettings",o);return S(p,c),0}if(s==="reset"){if(r){let l=P(r);if(!l)throw new Error(`unknown permission kind: ${r}`);await u(t,"SootSim.bridges.test.permissionSetAppPermission",o,l,{status:"not-determined"})}else await u(t,"SootSim.bridges.test.permissionResetApp",o);let p=await m(t,"SootSim.bridges.test.permissionGetAppSettings",o);return S(p,c),0}if(s!=="set")throw new Error(`unknown permissions command: ${s}`);if(!r||!f)throw new Error("set requires an app id, permission kind, and status");let a=P(r);if(!a)throw new Error(`unknown permission kind: ${r}`);let g=j(f);if(!g)throw new Error(`unknown permission status: ${f}`);let d=$(n,"--accuracy"),y=d==="full"||d==="reduced"?d:void 0;if(d&&!y)throw new Error(`unknown location accuracy: ${d}`);let k=await u(t,"SootSim.bridges.test.permissionSetAppPermission",o,a,x(g,n.includes("--once"),y));return S(k,c),0}catch(a){return console.error(` permissions failed: ${a instanceof Error?a.message:a}`),1}finally{t.close()}}export{B as runPermissions};