rnxsim 0.1.365 → 0.1.366

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 (184) hide show
  1. package/README.md +2 -0
  2. package/cli/bridge-flow-runner.ts +2 -2
  3. package/cli/commands/control.ts +3 -44
  4. package/cli/commands/detox.ts +18 -1
  5. package/cli/commands/flow.ts +2 -1
  6. package/detox/index.ts +3 -1
  7. package/dist-cli/bin.js +5 -5
  8. package/dist-cli/chunks/{agent-BVMNQFKF.js → agent-SO6IOPRK.js} +2 -2
  9. package/dist-cli/chunks/{agent-wrapper-B6YFXGC3.js → agent-wrapper-PMYCB2KO.js} +2 -2
  10. package/dist-cli/chunks/{app-fonts-MEI6R6XR.js → app-fonts-LULQGFY7.js} +2 -2
  11. package/dist-cli/chunks/{assert-JGHI53HV.js → assert-WGNCD4ZU.js} +2 -2
  12. package/dist-cli/chunks/{auth-STEOXUS7.js → auth-G7CCHH3M.js} +2 -2
  13. package/dist-cli/chunks/{beta-HT3FLS5T.js → beta-N4LXL5TO.js} +2 -2
  14. package/dist-cli/chunks/{camera-ZCLFSLON.js → camera-4JHCYBQS.js} +2 -2
  15. package/dist-cli/chunks/{chunk-5AS7S6HY.js → chunk-2S7BKUP2.js} +2 -2
  16. package/dist-cli/chunks/{chunk-RI3NS77J.js → chunk-2UXU53MG.js} +1 -1
  17. package/dist-cli/chunks/{chunk-XPOTXF5Q.js → chunk-34IQM22N.js} +2 -2
  18. package/dist-cli/chunks/{chunk-52ES4API.js → chunk-3X6IBUBX.js} +2 -2
  19. package/dist-cli/chunks/{chunk-TULWPOAY.js → chunk-5DAIA77C.js} +2 -2
  20. package/dist-cli/chunks/{chunk-FIXRGPUT.js → chunk-5NMCF5VF.js} +1 -1
  21. package/dist-cli/chunks/{chunk-QIQL7Y5V.js → chunk-5OK3LCEJ.js} +2 -2
  22. package/dist-cli/chunks/{chunk-NEH4T67X.js → chunk-6PL2CCGP.js} +2 -2
  23. package/dist-cli/chunks/{chunk-MRNW4GVL.js → chunk-77ZHQJZR.js} +2 -2
  24. package/dist-cli/chunks/chunk-7B37IZBN.js +15 -0
  25. package/dist-cli/chunks/{chunk-CYIE65QN.js → chunk-A5FXX5PJ.js} +1 -1
  26. package/dist-cli/chunks/{chunk-JRPU5TFI.js → chunk-AFV32WZT.js} +3 -3
  27. package/dist-cli/chunks/{chunk-M5KJCLUW.js → chunk-CN6XYYEA.js} +12 -12
  28. package/dist-cli/chunks/{chunk-J66US2OZ.js → chunk-CTG7HBCA.js} +1 -1
  29. package/dist-cli/chunks/{chunk-ZGD7GZRI.js → chunk-DMPF2D24.js} +2 -2
  30. package/dist-cli/chunks/{chunk-622E4JET.js → chunk-DW37EVX5.js} +1 -1
  31. package/dist-cli/chunks/{chunk-XKRUNS7A.js → chunk-DWFIH7CB.js} +2 -2
  32. package/dist-cli/chunks/{chunk-WGNDJARS.js → chunk-EFR5DVNP.js} +1 -1
  33. package/dist-cli/chunks/{chunk-6BAF6GFS.js → chunk-EGAGZHO6.js} +1 -1
  34. package/dist-cli/chunks/{chunk-MACI34ST.js → chunk-EQK5MJCU.js} +2 -2
  35. package/dist-cli/chunks/{chunk-JAFF4RAU.js → chunk-GAJQSITE.js} +1 -1
  36. package/dist-cli/chunks/{chunk-ZGH5U4AJ.js → chunk-GUI3PDH2.js} +2 -2
  37. package/dist-cli/chunks/{chunk-DBJZUCFP.js → chunk-GXAB52K7.js} +2 -2
  38. package/dist-cli/chunks/{chunk-O6P4N2JD.js → chunk-H23KWIKA.js} +2 -2
  39. package/dist-cli/chunks/{chunk-2CXHDTQ5.js → chunk-HT6GFZOZ.js} +1 -1
  40. package/dist-cli/chunks/{chunk-BGRGP3QR.js → chunk-I6KIM6PN.js} +1 -1
  41. package/dist-cli/chunks/{chunk-XRO5WQXP.js → chunk-IZKHOM37.js} +1 -1
  42. package/dist-cli/chunks/{chunk-EVBQDQVY.js → chunk-JHXETDVC.js} +1 -1
  43. package/dist-cli/chunks/{chunk-2JFZ5Z7Q.js → chunk-KLF3K6ZZ.js} +1 -1
  44. package/dist-cli/chunks/{chunk-EFXNSJ55.js → chunk-LN3RNW6X.js} +2 -2
  45. package/dist-cli/chunks/{chunk-TKCGP3DD.js → chunk-M3BNCF7E.js} +2 -2
  46. package/dist-cli/chunks/{chunk-YE3M3YD4.js → chunk-M5QCGLXR.js} +3 -3
  47. package/dist-cli/chunks/{chunk-4WFN4DFR.js → chunk-M6SKQGAN.js} +2 -2
  48. package/dist-cli/chunks/{chunk-R4FQZXJC.js → chunk-MGDSJZ37.js} +2 -2
  49. package/dist-cli/chunks/{chunk-2SFMW5K6.js → chunk-N3UC7HIX.js} +1 -1
  50. package/dist-cli/chunks/{chunk-OSZ5HZSI.js → chunk-NAYLPOC5.js} +2 -2
  51. package/dist-cli/chunks/{chunk-XR4KID25.js → chunk-NM2L2QV4.js} +2 -2
  52. package/dist-cli/chunks/{chunk-67ATAITF.js → chunk-NQFJOCSF.js} +2 -2
  53. package/dist-cli/chunks/{chunk-HIDS3PYC.js → chunk-ONORMKWX.js} +2 -2
  54. package/dist-cli/chunks/{chunk-XXNPISER.js → chunk-ORWP2E7R.js} +2 -2
  55. package/dist-cli/chunks/{chunk-GK7PGYFH.js → chunk-OW5XHAA4.js} +1 -1
  56. package/dist-cli/chunks/{chunk-GZEUDDAW.js → chunk-RYIMSKDO.js} +2 -2
  57. package/dist-cli/chunks/{chunk-X5ZOZVHC.js → chunk-SA6XVI55.js} +1 -1
  58. package/dist-cli/chunks/{chunk-ZTWUNK45.js → chunk-TIAEYO6I.js} +2 -2
  59. package/dist-cli/chunks/{chunk-5VHWQGGF.js → chunk-TTASWLKM.js} +1 -1
  60. package/dist-cli/chunks/{chunk-O2ORLK6W.js → chunk-UCHW7ZHR.js} +2 -2
  61. package/dist-cli/chunks/{chunk-EFL2ASZO.js → chunk-VIND4SP3.js} +1 -1
  62. package/dist-cli/chunks/{chunk-UR345KM3.js → chunk-XJU2QIRY.js} +2 -2
  63. package/dist-cli/chunks/{chunk-W3UIDI3W.js → chunk-XXNLYR64.js} +3 -3
  64. package/dist-cli/chunks/{chunk-25BTVHK2.js → chunk-YCCCPFWT.js} +2 -2
  65. package/dist-cli/chunks/chunk-YGMEDJKJ.js +4 -0
  66. package/dist-cli/chunks/{chunk-FHWZPUGC.js → chunk-YXXKSL6R.js} +1 -1
  67. package/dist-cli/chunks/{chunk-ZCP4CRP6.js → chunk-ZFM24DOX.js} +2 -2
  68. package/dist-cli/chunks/{chunk-EAFKG5R3.js → chunk-ZJIS3CTW.js} +2 -2
  69. package/dist-cli/chunks/{chunk-DQFOHIRF.js → chunk-ZLVRYXZ7.js} +1 -1
  70. package/dist-cli/chunks/{chunk-MR3YPNUI.js → chunk-ZMJ75EDG.js} +2 -2
  71. package/dist-cli/chunks/{cleanup-G4TEYVKY.js → cleanup-KRIATKFH.js} +2 -2
  72. package/dist-cli/chunks/cli-version-SYGNHGFR.js +4 -0
  73. package/dist-cli/chunks/{compat-EZ5NP32J.js → compat-6PTQ3QEA.js} +2 -2
  74. package/dist-cli/chunks/{config-27M2DGCS.js → config-ETGDUANO.js} +2 -2
  75. package/dist-cli/chunks/control-RBTNOLQM.js +4 -0
  76. package/dist-cli/chunks/daemon-N3SC5DK6.js +4 -0
  77. package/dist-cli/chunks/{debug-EXU3D7PC.js → debug-WIIB6ZKC.js} +3 -3
  78. package/dist-cli/chunks/{desktop-SHHPZAWQ.js → desktop-TD7Q5LNB.js} +3 -3
  79. package/dist-cli/chunks/detox-7GNR33VM.js +52 -0
  80. package/dist-cli/chunks/{device-4NI26HG6.js → device-QOR3PGUF.js} +2 -2
  81. package/dist-cli/chunks/{diagnose-P4SFXH6J.js → diagnose-RRCBLP6E.js} +2 -2
  82. package/dist-cli/chunks/{disk-cleanup-BUAKWYMY.js → disk-cleanup-MJUGJPXT.js} +2 -2
  83. package/dist-cli/chunks/drivers-W6E3BZH4.js +4 -0
  84. package/dist-cli/chunks/{film-Y2BAQINB.js → film-D7Y64LID.js} +3 -3
  85. package/dist-cli/chunks/flow-7QAE2V5Y.js +4 -0
  86. package/dist-cli/chunks/help-NLD6KWVG.js +4 -0
  87. package/dist-cli/chunks/{hidden-runtime-alias-U2MAY2XV.js → hidden-runtime-alias-JGURVR2Z.js} +2 -2
  88. package/dist-cli/chunks/{home-paths-PAJMZCOS.js → home-paths-4ICFIGXO.js} +2 -2
  89. package/dist-cli/chunks/inspect-C347BG52.js +4 -0
  90. package/dist-cli/chunks/install-desktop-YR6TWZYK.js +4 -0
  91. package/dist-cli/chunks/{login-D53XKBEO.js → login-RU33QR2G.js} +2 -2
  92. package/dist-cli/chunks/{logout-HZQKLNUJ.js → logout-2IUG3Y5J.js} +2 -2
  93. package/dist-cli/chunks/{maestro-XSS2KX6L.js → maestro-2MXTGG7I.js} +3 -3
  94. package/dist-cli/chunks/{maestro-generate-DNDQX3JQ.js → maestro-generate-2PYIFGLR.js} +3 -3
  95. package/dist-cli/chunks/{mode-LEVGOKI3.js → mode-3DAPG3HF.js} +2 -2
  96. package/dist-cli/chunks/{optional-demo-registry-2XZIJNDG.js → optional-demo-registry-BWSDJF2Z.js} +2 -2
  97. package/dist-cli/chunks/{perf-OKMAXDLB.js → perf-2TKPWB4N.js} +2 -2
  98. package/dist-cli/chunks/{permissions-VG5TBUTN.js → permissions-5CSMHYNA.js} +2 -2
  99. package/dist-cli/chunks/privacy-PWWC2BXO.js +4 -0
  100. package/dist-cli/chunks/{record-BQYGZOMV.js → record-I2HJCFP3.js} +3 -3
  101. package/dist-cli/chunks/{report-issue-HCPZESWE.js → report-issue-A4FZWBOC.js} +2 -2
  102. package/dist-cli/chunks/reset-Y3PBPFYA.js +4 -0
  103. package/dist-cli/chunks/runtime-IC6NVVGA.js +4 -0
  104. package/dist-cli/chunks/{screenshot-command-DWEYPJE7.js → screenshot-command-UFW5BFHP.js} +3 -3
  105. package/dist-cli/chunks/{screenshot-layers-5GMBXLO7.js → screenshot-layers-5BIAL4YN.js} +2 -2
  106. package/dist-cli/chunks/{screenshots-capture-5KCI7IZD.js → screenshots-capture-EHYS3BV2.js} +2 -2
  107. package/dist-cli/chunks/{serve-QNKTA2HR.js → serve-O4FDM3AC.js} +2 -2
  108. package/dist-cli/chunks/setup-Y4QGSJBM.js +4 -0
  109. package/dist-cli/chunks/{skills-DOEALD3X.js → skills-ZK55SY32.js} +2 -2
  110. package/dist-cli/chunks/{state-3HH2IHIF.js → state-KFLAZNEY.js} +2 -2
  111. package/dist-cli/chunks/{storage-E7WUWN3E.js → storage-WP33ISEM.js} +2 -2
  112. package/dist-cli/chunks/store-VEE22CAY.js +4 -0
  113. package/dist-cli/chunks/telemetry-PZV4BISJ.js +4 -0
  114. package/dist-cli/chunks/{timeline-IKNUGQ2A.js → timeline-DKGW5S4I.js} +2 -2
  115. package/dist-cli/chunks/{upgrade-VS3OKXE2.js → upgrade-LL7G4B7G.js} +2 -2
  116. package/dist-cli/chunks/upload-Y4C3YZDK.js +4 -0
  117. package/dist-cli/chunks/{version-F4XHNTBZ.js → version-YLWR5G4F.js} +2 -2
  118. package/dist-cli/chunks/{web-F72724QL.js → web-QELZ4CP6.js} +2 -2
  119. package/dist-cli/chunks/welcome-ZPKA5PZJ.js +5 -0
  120. package/dist-cli/chunks/{what-happened-APK7YKOV.js → what-happened-MIOMZWM5.js} +2 -2
  121. package/dist-lib/agent-daemon-client.cjs +1 -1
  122. package/dist-lib/agent-events.cjs +1 -1
  123. package/dist-lib/agent-identity.cjs +1 -1
  124. package/dist-lib/agent-sessions.cjs +1 -1
  125. package/dist-lib/attached-projects.cjs +1 -1
  126. package/dist-lib/auth/shared-session.cjs +1 -1
  127. package/dist-lib/backend-origin.cjs +1 -1
  128. package/dist-lib/beta.cjs +1 -1
  129. package/dist-lib/beta.mjs +1 -1
  130. package/dist-lib/bridge-constants.cjs +1 -1
  131. package/dist-lib/bridge-contract.cjs +1 -1
  132. package/dist-lib/cli-constants.cjs +1 -1
  133. package/dist-lib/config.cjs +1 -1
  134. package/dist-lib/detox/index.cjs +4 -2
  135. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  136. package/dist-lib/home-paths.cjs +1 -1
  137. package/dist-lib/host/bridge-host.cjs +1 -1
  138. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  139. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  140. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  141. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  142. package/dist-lib/host/websocket-proxy.cjs +1 -1
  143. package/dist-lib/index.cjs +31 -1
  144. package/dist-lib/jump-to-source-babel.cjs +1 -1
  145. package/dist-lib/mcp.cjs +673 -0
  146. package/dist-lib/mcp.mjs +641 -0
  147. package/dist-lib/menu.cjs +1 -1
  148. package/dist-lib/menu.mjs +1 -1
  149. package/dist-lib/metro-production-bundle.cjs +1 -1
  150. package/dist-lib/metro-production-bundle.mjs +1 -1
  151. package/dist-lib/metro.cjs +1 -1
  152. package/dist-lib/profiles.cjs +1 -1
  153. package/dist-lib/public-brand.cjs +1 -1
  154. package/dist-lib/react-native-host-modules.cjs +1 -1
  155. package/dist-lib/react-native-host-modules.mjs +1 -1
  156. package/dist-lib/render-mode.cjs +1 -1
  157. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  158. package/dist-lib/sdk.cjs +31 -1
  159. package/dist-lib/sdk.mjs +31 -1
  160. package/dist-lib/skills.cjs +67 -53
  161. package/dist-lib/vite.cjs +1 -1
  162. package/package.json +7 -1
  163. package/src/app-url.ts +40 -0
  164. package/src/mcp.ts +791 -0
  165. package/src/sim-client.ts +12 -6
  166. package/dist-cli/chunks/chunk-IWPS3EKJ.js +0 -15
  167. package/dist-cli/chunks/chunk-MCHKBFUL.js +0 -4
  168. package/dist-cli/chunks/cli-version-ZM3PVKQ5.js +0 -4
  169. package/dist-cli/chunks/control-4QR43FXV.js +0 -4
  170. package/dist-cli/chunks/daemon-2U4CJ6AT.js +0 -4
  171. package/dist-cli/chunks/detox-RQ6FFSBS.js +0 -52
  172. package/dist-cli/chunks/drivers-OVCUPQTM.js +0 -4
  173. package/dist-cli/chunks/flow-ELTLKKZ3.js +0 -4
  174. package/dist-cli/chunks/help-CDEZAG2L.js +0 -4
  175. package/dist-cli/chunks/inspect-VVQRPJLS.js +0 -4
  176. package/dist-cli/chunks/install-desktop-YXSRKR35.js +0 -4
  177. package/dist-cli/chunks/privacy-MNRHREME.js +0 -4
  178. package/dist-cli/chunks/reset-R4E4W4YI.js +0 -4
  179. package/dist-cli/chunks/runtime-XRQZ7W34.js +0 -4
  180. package/dist-cli/chunks/setup-RNMM5GO5.js +0 -4
  181. package/dist-cli/chunks/store-HUPZUCFG.js +0 -4
  182. package/dist-cli/chunks/telemetry-IJ53XR2Y.js +0 -4
  183. package/dist-cli/chunks/upload-A57NAAHF.js +0 -4
  184. package/dist-cli/chunks/welcome-B72RRMBW.js +0 -5
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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-GK7PGYFH.js";import{o as R}from"./chunk-FHWZPUGC.js";import{a as I}from"./chunk-FIXRGPUT.js";import{a as T}from"./chunk-EVBQDQVY.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-2XZIJNDG.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-OW5XHAA4.js";import{o as R}from"./chunk-YXXKSL6R.js";import{a as I}from"./chunk-5NMCF5VF.js";import{a as T}from"./chunk-JHXETDVC.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-BWSDJF2Z.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.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 i from"node:fs";import r from"node:path";var e=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"],p=["sootsim.config.ts","sootsim.config.js","sootsim.config.mjs","sootsim.config.cjs"];function c(n,t){for(let o of t){let s=r.join(n,o);try{if(i.statSync(s).isFile())return s}catch{}}return null}function f(n){return c(n,e)}function l(n){return c(n,p)}function u(n){let t=r.resolve(n);try{if(!i.statSync(t).isDirectory())return null}catch{return null}let o=l(t);return!o&&!f(t)&&!i.existsSync(r.join(t,"package.json"))?null:{appDir:t,configPath:o}}export{u as a};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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{execFileSync as m,spawn as g}from"child_process";import{existsSync as s,readdirSync as x}from"fs";import{dirname as h,join as c,resolve as a}from"path";import{fileURLToPath as w}from"url";var l;function p(){if(l!==void 0)return l;try{l=h(w(import.meta.resolve("sootsim-engine/package.json")))}catch{l=null}return l}var k="dev.sootsim.simulator";function v(){let e=p();if(!e)return null;let n=c(e,"dist-electron/main.cjs");if(!s(n))return null;let i=P(e);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:e}:null}function I(){let e=p();return e?s(c(e,"src-electron/main.ts")):!1}function P(e){let n=e;for(let i=0;i<6;i++){let r=c(n,"node_modules/.bin/electron");if(s(r))return r;let t=h(n);if(t===n)break;n=t}return null}function b(){let e=p(),i=["/Applications/rnx.app",a(process.env.HOME||"","Applications/rnx.app"),...e?[a(e,"app/rnx.app")]:[]].find(r=>s(r));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let r=m("mdfind",[`kMDItemCFBundleIdentifier == "${k}"`],{encoding:"utf8",timeout:3e3}).trim();if(r)return{path:r.split(`
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 e=["SOOTSIM_AGENT","TM_SESSION","CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","CURSOR_TRACE_ID","AIDER_MODEL"];function n(){if(process.env.SOOTSIM_AGENT==="0")return!1;for(let _ of e){let E=process.env[_];if(E&&E.trim()&&E!=="0")return!0}return!1}export{n as a};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 V}from"./chunk-5AS7S6HY.js";import{P as j,R as M,g as F,j as I,s as U,t as D,u as O}from"./chunk-FHWZPUGC.js";import{a as H}from"./chunk-HIDS3PYC.js";import{a as k}from"./chunk-FIXRGPUT.js";import{execFileSync as J,spawnSync as c}from"child_process";import{existsSync as s,mkdirSync as P,readFileSync as ae,realpathSync as le,rmSync as h,writeFileSync as X}from"fs";import{homedir as v}from"os";import{basename as ue,dirname as C,resolve as u,sep as Q}from"path";import{execFileSync as te}from"child_process";import{chmodSync as re,mkdirSync as A,rmSync as oe,writeFileSync as T}from"fs";import{dirname as _}from"path";var ne="dev.sootsim.daemon",Y="SootSim Daemon",G="0.1.36";function q(e,t,r){let n=D(),o=O(),a=_(_(o)),l=_(o),d=`${a}/Resources`;oe(n,{recursive:!0,force:!0}),A(U(),{recursive:!0}),A(l,{recursive:!0}),A(d,{recursive:!0}),T(`${a}/Info.plist`,se()),T(`${a}/PkgInfo`,"APPL????"),T(o,ie(e,t,r)),re(o,493);try{te("codesign",["--force","--sign","-","--deep",n],{stdio:"pipe"})}catch(i){let f=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${n} failed: ${f}
4
+ import{c as V}from"./chunk-2S7BKUP2.js";import{P as j,R as M,g as F,j as I,s as U,t as D,u as O}from"./chunk-YXXKSL6R.js";import{a as H}from"./chunk-ONORMKWX.js";import{a as k}from"./chunk-5NMCF5VF.js";import{execFileSync as J,spawnSync as c}from"child_process";import{existsSync as s,mkdirSync as P,readFileSync as ae,realpathSync as le,rmSync as h,writeFileSync as X}from"fs";import{homedir as v}from"os";import{basename as ue,dirname as C,resolve as u,sep as Q}from"path";import{execFileSync as te}from"child_process";import{chmodSync as re,mkdirSync as A,rmSync as oe,writeFileSync as T}from"fs";import{dirname as _}from"path";var ne="dev.sootsim.daemon",Y="SootSim Daemon",G="0.1.36";function q(e,t,r){let n=D(),o=O(),a=_(_(o)),l=_(o),d=`${a}/Resources`;oe(n,{recursive:!0,force:!0}),A(U(),{recursive:!0}),A(l,{recursive:!0}),A(d,{recursive:!0}),T(`${a}/Info.plist`,se()),T(`${a}/PkgInfo`,"APPL????"),T(o,ie(e,t,r)),re(o,493);try{te("codesign",["--force","--sign","-","--deep",n],{stdio:"pipe"})}catch(i){let f=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${n} failed: ${f}
5
5
  the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:n,launcherPath:o}}function se(){return`<?xml version="1.0" encoding="UTF-8"?>
6
6
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
7
7
  <plist version="1.0">
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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{q as j,s as A,v as K,w as v}from"./chunk-ZGH5U4AJ.js";import{createHash as Y}from"node:crypto";import{mkdirSync as L,readFileSync as W,readdirSync as Q,unlinkSync as X,writeFileSync as D}from"node:fs";import{dirname as q,extname as Z,resolve as B}from"node:path";function H(t){let e=t[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function U(t,e,n){let o=j(t,{port:e.port}),i=H(o.positional),u=A({...o,commandTimeoutMs:5e3});try{let a=!!(await K(u,"SootSim.bridges.settings.get"))?.[n.modeKey],m=i==="on"?!0:i==="off"?!1:!a;if(a===m)return console.log(` ${n.displayName}: already ${m?"on":"off"}`),{current:a,target:m,changed:!1};if(!await u.send({type:"evaluate",acquireLock:!0,code:`(async () => {
4
+ import{q as j,s as A,v as K,w as v}from"./chunk-GUI3PDH2.js";import{createHash as Y}from"node:crypto";import{mkdirSync as L,readFileSync as W,readdirSync as Q,unlinkSync as X,writeFileSync as D}from"node:fs";import{dirname as q,extname as Z,resolve as B}from"node:path";function H(t){let e=t[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function U(t,e,n){let o=j(t,{port:e.port}),i=H(o.positional),u=A({...o,commandTimeoutMs:5e3});try{let a=!!(await K(u,"SootSim.bridges.settings.get"))?.[n.modeKey],m=i==="on"?!0:i==="off"?!1:!a;if(a===m)return console.log(` ${n.displayName}: already ${m?"on":"off"}`),{current:a,target:m,changed:!1};if(!await u.send({type:"evaluate",acquireLock:!0,code:`(async () => {
5
5
  const modeKey = ${JSON.stringify(n.modeKey)}
6
6
  const target = ${JSON.stringify(m)}
7
7
  window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 jt,c as qt}from"./chunk-DQFOHIRF.js";import{a as Bt,b as Ct}from"./chunk-CYIE65QN.js";import{a as de}from"./chunk-UR345KM3.js";import{k as Dt}from"./chunk-IWPS3EKJ.js";import{a as oe,b as C,c as B,d as Me,e as ae,f as X,g as me,h as ye,i as At,j as Et,k as Ne,l as _t}from"./chunk-52ES4API.js";import{A as Mt,B as Nt,C as Ft,F as Pt,H as Ot,J as pe,K as Rt,Q as We,a as Ie,b as mt,c as ft,d as gt,e as yt,f as ht,g as bt,h as wt,i as xt,j as $t,k as Ce,l as je,r as qe,s as St,t as vt,u as ge,v as kt,w as Te,x as Le,y as It,z as Tt}from"./chunk-622E4JET.js";import{a as Q}from"./chunk-XR4KID25.js";import{e as it,j as at,o as lt,q as ct,s as dt,t as ut,u as pt,v as ce}from"./chunk-ZGH5U4AJ.js";import{a as st}from"./chunk-2JFZ5Z7Q.js";import{c as nt,d as Be,f as rt}from"./chunk-EFL2ASZO.js";import{a as ue}from"./chunk-XRO5WQXP.js";function Je(e){return`(async () => {
4
+ import{b as jt,c as qt}from"./chunk-ZLVRYXZ7.js";import{a as Bt,b as Ct}from"./chunk-A5FXX5PJ.js";import{a as de}from"./chunk-XJU2QIRY.js";import{j as Dt}from"./chunk-7B37IZBN.js";import{a as oe,b as C,c as B,d as Me,e as ae,f as X,g as me,h as ye,i as At,j as Et,k as Ne,l as _t}from"./chunk-3X6IBUBX.js";import{A as Mt,B as Nt,C as Ft,F as Pt,H as Ot,J as pe,K as Rt,Q as We,a as Ie,b as mt,c as ft,d as gt,e as yt,f as ht,g as bt,h as wt,i as xt,j as $t,k as Ce,l as je,r as qe,s as St,t as vt,u as ge,v as kt,w as Te,x as Le,y as It,z as Tt}from"./chunk-DW37EVX5.js";import{a as Q}from"./chunk-NM2L2QV4.js";import{e as it,j as at,o as lt,q as ct,s as dt,t as ut,u as pt,v as ce}from"./chunk-GUI3PDH2.js";import{a as st}from"./chunk-KLF3K6ZZ.js";import{c as nt,d as Be,f as rt}from"./chunk-VIND4SP3.js";import{a as ue}from"./chunk-IZKHOM37.js";function Je(e){return`(async () => {
5
5
  const bridge = globalThis.SootSim && globalThis.SootSim.bridges && globalThis.SootSim.bridges.hotRemount
6
6
  if (!bridge || typeof bridge.reloadExternalApp !== 'function') return false
7
7
  await bridge.reloadExternalApp({ resetStorage: ${e?"true":"false"} })
@@ -559,7 +559,7 @@ import{b as jt,c as qt}from"./chunk-DQFOHIRF.js";import{a as Bt,b as Ct}from"./c
559
559
  `),process.exit(0))}let o=["do","get","debug","wait"].map(n=>Be(n,S)).filter(n=>n!=null).join(`
560
560
 
561
561
  `);console.log(`${o}
562
- `),process.exit(0)}let M=d.wsPort,x=d.simId,_=d.simIdSource,P=d.commandTimeoutMs;if(b==="get"&&p==="diagnosis"){let S=i.indexOf("diagnosis"),o=S>=0?[...i.slice(0,S),...i.slice(S+1)]:i,{runDiagnose:n}=await import("./diagnose-P4SFXH6J.js"),a=await n(["recent",...o],t);process.exitCode=a;return}if(b==="do"&&p==="scan"){let{runCamera:S}=await import("./camera-ZCLFSLON.js");process.exitCode=await S(i,{port:t.port});return}if(p==="list"&&i.some(S=>S==="--drivers"||S==="-D")){let{buildDriverListRows:S}=await import("./drivers-OVCUPQTM.js"),o=S();console.log(` available drivers (${o.length}):
562
+ `),process.exit(0)}let M=d.wsPort,x=d.simId,_=d.simIdSource,P=d.commandTimeoutMs;if(b==="get"&&p==="diagnosis"){let S=i.indexOf("diagnosis"),o=S>=0?[...i.slice(0,S),...i.slice(S+1)]:i,{runDiagnose:n}=await import("./diagnose-RRCBLP6E.js"),a=await n(["recent",...o],t);process.exitCode=a;return}if(b==="do"&&p==="scan"){let{runCamera:S}=await import("./camera-4JHCYBQS.js");process.exitCode=await S(i,{port:t.port});return}if(p==="list"&&i.some(S=>S==="--drivers"||S==="-D")){let{buildDriverListRows:S}=await import("./drivers-W6E3BZH4.js"),o=S();console.log(` available drivers (${o.length}):
563
563
  `);let n=Math.max(...o.map(l=>l.id.length),6),a=Math.max(...o.map(l=>l.kind.length),4);for(let l of o){let u=l.available?"\u2713":"\u2717",m=l.id.padEnd(n),f=l.kind.padEnd(a);console.log(` ${u} ${m} ${f} ${l.description}`),l.available&&l.detail?console.log(` ${l.detail}`):!l.available&&l.reason&&console.log(` unavailable: ${l.reason}`)}return}let c=dt(d),D=x||"default",R=new Set(["errors","warnings","requests","js","reload","globals","perf","storage-clear","list","wait","sleep"]),E=200;function J(S){let o=S.replace(/\s+/g," ").trim();if(!o)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(o)){let a=/<title[^>]*>([^<]+)<\/title>/i.exec(S)?.[1]?.trim(),l=/<body[^>]*>([\s\S]*?)<\//i.exec(S)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),u=a||l||"html error page";return`<html ${S.length}B> "${u}" (body elided \u2014 add --json for the full payload)`}return o.length<=E?o:`${o.slice(0,E)}\u2026 (+${o.length-E} more bytes)`}function U(S){let o=S.displayUrl||S.url;return S.status!=null?`${S.method} ${o} -> ${S.status}${S.statusText?` ${S.statusText}`:""}`:S.error?`${S.method} ${o} -> ${S.error}`:`${S.method} ${o}`}async function T(S){let o=ue()?400:200;try{let{settled:n,elapsed:a}=await se({bridge:S,maxMs:o,pollMs:32,stablePolls:2});n||process.stderr.write(` \u26A0 auto-wait timed out after ${a??o}ms \u2014 next command may see mid-animation state. use \`rnx do settle\` for a longer wait.
564
564
  `)}catch{}}function O(S,o){if(o.result?.reason==="offscreen"){let{x:n,y:a,screen:l}=o.result;console.error(` tap failed: ${S} resolved to (${Math.round(n)},${Math.round(a)}), outside the ${l?.width}x${l?.height} screen`),console.error(" the node exists but is scrolled out of view \u2014 scroll it on-screen first (rnx do scroll / swipe), then tap.");return}console.error(` tap failed: ${S} stayed visible but did not receive a hittable press after ${o.attempts} attempt${o.attempts===1?"":"s"}`),o.result&&console.error(` last result: ${JSON.stringify(o.result)}`)}async function H(){try{return await c.send({type:"evaluate",code:`(() => ({
565
565
  console: ${Te},
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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{l as n}from"./chunk-W3UIDI3W.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
4
+ import{l as n}from"./chunk-XXNLYR64.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
5
5
  `)}export{g as a};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as r}from"./chunk-EFL2ASZO.js";var i=[{title:"Overview",route:"/docs/rnx/cli"},...r.slice().sort((o,t)=>o.order-t.order).map(o=>({title:o.navTitle,route:`/docs/rnx/cli/${o.slug}`}))];
4
+ import{a as r}from"./chunk-VIND4SP3.js";var i=[{title:"Overview",route:"/docs/rnx/cli"},...r.slice().sort((o,t)=>o.order-t.order).map(o=>({title:o.navTitle,route:`/docs/rnx/cli/${o.slug}`}))];
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 f="\x1B[0m",p="\x1B[1m",a="\x1B[2m",m="\x1B[38;2;42;95;255m",x="\x1B[38;5;84m",d="\x1B[38;5;203m";function c(n,t){return!process.stdout.isTTY||process.env.NO_COLOR!==void 0?t:`${n}${t}${f}`}function s(n){return c(m,n)}function u(n){return c(p,n)}function i(n){return c(a,n)}function w(n){return c(x,n)}function h(n){return c(d,n)}function v(n){console.log(),console.log(` ${s("\u25E4\u25E2")} ${u("rnx")}`),n&&console.log(` ${i(n)}`)}function y(n,t){console.log(`
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 k}from"./chunk-BGRGP3QR.js";import{a as v,b as $,c as g,d as y,e as h,h as S,i as T}from"./chunk-2SFMW5K6.js";import{spawn as E,spawnSync as u}from"child_process";import{chmodSync as M,copyFileSync as O,createWriteStream as A,existsSync as f,mkdirSync as D,rmSync as w,statSync as I,unlinkSync as L}from"fs";import{tmpdir as C}from"os";import{dirname as R,join as m,resolve as P}from"path";var b="https://contrast.dev/api/electron-release";function B(){let r=process.arch;if(process.platform==="darwin"){let t=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${t}.dmg`;return{platform:t,filename:n,url:`${b}/${n}`,install:W}}if(process.platform==="linux"){let t=r==="arm64"?"linux-arm64":"linux-x64",n=`sootsim-latest-${t}.AppImage`;return{platform:t,filename:n,url:`${b}/${n}`,install:Y}}if(process.platform==="win32"){let t="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:t,url:`${b}/${t}`,install:_}}return null}async function F({url:r,dest:t,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`${s.status} ${s.statusText} (${r})`);let o=s.headers.get("content-length"),i=o?Number(o):null;if(!s.body)throw new Error(`empty response body (${r})`);D(R(t),{recursive:!0});let a=A(t),p=s.body.getReader(),c=0;try{for(;;){let{done:e,value:l}=await p.read();if(e)break;a.write(Buffer.from(l)),c+=l.byteLength,n?.(c,i)}}finally{await new Promise((e,l)=>{a.end(d=>d?l(d):e())})}}function N(r,t){let n=(r/1048576).toFixed(1);if(!t)return` ${n} MB`;let s=Math.min(100,Math.round(r/t*100)),o=(t/(1024*1024)).toFixed(1),i=24,a=Math.round(s/100*i);return` ${v("\u2588".repeat(a))+g("\u2591".repeat(i-a))} ${s}% ${n} / ${o} MB`}async function W(r){let t=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(t.status!==0)throw new Error(`hdiutil attach failed: ${t.stderr||t.stdout}`.trim());let n=t.stdout.trim().split(`
4
+ import{a as k}from"./chunk-I6KIM6PN.js";import{a as v,b as $,c as g,d as y,e as h,h as S,i as T}from"./chunk-N3UC7HIX.js";import{spawn as E,spawnSync as u}from"child_process";import{chmodSync as M,copyFileSync as O,createWriteStream as A,existsSync as f,mkdirSync as D,rmSync as w,statSync as I,unlinkSync as L}from"fs";import{tmpdir as C}from"os";import{dirname as R,join as m,resolve as P}from"path";var b="https://contrast.dev/api/electron-release";function B(){let r=process.arch;if(process.platform==="darwin"){let t=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${t}.dmg`;return{platform:t,filename:n,url:`${b}/${n}`,install:W}}if(process.platform==="linux"){let t=r==="arm64"?"linux-arm64":"linux-x64",n=`sootsim-latest-${t}.AppImage`;return{platform:t,filename:n,url:`${b}/${n}`,install:Y}}if(process.platform==="win32"){let t="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:t,url:`${b}/${t}`,install:_}}return null}async function F({url:r,dest:t,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`${s.status} ${s.statusText} (${r})`);let o=s.headers.get("content-length"),i=o?Number(o):null;if(!s.body)throw new Error(`empty response body (${r})`);D(R(t),{recursive:!0});let a=A(t),p=s.body.getReader(),c=0;try{for(;;){let{done:e,value:l}=await p.read();if(e)break;a.write(Buffer.from(l)),c+=l.byteLength,n?.(c,i)}}finally{await new Promise((e,l)=>{a.end(d=>d?l(d):e())})}}function N(r,t){let n=(r/1048576).toFixed(1);if(!t)return` ${n} MB`;let s=Math.min(100,Math.round(r/t*100)),o=(t/(1024*1024)).toFixed(1),i=24,a=Math.round(s/100*i);return` ${v("\u2588".repeat(a))+g("\u2591".repeat(i-a))} ${s}% ${n} / ${o} MB`}async function W(r){let t=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(t.status!==0)throw new Error(`hdiutil attach failed: ${t.stderr||t.stdout}`.trim());let n=t.stdout.trim().split(`
5
5
  `),o=n[n.length-1].split(" ").pop()?.trim();if(!o||!f(o))throw new Error(`could not determine dmg mount point (output: ${t.stdout})`);let i=m(o,"rnx.app");if(!f(i))throw u("hdiutil",["detach","-force",o]),new Error(`rnx.app not found inside ${o}`);let a="/Applications",p=P(process.env.HOME||"","Applications"),c=a;try{let x=m(a,`.sootsim-write-probe-${process.pid}`);u("touch",[x]),f(x)?w(x,{force:!0}):c=p}catch{c=p}c===p&&D(c,{recursive:!0});let e=m(c,"rnx.app");f(e)&&w(e,{recursive:!0,force:!0});let l=u("cp",["-R",i,e]),d=u("hdiutil",["detach","-force",o]);if(l.status!==0)throw new Error(`copy to ${e} failed: ${l.stderr?.toString()||""}`.trim());return d.status!==0&&console.warn(` warning: failed to unmount ${o} (${d.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",e]),e}async function Y(r){let t=P(process.env.HOME||"","Applications");D(t,{recursive:!0});let n=m(t,"rnx.AppImage");return f(n)&&w(n,{force:!0}),O(r,n),L(r),M(n,493),n}async function _(r){await new Promise((n,s)=>{let o=E("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});o.once("error",s),o.once("exit",i=>{i===0?n():s(new Error(`installer exited with code ${i}`))})});let t=k();if(!t)throw new Error("the installer finished but the rnx application was not registered");return t.path}async function Q(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
6
6
  rnx desktop install
7
7
 
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 f}from"./chunk-ZGH5U4AJ.js";import{existsSync as m,mkdirSync as g,readFileSync as h,writeFileSync as S,rmSync as F}from"fs";import{tmpdir as y}from"os";import{dirname as b,join as p}from"path";var w=new Map;function o(e,n){w.set(e,n)}var s=1;function a(){return p(y(),`sootsim-cli-hints-${f()}.json`)}function d(){return p(y(),"sootsim-cli-hints-global.json")}function u(e){if(!m(e))return{version:s,shown:{}};try{let n=JSON.parse(h(e,"utf8"));return n?.version!==s||!n?.shown?{version:s,shown:{}}:n}catch{return{version:s,shown:{}}}}function l(e,n){try{g(b(e),{recursive:!0}),S(e,JSON.stringify(n)+`
4
+ import{e as f}from"./chunk-GUI3PDH2.js";import{existsSync as m,mkdirSync as g,readFileSync as h,writeFileSync as S,rmSync as F}from"fs";import{tmpdir as y}from"os";import{dirname as b,join as p}from"path";var w=new Map;function o(e,n){w.set(e,n)}var s=1;function a(){return p(y(),`sootsim-cli-hints-${f()}.json`)}function d(){return p(y(),"sootsim-cli-hints-global.json")}function u(e){if(!m(e))return{version:s,shown:{}};try{let n=JSON.parse(h(e,"utf8"));return n?.version!==s||!n?.shown?{version:s,shown:{}}:n}catch{return{version:s,shown:{}}}}function l(e,n){try{g(b(e),{recursive:!0}),S(e,JSON.stringify(n)+`
5
5
  `)}catch{}}function v(){let e=(process.env.SOOTSIM_HINTS||"").toLowerCase();return e==="off"||e==="0"||e==="false"?"off":e==="always"||e==="verbose"?"always":"normal"}function x(e,n){let i=v();if(i==="off")return!1;if(i==="always"||n==="always")return!0;let t=Date.now();if(n==="once-per-identity"){let r=u(a());return r.shown[e]?!1:(r.shown[e]=t,l(a(),r),!0)}if(n==="once-ever"){let r=u(d());return r.shown[e]?!1:(r.shown[e]=t,l(d(),r),!0)}if(typeof n=="object"&&"cooldownMs"in n){let r=u(a()),c=r.shown[e]??0;return t-c<n.cooldownMs?!1:(r.shown[e]=t,l(a(),r),!0)}return!0}function A(e,...n){let i=w.get(e);if(!i)return process.env.SOOTSIM_HINTS_DEBUG&&console.error(` [hints] no hint registered for id "${e}"`),!1;if(!x(e,i.frequency))return!1;let t=i.render(...n);if(t==null)return!1;let r=Array.isArray(t)?t:[t];for(let c of r)console.error(` hint: ${c}`);return!0}o("app-still-loading",{frequency:{cooldownMs:6e4},render:e=>`app may still be loading (${e} nodes). run \`rnx wait ready\` first.`});o("wait-selector-for-missing-testid",{frequency:"once-per-identity",render:e=>`rnx wait selector ${e}`});o("prefer-cli-over-eval",{frequency:"once-per-identity",render:e=>e.length?["try the CLI shortcut instead:",...e.map(n=>` ${n}`)]:null});o("describe-use-filters",{frequency:"once-per-identity",render:()=>["describe output is long. narrow it with:"," rnx describe --only '*Bottom Sheet*'"," rnx describe --testid-like 'swap-*'"," rnx describe --subtree <testID>"]});o("describe-filter-context",{frequency:"once-per-identity",render:()=>["filtered describe is search output, not current-route proof.","run `rnx describe` without filters after navigation; clipped nodes are marked `(clipped:...)`."]});o("subtree-root-not-found",{frequency:"always",render:e=>`no node with testID/id "${e}" \u2014 try \`rnx find --testid ${e}\` to discover available ids.`});o("clean-uninstall",{frequency:"once-ever",render:()=>["to remove the background daemon and all ~/.sootsim data, run `rnx daemon uninstall`.","the optional desktop app and its macOS preference plist are separate from the daemon."]});export{A as a};
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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{L as m,o as P,q as a}from"./chunk-FHWZPUGC.js";import l from"fs";import c from"path";var s="default",S="profiles.json",i=1;function o(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function d(){return c.join(a(),S)}function I(e){return`sootsim-profile-${o(e)}`}function h(e){return c.join(P(),"Partitions",I(e))}function A(e){return c.join(a(),"playwright",o(e))}function u(){try{let e=JSON.parse(l.readFileSync(d(),"utf8"));if(!e||e.version!==i)return{version:i,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:o(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:i,profiles:r}}catch{return{version:i,profiles:[]}}}function x(e){return[...e].sort((r,t)=>r.id===s?-1:t.id===s?1:r.id.localeCompare(t.id))}function p(e){if(e.profiles.some(t=>t.id===s))return{...e,profiles:x(e.profiles)};let r=new Date().toISOString();return{version:i,profiles:x([{id:s,createdAt:r,updatedAt:r},...e.profiles])}}function g(e){m();let r=p(e),t=`${d()}.tmp`;return l.writeFileSync(t,`${JSON.stringify(r,null,2)}
4
+ import{L as m,o as P,q as a}from"./chunk-YXXKSL6R.js";import l from"fs";import c from"path";var s="default",S="profiles.json",i=1;function o(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function d(){return c.join(a(),S)}function I(e){return`sootsim-profile-${o(e)}`}function h(e){return c.join(P(),"Partitions",I(e))}function A(e){return c.join(a(),"playwright",o(e))}function u(){try{let e=JSON.parse(l.readFileSync(d(),"utf8"));if(!e||e.version!==i)return{version:i,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:o(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:i,profiles:r}}catch{return{version:i,profiles:[]}}}function x(e){return[...e].sort((r,t)=>r.id===s?-1:t.id===s?1:r.id.localeCompare(t.id))}function p(e){if(e.profiles.some(t=>t.id===s))return{...e,profiles:x(e.profiles)};let r=new Date().toISOString();return{version:i,profiles:x([{id:s,createdAt:r,updatedAt:r},...e.profiles])}}function g(e){m();let r=p(e),t=`${d()}.tmp`;return l.writeFileSync(t,`${JSON.stringify(r,null,2)}
5
5
  `,"utf8"),l.renameSync(t,d()),r}function y(){return g(u()).profiles}function E(e){let r=o(e);return y().find(t=>t.id===r)??null}function _(e=s){let r=o(e),t=E(r);return t||D(r)}function D(e){let r=o(e),t=p(u());if(t.profiles.some(w=>w.id===r))throw new Error(`profile already exists: ${r}`);let f=new Date().toISOString(),n={id:r,createdAt:f,updatedAt:f};return g({version:i,profiles:[...t.profiles,n]}),n}function F(e){let r=o(e);if(r===s)throw new Error("the default profile cannot be deleted; clear it instead");let t=p(u()),f=t.profiles.find(n=>n.id===r);if(!f)throw new Error(`profile not found: ${r}`);return g({version:i,profiles:t.profiles.filter(n=>n.id!==r)}),v(r),f}function v(e){let r=o(e);for(let t of[h(r),A(r)])try{l.rmSync(t,{recursive:!0,force:!0})}catch{}}export{A as a,y as b,_ as c,D as d,F as e,v as f};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as t}from"./chunk-FIXRGPUT.js";import{readFileSync as a}from"node:fs";import{fileURLToPath as n}from"node:url";var r=null;function f(){if(r!=null)return r;let o=[()=>n(import.meta.resolve(`${t.packageName}/package.json`)),()=>n(new URL("../package.json",import.meta.url))];for(let i of o)try{let e=JSON.parse(a(i(),"utf8")).version;if(typeof e=="string"&&e)return r=e,r}catch{}return r="0.0.0",r}export{f as a};
4
+ import{a as t}from"./chunk-5NMCF5VF.js";import{readFileSync as a}from"node:fs";import{fileURLToPath as n}from"node:url";var r=null;function f(){if(r!=null)return r;let o=[()=>n(import.meta.resolve(`${t.packageName}/package.json`)),()=>n(new URL("../package.json",import.meta.url))];for(let i of o)try{let e=JSON.parse(a(i(),"utf8")).version;if(typeof e=="string"&&e)return r=e,r}catch{}return r="0.0.0",r}export{f as a};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 k}from"./chunk-2CXHDTQ5.js";import{createHash as L}from"node:crypto";import{createRequire as j}from"node:module";var P=/(^|\/)expo-splash-screen$/,w=/(^|\/)react-native-bootsplash$/;function A(n,e){let r=e.replace(/\/+$/,""),t=n.replace(/^\.\//,"").replace(/^\/+/,"");if(t)return`${r}/assets/${t}`}function d(n,e,r){return r?r(n):A(n,e)}function y(n){if(n==="cover")return"cover";if(n==="contain"||n==="native")return"contain"}function c(n){return typeof n=="string"&&n.length>0?n:void 0}function S(n){return typeof n=="number"&&Number.isFinite(n)?n:void 0}function R(n,e,r){if(!n||typeof n!="object")return null;let t=n,o={source:"expo-splash-screen",backgroundColor:c(t.backgroundColor)??"#ffffff"},i=c(t.image);i&&(o.imageUrl=d(i,e,r));let s=S(t.imageWidth);s!=null&&(o.imageWidthPx=s);let l=y(t.resizeMode);l&&(o.resizeMode=l);let p=t.dark;if(p&&typeof p=="object"){let u=p,g=c(u.backgroundColor),f=c(u.image);(g||f)&&(o.dark={},g&&(o.dark.backgroundColor=g),f&&(o.dark.imageUrl=d(f,e,r)))}return o}function O(n,e,r,t){let a=n[e],o=a&&typeof a=="object"?a.splash:void 0,i=n.splash,s=o&&typeof o=="object"?o:i;if(!s||typeof s!="object")return null;let p={source:"expo-legacy",backgroundColor:c(s.backgroundColor)??"#ffffff",imageWidthPx:S(s.imageWidth)??200,resizeMode:y(s.resizeMode)??"contain"},u=c(s.image);u&&(p.imageUrl=d(u,r,t));let g=s.dark;if(g&&typeof g=="object"){let f=g,m=c(f.backgroundColor),h=c(f.image);(m||h)&&(p.dark={},m&&(p.dark.backgroundColor=m),h&&(p.dark.imageUrl=d(h,r,t)))}return p}function v(n,e,r){if(!n||typeof n!="object")return null;let t=n,a=c(t.logo);if(!a)return null;let o={source:"react-native-bootsplash",backgroundColor:c(t.background)??"#fff",imageUrl:d(a,e,r),imageWidthPx:S(t.logoWidth)??100,resizeMode:"contain"},i=c(t.darkBackground),s=c(t.darkLogo);return(i||s)&&(o.dark={},i&&(o.dark.backgroundColor=i),s&&(o.dark.imageUrl=d(s,e,r))),o}function C(n,e,r,t={}){if(!n||typeof n!="object")return null;let a=n,o=a.plugins,i=null,s=null;if(Array.isArray(o))for(let l of o){let p=Array.isArray(l)?l[0]:l;if(typeof p!="string")continue;let u=Array.isArray(l)?l[1]??{}:{};!i&&P.test(p)?i=R(u,r,t.resolveAssetUrl):!s&&w.test(p)&&(s=v(u,r,t.resolveAssetUrl))}return s||i||O(a,e,r,t.resolveAssetUrl)}var b=j(import.meta.url);function E(n){try{let e=new URL(n),r=e.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return e.origin}catch{}return null}function G(n){let e=E(n.bundleUrl);if(!e)return null;let t=k(n.projectDir)?.appDir??null;if(!t)return null;let a=(n.platform||process.env.CONTRAST_PLATFORM||"ios").toLowerCase(),o=null;try{let s=b.resolve("@expo/config",{paths:[t]}),l=b(s);typeof l.getConfig=="function"&&(o=l.getConfig)}catch{}if(!o)return null;let i;try{let s=o(t,{skipSDKVersionRequirement:!0});s?.exp&&typeof s.exp=="object"&&(i=s.exp)}catch{}return!i||typeof i!="object"?null:C(i,a==="android"?"android":"ios",e)}function q(n){return encodeURIComponent(JSON.stringify(n))}function z(n){if(!n)return null;try{let e=JSON.parse(decodeURIComponent(n));if(!e||typeof e!="object")return null;let r=e;return r.source!=="expo-splash-screen"&&r.source!=="expo-legacy"&&r.source!=="react-native-bootsplash"||typeof r.backgroundColor!="string"?null:e}catch{return null}}function I(n){let e=new Set;return n.imageUrl&&e.add(n.imageUrl),n.dark?.imageUrl&&e.add(n.dark.imageUrl),[...e]}function M(n){let e=(n.split("?")[0].split(".").pop()||"").toLowerCase();return e==="png"?"image/png":e==="jpg"||e==="jpeg"?"image/jpeg":e==="webp"?"image/webp":e==="gif"?"image/gif":e==="svg"?"image/svg+xml":"application/octet-stream"}async function H(n,e){let r=z(n);if(!r)return[];let t=[],a=new Set;for(let o of I(r)){let i=L("sha256").update(o).digest("hex");if(!a.has(i)){a.add(i);try{let s=await fetch(o);if(!s.ok){e?.onError?.(o,new Error(`${s.status} ${s.statusText}`));continue}let l=new Uint8Array(await s.arrayBuffer());t.push({url:o,urlhash:i,contentType:M(o),bytes:l}),e?.onStaged?.({url:o,byteLength:l.byteLength})}catch(s){e?.onError?.(o,s)}}}return t}import{spawn as D}from"child_process";function U(n,e={}){if(!n)throw new Error("openUrl requires a url");let r=e.platform??process.platform;return r==="darwin"?{command:"open",args:e.background===!1?[n]:["-g",n],via:"system"}:r==="win32"?{command:"cmd",args:["/c","start","",n],via:"system"}:{command:"xdg-open",args:[n],via:"system"}}async function W(n,e,r){return new Promise((t,a)=>{let o=D(n,e,{detached:r,stdio:"ignore"});o.once("error",a),o.once("spawn",()=>{r&&o.unref(),t(o.pid)})})}async function x(n,e={}){let r=U(n,e),t=await W(r.command,r.args,e.detached??!0);return{...r,pid:t,attachUrl:n}}async function F(n,e={}){await x(n,e)}export{G as a,q as b,H as c,F as d};
4
+ import{a as k}from"./chunk-HT6GFZOZ.js";import{createHash as L}from"node:crypto";import{createRequire as j}from"node:module";var P=/(^|\/)expo-splash-screen$/,w=/(^|\/)react-native-bootsplash$/;function A(n,e){let r=e.replace(/\/+$/,""),t=n.replace(/^\.\//,"").replace(/^\/+/,"");if(t)return`${r}/assets/${t}`}function d(n,e,r){return r?r(n):A(n,e)}function y(n){if(n==="cover")return"cover";if(n==="contain"||n==="native")return"contain"}function c(n){return typeof n=="string"&&n.length>0?n:void 0}function S(n){return typeof n=="number"&&Number.isFinite(n)?n:void 0}function R(n,e,r){if(!n||typeof n!="object")return null;let t=n,o={source:"expo-splash-screen",backgroundColor:c(t.backgroundColor)??"#ffffff"},i=c(t.image);i&&(o.imageUrl=d(i,e,r));let s=S(t.imageWidth);s!=null&&(o.imageWidthPx=s);let l=y(t.resizeMode);l&&(o.resizeMode=l);let p=t.dark;if(p&&typeof p=="object"){let u=p,g=c(u.backgroundColor),f=c(u.image);(g||f)&&(o.dark={},g&&(o.dark.backgroundColor=g),f&&(o.dark.imageUrl=d(f,e,r)))}return o}function O(n,e,r,t){let a=n[e],o=a&&typeof a=="object"?a.splash:void 0,i=n.splash,s=o&&typeof o=="object"?o:i;if(!s||typeof s!="object")return null;let p={source:"expo-legacy",backgroundColor:c(s.backgroundColor)??"#ffffff",imageWidthPx:S(s.imageWidth)??200,resizeMode:y(s.resizeMode)??"contain"},u=c(s.image);u&&(p.imageUrl=d(u,r,t));let g=s.dark;if(g&&typeof g=="object"){let f=g,m=c(f.backgroundColor),h=c(f.image);(m||h)&&(p.dark={},m&&(p.dark.backgroundColor=m),h&&(p.dark.imageUrl=d(h,r,t)))}return p}function v(n,e,r){if(!n||typeof n!="object")return null;let t=n,a=c(t.logo);if(!a)return null;let o={source:"react-native-bootsplash",backgroundColor:c(t.background)??"#fff",imageUrl:d(a,e,r),imageWidthPx:S(t.logoWidth)??100,resizeMode:"contain"},i=c(t.darkBackground),s=c(t.darkLogo);return(i||s)&&(o.dark={},i&&(o.dark.backgroundColor=i),s&&(o.dark.imageUrl=d(s,e,r))),o}function C(n,e,r,t={}){if(!n||typeof n!="object")return null;let a=n,o=a.plugins,i=null,s=null;if(Array.isArray(o))for(let l of o){let p=Array.isArray(l)?l[0]:l;if(typeof p!="string")continue;let u=Array.isArray(l)?l[1]??{}:{};!i&&P.test(p)?i=R(u,r,t.resolveAssetUrl):!s&&w.test(p)&&(s=v(u,r,t.resolveAssetUrl))}return s||i||O(a,e,r,t.resolveAssetUrl)}var b=j(import.meta.url);function E(n){try{let e=new URL(n),r=e.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return e.origin}catch{}return null}function G(n){let e=E(n.bundleUrl);if(!e)return null;let t=k(n.projectDir)?.appDir??null;if(!t)return null;let a=(n.platform||process.env.CONTRAST_PLATFORM||"ios").toLowerCase(),o=null;try{let s=b.resolve("@expo/config",{paths:[t]}),l=b(s);typeof l.getConfig=="function"&&(o=l.getConfig)}catch{}if(!o)return null;let i;try{let s=o(t,{skipSDKVersionRequirement:!0});s?.exp&&typeof s.exp=="object"&&(i=s.exp)}catch{}return!i||typeof i!="object"?null:C(i,a==="android"?"android":"ios",e)}function q(n){return encodeURIComponent(JSON.stringify(n))}function z(n){if(!n)return null;try{let e=JSON.parse(decodeURIComponent(n));if(!e||typeof e!="object")return null;let r=e;return r.source!=="expo-splash-screen"&&r.source!=="expo-legacy"&&r.source!=="react-native-bootsplash"||typeof r.backgroundColor!="string"?null:e}catch{return null}}function I(n){let e=new Set;return n.imageUrl&&e.add(n.imageUrl),n.dark?.imageUrl&&e.add(n.dark.imageUrl),[...e]}function M(n){let e=(n.split("?")[0].split(".").pop()||"").toLowerCase();return e==="png"?"image/png":e==="jpg"||e==="jpeg"?"image/jpeg":e==="webp"?"image/webp":e==="gif"?"image/gif":e==="svg"?"image/svg+xml":"application/octet-stream"}async function H(n,e){let r=z(n);if(!r)return[];let t=[],a=new Set;for(let o of I(r)){let i=L("sha256").update(o).digest("hex");if(!a.has(i)){a.add(i);try{let s=await fetch(o);if(!s.ok){e?.onError?.(o,new Error(`${s.status} ${s.statusText}`));continue}let l=new Uint8Array(await s.arrayBuffer());t.push({url:o,urlhash:i,contentType:M(o),bytes:l}),e?.onStaged?.({url:o,byteLength:l.byteLength})}catch(s){e?.onError?.(o,s)}}}return t}import{spawn as D}from"child_process";function U(n,e={}){if(!n)throw new Error("openUrl requires a url");let r=e.platform??process.platform;return r==="darwin"?{command:"open",args:e.background===!1?[n]:["-g",n],via:"system"}:r==="win32"?{command:"cmd",args:["/c","start","",n],via:"system"}:{command:"xdg-open",args:[n],via:"system"}}async function W(n,e,r){return new Promise((t,a)=>{let o=D(n,e,{detached:r,stdio:"ignore"});o.once("error",a),o.once("spawn",()=>{r&&o.unref(),t(o.pid)})})}async function x(n,e={}){let r=U(n,e),t=await W(r.command,r.args,e.detached??!0);return{...r,pid:t,attachUrl:n}}async function F(n,e={}){await x(n,e)}export{G as a,q as b,H as c,F as d};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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,4 +1,4 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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-MRNW4GVL.js";import{M as u,l}from"./chunk-FHWZPUGC.js";import r from"fs";import e from"path";import{fileURLToPath as m}from"url";var s;function p(){if(s!==void 0)return s;let t=e.dirname(m(import.meta.url));for(let n=0;n<12&&t!==e.dirname(t);n++){if(r.existsSync(e.join(t,"packages/sootsim-engine/package.json"))&&r.existsSync(e.join(t,"public/sootsim")))return s=t,t;t=e.dirname(t)}return s=null,null}function d(){if(process.env.SOOTSIM_HOME&&u())return null;let t=p();if(!t)return null;let n=e.join(t,"public/sootsim");return r.existsSync(e.join(n,"index.html"))&&r.existsSync(e.join(n,"engine/index.html"))&&r.existsSync(e.join(n,"engine-tenant/worker.js"))?n:null}function g(){let t=d();if(t)return t;let n=u();if(!n)return null;let o=l(n);return r.existsSync(e.join(o,"index.html"))?o:null}var a=".runtime.localhost";function y(t){let n=t.trim();if(!c(n))throw new Error(`invalid rnx runtime version: ${t}`);let i=Buffer.from(n,"utf8").toString("hex").match(/.{1,60}/g);if(!i)throw new Error(`invalid rnx runtime version: ${t}`);return`${i.join(".")}${a}`}function f(t){return t.toLowerCase().endsWith(a)}function x(t){if(!f(t))return null;let n=t.slice(0,-a.length).split(".");if(n.length===0||n.some(i=>!/^[0-9a-f]{1,60}$/i.test(i)))return null;let o=n.join("");if(o.length%2!==0)return null;try{let i=Buffer.from(o,"hex").toString("utf8");return c(i)?i:null}catch{return null}}function S(t){let n=l(t);return r.existsSync(e.join(n,"index.html"))?n:null}function M(t){if(!f(t))return g();let n=x(t);return n?S(n):null}export{d as a,y as b,f as c,x as d,M as e};
4
+ import{a as c}from"./chunk-77ZHQJZR.js";import{M as u,l}from"./chunk-YXXKSL6R.js";import r from"fs";import e from"path";import{fileURLToPath as m}from"url";var s;function p(){if(s!==void 0)return s;let t=e.dirname(m(import.meta.url));for(let n=0;n<12&&t!==e.dirname(t);n++){if(r.existsSync(e.join(t,"packages/sootsim-engine/package.json"))&&r.existsSync(e.join(t,"public/sootsim")))return s=t,t;t=e.dirname(t)}return s=null,null}function d(){if(process.env.SOOTSIM_HOME&&u())return null;let t=p();if(!t)return null;let n=e.join(t,"public/sootsim");return r.existsSync(e.join(n,"index.html"))&&r.existsSync(e.join(n,"engine/index.html"))&&r.existsSync(e.join(n,"engine-tenant/worker.js"))?n:null}function g(){let t=d();if(t)return t;let n=u();if(!n)return null;let o=l(n);return r.existsSync(e.join(o,"index.html"))?o:null}var a=".runtime.localhost";function y(t){let n=t.trim();if(!c(n))throw new Error(`invalid rnx runtime version: ${t}`);let i=Buffer.from(n,"utf8").toString("hex").match(/.{1,60}/g);if(!i)throw new Error(`invalid rnx runtime version: ${t}`);return`${i.join(".")}${a}`}function f(t){return t.toLowerCase().endsWith(a)}function x(t){if(!f(t))return null;let n=t.slice(0,-a.length).split(".");if(n.length===0||n.some(i=>!/^[0-9a-f]{1,60}$/i.test(i)))return null;let o=n.join("");if(o.length%2!==0)return null;try{let i=Buffer.from(o,"hex").toString("utf8");return c(i)?i:null}catch{return null}}function S(t){let n=l(t);return r.existsSync(e.join(n,"index.html"))?n:null}function M(t){if(!f(t))return g();let n=x(t);return n?S(n):null}export{d as a,y as b,f as c,x as d,M as e};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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-52ES4API.js";import{q as l,s as i}from"./chunk-ZGH5U4AJ.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-3X6IBUBX.js";import{q as l,s as i}from"./chunk-GUI3PDH2.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.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (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 a=["Cache","Code Cache","DawnCache","DawnGraphiteCache","DawnWebGPUCache","GPUCache","GrShaderCache","ShaderCache"],r=new Set(a);function s(e){return r.has(e)}export{a,s as b};
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.366 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{o as d}from"./chunk-FHWZPUGC.js";import{chmodSync as S,existsSync as f,mkdirSync as A,readFileSync as k,rmSync as o,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,isAdmin:e.isAdmin===!0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",i=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:i,validatedAt:h}}function b(){let t=a();if(!f(t))return null;try{let e=JSON.parse(k(t,"utf8")),r=v(e);return r||(o(t,{force:!0}),null)}catch{return o(t,{force:!0}),null}}function O(t){let e=a();A(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
4
+ import{o as d}from"./chunk-YXXKSL6R.js";import{chmodSync as S,existsSync as f,mkdirSync as A,readFileSync as k,rmSync as o,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,isAdmin:e.isAdmin===!0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",i=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:i,validatedAt:h}}function b(){let t=a();if(!f(t))return null;try{let e=JSON.parse(k(t,"utf8")),r=v(e);return r||(o(t,{force:!0}),null)}catch{return o(t,{force:!0}),null}}function O(t){let e=a();A(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
5
5
  `);try{S(e,384)}catch{}return r}function l(){o(a(),{force:!0})}async function E(t){let e=b();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return l(),null;if(!n.ok)return e;let i=await n.json();return i.user?.id?O({token:e.token,user:i.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{b as a,O as b,l as c,E as d};