sootsim 0.1.174 → 0.1.176

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 (148) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-EHUPKIHD.js → agent-XZERN2SO.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-L5F5DCXN.js → agent-wrapper-SAIMSLSO.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-K4FD7ITP.js → app-fonts-SQVNXLI5.js} +2 -2
  5. package/dist-cli/chunks/{assert-IAGOGXRA.js → assert-EWL6BYVH.js} +2 -2
  6. package/dist-cli/chunks/beta-2CPZK3F2.js +2 -0
  7. package/dist-cli/chunks/{camera-YRT5HULX.js → camera-FFYSKETF.js} +2 -2
  8. package/dist-cli/chunks/{chunk-SCM3ERN4.js → chunk-2SUR2RR2.js} +1 -1
  9. package/dist-cli/chunks/chunk-3LI5PWSP.js +2 -0
  10. package/dist-cli/chunks/{chunk-SWKBOGBZ.js → chunk-4WLI2STY.js} +2 -2
  11. package/dist-cli/chunks/{chunk-DY55G3EZ.js → chunk-55LUU75I.js} +2 -2
  12. package/dist-cli/chunks/{chunk-X7OTWLOA.js → chunk-63VEHUYI.js} +2 -2
  13. package/dist-cli/chunks/{chunk-GERUGIKH.js → chunk-6BU5E655.js} +12 -12
  14. package/dist-cli/chunks/{chunk-7E24LDJL.js → chunk-6S2MBFBN.js} +1 -1
  15. package/dist-cli/chunks/chunk-6WURQDZI.js +1 -0
  16. package/dist-cli/chunks/{chunk-7QNSKZ5Y.js → chunk-BGP3OZID.js} +1 -1
  17. package/dist-cli/chunks/{chunk-7A4YXD3W.js → chunk-CEMRS6UL.js} +1 -1
  18. package/dist-cli/chunks/{chunk-MMIENHCP.js → chunk-CF3NJNBJ.js} +2 -2
  19. package/dist-cli/chunks/{chunk-6BM25DJX.js → chunk-CFPELTGN.js} +2 -2
  20. package/dist-cli/chunks/{chunk-HOQZJLG7.js → chunk-D6GUXY2L.js} +2 -2
  21. package/dist-cli/chunks/{chunk-M25NFKL5.js → chunk-EU54PRND.js} +2 -2
  22. package/dist-cli/chunks/{chunk-YA46Q5HY.js → chunk-GBZNVWFP.js} +2 -2
  23. package/dist-cli/chunks/{chunk-O2PWKVDV.js → chunk-HAW6OMNW.js} +2 -2
  24. package/dist-cli/chunks/{chunk-CBNM2JQX.js → chunk-HZSJ6FL3.js} +2 -2
  25. package/dist-cli/chunks/{chunk-RPRFPJKT.js → chunk-J2BOYJ2U.js} +2 -2
  26. package/dist-cli/chunks/{chunk-TH3AEL45.js → chunk-JXZYXTBM.js} +2 -2
  27. package/dist-cli/chunks/{chunk-J2O2AEFO.js → chunk-L2CTRBGR.js} +1 -1
  28. package/dist-cli/chunks/{chunk-STSULGMI.js → chunk-MWTWVX32.js} +2 -2
  29. package/dist-cli/chunks/{chunk-NEIN26HI.js → chunk-N53VJ3FY.js} +2 -2
  30. package/dist-cli/chunks/{chunk-MZP77ZME.js → chunk-NA2KJSP6.js} +1 -1
  31. package/dist-cli/chunks/{chunk-KLPYSMAV.js → chunk-NMP6YTXS.js} +1 -1
  32. package/dist-cli/chunks/chunk-NPPSB4KE.js +1 -0
  33. package/dist-cli/chunks/{chunk-SFHH65G2.js → chunk-OAOQVBIR.js} +2 -2
  34. package/dist-cli/chunks/{chunk-6OROZMOR.js → chunk-OORRMRMI.js} +1 -1
  35. package/dist-cli/chunks/{chunk-4UEZKS2B.js → chunk-OQ3N5IOK.js} +3 -3
  36. package/dist-cli/chunks/{chunk-IX2RHMWB.js → chunk-PA5EARX2.js} +2 -2
  37. package/dist-cli/chunks/{chunk-JE2Q25A4.js → chunk-PPUEG6C4.js} +1 -1
  38. package/dist-cli/chunks/{chunk-7MVFXNE7.js → chunk-PVIMLBMX.js} +3 -3
  39. package/dist-cli/chunks/{chunk-IIEAMA66.js → chunk-Q4YNZFJF.js} +2 -2
  40. package/dist-cli/chunks/{chunk-N5CGRRGJ.js → chunk-SR7DWNZ3.js} +1 -1
  41. package/dist-cli/chunks/chunk-STWES7DO.js +2 -0
  42. package/dist-cli/chunks/{chunk-H4FFM26I.js → chunk-T3576IDX.js} +1 -1
  43. package/dist-cli/chunks/{chunk-KERGT5NG.js → chunk-VBUURELX.js} +2 -2
  44. package/dist-cli/chunks/{chunk-YA4XRTIG.js → chunk-W2AZ7ASM.js} +1 -1
  45. package/dist-cli/chunks/{chunk-OXREO6LV.js → chunk-W5QHYSDJ.js} +2 -2
  46. package/dist-cli/chunks/{chunk-3SU6H3TH.js → chunk-XC3EDXUI.js} +1 -1
  47. package/dist-cli/chunks/{chunk-FFKK3UYP.js → chunk-XKNXS6EC.js} +1 -1
  48. package/dist-cli/chunks/{chunk-W3SYJD3H.js → chunk-XKVI3H2G.js} +2 -2
  49. package/dist-cli/chunks/{chunk-7NRQVOIK.js → chunk-Y2ZSLUGO.js} +2 -2
  50. package/dist-cli/chunks/{chunk-TPE7XEGU.js → chunk-Y3NDHGEY.js} +2 -2
  51. package/dist-cli/chunks/{chunk-UARZTJ6K.js → chunk-ZAAITWNI.js} +1 -1
  52. package/dist-cli/chunks/{chunk-U7BX2XYL.js → chunk-ZHFUIBAE.js} +1 -1
  53. package/dist-cli/chunks/cli-version-ZQBDNAUR.js +2 -0
  54. package/dist-cli/chunks/{compat-SJW4SLDF.js → compat-ZFBUC4BH.js} +3 -3
  55. package/dist-cli/chunks/{control-HS3KMAUF.js → control-3JJLR4W5.js} +2 -2
  56. package/dist-cli/chunks/{cpu-profile-E46RYKZY.js → cpu-profile-FCEFZTYY.js} +2 -2
  57. package/dist-cli/chunks/daemon-3GBPTTR7.js +2 -0
  58. package/dist-cli/chunks/{debug-TO5VRPFP.js → debug-CUBIZBSH.js} +3 -3
  59. package/dist-cli/chunks/{detox-IWT2ZC6E.js → detox-4225EYR3.js} +2 -2
  60. package/dist-cli/chunks/{device-MM2473ZQ.js → device-S6BWDHPM.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-5COWPUYY.js → diagnose-6CIKXRQI.js} +2 -2
  62. package/dist-cli/chunks/drivers-LI6YV5M7.js +2 -0
  63. package/dist-cli/chunks/{electron-HQGMUN3T.js → electron-37AEV4TD.js} +3 -3
  64. package/dist-cli/chunks/flow-VBH4BQSB.js +2 -0
  65. package/dist-cli/chunks/help-23IS4JFP.js +2 -0
  66. package/dist-cli/chunks/{hints-G6LSQHOA.js → hints-NNX3XRHL.js} +2 -2
  67. package/dist-cli/chunks/{home-paths-WVKPC676.js → home-paths-GOXDTTLM.js} +2 -2
  68. package/dist-cli/chunks/inspect-YSYKYPAO.js +987 -0
  69. package/dist-cli/chunks/{install-desktop-CWTQXAHN.js → install-desktop-OHGSHF3I.js} +3 -3
  70. package/dist-cli/chunks/{keys-DCWFESUB.js → keys-U7AANCE7.js} +2 -2
  71. package/dist-cli/chunks/{login-WTZRKO4L.js → login-HQ7IGHOQ.js} +4 -4
  72. package/dist-cli/chunks/{logout-3XCA6HOX.js → logout-CDVV56NI.js} +2 -2
  73. package/dist-cli/chunks/{maestro-5VKHW67Y.js → maestro-ZSO5MEL7.js} +2 -2
  74. package/dist-cli/chunks/optional-demo-registry-RG5TBVMN.js +2 -0
  75. package/dist-cli/chunks/{preview-ZBD2J4MR.js → preview-QHRLVFZ3.js} +2 -2
  76. package/dist-cli/chunks/{profile-3ENYOSN4.js → profile-JQ2VTWDK.js} +2 -2
  77. package/dist-cli/chunks/{react-DASWRMSI.js → react-FZAOHKVR.js} +2 -2
  78. package/dist-cli/chunks/{record-EICRO6TY.js → record-6SKJBVDV.js} +4 -4
  79. package/dist-cli/chunks/runtime-KFHRVRZQ.js +2 -0
  80. package/dist-cli/chunks/{screenshot-HE6MAIMM.js → screenshot-ZWWD7RKD.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-OQDAMXSB.js → screenshot-mode-AVGIIPOT.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-5WZVXZ5W.js → screenshots-HNAQHHEZ.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-capture-UZP6TEXX.js → screenshots-capture-GR3JCQEV.js} +2 -2
  84. package/dist-cli/chunks/{serve-BAXU4D42.js → serve-E5JSN7LL.js} +10 -10
  85. package/dist-cli/chunks/{setup-DRMJTUMK.js → setup-2M6ZQHFS.js} +2 -2
  86. package/dist-cli/chunks/{skills-R6NXAFPT.js → skills-EK6EIZKG.js} +2 -2
  87. package/dist-cli/chunks/{slides-SGIOOUVU.js → slides-7LMX75H7.js} +2 -2
  88. package/dist-cli/chunks/store-VOGIKQFW.js +2 -0
  89. package/dist-cli/chunks/telemetry-7TUUNCCB.js +2 -0
  90. package/dist-cli/chunks/{test-7HAXG4AU.js → test-GTYC4F55.js} +3 -3
  91. package/dist-cli/chunks/{three-mode-GBC3JNV6.js → three-mode-2PYZFZSU.js} +2 -2
  92. package/dist-cli/chunks/{timeline-C3HHCWU7.js → timeline-MIFLVHUE.js} +2 -2
  93. package/dist-cli/chunks/{upgrade-AJ7FIJO2.js → upgrade-ZVV5XJUB.js} +2 -2
  94. package/dist-cli/chunks/upload-AW66MDC5.js +2 -0
  95. package/dist-cli/chunks/{version-RYF5DY5P.js → version-IDZEL6JB.js} +2 -2
  96. package/dist-cli/chunks/{web-VPQD3D5K.js → web-IGOSYQWE.js} +2 -2
  97. package/dist-cli/chunks/{what-happened-QRPH35TD.js → what-happened-2YDLA4TU.js} +2 -2
  98. package/dist-cli/chunks/{whoami-BPGQUMYX.js → whoami-MHMILIEP.js} +2 -2
  99. package/dist-lib/agent-daemon-client.cjs +1 -1
  100. package/dist-lib/agent-events.cjs +1 -1
  101. package/dist-lib/agent-sessions.cjs +1 -1
  102. package/dist-lib/attached-projects.cjs +1 -1
  103. package/dist-lib/auth/shared-session.cjs +1 -1
  104. package/dist-lib/backend-origin.cjs +1 -1
  105. package/dist-lib/beta.cjs +1 -1
  106. package/dist-lib/beta.mjs +1 -1
  107. package/dist-lib/bridge-constants.cjs +7 -1
  108. package/dist-lib/cli-constants.cjs +1 -1
  109. package/dist-lib/config.cjs +1 -1
  110. package/dist-lib/detox/index.cjs +1 -1
  111. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  112. package/dist-lib/home-paths.cjs +1 -1
  113. package/dist-lib/host/bridge-host.cjs +3 -2
  114. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  115. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  116. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  117. package/dist-lib/host/websocket-proxy.cjs +1 -1
  118. package/dist-lib/index.cjs +1 -1
  119. package/dist-lib/jump-to-source-babel.cjs +1 -1
  120. package/dist-lib/menu.cjs +1 -1
  121. package/dist-lib/menu.mjs +1 -1
  122. package/dist-lib/metro.cjs +1 -1
  123. package/dist-lib/profiles.cjs +1 -1
  124. package/dist-lib/render-mode.cjs +1 -1
  125. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  126. package/dist-lib/sdk.cjs +28 -1
  127. package/dist-lib/sdk.mjs +27 -1
  128. package/dist-lib/skills.cjs +10 -3
  129. package/dist-lib/vite.cjs +1 -1
  130. package/package.json +1 -1
  131. package/src/bridge-constants.ts +9 -0
  132. package/src/host/bridge-host.ts +7 -4
  133. package/dist-cli/chunks/beta-U7KMLBHU.js +0 -2
  134. package/dist-cli/chunks/chunk-3FGEZ5ZM.js +0 -1
  135. package/dist-cli/chunks/chunk-C77TGXJ6.js +0 -1
  136. package/dist-cli/chunks/chunk-GPC5MNUW.js +0 -2
  137. package/dist-cli/chunks/chunk-QWKK2QEY.js +0 -2
  138. package/dist-cli/chunks/cli-version-YJOJPTJN.js +0 -2
  139. package/dist-cli/chunks/daemon-ZTEQIFR3.js +0 -2
  140. package/dist-cli/chunks/drivers-VFOM6SJP.js +0 -2
  141. package/dist-cli/chunks/flow-Z5DTMEGY.js +0 -2
  142. package/dist-cli/chunks/help-GYJH5S4Y.js +0 -2
  143. package/dist-cli/chunks/inspect-LTFGONJD.js +0 -978
  144. package/dist-cli/chunks/optional-demo-registry-VKTF3JLY.js +0 -2
  145. package/dist-cli/chunks/runtime-FLNHVIWT.js +0 -2
  146. package/dist-cli/chunks/store-ZQ4F3GEO.js +0 -2
  147. package/dist-cli/chunks/telemetry-YTN2XUOV.js +0 -2
  148. package/dist-cli/chunks/upload-JXH5MBZO.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as F,b as Q,c as Y,d as ye,e as Se}from"./chunk-6BM25DJX.js";import{m as N}from"./chunk-STSULGMI.js";import{m as ge,o as we}from"./chunk-GERUGIKH.js";import{g as te}from"./chunk-W3SYJD3H.js";import{a as U,b as Z}from"./chunk-UARZTJ6K.js";import{c as ve}from"./chunk-HOQZJLG7.js";import{a as xe,b as ke}from"./chunk-YA4XRTIG.js";import{a as $e,b as X,c as Ie}from"./chunk-N5CGRRGJ.js";import{b as be,c as I,d as y,e as x}from"./chunk-O2PWKVDV.js";import{d as ee}from"./chunk-JE2Q25A4.js";import{a as he}from"./chunk-GPC5MNUW.js";import{d as M,e as b,f as T}from"./chunk-3SU6H3TH.js";import{D as fe,I as A,K as C,l as pe}from"./chunk-6OROZMOR.js";import{spawn as Oe}from"node:child_process";import R from"node:fs";import Ye from"node:os";import k from"node:path";import{WebSocket as Xe}from"ws";function We(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function H(e){let t=We(e);return t==="localhost"||t.endsWith(".localhost")||t==="0.0.0.0"||t==="::1"||/^127(?:\.\d{1,3}){3}$/.test(t)}function Pe(e){return new Error(`could not resolve a native bundle for ${e}. pass an explicit bundle URL or open Connect and choose the app there.`)}function je(e,t){return e?.includes("/one/metro-entry.bundle")?"one":typeof t=="string"&&t?"expo":"unknown"}function Me(e,t,o){return`${e}//${t}:${o}`}function ze(e){if(typeof window>"u")return!1;try{let t=new URL(e);return H(t.hostname)&&H(window.location.hostname)&&t.origin!==window.location.origin}catch{return!1}}async function Ce(e,t){let o={...t,cache:t?.cache??"no-store"};return ze(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,o):fetch(e,o)}function qe(e){return e==="https:"?443:80}function Ve(e){let t=e.pathname||"/";return(t==="/"||t==="")&&!e.search&&!e.hash}async function Ge(e){try{let t=await fetch("/__server-scan",{cache:"no-store"});if(!t.ok||!(t.headers.get("content-type")||"").toLowerCase().includes("json"))return null;let o=await t.json();if(!Array.isArray(o))return null;let n=o.find(r=>!!r&&typeof r=="object"&&r.port===e&&typeof r.bundleUrl=="string");return n?{bundleUrl:Y(n.bundleUrl),port:e,framework:typeof n.framework=="string"?n.framework:"unknown",projectName:typeof n.projectName=="string"?n.projectName:void 0}:null}catch{return null}}async function Te(e,t){let o=e.replace(/\/+$/,"");try{if(H(new URL(o).hostname)){let n=await Ge(t);if(n)return n}}catch{}try{let n=await Ce(`${o}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},i=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(i||s.name)return{bundleUrl:Y(i||`${o}${Q}`),port:t,framework:je(i,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await Ce(`${o}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${o}${Q}`,port:t,framework:"metro"}}catch{}return null}async function Je(e){return Te(Me("http:","localhost",e),e)}async function Ue(e){let t=e.trim();if(/^\d+$/.test(t)){let a=parseInt(t,10),l=await Je(a);if(l)return l;throw Pe(`localhost:${a}`)}let o=t.startsWith("http")?t:`http://${t}`,n;try{n=new URL(o)}catch{throw new Error(`could not parse "${e}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):qe(r),i=Me(r,n.hostname,s);if(Ve(n)){let a=await Te(i,s);if(a)return a;throw Pe(i)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function Ht(){console.error(" no sootsim desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" sootsim install-desktop"),console.error(""),console.error(" or run setup to install the background daemon:"),console.error(" sootsim setup"),console.error("")}function Ee(e){let t=U();if(console.log(` note: no sootsim bridge detected on port ${e}`),t){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" run `sootsim setup` to install the background daemon,"),console.log(" or run `sootsim serve` in another shell for a foreground bridge.")}function Qe(e){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${e}.`),console.error(""),console.error(" start your app dev server, then open it in sootsim:"),console.error(" npx expo start --localhost --port 8081"),console.error(" sootsim open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" sootsim describe")}async function Kt(e,t,o){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){Qe(t);return}console.error(` no sim with id "${o}" is connected to the bridge on port ${t}.`),console.error(""),console.error(" connected sims:");for(let r of n){let s=[r.isPrimary?"primary":null,r.readyState,r.userVisible===!1?"hidden":r.userVisible===!0?"visible":null,r.userFocused?"focused":null].filter(Boolean).join(", ");console.error(` ${r.id} (${s})`)}console.error(""),console.error(" pass a valid --sim id, or run `sootsim list` to see all sessions.")}var Ze=12e4,Re=500,et=5e3,_e=1e4,tt={rn:"/rn",connectrn:"/rn","connect-rn":"/rn",clock:"/app/clock","native-ui":"/app/native-ui",tamagui:"/app/tamagui",settings:"/app/settings",photos:"/app/photos",camera:"/app/camera"};function v(e){return new Promise(t=>setTimeout(t,e))}function Be(e){let t=process.env[e]?.trim();if(!t)return null;let o=Number(t);return Number.isInteger(o)&&o>0?o:null}function ot(){let e=Be("SOOTSIM_DRIVER_CONNECT_TIMEOUT_MS")??Be("SOOTSIM_PW_CONNECT_TIMEOUT_MS")??Ze;return{timeoutMs:e,hostTimeoutMs:e+et,intervalMs:Re,attempts:Math.max(1,Math.ceil(e/Re))}}function nt(e){return e==="chromium"||e==="electron"||e==="playwright"||e==="system"}function rt(e,t){return e.includes("--headless")?!0:e.includes("--headed")?!1:t==="playwright"&&process.platform==="linux"&&!process.env.DISPLAY&&!process.env.WAYLAND_DISPLAY?(console.error(" no display detected \u2192 running playwright headless (override with --headed)"),!0):!1}function j(e){return e.trim()}async function st(e){if(await K(e,250))return e;let t=A();if(t&&C(t)&&await K(t.bridgePort,500))return t.bridgePort;if(t&&C(t))throw new Error(`sootsim bridge lockfile is fresh (port ${t.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`);await it();let o=at(["serve","--quiet","--port",String(e)]),n=null;o.once("exit",(s,i)=>{n=String(s??i??"unknown")}),o.unref();let r=Date.now()+_e;for(;Date.now()<r;){let s=A();if(s&&C(s)&&await K(s.bridgePort,250))return console.error(` started local bridge on port ${s.bridgePort}; run \`sootsim setup\` to install the background daemon`),s.bridgePort;if(await K(e,250))return console.error(` started local bridge on port ${e}; run \`sootsim setup\` to install the background daemon`),e;if(n)throw new Error(`sootsim bridge exited before becoming ready (exit ${n})`);await v(150)}throw new Error(`sootsim bridge did not start within ${Math.round(_e/1e3)}s`)}async function it(){let e=fe();if(e&&R.existsSync(pe(e)))return;console.error(" installing sootsim engine runtime...");let{runRuntime:t}=await import("./runtime-FLNHVIWT.js");await t(["install"],{})}function at(e){let t=process.argv[1];return t&&R.existsSync(t)?Oe(process.execPath,[t,...e],{detached:!0,stdio:"ignore",env:process.env}):Oe("sootsim",e,{detached:!0,stdio:"ignore",env:process.env})}function K(e,t){return new Promise(o=>{let n=new Xe(`ws://127.0.0.1:${e}`,{handshakeTimeout:t}),r=!1,s=i=>{if(!r){r=!0;try{n.close()}catch{}o(i)}};n.once("open",()=>s(!0)),n.once("error",()=>s(!1)),setTimeout(()=>s(!1),t)})}function re(e){try{let t=new URL(e),o=t.pathname.replace(/\/+$/,"")||"/";return t.searchParams.has("open")||t.searchParams.has("port")||t.searchParams.has("bundle")||t.searchParams.has("demo")||t.pathname.includes("/sootsim/index.html")||o==="/sootsim"||t.pathname==="/__soot"||t.pathname==="/__soot/"||o==="/rn"||/^\/rn\/[^/]+$/i.test(o)||/^\/app\/[^/]+$/i.test(o)||o==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(o)||/^\/__soot\/app\/[^/]+$/i.test(o)}catch{return!1}}function lt(e){try{let t=new URL(e).pathname.replace(/\/+$/,"")||"/";return/^\/preview\/[^/]+$/.test(t)||/^\/build\/.+/.test(t)}catch{return!1}}async function po(e){let t=j(e);return(await Ne(t)).bundleUrl}function ct(e){try{let t=new URL(e.startsWith("http")?e:`http://${e}`),o=t.pathname||"/";if(o!=="/"&&o!==""||t.search||t.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(t.hostname))return null;let n=t.port?Number(t.port):t.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function Ne(e){let t=j(e),o=/^\d+$/.test(t)?Number(t):ct(t);if(o&&o>0){let n=await Se(o);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return Ue(t)}function ie(e){let t=e.replace(/\/+$/,"")||"/";return t==="/__soot"||t.startsWith("/__soot/")?"/__soot":""}function dt(e,t){let o=j(e),n=new URL(t),r=ie(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(o)?n.pathname=`${r}/rn/${o}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",o)),n.toString()}function mt(e){let t=j(e);return/^\d+$/.test(t)||/^https?:\/\//i.test(t)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(t)}async function ut(e,t,o={}){let n=await Ne(e),r=new URL(t),s=ie(r.pathname);r.pathname=`${s}/rn`,r.searchParams.delete("open"),r.searchParams.delete("port"),r.searchParams.delete("demo"),r.searchParams.delete("app");let i=o.hot===void 0?n.bundleUrl:ye(n.bundleUrl,o.hot);return r.searchParams.set("bundle",i),r.toString()}function pt(e){return e.startsWith("~/")?k.join(Ye.homedir(),e.slice(2)):k.isAbsolute(e)?e:k.resolve(process.cwd(),e)}function ft(e){let t={},o={};for(let r=0;r<e.length;r++){if(e[r]==="--replace"){let s=e[r+1];s||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let i=s.indexOf("=");(i<=0||i===s.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let a=s.slice(0,i).trim(),l=pt(s.slice(i+1).trim());R.existsSync(l)||(console.error(` sootsim open: replacement file not found: ${l}`),process.exit(1)),t[a]={file:l},r++;continue}if(e[r]==="--remap"){let s=e[r+1],i=s?s.indexOf("="):-1;(!s||i<=0||i===s.length-1)&&(console.error(" sootsim open: --remap expects <host:port>=<host:port>"),process.exit(1)),o[s.slice(0,i).trim()]=s.slice(i+1).trim(),r++;continue}}let n={};return Object.keys(t).length>0&&(n.modules=t),Object.keys(o).length>0&&(n.network={remap:o}),n.modules||n.network?n:void 0}function Fe(){let e=A();return C(e)&&e.runtimePort>0?`http://localhost:${e.runtimePort}/`:he}async function ht(e){try{let t=new URL(e),o=t.searchParams.get("bundle")||"";if(!o)return e;let n=process.env.SOOT_REPO_DIR||await X(o)||void 0,r=$e({bundleUrl:o,repoDir:n});if(r.length===0)return e;let s=await gt(r);return s.length===0?e:(t.searchParams.set("appFonts",Ie(s)),t.toString())}catch{return e}}async function gt(e){let t=await Promise.all(e.map(async n=>{let r=new AbortController,s=setTimeout(()=>r.abort(),1500);try{let i=await fetch(n.url,{method:"HEAD",signal:r.signal});return i.status>=200&&i.status<400?n:null}catch{return null}finally{clearTimeout(s)}})),o=[];for(let n of t)n!==null&&o.push(n);return o}async function wt(e,t,o={}){if(!e)return new URL(t).toString();if(re(e))return new URL(e).toString();let n=tt[e.toLowerCase()];if(n){let r=new URL(t),s=ie(r.pathname);return r.pathname=`${s}${n}`,r.toString()}return mt(e)?ut(e,t,o):dt(e,t)}async function bt(e){try{let t=new URL(e),o=t.searchParams.get("bundle")||"";if(!o)return e;let n=process.env.SOOT_REPO_DIR||await X(o)||void 0,r=xe({bundleUrl:o,repoDir:n});return!r||r.imageUrl&&!await yt(r.imageUrl)?e:(t.searchParams.set("appSplash",ke(r)),t.toString())}catch{return e}}async function yt(e){let t=new AbortController,o=setTimeout(()=>t.abort(),1500);try{let n=await fetch(e,{method:"HEAD",signal:t.signal});return n.status>=200&&n.status<400}catch{return!1}finally{clearTimeout(o)}}async function W(e,t=Fe(),o={}){let n=await wt(e,t,o);return bt(await ht(n))}function De(e,t){let o=e?.url||e?.origin||t;try{let n=new URL(o);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.searchParams.delete("appFonts"),n.searchParams.delete("appSplash"),n.toString()}catch{return t}}async function St(e,t,o,n={}){let r=new URL(await W(e,t,n));return r.searchParams.set("inspectOpen",o),r.toString()}async function vt(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500,i=n.minNodeCount??10;for(let a=0;a<r;a++){let l=y(e,{commandTimeoutMs:t,simId:o,simIdSource:"flag"});try{let c=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>i)return{bridge:l,count:c}}catch{}l.close(),await v(s)}return null}function $t(e){if(!e)return null;try{let t=new URL(e);if(t.searchParams.has("bundle")){let o=t.searchParams.get("bundle")||"";try{let n=new URL(o),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return t.searchParams.has("port")?`connect :${t.searchParams.get("port")||""}`:t.searchParams.has("open")?`connect ${t.searchParams.get("open")||""}`:t.searchParams.has("demo")?`demo ${t.searchParams.get("demo")||"default"}`:t.pathname.includes("/sootsim/index.html")||t.pathname==="/sootsim/"||t.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function It(e){let t=e.indexOf(":");if(t<=0)return e.length>24?`${e.slice(0,21)}\u2026`:e;let o=e.slice(0,t),n=e.slice(t+1),r=n.length>12?`${n.slice(0,8)}\u2026`:n;return o==="CLAUDE_CODE_SESSION_ID"||o==="CODEX_THREAD_ID"?`agent ${r}`:`${o} ${r}`}function xt(e,t){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as F,b as Q,c as Y,d as ye,e as Se}from"./chunk-CFPELTGN.js";import{m as N}from"./chunk-MWTWVX32.js";import{m as ge,o as we}from"./chunk-6BU5E655.js";import{g as te}from"./chunk-XKVI3H2G.js";import{a as U,b as Z}from"./chunk-ZAAITWNI.js";import{c as ve}from"./chunk-D6GUXY2L.js";import{a as xe,b as ke}from"./chunk-W2AZ7ASM.js";import{a as $e,b as X,c as Ie}from"./chunk-SR7DWNZ3.js";import{b as be,c as I,d as y,e as x}from"./chunk-HAW6OMNW.js";import{d as ee}from"./chunk-PPUEG6C4.js";import{a as he}from"./chunk-3LI5PWSP.js";import{d as M,e as b,f as T}from"./chunk-XC3EDXUI.js";import{D as fe,I as A,K as C,l as pe}from"./chunk-OORRMRMI.js";import{spawn as Oe}from"node:child_process";import R from"node:fs";import Ye from"node:os";import k from"node:path";import{WebSocket as Xe}from"ws";function We(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function H(e){let t=We(e);return t==="localhost"||t.endsWith(".localhost")||t==="0.0.0.0"||t==="::1"||/^127(?:\.\d{1,3}){3}$/.test(t)}function Pe(e){return new Error(`could not resolve a native bundle for ${e}. pass an explicit bundle URL or open Connect and choose the app there.`)}function je(e,t){return e?.includes("/one/metro-entry.bundle")?"one":typeof t=="string"&&t?"expo":"unknown"}function Me(e,t,o){return`${e}//${t}:${o}`}function ze(e){if(typeof window>"u")return!1;try{let t=new URL(e);return H(t.hostname)&&H(window.location.hostname)&&t.origin!==window.location.origin}catch{return!1}}async function Ce(e,t){let o={...t,cache:t?.cache??"no-store"};return ze(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,o):fetch(e,o)}function qe(e){return e==="https:"?443:80}function Ve(e){let t=e.pathname||"/";return(t==="/"||t==="")&&!e.search&&!e.hash}async function Ge(e){try{let t=await fetch("/__server-scan",{cache:"no-store"});if(!t.ok||!(t.headers.get("content-type")||"").toLowerCase().includes("json"))return null;let o=await t.json();if(!Array.isArray(o))return null;let n=o.find(r=>!!r&&typeof r=="object"&&r.port===e&&typeof r.bundleUrl=="string");return n?{bundleUrl:Y(n.bundleUrl),port:e,framework:typeof n.framework=="string"?n.framework:"unknown",projectName:typeof n.projectName=="string"?n.projectName:void 0}:null}catch{return null}}async function Te(e,t){let o=e.replace(/\/+$/,"");try{if(H(new URL(o).hostname)){let n=await Ge(t);if(n)return n}}catch{}try{let n=await Ce(`${o}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},i=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(i||s.name)return{bundleUrl:Y(i||`${o}${Q}`),port:t,framework:je(i,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await Ce(`${o}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${o}${Q}`,port:t,framework:"metro"}}catch{}return null}async function Je(e){return Te(Me("http:","localhost",e),e)}async function Ue(e){let t=e.trim();if(/^\d+$/.test(t)){let a=parseInt(t,10),l=await Je(a);if(l)return l;throw Pe(`localhost:${a}`)}let o=t.startsWith("http")?t:`http://${t}`,n;try{n=new URL(o)}catch{throw new Error(`could not parse "${e}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):qe(r),i=Me(r,n.hostname,s);if(Ve(n)){let a=await Te(i,s);if(a)return a;throw Pe(i)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function Ht(){console.error(" no sootsim desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" sootsim install-desktop"),console.error(""),console.error(" or run setup to install the background daemon:"),console.error(" sootsim setup"),console.error("")}function Ee(e){let t=U();if(console.log(` note: no sootsim bridge detected on port ${e}`),t){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" run `sootsim setup` to install the background daemon,"),console.log(" or run `sootsim serve` in another shell for a foreground bridge.")}function Qe(e){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${e}.`),console.error(""),console.error(" start your app dev server, then open it in sootsim:"),console.error(" npx expo start --localhost --port 8081"),console.error(" sootsim open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" sootsim describe")}async function Kt(e,t,o){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){Qe(t);return}console.error(` no sim with id "${o}" is connected to the bridge on port ${t}.`),console.error(""),console.error(" connected sims:");for(let r of n){let s=[r.isPrimary?"primary":null,r.readyState,r.userVisible===!1?"hidden":r.userVisible===!0?"visible":null,r.userFocused?"focused":null].filter(Boolean).join(", ");console.error(` ${r.id} (${s})`)}console.error(""),console.error(" pass a valid --sim id, or run `sootsim list` to see all sessions.")}var Ze=12e4,Re=500,et=5e3,_e=1e4,tt={rn:"/rn",connectrn:"/rn","connect-rn":"/rn",clock:"/app/clock","native-ui":"/app/native-ui",tamagui:"/app/tamagui",settings:"/app/settings",photos:"/app/photos",camera:"/app/camera"};function v(e){return new Promise(t=>setTimeout(t,e))}function Be(e){let t=process.env[e]?.trim();if(!t)return null;let o=Number(t);return Number.isInteger(o)&&o>0?o:null}function ot(){let e=Be("SOOTSIM_DRIVER_CONNECT_TIMEOUT_MS")??Be("SOOTSIM_PW_CONNECT_TIMEOUT_MS")??Ze;return{timeoutMs:e,hostTimeoutMs:e+et,intervalMs:Re,attempts:Math.max(1,Math.ceil(e/Re))}}function nt(e){return e==="chromium"||e==="electron"||e==="playwright"||e==="system"}function rt(e,t){return e.includes("--headless")?!0:e.includes("--headed")?!1:t==="playwright"&&process.platform==="linux"&&!process.env.DISPLAY&&!process.env.WAYLAND_DISPLAY?(console.error(" no display detected \u2192 running playwright headless (override with --headed)"),!0):!1}function j(e){return e.trim()}async function st(e){if(await K(e,250))return e;let t=A();if(t&&C(t)&&await K(t.bridgePort,500))return t.bridgePort;if(t&&C(t))throw new Error(`sootsim bridge lockfile is fresh (port ${t.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`);await it();let o=at(["serve","--quiet","--port",String(e)]),n=null;o.once("exit",(s,i)=>{n=String(s??i??"unknown")}),o.unref();let r=Date.now()+_e;for(;Date.now()<r;){let s=A();if(s&&C(s)&&await K(s.bridgePort,250))return console.error(` started local bridge on port ${s.bridgePort}; run \`sootsim setup\` to install the background daemon`),s.bridgePort;if(await K(e,250))return console.error(` started local bridge on port ${e}; run \`sootsim setup\` to install the background daemon`),e;if(n)throw new Error(`sootsim bridge exited before becoming ready (exit ${n})`);await v(150)}throw new Error(`sootsim bridge did not start within ${Math.round(_e/1e3)}s`)}async function it(){let e=fe();if(e&&R.existsSync(pe(e)))return;console.error(" installing sootsim engine runtime...");let{runRuntime:t}=await import("./runtime-KFHRVRZQ.js");await t(["install"],{})}function at(e){let t=process.argv[1];return t&&R.existsSync(t)?Oe(process.execPath,[t,...e],{detached:!0,stdio:"ignore",env:process.env}):Oe("sootsim",e,{detached:!0,stdio:"ignore",env:process.env})}function K(e,t){return new Promise(o=>{let n=new Xe(`ws://127.0.0.1:${e}`,{handshakeTimeout:t}),r=!1,s=i=>{if(!r){r=!0;try{n.close()}catch{}o(i)}};n.once("open",()=>s(!0)),n.once("error",()=>s(!1)),setTimeout(()=>s(!1),t)})}function re(e){try{let t=new URL(e),o=t.pathname.replace(/\/+$/,"")||"/";return t.searchParams.has("open")||t.searchParams.has("port")||t.searchParams.has("bundle")||t.searchParams.has("demo")||t.pathname.includes("/sootsim/index.html")||o==="/sootsim"||t.pathname==="/__soot"||t.pathname==="/__soot/"||o==="/rn"||/^\/rn\/[^/]+$/i.test(o)||/^\/app\/[^/]+$/i.test(o)||o==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(o)||/^\/__soot\/app\/[^/]+$/i.test(o)}catch{return!1}}function lt(e){try{let t=new URL(e).pathname.replace(/\/+$/,"")||"/";return/^\/preview\/[^/]+$/.test(t)||/^\/build\/.+/.test(t)}catch{return!1}}async function po(e){let t=j(e);return(await Ne(t)).bundleUrl}function ct(e){try{let t=new URL(e.startsWith("http")?e:`http://${e}`),o=t.pathname||"/";if(o!=="/"&&o!==""||t.search||t.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(t.hostname))return null;let n=t.port?Number(t.port):t.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function Ne(e){let t=j(e),o=/^\d+$/.test(t)?Number(t):ct(t);if(o&&o>0){let n=await Se(o);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return Ue(t)}function ie(e){let t=e.replace(/\/+$/,"")||"/";return t==="/__soot"||t.startsWith("/__soot/")?"/__soot":""}function dt(e,t){let o=j(e),n=new URL(t),r=ie(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(o)?n.pathname=`${r}/rn/${o}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",o)),n.toString()}function mt(e){let t=j(e);return/^\d+$/.test(t)||/^https?:\/\//i.test(t)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(t)}async function ut(e,t,o={}){let n=await Ne(e),r=new URL(t),s=ie(r.pathname);r.pathname=`${s}/rn`,r.searchParams.delete("open"),r.searchParams.delete("port"),r.searchParams.delete("demo"),r.searchParams.delete("app");let i=o.hot===void 0?n.bundleUrl:ye(n.bundleUrl,o.hot);return r.searchParams.set("bundle",i),r.toString()}function pt(e){return e.startsWith("~/")?k.join(Ye.homedir(),e.slice(2)):k.isAbsolute(e)?e:k.resolve(process.cwd(),e)}function ft(e){let t={},o={};for(let r=0;r<e.length;r++){if(e[r]==="--replace"){let s=e[r+1];s||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let i=s.indexOf("=");(i<=0||i===s.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let a=s.slice(0,i).trim(),l=pt(s.slice(i+1).trim());R.existsSync(l)||(console.error(` sootsim open: replacement file not found: ${l}`),process.exit(1)),t[a]={file:l},r++;continue}if(e[r]==="--remap"){let s=e[r+1],i=s?s.indexOf("="):-1;(!s||i<=0||i===s.length-1)&&(console.error(" sootsim open: --remap expects <host:port>=<host:port>"),process.exit(1)),o[s.slice(0,i).trim()]=s.slice(i+1).trim(),r++;continue}}let n={};return Object.keys(t).length>0&&(n.modules=t),Object.keys(o).length>0&&(n.network={remap:o}),n.modules||n.network?n:void 0}function Fe(){let e=A();return C(e)&&e.runtimePort>0?`http://localhost:${e.runtimePort}/`:he}async function ht(e){try{let t=new URL(e),o=t.searchParams.get("bundle")||"";if(!o)return e;let n=process.env.SOOT_REPO_DIR||await X(o)||void 0,r=$e({bundleUrl:o,repoDir:n});if(r.length===0)return e;let s=await gt(r);return s.length===0?e:(t.searchParams.set("appFonts",Ie(s)),t.toString())}catch{return e}}async function gt(e){let t=await Promise.all(e.map(async n=>{let r=new AbortController,s=setTimeout(()=>r.abort(),1500);try{let i=await fetch(n.url,{method:"HEAD",signal:r.signal});return i.status>=200&&i.status<400?n:null}catch{return null}finally{clearTimeout(s)}})),o=[];for(let n of t)n!==null&&o.push(n);return o}async function wt(e,t,o={}){if(!e)return new URL(t).toString();if(re(e))return new URL(e).toString();let n=tt[e.toLowerCase()];if(n){let r=new URL(t),s=ie(r.pathname);return r.pathname=`${s}${n}`,r.toString()}return mt(e)?ut(e,t,o):dt(e,t)}async function bt(e){try{let t=new URL(e),o=t.searchParams.get("bundle")||"";if(!o)return e;let n=process.env.SOOT_REPO_DIR||await X(o)||void 0,r=xe({bundleUrl:o,repoDir:n});return!r||r.imageUrl&&!await yt(r.imageUrl)?e:(t.searchParams.set("appSplash",ke(r)),t.toString())}catch{return e}}async function yt(e){let t=new AbortController,o=setTimeout(()=>t.abort(),1500);try{let n=await fetch(e,{method:"HEAD",signal:t.signal});return n.status>=200&&n.status<400}catch{return!1}finally{clearTimeout(o)}}async function W(e,t=Fe(),o={}){let n=await wt(e,t,o);return bt(await ht(n))}function De(e,t){let o=e?.url||e?.origin||t;try{let n=new URL(o);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.searchParams.delete("appFonts"),n.searchParams.delete("appSplash"),n.toString()}catch{return t}}async function St(e,t,o,n={}){let r=new URL(await W(e,t,n));return r.searchParams.set("inspectOpen",o),r.toString()}async function vt(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500,i=n.minNodeCount??10;for(let a=0;a<r;a++){let l=y(e,{commandTimeoutMs:t,simId:o,simIdSource:"flag"});try{let c=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>i)return{bridge:l,count:c}}catch{}l.close(),await v(s)}return null}function $t(e){if(!e)return null;try{let t=new URL(e);if(t.searchParams.has("bundle")){let o=t.searchParams.get("bundle")||"";try{let n=new URL(o),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return t.searchParams.has("port")?`connect :${t.searchParams.get("port")||""}`:t.searchParams.has("open")?`connect ${t.searchParams.get("open")||""}`:t.searchParams.has("demo")?`demo ${t.searchParams.get("demo")||"default"}`:t.pathname.includes("/sootsim/index.html")||t.pathname==="/sootsim/"||t.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function It(e){let t=e.indexOf(":");if(t<=0)return e.length>24?`${e.slice(0,21)}\u2026`:e;let o=e.slice(0,t),n=e.slice(t+1),r=n.length>12?`${n.slice(0,8)}\u2026`:n;return o==="CLAUDE_CODE_SESSION_ID"||o==="CODEX_THREAD_ID"?`agent ${r}`:`${o} ${r}`}function xt(e,t){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
3
3
  `);for(let o of e){let n=o.lockedBy&&o.lockExpiresAt?`locked by ${It(o.lockedBy)} (${Math.max(0,Math.round((o.lockExpiresAt-Date.now())/1e3))}s)`:"",r=[o.isPrimary?"primary":"",o.id===t?"selected":"",o.readyState,o.userVisible===!1?"hidden":o.userVisible===!0?"visible":"",o.attachedCliCount&&o.attachedCliCount>0?"in use":"",o.userFocused?"focused":"",n].filter(Boolean);console.log(` ${o.id}${r.length?` [${r.join(", ")}]`:""}`);let s=$t(o.url);if(s)console.log(` loaded: ${s}`);else if(o.url){let a=o.url.length>96?`${o.url.slice(0,93)}\u2026`:o.url;console.log(` url: ${a}`)}else o.origin&&console.log(` origin: ${o.origin}`);let i=kt(o);i&&console.log(` engine: ${i}`),o.title&&console.log(` title: ${o.title}`),o.visibilityState&&o.visibilityState!=="visible"&&console.log(` visibility: ${o.visibilityState}`),console.log(` connected: ${Le(Date.now()-o.connectedAt)}`),o.lastActiveAt&&o.lastActiveAt>0&&console.log(` last active: ${Le(Date.now()-o.lastActiveAt)}`)}}function kt(e){let t=e.url||e.origin||"";if(!t)return null;try{let o=new URL(t).port;return o==="5173"?"dev \u2014 local source (:5173)":o==="3000"?"soot app embedded (:3000)":`runtime \u2014 published engine (:${o||"?"})`}catch{return null}}function Le(e){let t=Math.max(0,Math.round(e/1e3));return t<60?`${t}s ago`:t<3600?`${Math.round(t/60)}m ago`:t<86400?`${Math.round(t/3600)}h ago`:`${Math.round(t/86400)}d ago`}async function oe(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500;for(let i=0;i<r;i++){let a=y(e,{commandTimeoutMs:t});try{let c=(await a.listSims()).find(o);if(c)return c}catch{}finally{a.close()}await v(s)}return null}async function Pt(e,t,o,n,r={}){let s=r.attempts??30,i=r.intervalMs??500,a=!!n&&Number.isInteger(n)&&n>1,l=()=>a&&n!==void 0&&!se(n);for(let c=0;c<s;c++){if(l())return{kind:"host-exit"};let d=y(e,{commandTimeoutMs:t});try{let h=(await d.listSims()).find(o);if(h)return l()?{kind:"host-exit"}:{kind:"match",sim:h}}catch{}finally{d.close()}if(l())return{kind:"host-exit"};await v(i)}return{kind:"timeout"}}async function Ct(e,t,o,n={}){let r=n.attempts??20,s=n.intervalMs??250;for(let i=0;i<r;i++){let a=y(e,{commandTimeoutMs:t});try{let c=(await a.listSims()).find(d=>d.id===o);if(!c||c.readyState!=="open")return!0}catch{return!0}finally{a.close()}await v(s)}return!1}function Mt(e){let t=e.meta;if(!t||t.sootsimHostDriver!=="playwright")return null;let o=Number(t.sootsimHostPid);return!Number.isInteger(o)||o<=1||o===process.pid?null:o}function Tt(e){if(!e.connectAckFile)return!1;try{return R.writeFileSync(e.connectAckFile,`${JSON.stringify({connectedAt:Date.now(),pid:e.pid??null})}
4
4
  `,{flag:"w"}),!0}catch{return!1}}function Ae(e){if(e.diagnosticLogPath)try{let t=R.readFileSync(e.diagnosticLogPath,"utf8").trim();if(!t){console.error(` ${k.basename(e.diagnosticLogPath)} was empty`);return}let o=t.length>4e3?`\u2026
5
5
  ${t.slice(-4e3)}`:t;console.error(` ${k.basename(e.diagnosticLogPath)}:`),console.error(o)}catch(t){let o=t instanceof Error?t.message:String(t);console.error(` failed to read ${k.basename(e.diagnosticLogPath)}: ${o}`)}}function se(e){try{return process.kill(e,0),!0}catch(t){return t?.code==="EPERM"}}async function Ut(e,t=2500){let o=Date.now()+t;for(;Date.now()<o;){if(!se(e))return!0;await v(100)}return!se(e)}async function ne(e,t){let o=new Set(t),n=new Set;for(let r of e){if(!o.has(r.id))continue;let s=Mt(r);s&&n.add(s)}for(let r of n){try{process.kill(r,"SIGTERM")}catch{}if(await Ut(r)){console.log(` closed playwright host process ${r}`);continue}try{process.kill(r,"SIGKILL"),console.log(` force-closed playwright host process ${r}`)}catch{}}}function z(e,t){if(t){let r=t.trim(),s=e.find(i=>i.id===r);if(!s)throw new Error(`no sim connected with id ${r}`);return s}let o=e.find(r=>r.isPrimary&&r.readyState==="open");if(o)return o;let n=e.find(r=>r.readyState==="open");if(n)return n;throw new Error("no sim connected")}function E(e,t,o){console.log(` ${o==="current sim"?"loaded":"opened"}: ${e} [${o}]`),console.log(` current sim: ${t.id}`),console.log(JSON.stringify({simId:t.id,url:t.url},null,2))}async function O(e,t,o){if(o.includes("--no-describe"))return;let n=process.env.SOOTSIM_QUIET_TARGET_NOTICE;process.env.SOOTSIM_QUIET_TARGET_NOTICE="1";try{await Et(e,t,{stableMs:150,maxMs:400});let r=y(e,{commandTimeoutMs:3e3,simId:t,cliLabel:"open --describe",simIdSource:"flag"});try{let s=null;try{s=await r.send({type:"evaluate",code:ge})}catch{}if(s&&!(s.flag===!0&&!s.loadingText&&we(s))){let d=s.loadingText?`still showing "${s.loadingText}"`:s.flag!==!0?"guest ready event has not fired":s.targets<=0?"no visible app content is inspectable yet":"app tree is still stabilizing";console.log(` app still loading: ${d} (nodes: ${s.nodes}, targets: ${s.targets})`),console.log(" before interacting, run: sootsim wait ready --max-ms 120000")}let a=`(async () => {
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{createHash as b}from"node:crypto";import g from"node:fs";import{createRequire as S}from"node:module";import u from"node:path";var y=/\.(ttf|otf|woff|woff2)$/i;function P(t,n,r){if(!t||typeof t!="object")return;let o=t.fonts;if(Array.isArray(o))for(let i of o)typeof i=="string"&&r.push(i);let e=t[n];if(!e||typeof e!="object")return;let s=e.fonts;if(Array.isArray(s))for(let i of s){if(typeof i=="string"){r.push(i);continue}if(!i||typeof i!="object")continue;let c=i.fontDefinitions;if(Array.isArray(c))for(let a of c){if(!a||typeof a!="object")continue;let p=a.path;typeof p=="string"&&r.push(p)}}}function m(t,n){if(!Array.isArray(t))return[];let r=[];for(let o of t){let e=Array.isArray(o)?o[0]:o;if(typeof e!="string"||!/(^|\/)expo-font$/.test(e))continue;let s=Array.isArray(o)?o[1]??{}:{};P(s,n,r)}return r}function C(t){return t.slice(t.lastIndexOf("/")+1).replace(y,"")}function h(t,n){let r=n.replace(/\/+$/,""),o=new Set,e=[];for(let s of t){let i=s.replace(/^\.\//,"").replace(/^\/+/,"");!i||o.has(i)||(o.add(i),y.test(i)&&e.push({family:C(i),url:`${r}/assets/${i}`}))}return e}var d=S(import.meta.url);function x(t){try{let n=new URL(t),r=n.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return n.origin}catch{}return null}var R=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"];function w(t){for(let n of R)try{if(g.statSync(u.join(t,n)).isFile())return!0}catch{}return!1}var j=new Set(["node_modules","artifacts","dist","build","out","coverage","tmp","public","ios","android","macos","windows","__fixtures__","__tests__","examples","example"]);function F(t,n){w(t)&&n.push(t);let r;try{r=g.readdirSync(t,{withFileTypes:!0})}catch{return}for(let o of r)o.isDirectory()&&(o.name.startsWith(".")||j.has(o.name)||F(u.join(t,o.name),n))}function _(t){try{return g.statSync(u.join(t,"package.json")).isFile()}catch{return!1}}function I(t){let n=x(t.bundleUrl);if(!n)return[];let r=t.repoDir||process.env.SOOT_REPO_DIR,o=r?u.resolve(r):process.cwd();if(!r&&!_(o))return[];let e=[];if(r)F(o,e),e.includes(o)||e.push(o);else{if(!w(o))return[];e.push(o)}if(e.length===0)return[];let s=(t.platform||process.env.SOOT_PLATFORM||"ios").toLowerCase(),i=null;try{let l=d.resolve("@expo/config",{paths:[...e,o]}),f=d(l);typeof f.getConfig=="function"&&(i=f.getConfig)}catch{}if(!i)return[];let c;for(let l of e)try{let f=i(l,{skipSDKVersionRequirement:!0});if(f?.exp&&typeof f.exp=="object"){let A=f.exp.plugins;if(Array.isArray(A)){c=f.exp;break}}}catch{}if(!c||typeof c!="object")return[];let a=c.plugins;if(!Array.isArray(a))return[];let p=m(a,s==="android"?"android":"ios");return h(p,n)}async function L(t,n){let r=x(t);if(!r)return null;let o=new AbortController,e=setTimeout(()=>o.abort(),n?.timeoutMs??1500);try{let s=await fetch(`${r}/`,{headers:{"expo-platform":"ios",Accept:"application/json"},signal:o.signal});if(!s.ok)return null;let c=(await s.json())?.extra?.expoClient?._internal?.projectRoot;return typeof c=="string"&&c.length>0?c:null}catch{return null}finally{clearTimeout(e)}}function M(t){return t.map(n=>`${encodeURIComponent(n.url)}::${encodeURIComponent(n.family)}`).join(",")}function k(t){let n=[];for(let r of t.split(",")){let o=r.trim();if(!o)continue;let e=o.indexOf("::"),s=e===-1?o:o.slice(0,e);try{n.push(decodeURIComponent(s))}catch{n.push(s)}}return n.filter(Boolean)}function D(t){let n=(t.split("?")[0].split(".").pop()||"").toLowerCase();return n==="ttf"?"font/ttf":n==="otf"?"font/otf":n==="woff"?"font/woff":n==="woff2"?"font/woff2":"application/octet-stream"}async function G(t,n){let r=[],o=new Set;for(let e of k(t)){let s=b("sha256").update(e).digest("hex");if(!o.has(s)){o.add(s);try{let i=await fetch(e);if(!i.ok){n?.onError?.(e,new Error(`${i.status} ${i.statusText}`));continue}let c=new Uint8Array(await i.arrayBuffer());r.push({url:e,urlhash:s,contentType:D(e),bytes:c}),n?.onStaged?.({url:e,byteLength:c.byteLength})}catch(i){n?.onError?.(e,i)}}}return r}export{I as a,L as b,M as c,G as d};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ var t=4001,r="sootsim close";export{t as a,r as b};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  function t(_){return`(async () => {
3
3
  const __t = window.__sootsimTest
4
4
  if (!__t) throw new Error('__sootsimTest not available')
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as fe,e as ge,f as he}from"./chunk-SWKBOGBZ.js";import{c as de}from"./chunk-YA4XRTIG.js";import{d as ue}from"./chunk-N5CGRRGJ.js";import{c as le,e as ce,g as P}from"./chunk-O2PWKVDV.js";import{d as pe}from"./chunk-JE2Q25A4.js";import{a as ae,b}from"./chunk-DY55G3EZ.js";import{a as ie}from"./chunk-SFHH65G2.js";import{createHash as We}from"crypto";import{readFileSync as j}from"fs";import{gzipSync as Ve}from"zlib";function ye(e){let n=(e||"").toLowerCase().split(";")[0].trim();return n?!(n.startsWith("image/")||n.startsWith("video/")||n.startsWith("audio/")||n==="font/woff2"||n==="application/font-woff2"||n==="application/zip"||n==="application/gzip"):!0}import{brotliCompressSync as ke,constants as Ae}from"node:zlib";var ze=9;function me(e){return ke(e,{params:{[Ae.BROTLI_PARAM_QUALITY]:ze}})}function K(e,n){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${n} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function He(e){let n=K(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:n.signal})}finally{n.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${s.slice(0,200)}`)}}async function Me(e,n=8,r){let s=0,i=0,a=e.length;await Promise.all(Array.from({length:Math.min(n,a)},async()=>{for(;s<a;){let c=e[s++];await He(c),i++,r?.(i,a)}}))}function Ce(e,n,r,s){let i=[];i.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:n});for(let a of e.files){let c=r.get(a.urlhash);c&&i.push({url:a.putUrl,contentType:a.contentType,bytes:c})}e.events&&s?.eventsBytes&&i.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.flowVideo&&s?.videoBytes&&i.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&i.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes});for(let a of e.snapshots??[]){let c=s?.snapshotBytes?.get(a.id);c&&i.push({url:a.putUrl,contentType:a.contentType,bytes:c})}return i}function Ne(e){return e.replace(/\/+$/,"")}var z=class extends Error{constructor(r,s,i,a=""){super(r);this.status=s;this.phase=i;this.responseText=a;this.name="PresignedUploadError"}};async function we(e){let n=Ne(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-soot-admin-upload-bypass"]=e.adminBypassToken);let s=K(3e4,"init"),i;try{i=await fetch(`${n}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!i.ok){let f=await i.text().catch(()=>"");throw new z(`init failed: ${i.status} ${f.slice(0,200)}`,i.status,"init",f)}let a=await i.json(),c=Ce(a,e.bundleBytes,e.filesByHash,e.extras);await Me(c,e.concurrency??8,e.onPutProgress);let y=K(3e4,"finalize"),d;try{d=await fetch(`${n}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:y.signal})}finally{y.cancel()}if(!d.ok){let f=await d.text().catch(()=>"");throw new z(`finalize failed: ${d.status} ${f.slice(0,200)}`,d.status,"finalize",f)}let $=await d.json();return{init:a,finalize:$}}function qe(e){if(!e)return null;try{let n=JSON.parse(e);return typeof n.message=="string"&&n.message?n.message:null}catch{return null}}var Be=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://sootbean.com",Te=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",Y="http://localhost:3000",De=2e3;async function Ge(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let n=await fetch(`${Y}/api/preview/upload/init`,{method:"OPTIONS",signal:AbortSignal.timeout(De)});if(n.ok||n.status===204||n.status===405)return Y}catch{}return Be}function x(e){return e.replace(/\/$/,"")}function Ke(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function je(e){try{let n=new URL(e).hostname.toLowerCase();return n==="sootbean.com"||n.endsWith(".sootbean.com")}catch{return!1}}function Je(e,n){return n?x(n):process.env.SOOTSIM_PREVIEW_ORIGIN?x(process.env.SOOTSIM_PREVIEW_ORIGIN):Ke(e)?x(e):je(e)?x(Te):x(e)}function Ye(){console.log(`
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as fe,e as ge,f as he}from"./chunk-4WLI2STY.js";import{c as de}from"./chunk-W2AZ7ASM.js";import{d as ue}from"./chunk-SR7DWNZ3.js";import{c as le,e as ce,g as P}from"./chunk-HAW6OMNW.js";import{d as pe}from"./chunk-PPUEG6C4.js";import{a as ae,b}from"./chunk-55LUU75I.js";import{a as ie}from"./chunk-OAOQVBIR.js";import{createHash as We}from"crypto";import{readFileSync as j}from"fs";import{gzipSync as Ve}from"zlib";function ye(e){let n=(e||"").toLowerCase().split(";")[0].trim();return n?!(n.startsWith("image/")||n.startsWith("video/")||n.startsWith("audio/")||n==="font/woff2"||n==="application/font-woff2"||n==="application/zip"||n==="application/gzip"):!0}import{brotliCompressSync as ke,constants as Ae}from"node:zlib";var ze=9;function me(e){return ke(e,{params:{[Ae.BROTLI_PARAM_QUALITY]:ze}})}function K(e,n){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${n} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function He(e){let n=K(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:n.signal})}finally{n.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${s.slice(0,200)}`)}}async function Me(e,n=8,r){let s=0,i=0,a=e.length;await Promise.all(Array.from({length:Math.min(n,a)},async()=>{for(;s<a;){let c=e[s++];await He(c),i++,r?.(i,a)}}))}function Ce(e,n,r,s){let i=[];i.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:n});for(let a of e.files){let c=r.get(a.urlhash);c&&i.push({url:a.putUrl,contentType:a.contentType,bytes:c})}e.events&&s?.eventsBytes&&i.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.flowVideo&&s?.videoBytes&&i.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&i.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes});for(let a of e.snapshots??[]){let c=s?.snapshotBytes?.get(a.id);c&&i.push({url:a.putUrl,contentType:a.contentType,bytes:c})}return i}function Ne(e){return e.replace(/\/+$/,"")}var z=class extends Error{constructor(r,s,i,a=""){super(r);this.status=s;this.phase=i;this.responseText=a;this.name="PresignedUploadError"}};async function we(e){let n=Ne(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-soot-admin-upload-bypass"]=e.adminBypassToken);let s=K(3e4,"init"),i;try{i=await fetch(`${n}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!i.ok){let f=await i.text().catch(()=>"");throw new z(`init failed: ${i.status} ${f.slice(0,200)}`,i.status,"init",f)}let a=await i.json(),c=Ce(a,e.bundleBytes,e.filesByHash,e.extras);await Me(c,e.concurrency??8,e.onPutProgress);let y=K(3e4,"finalize"),d;try{d=await fetch(`${n}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:y.signal})}finally{y.cancel()}if(!d.ok){let f=await d.text().catch(()=>"");throw new z(`finalize failed: ${d.status} ${f.slice(0,200)}`,d.status,"finalize",f)}let $=await d.json();return{init:a,finalize:$}}function qe(e){if(!e)return null;try{let n=JSON.parse(e);return typeof n.message=="string"&&n.message?n.message:null}catch{return null}}var Be=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://sootbean.com",Te=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",Y="http://localhost:3000",De=2e3;async function Ge(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let n=await fetch(`${Y}/api/preview/upload/init`,{method:"OPTIONS",signal:AbortSignal.timeout(De)});if(n.ok||n.status===204||n.status===405)return Y}catch{}return Be}function x(e){return e.replace(/\/$/,"")}function Ke(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function je(e){try{let n=new URL(e).hostname.toLowerCase();return n==="sootbean.com"||n.endsWith(".sootbean.com")}catch{return!1}}function Je(e,n){return n?x(n):process.env.SOOTSIM_PREVIEW_ORIGIN?x(process.env.SOOTSIM_PREVIEW_ORIGIN):Ke(e)?x(e):je(e)?x(Te):x(e)}function Ye(){console.log(`
3
3
  sootsim upload \u2014 publish the current recorded bundle as a /preview/<id> link
4
4
 
5
5
  usage:
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{createHash as D}from"node:crypto";import y from"node:fs";import{createRequire as I}from"node:module";import h from"node:path";var w=/(^|\/)expo-splash-screen$/,R=/(^|\/)react-native-bootsplash$/;function U(n,e){let r=e.replace(/\/+$/,""),o=n.replace(/^\.\//,"").replace(/^\/+/,"");if(o)return`${r}/assets/${o}`}function d(n,e,r){return r?r(n):U(n,e)}function b(n){if(n==="cover")return"cover";if(n==="contain"||n==="native")return"contain"}function p(n){return typeof n=="string"&&n.length>0?n:void 0}function k(n){return typeof n=="number"&&Number.isFinite(n)?n:void 0}function v(n,e,r){if(!n||typeof n!="object")return null;let o=n,s={source:"expo-splash-screen",backgroundColor:p(o.backgroundColor)??"#ffffff"},l=p(o.image);l&&(s.imageUrl=d(l,e,r));let t=k(o.imageWidth);t!=null&&(s.imageWidthPx=t);let c=b(o.resizeMode);c&&(s.resizeMode=c);let i=o.dark;if(i&&typeof i=="object"){let g=i,u=p(g.backgroundColor),f=p(g.image);(u||f)&&(s.dark={},u&&(s.dark.backgroundColor=u),f&&(s.dark.imageUrl=d(f,e,r)))}return s}function j(n,e,r,o){let a=n[e],s=a&&typeof a=="object"?a.splash:void 0,l=n.splash,t=s&&typeof s=="object"?s:l;if(!t||typeof t!="object")return null;let i={source:"expo-legacy",backgroundColor:p(t.backgroundColor)??"#ffffff",imageWidthPx:k(t.imageWidth)??200,resizeMode:b(t.resizeMode)??"contain"},g=p(t.image);g&&(i.imageUrl=d(g,r,o));let u=t.dark;if(u&&typeof u=="object"){let f=u,S=p(f.backgroundColor),m=p(f.image);(S||m)&&(i.dark={},S&&(i.dark.backgroundColor=S),m&&(i.dark.imageUrl=d(m,r,o)))}return i}function _(n,e,r){if(!n||typeof n!="object")return null;let o=n,a=p(o.logo);if(!a)return null;let s={source:"react-native-bootsplash",backgroundColor:p(o.background)??"#fff",imageUrl:d(a,e,r),imageWidthPx:k(o.logoWidth)??100,resizeMode:"contain"},l=p(o.darkBackground),t=p(o.darkLogo);return(l||t)&&(s.dark={},l&&(s.dark.backgroundColor=l),t&&(s.dark.imageUrl=d(t,e,r))),s}function C(n,e,r,o={}){if(!n||typeof n!="object")return null;let a=n,s=a.plugins,l=null,t=null;if(Array.isArray(s))for(let i of s){let g=Array.isArray(i)?i[0]:i;if(typeof g!="string")continue;let u=Array.isArray(i)?i[1]??{}:{};!l&&w.test(g)?l=v(u,r,o.resolveAssetUrl):!t&&R.test(g)&&(t=_(u,r,o.resolveAssetUrl))}if(l)return l;let c=j(a,e,r,o.resolveAssetUrl);return c||t}var x=I(import.meta.url);function E(n){try{let e=new URL(n),r=e.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return e.origin}catch{}return null}var L=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"];function P(n){for(let e of L)try{if(y.statSync(h.join(n,e)).isFile())return!0}catch{}return!1}var F=new Set(["node_modules","artifacts","dist","build","out","coverage","tmp","public","ios","android","macos","windows","__fixtures__","__tests__","examples","example"]);function A(n,e){P(n)&&e.push(n);let r;try{r=y.readdirSync(n,{withFileTypes:!0})}catch{return}for(let o of r)o.isDirectory()&&(o.name.startsWith(".")||F.has(o.name)||A(h.join(n,o.name),e))}function M(n){try{return y.statSync(h.join(n,"package.json")).isFile()}catch{return!1}}function H(n){let e=E(n.bundleUrl);if(!e)return null;let r=n.repoDir||process.env.SOOT_REPO_DIR,o=r?h.resolve(r):process.cwd();if(!r&&!M(o))return null;let a=[];if(r)A(o,a),a.includes(o)||a.push(o);else{if(!P(o))return null;a.push(o)}if(a.length===0)return null;let s=(n.platform||process.env.SOOT_PLATFORM||"ios").toLowerCase(),l=null;try{let c=x.resolve("@expo/config",{paths:[...a,o]}),i=x(c);typeof i.getConfig=="function"&&(l=i.getConfig)}catch{}if(!l)return null;let t;for(let c of a)try{let i=l(c,{skipSDKVersionRequirement:!0});if(i?.exp&&typeof i.exp=="object"){t=i.exp;break}}catch{}return!t||typeof t!="object"?null:C(t,s==="android"?"android":"ios",e)}function J(n){return encodeURIComponent(JSON.stringify(n))}function z(n){if(!n)return null;try{let e=JSON.parse(decodeURIComponent(n));if(!e||typeof e!="object")return null;let r=e;return r.source!=="expo-splash-screen"&&r.source!=="expo-legacy"&&r.source!=="react-native-bootsplash"||typeof r.backgroundColor!="string"?null:e}catch{return null}}function W(n){let e=new Set;return n.imageUrl&&e.add(n.imageUrl),n.dark?.imageUrl&&e.add(n.dark.imageUrl),[...e]}function O(n){let e=(n.split("?")[0].split(".").pop()||"").toLowerCase();return e==="png"?"image/png":e==="jpg"||e==="jpeg"?"image/jpeg":e==="webp"?"image/webp":e==="gif"?"image/gif":e==="svg"?"image/svg+xml":"application/octet-stream"}async function K(n,e){let r=z(n);if(!r)return[];let o=[],a=new Set;for(let s of W(r)){let l=D("sha256").update(s).digest("hex");if(!a.has(l)){a.add(l);try{let t=await fetch(s);if(!t.ok){e?.onError?.(s,new Error(`${t.status} ${t.statusText}`));continue}let c=new Uint8Array(await t.arrayBuffer());o.push({url:s,urlhash:l,contentType:O(s),bytes:c}),e?.onStaged?.({url:s,byteLength:c.byteLength})}catch(t){e?.onError?.(s,t)}}}return o}export{H as a,J as b,K as c};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as p}from"./chunk-KERGT5NG.js";import{d as c,e as l}from"./chunk-SWKBOGBZ.js";import{a}from"./chunk-SFHH65G2.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as p}from"./chunk-VBUURELX.js";import{d as c,e as l}from"./chunk-4WLI2STY.js";import{a}from"./chunk-OAOQVBIR.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
3
3
  sootsim ${e} needs auth before it can check recording access.
4
4
 
5
5
  pick one:
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{existsSync as D,mkdirSync as O,readFileSync as g,rmSync as s,writeFileSync as P}from"fs";import{tmpdir as R}from"os";import{dirname as x,join as A,resolve as v}from"path";import{execFileSync as I}from"child_process";import{readFileSync as S}from"fs";import{createRequire as _}from"module";var o=null;function u(r){o||(o=b());try{return o(r)}catch{return null}}function b(){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=T();return n||C()}return()=>null}function y(){return r=>{try{let n=S(`/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,E=16;function T(){if(!process.versions?.bun)return null;try{let r=_(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 a=>{if(Number(i.symbols.proc_pidinfo(a,N,0n,e,d))<=0)return null;let p=e.readUInt32LE(E);return p>0?p:null}}catch{return null}}function C(){return r=>{try{let t=I("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",F=["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 m(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 F){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=m(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 J(){return m(process.ppid)}function l(){if(process.env[f])return v(process.env[f]);let r=L();return A(R(),`sootsim-current-sim-${r}.json`)}function h(){let r=l();if(!D(r))return null;try{let n=JSON.parse(g(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 K(r){let n=r.trim();if(!n)return;let t=l();O(x(t),{recursive:!0}),P(t,JSON.stringify({version:c,simId:n,updatedAt:new Date().toISOString()},null,2)+`
4
4
  `)}function X(){s(l(),{force:!0})}export{k as a,L as b,J as c,j as d,K as e,X as f};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var g={"--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"}},c=new Set(["list","describe","find","get","do","wait","network","logs","shell","storage-clear"]),p=new Set(["do","get","wait","shell","debug"]),b={tap:"sootsim do tap","double-tap":"sootsim do double-tap","tap-text":"sootsim do tap-text","tap-id":"sootsim do tap-id",type:"sootsim do type","type-into":"sootsim do type-into",key:"sootsim do key",dispatch:"sootsim do dispatch",dismiss:"sootsim do dismiss",scroll:"sootsim do scroll",drag:"sootsim do drag",swipe:"sootsim do swipe",pinch:"sootsim do pinch",reload:"sootsim do reload",sleep:"sootsim do sleep",settle:"sootsim do settle",tree:"sootsim get tree",a11y:"sootsim get a11y",count:"sootsim get count",layout:"sootsim get layout",url:"sootsim get url",globals:"sootsim get globals",errors:"sootsim get errors",warnings:"sootsim get warnings",requests:"sootsim get requests",node:"sootsim get node",state:"sootsim debug state",js:"sootsim debug js",eval:"sootsim debug eval",perf:"sootsim debug perf","sample-color":"sootsim debug sample-color","find-id":"sootsim find --testid",query:"sootsim find --text|--role|--type|--pressable|--visible",capture:"sootsim screenshot",skills:"sootsim skill"},u=new Set(["preview","test","detox","maestro","flow","record","profile","cpu-profile","react","screenshot","screenshots","screenshot-mode","slides","three-mode","3d-mode","inspect","debug","camera","timeline","what-happened","diagnose","shell","assert","device","open","list","use","focus","claim","close","compat","scan","electron","login","logout","whoami","setup","install-desktop","serve","daemon","runtime","upgrade","version","skill","upload","app-fonts","keys","hints","agent-wrapper","agent",...c,...Object.keys(b)]);function h(m){let i=m.slice(2),s={command:null,commandArgs:[],globalFlags:{},help:!1,version:!1,verbose:!1},e=0;for(;e<i.length;){let o=i[e];if(o==="--"){s.commandArgs.push(...i.slice(e+1));break}let a=Object.entries(g).find(([n,t])=>n===o||t.short===o);if(a){let[n,t]=a,l=n.replace(/^--/,"");if(t.type==="boolean")s.globalFlags[l]=!0,e++;else{let r=i[e+1];if(r===void 0||r.startsWith("-")){console.error(` warning: ${o} requires a value`),e++;continue}if(t.type==="number"){let d=Number(r);if(Number.isNaN(d)){console.error(` warning: ${o} requires a number, got "${r}"`),e+=2;continue}s.globalFlags[l]=d}else s.globalFlags[l]=r;e+=2}continue}if(!s.command&&!o.startsWith("-")){let n=o.indexOf("-");if(n>0){let t=o.slice(0,n),l=o.slice(n+1);if(p.has(t)&&l.length>0){s.command=t;let r=i.slice(e+1);s.commandArgs=[l,...r[0]==="--"?r.slice(1):r];break}}if(u.has(o)){s.command=o;let t=i.slice(e+1);s.commandArgs=t[0]==="--"?t.slice(1):t;break}s.commandArgs=i.slice(e);break}s.commandArgs.push(o),e++}return s.help=!!s.globalFlags.help,s.version=!!s.globalFlags.version,s.verbose=!!s.globalFlags.verbose,s}export{c as a,b,h as c};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as u,b as w}from"./chunk-UARZTJ6K.js";import{a as m,c as f}from"./chunk-HOQZJLG7.js";import{a as d,b as g,c as v}from"./chunk-JE2Q25A4.js";import{c as p}from"./chunk-3SU6H3TH.js";function x(){let e=d();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function I(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=d();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await v(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var y={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:x,launch:I};function _(){let e=u();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function M(e){let r=u();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await w(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var b={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:_,launch:M};import{spawn as A}from"child_process";import{closeSync as C,mkdtempSync as L,openSync as E,readFileSync as W}from"fs";import{createRequire as R}from"module";import{tmpdir as P}from"os";import{join as S}from"path";var N=`
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as u,b as w}from"./chunk-ZAAITWNI.js";import{a as m,c as f}from"./chunk-D6GUXY2L.js";import{a as d,b as g,c as v}from"./chunk-PPUEG6C4.js";import{c as p}from"./chunk-XC3EDXUI.js";function x(){let e=d();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function I(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=d();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await v(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var y={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:x,launch:I};function _(){let e=u();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function M(e){let r=u();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await w(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var b={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:_,launch:M};import{spawn as A}from"child_process";import{closeSync as C,mkdtempSync as L,openSync as E,readFileSync as W}from"fs";import{createRequire as R}from"module";import{tmpdir as P}from"os";import{join as S}from"path";var N=`
3
3
  const modulePath = process.env.SOOTSIM_PW_MODULE;
4
4
  const url = process.env.SOOTSIM_PW_URL;
5
5
  const headless = process.env.SOOTSIM_PW_HEADLESS === '1';
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{h as u}from"./chunk-7E24LDJL.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.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{h as u}from"./chunk-6S2MBFBN.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,2 +1,2 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{h as w,j as u,k as m,l}from"./chunk-7E24LDJL.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.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{h as w,j as u,k as m,l}from"./chunk-6S2MBFBN.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,4 +1,4 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{execFileSync as h,spawn as g}from"child_process";import{existsSync as s,readdirSync as k}from"fs";import{dirname as m,join as l,resolve as a}from"path";import{fileURLToPath as v}from"url";var c;function p(){if(c!==void 0)return c;try{c=m(v(import.meta.resolve("sootsim-engine/package.json")))}catch{c=null}return c}var I="dev.sootsim.simulator";function x(){let n=p();if(!n)return null;let e=l(n,"dist-electron/main.cjs");if(!s(e))return null;let i=D(n);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:n}:null}function b(){let n=p();return n?s(l(n,"src-electron/main.ts")):!1}function D(n){let e=n;for(let i=0;i<6;i++){let t=l(e,"node_modules/.bin/electron");if(s(t))return t;let r=m(e);if(r===e)break;e=r}return null}function C(){let n=p(),i=["/Applications/sootsim.app",a(process.env.HOME||"","Applications/sootsim.app"),...n?[a(n,"app/sootsim.app")]:[]].find(t=>s(t));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let t=h("mdfind",[`kMDItemCFBundleIdentifier == "${I}"`],{encoding:"utf8",timeout:3e3}).trim();if(t)return{path:t.split(`
3
3
  `)[0],platform:"darwin",kind:"mac-app"}}catch{}return null}function f(n){if(!s(n))return null;let e=k(n).filter(i=>i.startsWith("sootsim")&&i.endsWith(".AppImage")).sort().reverse()[0];return e?l(n,e):null}function w(){let n=p(),i=[a(process.env.HOME||"","Applications/sootsim.AppImage"),a(process.env.HOME||"",".local/bin/sootsim.AppImage"),"/opt/sootsim/sootsim.AppImage","/opt/sootsim/sootsim",...n?[a(n,"app/sootsim.AppImage"),a(n,"release/linux-unpacked/sootsim")]:[]].find(r=>s(r));if(i)return{path:i,platform:"linux",kind:i.endsWith(".AppImage")?"linux-appimage":"linux-binary"};let t=n?f(a(n,"app"))||f(a(n,"release")):null;return t?{path:t,platform:"linux",kind:"linux-appimage"}:null}function A(){let n=x();if(n)return n;if(b()){let e=p(),i=l(e,"dist-electron/main.cjs");return s(i)?console.error(` no node_modules/.bin/electron found near ${e}. run \`bun install\`.`):console.error(` dist-electron/main.cjs missing in ${e}.
4
4
  run: bun run --cwd packages/sootsim-engine build:electron-main
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.176 | (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,2 @@
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-L2CTRBGR.js";import"./chunk-ZHFUIBAE.js";export{a as getCliVersion};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-U7BX2XYL.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-ZHFUIBAE.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim compat \u2014 check package compatibility
4
4
 
5
5
  usage:
@@ -20,7 +20,7 @@ examples:
20
20
  sootsim compat react-native-reanimated
21
21
  sootsim compat --json
22
22
  sootsim compat --brief
23
- `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-VPQD3D5K.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-VPQD3D5K.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
23
+ `),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-IGOSYQWE.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-IGOSYQWE.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
24
24
  sootsim compatibility report
25
25
  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
26
26
 
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t}from"./chunk-IIEAMA66.js";import"./chunk-6BM25DJX.js";import"./chunk-STSULGMI.js";import"./chunk-GERUGIKH.js";import"./chunk-7QNSKZ5Y.js";import"./chunk-W3SYJD3H.js";import"./chunk-UARZTJ6K.js";import"./chunk-HOQZJLG7.js";import"./chunk-YA4XRTIG.js";import"./chunk-N5CGRRGJ.js";import"./chunk-O2PWKVDV.js";import"./chunk-JE2Q25A4.js";import"./chunk-GPC5MNUW.js";import"./chunk-QWKK2QEY.js";import"./chunk-3SU6H3TH.js";import"./chunk-6OROZMOR.js";import"./chunk-U7BX2XYL.js";export{e as buildOpenUrl,d as buildShellUrl,r as closeSimsBulk,s as planBulkCloseTargets,j as playwrightHostPidForSim,g as printConnectedSims,b as resolveBundleTarget,c as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,q as runClaimCommand,t as runCloseCommand,p as runFocusCommand,m as runListCommand,n as runOpenCommand,o as runUseCommand,k as signalDriverLaunchConnected,f as summarizeSimUrl,l as terminatePlaywrightHostsForSims,h as waitForSimMatch,i as waitForSimMatchOrHostExit};
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t}from"./chunk-Q4YNZFJF.js";import"./chunk-CFPELTGN.js";import"./chunk-MWTWVX32.js";import"./chunk-6BU5E655.js";import"./chunk-BGP3OZID.js";import"./chunk-XKVI3H2G.js";import"./chunk-ZAAITWNI.js";import"./chunk-D6GUXY2L.js";import"./chunk-W2AZ7ASM.js";import"./chunk-SR7DWNZ3.js";import"./chunk-HAW6OMNW.js";import"./chunk-PPUEG6C4.js";import"./chunk-3LI5PWSP.js";import"./chunk-STWES7DO.js";import"./chunk-XC3EDXUI.js";import"./chunk-OORRMRMI.js";import"./chunk-ZHFUIBAE.js";export{e as buildOpenUrl,d as buildShellUrl,r as closeSimsBulk,s as planBulkCloseTargets,j as playwrightHostPidForSim,g as printConnectedSims,b as resolveBundleTarget,c as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,q as runClaimCommand,t as runCloseCommand,p as runFocusCommand,m as runListCommand,n as runOpenCommand,o as runUseCommand,k as signalDriverLaunchConnected,f as summarizeSimUrl,l as terminatePlaywrightHostsForSims,h as waitForSimMatch,i as waitForSimMatchOrHostExit};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-U7BX2XYL.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import{WebSocket as C}from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${o}/json/list`)).json()}catch{return T(o),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${o}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of k(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function T(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-ZHFUIBAE.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import{WebSocket as C}from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${o}/json/list`)).json()}catch{return T(o),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${o}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of k(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function T(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d,e}from"./chunk-CF3NJNBJ.js";import"./chunk-55LUU75I.js";import"./chunk-OAOQVBIR.js";import"./chunk-J2BOYJ2U.js";import"./chunk-GBZNVWFP.js";import"./chunk-NA2KJSP6.js";import"./chunk-HZSJ6FL3.js";import"./chunk-63VEHUYI.js";import"./chunk-3LI5PWSP.js";import"./chunk-STWES7DO.js";import"./chunk-XC3EDXUI.js";import"./chunk-OORRMRMI.js";import"./chunk-L2CTRBGR.js";import"./chunk-NMP6YTXS.js";import"./chunk-6S2MBFBN.js";import"./chunk-ZHFUIBAE.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,d as teardownDaemonService,e as teardownSootsimHome};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{f,m as T}from"./chunk-STSULGMI.js";import{J as S,K as $,L as N,M as A,N as v}from"./chunk-GERUGIKH.js";import{c as D,e as O,g as x}from"./chunk-O2PWKVDV.js";import"./chunk-QWKK2QEY.js";import"./chunk-3SU6H3TH.js";import"./chunk-6OROZMOR.js";import"./chunk-U7BX2XYL.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{f,m as T}from"./chunk-MWTWVX32.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-6BU5E655.js";import{c as D,e as O,g as x}from"./chunk-HAW6OMNW.js";import"./chunk-STWES7DO.js";import"./chunk-XC3EDXUI.js";import"./chunk-OORRMRMI.js";import"./chunk-ZHFUIBAE.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
3
3
  sootsim debug \u2014 drive __sootsimDebug from the terminal
4
4
 
5
5
  usage:
@@ -167,7 +167,7 @@ examples:
167
167
  } : null,
168
168
  samples,
169
169
  }
170
- })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-LTFGONJD.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
170
+ })()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-YSYKYPAO.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
171
171
  known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await S(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await $(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
172
172
  const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
173
173
  if (!d) return null;
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as S}from"./chunk-7MVFXNE7.js";import"./chunk-7NRQVOIK.js";import"./chunk-C77TGXJ6.js";import"./chunk-OXREO6LV.js";import"./chunk-M25NFKL5.js";import"./chunk-IIEAMA66.js";import"./chunk-6BM25DJX.js";import"./chunk-STSULGMI.js";import"./chunk-GERUGIKH.js";import"./chunk-7QNSKZ5Y.js";import"./chunk-W3SYJD3H.js";import"./chunk-UARZTJ6K.js";import"./chunk-HOQZJLG7.js";import"./chunk-KERGT5NG.js";import"./chunk-SWKBOGBZ.js";import"./chunk-YA4XRTIG.js";import"./chunk-N5CGRRGJ.js";import"./chunk-O2PWKVDV.js";import"./chunk-JE2Q25A4.js";import"./chunk-DY55G3EZ.js";import"./chunk-SFHH65G2.js";import"./chunk-X7OTWLOA.js";import"./chunk-GPC5MNUW.js";import"./chunk-QWKK2QEY.js";import"./chunk-3SU6H3TH.js";import"./chunk-6OROZMOR.js";import"./chunk-TPE7XEGU.js";import"./chunk-7E24LDJL.js";import"./chunk-U7BX2XYL.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as S}from"./chunk-PVIMLBMX.js";import"./chunk-Y2ZSLUGO.js";import"./chunk-6WURQDZI.js";import"./chunk-W5QHYSDJ.js";import"./chunk-EU54PRND.js";import"./chunk-Q4YNZFJF.js";import"./chunk-CFPELTGN.js";import"./chunk-MWTWVX32.js";import"./chunk-6BU5E655.js";import"./chunk-BGP3OZID.js";import"./chunk-XKVI3H2G.js";import"./chunk-ZAAITWNI.js";import"./chunk-D6GUXY2L.js";import"./chunk-VBUURELX.js";import"./chunk-4WLI2STY.js";import"./chunk-W2AZ7ASM.js";import"./chunk-SR7DWNZ3.js";import"./chunk-HAW6OMNW.js";import"./chunk-PPUEG6C4.js";import"./chunk-55LUU75I.js";import"./chunk-OAOQVBIR.js";import"./chunk-63VEHUYI.js";import"./chunk-3LI5PWSP.js";import"./chunk-STWES7DO.js";import"./chunk-XC3EDXUI.js";import"./chunk-OORRMRMI.js";import"./chunk-Y3NDHGEY.js";import"./chunk-6S2MBFBN.js";import"./chunk-ZHFUIBAE.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
3
3
  sootsim detox \u2014 run detox-style tests against a sootsim shell
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-C77TGXJ6.js";import{c as d,e as l,h as a}from"./chunk-O2PWKVDV.js";import"./chunk-X7OTWLOA.js";import"./chunk-QWKK2QEY.js";import"./chunk-3SU6H3TH.js";import"./chunk-6OROZMOR.js";import"./chunk-TPE7XEGU.js";import{g as c,h as r,i as g}from"./chunk-7E24LDJL.js";import"./chunk-U7BX2XYL.js";function h(){console.log(`
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-6WURQDZI.js";import{c as d,e as l,h as a}from"./chunk-HAW6OMNW.js";import"./chunk-63VEHUYI.js";import"./chunk-STWES7DO.js";import"./chunk-XC3EDXUI.js";import"./chunk-OORRMRMI.js";import"./chunk-Y3NDHGEY.js";import{g as c,h as r,i as g}from"./chunk-6S2MBFBN.js";import"./chunk-ZHFUIBAE.js";function h(){console.log(`
3
3
  sootsim device \u2014 inspect or change the live device preset for a sim
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as E,e as R,h as b}from"./chunk-O2PWKVDV.js";import"./chunk-QWKK2QEY.js";import{b as v}from"./chunk-3SU6H3TH.js";import"./chunk-6OROZMOR.js";import"./chunk-U7BX2XYL.js";function F(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(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as E,e as R,h as b}from"./chunk-HAW6OMNW.js";import"./chunk-STWES7DO.js";import{b as v}from"./chunk-XC3EDXUI.js";import"./chunk-OORRMRMI.js";import"./chunk-ZHFUIBAE.js";function F(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(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
3
3
  sootsim diagnose \u2014 compact "what just went wrong?" report
4
4
 
5
5
  usage:
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-NPPSB4KE.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-XKVI3H2G.js";import"./chunk-ZAAITWNI.js";import"./chunk-D6GUXY2L.js";import"./chunk-PPUEG6C4.js";import"./chunk-XC3EDXUI.js";import"./chunk-OORRMRMI.js";import"./chunk-ZHFUIBAE.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-SCM3ERN4.js";import"./chunk-3FGEZ5ZM.js";import{a as v,g as h}from"./chunk-IIEAMA66.js";import"./chunk-6BM25DJX.js";import"./chunk-STSULGMI.js";import"./chunk-GERUGIKH.js";import"./chunk-7QNSKZ5Y.js";import{b as f,g as u}from"./chunk-W3SYJD3H.js";import{a as p}from"./chunk-UARZTJ6K.js";import{c as m}from"./chunk-HOQZJLG7.js";import"./chunk-YA4XRTIG.js";import"./chunk-N5CGRRGJ.js";import"./chunk-O2PWKVDV.js";import"./chunk-JE2Q25A4.js";import"./chunk-GPC5MNUW.js";import"./chunk-QWKK2QEY.js";import"./chunk-3SU6H3TH.js";import"./chunk-6OROZMOR.js";import"./chunk-U7BX2XYL.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-2SUR2RR2.js";import"./chunk-NPPSB4KE.js";import{a as v,g as h}from"./chunk-Q4YNZFJF.js";import"./chunk-CFPELTGN.js";import"./chunk-MWTWVX32.js";import"./chunk-6BU5E655.js";import"./chunk-BGP3OZID.js";import{b as f,g as u}from"./chunk-XKVI3H2G.js";import{a as p}from"./chunk-ZAAITWNI.js";import{c as m}from"./chunk-D6GUXY2L.js";import"./chunk-W2AZ7ASM.js";import"./chunk-SR7DWNZ3.js";import"./chunk-HAW6OMNW.js";import"./chunk-PPUEG6C4.js";import"./chunk-3LI5PWSP.js";import"./chunk-STWES7DO.js";import"./chunk-XC3EDXUI.js";import"./chunk-OORRMRMI.js";import"./chunk-ZHFUIBAE.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim electron \u2014 launch the desktop companion
4
4
 
5
5
  usage:
@@ -15,4 +15,4 @@ examples:
15
15
  sootsim electron
16
16
  sootsim electron --port 5173
17
17
  sootsim electron --profile qa
18
- `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-CWTQXAHN.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
18
+ `),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-OHGSHF3I.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as c,b as d,c as e,d as f}from"./chunk-PVIMLBMX.js";import"./chunk-Y2ZSLUGO.js";import"./chunk-6WURQDZI.js";import"./chunk-W5QHYSDJ.js";import{c as a,d as b}from"./chunk-EU54PRND.js";import"./chunk-Q4YNZFJF.js";import"./chunk-CFPELTGN.js";import"./chunk-MWTWVX32.js";import"./chunk-6BU5E655.js";import"./chunk-BGP3OZID.js";import"./chunk-XKVI3H2G.js";import"./chunk-ZAAITWNI.js";import"./chunk-D6GUXY2L.js";import"./chunk-VBUURELX.js";import"./chunk-4WLI2STY.js";import"./chunk-W2AZ7ASM.js";import"./chunk-SR7DWNZ3.js";import"./chunk-HAW6OMNW.js";import"./chunk-PPUEG6C4.js";import"./chunk-55LUU75I.js";import"./chunk-OAOQVBIR.js";import"./chunk-63VEHUYI.js";import"./chunk-3LI5PWSP.js";import"./chunk-STWES7DO.js";import"./chunk-XC3EDXUI.js";import"./chunk-OORRMRMI.js";import"./chunk-Y3NDHGEY.js";import"./chunk-6S2MBFBN.js";import"./chunk-ZHFUIBAE.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c}from"./chunk-J2BOYJ2U.js";import"./chunk-GBZNVWFP.js";import"./chunk-NA2KJSP6.js";import"./chunk-HZSJ6FL3.js";import"./chunk-63VEHUYI.js";import"./chunk-3LI5PWSP.js";import"./chunk-STWES7DO.js";import"./chunk-XC3EDXUI.js";import"./chunk-OORRMRMI.js";import"./chunk-L2CTRBGR.js";import"./chunk-NMP6YTXS.js";import"./chunk-6S2MBFBN.js";import"./chunk-ZHFUIBAE.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as n,c as r,d as l}from"./chunk-CBNM2JQX.js";import"./chunk-3SU6H3TH.js";import"./chunk-U7BX2XYL.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as n,c as r,d as l}from"./chunk-HZSJ6FL3.js";import"./chunk-XC3EDXUI.js";import"./chunk-ZHFUIBAE.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.174 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,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-6OROZMOR.js";import"./chunk-U7BX2XYL.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,H as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,O as claimDaemonLockfile,G as compareSemver,x as configFilePath,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,C as ensureSootsimHome,K as isDaemonLockfileFresh,L as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,F as listInstalledRuntimes,q as profilesDir,D as readActiveRuntime,I as readDaemonLockfile,J as readDevBridgeLockfile,y as readSharedConfig,A as readTelemetryEnabled,P as removeDaemonLockfile,Q as removeDevBridgeLockfile,l as runtimeDir,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,E as writeActiveRuntime,M as writeDaemonLockfile,N as writeDevBridgeLockfile,z as writeSharedConfig,B as writeTelemetryEnabled};
1
+ /*! sootsim v0.1.176 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,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-OORRMRMI.js";import"./chunk-ZHFUIBAE.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,H as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,O as claimDaemonLockfile,G as compareSemver,x as configFilePath,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,C as ensureSootsimHome,K as isDaemonLockfileFresh,L as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,F as listInstalledRuntimes,q as profilesDir,D as readActiveRuntime,I as readDaemonLockfile,J as readDevBridgeLockfile,y as readSharedConfig,A as readTelemetryEnabled,P as removeDaemonLockfile,Q as removeDevBridgeLockfile,l as runtimeDir,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,E as writeActiveRuntime,M as writeDaemonLockfile,N as writeDevBridgeLockfile,z as writeSharedConfig,B as writeTelemetryEnabled};