rnxsim 0.1.340 → 0.1.342

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 (163) hide show
  1. package/dist-cli/bin.js +5 -5
  2. package/dist-cli/chunks/{agent-DZRALHKK.js → agent-5OQUM7V3.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-FFCII533.js → agent-wrapper-SF2JKICI.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-P5TIE2BI.js → app-fonts-KGKAF26F.js} +2 -2
  5. package/dist-cli/chunks/{assert-L6YWZZH7.js → assert-J47XI4PJ.js} +2 -2
  6. package/dist-cli/chunks/{auth-2QUOSD3D.js → auth-OTPHAJKA.js} +2 -2
  7. package/dist-cli/chunks/{beta-DSQASQV7.js → beta-ABCO4OWD.js} +2 -2
  8. package/dist-cli/chunks/{camera-KONNW6GF.js → camera-CMCDVOCD.js} +2 -2
  9. package/dist-cli/chunks/{chunk-7IBTDBHW.js → chunk-44LTYSAH.js} +2 -2
  10. package/dist-cli/chunks/{chunk-CA3D6BWR.js → chunk-4CEJ33SY.js} +2 -2
  11. package/dist-cli/chunks/{chunk-52LBSDBQ.js → chunk-4DYFL7VF.js} +3 -3
  12. package/dist-cli/chunks/{chunk-AV323BT6.js → chunk-4M32SWCZ.js} +2 -2
  13. package/dist-cli/chunks/{chunk-6HQ2CUG5.js → chunk-5UZIVCQI.js} +1 -1
  14. package/dist-cli/chunks/{chunk-LQIMPJRD.js → chunk-5Y6USZTP.js} +2 -2
  15. package/dist-cli/chunks/{chunk-VP7D322G.js → chunk-6A7YWTDH.js} +1 -1
  16. package/dist-cli/chunks/{chunk-NZVA5ZGD.js → chunk-6AXSCU4S.js} +1 -1
  17. package/dist-cli/chunks/{chunk-Z7ILCEXG.js → chunk-7GX6PWOA.js} +2 -2
  18. package/dist-cli/chunks/{chunk-2FT3GZ2P.js → chunk-7H7KVISJ.js} +2 -2
  19. package/dist-cli/chunks/{chunk-U4ZHMDGL.js → chunk-7IXFMHDF.js} +1 -1
  20. package/dist-cli/chunks/{chunk-3KDMR5FE.js → chunk-B3KW5RNB.js} +2 -2
  21. package/dist-cli/chunks/{chunk-JJKRVEA6.js → chunk-C5FIGNQO.js} +1 -1
  22. package/dist-cli/chunks/{chunk-WRPLAFZP.js → chunk-CDLSM2CG.js} +2 -2
  23. package/dist-cli/chunks/{chunk-RYXIRFY2.js → chunk-DBGUZSSZ.js} +2 -2
  24. package/dist-cli/chunks/{chunk-MXXR5IDW.js → chunk-DPRJFFAG.js} +3 -3
  25. package/dist-cli/chunks/{chunk-LXED7YNR.js → chunk-EMPIVO3K.js} +1 -1
  26. package/dist-cli/chunks/{chunk-DB4DBTM2.js → chunk-GR7ES5RM.js} +2 -2
  27. package/dist-cli/chunks/{chunk-DEK47I44.js → chunk-HL2T3M2K.js} +3 -3
  28. package/dist-cli/chunks/{chunk-CYAEO7E3.js → chunk-HPMFCGIJ.js} +2 -2
  29. package/dist-cli/chunks/{chunk-YNS55EN5.js → chunk-HSBBMOXY.js} +2 -2
  30. package/dist-cli/chunks/{chunk-UH2S5SLV.js → chunk-IQ3TZS5H.js} +2 -2
  31. package/dist-cli/chunks/{chunk-JRJDACNV.js → chunk-IWUK7NKH.js} +2 -2
  32. package/dist-cli/chunks/{chunk-BCGO3XWB.js → chunk-J5RGKRWA.js} +2 -2
  33. package/dist-cli/chunks/{chunk-AZWECMXO.js → chunk-JAKZI5XW.js} +2 -2
  34. package/dist-cli/chunks/{chunk-J2EHW26I.js → chunk-JENXSTLF.js} +2 -2
  35. package/dist-cli/chunks/{chunk-X5C3SLYU.js → chunk-JMATTXDX.js} +1 -1
  36. package/dist-cli/chunks/{chunk-MYTUISZ3.js → chunk-KXEXEJCK.js} +2 -2
  37. package/dist-cli/chunks/{chunk-TRGIXJN4.js → chunk-L4ZWROFC.js} +3 -3
  38. package/dist-cli/chunks/{chunk-MKFOWHFO.js → chunk-LZUAVMRN.js} +1 -1
  39. package/dist-cli/chunks/{chunk-DMAUBOZ2.js → chunk-M6BDXBBX.js} +1 -1
  40. package/dist-cli/chunks/{chunk-CKKJUPAA.js → chunk-MLKTJDI4.js} +1 -1
  41. package/dist-cli/chunks/{chunk-UKKT5KM4.js → chunk-N47YVJNO.js} +2 -2
  42. package/dist-cli/chunks/{chunk-5ULMLFND.js → chunk-N5DUNSYF.js} +1 -1
  43. package/dist-cli/chunks/{chunk-EZ2WX6EK.js → chunk-NNPXO7FN.js} +3 -3
  44. package/dist-cli/chunks/{chunk-L6FANSWV.js → chunk-NPVDNQVZ.js} +1 -1
  45. package/dist-cli/chunks/{chunk-W34ZT5MF.js → chunk-NZZN7N5T.js} +2 -2
  46. package/dist-cli/chunks/{chunk-UOK37RTL.js → chunk-ODT3EOJJ.js} +1 -1
  47. package/dist-cli/chunks/{chunk-TAPZRN4C.js → chunk-PL6N5CU2.js} +1 -1
  48. package/dist-cli/chunks/{chunk-ZEU5RFAH.js → chunk-RAOGHSN7.js} +2 -2
  49. package/dist-cli/chunks/{chunk-PH37P7G2.js → chunk-T5CRWQLR.js} +2 -2
  50. package/dist-cli/chunks/chunk-TOGF7MYL.js +4 -0
  51. package/dist-cli/chunks/{chunk-NAG3Y5BF.js → chunk-TRYEPGYJ.js} +1 -1
  52. package/dist-cli/chunks/{chunk-WRNCAZIB.js → chunk-TTODHCTW.js} +2 -2
  53. package/dist-cli/chunks/{chunk-5JKZGU2L.js → chunk-U2AADABK.js} +1 -1
  54. package/dist-cli/chunks/{chunk-HWIUC6SX.js → chunk-UKA7NDFM.js} +2 -2
  55. package/dist-cli/chunks/{chunk-M76E72WP.js → chunk-UXDMXYTX.js} +2 -2
  56. package/dist-cli/chunks/{chunk-JX5LGYG2.js → chunk-W6PV2XYW.js} +2 -2
  57. package/dist-cli/chunks/{chunk-PYZHCZFD.js → chunk-WCIXZX5I.js} +2 -2
  58. package/dist-cli/chunks/{chunk-2C7MJXES.js → chunk-X5ZDVNIE.js} +1 -1
  59. package/dist-cli/chunks/{chunk-QRHLTYK7.js → chunk-XUAPY2KD.js} +2 -2
  60. package/dist-cli/chunks/{chunk-CKK6IEZD.js → chunk-ZA67W7D7.js} +1 -1
  61. package/dist-cli/chunks/{chunk-AVGWPMGX.js → chunk-ZK4KQ2TD.js} +1 -1
  62. package/dist-cli/chunks/{cleanup-BPGPA6WN.js → cleanup-V2KZHPOA.js} +2 -2
  63. package/dist-cli/chunks/cli-version-DWSKEOEO.js +4 -0
  64. package/dist-cli/chunks/{compat-2L5FPDKU.js → compat-RQHJHE2Q.js} +2 -2
  65. package/dist-cli/chunks/{config-NRXBYFB7.js → config-5MVB76TM.js} +2 -2
  66. package/dist-cli/chunks/{control-G5SMCB2U.js → control-T4J5JGBR.js} +2 -2
  67. package/dist-cli/chunks/daemon-6D6ULGTW.js +4 -0
  68. package/dist-cli/chunks/{debug-CTYLINPI.js → debug-UX6P5BH7.js} +3 -3
  69. package/dist-cli/chunks/{desktop-JNYUDHX5.js → desktop-CBYXUPMH.js} +3 -3
  70. package/dist-cli/chunks/{detox-ZWP5MUPJ.js → detox-B6SIPXJD.js} +2 -2
  71. package/dist-cli/chunks/{device-Y7ANIQJY.js → device-XEGDYSSM.js} +2 -2
  72. package/dist-cli/chunks/{diagnose-GFPN44ER.js → diagnose-MZPH2KWO.js} +2 -2
  73. package/dist-cli/chunks/{disk-cleanup-OUHB2MKC.js → disk-cleanup-PVVJXX6R.js} +2 -2
  74. package/dist-cli/chunks/drivers-IW6E7LM7.js +4 -0
  75. package/dist-cli/chunks/{film-RNPYZHQA.js → film-2ALX5SOY.js} +3 -3
  76. package/dist-cli/chunks/flow-W2ZYYD5K.js +4 -0
  77. package/dist-cli/chunks/help-YHL7MPG4.js +4 -0
  78. package/dist-cli/chunks/{hidden-runtime-alias-DGMIDDY6.js → hidden-runtime-alias-4Q7EZXOS.js} +2 -2
  79. package/dist-cli/chunks/{home-paths-YEFW63N5.js → home-paths-HFBMNWOC.js} +2 -2
  80. package/dist-cli/chunks/inspect-WVXDXHMN.js +4 -0
  81. package/dist-cli/chunks/install-desktop-55VB3WWL.js +4 -0
  82. package/dist-cli/chunks/{login-ASAFHSEL.js → login-OBHPF6UA.js} +4 -4
  83. package/dist-cli/chunks/{logout-F3B5TUCU.js → logout-6WKGJQO7.js} +2 -2
  84. package/dist-cli/chunks/{maestro-MJD54Z7R.js → maestro-I5WFU3PF.js} +3 -3
  85. package/dist-cli/chunks/{maestro-generate-PQZ33V42.js → maestro-generate-NNP2N67P.js} +3 -3
  86. package/dist-cli/chunks/{mode-TKOOHJNS.js → mode-Y4XK5J54.js} +2 -2
  87. package/dist-cli/chunks/{optional-demo-registry-VX3WVJXT.js → optional-demo-registry-46YP5U6M.js} +2 -2
  88. package/dist-cli/chunks/{perf-JRREHJB6.js → perf-XEVJTUKL.js} +2 -2
  89. package/dist-cli/chunks/{permissions-RQZLGYVF.js → permissions-I24GHFT6.js} +2 -2
  90. package/dist-cli/chunks/{record-LBNBJ6U4.js → record-AYGKXOYA.js} +3 -3
  91. package/dist-cli/chunks/{report-issue-O63Z4GXO.js → report-issue-WIICO2DJ.js} +2 -2
  92. package/dist-cli/chunks/reset-BXBLNYH6.js +4 -0
  93. package/dist-cli/chunks/runtime-RYQEKHHK.js +4 -0
  94. package/dist-cli/chunks/{screenshot-command-OLZIGKZR.js → screenshot-command-ZC7XYX57.js} +3 -3
  95. package/dist-cli/chunks/{screenshot-layers-ZCKD62ME.js → screenshot-layers-LAHCPH2S.js} +2 -2
  96. package/dist-cli/chunks/{screenshots-capture-CJFJACD7.js → screenshots-capture-VN4TB243.js} +2 -2
  97. package/dist-cli/chunks/{serve-L6QW4B55.js → serve-I66IDV2N.js} +2 -2
  98. package/dist-cli/chunks/{setup-CHUHRWKS.js → setup-TWBWYYVW.js} +2 -2
  99. package/dist-cli/chunks/{skills-J44O4CRY.js → skills-ATBYFW3M.js} +2 -2
  100. package/dist-cli/chunks/{state-MSTCUB5E.js → state-NBWQEDG7.js} +2 -2
  101. package/dist-cli/chunks/{storage-23Y5YSD3.js → storage-LJ7DMI3K.js} +2 -2
  102. package/dist-cli/chunks/store-BAITAM2R.js +4 -0
  103. package/dist-cli/chunks/telemetry-QQOI3O5B.js +4 -0
  104. package/dist-cli/chunks/{timeline-R7VNARZ5.js → timeline-Q3X2ZL72.js} +2 -2
  105. package/dist-cli/chunks/{upgrade-YUASBYYN.js → upgrade-2AOUC4ZH.js} +2 -2
  106. package/dist-cli/chunks/upload-Z7MVZ6B5.js +4 -0
  107. package/dist-cli/chunks/{version-FSV3NQBN.js → version-ROS6OUSE.js} +2 -2
  108. package/dist-cli/chunks/{web-LZH2QIJ5.js → web-XM2QS2QN.js} +2 -2
  109. package/dist-cli/chunks/{what-happened-F45IZ34K.js → what-happened-FVO5EM5T.js} +2 -2
  110. package/dist-lib/agent-daemon-client.cjs +1 -1
  111. package/dist-lib/agent-events.cjs +1 -1
  112. package/dist-lib/agent-identity.cjs +1 -1
  113. package/dist-lib/agent-sessions.cjs +1 -1
  114. package/dist-lib/attached-projects.cjs +1 -1
  115. package/dist-lib/auth/shared-session.cjs +1 -1
  116. package/dist-lib/backend-origin.cjs +1 -1
  117. package/dist-lib/beta.cjs +1 -1
  118. package/dist-lib/beta.mjs +1 -1
  119. package/dist-lib/bridge-constants.cjs +1 -1
  120. package/dist-lib/bridge-contract.cjs +1 -1
  121. package/dist-lib/cli-constants.cjs +1 -1
  122. package/dist-lib/config.cjs +1 -1
  123. package/dist-lib/detox/index.cjs +1 -1
  124. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  125. package/dist-lib/home-paths.cjs +1 -1
  126. package/dist-lib/host/bridge-host.cjs +1 -1
  127. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  128. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  129. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  130. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  131. package/dist-lib/host/websocket-proxy.cjs +1 -1
  132. package/dist-lib/index.cjs +1 -1
  133. package/dist-lib/jump-to-source-babel.cjs +1 -1
  134. package/dist-lib/menu.cjs +1 -1
  135. package/dist-lib/menu.mjs +1 -1
  136. package/dist-lib/metro-production-bundle.cjs +1 -1
  137. package/dist-lib/metro-production-bundle.mjs +1 -1
  138. package/dist-lib/metro.cjs +1 -1
  139. package/dist-lib/profiles.cjs +1 -1
  140. package/dist-lib/public-brand.cjs +1 -1
  141. package/dist-lib/react-native-host-modules.cjs +1 -1
  142. package/dist-lib/react-native-host-modules.mjs +1 -1
  143. package/dist-lib/render-mode.cjs +1 -1
  144. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  145. package/dist-lib/sdk.cjs +1 -1
  146. package/dist-lib/sdk.mjs +1 -1
  147. package/dist-lib/skills.cjs +231 -27
  148. package/dist-lib/vite.cjs +1 -1
  149. package/package.json +1 -1
  150. package/skills/rnx-visual/SKILL.md +9 -3
  151. package/dist-cli/chunks/chunk-F4SGYRAP.js +0 -4
  152. package/dist-cli/chunks/cli-version-GJ55D3JI.js +0 -4
  153. package/dist-cli/chunks/daemon-HDNSS5A3.js +0 -4
  154. package/dist-cli/chunks/drivers-3PUAZF6B.js +0 -4
  155. package/dist-cli/chunks/flow-XQUTMOQZ.js +0 -4
  156. package/dist-cli/chunks/help-C7Y5IENX.js +0 -4
  157. package/dist-cli/chunks/inspect-4NF3PPRZ.js +0 -4
  158. package/dist-cli/chunks/install-desktop-66LPKLQI.js +0 -4
  159. package/dist-cli/chunks/reset-734HPURU.js +0 -4
  160. package/dist-cli/chunks/runtime-PRF4VZAB.js +0 -4
  161. package/dist-cli/chunks/store-IK5DQZ2G.js +0 -4
  162. package/dist-cli/chunks/telemetry-SCC2A4KF.js +0 -4
  163. package/dist-cli/chunks/upload-BFCTC54P.js +0 -4
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (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 c="sootsim-agent-prompt-v1";function r(n){return typeof n=="string"?n.trim():""}function m(n){let e=r(n.text);if(!e)return"";let t=r(n.displayText),s=r(n.inspectSummary),o=r(n.inspectTrace);return!!s||!!o||/[\r\n]/.test(e)||!!t&&t!==e?JSON.stringify({__sootsimAgentPrompt:c,text:e,displayText:t,inspectSummary:s,inspectTrace:o}):e}function u(n){let e=r(n);if(!e)return null;try{let t=JSON.parse(e);if(t.__sootsimAgentPrompt!==c)return{text:e};let s=r(typeof t.text=="string"?t.text:void 0);if(!s)return null;let o=r(typeof t.displayText=="string"?t.displayText:void 0),i=r(typeof t.inspectSummary=="string"?t.inspectSummary:void 0),p=r(typeof t.inspectTrace=="string"?t.inspectTrace:void 0);return{text:s,...o?{displayText:o}:{},...i?{inspectSummary:i}:{},...p?{inspectTrace:p}:{}}}catch{return{text:e}}}export{m as a,u as b};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (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 N}from"./chunk-NAG3Y5BF.js";import{o as R}from"./chunk-DMAUBOZ2.js";import{a as I}from"./chunk-UOK37RTL.js";import{a as T}from"./chunk-JJKRVEA6.js";function G(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function O(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return G(r)?r:null}catch{return null}}import{randomBytes as q,createHash as X}from"node:crypto";import f from"node:fs";import h from"node:path";var $=null;function B(){if($)return $;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||R()}function y(){return B()}function U(){return h.join(B(),"attached-projects.json")}function _(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=U(),t;try{t=f.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return _();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{f.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return _()}}function K(e){let t=U();f.mkdirSync(h.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=f.openSync(r,"w",384);try{f.writeFileSync(n,JSON.stringify(e,null,2)),f.fsyncSync(n)}finally{f.closeSync(n)}f.renameSync(r,t)}function w(e){let t=S();return e(t),K(t),t}function F(e){return X("sha256").update(h.resolve(e)).digest("hex").slice(0,16)}function Q(){return`s_${q(10).toString("hex")}`}function Se(e){let t=h.resolve(e.cwd),r=F(t),n;return w(o=>{let s=o.attachedProjects.find(a=>a.id===r);if(s){let a={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=a,n=a;return}let c=Date.now(),d={id:r,name:e.name??h.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:c,updatedAt:c};o.attachedProjects.push(d),n=d}),n}function M(e){return S().attachedProjects.find(t=>t.id===e)??null}function we(){return S().attachedProjects}var V=336*60*60*1e3;function ve(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],c=o-V,d=s.filter(a=>a.ts>=c);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function Ae(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function xe(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function C(e){let t;return w(r=>{if(e.id){let c=r.agentSessions.find(d=>d.id===e.id);if(c){let d={...c,...e,lastSeenAt:Date.now()},a=r.agentSessions.indexOf(c);r.agentSessions[a]=d,t=d;return}}let n=r.attachedProjects.find(c=>c.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??Q(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function L(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function z(e,t,r=Date.now()){return{...e,...t,id:e.id,projectId:e.projectId,createdAt:e.createdAt,lastSeenAt:r}}function Z(e){e.length!==0&&w(t=>{let r=Date.now(),n=new Map(t.agentSessions.map((o,s)=>[o.id,s]));for(let{id:o,patch:s}of e){let c=n.get(o);c!==void 0&&(t.agentSessions[c]=z(t.agentSessions[c],s,r))}})}function v(e,t){Z([{id:e,patch:t}])}async function Pe(){if(S().attachedProjects.length>0)return;let{loadOptionalDemoApps:t}=await import("./optional-demo-registry-VX3WVJXT.js"),r=await t();r.length!==0&&w(n=>{for(let o of r){if(!f.existsSync(o.dir))continue;let s=h.resolve(o.dir),c=F(s);if(n.attachedProjects.some(a=>a.id===c))continue;let d=Date.now();n.attachedProjects.push({id:c,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as ee,spawnSync as te}from"node:child_process";import{randomUUID as re}from"node:crypto";import i,{constants as m}from"node:fs";import u from"node:path";import ne from"node:readline";function b(e){return u.join(y(),"sessions",e)}function J(e){return u.join(b(e),"prompt.in")}function H(e){return u.join(b(e),"events.out")}function se(e){return u.join(y(),"transcripts",`${e}.log`)}function E(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(b(t)))}function oe(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=ie();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("rnx CLI not found. set SOOTSIM_BIN to the path of the rnx binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function ie(){try{let e=ce();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[rnx] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli`.")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function ce(){try{let r=T.resolve(`${I.packageName}/package.json`);return u.dirname(r)}catch{}let e=ae();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name===I.packageName)return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function ae(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function de(e,t,r){let n=u.join(y(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,c=null;for(;c===null;)try{c=i.openSync(o,m.O_WRONLY|m.O_CREAT|m.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let a=Number(i.readFileSync(o,"utf8").trim());if(a&&!ue(a)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(a=>setTimeout(a,50))}try{return i.writeFileSync(c,String(process.pid)),await r()}finally{try{i.closeSync(c)}catch{}try{i.unlinkSync(o)}catch{}}}function ue(e){try{return process.kill(e,0),!0}catch{return!1}}function W(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=te("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function $e(e){let t=M(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return de(t.id,r,async()=>{let n=L(t.id).find(p=>p.provider===r&&p.status!=="ended"&&E(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`rnx agent end <sessionId>\`.`);let o=r==="claude"?re():void 0,s=C({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),c=J(s.id),d=H(s.id),a=se(s.id);W(c),W(d);let g=u.dirname(a);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:Y}=oe(),x=[...Y,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",c,"--events-out",d,"--transcript",a];e.codexBin&&x.push("--codex-bin",e.codexBin),e.claudeBin&&x.push("--claude-bin",e.claudeBin),e.freshThread&&x.push("--fresh-thread"),o&&x.push("--claude-session-uuid",o);let P=ee(A,x,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:y()}});P.unref();let D=e.readyTimeoutMs??6e3,j=await le(d,p=>p.type==="ready"||p.type==="error",D);if(!j||j.type==="error"){if(P.pid)try{process.kill(P.pid,"SIGTERM")}catch{}try{i.rmSync(b(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=j&&j.type==="error"?j.message:`no ready event within ${D}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:P.pid,status:"idle"}),{session:k(s.id),wrapperPid:P.pid}})}async function _e(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!E(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=J(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,m.O_WRONLY);try{let s=N(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
4
+ import{a as N}from"./chunk-TRYEPGYJ.js";import{o as R}from"./chunk-M6BDXBBX.js";import{a as I}from"./chunk-ODT3EOJJ.js";import{a as T}from"./chunk-C5FIGNQO.js";function G(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function O(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return G(r)?r:null}catch{return null}}import{randomBytes as q,createHash as X}from"node:crypto";import f from"node:fs";import h from"node:path";var $=null;function B(){if($)return $;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||R()}function y(){return B()}function U(){return h.join(B(),"attached-projects.json")}function _(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=U(),t;try{t=f.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return _();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{f.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return _()}}function K(e){let t=U();f.mkdirSync(h.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=f.openSync(r,"w",384);try{f.writeFileSync(n,JSON.stringify(e,null,2)),f.fsyncSync(n)}finally{f.closeSync(n)}f.renameSync(r,t)}function w(e){let t=S();return e(t),K(t),t}function F(e){return X("sha256").update(h.resolve(e)).digest("hex").slice(0,16)}function Q(){return`s_${q(10).toString("hex")}`}function Se(e){let t=h.resolve(e.cwd),r=F(t),n;return w(o=>{let s=o.attachedProjects.find(a=>a.id===r);if(s){let a={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=a,n=a;return}let c=Date.now(),d={id:r,name:e.name??h.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:c,updatedAt:c};o.attachedProjects.push(d),n=d}),n}function M(e){return S().attachedProjects.find(t=>t.id===e)??null}function we(){return S().attachedProjects}var V=336*60*60*1e3;function ve(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],c=o-V,d=s.filter(a=>a.ts>=c);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function Ae(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function xe(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function C(e){let t;return w(r=>{if(e.id){let c=r.agentSessions.find(d=>d.id===e.id);if(c){let d={...c,...e,lastSeenAt:Date.now()},a=r.agentSessions.indexOf(c);r.agentSessions[a]=d,t=d;return}}let n=r.attachedProjects.find(c=>c.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??Q(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function L(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function z(e,t,r=Date.now()){return{...e,...t,id:e.id,projectId:e.projectId,createdAt:e.createdAt,lastSeenAt:r}}function Z(e){e.length!==0&&w(t=>{let r=Date.now(),n=new Map(t.agentSessions.map((o,s)=>[o.id,s]));for(let{id:o,patch:s}of e){let c=n.get(o);c!==void 0&&(t.agentSessions[c]=z(t.agentSessions[c],s,r))}})}function v(e,t){Z([{id:e,patch:t}])}async function Pe(){if(S().attachedProjects.length>0)return;let{loadOptionalDemoApps:t}=await import("./optional-demo-registry-46YP5U6M.js"),r=await t();r.length!==0&&w(n=>{for(let o of r){if(!f.existsSync(o.dir))continue;let s=h.resolve(o.dir),c=F(s);if(n.attachedProjects.some(a=>a.id===c))continue;let d=Date.now();n.attachedProjects.push({id:c,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as ee,spawnSync as te}from"node:child_process";import{randomUUID as re}from"node:crypto";import i,{constants as m}from"node:fs";import u from"node:path";import ne from"node:readline";function b(e){return u.join(y(),"sessions",e)}function J(e){return u.join(b(e),"prompt.in")}function H(e){return u.join(b(e),"events.out")}function se(e){return u.join(y(),"transcripts",`${e}.log`)}function E(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(b(t)))}function oe(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=ie();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("rnx CLI not found. set SOOTSIM_BIN to the path of the rnx binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function ie(){try{let e=ce();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[rnx] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli`.")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function ce(){try{let r=T.resolve(`${I.packageName}/package.json`);return u.dirname(r)}catch{}let e=ae();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name===I.packageName)return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function ae(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function de(e,t,r){let n=u.join(y(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,c=null;for(;c===null;)try{c=i.openSync(o,m.O_WRONLY|m.O_CREAT|m.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let a=Number(i.readFileSync(o,"utf8").trim());if(a&&!ue(a)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(a=>setTimeout(a,50))}try{return i.writeFileSync(c,String(process.pid)),await r()}finally{try{i.closeSync(c)}catch{}try{i.unlinkSync(o)}catch{}}}function ue(e){try{return process.kill(e,0),!0}catch{return!1}}function W(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=te("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function $e(e){let t=M(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return de(t.id,r,async()=>{let n=L(t.id).find(p=>p.provider===r&&p.status!=="ended"&&E(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`rnx agent end <sessionId>\`.`);let o=r==="claude"?re():void 0,s=C({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),c=J(s.id),d=H(s.id),a=se(s.id);W(c),W(d);let g=u.dirname(a);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:Y}=oe(),x=[...Y,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",c,"--events-out",d,"--transcript",a];e.codexBin&&x.push("--codex-bin",e.codexBin),e.claudeBin&&x.push("--claude-bin",e.claudeBin),e.freshThread&&x.push("--fresh-thread"),o&&x.push("--claude-session-uuid",o);let P=ee(A,x,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:y()}});P.unref();let D=e.readyTimeoutMs??6e3,j=await le(d,p=>p.type==="ready"||p.type==="error",D);if(!j||j.type==="error"){if(P.pid)try{process.kill(P.pid,"SIGTERM")}catch{}try{i.rmSync(b(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=j&&j.type==="error"?j.message:`no ready event within ${D}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:P.pid,status:"idle"}),{session:k(s.id),wrapperPid:P.pid}})}async function _e(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!E(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=J(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,m.O_WRONLY);try{let s=N(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
5
5
  `)}finally{i.closeSync(o)}v(e,{lastPrompt:t.displayText??t.text,status:"working"})}async function Be(e){let t=k(e);if(!t)throw new l("NO_SESSION",`no session with id=${e}`);if(E(t.wrapperPid,e))try{process.kill(t.wrapperPid,"SIGTERM")}catch{}let r=b(e),n=y();if(r.startsWith(n))try{i.rmSync(r,{recursive:!0,force:!0})}catch{}v(e,{status:"ended",wrapperPid:void 0})}function Ue(e,t){let r=H(e);if(!i.existsSync(r))throw new l("NO_FIFO",`events FIFO missing: ${r}`);let n=i.openSync(r,m.O_RDWR),o=i.createReadStream("",{fd:n,autoClose:!0}),s=ne.createInterface({input:o,crlfDelay:1/0});s.on("line",d=>{let a=O(d);a&&t(a)});let c=!1;return()=>{if(!c){c=!0;try{i.writeSync(n,`
6
6
  `)}catch{}try{s.close()}catch{}try{o.destroy()}catch{}}}}async function le(e,t,r){let n=i.openSync(e,m.O_RDWR|m.O_NONBLOCK),o=Buffer.alloc(8192),s="",c=Date.now()+r;try{for(;Date.now()<c;){let d=0;try{d=i.readSync(n,o,0,o.length,null)}catch(a){if(a.code!=="EAGAIN")throw a;d=0}if(d>0){s+=o.subarray(0,d).toString("utf8");let a;for(;(a=s.indexOf(`
7
7
  `))>=0;){let g=s.slice(0,a);s=s.slice(a+1);let A=O(g);if(A&&t(A))return A}}else await new Promise(a=>setTimeout(a,30))}return null}finally{i.closeSync(n)}}export{O as a,y as b,Se as c,M as d,we as e,ve as f,Ae as g,xe as h,k as i,L as j,z as k,Z as l,Pe as m,b as n,J as o,H as p,se as q,E as r,oe as s,l as t,$e as u,_e as v,Be as w,Ue as x};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (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,4 +1,4 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (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 c}from"./chunk-CKK6IEZD.js";import{a as f}from"./chunk-JX5LGYG2.js";import{a as i}from"./chunk-UOK37RTL.js";import{createRequire as p}from"node:module";import s from"node:path";import{createJiti as a}from"jiti";var g=p(import.meta.url);function r(e){return e===void 0||e!==null&&typeof e=="object"&&!Array.isArray(e)}function l(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=Reflect.get(e,"runtimeVersion"),o=Reflect.get(e,"network");return(t===void 0||typeof t=="string"&&t===t.trim()&&f(t))&&r(Reflect.get(e,"modules"))&&r(Reflect.get(e,"turboModules"))&&r(Reflect.get(e,"nativeModules"))&&r(Reflect.get(e,"env"))&&r(o)&&r(Reflect.get(e,"settings"))&&r(Reflect.get(e,"initialState"))}function d(e,t){if(!e.modules)return e;let o=s.dirname(t);return{...e,modules:Object.fromEntries(Object.entries(e.modules).map(([m,n])=>[m,n&&typeof n=="object"&&"file"in n?{...n,file:s.resolve(o,n.file)}:n]))}}async function u(e){if(e?.configPath)try{let o=await a(import.meta.url,{interopDefault:!0,alias:{[`${i.packageName}/config`]:g.resolve(`${i.packageName}/config`)}}).import(e.configPath,{default:!0});if(!l(o))throw new Error("the default export must be an rnx config object");return d(o,e.configPath)}catch(t){let o=t instanceof Error?t.message:String(t);throw new Error(`could not load ${e.configPath}: ${o}`)}}async function b(e=process.cwd()){let t=c(e);return{project:t,config:await u(t)}}export{u as a,b};
4
+ import{a as c}from"./chunk-ZA67W7D7.js";import{a as f}from"./chunk-W6PV2XYW.js";import{a as i}from"./chunk-ODT3EOJJ.js";import{createRequire as p}from"node:module";import s from"node:path";import{createJiti as a}from"jiti";var g=p(import.meta.url);function r(e){return e===void 0||e!==null&&typeof e=="object"&&!Array.isArray(e)}function l(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=Reflect.get(e,"runtimeVersion"),o=Reflect.get(e,"network");return(t===void 0||typeof t=="string"&&t===t.trim()&&f(t))&&r(Reflect.get(e,"modules"))&&r(Reflect.get(e,"turboModules"))&&r(Reflect.get(e,"nativeModules"))&&r(Reflect.get(e,"env"))&&r(o)&&r(Reflect.get(e,"settings"))&&r(Reflect.get(e,"initialState"))}function d(e,t){if(!e.modules)return e;let o=s.dirname(t);return{...e,modules:Object.fromEntries(Object.entries(e.modules).map(([m,n])=>[m,n&&typeof n=="object"&&"file"in n?{...n,file:s.resolve(o,n.file)}:n]))}}async function u(e){if(e?.configPath)try{let o=await a(import.meta.url,{interopDefault:!0,alias:{[`${i.packageName}/config`]:g.resolve(`${i.packageName}/config`)}}).import(e.configPath,{default:!0});if(!l(o))throw new Error("the default export must be an rnx config object");return d(o,e.configPath)}catch(t){let o=t instanceof Error?t.message:String(t);throw new Error(`could not load ${e.configPath}: ${o}`)}}async function b(e=process.cwd()){let t=c(e);return{project:t,config:await u(t)}}export{u as a,b};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (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 i}from"./chunk-UKKT5KM4.js";var c=["ghs_","ghp_","gho_","ghu_","github_pat_"];function p(n){return!!(n&&n.length>=20&&c.some(e=>n.startsWith(e)))}function a(){let n=process.env.CONTRAST_INSTALLATION_TOKEN?.trim(),e=process.env.GITHUB_TOKEN?.trim(),t=n||e;if(!p(t))return null;let r=(process.env.CONTRAST_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!r)return null;let[o,s]=r.includes("/")?r.split("/",2):[null,null],u=(process.env.CONTRAST_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),l=(process.env.CONTRAST_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:t,repoId:r,repositoryId:u||null,owner:o||null,repo:s||null,installationId:l||null,source:n?"contrast-runner":"github-actions"}}function d(n){return n.startsWith("sk_rnx_")||n.startsWith("sk_sootsim_")}function I(){for(let n of["RNX_API_KEY","SOOTSIM_API_KEY"]){let e=process.env[n]?.trim();if(e&&d(e))return{secret:e,envName:n}}return null}function _(){let n=I();if(n)return{kind:"api-key",secret:n.secret,source:"env",envName:n.envName};let e=a();if(e)return e;let t=i();return t?.token?{kind:"session",token:t.token,origin:t.origin}:null}function A(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function h(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{_ as a,A as b,h as c};
4
+ import{a as i}from"./chunk-N47YVJNO.js";var c=["ghs_","ghp_","gho_","ghu_","github_pat_"];function p(n){return!!(n&&n.length>=20&&c.some(e=>n.startsWith(e)))}function a(){let n=process.env.CONTRAST_INSTALLATION_TOKEN?.trim(),e=process.env.GITHUB_TOKEN?.trim(),t=n||e;if(!p(t))return null;let r=(process.env.CONTRAST_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!r)return null;let[o,s]=r.includes("/")?r.split("/",2):[null,null],u=(process.env.CONTRAST_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),l=(process.env.CONTRAST_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:t,repoId:r,repositoryId:u||null,owner:o||null,repo:s||null,installationId:l||null,source:n?"contrast-runner":"github-actions"}}function d(n){return n.startsWith("sk_rnx_")||n.startsWith("sk_sootsim_")}function I(){for(let n of["RNX_API_KEY","SOOTSIM_API_KEY"]){let e=process.env[n]?.trim();if(e&&d(e))return{secret:e,envName:n}}return null}function _(){let n=I();if(n)return{kind:"api-key",secret:n.secret,source:"env",envName:n.envName};let e=a();if(e)return e;let t=i();return t?.token?{kind:"session",token:t.token,origin:t.origin}:null}function A(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function h(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{_ as a,A as b,h as c};
@@ -1,6 +1,6 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{I as F,J as j,K as H,k as N,l as U,v as _,z as E}from"./chunk-DMAUBOZ2.js";import{a as L}from"./chunk-UOK37RTL.js";import G from"node:fs";import Z from"node:path";function A(e){return e.length<=100&&/^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(e)}function D(e){try{return G.readdirSync(e.runtimesDir(),{withFileTypes:!0}).filter(c=>c.isDirectory()).map(c=>c.name).sort(k)}catch{return[]}}function M(e,c){return Z.posix.basename(e.tarballPath(c))}function k(e,c){let l=f=>{let v=f.indexOf("-"),V=v>=0?f.slice(0,v):f,T=v>=0?f.slice(v+1):"",$=V.split(".").map(S=>Number.parseInt(S,10));return $.some(S=>!Number.isFinite(S))?[[Number.POSITIVE_INFINITY],f]:[$,T]},[m,u]=l(e),[R,x]=l(c);for(let f=0;f<Math.max(m.length,R.length);f++){let v=m[f]??0,V=R[f]??0;if(v!==V)return v-V}return u===x?0:u?x?u<x?-1:1:-1:1}import{spawn as B}from"node:child_process";import J from"node:crypto";import o from"node:fs";import Y from"node:os";import y from"node:path";import{Readable as q}from"node:stream";import{pipeline as K}from"node:stream/promises";var Q=2;function W(e){function c(){try{let n=JSON.parse(o.readFileSync(e.configFile(),"utf8"));return n&&typeof n=="object"?n:{}}catch{return{}}}function l(n){let t=c();return(n||process.env[e.env.cdnOrigin]||t.cdnOrigin||e.defaultCdnOrigin).replace(/\/+$/,"")}function m(n){let t=c();return n||process.env[e.env.channel]||t.runtimeChannel||"stable"}function u(){if(!e.env.pin)return null;let n=process.env[e.env.pin];if(n&&n.trim())return n.trim();let t=c();return typeof t.runtimeVersion=="string"&&t.runtimeVersion.trim()?t.runtimeVersion.trim():null}function R(n){let t=new URL(`${l(n)}${e.manifestPath}`);return t.searchParams.set("t",String(Date.now())),t.toString()}function x(n,t){return`${l(t)}${e.tarballPath(n)}`}async function f(n){let t=R(n),r=await fetch(t,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${t})`);return await r.json()}function v(n,t={}){let r=m(t.channel),i=t.version||u()||n.channels[r]?.latest;if(!i)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);if(!A(i))throw new Error(`invalid runtime version: ${i}`);let h=n.versions[i];if(!h)throw new Error(`version ${i} not found in manifest; available: ${Object.keys(n.versions).slice(-10).join(", ")||"(none)"}`);return{version:i,channel:r,entry:h}}async function V(n={}){e.ensureHome();let t=l(n.cdnOrigin),r=await f(t),{version:i,channel:h,entry:a}=v(r,n),d=e.runtimeDir(i),g=n.setActive!==!1,O=[i,...n.protectVersions??[]];if(I({protectVersions:O}),!n.force&&o.existsSync(y.join(d,e.installedMarker)))return g&&e.writeActiveRuntime(i),I({protectVersions:O}),{version:i,channel:h,cdnOrigin:t,runtimeDir:d,installed:!1,activated:g,manifest:r};let P=a.tarball||x(i,t),b=o.mkdtempSync(y.join(Y.tmpdir(),`${e.id}-runtime-download-`)),w=y.join(b,M(e,i)),p=y.join(y.dirname(d),`.installing-${i}-${process.pid}`);o.rmSync(p,{recursive:!0,force:!0});try{process.stderr.write(`${e.id}: downloading runtime ${i}\u2026
4
+ import{I as F,J as j,K as H,k as N,l as U,v as _,z as E}from"./chunk-M6BDXBBX.js";import{a as L}from"./chunk-ODT3EOJJ.js";import G from"node:fs";import Z from"node:path";function A(e){return e.length<=100&&/^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(e)}function D(e){try{return G.readdirSync(e.runtimesDir(),{withFileTypes:!0}).filter(c=>c.isDirectory()).map(c=>c.name).sort(k)}catch{return[]}}function M(e,c){return Z.posix.basename(e.tarballPath(c))}function k(e,c){let l=f=>{let v=f.indexOf("-"),V=v>=0?f.slice(0,v):f,T=v>=0?f.slice(v+1):"",$=V.split(".").map(S=>Number.parseInt(S,10));return $.some(S=>!Number.isFinite(S))?[[Number.POSITIVE_INFINITY],f]:[$,T]},[m,u]=l(e),[R,x]=l(c);for(let f=0;f<Math.max(m.length,R.length);f++){let v=m[f]??0,V=R[f]??0;if(v!==V)return v-V}return u===x?0:u?x?u<x?-1:1:-1:1}import{spawn as B}from"node:child_process";import J from"node:crypto";import o from"node:fs";import Y from"node:os";import y from"node:path";import{Readable as q}from"node:stream";import{pipeline as K}from"node:stream/promises";var Q=2;function W(e){function c(){try{let n=JSON.parse(o.readFileSync(e.configFile(),"utf8"));return n&&typeof n=="object"?n:{}}catch{return{}}}function l(n){let t=c();return(n||process.env[e.env.cdnOrigin]||t.cdnOrigin||e.defaultCdnOrigin).replace(/\/+$/,"")}function m(n){let t=c();return n||process.env[e.env.channel]||t.runtimeChannel||"stable"}function u(){if(!e.env.pin)return null;let n=process.env[e.env.pin];if(n&&n.trim())return n.trim();let t=c();return typeof t.runtimeVersion=="string"&&t.runtimeVersion.trim()?t.runtimeVersion.trim():null}function R(n){let t=new URL(`${l(n)}${e.manifestPath}`);return t.searchParams.set("t",String(Date.now())),t.toString()}function x(n,t){return`${l(t)}${e.tarballPath(n)}`}async function f(n){let t=R(n),r=await fetch(t,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${t})`);return await r.json()}function v(n,t={}){let r=m(t.channel),i=t.version||u()||n.channels[r]?.latest;if(!i)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);if(!A(i))throw new Error(`invalid runtime version: ${i}`);let h=n.versions[i];if(!h)throw new Error(`version ${i} not found in manifest; available: ${Object.keys(n.versions).slice(-10).join(", ")||"(none)"}`);return{version:i,channel:r,entry:h}}async function V(n={}){e.ensureHome();let t=l(n.cdnOrigin),r=await f(t),{version:i,channel:h,entry:a}=v(r,n),d=e.runtimeDir(i),g=n.setActive!==!1,O=[i,...n.protectVersions??[]];if(I({protectVersions:O}),!n.force&&o.existsSync(y.join(d,e.installedMarker)))return g&&e.writeActiveRuntime(i),I({protectVersions:O}),{version:i,channel:h,cdnOrigin:t,runtimeDir:d,installed:!1,activated:g,manifest:r};let P=a.tarball||x(i,t),b=o.mkdtempSync(y.join(Y.tmpdir(),`${e.id}-runtime-download-`)),w=y.join(b,M(e,i)),p=y.join(y.dirname(d),`.installing-${i}-${process.pid}`);o.rmSync(p,{recursive:!0,force:!0});try{process.stderr.write(`${e.id}: downloading runtime ${i}\u2026
5
5
  `),await X(P,w),process.stderr.write(`${e.id}: extracting runtime ${i}\u2026
6
6
  `);let s=await ee(w);if(s!==a.sha256)throw new Error(`sha256 mismatch for runtime ${i}: expected ${a.sha256}, actual ${s}`);if(o.mkdirSync(p,{recursive:!0}),await ne(w,p),!o.existsSync(y.join(p,e.installedMarker)))throw new Error(`extracted tarball for runtime ${i} is missing ${e.installedMarker}`);o.rmSync(d,{recursive:!0,force:!0}),o.renameSync(p,d)}catch(s){throw o.rmSync(p,{recursive:!0,force:!0}),s}finally{o.rmSync(b,{recursive:!0,force:!0})}return g&&e.writeActiveRuntime(i),I({protectVersions:O}),{version:i,channel:h,cdnOrigin:t,runtimeDir:d,installed:!0,activated:g,manifest:r}}async function T(n={}){e.ensureHome(),I({protectVersions:n.protectVersions});let t=l(n.cdnOrigin),r=m(n.channel),i=u();if(i){let p=e.readActiveRuntime(),s=o.existsSync(y.join(e.runtimeDir(i),e.installedMarker));if(p===i&&s)return{checked:!0,updated:!1,reason:`runtime is pinned to ${i}`,activeVersion:p,latestVersion:i};let C=await V({version:i,channel:r,cdnOrigin:t,setActive:!1,protectVersions:n.protectVersions});return{checked:!0,updated:!0,reason:`runtime is pinned to ${i}`,activeVersion:i,latestVersion:i,install:C}}let h=await f(t),a=h.channels[r]?.latest;if(!a)return{checked:!0,updated:!1,reason:`channel '${r}' has no latest runtime`,activeVersion:e.readActiveRuntime()};if(!h.versions[a])return{checked:!0,updated:!1,reason:`manifest is missing version ${a}`,activeVersion:e.readActiveRuntime(),latestVersion:a};let g=e.readActiveRuntime(),O=g?e.runtimeDir(g):null,P=O?o.existsSync(y.join(O,e.installedMarker)):!1;if(!(!g||!P||k(a,g)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:g,latestVersion:a};let w=await V({version:a,channel:r,cdnOrigin:t,setActive:!1,protectVersions:n.protectVersions});return{checked:!0,updated:!0,activeVersion:a,latestVersion:a,install:w}}async function $(n={}){let t=e.readActiveRuntime(),r=u();if(r)return{active:t,latest:r,pinned:r,outdated:t!==r};try{let i=await f(l(n.cdnOrigin)),h=m(n.channel),a=i.channels[h]?.latest??null,d=!!(a&&(!t||k(a,t)>0));return{active:t,latest:a,pinned:null,outdated:d}}catch{return{active:t,latest:null,pinned:null,outdated:!1}}}function S(n={}){e.ensureHome();let t=Math.max(1,Math.floor(n.retainVersions??Q)),r=D(e),i=new Set(r),h=e.readActiveRuntime(),a=u(),d=new Set;for(let s of[h,a,...n.protectVersions??[]])s&&i.has(s)&&d.add(s);for(let s of[...r].reverse()){if(d.size>=t)break;d.add(s)}let g="__RUNTIME_VERSION__",O=M(e,g),P=O.indexOf(g),b=O.slice(0,P),w=O.slice(P+g.length),p=[];if(P>=0)try{p=o.readdirSync(e.cacheDir(),{withFileTypes:!0}).filter(s=>{if(!s.isFile())return!1;let C=s.name.startsWith(b)&&s.name.endsWith(w),z=s.name.startsWith(b)&&s.name.endsWith(`${w}.partial`);return C||z}).map(s=>y.join(e.cacheDir(),s.name)).sort()}catch{}return{activeVersion:h,pinnedVersion:a,keepVersions:r.filter(s=>d.has(s)),removeVersions:r.filter(s=>!d.has(s)),removeCacheFiles:p}}function I(n={}){let t=S(n);for(let r of t.removeVersions)o.rmSync(e.runtimeDir(r),{recursive:!0,force:!0});for(let r of t.removeCacheFiles)o.rmSync(r,{force:!0});return t}return{product:e,resolveCdnOrigin:l,resolveChannel:m,resolvePin:u,manifestUrl:R,tarballUrl:x,fetchManifest:f,resolveVersion:v,install:V,updateToLatest:T,checkUpToDate:$,planLocalRetention:S,pruneLocalRetention:I,listInstalled:()=>D(e)}}async function X(e,c){let l=await fetch(e);if(!l.ok||!l.body)throw new Error(`download failed: ${l.status} ${l.statusText} (${e})`);o.mkdirSync(y.dirname(c),{recursive:!0});let m=`${c}.partial`;try{await K(q.fromWeb(l.body),o.createWriteStream(m)),o.renameSync(m,c)}catch(u){try{o.unlinkSync(m)}catch{}throw u}}function ee(e){return new Promise((c,l)=>{let m=J.createHash("sha256"),u=o.createReadStream(e);u.on("data",R=>m.update(R)),u.on("error",l),u.on("end",()=>c(m.digest("hex")))})}function ne(e,c){return new Promise((l,m)=>{let u=B("tar",["-xzf",e,"-C",c],{stdio:["ignore","inherit","inherit"]});u.on("error",m),u.on("exit",R=>{R===0?l():m(new Error(`tar exited with code ${R}`))})})}var te="https://contrast.dev",ye=`${L.origin}/changelog`,Ve="https://contrast.dev/api/changelog/sootsim",ie={id:"sootsim",defaultCdnOrigin:te,manifestPath:"/runtimes/manifest.json",tarballPath:e=>`/runtimes/sootsim-runtime-${e}.tar.gz`,installedMarker:"index.html",env:{cdnOrigin:"SOOTSIM_CDN_ORIGIN",channel:"SOOTSIM_RUNTIME_CHANNEL"},ensureHome:F,configFile:E,runtimesDir:N,runtimeDir:U,cacheDir:_,readActiveRuntime:j,writeActiveRuntime:H},we=W(ie);export{A as a,k as b,te as c,ye as d,Ve as e,we as f};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (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-W34ZT5MF.js";import{q as l,s as i}from"./chunk-MYTUISZ3.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-NZZN7N5T.js";import{q as l,s as i}from"./chunk-KXEXEJCK.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,4 +1,4 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (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 m={"--help":{type:"boolean",short:"-h"},"--version":{type:"boolean",short:"-V"},"--verbose":{type:"boolean",short:"-v"},"--port":{type:"number",short:"-p"},"--device":{type:"string",short:"-d"},"--theme":{type:"string",short:"-t"},"--headless":{type:"boolean"},"--driver":{type:"string"},"--sim":{type:"string"},"--session":{type:"string"},"--tab":{type:"string"}},p=new Set(["list","describe","find","get","do","wait","network","logs","shell"]),b=new Set(["do","get","wait","shell","debug"]),d=new Set(["detox","maestro","record","film","storage","permissions","perf","screenshot","state","reset","camera","mode","debug","timeline","what-happened","shell","assert","device","open","list","use","claim","close","compat","report-issue","desktop","login","logout","auth","setup","serve","daemon","runtime","upgrade","version","skill","config","cleanup","app-fonts","agent-wrapper","agent",...p]);function u(c){let n=c.slice(2),e={command:null,commandArgs:[],globalFlags:{},help:!1,version:!1,verbose:!1},s=0;for(;s<n.length;){let o=n[s];if(o==="--"){e.commandArgs.push(...n.slice(s+1));break}let i=Object.entries(m).find(([a,r])=>a===o||r.short===o);if(i){let[a,r]=i,l=a.replace(/^--/,"");if(r.type==="boolean")e.globalFlags[l]=!0,s++;else{let t=n[s+1];if(t===void 0||t.startsWith("-")){console.error(` warning: ${o} requires a value`),s++;continue}if(r.type==="number"){let g=Number(t);if(Number.isNaN(g)){console.error(` warning: ${o} requires a number, got "${t}"`),s+=2;continue}e.globalFlags[l]=g}else e.globalFlags[l]=t;s+=2}continue}if(!e.command&&!o.startsWith("-")){let a=o.indexOf("-");if(a>0){let r=o.slice(0,a),l=o.slice(a+1);if(b.has(r)&&l.length>0){e.command=r;let t=n.slice(s+1);e.commandArgs=[l,...t[0]==="--"?t.slice(1):t];break}}if(d.has(o)){e.command=o;let r=n.slice(s+1);e.commandArgs=r[0]==="--"?r.slice(1):r;break}e.commandArgs=n.slice(s);break}e.commandArgs.push(o),s++}return e.help=!!e.globalFlags.help,e.version=!!e.globalFlags.version,e.verbose=!!e.globalFlags.verbose,e}export{p as a,u as b};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (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,b as S}from"./chunk-LXED7YNR.js";import{a as y,c as P}from"./chunk-Z7ILCEXG.js";import{a as v}from"./chunk-NZVA5ZGD.js";import{b}from"./chunk-VP7D322G.js";function M(){let e=f();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"rnx desktop app not installed (run `rnx desktop install`)"}}async function A(e){let o=f();if(!o)return{launched:!1,message:"rnx desktop app not installed"};try{let r=await S(e.url,o,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile,ownerPid:e.ownerPid});return r.launched?{launched:!0,message:e.url?`electron launched via ${r.via} \u2192 ${e.url}`:`electron launched via ${r.via}`,target:r.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(r){return{launched:!1,message:`electron launch failed: ${r instanceof Error?r.message:String(r)}`}}}var k={id:"electron",name:"electron",description:"rnx desktop companion app (native window, menu bar)",kind:"native",availability:M,launch:A};import{spawn as B}from"child_process";import{closeSync as F,mkdtempSync as G,openSync as U,readFileSync as q}from"fs";import{tmpdir as T}from"os";import{join as I}from"path";import{spawnSync as O}from"node:child_process";import{existsSync as _,readFileSync as R}from"node:fs";import{createRequire as L}from"node:module";import{dirname as W,join as N}from"node:path";var $=`
4
+ import{a as f,b as S}from"./chunk-EMPIVO3K.js";import{a as y,c as P}from"./chunk-7GX6PWOA.js";import{a as v}from"./chunk-6AXSCU4S.js";import{b}from"./chunk-6A7YWTDH.js";function M(){let e=f();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"rnx desktop app not installed (run `rnx desktop install`)"}}async function A(e){let o=f();if(!o)return{launched:!1,message:"rnx desktop app not installed"};try{let r=await S(e.url,o,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile,ownerPid:e.ownerPid});return r.launched?{launched:!0,message:e.url?`electron launched via ${r.via} \u2192 ${e.url}`:`electron launched via ${r.via}`,target:r.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(r){return{launched:!1,message:`electron launch failed: ${r instanceof Error?r.message:String(r)}`}}}var k={id:"electron",name:"electron",description:"rnx desktop companion app (native window, menu bar)",kind:"native",availability:M,launch:A};import{spawn as B}from"child_process";import{closeSync as F,mkdtempSync as G,openSync as U,readFileSync as q}from"fs";import{tmpdir as T}from"os";import{join as I}from"path";import{spawnSync as O}from"node:child_process";import{existsSync as _,readFileSync as R}from"node:fs";import{createRequire as L}from"node:module";import{dirname as W,join as N}from"node:path";var $=`
5
5
  const { existsSync } = require('node:fs');
6
6
  const modulePath = process.env.SOOTSIM_PW_MODULE;
7
7
  try {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  import g from"node:fs";import f from"node:path";var D=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"],_=["sootsim.config.ts","sootsim.config.js","sootsim.config.mjs","sootsim.config.cjs"],S=new Set(["node_modules","artifacts","dist","build","out","coverage","tmp","public","ios","android","macos","windows","__fixtures__","__tests__","fixtures","fixture","examples","example"]),d=256,y=4;function A(s,r){for(let t of r){let n=f.join(s,t);try{if(g.statSync(n).isFile())return n}catch{}}return null}function m(s){return A(s,D)}function h(s){return A(s,_)}function k(s){try{let r=JSON.parse(g.readFileSync(f.join(s,"package.json"),"utf8"));if(!r||typeof r!="object")return[];let t=Reflect.get(r,"workspaces");if(Array.isArray(t))return t.filter(c=>typeof c=="string");if(!t||typeof t!="object")return[];let n=Reflect.get(t,"packages");return Array.isArray(n)?n.filter(c=>typeof c=="string"):[]}catch{return[]}}function b(s){let r=new Set,t=0,n=!0;for(let c of k(s)){if(t>=d){n=!1;break}if(!c||f.isAbsolute(c))continue;let a=c.split(/[\\/]+/).filter(Boolean);if(a.length===0||a.length>y||a.some(o=>o===".."||o==="**"))continue;let i=[s];for(let o of a){let e=[];for(let l of i){if(t>=d){n=!1;break}if(t++,o==="*"){let p;try{p=g.readdirSync(l,{withFileTypes:!0})}catch{continue}for(let u of p)!u.isDirectory()||u.isSymbolicLink()||u.name.startsWith(".")||S.has(u.name)||e.push(f.join(l,u.name))}else if(!o.includes("*")){let p=f.join(l,o);try{let u=g.lstatSync(p);u.isDirectory()&&!u.isSymbolicLink()&&e.push(p)}catch{}}}i=e,i.length>d&&(i.length=d,n=!1)}for(let o of i)r.add(o)}return{directories:[...r],complete:n}}function j(s){let r=[{dir:s,depth:0}],t=[],n=0,c=0,a=!0;for(;c<r.length&&n<d;){let i=r[c++];if(!i)break;if(n++,i.depth>0&&m(i.dir)&&(t.push(i.dir),t.length>1))return{directories:t,complete:!0};if(i.depth>=y)continue;let o;try{o=g.readdirSync(i.dir,{withFileTypes:!0})}catch{continue}for(let e of o)if(!(!e.isDirectory()||e.isSymbolicLink())&&!(e.name.startsWith(".")||S.has(e.name))){if(r.length>=d){a=!1;break}r.push({dir:f.join(i.dir,e.name),depth:i.depth+1})}}return{directories:t,complete:a&&c===r.length}}function w(s,r={}){let t=f.resolve(s),n=h(t);if(m(t)||r.trustStart&&g.existsSync(t)){let e=n;if(!e&&r.trustStart){let l=f.dirname(t);for(let p=0;p<y&&l!==f.dirname(l)&&(e=h(l),!e);p++)l=f.dirname(l)}return{appDir:t,configPath:e}}let c=b(t),a=c.directories.filter(e=>m(e));if(a.length>1||!c.complete)return null;if(a.length===1){let e=a[0];return{appDir:e,configPath:n??h(e)}}let i=j(t),o=i.directories;if(o.length>1||!i.complete)return null;if(o.length===1){let e=o[0];return{appDir:e,configPath:n??h(e)}}return n?{appDir:t,configPath:n}:null}export{w as a};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  import{existsSync as s}from"node:fs";import{basename as a,dirname as p,join as l}from"node:path";import{fileURLToPath as m,pathToFileURL as c}from"node:url";var u="packages/sootsim/scripts/demo-app-registry.ts",f=8;function A(o){let r=o;for(let e=0;e<f;e++){if(a(r)==="node_modules")return null;let n=l(r,u);if(s(n))return n;let i=p(r);if(i===r)return null;r=i}return null}var t=null;async function S(){if(t)return t;let o=A(p(m(import.meta.url)));if(!o)return t=[],t;try{let r=await import(c(o).href);t=Array.isArray(r.APPS)?r.APPS:[]}catch{t=[]}return t}function D(){return t??[]}function O(o){let r=t;return t=o,{restore:()=>{t=r}}}export{A as a,S as b,D as c,O as d};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as r,c as g,d as f,e as v}from"./chunk-WRPLAFZP.js";import"./chunk-NZVA5ZGD.js";import"./chunk-JX5LGYG2.js";import"./chunk-DMAUBOZ2.js";import"./chunk-UOK37RTL.js";import"./chunk-JJKRVEA6.js";var $={"browser-cache":"browser caches","camera-fixture":"staged camera fixture videos",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(s){let i=new Map;for(let o of s){let n=i.get(o.kind)??{bytes:0,count:0};n.bytes+=o.bytes,n.count++,i.set(o.kind,n)}return[...i].sort((o,n)=>n[1].bytes-o[1].bytes).map(([o,n])=>` ${$[o]}: ${r(n.bytes)} (${n.count} ${n.count===1?"item":"items"})`)}function h(){console.log(`
4
+ import{b as r,c as g,d as f,e as v}from"./chunk-CDLSM2CG.js";import"./chunk-6AXSCU4S.js";import"./chunk-W6PV2XYW.js";import"./chunk-M6BDXBBX.js";import"./chunk-ODT3EOJJ.js";import"./chunk-C5FIGNQO.js";var $={"browser-cache":"browser caches","camera-fixture":"staged camera fixture videos",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(s){let i=new Map;for(let o of s){let n=i.get(o.kind)??{bytes:0,count:0};n.bytes+=o.bytes,n.count++,i.set(o.kind,n)}return[...i].sort((o,n)=>n[1].bytes-o[1].bytes).map(([o,n])=>` ${$[o]}: ${r(n.bytes)} (${n.count} ${n.count===1?"item":"items"})`)}function h(){console.log(`
5
5
  rnx cleanup \u2014 inspect and reclaim local rnx disk usage
6
6
 
7
7
  usage:
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.342 | (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-5Y6USZTP.js";import"./chunk-ODT3EOJJ.js";import"./chunk-C5FIGNQO.js";export{a as getCliVersion};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{d as a,g as i,i as d,j as r}from"./chunk-F4SGYRAP.js";import"./chunk-JJKRVEA6.js";import{existsSync as m,readFileSync as k}from"node:fs";import{resolve as f}from"node:path";async function P(e){if(e.includes("--help")||e.includes("-h")){console.log(`
4
+ import{d as a,g as i,i as d,j as r}from"./chunk-TOGF7MYL.js";import"./chunk-C5FIGNQO.js";import{existsSync as m,readFileSync as k}from"node:fs";import{resolve as f}from"node:path";async function P(e){if(e.includes("--help")||e.includes("-h")){console.log(`
5
5
  rnx compat \u2014 check package compatibility
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{C as r,D as s,z as t}from"./chunk-DMAUBOZ2.js";import"./chunk-JJKRVEA6.js";function l(){let e=r();console.log(` product analytics are ${e.productAnalytics?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function c(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":s({...r(),productAnalytics:!0}),console.log(" product analytics ON"),console.log(` config: ${t()}`);return;case"off":s({...r(),productAnalytics:!1}),console.log(" product analytics OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: rnx config telemetry [on|off|status]"),process.exit(1)}}function i(){console.log(`
4
+ import{C as r,D as s,z as t}from"./chunk-M6BDXBBX.js";import"./chunk-C5FIGNQO.js";function l(){let e=r();console.log(` product analytics are ${e.productAnalytics?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function c(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":s({...r(),productAnalytics:!0}),console.log(" product analytics ON"),console.log(` config: ${t()}`);return;case"off":s({...r(),productAnalytics:!1}),console.log(" product analytics OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: rnx config telemetry [on|off|status]"),process.exit(1)}}function i(){console.log(`
5
5
  rnx config \u2014 manage local CLI preferences
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x}from"./chunk-RYXIRFY2.js";import"./chunk-3KDMR5FE.js";import"./chunk-5JKZGU2L.js";import"./chunk-HWIUC6SX.js";import"./chunk-QRHLTYK7.js";import"./chunk-LXED7YNR.js";import"./chunk-Z7ILCEXG.js";import"./chunk-7IBTDBHW.js";import"./chunk-JRJDACNV.js";import"./chunk-CKK6IEZD.js";import"./chunk-J2EHW26I.js";import"./chunk-W34ZT5MF.js";import"./chunk-X5C3SLYU.js";import"./chunk-AVGWPMGX.js";import"./chunk-NZVA5ZGD.js";import"./chunk-JX5LGYG2.js";import"./chunk-ZEU5RFAH.js";import"./chunk-TRGIXJN4.js";import"./chunk-MYTUISZ3.js";import"./chunk-VP7D322G.js";import"./chunk-DMAUBOZ2.js";import"./chunk-UOK37RTL.js";import"./chunk-JJKRVEA6.js";export{e as applyRuntimeGenerationOrigin,i as buildOpenUrl,h as buildShellUrl,v as closeSimsBulk,c as ensureBridgeForOpen,b as normalizeDeepLinkTarget,w as planBulkCloseTargets,n as playwrightHostPidForSim,k as printConnectedSims,d as resolveBundleTarget,f as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,g as resolveShellBaseUrlForBridgePort,u as runClaimCommand,x as runCloseCommand,t as runFocusCommand,q as runLinkCommand,r as runOpenCommand,s as runUseCommand,o as signalDriverLaunchConnected,j as summarizeSimUrl,p as terminatePlaywrightHostsForSims,l as waitForSimMatch,m as waitForSimMatchOrHostExit};
4
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x}from"./chunk-DBGUZSSZ.js";import"./chunk-B3KW5RNB.js";import"./chunk-U2AADABK.js";import"./chunk-UKA7NDFM.js";import"./chunk-XUAPY2KD.js";import"./chunk-EMPIVO3K.js";import"./chunk-7GX6PWOA.js";import"./chunk-44LTYSAH.js";import"./chunk-IWUK7NKH.js";import"./chunk-ZA67W7D7.js";import"./chunk-JENXSTLF.js";import"./chunk-NZZN7N5T.js";import"./chunk-JMATTXDX.js";import"./chunk-ZK4KQ2TD.js";import"./chunk-6AXSCU4S.js";import"./chunk-W6PV2XYW.js";import"./chunk-RAOGHSN7.js";import"./chunk-L4ZWROFC.js";import"./chunk-KXEXEJCK.js";import"./chunk-6A7YWTDH.js";import"./chunk-M6BDXBBX.js";import"./chunk-ODT3EOJJ.js";import"./chunk-C5FIGNQO.js";export{e as applyRuntimeGenerationOrigin,i as buildOpenUrl,h as buildShellUrl,v as closeSimsBulk,c as ensureBridgeForOpen,b as normalizeDeepLinkTarget,w as planBulkCloseTargets,n as playwrightHostPidForSim,k as printConnectedSims,d as resolveBundleTarget,f as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,g as resolveShellBaseUrlForBridgePort,u as runClaimCommand,x as runCloseCommand,t as runFocusCommand,q as runLinkCommand,r as runOpenCommand,s as runUseCommand,o as signalDriverLaunchConnected,j as summarizeSimUrl,p as terminatePlaywrightHostsForSims,l as waitForSimMatch,m as waitForSimMatchOrHostExit};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c,d,e,f}from"./chunk-4M32SWCZ.js";import"./chunk-JAKZI5XW.js";import"./chunk-N47YVJNO.js";import"./chunk-IQ3TZS5H.js";import"./chunk-HSBBMOXY.js";import"./chunk-J5RGKRWA.js";import"./chunk-RAOGHSN7.js";import"./chunk-L4ZWROFC.js";import"./chunk-KXEXEJCK.js";import"./chunk-6A7YWTDH.js";import"./chunk-PL6N5CU2.js";import"./chunk-M6BDXBBX.js";import"./chunk-5Y6USZTP.js";import"./chunk-ODT3EOJJ.js";import"./chunk-N5DUNSYF.js";import"./chunk-C5FIGNQO.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,e as teardownDaemonService,d as teardownLegacyMacDaemonArtifacts,f as teardownSootsimHome};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{f as b,m as C}from"./chunk-W34ZT5MF.js";import{L as N,M as D,N as O,O as T,P as k}from"./chunk-X5C3SLYU.js";import{q as A,s as _,u as S}from"./chunk-MYTUISZ3.js";import"./chunk-VP7D322G.js";import"./chunk-DMAUBOZ2.js";import"./chunk-JJKRVEA6.js";var B=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],F="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function R(){console.log(`
4
+ import{f as b,m as C}from"./chunk-NZZN7N5T.js";import{L as N,M as D,N as O,O as T,P as k}from"./chunk-JMATTXDX.js";import{q as A,s as _,u as S}from"./chunk-KXEXEJCK.js";import"./chunk-6A7YWTDH.js";import"./chunk-M6BDXBBX.js";import"./chunk-C5FIGNQO.js";var B=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],F="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function R(){console.log(`
5
5
  rnx debug \u2014 drive __sootsimDebug from the terminal
6
6
 
7
7
  usage:
@@ -181,7 +181,7 @@ examples:
181
181
  } : null,
182
182
  samples,
183
183
  }
184
- })()`}async function u(t,a){return S(t,a)}function z(t,a){let d=t.indexOf(a);if(d<0)return null;let m=Number(t[d+1]);return Number.isFinite(m)?m:null}async function J(t){await u(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'enable').then(() => 'enabled')"),await t.send({type:"screenshot"});let d=(await u(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'disable').then((s) => ({ imageAudit: s.imageAudit }))"))?.imageAudit;if(!d)throw new Error("compositor returned no image audit");return d}function E(t){return t===null?" - ":t.toFixed(3).padStart(6)}function V(t){let a=t.sourceUri??t.testID??`node ${t.nodeId}`;return a.length<=58?a:`...${a.slice(-55)}`}function W(t,a,d){let f=t.rows.filter(c=>c.shortfall!==null).filter(c=>c.shortfall<d);if(console.log(` ${t.rows.length} images drawn (${t.draws} draws), ${f.length} below ${d} of what their source could deliver`),console.log(` sampling: mipmapped ${t.samplingCounts.mipmapped} \xB7 cubic ${t.samplingCounts.cubic} \xB7 repeat ${t.samplingCounts.repeat} \xB7 none ${t.samplingCounts.none}`),a.length===0){console.log(" every image delivered its source resolution");return}console.log(""),console.log(" short eff decoded source needed(dev) dest(pt) dpr image");for(let c of a){let x=`${c.decoded.width}x${c.decoded.height}`.padEnd(11),r=(c.vector?"vector":c.intrinsic?`${c.intrinsic.width}x${c.intrinsic.height}`:"?").padEnd(11),w=`${Math.round(c.needed.width)}x${Math.round(c.needed.height)}`.padEnd(12),y=`${Math.round(c.destination.width)}x${Math.round(c.destination.height)}`.padEnd(9);console.log(` ${E(c.shortfall)} ${E(c.effective.width)} ${x} ${r} ${w} ${y} ${c.dpr.toFixed(1)} ${V(c)}`)}}async function X(t,a){let d=A(t,{port:a.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),m=d.positional;(!m[0]||t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let c=d.wsPort,x=d.simId,r=!t.includes("--json"),w=x?` --sim ${x}`:"",y=m[0],l=m.slice(1);if(new Set(["state","js","perf","memory","sample-color"]).has(y)){let{runInspect:e}=await import("./inspect-4NF3PPRZ.js");await e(["debug",...t],{port:a.port,verbose:a.verbose});return}let o=_(d);try{switch(y){case"enable":{let e=I(l[0]);e.length===0&&(console.error(` usage: rnx debug enable <channel[,channel,...]>
184
+ })()`}async function u(t,a){return S(t,a)}function z(t,a){let d=t.indexOf(a);if(d<0)return null;let m=Number(t[d+1]);return Number.isFinite(m)?m:null}async function J(t){await u(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'enable').then(() => 'enabled')"),await t.send({type:"screenshot"});let d=(await u(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'disable').then((s) => ({ imageAudit: s.imageAudit }))"))?.imageAudit;if(!d)throw new Error("compositor returned no image audit");return d}function E(t){return t===null?" - ":t.toFixed(3).padStart(6)}function V(t){let a=t.sourceUri??t.testID??`node ${t.nodeId}`;return a.length<=58?a:`...${a.slice(-55)}`}function W(t,a,d){let f=t.rows.filter(c=>c.shortfall!==null).filter(c=>c.shortfall<d);if(console.log(` ${t.rows.length} images drawn (${t.draws} draws), ${f.length} below ${d} of what their source could deliver`),console.log(` sampling: mipmapped ${t.samplingCounts.mipmapped} \xB7 cubic ${t.samplingCounts.cubic} \xB7 repeat ${t.samplingCounts.repeat} \xB7 none ${t.samplingCounts.none}`),a.length===0){console.log(" every image delivered its source resolution");return}console.log(""),console.log(" short eff decoded source needed(dev) dest(pt) dpr image");for(let c of a){let x=`${c.decoded.width}x${c.decoded.height}`.padEnd(11),r=(c.vector?"vector":c.intrinsic?`${c.intrinsic.width}x${c.intrinsic.height}`:"?").padEnd(11),w=`${Math.round(c.needed.width)}x${Math.round(c.needed.height)}`.padEnd(12),y=`${Math.round(c.destination.width)}x${Math.round(c.destination.height)}`.padEnd(9);console.log(` ${E(c.shortfall)} ${E(c.effective.width)} ${x} ${r} ${w} ${y} ${c.dpr.toFixed(1)} ${V(c)}`)}}async function X(t,a){let d=A(t,{port:a.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),m=d.positional;(!m[0]||t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let c=d.wsPort,x=d.simId,r=!t.includes("--json"),w=x?` --sim ${x}`:"",y=m[0],l=m.slice(1);if(new Set(["state","js","perf","memory","sample-color"]).has(y)){let{runInspect:e}=await import("./inspect-WVXDXHMN.js");await e(["debug",...t],{port:a.port,verbose:a.verbose});return}let o=_(d);try{switch(y){case"enable":{let e=I(l[0]);e.length===0&&(console.error(` usage: rnx debug enable <channel[,channel,...]>
185
185
  known: ${B.join(", ")}`),process.exit(1));let s=await k(o,"enable",e);console.log(i({active:s},r));break}case"disable":{let e=I(l[0]),s=await k(o,"disable",e);console.log(i({active:s},r));break}case"toggle":{let e=l[0];e||(console.error(" usage: rnx debug toggle <channel>"),process.exit(1));let s=await u(o,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(i({[e]:s},r));break}case"status":{let e=await N(o);console.log(i(e,r));break}case"channels":{let e=await u(o,"window.__sootsimDebug.channels()");console.log(i(e,r));break}case"flags":{let e=await D(o);console.log(i(e,r));break}case"snapshot":{let e=l[0],s=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",n=await u(o,`(() => { const s = ${s}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(i(n,r));break}case"snapshots":{let e=await u(o,"window.__sootsimDebug.snapshots()");console.log(i(e,r));break}case"diff":{let e=l[0],s=l[1];(!e||!s)&&(console.error(" usage: rnx debug diff <labelA> <labelB>"),process.exit(1));let n=`(() => {
186
186
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(s)});
187
187
  if (!d) return null;
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (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-DEK47I44.js";import"./chunk-CKKJUPAA.js";import{a as d}from"./chunk-L6FANSWV.js";import{h as u}from"./chunk-RYXIRFY2.js";import"./chunk-3KDMR5FE.js";import"./chunk-5JKZGU2L.js";import"./chunk-HWIUC6SX.js";import{a}from"./chunk-QRHLTYK7.js";import{a as p}from"./chunk-LXED7YNR.js";import{c}from"./chunk-Z7ILCEXG.js";import"./chunk-7IBTDBHW.js";import"./chunk-JRJDACNV.js";import"./chunk-CKK6IEZD.js";import"./chunk-J2EHW26I.js";import{a as l}from"./chunk-6HQ2CUG5.js";import"./chunk-W34ZT5MF.js";import"./chunk-X5C3SLYU.js";import"./chunk-AVGWPMGX.js";import"./chunk-NZVA5ZGD.js";import"./chunk-JX5LGYG2.js";import"./chunk-ZEU5RFAH.js";import"./chunk-TRGIXJN4.js";import"./chunk-MYTUISZ3.js";import"./chunk-VP7D322G.js";import"./chunk-DMAUBOZ2.js";import"./chunk-UOK37RTL.js";import"./chunk-JJKRVEA6.js";function k(e){let t=e.indexOf("--port");if(t<0)return;let o=e[t+1],n=o?Number(o):Number.NaN;return(!Number.isInteger(n)||n<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),n}async function v(e,t){let o=k(e)??t.port;return o?u(String(o)):void 0}async function m(e,t){(e.includes("--help")||e.includes("-h"))&&(console.log(`
4
+ import{a as f}from"./chunk-HL2T3M2K.js";import"./chunk-MLKTJDI4.js";import{a as d}from"./chunk-NPVDNQVZ.js";import{h as u}from"./chunk-DBGUZSSZ.js";import"./chunk-B3KW5RNB.js";import"./chunk-U2AADABK.js";import"./chunk-UKA7NDFM.js";import{a}from"./chunk-XUAPY2KD.js";import{a as p}from"./chunk-EMPIVO3K.js";import{c}from"./chunk-7GX6PWOA.js";import"./chunk-44LTYSAH.js";import"./chunk-IWUK7NKH.js";import"./chunk-ZA67W7D7.js";import"./chunk-JENXSTLF.js";import{a as l}from"./chunk-5UZIVCQI.js";import"./chunk-NZZN7N5T.js";import"./chunk-JMATTXDX.js";import"./chunk-ZK4KQ2TD.js";import"./chunk-6AXSCU4S.js";import"./chunk-W6PV2XYW.js";import"./chunk-RAOGHSN7.js";import"./chunk-L4ZWROFC.js";import"./chunk-KXEXEJCK.js";import"./chunk-6A7YWTDH.js";import"./chunk-M6BDXBBX.js";import"./chunk-ODT3EOJJ.js";import"./chunk-C5FIGNQO.js";function k(e){let t=e.indexOf("--port");if(t<0)return;let o=e[t+1],n=o?Number(o):Number.NaN;return(!Number.isInteger(n)||n<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),n}async function v(e,t){let o=k(e)??t.port;return o?u(String(o)):void 0}async function m(e,t){(e.includes("--help")||e.includes("-h"))&&(console.log(`
5
5
  rnx desktop \u2014 launch the desktop companion
6
6
 
7
7
  usage:
@@ -16,7 +16,7 @@ examples:
16
16
  rnx desktop
17
17
  rnx desktop --port 5173
18
18
  rnx desktop --profile qa
19
- `),process.exit(0));let o=e.find((g,s)=>e[s-1]==="--profile"),n=e.includes("--ephemeral");o&&n&&(console.error(" rnx desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let h=o?c(o).id:void 0,r=p();if(!r){if(d(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await l("run rnx desktop install now?",!0)){console.log();let{runInstallDesktop:s}=await import("./install-desktop-66LPKLQI.js");await s(["--yes"]),r=p()}r||process.exit(1)}console.log(` launching ${r.path}`);let x=await v(e,t),i=await a.launch({url:x,device:t.device,profileId:h,ephemeralProfile:n});i.launched||(console.error(` ${i.message}`),process.exit(1)),console.log(` ${i.message}`)}function w(){console.log(`
19
+ `),process.exit(0));let o=e.find((g,s)=>e[s-1]==="--profile"),n=e.includes("--ephemeral");o&&n&&(console.error(" rnx desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let h=o?c(o).id:void 0,r=p();if(!r){if(d(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await l("run rnx desktop install now?",!0)){console.log();let{runInstallDesktop:s}=await import("./install-desktop-55VB3WWL.js");await s(["--yes"]),r=p()}r||process.exit(1)}console.log(` launching ${r.path}`);let x=await v(e,t),i=await a.launch({url:x,device:t.device,profileId:h,ephemeralProfile:n});i.launched||(console.error(` ${i.message}`),process.exit(1)),console.log(` ${i.message}`)}function w(){console.log(`
20
20
  rnx desktop \u2014 launch or install the desktop companion
21
21
 
22
22
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{f as N}from"./chunk-52LBSDBQ.js";import"./chunk-MKFOWHFO.js";import"./chunk-DB4DBTM2.js";import"./chunk-EZ2WX6EK.js";import"./chunk-L6FANSWV.js";import"./chunk-U4ZHMDGL.js";import"./chunk-2FT3GZ2P.js";import"./chunk-RYXIRFY2.js";import"./chunk-3KDMR5FE.js";import"./chunk-5JKZGU2L.js";import"./chunk-HWIUC6SX.js";import"./chunk-QRHLTYK7.js";import"./chunk-LXED7YNR.js";import"./chunk-Z7ILCEXG.js";import{c as F,d as $,e as E}from"./chunk-PH37P7G2.js";import{a as M}from"./chunk-M76E72WP.js";import"./chunk-7IBTDBHW.js";import"./chunk-JRJDACNV.js";import"./chunk-CKK6IEZD.js";import"./chunk-J2EHW26I.js";import"./chunk-W34ZT5MF.js";import"./chunk-X5C3SLYU.js";import"./chunk-AVGWPMGX.js";import"./chunk-2C7MJXES.js";import"./chunk-CA3D6BWR.js";import"./chunk-AZWECMXO.js";import"./chunk-UKKT5KM4.js";import"./chunk-NZVA5ZGD.js";import"./chunk-JX5LGYG2.js";import"./chunk-BCGO3XWB.js";import"./chunk-ZEU5RFAH.js";import"./chunk-TRGIXJN4.js";import"./chunk-MYTUISZ3.js";import"./chunk-VP7D322G.js";import"./chunk-TAPZRN4C.js";import"./chunk-DMAUBOZ2.js";import{a as R}from"./chunk-UOK37RTL.js";import"./chunk-JJKRVEA6.js";import{spawn as G}from"child_process";import{existsSync as g,mkdirSync as B,readFileSync as C,writeFileSync as y,unlinkSync as U}from"fs";import{tmpdir as k}from"os";import{dirname as q,resolve as a,join as J,relative as H}from"path";function V(){try{let t=import.meta.resolve(`${R.packageName}/detox`);return q(t.startsWith("file://")?t.slice(7):t)}catch{return a(import.meta.dirname,"..","..","detox")}}var z=`
4
+ import{f as N}from"./chunk-4DYFL7VF.js";import"./chunk-LZUAVMRN.js";import"./chunk-GR7ES5RM.js";import"./chunk-NNPXO7FN.js";import"./chunk-NPVDNQVZ.js";import"./chunk-7IXFMHDF.js";import"./chunk-7H7KVISJ.js";import"./chunk-DBGUZSSZ.js";import"./chunk-B3KW5RNB.js";import"./chunk-U2AADABK.js";import"./chunk-UKA7NDFM.js";import"./chunk-XUAPY2KD.js";import"./chunk-EMPIVO3K.js";import"./chunk-7GX6PWOA.js";import{c as F,d as $,e as E}from"./chunk-T5CRWQLR.js";import{a as M}from"./chunk-UXDMXYTX.js";import"./chunk-44LTYSAH.js";import"./chunk-IWUK7NKH.js";import"./chunk-ZA67W7D7.js";import"./chunk-JENXSTLF.js";import"./chunk-NZZN7N5T.js";import"./chunk-JMATTXDX.js";import"./chunk-ZK4KQ2TD.js";import"./chunk-X5ZDVNIE.js";import"./chunk-4CEJ33SY.js";import"./chunk-JAKZI5XW.js";import"./chunk-N47YVJNO.js";import"./chunk-6AXSCU4S.js";import"./chunk-W6PV2XYW.js";import"./chunk-J5RGKRWA.js";import"./chunk-RAOGHSN7.js";import"./chunk-L4ZWROFC.js";import"./chunk-KXEXEJCK.js";import"./chunk-6A7YWTDH.js";import"./chunk-PL6N5CU2.js";import"./chunk-M6BDXBBX.js";import{a as R}from"./chunk-ODT3EOJJ.js";import"./chunk-C5FIGNQO.js";import{spawn as G}from"child_process";import{existsSync as g,mkdirSync as B,readFileSync as C,writeFileSync as y,unlinkSync as U}from"fs";import{tmpdir as k}from"os";import{dirname as q,resolve as a,join as J,relative as H}from"path";function V(){try{let t=import.meta.resolve(`${R.packageName}/detox`);return q(t.startsWith("file://")?t.slice(7):t)}catch{return a(import.meta.dirname,"..","..","detox")}}var z=`
5
5
  rnx detox \u2014 run detox-style tests against an rnx shell
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (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-5JKZGU2L.js";import"./chunk-J2EHW26I.js";import"./chunk-ZEU5RFAH.js";import{b as c,c as s,d as m}from"./chunk-TRGIXJN4.js";import{q as d,s as l,v as a}from"./chunk-MYTUISZ3.js";import"./chunk-VP7D322G.js";import"./chunk-DMAUBOZ2.js";import"./chunk-JJKRVEA6.js";function h(){console.log(`
4
+ import"./chunk-U2AADABK.js";import"./chunk-JENXSTLF.js";import"./chunk-RAOGHSN7.js";import{b as c,c as s,d as m}from"./chunk-L4ZWROFC.js";import{q as d,s as l,v as a}from"./chunk-KXEXEJCK.js";import"./chunk-6A7YWTDH.js";import"./chunk-M6BDXBBX.js";import"./chunk-C5FIGNQO.js";function h(){console.log(`
5
5
  rnx device \u2014 inspect or change the live device preset for a sim
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{e as v,q as E,s as x,v as b}from"./chunk-MYTUISZ3.js";import"./chunk-VP7D322G.js";import"./chunk-DMAUBOZ2.js";import"./chunk-JJKRVEA6.js";function j(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
4
+ import{e as v,q as E,s as x,v as b}from"./chunk-KXEXEJCK.js";import"./chunk-6A7YWTDH.js";import"./chunk-M6BDXBBX.js";import"./chunk-C5FIGNQO.js";function j(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
5
5
  rnx get diagnosis \u2014 compact "what just went wrong?" report
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a,b,c,d,e}from"./chunk-WRPLAFZP.js";import"./chunk-NZVA5ZGD.js";import"./chunk-JX5LGYG2.js";import"./chunk-DMAUBOZ2.js";import"./chunk-UOK37RTL.js";import"./chunk-JJKRVEA6.js";export{e as applyAutomaticSootsimCleanup,d as applySootsimCleanup,b as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,c as planSootsimCleanup};
4
+ import{a,b,c,d,e}from"./chunk-CDLSM2CG.js";import"./chunk-6AXSCU4S.js";import"./chunk-W6PV2XYW.js";import"./chunk-M6BDXBBX.js";import"./chunk-ODT3EOJJ.js";import"./chunk-C5FIGNQO.js";export{e as applyAutomaticSootsimCleanup,d as applySootsimCleanup,b as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,c as planSootsimCleanup};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import"./chunk-MLKTJDI4.js";import{a,b,c,d,e,f,g}from"./chunk-XUAPY2KD.js";import"./chunk-EMPIVO3K.js";import"./chunk-7GX6PWOA.js";import"./chunk-6AXSCU4S.js";import"./chunk-6A7YWTDH.js";import"./chunk-M6BDXBBX.js";import"./chunk-C5FIGNQO.js";export{c as ALL_DRIVERS,g as buildDriverListRows,a as electronDriver,d as getAllDrivers,e as getDriver,b as playwrightDriver,f as resolveDriver};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as R,d as L}from"./chunk-CYAEO7E3.js";import{q as x,s as A,w as b}from"./chunk-MYTUISZ3.js";import"./chunk-VP7D322G.js";import"./chunk-DMAUBOZ2.js";import"./chunk-JJKRVEA6.js";import{spawnSync as T}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
4
+ import{c as R,d as L}from"./chunk-HPMFCGIJ.js";import{q as x,s as A,w as b}from"./chunk-KXEXEJCK.js";import"./chunk-6A7YWTDH.js";import"./chunk-M6BDXBBX.js";import"./chunk-C5FIGNQO.js";import{spawnSync as T}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
5
5
  rnx film \u2014 record a flow flat, replay it on the 3d stage, save a clip
6
6
 
7
7
  usage:
@@ -35,7 +35,7 @@ examples:
35
35
  rnx film flows/swap.yaml --script hero-arc --background gradient-tide --out ~/Desktop/swap-3d.mp4
36
36
  rnx film flows/login.yaml --colorway deep-blue --environment on --env-shape pane --room on
37
37
  `),0;let s=e.find(d=>!d.startsWith("--")&&/\.ya?ml$/.test(d));if(!s||!V(I(s)))return console.error(` film: flow file not found: ${s??"(none given)"}`),1;let P=Number.parseInt(c(e,"--fps")??"30",10),h=c(e,"--script")??"hero-arc",z=e.includes("--keep-three"),v=s.replace(/^.*\//,"").replace(/\.ya?ml$/,""),O=c(e,"--out"),l=I(O??K(j(),"Desktop","sootsim-films",`${v}.webm`)),S=H(l).toLowerCase()===".mp4";if(S&&T("ffmpeg",["-version"]).status!==0)return console.error(" film: --out ends in .mp4 but ffmpeg is not installed"),console.error(" install ffmpeg or use a .webm output path"),1;let C=x(e,{port:a.port,stripValueFlags:[...X,...Q],stripBooleanFlags:J}),t=A({...C,commandTimeoutMs:6e4});try{let d=await r(t,`(() => { const s = window.SootSim?.bridges?.settings?.get?.() || {}
38
- return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(t,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let D=Date.now();await n(500);let{runFlowPlayback:G}=await import("./flow-XQUTMOQZ.js"),m=[s],y=c(e,"--sim");y&&m.push("--sim",y);let k=c(e,"--slow");k&&m.push("--slow",k);let f=await G(m);await n(400);let u=Math.min(Date.now()-D,Y);if(await r(t,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let F=!1;for(let o=0;o<50;o++){await n(400);let i=await r(t,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
38
+ return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(t,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let D=Date.now();await n(500);let{runFlowPlayback:G}=await import("./flow-W2ZYYD5K.js"),m=[s],y=c(e,"--sim");y&&m.push("--sim",y);let k=c(e,"--slow");k&&m.push("--slow",k);let f=await G(m);await n(400);let u=Math.min(Date.now()-D,Y);if(await r(t,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let F=!1;for(let o=0;o<50;o++){await n(400);let i=await r(t,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
39
39
  return { state: s?.state, hasBlob: !!s?.lastVideoBlob } })()`);if(i?.state==="idle"&&i.hasBlob){F=!0;break}}if(!F)return console.error(" film: flow recording never produced a video blob"),1;console.log(` film: flow captured (${(u/1e3).toFixed(1)}s)`),await r(t,"window.SootSim?.bridges?.settings?.set?.('threeMode', true)"),await R(t),await n(1400),await r(t,"window.SootSim?.bridges?.settings?.set?.('threeRecordingEditor', true)");let _=!1;for(let o=0;o<60;o++)if(await n(250),await r(t,`(() => { const rs = window.SootSim?.replayStore
40
40
  return rs?.value?.preview?.surface === 'video' && !!rs?.value?.preview?.flowVideoUrl })()`)){_=!0;break}if(!_)return console.error(" film: recording editor did not seed the replay store"),1;let p=L(e);delete p.script,p.resetPose=!0,await b(t,"SootSim.bridges.threeMode.configure",p),await n(2400),console.log(` film: filming the 3d stage (script: ${h})`);let M=await r(t,`(() => {
41
41
  const c = window.SootSim?.bridges?.threeMode?.getCanvas?.()
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{c,d,e,f,g,h,i}from"./chunk-4DYFL7VF.js";import"./chunk-LZUAVMRN.js";import"./chunk-GR7ES5RM.js";import{b as a,c as b}from"./chunk-NNPXO7FN.js";import"./chunk-NPVDNQVZ.js";import"./chunk-7IXFMHDF.js";import"./chunk-7H7KVISJ.js";import"./chunk-DBGUZSSZ.js";import"./chunk-B3KW5RNB.js";import"./chunk-U2AADABK.js";import"./chunk-UKA7NDFM.js";import"./chunk-XUAPY2KD.js";import"./chunk-EMPIVO3K.js";import"./chunk-7GX6PWOA.js";import"./chunk-T5CRWQLR.js";import"./chunk-UXDMXYTX.js";import"./chunk-44LTYSAH.js";import"./chunk-IWUK7NKH.js";import"./chunk-ZA67W7D7.js";import"./chunk-JENXSTLF.js";import"./chunk-NZZN7N5T.js";import"./chunk-JMATTXDX.js";import"./chunk-ZK4KQ2TD.js";import"./chunk-X5ZDVNIE.js";import"./chunk-4CEJ33SY.js";import"./chunk-JAKZI5XW.js";import"./chunk-N47YVJNO.js";import"./chunk-6AXSCU4S.js";import"./chunk-W6PV2XYW.js";import"./chunk-J5RGKRWA.js";import"./chunk-RAOGHSN7.js";import"./chunk-L4ZWROFC.js";import"./chunk-KXEXEJCK.js";import"./chunk-6A7YWTDH.js";import"./chunk-PL6N5CU2.js";import"./chunk-M6BDXBBX.js";import"./chunk-ODT3EOJJ.js";import"./chunk-C5FIGNQO.js";export{f as discoverSootsimUrl,c as getLastFlowPreviewUploadResult,d as getLastFlowTraceSteps,h as hoistLeadingSimFlag,a as parseFlowFile,e as resolveAppFrontmatterTarget,g as runFlowPlayback,i as runMaestroAuthoring,b as validateFlowFile};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c}from"./chunk-IQ3TZS5H.js";import"./chunk-HSBBMOXY.js";import"./chunk-J5RGKRWA.js";import"./chunk-RAOGHSN7.js";import"./chunk-L4ZWROFC.js";import"./chunk-KXEXEJCK.js";import"./chunk-6A7YWTDH.js";import"./chunk-PL6N5CU2.js";import"./chunk-M6BDXBBX.js";import"./chunk-5Y6USZTP.js";import"./chunk-ODT3EOJJ.js";import"./chunk-N5DUNSYF.js";import"./chunk-C5FIGNQO.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (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-CA3D6BWR.js";import{b as n}from"./chunk-TAPZRN4C.js";import"./chunk-JJKRVEA6.js";var e=["do","get"];function i(t){if(t.command)return t;let o=t.commandArgs.find(r=>!r.startsWith("-"));if(!o)return t;for(let r of e)if(n(r,o))return{...t,command:r};return t}export{i as resolveHiddenRuntimeAlias};
4
+ import"./chunk-4CEJ33SY.js";import{b as n}from"./chunk-PL6N5CU2.js";import"./chunk-C5FIGNQO.js";var e=["do","get"];function i(t){if(t.command)return t;let o=t.commandArgs.find(r=>!r.startsWith("-"));if(!o)return t;for(let r of e)if(n(r,o))return{...t,command:r};return t}export{i as resolveHiddenRuntimeAlias};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-DMAUBOZ2.js";import"./chunk-JJKRVEA6.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGES_DIR,a as SOOTSIM_HOME_ENV,L as activeRuntimeDir,m as activeRuntimeFile,v as cacheDir,r as cameraFixturesDir,T as claimDaemonLockfile,z as configFilePath,H as consumeRuntimeUpgradeNotice,t as daemonAppBundlePath,s as daemonAppDir,u as daemonAppLauncherPath,w as daemonLockfilePath,y as devBridgeLockfilePath,x as devBridgesDir,n as electronDir,o as electronUserDataDir,p as electronVersionDir,I as ensureSootsimHome,O as isDaemonLockfileFresh,P as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,q as profilesDir,J as readActiveRuntime,M as readDaemonLockfile,N as readDevBridgeLockfiles,Q as readLiveRuntimeVersions,E as readOrCreateAnonymousId,C as readPrivacyPreferences,A as readSharedConfig,U as removeDaemonLockfile,V as removeDevBridgeLockfile,l as runtimeDir,F as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,K as writeActiveRuntime,R as writeDaemonLockfile,S as writeDevBridgeLockfile,D as writePrivacyPreferences,G as writeRuntimeUpgradeNotice,B as writeSharedConfig};
4
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-M6BDXBBX.js";import"./chunk-C5FIGNQO.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGES_DIR,a as SOOTSIM_HOME_ENV,L as activeRuntimeDir,m as activeRuntimeFile,v as cacheDir,r as cameraFixturesDir,T as claimDaemonLockfile,z as configFilePath,H as consumeRuntimeUpgradeNotice,t as daemonAppBundlePath,s as daemonAppDir,u as daemonAppLauncherPath,w as daemonLockfilePath,y as devBridgeLockfilePath,x as devBridgesDir,n as electronDir,o as electronUserDataDir,p as electronVersionDir,I as ensureSootsimHome,O as isDaemonLockfileFresh,P as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,q as profilesDir,J as readActiveRuntime,M as readDaemonLockfile,N as readDevBridgeLockfiles,Q as readLiveRuntimeVersions,E as readOrCreateAnonymousId,C as readPrivacyPreferences,A as readSharedConfig,U as removeDaemonLockfile,V as removeDevBridgeLockfile,l as runtimeDir,F as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,K as writeActiveRuntime,R as writeDaemonLockfile,S as writeDevBridgeLockfile,D as writePrivacyPreferences,G as writeRuntimeUpgradeNotice,B as writeSharedConfig};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{i as a,j as b}from"./chunk-NNPXO7FN.js";import"./chunk-NPVDNQVZ.js";import"./chunk-7IXFMHDF.js";import"./chunk-7H7KVISJ.js";import"./chunk-DBGUZSSZ.js";import"./chunk-B3KW5RNB.js";import"./chunk-U2AADABK.js";import"./chunk-UKA7NDFM.js";import"./chunk-XUAPY2KD.js";import"./chunk-EMPIVO3K.js";import"./chunk-7GX6PWOA.js";import"./chunk-44LTYSAH.js";import"./chunk-IWUK7NKH.js";import"./chunk-ZA67W7D7.js";import"./chunk-JENXSTLF.js";import"./chunk-NZZN7N5T.js";import"./chunk-JMATTXDX.js";import"./chunk-ZK4KQ2TD.js";import"./chunk-X5ZDVNIE.js";import"./chunk-4CEJ33SY.js";import"./chunk-6AXSCU4S.js";import"./chunk-W6PV2XYW.js";import"./chunk-J5RGKRWA.js";import"./chunk-RAOGHSN7.js";import"./chunk-L4ZWROFC.js";import"./chunk-KXEXEJCK.js";import"./chunk-6A7YWTDH.js";import"./chunk-PL6N5CU2.js";import"./chunk-M6BDXBBX.js";import"./chunk-ODT3EOJJ.js";import"./chunk-C5FIGNQO.js";export{a as printShellPerfReport,b as runInspect};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.342 | (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-HL2T3M2K.js";import"./chunk-EMPIVO3K.js";import"./chunk-5UZIVCQI.js";import"./chunk-C5FIGNQO.js";export{a as runInstallDesktop};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as k,d as v}from"./chunk-UKKT5KM4.js";import"./chunk-DMAUBOZ2.js";import{a as b}from"./chunk-UOK37RTL.js";import"./chunk-JJKRVEA6.js";import{exec as L}from"node:child_process";import{randomBytes as R}from"node:crypto";import P from"node:http";var O=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev",w="https://contrast.localhost:3000";async function A(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${w}/api/auth/me`)).ok)return w}catch{}return O}function C(){console.log(`
4
+ import{b as k,d as v}from"./chunk-N47YVJNO.js";import"./chunk-M6BDXBBX.js";import{a as b}from"./chunk-ODT3EOJJ.js";import"./chunk-C5FIGNQO.js";import{exec as L}from"node:child_process";import{randomBytes as R}from"node:crypto";import P from"node:http";var O=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev",w="https://contrast.localhost:3000";async function A(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${w}/api/auth/me`)).ok)return w}catch{}return O}function C(){console.log(`
5
5
  rnx login \u2014 sign in so uploads can attach to your account
6
6
 
7
7
  usage:
@@ -23,6 +23,6 @@ options:
23
23
  <p style="color:#ccc">${r}</p>
24
24
  </div>
25
25
  </body>
26
- </html>`}async function G(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"local dev-login unavailable"};if(!e.ok){let u=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${u}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function M(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function F(r){(r.includes("--help")||r.includes("-h"))&&(C(),process.exit(0));let e=[...r],t=await A(U(e,"--origin"));if(M(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let n=await G(t);if(n.ok){k({token:n.token,user:n.userId?{id:n.userId,email:n.email}:null,origin:t,source:"cli"});let s=await v(t),d=s?.user?.email||n.email||s?.user?.id||n.userId,{trackCliEvent:a,flushCliTelemetry:f}=await import("./telemetry-SCC2A4KF.js");a({event:"cli_login_succeeded",identity:{userId:n.userId??s?.user?.id??null},properties:{origin:t,mode:"dev"}}),await f(),console.log(` signed in${d?` as ${d}`:""} (dev)`);return}console.log(` dev-login not available (${n.error}); falling back to browser`)}let u=R(16).toString("hex");{let{trackCliEvent:n,flushCliTelemetry:s}=await import("./telemetry-SCC2A4KF.js");n({event:"cli_login_started",properties:{origin:t}}),await s()}let m=300*1e3,i=await new Promise(n=>{let s,d=!1,a=c=>{d||(d=!0,clearTimeout(s),n(c),f.close())},f=P.createServer((c,o)=>{try{let l=new URL(c.url||"/","http://127.0.0.1"),S=l.searchParams.get("state"),y=l.searchParams.get("token"),x=l.searchParams.get("email")||void 0,T=l.searchParams.get("userId")||void 0,p=l.searchParams.get("error");if(S!==u){o.statusCode=404,o.end("not found");return}if(o.setHeader("content-type","text/html; charset=utf-8"),p){o.end(g(`sign-in failed: ${p}`)),a({ok:!1,error:p});return}if(!y){o.end(g("missing token. close this tab and retry `rnx login`.")),a({ok:!1,error:"missing token"});return}o.end(g("sign-in complete. you can return to the terminal.")),a({ok:!0,token:y,email:x,userId:T})}catch(l){o.statusCode=500,o.end(g("sign-in callback failed. retry `rnx login`.")),a({ok:!1,error:l instanceof Error?l.message:"callback failed"})}});s=setTimeout(()=>{a({ok:!1,error:"timed out waiting for the browser sign-in (5 minutes). rerun `rnx login` and complete the github authorize screen if it appears."})},m),f.listen(0,"127.0.0.1",()=>{let c=f.address();if(!c||typeof c=="string"){a({ok:!1,error:"failed to bind callback server"});return}let o=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);o.searchParams.set("state",u),o.searchParams.set("port",String(c.port)),o.searchParams.set("contrast",t),console.log(" opening browser for rnx login..."),console.log(" first time here? github will show an authorize screen. approve it to continue."),console.log(" waiting up to 5 minutes for the browser (ctrl+c to cancel)"),console.log(` if nothing opens, visit:
26
+ </html>`}async function G(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"local dev-login unavailable"};if(!e.ok){let u=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${u}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function M(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function F(r){(r.includes("--help")||r.includes("-h"))&&(C(),process.exit(0));let e=[...r],t=await A(U(e,"--origin"));if(M(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let n=await G(t);if(n.ok){k({token:n.token,user:n.userId?{id:n.userId,email:n.email}:null,origin:t,source:"cli"});let s=await v(t),d=s?.user?.email||n.email||s?.user?.id||n.userId,{trackCliEvent:a,flushCliTelemetry:f}=await import("./telemetry-QQOI3O5B.js");a({event:"cli_login_succeeded",identity:{userId:n.userId??s?.user?.id??null},properties:{origin:t,mode:"dev"}}),await f(),console.log(` signed in${d?` as ${d}`:""} (dev)`);return}console.log(` dev-login not available (${n.error}); falling back to browser`)}let u=R(16).toString("hex");{let{trackCliEvent:n,flushCliTelemetry:s}=await import("./telemetry-QQOI3O5B.js");n({event:"cli_login_started",properties:{origin:t}}),await s()}let m=300*1e3,i=await new Promise(n=>{let s,d=!1,a=c=>{d||(d=!0,clearTimeout(s),n(c),f.close())},f=P.createServer((c,o)=>{try{let l=new URL(c.url||"/","http://127.0.0.1"),S=l.searchParams.get("state"),y=l.searchParams.get("token"),x=l.searchParams.get("email")||void 0,T=l.searchParams.get("userId")||void 0,p=l.searchParams.get("error");if(S!==u){o.statusCode=404,o.end("not found");return}if(o.setHeader("content-type","text/html; charset=utf-8"),p){o.end(g(`sign-in failed: ${p}`)),a({ok:!1,error:p});return}if(!y){o.end(g("missing token. close this tab and retry `rnx login`.")),a({ok:!1,error:"missing token"});return}o.end(g("sign-in complete. you can return to the terminal.")),a({ok:!0,token:y,email:x,userId:T})}catch(l){o.statusCode=500,o.end(g("sign-in callback failed. retry `rnx login`.")),a({ok:!1,error:l instanceof Error?l.message:"callback failed"})}});s=setTimeout(()=>{a({ok:!1,error:"timed out waiting for the browser sign-in (5 minutes). rerun `rnx login` and complete the github authorize screen if it appears."})},m),f.listen(0,"127.0.0.1",()=>{let c=f.address();if(!c||typeof c=="string"){a({ok:!1,error:"failed to bind callback server"});return}let o=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);o.searchParams.set("state",u),o.searchParams.set("port",String(c.port)),o.searchParams.set("contrast",t),console.log(" opening browser for rnx login..."),console.log(" first time here? github will show an authorize screen. approve it to continue."),console.log(" waiting up to 5 minutes for the browser (ctrl+c to cancel)"),console.log(` if nothing opens, visit:
27
27
  ${o.toString()}
28
- `),E(o.toString())})});if(!i.ok){let{trackCliEvent:n,flushCliTelemetry:s}=await import("./telemetry-SCC2A4KF.js");n({event:"cli_login_failed",properties:{origin:t,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}k({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:t,source:"cli"});let h=await v(t),I=h?.user?.email||i.email||h?.user?.id||i.userId,{trackCliEvent:$,flushCliTelemetry:_}=await import("./telemetry-SCC2A4KF.js");$({event:"cli_login_succeeded",identity:{userId:i.userId??h?.user?.id??null},properties:{origin:t}}),await _(),console.log(` signed in${I?` as ${I}`:""}`)}export{F as runLogin};
28
+ `),E(o.toString())})});if(!i.ok){let{trackCliEvent:n,flushCliTelemetry:s}=await import("./telemetry-QQOI3O5B.js");n({event:"cli_login_failed",properties:{origin:t,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}k({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:t,source:"cli"});let h=await v(t),I=h?.user?.email||i.email||h?.user?.id||i.userId,{trackCliEvent:$,flushCliTelemetry:_}=await import("./telemetry-QQOI3O5B.js");$({event:"cli_login_succeeded",identity:{userId:i.userId??h?.user?.id??null},properties:{origin:t}}),await _(),console.log(` signed in${I?` as ${I}`:""}`)}export{F as runLogin};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.342 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as r,d as i}from"./chunk-AZWECMXO.js";import{a as t,c as o}from"./chunk-UKKT5KM4.js";import"./chunk-DMAUBOZ2.js";import"./chunk-JJKRVEA6.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
4
+ import{c as r,d as i}from"./chunk-JAKZI5XW.js";import{a as t,c as o}from"./chunk-N47YVJNO.js";import"./chunk-M6BDXBBX.js";import"./chunk-C5FIGNQO.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};