sootsim 0.1.52 → 0.1.53

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 (139) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-RUWGJCSS.js → agent-PA7ZGTHU.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-FBCGP5N7.js → agent-wrapper-CVZFXQKJ.js} +2 -2
  4. package/dist-cli/chunks/{assert-IOU2NWE2.js → assert-6LHIY63B.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-SVBAUCSM.js +2 -0
  6. package/dist-cli/chunks/beta-YEBFYYIB.js +2 -0
  7. package/dist-cli/chunks/{chunk-EYRQG47K.js → chunk-2ZBZCRN6.js} +1 -1
  8. package/dist-cli/chunks/{chunk-EJYVXNQL.js → chunk-5Q3XBH5M.js} +2 -2
  9. package/dist-cli/chunks/{chunk-MWGIKDXO.js → chunk-5U2BN4IU.js} +2 -2
  10. package/dist-cli/chunks/{chunk-H4G7IRXG.js → chunk-6A4CZMPO.js} +2 -2
  11. package/dist-cli/chunks/{chunk-HRIQRZX3.js → chunk-6JZNIGOQ.js} +1 -1
  12. package/dist-cli/chunks/{chunk-EQPRFEHH.js → chunk-7IYYIF5B.js} +2 -2
  13. package/dist-cli/chunks/{chunk-FPIJBBYW.js → chunk-7ZHWA3WD.js} +2 -2
  14. package/dist-cli/chunks/{chunk-UCCSXQ2P.js → chunk-AFXPU7YQ.js} +3 -3
  15. package/dist-cli/chunks/{chunk-I5WEW3ES.js → chunk-AYU6WUNF.js} +1 -1
  16. package/dist-cli/chunks/{chunk-Q2424XB2.js → chunk-AZYLZGRV.js} +1 -1
  17. package/dist-cli/chunks/{chunk-ABEYZDD7.js → chunk-BPXSSZJS.js} +2 -2
  18. package/dist-cli/chunks/chunk-CKZSGUTE.js +2 -0
  19. package/dist-cli/chunks/{chunk-PZJSYDQ7.js → chunk-CRUPWYHV.js} +3 -3
  20. package/dist-cli/chunks/{chunk-DNKB2V2W.js → chunk-CTDDR7HW.js} +2 -2
  21. package/dist-cli/chunks/{chunk-IQU56D6C.js → chunk-CTGH5SFH.js} +1 -1
  22. package/dist-cli/chunks/{chunk-IXITVIJV.js → chunk-CW2X4KRW.js} +2 -2
  23. package/dist-cli/chunks/{chunk-JPLTR6JM.js → chunk-E3S6U2QR.js} +1 -1
  24. package/dist-cli/chunks/{chunk-UXE5BFPK.js → chunk-E4JTYQVY.js} +2 -2
  25. package/dist-cli/chunks/chunk-ELEP2COQ.js +3 -0
  26. package/dist-cli/chunks/{chunk-U3UHXJNE.js → chunk-ERC46HTZ.js} +1 -1
  27. package/dist-cli/chunks/{chunk-4TSGUAV3.js → chunk-FDA2NX2E.js} +2 -2
  28. package/dist-cli/chunks/{chunk-MBH3NFBC.js → chunk-GWGF4J4Y.js} +2 -2
  29. package/dist-cli/chunks/chunk-H4C3WE3C.js +1 -0
  30. package/dist-cli/chunks/{chunk-BF7F45CZ.js → chunk-IS5ORPFW.js} +2 -2
  31. package/dist-cli/chunks/{chunk-6QDFLMJL.js → chunk-LELB2PV3.js} +1 -1
  32. package/dist-cli/chunks/chunk-LL3XAMKC.js +16 -0
  33. package/dist-cli/chunks/{chunk-MSKCUZ5B.js → chunk-LYHVX7TD.js} +3 -3
  34. package/dist-cli/chunks/{chunk-YDKXZS7D.js → chunk-MX5HFYST.js} +1 -1
  35. package/dist-cli/chunks/{chunk-USGUHWUJ.js → chunk-N3RWXMD3.js} +2 -2
  36. package/dist-cli/chunks/chunk-NIHI6NXE.js +1 -0
  37. package/dist-cli/chunks/chunk-QTVGSFY6.js +305 -0
  38. package/dist-cli/chunks/{chunk-T6RAXKVI.js → chunk-R3VVVXF3.js} +2 -2
  39. package/dist-cli/chunks/{chunk-JPX7OS7B.js → chunk-R5XV3WIE.js} +2 -2
  40. package/dist-cli/chunks/{chunk-3DDSYQHM.js → chunk-RBXJA2PW.js} +2 -2
  41. package/dist-cli/chunks/{chunk-7Y3FYPJH.js → chunk-SQZXAKBL.js} +2 -2
  42. package/dist-cli/chunks/{chunk-CTEXZ7BE.js → chunk-STWL7EXR.js} +1 -1
  43. package/dist-cli/chunks/{chunk-GNQSOQXZ.js → chunk-WBAIONOO.js} +2 -2
  44. package/dist-cli/chunks/{chunk-3MIWVHCX.js → chunk-WXOAHKCZ.js} +1 -1
  45. package/dist-cli/chunks/{chunk-FVBSPGBR.js → chunk-XBP7BBSF.js} +2 -2
  46. package/dist-cli/chunks/{chunk-PDZ4JVAW.js → chunk-XC3T7UDH.js} +1 -1
  47. package/dist-cli/chunks/chunk-XO4UV6EO.js +1 -0
  48. package/dist-cli/chunks/chunk-YCPH4ZTS.js +2 -0
  49. package/dist-cli/chunks/{chunk-MTE3DEWY.js → chunk-YEE4EO2P.js} +1 -1
  50. package/dist-cli/chunks/{chunk-EXQJSXDF.js → chunk-ZYITMTYD.js} +1 -1
  51. package/dist-cli/chunks/cli-version-NMWGV7OU.js +2 -0
  52. package/dist-cli/chunks/{compat-ZBLH6EWV.js → compat-CHBJ7TDK.js} +3 -3
  53. package/dist-cli/chunks/{config-DH2GG63H.js → config-XTZOLM5E.js} +2 -2
  54. package/dist-cli/chunks/control-XAZGNLFM.js +2 -0
  55. package/dist-cli/chunks/{cpu-profile-3PRCXZMV.js → cpu-profile-EQHKYVOF.js} +2 -2
  56. package/dist-cli/chunks/{daemon-XSFKUDKZ.js → daemon-K42MZR2E.js} +2 -2
  57. package/dist-cli/chunks/{debug-VAWCOXQ3.js → debug-ULTTL5L2.js} +3 -3
  58. package/dist-cli/chunks/demo-app-registry-SO43B5HW.js +2 -0
  59. package/dist-cli/chunks/{detox-UABOFTDQ.js → detox-LU3G3EBC.js} +2 -2
  60. package/dist-cli/chunks/{device-LCB4N66D.js → device-RYW4ZE4R.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-MT3WMY4M.js → diagnose-5YQAXWFB.js} +2 -2
  62. package/dist-cli/chunks/drivers-SXP44QNY.js +2 -0
  63. package/dist-cli/chunks/{electron-WVNFRA4S.js → electron-ORBIXXTP.js} +3 -3
  64. package/dist-cli/chunks/flow-GP7GAXLT.js +2 -0
  65. package/dist-cli/chunks/{hints-PFAKBGFX.js → hints-V4SHPWCI.js} +2 -2
  66. package/dist-cli/chunks/{home-paths-X6RB72PF.js → home-paths-UYEDTYXU.js} +2 -2
  67. package/dist-cli/chunks/{inspect-UFYXDO6B.js → inspect-K2FN4JPL.js} +96 -124
  68. package/dist-cli/chunks/install-R4H47HDX.js +2 -0
  69. package/dist-cli/chunks/{install-desktop-W6QJX52Y.js → install-desktop-BDDNVONK.js} +3 -3
  70. package/dist-cli/chunks/{keys-ORDSAMP7.js → keys-QH5VOSUK.js} +2 -2
  71. package/dist-cli/chunks/{launch-NQZTWTPY.js → launch-K2LP5XFZ.js} +3 -3
  72. package/dist-cli/chunks/{login-J2NVLHK5.js → login-5AJTPRVD.js} +4 -4
  73. package/dist-cli/chunks/{logout-HI7A6PFH.js → logout-45VCRSXX.js} +2 -2
  74. package/dist-cli/chunks/{maestro-KIOOFK5M.js → maestro-5LDII3YE.js} +2 -2
  75. package/dist-cli/chunks/{preview-QUJO4B4G.js → preview-IA2UUMLO.js} +2 -2
  76. package/dist-cli/chunks/{profile-U6RWYQV2.js → profile-ZALUAYTJ.js} +2 -2
  77. package/dist-cli/chunks/{react-3V65RTQC.js → react-KJBOHVG7.js} +2 -2
  78. package/dist-cli/chunks/{record-476LFCQV.js → record-UI226Z7F.js} +2 -2
  79. package/dist-cli/chunks/runtime-JNHCYB5L.js +2 -0
  80. package/dist-cli/chunks/{runtime-delivery-BSRHUXJQ.js → runtime-delivery-Y4QVOPLO.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-2S3BCN35.js → screenshot-SV5S4UGU.js} +2 -2
  82. package/dist-cli/chunks/{screenshot-mode-SZCHOYZV.js → screenshot-mode-NCISGI6W.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-LGP7LA3M.js → screenshots-MQZDYKF5.js} +2 -2
  84. package/dist-cli/chunks/{server-G4BGS6GE.js → server-RLDTPMHN.js} +2 -2
  85. package/dist-cli/chunks/setup-repo-F4RNWTDL.js +2 -0
  86. package/dist-cli/chunks/{skills-2YOLQVV6.js → skills-NECP76E4.js} +2 -2
  87. package/dist-cli/chunks/{start-SF3I4SLN.js → start-K4ASMK7D.js} +4 -4
  88. package/dist-cli/chunks/store-TLB2YDDQ.js +2 -0
  89. package/dist-cli/chunks/telemetry-EXCKYRZL.js +2 -0
  90. package/dist-cli/chunks/{test-YYHXTVDI.js → test-YJLRC3IE.js} +3 -3
  91. package/dist-cli/chunks/three-mode-NAAIMEHL.js +54 -0
  92. package/dist-cli/chunks/{timeline-IOEIFEH2.js → timeline-BJXCTH7E.js} +2 -2
  93. package/dist-cli/chunks/{upgrade-YF2U5QJY.js → upgrade-NRJOML2W.js} +2 -2
  94. package/dist-cli/chunks/upload-BQTZTOJL.js +2 -0
  95. package/dist-cli/chunks/{web-GAOXH77P.js → web-P3IP7M5Q.js} +2 -2
  96. package/dist-cli/chunks/{what-happened-DBI2RQVE.js → what-happened-5Q2RBX5R.js} +2 -2
  97. package/dist-cli/chunks/{whoami-YDAMLYNA.js → whoami-7W6WPTVA.js} +2 -2
  98. package/dist-lib/agent-daemon-client.cjs +1 -1
  99. package/dist-lib/agent-events.cjs +1 -1
  100. package/dist-lib/agent-sessions.cjs +1 -1
  101. package/dist-lib/attached-projects.cjs +1 -1
  102. package/dist-lib/auth/shared-session.cjs +1 -1
  103. package/dist-lib/backend-origin.cjs +1 -1
  104. package/dist-lib/bridge-constants.cjs +1 -1
  105. package/dist-lib/cli-constants.cjs +1 -1
  106. package/dist-lib/config.cjs +1 -1
  107. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  108. package/dist-lib/home-paths.cjs +1 -1
  109. package/dist-lib/host/bridge-host.cjs +1 -1
  110. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  111. package/dist-lib/index.cjs +1 -1
  112. package/dist-lib/metro.cjs +1 -1
  113. package/dist-lib/profiles.cjs +1 -1
  114. package/dist-lib/render-mode.cjs +1 -1
  115. package/dist-lib/vite-base.cjs +1 -1
  116. package/dist-lib/vite.cjs +1 -1
  117. package/package.json +1 -1
  118. package/dist-cli/chunks/auto-bootstrap-OYBDYAZM.js +0 -2
  119. package/dist-cli/chunks/beta-D4OEPOSE.js +0 -2
  120. package/dist-cli/chunks/chunk-2QNHBNWB.js +0 -16
  121. package/dist-cli/chunks/chunk-A3YSGT76.js +0 -37
  122. package/dist-cli/chunks/chunk-DSJ7PGU3.js +0 -2
  123. package/dist-cli/chunks/chunk-DVCE2KQL.js +0 -108
  124. package/dist-cli/chunks/chunk-KVQWMXDV.js +0 -2
  125. package/dist-cli/chunks/chunk-SEETW74F.js +0 -1
  126. package/dist-cli/chunks/chunk-ULHAQFCE.js +0 -1
  127. package/dist-cli/chunks/chunk-YVGHAT6Q.js +0 -1
  128. package/dist-cli/chunks/cli-version-2VO66OZ6.js +0 -2
  129. package/dist-cli/chunks/control-W3BOP6AT.js +0 -2
  130. package/dist-cli/chunks/demo-app-registry-7GNP7WE4.js +0 -2
  131. package/dist-cli/chunks/drivers-YGVUWGMB.js +0 -2
  132. package/dist-cli/chunks/flow-OUOMEOSC.js +0 -2
  133. package/dist-cli/chunks/install-NBUHIXEP.js +0 -2
  134. package/dist-cli/chunks/runtime-4TK5DY5R.js +0 -2
  135. package/dist-cli/chunks/setup-repo-5LUDPPSI.js +0 -2
  136. package/dist-cli/chunks/store-LLUQKQB7.js +0 -2
  137. package/dist-cli/chunks/telemetry-RDTORLS2.js +0 -2
  138. package/dist-cli/chunks/three-mode-5U3H4QDF.js +0 -39
  139. package/dist-cli/chunks/upload-3DFSK4NV.js +0 -2
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A as R,C as w,i as p,r as S,t as O,y as v,z as f}from"./chunk-JPLTR6JM.js";import{spawn as I}from"child_process";import C from"crypto";import s from"fs";import l from"path";import{Readable as k}from"stream";import{pipeline as M}from"stream/promises";var N="https://sootbean.com",D="SOOTSIM_CDN_ORIGIN",E="SOOTSIM_RUNTIME_CHANNEL";function $(){try{let e=JSON.parse(s.readFileSync(O(),"utf8"));return e&&typeof e=="object"?e:{}}catch{return{}}}function d(e){let t=$();return(e||process.env[D]||t.cdnOrigin||N).replace(/\/+$/,"")}function x(e){let t=$();return e||process.env[E]||t.runtimeChannel||"stable"}function T(e){let t=new URL(`${d(e)}/runtimes/manifest.json`);return t.searchParams.set("t",String(Date.now())),t.toString()}function P(e,t){return`${d(t)}/runtimes/sootsim-runtime-${e}.tar.gz`}async function y(e){let t=T(e),r=await fetch(t,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${t})`);return await r.json()}function U(e,t={}){let r=x(t.channel),n=t.version||e.channels[r]?.latest;if(!n)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let i=e.versions[n];if(!i)throw new Error(`version ${n} not found in manifest; available: ${Object.keys(e.versions).slice(-10).join(", ")||"(none)"}`);return{version:n,channel:r,entry:i}}async function V(e={}){v();let t=d(e.cdnOrigin),r=await y(t),{version:n,channel:i,entry:o}=U(r,e),a=p(n),c=e.setActive!==!1;if(!e.force&&s.existsSync(l.join(a,"index.html")))return c&&R(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!1,activated:c,manifest:r};let g=o.tarball||P(n,t),m=l.join(S(),`sootsim-runtime-${n}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${n}\u2026
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A as R,C as w,i as p,r as S,t as O,y as v,z as f}from"./chunk-E3S6U2QR.js";import{spawn as I}from"child_process";import C from"crypto";import s from"fs";import l from"path";import{Readable as k}from"stream";import{pipeline as M}from"stream/promises";var N="https://sootbean.com",D="SOOTSIM_CDN_ORIGIN",E="SOOTSIM_RUNTIME_CHANNEL";function $(){try{let e=JSON.parse(s.readFileSync(O(),"utf8"));return e&&typeof e=="object"?e:{}}catch{return{}}}function d(e){let t=$();return(e||process.env[D]||t.cdnOrigin||N).replace(/\/+$/,"")}function x(e){let t=$();return e||process.env[E]||t.runtimeChannel||"stable"}function T(e){let t=new URL(`${d(e)}/runtimes/manifest.json`);return t.searchParams.set("t",String(Date.now())),t.toString()}function P(e,t){return`${d(t)}/runtimes/sootsim-runtime-${e}.tar.gz`}async function y(e){let t=T(e),r=await fetch(t,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${t})`);return await r.json()}function U(e,t={}){let r=x(t.channel),n=t.version||e.channels[r]?.latest;if(!n)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let i=e.versions[n];if(!i)throw new Error(`version ${n} not found in manifest; available: ${Object.keys(e.versions).slice(-10).join(", ")||"(none)"}`);return{version:n,channel:r,entry:i}}async function V(e={}){v();let t=d(e.cdnOrigin),r=await y(t),{version:n,channel:i,entry:o}=U(r,e),a=p(n),c=e.setActive!==!1;if(!e.force&&s.existsSync(l.join(a,"index.html")))return c&&R(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!1,activated:c,manifest:r};let g=o.tarball||P(n,t),m=l.join(S(),`sootsim-runtime-${n}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${n}\u2026
3
3
  `),await _(g,m),process.stderr.write(`sootsim: extracting runtime ${n}\u2026
4
4
  `);let h=await j(m);if(h!==o.sha256)throw s.rmSync(m,{force:!0}),new Error(`sha256 mismatch for runtime ${n}: expected ${o.sha256}, actual ${h}`);let u=l.join(l.dirname(a),`.installing-${n}-${process.pid}`);s.rmSync(u,{recursive:!0,force:!0}),s.mkdirSync(u,{recursive:!0});try{if(await A(m,u),!s.existsSync(l.join(u,"index.html")))throw new Error(`extracted tarball for runtime ${n} is missing index.html`);s.rmSync(a,{recursive:!0,force:!0}),s.renameSync(u,a)}catch(b){throw s.rmSync(u,{recursive:!0,force:!0}),b}return c&&R(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!0,activated:c,manifest:r}}async function q(e={}){v();let t=d(e.cdnOrigin),r=x(e.channel),n=await y(t),i=n.channels[r]?.latest;if(!i)return{checked:!0,updated:!1,reason:`channel '${r}' has no latest runtime`,activeVersion:f()};if(!n.versions[i])return{checked:!0,updated:!1,reason:`manifest is missing version ${i}`,activeVersion:f(),latestVersion:i};let a=f(),c=a?p(a):null,g=c?s.existsSync(l.join(c,"index.html")):!1;if(!(!a||!g||w(i,a)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:a,latestVersion:i};let h=await V({version:i,channel:r,cdnOrigin:t,setActive:!1});return{checked:!0,updated:!0,activeVersion:i,latestVersion:i,install:h}}async function B(e={}){let t=f();try{let r=await y(d(e.cdnOrigin)),n=x(e.channel),i=r.channels[n]?.latest??null,o=!!(i&&(!t||w(i,t)>0));return{active:t,latest:i,outdated:o}}catch{return{active:t,latest:null,outdated:!1}}}async function _(e,t){let r=await fetch(e);if(!r.ok||!r.body)throw new Error(`download failed: ${r.status} ${r.statusText} (${e})`);s.mkdirSync(l.dirname(t),{recursive:!0});let n=`${t}.partial`;try{await M(k.fromWeb(r.body),s.createWriteStream(n)),s.renameSync(n,t)}catch(i){try{s.unlinkSync(n)}catch{}throw i}}function j(e){return new Promise((t,r)=>{let n=C.createHash("sha256"),i=s.createReadStream(e);i.on("data",o=>n.update(o)),i.on("error",r),i.on("end",()=>t(n.digest("hex")))})}function A(e,t){return new Promise((r,n)=>{let i=I("tar",["-xzf",e,"-C",t],{stdio:["ignore","inherit","inherit"]});i.on("error",n),i.on("exit",o=>{o===0?r():n(new Error(`tar exited with code ${o}`))})})}export{N as a,D as b,E as c,d,x as e,T as f,P as g,y as h,U as i,V as j,q as k,B as l};
@@ -0,0 +1,3 @@
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A as v,i as h,j as g,k as T,l as y}from"./chunk-QTVGSFY6.js";import{d as b,h as S,i as R}from"./chunk-GWGF4J4Y.js";var x={timeoutMs:1800,settleMs:48,startWindowMs:64};function f(e){return new Promise(t=>setTimeout(t,e))}function _(e){return e.includes("--json")}function C(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
3
+ `)}async function W(e,t,...n){return S(e,`__sootsimTest.${t}`,...n)}async function B(e,t,...n){return R(e,`SootSim.bridges.mainShell.${t}`,...n)}async function E(e,t={}){try{let n=await W(e,"waitForScreenTransitions",x);if(!t.verbose||!n?.started)return;if(n.timedOut){console.log(` screen transition still active after ${n.waitedMs}ms; continuing`);return}n.waitedMs>0&&console.log(` waited ${n.waitedMs}ms for screen transition settle`)}catch{}}async function I(e,t,n,...o){let i=Date.now()+Math.max(0,n);for(;;)try{return await B(e,t,...o)}catch(r){if(!v(r)||Date.now()>=i)throw r;await f(50)}}async function P(e,t,n,o={}){let i=o.attempts??30,r=o.intervalMs??500,d=o.minNodeCount??10;for(let s=0;s<i;s++){let u=b(e,{commandTimeoutMs:t,simId:n});try{let a=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof a=="number"&&a>d)return{bridge:u,count:a}}catch{}u.close(),await f(r)}return null}async function A(e,t,n,o={}){let i=o.timeoutMs??8e3,r=o.intervalMs??250,d=Date.now()+i;for(;Date.now()<d;){let s=b(e,{commandTimeoutMs:t,simId:n});try{return await s.send({type:"evaluate",code:"1"}),s}catch{s.close()}await f(r)}return null}async function F(e,t={}){let n=t.timeoutMs??1e4,o=t.errorGraceMs??3e3,i=t.pollIntervalMs??200,r=Date.now(),d=r+n,s=-1,u=r,a={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,errors:0};for(;Date.now()<d;){try{let m=await e.send({type:"evaluate",code:h}),c=Date.now()-r,l=Number(m?.nodes)||0,w=Number(m?.targets)||0,p=Number(m?.errors)||0,M=m?.flag===!0;if(l!==s&&(s=l,u=c),a={ready:!1,source:"timeout",elapsedMs:c,nodes:l,targets:w,errors:p},M&&l>=g&&y({nodes:l,targets:w})&&c-u>=T)return{ready:!0,source:"flag",elapsedMs:c,nodes:l,targets:w,errors:p};if(c>=o&&p>0&&!M)return{ready:!1,source:"error-bail",elapsedMs:c,nodes:l,targets:w,errors:p}}catch{}await f(i)}return a.nodes>=g&&y(a)?{...a,ready:!0,source:"nodes-fallback"}:{...a,ready:!1,source:"timeout",elapsedMs:Date.now()-r}}export{f as a,_ as b,C as c,W as d,E as e,I as f,P as g,A as h,F as i};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var t=!0,e="1.0.0",o="public beta",n=`${o} \xB7 free until ${e}`,r="free for everyone until 1.0 \u2014 we send anonymous error and dependency data while you use it";export{t as a,e as b,o as c,n as d,r as e};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as u}from"./chunk-Q2424XB2.js";var S=52,l=18,h=42,x=96,g=54,E=1.5,$="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",w=1;function y(e){let t=u(e),r=t.scale,o=!t.dynamicIsland&&t.homeIndicatorHeight===0&&t.cornerRadius===0,n=t.width,i=t.height,a=o?t.width+l*2:t.width+28,d=o?t.height+h+x:t.height+28,c=9.5,b=w,p=a+c*2,m=d+w*2,f=c+(o?l:14),B=o?h:14,H=o?S:t.cornerRadius+14,v=[{side:"right",top:t.hardwareButtons.lock.top,height:t.hardwareButtons.lock.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.ringToggle.top,height:t.hardwareButtons.ringToggle.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeUp.top,height:t.hardwareButtons.volumeUp.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeDown.top,height:t.hardwareButtons.volumeDown.height,width:t.hardwareButtons.width}];return{model:e,renderScale:r,outerWidth:Math.round(p*r),outerHeight:Math.round(m*r),logicalOuterWidth:p,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:d,logicalFrameLeft:c,logicalFrameTop:b,logicalScreenWidth:n,logicalScreenHeight:i,logicalScreenLeft:f,logicalScreenTop:B,logicalScreenRadius:o?0:t.cornerRadius,logicalFrameRadius:H,frameBackground:o?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:o?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:o?null:$,buttons:v,legacyHomeButton:o?{top:h+t.height+(x-g)/2,left:t.width/2-g/2+l,size:g,ring:E}:null,showHomeIndicator:t.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:t.homeIndicatorHeight}}function L(e){let t=e.side==="right",r=t?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as u}from"./chunk-AZYLZGRV.js";var S=52,l=18,h=42,x=96,g=54,E=1.5,$="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",w=1;function y(e){let t=u(e),r=t.scale,o=!t.dynamicIsland&&t.homeIndicatorHeight===0&&t.cornerRadius===0,n=t.width,i=t.height,a=o?t.width+l*2:t.width+28,d=o?t.height+h+x:t.height+28,c=9.5,b=w,p=a+c*2,m=d+w*2,f=c+(o?l:14),B=o?h:14,H=o?S:t.cornerRadius+14,v=[{side:"right",top:t.hardwareButtons.lock.top,height:t.hardwareButtons.lock.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.ringToggle.top,height:t.hardwareButtons.ringToggle.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeUp.top,height:t.hardwareButtons.volumeUp.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeDown.top,height:t.hardwareButtons.volumeDown.height,width:t.hardwareButtons.width}];return{model:e,renderScale:r,outerWidth:Math.round(p*r),outerHeight:Math.round(m*r),logicalOuterWidth:p,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:d,logicalFrameLeft:c,logicalFrameTop:b,logicalScreenWidth:n,logicalScreenHeight:i,logicalScreenLeft:f,logicalScreenTop:B,logicalScreenRadius:o?0:t.cornerRadius,logicalFrameRadius:H,frameBackground:o?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:o?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:o?null:$,buttons:v,legacyHomeButton:o?{top:h+t.height+(x-g)/2,left:t.width/2-g/2+l,size:g,ring:E}:null,showHomeIndicator:t.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:t.homeIndicatorHeight}}function L(e){let t=e.side==="right",r=t?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
3
3
  <div
4
4
  aria-hidden="true"
5
5
  style="
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as P,c as v,e as A}from"./chunk-CTEXZ7BE.js";import{E as k,F as T}from"./chunk-JPLTR6JM.js";import{WebSocket as w}from"ws";function M(){let e=k();return e&&T(e)?e.bridgePort:7668}var h=class extends Error{lock;constructor(t,s){super(t),this.name="BridgeSimLockedError",this.lock=s}};function O(e){return e==="flag"?"via --sim":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function N(e,t={}){let s=new Set,l=t.port??M(),c=t.commandTimeoutMs??15e3,o,g="none",b=new Set(t.stripBooleanFlags??[]),p=new Set(t.stripValueFlags??[]);for(let i=0;i<e.length;i++){let a=e[i];if(a==="--port"||a==="-p"){s.add(i),i+1<e.length&&(s.add(i+1),l=Number(e[i+1])),i++;continue}if(a.startsWith("--port=")){s.add(i),l=Number(a.slice(7));continue}if(a==="--timeout"){s.add(i),i+1<e.length&&(s.add(i+1),c=Number(e[i+1])),i++;continue}if(a==="--sim"){s.add(i),i+1<e.length&&(s.add(i+1),o=e[i+1]?.trim()||void 0,g="flag"),i++;continue}if(b.has(a)){s.add(i);continue}p.has(a)&&(s.add(i),i+1<e.length&&s.add(i+1),i++)}if(!o){let i=v();i&&(o=i.trim()||void 0,g="saved")}return{positional:e.filter((i,a)=>!s.has(a)),wsPort:l,simId:o,simIdSource:g,commandTimeoutMs:c}}function W(e,t={}){let s=1,l=t.commandTimeoutMs??15e3,c=new Map,o=new w(`ws://localhost:${e}`),g=t.simId?{key:`sim:${t.simId}`,source:"explicit-sim-id",stable:!0}:P(),b=new Promise((n,r)=>{o.on("open",()=>{try{o.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:g.key,cliIdentitySource:g.source,cliLabel:t.cliLabel}))}catch{}n()}),o.on("error",d=>{let u=d.message?`: ${d.message}`:"";r(new Error(`could not connect to ws://localhost:${e}${u}`))})}),p=!1,i=!1;function a(n,r){if(i||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||n.startsWith("bridge:")||n==="focus"||n==="close")return;i=!0;let d=r??"primary",u=O(r?t.simIdSource:"none");process.stderr.write(` \u2192 ${d} (${u})
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as P,c as v,e as A}from"./chunk-STWL7EXR.js";import{E as k,F as T}from"./chunk-E3S6U2QR.js";import{WebSocket as w}from"ws";function M(){let e=k();return e&&T(e)?e.bridgePort:7668}var h=class extends Error{lock;constructor(t,s){super(t),this.name="BridgeSimLockedError",this.lock=s}};function O(e){return e==="flag"?"via --sim":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function N(e,t={}){let s=new Set,l=t.port??M(),c=t.commandTimeoutMs??15e3,o,g="none",b=new Set(t.stripBooleanFlags??[]),p=new Set(t.stripValueFlags??[]);for(let i=0;i<e.length;i++){let a=e[i];if(a==="--port"||a==="-p"){s.add(i),i+1<e.length&&(s.add(i+1),l=Number(e[i+1])),i++;continue}if(a.startsWith("--port=")){s.add(i),l=Number(a.slice(7));continue}if(a==="--timeout"){s.add(i),i+1<e.length&&(s.add(i+1),c=Number(e[i+1])),i++;continue}if(a==="--sim"){s.add(i),i+1<e.length&&(s.add(i+1),o=e[i+1]?.trim()||void 0,g="flag"),i++;continue}if(b.has(a)){s.add(i);continue}p.has(a)&&(s.add(i),i+1<e.length&&s.add(i+1),i++)}if(!o){let i=v();i&&(o=i.trim()||void 0,g="saved")}return{positional:e.filter((i,a)=>!s.has(a)),wsPort:l,simId:o,simIdSource:g,commandTimeoutMs:c}}function W(e,t={}){let s=1,l=t.commandTimeoutMs??15e3,c=new Map,o=new w(`ws://localhost:${e}`),g=t.simId?{key:`sim:${t.simId}`,source:"explicit-sim-id",stable:!0}:P(),b=new Promise((n,r)=>{o.on("open",()=>{try{o.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:g.key,cliIdentitySource:g.source,cliLabel:t.cliLabel}))}catch{}n()}),o.on("error",d=>{let u=d.message?`: ${d.message}`:"";r(new Error(`could not connect to ws://localhost:${e}${u}`))})}),p=!1,i=!1;function a(n,r){if(i||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||n.startsWith("bridge:")||n==="focus"||n==="close")return;i=!0;let d=r??"primary",u=O(r?t.simIdSource:"none");process.stderr.write(` \u2192 ${d} (${u})
3
3
  `)}return o.on("message",n=>{let r;try{r=JSON.parse(n.toString())}catch{return}if(r.id===0)return;let d=c.get(r.id);d&&(c.delete(r.id),r.i>0&&!p&&(p=!0,process.stderr.write(`
4
4
  \u26A0 ${r.i} other CLI identity/identities are driving this sim
5
5
  taps, scrolls, and keyboard input from multiple agents will collide on
@@ -0,0 +1 @@
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as o}from"./chunk-DNKB2V2W.js";import{l as s}from"./chunk-JPLTR6JM.js";import{chmodSync as c,existsSync as a,mkdirSync as l,readFileSync as d,rmSync as p,writeFileSync as h}from"node:fs";import{dirname as g,join as f,resolve as k}from"node:path";function i(){return f(s(),"credentials.json")}function _(){let t=i();if(!a(t))return null;try{let e=JSON.parse(d(t,"utf8"));return e.version!==1||typeof e.apiKey!="string"||!e.apiKey.startsWith("sk_sootsim_")?null:e.apiKey}catch{return null}}function T(t){if(!t.startsWith("sk_sootsim_"))throw new Error("api key must start with sk_sootsim_");let e=i();l(g(k(e)),{recursive:!0}),h(e,JSON.stringify({version:1,apiKey:t,savedAt:new Date().toISOString()},null,2)+`
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-CTDDR7HW.js";import{l as s}from"./chunk-E3S6U2QR.js";import{chmodSync as c,existsSync as a,mkdirSync as l,readFileSync as d,rmSync as p,writeFileSync as h}from"node:fs";import{dirname as g,join as f,resolve as k}from"node:path";function i(){return f(s(),"credentials.json")}function _(){let t=i();if(!a(t))return null;try{let e=JSON.parse(d(t,"utf8"));return e.version!==1||typeof e.apiKey!="string"||!e.apiKey.startsWith("sk_sootsim_")?null:e.apiKey}catch{return null}}function T(t){if(!t.startsWith("sk_sootsim_"))throw new Error("api key must start with sk_sootsim_");let e=i();l(g(k(e)),{recursive:!0}),h(e,JSON.stringify({version:1,apiKey:t,savedAt:new Date().toISOString()},null,2)+`
3
3
  `);try{c(e,384)}catch{}}function K(){p(i(),{force:!0})}var m=["ghs_","ghp_","gho_","ghu_","github_pat_"];function y(t){return!!(t&&t.length>=20&&t.length<=256&&m.some(e=>t.startsWith(e)))}function S(){let t=process.env.SOOT_INSTALLATION_TOKEN?.trim(),e=process.env.GITHUB_TOKEN?.trim(),r=t||e;if(!y(r))return null;let n=(process.env.SOOT_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!n)return null;let u=(process.env.SOOT_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:r,repoId:n,installationId:u||null,source:t?"soot-runner":"github-actions"}}function b(){let t=process.env.SOOTSIM_API_KEY?.trim();if(t&&t.startsWith("sk_sootsim_"))return{kind:"api-key",secret:t,source:"env"};let e=S();if(e)return e;let r=_();if(r)return{kind:"api-key",secret:r,source:"file"};let n=o();return n?.token?{kind:"session",token:n.token,origin:n.origin}:null}function E(t){return t.kind==="api-key"?`Bearer ${t.secret}`:`Bearer ${t.token}`}export{_ as a,T as b,K as c,b as d,E as e};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var d=Object.defineProperty;var e=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var f=(a,b)=>{for(var c in b)d(a,c,{get:b[c],enumerable:!0})};export{e as a,f as b};
@@ -0,0 +1,16 @@
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as i,e as d,h as c}from"./chunk-GWGF4J4Y.js";function g(r){let e=r[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
3
+ const modeKey = ${JSON.stringify(t.modeKey)}
4
+ const target = ${JSON.stringify(o)}
5
+ window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
6
+ detail: { type: 'fire-action', id: ${JSON.stringify(t.actionId)} },
7
+ }))
8
+ const deadline = Date.now() + 1200
9
+ while (Date.now() < deadline) {
10
+ if (Boolean(window.SootSim?.bridges?.settings?.get?.()?.[modeKey]) === target) {
11
+ return true
12
+ }
13
+ await new Promise((resolve) => setTimeout(resolve, 40))
14
+ }
15
+ return false
16
+ })()`}))throw new Error(`${t.displayName} did not change to ${o?"on":"off"}; the live shell may not support this mode`);return console.log(` ${t.displayName}: ${n?"on":"off"} -> ${o?"on":"off"}`),{current:n,target:o,changed:!0}}finally{a.close()}}export{u as a};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as l}from"./chunk-MBH3NFBC.js";import{E as c,F as m,g as p,i as h,z as w}from"./chunk-JPLTR6JM.js";import{closeSync as v,existsSync as f,openSync as P,readSync as S,statSync as g}from"fs";import{homedir as k}from"os";import{resolve as T}from"path";import{WebSocket as D}from"ws";var E=6e4;async function L(){let t=w();if(t&&f(h(t)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:e}=await import("./runtime-4TK5DY5R.js");await e(["install"],{})}function I(t,e){return x(t)??e??l()}async function $(t=l(),e=E){if(await u(t,250)||await u(t,1500))return;let n=c();if(n&&m(n)){if(n.bootstrapping===!0&&(await b(e),await u(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(p())throw new Error(`sootsim bridge daemon is not running on port ${t}.
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as l}from"./chunk-GWGF4J4Y.js";import{E as c,F as m,g as p,i as h,z as w}from"./chunk-E3S6U2QR.js";import{closeSync as v,existsSync as f,openSync as P,readSync as S,statSync as g}from"fs";import{homedir as k}from"os";import{resolve as T}from"path";import{WebSocket as D}from"ws";var E=6e4;async function L(){let t=w();if(t&&f(h(t)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:e}=await import("./runtime-JNHCYB5L.js");await e(["install"],{})}function I(t,e){return x(t)??e??l()}async function $(t=l(),e=E){if(await u(t,250)||await u(t,1500))return;let n=c();if(n&&m(n)){if(n.bootstrapping===!0&&(await b(e),await u(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(p())throw new Error(`sootsim bridge daemon is not running on port ${t}.
3
3
  dev checkouts skip the auto-install of the persistent launchd / systemd
4
4
  agent. start the daemon manually in another shell with:
5
5
  bun sootsim server
6
- (set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-XSFKUDKZ.js");try{await o({port:t,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
6
+ (set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-K42MZR2E.js");try{await o({port:t,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
7
7
  if this keeps failing, run \`sootsim daemon uninstall\` and retry, or run \`sootsim server\` in a persistent shell as a workaround.`)}console.log(" waiting for runtime to come online...");let i=process.platform==="darwin"?B():null;try{await b(e);let r=Date.now()+5e3;for(;Date.now()<r;){if(await u(t,500))return;await new Promise(s=>setTimeout(s,200))}throw new Error(`daemon registered but the bridge never bound on port ${t} \u2014 see ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}finally{i?.stop()}}async function C(t=l()){await L(),await $(t)}function x(t){for(let e=0;e<t.length;e++){let n=t[e];if((n==="--port"||n==="-p")&&t[e+1]){let o=Number(t[e+1]);return Number.isFinite(o)?o:void 0}if(n.startsWith("--port=")){let o=Number(n.slice(7));return Number.isFinite(o)?o:void 0}}}function u(t,e){return new Promise(n=>{let o=new D(`ws://127.0.0.1:${t}`,{handshakeTimeout:e}),i=!1,r=s=>{if(!i){i=!0;try{o.close()}catch{}n(s)}};o.once("open",()=>r(!0)),o.once("error",()=>r(!1)),setTimeout(()=>r(!1),e)})}async function b(t){let e=Date.now()+t,n;for(;Date.now()<e;){let o=c();if(o&&m(o)){if(o.bootstrapping!==!0)return;o.bootstrapping!==n&&(n=o.bootstrapping)}await new Promise(i=>setTimeout(i,250))}throw new Error(`daemon did not finish bootstrapping within ${Math.round(t/1e3)}s \u2014 check ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}function d(){return T(k(),"Library/Logs/sootsim/server.err.log")}function B(){let t=d(),e=0;try{f(t)&&(e=g(t).size)}catch{}let n=!1,o=()=>{if(!n){try{if(f(t)){let i=g(t).size;if(i>e){let r=Buffer.alloc(i-e),s=P(t,"r");try{S(s,r,0,r.length,e)}finally{v(s)}e=i;for(let y of r.toString("utf8").split(/\r?\n/)){let a=y.trim();a&&(a.startsWith("sootsim:")||a.startsWith("sootsim "))&&console.log(` ${a}`)}}else i<e&&(e=i)}}catch{}setTimeout(o,250)}};return o(),{stop:()=>{n=!0}}}export{L as a,I as b,$ as c,C as d};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{createInterface as i}from"readline";var c=()=>i({input:process.stdin,output:process.stdout});function s(o){return new Promise(n=>{let r=c();r.question(o,t=>{r.close(),n(t.trim())})})}async function u(o,n=!0){let r=n?"[Y/n]":"[y/N]";if(!process.stdin.isTTY)return console.log(` ${o} ${r} ${n?"y":"n"} (non-interactive)`),n;let t=await s(` ${o} ${r} `);return t===""?n:t.toLowerCase().startsWith("y")}async function a(o,n){console.log(`
3
3
  ${o}
4
4
  `);for(let e=0;e<n.length;e++)console.log(` ${e+1}. ${n[e]}`);if(console.log(),!process.stdin.isTTY)return console.log(` choose [1-${n.length}]: 1 (non-interactive)`),0;let r=await s(` choose [1-${n.length}]: `),t=parseInt(r,10);return t>=1&&t<=n.length?t-1:0}export{u as a,a as b};
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{i as n}from"./chunk-Q2424XB2.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{i as n}from"./chunk-AZYLZGRV.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
3
3
  `)}export{g as a};
@@ -0,0 +1 @@
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -0,0 +1,305 @@
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ async function x(e){let t=await e.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof t=="number"?t:0}}async function I(e,t=5){let n=await e.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${t}))()`});return{depth:t,tree:n}}async function v(e){let t=await e.send({type:"evaluate",code:"window.location.href"});return{url:typeof t=="string"?t:""}}async function T(e,t){let n=`(async () => {
3
+ const t = window.__sootsimTest
4
+ const mainShell = window.SootSim?.bridges?.mainShell
5
+ const kb = window.__sootsimKeyboard
6
+ if (!t) return { error: 'no test bridge' }
7
+
8
+ let shell = null
9
+ try {
10
+ shell = typeof mainShell?.getState === 'function' ? await mainShell.getState() : null
11
+ } catch {}
12
+
13
+ const tree = await t.dumpTree(12, ${JSON.stringify(t)})
14
+ const nodeCount = (await t.getNodeCount?.()) || 0
15
+ const keyboard = kb && typeof kb.getLayout === 'function' ? kb.getLayout() : null
16
+ return { tree, shell, nodeCount, keyboard }
17
+ })()`;return await e.send({type:"evaluate",code:n})??{}}var y=`(async () => {
18
+ const t = window.__sootsimTest
19
+ if (!t) return []
20
+
21
+ const readLayout = (n) => n?.layout || null
22
+ const readAbs = (n) => n?.absolutePosition || n?.absolute || null
23
+ const readRole = (n) => n?.accessibilityRole || n?.role || null
24
+ const readLabel = (n) => n?.accessibilityLabel || n?.label || n?.text || null
25
+ const readHint = (n) => n?.accessibilityHint || n?.hint || null
26
+ const readState = (n) => n?.accessibilityState || n?.state || null
27
+ const readTestId = (n) => n?.testID || n?.testId || null
28
+ const readType = (n) => typeof n?.type === 'string' ? n.type.toLowerCase() : n?.type
29
+ const readPressable = (n) => {
30
+ if (n?.pressable) return true
31
+ const handlers = Array.isArray(n?.handlers) ? n.handlers : []
32
+ const role = readRole(n)
33
+ return handlers.length > 0 || role === 'button' || role === 'link' || role === 'tab'
34
+ }
35
+ const isTextInput = (n) => n?.isTextInput === true
36
+ const isTextNode = (n) => readType(n) === 'text'
37
+ const isVisibleTarget = (n) => {
38
+ const layout = readLayout(n)
39
+ if (!layout || layout.width <= 0 || layout.height <= 0) return false
40
+ const abs = readAbs(n)
41
+ if (!abs) return true
42
+ const device = n?.device || {}
43
+ const screenW = Number(device.width) || window.innerWidth || 0
44
+ const screenH = Number(device.height) || window.innerHeight || 0
45
+ return (
46
+ abs.x + layout.width > 0 &&
47
+ abs.y + layout.height > 0 &&
48
+ abs.x < screenW &&
49
+ abs.y < screenH
50
+ )
51
+ }
52
+ const hasAccessibleSignal = (n) => {
53
+ const role = readRole(n)
54
+ const label = readLabel(n)
55
+ const hint = readHint(n)
56
+ if (role) return true
57
+ if (hint) return true
58
+ if (isTextInput(n)) return true
59
+ if (readPressable(n)) return true
60
+ if (isTextNode(n) && n?.text) return true
61
+ if (typeof label === 'string' && label.length <= 30 && label !== n?.text) return true
62
+ return false
63
+ }
64
+ const normalize = (n) => {
65
+ const layout = readLayout(n)
66
+ const abs = readAbs(n)
67
+ const role = readRole(n) || (readPressable(n) ? 'button' : isTextInput(n) ? 'textfield' : isTextNode(n) ? 'statictext' : 'none')
68
+ return {
69
+ role,
70
+ label: readLabel(n),
71
+ hint: readHint(n),
72
+ state: readState(n),
73
+ testID: readTestId(n),
74
+ position: abs ? { x: Math.round(abs.x), y: Math.round(abs.y) } : null,
75
+ size: layout ? { w: Math.round(layout.width), h: Math.round(layout.height) } : null,
76
+ }
77
+ }
78
+
79
+ if (typeof t.listInspectable === 'function') {
80
+ const list = await t.listInspectable({})
81
+ if (Array.isArray(list)) {
82
+ return list.filter(n => isVisibleTarget(n) && hasAccessibleSignal(n)).map(normalize)
83
+ }
84
+ }
85
+
86
+ const all = await t.queryAll({ pruneHidden: true })
87
+ return all
88
+ .filter(n => isVisibleTarget(n) && hasAccessibleSignal(n))
89
+ .map(normalize)
90
+ })()`;async function _(e){let t=await e.send({type:"evaluate",code:y});return Array.isArray(t)?t:[]}var l=`
91
+ const fromInspectable = async () => {
92
+ if (typeof t.listInspectable !== 'function') return null
93
+ const list = await t.listInspectable({})
94
+ if (!Array.isArray(list)) return null
95
+ return list.map((n) => {
96
+ const role = n.accessibilityRole ?? n.role
97
+ const label = n.accessibilityLabel ?? n.label
98
+ const layout = n.layout
99
+ const absolutePosition = n.absolutePosition ?? n.absolute
100
+ const screenW = Number(n.device?.width) || window.innerWidth || 0
101
+ const screenH = Number(n.device?.height) || window.innerHeight || 0
102
+ const visibleFrame = layout && absolutePosition
103
+ ? {
104
+ x: Math.max(0, absolutePosition.x),
105
+ y: Math.max(0, absolutePosition.y),
106
+ width: Math.max(
107
+ 0,
108
+ Math.min(screenW, absolutePosition.x + layout.width) -
109
+ Math.max(0, absolutePosition.x),
110
+ ),
111
+ height: Math.max(
112
+ 0,
113
+ Math.min(screenH, absolutePosition.y + layout.height) -
114
+ Math.max(0, absolutePosition.y),
115
+ ),
116
+ }
117
+ : null
118
+ const handlers = Array.isArray(n.handlers) ? n.handlers : []
119
+ const pressable =
120
+ handlers.length > 0 ||
121
+ role === 'button' ||
122
+ role === 'link' ||
123
+ role === 'tab'
124
+ return {
125
+ type: typeof n.type === 'string' ? n.type.toLowerCase() : n.type,
126
+ id: n.id ?? n.nodeId,
127
+ nodeId: n.nodeId,
128
+ testID: n.testID ?? n.testId,
129
+ text: n.text,
130
+ layout,
131
+ absolutePosition,
132
+ visibleFrame,
133
+ style: n.computedStyle ?? n.style ?? {},
134
+ childCount: n.childCount ?? 0,
135
+ pressed: n.pressed ?? false,
136
+ pressable,
137
+ isTextInput: n.isTextInput ?? false,
138
+ accessible: n.accessible ?? true,
139
+ accessibilityLabel: label,
140
+ accessibilityRole: role,
141
+ accessibilityHint: n.accessibilityHint,
142
+ accessibilityState: n.accessibilityState,
143
+ accessibilityValue: n.accessibilityValue,
144
+ }
145
+ })
146
+ }
147
+ const isVisibleTarget = (n) => {
148
+ if (!n?.layout) return false
149
+ const frame = n.visibleFrame
150
+ if (frame) return frame.width > 0 && frame.height > 0
151
+ const abs = n.absolutePosition
152
+ if (!abs) return n.layout.width > 0 && n.layout.height > 0
153
+ const screenW = window.innerWidth || 0
154
+ const screenH = window.innerHeight || 0
155
+ return (
156
+ abs.x + n.layout.width > 0 &&
157
+ abs.y + n.layout.height > 0 &&
158
+ abs.x < screenW &&
159
+ abs.y < screenH
160
+ )
161
+ }
162
+ `;function p(e){return e.testId?{mode:"testid",code:`(async () => {
163
+ const t = window.__sootsimTest
164
+ return (await t.findByTestId(${JSON.stringify(e.testId)})) || (await t.findById(${JSON.stringify(e.testId)}))
165
+ })()`}:e.role?{mode:"role",code:`(async () => await window.__sootsimTest.queryAll({ hasRole: ${JSON.stringify(e.role)}, pruneHidden: true }))()`}:e.type?{mode:"type",code:`(async () => await window.__sootsimTest.queryAll({ type: ${JSON.stringify(e.type)}, pruneHidden: true }))()`}:e.pressable?{mode:"pressable",code:`(async () => {
166
+ const t = window.__sootsimTest
167
+ ${l}
168
+ const inspectable = await fromInspectable()
169
+ if (inspectable) return inspectable.filter(n => n.pressable && isVisibleTarget(n))
170
+ const all = await t.queryAll({ pruneHidden: true })
171
+ return all.filter(n => n.pressable && isVisibleTarget(n))
172
+ })()`}:e.interactive?{mode:"interactive-targets",code:`(async () => {
173
+ const t = window.__sootsimTest
174
+ ${l}
175
+ const inspectable = await fromInspectable()
176
+ if (inspectable) {
177
+ return inspectable.filter(n => n.pressable && isVisibleTarget(n))
178
+ }
179
+ const all = await t.queryAll({ pruneHidden: true })
180
+ return all.filter(n => n.pressable && isVisibleTarget(n))
181
+ })()`}:e.visible?{mode:"visible",code:`(async () => {
182
+ const all = await window.__sootsimTest.queryAll({ pruneHidden: true })
183
+ return all.filter(n => n.layout && n.layout.width > 0 && n.layout.height > 0)
184
+ })()`}:e.text?{mode:"text",code:`(async () => await window.__sootsimTest.findByText(${JSON.stringify(e.text)}))()`}:null}async function k(e,t){let n=p(t);if(!n)return null;let r=await e.send({type:"evaluate",code:n.code});return{mode:n.mode,result:r}}function P(e){return[...e].sort((t,n)=>c(n)-c(t))}function c(e){let t=0;e.testID&&(t+=100),typeof e.text=="string"&&e.text.trim().length>0&&(t+=60),typeof e.accessibilityLabel=="string"&&e.accessibilityLabel.trim().length>0&&(t+=30),e.accessibilityRole&&(t+=15);let n=e.layout?.width??0,r=e.layout?.height??0,s=n*r;return s>=400&&s<=6e4?t+=25:s>6e4&&(t-=20),(e.absolutePosition?.y??0)<0&&(t-=30),t}function L(e){if(e.testID)return`sootsim do tap-id ${u(e.testID)}`;let t=typeof e.text=="string"?e.text.trim():"";if(t.length>0&&t.length<=80)return`sootsim do tap-text ${u(t)}`;let n=Math.round(((e.absolutePosition?.x??0)+(e.layout?.width??0)/2)*10)/10,r=Math.round(((e.absolutePosition?.y??0)+(e.layout?.height??0)/2)*10)/10;return`sootsim do tap ${n} ${r}`}function u(e){return/^[A-Za-z0-9_./@:-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}var b=`(async () => {
185
+ const t = window.__sootsimTest
186
+ let nodes = 0
187
+ try { nodes = (await t?.getNodeCount?.()) || 0 } catch {}
188
+ let targets = 0
189
+ try {
190
+ if (typeof t?.listInspectable === 'function') {
191
+ const list = await t.listInspectable({})
192
+ if (Array.isArray(list)) {
193
+ const screenW = window.innerWidth || 0
194
+ const screenH = window.innerHeight || 0
195
+ const isVisible = (n) => {
196
+ const layout = n?.layout
197
+ if (!layout || layout.width <= 0 || layout.height <= 0) return false
198
+ const abs = n?.absolutePosition || n?.absolute
199
+ if (!abs) return true
200
+ const device = n?.device || {}
201
+ const w = Number(device.width) || screenW
202
+ const h = Number(device.height) || screenH
203
+ return (
204
+ abs.x + layout.width > 0 &&
205
+ abs.y + layout.height > 0 &&
206
+ abs.x < w &&
207
+ abs.y < h
208
+ )
209
+ }
210
+ const hasContentSignal = (n) => {
211
+ const role = n?.accessibilityRole || n?.role
212
+ const label = n?.accessibilityLabel || n?.label
213
+ const handlers = Array.isArray(n?.handlers) ? n.handlers : []
214
+ const text = typeof n?.text === 'string' ? n.text.trim() : ''
215
+ const testID = typeof (n?.testID || n?.testId) === 'string' ? (n.testID || n.testId) : ''
216
+ if (handlers.length > 0) return true
217
+ if (role) return true
218
+ if (n?.isTextInput) return true
219
+ if (text) return true
220
+ if (label) return true
221
+ if (testID && !/^splash|loading/i.test(testID)) return true
222
+ return false
223
+ }
224
+ targets = list.filter(n => isVisible(n) && hasContentSignal(n)).length
225
+ }
226
+ }
227
+ } catch {}
228
+ let errors = 0
229
+ try { errors = window.__sootsimConsole?.count?.()?.errors ?? 0 } catch {}
230
+ return {
231
+ flag: (window).__sootsimExternalAppReady,
232
+ at: (window).__sootsimExternalAppReadyAt || 0,
233
+ nodes,
234
+ targets,
235
+ errors,
236
+ }
237
+ })()`,m=50,g=100,f=750;function w(e){return e.targets>0||e.nodes>=g}async function A(e,t=2e4){let n=Date.now(),r=n+t,s=-1,o=n,i={flag:void 0,at:0,nodes:0,targets:0,errors:0};for(;Date.now()<r;){try{i=await e.send({type:"evaluate",code:b})??i}catch{}let a=Date.now();if(i.nodes!==s&&(s=i.nodes,o=a),i.flag===!0&&i.nodes>=m&&w(i)&&a-o>=f)return{ready:!0,elapsedMs:a-n,nodes:i.nodes};await new Promise(d=>setTimeout(d,150))}return{ready:!1,elapsedMs:Date.now()-n,nodes:i.nodes}}async function D(e,t,n=5e3){return await e.send({type:"evaluate",code:`(async () => {
238
+ const start = Date.now()
239
+ const deadline = start + ${n}
240
+ const t = window.__sootsimTest
241
+ const find = async () => {
242
+ try {
243
+ return (await t?.findByTestId?.(${JSON.stringify(t)})) ||
244
+ (await t?.findById?.(${JSON.stringify(t)})) || null
245
+ } catch {}
246
+ return null
247
+ }
248
+ while (Date.now() < deadline) {
249
+ const node = await find()
250
+ if (node && node.layout && node.layout.width > 0 && node.layout.height > 0) {
251
+ return { found: true, node, elapsed: Date.now() - start }
252
+ }
253
+ await new Promise((r) => setTimeout(r, 80))
254
+ }
255
+ return { found: false, elapsed: Date.now() - start }
256
+ })()`})??{found:!1,elapsed:n}}async function R(e,t=20){let n=await e.send({type:"evaluate",code:`window.__sootsimConsole?.getErrors(${t}) || []`});return Array.isArray(n)?n:[]}async function H(e,t=20){let n=await e.send({type:"evaluate",code:`window.__sootsimConsole?.getWarnings(${t}) || []`});return Array.isArray(n)?n:[]}async function N(e){await e.send({type:"evaluate",code:'window.__sootsimConsole?.clear(); "cleared"'})}async function E(e,t={}){let n=t.limit??20,r=t.failed===!1?"getRequests":"getFailedRequests",s=await e.send({type:"call",path:`__sootsimTest.${r}`,args:[n]});return Array.isArray(s)?s:[]}async function B(e){await e.send({type:"call",path:"__sootsimTest.clearRequests",args:[]})}async function C(e){let t=await e.send({type:"evaluate",code:`(() => {
257
+ const obs = window.__sootsimObservability;
258
+ if (!obs) return { ok: false };
259
+ return { ok: true, entries: obs.logs.getSnapshot() };
260
+ })()`});if(!t||!t.ok)throw new Error("observability bridge not installed \u2014 is the engine running?");return t.entries??[]}async function $(e){await e.send({type:"evaluate",code:'window.__sootsimObservability?.logs.clear(); "cleared"'})}function M(e,t={}){let n=new Set,r=e.filter(s=>{let o=`${s.level}\0${s.args.join("")}\0${Math.round(s.ts/1e3)}`;return n.has(o)?!1:(n.add(o),!0)});if(t.showInternal||(r=r.filter(s=>{let o=s.args[0];return!(typeof o=="string"&&o.startsWith("[sootsim]"))})),t.level&&(r=r.filter(s=>t.level.has(s.level))),t.filter){let s=t.filter.toLowerCase();r=r.filter(o=>o.args.join(" ").toLowerCase().includes(s))}return r}async function O(e,t){return await e.send({type:"call",path:"SootSim.bridges.timeline.summary",args:[t]})}async function F(e,t){return await e.send({type:"call",path:"SootSim.bridges.timeline.recent",args:[t]})}async function W(e,t,n){await e.send({type:"call",path:"SootSim.bridges.timeline.cursorAdvance",args:[t,n]})}async function z(e){return await e.send({type:"evaluate",code:`(() => {
261
+ const kb = window.__sootsimKeyboard
262
+ if (!kb || typeof kb.getLayout !== 'function') {
263
+ return { error: 'keyboard bridge getLayout() not available' }
264
+ }
265
+ return kb.getLayout()
266
+ })()`})??{error:"keyboard bridge returned no result"}}function h(e){let t=e instanceof Error?e.message:String(e);return t.includes("call target not found: SootSim.bridges.mainShell")||t.includes("test bridge unavailable before app-in-worker boot")}async function S(e,t=0){let n=Date.now()+Math.max(0,t);for(;;)try{return await e.send({type:"call",path:"SootSim.bridges.mainShell.getState",args:[]})}catch(r){if(!h(r)||Date.now()>=n)throw r;await new Promise(s=>setTimeout(s,50))}}async function K(e){let t=await e.send({type:"evaluate",code:`(async () => {
267
+ const test = window.__sootsimTest
268
+ const kb = window.__sootsimKeyboard
269
+ const navSnap =
270
+ test && typeof test.getNavigationSnapshot === 'function'
271
+ ? await test.getNavigationSnapshot()
272
+ : null
273
+ const keyboard =
274
+ kb && typeof kb.getLayout === 'function'
275
+ ? (() => {
276
+ const layout = kb.getLayout()
277
+ return layout ? {
278
+ visible: layout.visible,
279
+ mode: layout.mode,
280
+ spec: layout.spec
281
+ ? {
282
+ keyboardType: layout.spec.keyboardType,
283
+ returnKeyType: layout.spec.returnKeyType,
284
+ }
285
+ : null,
286
+ } : null
287
+ })()
288
+ : null
289
+ return { nav: navSnap, keyboard }
290
+ })()`});return{shell:await S(e,500).catch(()=>null),nav:t?.nav??null,keyboard:t?.keyboard??null}}async function J(e){return e.send({type:"evaluate",code:"window.__sootsimDebug.status()"})}async function V(e){return e.send({type:"evaluate",code:"window.__sootsimDebug.flags()"})}async function j(e,t){let n=t==="sheets"?"findSheets":"findPortals";return e.send({type:"evaluate",code:`window.__sootsimDebug.${n}()`})}async function Q(e,t,n=50){let r=t&&t!=="all"?`window.__sootsimDebug.recent(${JSON.stringify(t)}, ${n})`:`window.__sootsimDebug.recent(undefined, ${n})`;return e.send({type:"evaluate",code:r})}async function Y(e,t,n){let r=n.length>0?n.map(s=>JSON.stringify(s)).join(", "):t==="disable"?"'all'":"";return e.send({type:"evaluate",code:`window.__sootsimDebug.${t}(${r})`})}async function q(e){return await e.send({type:"evaluate",code:`(async () => {
291
+ const host = window.__sootsimRenderHost
292
+ const stats = host?.queryStats ? await host.queryStats() : null
293
+ const hostMem = performance.memory
294
+ ? {
295
+ usedJSHeapSize: performance.memory.usedJSHeapSize,
296
+ totalJSHeapSize: performance.memory.totalJSHeapSize,
297
+ jsHeapSizeLimit: performance.memory.jsHeapSizeLimit,
298
+ }
299
+ : null
300
+ return {
301
+ imageLoader: stats?.memory?.imageLoader ?? null,
302
+ workerHeap: stats?.memory?.workerHeap ?? null,
303
+ hostHeap: hostMem,
304
+ }
305
+ })()`})??{imageLoader:null,workerHeap:null,hostHeap:null}}function U(e){if(e.total===0)return"nothing recorded";let t=[],n=["error","warning","console","fetch","toast","alert","actionsheet","picker","notification","screen","route","keyboard","app-launch","shell","scroll","gesture","text-input","react-commit","animation","reanimated"],r=new Set;for(let s of n){let o=e.byKind[s];o&&(t.push(`${o} ${s}${o===1?"":"s"}`),r.add(s))}for(let[s,o]of Object.entries(e.byKind))!r.has(s)&&o&&t.push(`${o} ${s}${o===1?"":"s"}`);return t.join(" \xB7 ")}export{x as a,I as b,v as c,T as d,_ as e,k as f,P as g,L as h,b as i,m as j,f as k,w as l,A as m,D as n,R as o,H as p,N as q,E as r,B as s,C as t,$ as u,M as v,O as w,F as x,W as y,z,h as A,S as B,K as C,J as D,V as E,j as F,Q as G,Y as H,q as I,U as J};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as y,c as C}from"./chunk-3MIWVHCX.js";import{a as x}from"./chunk-JPX7OS7B.js";import{exec as U}from"child_process";import _ from"http";import D from"net";import{promisify as T}from"util";var P=T(U),E=250,A=1500,M=120;function R(e,r=M){return new Promise(s=>{let t=new D.Socket,o=!1,i=a=>{o||(o=!0,t.destroy(),s(a))};t.setTimeout(r),t.once("connect",()=>i(!0)),t.once("timeout",()=>i(!1)),t.once("error",()=>i(!1)),t.connect(e,"localhost")})}function h(e,r,s="GET",t=E,o={}){return new Promise(i=>{let a=_.request({hostname:"localhost",port:e,path:r,method:s,timeout:t,headers:o},n=>{let c="";n.on("data",l=>c+=l.toString());let u=(()=>{let l=n.headers["content-type"];if(typeof l=="string")return l;if(Array.isArray(l))return l[0]})();n.on("end",()=>i({statusCode:n.statusCode||0,body:c,contentType:u}))});a.on("error",()=>i(null)),a.setTimeout(t,()=>{a.destroy(),i(null)}),a.end()})}var N=[8081,8082,8083,8084,8085,8086,3e3,3001,19e3].map(e=>({port:e,pid:0}));function v(e,r){return!(e<=0||e>=2e4||r.has(e)||e>=5170&&e<=5200)}async function L(e=[]){let r=new Set(e);try{let{stdout:s}=await P("lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep -E '^(node|bun)'",{encoding:"utf8",timeout:2e3});if(s.trim()){let t=new Map;for(let o of s.trim().split(`
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as y,c as C}from"./chunk-WXOAHKCZ.js";import{a as x}from"./chunk-R5XV3WIE.js";import{exec as U}from"child_process";import _ from"http";import D from"net";import{promisify as T}from"util";var P=T(U),E=250,A=1500,M=120;function R(e,r=M){return new Promise(s=>{let t=new D.Socket,o=!1,i=a=>{o||(o=!0,t.destroy(),s(a))};t.setTimeout(r),t.once("connect",()=>i(!0)),t.once("timeout",()=>i(!1)),t.once("error",()=>i(!1)),t.connect(e,"localhost")})}function h(e,r,s="GET",t=E,o={}){return new Promise(i=>{let a=_.request({hostname:"localhost",port:e,path:r,method:s,timeout:t,headers:o},n=>{let c="";n.on("data",l=>c+=l.toString());let u=(()=>{let l=n.headers["content-type"];if(typeof l=="string")return l;if(Array.isArray(l))return l[0]})();n.on("end",()=>i({statusCode:n.statusCode||0,body:c,contentType:u}))});a.on("error",()=>i(null)),a.setTimeout(t,()=>{a.destroy(),i(null)}),a.end()})}var N=[8081,8082,8083,8084,8085,8086,3e3,3001,19e3].map(e=>({port:e,pid:0}));function v(e,r){return!(e<=0||e>=2e4||r.has(e)||e>=5170&&e<=5200)}async function L(e=[]){let r=new Set(e);try{let{stdout:s}=await P("lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep -E '^(node|bun)'",{encoding:"utf8",timeout:2e3});if(s.trim()){let t=new Map;for(let o of s.trim().split(`
3
3
  `)){let i=o.trim().split(/\s+/);if(i.length<9)continue;let a=Number(i[1]),c=i[8].match(/:(\d+)$/);if(!c)continue;let u=Number(c[1]);v(u,r)&&(t.has(u)||t.set(u,a))}if(t.size>0)return[...t.entries()].map(([o,i])=>({port:o,pid:i}))}}catch{}try{let{stdout:s}=await P(`ss -tlnp 2>/dev/null | grep -E '"(node|bun)"'`,{encoding:"utf8",timeout:2e3});if(s.trim()){let t=new Map;for(let o of s.trim().split(`
4
4
  `)){let i=o.match(/:(\d+)\s/),a=o.match(/pid=(\d+)/);if(!i)continue;let n=Number(i[1]),c=a?Number(a[1]):0;v(n,r)&&(t.has(n)||t.set(n,c))}if(t.size>0)return[...t.entries()].map(([o,i])=>({port:o,pid:i}))}}catch{}return N.filter(s=>v(s.port,r))}var S=new Map;async function $(e){if(e<=0)return null;let r=S.get(e);if(r)return r;try{let{stdout:s}=await P(`lsof -p ${e} -a -d cwd -Fn 2>/dev/null`,{encoding:"utf8",timeout:1500});for(let t of s.split(`
5
5
  `))if(t.startsWith("n")&&t.length>1){let o=t.slice(1).trim();if(o)return S.set(e,o),o}}catch{}return null}function I(e,r){return{port:e,framework:r,bundleUrl:m(e,`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()}}function m(e,r){let s=x.find(o=>o.preferredPort===e),t=s?.runtimeConfig?y(r,s.runtimeConfig):r;return C(t)}function O(e){return e.includes("/node_modules/one/metro-entry.bundle")}function j(e){try{let r=JSON.parse(e);return r&&typeof r=="object"?r:null}catch{return null}}function w(e,r,s){if(!r)return e;try{let t=JSON.parse(r.body),o=t?.extra?.expoClient||t?.extra||{};o.name&&(e.projectName=o.name),o.ios?.bundleIdentifier&&(e.bundleId=o.ios.bundleIdentifier),e.framework==="metro"&&o.sdkVersion&&(e.framework="expo");let i=t?.launchAsset?.url;i&&!e.patched&&!O(e.bundleUrl)&&(e.bundleUrl=m(e.port,i));let a=o.iconUrl||o.ios?.iconUrl||o.icon||o.ios?.icon;if(a)if(e.iconPath=a,s)if(a.startsWith("http"))e.iconUrl=s(a);else{let n=a.replace(/^\.\//,"");e.iconUrl=s(`http://localhost:${e.port}/assets/${n}`)}else e.iconUrl=a.startsWith("http")?a:`http://localhost:${e.port}/assets/${a.replace(/^\.\//,"")}`}catch{}return e}var d=new Set,f=new Set,b=new Set;async function H(e,r){if(!await R(e))return null;let s="/node_modules/one/metro-entry.bundle?platform=ios&dev=true",[t,o,i,a,n]=await Promise.all([d.has(e)?Promise.resolve(null):h(e,"/__soot/"),h(e,"/status"),h(e,s,"HEAD"),b.has(e)?Promise.resolve(null):h(e,"/","GET",A,{"expo-platform":"ios"}),f.has(e)?Promise.resolve(null):h(e,"/_expo/status")]);n&&n.statusCode===200?f.delete(e):f.has(e)||f.add(e);let c=a?j(a.body):null,u=typeof c?.launchAsset?.url=="string"?c.launchAsset.url:null,l=c?.extra?.expoClient||c?.extra||{};if(c&&(u||typeof l.name=="string")){d.add(e);let p=u||`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`,k=p.includes("/one/metro-entry.bundle")?"one":"expo";return w({port:e,framework:k,bundleUrl:m(e,p),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},a,r)}return i&&i.statusCode>0&&i.statusCode<400&&/application\/javascript/i.test(i.contentType||"")?(d.add(e),b.add(e),w({port:e,framework:"one",bundleUrl:m(e,`http://localhost:${e}${s}&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},a,r)):o&&o.body.includes("packager-status:running")?(d.add(e),w(I(e,n&&n.statusCode===200?"expo":"metro"),a,r)):t&&t.statusCode===200&&t.body.includes("sootsim-patched")?(d.delete(e),w({port:e,framework:"one",bundleUrl:m(e,`http://localhost:${e}/__soot/bundle.js`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now(),patched:!0},a,r)):(d.add(e),null)}function B(e){let r=e.projectName?.trim().toLowerCase();return!!(r==="soot"||r==="sootsim"||e.bundleId?.trim().toLowerCase()?.startsWith("dev.soot"))}var g=new Map,G=3e4,W=1500;function F(e){return!e||e.framework==="metro"||e.framework==="unknown"}function z(e){return e?m(e.port,e.bundleUrl)===e.bundleUrl:!0}function q(e,r,s=Date.now()){if(r===0||e.pid!==r||!z(e.result))return!1;let t=s-e.cachedAt;return!(e.result===null&&t>=G||F(e.result)&&t>=W)}async function ee(e={}){let r=await L(e.excludePorts),s=new Set(r.map(n=>n.port));for(let n of[...g.keys()])s.has(n)||g.delete(n);for(let n of[...d])s.has(n)||d.delete(n);for(let n of[...f])s.has(n)||f.delete(n);for(let n of[...b])s.has(n)||b.delete(n);let t=[],o=[];for(let{port:n,pid:c}of r){let u=g.get(n);if(u&&q(u,c)){u.result&&t.push(u.result);continue}u&&u.pid!==c&&(d.delete(n),f.delete(n),b.delete(n)),o.push({port:n,pid:c})}o.length>0&&(await Promise.all(o.map(c=>H(c.port,e.buildIconProxyUrl)))).forEach((c,u)=>{let{port:l,pid:p}=o[u];p!==0&&g.set(l,{pid:p,result:c,cachedAt:Date.now()}),c&&t.push(c)});let i=new Map;for(let{port:n,pid:c}of r)c>0&&i.set(n,c);await Promise.all(t.map(async n=>{let c=i.get(n.port);if(!c)return;n.pid=c;let u=await $(c);u&&(n.cwd=u)}));let a=new Set(i.values());for(let n of[...S.keys()])a.has(n)||S.delete(n);return t.filter(n=>!B(n))}export{ee as a};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as L}from"./chunk-6QDFLMJL.js";import{existsSync as o,readFileSync as p,writeFileSync as d}from"node:fs";import{homedir as j}from"node:os";import{dirname as $,join as s,resolve as P}from"node:path";var _=j();function Q(e){let t=e;for(;;){if(o(s(t,"pnpm-workspace.yaml"))||o(s(t,"turbo.json"))||o(s(t,"nx.json"))||o(s(t,"lerna.json")))return t;let r=s(t,"package.json");if(o(r))try{if(JSON.parse(p(r,"utf8")).workspaces)return t}catch{}let n=$(t);if(n===t)return null;t=n}}function S(e,t){let r=Q(process.cwd()),n=[r?P(r,e):null,P(process.cwd(),e),P(process.cwd(),t)].filter(a=>!!a);for(let a of n)if(o(a))return a;return n[0]??P(process.cwd(),e)}var X=()=>S("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),z=()=>S("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),Z=()=>S("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),ee=()=>S("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),v=()=>S("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),D={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},te=s(_,"github/mattermost-mobile"),I=s(_,"github/uniswap-interface"),ne=s(I,"apps/mobile"),T=s(I,".env.defaults.local"),re="stored-in-.env.local",W="# sootsim demo env overrides",se=s(I,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),oe=s(I,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),M="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function B(e){if(!o(e))return{};let t={},r=p(e,"utf8");for(let n of r.split(/\r?\n/)){let a=n.trim();if(!a||a.startsWith("#"))continue;let u=a.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!u)continue;let i=u[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[u[1]]=i}return t}function k(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(re)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function Y(e,t){for(let r of e)for(let n of t){let a=r[n];if(k(a))return a.trim()}}function J(){let e=B(T),t=B(s(I,"apps/web/.env")),r=[process.env,e,t],n={},a=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,l]of a){let R=Y(r,[i,...l]);if(R){n[i]=R;for(let m of l)n[m]=R}}if(!(k(n.TRADING_API_KEY)&&k(n.UNISWAP_API_KEY))){let i=Y(r,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";n.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",n.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",n.GRAPHQL_URL_OVERRIDE=i,n.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",n.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return n}function ae(){let e=o(T)?p(T,"utf8"):"";if(e&&!e.includes(W))return;let t=J(),r=[W];for(let[n,a]of Object.entries(t).sort(([u],[i])=>u.localeCompare(i)))r.push(`${n}=${JSON.stringify(a)}`);r.push(""),d(T,`${r.join(`
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as L}from"./chunk-LELB2PV3.js";import{existsSync as o,readFileSync as p,writeFileSync as d}from"node:fs";import{homedir as j}from"node:os";import{dirname as $,join as s,resolve as P}from"node:path";var _=j();function Q(e){let t=e;for(;;){if(o(s(t,"pnpm-workspace.yaml"))||o(s(t,"turbo.json"))||o(s(t,"nx.json"))||o(s(t,"lerna.json")))return t;let r=s(t,"package.json");if(o(r))try{if(JSON.parse(p(r,"utf8")).workspaces)return t}catch{}let n=$(t);if(n===t)return null;t=n}}function S(e,t){let r=Q(process.cwd()),n=[r?P(r,e):null,P(process.cwd(),e),P(process.cwd(),t)].filter(a=>!!a);for(let a of n)if(o(a))return a;return n[0]??P(process.cwd(),e)}var X=()=>S("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),z=()=>S("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),Z=()=>S("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),ee=()=>S("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),v=()=>S("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),D={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},te=s(_,"github/mattermost-mobile"),I=s(_,"github/uniswap-interface"),ne=s(I,"apps/mobile"),T=s(I,".env.defaults.local"),re="stored-in-.env.local",W="# sootsim demo env overrides",se=s(I,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),oe=s(I,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),M="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function B(e){if(!o(e))return{};let t={},r=p(e,"utf8");for(let n of r.split(/\r?\n/)){let a=n.trim();if(!a||a.startsWith("#"))continue;let u=a.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!u)continue;let i=u[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[u[1]]=i}return t}function k(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(re)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function Y(e,t){for(let r of e)for(let n of t){let a=r[n];if(k(a))return a.trim()}}function J(){let e=B(T),t=B(s(I,"apps/web/.env")),r=[process.env,e,t],n={},a=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,l]of a){let R=Y(r,[i,...l]);if(R){n[i]=R;for(let m of l)n[m]=R}}if(!(k(n.TRADING_API_KEY)&&k(n.UNISWAP_API_KEY))){let i=Y(r,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";n.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",n.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",n.GRAPHQL_URL_OVERRIDE=i,n.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",n.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return n}function ae(){let e=o(T)?p(T,"utf8"):"";if(e&&!e.includes(W))return;let t=J(),r=[W];for(let[n,a]of Object.entries(t).sort(([u],[i])=>u.localeCompare(i)))r.push(`${n}=${JSON.stringify(a)}`);r.push(""),d(T,`${r.join(`
3
3
  `)}
4
4
  `)}function ie(){let e=`export function useForceUpgradeStatus(): ForceUpgradeStatus {
5
5
  `,t=` // sootsim demo: bypass the force-upgrade gate during local engine demos.
@@ -1,3 +1,3 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as d}from"./chunk-CTEXZ7BE.js";import{existsSync as S,mkdirSync as h,readFileSync as b,writeFileSync as H,rmSync as m}from"fs";import{tmpdir as w}from"os";import{dirname as v,join as p}from"path";var y=new Map;function i(e,r){y.set(e,r)}var a=1;function s(){return p(w(),`sootsim-cli-hints-${d()}.json`)}function l(){return p(w(),"sootsim-cli-hints-global.json")}function u(e){if(!S(e))return{version:a,shown:{}};try{let r=JSON.parse(b(e,"utf8"));return r?.version!==a||!r?.shown?{version:a,shown:{}}:r}catch{return{version:a,shown:{}}}}function f(e,r){try{h(v(e),{recursive:!0}),H(e,JSON.stringify(r)+`
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as d}from"./chunk-STWL7EXR.js";import{existsSync as S,mkdirSync as h,readFileSync as b,writeFileSync as H,rmSync as m}from"fs";import{tmpdir as w}from"os";import{dirname as v,join as p}from"path";var y=new Map;function i(e,r){y.set(e,r)}var a=1;function s(){return p(w(),`sootsim-cli-hints-${d()}.json`)}function l(){return p(w(),"sootsim-cli-hints-global.json")}function u(e){if(!S(e))return{version:a,shown:{}};try{let r=JSON.parse(b(e,"utf8"));return r?.version!==a||!r?.shown?{version:a,shown:{}}:r}catch{return{version:a,shown:{}}}}function f(e,r){try{h(v(e),{recursive:!0}),H(e,JSON.stringify(r)+`
3
3
  `)}catch{}}function F(){let e=(process.env.SOOTSIM_HINTS||"").toLowerCase();return e==="off"||e==="0"||e==="false"?"off":e==="always"||e==="verbose"?"always":"normal"}function x(e,r){let o=F();if(o==="off")return!1;if(o==="always"||r==="always")return!0;let n=Date.now();if(r==="once-per-identity"){let t=u(s());return t.shown[e]?!1:(t.shown[e]=n,f(s(),t),!0)}if(r==="once-ever"){let t=u(l());return t.shown[e]?!1:(t.shown[e]=n,f(l(),t),!0)}if(typeof r=="object"&&"cooldownMs"in r){let t=u(s()),c=t.shown[e]??0;return n-c<r.cooldownMs?!1:(t.shown[e]=n,f(s(),t),!0)}return!0}function M(e,...r){let o=y.get(e);if(!o)return process.env.SOOTSIM_HINTS_DEBUG&&console.error(` [hints] no hint registered for id "${e}"`),!1;if(!x(e,o.frequency))return!1;let n=o.render(...r);if(n==null)return!1;let t=Array.isArray(n)?n:[n],c=o.stream==="error"?console.error:console.log;for(let g of t)c(` hint: ${g}`);return!0}function O(){m(s(),{force:!0})}function k(){m(l(),{force:!0})}function T(){return Array.from(y.entries()).map(([e,r])=>({id:e,frequency:r.frequency}))}i("app-still-loading",{frequency:{cooldownMs:6e4},render:e=>`app may still be loading (${e} nodes). run \`sootsim wait ready\` first.`});i("wait-selector-for-missing-testid",{frequency:"once-per-identity",render:e=>`sootsim wait selector ${e}`,stream:"error"});i("prefer-cli-over-eval",{frequency:"once-per-identity",render:e=>e.length?["try the CLI shortcut instead:",...e.map(r=>` ${r}`)]:null,stream:"error"});i("describe-use-filters",{frequency:"once-per-identity",render:()=>["describe output is long. narrow it with:"," sootsim describe --only '*Bottom Sheet*'"," sootsim describe --testid-like 'swap-*'"," sootsim describe --subtree <testID>"]});i("subtree-root-not-found",{frequency:"always",render:e=>`no node with testID/id "${e}" \u2014 try \`sootsim find --testid ${e}\` to discover available ids.`,stream:"error"});export{M as a,O as b,k as c,T as d};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as s}from"./chunk-DNKB2V2W.js";import{w as o}from"./chunk-JPLTR6JM.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>{i()}),process.on("exit",()=>{i()}))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as s}from"./chunk-CTDDR7HW.js";import{w as o}from"./chunk-E3S6U2QR.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>{i()}),process.on("exit",()=>{i()}))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{existsSync as C,mkdirSync as D,readFileSync as O,rmSync as s,writeFileSync as g}from"fs";import{tmpdir as P}from"os";import{dirname as R,join as A,resolve as x}from"path";import{execFileSync as a}from"child_process";import{readFileSync as I}from"fs";import{createRequire as S}from"module";var o=null;function u(r){o||(o=_());try{return o(r)}catch{return null}}function _(){let r=Number(process.env.PPID);if(Number.isFinite(r)&&r>1&&r!==process.ppid)return()=>r;if(process.platform==="linux")return y();if(process.platform==="darwin"){let n=E();return n||T()}return()=>null}function y(){return r=>{try{let n=I(`/proc/${r}/stat`,"utf8"),t=n.lastIndexOf(")");if(t<0)return null;let i=n.slice(t+1).trim().split(/\s+/),e=Number(i[1]);return Number.isFinite(e)&&e>0?e:null}catch{return null}}}var N=3,d=216,b=16;function E(){if(!process.versions?.bun)return null;try{let r=S(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),i=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),e=Buffer.alloc(d);return m=>{if(Number(i.symbols.proc_pidinfo(m,N,0n,e,d))<=0)return null;let p=e.readUInt32LE(b);return p>0?p:null}}catch{return null}}function T(){return r=>{try{let t=a("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
3
3
  `)[1];if(!t)return null;let i=t.trim().split(/\s+/),e=Number(i[2]);return Number.isFinite(e)&&e>1?e:null}catch{return null}}}var c=1,f="SOOTSIM_CLI_CURRENT_SIM_PATH",v=["SOOTSIM_CLI_IDENTITY","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"];function F(r,n=20){let t=u(r);if(!t||t<=1)return null;for(let i=0;i<n;i++){let e=u(t);if(!e||e<=1)return t;t=e}return t}function k(){for(let n of v){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=F(process.ppid);return r&&r>1?{key:`gppid-${r}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function L(){return k().key}function l(){if(process.env[f])return x(process.env[f]);let r=L();return A(P(),`sootsim-current-sim-${r}.json`)}function h(){let r=l();if(!C(r))return null;try{let n=JSON.parse(O(r,"utf8"));return n.version!==c||typeof n.simId!="string"||!n.simId.trim()||typeof n.updatedAt!="string"?(s(r,{force:!0}),null):{version:c,simId:n.simId.trim(),updatedAt:n.updatedAt}}catch{return s(r,{force:!0}),null}}function J(){return h()?.simId||null}function j(r){let n=r.trim();if(!n)return;let t=l();D(R(t),{recursive:!0}),g(t,JSON.stringify({version:c,simId:n,updatedAt:new Date().toISOString()},null,2)+`
4
4
  `)}function K(){s(l(),{force:!0})}export{k as a,L as b,J as c,j as d,K as e};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as w,i as u,j as m,k as l}from"./chunk-Q2424XB2.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as w,i as u,j as m,k as l}from"./chunk-AZYLZGRV.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.52 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.53 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var o="sootsimConfig";function e(n){return!!n&&Object.keys(n).length>0}function s(n){return n?e(n.modules)||e(n.turboModules)||e(n.nativeModules)||e(n.env)||e(n.settings)||e(n.initialState):!1}function u(n,i){let t=new URL(n);return s(i)?t.searchParams.set(o,JSON.stringify(i)):t.searchParams.delete(o),t.toString()}var g="/index.bundle?platform=ios&dev=true&hot=true&minify=false";function r(n){return/^https?:\/\//i.test(n)}function a(n){return n.endsWith(".bundle")}function l(n){try{let i=r(n),t=new URL(n,"http://soot.local");return t.pathname=t.pathname.replace(/\.\.bundle$/,".bundle"),a(t.pathname)?(t.searchParams.delete("transform.bytecode"),i?t.toString():`${t.pathname}${t.search}${t.hash}`):n}catch{return n}}export{u as a,g as b,l as c};