rnxsim 0.1.374 → 0.1.376

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 (196) hide show
  1. package/cli/commands/box.ts +5 -5
  2. package/cli/commands/control.ts +18 -4
  3. package/cli/ws-bridge.ts +5 -2
  4. package/dist-cli/bin.js +5 -5
  5. package/dist-cli/chunks/{agent-BKCNNEQV.js → agent-H42FCKFF.js} +2 -2
  6. package/dist-cli/chunks/{agent-wrapper-B3AS3ENV.js → agent-wrapper-BBZKTZS6.js} +2 -2
  7. package/dist-cli/chunks/{app-fonts-GWE22XIG.js → app-fonts-43VXIKF4.js} +2 -2
  8. package/dist-cli/chunks/{assert-ORX5Q6AH.js → assert-IXOLVO5Z.js} +2 -2
  9. package/dist-cli/chunks/{auth-REWJRBFP.js → auth-KFMFB6FU.js} +2 -2
  10. package/dist-cli/chunks/{beta-Q2VQZCLD.js → beta-5AO3SJB7.js} +2 -2
  11. package/dist-cli/chunks/{box-I5QZZJBJ.js → box-ZHM66L6K.js} +46 -46
  12. package/dist-cli/chunks/{camera-5HA2IJDC.js → camera-FNJVFCDQ.js} +2 -2
  13. package/dist-cli/chunks/{chunk-GH7XDCAP.js → chunk-37MCSPTE.js} +1 -1
  14. package/dist-cli/chunks/{chunk-N5GTOZJP.js → chunk-3PEMSUAQ.js} +3 -3
  15. package/dist-cli/chunks/chunk-4TQ5HOK3.js +7 -0
  16. package/dist-cli/chunks/{chunk-5VFQ7HKK.js → chunk-5YZYDEMI.js} +1 -1
  17. package/dist-cli/chunks/{chunk-XL53SSTO.js → chunk-6CV3R3XD.js} +2 -2
  18. package/dist-cli/chunks/{chunk-6PV4QLZ7.js → chunk-7LGK5XU6.js} +2 -2
  19. package/dist-cli/chunks/{chunk-XSXSVO4P.js → chunk-7R2TK2NY.js} +1 -1
  20. package/dist-cli/chunks/{chunk-HCORKEG6.js → chunk-7VZZQQEE.js} +3 -3
  21. package/dist-cli/chunks/{chunk-2QVA4PPE.js → chunk-AFOVILIL.js} +1 -1
  22. package/dist-cli/chunks/{chunk-PZYF2TKR.js → chunk-BEU7CD7E.js} +1 -1
  23. package/dist-cli/chunks/{chunk-ZAUPKGQP.js → chunk-CE4JQJ6Y.js} +2 -2
  24. package/dist-cli/chunks/{chunk-MHVH5IJU.js → chunk-CIE6CZXL.js} +2 -2
  25. package/dist-cli/chunks/{chunk-4S5CIP7Y.js → chunk-CSJ7L7ZL.js} +1 -1
  26. package/dist-cli/chunks/chunk-CWCQP53A.js +27 -0
  27. package/dist-cli/chunks/{chunk-HM5TGIVN.js → chunk-DCS5FK5N.js} +1 -1
  28. package/dist-cli/chunks/{chunk-R7NXLMFI.js → chunk-DEV3E3MV.js} +1 -1
  29. package/dist-cli/chunks/{chunk-PYH2MNFB.js → chunk-DGJMIVZM.js} +2 -2
  30. package/dist-cli/chunks/{chunk-2ZE4WXXF.js → chunk-DGX3MN65.js} +1 -1
  31. package/dist-cli/chunks/{chunk-KOSLTZXQ.js → chunk-DNPQMTW5.js} +2 -2
  32. package/dist-cli/chunks/{chunk-7DLC2M6S.js → chunk-DOVBJBVD.js} +2 -2
  33. package/dist-cli/chunks/{chunk-X2YXPZD4.js → chunk-DPBJ3S3J.js} +1 -1
  34. package/dist-cli/chunks/{chunk-PVGD4KKG.js → chunk-FVZBGPCU.js} +2 -2
  35. package/dist-cli/chunks/{chunk-XSWS6HY6.js → chunk-GDKMOIUT.js} +1 -1
  36. package/dist-cli/chunks/{chunk-SNMLG22Y.js → chunk-GIF2NJCS.js} +2 -2
  37. package/dist-cli/chunks/{chunk-VKOEADVP.js → chunk-GZE57ORL.js} +1 -1
  38. package/dist-cli/chunks/{chunk-KN6LU33B.js → chunk-H3U56DKI.js} +2 -2
  39. package/dist-cli/chunks/{chunk-4FYJOFJZ.js → chunk-HZLOYAPH.js} +2 -2
  40. package/dist-cli/chunks/{chunk-Y3LVGZKE.js → chunk-J2IKAEU2.js} +2 -2
  41. package/dist-cli/chunks/{chunk-6VPR6OTH.js → chunk-JXAXYK7W.js} +2 -2
  42. package/dist-cli/chunks/{chunk-IXYE6F2D.js → chunk-KJE2O2GK.js} +2 -2
  43. package/dist-cli/chunks/{chunk-G2IBWLBT.js → chunk-KMNVDZZI.js} +1 -1
  44. package/dist-cli/chunks/{chunk-7PBNTA3M.js → chunk-LC3QRIRB.js} +2 -2
  45. package/dist-cli/chunks/{chunk-A6JPQM7B.js → chunk-LGFTAQYC.js} +1 -1
  46. package/dist-cli/chunks/{chunk-I2C26UZ3.js → chunk-LQMUA5IY.js} +1 -1
  47. package/dist-cli/chunks/{chunk-IQ5HBVID.js → chunk-MFIQTWC5.js} +2 -2
  48. package/dist-cli/chunks/{chunk-TCB6DSON.js → chunk-MGALNF2F.js} +2 -2
  49. package/dist-cli/chunks/{chunk-DYE6WT2Q.js → chunk-MLBZZHOY.js} +2 -2
  50. package/dist-cli/chunks/{chunk-KVMYAHND.js → chunk-NNRF7GIB.js} +2 -2
  51. package/dist-cli/chunks/{chunk-6JBXWVSP.js → chunk-NORLYTTO.js} +2 -2
  52. package/dist-cli/chunks/{chunk-VSGEEW3N.js → chunk-P6KVGV3H.js} +11 -11
  53. package/dist-cli/chunks/chunk-PAJTUK33.js +4 -0
  54. package/dist-cli/chunks/{chunk-2W6ADNTG.js → chunk-QELIC5XP.js} +1 -1
  55. package/dist-cli/chunks/{chunk-GQVWJWCZ.js → chunk-QRDF33WD.js} +1 -1
  56. package/dist-cli/chunks/{chunk-AEMLIV3G.js → chunk-R76BA7C7.js} +3 -3
  57. package/dist-cli/chunks/{chunk-RXDJ422X.js → chunk-RVEB4CZ2.js} +2 -2
  58. package/dist-cli/chunks/{chunk-CBF7RQ3C.js → chunk-SK4M7NXT.js} +1 -1
  59. package/dist-cli/chunks/{chunk-RAYAIDJI.js → chunk-SKMG5DD7.js} +2 -2
  60. package/dist-cli/chunks/{chunk-VOYUOTN2.js → chunk-TEESPOYR.js} +1 -1
  61. package/dist-cli/chunks/{chunk-UQXSAYWY.js → chunk-TH2UFGVP.js} +1 -1
  62. package/dist-cli/chunks/{chunk-RE2IODEB.js → chunk-TLP3T3VO.js} +1 -1
  63. package/dist-cli/chunks/{chunk-2XDNHF7N.js → chunk-TZUABDIJ.js} +2 -2
  64. package/dist-cli/chunks/{chunk-R3HLZSGB.js → chunk-UB2W6OQM.js} +2 -2
  65. package/dist-cli/chunks/{chunk-UHTIDDI2.js → chunk-UYVXALPB.js} +2 -2
  66. package/dist-cli/chunks/{chunk-2MI2ROT4.js → chunk-VQDYFFIG.js} +2 -2
  67. package/dist-cli/chunks/{chunk-KWUKKULB.js → chunk-VWCNJPCJ.js} +2 -2
  68. package/dist-cli/chunks/{chunk-UAMMP7U7.js → chunk-VZIK4WIS.js} +2 -2
  69. package/dist-cli/chunks/{chunk-VDCYIT2N.js → chunk-W3FNXAQP.js} +1 -1
  70. package/dist-cli/chunks/{chunk-5WXRC4BW.js → chunk-XCDNVNP3.js} +1 -1
  71. package/dist-cli/chunks/{chunk-U52Z6BML.js → chunk-XSVILA4Z.js} +2 -2
  72. package/dist-cli/chunks/{chunk-WR6QFC62.js → chunk-XUTJ7ZWD.js} +2 -2
  73. package/dist-cli/chunks/{chunk-QKYOZQKE.js → chunk-YTXY3MHW.js} +2 -2
  74. package/dist-cli/chunks/{chunk-MU77ZSME.js → chunk-ZF7PVX44.js} +2 -2
  75. package/dist-cli/chunks/{chunk-RU565DEH.js → chunk-ZSSG7OR7.js} +1 -1
  76. package/dist-cli/chunks/{cleanup-4ZAL2PTZ.js → cleanup-MLOK2OZA.js} +2 -2
  77. package/dist-cli/chunks/cli-version-OBNR366V.js +4 -0
  78. package/dist-cli/chunks/{compat-6CEUDCO2.js → compat-SHMFSKU7.js} +2 -2
  79. package/dist-cli/chunks/{config-YHATX3ZX.js → config-TPEAEUJ2.js} +2 -2
  80. package/dist-cli/chunks/{connect-LXWD3ILH.js → connect-3LEXWTE5.js} +2 -2
  81. package/dist-cli/chunks/control-Z3FWA6BO.js +4 -0
  82. package/dist-cli/chunks/daemon-RSVYSC65.js +4 -0
  83. package/dist-cli/chunks/{debug-4RKDQCF4.js → debug-GUVAK2KR.js} +3 -3
  84. package/dist-cli/chunks/{desktop-ISJKVEQA.js → desktop-OOP2PTKP.js} +3 -3
  85. package/dist-cli/chunks/{detox-7P5NDA5M.js → detox-C2ILVBEC.js} +2 -2
  86. package/dist-cli/chunks/{device-JXBP6WUE.js → device-NXIQQJWR.js} +2 -2
  87. package/dist-cli/chunks/{diagnose-7JJWOZ23.js → diagnose-2JBGYE5L.js} +2 -2
  88. package/dist-cli/chunks/{disk-cleanup-MXIQGJWO.js → disk-cleanup-VURWJYQV.js} +2 -2
  89. package/dist-cli/chunks/{do-chain-KTAVIZMC.js → do-chain-DJ4UQC7A.js} +2 -2
  90. package/dist-cli/chunks/drivers-JMA2OIKU.js +4 -0
  91. package/dist-cli/chunks/{env-37X232UA.js → env-KTNPKEZR.js} +2 -2
  92. package/dist-cli/chunks/{film-5F5XDOIR.js → film-DCPS7EID.js} +3 -3
  93. package/dist-cli/chunks/flow-4DZ7B2OA.js +4 -0
  94. package/dist-cli/chunks/help-34CJMQY2.js +4 -0
  95. package/dist-cli/chunks/{hidden-runtime-alias-FAPVCHKI.js → hidden-runtime-alias-HHT2C7WE.js} +2 -2
  96. package/dist-cli/chunks/{home-paths-VW3CI5QK.js → home-paths-KTPGCPMS.js} +2 -2
  97. package/dist-cli/chunks/inspect-JF5WYJRD.js +4 -0
  98. package/dist-cli/chunks/install-desktop-ZIC4CDXI.js +4 -0
  99. package/dist-cli/chunks/{login-LDN6ETBS.js → login-TTJAOI2Q.js} +2 -2
  100. package/dist-cli/chunks/{logout-HOHKC7TH.js → logout-ERAQ6SKW.js} +2 -2
  101. package/dist-cli/chunks/{maestro-PCFZZHCH.js → maestro-W46QCF77.js} +3 -3
  102. package/dist-cli/chunks/{maestro-generate-6MSPC66O.js → maestro-generate-VBLM3MTU.js} +3 -3
  103. package/dist-cli/chunks/{mode-GRYQSTZH.js → mode-ZEDZK7R7.js} +2 -2
  104. package/dist-cli/chunks/{optional-demo-registry-RP2H6SQR.js → optional-demo-registry-ZUTPSVYQ.js} +2 -2
  105. package/dist-cli/chunks/{perf-WPW5FWOL.js → perf-YVT2WXT4.js} +2 -2
  106. package/dist-cli/chunks/{permissions-OXAWZHB2.js → permissions-L7VVDHFP.js} +2 -2
  107. package/dist-cli/chunks/{platform-SKTAMMLT.js → platform-7TJOU2FB.js} +3 -3
  108. package/dist-cli/chunks/privacy-57UOTB5J.js +4 -0
  109. package/dist-cli/chunks/{record-WFA3GUIX.js → record-VXG37P7U.js} +3 -3
  110. package/dist-cli/chunks/{report-issue-LB7QRUIO.js → report-issue-WNNOBZHC.js} +2 -2
  111. package/dist-cli/chunks/reset-H5NBFE5U.js +4 -0
  112. package/dist-cli/chunks/resolve-target-57TK5WLE.js +4 -0
  113. package/dist-cli/chunks/runtime-QU2NIF2K.js +4 -0
  114. package/dist-cli/chunks/{screenshot-command-OX4B5ZPE.js → screenshot-command-AN56TTG7.js} +3 -3
  115. package/dist-cli/chunks/{screenshot-layers-QOSO5ZRE.js → screenshot-layers-3W5R7DB2.js} +2 -2
  116. package/dist-cli/chunks/{screenshots-capture-XSRQO5SQ.js → screenshots-capture-6AWJY7XZ.js} +2 -2
  117. package/dist-cli/chunks/{serve-LNYA35IZ.js → serve-GLYO5Q7J.js} +2 -2
  118. package/dist-cli/chunks/setup-UA2HLD7S.js +4 -0
  119. package/dist-cli/chunks/{sim-client-MBY5YFOJ.js → sim-client-5C2RDQQO.js} +2 -2
  120. package/dist-cli/chunks/{skills-DVTU7NKR.js → skills-EYXWBRNQ.js} +2 -2
  121. package/dist-cli/chunks/{state-4AIXTMAN.js → state-REJ7W6K3.js} +2 -2
  122. package/dist-cli/chunks/{storage-OXHTXIRW.js → storage-CFMDHI3V.js} +2 -2
  123. package/dist-cli/chunks/store-XMCUA45G.js +4 -0
  124. package/dist-cli/chunks/telemetry-FBL3NAKB.js +4 -0
  125. package/dist-cli/chunks/{timeline-HY7NURFG.js → timeline-HMCHN5FO.js} +2 -2
  126. package/dist-cli/chunks/{upgrade-V6222XJR.js → upgrade-2QSPAA3P.js} +2 -2
  127. package/dist-cli/chunks/upload-DUQBKZYV.js +4 -0
  128. package/dist-cli/chunks/{version-32O3RRDO.js → version-IOA6QFGB.js} +2 -2
  129. package/dist-cli/chunks/{web-DA6HESOZ.js → web-NCGUYVCJ.js} +2 -2
  130. package/dist-cli/chunks/welcome-QYGSQCWQ.js +5 -0
  131. package/dist-cli/chunks/{what-happened-UEY6YRTH.js → what-happened-YTOUK4LO.js} +2 -2
  132. package/dist-cli/chunks/{ws-bridge-4WWOVU5V.js → ws-bridge-OF4OZARG.js} +2 -2
  133. package/dist-lib/agent-daemon-client.cjs +1 -1
  134. package/dist-lib/agent-events.cjs +1 -1
  135. package/dist-lib/agent-identity.cjs +1 -1
  136. package/dist-lib/agent-sessions.cjs +1 -1
  137. package/dist-lib/attached-projects.cjs +1 -1
  138. package/dist-lib/auth/shared-session.cjs +1 -1
  139. package/dist-lib/backend-origin.cjs +1 -1
  140. package/dist-lib/beta.cjs +1 -1
  141. package/dist-lib/beta.mjs +1 -1
  142. package/dist-lib/bridge-constants.cjs +1 -1
  143. package/dist-lib/bridge-contract-input.cjs +1 -1
  144. package/dist-lib/bridge-contract-input.mjs +1 -1
  145. package/dist-lib/bridge-contract.cjs +1 -1
  146. package/dist-lib/bridge-contract.mjs +1 -1
  147. package/dist-lib/cli-constants.cjs +1 -1
  148. package/dist-lib/config.cjs +1 -1
  149. package/dist-lib/detox/index.cjs +1 -1
  150. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  151. package/dist-lib/home-paths.cjs +1 -1
  152. package/dist-lib/host/bridge-host.cjs +148 -134
  153. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  154. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  155. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  156. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  157. package/dist-lib/host/websocket-proxy.cjs +1 -1
  158. package/dist-lib/index.cjs +3 -3
  159. package/dist-lib/jump-to-source-babel.cjs +1 -1
  160. package/dist-lib/menu.cjs +1 -1
  161. package/dist-lib/menu.mjs +1 -1
  162. package/dist-lib/metro-production-bundle.cjs +1 -1
  163. package/dist-lib/metro-production-bundle.mjs +1 -1
  164. package/dist-lib/metro.cjs +1 -1
  165. package/dist-lib/profiles.cjs +1 -1
  166. package/dist-lib/public-brand.cjs +1 -1
  167. package/dist-lib/react-native-host-modules.cjs +1 -1
  168. package/dist-lib/react-native-host-modules.mjs +1 -1
  169. package/dist-lib/render-mode.cjs +1 -1
  170. package/dist-lib/scripts/dev-server-scanner.cjs +18 -4
  171. package/dist-lib/sdk.cjs +1 -1
  172. package/dist-lib/sdk.mjs +1 -1
  173. package/dist-lib/skills.cjs +219 -198
  174. package/dist-lib/vite.cjs +1 -1
  175. package/package.json +1 -1
  176. package/scripts/dev-server-scanner.ts +23 -5
  177. package/dist-cli/chunks/chunk-DB2JB52S.js +0 -4
  178. package/dist-cli/chunks/chunk-L6VQSQ5O.js +0 -7
  179. package/dist-cli/chunks/chunk-OO7E4JTZ.js +0 -27
  180. package/dist-cli/chunks/cli-version-OZYTASIM.js +0 -4
  181. package/dist-cli/chunks/control-LBL5A6WE.js +0 -4
  182. package/dist-cli/chunks/daemon-JCFSBU66.js +0 -4
  183. package/dist-cli/chunks/drivers-IQ5GCHPH.js +0 -4
  184. package/dist-cli/chunks/flow-74OQVMSN.js +0 -4
  185. package/dist-cli/chunks/help-OCNTRGIJ.js +0 -4
  186. package/dist-cli/chunks/inspect-Z2NKYQEG.js +0 -4
  187. package/dist-cli/chunks/install-desktop-47P2MA4T.js +0 -4
  188. package/dist-cli/chunks/privacy-XEXZ6AIX.js +0 -4
  189. package/dist-cli/chunks/reset-CYS4XX4I.js +0 -4
  190. package/dist-cli/chunks/resolve-target-YYCTSFNM.js +0 -4
  191. package/dist-cli/chunks/runtime-JFQ6JIA6.js +0 -4
  192. package/dist-cli/chunks/setup-3W2UEM2H.js +0 -4
  193. package/dist-cli/chunks/store-43NVGPZX.js +0 -4
  194. package/dist-cli/chunks/telemetry-ZQRYJXGE.js +0 -4
  195. package/dist-cli/chunks/upload-DUKPPETT.js +0 -4
  196. package/dist-cli/chunks/welcome-X7PCNKS6.js +0 -5
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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,t as E,v as x,y as b}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";function j(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
4
+ import{e as v,t as E,v as x,y as b}from"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";function j(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
5
5
  rnx get diagnosis \u2014 compact "what just went wrong?" report
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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}from"./chunk-TCB6DSON.js";import"./chunk-XSXSVO4P.js";import"./chunk-ZAUPKGQP.js";import"./chunk-GQVWJWCZ.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";export{f as applyAutomaticSootsimCleanup,e as applySootsimCleanup,c as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,d as planSootsimCleanup,b as shouldSkipAutomaticSootsimCleanup};
4
+ import{a,b,c,d,e,f}from"./chunk-MGALNF2F.js";import"./chunk-7R2TK2NY.js";import"./chunk-CE4JQJ6Y.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";export{f as applyAutomaticSootsimCleanup,e as applySootsimCleanup,c as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,d as planSootsimCleanup,b as shouldSkipAutomaticSootsimCleanup};
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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-RU565DEH.js";var p=class extends Error{constructor(s){super(s),this.name="BridgeInputError"}};var k=new Set(["tap","tap-id","tap-text","double-tap","long-press","type","type-into","key","key-sequence","dismiss","scroll","drag","swipe","pinch","touch","sleep"]);function O(a){return a.includes("--then")}function o(a,s){throw new p(`do chain action ${a+1} has invalid arguments; usage: rnx do ${s}`)}function r(a,s,l){let n=Number(a);return(a===void 0||!Number.isFinite(n))&&o(s,l),n}function D(a){let s=[[]];for(let l of a){if(l!=="--then"){s[s.length-1].push(l);continue}if(s[s.length-1].length===0)throw new p("do chain contains an empty action");s.push([])}if(s.length<2)throw new p("do chain needs at least two actions separated by --then");if(s[s.length-1].length===0)throw new p("do chain cannot end with --then");return s.flatMap((l,n)=>{let[d,...t]=l;if(!d)throw new p("do chain contains an empty action");if(!k.has(d))throw new p(`do chain action ${n+1} cannot batch ${JSON.stringify(d)}; run it as a separate rnx do command`);switch(d){case"tap":return t.length===1&&!Number.isFinite(Number(t[0]))?[{type:"tapId",id:t[0]}]:(t.length!==2&&o(n,"tap <testid> | <x> <y>"),[{type:"tap",x:r(t[0],n,"tap <testid> | <x> <y>"),y:r(t[1],n,"tap <testid> | <x> <y>")}]);case"tap-id":return t.length!==1&&o(n,"tap-id <id>"),[{type:"tapId",id:t[0]}];case"tap-text":{let e=t.join(" ");return e||o(n,"tap-text <text>"),[{type:"tapText",text:e}]}case"double-tap":{let e="double-tap <testid> [gapMs] | <x> <y> [gapMs]";return t.length>0&&!Number.isFinite(Number(t[0]))?(t.length>2&&o(n,e),[{type:"targetedDoubleTap",id:t[0],gapMs:t.length===2?Math.max(0,Math.round(r(t[1],n,e))):80}]):((t.length<2||t.length>3)&&o(n,e),[{type:"doubleTap",x:r(t[0],n,e),y:r(t[1],n,e),gapMs:t.length===3?Math.max(0,Math.round(r(t[2],n,e))):80}])}case"long-press":{let e="long-press <testid> [durationMs] | <x> <y> [durationMs]";return t.length>0&&!Number.isFinite(Number(t[0]))?(t.length>2&&o(n,e),[{type:"targetedLongPress",id:t[0],durationMs:t.length===2?Math.max(0,Math.round(r(t[1],n,e))):600}]):((t.length<2||t.length>3)&&o(n,e),[{type:"longPress",x:r(t[0],n,e),y:r(t[1],n,e),durationMs:t.length===3?Math.max(0,Math.round(r(t[2],n,e))):600}])}case"type":{let e=t.join(" ");return e||o(n,"type <text>"),[{type:"type",text:e}]}case"type-into":{let e=t.slice(1).join(" ");return(!t[0]||!e)&&o(n,"type-into <id> <text>"),[{type:"tapId",id:t[0]},{type:"type",text:e}]}case"key":return t.length!==1&&o(n,"key <name>"),[{type:"key",key:t[0]}];case"key-sequence":return t.length===0&&o(n,"key-sequence <key> [<key> ...]"),t.map(e=>({type:"key",key:e}));case"dismiss":return t.length!==0&&o(n,"dismiss"),[{type:"dismissKeyboard"}];case"scroll":{let e="scroll <id> <x> <y>";return t.length!==3&&o(n,e),[{type:"scroll",id:t[0],x:r(t[1],n,e),y:r(t[2],n,e),animated:!1}]}case"drag":case"swipe":{let e=`${d} <x1> <y1> <x2> <y2> [steps] [stepMs]`;(t.length<4||t.length>6)&&o(n,e);let i=d==="swipe"?10:12,y=d==="swipe"?8:16;return[{type:"drag",fromX:r(t[0],n,e),fromY:r(t[1],n,e),toX:r(t[2],n,e),toY:r(t[3],n,e),steps:t.length>=5?Math.max(1,Math.round(r(t[4],n,e))):i,stepMs:t.length===6?Math.max(0,Math.round(r(t[5],n,e))):y}]}case"pinch":{let e="pinch <x1> <y1> <x2> <y2> <x1'> <y1'> <x2'> <y2'> [steps] [stepMs]";return(t.length<8||t.length>10)&&o(n,e),[{type:"pinch",fromX1:r(t[0],n,e),fromY1:r(t[1],n,e),fromX2:r(t[2],n,e),fromY2:r(t[3],n,e),toX1:r(t[4],n,e),toY1:r(t[5],n,e),toX2:r(t[6],n,e),toY2:r(t[7],n,e),steps:t.length>=9?Math.max(1,Math.round(r(t[8],n,e))):12,stepMs:t.length===10?Math.max(0,Math.round(r(t[9],n,e))):16}]}case"touch":{let e="touch <down|move|up|cancel> <x> <y> [pointerId]";(t.length<3||t.length>4)&&o(n,e);let i=t[0];i!=="down"&&i!=="move"&&i!=="up"&&i!=="cancel"&&o(n,e);let y=t.length===4?Math.max(1,Math.round(r(t[3],n,e))):999;return i==="cancel"?[{type:"touchCancel",pointerId:y}]:[{type:i==="down"?"touchDown":i==="move"?"touchMove":"touchUp",x:r(t[1],n,e),y:r(t[2],n,e),pointerId:y}]}case"sleep":{let e="sleep [seconds]";t.length>1&&o(n,e);let i=t.length===1?r(t[0],n,e):.5;return i<0&&o(n,e),[{type:"wait",ms:Math.round(i*1e3)}]}default:throw new p(`do chain action ${n+1} cannot batch ${JSON.stringify(d)}`)}})}async function Y(a,s={}){let[l,n,d,t,e]=await Promise.all([import("./connect-LXWD3ILH.js"),import("./sim-client-MBY5YFOJ.js"),import("./ws-bridge-4WWOVU5V.js"),import("./env-37X232UA.js"),import("./resolve-target-YYCTSFNM.js")]),{connect:i}=l,{SimPerformError:y}=n,{checkSimHealth:M,parseBridgeCliArgs:S}=d,{isAgentEnv:$}=t,{resolveTargetCoords:x}=e,b=a.includes("--json"),I=a.includes("--no-wait")||process.env.SOOTSIM_NO_AUTO_WAIT==="1",m=S(a,{port:s.port,commandTimeoutMs:3e4,stripBooleanFlags:["--json","--no-wait"]});if(!Number.isFinite(m.commandTimeoutMs)||m.commandTimeoutMs<=0)return console.error(" do chain: --timeout must be a positive number"),1;let w;try{w=D(m.positional)}catch(u){return console.error(` do chain: ${u instanceof Error?u.message:u}`),1}let h=null;try{h=await i({port:m.wsPort,sim:m.simId,timeoutMs:m.commandTimeoutMs}),await M(h);let u=[];for(let c of w){if(c.type!=="targetedDoubleTap"&&c.type!=="targetedLongPress"){u.push(c);continue}let f=await x(h,{mode:"testid",value:c.id});if(!f)throw new p(`do chain could not find testID ${JSON.stringify(c.id)}`);u.push(c.type==="targetedDoubleTap"?{type:"doubleTap",x:f.x,y:f.y,gapMs:c.gapMs}:{type:"longPress",x:f.x,y:f.y,durationMs:c.durationMs})}let g=await h.perform(u,{timeoutMs:m.commandTimeoutMs});if(!I)try{let c=$()?400:200,f=await h.settle({maxMs:c});f.settled||process.stderr.write(` \u26A0 auto-wait timed out after ${f.elapsed??c}ms. next command may see mid-animation state. use \`rnx do settle\` for a longer wait.
4
+ import"./chunk-ZSSG7OR7.js";var p=class extends Error{constructor(s){super(s),this.name="BridgeInputError"}};var k=new Set(["tap","tap-id","tap-text","double-tap","long-press","type","type-into","key","key-sequence","dismiss","scroll","drag","swipe","pinch","touch","sleep"]);function O(a){return a.includes("--then")}function o(a,s){throw new p(`do chain action ${a+1} has invalid arguments; usage: rnx do ${s}`)}function r(a,s,l){let n=Number(a);return(a===void 0||!Number.isFinite(n))&&o(s,l),n}function D(a){let s=[[]];for(let l of a){if(l!=="--then"){s[s.length-1].push(l);continue}if(s[s.length-1].length===0)throw new p("do chain contains an empty action");s.push([])}if(s.length<2)throw new p("do chain needs at least two actions separated by --then");if(s[s.length-1].length===0)throw new p("do chain cannot end with --then");return s.flatMap((l,n)=>{let[d,...t]=l;if(!d)throw new p("do chain contains an empty action");if(!k.has(d))throw new p(`do chain action ${n+1} cannot batch ${JSON.stringify(d)}; run it as a separate rnx do command`);switch(d){case"tap":return t.length===1&&!Number.isFinite(Number(t[0]))?[{type:"tapId",id:t[0]}]:(t.length!==2&&o(n,"tap <testid> | <x> <y>"),[{type:"tap",x:r(t[0],n,"tap <testid> | <x> <y>"),y:r(t[1],n,"tap <testid> | <x> <y>")}]);case"tap-id":return t.length!==1&&o(n,"tap-id <id>"),[{type:"tapId",id:t[0]}];case"tap-text":{let e=t.join(" ");return e||o(n,"tap-text <text>"),[{type:"tapText",text:e}]}case"double-tap":{let e="double-tap <testid> [gapMs] | <x> <y> [gapMs]";return t.length>0&&!Number.isFinite(Number(t[0]))?(t.length>2&&o(n,e),[{type:"targetedDoubleTap",id:t[0],gapMs:t.length===2?Math.max(0,Math.round(r(t[1],n,e))):80}]):((t.length<2||t.length>3)&&o(n,e),[{type:"doubleTap",x:r(t[0],n,e),y:r(t[1],n,e),gapMs:t.length===3?Math.max(0,Math.round(r(t[2],n,e))):80}])}case"long-press":{let e="long-press <testid> [durationMs] | <x> <y> [durationMs]";return t.length>0&&!Number.isFinite(Number(t[0]))?(t.length>2&&o(n,e),[{type:"targetedLongPress",id:t[0],durationMs:t.length===2?Math.max(0,Math.round(r(t[1],n,e))):600}]):((t.length<2||t.length>3)&&o(n,e),[{type:"longPress",x:r(t[0],n,e),y:r(t[1],n,e),durationMs:t.length===3?Math.max(0,Math.round(r(t[2],n,e))):600}])}case"type":{let e=t.join(" ");return e||o(n,"type <text>"),[{type:"type",text:e}]}case"type-into":{let e=t.slice(1).join(" ");return(!t[0]||!e)&&o(n,"type-into <id> <text>"),[{type:"tapId",id:t[0]},{type:"type",text:e}]}case"key":return t.length!==1&&o(n,"key <name>"),[{type:"key",key:t[0]}];case"key-sequence":return t.length===0&&o(n,"key-sequence <key> [<key> ...]"),t.map(e=>({type:"key",key:e}));case"dismiss":return t.length!==0&&o(n,"dismiss"),[{type:"dismissKeyboard"}];case"scroll":{let e="scroll <id> <x> <y>";return t.length!==3&&o(n,e),[{type:"scroll",id:t[0],x:r(t[1],n,e),y:r(t[2],n,e),animated:!1}]}case"drag":case"swipe":{let e=`${d} <x1> <y1> <x2> <y2> [steps] [stepMs]`;(t.length<4||t.length>6)&&o(n,e);let i=d==="swipe"?10:12,y=d==="swipe"?8:16;return[{type:"drag",fromX:r(t[0],n,e),fromY:r(t[1],n,e),toX:r(t[2],n,e),toY:r(t[3],n,e),steps:t.length>=5?Math.max(1,Math.round(r(t[4],n,e))):i,stepMs:t.length===6?Math.max(0,Math.round(r(t[5],n,e))):y}]}case"pinch":{let e="pinch <x1> <y1> <x2> <y2> <x1'> <y1'> <x2'> <y2'> [steps] [stepMs]";return(t.length<8||t.length>10)&&o(n,e),[{type:"pinch",fromX1:r(t[0],n,e),fromY1:r(t[1],n,e),fromX2:r(t[2],n,e),fromY2:r(t[3],n,e),toX1:r(t[4],n,e),toY1:r(t[5],n,e),toX2:r(t[6],n,e),toY2:r(t[7],n,e),steps:t.length>=9?Math.max(1,Math.round(r(t[8],n,e))):12,stepMs:t.length===10?Math.max(0,Math.round(r(t[9],n,e))):16}]}case"touch":{let e="touch <down|move|up|cancel> <x> <y> [pointerId]";(t.length<3||t.length>4)&&o(n,e);let i=t[0];i!=="down"&&i!=="move"&&i!=="up"&&i!=="cancel"&&o(n,e);let y=t.length===4?Math.max(1,Math.round(r(t[3],n,e))):999;return i==="cancel"?[{type:"touchCancel",pointerId:y}]:[{type:i==="down"?"touchDown":i==="move"?"touchMove":"touchUp",x:r(t[1],n,e),y:r(t[2],n,e),pointerId:y}]}case"sleep":{let e="sleep [seconds]";t.length>1&&o(n,e);let i=t.length===1?r(t[0],n,e):.5;return i<0&&o(n,e),[{type:"wait",ms:Math.round(i*1e3)}]}default:throw new p(`do chain action ${n+1} cannot batch ${JSON.stringify(d)}`)}})}async function Y(a,s={}){let[l,n,d,t,e]=await Promise.all([import("./connect-3LEXWTE5.js"),import("./sim-client-5C2RDQQO.js"),import("./ws-bridge-OF4OZARG.js"),import("./env-KTNPKEZR.js"),import("./resolve-target-57TK5WLE.js")]),{connect:i}=l,{SimPerformError:y}=n,{checkSimHealth:M,parseBridgeCliArgs:S}=d,{isAgentEnv:$}=t,{resolveTargetCoords:x}=e,b=a.includes("--json"),I=a.includes("--no-wait")||process.env.SOOTSIM_NO_AUTO_WAIT==="1",m=S(a,{port:s.port,commandTimeoutMs:3e4,stripBooleanFlags:["--json","--no-wait"]});if(!Number.isFinite(m.commandTimeoutMs)||m.commandTimeoutMs<=0)return console.error(" do chain: --timeout must be a positive number"),1;let w;try{w=D(m.positional)}catch(u){return console.error(` do chain: ${u instanceof Error?u.message:u}`),1}let h=null;try{h=await i({port:m.wsPort,sim:m.simId,timeoutMs:m.commandTimeoutMs}),await M(h);let u=[];for(let c of w){if(c.type!=="targetedDoubleTap"&&c.type!=="targetedLongPress"){u.push(c);continue}let f=await x(h,{mode:"testid",value:c.id});if(!f)throw new p(`do chain could not find testID ${JSON.stringify(c.id)}`);u.push(c.type==="targetedDoubleTap"?{type:"doubleTap",x:f.x,y:f.y,gapMs:c.gapMs}:{type:"longPress",x:f.x,y:f.y,durationMs:c.durationMs})}let g=await h.perform(u,{timeoutMs:m.commandTimeoutMs});if(!I)try{let c=$()?400:200,f=await h.settle({maxMs:c});f.settled||process.stderr.write(` \u26A0 auto-wait timed out after ${f.elapsed??c}ms. next command may see mid-animation state. use \`rnx do settle\` for a longer wait.
5
5
  `)}catch{}return console.log(b?JSON.stringify(g):` completed ${g.completed} batched ${g.completed===1?"step":"steps"} in ${g.durationMs}ms`),0}catch(u){return u instanceof y&&b?console.log(JSON.stringify(u.result)):console.error(` do chain failed: ${u instanceof Error?u.message:u}`),1}finally{h?.close()}}export{O as hasDoChain,D as parseDoChainActions,Y as runDoChain};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.376 | (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-DPBJ3S3J.js";import{a,b,c,d,e,f,g}from"./chunk-UYVXALPB.js";import"./chunk-VWCNJPCJ.js";import"./chunk-DCS5FK5N.js";import"./chunk-DGX3MN65.js";import"./chunk-7R2TK2NY.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";export{c as ALL_DRIVERS,g as buildDriverListRows,a as electronDriver,d as getAllDrivers,e as getDriver,b as playwrightDriver,f as resolveDriver};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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}from"./chunk-VDCYIT2N.js";import"./chunk-RU565DEH.js";export{a as isAgentEnv};
4
+ import{a}from"./chunk-W3FNXAQP.js";import"./chunk-ZSSG7OR7.js";export{a as isAgentEnv};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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-KVMYAHND.js";import{t as x,v as A,z as b}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-UQXSAYWY.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";import{spawnSync as T}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
4
+ import{c as R,d as L}from"./chunk-NNRF7GIB.js";import{t as x,v as A,z as b}from"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-TH2UFGVP.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";import{spawnSync as T}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
5
5
  rnx film \u2014 record a flow flat, replay it on the 3d stage, save a clip
6
6
 
7
7
  usage:
@@ -35,7 +35,7 @@ examples:
35
35
  rnx film flows/swap.yaml --script hero-arc --background gradient-tide --out ~/Desktop/swap-3d.mp4
36
36
  rnx film flows/login.yaml --colorway deep-blue --environment on --env-shape pane --room on
37
37
  `),0;let s=e.find(d=>!d.startsWith("--")&&/\.ya?ml$/.test(d));if(!s||!V(I(s)))return console.error(` film: flow file not found: ${s??"(none given)"}`),1;let P=Number.parseInt(c(e,"--fps")??"30",10),h=c(e,"--script")??"hero-arc",z=e.includes("--keep-three"),v=s.replace(/^.*\//,"").replace(/\.ya?ml$/,""),O=c(e,"--out"),l=I(O??K(j(),"Desktop","sootsim-films",`${v}.webm`)),S=H(l).toLowerCase()===".mp4";if(S&&T("ffmpeg",["-version"]).status!==0)return console.error(" film: --out ends in .mp4 but ffmpeg is not installed"),console.error(" install ffmpeg or use a .webm output path"),1;let C=x(e,{port:a.port,stripValueFlags:[...X,...Q],stripBooleanFlags:J}),t=A({...C,commandTimeoutMs:6e4});try{let d=await r(t,`(() => { const s = window.SootSim?.bridges?.settings?.get?.() || {}
38
- return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(t,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let D=Date.now();await n(500);let{runFlowPlayback:G}=await import("./flow-74OQVMSN.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-4DZ7B2OA.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.376 | (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-R76BA7C7.js";import"./chunk-SK4M7NXT.js";import"./chunk-ZF7PVX44.js";import{a,b}from"./chunk-7VZZQQEE.js";import"./chunk-DEV3E3MV.js";import"./chunk-37MCSPTE.js";import"./chunk-CIE6CZXL.js";import"./chunk-UB2W6OQM.js";import"./chunk-JXAXYK7W.js";import"./chunk-SKMG5DD7.js";import"./chunk-KMNVDZZI.js";import"./chunk-YTXY3MHW.js";import"./chunk-4TQ5HOK3.js";import"./chunk-KJE2O2GK.js";import"./chunk-GDKMOIUT.js";import"./chunk-UYVXALPB.js";import"./chunk-VWCNJPCJ.js";import"./chunk-XUTJ7ZWD.js";import"./chunk-P6KVGV3H.js";import"./chunk-DCS5FK5N.js";import"./chunk-TZUABDIJ.js";import"./chunk-QELIC5XP.js";import"./chunk-CSJ7L7ZL.js";import"./chunk-DNPQMTW5.js";import"./chunk-TLP3T3VO.js";import"./chunk-FVZBGPCU.js";import"./chunk-GZE57ORL.js";import"./chunk-VQDYFFIG.js";import"./chunk-DOVBJBVD.js";import"./chunk-DGJMIVZM.js";import"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-LQMUA5IY.js";import"./chunk-TH2UFGVP.js";import"./chunk-HZLOYAPH.js";import"./chunk-AFOVILIL.js";import"./chunk-7R2TK2NY.js";import"./chunk-CE4JQJ6Y.js";import"./chunk-W3FNXAQP.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.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.376 | (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-LC3QRIRB.js";import"./chunk-MLBZZHOY.js";import"./chunk-VQDYFFIG.js";import"./chunk-TEESPOYR.js";import"./chunk-DOVBJBVD.js";import"./chunk-DGJMIVZM.js";import"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-AFOVILIL.js";import"./chunk-QRDF33WD.js";import"./chunk-XSVILA4Z.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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-4FYJOFJZ.js";import{b as n}from"./chunk-2QVA4PPE.js";import"./chunk-RU565DEH.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-HZLOYAPH.js";import{b as n}from"./chunk-AFOVILIL.js";import"./chunk-ZSSG7OR7.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.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGES_DIR,a as SOOTSIM_HOME_ENV,O as activeRuntimeDir,m as activeRuntimeFile,v as cacheDir,r as cameraFixturesDir,W as claimDaemonLockfile,z as configFilePath,K as consumeRuntimeUpgradeNotice,t as daemonAppBundlePath,s as daemonAppDir,u as daemonAppLauncherPath,w as daemonLockfilePath,y as devBridgeLockfilePath,x as devBridgesDir,n as electronDir,o as electronUserDataDir,p as electronVersionDir,L as ensureSootsimHome,R as isDaemonLockfileFresh,S as isDevBridgeLockfileFresh,i as isDevWorkstation,C as isOnboardingComplete,h as isSootsimDevCheckout,q as profilesDir,M as readActiveRuntime,P as readDaemonLockfile,Q as readDevBridgeLockfiles,T as readLiveRuntimeVersions,H as readOrCreateAnonymousId,F as readPrivacyPreferences,A as readSharedConfig,D as readSimulatorDriverPreference,X as removeDaemonLockfile,Y as removeDevBridgeLockfile,l as runtimeDir,I as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,N as writeActiveRuntime,U as writeDaemonLockfile,V as writeDevBridgeLockfile,E as writeOnboardingPreferences,G as writePrivacyPreferences,J as writeRuntimeUpgradeNotice,B as writeSharedConfig};
4
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGES_DIR,a as SOOTSIM_HOME_ENV,O as activeRuntimeDir,m as activeRuntimeFile,v as cacheDir,r as cameraFixturesDir,W as claimDaemonLockfile,z as configFilePath,K as consumeRuntimeUpgradeNotice,t as daemonAppBundlePath,s as daemonAppDir,u as daemonAppLauncherPath,w as daemonLockfilePath,y as devBridgeLockfilePath,x as devBridgesDir,n as electronDir,o as electronUserDataDir,p as electronVersionDir,L as ensureSootsimHome,R as isDaemonLockfileFresh,S as isDevBridgeLockfileFresh,i as isDevWorkstation,C as isOnboardingComplete,h as isSootsimDevCheckout,q as profilesDir,M as readActiveRuntime,P as readDaemonLockfile,Q as readDevBridgeLockfiles,T as readLiveRuntimeVersions,H as readOrCreateAnonymousId,F as readPrivacyPreferences,A as readSharedConfig,D as readSimulatorDriverPreference,X as removeDaemonLockfile,Y as removeDevBridgeLockfile,l as runtimeDir,I as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,N as writeActiveRuntime,U as writeDaemonLockfile,V as writeDevBridgeLockfile,E as writeOnboardingPreferences,G as writePrivacyPreferences,J as writeRuntimeUpgradeNotice,B as writeSharedConfig};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{g as a,h as b}from"./chunk-7VZZQQEE.js";import"./chunk-DEV3E3MV.js";import"./chunk-37MCSPTE.js";import"./chunk-CIE6CZXL.js";import"./chunk-KMNVDZZI.js";import"./chunk-YTXY3MHW.js";import"./chunk-4TQ5HOK3.js";import"./chunk-KJE2O2GK.js";import"./chunk-GDKMOIUT.js";import"./chunk-UYVXALPB.js";import"./chunk-VWCNJPCJ.js";import"./chunk-XUTJ7ZWD.js";import"./chunk-P6KVGV3H.js";import"./chunk-DCS5FK5N.js";import"./chunk-TZUABDIJ.js";import"./chunk-QELIC5XP.js";import"./chunk-CSJ7L7ZL.js";import"./chunk-DNPQMTW5.js";import"./chunk-TLP3T3VO.js";import"./chunk-FVZBGPCU.js";import"./chunk-GZE57ORL.js";import"./chunk-VQDYFFIG.js";import"./chunk-DOVBJBVD.js";import"./chunk-DGJMIVZM.js";import"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-LQMUA5IY.js";import"./chunk-TH2UFGVP.js";import"./chunk-HZLOYAPH.js";import"./chunk-AFOVILIL.js";import"./chunk-7R2TK2NY.js";import"./chunk-CE4JQJ6Y.js";import"./chunk-W3FNXAQP.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";export{a as printShellPerfReport,b as runInspect};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.376 | (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-H3U56DKI.js";import"./chunk-DCS5FK5N.js";import"./chunk-TH2UFGVP.js";import"./chunk-BEU7CD7E.js";import"./chunk-ZSSG7OR7.js";export{a as runInstallDesktop};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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 I}from"./chunk-RAYAIDJI.js";import{c as p}from"./chunk-UQXSAYWY.js";import"./chunk-GQVWJWCZ.js";import{a as w}from"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";import{exec as T}from"node:child_process";import{randomBytes as R}from"node:crypto";import L from"node:http";var O=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev";function _(t){return t||(process.env.SOOTSIM_AUTH_ORIGIN?process.env.SOOTSIM_AUTH_ORIGIN:process.env.SOOTSIM_UPLOAD_ORIGIN?process.env.SOOTSIM_UPLOAD_ORIGIN:O)}function P(){console.log(`
4
+ import{b as k,d as I}from"./chunk-SKMG5DD7.js";import{c as p}from"./chunk-TH2UFGVP.js";import"./chunk-QRDF33WD.js";import{a as w}from"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";import{exec as T}from"node:child_process";import{randomBytes as R}from"node:crypto";import L from"node:http";var O=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev";function _(t){return t||(process.env.SOOTSIM_AUTH_ORIGIN?process.env.SOOTSIM_AUTH_ORIGIN:process.env.SOOTSIM_UPLOAD_ORIGIN?process.env.SOOTSIM_UPLOAD_ORIGIN:O)}function P(){console.log(`
5
5
  rnx login \u2014 sign in so uploads can attach to your account
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as e,c as t}from"./chunk-RAYAIDJI.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";async function r(){let o=e();if(!o?.token){console.log(" not signed in");return}try{await fetch(`${o.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${o.token}`}})}catch{}t(),console.log(" signed out")}export{r as runLogout};
4
+ import{a as e,c as t}from"./chunk-SKMG5DD7.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";async function r(){let o=e();if(!o?.token){console.log(" not signed in");return}try{await fetch(`${o.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${o.token}`}})}catch{}t(),console.log(" signed out")}export{r as runLogout};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as E,d as O,g as L,h as R,i as U}from"./chunk-AEMLIV3G.js";import"./chunk-CBF7RQ3C.js";import"./chunk-MU77ZSME.js";import{a as A}from"./chunk-HCORKEG6.js";import"./chunk-R7NXLMFI.js";import"./chunk-GH7XDCAP.js";import{a as S}from"./chunk-MHVH5IJU.js";import{b as $,c as F,d as M,e as T}from"./chunk-R3HLZSGB.js";import{a as k}from"./chunk-6VPR6OTH.js";import"./chunk-RAYAIDJI.js";import"./chunk-G2IBWLBT.js";import"./chunk-QKYOZQKE.js";import"./chunk-L6VQSQ5O.js";import"./chunk-IXYE6F2D.js";import"./chunk-XSWS6HY6.js";import"./chunk-UHTIDDI2.js";import"./chunk-KWUKKULB.js";import"./chunk-WR6QFC62.js";import"./chunk-VSGEEW3N.js";import"./chunk-HM5TGIVN.js";import"./chunk-2XDNHF7N.js";import"./chunk-2W6ADNTG.js";import"./chunk-4S5CIP7Y.js";import"./chunk-KOSLTZXQ.js";import"./chunk-RE2IODEB.js";import"./chunk-PVGD4KKG.js";import"./chunk-VKOEADVP.js";import"./chunk-2MI2ROT4.js";import"./chunk-7DLC2M6S.js";import"./chunk-PYH2MNFB.js";import"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-I2C26UZ3.js";import"./chunk-UQXSAYWY.js";import"./chunk-4FYJOFJZ.js";import"./chunk-2QVA4PPE.js";import"./chunk-XSXSVO4P.js";import"./chunk-ZAUPKGQP.js";import"./chunk-VDCYIT2N.js";import"./chunk-GQVWJWCZ.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";import*as n from"fs";import*as a from"path";var I=[".maestro","maestro"];function W(){console.log(`
4
+ import{c as E,d as O,g as L,h as R,i as U}from"./chunk-R76BA7C7.js";import"./chunk-SK4M7NXT.js";import"./chunk-ZF7PVX44.js";import{a as A}from"./chunk-7VZZQQEE.js";import"./chunk-DEV3E3MV.js";import"./chunk-37MCSPTE.js";import{a as S}from"./chunk-CIE6CZXL.js";import{b as $,c as F,d as M,e as T}from"./chunk-UB2W6OQM.js";import{a as k}from"./chunk-JXAXYK7W.js";import"./chunk-SKMG5DD7.js";import"./chunk-KMNVDZZI.js";import"./chunk-YTXY3MHW.js";import"./chunk-4TQ5HOK3.js";import"./chunk-KJE2O2GK.js";import"./chunk-GDKMOIUT.js";import"./chunk-UYVXALPB.js";import"./chunk-VWCNJPCJ.js";import"./chunk-XUTJ7ZWD.js";import"./chunk-P6KVGV3H.js";import"./chunk-DCS5FK5N.js";import"./chunk-TZUABDIJ.js";import"./chunk-QELIC5XP.js";import"./chunk-CSJ7L7ZL.js";import"./chunk-DNPQMTW5.js";import"./chunk-TLP3T3VO.js";import"./chunk-FVZBGPCU.js";import"./chunk-GZE57ORL.js";import"./chunk-VQDYFFIG.js";import"./chunk-DOVBJBVD.js";import"./chunk-DGJMIVZM.js";import"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-LQMUA5IY.js";import"./chunk-TH2UFGVP.js";import"./chunk-HZLOYAPH.js";import"./chunk-AFOVILIL.js";import"./chunk-7R2TK2NY.js";import"./chunk-CE4JQJ6Y.js";import"./chunk-W3FNXAQP.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";import*as n from"fs";import*as a from"path";var I=[".maestro","maestro"];function W(){console.log(`
5
5
  rnx maestro \u2014 author and run Maestro YAML flows against rnx
6
6
 
7
7
  usage:
@@ -95,7 +95,7 @@ appId: com.example.app
95
95
  - inputText: "secret123"
96
96
  - tapOn: "Sign in"
97
97
  - assertVisible: "Welcome"
98
- `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: rnx maestro test .maestro/login.yaml"),0)}async function Q(r,s={}){if(r.includes("--help")||r.includes("-h"))return W(),0;if(r.includes("--list-compat"))return D(),0;let e;try{e=N(r)}catch(o){return console.error(` error: ${o.message}`),1}e=R(e);let t=process.cwd(),i=e[0];if(i==="init")return _(t);if(i==="generate"){let{runMaestroGenerate:o}=await import("./maestro-generate-6MSPC66O.js");return o(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return U(e);e=J(e);let c=null,f;if(i==="test"){let o=e.slice(1).find(u=>!j(u));o?(c=a.resolve(t,o),f=e.slice(1).filter(u=>u!==o)):(c=P(t),f=e.slice(1))}else i&&!j(i)?(c=a.resolve(t,i),f=e.slice(1)):(c=P(t),f=e);if(!c)return console.error(`
98
+ `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: rnx maestro test .maestro/login.yaml"),0)}async function Q(r,s={}){if(r.includes("--help")||r.includes("-h"))return W(),0;if(r.includes("--list-compat"))return D(),0;let e;try{e=N(r)}catch(o){return console.error(` error: ${o.message}`),1}e=R(e);let t=process.cwd(),i=e[0];if(i==="init")return _(t);if(i==="generate"){let{runMaestroGenerate:o}=await import("./maestro-generate-VBLM3MTU.js");return o(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return U(e);e=J(e);let c=null,f;if(i==="test"){let o=e.slice(1).find(u=>!j(u));o?(c=a.resolve(t,o),f=e.slice(1).filter(u=>u!==o)):(c=P(t),f=e.slice(1))}else i&&!j(i)?(c=a.resolve(t,i),f=e.slice(1)):(c=P(t),f=e);if(!c)return console.error(`
99
99
  error: no maestro flows found.
100
100
  expected one of: ${I.map(o=>`./${o}/`).join(", ")}
101
101
  or pass a flow explicitly: rnx maestro test path/to/flow.yaml
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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-MHVH5IJU.js";import{b as A,d as E,e as O}from"./chunk-R3HLZSGB.js";import{a as S,b as T}from"./chunk-6VPR6OTH.js";import"./chunk-RAYAIDJI.js";import"./chunk-WR6QFC62.js";import"./chunk-VSGEEW3N.js";import{h as v}from"./chunk-4S5CIP7Y.js";import"./chunk-RE2IODEB.js";import"./chunk-VKOEADVP.js";import{t as y,v as b}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-UQXSAYWY.js";import"./chunk-GQVWJWCZ.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";import{mkdtempSync as B,writeFileSync as C}from"fs";import{tmpdir as N}from"os";import{join as _}from"path";var j=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",P=18e3,V=18e4;function f(e,t){let r=e.indexOf(t);return r>=0?e[r+1]:void 0}function J(e,t){for(let r of t){let o=f(e,r);if(o)return o}}var M=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(M.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:[...M]}),i=b(o);try{let n=await v(i,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),s=[typeof n.nodeCount=="number"?`nodes: ${n.nodeCount}`:"",n.tree||""].filter(Boolean).join(`
4
+ import{a as x}from"./chunk-CIE6CZXL.js";import{b as A,d as E,e as O}from"./chunk-UB2W6OQM.js";import{a as S,b as T}from"./chunk-JXAXYK7W.js";import"./chunk-SKMG5DD7.js";import"./chunk-XUTJ7ZWD.js";import"./chunk-P6KVGV3H.js";import{h as v}from"./chunk-CSJ7L7ZL.js";import"./chunk-TLP3T3VO.js";import"./chunk-GZE57ORL.js";import{t as y,v as b}from"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-TH2UFGVP.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";import{mkdtempSync as B,writeFileSync as C}from"fs";import{tmpdir as N}from"os";import{join as _}from"path";var j=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",P=18e3,V=18e4;function f(e,t){let r=e.indexOf(t);return r>=0?e[r+1]:void 0}function J(e,t){for(let r of t){let o=f(e,r);if(o)return o}}var M=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(M.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:[...M]}),i=b(o);try{let n=await v(i,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),s=[typeof n.nodeCount=="number"?`nodes: ${n.nodeCount}`:"",n.tree||""].filter(Boolean).join(`
5
5
  `);return s.length>P?s.slice(0,P)+`
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(V)});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 F(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function q(e){let t=W(e);if(!F(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(!F(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 O(J(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(_(N(),"sootsim-maestro-generate-")),p=_(u,"flow.yaml");C(p,l.yamlText),console.log(` flow: ${p}`);let k=Date.now(),{runFlowPlayback:I,getLastFlowPreviewUploadResult:D,getLastFlowTraceSteps:L}=await import("./flow-74OQVMSN.js"),$=Q(e,o,p,c),w=await I($),m=D(),h=L(),R=h.find(U=>U.status==="failure"),g=w===0?"passed":"failed",d=await E({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()-k,flowYamlSizeBytes:Buffer.byteLength(l.yamlText,"utf8"),...A(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 F(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function q(e){let t=W(e);if(!F(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(!F(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 O(J(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(_(N(),"sootsim-maestro-generate-")),p=_(u,"flow.yaml");C(p,l.yamlText),console.log(` flow: ${p}`);let k=Date.now(),{runFlowPlayback:I,getLastFlowPreviewUploadResult:D,getLastFlowTraceSteps:L}=await import("./flow-4DZ7B2OA.js"),$=Q(e,o,p,c),w=await I($),m=D(),h=L(),R=h.find(U=>U.status==="failure"),g=w===0?"passed":"failed",d=await E({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()-k,flowYamlSizeBytes:Buffer.byteLength(l.yamlText,"utf8"),...A(h),auth:i});return console.log(`
36
36
  result: ${g}`),d&&console.log(` run: ${d.id}`),m?.previewUrl&&console.log(` preview: ${m.previewUrl}`),d?.traceUrl&&console.log(` replay: ${d.traceUrl}`),w}export{le as runMaestroGenerate};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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 s,b as i}from"./chunk-KVMYAHND.js";import"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import{c as t}from"./chunk-UQXSAYWY.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";async function l(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
4
+ import{a as s,b as i}from"./chunk-NNRF7GIB.js";import"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import{c as t}from"./chunk-TH2UFGVP.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";async function l(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
5
5
  rnx mode screenshot \u2014 toggle the screenshot-mode chrome overlay
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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-RE2IODEB.js";import"./chunk-RU565DEH.js";export{d as __withOptionalDemoAppsForTests,a as findInternalDemoRegistry,b as loadOptionalDemoApps,c as optionalDemoAppsSync};
4
+ import{a,b,c,d}from"./chunk-TLP3T3VO.js";import"./chunk-ZSSG7OR7.js";export{d as __withOptionalDemoAppsForTests,a as findInternalDemoRegistry,b as loadOptionalDemoApps,c as optionalDemoAppsSync};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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{h as N}from"./chunk-HCORKEG6.js";import"./chunk-R7NXLMFI.js";import"./chunk-GH7XDCAP.js";import"./chunk-MHVH5IJU.js";import"./chunk-G2IBWLBT.js";import"./chunk-QKYOZQKE.js";import"./chunk-L6VQSQ5O.js";import"./chunk-IXYE6F2D.js";import"./chunk-XSWS6HY6.js";import"./chunk-UHTIDDI2.js";import"./chunk-KWUKKULB.js";import"./chunk-WR6QFC62.js";import"./chunk-VSGEEW3N.js";import"./chunk-HM5TGIVN.js";import"./chunk-2XDNHF7N.js";import"./chunk-2W6ADNTG.js";import"./chunk-4S5CIP7Y.js";import"./chunk-KOSLTZXQ.js";import"./chunk-RE2IODEB.js";import"./chunk-PVGD4KKG.js";import"./chunk-VKOEADVP.js";import"./chunk-2MI2ROT4.js";import"./chunk-7DLC2M6S.js";import"./chunk-PYH2MNFB.js";import{t as P,v as R,y as d,z as x}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-I2C26UZ3.js";import"./chunk-UQXSAYWY.js";import"./chunk-4FYJOFJZ.js";import"./chunk-2QVA4PPE.js";import"./chunk-XSXSVO4P.js";import"./chunk-ZAUPKGQP.js";import"./chunk-VDCYIT2N.js";import"./chunk-GQVWJWCZ.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";import{mkdirSync as D,writeFileSync as W}from"fs";import{dirname as A,resolve as J}from"path";import{WebSocket as B}from"ws";var C=e=>new Promise(o=>setTimeout(o,e)),S=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(o){this.ws=new B(o,{maxPayload:1<<28}),this.ready=new Promise((r,n)=>{this.ws.once("open",()=>r()),this.ws.once("error",n)}),this.ws.on("message",r=>{let n=JSON.parse(r.toString());if(n.id&&this.pending.has(n.id)){let{res:t,rej:s}=this.pending.get(n.id);this.pending.delete(n.id),n.error?s(new Error(JSON.stringify(n.error))):t(n.result)}else if(n.method)for(let t of this.listeners)t(n.method,n.params)})}waitOpen(){return this.ready}on(o){this.listeners.add(o)}send(o,r={},n){let t=this.nextId++;return new Promise((s,a)=>{this.pending.set(t,{res:s,rej:a}),this.ws.send(JSON.stringify({id:t,method:o,params:r,...n?{sessionId:n}:{}}))})}close(){try{this.ws.close()}catch{}}};async function O(e,o){let r=Number(h(e,"--duration")??"5");if(!Number.isFinite(r)||r<=0)return console.error(" --duration must be a positive number (seconds)"),1;let n=Number(h(e,"--sample-interval")??"0.1"),t=Number(h(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=h(e,"--match")??"/rn/",a=h(e,"--output")??h(e,"-o"),i=J(process.cwd(),a??"/tmp/sootsim.cpuprofile"),l=[];try{l=await(await fetch(`http://localhost:${t}/json/list`)).json()}catch{return E(t),1}let f=l.find(m=>m.type==="page"&&m.url.includes(s));if(!f)return console.error(` no page target matching "${s}" on CDP :${t}`),console.error(` open targets: ${l.map(m=>m.url).join(", ")||"(none)"}`),1;let u=new S(f.webSocketDebuggerUrl);await u.waitOpen();try{let m=new Map;if(u.on((c,p)=>{c==="Target.attachedToTarget"&&p.targetInfo?.type==="worker"&&m.set(p.sessionId,p.targetInfo.url),c==="Target.detachedFromTarget"&&m.delete(p.sessionId)}),await u.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await C(500),m.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let c of m.keys())await u.send("Profiler.enable",{},c),await u.send("Profiler.setSamplingInterval",{interval:n*1e3},c),await u.send("Profiler.start",{},c);console.log(` recording ${r}s across ${m.size} worker(s) \u2014 interact now\u2026`),await C(r*1e3);let b=[];for(let[c,p]of m){let{profile:y}=await u.send("Profiler.stop",{},c);b.push({url:p,profile:y})}return b.sort((c,p)=>p.profile.samples.length-c.profile.samples.length),D(A(i),{recursive:!0}),b.forEach((c,p)=>{let y=p===0?i:i.replace(/(\.[^.]+)?$/,`.worker${p}$1`);if(W(y,JSON.stringify(c.profile)),console.log(` ${v(c.url)}: ${c.profile.samples.length} samples \u2192 ${y}`),o.verbose&&c.profile.samples.length>0)for(let $ of U(c.profile,12))console.log(` ${$.pct.toFixed(1).padStart(5)}% ${$.name} ${$.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{u.close()}}function E(e){console.error(` perf cpu needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` rnx open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` rnx perf cpu --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox \\"),console.error(" --use-gl=angle --use-angle=metal \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function v(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function U(e,o){let r=e.samples.length||1,n=new Map;for(let t of e.nodes){let s=t.callFrame,a=`${s.functionName||"(anonymous)"}@${v(s.url)}:${s.lineNumber}`,i=n.get(a)??{self:0,name:s.functionName||"(anonymous)",url:`${v(s.url)}:${s.lineNumber}`};i.self+=t.hitCount??0,n.set(a,i)}return[...n.values()].map(t=>({...t,pct:t.self/r*100})).sort((t,s)=>s.self-t.self).slice(0,o)}function h(e,o){let r=e.indexOf(o);if(!(r<0||r===e.length-1))return e[r+1]}function j(){console.log(`
4
+ import{h as N}from"./chunk-7VZZQQEE.js";import"./chunk-DEV3E3MV.js";import"./chunk-37MCSPTE.js";import"./chunk-CIE6CZXL.js";import"./chunk-KMNVDZZI.js";import"./chunk-YTXY3MHW.js";import"./chunk-4TQ5HOK3.js";import"./chunk-KJE2O2GK.js";import"./chunk-GDKMOIUT.js";import"./chunk-UYVXALPB.js";import"./chunk-VWCNJPCJ.js";import"./chunk-XUTJ7ZWD.js";import"./chunk-P6KVGV3H.js";import"./chunk-DCS5FK5N.js";import"./chunk-TZUABDIJ.js";import"./chunk-QELIC5XP.js";import"./chunk-CSJ7L7ZL.js";import"./chunk-DNPQMTW5.js";import"./chunk-TLP3T3VO.js";import"./chunk-FVZBGPCU.js";import"./chunk-GZE57ORL.js";import"./chunk-VQDYFFIG.js";import"./chunk-DOVBJBVD.js";import"./chunk-DGJMIVZM.js";import{t as P,v as R,y as d,z as x}from"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-LQMUA5IY.js";import"./chunk-TH2UFGVP.js";import"./chunk-HZLOYAPH.js";import"./chunk-AFOVILIL.js";import"./chunk-7R2TK2NY.js";import"./chunk-CE4JQJ6Y.js";import"./chunk-W3FNXAQP.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";import{mkdirSync as D,writeFileSync as W}from"fs";import{dirname as A,resolve as J}from"path";import{WebSocket as B}from"ws";var C=e=>new Promise(o=>setTimeout(o,e)),S=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(o){this.ws=new B(o,{maxPayload:1<<28}),this.ready=new Promise((r,n)=>{this.ws.once("open",()=>r()),this.ws.once("error",n)}),this.ws.on("message",r=>{let n=JSON.parse(r.toString());if(n.id&&this.pending.has(n.id)){let{res:t,rej:s}=this.pending.get(n.id);this.pending.delete(n.id),n.error?s(new Error(JSON.stringify(n.error))):t(n.result)}else if(n.method)for(let t of this.listeners)t(n.method,n.params)})}waitOpen(){return this.ready}on(o){this.listeners.add(o)}send(o,r={},n){let t=this.nextId++;return new Promise((s,a)=>{this.pending.set(t,{res:s,rej:a}),this.ws.send(JSON.stringify({id:t,method:o,params:r,...n?{sessionId:n}:{}}))})}close(){try{this.ws.close()}catch{}}};async function O(e,o){let r=Number(h(e,"--duration")??"5");if(!Number.isFinite(r)||r<=0)return console.error(" --duration must be a positive number (seconds)"),1;let n=Number(h(e,"--sample-interval")??"0.1"),t=Number(h(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=h(e,"--match")??"/rn/",a=h(e,"--output")??h(e,"-o"),i=J(process.cwd(),a??"/tmp/sootsim.cpuprofile"),l=[];try{l=await(await fetch(`http://localhost:${t}/json/list`)).json()}catch{return E(t),1}let f=l.find(m=>m.type==="page"&&m.url.includes(s));if(!f)return console.error(` no page target matching "${s}" on CDP :${t}`),console.error(` open targets: ${l.map(m=>m.url).join(", ")||"(none)"}`),1;let u=new S(f.webSocketDebuggerUrl);await u.waitOpen();try{let m=new Map;if(u.on((c,p)=>{c==="Target.attachedToTarget"&&p.targetInfo?.type==="worker"&&m.set(p.sessionId,p.targetInfo.url),c==="Target.detachedFromTarget"&&m.delete(p.sessionId)}),await u.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await C(500),m.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let c of m.keys())await u.send("Profiler.enable",{},c),await u.send("Profiler.setSamplingInterval",{interval:n*1e3},c),await u.send("Profiler.start",{},c);console.log(` recording ${r}s across ${m.size} worker(s) \u2014 interact now\u2026`),await C(r*1e3);let b=[];for(let[c,p]of m){let{profile:y}=await u.send("Profiler.stop",{},c);b.push({url:p,profile:y})}return b.sort((c,p)=>p.profile.samples.length-c.profile.samples.length),D(A(i),{recursive:!0}),b.forEach((c,p)=>{let y=p===0?i:i.replace(/(\.[^.]+)?$/,`.worker${p}$1`);if(W(y,JSON.stringify(c.profile)),console.log(` ${v(c.url)}: ${c.profile.samples.length} samples \u2192 ${y}`),o.verbose&&c.profile.samples.length>0)for(let $ of U(c.profile,12))console.log(` ${$.pct.toFixed(1).padStart(5)}% ${$.name} ${$.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{u.close()}}function E(e){console.error(` perf cpu needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` rnx open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` rnx perf cpu --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox \\"),console.error(" --use-gl=angle --use-angle=metal \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function v(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function U(e,o){let r=e.samples.length||1,n=new Map;for(let t of e.nodes){let s=t.callFrame,a=`${s.functionName||"(anonymous)"}@${v(s.url)}:${s.lineNumber}`,i=n.get(a)??{self:0,name:s.functionName||"(anonymous)",url:`${v(s.url)}:${s.lineNumber}`};i.self+=t.hitCount??0,n.set(a,i)}return[...n.values()].map(t=>({...t,pct:t.self/r*100})).sort((t,s)=>s.self-t.self).slice(0,o)}function h(e,o){let r=e.indexOf(o);if(!(r<0||r===e.length-1))return e[r+1]}function j(){console.log(`
5
5
  rnx perf react \u2014 inspect React component render cost in the tenant worker
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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{t as h,v as w,y as m,z as u}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.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(`
4
+ import{t as h,v as w,y as m,z as u}from"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.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
5
  rnx permissions \u2014 inspect and change simulated operating-system permissions
6
6
 
7
7
  usage:
@@ -1,6 +1,6 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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-XSWS6HY6.js";import{a as d}from"./chunk-KOSLTZXQ.js";import"./chunk-7DLC2M6S.js";import{b as m,c as s,e as u,f as t}from"./chunk-PYH2MNFB.js";import{a as o}from"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";var l={ios:"iOS",android:"Android"};function f(e){return e in m}async function M(e,r,a={}){let n=r.find((i,c)=>r[c-1]==="--device");if(n!==void 0){if(!f(n))return console.error(` ${o.commandName} ${e}: unknown device "${n}"
4
+ import"./chunk-GDKMOIUT.js";import{a as d}from"./chunk-DNPQMTW5.js";import"./chunk-DOVBJBVD.js";import{b as m,c as s,e as u,f as t}from"./chunk-DGJMIVZM.js";import{a as o}from"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";var l={ios:"iOS",android:"Android"};function f(e){return e in m}async function M(e,r,a={}){let n=r.find((i,c)=>r[c-1]==="--device");if(n!==void 0){if(!f(n))return console.error(` ${o.commandName} ${e}: unknown device "${n}"
5
5
  run \`${o.commandName} device list\` to see valid models`),1;let i=t(n);if(i!==e)return console.error(` ${o.commandName} ${e}: --device ${n} is ${l[i]}, not ${l[e]}.
6
- pick one of: ${u().filter(c=>t(c)===e).join(", ")}`),1}else{let i=d.get("deviceModel");t(i)!==e&&d.apply({deviceModel:s[e]})}let{runOpenCommand:v}=await import("./control-LBL5A6WE.js");return v(r,{port:a.port})}export{M as runPlatformCommand};
6
+ pick one of: ${u().filter(c=>t(c)===e).join(", ")}`),1}else{let i=d.get("deviceModel");t(i)!==e&&d.apply({deviceModel:s[e]})}let{runOpenCommand:v}=await import("./control-Z3FWA6BO.js");return v(r,{port:a.port})}export{M as runPlatformCommand};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.376 | (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-7LGK5XU6.js";import"./chunk-BEU7CD7E.js";import"./chunk-W3FNXAQP.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";export{a as canPromptForPrivacyChoice,b as diagnosticsAllowedForCurrentProcess,c as ensurePrivacyChoice};
@@ -1,12 +1,12 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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 D}from"./chunk-MU77ZSME.js";import{a as re}from"./chunk-R3HLZSGB.js";import{a as ee,c as oe}from"./chunk-6VPR6OTH.js";import"./chunk-RAYAIDJI.js";import{d as Z}from"./chunk-WR6QFC62.js";import"./chunk-VSGEEW3N.js";import"./chunk-RE2IODEB.js";import"./chunk-VKOEADVP.js";import{e as Q,t as y,v as S,w as Y}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import{c as i}from"./chunk-UQXSAYWY.js";import"./chunk-GQVWJWCZ.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";import{existsSync as be,mkdirSync as B,readdirSync as ve,readFileSync as ye,rmSync as V,writeFileSync as F}from"fs";import{homedir as Se,tmpdir as $e}from"os";import{dirname as J,extname as ne,join as A,resolve as Re}from"path";var L=24e4,_e=9e4,ke=3e4;async function z(e,r,o,s){let n=Math.max(2e4,s+ke);try{return await e.send({type:"evaluate",code:r},{timeoutMs:n})}catch(t){let a=t instanceof Error?t.message:String(t);/^command timed out after \d+s$/.test(a)&&(console.error(` ${o} stalled \u2014 the render host did not finish within ${Math.round(n/1e3)}s; it is likely contended or wedged.
4
+ import{a as D}from"./chunk-ZF7PVX44.js";import{a as re}from"./chunk-UB2W6OQM.js";import{a as ee,c as oe}from"./chunk-JXAXYK7W.js";import"./chunk-SKMG5DD7.js";import{d as Z}from"./chunk-XUTJ7ZWD.js";import"./chunk-P6KVGV3H.js";import"./chunk-TLP3T3VO.js";import"./chunk-GZE57ORL.js";import{e as Q,t as y,v as S,w as Y}from"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import{c as i}from"./chunk-TH2UFGVP.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";import{existsSync as be,mkdirSync as B,readdirSync as ve,readFileSync as ye,rmSync as V,writeFileSync as F}from"fs";import{homedir as Se,tmpdir as $e}from"os";import{dirname as J,extname as ne,join as A,resolve as Re}from"path";var L=24e4,_e=9e4,ke=3e4;async function z(e,r,o,s){let n=Math.max(2e4,s+ke);try{return await e.send({type:"evaluate",code:r},{timeoutMs:n})}catch(t){let a=t instanceof Error?t.message:String(t);/^command timed out after \d+s$/.test(a)&&(console.error(` ${o} stalled \u2014 the render host did not finish within ${Math.round(n/1e3)}s; it is likely contended or wedged.
5
5
  the capture lock auto-releases, so simply retry the recording.
6
6
  if it persists, recover the sim with \`rnx close --sim <id>\`.`),i(1)),/render host not available|already streaming|already recording|lock already held/i.test(a)&&(console.error(` ${o} failed: ${a}
7
7
  a prior recording was abandoned and its capture is still
8
8
  releasing. the lock self-heals in ~${Math.round((s+2e4)/1e3)}s \u2014 retry then, or recover now with
9
- \`rnx close --sim <id>\` and reopen the sim.`),i(1)),console.error(` ${o} failed: ${a}`),i(1)}}var xe=new Set(["--sim","--port","-p","--mode","--duration","--fps","--format","--output","-o","--frames","--max-width","--origin","--owner","--repo"]),Oe=new Set(["start","stop","cancel","status","prelude-start","upload"]);function Me(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){xe.has(o)&&r++;continue}return Oe.has(o)?{name:o,index:r}:null}return null}function te(e){let r=m(e,"--owner")?.trim(),o=m(e,"--repo")?.trim();return(r&&!o||!r&&o)&&(console.error(" --owner and --repo must be provided together"),i(1)),r&&o?{owner:r,repo:o}:null}async function Xe(e,r){let o=Me(e);if(o){let c=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await Ie(c,r);return}if(o.name==="prelude-start"){await Fe(c,r);return}if(o.name==="upload"){let{runUpload:$}=await import("./upload-DUKPPETT.js");await $(c,r);return}if(o.name==="stop"){await We(c,r);return}if(o.name==="cancel"){await Pe(c,r);return}await Ne(c,r);return}let s=y(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only","--open","--lockstep"],stripValueFlags:["--mode","--duration","--fps","--format","--output","--frames","--max-width","--origin","--owner","--repo"]}),n=ae(m(e,"--mode")),t=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,a=m(e,"--format");a&&!["webm","mp4","gif","png"].includes(a)&&(console.error(` invalid --format "${a}" \u2014 expected webm | mp4 | gif | png`),i(1));let l=m(e,"--output"),d=Number(m(e,"--duration")??"10");(!Number.isFinite(d)||d<=0)&&(console.error(` invalid --duration "${m(e,"--duration")}" \u2014 expected a positive number of seconds`),i(1));let u=600;d>u&&(console.error(` invalid --duration "${m(e,"--duration")}" \u2014 exceeds the ${u}s (10m) maximum`),i(1));let f=Number(m(e,"--fps")??"30"),p=m(e,"--frames");if(p!==void 0){let c=Number(p);(!Number.isInteger(c)||c<=0)&&(console.error(` invalid --frames "${p}" \u2014 expected a positive integer count`),i(1))}let x=e.includes("--open"),O=m(e,"--max-width")?Number(m(e,"--max-width")):void 0;e.includes("--lockstep")&&(console.error(" --lockstep works with `record start` / `record stop` (stateful mode) \u2014 atomic --duration is wall-clock and cannot bound a virtual-time capture"),i(1));let h=Math.max(100,Math.round(d*1e3)),X=m(e,"--origin"),ge=te(e);if(n==="live"||n==="combined"){l&&console.log(` note: --output is ignored for --mode ${n} \u2014 the recording uploads to /preview/<id>`),t&&n==="live"&&console.log(` note: --${t==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await D("record",{originOverride:X,allowGitHubAuth:!0});let c=S({...s,commandTimeoutMs:6e4});try{await K(c),await ce(c,n),n==="combined"&&await U(c),await le(c,X,ge);let $=await ue(c,n,n==="combined"?t:void 0);$.ok||(console.error(` start failed: recording store refused to start (${n})`+($.error?`: ${$.error}`:"")),i(1)),console.log(` recording ${n} for ${d}s`),await new Promise(g=>setTimeout(g,h)),await me(c);let M=await fe(c);pe(M,x,n)}finally{c.close()}return}let N=p?Number(p):null,_=Ue(a,l,N);x&&console.log(" note: --open is ignored for local-file capture \u2014 it applies to --mode live/combined");let v=S({...s,commandTimeoutMs:6e4});try{if(await ie(v),await U(v),_==="png"){let k=N??10,b=I(l,`sootsim-frames-${T()}`);l&&ne(l)&&console.log(` note: --frames writes multiple pngs, so --output "${l}" is a directory \u2014 frame-NNN.png files land inside it`),B(b,{recursive:!0});for(let w of ve(b))/^frame-\d+\.png$/.test(w)&&V(A(b,w),{force:!0});console.log(` sampling ${k} frames over ${d}s \u2192 ${b}`);let R=await v.send({type:"evaluate",code:`window.__sootsimRecorder.startFrameCapture({ count: ${k}, durationMs: ${h}${t?`, layers: ${JSON.stringify(t)}`:""} })`});(!R.ok||!R.requestId)&&(console.error(` frame capture start failed: ${R.error??"unknown error"}`),i(1)),await new Promise(w=>setTimeout(w,h));let we=Date.now()+Math.max(5e3,h),P=null;for(;;){let w=await v.send({type:"evaluate",code:`window.__sootsimRecorder.getFrameCaptureResult(${R.requestId})`});if(w||(console.error(" frame capture result missing"),i(1)),w.done){w.ok||(console.error(` frame capture failed: ${w.error??"unknown error"}`),i(1)),P=w.frames??[];break}Date.now()>=we&&(console.error(" frame capture timed out"),i(1)),await new Promise(W=>setTimeout(W,100))}P.forEach((w,W)=>{let he=`${b}/frame-${String(W+1).padStart(3,"0")}.png`;F(he,Buffer.from(w.data,"base64"))}),console.log(` saved ${P.length} frames`);return}if(_==="gif"){let k=N??Math.max(10,Math.round(d*f/3)),b=I(l,`sootsim-${T()}.gif`);B(J(b),{recursive:!0}),console.log(` encoding gif: ${k} frames over ${d}s \u2192 ${b}`);let R=await z(v,`window.__sootsimRecorder.captureGif({ frames: ${k}, durationMs: ${h}${O?`, maxWidth: ${O}`:""}${t?`, layers: ${JSON.stringify(t)}`:""} })`,"gif encode",h);R||(console.error(" gif capture returned no frames"),i(1)),F(b,Buffer.from(R.data,"base64")),console.log(` saved: ${b} (${q(R.size)})`);return}let c=I(l,`sootsim-${T()}.${_}`);B(J(c),{recursive:!0});let $={format:_,fps:f,durationMs:h};t&&($.layers=t);let M=await z(v,`window.__sootsimRecorder.start(${JSON.stringify($)})`,`${_} start`,h);M.ok||(console.error(` start failed: ${M.error??"unknown error"}`),/render host not available|already streaming|already recording|lock already held/i.test(M.error??"")&&console.error(" a prior recording was abandoned and its capture is still\n releasing. retry in ~20s, or recover now with\n `rnx close --sim <id>` then reopen the sim."),i(1)),console.log(` recording ${_} for ${d}s \u2192 ${c}`),await new Promise(k=>setTimeout(k,h));let g=await z(v,"window.__sootsimRecorder.stop()",`${_} encode/flush`,h);g.ok||(console.error(` stop failed: ${g.error??"unknown error"}`),i(1)),g.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),i(1)),await se(v,c),console.log(` saved: ${c} (${q(g.size)})`),g.durationMs&&g.frameCount!==void 0&&console.log(` source frames: ${g.frameCount} over ${(g.durationMs/1e3).toFixed(2)}s (${(g.frameCount/(g.durationMs/1e3)).toFixed(1)}fps)`)}finally{v.close()}}var Ee=6e3;async function G(e,r){try{return await e.send({type:"evaluate",code:r},{timeoutMs:Ee})}catch(o){let s=o instanceof Error?o.message:String(o);throw/^command timed out after \d+s$/.test(s)&&(console.error(" sim did not respond \u2014 it is connected to the bridge but has not\n loaded an app (or its page is unresponsive). run `rnx list`\n and target a sim with a loaded app via --sim <id>."),i(1)),o}}async function ie(e){await G(e,'typeof window.__sootsimRecorder !== "undefined"')||(console.error(" window.__sootsimRecorder missing \u2014 is rnx engine running in this sim?"),i(1))}async function U(e){let{hidden:r}=await Y(e);r&&(console.error(` refusing to record: the rnx tab is hidden, so frame capture
9
+ \`rnx close --sim <id>\` and reopen the sim.`),i(1)),console.error(` ${o} failed: ${a}`),i(1)}}var xe=new Set(["--sim","--port","-p","--mode","--duration","--fps","--format","--output","-o","--frames","--max-width","--origin","--owner","--repo"]),Oe=new Set(["start","stop","cancel","status","prelude-start","upload"]);function Me(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){xe.has(o)&&r++;continue}return Oe.has(o)?{name:o,index:r}:null}return null}function te(e){let r=m(e,"--owner")?.trim(),o=m(e,"--repo")?.trim();return(r&&!o||!r&&o)&&(console.error(" --owner and --repo must be provided together"),i(1)),r&&o?{owner:r,repo:o}:null}async function Xe(e,r){let o=Me(e);if(o){let c=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await Ie(c,r);return}if(o.name==="prelude-start"){await Fe(c,r);return}if(o.name==="upload"){let{runUpload:$}=await import("./upload-DUQBKZYV.js");await $(c,r);return}if(o.name==="stop"){await We(c,r);return}if(o.name==="cancel"){await Pe(c,r);return}await Ne(c,r);return}let s=y(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only","--open","--lockstep"],stripValueFlags:["--mode","--duration","--fps","--format","--output","--frames","--max-width","--origin","--owner","--repo"]}),n=ae(m(e,"--mode")),t=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,a=m(e,"--format");a&&!["webm","mp4","gif","png"].includes(a)&&(console.error(` invalid --format "${a}" \u2014 expected webm | mp4 | gif | png`),i(1));let l=m(e,"--output"),d=Number(m(e,"--duration")??"10");(!Number.isFinite(d)||d<=0)&&(console.error(` invalid --duration "${m(e,"--duration")}" \u2014 expected a positive number of seconds`),i(1));let u=600;d>u&&(console.error(` invalid --duration "${m(e,"--duration")}" \u2014 exceeds the ${u}s (10m) maximum`),i(1));let f=Number(m(e,"--fps")??"30"),p=m(e,"--frames");if(p!==void 0){let c=Number(p);(!Number.isInteger(c)||c<=0)&&(console.error(` invalid --frames "${p}" \u2014 expected a positive integer count`),i(1))}let x=e.includes("--open"),O=m(e,"--max-width")?Number(m(e,"--max-width")):void 0;e.includes("--lockstep")&&(console.error(" --lockstep works with `record start` / `record stop` (stateful mode) \u2014 atomic --duration is wall-clock and cannot bound a virtual-time capture"),i(1));let h=Math.max(100,Math.round(d*1e3)),X=m(e,"--origin"),ge=te(e);if(n==="live"||n==="combined"){l&&console.log(` note: --output is ignored for --mode ${n} \u2014 the recording uploads to /preview/<id>`),t&&n==="live"&&console.log(` note: --${t==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await D("record",{originOverride:X,allowGitHubAuth:!0});let c=S({...s,commandTimeoutMs:6e4});try{await K(c),await ce(c,n),n==="combined"&&await U(c),await le(c,X,ge);let $=await ue(c,n,n==="combined"?t:void 0);$.ok||(console.error(` start failed: recording store refused to start (${n})`+($.error?`: ${$.error}`:"")),i(1)),console.log(` recording ${n} for ${d}s`),await new Promise(g=>setTimeout(g,h)),await me(c);let M=await fe(c);pe(M,x,n)}finally{c.close()}return}let N=p?Number(p):null,_=Ue(a,l,N);x&&console.log(" note: --open is ignored for local-file capture \u2014 it applies to --mode live/combined");let v=S({...s,commandTimeoutMs:6e4});try{if(await ie(v),await U(v),_==="png"){let k=N??10,b=I(l,`sootsim-frames-${T()}`);l&&ne(l)&&console.log(` note: --frames writes multiple pngs, so --output "${l}" is a directory \u2014 frame-NNN.png files land inside it`),B(b,{recursive:!0});for(let w of ve(b))/^frame-\d+\.png$/.test(w)&&V(A(b,w),{force:!0});console.log(` sampling ${k} frames over ${d}s \u2192 ${b}`);let R=await v.send({type:"evaluate",code:`window.__sootsimRecorder.startFrameCapture({ count: ${k}, durationMs: ${h}${t?`, layers: ${JSON.stringify(t)}`:""} })`});(!R.ok||!R.requestId)&&(console.error(` frame capture start failed: ${R.error??"unknown error"}`),i(1)),await new Promise(w=>setTimeout(w,h));let we=Date.now()+Math.max(5e3,h),P=null;for(;;){let w=await v.send({type:"evaluate",code:`window.__sootsimRecorder.getFrameCaptureResult(${R.requestId})`});if(w||(console.error(" frame capture result missing"),i(1)),w.done){w.ok||(console.error(` frame capture failed: ${w.error??"unknown error"}`),i(1)),P=w.frames??[];break}Date.now()>=we&&(console.error(" frame capture timed out"),i(1)),await new Promise(W=>setTimeout(W,100))}P.forEach((w,W)=>{let he=`${b}/frame-${String(W+1).padStart(3,"0")}.png`;F(he,Buffer.from(w.data,"base64"))}),console.log(` saved ${P.length} frames`);return}if(_==="gif"){let k=N??Math.max(10,Math.round(d*f/3)),b=I(l,`sootsim-${T()}.gif`);B(J(b),{recursive:!0}),console.log(` encoding gif: ${k} frames over ${d}s \u2192 ${b}`);let R=await z(v,`window.__sootsimRecorder.captureGif({ frames: ${k}, durationMs: ${h}${O?`, maxWidth: ${O}`:""}${t?`, layers: ${JSON.stringify(t)}`:""} })`,"gif encode",h);R||(console.error(" gif capture returned no frames"),i(1)),F(b,Buffer.from(R.data,"base64")),console.log(` saved: ${b} (${q(R.size)})`);return}let c=I(l,`sootsim-${T()}.${_}`);B(J(c),{recursive:!0});let $={format:_,fps:f,durationMs:h};t&&($.layers=t);let M=await z(v,`window.__sootsimRecorder.start(${JSON.stringify($)})`,`${_} start`,h);M.ok||(console.error(` start failed: ${M.error??"unknown error"}`),/render host not available|already streaming|already recording|lock already held/i.test(M.error??"")&&console.error(" a prior recording was abandoned and its capture is still\n releasing. retry in ~20s, or recover now with\n `rnx close --sim <id>` then reopen the sim."),i(1)),console.log(` recording ${_} for ${d}s \u2192 ${c}`),await new Promise(k=>setTimeout(k,h));let g=await z(v,"window.__sootsimRecorder.stop()",`${_} encode/flush`,h);g.ok||(console.error(` stop failed: ${g.error??"unknown error"}`),i(1)),g.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),i(1)),await se(v,c),console.log(` saved: ${c} (${q(g.size)})`),g.durationMs&&g.frameCount!==void 0&&console.log(` source frames: ${g.frameCount} over ${(g.durationMs/1e3).toFixed(2)}s (${(g.frameCount/(g.durationMs/1e3)).toFixed(1)}fps)`)}finally{v.close()}}var Ee=6e3;async function G(e,r){try{return await e.send({type:"evaluate",code:r},{timeoutMs:Ee})}catch(o){let s=o instanceof Error?o.message:String(o);throw/^command timed out after \d+s$/.test(s)&&(console.error(" sim did not respond \u2014 it is connected to the bridge but has not\n loaded an app (or its page is unresponsive). run `rnx list`\n and target a sim with a loaded app via --sim <id>."),i(1)),o}}async function ie(e){await G(e,'typeof window.__sootsimRecorder !== "undefined"')||(console.error(" window.__sootsimRecorder missing \u2014 is rnx engine running in this sim?"),i(1))}async function U(e){let{hidden:r}=await Y(e);r&&(console.error(` refusing to record: the rnx tab is hidden, so frame capture
10
10
  would be throttled to ~1fps and produce a frozen-looking file.
11
11
  bring the chrome window to the foreground (un-minimize / switch to
12
12
  its tab) or run the recording in headless playwright, then retry.`),i(1))}async function se(e,r){let o=[],s=0;for(;;){let n=await e.send({type:"evaluate",code:`window.__sootsimRecorder.getBlobBase64({ offset: ${s}, chunk: 2097152 })`});if(!n)throw new Error("no blob available on recorder");if(o.push(Buffer.from(n.data,"base64")),s=n.offset,n.done)break}F(r,Buffer.concat(o))}function m(e,r){let o=e.indexOf(r);if(!(o<0||o===e.length-1))return e[o+1]}function Be(e){if(!e)return;let r=ne(e).toLowerCase().replace(/^\./,"");if(r==="webm"||r==="mp4"||r==="gif")return r;if(r==="png")return"png"}function Ue(e,r,o){return e||(o!=null?"png":Be(r)??"webm")}function T(){return new Date().toISOString().replace(/[:T]/g,"-").replace(/\..+/,"")}function Ce(){let e=A(Se(),".sootsim","recordings");return B(e,{recursive:!0}),e}function I(e,r){return e?Re(process.cwd(),e):A(Ce(),r)}function q(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(2)}MB`}function ae(e){if(!e)return"video";if(e==="video"||e==="live"||e==="combined")return e;console.error(` invalid --mode "${e}" \u2014 expected video | live | combined`),i(1)}function j(){return A($e(),`sootsim-recording-${Q()}.json`)}function C(){let e=j();if(!be(e))return null;try{return{mode:"video",...JSON.parse(ye(e,"utf8"))}}catch{return V(e,{force:!0}),null}}function Te(e){F(j(),JSON.stringify(e,null,2))}function E(){V(j(),{force:!0})}function H(e,r){e&&r.simId&&e!==r.simId&&console.log(` note: the tracked recording session is on sim ${r.simId}, not the
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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 m,b as f}from"./chunk-6VPR6OTH.js";import"./chunk-RAYAIDJI.js";import"./chunk-UQXSAYWY.js";import{i as l}from"./chunk-PZYF2TKR.js";import{M as p}from"./chunk-GQVWJWCZ.js";import{a as d}from"./chunk-U52Z6BML.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";import{existsSync as h,readFileSync as w}from"node:fs";import{resolve as b}from"node:path";var R="https://contrast.dev",g=8e3;function v(){return{request:(t,e)=>fetch(t,e),confirmSubmission:l,isInteractive:process.stdin.isTTY===!0,now:()=>new Date,stdout:t=>process.stdout.write(t),stderr:t=>process.stderr.write(t)}}function I(t,e){let n=t.indexOf(e);if(n===-1)return null;let r=t[n+1];if(!r||r.startsWith("-"))throw new Error(`${e} requires a value`);return r}function D(t,e=process.cwd()){let n=I(t,"--app"),r=new Set,s=t.indexOf("--app");s!==-1&&(r.add(s),r.add(s+1));let a=[];for(let c=0;c<t.length;c+=1){if(r.has(c))continue;let u=t[c];if(!(u==="--yes"||u==="-y"||u==="--dry-run")){if(u.startsWith("-"))throw new Error(`unknown flag: ${u}`);a.push(u)}}let i=a.join(" ").trim();if(!i)throw new Error("describe the missing or broken compatibility behavior");if(i.length>g)throw new Error(`description is too long (maximum ${g} characters)`);return{appDir:b(e,n??"."),description:i,dryRun:t.includes("--dry-run"),yes:t.includes("--yes")||t.includes("-y")}}function y(t){if(!t||typeof t!="object")return;let e={};for(let n of Object.keys(t)){let r=Object.getOwnPropertyDescriptor(t,n)?.value;typeof r=="string"&&(e[n]=r)}return e}function O(t){let e=b(t,"package.json");if(!h(e))return null;let n;try{n=JSON.parse(w(e,"utf8"))}catch{throw new Error(`could not parse ${e}`)}if(!n||typeof n!="object")throw new Error(`${e} must contain a JSON object`);let r=Object.getOwnPropertyDescriptor(n,"name")?.value,s=Object.getOwnPropertyDescriptor(n,"dependencies")?.value,a=Object.getOwnPropertyDescriptor(n,"devDependencies")?.value,i=y(s),c=y(a);return{...typeof r=="string"?{name:r}:{},...i?{dependencies:i}:{},...c?{devDependencies:c}:{}}}async function S(t,e=new Date){let n=O(t.appDir),r=n?(await import("./web-DA6HESOZ.js")).scanDeps(n):null,s=d(),a=p();return{note:t.description,timestamp:e.toISOString(),sootsim_version:a,cli_version:s,bundle:{activeApp:r&&r.projectName!=="unknown"?{appName:r.projectName}:null,reportSource:"cli",runtimeVersion:a,cliVersion:s,platform:process.platform,arch:process.arch,compatibility:r}}}function $(){let t=m(),e=t?.kind==="session"?t.origin.replace(/\/+$/,""):R,n=t&&t.kind!=="github"?f(t):null;return{url:`${e}/api/sootsim/report-issue`,authorization:n}}function k(t){if(!t)return"no package.json found; no compatibility scan attached";let e=t.packages.filter(n=>n.status!=="full"&&n.status!=="not-relevant").length;return`${t.packages.length} React Native ecosystem packages, ${e} needing attention`}function P(t){if(!t||typeof t!="object")return null;let e=Object.getOwnPropertyDescriptor(t,"id")?.value;return typeof e=="string"&&e?e:null}async function V(t,e=v()){let n;try{n=D(t)}catch(o){return e.stderr(` ${o instanceof Error?o.message:String(o)}
4
+ import{a as m,b as f}from"./chunk-JXAXYK7W.js";import"./chunk-SKMG5DD7.js";import"./chunk-TH2UFGVP.js";import{i as l}from"./chunk-BEU7CD7E.js";import{M as p}from"./chunk-QRDF33WD.js";import{a as d}from"./chunk-XSVILA4Z.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";import{existsSync as h,readFileSync as w}from"node:fs";import{resolve as b}from"node:path";var R="https://contrast.dev",g=8e3;function v(){return{request:(t,e)=>fetch(t,e),confirmSubmission:l,isInteractive:process.stdin.isTTY===!0,now:()=>new Date,stdout:t=>process.stdout.write(t),stderr:t=>process.stderr.write(t)}}function I(t,e){let n=t.indexOf(e);if(n===-1)return null;let r=t[n+1];if(!r||r.startsWith("-"))throw new Error(`${e} requires a value`);return r}function D(t,e=process.cwd()){let n=I(t,"--app"),r=new Set,s=t.indexOf("--app");s!==-1&&(r.add(s),r.add(s+1));let a=[];for(let c=0;c<t.length;c+=1){if(r.has(c))continue;let u=t[c];if(!(u==="--yes"||u==="-y"||u==="--dry-run")){if(u.startsWith("-"))throw new Error(`unknown flag: ${u}`);a.push(u)}}let i=a.join(" ").trim();if(!i)throw new Error("describe the missing or broken compatibility behavior");if(i.length>g)throw new Error(`description is too long (maximum ${g} characters)`);return{appDir:b(e,n??"."),description:i,dryRun:t.includes("--dry-run"),yes:t.includes("--yes")||t.includes("-y")}}function y(t){if(!t||typeof t!="object")return;let e={};for(let n of Object.keys(t)){let r=Object.getOwnPropertyDescriptor(t,n)?.value;typeof r=="string"&&(e[n]=r)}return e}function O(t){let e=b(t,"package.json");if(!h(e))return null;let n;try{n=JSON.parse(w(e,"utf8"))}catch{throw new Error(`could not parse ${e}`)}if(!n||typeof n!="object")throw new Error(`${e} must contain a JSON object`);let r=Object.getOwnPropertyDescriptor(n,"name")?.value,s=Object.getOwnPropertyDescriptor(n,"dependencies")?.value,a=Object.getOwnPropertyDescriptor(n,"devDependencies")?.value,i=y(s),c=y(a);return{...typeof r=="string"?{name:r}:{},...i?{dependencies:i}:{},...c?{devDependencies:c}:{}}}async function S(t,e=new Date){let n=O(t.appDir),r=n?(await import("./web-NCGUYVCJ.js")).scanDeps(n):null,s=d(),a=p();return{note:t.description,timestamp:e.toISOString(),sootsim_version:a,cli_version:s,bundle:{activeApp:r&&r.projectName!=="unknown"?{appName:r.projectName}:null,reportSource:"cli",runtimeVersion:a,cliVersion:s,platform:process.platform,arch:process.arch,compatibility:r}}}function $(){let t=m(),e=t?.kind==="session"?t.origin.replace(/\/+$/,""):R,n=t&&t.kind!=="github"?f(t):null;return{url:`${e}/api/sootsim/report-issue`,authorization:n}}function k(t){if(!t)return"no package.json found; no compatibility scan attached";let e=t.packages.filter(n=>n.status!=="full"&&n.status!=="not-relevant").length;return`${t.packages.length} React Native ecosystem packages, ${e} needing attention`}function P(t){if(!t||typeof t!="object")return null;let e=Object.getOwnPropertyDescriptor(t,"id")?.value;return typeof e=="string"&&e?e:null}async function V(t,e=v()){let n;try{n=D(t)}catch(o){return e.stderr(` ${o instanceof Error?o.message:String(o)}
5
5
  usage: rnx report-issue [--app <dir>] [--dry-run] [--yes] "<description>"
6
6
  `),1}if(!h(n.appDir))return e.stderr(` directory not found: ${n.appDir}
7
7
  `),1;let r;try{r=await S(n,e.now())}catch(o){return e.stderr(` could not prepare the issue report: ${o instanceof Error?o.message:String(o)}
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.376 | (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-6CV3R3XD.js";import"./chunk-TZUABDIJ.js";import"./chunk-CSJ7L7ZL.js";import"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";export{a as runReset};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.376 | (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}from"./chunk-YTXY3MHW.js";import"./chunk-CSJ7L7ZL.js";import"./chunk-ZSSG7OR7.js";export{a as readTargetFlag,b as resolveTargetCoords};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{c as a}from"./chunk-3PEMSUAQ.js";import"./chunk-FVZBGPCU.js";import"./chunk-GZE57ORL.js";import"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-TH2UFGVP.js";import"./chunk-CE4JQJ6Y.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";export{a as runRuntime};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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 se,b as ie,g as ae}from"./chunk-AEMLIV3G.js";import{a as C}from"./chunk-CBF7RQ3C.js";import"./chunk-MU77ZSME.js";import"./chunk-HCORKEG6.js";import"./chunk-R7NXLMFI.js";import{a as te}from"./chunk-GH7XDCAP.js";import{a as re}from"./chunk-MHVH5IJU.js";import"./chunk-R3HLZSGB.js";import{a as oe,b as ne}from"./chunk-6VPR6OTH.js";import"./chunk-RAYAIDJI.js";import"./chunk-G2IBWLBT.js";import"./chunk-QKYOZQKE.js";import"./chunk-L6VQSQ5O.js";import"./chunk-IXYE6F2D.js";import"./chunk-XSWS6HY6.js";import"./chunk-UHTIDDI2.js";import"./chunk-KWUKKULB.js";import"./chunk-WR6QFC62.js";import"./chunk-VSGEEW3N.js";import"./chunk-HM5TGIVN.js";import"./chunk-2XDNHF7N.js";import"./chunk-2W6ADNTG.js";import{o as Q,p as ee}from"./chunk-4S5CIP7Y.js";import"./chunk-KOSLTZXQ.js";import"./chunk-RE2IODEB.js";import"./chunk-PVGD4KKG.js";import"./chunk-VKOEADVP.js";import"./chunk-2MI2ROT4.js";import"./chunk-7DLC2M6S.js";import{b as R,g as $,h as I,i as L,j as U,k as H,l as A}from"./chunk-PYH2MNFB.js";import{t as B,u as X,v as O,w as J,x as Z,y as N,z as k}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-I2C26UZ3.js";import{c as P}from"./chunk-UQXSAYWY.js";import"./chunk-4FYJOFJZ.js";import"./chunk-2QVA4PPE.js";import"./chunk-XSXSVO4P.js";import"./chunk-ZAUPKGQP.js";import"./chunk-VDCYIT2N.js";import"./chunk-GQVWJWCZ.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";import{mkdirSync as ue,writeFileSync as le}from"fs";import{dirname as de,resolve as pe}from"path";async function me(e,t){let r=Ue(e);(r.includes("--help")||r.includes("-h"))&&(console.log(`
4
+ import{a as se,b as ie,g as ae}from"./chunk-R76BA7C7.js";import{a as C}from"./chunk-SK4M7NXT.js";import"./chunk-ZF7PVX44.js";import"./chunk-7VZZQQEE.js";import"./chunk-DEV3E3MV.js";import{a as te}from"./chunk-37MCSPTE.js";import{a as re}from"./chunk-CIE6CZXL.js";import"./chunk-UB2W6OQM.js";import{a as oe,b as ne}from"./chunk-JXAXYK7W.js";import"./chunk-SKMG5DD7.js";import"./chunk-KMNVDZZI.js";import"./chunk-YTXY3MHW.js";import"./chunk-4TQ5HOK3.js";import"./chunk-KJE2O2GK.js";import"./chunk-GDKMOIUT.js";import"./chunk-UYVXALPB.js";import"./chunk-VWCNJPCJ.js";import"./chunk-XUTJ7ZWD.js";import"./chunk-P6KVGV3H.js";import"./chunk-DCS5FK5N.js";import"./chunk-TZUABDIJ.js";import"./chunk-QELIC5XP.js";import{o as Q,p as ee}from"./chunk-CSJ7L7ZL.js";import"./chunk-DNPQMTW5.js";import"./chunk-TLP3T3VO.js";import"./chunk-FVZBGPCU.js";import"./chunk-GZE57ORL.js";import"./chunk-VQDYFFIG.js";import"./chunk-DOVBJBVD.js";import{b as R,g as $,h as I,i as L,j as U,k as H,l as A}from"./chunk-DGJMIVZM.js";import{t as B,u as X,v as O,w as J,x as Z,y as N,z as k}from"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-LQMUA5IY.js";import{c as P}from"./chunk-TH2UFGVP.js";import"./chunk-HZLOYAPH.js";import"./chunk-AFOVILIL.js";import"./chunk-7R2TK2NY.js";import"./chunk-CE4JQJ6Y.js";import"./chunk-W3FNXAQP.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";import{mkdirSync as ue,writeFileSync as le}from"fs";import{dirname as de,resolve as pe}from"path";async function me(e,t){let r=Ue(e);(r.includes("--help")||r.includes("-h"))&&(console.log(`
5
5
  rnx screenshot \u2014 capture the canvas as a PNG
6
6
 
7
7
  usage:
@@ -156,4 +156,4 @@ examples:
156
156
  await new Promise((r) => setTimeout(r, 40))
157
157
  }
158
158
  return false
159
- })()`,{acquireLock:!0}))throw new Error("could not enable screenshot mode \u2014 is this a browser sim with the screenshot plugin? (electron has no screenshot mode)")}function bt(e){console.log(` ${e.projectName} \u2014 canvas ${e.canvas} (${e.exportSize.width}\xD7${e.exportSize.height}), device ${e.deviceModel}`);for(let t of e.slides){let r=[t.focused?"focused":t.active?"active":null,t.captured?`captured${t.captureMode==="3d"?" 3d":""}`:"no capture"].filter(Boolean).join(", "),i=t.title?`"${t.title}"`:"(no title)",o=[`bg ${t.bgTop}\u2192${t.bgBottom}`,t.titleColor?`color ${t.titleColor}`:null,t.titleSize?`size ${t.titleSize}`:null,t.titleUnderlay?`underlay ${t.titleUnderlay}`:null,t.titleShadow?`shadow ${t.titleShadow}`:null].filter(Boolean).join(", ");console.log(` ${t.index}. ${i} \u2014 ${o} [${r}]`),t.subtitle&&console.log(` ${t.subtitle}`)}}function St(e){let t=e.match(/^data:[^;]+;base64,(.+)$/);if(!t)throw new Error("export returned an unexpected payload");return Buffer.from(t[1],"base64")}async function Re(e,t){if(e.includes("--help")||e.includes("-h")){console.log(ht);return}let{rest:r,values:i,json:o}=gt(e),s=B(r,{port:t.port,commandTimeoutMs:45e3}),n=s.positional[0]??"list",a=wt(s.positional[1]),l=Number(s.positional[2]),c=O(s),u=d=>{o?console.log(JSON.stringify(d,null,2)):bt(d)};try{switch(await yt(c),n){case"list":{u(await N(c,"SootSim.bridges.screenshotControl.getState"));break}case"set":{if(a==null)throw new Error("usage: rnx screenshot slides set <n> --title \u2026 (see --help)");let d={};for(let m of["title","subtitle","bgTop","bgBottom","titleColor","titleSize","titleUnderlay","titleShadow"])i[m]!=null&&(d[m]=i[m]);if(Object.keys(d).length===0)throw new Error("nothing to set \u2014 pass at least one field (see --help)");u(await k(c,"SootSim.bridges.screenshotControl.setSlide",a,d));break}case"add":{u(await k(c,"SootSim.bridges.screenshotControl.addSlide"));break}case"remove":{if(a==null)throw new Error("usage: rnx screenshot slides remove <n>");u(await k(c,"SootSim.bridges.screenshotControl.removeSlide",a));break}case"move":{if(a==null||!Number.isInteger(l)||l<1)throw new Error("usage: rnx screenshot slides move <n> <position>");u(await k(c,"SootSim.bridges.screenshotControl.moveSlide",a,l));break}case"focus":{if(a==null)throw new Error("usage: rnx screenshot slides focus <n>");u(await k(c,"SootSim.bridges.screenshotControl.focusSlide",a));break}case"overview":{u(await k(c,"SootSim.bridges.screenshotControl.overview"));break}case"capture":{let d=await k(c,"SootSim.bridges.screenshotControl.capture",...a!=null?[a]:[]);u(d);break}case"export":{let d=i.out?pt(i.out)?i.out:mt(process.cwd(),i.out):Fe(process.cwd(),"screenshots"),m=await N(c,"SootSim.bridges.screenshotControl.getState"),h=a!=null?m.slides.filter(p=>p.index===a||p.id===a):m.slides.filter(p=>p.captured);if(h.length===0)throw new Error(a!=null?`no slide ${a}`:"no captured slides to export \u2014 capture first");let w=[];for(let p of h){let y=await N(c,"SootSim.bridges.screenshotControl.exportSlide",p.index),f=Fe(d,y.name);ct(dt(f),{recursive:!0}),ut(f,St(y.dataUrl)),w.push(f),console.log(` saved: ${f} (${y.width}\xD7${y.height})`)}o&&console.log(JSON.stringify({written:w},null,2));break}default:throw new Error(`unknown subcommand "${n}" \u2014 see rnx screenshot slides --help`)}}finally{c.close()}}var xt=new Set(["--sim","--port","-p","--output","-o","--out","--plan","--app","--device","--org","--repo","--api-origin","--branch","--platform","--slides","--shell-origin","--timeout","--ids","--out-dir"]),Pt=new Set(["capture","slides","appstore","layers"]);function Ae(e){for(let t=0;t<e.length;t++){let r=e[t];if(r.startsWith("-")){xt.has(r)&&t++;continue}return Pt.has(r)?{name:r,index:t}:null}return null}function F(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function $t(e){let t=[];for(let r=0;r<e.length;r++){if(e[r]==="--sim"){r++;continue}t.push(e[r])}return t}async function $r(e,t){let r=Ae(e);if(!r||r.name==="capture"){await me(r?F(e,r.index):e,t);return}if(r.name==="slides"){await Re(F(e,r.index),t);return}if(r.name==="layers"){let{runScreenshotLayers:s}=await import("./screenshot-layers-QOSO5ZRE.js");await s(F(e,r.index),t);return}let i=F(e,r.index),o=Ae(i);if(o?.name==="capture")try{let{runScreenshotsCapture:s}=await import("./screenshots-capture-XSRQO5SQ.js");return await s($t(F(i,o.index)))}catch(s){if(s instanceof Error&&"code"in s&&s.code==="ERR_MODULE_NOT_FOUND")return console.error("screenshot appstore capture is repo-only tooling \u2014 it needs the rnx workspace (playwright is not shipped with the published CLI)."),1;throw s}return Ee(i,t)}export{$r as runScreenshotCommand};
159
+ })()`,{acquireLock:!0}))throw new Error("could not enable screenshot mode \u2014 is this a browser sim with the screenshot plugin? (electron has no screenshot mode)")}function bt(e){console.log(` ${e.projectName} \u2014 canvas ${e.canvas} (${e.exportSize.width}\xD7${e.exportSize.height}), device ${e.deviceModel}`);for(let t of e.slides){let r=[t.focused?"focused":t.active?"active":null,t.captured?`captured${t.captureMode==="3d"?" 3d":""}`:"no capture"].filter(Boolean).join(", "),i=t.title?`"${t.title}"`:"(no title)",o=[`bg ${t.bgTop}\u2192${t.bgBottom}`,t.titleColor?`color ${t.titleColor}`:null,t.titleSize?`size ${t.titleSize}`:null,t.titleUnderlay?`underlay ${t.titleUnderlay}`:null,t.titleShadow?`shadow ${t.titleShadow}`:null].filter(Boolean).join(", ");console.log(` ${t.index}. ${i} \u2014 ${o} [${r}]`),t.subtitle&&console.log(` ${t.subtitle}`)}}function St(e){let t=e.match(/^data:[^;]+;base64,(.+)$/);if(!t)throw new Error("export returned an unexpected payload");return Buffer.from(t[1],"base64")}async function Re(e,t){if(e.includes("--help")||e.includes("-h")){console.log(ht);return}let{rest:r,values:i,json:o}=gt(e),s=B(r,{port:t.port,commandTimeoutMs:45e3}),n=s.positional[0]??"list",a=wt(s.positional[1]),l=Number(s.positional[2]),c=O(s),u=d=>{o?console.log(JSON.stringify(d,null,2)):bt(d)};try{switch(await yt(c),n){case"list":{u(await N(c,"SootSim.bridges.screenshotControl.getState"));break}case"set":{if(a==null)throw new Error("usage: rnx screenshot slides set <n> --title \u2026 (see --help)");let d={};for(let m of["title","subtitle","bgTop","bgBottom","titleColor","titleSize","titleUnderlay","titleShadow"])i[m]!=null&&(d[m]=i[m]);if(Object.keys(d).length===0)throw new Error("nothing to set \u2014 pass at least one field (see --help)");u(await k(c,"SootSim.bridges.screenshotControl.setSlide",a,d));break}case"add":{u(await k(c,"SootSim.bridges.screenshotControl.addSlide"));break}case"remove":{if(a==null)throw new Error("usage: rnx screenshot slides remove <n>");u(await k(c,"SootSim.bridges.screenshotControl.removeSlide",a));break}case"move":{if(a==null||!Number.isInteger(l)||l<1)throw new Error("usage: rnx screenshot slides move <n> <position>");u(await k(c,"SootSim.bridges.screenshotControl.moveSlide",a,l));break}case"focus":{if(a==null)throw new Error("usage: rnx screenshot slides focus <n>");u(await k(c,"SootSim.bridges.screenshotControl.focusSlide",a));break}case"overview":{u(await k(c,"SootSim.bridges.screenshotControl.overview"));break}case"capture":{let d=await k(c,"SootSim.bridges.screenshotControl.capture",...a!=null?[a]:[]);u(d);break}case"export":{let d=i.out?pt(i.out)?i.out:mt(process.cwd(),i.out):Fe(process.cwd(),"screenshots"),m=await N(c,"SootSim.bridges.screenshotControl.getState"),h=a!=null?m.slides.filter(p=>p.index===a||p.id===a):m.slides.filter(p=>p.captured);if(h.length===0)throw new Error(a!=null?`no slide ${a}`:"no captured slides to export \u2014 capture first");let w=[];for(let p of h){let y=await N(c,"SootSim.bridges.screenshotControl.exportSlide",p.index),f=Fe(d,y.name);ct(dt(f),{recursive:!0}),ut(f,St(y.dataUrl)),w.push(f),console.log(` saved: ${f} (${y.width}\xD7${y.height})`)}o&&console.log(JSON.stringify({written:w},null,2));break}default:throw new Error(`unknown subcommand "${n}" \u2014 see rnx screenshot slides --help`)}}finally{c.close()}}var xt=new Set(["--sim","--port","-p","--output","-o","--out","--plan","--app","--device","--org","--repo","--api-origin","--branch","--platform","--slides","--shell-origin","--timeout","--ids","--out-dir"]),Pt=new Set(["capture","slides","appstore","layers"]);function Ae(e){for(let t=0;t<e.length;t++){let r=e[t];if(r.startsWith("-")){xt.has(r)&&t++;continue}return Pt.has(r)?{name:r,index:t}:null}return null}function F(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function $t(e){let t=[];for(let r=0;r<e.length;r++){if(e[r]==="--sim"){r++;continue}t.push(e[r])}return t}async function $r(e,t){let r=Ae(e);if(!r||r.name==="capture"){await me(r?F(e,r.index):e,t);return}if(r.name==="slides"){await Re(F(e,r.index),t);return}if(r.name==="layers"){let{runScreenshotLayers:s}=await import("./screenshot-layers-3W5R7DB2.js");await s(F(e,r.index),t);return}let i=F(e,r.index),o=Ae(i);if(o?.name==="capture")try{let{runScreenshotsCapture:s}=await import("./screenshots-capture-6AWJY7XZ.js");return await s($t(F(i,o.index)))}catch(s){if(s instanceof Error&&"code"in s&&s.code==="ERR_MODULE_NOT_FOUND")return console.error("screenshot appstore capture is repo-only tooling \u2014 it needs the rnx workspace (playwright is not shipped with the published CLI)."),1;throw s}return Ee(i,t)}export{$r as runScreenshotCommand};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as R}from"./chunk-GH7XDCAP.js";import"./chunk-XSWS6HY6.js";import{o as I,p as S}from"./chunk-4S5CIP7Y.js";import"./chunk-KOSLTZXQ.js";import"./chunk-7DLC2M6S.js";import{b as f}from"./chunk-PYH2MNFB.js";import{t as v,v as w,y as b}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import{c}from"./chunk-UQXSAYWY.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";import{mkdirSync as F,writeFileSync as $}from"fs";import{resolve as u}from"path";async function _(s,D){(s.includes("--help")||s.includes("-h"))&&(console.log(`
4
+ import{a as R}from"./chunk-37MCSPTE.js";import"./chunk-GDKMOIUT.js";import{o as I,p as S}from"./chunk-CSJ7L7ZL.js";import"./chunk-DNPQMTW5.js";import"./chunk-DOVBJBVD.js";import{b as f}from"./chunk-DGJMIVZM.js";import{t as v,v as w,y as b}from"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import{c}from"./chunk-TH2UFGVP.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";import{mkdirSync as F,writeFileSync as $}from"fs";import{resolve as u}from"path";async function _(s,D){(s.includes("--help")||s.includes("-h"))&&(console.log(`
5
5
  sootsim screenshot layers \u2014 export a screen as engine-isolated layers
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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 I}from"./chunk-CBF7RQ3C.js";import{a as U}from"./chunk-6VPR6OTH.js";import"./chunk-RAYAIDJI.js";import{c as M}from"./chunk-UQXSAYWY.js";import"./chunk-GQVWJWCZ.js";import{a as F}from"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";import{execSync as A}from"node:child_process";import{mkdirSync as O,mkdtempSync as j,rmSync as G,writeFileSync as q}from"node:fs";import{tmpdir as B}from"node:os";import{dirname as L,isAbsolute as z,join as T,resolve as W}from"node:path";import{chromium as H}from"playwright-core";var J=`
4
+ import{b as I}from"./chunk-SK4M7NXT.js";import{a as U}from"./chunk-JXAXYK7W.js";import"./chunk-SKMG5DD7.js";import{c as M}from"./chunk-TH2UFGVP.js";import"./chunk-QRDF33WD.js";import{a as F}from"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";import{execSync as A}from"node:child_process";import{mkdirSync as O,mkdtempSync as j,rmSync as G,writeFileSync as q}from"node:fs";import{tmpdir as B}from"node:os";import{dirname as L,isAbsolute as z,join as T,resolve as W}from"node:path";import{chromium as H}from"playwright-core";var J=`
5
5
  rnx screenshot appstore capture \u2014 headlessly capture + upload App Store slides
6
6
 
7
7
  usage: