rnxsim 0.1.361 → 0.1.363

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 (170) hide show
  1. package/dist-cli/bin.js +5 -5
  2. package/dist-cli/chunks/{agent-PE4FUR3F.js → agent-EN7USQWO.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-2DFZKYFA.js → agent-wrapper-4K2P2EBF.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-IHMQALV3.js → app-fonts-7B5E7UDM.js} +2 -2
  5. package/dist-cli/chunks/{assert-BYMM43UD.js → assert-WEQDRDJ2.js} +2 -2
  6. package/dist-cli/chunks/{auth-VBFSMZ3V.js → auth-U5GBY5SE.js} +2 -2
  7. package/dist-cli/chunks/{beta-NU3ESDII.js → beta-WOKLQLOJ.js} +2 -2
  8. package/dist-cli/chunks/{camera-6GNRDABG.js → camera-GRMP2HT3.js} +2 -2
  9. package/dist-cli/chunks/{chunk-DR2HRF43.js → chunk-23MIH7SN.js} +1 -1
  10. package/dist-cli/chunks/{chunk-FZWAUWMR.js → chunk-2AELGO56.js} +1 -1
  11. package/dist-cli/chunks/{chunk-E4QTH57Q.js → chunk-2IVWNQDE.js} +2 -2
  12. package/dist-cli/chunks/{chunk-3Q4V37DB.js → chunk-42O6RKCS.js} +2 -2
  13. package/dist-cli/chunks/{chunk-EMDBHHL3.js → chunk-46BMZYP7.js} +2 -2
  14. package/dist-cli/chunks/{chunk-4DRB3VDK.js → chunk-4CMRJ7UX.js} +2 -2
  15. package/dist-cli/chunks/{chunk-P3Q6BOWW.js → chunk-4QK74NWP.js} +2 -2
  16. package/dist-cli/chunks/{chunk-UTUGLOQA.js → chunk-4ZGUXZ6U.js} +2 -2
  17. package/dist-cli/chunks/{chunk-QT2FDZ2X.js → chunk-5N5BWVZK.js} +1 -1
  18. package/dist-cli/chunks/{chunk-BD3V6HEX.js → chunk-6BGR523F.js} +2 -2
  19. package/dist-cli/chunks/{chunk-YMVZ7QGW.js → chunk-74RRQIWF.js} +1 -1
  20. package/dist-cli/chunks/{chunk-XYDJGXWM.js → chunk-7CT75XQF.js} +1 -1
  21. package/dist-cli/chunks/{chunk-EZS7IFYP.js → chunk-AGUR7LE7.js} +1 -1
  22. package/dist-cli/chunks/{chunk-7XYZ5QH4.js → chunk-BAPVTWIM.js} +2 -2
  23. package/dist-cli/chunks/{chunk-WMIFCBK4.js → chunk-BPYGMBOL.js} +2 -2
  24. package/dist-cli/chunks/{chunk-VT5CCVFB.js → chunk-BWTDQWRB.js} +2 -2
  25. package/dist-cli/chunks/{chunk-BHEY33C2.js → chunk-DFL5AISK.js} +1 -1
  26. package/dist-cli/chunks/{chunk-G5JQXBCM.js → chunk-DK764ET6.js} +2 -2
  27. package/dist-cli/chunks/{chunk-3ZVQFBLZ.js → chunk-EAXYIY5U.js} +1 -1
  28. package/dist-cli/chunks/{chunk-SS2QGS3S.js → chunk-FADHHMJU.js} +2 -2
  29. package/dist-cli/chunks/{chunk-OULABB5B.js → chunk-FAWMDCMJ.js} +2 -2
  30. package/dist-cli/chunks/{chunk-DZBC7ACF.js → chunk-FFWDCXTD.js} +2 -2
  31. package/dist-cli/chunks/{chunk-FXYFWGUF.js → chunk-FNVWTY57.js} +1 -1
  32. package/dist-cli/chunks/chunk-FQGTATLA.js +4 -0
  33. package/dist-cli/chunks/{chunk-5SSNVYQL.js → chunk-GKKO7RE2.js} +3 -3
  34. package/dist-cli/chunks/{chunk-3JTUEUEQ.js → chunk-GLYEL265.js} +1 -1
  35. package/dist-cli/chunks/{chunk-FB222OKQ.js → chunk-GMW6T2K6.js} +2 -2
  36. package/dist-cli/chunks/{chunk-MCZMW53D.js → chunk-HGPDQPIG.js} +2 -2
  37. package/dist-cli/chunks/{chunk-3FZV36RQ.js → chunk-HJN6LXR5.js} +2 -2
  38. package/dist-cli/chunks/{chunk-IYJVOL5E.js → chunk-IY2WWLFH.js} +2 -2
  39. package/dist-cli/chunks/{chunk-3KEAKMUN.js → chunk-KCHXGTYQ.js} +1 -1
  40. package/dist-cli/chunks/{chunk-QHD5HLWW.js → chunk-KJ5SZIXX.js} +2 -2
  41. package/dist-cli/chunks/{chunk-EKOIWHTM.js → chunk-KWFRIVXW.js} +2 -2
  42. package/dist-cli/chunks/{chunk-UTVDJF5N.js → chunk-LV4BJLQU.js} +2 -2
  43. package/dist-cli/chunks/{chunk-6BJ2QYH3.js → chunk-MM2XAXTN.js} +1 -1
  44. package/dist-cli/chunks/{chunk-6MENEVJS.js → chunk-MOC4QX3B.js} +2 -2
  45. package/dist-cli/chunks/{chunk-MPYUIK6F.js → chunk-NUU3SWLR.js} +1 -1
  46. package/dist-cli/chunks/{chunk-Z6IYPETC.js → chunk-PDGEVGHU.js} +2 -2
  47. package/dist-cli/chunks/{chunk-2G6JWRZ3.js → chunk-PH4W36KI.js} +3 -3
  48. package/dist-cli/chunks/{chunk-4LJ2VGCC.js → chunk-QVUS7OHN.js} +1 -1
  49. package/dist-cli/chunks/{chunk-4BNQLDNR.js → chunk-QXBFDUCQ.js} +2 -2
  50. package/dist-cli/chunks/{chunk-DHA2XVOG.js → chunk-S6CNNXSR.js} +2 -2
  51. package/dist-cli/chunks/{chunk-B7JKDRC5.js → chunk-SIKPB3GL.js} +1 -1
  52. package/dist-cli/chunks/{chunk-37Z6QOGY.js → chunk-TIZP26F4.js} +2 -2
  53. package/dist-cli/chunks/{chunk-XV7FXZ4J.js → chunk-TK4ZQQAL.js} +1 -1
  54. package/dist-cli/chunks/{chunk-6XVKJVOI.js → chunk-VXN2HAHP.js} +2 -2
  55. package/dist-cli/chunks/{chunk-SSQIJN43.js → chunk-WIV5YAQT.js} +2 -2
  56. package/dist-cli/chunks/{chunk-YIYZDGH7.js → chunk-WPXQ7CNQ.js} +2 -2
  57. package/dist-cli/chunks/{chunk-IQ4TP2J2.js → chunk-WYD5DEEU.js} +2 -2
  58. package/dist-cli/chunks/{chunk-MKN3NYBZ.js → chunk-X2ITJOHZ.js} +1 -1
  59. package/dist-cli/chunks/{chunk-EUND2TS4.js → chunk-XYPCBRGY.js} +1 -1
  60. package/dist-cli/chunks/{chunk-A37NXF3Z.js → chunk-YFF6YFYJ.js} +1 -1
  61. package/dist-cli/chunks/{chunk-5RZ7UZAP.js → chunk-YSLE3K2S.js} +2 -2
  62. package/dist-cli/chunks/{chunk-645WC3JJ.js → chunk-ZCHCE6WJ.js} +2 -2
  63. package/dist-cli/chunks/{chunk-NPCWXSGY.js → chunk-ZSFETJZV.js} +1 -1
  64. package/dist-cli/chunks/{chunk-QN4YLR7W.js → chunk-ZSLOAO3P.js} +3 -3
  65. package/dist-cli/chunks/{cleanup-PWY4YBY5.js → cleanup-ZVQLJLTY.js} +2 -2
  66. package/dist-cli/chunks/cli-version-KAVMACHT.js +4 -0
  67. package/dist-cli/chunks/{compat-DNE5AOTG.js → compat-7T2VZZDL.js} +2 -2
  68. package/dist-cli/chunks/{config-J7THVY4X.js → config-E7OULENQ.js} +2 -2
  69. package/dist-cli/chunks/{control-MTBC3TR5.js → control-X5O5UXPP.js} +2 -2
  70. package/dist-cli/chunks/daemon-GEDFARBC.js +4 -0
  71. package/dist-cli/chunks/{debug-VKPEE53D.js → debug-LK6GRYHR.js} +3 -3
  72. package/dist-cli/chunks/{desktop-42TETCYN.js → desktop-2LAHHUP6.js} +3 -3
  73. package/dist-cli/chunks/{detox-XEKO6RN7.js → detox-7GF6V6E6.js} +2 -2
  74. package/dist-cli/chunks/{device-SPLLD5HY.js → device-G3IF4IRA.js} +2 -2
  75. package/dist-cli/chunks/{diagnose-YC55JQWA.js → diagnose-6G2RJWVP.js} +2 -2
  76. package/dist-cli/chunks/{disk-cleanup-ANWR5MX4.js → disk-cleanup-PRAJROKV.js} +2 -2
  77. package/dist-cli/chunks/drivers-4WSF4T4I.js +4 -0
  78. package/dist-cli/chunks/{film-PFFOI46T.js → film-CGVAWXPR.js} +3 -3
  79. package/dist-cli/chunks/flow-MEDCS46T.js +4 -0
  80. package/dist-cli/chunks/help-KOAHGOH4.js +4 -0
  81. package/dist-cli/chunks/{hidden-runtime-alias-PSRXTEK3.js → hidden-runtime-alias-FCDWZQM3.js} +2 -2
  82. package/dist-cli/chunks/{home-paths-K3YTHQCN.js → home-paths-JEUBFYPY.js} +2 -2
  83. package/dist-cli/chunks/inspect-IU5HFVKF.js +4 -0
  84. package/dist-cli/chunks/install-desktop-5Q2WB4QO.js +4 -0
  85. package/dist-cli/chunks/{login-VCFZ6CP6.js → login-HBPZL3QX.js} +2 -2
  86. package/dist-cli/chunks/{logout-SZZKCKUT.js → logout-SVBZGGEI.js} +2 -2
  87. package/dist-cli/chunks/{maestro-SKBMS6OP.js → maestro-445CMWSH.js} +3 -3
  88. package/dist-cli/chunks/{maestro-generate-2LQYCR32.js → maestro-generate-4JWKONR2.js} +3 -3
  89. package/dist-cli/chunks/{mode-W4YK7PNM.js → mode-M6GVNTDZ.js} +2 -2
  90. package/dist-cli/chunks/{optional-demo-registry-TJ7YL2W5.js → optional-demo-registry-Q5CATNHD.js} +2 -2
  91. package/dist-cli/chunks/{perf-EWLQQOMQ.js → perf-MBNYDE6X.js} +2 -2
  92. package/dist-cli/chunks/{permissions-F3M7BXNG.js → permissions-HNLQIZJD.js} +2 -2
  93. package/dist-cli/chunks/privacy-UL6QT67W.js +4 -0
  94. package/dist-cli/chunks/{record-TU6UZ6BP.js → record-MH3BLHON.js} +3 -3
  95. package/dist-cli/chunks/{report-issue-5WFJDQ3G.js → report-issue-6HQHCFBG.js} +2 -2
  96. package/dist-cli/chunks/reset-GHLOGMF3.js +4 -0
  97. package/dist-cli/chunks/runtime-JK43NPS6.js +4 -0
  98. package/dist-cli/chunks/{screenshot-command-UCZGPK5X.js → screenshot-command-D6VS6GDA.js} +3 -3
  99. package/dist-cli/chunks/{screenshot-layers-S45FLMJO.js → screenshot-layers-MC7JHOO2.js} +2 -2
  100. package/dist-cli/chunks/{screenshots-capture-MJBSRTTC.js → screenshots-capture-PUQTDG5I.js} +2 -2
  101. package/dist-cli/chunks/{serve-MYU6276M.js → serve-4UDVILST.js} +2 -2
  102. package/dist-cli/chunks/setup-5IHFDPBA.js +4 -0
  103. package/dist-cli/chunks/{skills-TAO6VMZT.js → skills-IJDXM6IC.js} +2 -2
  104. package/dist-cli/chunks/{state-D3C6E7BF.js → state-KCBXBFZZ.js} +2 -2
  105. package/dist-cli/chunks/{storage-6DGLTAB3.js → storage-RBYDWRJC.js} +2 -2
  106. package/dist-cli/chunks/store-O2PYGAXL.js +4 -0
  107. package/dist-cli/chunks/telemetry-B2CPDQID.js +4 -0
  108. package/dist-cli/chunks/{timeline-YLNDGMIP.js → timeline-RPEEEB3A.js} +2 -2
  109. package/dist-cli/chunks/{upgrade-A22Q6HOL.js → upgrade-TFLWCW3P.js} +2 -2
  110. package/dist-cli/chunks/upload-2GJWZG6R.js +4 -0
  111. package/dist-cli/chunks/{version-UIGNPZQH.js → version-LHPE2VT4.js} +2 -2
  112. package/dist-cli/chunks/{web-B3WLYIR5.js → web-QJ74GCNZ.js} +2 -2
  113. package/dist-cli/chunks/welcome-5XJPBRJD.js +5 -0
  114. package/dist-cli/chunks/{what-happened-FFWBBG4Y.js → what-happened-JXBBC5U7.js} +2 -2
  115. package/dist-lib/agent-daemon-client.cjs +1 -1
  116. package/dist-lib/agent-events.cjs +1 -1
  117. package/dist-lib/agent-identity.cjs +1 -1
  118. package/dist-lib/agent-sessions.cjs +1 -1
  119. package/dist-lib/attached-projects.cjs +1 -1
  120. package/dist-lib/auth/shared-session.cjs +1 -1
  121. package/dist-lib/backend-origin.cjs +1 -1
  122. package/dist-lib/beta.cjs +1 -1
  123. package/dist-lib/beta.mjs +1 -1
  124. package/dist-lib/bridge-constants.cjs +1 -1
  125. package/dist-lib/bridge-contract.cjs +1 -1
  126. package/dist-lib/cli-constants.cjs +1 -1
  127. package/dist-lib/config.cjs +1 -1
  128. package/dist-lib/detox/index.cjs +1 -1
  129. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  130. package/dist-lib/home-paths.cjs +1 -1
  131. package/dist-lib/host/bridge-host.cjs +1 -1
  132. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  133. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  134. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  135. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  136. package/dist-lib/host/websocket-proxy.cjs +1 -1
  137. package/dist-lib/index.cjs +1 -1
  138. package/dist-lib/jump-to-source-babel.cjs +1 -1
  139. package/dist-lib/menu.cjs +1 -1
  140. package/dist-lib/menu.mjs +1 -1
  141. package/dist-lib/metro-production-bundle.cjs +1 -1
  142. package/dist-lib/metro-production-bundle.mjs +1 -1
  143. package/dist-lib/metro.cjs +1 -1
  144. package/dist-lib/profiles.cjs +1 -1
  145. package/dist-lib/public-brand.cjs +1 -1
  146. package/dist-lib/react-native-host-modules.cjs +1 -1
  147. package/dist-lib/react-native-host-modules.mjs +1 -1
  148. package/dist-lib/render-mode.cjs +1 -1
  149. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  150. package/dist-lib/sdk.cjs +1 -1
  151. package/dist-lib/sdk.mjs +1 -1
  152. package/dist-lib/skills.cjs +3 -3
  153. package/dist-lib/vite.cjs +1 -1
  154. package/package.json +1 -1
  155. package/dist-cli/chunks/chunk-YJ7WD23N.js +0 -4
  156. package/dist-cli/chunks/cli-version-Q4342OQF.js +0 -4
  157. package/dist-cli/chunks/daemon-QFFOUSVW.js +0 -4
  158. package/dist-cli/chunks/drivers-L3TDG54O.js +0 -4
  159. package/dist-cli/chunks/flow-5LUJSZST.js +0 -4
  160. package/dist-cli/chunks/help-HNTYXYDE.js +0 -4
  161. package/dist-cli/chunks/inspect-KMVSWO4V.js +0 -4
  162. package/dist-cli/chunks/install-desktop-KKJJL3M7.js +0 -4
  163. package/dist-cli/chunks/privacy-MIYPUFXK.js +0 -4
  164. package/dist-cli/chunks/reset-ZYWPYHYY.js +0 -4
  165. package/dist-cli/chunks/runtime-NQW7OGBL.js +0 -4
  166. package/dist-cli/chunks/setup-6AGOWG4T.js +0 -4
  167. package/dist-cli/chunks/store-GCWVZJNA.js +0 -4
  168. package/dist-cli/chunks/telemetry-H2C2VENG.js +0 -4
  169. package/dist-cli/chunks/upload-MRKKWNG2.js +0 -4
  170. package/dist-cli/chunks/welcome-SFV4KGBU.js +0 -5
package/dist-cli/bin.js CHANGED
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
3
3
  import { createRequire as __sootsimCreateRequire } from 'node:module'
4
4
  var require = __sootsimCreateRequire(import.meta.url)
5
- import{a as g,b as f}from"./chunks/chunk-XV7FXZ4J.js";import{a as m}from"./chunks/chunk-DR2HRF43.js";import"./chunks/chunk-MPYUIK6F.js";function A(a){let t=a instanceof Error?a.message:String(a);(/^command timed out after \d+s$/.test(t)||t.startsWith("sim disconnected:")||t.startsWith("bridge never reconnected")||t.startsWith("multiple sims are connected:")||t.startsWith("saved sim ")||t.startsWith("no sim connected with id ")||t.startsWith("could not connect to ws://")||t.startsWith("rnx bridge daemon is not running")||t.startsWith("rnx bridge lockfile is fresh")||t.startsWith("rnx bridge exited before becoming ready")||t.startsWith(`${m.commandName} open: requested bridge port`)||t.startsWith("background daemon setup is unavailable")||t.startsWith("rnx bridge did not start within"))&&!process.env.SOOTSIM_VERBOSE&&(process.stderr.write(` ${t}
5
+ import{a as g,b as f}from"./chunks/chunk-TK4ZQQAL.js";import{a as m}from"./chunks/chunk-23MIH7SN.js";import"./chunks/chunk-NUU3SWLR.js";function A(a){let t=a instanceof Error?a.message:String(a);(/^command timed out after \d+s$/.test(t)||t.startsWith("sim disconnected:")||t.startsWith("bridge never reconnected")||t.startsWith("multiple sims are connected:")||t.startsWith("saved sim ")||t.startsWith("no sim connected with id ")||t.startsWith("could not connect to ws://")||t.startsWith("rnx bridge daemon is not running")||t.startsWith("rnx bridge lockfile is fresh")||t.startsWith("rnx bridge exited before becoming ready")||t.startsWith(`${m.commandName} open: requested bridge port`)||t.startsWith("background daemon setup is unavailable")||t.startsWith("rnx bridge did not start within"))&&!process.env.SOOTSIM_VERBOSE&&(process.stderr.write(` ${t}
6
6
  `),process.exit(1)),a instanceof Error&&a.stack?process.stderr.write(`${a.stack}
7
7
  `):process.stderr.write(`${t}
8
8
  `),process.exit(1)}process.on("unhandledRejection",A);process.on("uncaughtException",A);var k=typeof __SOOTSIM_STANDALONE__<"u"&&__SOOTSIM_STANDALONE__,S=new Set(["desktop"]);function C(a){!k||!S.has(a)||(process.stderr.write(` ${m.commandName} ${a} isn't available in the standalone binary \u2014
9
9
  it needs vite / electron / playwright from a project's node_modules.
10
10
  run the npm package instead:
11
11
  ${m.commandName} ${a}
12
- `),process.exit(1))}var e=f(process.argv);if(!e.command&&e.commandArgs.length>0){let{resolveHiddenRuntimeAlias:a}=await import("./chunks/hidden-runtime-alias-PSRXTEK3.js");e=a(e)}var $=e.command==="cleanup"&&e.commandArgs.length===1&&e.commandArgs[0]==="--automatic-worker",_=!e.command&&e.commandArgs.length===0;if(!$&&!_&&!e.help&&!e.version&&e.command!=="config"&&e.command!=="setup"&&e.command!=="telemetry"){let{ensurePrivacyChoice:a}=await import("./chunks/privacy-MIYPUFXK.js");await a({prompt:!0})}if(e.command!=="serve"&&e.command!=="daemon"){let{consumeRuntimeUpgradeNotice:a}=await import("./chunks/home-paths-K3YTHQCN.js"),t=a();t&&process.stderr.write(` ${m.name} engine upgraded to v${t.to}`+(t.from?` (from v${t.from})`:"")+` \xB7 what's new: ${m.origin}/changelog
13
- `)}var h=!1;async function v(){if(!h&&(h=!0,!(e.command==="cleanup"||e.command==="serve"||e.command==="agent-wrapper"||e.command==="daemon"&&e.commandArgs[0]==="uninstall")))try{let{isAutomaticSootsimCleanupComplete:a}=await import("./chunks/disk-cleanup-ANWR5MX4.js");if(a())return;let{spawn:t}=await import("node:child_process"),i=["cleanup","--automatic-worker"],d=process.argv[1],p=k?t(process.execPath,i,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):d?t(process.execPath,[d,...i],{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):t(m.commandName,i,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env});p.once("error",u=>{process.stderr.write(` ${m.name} automatic cleanup will retry on the next run: ${u.message}
12
+ `),process.exit(1))}var e=f(process.argv);if(!e.command&&e.commandArgs.length>0){let{resolveHiddenRuntimeAlias:a}=await import("./chunks/hidden-runtime-alias-FCDWZQM3.js");e=a(e)}var $=e.command==="cleanup"&&e.commandArgs.length===1&&e.commandArgs[0]==="--automatic-worker",_=!e.command&&e.commandArgs.length===0;if(!$&&!_&&!e.help&&!e.version&&e.command!=="config"&&e.command!=="setup"&&e.command!=="telemetry"){let{ensurePrivacyChoice:a}=await import("./chunks/privacy-UL6QT67W.js");await a({prompt:!0})}if(e.command!=="serve"&&e.command!=="daemon"){let{consumeRuntimeUpgradeNotice:a}=await import("./chunks/home-paths-JEUBFYPY.js"),t=a();t&&process.stderr.write(` ${m.name} engine upgraded to v${t.to}`+(t.from?` (from v${t.from})`:"")+` \xB7 what's new: ${m.origin}/changelog
13
+ `)}var h=!1;async function v(){if(!h&&(h=!0,!(e.command==="cleanup"||e.command==="serve"||e.command==="agent-wrapper"||e.command==="daemon"&&e.commandArgs[0]==="uninstall")))try{let{isAutomaticSootsimCleanupComplete:a}=await import("./chunks/disk-cleanup-PRAJROKV.js");if(a())return;let{spawn:t}=await import("node:child_process"),i=["cleanup","--automatic-worker"],d=process.argv[1],p=k?t(process.execPath,i,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):d?t(process.execPath,[d,...i],{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):t(m.commandName,i,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env});p.once("error",u=>{process.stderr.write(` ${m.name} automatic cleanup will retry on the next run: ${u.message}
14
14
  `)}),p.unref()}catch(a){process.stderr.write(` ${m.name} automatic cleanup will retry on the next run: ${a instanceof Error?a.message:String(a)}
15
- `)}}async function o(a){let{flushCliTelemetry:t}=await import("./chunks/telemetry-H2C2VENG.js");await t(),await v(),process.exit(a)}if(e.version){let{getCliVersion:a}=await import("./chunks/cli-version-Q4342OQF.js"),{IS_BETA:t,BETA_LABEL:i}=await import("./chunks/beta-NU3ESDII.js"),d=t?` \xB7 ${i}`:"";console.log(`${m.commandName} v${a()}${d}`);let{readActiveRuntime:p}=await import("./chunks/home-paths-K3YTHQCN.js"),u=p();console.log(u?`runtime v${u}`:"runtime not installed"),await o(0)}if(e.help&&!e.command){let{printHelp:a}=await import("./chunks/help-HNTYXYDE.js");a(),await o(0)}var n=e.globalFlags.port,c=e.verbose,w=e.globalFlags.device,l=e.globalFlags.theme,W=e.globalFlags.driver,x=e.globalFlags.headless===!0,b=e.globalFlags.sim??e.globalFlags.session??e.globalFlags.tab,r=b?["--sim",b,...e.commandArgs]:e.commandArgs;if(w||l){let{settingsStore:a}=await import("./chunks/store-GCWVZJNA.js"),t={};w&&(t.deviceModel=w),l&&(t.colorScheme=l),a.apply(t)}if(!e.command&&e.commandArgs.length===0){let{runWelcome:a}=await import("./chunks/welcome-SFV4KGBU.js");await o(await a())}var s=e.command??"";if(!s){if(e.commandArgs.length>0){let t=e.commandArgs.find(i=>!i.startsWith("-"))??e.commandArgs[0];console.error(` unknown command: ${t}`),console.error(` run \`${m.commandName} --help\` to see the full surface.`),await o(1)}let{printHelp:a}=await import("./chunks/help-HNTYXYDE.js");a(),await o(0)}if(e.help||e.commandArgs.includes("--help")||e.commandArgs.includes("-h")){if(s==="skill"){let{runSkill:i}=await import("./chunks/skills-TAO6VMZT.js");await i(e.commandArgs),await o(0)}if(s==="state"){let{runState:i}=await import("./chunks/state-D3C6E7BF.js");await o(await i(r,{port:n}))}if(s==="reset"){let{runReset:i}=await import("./chunks/reset-ZYWPYHYY.js");await o(await i(r,{port:n}))}let a=s==="do"||s==="get"||s==="debug"||s==="shell"||s==="perf"||s==="wait",t=e.commandArgs.find(i=>!i.startsWith("-"));if(!(s==="shell"||s==="perf"))if(a&&!t){let{printGroupHelp:i}=await import("./chunks/help-HNTYXYDE.js");i(s)&&await o(0)}else{let{printCommandHelp:i}=await import("./chunks/help-HNTYXYDE.js");i(a&&t?t:s,{prefer:a&&t?"verb":"command",group:a&&t?s:void 0}),await o(0)}}C(s);if(g.has(s)){let{runInspect:a}=await import("./chunks/inspect-KMVSWO4V.js");await a([s,...r],{port:n,verbose:c})}else switch(s){case"assert":{let{runAssert:a}=await import("./chunks/assert-BYMM43UD.js");await a(e.commandArgs);break}case"detox":{let{runDetox:a}=await import("./chunks/detox-XEKO6RN7.js");await a(e.commandArgs,{port:n,verbose:c});break}case"maestro":{let{runMaestro:a}=await import("./chunks/maestro-SKBMS6OP.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"record":{let{runRecord:a}=await import("./chunks/record-TU6UZ6BP.js");await a(r,{port:n,verbose:c});break}case"film":{let{runFilm:a}=await import("./chunks/film-PFFOI46T.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"storage":{let{runStorage:a}=await import("./chunks/storage-6DGLTAB3.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"state":{let{runState:a}=await import("./chunks/state-D3C6E7BF.js"),t=await a(r,{port:n});await o(t)}case"reset":{let{runReset:a}=await import("./chunks/reset-ZYWPYHYY.js"),t=await a(r,{port:n});await o(t)}case"perf":{let{runPerf:a}=await import("./chunks/perf-EWLQQOMQ.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"screenshot":{let{runScreenshotCommand:a}=await import("./chunks/screenshot-command-UCZGPK5X.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"camera":{let{runCamera:a}=await import("./chunks/camera-6GNRDABG.js"),t=await a(r,{port:n});await o(typeof t=="number"?t:0)}case"mode":{let{runMode:a}=await import("./chunks/mode-W4YK7PNM.js");await a(r,{port:n,verbose:c});break}case"permissions":{let{runPermissions:a}=await import("./chunks/permissions-F3M7BXNG.js"),t=await a(r,{port:n,verbose:c});await o(t)}case"debug":{let{runDebug:a}=await import("./chunks/debug-VKPEE53D.js");await a(r,{port:n,verbose:c});break}case"timeline":{let{runTimeline:a}=await import("./chunks/timeline-YLNDGMIP.js");await a(r,{port:n,verbose:c});break}case"what-happened":{let{runWhatHappened:a}=await import("./chunks/what-happened-FFWBBG4Y.js");await a(r,{port:n,verbose:c});break}case"open":{let{runOpenCommand:a}=await import("./chunks/control-MTBC3TR5.js");await a(r,{port:n});break}case"use":{let{runUseCommand:a}=await import("./chunks/control-MTBC3TR5.js");await a(r,{port:n});break}case"claim":{let{runClaimCommand:a}=await import("./chunks/control-MTBC3TR5.js");await a(r,{port:n});break}case"close":{let{runCloseCommand:a}=await import("./chunks/control-MTBC3TR5.js");await a(r,{port:n});break}case"device":{let{runDeviceCommand:a}=await import("./chunks/device-SPLLD5HY.js");await a(r,{port:n});break}case"compat":{let{runCompat:a}=await import("./chunks/compat-DNE5AOTG.js");await a(e.commandArgs);break}case"report-issue":{let{runReportIssue:a}=await import("./chunks/report-issue-5WFJDQ3G.js"),t=await a(e.commandArgs);await o(t)}case"desktop":{let{runDesktop:a}=await import("./chunks/desktop-42TETCYN.js");await a(e.commandArgs,{port:n,device:w});break}case"login":{let{runLogin:a}=await import("./chunks/login-VCFZ6CP6.js");await a(e.commandArgs);break}case"logout":{let{runLogout:a}=await import("./chunks/logout-SZZKCKUT.js");await a();break}case"auth":{let{runAuth:a}=await import("./chunks/auth-VBFSMZ3V.js");await a(e.commandArgs);break}case"setup":{let{runSetup:a}=await import("./chunks/setup-6AGOWG4T.js");await a(e.commandArgs);break}case"serve":{let{runServe:a}=await import("./chunks/serve-MYU6276M.js");await a(e.commandArgs,{port:n});break}case"daemon":{let{runDaemon:a}=await import("./chunks/daemon-QFFOUSVW.js");await a(e.commandArgs,{port:n});break}case"runtime":{let{runRuntime:a}=await import("./chunks/runtime-NQW7OGBL.js");await a(e.commandArgs);break}case"upgrade":{let{runUpgrade:a}=await import("./chunks/upgrade-A22Q6HOL.js");await a(e.commandArgs);break}case"version":{let{runVersion:a}=await import("./chunks/version-UIGNPZQH.js");await a(e.commandArgs);break}case"agent":{let{runAgentCommand:a}=await import("./chunks/agent-PE4FUR3F.js"),t=await a(e.commandArgs);await o(t)}case"agent-wrapper":{let{runAgentWrapper:a}=await import("./chunks/agent-wrapper-2DFZKYFA.js"),t=await a(e.commandArgs);await o(t)}case"skill":{let{runSkill:a}=await import("./chunks/skills-TAO6VMZT.js");await a(e.commandArgs);break}case"app-fonts":{let{runAppFonts:a}=await import("./chunks/app-fonts-IHMQALV3.js");await a(e.commandArgs);break}case"config":{let{runConfig:a}=await import("./chunks/config-J7THVY4X.js");await a(e.commandArgs);break}case"cleanup":{let{runCleanup:a}=await import("./chunks/cleanup-PWY4YBY5.js"),t=await a(e.commandArgs);await o(t)}default:console.error(` unknown command: ${s}`),console.error(` run \`${m.commandName} --help\` to see the full surface.`),await o(1)}await v();
15
+ `)}}async function o(a){let{flushCliTelemetry:t}=await import("./chunks/telemetry-B2CPDQID.js");await t(),await v(),process.exit(a)}if(e.version){let{getCliVersion:a}=await import("./chunks/cli-version-KAVMACHT.js"),{IS_BETA:t,BETA_LABEL:i}=await import("./chunks/beta-WOKLQLOJ.js"),d=t?` \xB7 ${i}`:"";console.log(`${m.commandName} v${a()}${d}`);let{readActiveRuntime:p}=await import("./chunks/home-paths-JEUBFYPY.js"),u=p();console.log(u?`runtime v${u}`:"runtime not installed"),await o(0)}if(e.help&&!e.command){let{printHelp:a}=await import("./chunks/help-KOAHGOH4.js");a(),await o(0)}var n=e.globalFlags.port,c=e.verbose,w=e.globalFlags.device,l=e.globalFlags.theme,W=e.globalFlags.driver,x=e.globalFlags.headless===!0,b=e.globalFlags.sim??e.globalFlags.session??e.globalFlags.tab,r=b?["--sim",b,...e.commandArgs]:e.commandArgs;if(w||l){let{settingsStore:a}=await import("./chunks/store-O2PYGAXL.js"),t={};w&&(t.deviceModel=w),l&&(t.colorScheme=l),a.apply(t)}if(!e.command&&e.commandArgs.length===0){let{runWelcome:a}=await import("./chunks/welcome-5XJPBRJD.js");await o(await a())}var s=e.command??"";if(!s){if(e.commandArgs.length>0){let t=e.commandArgs.find(i=>!i.startsWith("-"))??e.commandArgs[0];console.error(` unknown command: ${t}`),console.error(` run \`${m.commandName} --help\` to see the full surface.`),await o(1)}let{printHelp:a}=await import("./chunks/help-KOAHGOH4.js");a(),await o(0)}if(e.help||e.commandArgs.includes("--help")||e.commandArgs.includes("-h")){if(s==="skill"){let{runSkill:i}=await import("./chunks/skills-IJDXM6IC.js");await i(e.commandArgs),await o(0)}if(s==="state"){let{runState:i}=await import("./chunks/state-KCBXBFZZ.js");await o(await i(r,{port:n}))}if(s==="reset"){let{runReset:i}=await import("./chunks/reset-GHLOGMF3.js");await o(await i(r,{port:n}))}let a=s==="do"||s==="get"||s==="debug"||s==="shell"||s==="perf"||s==="wait",t=e.commandArgs.find(i=>!i.startsWith("-"));if(!(s==="shell"||s==="perf"))if(a&&!t){let{printGroupHelp:i}=await import("./chunks/help-KOAHGOH4.js");i(s)&&await o(0)}else{let{printCommandHelp:i}=await import("./chunks/help-KOAHGOH4.js");i(a&&t?t:s,{prefer:a&&t?"verb":"command",group:a&&t?s:void 0}),await o(0)}}C(s);if(g.has(s)){let{runInspect:a}=await import("./chunks/inspect-IU5HFVKF.js");await a([s,...r],{port:n,verbose:c})}else switch(s){case"assert":{let{runAssert:a}=await import("./chunks/assert-WEQDRDJ2.js");await a(e.commandArgs);break}case"detox":{let{runDetox:a}=await import("./chunks/detox-7GF6V6E6.js");await a(e.commandArgs,{port:n,verbose:c});break}case"maestro":{let{runMaestro:a}=await import("./chunks/maestro-445CMWSH.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"record":{let{runRecord:a}=await import("./chunks/record-MH3BLHON.js");await a(r,{port:n,verbose:c});break}case"film":{let{runFilm:a}=await import("./chunks/film-CGVAWXPR.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"storage":{let{runStorage:a}=await import("./chunks/storage-RBYDWRJC.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"state":{let{runState:a}=await import("./chunks/state-KCBXBFZZ.js"),t=await a(r,{port:n});await o(t)}case"reset":{let{runReset:a}=await import("./chunks/reset-GHLOGMF3.js"),t=await a(r,{port:n});await o(t)}case"perf":{let{runPerf:a}=await import("./chunks/perf-MBNYDE6X.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"screenshot":{let{runScreenshotCommand:a}=await import("./chunks/screenshot-command-D6VS6GDA.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"camera":{let{runCamera:a}=await import("./chunks/camera-GRMP2HT3.js"),t=await a(r,{port:n});await o(typeof t=="number"?t:0)}case"mode":{let{runMode:a}=await import("./chunks/mode-M6GVNTDZ.js");await a(r,{port:n,verbose:c});break}case"permissions":{let{runPermissions:a}=await import("./chunks/permissions-HNLQIZJD.js"),t=await a(r,{port:n,verbose:c});await o(t)}case"debug":{let{runDebug:a}=await import("./chunks/debug-LK6GRYHR.js");await a(r,{port:n,verbose:c});break}case"timeline":{let{runTimeline:a}=await import("./chunks/timeline-RPEEEB3A.js");await a(r,{port:n,verbose:c});break}case"what-happened":{let{runWhatHappened:a}=await import("./chunks/what-happened-JXBBC5U7.js");await a(r,{port:n,verbose:c});break}case"open":{let{runOpenCommand:a}=await import("./chunks/control-X5O5UXPP.js");await a(r,{port:n});break}case"use":{let{runUseCommand:a}=await import("./chunks/control-X5O5UXPP.js");await a(r,{port:n});break}case"claim":{let{runClaimCommand:a}=await import("./chunks/control-X5O5UXPP.js");await a(r,{port:n});break}case"close":{let{runCloseCommand:a}=await import("./chunks/control-X5O5UXPP.js");await a(r,{port:n});break}case"device":{let{runDeviceCommand:a}=await import("./chunks/device-G3IF4IRA.js");await a(r,{port:n});break}case"compat":{let{runCompat:a}=await import("./chunks/compat-7T2VZZDL.js");await a(e.commandArgs);break}case"report-issue":{let{runReportIssue:a}=await import("./chunks/report-issue-6HQHCFBG.js"),t=await a(e.commandArgs);await o(t)}case"desktop":{let{runDesktop:a}=await import("./chunks/desktop-2LAHHUP6.js");await a(e.commandArgs,{port:n,device:w});break}case"login":{let{runLogin:a}=await import("./chunks/login-HBPZL3QX.js");await a(e.commandArgs);break}case"logout":{let{runLogout:a}=await import("./chunks/logout-SVBZGGEI.js");await a();break}case"auth":{let{runAuth:a}=await import("./chunks/auth-U5GBY5SE.js");await a(e.commandArgs);break}case"setup":{let{runSetup:a}=await import("./chunks/setup-5IHFDPBA.js");await a(e.commandArgs);break}case"serve":{let{runServe:a}=await import("./chunks/serve-4UDVILST.js");await a(e.commandArgs,{port:n});break}case"daemon":{let{runDaemon:a}=await import("./chunks/daemon-GEDFARBC.js");await a(e.commandArgs,{port:n});break}case"runtime":{let{runRuntime:a}=await import("./chunks/runtime-JK43NPS6.js");await a(e.commandArgs);break}case"upgrade":{let{runUpgrade:a}=await import("./chunks/upgrade-TFLWCW3P.js");await a(e.commandArgs);break}case"version":{let{runVersion:a}=await import("./chunks/version-LHPE2VT4.js");await a(e.commandArgs);break}case"agent":{let{runAgentCommand:a}=await import("./chunks/agent-EN7USQWO.js"),t=await a(e.commandArgs);await o(t)}case"agent-wrapper":{let{runAgentWrapper:a}=await import("./chunks/agent-wrapper-4K2P2EBF.js"),t=await a(e.commandArgs);await o(t)}case"skill":{let{runSkill:a}=await import("./chunks/skills-IJDXM6IC.js");await a(e.commandArgs);break}case"app-fonts":{let{runAppFonts:a}=await import("./chunks/app-fonts-7B5E7UDM.js");await a(e.commandArgs);break}case"config":{let{runConfig:a}=await import("./chunks/config-E7OULENQ.js");await a(e.commandArgs);break}case"cleanup":{let{runCleanup:a}=await import("./chunks/cleanup-ZVQLJLTY.js"),t=await a(e.commandArgs);await o(t)}default:console.error(` unknown command: ${s}`),console.error(` run \`${m.commandName} --help\` to see the full surface.`),await o(1)}await v();
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (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 b,b as E,c as A,d as l,e as S,g as x,h as j,j as T,n as I,o as k,p as D,q as g,r as O,s as C}from"./chunk-EKOIWHTM.js";import"./chunk-3ZVQFBLZ.js";import{c as $}from"./chunk-DZBC7ACF.js";import"./chunk-EMDBHHL3.js";import"./chunk-YIYZDGH7.js";import"./chunk-BD3V6HEX.js";import"./chunk-IYJVOL5E.js";import"./chunk-E4QTH57Q.js";import"./chunk-6BJ2QYH3.js";import"./chunk-BHEY33C2.js";import{j as y}from"./chunk-MKN3NYBZ.js";import"./chunk-SSQIJN43.js";import"./chunk-DR2HRF43.js";import"./chunk-FXYFWGUF.js";import"./chunk-MPYUIK6F.js";import w from"node:fs";import d from"node:path";import{spawn as _}from"node:child_process";import F from"node:net";import{WebSocket as R}from"ws";var c=class extends Error{code;constructor(e,t){super(e),this.name="AgentDaemonError",this.code=t}},f=class{ws;port;commandTimeoutMs;ready;closed=!1;nextId=1;pending=new Map;eventListeners=new Set;statusListeners=new Set;disconnectListeners=new Set;constructor(e={}){this.port=e.port??7668,this.commandTimeoutMs=e.commandTimeoutMs??15e3,this.ws=new R(`ws://localhost:${this.port}`),this.ready=new Promise((t,r)=>{let s=()=>{this.ws.off("error",o),t()},o=i=>{this.ws.off("open",s),r(new c(`could not connect to rnx daemon on port ${this.port}: ${i.message}`,"NO_DAEMON"))};this.ws.once("open",s),this.ws.once("error",o)}),this.ws.on("message",t=>this.handleMessage(t)),this.ws.on("close",()=>this.handleClose()),this.ws.on("error",()=>{})}async waitReady(){return this.ready}async listProjects(){return this.send("agent:list-projects")}async upsertProject(e){return this.send("agent:upsert-project",{input:e})}async deleteProject(e){return this.send("agent:delete-project",{projectId:e})}async autoAttachForUrl(e){return this.send("agent:auto-attach-for-url",{input:e})}async listSessions(e){return this.send("agent:list-sessions",{projectId:e})}async startSession(e){return this.send("agent:start-session",{input:e})}async sendPrompt(e,t){return this.send("agent:send-prompt",{sessionId:e,prompt:t})}async sendClaimedPrompt(e,t){return this.send("agent:send-claimed-prompt",{simId:e,prompt:t})}async endSession(e){return this.send("agent:end-session",{sessionId:e})}async getTranscript(e){return this.send("agent:get-transcript",{sessionId:e})}async getPaths(){return this.send("agent:get-paths")}async subscribeEvents(e){return this.send("agent:subscribe-events",{sessionId:e})}async unsubscribeEvents(e){return this.send("agent:unsubscribe-events",{sessionId:e})}onAgentEvent(e){return this.eventListeners.add(e),()=>this.eventListeners.delete(e)}onSessionStatusChange(e){return this.statusListeners.add(e),()=>this.statusListeners.delete(e)}onDisconnect(e){return this.disconnectListeners.add(e),()=>this.disconnectListeners.delete(e)}close(){if(!this.closed){this.closed=!0;try{this.ws.close()}catch{}}}async send(e,t={}){if(await this.ready,this.closed||this.ws.readyState!==R.OPEN)throw new c("daemon connection is closed","NO_DAEMON");let r=this.nextId++;return new Promise((s,o)=>{let i=setTimeout(()=>{this.pending.delete(r),o(new c(`${e} timed out after ${Math.round(this.commandTimeoutMs/1e3)}s`,"TIMEOUT"))},this.commandTimeoutMs);this.pending.set(r,{resolve:s,reject:o,timer:i});try{this.ws.send(JSON.stringify({id:r,type:e,...t}))}catch(a){clearTimeout(i),this.pending.delete(r),o(a instanceof Error?a:new Error(String(a)))}})}handleMessage(e){let t;try{t=JSON.parse(String(e))}catch{return}if(!t||typeof t!="object")return;if(t.type==="agent:event"){for(let s of this.eventListeners)try{s({sessionId:t.sessionId,event:t.event})}catch{}return}if(t.type==="agent:session-status"){for(let s of this.statusListeners)try{s(t.session)}catch{}return}if(typeof t.id!="number")return;let r=this.pending.get(t.id);r&&(this.pending.delete(t.id),clearTimeout(r.timer),t.error?r.reject(new c(t.error,t.code)):r.resolve(t.result))}handleClose(){if(!this.closed){this.closed=!0;for(let[,e]of this.pending)clearTimeout(e.timer),e.reject(new c("daemon disconnected","DISCONNECT"));this.pending.clear();for(let e of this.disconnectListeners)try{e()}catch{}}}};function M(n=7668,e=400){return new Promise(t=>{let r=new F.Socket,s=!1,o=i=>{s||(s=!0,r.destroy(),t(i))};r.setTimeout(e),r.once("connect",()=>o(!0)),r.once("timeout",()=>o(!1)),r.once("error",()=>o(!1)),r.connect(n,"127.0.0.1")})}async function B(n={}){let e=n.port??7668;if(await M(e))return{alreadyRunning:!0};if(y())throw new c(`no rnx bridge on port ${e}. run \`rnx daemon install\` to enable the faster background service, or \`rnx serve\` in another shell.`,"DEV_HOST_REFUSED");let{cmd:t,prefixArgs:r}=C(),s=[...r,"serve","--quiet"];e!==7668&&s.push("--port",String(e));let o=_(t,s,{detached:!0,stdio:"ignore",env:process.env,cwd:process.cwd()});o.unref();let i=Date.now()+(n.startupTimeoutMs??5e3);for(;Date.now()<i;){if(await M(e))return{alreadyRunning:!1,pid:o.pid};await new Promise(a=>setTimeout(a,100))}throw new c(`spawned rnx daemon on port ${e} but it did not come up in time. run \`rnx serve\` manually to diagnose.`,"SPAWN_TIMEOUT")}async function h(n={}){await B({port:n.port,startupTimeoutMs:n.startupTimeoutMs});let e=new f(n);try{await e.waitReady()}catch(t){throw e.close(),t}return e}async function ge(n){let[e,...t]=n;try{switch(e){case void 0:case"--help":case"-h":case"help":return L(),0;case"attach":return await W(t);case"projects":return await J();case"project":return await V(t);case"sessions":return await H(t);case"start":return await G(t);case"prompt":return await q(t);case"watch":return await K(t);case"transcript":return await z(t);case"end":return await Q(t);case"paths":return await Y();default:return process.stderr.write(`unknown agent subcommand: ${e}
4
+ import{a as b,b as E,c as A,d as l,e as S,g as x,h as j,j as T,n as I,o as k,p as D,q as g,r as O,s as C}from"./chunk-KWFRIVXW.js";import"./chunk-EAXYIY5U.js";import{c as $}from"./chunk-FFWDCXTD.js";import"./chunk-46BMZYP7.js";import"./chunk-WPXQ7CNQ.js";import"./chunk-6BGR523F.js";import"./chunk-IY2WWLFH.js";import"./chunk-2IVWNQDE.js";import"./chunk-MM2XAXTN.js";import"./chunk-DFL5AISK.js";import{j as y}from"./chunk-X2ITJOHZ.js";import"./chunk-WIV5YAQT.js";import"./chunk-23MIH7SN.js";import"./chunk-FNVWTY57.js";import"./chunk-NUU3SWLR.js";import w from"node:fs";import d from"node:path";import{spawn as _}from"node:child_process";import F from"node:net";import{WebSocket as R}from"ws";var c=class extends Error{code;constructor(e,t){super(e),this.name="AgentDaemonError",this.code=t}},f=class{ws;port;commandTimeoutMs;ready;closed=!1;nextId=1;pending=new Map;eventListeners=new Set;statusListeners=new Set;disconnectListeners=new Set;constructor(e={}){this.port=e.port??7668,this.commandTimeoutMs=e.commandTimeoutMs??15e3,this.ws=new R(`ws://localhost:${this.port}`),this.ready=new Promise((t,r)=>{let s=()=>{this.ws.off("error",o),t()},o=i=>{this.ws.off("open",s),r(new c(`could not connect to rnx daemon on port ${this.port}: ${i.message}`,"NO_DAEMON"))};this.ws.once("open",s),this.ws.once("error",o)}),this.ws.on("message",t=>this.handleMessage(t)),this.ws.on("close",()=>this.handleClose()),this.ws.on("error",()=>{})}async waitReady(){return this.ready}async listProjects(){return this.send("agent:list-projects")}async upsertProject(e){return this.send("agent:upsert-project",{input:e})}async deleteProject(e){return this.send("agent:delete-project",{projectId:e})}async autoAttachForUrl(e){return this.send("agent:auto-attach-for-url",{input:e})}async listSessions(e){return this.send("agent:list-sessions",{projectId:e})}async startSession(e){return this.send("agent:start-session",{input:e})}async sendPrompt(e,t){return this.send("agent:send-prompt",{sessionId:e,prompt:t})}async sendClaimedPrompt(e,t){return this.send("agent:send-claimed-prompt",{simId:e,prompt:t})}async endSession(e){return this.send("agent:end-session",{sessionId:e})}async getTranscript(e){return this.send("agent:get-transcript",{sessionId:e})}async getPaths(){return this.send("agent:get-paths")}async subscribeEvents(e){return this.send("agent:subscribe-events",{sessionId:e})}async unsubscribeEvents(e){return this.send("agent:unsubscribe-events",{sessionId:e})}onAgentEvent(e){return this.eventListeners.add(e),()=>this.eventListeners.delete(e)}onSessionStatusChange(e){return this.statusListeners.add(e),()=>this.statusListeners.delete(e)}onDisconnect(e){return this.disconnectListeners.add(e),()=>this.disconnectListeners.delete(e)}close(){if(!this.closed){this.closed=!0;try{this.ws.close()}catch{}}}async send(e,t={}){if(await this.ready,this.closed||this.ws.readyState!==R.OPEN)throw new c("daemon connection is closed","NO_DAEMON");let r=this.nextId++;return new Promise((s,o)=>{let i=setTimeout(()=>{this.pending.delete(r),o(new c(`${e} timed out after ${Math.round(this.commandTimeoutMs/1e3)}s`,"TIMEOUT"))},this.commandTimeoutMs);this.pending.set(r,{resolve:s,reject:o,timer:i});try{this.ws.send(JSON.stringify({id:r,type:e,...t}))}catch(a){clearTimeout(i),this.pending.delete(r),o(a instanceof Error?a:new Error(String(a)))}})}handleMessage(e){let t;try{t=JSON.parse(String(e))}catch{return}if(!t||typeof t!="object")return;if(t.type==="agent:event"){for(let s of this.eventListeners)try{s({sessionId:t.sessionId,event:t.event})}catch{}return}if(t.type==="agent:session-status"){for(let s of this.statusListeners)try{s(t.session)}catch{}return}if(typeof t.id!="number")return;let r=this.pending.get(t.id);r&&(this.pending.delete(t.id),clearTimeout(r.timer),t.error?r.reject(new c(t.error,t.code)):r.resolve(t.result))}handleClose(){if(!this.closed){this.closed=!0;for(let[,e]of this.pending)clearTimeout(e.timer),e.reject(new c("daemon disconnected","DISCONNECT"));this.pending.clear();for(let e of this.disconnectListeners)try{e()}catch{}}}};function M(n=7668,e=400){return new Promise(t=>{let r=new F.Socket,s=!1,o=i=>{s||(s=!0,r.destroy(),t(i))};r.setTimeout(e),r.once("connect",()=>o(!0)),r.once("timeout",()=>o(!1)),r.once("error",()=>o(!1)),r.connect(n,"127.0.0.1")})}async function B(n={}){let e=n.port??7668;if(await M(e))return{alreadyRunning:!0};if(y())throw new c(`no rnx bridge on port ${e}. run \`rnx daemon install\` to enable the faster background service, or \`rnx serve\` in another shell.`,"DEV_HOST_REFUSED");let{cmd:t,prefixArgs:r}=C(),s=[...r,"serve","--quiet"];e!==7668&&s.push("--port",String(e));let o=_(t,s,{detached:!0,stdio:"ignore",env:process.env,cwd:process.cwd()});o.unref();let i=Date.now()+(n.startupTimeoutMs??5e3);for(;Date.now()<i;){if(await M(e))return{alreadyRunning:!1,pid:o.pid};await new Promise(a=>setTimeout(a,100))}throw new c(`spawned rnx daemon on port ${e} but it did not come up in time. run \`rnx serve\` manually to diagnose.`,"SPAWN_TIMEOUT")}async function h(n={}){await B({port:n.port,startupTimeoutMs:n.startupTimeoutMs});let e=new f(n);try{await e.waitReady()}catch(t){throw e.close(),t}return e}async function ge(n){let[e,...t]=n;try{switch(e){case void 0:case"--help":case"-h":case"help":return L(),0;case"attach":return await W(t);case"projects":return await J();case"project":return await V(t);case"sessions":return await H(t);case"start":return await G(t);case"prompt":return await q(t);case"watch":return await K(t);case"transcript":return await z(t);case"end":return await Q(t);case"paths":return await Y();default:return process.stderr.write(`unknown agent subcommand: ${e}
5
5
  `),L(),2}}catch(r){if(r instanceof c)return process.stderr.write(`${r.message}
6
6
  `),1;throw r}}async function v(n){let e=await h({clientLabel:"sootsim-agent-cli"});try{return await n(e)}finally{e.close()}}function L(){$("agent")}function P(n,e){let t={},r=[];for(let s=0;s<n.length;s++){let o=n[s],i=e[o];i==="value"?(t[o]=n[s+1]??"",s++):i==="bool"?t[o]=!0:r.push(o)}return{flags:t,positional:r}}function U(n,e="codex"){return n==="codex"||n==="claude"?n:e}async function W(n){let{flags:e,positional:t}=P(n,{"--name":"value","--provider":"value"}),r=t[0];if(!r)return process.stderr.write(`usage: rnx agent attach <dir> [--name X] [--provider codex|claude]
7
7
  `),2;let s=d.resolve(r);if(!w.existsSync(s))return process.stderr.write(`directory does not exist: ${s}
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (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 M}from"./chunk-3ZVQFBLZ.js";import"./chunk-MPYUIK6F.js";import{execFile as G,spawn as q}from"node:child_process";import{randomUUID as X}from"node:crypto";import{constants as R,createReadStream as Y,createWriteStream as j,existsSync as C,openSync as J}from"node:fs";import V from"node:fs/promises";import z from"node:path";import K from"node:readline";import{promisify as Q}from"node:util";import{spawn as H}from"node:child_process";import L from"node:readline";var b=class extends Error{code;data;constructor(t,r,m){super(t),this.name="CodexRpcError",this.code=r,this.data=m}};function W(d){let t=H(d.bin,["app-server"],{cwd:d.cwd,env:{...process.env,...d.env},stdio:["pipe","pipe","pipe"]}),r=new Map,m=new Map,u=1,f=!1,a=new Promise(s=>{t.on("exit",(o,e)=>{f=!0;let p=new Error(`codex app-server exited (code=${o}, signal=${e??""})`);for(let{reject:y}of r.values())y(p);r.clear(),s({code:o,signal:e})})});L.createInterface({input:t.stdout,crlfDelay:1/0}).on("line",s=>{let o=s.trim();if(!o)return;let e;try{e=JSON.parse(o)}catch{return}if(e.id!=null&&(e.result!==void 0||e.error!==void 0)){let p=typeof e.id=="string"?Number(e.id):e.id,y=p!=null?r.get(p):void 0;if(!y)return;r.delete(p),e.error?y.reject(new b(e.error.message,e.error.code,e.error.data)):y.resolve(e.result);return}if(e.method){let p=m.get(e.method);if(!p)return;for(let y of p)try{y(e.params)}catch(l){console.error(`[codex-client] handler for "${e.method}" threw:`,l instanceof Error?l.stack??l.message:l)}}}),t.stderr.setEncoding("utf8"),t.stderr.on("data",s=>{let o=m.get("__stderr__");if(o)for(let e of o)try{e({text:s})}catch{}});function n(s){if(!f)try{t.stdin.write(JSON.stringify(s)+`
4
+ import{b as M}from"./chunk-EAXYIY5U.js";import"./chunk-NUU3SWLR.js";import{execFile as G,spawn as q}from"node:child_process";import{randomUUID as X}from"node:crypto";import{constants as R,createReadStream as Y,createWriteStream as j,existsSync as C,openSync as J}from"node:fs";import V from"node:fs/promises";import z from"node:path";import K from"node:readline";import{promisify as Q}from"node:util";import{spawn as H}from"node:child_process";import L from"node:readline";var b=class extends Error{code;data;constructor(t,r,m){super(t),this.name="CodexRpcError",this.code=r,this.data=m}};function W(d){let t=H(d.bin,["app-server"],{cwd:d.cwd,env:{...process.env,...d.env},stdio:["pipe","pipe","pipe"]}),r=new Map,m=new Map,u=1,f=!1,a=new Promise(s=>{t.on("exit",(o,e)=>{f=!0;let p=new Error(`codex app-server exited (code=${o}, signal=${e??""})`);for(let{reject:y}of r.values())y(p);r.clear(),s({code:o,signal:e})})});L.createInterface({input:t.stdout,crlfDelay:1/0}).on("line",s=>{let o=s.trim();if(!o)return;let e;try{e=JSON.parse(o)}catch{return}if(e.id!=null&&(e.result!==void 0||e.error!==void 0)){let p=typeof e.id=="string"?Number(e.id):e.id,y=p!=null?r.get(p):void 0;if(!y)return;r.delete(p),e.error?y.reject(new b(e.error.message,e.error.code,e.error.data)):y.resolve(e.result);return}if(e.method){let p=m.get(e.method);if(!p)return;for(let y of p)try{y(e.params)}catch(l){console.error(`[codex-client] handler for "${e.method}" threw:`,l instanceof Error?l.stack??l.message:l)}}}),t.stderr.setEncoding("utf8"),t.stderr.on("data",s=>{let o=m.get("__stderr__");if(o)for(let e of o)try{e({text:s})}catch{}});function n(s){if(!f)try{t.stdin.write(JSON.stringify(s)+`
5
5
  `)}catch{}}return{exited:a,on(s,o){let e=m.get(s);return e||(e=new Set,m.set(s,e)),e.add(o),()=>{e?.delete(o)}},request(s,o){if(f)return Promise.reject(new Error(`codex app-server closed; cannot call ${s}`));let e=u++;return new Promise((p,y)=>{r.set(e,{resolve:l=>p(l),reject:y,method:s}),n({jsonrpc:"2.0",id:e,method:s,params:o})})},notify(s,o){n({jsonrpc:"2.0",method:s,params:o})},async shutdown(s=1500){if(f)return;try{t.stdin.end()}catch{}let o=setTimeout(()=>{if(!f)try{t.kill("SIGTERM")}catch{}},s);try{await a}finally{clearTimeout(o)}},kill(s="SIGTERM"){if(!f)try{t.kill(s)}catch{}}}}var O="never",F="danger-full-access",Z={type:"dangerFullAccess"},D="fast",ee="medium",te=Q(G);async function ne(d,t){let r=t||d;if(r.includes("/")||r.includes("\\"))return C(r)?{ok:!0,path:r}:{ok:!1,message:`agent binary not found at path: ${r}`};try{let{stdout:m}=await te("which",[r],{timeout:1500}),u=m.trim();return u?{ok:!0,path:u}:{ok:!1,message:`${r} not found on PATH`}}catch{return{ok:!1,message:`${r} not found on PATH. install the ${d} CLI and retry, or pass --${d}-bin /path/to/${d} to agent start.`}}}function re(d){let t={"--session-id":"sessionId","--project-id":"projectId","--provider":"provider","--cwd":"cwd","--prompt-in":"promptIn","--events-out":"eventsOut","--transcript":"transcript","--codex-bin":"codexBin","--claude-bin":"claudeBin","--claude-session-uuid":"claudeSessionUuid"},r={};for(let m=0;m<d.length;m++){let u=d[m];if(u==="--fresh-thread"){r.freshThread=!0;continue}let f=t[u];f&&(r[f]=d[m+1],m++)}return r}async function Ie(d){let t=re(d);if(!t.sessionId||!t.projectId||!t.provider||!t.cwd||!t.promptIn||!t.eventsOut)return process.stderr.write(`usage: rnx agent-wrapper --session-id <id> --project-id <id>
6
6
  --provider codex|claude --cwd <path>
7
7
  --prompt-in <fifo> --events-out <fifo>
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (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{o as p}from"./chunk-UTUGLOQA.js";import"./chunk-EUND2TS4.js";import"./chunk-A37NXF3Z.js";import"./chunk-MPYUIK6F.js";import{existsSync as h,mkdirSync as d,readFileSync as y,writeFileSync as g}from"node:fs";import{join as m}from"node:path";import{gzipSync as w}from"node:zlib";function f(t,e){let o=t.indexOf(`--${e}`);if(o!==-1&&o+1<t.length)return t[o+1];let r=t.find(i=>i.startsWith(`--${e}=`));return r?r.slice(e.length+3):void 0}async function x(t){let e=f(t,"wire")||"",o=f(t,"out-dir"),r=f(t,"manifest");if((!o||!r)&&(console.error(" usage: rnx app-fonts stage --wire <wire> --out-dir <dir> --manifest <path>"),process.exit(1)),!e.trim()){console.log("no app fonts declared \u2014 nothing to stage");return}d(o,{recursive:!0});let i=await p(e,{onStaged:({url:n,byteLength:s})=>console.log(` staged app font: ${n} (${(s/1024).toFixed(1)} KiB)`),onError:(n,s)=>console.error(` warning: failed to fetch app font ${n}: ${s instanceof Error?s.message:s}`)}),a=[];for(let n of i){let s=w(n.bytes);g(m(o,n.urlhash),s),a.push({url:n.url,urlhash:n.urlhash,contentType:n.contentType,encoding:"gzip",sizeBytes:s.length,rawBytes:n.bytes.byteLength})}let c=[];if(h(r))try{let n=JSON.parse(y(r,"utf8"));Array.isArray(n)&&(c=n)}catch{}let u=new Set(c.map(n=>n.urlhash)),l=[...c,...a.filter(n=>!u.has(n.urlhash))];g(r,JSON.stringify(l)),console.log(`staged ${a.length} app font(s); manifest now has ${l.length} file(s)`)}async function E(t){let e=t[0];if(e==="stage"){await x(t.slice(1));return}console.error(` unknown app-fonts subcommand: ${e??"(none)"}`),console.error(" available: stage"),process.exit(1)}export{E as runAppFonts};
4
+ import{o as p}from"./chunk-4ZGUXZ6U.js";import"./chunk-XYPCBRGY.js";import"./chunk-YFF6YFYJ.js";import"./chunk-NUU3SWLR.js";import{existsSync as h,mkdirSync as d,readFileSync as y,writeFileSync as g}from"node:fs";import{join as m}from"node:path";import{gzipSync as w}from"node:zlib";function f(t,e){let o=t.indexOf(`--${e}`);if(o!==-1&&o+1<t.length)return t[o+1];let r=t.find(i=>i.startsWith(`--${e}=`));return r?r.slice(e.length+3):void 0}async function x(t){let e=f(t,"wire")||"",o=f(t,"out-dir"),r=f(t,"manifest");if((!o||!r)&&(console.error(" usage: rnx app-fonts stage --wire <wire> --out-dir <dir> --manifest <path>"),process.exit(1)),!e.trim()){console.log("no app fonts declared \u2014 nothing to stage");return}d(o,{recursive:!0});let i=await p(e,{onStaged:({url:n,byteLength:s})=>console.log(` staged app font: ${n} (${(s/1024).toFixed(1)} KiB)`),onError:(n,s)=>console.error(` warning: failed to fetch app font ${n}: ${s instanceof Error?s.message:s}`)}),a=[];for(let n of i){let s=w(n.bytes);g(m(o,n.urlhash),s),a.push({url:n.url,urlhash:n.urlhash,contentType:n.contentType,encoding:"gzip",sizeBytes:s.length,rawBytes:n.bytes.byteLength})}let c=[];if(h(r))try{let n=JSON.parse(y(r,"utf8"));Array.isArray(n)&&(c=n)}catch{}let u=new Set(c.map(n=>n.urlhash)),l=[...c,...a.filter(n=>!u.has(n.urlhash))];g(r,JSON.stringify(l)),console.log(`staged ${a.length} app font(s); manifest now has ${l.length} file(s)`)}async function E(t){let e=t[0];if(e==="stage"){await x(t.slice(1));return}console.error(` unknown app-fonts subcommand: ${e??"(none)"}`),console.error(" available: stage"),process.exit(1)}export{E as runAppFonts};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import"./chunk-MPYUIK6F.js";import{spawn as v}from"child_process";var w=new Set(["describe","find","list","network","logs","count","tree","url","a11y","node","layout","keyboard","errors","warnings","requests","animations","animation","state","sample-color"]),S=new Set(["--exists","--empty","--negate","--quiet","--allow-timeout","!"]),q=new Set(["--count","--count-at-least","--count-at-most","--contains","--not-contains","--matches","--not-matches","--equals","--jq","--has-path","--within"]),P=new Set(["--path-equals"]);function j(s){let r=[],u=[],n=0,e=!1,t=!1,i=!1;for(let o=0;o<s.length;o++){let a=s[o];if(a==="--within"){let c=Number(s[o+1]);if(!Number.isFinite(c)||c<0)return{error:`--within requires a non-negative number, got: ${s[o+1]}`};n=c,o++;continue}if(a==="--negate"||a==="!"){e=!0;continue}if(a==="--quiet"){t=!0;continue}if(a==="--allow-timeout"){i=!0;continue}if(S.has(a)){u.push({kind:a,args:[]});continue}if(q.has(a)){let c=s[o+1];if(c==null)return{error:`${a} requires a value`};u.push({kind:a,args:[c]}),o++;continue}if(P.has(a)){let c=s[o+1],f=s[o+2];if(c==null||f==null)return{error:`${a} requires <path> <value>`};u.push({kind:a,args:[c,f]}),o+=2;continue}r.push(a)}return r.length===0?{error:"assert requires a verb (e.g. find, describe, get errors)"}:{verbArgs:r,predicates:u,withinMs:n,negate:e,quiet:t,allowTimeout:i}}function N(s){return s[0]==="get"||s[0]==="debug"?w.has(s[1])?s[1]:null:s[0]==="do"||s[0]==="wait"?null:w.has(s[0])?s[0]:null}async function R(s){let u=[process.argv[1],...s,"--json"];return new Promise(n=>{let e=v(process.execPath,u,{stdio:["ignore","pipe","pipe"],env:process.env}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",o=>{n({ok:!1,payload:null,reason:`spawn failed: ${o.message}`})}),e.on("close",o=>{if(o!==0){let a=i.trim().split(`
4
+ import"./chunk-NUU3SWLR.js";import{spawn as v}from"child_process";var w=new Set(["describe","find","list","network","logs","count","tree","url","a11y","node","layout","keyboard","errors","warnings","requests","animations","animation","state","sample-color"]),S=new Set(["--exists","--empty","--negate","--quiet","--allow-timeout","!"]),q=new Set(["--count","--count-at-least","--count-at-most","--contains","--not-contains","--matches","--not-matches","--equals","--jq","--has-path","--within"]),P=new Set(["--path-equals"]);function j(s){let r=[],u=[],n=0,e=!1,t=!1,i=!1;for(let o=0;o<s.length;o++){let a=s[o];if(a==="--within"){let c=Number(s[o+1]);if(!Number.isFinite(c)||c<0)return{error:`--within requires a non-negative number, got: ${s[o+1]}`};n=c,o++;continue}if(a==="--negate"||a==="!"){e=!0;continue}if(a==="--quiet"){t=!0;continue}if(a==="--allow-timeout"){i=!0;continue}if(S.has(a)){u.push({kind:a,args:[]});continue}if(q.has(a)){let c=s[o+1];if(c==null)return{error:`${a} requires a value`};u.push({kind:a,args:[c]}),o++;continue}if(P.has(a)){let c=s[o+1],f=s[o+2];if(c==null||f==null)return{error:`${a} requires <path> <value>`};u.push({kind:a,args:[c,f]}),o+=2;continue}r.push(a)}return r.length===0?{error:"assert requires a verb (e.g. find, describe, get errors)"}:{verbArgs:r,predicates:u,withinMs:n,negate:e,quiet:t,allowTimeout:i}}function N(s){return s[0]==="get"||s[0]==="debug"?w.has(s[1])?s[1]:null:s[0]==="do"||s[0]==="wait"?null:w.has(s[0])?s[0]:null}async function R(s){let u=[process.argv[1],...s,"--json"];return new Promise(n=>{let e=v(process.execPath,u,{stdio:["ignore","pipe","pipe"],env:process.env}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",o=>{n({ok:!1,payload:null,reason:`spawn failed: ${o.message}`})}),e.on("close",o=>{if(o!==0){let a=i.trim().split(`
5
5
  `).slice(-2).join(" | ").slice(0,200);n({ok:!1,payload:null,reason:`verb exited ${o}${a?`: ${a}`:""}`});return}if(!t.trim()){n({ok:!1,payload:null,reason:"verb produced no output"});return}try{let a=JSON.parse(t);n({ok:!0,payload:a})}catch{n({ok:!1,payload:null,reason:`verb output was not valid json: ${t.slice(0,120)}`})}})})}function y(s,r){let u=r.split(".").filter(e=>e.length>0),n=s;for(let e of u){if(n==null)return{found:!1};if(Array.isArray(n)){let t=Number(e);if(!Number.isInteger(t)||t<0||t>=n.length)return{found:!1};n=n[t];continue}if(typeof n=="object"){let t=n;if(!(e in t))return{found:!1};n=t[e];continue}return{found:!1}}return{found:!0,value:n}}function d(s){return Array.isArray(s)?s.length:s&&typeof s=="object"?Object.keys(s).length:null}async function A(s,r){let{kind:u,args:n}=s;switch(u){case"--exists":return r==null?{ok:!1,reason:"payload is null"}:d(r)===0?{ok:!1,reason:"payload is empty"}:{ok:!0,reason:"exists"};case"--empty":{if(r==null)return{ok:!0,reason:"payload is null"};let e=d(r);return e===0?{ok:!0,reason:"payload is empty"}:{ok:!1,reason:`payload has ${e} item(s)`}}case"--count":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:`payload not countable (${typeof r})`}:{ok:t===e,reason:`count=${t}, want=${e}`}}case"--count-at-least":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:"payload not countable"}:{ok:t>=e,reason:`count=${t}, want>=${e}`}}case"--count-at-most":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:"payload not countable"}:{ok:t<=e,reason:`count=${t}, want<=${e}`}}case"--contains":{let e=n[0],t=JSON.stringify(r);return{ok:t.includes(e),reason:t.includes(e)?`contains "${e}"`:`missing "${e}"`}}case"--not-contains":{let e=n[0],t=JSON.stringify(r);return{ok:!t.includes(e),reason:t.includes(e)?`unexpected "${e}"`:`not contains "${e}"`}}case"--matches":{let e=new RegExp(n[0]),t=JSON.stringify(r),i=e.test(t);return{ok:i,reason:i?`matches /${n[0]}/`:`no match for /${n[0]}/`}}case"--not-matches":{let e=new RegExp(n[0]),t=JSON.stringify(r),i=!e.test(t);return{ok:i,reason:i?`not matches /${n[0]}/`:`unexpected /${n[0]}/`}}case"--equals":{let e=n[0],t=typeof r=="string"?r:typeof r=="number"||typeof r=="boolean"?String(r):JSON.stringify(r);return{ok:t===e,reason:`got=${JSON.stringify(t)}, want=${JSON.stringify(e)}`}}case"--has-path":{let e=y(r,n[0]);return{ok:e.found,reason:e.found?`path ${n[0]} present`:`path ${n[0]} missing`}}case"--path-equals":{let[e,t]=n,i=y(r,e);if(!i.found)return{ok:!1,reason:`path ${e} missing`};let o=typeof i.value=="string"||typeof i.value=="number"||typeof i.value=="boolean"?String(i.value):JSON.stringify(i.value);return{ok:o===t,reason:`${e}=${o}, want=${t}`}}case"--jq":{let e=n[0];try{let i=(await O(e,r)).trim();return{ok:i.length>0&&i!=="null"&&i!=="false"&&i!=='""',reason:`jq: ${i.slice(0,120)}`}}catch(t){throw new Error(`jq evaluation failed: ${t.message}`)}}default:return{ok:!1,reason:`unknown predicate ${u}`}}}function O(s,r){return new Promise((u,n)=>{let e=v("jq",[s],{stdio:["pipe","pipe","pipe"]}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",n),e.on("close",o=>{if(o!==0){n(new Error(i.trim()||`jq exited ${o}`));return}u(t)}),e.stdin.end(JSON.stringify(r))})}async function T(s){(s[0]==="--help"||s[0]==="-h"||s.length===0)&&(J(),process.exit(s.length===0?2:0));let r=j(s);"error"in r&&(process.stderr.write(` assert: ${r.error}
6
6
  `),process.exit(2));let{verbArgs:u,predicates:n,withinMs:e,negate:t,quiet:i,allowTimeout:o}=r;N(u)||(process.stderr.write(` assert: unknown or non-read verb: ${u.join(" ")}
7
7
  supported: ${Array.from(w).sort().join(", ")}
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (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-Z6IYPETC.js";import{d as t}from"./chunk-645WC3JJ.js";import"./chunk-MKN3NYBZ.js";import"./chunk-MPYUIK6F.js";function i(){console.log(`
4
+ import{a as r}from"./chunk-PDGEVGHU.js";import{d as t}from"./chunk-ZCHCE6WJ.js";import"./chunk-X2ITJOHZ.js";import"./chunk-NUU3SWLR.js";function i(){console.log(`
5
5
  rnx auth \u2014 inspect CLI auth
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a,b,c,d}from"./chunk-FXYFWGUF.js";import"./chunk-MPYUIK6F.js";export{d as BETA_ASK_HEADLINE,b as BETA_LABEL,c as BETA_TAGLINE,a as IS_BETA};
4
+ import{a,b,c,d}from"./chunk-FNVWTY57.js";import"./chunk-NUU3SWLR.js";export{d as BETA_ASK_HEADLINE,b as BETA_LABEL,c as BETA_TAGLINE,a as IS_BETA};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (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 O}from"./chunk-P3Q6BOWW.js";import"./chunk-3JTUEUEQ.js";import{q as E,s as F,u as N}from"./chunk-E4QTH57Q.js";import"./chunk-6BJ2QYH3.js";import{r as S}from"./chunk-MKN3NYBZ.js";import"./chunk-MPYUIK6F.js";import{createHash as I,randomUUID as q}from"node:crypto";import{createReadStream as D}from"node:fs";import m from"node:fs/promises";import f from"node:path";var T="/__camera-fixtures/",J=new Set([".m4v",".mov",".mp4",".webm"]);function _(){console.log(`
4
+ import{m as O}from"./chunk-4QK74NWP.js";import"./chunk-GLYEL265.js";import{q as E,s as F,u as N}from"./chunk-2IVWNQDE.js";import"./chunk-MM2XAXTN.js";import{r as S}from"./chunk-X2ITJOHZ.js";import"./chunk-NUU3SWLR.js";import{createHash as I,randomUUID as q}from"node:crypto";import{createReadStream as D}from"node:fs";import m from"node:fs/promises";import f from"node:path";var T="/__camera-fixtures/",J=new Set([".m4v",".mov",".mp4",".webm"]);function _(){console.log(`
5
5
  rnx camera \u2014 control the simulator camera source
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  var n=Object.freeze({name:"rnx",packageName:"rnxsim",commandName:"rnx",domain:"rnxsim.com",origin:"https://rnxsim.com"});export{n as a};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  var t=Object.freeze({id:"ios",displayName:"iOS",isIOS:!0,isAndroid:!1,select:e=>e.ios}),r=Object.freeze({id:"android",displayName:"Android",isIOS:!1,isAndroid:!0,select:e=>e.android}),i=Object.freeze({ios:t,android:r});
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (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 O,b as B}from"./chunk-6BJ2QYH3.js";import{P as T,Q as N,R as _,S as W,g as F}from"./chunk-MKN3NYBZ.js";var Ie="http://localhost:7668/";function H(e){if(typeof e=="number")return Number.isInteger(e)&&e>0?e:null;if(typeof e!="string")return null;let t=e.trim();if(!t)return null;let r=Number(t);return Number.isInteger(r)&&r>0?r:null}function X(e){let t=H(e);return t===null?0:t}function V(e={}){let t=H(e.explicitPort);return t!==null?t:7668+X(e.portOffset)}var z=5173;var Q=2e3;function Pe(e){let t=e-7668;return t<0||t>Q?null:`http://localhost:${z+t}/`}var ye=4001,Te="sootsim close";import{existsSync as Z,mkdirSync as ee,readFileSync as te,rmSync as E,writeFileSync as re}from"fs";import{tmpdir as ne}from"os";import{dirname as ie,join as oe,resolve as se}from"path";var v=1,G="SOOTSIM_CLI_CURRENT_SIM_PATH",le=["SOOTSIM_CLI_IDENTITY","TM_SESSION","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"],j=/^(?:tmux|screen)|^tm$/i;function q(e,t=20){let r=e,n=O(e);if(!n||n<=1){let o=B(e);return e>1&&o&&!j.test(o)?e:null}for(let o=0;o<t;o++){let s=B(n);if(s&&j.test(s))return r;let u=O(n);if(!u||u<=1)return s?n:r;r=n,n=u}return n}function x(){for(let t of le){let r=process.env[t];if(r&&r.trim())return{key:`${t}:${r.trim()}`,source:t,stable:!0}}let e=q(process.ppid);return e&&e>1?{key:`gppid-${e}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function ce(){return x().key}function ve(){return q(process.ppid)}function k(){if(process.env[G])return se(process.env[G]);let e=ce();return oe(ne(),`sootsim-current-sim-${e}.json`)}function de(){let e=k();if(!Z(e))return null;try{let t=JSON.parse(te(e,"utf8"));return t.version!==v||typeof t.simId!="string"||!t.simId.trim()||typeof t.updatedAt!="string"?(E(e,{force:!0}),null):{version:v,simId:t.simId.trim(),updatedAt:t.updatedAt}}catch{return E(e,{force:!0}),null}}function R(){return de()?.simId||null}function xe(e){let t=e.trim();if(!t)return;let r=k();ee(ie(r),{recursive:!0}),re(r,JSON.stringify({version:v,simId:t,updatedAt:new Date().toISOString()},null,2)+`
4
+ import{a as O,b as B}from"./chunk-MM2XAXTN.js";import{P as T,Q as N,R as _,S as W,g as F}from"./chunk-X2ITJOHZ.js";var Ie="http://localhost:7668/";function H(e){if(typeof e=="number")return Number.isInteger(e)&&e>0?e:null;if(typeof e!="string")return null;let t=e.trim();if(!t)return null;let r=Number(t);return Number.isInteger(r)&&r>0?r:null}function X(e){let t=H(e);return t===null?0:t}function V(e={}){let t=H(e.explicitPort);return t!==null?t:7668+X(e.portOffset)}var z=5173;var Q=2e3;function Pe(e){let t=e-7668;return t<0||t>Q?null:`http://localhost:${z+t}/`}var ye=4001,Te="sootsim close";import{existsSync as Z,mkdirSync as ee,readFileSync as te,rmSync as E,writeFileSync as re}from"fs";import{tmpdir as ne}from"os";import{dirname as ie,join as oe,resolve as se}from"path";var v=1,G="SOOTSIM_CLI_CURRENT_SIM_PATH",le=["SOOTSIM_CLI_IDENTITY","TM_SESSION","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"],j=/^(?:tmux|screen)|^tm$/i;function q(e,t=20){let r=e,n=O(e);if(!n||n<=1){let o=B(e);return e>1&&o&&!j.test(o)?e:null}for(let o=0;o<t;o++){let s=B(n);if(s&&j.test(s))return r;let u=O(n);if(!u||u<=1)return s?n:r;r=n,n=u}return n}function x(){for(let t of le){let r=process.env[t];if(r&&r.trim())return{key:`${t}:${r.trim()}`,source:t,stable:!0}}let e=q(process.ppid);return e&&e>1?{key:`gppid-${e}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function ce(){return x().key}function ve(){return q(process.ppid)}function k(){if(process.env[G])return se(process.env[G]);let e=ce();return oe(ne(),`sootsim-current-sim-${e}.json`)}function de(){let e=k();if(!Z(e))return null;try{let t=JSON.parse(te(e,"utf8"));return t.version!==v||typeof t.simId!="string"||!t.simId.trim()||typeof t.updatedAt!="string"?(E(e,{force:!0}),null):{version:v,simId:t.simId.trim(),updatedAt:t.updatedAt}}catch{return E(e,{force:!0}),null}}function R(){return de()?.simId||null}function xe(e){let t=e.trim();if(!t)return;let r=k();ee(ie(r),{recursive:!0}),re(r,JSON.stringify({version:v,simId:t,updatedAt:new Date().toISOString()},null,2)+`
5
5
  `)}function J(){E(k(),{force:!0})}var h="http://localhost:5173/";import ue from"node:fs";import S from"node:path";import{WebSocket as D}from"ws";var C=null;function M(){return N().filter(e=>W(e))}function Y(e){let t=S.resolve(e);for(;;){if(ue.existsSync(S.join(t,".git")))return t;let r=S.dirname(t);if(r===t)return null;t=r}}function K(e,t){let r=S.relative(e,t);return r===""||r!==".."&&!r.startsWith(`..${S.sep}`)&&!S.isAbsolute(r)}function ae(){let e=M();if(e.length===0)return null;if(process.env.SOOTSIM_BRIDGE_PORT!==void 0||process.env.PORT_OFFSET!==void 0){let r=V({explicitPort:process.env.SOOTSIM_BRIDGE_PORT,portOffset:process.env.PORT_OFFSET}),n=e.find(o=>o.bridgePort===r);if(n)return n}let t=null;try{t=process.cwd()}catch{}if(t){let r=Y(t),n=e.filter(o=>{let s=Y(o.cwd);return r&&s?r===s:K(t,o.cwd)||K(o.cwd,t)});if(n.length>0)return n.find(o=>o.bridgePort===7668)??n[0]}return e.find(r=>r.bridgePort===7668)??e[0]}function me(){let e=F();if(C?.homeDir===e)return C.world;let t=fe();return C={homeDir:e,world:t},t}function fe(){let e=ae();if(e)return{source:"dev-bridge",bridgePort:e.bridgePort,shellBaseUrl:e.shellPort?`http://localhost:${e.shellPort}/`:h};let t=T();return t&&_(t)?{source:"daemon",bridgePort:t.bridgePort,shellBaseUrl:t.runtimePort>0?`http://localhost:${t.runtimePort}/`:h}:{source:"default",bridgePort:7668,shellBaseUrl:h}}function ge(e){let t=M().find(n=>n.bridgePort===e);if(t)return{source:"dev-bridge",shellBaseUrl:t.shellPort?`http://localhost:${t.shellPort}/`:h};let r=T();return r&&_(r)&&r.bridgePort===e?{source:"daemon",shellBaseUrl:r.runtimePort>0?`http://localhost:${r.runtimePort}/`:h}:null}function Fe(e){let t;try{let o=new URL(e);t=o.port?Number(o.port):o.protocol==="https:"?443:80}catch{return null}if(!Number.isFinite(t)||t<=0)return null;let r=M().find(o=>o.shellPort===t||o.runtimePort===t||o.bridgePort===t);if(r)return r.bridgePort;let n=T();return n&&_(n)&&(n.runtimePort===t||n.bridgePort===t)?n.bridgePort:null}function pe(){return me().bridgePort}function Ne(e,t){let r=ge(e),n=r?.source==="dev-bridge"?"dev bridge":r?.source==="daemon"?"daemon bridge":"bridge",o=r?.source==="dev-bridge"?`dev-bridges/${e}.json`:r?.source==="daemon"?"daemon.json":"no lockfile",s=t??r?.shellBaseUrl;process.stderr.write(` \u2192 ${n} :${e} (${s?`shell ${s}, `:""}${o})
6
6
  `)}var A=class extends Error{lock;constructor(t,r){super(t),this.name="BridgeSimLockedError",this.lock=r}};function he(e){return e==="flag"?"via --sim":e==="saved"?"saved via `rnx use`":"primary fallback \u2014 no sim pinned"}function We(e,t={}){let r=new Set,n=t.port??pe(),o=t.port!==void 0,s=t.commandTimeoutMs??15e3,u,a="none",I=new Set(t.stripBooleanFlags??[]),P=new Set(t.stripValueFlags??[]);for(let l=0;l<e.length;l++){let i=e[l];if(i==="--port"||i==="-p"){r.add(l),o=!0,l+1<e.length&&(r.add(l+1),n=Number(e[l+1])),l++;continue}if(i.startsWith("--port=")){r.add(l),o=!0,n=Number(i.slice(7));continue}if(i==="--timeout"){r.add(l),l+1<e.length&&(r.add(l+1),s=Number(e[l+1])),l++;continue}if(i==="--sim"||i==="--session"||i==="--tab"){r.add(l),l+1<e.length&&(r.add(l+1),u=e[l+1]?.trim()||void 0,a="flag"),l++;continue}let c=i.startsWith("--sim=")?i.slice(6):i.startsWith("--session=")?i.slice(10):i.startsWith("--tab=")?i.slice(6):void 0;if(c!==void 0){r.add(l),u=c.trim()||void 0,a="flag";continue}if(I.has(i)){r.add(l);continue}P.has(i)&&(r.add(l),l+1<e.length&&r.add(l+1),l++)}if(!u){let l=R();l&&(u=l.trim()||void 0,a="saved")}return{positional:e.filter((l,i)=>!r.has(i)),wsPort:n,explicitPort:o,simId:u,simIdSource:a,commandTimeoutMs:s}}function Se(e,t={}){let r=1,n=t.commandTimeoutMs??15e3,o=new Map,s=new D(`ws://localhost:${e}`),u=x(),a=new Promise((i,c)=>{s.on("open",()=>{try{s.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:u.key,cliIdentitySource:u.source,cliLabel:t.cliLabel}))}catch{}i()}),s.on("error",d=>{let m=d.message?`: ${d.message}`:"";c(new Error(`could not connect to ws://localhost:${e}${m}`))})});a.catch(()=>{});let I=!1,P=!1;function l(i,c){if(P||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||i.startsWith("bridge:")||i==="focus"||i==="close")return;P=!0;let d=c??"primary",m=he(c?t.simIdSource:"none");process.stderr.write(` \u2192 ${d} (${m})
7
7
  `)}return s.on("message",i=>{let c;try{c=JSON.parse(i.toString())}catch{return}if(c.id===0)return;let d=o.get(c.id);d&&(o.delete(c.id),c._otherCliCount>0&&!I&&(I=!0,process.stderr.write(`
@@ -1,6 +1,6 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as C}from"./chunk-B7JKDRC5.js";import{f as h}from"./chunk-4BNQLDNR.js";import{L as B,T as b,g as S}from"./chunk-MKN3NYBZ.js";import o from"node:fs";import c from"node:path";var g=1,k=`automatic-cleanup-v${g}.json`,x=`automatic-cleanup-v${g}.lock`,A=360*60*1e3;function w(){let i=c.join(S(),k);try{return JSON.parse(o.readFileSync(i,"utf8")).generation===g}catch{return!1}}function $(i){if(i<1024)return`${i} B`;let e=["KiB","MiB","GiB","TiB"],n=i/1024,r=e[0];for(let s=1;s<e.length&&n>=1024;s++)n/=1024,r=e[s];return`${n.toFixed(n>=10?1:2)} ${r}`}function p(i){let e;try{e=o.lstatSync(i)}catch{return 0}let n=e.blocks>0?e.blocks*512:e.size;if(!e.isDirectory()||e.isSymbolicLink())return n;let r=n;try{for(let s of o.readdirSync(i))r+=p(c.join(i,s))}catch{}return r}function E(i){for(let e of["SingletonLock","SingletonSocket","lockfile"])try{if(o.lstatSync(c.join(i,e)))return!0}catch{}return!1}function v(i,e){let n;try{n=o.readdirSync(i,{withFileTypes:!0})}catch{return[]}let r=E(e),s=[];for(let t of n){if(!t.isDirectory()||t.isSymbolicLink())continue;let a=c.join(i,t.name);if(C(t.name)){s.push({path:a,bytes:p(a),kind:"browser-cache",state:r?"in-use":"safe",selected:!r,detail:r?"browser profile is open; close it before cleanup":"disposable browser HTTP, bytecode, or GPU cache"});continue}s.push(...v(a,e))}return s}function P(i){let e=c.join(i,"profiles","playwright"),n;try{n=o.readdirSync(e,{withFileTypes:!0})}catch{return[]}return n.flatMap(r=>{if(!r.isDirectory()||r.isSymbolicLink())return[];let s=c.join(e,r.name);return v(s,s)})}function L(i){let e=c.join(i,"electron","userData");return v(e,e)}function R(i,e){let n=c.join(i,"recordings"),r;try{r=o.readdirSync(n,{withFileTypes:!0})}catch{return[]}return r.map(s=>{let t=c.join(n,s.name);return{path:t,bytes:p(t),kind:"recording",state:"aggressive",selected:e,detail:"user-created recording or captured-frame output"}})}function T(i,e){let n=c.join(i,"camera-fixtures"),r;try{r=o.readdirSync(n,{withFileTypes:!0})}catch{return[]}return r.map(s=>{let t=c.join(n,s.name);return{path:t,bytes:p(t),kind:"camera-fixture",state:"aggressive",selected:e,detail:"staged camera fixture video"}})}function U(i){let e=new Set(b()),n=[...e],r=h.planLocalRetention({retainVersions:2,protectVersions:n}),s=h.planLocalRetention({retainVersions:1,protectVersions:n}),t=new Set(r.removeVersions),a=new Set(s.removeVersions),l=new Set([...r.keepVersions,...r.removeVersions,...s.keepVersions,...s.removeVersions]),m=[];for(let u of[...l].sort()){let d=h.product.runtimeDir(u),y="retained",f="retained runtime";e.has(u)&&u!==r.activeVersion?(y="in-use",f="runtime is serving a connected simulator"):t.has(u)?(y="safe",f="inactive runtime outside the two-version rollback window"):a.has(u)?(y="aggressive",f="most recent rollback runtime"):u===r.activeVersion&&(f="active runtime; always protected"),m.push({path:d,bytes:p(d),kind:"runtime-version",state:y,selected:y==="safe"||y==="aggressive"&&i,detail:f})}for(let u of r.removeCacheFiles)m.push({path:u,bytes:p(u),kind:"runtime-archive",state:"safe",selected:!0,detail:"downloaded archive is unnecessary after successful extraction"});return{activeRuntime:r.activeVersion,entries:m}}function D(i={}){let e=i.aggressive===!0,n=S(),r=U(e),s=[...r.entries,...P(n),...L(n),...R(n,e),...T(n,e)].sort((t,a)=>a.bytes-t.bytes||t.path.localeCompare(a.path));return{home:n,activeRuntime:r.activeRuntime,entries:s,reclaimableBytes:s.reduce((t,a)=>t+(a.selected?a.bytes:0),0),protectedBytes:s.reduce((t,a)=>t+(a.selected?0:a.bytes),0),totalBytes:p(n)}}function I(i,e){let n=c.relative(i,e);if(!n||n.startsWith("..")||c.isAbsolute(n))throw new Error(`refusing cleanup target outside the rnx data home: ${e}`)}function V(i={}){let e=D(i),n=i.aggressive===!0?1:2;h.pruneLocalRetention({retainVersions:n,protectVersions:b()});for(let t of e.entries)if(t.selected&&!(t.kind==="runtime-archive"||t.kind==="runtime-version")){if(t.kind==="browser-cache"){let l=c.relative(e.home,t.path).split(c.sep),m=l[0]==="profiles"&&l[1]==="playwright"&&l[2]?c.join(e.home,"profiles","playwright",l[2]):l[0]==="electron"&&l[1]==="userData"?c.join(e.home,"electron","userData"):null;if(m&&E(m)){t.state="in-use",t.selected=!1,t.detail="browser profile opened while cleanup was starting";continue}}I(e.home,t.path),o.rmSync(t.path,{recursive:!0,force:!0})}let r=e.entries.filter(t=>t.selected&&!o.existsSync(t.path)).map(t=>t.path),s=p(e.home);return{...e,removedPaths:r,reclaimedBytes:Math.max(0,e.totalBytes-s),remainingBytes:s}}function M(){B();let i=S(),e=c.join(i,k),n=c.join(i,x);if(w())return{status:"already-complete",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};let r=null;for(let s=0;s<2&&r===null;s++)try{let t=o.openSync(n,"wx");try{o.writeFileSync(t,`${JSON.stringify({pid:process.pid,startedAt:Date.now()})}
4
+ import{b as C}from"./chunk-SIKPB3GL.js";import{f as h}from"./chunk-QXBFDUCQ.js";import{L as B,T as b,g as S}from"./chunk-X2ITJOHZ.js";import o from"node:fs";import c from"node:path";var g=1,k=`automatic-cleanup-v${g}.json`,x=`automatic-cleanup-v${g}.lock`,A=360*60*1e3;function w(){let i=c.join(S(),k);try{return JSON.parse(o.readFileSync(i,"utf8")).generation===g}catch{return!1}}function $(i){if(i<1024)return`${i} B`;let e=["KiB","MiB","GiB","TiB"],n=i/1024,r=e[0];for(let s=1;s<e.length&&n>=1024;s++)n/=1024,r=e[s];return`${n.toFixed(n>=10?1:2)} ${r}`}function p(i){let e;try{e=o.lstatSync(i)}catch{return 0}let n=e.blocks>0?e.blocks*512:e.size;if(!e.isDirectory()||e.isSymbolicLink())return n;let r=n;try{for(let s of o.readdirSync(i))r+=p(c.join(i,s))}catch{}return r}function E(i){for(let e of["SingletonLock","SingletonSocket","lockfile"])try{if(o.lstatSync(c.join(i,e)))return!0}catch{}return!1}function v(i,e){let n;try{n=o.readdirSync(i,{withFileTypes:!0})}catch{return[]}let r=E(e),s=[];for(let t of n){if(!t.isDirectory()||t.isSymbolicLink())continue;let a=c.join(i,t.name);if(C(t.name)){s.push({path:a,bytes:p(a),kind:"browser-cache",state:r?"in-use":"safe",selected:!r,detail:r?"browser profile is open; close it before cleanup":"disposable browser HTTP, bytecode, or GPU cache"});continue}s.push(...v(a,e))}return s}function P(i){let e=c.join(i,"profiles","playwright"),n;try{n=o.readdirSync(e,{withFileTypes:!0})}catch{return[]}return n.flatMap(r=>{if(!r.isDirectory()||r.isSymbolicLink())return[];let s=c.join(e,r.name);return v(s,s)})}function L(i){let e=c.join(i,"electron","userData");return v(e,e)}function R(i,e){let n=c.join(i,"recordings"),r;try{r=o.readdirSync(n,{withFileTypes:!0})}catch{return[]}return r.map(s=>{let t=c.join(n,s.name);return{path:t,bytes:p(t),kind:"recording",state:"aggressive",selected:e,detail:"user-created recording or captured-frame output"}})}function T(i,e){let n=c.join(i,"camera-fixtures"),r;try{r=o.readdirSync(n,{withFileTypes:!0})}catch{return[]}return r.map(s=>{let t=c.join(n,s.name);return{path:t,bytes:p(t),kind:"camera-fixture",state:"aggressive",selected:e,detail:"staged camera fixture video"}})}function U(i){let e=new Set(b()),n=[...e],r=h.planLocalRetention({retainVersions:2,protectVersions:n}),s=h.planLocalRetention({retainVersions:1,protectVersions:n}),t=new Set(r.removeVersions),a=new Set(s.removeVersions),l=new Set([...r.keepVersions,...r.removeVersions,...s.keepVersions,...s.removeVersions]),m=[];for(let u of[...l].sort()){let d=h.product.runtimeDir(u),y="retained",f="retained runtime";e.has(u)&&u!==r.activeVersion?(y="in-use",f="runtime is serving a connected simulator"):t.has(u)?(y="safe",f="inactive runtime outside the two-version rollback window"):a.has(u)?(y="aggressive",f="most recent rollback runtime"):u===r.activeVersion&&(f="active runtime; always protected"),m.push({path:d,bytes:p(d),kind:"runtime-version",state:y,selected:y==="safe"||y==="aggressive"&&i,detail:f})}for(let u of r.removeCacheFiles)m.push({path:u,bytes:p(u),kind:"runtime-archive",state:"safe",selected:!0,detail:"downloaded archive is unnecessary after successful extraction"});return{activeRuntime:r.activeVersion,entries:m}}function D(i={}){let e=i.aggressive===!0,n=S(),r=U(e),s=[...r.entries,...P(n),...L(n),...R(n,e),...T(n,e)].sort((t,a)=>a.bytes-t.bytes||t.path.localeCompare(a.path));return{home:n,activeRuntime:r.activeRuntime,entries:s,reclaimableBytes:s.reduce((t,a)=>t+(a.selected?a.bytes:0),0),protectedBytes:s.reduce((t,a)=>t+(a.selected?0:a.bytes),0),totalBytes:p(n)}}function I(i,e){let n=c.relative(i,e);if(!n||n.startsWith("..")||c.isAbsolute(n))throw new Error(`refusing cleanup target outside the rnx data home: ${e}`)}function V(i={}){let e=D(i),n=i.aggressive===!0?1:2;h.pruneLocalRetention({retainVersions:n,protectVersions:b()});for(let t of e.entries)if(t.selected&&!(t.kind==="runtime-archive"||t.kind==="runtime-version")){if(t.kind==="browser-cache"){let l=c.relative(e.home,t.path).split(c.sep),m=l[0]==="profiles"&&l[1]==="playwright"&&l[2]?c.join(e.home,"profiles","playwright",l[2]):l[0]==="electron"&&l[1]==="userData"?c.join(e.home,"electron","userData"):null;if(m&&E(m)){t.state="in-use",t.selected=!1,t.detail="browser profile opened while cleanup was starting";continue}}I(e.home,t.path),o.rmSync(t.path,{recursive:!0,force:!0})}let r=e.entries.filter(t=>t.selected&&!o.existsSync(t.path)).map(t=>t.path),s=p(e.home);return{...e,removedPaths:r,reclaimedBytes:Math.max(0,e.totalBytes-s),remainingBytes:s}}function M(){B();let i=S(),e=c.join(i,k),n=c.join(i,x);if(w())return{status:"already-complete",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};let r=null;for(let s=0;s<2&&r===null;s++)try{let t=o.openSync(n,"wx");try{o.writeFileSync(t,`${JSON.stringify({pid:process.pid,startedAt:Date.now()})}
5
5
  `,"utf8"),r=t}catch(a){o.closeSync(t);try{o.unlinkSync(n)}catch{}throw a}}catch(t){if((t instanceof Error&&"code"in t?t.code:null)!=="EEXIST")throw t;let l=0,m=0,u=null;try{u=o.lstatSync(n);let d=JSON.parse(o.readFileSync(n,"utf8"));l=typeof d.pid=="number"?d.pid:0,m=typeof d.startedAt=="number"?d.startedAt:0}catch{}if(l>0&&m>0&&Date.now()-m<A)try{return process.kill(l,0),{status:"busy",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0}}catch{}if(!u)continue;try{let d=o.lstatSync(n);if(d.dev!==u.dev||d.ino!==u.ino)return{status:"busy",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};o.unlinkSync(n)}catch{}}if(r===null)return{status:"busy",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};try{if(w())return{status:"already-complete",reclaimedBytes:0,remainingBytes:0,deferredInUseBytes:0};let s=V(),t=s.entries.reduce((l,m)=>l+(m.state==="in-use"?m.bytes:0),0);if(t>0)return{status:"deferred",reclaimedBytes:s.reclaimedBytes,remainingBytes:s.remainingBytes,deferredInUseBytes:t};let a=`${e}.${process.pid}.tmp`;return o.writeFileSync(a,`${JSON.stringify({generation:g,completedAt:Date.now(),reclaimedBytes:s.reclaimedBytes})}
6
6
  `,"utf8"),o.renameSync(a,e),{status:"complete",reclaimedBytes:s.reclaimedBytes,remainingBytes:s.remainingBytes,deferredInUseBytes:0}}finally{o.closeSync(r);try{o.unlinkSync(n)}catch{}}}export{w as a,$ as b,D as c,V as d,M as e};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{k as n}from"./chunk-E4QTH57Q.js";import{M as t,j as r}from"./chunk-MKN3NYBZ.js";function l(){let e=t(),i=r()?n():null;return i?.source==="dev-bridge"?{primary:`engine dev source (:${i.bridgePort})`,installedRuntime:e?`installed runtime v${e}`:null,isDevBridge:!0}:{primary:e?`runtime v${e}`:"runtime not installed",installedRuntime:null,isDevBridge:!1}}export{l as a};
4
+ import{k as n}from"./chunk-2IVWNQDE.js";import{M as t,j as r}from"./chunk-X2ITJOHZ.js";function l(){let e=t(),i=r()?n():null;return i?.source==="dev-bridge"?{primary:`engine dev source (:${i.bridgePort})`,installedRuntime:e?`installed runtime v${e}`:null,isDevBridge:!0}:{primary:e?`runtime v${e}`:"runtime not installed",installedRuntime:null,isDevBridge:!1}}export{l as a};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (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 a}from"./chunk-P3Q6BOWW.js";import{q as l,s as i}from"./chunk-E4QTH57Q.js";function c(r){if(!r||typeof r!="object")return!1;let t=Reflect.get(r,"strategy");return typeof Reflect.get(r,"ok")=="boolean"&&(t==="data"||t==="full")&&Array.isArray(Reflect.get(r,"cleared"))&&typeof Reflect.get(r,"relaunched")=="boolean"}function d(){console.log(`
4
+ import{m as a}from"./chunk-4QK74NWP.js";import{q as l,s as i}from"./chunk-2IVWNQDE.js";function c(r){if(!r||typeof r!="object")return!1;let t=Reflect.get(r,"strategy");return typeof Reflect.get(r,"ok")=="boolean"&&(t==="data"||t==="full")&&Array.isArray(Reflect.get(r,"cleared"))&&typeof Reflect.get(r,"relaunched")=="boolean"}function d(){console.log(`
5
5
  rnx reset - clear the current guest app and relaunch it
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.361 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{I,m as E,n as P,p as y,u as F,w as N}from"./chunk-3JTUEUEQ.js";import{r as h,v as B,w as A}from"./chunk-E4QTH57Q.js";var k={timeoutMs:1800,settleMs:48,startWindowMs:64};function w(e){return new Promise(t=>setTimeout(t,e))}function z(e){return e.includes("--json")}function K(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
4
+ import{I,m as E,n as P,p as y,u as F,w as N}from"./chunk-GLYEL265.js";import{r as h,v as B,w as A}from"./chunk-2IVWNQDE.js";var k={timeoutMs:1800,settleMs:48,startWindowMs:64};function w(e){return new Promise(t=>setTimeout(t,e))}function z(e){return e.includes("--json")}function K(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
5
5
  `)}function Q(e){process.stderr.write(`${e}
6
6
  `)}function b(e,t=Date.now()){let r=new Date(e),n=`${S(r.getHours())}:${S(r.getMinutes())}:${S(r.getSeconds())}`,s=t-e;if(s<0)return n;let o=Math.round(s/1e3);return o<60?`${n} +${o}s`:o<3600?`${n} +${Math.round(o/60)}m`:o<86400?`${n} +${Math.round(o/3600)}h`:`${n} +${Math.round(o/86400)}d`}function S(e){return e<10?`0${e}`:String(e)}async function O(e,t,...r){return B(e,`__sootsimTest.${t}`,...r)}async function j(e,t,...r){return A(e,`SootSim.bridges.mainShell.${t}`,...r)}async function X(e,t={}){try{let r=await O(e,"waitForScreenTransitions",k);if(!t.verbose||!r?.started)return;if(r.timedOut){console.log(` screen transition still active after ${r.waitedMs}ms; continuing`);return}r.waitedMs>0&&console.log(` waited ${r.waitedMs}ms for screen transition settle`)}catch{}}async function Z(e,t,r,...n){let s=Date.now()+Math.max(0,r);for(;;)try{return await j(e,t,...n)}catch(o){if(!I(o)||Date.now()>=s)throw o;await w(50)}}async function ee(e,t,r,n={}){let s=n.attempts??30,o=n.intervalMs??500,l=n.minNodeCount??10;for(let i=0;i<s;i++){let u=h(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{let c=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>l)return{bridge:u,count:c}}catch{}u.close(),await w(o)}return null}async function te(e,t,r,n={}){let s=n.timeoutMs??8e3,o=n.intervalMs??250,l=Date.now()+s;for(;Date.now()<l;){let i=h(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{return await i.send({type:"evaluate",code:"1"}),i}catch{i.close()}await w(o)}return null}async function ne(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,s=t.pollIntervalMs??200,o=Date.now(),l=o+r,i=-1,u=o,c=null,d=!1,m={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,liveFrameActive:!1,liveFrameChannels:0,liveFramePublishes:0,flag:void 0,loadingText:"",externalReady:null,externalStatus:"",externalError:"",errors:0};for(;Date.now()<l;){try{let a=await e.send({type:"evaluate",code:E}),g=Date.now()-o,f=Number(a?.nodes)||0,$=Number(a?.targets)||0,C=a?.liveFrameActive===!0,W=Number(a?.liveFrameChannels)||0,q=Number(a?.liveFramePublishes)||0,x=Number(a?.errors)||0,T=a?.flag===!0,p=a?.externalReady,M=typeof a?.loadingText=="string"?a.loadingText.trim():"",D=typeof a?.externalStatus=="string"?a.externalStatus.trim():"",R=typeof a?.externalError=="string"?a.externalError.trim():"",v=typeof a?.externalError=="string"&&R.length>0;if(c=p,d=v,f!==i&&(i=f,u=g),m={ready:!1,source:"timeout",elapsedMs:g,nodes:f,targets:$,liveFrameActive:C,liveFrameChannels:W,liveFramePublishes:q,flag:a?.flag,loadingText:M,externalReady:typeof p=="boolean"?p:null,externalStatus:D,externalError:R,errors:x},T&&p!==!1&&!v&&!M&&y({liveFrameActive:C,nodes:f,targets:$})&&g-u>=P)return{...m,ready:!0,source:"flag"};if(g>=n&&x>0&&!T)return{...m,ready:!1,source:"error-bail"}}catch{}await w(s)}return c!==!1&&!d&&!m.loadingText&&y(m)?{...m,ready:!0,source:"nodes-fallback"}:{...m,ready:!1,source:"timeout",elapsedMs:Date.now()-o}}function H(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function _(e,t,...r){return e.send({type:"call",path:`__sootsimTest.${t}`,args:r})}async function L(e,t={}){let r=await e.send({type:"evaluate",code:N});if(!r||typeof r!="object")return;let n=Math.max(0,Number(r.errors)||0),s=Math.max(0,Number(r.warnings)||0);if(n===0&&s===0)return;let o=[];if(n>0&&o.push(`${n} console error${n===1?"":"s"}`),s>0&&o.push(`${s} console warning${s===1?"":"s"}`),console.log(`
7
7
  console: ${o.join(", ")}`),t.errorsCommand&&console.log(` inspect: ${t.errorsCommand}`),s>0&&t.warningsCommand&&console.log(` inspect: ${t.warningsCommand}`),!t.includeTail||n===0)return;let l=await F(e,5);if(!(!Array.isArray(l)||l.length===0)){console.log(`