rnxsim 0.1.372 → 0.1.374

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 (190) hide show
  1. package/dist-cli/bin.js +5 -5
  2. package/dist-cli/chunks/{agent-RTAKJ5UM.js → agent-BKCNNEQV.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-JWRDI26D.js → agent-wrapper-B3AS3ENV.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-RKO3N4PB.js → app-fonts-GWE22XIG.js} +2 -2
  5. package/dist-cli/chunks/{assert-Y5LXPWC6.js → assert-ORX5Q6AH.js} +2 -2
  6. package/dist-cli/chunks/{auth-4SPTRWTM.js → auth-REWJRBFP.js} +2 -2
  7. package/dist-cli/chunks/{beta-KYS22QPY.js → beta-Q2VQZCLD.js} +2 -2
  8. package/dist-cli/chunks/{box-7CK72ZPF.js → box-I5QZZJBJ.js} +2 -2
  9. package/dist-cli/chunks/{camera-RUL426MQ.js → camera-5HA2IJDC.js} +2 -2
  10. package/dist-cli/chunks/{chunk-KXAE64HF.js → chunk-2MI2ROT4.js} +2 -2
  11. package/dist-cli/chunks/{chunk-JPRHJMUJ.js → chunk-2QVA4PPE.js} +1 -1
  12. package/dist-cli/chunks/{chunk-DQOQQFMP.js → chunk-2W6ADNTG.js} +1 -1
  13. package/dist-cli/chunks/{chunk-4UMODU6C.js → chunk-2XDNHF7N.js} +2 -2
  14. package/dist-cli/chunks/{chunk-KVVNCIJA.js → chunk-2ZE4WXXF.js} +1 -1
  15. package/dist-cli/chunks/{chunk-KWLUOLYQ.js → chunk-4FYJOFJZ.js} +2 -2
  16. package/dist-cli/chunks/{chunk-I37LRPZ3.js → chunk-4S5CIP7Y.js} +1 -1
  17. package/dist-cli/chunks/{chunk-MSM2E74F.js → chunk-5VFQ7HKK.js} +1 -1
  18. package/dist-cli/chunks/{chunk-NBEOA72C.js → chunk-5WXRC4BW.js} +1 -1
  19. package/dist-cli/chunks/{chunk-VQQXUXXF.js → chunk-6JBXWVSP.js} +2 -2
  20. package/dist-cli/chunks/{chunk-H2SKPUSI.js → chunk-6PV4QLZ7.js} +2 -2
  21. package/dist-cli/chunks/{chunk-CEQXZ3GA.js → chunk-6VPR6OTH.js} +2 -2
  22. package/dist-cli/chunks/{chunk-I7LRVN5M.js → chunk-7DLC2M6S.js} +2 -2
  23. package/dist-cli/chunks/{chunk-SC7PGULZ.js → chunk-7PBNTA3M.js} +2 -2
  24. package/dist-cli/chunks/{chunk-POR7R3TP.js → chunk-A6JPQM7B.js} +1 -1
  25. package/dist-cli/chunks/{chunk-SZX6ARJX.js → chunk-AEMLIV3G.js} +3 -3
  26. package/dist-cli/chunks/{chunk-ZTZTRD5R.js → chunk-CBF7RQ3C.js} +1 -1
  27. package/dist-cli/chunks/{chunk-5Q6ZEZFF.js → chunk-DB2JB52S.js} +1 -1
  28. package/dist-cli/chunks/{chunk-ZRQKEKHX.js → chunk-DYE6WT2Q.js} +2 -2
  29. package/dist-cli/chunks/{chunk-7FYOZQBM.js → chunk-G2IBWLBT.js} +1 -1
  30. package/dist-cli/chunks/{chunk-PETP6LVI.js → chunk-GH7XDCAP.js} +1 -1
  31. package/dist-cli/chunks/{chunk-QA2PTSOC.js → chunk-GQVWJWCZ.js} +1 -1
  32. package/dist-cli/chunks/{chunk-XA4YU3A4.js → chunk-HCORKEG6.js} +3 -3
  33. package/dist-cli/chunks/{chunk-EY5OHL2M.js → chunk-HM5TGIVN.js} +1 -1
  34. package/dist-cli/chunks/{chunk-PKY76S57.js → chunk-I2C26UZ3.js} +1 -1
  35. package/dist-cli/chunks/{chunk-R7HMFLXI.js → chunk-IQ5HBVID.js} +2 -2
  36. package/dist-cli/chunks/{chunk-U3XYGLXG.js → chunk-IXYE6F2D.js} +2 -2
  37. package/dist-cli/chunks/{chunk-LAQKTHRM.js → chunk-KN6LU33B.js} +2 -2
  38. package/dist-cli/chunks/{chunk-L5BEWXQZ.js → chunk-KOSLTZXQ.js} +2 -2
  39. package/dist-cli/chunks/{chunk-OLHHB6LD.js → chunk-KVMYAHND.js} +2 -2
  40. package/dist-cli/chunks/{chunk-HDGZAVH3.js → chunk-KWUKKULB.js} +2 -2
  41. package/dist-cli/chunks/{chunk-PUH6RQBJ.js → chunk-L6VQSQ5O.js} +2 -2
  42. package/dist-cli/chunks/{chunk-BRRWRBW7.js → chunk-MHVH5IJU.js} +2 -2
  43. package/dist-cli/chunks/{chunk-K4TGUDY4.js → chunk-MU77ZSME.js} +2 -2
  44. package/dist-cli/chunks/{chunk-Q7JSU5DI.js → chunk-N5GTOZJP.js} +3 -3
  45. package/dist-cli/chunks/{chunk-MKHW3JNL.js → chunk-OO7E4JTZ.js} +2 -2
  46. package/dist-cli/chunks/{chunk-G5G7PQKO.js → chunk-PVGD4KKG.js} +2 -2
  47. package/dist-cli/chunks/{chunk-D5AT7UT5.js → chunk-PYH2MNFB.js} +2 -2
  48. package/dist-cli/chunks/{chunk-YEGWC2OY.js → chunk-PZYF2TKR.js} +1 -1
  49. package/dist-cli/chunks/{chunk-CZ2FOZVC.js → chunk-QKYOZQKE.js} +2 -2
  50. package/dist-cli/chunks/{chunk-NLMDMNO6.js → chunk-R3HLZSGB.js} +2 -2
  51. package/dist-cli/chunks/{chunk-SLTEYNAE.js → chunk-R7NXLMFI.js} +1 -1
  52. package/dist-cli/chunks/{chunk-NT43X5LI.js → chunk-RAYAIDJI.js} +2 -2
  53. package/dist-cli/chunks/{chunk-NWPYM54M.js → chunk-RE2IODEB.js} +1 -1
  54. package/dist-cli/chunks/{chunk-WR7LRCYW.js → chunk-RU565DEH.js} +1 -1
  55. package/dist-cli/chunks/{chunk-FOW2LPM7.js → chunk-RXDJ422X.js} +2 -2
  56. package/dist-cli/chunks/{chunk-J2TJRPDB.js → chunk-SNMLG22Y.js} +2 -2
  57. package/dist-cli/chunks/{chunk-UA5WQCBU.js → chunk-TCB6DSON.js} +2 -2
  58. package/dist-cli/chunks/{chunk-P6K6XFWE.js → chunk-U52Z6BML.js} +2 -2
  59. package/dist-cli/chunks/{chunk-SSQCKJQZ.js → chunk-UAMMP7U7.js} +2 -2
  60. package/dist-cli/chunks/{chunk-3C6LTIDV.js → chunk-UHTIDDI2.js} +2 -2
  61. package/dist-cli/chunks/{chunk-YWTBN7SD.js → chunk-UQXSAYWY.js} +1 -1
  62. package/dist-cli/chunks/{chunk-LWLHVF6Y.js → chunk-VDCYIT2N.js} +1 -1
  63. package/dist-cli/chunks/{chunk-2MA3Q44D.js → chunk-VKOEADVP.js} +1 -1
  64. package/dist-cli/chunks/{chunk-Q5WPPOFV.js → chunk-VOYUOTN2.js} +1 -1
  65. package/dist-cli/chunks/{chunk-IX25FFF3.js → chunk-VSGEEW3N.js} +2 -2
  66. package/dist-cli/chunks/{chunk-H567W7JT.js → chunk-WR6QFC62.js} +2 -2
  67. package/dist-cli/chunks/{chunk-UVKX6FQ4.js → chunk-X2YXPZD4.js} +1 -1
  68. package/dist-cli/chunks/{chunk-GPYG2L7R.js → chunk-XL53SSTO.js} +2 -2
  69. package/dist-cli/chunks/{chunk-EKSSAC4L.js → chunk-XSWS6HY6.js} +1 -1
  70. package/dist-cli/chunks/{chunk-RXKZJAGY.js → chunk-XSXSVO4P.js} +1 -1
  71. package/dist-cli/chunks/{chunk-KSE5XGYU.js → chunk-Y3LVGZKE.js} +2 -2
  72. package/dist-cli/chunks/chunk-ZAUPKGQP.js +6 -0
  73. package/dist-cli/chunks/{cleanup-7ATBNZHC.js → cleanup-4ZAL2PTZ.js} +2 -2
  74. package/dist-cli/chunks/cli-version-OZYTASIM.js +4 -0
  75. package/dist-cli/chunks/{compat-4ZC6ZMMA.js → compat-6CEUDCO2.js} +2 -2
  76. package/dist-cli/chunks/{config-EOBODQ32.js → config-YHATX3ZX.js} +2 -2
  77. package/dist-cli/chunks/{connect-ZQ72CZ7O.js → connect-LXWD3ILH.js} +2 -2
  78. package/dist-cli/chunks/control-LBL5A6WE.js +4 -0
  79. package/dist-cli/chunks/daemon-JCFSBU66.js +4 -0
  80. package/dist-cli/chunks/{debug-7Z325GNU.js → debug-4RKDQCF4.js} +3 -3
  81. package/dist-cli/chunks/{desktop-CR7ALX7H.js → desktop-ISJKVEQA.js} +3 -3
  82. package/dist-cli/chunks/{detox-RZ37736M.js → detox-7P5NDA5M.js} +2 -2
  83. package/dist-cli/chunks/{device-TA3SQP6K.js → device-JXBP6WUE.js} +2 -2
  84. package/dist-cli/chunks/{diagnose-JFKFKR3S.js → diagnose-7JJWOZ23.js} +2 -2
  85. package/dist-cli/chunks/{disk-cleanup-HZM7VM4S.js → disk-cleanup-MXIQGJWO.js} +2 -2
  86. package/dist-cli/chunks/{do-chain-MTT65YNX.js → do-chain-KTAVIZMC.js} +2 -2
  87. package/dist-cli/chunks/drivers-IQ5GCHPH.js +4 -0
  88. package/dist-cli/chunks/{env-SFI24PLS.js → env-37X232UA.js} +2 -2
  89. package/dist-cli/chunks/{film-GPHSJLIH.js → film-5F5XDOIR.js} +3 -3
  90. package/dist-cli/chunks/flow-74OQVMSN.js +4 -0
  91. package/dist-cli/chunks/help-OCNTRGIJ.js +4 -0
  92. package/dist-cli/chunks/{hidden-runtime-alias-7Z6PYH53.js → hidden-runtime-alias-FAPVCHKI.js} +2 -2
  93. package/dist-cli/chunks/{home-paths-MEGVA6ET.js → home-paths-VW3CI5QK.js} +2 -2
  94. package/dist-cli/chunks/inspect-Z2NKYQEG.js +4 -0
  95. package/dist-cli/chunks/install-desktop-47P2MA4T.js +4 -0
  96. package/dist-cli/chunks/{login-EHUZYRAM.js → login-LDN6ETBS.js} +2 -2
  97. package/dist-cli/chunks/{logout-WPGT62N6.js → logout-HOHKC7TH.js} +2 -2
  98. package/dist-cli/chunks/{maestro-4HVDLCTI.js → maestro-PCFZZHCH.js} +3 -3
  99. package/dist-cli/chunks/{maestro-generate-VBS2EZMM.js → maestro-generate-6MSPC66O.js} +3 -3
  100. package/dist-cli/chunks/{mode-MGTS4QTF.js → mode-GRYQSTZH.js} +2 -2
  101. package/dist-cli/chunks/{optional-demo-registry-F3FQT5WT.js → optional-demo-registry-RP2H6SQR.js} +2 -2
  102. package/dist-cli/chunks/{perf-47R3OEI7.js → perf-WPW5FWOL.js} +2 -2
  103. package/dist-cli/chunks/{permissions-ZOLFZWR2.js → permissions-OXAWZHB2.js} +2 -2
  104. package/dist-cli/chunks/{platform-C4E26ZBZ.js → platform-SKTAMMLT.js} +3 -3
  105. package/dist-cli/chunks/privacy-XEXZ6AIX.js +4 -0
  106. package/dist-cli/chunks/{record-OUXWCWUF.js → record-WFA3GUIX.js} +3 -3
  107. package/dist-cli/chunks/{report-issue-LJJXONXQ.js → report-issue-LB7QRUIO.js} +2 -2
  108. package/dist-cli/chunks/reset-CYS4XX4I.js +4 -0
  109. package/dist-cli/chunks/resolve-target-YYCTSFNM.js +4 -0
  110. package/dist-cli/chunks/runtime-JFQ6JIA6.js +4 -0
  111. package/dist-cli/chunks/{screenshot-command-CUHDOS5D.js → screenshot-command-OX4B5ZPE.js} +3 -3
  112. package/dist-cli/chunks/{screenshot-layers-DVWQVKT6.js → screenshot-layers-QOSO5ZRE.js} +2 -2
  113. package/dist-cli/chunks/{screenshots-capture-GWIUJ3A6.js → screenshots-capture-XSRQO5SQ.js} +2 -2
  114. package/dist-cli/chunks/{serve-TX5OKGJM.js → serve-LNYA35IZ.js} +2 -2
  115. package/dist-cli/chunks/setup-3W2UEM2H.js +4 -0
  116. package/dist-cli/chunks/{sim-client-W4WZOZ3P.js → sim-client-MBY5YFOJ.js} +2 -2
  117. package/dist-cli/chunks/{skills-TDFQAZ6A.js → skills-DVTU7NKR.js} +2 -2
  118. package/dist-cli/chunks/{state-P2Z25OLQ.js → state-4AIXTMAN.js} +2 -2
  119. package/dist-cli/chunks/{storage-DWEOFXEB.js → storage-OXHTXIRW.js} +2 -2
  120. package/dist-cli/chunks/store-43NVGPZX.js +4 -0
  121. package/dist-cli/chunks/telemetry-ZQRYJXGE.js +4 -0
  122. package/dist-cli/chunks/{timeline-55XNA4GX.js → timeline-HY7NURFG.js} +2 -2
  123. package/dist-cli/chunks/{upgrade-3XRCVDVC.js → upgrade-V6222XJR.js} +2 -2
  124. package/dist-cli/chunks/upload-DUKPPETT.js +4 -0
  125. package/dist-cli/chunks/{version-WTYGLXBJ.js → version-32O3RRDO.js} +2 -2
  126. package/dist-cli/chunks/{web-ZWRY3VHM.js → web-DA6HESOZ.js} +2 -2
  127. package/dist-cli/chunks/welcome-X7PCNKS6.js +5 -0
  128. package/dist-cli/chunks/{what-happened-Q3IGIH4K.js → what-happened-UEY6YRTH.js} +2 -2
  129. package/dist-cli/chunks/{ws-bridge-KCPZSBBX.js → ws-bridge-4WWOVU5V.js} +2 -2
  130. package/dist-lib/agent-daemon-client.cjs +1 -1
  131. package/dist-lib/agent-events.cjs +1 -1
  132. package/dist-lib/agent-identity.cjs +1 -1
  133. package/dist-lib/agent-sessions.cjs +1 -1
  134. package/dist-lib/attached-projects.cjs +1 -1
  135. package/dist-lib/auth/shared-session.cjs +1 -1
  136. package/dist-lib/backend-origin.cjs +1 -1
  137. package/dist-lib/beta.cjs +1 -1
  138. package/dist-lib/beta.mjs +1 -1
  139. package/dist-lib/bridge-constants.cjs +1 -1
  140. package/dist-lib/bridge-contract-input.cjs +1 -1
  141. package/dist-lib/bridge-contract-input.mjs +1 -1
  142. package/dist-lib/bridge-contract.cjs +1 -1
  143. package/dist-lib/bridge-contract.mjs +1 -1
  144. package/dist-lib/cli-constants.cjs +1 -1
  145. package/dist-lib/config.cjs +1 -1
  146. package/dist-lib/detox/index.cjs +1 -1
  147. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  148. package/dist-lib/home-paths.cjs +1 -1
  149. package/dist-lib/host/bridge-host.cjs +13 -4
  150. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  151. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  152. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  153. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  154. package/dist-lib/host/websocket-proxy.cjs +1 -1
  155. package/dist-lib/index.cjs +1 -1
  156. package/dist-lib/jump-to-source-babel.cjs +1 -1
  157. package/dist-lib/menu.cjs +1 -1
  158. package/dist-lib/menu.mjs +1 -1
  159. package/dist-lib/metro-production-bundle.cjs +1 -1
  160. package/dist-lib/metro-production-bundle.mjs +1 -1
  161. package/dist-lib/metro.cjs +1 -1
  162. package/dist-lib/profiles.cjs +1 -1
  163. package/dist-lib/public-brand.cjs +1 -1
  164. package/dist-lib/react-native-host-modules.cjs +1 -1
  165. package/dist-lib/react-native-host-modules.mjs +1 -1
  166. package/dist-lib/render-mode.cjs +1 -1
  167. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  168. package/dist-lib/sdk.cjs +1 -1
  169. package/dist-lib/sdk.mjs +1 -1
  170. package/dist-lib/skills.cjs +13 -4
  171. package/dist-lib/vite.cjs +1 -1
  172. package/package.json +1 -1
  173. package/dist-cli/chunks/chunk-2OA2WE7G.js +0 -6
  174. package/dist-cli/chunks/cli-version-D2IDQO7X.js +0 -4
  175. package/dist-cli/chunks/control-FKPKLOE2.js +0 -4
  176. package/dist-cli/chunks/daemon-WFHWS3JU.js +0 -4
  177. package/dist-cli/chunks/drivers-BXEXWRVJ.js +0 -4
  178. package/dist-cli/chunks/flow-FBCU3TZN.js +0 -4
  179. package/dist-cli/chunks/help-6MLROWYO.js +0 -4
  180. package/dist-cli/chunks/inspect-EWT5SXBD.js +0 -4
  181. package/dist-cli/chunks/install-desktop-IFBUH7MH.js +0 -4
  182. package/dist-cli/chunks/privacy-WXGGG4ZI.js +0 -4
  183. package/dist-cli/chunks/reset-ZZYLPETS.js +0 -4
  184. package/dist-cli/chunks/resolve-target-MVZZR2JW.js +0 -4
  185. package/dist-cli/chunks/runtime-DEC5AF3M.js +0 -4
  186. package/dist-cli/chunks/setup-X7LLGW67.js +0 -4
  187. package/dist-cli/chunks/store-TKBLMYCV.js +0 -4
  188. package/dist-cli/chunks/telemetry-E3CBKJMD.js +0 -4
  189. package/dist-cli/chunks/upload-QB77GSMQ.js +0 -4
  190. package/dist-cli/chunks/welcome-7ATM5EGX.js +0 -5
