rnxsim 0.1.345 → 0.1.347

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 (174) hide show
  1. package/README.md +9 -3
  2. package/cli/commands/welcome.ts +19 -17
  3. package/cli/outbound-endpoints.ts +1 -1
  4. package/dist-cli/bin.js +5 -5
  5. package/dist-cli/chunks/{agent-52G55XTO.js → agent-VVY2A5YV.js} +2 -2
  6. package/dist-cli/chunks/{agent-wrapper-BOZM43ON.js → agent-wrapper-YBMTZ3KU.js} +2 -2
  7. package/dist-cli/chunks/{app-fonts-A2L6V5EZ.js → app-fonts-EF7FM3VP.js} +2 -2
  8. package/dist-cli/chunks/{assert-CJKIP4LN.js → assert-J7N6WGMS.js} +2 -2
  9. package/dist-cli/chunks/{auth-VHHN3TOB.js → auth-YGX3WVEL.js} +2 -2
  10. package/dist-cli/chunks/{beta-EBDIGV3E.js → beta-JXYFAOHO.js} +2 -2
  11. package/dist-cli/chunks/{camera-5F4KKCQ3.js → camera-WIVF3UQ3.js} +2 -2
  12. package/dist-cli/chunks/{chunk-PLB6UVVX.js → chunk-23WNLQUB.js} +2 -2
  13. package/dist-cli/chunks/{chunk-KZFJNDH3.js → chunk-24Q4J4U6.js} +1 -1
  14. package/dist-cli/chunks/chunk-2E5KDIGN.js +14 -0
  15. package/dist-cli/chunks/{chunk-XJBFJGNT.js → chunk-2PAG4FBP.js} +2 -2
  16. package/dist-cli/chunks/{chunk-7LGINKM6.js → chunk-2UZ6QQ6S.js} +2 -2
  17. package/dist-cli/chunks/{chunk-7V4KPZ7O.js → chunk-2W4ME6YI.js} +2 -2
  18. package/dist-cli/chunks/{chunk-5GXRRUOA.js → chunk-3HBHHU5F.js} +3 -3
  19. package/dist-cli/chunks/{chunk-E2RGSCHT.js → chunk-3SPBSEVL.js} +1 -1
  20. package/dist-cli/chunks/{chunk-QNBBKRCA.js → chunk-4KK5IRA6.js} +2 -2
  21. package/dist-cli/chunks/{chunk-4OKV7T5D.js → chunk-4KOWLH77.js} +2 -2
  22. package/dist-cli/chunks/{chunk-DPP2M4AJ.js → chunk-4RI6KXVH.js} +1 -1
  23. package/dist-cli/chunks/{chunk-DHM3JDCK.js → chunk-6CGQWXXT.js} +2 -2
  24. package/dist-cli/chunks/{chunk-ZMTZ5G5H.js → chunk-7C6XE6AT.js} +2 -2
  25. package/dist-cli/chunks/{chunk-7YMQRA6L.js → chunk-7D56NCJ3.js} +2 -2
  26. package/dist-cli/chunks/{chunk-4ZILDTZX.js → chunk-ABBCVE5V.js} +2 -2
  27. package/dist-cli/chunks/{chunk-JC33TOAF.js → chunk-ANANQDHB.js} +1 -1
  28. package/dist-cli/chunks/{chunk-BFTDL2GX.js → chunk-BA45ZZKU.js} +2 -2
  29. package/dist-cli/chunks/{chunk-RB4VFUNM.js → chunk-BAXXUHKV.js} +2 -2
  30. package/dist-cli/chunks/{chunk-LAQGSSTT.js → chunk-DC4MQAR3.js} +1 -1
  31. package/dist-cli/chunks/{chunk-KA4PJNTE.js → chunk-DTNRKFSE.js} +2 -2
  32. package/dist-cli/chunks/{chunk-A2Q76LJV.js → chunk-EEZEVA2C.js} +2 -2
  33. package/dist-cli/chunks/{chunk-7UIIAHVU.js → chunk-EIIZZ2XK.js} +2 -2
  34. package/dist-cli/chunks/{chunk-TEU5NGUA.js → chunk-FQ3OHHCY.js} +2 -2
  35. package/dist-cli/chunks/{chunk-BCQV63BW.js → chunk-HWAGFGV7.js} +3 -3
  36. package/dist-cli/chunks/{chunk-XXZLK4BY.js → chunk-HY7XOD5E.js} +1 -1
  37. package/dist-cli/chunks/{chunk-T7SBFG5I.js → chunk-IQWQ6KI7.js} +2 -2
  38. package/dist-cli/chunks/{chunk-TMRD5MHL.js → chunk-IS2LT6MN.js} +2 -2
  39. package/dist-cli/chunks/{chunk-NUPRHZQW.js → chunk-JG2TIZ7E.js} +2 -2
  40. package/dist-cli/chunks/{chunk-YVSUFVVB.js → chunk-JKRVWCTC.js} +1 -1
  41. package/dist-cli/chunks/{chunk-3DBTS4MC.js → chunk-JP4FCK5J.js} +6 -6
  42. package/dist-cli/chunks/{chunk-RTDHX6CW.js → chunk-JQTBZERT.js} +2 -2
  43. package/dist-cli/chunks/{chunk-OPHT4DUO.js → chunk-KYTBJ2QV.js} +1 -1
  44. package/dist-cli/chunks/{chunk-63ASUHOV.js → chunk-LRRQI4TP.js} +2 -2
  45. package/dist-cli/chunks/{chunk-RT3DXTDP.js → chunk-LWE2HRS4.js} +2 -2
  46. package/dist-cli/chunks/{chunk-U5YHXQHH.js → chunk-NJ2JVAGV.js} +2 -2
  47. package/dist-cli/chunks/{chunk-4BIPA7MD.js → chunk-O7WPHIYQ.js} +1 -1
  48. package/dist-cli/chunks/{chunk-WPPGU5IK.js → chunk-OG3KGU4V.js} +2 -2
  49. package/dist-cli/chunks/{chunk-KH777UAO.js → chunk-PCU2CQCI.js} +3 -3
  50. package/dist-cli/chunks/{chunk-KRZPFXVN.js → chunk-QJYUHYQS.js} +1 -1
  51. package/dist-cli/chunks/{chunk-HK7YKH6N.js → chunk-QK2U5IW3.js} +2 -2
  52. package/dist-cli/chunks/{chunk-3N7M5HMJ.js → chunk-SMLCC5EP.js} +1 -1
  53. package/dist-cli/chunks/{chunk-QNRWPAOA.js → chunk-SNBSRIKO.js} +2 -2
  54. package/dist-cli/chunks/{chunk-R7ZNRGQN.js → chunk-SYQZTZTR.js} +1 -1
  55. package/dist-cli/chunks/{chunk-7GO2DSYQ.js → chunk-TAYE2YII.js} +1 -1
  56. package/dist-cli/chunks/{chunk-EPLVIDPC.js → chunk-U6CJ3EHB.js} +1 -1
  57. package/dist-cli/chunks/{chunk-GKGXULJK.js → chunk-UM7IG4DE.js} +2 -2
  58. package/dist-cli/chunks/{chunk-VLBN3KRC.js → chunk-VENH5KLL.js} +1 -1
  59. package/dist-cli/chunks/{chunk-P2CGGMU2.js → chunk-W4MASUQ7.js} +2 -2
  60. package/dist-cli/chunks/{chunk-WU72KL6Z.js → chunk-WIYBEKBM.js} +2 -2
  61. package/dist-cli/chunks/{chunk-LRM2XCEQ.js → chunk-WNZOJDBL.js} +1 -1
  62. package/dist-cli/chunks/{chunk-UVOEHIGP.js → chunk-XB7DLZNQ.js} +1 -1
  63. package/dist-cli/chunks/{chunk-PLUWN2V5.js → chunk-XGUCAKZM.js} +1 -1
  64. package/dist-cli/chunks/{chunk-DGTV3KOW.js → chunk-Z6K6TD7X.js} +1 -1
  65. package/dist-cli/chunks/{chunk-BHKSCNDC.js → chunk-ZPCQFQEN.js} +1 -1
  66. package/dist-cli/chunks/{chunk-HXE344V3.js → chunk-ZY44NCRQ.js} +1 -1
  67. package/dist-cli/chunks/{cleanup-MAVZJXVW.js → cleanup-ZIDQQLEN.js} +2 -2
  68. package/dist-cli/chunks/cli-version-BEJJXF35.js +4 -0
  69. package/dist-cli/chunks/{compat-7AURLGCS.js → compat-5PFPTBBK.js} +2 -2
  70. package/dist-cli/chunks/{config-TN3Y4J5N.js → config-CG73FOTM.js} +2 -2
  71. package/dist-cli/chunks/{control-EV2ELU5R.js → control-7IYIDOOI.js} +2 -2
  72. package/dist-cli/chunks/daemon-G6VR7LJI.js +4 -0
  73. package/dist-cli/chunks/{debug-JICITUB6.js → debug-6AQQXXE3.js} +3 -3
  74. package/dist-cli/chunks/{desktop-4F5HGLLX.js → desktop-HJE5B4XO.js} +3 -3
  75. package/dist-cli/chunks/{detox-ZC7NHLJI.js → detox-KUZ7EYOP.js} +2 -2
  76. package/dist-cli/chunks/{device-V57GHRXX.js → device-O6WI4PQT.js} +2 -2
  77. package/dist-cli/chunks/{diagnose-FF4IWYXC.js → diagnose-FTCJGH2Q.js} +2 -2
  78. package/dist-cli/chunks/{disk-cleanup-T277L6ZO.js → disk-cleanup-YAXG52EZ.js} +2 -2
  79. package/dist-cli/chunks/drivers-6QOL2SON.js +4 -0
  80. package/dist-cli/chunks/{film-G7ZAPWB7.js → film-KTLKRCJR.js} +3 -3
  81. package/dist-cli/chunks/flow-6VQN4VNW.js +4 -0
  82. package/dist-cli/chunks/help-22OURA2E.js +4 -0
  83. package/dist-cli/chunks/{hidden-runtime-alias-VSJNNSNI.js → hidden-runtime-alias-W375XBOM.js} +2 -2
  84. package/dist-cli/chunks/{home-paths-75HP3HKA.js → home-paths-CIGRWLDB.js} +2 -2
  85. package/dist-cli/chunks/inspect-36A2IEJL.js +4 -0
  86. package/dist-cli/chunks/install-desktop-KOW3XXUF.js +4 -0
  87. package/dist-cli/chunks/{login-ZSIHGHUK.js → login-AJWLXLPQ.js} +2 -2
  88. package/dist-cli/chunks/{logout-Q4DXMI2C.js → logout-CEJLZIOI.js} +2 -2
  89. package/dist-cli/chunks/{maestro-LE5LCRBL.js → maestro-YF4M6M6L.js} +3 -3
  90. package/dist-cli/chunks/{maestro-generate-D3ZIJCRL.js → maestro-generate-FJWDLMEB.js} +3 -3
  91. package/dist-cli/chunks/{mode-BWX6MDPJ.js → mode-6BJ523BY.js} +2 -2
  92. package/dist-cli/chunks/{optional-demo-registry-6CVASL3S.js → optional-demo-registry-5CKCN2TP.js} +2 -2
  93. package/dist-cli/chunks/{perf-NXQZISN6.js → perf-WE6QTFJU.js} +2 -2
  94. package/dist-cli/chunks/{permissions-5PD67RRO.js → permissions-OZZZZFPB.js} +2 -2
  95. package/dist-cli/chunks/privacy-3BERNBUM.js +4 -0
  96. package/dist-cli/chunks/{record-YJF4KXMR.js → record-QHQS2524.js} +3 -3
  97. package/dist-cli/chunks/{report-issue-XOL5FQBG.js → report-issue-SEMVVJUH.js} +2 -2
  98. package/dist-cli/chunks/reset-A5AA5ML6.js +4 -0
  99. package/dist-cli/chunks/runtime-R26QWA2M.js +4 -0
  100. package/dist-cli/chunks/{screenshot-command-VRPJXWFS.js → screenshot-command-WW33MAB3.js} +3 -3
  101. package/dist-cli/chunks/{screenshot-layers-QP4WA2F5.js → screenshot-layers-2GJTEQ4T.js} +2 -2
  102. package/dist-cli/chunks/{screenshots-capture-O2IBAVSP.js → screenshots-capture-J5HKONCC.js} +2 -2
  103. package/dist-cli/chunks/{serve-WC6RZNJL.js → serve-FEBNDKUD.js} +2 -2
  104. package/dist-cli/chunks/{setup-A6BIG3KL.js → setup-NGZWS373.js} +2 -2
  105. package/dist-cli/chunks/{skills-A7YC6RL5.js → skills-CFCZFEME.js} +2 -2
  106. package/dist-cli/chunks/{state-IJI5YROJ.js → state-XWRKK7FW.js} +2 -2
  107. package/dist-cli/chunks/{storage-Z2DBO2PQ.js → storage-C5GNK4XB.js} +2 -2
  108. package/dist-cli/chunks/store-L3A4CLND.js +4 -0
  109. package/dist-cli/chunks/telemetry-O67J22QU.js +4 -0
  110. package/dist-cli/chunks/{timeline-N7V2M6QA.js → timeline-7RA7ZILQ.js} +2 -2
  111. package/dist-cli/chunks/{upgrade-P2NH3BOR.js → upgrade-ZW6IJ5LX.js} +2 -2
  112. package/dist-cli/chunks/upload-UKUN6HCD.js +4 -0
  113. package/dist-cli/chunks/{version-OUHCSCUS.js → version-N3E4OIMM.js} +2 -2
  114. package/dist-cli/chunks/{web-6NRTF3UV.js → web-UC2SFEBA.js} +2 -2
  115. package/dist-cli/chunks/welcome-DAZPCMES.js +5 -0
  116. package/dist-cli/chunks/{what-happened-FUEL3BEF.js → what-happened-VUNKID5W.js} +2 -2
  117. package/dist-lib/agent-daemon-client.cjs +1 -1
  118. package/dist-lib/agent-events.cjs +1 -1
  119. package/dist-lib/agent-identity.cjs +1 -1
  120. package/dist-lib/agent-sessions.cjs +1 -1
  121. package/dist-lib/attached-projects.cjs +1 -1
  122. package/dist-lib/auth/shared-session.cjs +1 -1
  123. package/dist-lib/backend-origin.cjs +13 -1
  124. package/dist-lib/beta.cjs +1 -1
  125. package/dist-lib/beta.mjs +1 -1
  126. package/dist-lib/bridge-constants.cjs +1 -1
  127. package/dist-lib/bridge-contract.cjs +1 -1
  128. package/dist-lib/cli-constants.cjs +1 -1
  129. package/dist-lib/config.cjs +1 -1
  130. package/dist-lib/detox/index.cjs +1 -1
  131. package/dist-lib/dev-bundle-resolution.cjs +26 -10
  132. package/dist-lib/home-paths.cjs +1 -1
  133. package/dist-lib/host/bridge-host.cjs +101 -58
  134. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  135. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  136. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  137. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  138. package/dist-lib/host/websocket-proxy.cjs +1 -1
  139. package/dist-lib/index.cjs +1 -1
  140. package/dist-lib/jump-to-source-babel.cjs +1 -1
  141. package/dist-lib/menu.cjs +1 -1
  142. package/dist-lib/menu.mjs +1 -1
  143. package/dist-lib/metro-production-bundle.cjs +1 -1
  144. package/dist-lib/metro-production-bundle.mjs +1 -1
  145. package/dist-lib/metro.cjs +1 -1
  146. package/dist-lib/profiles.cjs +1 -1
  147. package/dist-lib/public-brand.cjs +1 -1
  148. package/dist-lib/react-native-host-modules.cjs +1 -1
  149. package/dist-lib/react-native-host-modules.mjs +1 -1
  150. package/dist-lib/render-mode.cjs +1 -1
  151. package/dist-lib/scripts/dev-server-scanner.cjs +106 -59
  152. package/dist-lib/sdk.cjs +1 -1
  153. package/dist-lib/sdk.mjs +1 -1
  154. package/dist-lib/skills.cjs +127 -72
  155. package/dist-lib/vite.cjs +1 -1
  156. package/package.json +1 -1
  157. package/scripts/dev-server-scanner.ts +101 -47
  158. package/src/backend-origin.ts +15 -1
  159. package/src/dev-bundle-resolution.ts +29 -12
  160. package/dist-cli/chunks/chunk-TOF5TA5X.js +0 -14
  161. package/dist-cli/chunks/cli-version-2B4KRNML.js +0 -4
  162. package/dist-cli/chunks/daemon-KKDG5MYR.js +0 -4
  163. package/dist-cli/chunks/drivers-LCX7S76X.js +0 -4
  164. package/dist-cli/chunks/flow-ONZGGFGD.js +0 -4
  165. package/dist-cli/chunks/help-DROVDXJM.js +0 -4
  166. package/dist-cli/chunks/inspect-MDA7ESGQ.js +0 -4
  167. package/dist-cli/chunks/install-desktop-EIVZHIFA.js +0 -4
  168. package/dist-cli/chunks/privacy-H5KNRNIZ.js +0 -4
  169. package/dist-cli/chunks/reset-5LZN5P5B.js +0 -4
  170. package/dist-cli/chunks/runtime-U36VWBH3.js +0 -4
  171. package/dist-cli/chunks/store-BYTCKNIC.js +0 -4
  172. package/dist-cli/chunks/telemetry-JLHFMD7N.js +0 -4
  173. package/dist-cli/chunks/upload-Z2WX5DCD.js +0 -4
  174. package/dist-cli/chunks/welcome-6RS7PEJW.js +0 -5
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (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-DGTV3KOW.js";import{o as R}from"./chunk-LRM2XCEQ.js";import{a as I}from"./chunk-PLUWN2V5.js";import{a as T}from"./chunk-LAQGSSTT.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-6CVASL3S.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-Z6K6TD7X.js";import{o as R}from"./chunk-WNZOJDBL.js";import{a as I}from"./chunk-XGUCAKZM.js";import{a as T}from"./chunk-DC4MQAR3.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-5CKCN2TP.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,5 +1,5 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (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-KA4PJNTE.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-DTNRKFSE.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,4 +1,4 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (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{randomUUID as k}from"node:crypto";import n from"node:fs";import{homedir as _}from"node:os";import i from"node:path";var $="SOOTSIM_HOME",I="active",B="daemon.json",M="dev-bridges",T="config.json",P=3e4;function s(){let e=process.env[$];return e&&e.length>0?i.resolve(e):i.join(_(),".sootsim")}function J(){if(process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1")return!1;let e=process.env.SOOTSIM_DEV;if(e==="1"||e==="true")return!0;if(e==="0"||e==="false")return!1;let t=process.argv[1];if(!t)return!1;try{return n.realpathSync(t).includes(`${i.sep}packages${i.sep}sootsim${i.sep}`)}catch{return!1}}function U(){return process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1"?!1:process.env.IS_TAMAGUI_DEV==="1"}function oe(){return J()||U()}function S(){return i.join(s(),"runtimes")}function V(e){return i.join(S(),e)}function R(){return i.join(S(),I)}function x(){return i.join(s(),"electron")}function ce(){return i.join(x(),"userData")}function se(e){return i.join(x(),e)}function H(){return i.join(s(),"profiles")}function ue(){return i.join(s(),"camera-fixtures")}function G(){return i.join(s(),"daemon-app")}function K(){return i.join(G(),"SootSim Daemon.app")}function ae(){return i.join(K(),"Contents","MacOS","sootsim-daemon")}function X(){return i.join(s(),"cache")}function m(){return i.join(s(),B)}function p(){return i.join(s(),M)}function w(e){if(!Number.isInteger(e)||e<=0)throw new Error(`invalid development bridge port: ${e}`);return i.join(p(),`${e}.json`)}function D(){return i.join(s(),T)}function A(){try{let e=n.readFileSync(D(),"utf8"),t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function O(e){v();let t=A(),r={...t,...e};e.settings&&typeof e.settings=="object"&&(r.settings={...t.settings&&typeof t.settings=="object"?t.settings:{},...e.settings});let c=`${D()}.tmp`;return n.writeFileSync(c,`${JSON.stringify(r,null,2)}
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (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
  function t(_){return`(async () => {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  var n=Object.freeze({name:"rnx",packageName:"rnxsim",commandName:"rnx",domain:"rnxsim.com",origin:"https://rnxsim.com"});export{n as a};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (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.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (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.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (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.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as r,c as g,d as f,e as v}from"./chunk-WPPGU5IK.js";import"./chunk-TEU5NGUA.js";import"./chunk-YVSUFVVB.js";import"./chunk-LRM2XCEQ.js";import"./chunk-PLUWN2V5.js";import"./chunk-LAQGSSTT.js";var $={"browser-cache":"browser caches","camera-fixture":"staged camera fixture videos",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(s){let i=new Map;for(let o of s){let n=i.get(o.kind)??{bytes:0,count:0};n.bytes+=o.bytes,n.count++,i.set(o.kind,n)}return[...i].sort((o,n)=>n[1].bytes-o[1].bytes).map(([o,n])=>` ${$[o]}: ${r(n.bytes)} (${n.count} ${n.count===1?"item":"items"})`)}function h(){console.log(`
4
+ import{b as r,c as g,d as f,e as v}from"./chunk-OG3KGU4V.js";import"./chunk-FQ3OHHCY.js";import"./chunk-JKRVWCTC.js";import"./chunk-WNZOJDBL.js";import"./chunk-XGUCAKZM.js";import"./chunk-DC4MQAR3.js";var $={"browser-cache":"browser caches","camera-fixture":"staged camera fixture videos",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(s){let i=new Map;for(let o of s){let n=i.get(o.kind)??{bytes:0,count:0};n.bytes+=o.bytes,n.count++,i.set(o.kind,n)}return[...i].sort((o,n)=>n[1].bytes-o[1].bytes).map(([o,n])=>` ${$[o]}: ${r(n.bytes)} (${n.count} ${n.count===1?"item":"items"})`)}function h(){console.log(`
5
5
  rnx cleanup \u2014 inspect and reclaim local rnx disk usage
6
6
 
7
7
  usage:
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a}from"./chunk-IQWQ6KI7.js";import"./chunk-XGUCAKZM.js";import"./chunk-DC4MQAR3.js";export{a as getCliVersion};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{d as a,g as i,i as d,j as r}from"./chunk-OPHT4DUO.js";import"./chunk-LAQGSSTT.js";import{existsSync as m,readFileSync as k}from"node:fs";import{resolve as f}from"node:path";async function P(e){if(e.includes("--help")||e.includes("-h")){console.log(`
4
+ import{d as a,g as i,i as d,j as r}from"./chunk-KYTBJ2QV.js";import"./chunk-DC4MQAR3.js";import{existsSync as m,readFileSync as k}from"node:fs";import{resolve as f}from"node:path";async function P(e){if(e.includes("--help")||e.includes("-h")){console.log(`
5
5
  rnx compat \u2014 check package compatibility
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (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 t,D as r,z as s}from"./chunk-LRM2XCEQ.js";import"./chunk-LAQGSSTT.js";function l(){let e=t(),n=e.configured&&e.productAnalytics;console.log(` bounded diagnostics are ${n?"ON":"OFF"}`),console.log(" permitted fields: package name/version/unsupported API or error class"),console.log(` config: ${s()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function i(e){let n=e.find(o=>!o.startsWith("-"))?.toLowerCase();switch(n){case void 0:case"status":l();return;case"on":r({productAnalytics:!0,crashReports:!1}),console.log(" bounded diagnostics ON"),console.log(` config: ${s()}`);return;case"off":r({productAnalytics:!1,crashReports:!1}),console.log(" bounded diagnostics OFF"),console.log(` config: ${s()}`);return;default:console.error(` unknown telemetry action: ${n}`),console.error(" usage: rnx config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
4
+ import{C as t,D as r,z as s}from"./chunk-WNZOJDBL.js";import"./chunk-DC4MQAR3.js";function l(){let e=t(),n=e.configured&&e.productAnalytics;console.log(` bounded diagnostics are ${n?"ON":"OFF"}`),console.log(" permitted fields: package name/version/unsupported API or error class"),console.log(` config: ${s()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function i(e){let n=e.find(o=>!o.startsWith("-"))?.toLowerCase();switch(n){case void 0:case"status":l();return;case"on":r({productAnalytics:!0,crashReports:!1}),console.log(" bounded diagnostics ON"),console.log(` config: ${s()}`);return;case"off":r({productAnalytics:!1,crashReports:!1}),console.log(" bounded diagnostics OFF"),console.log(` config: ${s()}`);return;default:console.error(` unknown telemetry action: ${n}`),console.error(" usage: rnx config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
5
5
  rnx config \u2014 manage local CLI preferences
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x}from"./chunk-3DBTS4MC.js";import"./chunk-4OKV7T5D.js";import"./chunk-KRZPFXVN.js";import"./chunk-63ASUHOV.js";import"./chunk-TOF5TA5X.js";import"./chunk-U5YHXQHH.js";import"./chunk-7V4KPZ7O.js";import"./chunk-RB4VFUNM.js";import"./chunk-R7ZNRGQN.js";import"./chunk-RTDHX6CW.js";import"./chunk-E2RGSCHT.js";import"./chunk-ZMTZ5G5H.js";import"./chunk-4BIPA7MD.js";import"./chunk-KA4PJNTE.js";import"./chunk-NUPRHZQW.js";import"./chunk-EPLVIDPC.js";import"./chunk-QNRWPAOA.js";import"./chunk-KZFJNDH3.js";import"./chunk-TEU5NGUA.js";import"./chunk-YVSUFVVB.js";import"./chunk-LRM2XCEQ.js";import"./chunk-PLUWN2V5.js";import"./chunk-LAQGSSTT.js";export{e as applyRuntimeGenerationOrigin,i as buildOpenUrl,h as buildShellUrl,v as closeSimsBulk,c as ensureBridgeForOpen,b as normalizeDeepLinkTarget,w as planBulkCloseTargets,n as playwrightHostPidForSim,k as printConnectedSims,d as resolveBundleTarget,f as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,g as resolveShellBaseUrlForBridgePort,u as runClaimCommand,x as runCloseCommand,t as runFocusCommand,q as runLinkCommand,r as runOpenCommand,s as runUseCommand,o as signalDriverLaunchConnected,j as summarizeSimUrl,p as terminatePlaywrightHostsForSims,l as waitForSimMatch,m as waitForSimMatchOrHostExit};
4
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x}from"./chunk-JP4FCK5J.js";import"./chunk-4KOWLH77.js";import"./chunk-QJYUHYQS.js";import"./chunk-LRRQI4TP.js";import"./chunk-2E5KDIGN.js";import"./chunk-NJ2JVAGV.js";import"./chunk-2W4ME6YI.js";import"./chunk-BAXXUHKV.js";import"./chunk-SYQZTZTR.js";import"./chunk-JQTBZERT.js";import"./chunk-3SPBSEVL.js";import"./chunk-7C6XE6AT.js";import"./chunk-O7WPHIYQ.js";import"./chunk-DTNRKFSE.js";import"./chunk-JG2TIZ7E.js";import"./chunk-U6CJ3EHB.js";import"./chunk-SNBSRIKO.js";import"./chunk-24Q4J4U6.js";import"./chunk-FQ3OHHCY.js";import"./chunk-JKRVWCTC.js";import"./chunk-WNZOJDBL.js";import"./chunk-XGUCAKZM.js";import"./chunk-DC4MQAR3.js";export{e as applyRuntimeGenerationOrigin,i as buildOpenUrl,h as buildShellUrl,v as closeSimsBulk,c as ensureBridgeForOpen,b as normalizeDeepLinkTarget,w as planBulkCloseTargets,n as playwrightHostPidForSim,k as printConnectedSims,d as resolveBundleTarget,f as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,g as resolveShellBaseUrlForBridgePort,u as runClaimCommand,x as runCloseCommand,t as runFocusCommand,q as runLinkCommand,r as runOpenCommand,s as runUseCommand,o as signalDriverLaunchConnected,j as summarizeSimUrl,p as terminatePlaywrightHostsForSims,l as waitForSimMatch,m as waitForSimMatchOrHostExit};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c,d,e,f}from"./chunk-BA45ZZKU.js";import"./chunk-7D56NCJ3.js";import"./chunk-EIIZZ2XK.js";import"./chunk-WIYBEKBM.js";import"./chunk-NJ2JVAGV.js";import"./chunk-BAXXUHKV.js";import"./chunk-DTNRKFSE.js";import"./chunk-24Q4J4U6.js";import"./chunk-VENH5KLL.js";import"./chunk-WNZOJDBL.js";import"./chunk-IQWQ6KI7.js";import"./chunk-XGUCAKZM.js";import"./chunk-HY7XOD5E.js";import"./chunk-DC4MQAR3.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,e as teardownDaemonService,d as teardownLegacyMacDaemonArtifacts,f as teardownSootsimHome};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{f as b,m as C}from"./chunk-ZMTZ5G5H.js";import{L as N,M as D,N as O,O as T,P as k}from"./chunk-4BIPA7MD.js";import{q as A,s as _,u as S}from"./chunk-KA4PJNTE.js";import"./chunk-KZFJNDH3.js";import"./chunk-LRM2XCEQ.js";import"./chunk-LAQGSSTT.js";var B=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],F="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function R(){console.log(`
4
+ import{f as b,m as C}from"./chunk-7C6XE6AT.js";import{L as N,M as D,N as O,O as T,P as k}from"./chunk-O7WPHIYQ.js";import{q as A,s as _,u as S}from"./chunk-DTNRKFSE.js";import"./chunk-24Q4J4U6.js";import"./chunk-WNZOJDBL.js";import"./chunk-DC4MQAR3.js";var B=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],F="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function R(){console.log(`
5
5
  rnx debug \u2014 drive __sootsimDebug from the terminal
6
6
 
7
7
  usage:
@@ -181,7 +181,7 @@ examples:
181
181
  } : null,
182
182
  samples,
183
183
  }
184
- })()`}async function u(t,a){return S(t,a)}function z(t,a){let d=t.indexOf(a);if(d<0)return null;let m=Number(t[d+1]);return Number.isFinite(m)?m:null}async function J(t){await u(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'enable').then(() => 'enabled')"),await t.send({type:"screenshot"});let d=(await u(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'disable').then((s) => ({ imageAudit: s.imageAudit }))"))?.imageAudit;if(!d)throw new Error("compositor returned no image audit");return d}function E(t){return t===null?" - ":t.toFixed(3).padStart(6)}function V(t){let a=t.sourceUri??t.testID??`node ${t.nodeId}`;return a.length<=58?a:`...${a.slice(-55)}`}function W(t,a,d){let f=t.rows.filter(c=>c.shortfall!==null).filter(c=>c.shortfall<d);if(console.log(` ${t.rows.length} images drawn (${t.draws} draws), ${f.length} below ${d} of what their source could deliver`),console.log(` sampling: mipmapped ${t.samplingCounts.mipmapped} \xB7 cubic ${t.samplingCounts.cubic} \xB7 repeat ${t.samplingCounts.repeat} \xB7 none ${t.samplingCounts.none}`),a.length===0){console.log(" every image delivered its source resolution");return}console.log(""),console.log(" short eff decoded source needed(dev) dest(pt) dpr image");for(let c of a){let x=`${c.decoded.width}x${c.decoded.height}`.padEnd(11),r=(c.vector?"vector":c.intrinsic?`${c.intrinsic.width}x${c.intrinsic.height}`:"?").padEnd(11),w=`${Math.round(c.needed.width)}x${Math.round(c.needed.height)}`.padEnd(12),y=`${Math.round(c.destination.width)}x${Math.round(c.destination.height)}`.padEnd(9);console.log(` ${E(c.shortfall)} ${E(c.effective.width)} ${x} ${r} ${w} ${y} ${c.dpr.toFixed(1)} ${V(c)}`)}}async function X(t,a){let d=A(t,{port:a.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),m=d.positional;(!m[0]||t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let c=d.wsPort,x=d.simId,r=!t.includes("--json"),w=x?` --sim ${x}`:"",y=m[0],l=m.slice(1);if(new Set(["state","js","perf","memory","sample-color"]).has(y)){let{runInspect:e}=await import("./inspect-MDA7ESGQ.js");await e(["debug",...t],{port:a.port,verbose:a.verbose});return}let o=_(d);try{switch(y){case"enable":{let e=I(l[0]);e.length===0&&(console.error(` usage: rnx debug enable <channel[,channel,...]>
184
+ })()`}async function u(t,a){return S(t,a)}function z(t,a){let d=t.indexOf(a);if(d<0)return null;let m=Number(t[d+1]);return Number.isFinite(m)?m:null}async function J(t){await u(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'enable').then(() => 'enabled')"),await t.send({type:"screenshot"});let d=(await u(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'disable').then((s) => ({ imageAudit: s.imageAudit }))"))?.imageAudit;if(!d)throw new Error("compositor returned no image audit");return d}function E(t){return t===null?" - ":t.toFixed(3).padStart(6)}function V(t){let a=t.sourceUri??t.testID??`node ${t.nodeId}`;return a.length<=58?a:`...${a.slice(-55)}`}function W(t,a,d){let f=t.rows.filter(c=>c.shortfall!==null).filter(c=>c.shortfall<d);if(console.log(` ${t.rows.length} images drawn (${t.draws} draws), ${f.length} below ${d} of what their source could deliver`),console.log(` sampling: mipmapped ${t.samplingCounts.mipmapped} \xB7 cubic ${t.samplingCounts.cubic} \xB7 repeat ${t.samplingCounts.repeat} \xB7 none ${t.samplingCounts.none}`),a.length===0){console.log(" every image delivered its source resolution");return}console.log(""),console.log(" short eff decoded source needed(dev) dest(pt) dpr image");for(let c of a){let x=`${c.decoded.width}x${c.decoded.height}`.padEnd(11),r=(c.vector?"vector":c.intrinsic?`${c.intrinsic.width}x${c.intrinsic.height}`:"?").padEnd(11),w=`${Math.round(c.needed.width)}x${Math.round(c.needed.height)}`.padEnd(12),y=`${Math.round(c.destination.width)}x${Math.round(c.destination.height)}`.padEnd(9);console.log(` ${E(c.shortfall)} ${E(c.effective.width)} ${x} ${r} ${w} ${y} ${c.dpr.toFixed(1)} ${V(c)}`)}}async function X(t,a){let d=A(t,{port:a.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),m=d.positional;(!m[0]||t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let c=d.wsPort,x=d.simId,r=!t.includes("--json"),w=x?` --sim ${x}`:"",y=m[0],l=m.slice(1);if(new Set(["state","js","perf","memory","sample-color"]).has(y)){let{runInspect:e}=await import("./inspect-36A2IEJL.js");await e(["debug",...t],{port:a.port,verbose:a.verbose});return}let o=_(d);try{switch(y){case"enable":{let e=I(l[0]);e.length===0&&(console.error(` usage: rnx debug enable <channel[,channel,...]>
185
185
  known: ${B.join(", ")}`),process.exit(1));let s=await k(o,"enable",e);console.log(i({active:s},r));break}case"disable":{let e=I(l[0]),s=await k(o,"disable",e);console.log(i({active:s},r));break}case"toggle":{let e=l[0];e||(console.error(" usage: rnx debug toggle <channel>"),process.exit(1));let s=await u(o,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(i({[e]:s},r));break}case"status":{let e=await N(o);console.log(i(e,r));break}case"channels":{let e=await u(o,"window.__sootsimDebug.channels()");console.log(i(e,r));break}case"flags":{let e=await D(o);console.log(i(e,r));break}case"snapshot":{let e=l[0],s=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",n=await u(o,`(() => { const s = ${s}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(i(n,r));break}case"snapshots":{let e=await u(o,"window.__sootsimDebug.snapshots()");console.log(i(e,r));break}case"diff":{let e=l[0],s=l[1];(!e||!s)&&(console.error(" usage: rnx debug diff <labelA> <labelB>"),process.exit(1));let n=`(() => {
186
186
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(s)});
187
187
  if (!d) return null;
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as f}from"./chunk-RT3DXTDP.js";import{a as d}from"./chunk-DPP2M4AJ.js";import{h as u}from"./chunk-3DBTS4MC.js";import"./chunk-4OKV7T5D.js";import"./chunk-KRZPFXVN.js";import"./chunk-63ASUHOV.js";import"./chunk-TOF5TA5X.js";import"./chunk-U5YHXQHH.js";import"./chunk-7V4KPZ7O.js";import"./chunk-RB4VFUNM.js";import"./chunk-R7ZNRGQN.js";import"./chunk-RTDHX6CW.js";import"./chunk-E2RGSCHT.js";import"./chunk-ZMTZ5G5H.js";import"./chunk-4BIPA7MD.js";import"./chunk-KA4PJNTE.js";import"./chunk-JC33TOAF.js";import{a}from"./chunk-NUPRHZQW.js";import{a as p}from"./chunk-EPLVIDPC.js";import{c}from"./chunk-QNRWPAOA.js";import"./chunk-KZFJNDH3.js";import"./chunk-TEU5NGUA.js";import"./chunk-YVSUFVVB.js";import{a as l}from"./chunk-3N7M5HMJ.js";import"./chunk-LRM2XCEQ.js";import"./chunk-PLUWN2V5.js";import"./chunk-LAQGSSTT.js";function k(e){let t=e.indexOf("--port");if(t<0)return;let o=e[t+1],n=o?Number(o):Number.NaN;return(!Number.isInteger(n)||n<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),n}async function v(e,t){let o=k(e)??t.port;return o?u(String(o)):void 0}async function m(e,t){(e.includes("--help")||e.includes("-h"))&&(console.log(`
4
+ import{a as f}from"./chunk-LWE2HRS4.js";import{a as d}from"./chunk-4RI6KXVH.js";import{h as u}from"./chunk-JP4FCK5J.js";import"./chunk-4KOWLH77.js";import"./chunk-QJYUHYQS.js";import"./chunk-LRRQI4TP.js";import"./chunk-2E5KDIGN.js";import"./chunk-NJ2JVAGV.js";import"./chunk-2W4ME6YI.js";import"./chunk-BAXXUHKV.js";import"./chunk-SYQZTZTR.js";import"./chunk-JQTBZERT.js";import"./chunk-3SPBSEVL.js";import"./chunk-7C6XE6AT.js";import"./chunk-O7WPHIYQ.js";import"./chunk-DTNRKFSE.js";import"./chunk-ANANQDHB.js";import{a}from"./chunk-JG2TIZ7E.js";import{a as p}from"./chunk-U6CJ3EHB.js";import{c}from"./chunk-SNBSRIKO.js";import"./chunk-24Q4J4U6.js";import"./chunk-FQ3OHHCY.js";import"./chunk-JKRVWCTC.js";import{a as l}from"./chunk-SMLCC5EP.js";import"./chunk-WNZOJDBL.js";import"./chunk-XGUCAKZM.js";import"./chunk-DC4MQAR3.js";function k(e){let t=e.indexOf("--port");if(t<0)return;let o=e[t+1],n=o?Number(o):Number.NaN;return(!Number.isInteger(n)||n<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),n}async function v(e,t){let o=k(e)??t.port;return o?u(String(o)):void 0}async function m(e,t){(e.includes("--help")||e.includes("-h"))&&(console.log(`
5
5
  rnx desktop \u2014 launch the desktop companion
6
6
 
7
7
  usage:
@@ -16,7 +16,7 @@ examples:
16
16
  rnx desktop
17
17
  rnx desktop --port 5173
18
18
  rnx desktop --profile qa
19
- `),process.exit(0));let o=e.find((g,s)=>e[s-1]==="--profile"),n=e.includes("--ephemeral");o&&n&&(console.error(" rnx desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let h=o?c(o).id:void 0,r=p();if(!r){if(d(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await l("run rnx desktop install now?",!0)){console.log();let{runInstallDesktop:s}=await import("./install-desktop-EIVZHIFA.js");await s(["--yes"]),r=p()}r||process.exit(1)}console.log(` launching ${r.path}`);let x=await v(e,t),i=await a.launch({url:x,device:t.device,profileId:h,ephemeralProfile:n});i.launched||(console.error(` ${i.message}`),process.exit(1)),console.log(` ${i.message}`)}function w(){console.log(`
19
+ `),process.exit(0));let o=e.find((g,s)=>e[s-1]==="--profile"),n=e.includes("--ephemeral");o&&n&&(console.error(" rnx desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let h=o?c(o).id:void 0,r=p();if(!r){if(d(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await l("run rnx desktop install now?",!0)){console.log();let{runInstallDesktop:s}=await import("./install-desktop-KOW3XXUF.js");await s(["--yes"]),r=p()}r||process.exit(1)}console.log(` launching ${r.path}`);let x=await v(e,t),i=await a.launch({url:x,device:t.device,profileId:h,ephemeralProfile:n});i.launched||(console.error(` ${i.message}`),process.exit(1)),console.log(` ${i.message}`)}function w(){console.log(`
20
20
  rnx desktop \u2014 launch or install the desktop companion
21
21
 
22
22
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{f as N}from"./chunk-5GXRRUOA.js";import"./chunk-7GO2DSYQ.js";import"./chunk-4ZILDTZX.js";import"./chunk-BCQV63BW.js";import"./chunk-DPP2M4AJ.js";import"./chunk-A2Q76LJV.js";import"./chunk-UVOEHIGP.js";import{c as F,d as $,e as E}from"./chunk-TMRD5MHL.js";import{a as M}from"./chunk-7LGINKM6.js";import"./chunk-PLB6UVVX.js";import"./chunk-WU72KL6Z.js";import"./chunk-3DBTS4MC.js";import"./chunk-4OKV7T5D.js";import"./chunk-KRZPFXVN.js";import"./chunk-63ASUHOV.js";import"./chunk-TOF5TA5X.js";import"./chunk-U5YHXQHH.js";import"./chunk-7V4KPZ7O.js";import"./chunk-RB4VFUNM.js";import"./chunk-R7ZNRGQN.js";import"./chunk-RTDHX6CW.js";import"./chunk-E2RGSCHT.js";import"./chunk-ZMTZ5G5H.js";import"./chunk-4BIPA7MD.js";import"./chunk-KA4PJNTE.js";import"./chunk-NUPRHZQW.js";import"./chunk-EPLVIDPC.js";import"./chunk-QNRWPAOA.js";import"./chunk-KZFJNDH3.js";import"./chunk-HXE344V3.js";import"./chunk-GKGXULJK.js";import"./chunk-VLBN3KRC.js";import"./chunk-TEU5NGUA.js";import"./chunk-YVSUFVVB.js";import"./chunk-BHKSCNDC.js";import"./chunk-LRM2XCEQ.js";import{a as R}from"./chunk-PLUWN2V5.js";import"./chunk-LAQGSSTT.js";import{spawn as G}from"child_process";import{existsSync as g,mkdirSync as B,readFileSync as C,writeFileSync as y,unlinkSync as U}from"fs";import{tmpdir as k}from"os";import{dirname as q,resolve as a,join as J,relative as H}from"path";function V(){try{let t=import.meta.resolve(`${R.packageName}/detox`);return q(t.startsWith("file://")?t.slice(7):t)}catch{return a(import.meta.dirname,"..","..","detox")}}var z=`
4
+ import{f as N}from"./chunk-3HBHHU5F.js";import"./chunk-TAYE2YII.js";import"./chunk-ABBCVE5V.js";import"./chunk-HWAGFGV7.js";import"./chunk-4RI6KXVH.js";import"./chunk-EEZEVA2C.js";import"./chunk-XB7DLZNQ.js";import{c as F,d as $,e as E}from"./chunk-IS2LT6MN.js";import{a as M}from"./chunk-2UZ6QQ6S.js";import"./chunk-23WNLQUB.js";import"./chunk-WIYBEKBM.js";import"./chunk-JP4FCK5J.js";import"./chunk-4KOWLH77.js";import"./chunk-QJYUHYQS.js";import"./chunk-LRRQI4TP.js";import"./chunk-2E5KDIGN.js";import"./chunk-NJ2JVAGV.js";import"./chunk-2W4ME6YI.js";import"./chunk-BAXXUHKV.js";import"./chunk-SYQZTZTR.js";import"./chunk-JQTBZERT.js";import"./chunk-3SPBSEVL.js";import"./chunk-7C6XE6AT.js";import"./chunk-O7WPHIYQ.js";import"./chunk-DTNRKFSE.js";import"./chunk-JG2TIZ7E.js";import"./chunk-U6CJ3EHB.js";import"./chunk-SNBSRIKO.js";import"./chunk-24Q4J4U6.js";import"./chunk-ZY44NCRQ.js";import"./chunk-UM7IG4DE.js";import"./chunk-VENH5KLL.js";import"./chunk-FQ3OHHCY.js";import"./chunk-JKRVWCTC.js";import"./chunk-ZPCQFQEN.js";import"./chunk-WNZOJDBL.js";import{a as R}from"./chunk-XGUCAKZM.js";import"./chunk-DC4MQAR3.js";import{spawn as G}from"child_process";import{existsSync as g,mkdirSync as B,readFileSync as C,writeFileSync as y,unlinkSync as U}from"fs";import{tmpdir as k}from"os";import{dirname as q,resolve as a,join as J,relative as H}from"path";function V(){try{let t=import.meta.resolve(`${R.packageName}/detox`);return q(t.startsWith("file://")?t.slice(7):t)}catch{return a(import.meta.dirname,"..","..","detox")}}var z=`
5
5
  rnx detox \u2014 run detox-style tests against an rnx shell
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import"./chunk-KRZPFXVN.js";import"./chunk-U5YHXQHH.js";import"./chunk-7V4KPZ7O.js";import{b as c,c as s,d as m}from"./chunk-RB4VFUNM.js";import{q as d,s as l,v as a}from"./chunk-KA4PJNTE.js";import"./chunk-KZFJNDH3.js";import"./chunk-LRM2XCEQ.js";import"./chunk-LAQGSSTT.js";function h(){console.log(`
4
+ import"./chunk-QJYUHYQS.js";import"./chunk-NJ2JVAGV.js";import"./chunk-2W4ME6YI.js";import{b as c,c as s,d as m}from"./chunk-BAXXUHKV.js";import{q as d,s as l,v as a}from"./chunk-DTNRKFSE.js";import"./chunk-24Q4J4U6.js";import"./chunk-WNZOJDBL.js";import"./chunk-DC4MQAR3.js";function h(){console.log(`
5
5
  rnx device \u2014 inspect or change the live device preset for a sim
6
6
 
7
7
  usage:
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{e as v,q as E,s as x,v as b}from"./chunk-KA4PJNTE.js";import"./chunk-KZFJNDH3.js";import"./chunk-LRM2XCEQ.js";import"./chunk-LAQGSSTT.js";function j(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
4
+ import{e as v,q as E,s as x,v as b}from"./chunk-DTNRKFSE.js";import"./chunk-24Q4J4U6.js";import"./chunk-WNZOJDBL.js";import"./chunk-DC4MQAR3.js";function j(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
5
5
  rnx get diagnosis \u2014 compact "what just went wrong?" report
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a,b,c,d,e}from"./chunk-WPPGU5IK.js";import"./chunk-TEU5NGUA.js";import"./chunk-YVSUFVVB.js";import"./chunk-LRM2XCEQ.js";import"./chunk-PLUWN2V5.js";import"./chunk-LAQGSSTT.js";export{e as applyAutomaticSootsimCleanup,d as applySootsimCleanup,b as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,c as planSootsimCleanup};
4
+ import{a,b,c,d,e}from"./chunk-OG3KGU4V.js";import"./chunk-FQ3OHHCY.js";import"./chunk-JKRVWCTC.js";import"./chunk-WNZOJDBL.js";import"./chunk-XGUCAKZM.js";import"./chunk-DC4MQAR3.js";export{e as applyAutomaticSootsimCleanup,d as applySootsimCleanup,b as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,c as planSootsimCleanup};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import"./chunk-ANANQDHB.js";import{a,b,c,d,e,f,g}from"./chunk-JG2TIZ7E.js";import"./chunk-U6CJ3EHB.js";import"./chunk-SNBSRIKO.js";import"./chunk-24Q4J4U6.js";import"./chunk-JKRVWCTC.js";import"./chunk-WNZOJDBL.js";import"./chunk-DC4MQAR3.js";export{c as ALL_DRIVERS,g as buildDriverListRows,a as electronDriver,d as getAllDrivers,e as getDriver,b as playwrightDriver,f as resolveDriver};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as R,d as L}from"./chunk-QNBBKRCA.js";import{q as x,s as A,w as b}from"./chunk-KA4PJNTE.js";import"./chunk-KZFJNDH3.js";import"./chunk-LRM2XCEQ.js";import"./chunk-LAQGSSTT.js";import{spawnSync as T}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
4
+ import{c as R,d as L}from"./chunk-4KK5IRA6.js";import{q as x,s as A,w as b}from"./chunk-DTNRKFSE.js";import"./chunk-24Q4J4U6.js";import"./chunk-WNZOJDBL.js";import"./chunk-DC4MQAR3.js";import{spawnSync as T}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as j}from"node:os";import{dirname as q,extname as H,join as K,resolve as I}from"node:path";var n=e=>new Promise(a=>setTimeout(a,e)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(e,a){let s=e.indexOf(a);return s>=0?e[s+1]:void 0}async function r(e,a,s=3e4){return await e.send({type:"evaluate",code:a},{timeoutMs:s})}async function ae(e,a){if(e.length===0||e.includes("--help")||e.includes("-h"))return console.log(`
5
5
  rnx film \u2014 record a flow flat, replay it on the 3d stage, save a clip
6
6
 
7
7
  usage:
@@ -35,7 +35,7 @@ examples:
35
35
  rnx film flows/swap.yaml --script hero-arc --background gradient-tide --out ~/Desktop/swap-3d.mp4
36
36
  rnx film flows/login.yaml --colorway deep-blue --environment on --env-shape pane --room on
37
37
  `),0;let s=e.find(d=>!d.startsWith("--")&&/\.ya?ml$/.test(d));if(!s||!V(I(s)))return console.error(` film: flow file not found: ${s??"(none given)"}`),1;let P=Number.parseInt(c(e,"--fps")??"30",10),h=c(e,"--script")??"hero-arc",z=e.includes("--keep-three"),v=s.replace(/^.*\//,"").replace(/\.ya?ml$/,""),O=c(e,"--out"),l=I(O??K(j(),"Desktop","sootsim-films",`${v}.webm`)),S=H(l).toLowerCase()===".mp4";if(S&&T("ffmpeg",["-version"]).status!==0)return console.error(" film: --out ends in .mp4 but ffmpeg is not installed"),console.error(" install ffmpeg or use a .webm output path"),1;let C=x(e,{port:a.port,stripValueFlags:[...X,...Q],stripBooleanFlags:J}),t=A({...C,commandTimeoutMs:6e4});try{let d=await r(t,`(() => { const s = window.SootSim?.bridges?.settings?.get?.() || {}
38
- return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(t,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let D=Date.now();await n(500);let{runFlowPlayback:G}=await import("./flow-ONZGGFGD.js"),m=[s],y=c(e,"--sim");y&&m.push("--sim",y);let k=c(e,"--slow");k&&m.push("--slow",k);let f=await G(m);await n(400);let u=Math.min(Date.now()-D,Y);if(await r(t,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let F=!1;for(let o=0;o<50;o++){await n(400);let i=await r(t,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
38
+ return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(t,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let D=Date.now();await n(500);let{runFlowPlayback:G}=await import("./flow-6VQN4VNW.js"),m=[s],y=c(e,"--sim");y&&m.push("--sim",y);let k=c(e,"--slow");k&&m.push("--slow",k);let f=await G(m);await n(400);let u=Math.min(Date.now()-D,Y);if(await r(t,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let F=!1;for(let o=0;o<50;o++){await n(400);let i=await r(t,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
39
39
  return { state: s?.state, hasBlob: !!s?.lastVideoBlob } })()`);if(i?.state==="idle"&&i.hasBlob){F=!0;break}}if(!F)return console.error(" film: flow recording never produced a video blob"),1;console.log(` film: flow captured (${(u/1e3).toFixed(1)}s)`),await r(t,"window.SootSim?.bridges?.settings?.set?.('threeMode', true)"),await R(t),await n(1400),await r(t,"window.SootSim?.bridges?.settings?.set?.('threeRecordingEditor', true)");let _=!1;for(let o=0;o<60;o++)if(await n(250),await r(t,`(() => { const rs = window.SootSim?.replayStore
40
40
  return rs?.value?.preview?.surface === 'video' && !!rs?.value?.preview?.flowVideoUrl })()`)){_=!0;break}if(!_)return console.error(" film: recording editor did not seed the replay store"),1;let p=L(e);delete p.script,p.resetPose=!0,await b(t,"SootSim.bridges.threeMode.configure",p),await n(2400),console.log(` film: filming the 3d stage (script: ${h})`);let M=await r(t,`(() => {
41
41
  const c = window.SootSim?.bridges?.threeMode?.getCanvas?.()
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{c,d,e,f,g,h,i}from"./chunk-3HBHHU5F.js";import"./chunk-TAYE2YII.js";import"./chunk-ABBCVE5V.js";import{b as a,c as b}from"./chunk-HWAGFGV7.js";import"./chunk-4RI6KXVH.js";import"./chunk-EEZEVA2C.js";import"./chunk-XB7DLZNQ.js";import"./chunk-IS2LT6MN.js";import"./chunk-2UZ6QQ6S.js";import"./chunk-23WNLQUB.js";import"./chunk-WIYBEKBM.js";import"./chunk-JP4FCK5J.js";import"./chunk-4KOWLH77.js";import"./chunk-QJYUHYQS.js";import"./chunk-LRRQI4TP.js";import"./chunk-2E5KDIGN.js";import"./chunk-NJ2JVAGV.js";import"./chunk-2W4ME6YI.js";import"./chunk-BAXXUHKV.js";import"./chunk-SYQZTZTR.js";import"./chunk-JQTBZERT.js";import"./chunk-3SPBSEVL.js";import"./chunk-7C6XE6AT.js";import"./chunk-O7WPHIYQ.js";import"./chunk-DTNRKFSE.js";import"./chunk-JG2TIZ7E.js";import"./chunk-U6CJ3EHB.js";import"./chunk-SNBSRIKO.js";import"./chunk-24Q4J4U6.js";import"./chunk-ZY44NCRQ.js";import"./chunk-UM7IG4DE.js";import"./chunk-VENH5KLL.js";import"./chunk-FQ3OHHCY.js";import"./chunk-JKRVWCTC.js";import"./chunk-ZPCQFQEN.js";import"./chunk-WNZOJDBL.js";import"./chunk-XGUCAKZM.js";import"./chunk-DC4MQAR3.js";export{f as discoverSootsimUrl,c as getLastFlowPreviewUploadResult,d as getLastFlowTraceSteps,h as hoistLeadingSimFlag,a as parseFlowFile,e as resolveAppFrontmatterTarget,g as runFlowPlayback,i as runMaestroAuthoring,b as validateFlowFile};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a,b,c}from"./chunk-7D56NCJ3.js";import"./chunk-EIIZZ2XK.js";import"./chunk-WIYBEKBM.js";import"./chunk-NJ2JVAGV.js";import"./chunk-BAXXUHKV.js";import"./chunk-DTNRKFSE.js";import"./chunk-24Q4J4U6.js";import"./chunk-VENH5KLL.js";import"./chunk-WNZOJDBL.js";import"./chunk-IQWQ6KI7.js";import"./chunk-XGUCAKZM.js";import"./chunk-HY7XOD5E.js";import"./chunk-DC4MQAR3.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import"./chunk-GKGXULJK.js";import{b as n}from"./chunk-VLBN3KRC.js";import"./chunk-LAQGSSTT.js";var e=["do","get"];function i(t){if(t.command)return t;let o=t.commandArgs.find(r=>!r.startsWith("-"));if(!o)return t;for(let r of e)if(n(r,o))return{...t,command:r};return t}export{i as resolveHiddenRuntimeAlias};
4
+ import"./chunk-UM7IG4DE.js";import{b as n}from"./chunk-VENH5KLL.js";import"./chunk-DC4MQAR3.js";var e=["do","get"];function i(t){if(t.command)return t;let o=t.commandArgs.find(r=>!r.startsWith("-"));if(!o)return t;for(let r of e)if(n(r,o))return{...t,command:r};return t}export{i as resolveHiddenRuntimeAlias};
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-LRM2XCEQ.js";import"./chunk-LAQGSSTT.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGES_DIR,a as SOOTSIM_HOME_ENV,L as activeRuntimeDir,m as activeRuntimeFile,v as cacheDir,r as cameraFixturesDir,T as claimDaemonLockfile,z as configFilePath,H as consumeRuntimeUpgradeNotice,t as daemonAppBundlePath,s as daemonAppDir,u as daemonAppLauncherPath,w as daemonLockfilePath,y as devBridgeLockfilePath,x as devBridgesDir,n as electronDir,o as electronUserDataDir,p as electronVersionDir,I as ensureSootsimHome,O as isDaemonLockfileFresh,P as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,q as profilesDir,J as readActiveRuntime,M as readDaemonLockfile,N as readDevBridgeLockfiles,Q as readLiveRuntimeVersions,E as readOrCreateAnonymousId,C as readPrivacyPreferences,A as readSharedConfig,U as removeDaemonLockfile,V as removeDevBridgeLockfile,l as runtimeDir,F as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,K as writeActiveRuntime,R as writeDaemonLockfile,S as writeDevBridgeLockfile,D as writePrivacyPreferences,G as writeRuntimeUpgradeNotice,B as writeSharedConfig};
4
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-WNZOJDBL.js";import"./chunk-DC4MQAR3.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGES_DIR,a as SOOTSIM_HOME_ENV,L as activeRuntimeDir,m as activeRuntimeFile,v as cacheDir,r as cameraFixturesDir,T as claimDaemonLockfile,z as configFilePath,H as consumeRuntimeUpgradeNotice,t as daemonAppBundlePath,s as daemonAppDir,u as daemonAppLauncherPath,w as daemonLockfilePath,y as devBridgeLockfilePath,x as devBridgesDir,n as electronDir,o as electronUserDataDir,p as electronVersionDir,I as ensureSootsimHome,O as isDaemonLockfileFresh,P as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,q as profilesDir,J as readActiveRuntime,M as readDaemonLockfile,N as readDevBridgeLockfiles,Q as readLiveRuntimeVersions,E as readOrCreateAnonymousId,C as readPrivacyPreferences,A as readSharedConfig,U as removeDaemonLockfile,V as removeDevBridgeLockfile,l as runtimeDir,F as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,K as writeActiveRuntime,R as writeDaemonLockfile,S as writeDevBridgeLockfile,D as writePrivacyPreferences,G as writeRuntimeUpgradeNotice,B as writeSharedConfig};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{i as a,j as b}from"./chunk-HWAGFGV7.js";import"./chunk-4RI6KXVH.js";import"./chunk-EEZEVA2C.js";import"./chunk-XB7DLZNQ.js";import"./chunk-WIYBEKBM.js";import"./chunk-JP4FCK5J.js";import"./chunk-4KOWLH77.js";import"./chunk-QJYUHYQS.js";import"./chunk-LRRQI4TP.js";import"./chunk-2E5KDIGN.js";import"./chunk-NJ2JVAGV.js";import"./chunk-2W4ME6YI.js";import"./chunk-BAXXUHKV.js";import"./chunk-SYQZTZTR.js";import"./chunk-JQTBZERT.js";import"./chunk-3SPBSEVL.js";import"./chunk-7C6XE6AT.js";import"./chunk-O7WPHIYQ.js";import"./chunk-DTNRKFSE.js";import"./chunk-JG2TIZ7E.js";import"./chunk-U6CJ3EHB.js";import"./chunk-SNBSRIKO.js";import"./chunk-24Q4J4U6.js";import"./chunk-ZY44NCRQ.js";import"./chunk-UM7IG4DE.js";import"./chunk-VENH5KLL.js";import"./chunk-FQ3OHHCY.js";import"./chunk-JKRVWCTC.js";import"./chunk-ZPCQFQEN.js";import"./chunk-WNZOJDBL.js";import"./chunk-XGUCAKZM.js";import"./chunk-DC4MQAR3.js";export{a as printShellPerfReport,b as runInspect};
@@ -0,0 +1,4 @@
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import { createRequire as __sootsimCreateRequire } from 'node:module'
3
+ var require = __sootsimCreateRequire(import.meta.url)
4
+ import{a}from"./chunk-LWE2HRS4.js";import"./chunk-U6CJ3EHB.js";import"./chunk-SMLCC5EP.js";import"./chunk-DC4MQAR3.js";export{a as runInstallDesktop};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (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 p,d as k}from"./chunk-PLB6UVVX.js";import"./chunk-LRM2XCEQ.js";import{a as b}from"./chunk-PLUWN2V5.js";import"./chunk-LAQGSSTT.js";import{exec as x}from"node:child_process";import{randomBytes as T}from"node:crypto";import R from"node:http";var w=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev";function L(t){return t||(process.env.SOOTSIM_AUTH_ORIGIN?process.env.SOOTSIM_AUTH_ORIGIN:process.env.SOOTSIM_UPLOAD_ORIGIN?process.env.SOOTSIM_UPLOAD_ORIGIN:w)}function _(){console.log(`
4
+ import{b as p,d as k}from"./chunk-23WNLQUB.js";import"./chunk-WNZOJDBL.js";import{a as b}from"./chunk-XGUCAKZM.js";import"./chunk-DC4MQAR3.js";import{exec as x}from"node:child_process";import{randomBytes as T}from"node:crypto";import R from"node:http";var w=process.env.SOOTSIM_AUTH_ORIGIN||"https://contrast.dev";function L(t){return t||(process.env.SOOTSIM_AUTH_ORIGIN?process.env.SOOTSIM_AUTH_ORIGIN:process.env.SOOTSIM_UPLOAD_ORIGIN?process.env.SOOTSIM_UPLOAD_ORIGIN:w)}function _(){console.log(`
5
5
  rnx login \u2014 sign in so uploads can attach to your account
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as e,c as t}from"./chunk-PLB6UVVX.js";import"./chunk-LRM2XCEQ.js";import"./chunk-LAQGSSTT.js";async function r(){let o=e();if(!o?.token){console.log(" not signed in");return}try{await fetch(`${o.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${o.token}`}})}catch{}t(),console.log(" signed out")}export{r as runLogout};
4
+ import{a as e,c as t}from"./chunk-23WNLQUB.js";import"./chunk-WNZOJDBL.js";import"./chunk-DC4MQAR3.js";async function r(){let o=e();if(!o?.token){console.log(" not signed in");return}try{await fetch(`${o.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${o.token}`}})}catch{}t(),console.log(" signed out")}export{r as runLogout};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{c as E,d as O,g as L,h as R,i as P}from"./chunk-5GXRRUOA.js";import"./chunk-7GO2DSYQ.js";import"./chunk-4ZILDTZX.js";import{b as k}from"./chunk-BCQV63BW.js";import"./chunk-DPP2M4AJ.js";import{a as S}from"./chunk-A2Q76LJV.js";import"./chunk-UVOEHIGP.js";import{b as $,c as F,d as T,e as M}from"./chunk-TMRD5MHL.js";import{a as A}from"./chunk-7LGINKM6.js";import"./chunk-PLB6UVVX.js";import"./chunk-WU72KL6Z.js";import"./chunk-3DBTS4MC.js";import"./chunk-4OKV7T5D.js";import"./chunk-KRZPFXVN.js";import"./chunk-63ASUHOV.js";import"./chunk-TOF5TA5X.js";import"./chunk-U5YHXQHH.js";import"./chunk-7V4KPZ7O.js";import"./chunk-RB4VFUNM.js";import"./chunk-R7ZNRGQN.js";import"./chunk-RTDHX6CW.js";import"./chunk-E2RGSCHT.js";import"./chunk-ZMTZ5G5H.js";import"./chunk-4BIPA7MD.js";import"./chunk-KA4PJNTE.js";import"./chunk-NUPRHZQW.js";import"./chunk-EPLVIDPC.js";import"./chunk-QNRWPAOA.js";import"./chunk-KZFJNDH3.js";import"./chunk-HXE344V3.js";import"./chunk-GKGXULJK.js";import"./chunk-VLBN3KRC.js";import"./chunk-TEU5NGUA.js";import"./chunk-YVSUFVVB.js";import"./chunk-BHKSCNDC.js";import"./chunk-LRM2XCEQ.js";import"./chunk-PLUWN2V5.js";import"./chunk-LAQGSSTT.js";import*as n from"fs";import*as a from"path";var I=[".maestro","maestro"];function W(){console.log(`
4
+ import{c as E,d as O,g as L,h as R,i as P}from"./chunk-3HBHHU5F.js";import"./chunk-TAYE2YII.js";import"./chunk-ABBCVE5V.js";import{b as k}from"./chunk-HWAGFGV7.js";import"./chunk-4RI6KXVH.js";import{a as S}from"./chunk-EEZEVA2C.js";import"./chunk-XB7DLZNQ.js";import{b as $,c as F,d as T,e as M}from"./chunk-IS2LT6MN.js";import{a as A}from"./chunk-2UZ6QQ6S.js";import"./chunk-23WNLQUB.js";import"./chunk-WIYBEKBM.js";import"./chunk-JP4FCK5J.js";import"./chunk-4KOWLH77.js";import"./chunk-QJYUHYQS.js";import"./chunk-LRRQI4TP.js";import"./chunk-2E5KDIGN.js";import"./chunk-NJ2JVAGV.js";import"./chunk-2W4ME6YI.js";import"./chunk-BAXXUHKV.js";import"./chunk-SYQZTZTR.js";import"./chunk-JQTBZERT.js";import"./chunk-3SPBSEVL.js";import"./chunk-7C6XE6AT.js";import"./chunk-O7WPHIYQ.js";import"./chunk-DTNRKFSE.js";import"./chunk-JG2TIZ7E.js";import"./chunk-U6CJ3EHB.js";import"./chunk-SNBSRIKO.js";import"./chunk-24Q4J4U6.js";import"./chunk-ZY44NCRQ.js";import"./chunk-UM7IG4DE.js";import"./chunk-VENH5KLL.js";import"./chunk-FQ3OHHCY.js";import"./chunk-JKRVWCTC.js";import"./chunk-ZPCQFQEN.js";import"./chunk-WNZOJDBL.js";import"./chunk-XGUCAKZM.js";import"./chunk-DC4MQAR3.js";import*as n from"fs";import*as a from"path";var I=[".maestro","maestro"];function W(){console.log(`
5
5
  rnx maestro \u2014 author and run Maestro YAML flows against rnx
6
6
 
7
7
  usage:
@@ -91,7 +91,7 @@ appId: com.example.app
91
91
  - inputText: "secret123"
92
92
  - tapOn: "Sign in"
93
93
  - assertVisible: "Welcome"
94
- `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: rnx maestro test .maestro/login.yaml"),0)}async function Q(t,s={}){if(t.includes("--help")||t.includes("-h"))return W(),0;if(t.includes("--list-compat"))return D(),0;let e;try{e=Y(t)}catch(o){return console.error(` error: ${o.message}`),1}e=R(e);let r=process.cwd(),i=e[0];if(i==="init")return _(r);if(i==="generate"){let{runMaestroGenerate:o}=await import("./maestro-generate-D3ZIJCRL.js");return o(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return P(e);e=J(e);let c=null,p;if(i==="test"){let o=e.slice(1).find(f=>!U(f));o?(c=a.resolve(r,o),p=e.slice(1).filter(f=>f!==o)):(c=j(r),p=e.slice(1))}else i&&!U(i)?(c=a.resolve(r,i),p=e.slice(1)):(c=j(r),p=e);if(!c)return console.error(`
94
+ `,"utf8"),console.log(` + wrote ${e}`),console.log(" next: rnx maestro test .maestro/login.yaml"),0)}async function Q(t,s={}){if(t.includes("--help")||t.includes("-h"))return W(),0;if(t.includes("--list-compat"))return D(),0;let e;try{e=Y(t)}catch(o){return console.error(` error: ${o.message}`),1}e=R(e);let r=process.cwd(),i=e[0];if(i==="init")return _(r);if(i==="generate"){let{runMaestroGenerate:o}=await import("./maestro-generate-FJWDLMEB.js");return o(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return P(e);e=J(e);let c=null,p;if(i==="test"){let o=e.slice(1).find(f=>!U(f));o?(c=a.resolve(r,o),p=e.slice(1).filter(f=>f!==o)):(c=j(r),p=e.slice(1))}else i&&!U(i)?(c=a.resolve(r,i),p=e.slice(1)):(c=j(r),p=e);if(!c)return console.error(`
95
95
  error: no maestro flows found.
96
96
  expected one of: ${I.map(o=>`./${o}/`).join(", ")}
97
97
  or pass a flow explicitly: rnx maestro test path/to/flow.yaml
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as x}from"./chunk-A2Q76LJV.js";import{b as O,d as A,e as E}from"./chunk-TMRD5MHL.js";import{a as S,b as T}from"./chunk-7LGINKM6.js";import"./chunk-PLB6UVVX.js";import"./chunk-63ASUHOV.js";import"./chunk-TOF5TA5X.js";import"./chunk-R7ZNRGQN.js";import"./chunk-E2RGSCHT.js";import{f as v}from"./chunk-4BIPA7MD.js";import{q as y,s as b}from"./chunk-KA4PJNTE.js";import"./chunk-KZFJNDH3.js";import"./chunk-LRM2XCEQ.js";import"./chunk-PLUWN2V5.js";import"./chunk-LAQGSSTT.js";import{mkdtempSync as B,writeFileSync as N}from"fs";import{tmpdir as C}from"os";import{join as k}from"path";var J=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",_=18e3,j=18e4;function f(e,t){let r=e.indexOf(t);return r>=0?e[r+1]:void 0}function V(e,t){for(let r of t){let o=f(e,r);if(o)return o}}var F=new Set(["--origin","--preview-origin","--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]);function G(e){for(let t=0;t<e.length;t++){let r=e[t];if(r){if(F.has(r)){t+=1;continue}if(!r.startsWith("-"))return{prompt:r,index:t}}}return null}function H(e,t){return e.filter((r,o)=>o!==t)}async function Y(e,t){let r=H(e,t),o=y(r,{stripBooleanFlags:["--new","--headless","--headed","--electron","--preview-open"],stripValueFlags:[...F]}),i=b(o);try{let n=await v(i,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),s=[n.shell?`shell: ${JSON.stringify(n.shell)}`:"",n.keyboard?`keyboard: ${JSON.stringify(n.keyboard)}`:"",typeof n.nodeCount=="number"?`nodes: ${n.nodeCount}`:"",n.tree||""].filter(Boolean).join(`
4
+ import{a as x}from"./chunk-EEZEVA2C.js";import{b as O,d as A,e as E}from"./chunk-IS2LT6MN.js";import{a as S,b as T}from"./chunk-2UZ6QQ6S.js";import"./chunk-23WNLQUB.js";import"./chunk-LRRQI4TP.js";import"./chunk-2E5KDIGN.js";import"./chunk-SYQZTZTR.js";import"./chunk-3SPBSEVL.js";import{f as v}from"./chunk-O7WPHIYQ.js";import{q as y,s as b}from"./chunk-DTNRKFSE.js";import"./chunk-24Q4J4U6.js";import"./chunk-WNZOJDBL.js";import"./chunk-XGUCAKZM.js";import"./chunk-DC4MQAR3.js";import{mkdtempSync as B,writeFileSync as N}from"fs";import{tmpdir as C}from"os";import{join as k}from"path";var J=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",_=18e3,j=18e4;function f(e,t){let r=e.indexOf(t);return r>=0?e[r+1]:void 0}function V(e,t){for(let r of t){let o=f(e,r);if(o)return o}}var F=new Set(["--origin","--preview-origin","--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]);function G(e){for(let t=0;t<e.length;t++){let r=e[t];if(r){if(F.has(r)){t+=1;continue}if(!r.startsWith("-"))return{prompt:r,index:t}}}return null}function H(e,t){return e.filter((r,o)=>o!==t)}async function Y(e,t){let r=H(e,t),o=y(r,{stripBooleanFlags:["--new","--headless","--headed","--electron","--preview-open"],stripValueFlags:[...F]}),i=b(o);try{let n=await v(i,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),s=[n.shell?`shell: ${JSON.stringify(n.shell)}`:"",n.keyboard?`keyboard: ${JSON.stringify(n.keyboard)}`:"",typeof n.nodeCount=="number"?`nodes: ${n.nodeCount}`:"",n.tree||""].filter(Boolean).join(`
5
5
  `);return s.length>_?s.slice(0,_)+`
6
6
  [tree truncated]`:s}finally{i.close()}}var K=`
7
7
  You write Maestro-compatible rnx YAML flows from a user's plain-language test goal.
@@ -32,5 +32,5 @@ ${t||"[no tree available]"}
32
32
 
33
33
  Generate the shortest replayable flow that verifies the goal from this current state.
34
34
  `.trim()}async function z(e){let t=await fetch(`${e.origin.replace(/\/$/,"")}/api/llm`,{method:"POST",headers:{"content-type":"application/json",authorization:e.authHeader},body:JSON.stringify({modelId:J,context:{systemPrompt:K,messages:[{role:"user",content:X(e.prompt,e.describe),timestamp:Date.now()}]},options:{maxTokens:1800,temperature:.2},threadId:null}),signal:AbortSignal.timeout(j)});if(!t.ok||!t.body){let a=await t.text().catch(()=>"");throw new Error(`/api/llm ${t.status}${a?`: ${a}`:""}`)}let r=t.body.getReader(),o=new TextDecoder,i=[],n="",c=a=>{let l=a.trim();if(!l)return;let u=JSON.parse(l);if(u.type==="text_delta"&&u.delta)i.push(u.delta);else if(u.type==="error")throw new Error(u.errorMessage||"llm error")};for(;;){let{value:a,done:l}=await r.read();if(l)break;n+=o.decode(a,{stream:!0});let u;for(;(u=n.indexOf(`
35
- `))>=0;)c(n.slice(0,u)),n=n.slice(u+1)}n+=o.decode(),n.trim()&&c(n);let s=i.join("").trim();if(!s)throw new Error("llm returned an empty test flow");return s}function W(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),r=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(r)}function P(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function q(e){let t=W(e);if(!P(t))throw new Error("llm did not return a JSON object");let r=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"rnx generated test",o=t.steps;if(!Array.isArray(o)||o.length===0)throw new Error("llm returned no flow steps");let i=o.map((n,c)=>{if(!P(n))throw new Error(`flow step ${c+1} is not an object`);return n});return{summary:r,steps:i,yamlText:x.stringify(i)}}function Q(e,t,r,o){let i=[r,"--preview","--preview-origin",o,"--billing-kind","test_run"],n=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),c=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let s=0;s<e.length;s++){if(s===t)continue;let a=e[s];if(a==="--origin"||a==="--preview-origin"){s+=1;continue}if(a==="--public-origin"){let l=e[s+1];l&&i.push("--preview-public-origin",l),s+=1;continue}if(n.has(a)){let l=e[s+1];l&&i.push(a,l),s+=1;continue}c.has(a)&&i.push(a)}return i}async function le(e){let t=G(e);if(!t)return console.error(' usage: rnx maestro generate "test goal"'),1;let{prompt:r,index:o}=t,i=S();if(!i||i.kind==="github")return console.error(' rnx maestro generate "<goal>" needs a login or RNX_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),1;let n=T(i),c=await E(V(e,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let s=await Y(e,o);console.log(" generating Maestro flow\u2026");let a=await z({prompt:r,describe:s,origin:c,authHeader:n}),l=q(a),u=B(k(C(),"sootsim-maestro-generate-")),p=k(u,"flow.yaml");N(p,l.yamlText),console.log(` flow: ${p}`);let M=Date.now(),{runFlowPlayback:I,getLastFlowPreviewUploadResult:$,getLastFlowTraceSteps:D}=await import("./flow-ONZGGFGD.js"),L=Q(e,o,p,c),w=await I(L),m=$(),h=D(),R=h.find(U=>U.status==="failure"),g=w===0?"passed":"failed",d=await A({origin:c,kind:"maestro",prompt:r,summary:l.summary,status:g,failureMessage:g==="failed"?R?.error??"flow playback failed":null,previewShareId:m?.shareId??null,owner:f(e,"--owner")??null,repo:f(e,"--repo")??null,durationMs:Date.now()-M,flowYamlSizeBytes:Buffer.byteLength(l.yamlText,"utf8"),...O(h),auth:i});return console.log(`
35
+ `))>=0;)c(n.slice(0,u)),n=n.slice(u+1)}n+=o.decode(),n.trim()&&c(n);let s=i.join("").trim();if(!s)throw new Error("llm returned an empty test flow");return s}function W(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),r=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(r)}function P(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function q(e){let t=W(e);if(!P(t))throw new Error("llm did not return a JSON object");let r=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"rnx generated test",o=t.steps;if(!Array.isArray(o)||o.length===0)throw new Error("llm returned no flow steps");let i=o.map((n,c)=>{if(!P(n))throw new Error(`flow step ${c+1} is not an object`);return n});return{summary:r,steps:i,yamlText:x.stringify(i)}}function Q(e,t,r,o){let i=[r,"--preview","--preview-origin",o,"--billing-kind","test_run"],n=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),c=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let s=0;s<e.length;s++){if(s===t)continue;let a=e[s];if(a==="--origin"||a==="--preview-origin"){s+=1;continue}if(a==="--public-origin"){let l=e[s+1];l&&i.push("--preview-public-origin",l),s+=1;continue}if(n.has(a)){let l=e[s+1];l&&i.push(a,l),s+=1;continue}c.has(a)&&i.push(a)}return i}async function le(e){let t=G(e);if(!t)return console.error(' usage: rnx maestro generate "test goal"'),1;let{prompt:r,index:o}=t,i=S();if(!i||i.kind==="github")return console.error(' rnx maestro generate "<goal>" needs a login or RNX_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),1;let n=T(i),c=await E(V(e,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let s=await Y(e,o);console.log(" generating Maestro flow\u2026");let a=await z({prompt:r,describe:s,origin:c,authHeader:n}),l=q(a),u=B(k(C(),"sootsim-maestro-generate-")),p=k(u,"flow.yaml");N(p,l.yamlText),console.log(` flow: ${p}`);let M=Date.now(),{runFlowPlayback:I,getLastFlowPreviewUploadResult:$,getLastFlowTraceSteps:D}=await import("./flow-6VQN4VNW.js"),L=Q(e,o,p,c),w=await I(L),m=$(),h=D(),R=h.find(U=>U.status==="failure"),g=w===0?"passed":"failed",d=await A({origin:c,kind:"maestro",prompt:r,summary:l.summary,status:g,failureMessage:g==="failed"?R?.error??"flow playback failed":null,previewShareId:m?.shareId??null,owner:f(e,"--owner")??null,repo:f(e,"--repo")??null,durationMs:Date.now()-M,flowYamlSizeBytes:Buffer.byteLength(l.yamlText,"utf8"),...O(h),auth:i});return console.log(`
36
36
  result: ${g}`),d&&console.log(` run: ${d.id}`),m?.previewUrl&&console.log(` preview: ${m.previewUrl}`),d?.traceUrl&&console.log(` replay: ${d.traceUrl}`),w}export{le as runMaestroGenerate};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (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,b as s}from"./chunk-QNBBKRCA.js";import"./chunk-KA4PJNTE.js";import"./chunk-KZFJNDH3.js";import"./chunk-LRM2XCEQ.js";import"./chunk-LAQGSSTT.js";async function i(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
4
+ import{a as r,b as s}from"./chunk-4KK5IRA6.js";import"./chunk-DTNRKFSE.js";import"./chunk-24Q4J4U6.js";import"./chunk-WNZOJDBL.js";import"./chunk-DC4MQAR3.js";async function i(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
5
5
  rnx mode screenshot \u2014 toggle the screenshot-mode chrome overlay
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.345 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.347 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a,b,c,d}from"./chunk-R7ZNRGQN.js";import"./chunk-LAQGSSTT.js";export{d as __withOptionalDemoAppsForTests,a as findInternalDemoRegistry,b as loadOptionalDemoApps,c as optionalDemoAppsSync};
4
+ import{a,b,c,d}from"./chunk-SYQZTZTR.js";import"./chunk-DC4MQAR3.js";export{d as __withOptionalDemoAppsForTests,a as findInternalDemoRegistry,b as loadOptionalDemoApps,c as optionalDemoAppsSync};