@@ -1,12 +1,12 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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-K4TGUDY4.js";import{a as re}from"./chunk-NLMDMNO6.js";import{a as ee,c as oe}from"./chunk-CEQXZ3GA.js";import"./chunk-NT43X5LI.js";import{d as Z}from"./chunk-H567W7JT.js";import"./chunk-IX25FFF3.js";import"./chunk-NWPYM54M.js";import"./chunk-2MA3Q44D.js";import{e as Q,t as y,v as S,w as Y}from"./chunk-MKHW3JNL.js";import"./chunk-KVVNCIJA.js";import{c as i}from"./chunk-YWTBN7SD.js";import"./chunk-QA2PTSOC.js";import"./chunk-MSM2E74F.js";import"./chunk-WR7LRCYW.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-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.
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-QB77GSMQ.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-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
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.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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-CEQXZ3GA.js";import"./chunk-NT43X5LI.js";import"./chunk-YWTBN7SD.js";import{i as l}from"./chunk-YEGWC2OY.js";import{M as p}from"./chunk-QA2PTSOC.js";import{a as d}from"./chunk-P6K6XFWE.js";import"./chunk-MSM2E74F.js";import"./chunk-WR7LRCYW.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-ZWRY3VHM.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-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)}
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.374 | (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-XL53SSTO.js";import"./chunk-2XDNHF7N.js";import"./chunk-4S5CIP7Y.js";import"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";export{a as runReset};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.374 | (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-QKYOZQKE.js";import"./chunk-4S5CIP7Y.js";import"./chunk-RU565DEH.js";export{a as readTargetFlag,b as resolveTargetCoords};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.374 | (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-N5GTOZJP.js";import"./chunk-PVGD4KKG.js";import"./chunk-VKOEADVP.js";import"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-UQXSAYWY.js";import"./chunk-ZAUPKGQP.js";import"./chunk-GQVWJWCZ.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";export{a as runRuntime};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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-SZX6ARJX.js";import{a as C}from"./chunk-ZTZTRD5R.js";import"./chunk-K4TGUDY4.js";import"./chunk-XA4YU3A4.js";import"./chunk-SLTEYNAE.js";import{a as te}from"./chunk-PETP6LVI.js";import{a as re}from"./chunk-BRRWRBW7.js";import"./chunk-NLMDMNO6.js";import{a as oe,b as ne}from"./chunk-CEQXZ3GA.js";import"./chunk-NT43X5LI.js";import"./chunk-7FYOZQBM.js";import"./chunk-CZ2FOZVC.js";import"./chunk-PUH6RQBJ.js";import"./chunk-U3XYGLXG.js";import"./chunk-EKSSAC4L.js";import"./chunk-3C6LTIDV.js";import"./chunk-HDGZAVH3.js";import"./chunk-H567W7JT.js";import"./chunk-IX25FFF3.js";import"./chunk-EY5OHL2M.js";import"./chunk-4UMODU6C.js";import"./chunk-DQOQQFMP.js";import{o as Q,p as ee}from"./chunk-I37LRPZ3.js";import"./chunk-L5BEWXQZ.js";import"./chunk-NWPYM54M.js";import"./chunk-G5G7PQKO.js";import"./chunk-2MA3Q44D.js";import"./chunk-KXAE64HF.js";import"./chunk-I7LRVN5M.js";import{b as R,g as $,h as I,i as L,j as U,k as H,l as A}from"./chunk-D5AT7UT5.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-MKHW3JNL.js";import"./chunk-KVVNCIJA.js";import"./chunk-PKY76S57.js";import{c as P}from"./chunk-YWTBN7SD.js";import"./chunk-KWLUOLYQ.js";import"./chunk-JPRHJMUJ.js";import"./chunk-RXKZJAGY.js";import"./chunk-2OA2WE7G.js";import"./chunk-LWLHVF6Y.js";import"./chunk-QA2PTSOC.js";import"./chunk-MSM2E74F.js";import"./chunk-WR7LRCYW.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-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(`
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-DVWQVKT6.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-GWIUJ3A6.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-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};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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-PETP6LVI.js";import"./chunk-EKSSAC4L.js";import{o as I,p as S}from"./chunk-I37LRPZ3.js";import"./chunk-L5BEWXQZ.js";import"./chunk-I7LRVN5M.js";import{b as f}from"./chunk-D5AT7UT5.js";import{t as v,v as w,y as b}from"./chunk-MKHW3JNL.js";import"./chunk-KVVNCIJA.js";import{c}from"./chunk-YWTBN7SD.js";import"./chunk-QA2PTSOC.js";import"./chunk-WR7LRCYW.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-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(`
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.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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-ZTZTRD5R.js";import{a as U}from"./chunk-CEQXZ3GA.js";import"./chunk-NT43X5LI.js";import{c as M}from"./chunk-YWTBN7SD.js";import"./chunk-QA2PTSOC.js";import{a as F}from"./chunk-MSM2E74F.js";import"./chunk-WR7LRCYW.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-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=`
5
5
  rnx screenshot appstore capture \u2014 headlessly capture + upload App Store slides
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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 Te,c as q,d as Ce,e as X,f as Ee,h as Ie,i as _,j as xe,k as Re,l as Pe,m as Oe,q as _e,t as T,u as Le,v as Me,w as Be,x as De}from"./chunk-VQQXUXXF.js";import"./chunk-NBEOA72C.js";import{a as we,b as Ae,d as ke}from"./chunk-POR7R3TP.js";import{e as be}from"./chunk-NLMDMNO6.js";import"./chunk-CEQXZ3GA.js";import"./chunk-NT43X5LI.js";import{a as ge,c as Se,d as D,e as ye}from"./chunk-U3XYGLXG.js";import{d as ve}from"./chunk-H567W7JT.js";import{b as z,d as E,l as B}from"./chunk-IX25FFF3.js";import"./chunk-NWPYM54M.js";import"./chunk-2MA3Q44D.js";import{c as me,d as fe}from"./chunk-MKHW3JNL.js";import"./chunk-KVVNCIJA.js";import{c as O}from"./chunk-YWTBN7SD.js";import{f as M}from"./chunk-2OA2WE7G.js";import{A as V,B as re,J as ne,L,M as K,N as se,O as oe,P as ae,R as ce,U as de,V as le,W as ue,X as G,Y as pe,g as ee,h as te,r as ie}from"./chunk-QA2PTSOC.js";import{a as he}from"./chunk-P6K6XFWE.js";import"./chunk-MSM2E74F.js";import"./chunk-WR7LRCYW.js";import{spawn as Ut}from"child_process";import w from"fs";import{createServer as jt}from"http";import v from"path";import{WebSocket as g,WebSocketServer as Ft}from"ws";import je from"node:fs";import H from"node:path";import{spawn as dt}from"node:child_process";var He=/^[A-Za-z0-9._:-]{1,160}$/;function Y(o){if(!o?.startsWith("TM_SESSION:"))return null;let e=o.slice(11).trim();return He.test(e)?e:null}function Ne(o){return He.test(o)}function lt(o){return typeof o.text=="string"?o.text.trim():""}function ut(o){let e=o?.trim();return e||"tm"}async function Ue(o){let e=o.sessionId.trim();if(!Ne(e))throw new Error(`invalid Team Machine session id: ${e||"<empty>"}`);let t=lt(o.prompt);if(!t)throw new Error("prompt text is empty");let i=ut(o.command),r=o.timeoutMs??15e3;await new Promise((n,c)=>{let s=dt(i,["send",e,t],{stdio:["ignore","ignore","pipe"],env:process.env}),a="",l=setTimeout(()=>{try{s.kill("SIGTERM")}catch{}c(new Error(`tm send timed out after ${Math.round(r/1e3)}s`))},r);s.stderr?.setEncoding("utf8"),s.stderr?.on("data",d=>{a.length<4e3&&(a+=String(d))}),s.on("error",d=>{clearTimeout(l),c(d)}),s.on("exit",(d,u)=>{if(clearTimeout(l),d===0){n();return}let p=a.trim();c(new Error(p||`tm send exited with ${u?`signal ${u}`:`code ${d??"unknown"}`}`))})})}var N=1,pt=25;function ht(){return[Number(process.env.VITE_PORT_WEB||process.env.PORT||3e3),Number(process.env.VITE_PORT_ZERO||7849),Number(process.env.VITE_PORT_R2||9500)].filter(o=>Number.isFinite(o)&&o>0)}var U=class{subscriptions=new Map;sessionsBySocket=new Map;allSockets=new Set;pendingPromptEchoes=new Map;pendingTurns=new Map;pendingSessionStates=new Map;pendingSessionPatches=new Map;sessionStatusPersistTimer=null;opts;constructor(e={}){this.opts=e}registerSocket(e){this.allSockets.add(e)}unregisterSocket(e){let t=this.sessionsBySocket.get(e);if(t){for(let i of t)this.decrementSubscription(i);this.sessionsBySocket.delete(e)}this.allSockets.delete(e)}async handleMessage(e,t){let i=t?.type;if(typeof i!="string"||!i.startsWith("agent:"))return!1;let r=t.id;try{let n=await this.dispatch(e,i,t);this.respond(e,r,n)}catch(n){n instanceof T?this.respondError(e,r,n.message,n.code):this.respondError(e,r,n instanceof Error?n.message:String(n))}return!0}async seedOnBoot(){try{await Oe()}catch(e){process.stderr.write(`[sootsim-agent] seedFromDemoAppRegistry failed: ${e instanceof Error?e.message:String(e)}
4
+ import{b as Te,c as q,d as Ce,e as X,f as Ee,h as Ie,i as _,j as xe,k as Re,l as Pe,m as Oe,q as _e,t as T,u as Le,v as Me,w as Be,x as De}from"./chunk-6JBXWVSP.js";import"./chunk-5WXRC4BW.js";import{a as we,b as Ae,d as ke}from"./chunk-A6JPQM7B.js";import{e as be}from"./chunk-R3HLZSGB.js";import"./chunk-6VPR6OTH.js";import"./chunk-RAYAIDJI.js";import{a as ge,c as Se,d as D,e as ye}from"./chunk-IXYE6F2D.js";import{d as ve}from"./chunk-WR6QFC62.js";import{b as z,d as E,l as B}from"./chunk-VSGEEW3N.js";import"./chunk-RE2IODEB.js";import"./chunk-VKOEADVP.js";import{c as me,d as fe}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import{c as O}from"./chunk-UQXSAYWY.js";import{f as M}from"./chunk-ZAUPKGQP.js";import{A as V,B as re,J as ne,L,M as K,N as se,O as oe,P as ae,R as ce,U as de,V as le,W as ue,X as G,Y as pe,g as ee,h as te,r as ie}from"./chunk-GQVWJWCZ.js";import{a as he}from"./chunk-U52Z6BML.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";import{spawn as Ut}from"child_process";import w from"fs";import{createServer as jt}from"http";import v from"path";import{WebSocket as g,WebSocketServer as Ft}from"ws";import je from"node:fs";import H from"node:path";import{spawn as dt}from"node:child_process";var He=/^[A-Za-z0-9._:-]{1,160}$/;function Y(o){if(!o?.startsWith("TM_SESSION:"))return null;let e=o.slice(11).trim();return He.test(e)?e:null}function Ne(o){return He.test(o)}function lt(o){return typeof o.text=="string"?o.text.trim():""}function ut(o){let e=o?.trim();return e||"tm"}async function Ue(o){let e=o.sessionId.trim();if(!Ne(e))throw new Error(`invalid Team Machine session id: ${e||"<empty>"}`);let t=lt(o.prompt);if(!t)throw new Error("prompt text is empty");let i=ut(o.command),r=o.timeoutMs??15e3;await new Promise((n,c)=>{let s=dt(i,["send",e,t],{stdio:["ignore","ignore","pipe"],env:process.env}),a="",l=setTimeout(()=>{try{s.kill("SIGTERM")}catch{}c(new Error(`tm send timed out after ${Math.round(r/1e3)}s`))},r);s.stderr?.setEncoding("utf8"),s.stderr?.on("data",d=>{a.length<4e3&&(a+=String(d))}),s.on("error",d=>{clearTimeout(l),c(d)}),s.on("exit",(d,u)=>{if(clearTimeout(l),d===0){n();return}let p=a.trim();c(new Error(p||`tm send exited with ${u?`signal ${u}`:`code ${d??"unknown"}`}`))})})}var N=1,pt=25;function ht(){return[Number(process.env.VITE_PORT_WEB||process.env.PORT||3e3),Number(process.env.VITE_PORT_ZERO||7849),Number(process.env.VITE_PORT_R2||9500)].filter(o=>Number.isFinite(o)&&o>0)}var U=class{subscriptions=new Map;sessionsBySocket=new Map;allSockets=new Set;pendingPromptEchoes=new Map;pendingTurns=new Map;pendingSessionStates=new Map;pendingSessionPatches=new Map;sessionStatusPersistTimer=null;opts;constructor(e={}){this.opts=e}registerSocket(e){this.allSockets.add(e)}unregisterSocket(e){let t=this.sessionsBySocket.get(e);if(t){for(let i of t)this.decrementSubscription(i);this.sessionsBySocket.delete(e)}this.allSockets.delete(e)}async handleMessage(e,t){let i=t?.type;if(typeof i!="string"||!i.startsWith("agent:"))return!1;let r=t.id;try{let n=await this.dispatch(e,i,t);this.respond(e,r,n)}catch(n){n instanceof T?this.respondError(e,r,n.message,n.code):this.respondError(e,r,n instanceof Error?n.message:String(n))}return!0}async seedOnBoot(){try{await Oe()}catch(e){process.stderr.write(`[sootsim-agent] seedFromDemoAppRegistry failed: ${e instanceof Error?e.message:String(e)}
5
5
  `)}}close(){this.sessionStatusPersistTimer&&(clearTimeout(this.sessionStatusPersistTimer),this.sessionStatusPersistTimer=null),this.flushSessionStatuses();for(let e of this.subscriptions.values())try{e.unsubscribe()}catch{}this.subscriptions.clear(),this.sessionsBySocket.clear(),this.allSockets.clear()}async dispatch(e,t,i){switch(t){case"agent:list-projects":return X();case"agent:upsert-project":return q(i.input??{});case"agent:delete-project":return Ie(String(i.projectId)),{ok:!0};case"agent:auto-attach-for-url":return this.autoAttachForUrl(i.input??{});case"agent:list-sessions":return xe(i.projectId?String(i.projectId):void 0);case"agent:start-session":return this.doStartSession(i.input??{});case"agent:send-claimed-prompt":return this.sendClaimedPrompt(i);case"agent:send-prompt":{let n=String(i.sessionId),c=_(n);if(!c)throw new T("NO_SESSION",`no session: ${n}`);let s=this.normalizePromptEnvelope(i);return await Me(n,s),this.notePromptAccepted(n,s,c.status==="working")}case"agent:end-session":this.dropSessionFanout(String(i.sessionId)),await Be(String(i.sessionId));let r=_(String(i.sessionId));return r&&this.broadcastSessionStatus(r),{ok:!0};case"agent:get-transcript":return this.getTranscript(String(i.sessionId));case"agent:get-paths":return this.getPaths();case"agent:subscribe-events":return this.subscribeSocket(e,String(i.sessionId));case"agent:unsubscribe-events":return this.unsubscribeSocket(e,String(i.sessionId));default:throw new T("UNKNOWN_AGENT_MSG",`unknown agent message: ${t}`)}}async sendClaimedPrompt(e){let t=typeof e.simId=="string"?e.simId.trim():"";if(!t)throw new T("NO_SIM","agent:send-claimed-prompt requires simId");let i=this.opts.resolveCliLease?.(t)??null;if(!i||i.kind!=="cli"||i.expiresAt<=Date.now())throw new T("NO_CLAIM",`sim ${t} has no active CLI claim`);let r=Y(i.cliIdentityKey);if(!r)throw new T("UNSUPPORTED_CLAIM",`sim ${t} is claimed by a CLI identity that is not promptable`);return await Ue({sessionId:r,prompt:this.normalizePromptEnvelope(e)}),{ok:!0,routed:"team-machine",sessionId:r}}async doStartSession(e){if(!Ce(e.projectId))throw new T("NO_PROJECT",`no project: ${e.projectId}`);let i=await Le(e);return this.broadcastSessionStatus(i.session),i}async autoAttachForUrl(e){let t=e.bundleUrl??"",i=(()=>{try{return new URL(t).port||null}catch{return null}})();if(!i)return{project:null};let r=this.opts.getExcludePorts?.()??ht(),c=(await B({excludePorts:r})).find(d=>String(d.port)===i);if(!c||!c.cwd)return{project:null};let s=X().find(d=>d.cwd===c.cwd)??null,a=Array.from(new Set([...s?.knownBundleUrls??[],c.bundleUrl,t]));return{project:q({cwd:c.cwd,name:c.projectName??H.basename(c.cwd),preferredProvider:e.provider??s?.preferredProvider,sourceRoots:s?.sourceRoots??[c.cwd],knownBundleUrls:a,framework:s?.framework??mt(c.framework),bundleId:c.bundleId??s?.bundleId})}}getTranscript(e){let t=_e(e);return je.existsSync(t)?je.readFileSync(t,"utf8"):{error:"transcript not found",code:"NO_TRANSCRIPT"}}getPaths(){let e=Te();return{userDataDir:e,storeFile:H.join(e,"attached-projects.json"),sessionsDir:H.join(e,"sessions"),transcriptsDir:H.join(e,"transcripts")}}subscribeSocket(e,t){let i=this.sessionsBySocket.get(e);if(i||(i=new Set,this.sessionsBySocket.set(e,i)),i.has(t))return{ok:!0,refCount:this.subscriptions.get(t)?.refCount??1};i.add(t);let r=this.subscriptions.get(t);if(r)return r.refCount++,{ok:!0,refCount:r.refCount};let n=De(t,c=>{let s=this.coalescePromptEcho(t,c);if(s&&(this.applySessionEvent(t,s),this.fanOutEvent(t,s)),c.type==="turn-completed"){let a=_(t);if(a)try{Ee(a.projectId,{usd:c.costUsd,ts:c.ts})}catch(l){process.stderr.write(`[sootsim-agent] recordTurnTelemetry failed: ${l instanceof Error?l.message:String(l)}
6
6
  `)}}});return this.subscriptions.set(t,{unsubscribe:n,refCount:1}),{ok:!0,refCount:1}}unsubscribeSocket(e,t){let i=this.sessionsBySocket.get(e);return!i||!i.has(t)?{ok:!0,refCount:0}:(i.delete(t),this.decrementSubscription(t))}decrementSubscription(e){let t=this.subscriptions.get(e);if(!t)return{ok:!0,refCount:0};if(t.refCount--,t.refCount<=0){try{t.unsubscribe()}catch{}return this.subscriptions.delete(e),{ok:!0,refCount:0}}return{ok:!0,refCount:t.refCount}}dropSessionFanout(e){let t=this.subscriptions.get(e);if(t){try{t.unsubscribe()}catch{}this.subscriptions.delete(e)}for(let i of this.sessionsBySocket.values())i.delete(e);this.clearPromptTracking(e)}normalizePromptEnvelope(e){if(e?.prompt&&typeof e.prompt=="object"){let t=e.prompt;return{text:String(t.text??""),...typeof t.displayText=="string"?{displayText:t.displayText}:{},...typeof t.inspectSummary=="string"?{inspectSummary:t.inspectSummary}:{},...typeof t.inspectTrace=="string"?{inspectTrace:t.inspectTrace}:{}}}return{text:String(e?.text??""),...typeof e?.displayText=="string"?{displayText:e.displayText}:{},...typeof e?.inspectSummary=="string"?{inspectSummary:e.inspectSummary}:{},...typeof e?.inspectTrace=="string"?{inspectTrace:e.inspectTrace}:{}}}notePromptAccepted(e,t,i){let r=Date.now(),n=this.pendingPromptEchoes.get(e)??[];n.push({sentAt:r}),this.pendingPromptEchoes.set(e,n);let c=Math.max(this.pendingTurns.get(e)??0,i?1:0)+1;this.pendingTurns.set(e,c);let s=t.displayText??t.text;return this.patchSession(e,{lastPrompt:s,status:"working",needsAttention:!1}),this.fanOutEvent(e,{type:"prompt-received",text:s,...t.inspectSummary?{inspectSummary:t.inspectSummary}:{},...t.inspectTrace?{inspectTrace:t.inspectTrace}:{},ts:r}),{ok:!0,queued:c>1,pendingTurns:c,queueDepth:Math.max(0,c-1)}}applySessionEvent(e,t){switch(t.type){case"prompt-received":case"turn-started":this.patchSession(e,{status:"working",needsAttention:!1});return;case"turn-completed":{let i=this.consumeSettledTurn(e);this.patchSession(e,{status:i>0?"working":"idle",needsAttention:!1,lastTurnFiles:t.filesTouched,currentlyEditing:void 0});return}case"approval-needed":this.patchSession(e,{status:"needs-attention",needsAttention:!0});return;case"error":{let i=this.consumeSettledTurn(e);this.patchSession(e,{status:i>0?"working":"needs-attention",needsAttention:i<=0,currentlyEditing:void 0});return}case"exited":this.clearPromptTracking(e),this.patchSession(e,{status:"ended",needsAttention:!1,wrapperPid:void 0,currentlyEditing:void 0});return;case"ready":case"turn-reasoning":case"turn-message":case"turn-plan":case"tool-call":case"file-edited":case"file-diff-delta":return}}patchSession(e,t){let i=this.pendingSessionStates.get(e)??_(e);if(!i)return;let r=Re(i,t);this.pendingSessionStates.set(e,r),this.pendingSessionPatches.set(e,{...this.pendingSessionPatches.get(e),...t}),this.broadcastSessionStatus(r),!this.sessionStatusPersistTimer&&(this.sessionStatusPersistTimer=setTimeout(()=>{this.sessionStatusPersistTimer=null,this.flushSessionStatuses()},pt))}flushSessionStatuses(){if(this.pendingSessionPatches.size===0)return;let e=this.pendingSessionStates,t=this.pendingSessionPatches;this.pendingSessionStates=new Map,this.pendingSessionPatches=new Map;try{Pe([...t].map(([i,r])=>({id:i,patch:r})))}catch(i){for(let[r,n]of e)this.pendingSessionStates.has(r)||this.pendingSessionStates.set(r,n);for(let[r,n]of t)this.pendingSessionPatches.set(r,{...n,...this.pendingSessionPatches.get(r)});process.stderr.write(`[sootsim-agent] session status persistence failed: ${i instanceof Error?i.message:String(i)}
7
7
  `)}}coalescePromptEcho(e,t){if(t.type!=="prompt-received")return t;let i=this.pendingPromptEchoes.get(e);if(!i||i.length===0)return t;for(;i.length>0&&Date.now()-i[0].sentAt>15e3;)i.shift();return i.length===0?(this.pendingPromptEchoes.delete(e),t):(i.shift(),i.length===0?this.pendingPromptEchoes.delete(e):this.pendingPromptEchoes.set(e,i),null)}consumeSettledTurn(e){let t=Math.max(0,(this.pendingTurns.get(e)??1)-1);return t>0?this.pendingTurns.set(e,t):this.pendingTurns.delete(e),t}clearPromptTracking(e){this.pendingPromptEchoes.delete(e),this.pendingTurns.delete(e)}fanOutEvent(e,t){let i=JSON.stringify({type:"agent:event",sessionId:e,event:t});for(let[r,n]of this.sessionsBySocket)if(n.has(e)&&r.readyState===N)try{r.send(i)}catch{}}broadcastSessionStatus(e){let t=JSON.stringify({type:"agent:session-status",session:e});for(let i of this.allSockets)if(i.readyState===N)try{i.send(t)}catch{}}respond(e,t,i){if(e.readyState===N)try{e.send(JSON.stringify({id:t,result:i}))}catch{}}respondError(e,t,i,r){if(e.readyState===N)try{e.send(JSON.stringify({id:t,error:i,...r?{code:r}:{}}))}catch{}}};function mt(o){return o==="expo"?"expo":o==="one"||o==="vxrn"?"one":"unknown"}import We from"http";import $e from"https";import{finished as St,pipeline as yt}from"stream/promises";var Z="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36",ft=[{hostSuffix:"uniswap.org",headers:{origin:"https://app.uniswap.org",referer:"https://app.uniswap.org/"},suppressBrowserUserAgent:!0}];function gt(o){let e=o.toLowerCase();for(let t of ft)if(e===t.hostSuffix||e.endsWith(`.${t.hostSuffix}`))return t}function Fe(o){let e=gt(o.hostname);return{"accept-encoding":"identity",...e?.suppressBrowserUserAgent?{}:{"user-agent":Z},...e?.headers}}var vt=new Set(["host","origin","referer","user-agent","accept-encoding","cookie","connection","keep-alive","transfer-encoding","upgrade","content-length","sec-fetch-site","sec-fetch-mode","sec-fetch-dest","sec-ch-ua","sec-ch-ua-mobile","sec-ch-ua-platform"]),bt={"access-control-allow-origin":"*","access-control-allow-methods":"GET,POST,PUT,DELETE,PATCH,OPTIONS","access-control-allow-headers":"*","access-control-expose-headers":"*","access-control-max-age":"3600"},wt=new Set(["host","origin","referer","sec-fetch-site","sec-fetch-mode","sec-fetch-dest"]);function Je(o){return o.protocol!=="https:"?{}:E(o.hostname)?{rejectUnauthorized:!1}:{}}function C(o){for(let[e,t]of Object.entries(bt))o.setHeader(e,t)}function At(o,e){let t=[],i=e;i?.code&&t.push(i.code),i?.message&&t.push(i.message),i?.cause?.code&&t.push(i.cause.code),i?.cause?.message&&t.push(i.cause.message);let n=[...new Set(t.filter(Boolean))].join(" | ")||String(e);return o.includes("stored-in-.env.local")?`${n} | upstream url still contains placeholder env values`:n}function kt(o,e){let t={};for(let[i,r]of Object.entries(o))r&&(vt.has(i.toLowerCase())||(t[i]=Array.isArray(r)?r.join(", "):r));return Object.assign(t,e?Fe(e):{"user-agent":Z}),t}function Tt(o,e){let t={};for(let[i,r]of Object.entries(o))r&&(wt.has(i.toLowerCase())||(t[i]=r));return t.host=e.host,t.origin=e.origin,t.referer=`${e.origin}/`,t}function Ve(o){return o?.startsWith("/__fetch-proxy?")||o?.startsWith("/__proxy?")||!1}function Ke(o){return o?!!(o.startsWith("/__app-api?")||o.startsWith("/__app-api/")):!1}async function Q(o,e){if(o.method==="OPTIONS"){C(e),e.writeHead(204),e.end();return}let i=new URLSearchParams((o.url||"").split("?")[1]||"").get("url");if(!i){C(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("missing url param");return}let r;try{r=new URL(i)}catch{C(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("invalid url param");return}let n;if(o.method!=="GET"&&o.method!=="HEAD"){let a=[];for await(let l of o)a.push(Buffer.isBuffer(l)?l:Buffer.from(l));a.length>0&&(n=Buffer.concat(a))}let c=o.method||"GET",s=async(a,l,d,u)=>{let p=a.protocol==="https:"?$e:We,h=kt(o.headers,a);a.origin!==r.origin&&(delete h.authorization,delete h["proxy-authorization"]),l==="GET"||l==="HEAD"?(delete h["content-length"],delete h["content-type"]):d&&(h["content-length"]=String(d.byteLength));let m=await new Promise((A,k)=>{let y=p.request({hostname:z(a.hostname),port:a.port||(a.protocol==="https:"?443:80),path:a.pathname+a.search,method:l,headers:h,...Je(a)},A),R=()=>y.destroy(new Error("fetch proxy client disconnected"));o.once("aborted",R),y.once("close",()=>o.off("aborted",R)),y.once("error",k),d===void 0?y.end():y.end(d)}),S=m.statusCode??502,f=m.headers.location;if(f&&(S===301||S===302||S===303||S===307||S===308)){if(u>=10)throw m.destroy(),new Error("too many redirects");let A=(S===301||S===302)&&l==="POST"||S===303&&l!=="GET"&&l!=="HEAD",k=new URL(f,a);m.resume(),await St(m),await s(k,A?"GET":l,A?void 0:d,u+1);return}for(let[A,k]of Object.entries(m.headers)){let y=A.toLowerCase();k===void 0||y==="set-cookie"||y==="connection"||y==="keep-alive"||y==="proxy-authenticate"||y==="proxy-authorization"||y==="te"||y==="trailer"||y==="transfer-encoding"||y==="upgrade"||y.startsWith("access-control-")||e.setHeader(A,k)}C(e);let b=m.headers["set-cookie"]??[];b.length>0&&e.setHeader("x-sootsim-set-cookie",(Array.isArray(b)?b:[b]).join(", ")),e.statusCode=S,await yt(m,e)};try{await s(r,c,n,0)}catch(a){if(e.headersSent){e.destroy(a instanceof Error?a:new Error(String(a)));return}C(e),e.writeHead(502,{"Content-Type":"text/plain"}),e.end(`fetch proxy error: ${At(r.href,a)}`)}}async function Ge(o,e){let i=new URLSearchParams((o.url||"").split("?")[1]||"").get("url");if(!i){C(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("bundle-proxy: missing url query param");return}let r;try{r=new URL(i)}catch{C(e),e.writeHead(400,{"Content-Type":"text/plain"}),e.end("bundle-proxy: invalid url");return}if(!E(r.hostname)){C(e),e.writeHead(403,{"Content-Type":"text/plain"}),e.end("bundle-proxy: only loopback targets allowed");return}await Q(o,e)}function ze(o,e){let t=o.url||"",i="",r="";if(t.startsWith("/__app-api?")){let l=new URL(t,"http://sootsim.local");i=l.searchParams.get("path")||"",r=l.searchParams.get("origin")?.trim()||""}else if(t.startsWith("/__app-api/"))i=t.slice(10);else return!1;if(!r)return e.writeHead(400,{"Content-Type":"text/plain"}),e.end("app-api: missing origin query param"),!0;if(o.method==="OPTIONS")return e.writeHead(204,{"Access-Control-Allow-Origin":o.headers.origin||"*","Access-Control-Allow-Methods":"GET,POST,PUT,PATCH,DELETE,OPTIONS","Access-Control-Allow-Headers":o.headers["access-control-request-headers"]||"*","Access-Control-Allow-Credentials":"true","Access-Control-Max-Age":"86400"}),e.end(),!0;let n;try{n=new URL(i,r)}catch{return e.writeHead(400,{"Content-Type":"text/plain"}),e.end("app-api: invalid origin or path"),!0}let c=n.protocol==="https:"?$e:We,s=Tt(o.headers,n),a=c.request({hostname:z(n.hostname),port:n.port||(n.protocol==="https:"?443:80),path:n.pathname+n.search,method:o.method,headers:s,...Je(n)},l=>{let d=Object.keys(l.headers).filter(u=>{let p=u.toLowerCase();return!p.startsWith("access-control-")&&p!=="set-cookie"}).join(", ");e.writeHead(l.statusCode??502,{...l.headers,"access-control-allow-origin":o.headers.origin||"*","access-control-allow-credentials":"true","access-control-expose-headers":d}),l.pipe(e)});return a.on("error",l=>{e.statusCode=502,e.end(`app proxy error: ${l.message}`)}),o.pipe(a),!0}import qe from"node:fs";import Ct from"node:path";var Xe=1,j=class extends Error{},F=class{registered=new Map;open=new Map;byRoot=new Map;nextPlaneId=1;async handleMessage(e,t){if(typeof t!="object"||t===null)return!1;let i={...t},r=i.type;if(typeof r!="string"||!r.startsWith("plane:"))return!1;let n=i.id;try{this.respond(e,n,await this.dispatch(e,r,i))}catch(c){let s=c instanceof j?"plane-not-registered":void 0;this.respondError(e,n,c instanceof Error?c.message:String(c),s)}return!0}unregisterSocket(e){for(let[t,i]of[...this.registered]){if(!i.delete(e)||i.size>0)continue;this.registered.delete(t);let r=this.byRoot.get(t);r&&(this.open.delete(r),this.byRoot.delete(t))}for(let[t,i]of[...this.open])i.sockets.delete(e),i.sockets.size===0&&!this.registered.has(i.root)&&(this.open.delete(t),this.byRoot.delete(i.root))}registeredRoots(){return[...this.registered.keys()]}async dispatch(e,t,i){switch(t){case"plane:register":{let r=this.realRoot(String(i.root??"")),n=this.registered.get(r)??new Set;return n.add(e),this.registered.set(r,n),{root:r,holders:n.size}}case"plane:status":{let r=this.realRoot(String(i.root??"")),n=this.registered.get(r);return{root:r,holders:n?.size??0,registered:!!n}}case"plane:open":{let r=this.realRoot(String(i.root??""));if(!this.registered.has(r))throw new j(`no box has registered ${r}; start one with \`rnx box\` there`);let n=this.byRoot.get(r),c=n?this.open.get(n):void 0;if(n&&c)return c.sockets.add(e),{planeId:n,version:c.version};let s=new ke(r);await s.refresh();let a=`plane-${this.nextPlaneId++}`,l={root:r,plane:s,version:we(s.index()),sockets:new Set([e])};return this.open.set(a,l),this.byRoot.set(r,a),{planeId:a,version:l.version}}case"plane:close":{let r=this.open.get(String(i.planeId??""));return r&&r.sockets.delete(e),{ok:!0}}default:{let r=this.entry(i),n=await Ae(r.plane,t,i);if(!n)throw new Error(`unknown plane command: ${t}`);return n.version&&(r.version=n.version),n.result}}}entry(e){let t=this.open.get(String(e.planeId??""));if(!t)throw new Error(`unknown planeId: ${String(e.planeId)}`);return t}realRoot(e){if(!e)throw new Error("root is required");let t=Ct.resolve(e),i;try{i=qe.realpathSync(t)}catch{throw new Error(`no such directory: ${t}`)}if(!qe.statSync(i).isDirectory())throw new Error(`not a directory: ${i}`);return i}respond(e,t,i){if(e.readyState===Xe)try{e.send(JSON.stringify({id:t,result:i}))}catch{}}respondError(e,t,i,r){if(e.readyState===Xe)try{e.send(JSON.stringify({id:t,error:i,...r?{code:r}:{}}))}catch{}}};import Ye from"node:fs/promises";import I from"node:path";import{build as Et}from"esbuild";var Ze="/__sootsim-replacement-module";function It(o){switch(I.extname(o).toLowerCase()){case".js":return"js";case".jsx":return"jsx";case".ts":return"ts";case".tsx":return"tsx";default:return null}}function xt(o,e,t){let i=o.headers.origin,r;if(i)try{E(new URL(i).hostname)&&(r=i)}catch{}e.writeHead(200,{"Content-Type":"application/javascript; charset=utf-8","Cache-Control":"no-cache",...r?{"Access-Control-Allow-Origin":r,Vary:"Origin"}:{}}),e.end(o.method==="HEAD"?void 0:t)}function Qe(o){if(!o)return!1;try{return new URL(o,"http://rnx.local").pathname===Ze}catch{return!1}}async function et(o,e,t={}){let i=o.url||"",r;try{r=new URL(i,"http://rnx.local")}catch{return!1}if(t.requireLoopbackOrigin){let d=o.headers.origin,u=o.socket.remoteAddress?.replace(/^::ffff:/,""),p=!!(u&&E(u));if(p&&d)try{p=E(new URL(d).hostname)}catch{p=!1}if(!p)return e.writeHead(403,{"Content-Type":"text/plain; charset=utf-8"}),e.end("replacement modules are available only to loopback origins"),!0}if(r.pathname!==Ze)return!1;if(t.requestToken&&r.searchParams.get("token")!==t.requestToken)return e.writeHead(403,{"Content-Type":"text/plain; charset=utf-8"}),e.end("replacement module request token is invalid"),!0;let n=r.searchParams.get("path");if(!n)return e.writeHead(400,{"Content-Type":"text/plain; charset=utf-8"}),e.end("missing path param"),!0;if(!It(n))return e.writeHead(400,{"Content-Type":"text/plain; charset=utf-8"}),e.end("replacement files must be .js, .jsx, .ts, or .tsx"),!0;if(!I.isAbsolute(n))return e.writeHead(400,{"Content-Type":"text/plain; charset=utf-8"}),e.end("replacement file path must be absolute"),!0;let s=new Set(r.searchParams.getAll("runtimePackage")),a;if(t.projectRoot){let d=I.resolve(t.projectRoot);a=await Ye.realpath(t.projectRoot);let u=I.relative(d,n);if(u.startsWith("..")||I.isAbsolute(u))return e.writeHead(403,{"Content-Type":"text/plain; charset=utf-8"}),e.end("replacement file must be inside the project root"),!0}let l;try{l=await Ye.realpath(n)}catch(d){let u=d instanceof Error?d.message:String(d);return e.writeHead(404,{"Content-Type":"text/plain; charset=utf-8"}),e.end(`replacement file not found: ${u}`),!0}if(a){let d=I.relative(a,l);if(d.startsWith("..")||I.isAbsolute(d))return e.writeHead(403,{"Content-Type":"text/plain; charset=utf-8"}),e.end("replacement file must be inside the project root"),!0}try{let d=await Et({entryPoints:[l],bundle:!0,write:!1,format:"esm",platform:"browser",target:"es2022",jsx:"transform",jsxFactory:"React.createElement",jsxFragment:"React.Fragment",tsconfigRaw:{compilerOptions:{jsx:"react"}},sourcemap:"inline",logLevel:"silent",plugins:[{name:"sootsim-replacement-runtime",setup(u){u.onResolve({filter:/^(react|react-native|react\/jsx-runtime|react\/jsx-dev-runtime)$/},p=>({path:p.path,namespace:"sootsim-replacement-runtime"})),u.onResolve({filter:/.*/},p=>s.has(p.path)?{path:p.path,namespace:"sootsim-replacement-runtime"}:void 0),u.onLoad({filter:/.*/,namespace:"sootsim-replacement-runtime"},p=>p.path==="react-native"?{contents:`const bridge = globalThis.__sootsim_components__
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.374 | (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-SNMLG22Y.js";import"./chunk-RXDJ422X.js";import"./chunk-KN6LU33B.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-UAMMP7U7.js";import"./chunk-7PBNTA3M.js";import"./chunk-DYE6WT2Q.js";import"./chunk-2MI2ROT4.js";import"./chunk-VOYUOTN2.js";import"./chunk-7DLC2M6S.js";import"./chunk-PYH2MNFB.js";import"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-UQXSAYWY.js";import"./chunk-2QVA4PPE.js";import"./chunk-XSXSVO4P.js";import"./chunk-ZAUPKGQP.js";import"./chunk-Y3LVGZKE.js";import"./chunk-6PV4QLZ7.js";import"./chunk-PZYF2TKR.js";import"./chunk-VDCYIT2N.js";import"./chunk-GQVWJWCZ.js";import"./chunk-U52Z6BML.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";export{a as runSetup};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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}from"./chunk-R7HMFLXI.js";import"./chunk-7FYOZQBM.js";import"./chunk-CZ2FOZVC.js";import"./chunk-DQOQQFMP.js";import"./chunk-I37LRPZ3.js";import"./chunk-WR7LRCYW.js";export{i as SimClient,a as SimClientError,b as SimConnectError,e as SimKeyboardError,f as SimPerformError,c as SimReadyTimeoutError,g as SimResetError,d as SimTapError,h as buildSimOpenUrl};
4
+ import{a,b,c,d,e,f,g,h,i}from"./chunk-IQ5HBVID.js";import"./chunk-G2IBWLBT.js";import"./chunk-QKYOZQKE.js";import"./chunk-2W6ADNTG.js";import"./chunk-4S5CIP7Y.js";import"./chunk-RU565DEH.js";export{i as SimClient,a as SimClientError,b as SimConnectError,e as SimKeyboardError,f as SimPerformError,c as SimReadyTimeoutError,g as SimResetError,d as SimTapError,h as buildSimOpenUrl};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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}from"./chunk-YWTBN7SD.js";import{a as S}from"./chunk-MSM2E74F.js";import"./chunk-WR7LRCYW.js";import*as s from"fs";import*as b from"os";import*as a from"path";import{fileURLToPath as y}from"url";function j(){try{let t=y(import.meta.resolve(`${S.packageName}/package.json`));return a.join(a.dirname(t),"skills")}catch{let t=a.dirname(y(import.meta.url));return a.resolve(t,"../../skills")}}var g=j(),v=new Set(["all","codex","claude"]);function x(){console.log(`rnx skill
4
+ import{c}from"./chunk-UQXSAYWY.js";import{a as S}from"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";import*as s from"fs";import*as b from"os";import*as a from"path";import{fileURLToPath as y}from"url";function j(){try{let t=y(import.meta.resolve(`${S.packageName}/package.json`));return a.join(a.dirname(t),"skills")}catch{let t=a.dirname(y(import.meta.url));return a.resolve(t,"../../skills")}}var g=j(),v=new Set(["all","codex","claude"]);function x(){console.log(`rnx skill
5
5
 
6
6
  install and inspect bundled rnx agent skills.
7
7
 
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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{m as g}from"./chunk-4UMODU6C.js";import{f as a,g as u}from"./chunk-I37LRPZ3.js";import{t as c,v as l}from"./chunk-MKHW3JNL.js";import"./chunk-KVVNCIJA.js";import"./chunk-QA2PTSOC.js";import"./chunk-WR7LRCYW.js";function d(t){return!!t&&typeof t=="object"&&typeof Reflect.get(t,"capturedAt")=="number"&&(Reflect.get(t,"tree")===void 0||a(Reflect.get(t,"tree")))}function f(){console.log(`
4
+ import{m as g}from"./chunk-2XDNHF7N.js";import{f as a,g as u}from"./chunk-4S5CIP7Y.js";import{t as c,v as l}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";function d(t){return!!t&&typeof t=="object"&&typeof Reflect.get(t,"capturedAt")=="number"&&(Reflect.get(t,"tree")===void 0||a(Reflect.get(t,"tree")))}function f(){console.log(`
5
5
  rnx state - capture the current app state in one call
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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 f}from"./chunk-GPYG2L7R.js";import{b as t,c as l,d as s,e as c,f as a}from"./chunk-HDGZAVH3.js";import"./chunk-4UMODU6C.js";import"./chunk-I37LRPZ3.js";import"./chunk-MKHW3JNL.js";import"./chunk-KVVNCIJA.js";import"./chunk-QA2PTSOC.js";import"./chunk-WR7LRCYW.js";function p(){console.log(`
4
+ import{a as f}from"./chunk-XL53SSTO.js";import{b as t,c as l,d as s,e as c,f as a}from"./chunk-KWUKKULB.js";import"./chunk-2XDNHF7N.js";import"./chunk-4S5CIP7Y.js";import"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";function p(){console.log(`
5
5
  rnx storage profile \u2014 manage isolated storage profiles
6
6
 
7
7
  usage:
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.374 | (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-KOSLTZXQ.js";import"./chunk-PYH2MNFB.js";import"./chunk-RU565DEH.js";export{a as settingsStore};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c,d}from"./chunk-Y3LVGZKE.js";import"./chunk-6PV4QLZ7.js";import"./chunk-PZYF2TKR.js";import"./chunk-VDCYIT2N.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";export{a as buildCliDiagnosticEvent,d as flushCliTelemetry,b as trackCliDiagnostic,c as trackCliError};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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 d,v as u,y as i}from"./chunk-MKHW3JNL.js";import"./chunk-KVVNCIJA.js";import{c as o}from"./chunk-YWTBN7SD.js";import"./chunk-QA2PTSOC.js";import"./chunk-WR7LRCYW.js";import{writeFileSync as b}from"fs";function p(){console.log(`
4
+ import{t as d,v as u,y as i}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import{c as o}from"./chunk-UQXSAYWY.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";import{writeFileSync as b}from"fs";function p(){console.log(`
5
5
  rnx timeline \u2014 control the semantic event timeline
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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 h,b as v,c as $}from"./chunk-Q7JSU5DI.js";import{b as p}from"./chunk-G5G7PQKO.js";import"./chunk-2MA3Q44D.js";import"./chunk-MKHW3JNL.js";import"./chunk-KVVNCIJA.js";import"./chunk-YWTBN7SD.js";import{b as g}from"./chunk-2OA2WE7G.js";import{M as a,g as m,h as u,l as d}from"./chunk-QA2PTSOC.js";import{a as f}from"./chunk-P6K6XFWE.js";import"./chunk-MSM2E74F.js";import"./chunk-WR7LRCYW.js";import{spawn as y}from"node:child_process";import x from"node:fs";import R from"node:os";import s from"node:path";var b="https://registry.npmjs.org/rnxsim/latest";async function W(t){let n=t.indexOf("--channel"),e=n>=0&&t[n+1]?t[n+1]:void 0;console.log(`rnx upgrade
4
+ import{a as h,b as v,c as $}from"./chunk-N5GTOZJP.js";import{b as p}from"./chunk-PVGD4KKG.js";import"./chunk-VKOEADVP.js";import"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-UQXSAYWY.js";import{b as g}from"./chunk-ZAUPKGQP.js";import{M as a,g as m,h as u,l as d}from"./chunk-GQVWJWCZ.js";import{a as f}from"./chunk-U52Z6BML.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";import{spawn as y}from"node:child_process";import x from"node:fs";import R from"node:os";import s from"node:path";var b="https://registry.npmjs.org/rnxsim/latest";async function W(t){let n=t.indexOf("--channel"),e=n>=0&&t[n+1]?t[n+1]:void 0;console.log(`rnx upgrade
5
5
  `),console.log("runtime:");let o=a(),{config:l}=await p(),r=l?.runtimeVersion,c=r?x.existsSync(s.join(d(r),"index.html")):!1;r&&console.log(` project config: v${r}`);let i=(r&&c?null:await $(["install",...r?[r,"--set-active=false"]:[],...e?["--channel",e]:[]],{}))?.version??r??a();i&&console.log(r?c?` result: v${i} already installed for this project`:` result: not installed \u2192 v${i} for this project`:o&&o!==i?` result: v${o} \u2192 v${i}`:o?` result: v${i} already current`:` result: not installed \u2192 v${i}`);let k=i?await h(i):null;console.log(`
6
6
  cli:`),await j(),i&&console.log(`
7
7
  ${v(i,k)}`)}function w(){if(u())return{kind:"dev"};let t=process.argv[1]??"";try{t=x.realpathSync(t)}catch{}let n=s.sep;if(t.includes(`${n}_npx${n}`)||t.includes(`${n}.bunx${n}`))return{kind:"npx"};if(t.includes(`${n}.bun${n}`))return{kind:"global",command:"bun",args:["add","-g","rnxsim@latest"]};if(t.includes(`${n}pnpm${n}`))return{kind:"global",command:"pnpm",args:["add","-g","rnxsim@latest"]};let e=s.join(m(),"cli");if(t.startsWith(`${e}${n}`))return{kind:"global",command:"npm",args:["i","-g","--prefix",e,"rnxsim@latest"]};let o=s.resolve(process.env.SOOTSIM_CLI_PREFIX||s.join(R.homedir(),".local"));return t.startsWith(`${o}${n}`)?{kind:"global",command:"npm",args:["i","-g","--prefix",o,"rnxsim@latest"]}:{kind:"global",command:"npm",args:["i","-g","rnxsim@latest"]}}async function j(){let t=f(),n=await C();if(!n){console.log(` v${t} \u2014 couldn't reach the npm registry, skipped`);return}if(g(n,t)<=0){console.log(` v${t} (latest)`);return}let e=w();if(console.log(` v${t} \u2192 v${n}`),e.kind==="dev"){console.log(" running from the Contrast dev checkout \u2014 pull instead of upgrading");return}if(e.kind==="npx"){console.log(" running from the npx cache \u2014 get the latest with:"),console.log(" npx rnxsim@latest");return}let o=`${e.command} ${e.args.join(" ")}`;console.log(` updating global install (${o})\u2026`),await S(e.command,e.args)?console.log(` updated to v${n}`):(console.log(" update failed \u2014 run it yourself:"),console.log(` ${o}`))}function S(t,n){return new Promise(e=>{let o=y(t,n,{stdio:"inherit"});o.on("error",()=>e(!1)),o.on("exit",l=>e(l===0))})}async function C(){try{let t=await fetch(b,{headers:{accept:"application/json"},signal:AbortSignal.timeout(8e3)});if(!t.ok)return null;let n=await t.json();return typeof n.version=="string"&&n.version?n.version:null}catch{return null}}export{W as runUpgrade};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{e as a,f as b,g as c}from"./chunk-R3HLZSGB.js";import"./chunk-6VPR6OTH.js";import"./chunk-RAYAIDJI.js";import"./chunk-WR6QFC62.js";import"./chunk-VSGEEW3N.js";import"./chunk-RE2IODEB.js";import"./chunk-VKOEADVP.js";import"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-UQXSAYWY.js";import"./chunk-GQVWJWCZ.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};
@@ -1,6 +1,6 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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 a}from"./chunk-G5G7PQKO.js";import"./chunk-2MA3Q44D.js";import{a as m}from"./chunk-ZRQKEKHX.js";import"./chunk-MKHW3JNL.js";import"./chunk-KVVNCIJA.js";import{d as s,f as t}from"./chunk-2OA2WE7G.js";import{l as r}from"./chunk-QA2PTSOC.js";import{a as l}from"./chunk-P6K6XFWE.js";import"./chunk-MSM2E74F.js";import"./chunk-WR7LRCYW.js";import g from"node:fs";import d from"node:path";async function R($){let{IS_BETA:c,BETA_LABEL:u}=await import("./beta-KYS22QPY.js"),f=c?` \xB7 ${u}`:"";console.log(`rnx v${l()}${f}`);let o=m(),n=t.resolveChannel();o.isDevBridge?(console.log(o.primary),o.installedRuntime&&console.log(`${o.installedRuntime} \xB7 ${n}`)):o.primary==="runtime not installed"?console.log("runtime not installed \u2014 run `rnx runtime install`"):console.log(`${o.primary} \xB7 ${n}`);let{config:e}=await a();if(e?.runtimeVersion){let p=g.existsSync(d.join(r(e.runtimeVersion),"index.html"));console.log(`project runtime v${e.runtimeVersion} \xB7 configured \xB7 ${p?"installed":"installs on open"}`)}let i=await t.checkUpToDate({channel:n});i.outdated&&i.latest&&console.log(`
4
+ import{b as a}from"./chunk-PVGD4KKG.js";import"./chunk-VKOEADVP.js";import{a as m}from"./chunk-DYE6WT2Q.js";import"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import{d as s,f as t}from"./chunk-ZAUPKGQP.js";import{l as r}from"./chunk-GQVWJWCZ.js";import{a as l}from"./chunk-U52Z6BML.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";import g from"node:fs";import d from"node:path";async function R($){let{IS_BETA:c,BETA_LABEL:u}=await import("./beta-Q2VQZCLD.js"),f=c?` \xB7 ${u}`:"";console.log(`rnx v${l()}${f}`);let o=m(),n=t.resolveChannel();o.isDevBridge?(console.log(o.primary),o.installedRuntime&&console.log(`${o.installedRuntime} \xB7 ${n}`)):o.primary==="runtime not installed"?console.log("runtime not installed \u2014 run `rnx runtime install`"):console.log(`${o.primary} \xB7 ${n}`);let{config:e}=await a();if(e?.runtimeVersion){let p=g.existsSync(d.join(r(e.runtimeVersion),"index.html"));console.log(`project runtime v${e.runtimeVersion} \xB7 configured \xB7 ${p?"installed":"installs on open"}`)}let i=await t.checkUpToDate({channel:n});i.outdated&&i.latest&&console.log(`
5
5
  \u2191 default runtime v${i.latest} available; run \`rnx upgrade\``),console.log(`
6
6
  what's new: ${s}`)}export{R as runVersion};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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}from"./chunk-5Q6ZEZFF.js";import"./chunk-WR7LRCYW.js";export{b as COMPAT_CATEGORIES,j as COMPAT_RESULT_CAVEAT,c as POLYFILL_REGISTRY,a as UNSUPPORTABLE,f as countScanResults,i as formatDetailedScanLines,h as formatPackageStatus,g as formatScanCounts,d as scanDeps,e as scanDepsWithData};
4
+ import{a,b,c,d,e,f,g,h,i,j}from"./chunk-DB2JB52S.js";import"./chunk-RU565DEH.js";export{b as COMPAT_CATEGORIES,j as COMPAT_RESULT_CAVEAT,c as POLYFILL_REGISTRY,a as UNSUPPORTABLE,f as countScanResults,i as formatDetailedScanLines,h as formatPackageStatus,g as formatScanCounts,d as scanDeps,e as scanDepsWithData};
@@ -0,0 +1,5 @@
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a as t}from"./chunk-SNMLG22Y.js";import"./chunk-RXDJ422X.js";import"./chunk-KN6LU33B.js";import{q as e}from"./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-UAMMP7U7.js";import"./chunk-7PBNTA3M.js";import"./chunk-DYE6WT2Q.js";import"./chunk-2MI2ROT4.js";import"./chunk-VOYUOTN2.js";import"./chunk-7DLC2M6S.js";import"./chunk-PYH2MNFB.js";import"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-UQXSAYWY.js";import"./chunk-2QVA4PPE.js";import"./chunk-XSXSVO4P.js";import"./chunk-ZAUPKGQP.js";import"./chunk-Y3LVGZKE.js";import{a as r}from"./chunk-6PV4QLZ7.js";import{f as o}from"./chunk-PZYF2TKR.js";import"./chunk-VDCYIT2N.js";import{C as n}from"./chunk-GQVWJWCZ.js";import"./chunk-U52Z6BML.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.js";async function u(){return!n()&&r()?(await t([],{launchConnectRN:!0}),0):(o("Run any React Native app in a local simulator."),console.log(`
5
+ Opening ConnectRN`),await e(["ConnectRN","--no-describe","--quiet"]),0)}export{u as runWelcome};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (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 T,B as A,D as y,O as _,P as b,Q as S}from"./chunk-I37LRPZ3.js";import{e as x,t as N,v as F}from"./chunk-MKHW3JNL.js";import"./chunk-KVVNCIJA.js";import{c as k}from"./chunk-YWTBN7SD.js";import"./chunk-QA2PTSOC.js";import"./chunk-WR7LRCYW.js";function B(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--since"&&e+1<n.length){t.push(e,e+1);let s=n[e+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let c=Number(l[1]),u=l[2]??"ms",v=u==="s"?c*1e3:u==="m"?c*6e4:c;return{since:Date.now()-v,consumed:t}}let i=Number(s);if(Number.isFinite(i)&&i>1e12)return{since:i,consumed:t}}return{consumed:t}}function D(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--kinds"&&e+1<n.length)return t.push(e,e+1),{kinds:n[e+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:t};return{consumed:t}}function K(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--limit"&&e+1<n.length){t.push(e,e+1);let s=Number(n[e+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:t}}return{consumed:t}}function E(n){let t=[],e={label:"initial state",events:[],startedAt:n[0]?.t??null};t.push(e);for(let s of n)if(e.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,i=l?.phase;if(!i||i==="enter"||i==="appear"||i==="active"){let c=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;t.length===1&&e.events.length===1?e.label=`${s.kind}: ${c}`:(e={label:`${s.kind}: ${c}`,events:[],startedAt:s.t},t.push(e))}}return t}async function Q(n,t){let e=N(n,{port:t.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow","--noisy"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
4
+ import{A as T,B as A,D as y,O as _,P as b,Q as S}from"./chunk-4S5CIP7Y.js";import{e as x,t as N,v as F}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import{c as k}from"./chunk-UQXSAYWY.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";function B(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--since"&&e+1<n.length){t.push(e,e+1);let s=n[e+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let c=Number(l[1]),u=l[2]??"ms",v=u==="s"?c*1e3:u==="m"?c*6e4:c;return{since:Date.now()-v,consumed:t}}let i=Number(s);if(Number.isFinite(i)&&i>1e12)return{since:i,consumed:t}}return{consumed:t}}function D(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--kinds"&&e+1<n.length)return t.push(e,e+1),{kinds:n[e+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:t};return{consumed:t}}function K(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--limit"&&e+1<n.length){t.push(e,e+1);let s=Number(n[e+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:t}}return{consumed:t}}function E(n){let t=[],e={label:"initial state",events:[],startedAt:n[0]?.t??null};t.push(e);for(let s of n)if(e.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,i=l?.phase;if(!i||i==="enter"||i==="appear"||i==="active"){let c=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;t.length===1&&e.events.length===1?e.label=`${s.kind}: ${c}`:(e={label:`${s.kind}: ${c}`,events:[],startedAt:s.t},t.push(e))}}return t}async function Q(n,t){let e=N(n,{port:t.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow","--noisy"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
5
5
  rnx what-happened \u2014 show recent events from the semantic timeline
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{k as a,l as b,m as c,n as d,o as e,p as f,q as g,r as h,s as i,t as j,u as k,v as l,w as m,x as n,y as o,z as p}from"./chunk-MKHW3JNL.js";import"./chunk-KVVNCIJA.js";import"./chunk-QA2PTSOC.js";import"./chunk-WR7LRCYW.js";export{i as BridgeSimLockedError,a as RNX_PLACEMENT_ENV,f as bridgePortForShellBaseUrl,c as bridgeWsUrl,o as callInBridge,p as callInBridgeWrite,m as checkSimHealth,k as createBridge,l as createBridgeFromParsed,n as evalInBridge,j as parseBridgeCliArgs,h as printBridgeWorldNotice,d as resolveBridgeWorld,g as resolveDefaultBridgePort,b as resolvePlacement,e as worldForBridgePort};
4
+ import{k as a,l as b,m as c,n as d,o as e,p as f,q as g,r as h,s as i,t as j,u as k,v as l,w as m,x as n,y as o,z as p}from"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";export{i as BridgeSimLockedError,a as RNX_PLACEMENT_ENV,f as bridgePortForShellBaseUrl,c as bridgeWsUrl,o as callInBridge,p as callInBridgeWrite,m as checkSimHealth,k as createBridge,l as createBridgeFromParsed,n as evalInBridge,j as parseBridgeCliArgs,h as printBridgeWorldNotice,d as resolveBridgeWorld,g as resolveDefaultBridgePort,b as resolvePlacement,e as worldForBridgePort};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/beta.ts
4
4
  var IS_BETA = true;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/bridge-contract-input.ts
4
4
  var BridgeInputError = class extends Error {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.372 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;