sootsim 0.1.71 → 0.1.73

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 (136) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-7RIC6X63.js → agent-SW2JYVPF.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-V4QRWTW3.js → agent-wrapper-EO2WOYDP.js} +2 -2
  4. package/dist-cli/chunks/{assert-2UDV3DEY.js → assert-PY5JI2AM.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-NWH74JAV.js +2 -0
  6. package/dist-cli/chunks/beta-IFJKR2TQ.js +2 -0
  7. package/dist-cli/chunks/{chunk-TULLGRT4.js → chunk-2WOD3LBI.js} +2 -2
  8. package/dist-cli/chunks/{chunk-IECVOMEO.js → chunk-34TWXW7Z.js} +1 -1
  9. package/dist-cli/chunks/{chunk-RWKL3VP2.js → chunk-3OCOCDGT.js} +3 -3
  10. package/dist-cli/chunks/chunk-5CPW2643.js +1 -0
  11. package/dist-cli/chunks/{chunk-DB7I5NCL.js → chunk-5OJK5LYU.js} +2 -2
  12. package/dist-cli/chunks/{chunk-LKY27UVD.js → chunk-6EMLKJ4H.js} +1 -1
  13. package/dist-cli/chunks/{chunk-LESUHJDU.js → chunk-6K2OMU5N.js} +2 -2
  14. package/dist-cli/chunks/{chunk-2DZFAJRG.js → chunk-6SLYUGPA.js} +1 -1
  15. package/dist-cli/chunks/{chunk-6CDNP4AK.js → chunk-742HTWNM.js} +1 -1
  16. package/dist-cli/chunks/{chunk-W53GXBRM.js → chunk-7LR7PVW4.js} +2 -2
  17. package/dist-cli/chunks/{chunk-AMGP37WV.js → chunk-AZGYCSFY.js} +2 -2
  18. package/dist-cli/chunks/{chunk-6I2WY5TM.js → chunk-FVQOPALM.js} +2 -2
  19. package/dist-cli/chunks/chunk-FWROUGUO.js +2 -0
  20. package/dist-cli/chunks/{chunk-QPDNOKOQ.js → chunk-G6Y6PFGR.js} +2 -2
  21. package/dist-cli/chunks/{chunk-ZGMFZOGJ.js → chunk-GOU7IGMA.js} +2 -2
  22. package/dist-cli/chunks/{chunk-WJM27KX4.js → chunk-GYXN4445.js} +2 -2
  23. package/dist-cli/chunks/chunk-H532JOZV.js +2 -0
  24. package/dist-cli/chunks/{chunk-PBJMKMHA.js → chunk-HKLWUXFK.js} +2 -2
  25. package/dist-cli/chunks/{chunk-UH5QGW67.js → chunk-HPJIWPPC.js} +1 -1
  26. package/dist-cli/chunks/chunk-IZ3CWZNF.js +119 -0
  27. package/dist-cli/chunks/{chunk-CWX5R725.js → chunk-JJQQMLVH.js} +2 -2
  28. package/dist-cli/chunks/{chunk-KIJZX37F.js → chunk-K2KVNO7W.js} +1 -1
  29. package/dist-cli/chunks/{chunk-BO7P4UI5.js → chunk-LAZ7FFOW.js} +2 -2
  30. package/dist-cli/chunks/{chunk-AQP5ZW4H.js → chunk-LVLOAXDS.js} +2 -2
  31. package/dist-cli/chunks/{chunk-DML7O4M5.js → chunk-M4QW7HLC.js} +2 -2
  32. package/dist-cli/chunks/{chunk-RZPLKCPE.js → chunk-MRFTVZDW.js} +2 -2
  33. package/dist-cli/chunks/chunk-OAATHYER.js +1 -0
  34. package/dist-cli/chunks/{chunk-27DZP6PJ.js → chunk-ODLY2N63.js} +2 -2
  35. package/dist-cli/chunks/chunk-OYRL6RAD.js +1 -0
  36. package/dist-cli/chunks/{chunk-DKLJW2OR.js → chunk-P3WJGZTF.js} +1 -1
  37. package/dist-cli/chunks/{chunk-BD27IPME.js → chunk-QDYFRHQK.js} +2 -2
  38. package/dist-cli/chunks/{chunk-VV3I72HQ.js → chunk-RA3I4BJI.js} +1 -1
  39. package/dist-cli/chunks/{chunk-YXGX6RCI.js → chunk-RRPKIYG7.js} +2 -2
  40. package/dist-cli/chunks/{chunk-6ZYPXH2U.js → chunk-SL4MHVAB.js} +2 -2
  41. package/dist-cli/chunks/{chunk-TG4HB6ZV.js → chunk-SPWIBWDN.js} +1 -1
  42. package/dist-cli/chunks/{chunk-TWEXRPDX.js → chunk-UASODA4K.js} +1 -1
  43. package/dist-cli/chunks/{chunk-MJKQF66L.js → chunk-UJUJJDJH.js} +2 -2
  44. package/dist-cli/chunks/{chunk-LKTFFX2V.js → chunk-VB7Z7JWH.js} +1 -1
  45. package/dist-cli/chunks/{chunk-XOMGAPXS.js → chunk-VEMJA4YX.js} +3 -3
  46. package/dist-cli/chunks/{chunk-AY5MYLKY.js → chunk-WCM7INZL.js} +3 -3
  47. package/dist-cli/chunks/{chunk-QD5DZZRO.js → chunk-XCFP4FKE.js} +2 -2
  48. package/dist-cli/chunks/{chunk-FX6YMDSO.js → chunk-YVKR7SWO.js} +2 -2
  49. package/dist-cli/chunks/{chunk-NSIRZK23.js → chunk-YXZHBYID.js} +1 -1
  50. package/dist-cli/chunks/{chunk-WLIULEKU.js → chunk-ZGHJUI77.js} +1 -1
  51. package/dist-cli/chunks/cli-version-5UHOEZTW.js +2 -0
  52. package/dist-cli/chunks/{compat-CRZNQCYA.js → compat-4TPMCNAE.js} +3 -3
  53. package/dist-cli/chunks/{config-RIVC2PIP.js → config-ILFOUQJM.js} +2 -2
  54. package/dist-cli/chunks/{control-P4NN4J2M.js → control-OWLNXD2F.js} +2 -2
  55. package/dist-cli/chunks/{cpu-profile-NFK6B4S7.js → cpu-profile-VKLUDIWH.js} +2 -2
  56. package/dist-cli/chunks/{daemon-6TTYQPPT.js → daemon-ATQGFZTH.js} +2 -2
  57. package/dist-cli/chunks/{debug-GRLHQXLO.js → debug-4Y5ICJVS.js} +3 -3
  58. package/dist-cli/chunks/demo-app-registry-HQVTQIKZ.js +2 -0
  59. package/dist-cli/chunks/{detox-37JLSGQX.js → detox-N7C6N2G6.js} +2 -2
  60. package/dist-cli/chunks/{device-27X2PVPQ.js → device-COHW52UV.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-2KLAWP27.js → diagnose-HOHSNKU2.js} +2 -2
  62. package/dist-cli/chunks/drivers-YFPP36NV.js +2 -0
  63. package/dist-cli/chunks/{electron-QGLOCN5C.js → electron-ZKAWZYPP.js} +3 -3
  64. package/dist-cli/chunks/flow-AHV3ENLY.js +2 -0
  65. package/dist-cli/chunks/{hints-UQJIWXKK.js → hints-6YEZ3CHA.js} +2 -2
  66. package/dist-cli/chunks/{home-paths-OJPYHDPR.js → home-paths-4J2QXP5S.js} +2 -2
  67. package/dist-cli/chunks/{inspect-VWXPNEFA.js → inspect-XVHQ25HJ.js} +4 -4
  68. package/dist-cli/chunks/install-JR57X6Y4.js +2 -0
  69. package/dist-cli/chunks/{install-desktop-F37TK4ZW.js → install-desktop-2LYXUCKU.js} +3 -3
  70. package/dist-cli/chunks/{keys-G6TPD52B.js → keys-HVV6DUSK.js} +2 -2
  71. package/dist-cli/chunks/{launch-B4PTG3KZ.js → launch-UUHH3TZU.js} +3 -3
  72. package/dist-cli/chunks/{login-JYMWQKZG.js → login-3RO6QARB.js} +4 -4
  73. package/dist-cli/chunks/{logout-6D4KIKWK.js → logout-GRDAYZ44.js} +2 -2
  74. package/dist-cli/chunks/{maestro-W3B676KG.js → maestro-N3FBWTNP.js} +2 -2
  75. package/dist-cli/chunks/{preview-SR6754AK.js → preview-CY4346UC.js} +2 -2
  76. package/dist-cli/chunks/{profile-LD65LJJ5.js → profile-HXOUKA4R.js} +2 -2
  77. package/dist-cli/chunks/{react-SWXZCKFB.js → react-4J5QOUJA.js} +2 -2
  78. package/dist-cli/chunks/{record-4EQFRKTH.js → record-2JLCQ2FZ.js} +2 -2
  79. package/dist-cli/chunks/runtime-H4NZF64R.js +2 -0
  80. package/dist-cli/chunks/{runtime-delivery-ONP2VN3S.js → runtime-delivery-BKYWXH3W.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-QBH4IPLP.js → screenshot-CNNVQFQ2.js} +2 -2
  82. package/dist-cli/chunks/{screenshot-mode-2JVQPZ53.js → screenshot-mode-JVSFP7VK.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-DD2WKE7M.js → screenshots-WQZKOILE.js} +2 -2
  84. package/dist-cli/chunks/{server-C2TUKDSC.js → server-YGVOWKPO.js} +2 -2
  85. package/dist-cli/chunks/setup-repo-XYPPB2UA.js +2 -0
  86. package/dist-cli/chunks/{skills-TDZWZ7XH.js → skills-2QTH66LZ.js} +2 -2
  87. package/dist-cli/chunks/{start-YKZ7ESBW.js → start-CIZKCHP3.js} +4 -4
  88. package/dist-cli/chunks/store-6GSASPZT.js +2 -0
  89. package/dist-cli/chunks/telemetry-FMUIUQIW.js +2 -0
  90. package/dist-cli/chunks/{test-MFQ5I7GG.js → test-4BLC6GOA.js} +3 -3
  91. package/dist-cli/chunks/{three-mode-T25FHXBH.js → three-mode-6R4RFOBE.js} +2 -2
  92. package/dist-cli/chunks/{timeline-IKABU4RI.js → timeline-NYQB3AED.js} +2 -2
  93. package/dist-cli/chunks/{upgrade-O33Y5HPQ.js → upgrade-LZCXPLDS.js} +2 -2
  94. package/dist-cli/chunks/upload-DLFGYLCF.js +2 -0
  95. package/dist-cli/chunks/{web-VDMYU64X.js → web-CDNAUTDO.js} +2 -2
  96. package/dist-cli/chunks/{what-happened-URD4UOT3.js → what-happened-ZHIENSWK.js} +2 -2
  97. package/dist-cli/chunks/{whoami-XKWXLE6S.js → whoami-4PSGWETO.js} +2 -2
  98. package/dist-lib/agent-daemon-client.cjs +1 -1
  99. package/dist-lib/agent-events.cjs +1 -1
  100. package/dist-lib/agent-sessions.cjs +1 -1
  101. package/dist-lib/attached-projects.cjs +1 -1
  102. package/dist-lib/auth/shared-session.cjs +1 -1
  103. package/dist-lib/backend-origin.cjs +1 -1
  104. package/dist-lib/bridge-constants.cjs +1 -1
  105. package/dist-lib/cli-constants.cjs +1 -1
  106. package/dist-lib/config.cjs +1 -1
  107. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  108. package/dist-lib/home-paths.cjs +1 -1
  109. package/dist-lib/host/bridge-host.cjs +1 -1
  110. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  111. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  112. package/dist-lib/index.cjs +1 -1
  113. package/dist-lib/metro.cjs +1 -1
  114. package/dist-lib/profiles.cjs +1 -1
  115. package/dist-lib/render-mode.cjs +1 -1
  116. package/dist-lib/vite-base.cjs +1 -1
  117. package/dist-lib/vite.cjs +1 -1
  118. package/package.json +1 -1
  119. package/dist-cli/chunks/auto-bootstrap-2A2D7E6S.js +0 -2
  120. package/dist-cli/chunks/beta-CLPMSEXC.js +0 -2
  121. package/dist-cli/chunks/chunk-5IYMNFPA.js +0 -2
  122. package/dist-cli/chunks/chunk-B5SVMCRO.js +0 -119
  123. package/dist-cli/chunks/chunk-DXEQJFI5.js +0 -1
  124. package/dist-cli/chunks/chunk-EIPHWUB2.js +0 -1
  125. package/dist-cli/chunks/chunk-FOKAHB3A.js +0 -1
  126. package/dist-cli/chunks/chunk-H2TZ2MMV.js +0 -2
  127. package/dist-cli/chunks/cli-version-KDXXYEGM.js +0 -2
  128. package/dist-cli/chunks/demo-app-registry-4E35T7WK.js +0 -2
  129. package/dist-cli/chunks/drivers-NH6AKW3W.js +0 -2
  130. package/dist-cli/chunks/flow-C7AC2KBJ.js +0 -2
  131. package/dist-cli/chunks/install-YTSFOGHT.js +0 -2
  132. package/dist-cli/chunks/runtime-LPJD6UGK.js +0 -2
  133. package/dist-cli/chunks/setup-repo-QH2ML53J.js +0 -2
  134. package/dist-cli/chunks/store-GKWMIOKW.js +0 -2
  135. package/dist-cli/chunks/telemetry-3LAIXYUV.js +0 -2
  136. package/dist-cli/chunks/upload-WAHDSDCI.js +0 -2
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as _,b as z,c as le,d as ce}from"./chunk-BD27IPME.js";import{l as O}from"./chunk-QPDNOKOQ.js";import{j as se,k as ie,m as ae}from"./chunk-TWEXRPDX.js";import{g as W}from"./chunk-6ZYPXH2U.js";import{a as C,b as j}from"./chunk-IECVOMEO.js";import{c as de}from"./chunk-BO7P4UI5.js";import{d as ne}from"./chunk-LKY27UVD.js";import{a as ee}from"./chunk-H2TZ2MMV.js";import{b as re,c as I,d as S,e as x}from"./chunk-FX6YMDSO.js";import{c as k,d as w,e as P}from"./chunk-NSIRZK23.js";import{E as te,F as oe}from"./chunk-WLIULEKU.js";import ve from"node:fs";import Re from"node:os";import G from"node:path";function Pe(t){return t.replace(/^\[|\]$/g,"").toLowerCase()}function q(t){let o=Pe(t);return o==="localhost"||o.endsWith(".localhost")||o==="0.0.0.0"||o==="::1"||/^127(?:\.\d{1,3}){3}$/.test(o)}function me(t){return new Error(`could not resolve a native bundle for ${t}. pass an explicit bundle URL or open Connect and choose the app there.`)}function Ce(t,o){return t?.includes("/one/metro-entry.bundle")?"one":typeof o=="string"&&o?"expo":"unknown"}function fe(t,o,e){return`${t}//${o}:${e}`}function Be(t){if(typeof window>"u")return!1;try{let o=new URL(t);return q(o.hostname)&&q(window.location.hostname)&&o.origin!==window.location.origin}catch{return!1}}async function ue(t,o){let e={...o,cache:o?.cache??"no-store"};return Be(t)?fetch(`/__fetch-proxy?url=${encodeURIComponent(t)}`,e):fetch(t,e)}function Te(t){return t==="https:"?443:80}function Me(t){let o=t.pathname||"/";return(o==="/"||o==="")&&!t.search&&!t.hash}async function ge(t,o){let e=t.replace(/\/+$/,"");try{let n=await ue(`${e}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},a=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(a||s.name)return{bundleUrl:le(a||`${e}${z}`),port:o,framework:Ce(a,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await ue(`${e}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${e}${z}`,port:o,framework:"metro"}}catch{}return null}async function pe(t){return ge(fe("http:","localhost",t),t)}async function he(t){let o=t.trim();if(/^\d+$/.test(o)){let i=parseInt(o,10),l=await pe(i);if(l)return l;let c=3;for(let d=1;d<=c;d++){let m=await pe(i+d);if(m)return m}throw me(`localhost:${i} (also scanned +1..+${c})`)}let e=o.startsWith("http")?o:`http://${o}`,n;try{n=new URL(e)}catch{throw new Error(`could not parse "${t}". 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):Te(r),a=fe(r,n.hostname,s);if(Me(n)){let i=await ge(a,s);if(i)return i;throw me(a)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function nt(){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 wire sootsim into your own project so your dev server hosts the bridge:"),console.error(" sootsim setup-repo"),console.error("")}function we(t){let o=C();if(console.log(` note: no sootsim bridge detected on port ${t}`),o){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" to get a bridge running, either:"),console.log(" sootsim install-desktop # download the electron app"),console.log(" sootsim setup-repo # wire sootsim into your own project")}function Ue(t){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${t}.`),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 rt(t,o,e){let n=[];try{n=await t.listSims()}catch{}if(console.error(""),n.length===0){Ue(o);return}console.error(` no sim with id "${e}" is connected to the bridge on port ${o}.`),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 Ee={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(t){return new Promise(o=>setTimeout(o,t))}function A(t){return t.trim()}function J(t){try{let o=new URL(t),e=o.pathname.replace(/\/+$/,"")||"/";return o.searchParams.has("open")||o.searchParams.has("port")||o.searchParams.has("bundle")||o.searchParams.has("demo")||o.pathname.includes("/sootsim/index.html")||e==="/sootsim"||o.pathname==="/__soot"||o.pathname==="/__soot/"||e==="/rn"||/^\/rn\/[^/]+$/i.test(e)||/^\/app\/[^/]+$/i.test(e)||e==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(e)||/^\/__soot\/app\/[^/]+$/i.test(e)}catch{return!1}}async function It(t){let o=A(t);return(await $e(o)).bundleUrl}function Oe(t){try{let o=new URL(t.startsWith("http")?t:`http://${t}`),e=o.pathname||"/";if(e!=="/"&&e!==""||o.search||o.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(o.hostname))return null;let n=o.port?Number(o.port):o.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function $e(t){let o=A(t),e=/^\d+$/.test(o)?Number(o):Oe(o);if(e&&e>0){let n=await ce(e);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return he(o)}function Q(t){let o=t.replace(/\/+$/,"")||"/";return o==="/__soot"||o.startsWith("/__soot/")?"/__soot":""}function _e(t,o){let e=A(t),n=new URL(o),r=Q(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(e)?n.pathname=`${r}/rn/${e}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",e)),n.toString()}function Le(t){let o=A(t);return/^\d+$/.test(o)||/^https?:\/\//i.test(o)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(o)}async function De(t,o){let e=await $e(t),n=new URL(o),r=Q(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.set("bundle",e.bundleUrl),n.toString()}function Ae(t){return t.startsWith("~/")?G.join(Re.homedir(),t.slice(2)):G.isAbsolute(t)?t:G.resolve(process.cwd(),t)}function Ne(t){let o={};for(let e=0;e<t.length;e++){if(t[e]!=="--replace")continue;let n=t[e+1];n||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let r=n.indexOf("=");(r<=0||r===n.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let s=n.slice(0,r).trim(),a=Ae(n.slice(r+1).trim());ve.existsSync(a)||(console.error(` sootsim open: replacement file not found: ${a}`),process.exit(1)),o[s]={file:a},e++}return Object.keys(o).length>0?{modules:o}:void 0}function Ie(){let t=te();return oe(t)&&t.runtimePort>0?`http://localhost:${t.runtimePort}/`:ee}async function D(t,o=Ie()){if(!t)return new URL(o).toString();if(J(t))return new URL(t).toString();let e=Ee[t.toLowerCase()];if(e){let n=new URL(o),r=Q(n.pathname);return n.pathname=`${r}${e}`,n.toString()}return Le(t)?De(t,o):_e(t,o)}function be(t,o){let e=t?.url||t?.origin||o;try{let n=new URL(e);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.toString()}catch{return o}}async function Fe(t,o,e){let n=new URL(await D(t,o));return n.searchParams.set("inspectOpen",e),n.toString()}async function He(t,o,e,n={}){let r=n.attempts??30,s=n.intervalMs??500,a=n.minNodeCount??10;for(let i=0;i<r;i++){let l=S(t,{commandTimeoutMs:o,simId:e,simIdSource:"flag"});try{let c=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>a)return{bridge:l,count:c}}catch{}l.close(),await v(s)}return null}function Ke(t){if(!t)return null;try{let o=new URL(t);if(o.searchParams.has("bundle")){let e=o.searchParams.get("bundle")||"";try{let n=new URL(e),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return o.searchParams.has("port")?`connect :${o.searchParams.get("port")||""}`:o.searchParams.has("open")?`connect ${o.searchParams.get("open")||""}`:o.searchParams.has("demo")?`demo ${o.searchParams.get("demo")||"default"}`:o.pathname.includes("/sootsim/index.html")||o.pathname==="/sootsim/"||o.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function ze(t,o){if(t.length===0){console.log(" no sims connected");return}console.log(` connected sims (${t.length}):
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as _,b as z,c as le,d as ce}from"./chunk-QDYFRHQK.js";import{l as O}from"./chunk-G6Y6PFGR.js";import{j as se,k as ie,m as ae}from"./chunk-UASODA4K.js";import{g as W}from"./chunk-SL4MHVAB.js";import{a as C,b as j}from"./chunk-34TWXW7Z.js";import{c as de}from"./chunk-LAZ7FFOW.js";import{d as ne}from"./chunk-6EMLKJ4H.js";import{a as ee}from"./chunk-H532JOZV.js";import{b as re,c as I,d as S,e as x}from"./chunk-YVKR7SWO.js";import{c as k,d as w,e as P}from"./chunk-YXZHBYID.js";import{E as te,F as oe}from"./chunk-ZGHJUI77.js";import ve from"node:fs";import Re from"node:os";import G from"node:path";function Pe(t){return t.replace(/^\[|\]$/g,"").toLowerCase()}function q(t){let o=Pe(t);return o==="localhost"||o.endsWith(".localhost")||o==="0.0.0.0"||o==="::1"||/^127(?:\.\d{1,3}){3}$/.test(o)}function me(t){return new Error(`could not resolve a native bundle for ${t}. pass an explicit bundle URL or open Connect and choose the app there.`)}function Ce(t,o){return t?.includes("/one/metro-entry.bundle")?"one":typeof o=="string"&&o?"expo":"unknown"}function fe(t,o,e){return`${t}//${o}:${e}`}function Be(t){if(typeof window>"u")return!1;try{let o=new URL(t);return q(o.hostname)&&q(window.location.hostname)&&o.origin!==window.location.origin}catch{return!1}}async function ue(t,o){let e={...o,cache:o?.cache??"no-store"};return Be(t)?fetch(`/__fetch-proxy?url=${encodeURIComponent(t)}`,e):fetch(t,e)}function Te(t){return t==="https:"?443:80}function Me(t){let o=t.pathname||"/";return(o==="/"||o==="")&&!t.search&&!t.hash}async function ge(t,o){let e=t.replace(/\/+$/,"");try{let n=await ue(`${e}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},a=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(a||s.name)return{bundleUrl:le(a||`${e}${z}`),port:o,framework:Ce(a,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await ue(`${e}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${e}${z}`,port:o,framework:"metro"}}catch{}return null}async function pe(t){return ge(fe("http:","localhost",t),t)}async function he(t){let o=t.trim();if(/^\d+$/.test(o)){let i=parseInt(o,10),l=await pe(i);if(l)return l;let c=3;for(let d=1;d<=c;d++){let m=await pe(i+d);if(m)return m}throw me(`localhost:${i} (also scanned +1..+${c})`)}let e=o.startsWith("http")?o:`http://${o}`,n;try{n=new URL(e)}catch{throw new Error(`could not parse "${t}". 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):Te(r),a=fe(r,n.hostname,s);if(Me(n)){let i=await ge(a,s);if(i)return i;throw me(a)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function nt(){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 wire sootsim into your own project so your dev server hosts the bridge:"),console.error(" sootsim setup-repo"),console.error("")}function we(t){let o=C();if(console.log(` note: no sootsim bridge detected on port ${t}`),o){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" to get a bridge running, either:"),console.log(" sootsim install-desktop # download the electron app"),console.log(" sootsim setup-repo # wire sootsim into your own project")}function Ue(t){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${t}.`),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 rt(t,o,e){let n=[];try{n=await t.listSims()}catch{}if(console.error(""),n.length===0){Ue(o);return}console.error(` no sim with id "${e}" is connected to the bridge on port ${o}.`),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 Ee={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(t){return new Promise(o=>setTimeout(o,t))}function A(t){return t.trim()}function J(t){try{let o=new URL(t),e=o.pathname.replace(/\/+$/,"")||"/";return o.searchParams.has("open")||o.searchParams.has("port")||o.searchParams.has("bundle")||o.searchParams.has("demo")||o.pathname.includes("/sootsim/index.html")||e==="/sootsim"||o.pathname==="/__soot"||o.pathname==="/__soot/"||e==="/rn"||/^\/rn\/[^/]+$/i.test(e)||/^\/app\/[^/]+$/i.test(e)||e==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(e)||/^\/__soot\/app\/[^/]+$/i.test(e)}catch{return!1}}async function It(t){let o=A(t);return(await $e(o)).bundleUrl}function Oe(t){try{let o=new URL(t.startsWith("http")?t:`http://${t}`),e=o.pathname||"/";if(e!=="/"&&e!==""||o.search||o.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(o.hostname))return null;let n=o.port?Number(o.port):o.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function $e(t){let o=A(t),e=/^\d+$/.test(o)?Number(o):Oe(o);if(e&&e>0){let n=await ce(e);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return he(o)}function Q(t){let o=t.replace(/\/+$/,"")||"/";return o==="/__soot"||o.startsWith("/__soot/")?"/__soot":""}function _e(t,o){let e=A(t),n=new URL(o),r=Q(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(e)?n.pathname=`${r}/rn/${e}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",e)),n.toString()}function Le(t){let o=A(t);return/^\d+$/.test(o)||/^https?:\/\//i.test(o)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(o)}async function De(t,o){let e=await $e(t),n=new URL(o),r=Q(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.set("bundle",e.bundleUrl),n.toString()}function Ae(t){return t.startsWith("~/")?G.join(Re.homedir(),t.slice(2)):G.isAbsolute(t)?t:G.resolve(process.cwd(),t)}function Ne(t){let o={};for(let e=0;e<t.length;e++){if(t[e]!=="--replace")continue;let n=t[e+1];n||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let r=n.indexOf("=");(r<=0||r===n.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let s=n.slice(0,r).trim(),a=Ae(n.slice(r+1).trim());ve.existsSync(a)||(console.error(` sootsim open: replacement file not found: ${a}`),process.exit(1)),o[s]={file:a},e++}return Object.keys(o).length>0?{modules:o}:void 0}function Ie(){let t=te();return oe(t)&&t.runtimePort>0?`http://localhost:${t.runtimePort}/`:ee}async function D(t,o=Ie()){if(!t)return new URL(o).toString();if(J(t))return new URL(t).toString();let e=Ee[t.toLowerCase()];if(e){let n=new URL(o),r=Q(n.pathname);return n.pathname=`${r}${e}`,n.toString()}return Le(t)?De(t,o):_e(t,o)}function be(t,o){let e=t?.url||t?.origin||o;try{let n=new URL(e);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.toString()}catch{return o}}async function Fe(t,o,e){let n=new URL(await D(t,o));return n.searchParams.set("inspectOpen",e),n.toString()}async function He(t,o,e,n={}){let r=n.attempts??30,s=n.intervalMs??500,a=n.minNodeCount??10;for(let i=0;i<r;i++){let l=S(t,{commandTimeoutMs:o,simId:e,simIdSource:"flag"});try{let c=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>a)return{bridge:l,count:c}}catch{}l.close(),await v(s)}return null}function Ke(t){if(!t)return null;try{let o=new URL(t);if(o.searchParams.has("bundle")){let e=o.searchParams.get("bundle")||"";try{let n=new URL(e),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return o.searchParams.has("port")?`connect :${o.searchParams.get("port")||""}`:o.searchParams.has("open")?`connect ${o.searchParams.get("open")||""}`:o.searchParams.has("demo")?`demo ${o.searchParams.get("demo")||"default"}`:o.pathname.includes("/sootsim/index.html")||o.pathname==="/sootsim/"||o.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function ze(t,o){if(t.length===0){console.log(" no sims connected");return}console.log(` connected sims (${t.length}):
3
3
  `);for(let e of t){let n=e.lockedBy&&e.lockExpiresAt?`locked by ${e.lockedBy} (${Math.max(0,Math.round((e.lockExpiresAt-Date.now())/1e3))}s)`:"",r=[e.isPrimary?"primary":"",e.id===o?"selected":"",e.readyState,e.userVisible===!1?"hidden":e.userVisible===!0?"visible":"",e.attachedCliCount&&e.attachedCliCount>0?"in use":"",e.userFocused?"focused":"",n].filter(Boolean);console.log(` ${e.id}${r.length?` [${r.join(", ")}]`:""}`);let s=Ke(e.url);if(s)console.log(` loaded: ${s}`);else if(e.url){let a=e.url.length>96?`${e.url.slice(0,93)}\u2026`:e.url;console.log(` url: ${a}`)}else e.origin&&console.log(` origin: ${e.origin}`);e.title&&console.log(` title: ${e.title}`),e.visibilityState&&e.visibilityState!=="visible"&&console.log(` visibility: ${e.visibilityState}`),console.log(` connected: ${ye(Date.now()-e.connectedAt)}`),e.lastActiveAt&&e.lastActiveAt>0&&console.log(` last active: ${ye(Date.now()-e.lastActiveAt)}`)}}function ye(t){let o=Math.max(0,Math.round(t/1e3));return o<60?`${o}s ago`:o<3600?`${Math.round(o/60)}m ago`:o<86400?`${Math.round(o/3600)}h ago`:`${Math.round(o/86400)}d ago`}async function L(t,o,e,n={}){let r=n.attempts??30,s=n.intervalMs??500;for(let a=0;a<r;a++){let i=S(t,{commandTimeoutMs:o});try{let c=(await i.listSims()).find(e);if(c)return c}catch{}finally{i.close()}await v(s)}return null}async function je(t,o,e,n={}){let r=n.attempts??20,s=n.intervalMs??250;for(let a=0;a<r;a++){let i=S(t,{commandTimeoutMs:o});try{let c=(await i.listSims()).find(d=>d.id===e);if(!c||c.readyState!=="open")return!0}catch{return!0}finally{i.close()}await v(s)}return!1}function We(t){let o=t.meta;if(!o||o.sootsimHostDriver!=="playwright")return null;let e=Number(o.sootsimHostPid);return!Number.isInteger(e)||e<=1||e===process.pid?null:e}function qe(t){if(!t.connectAckFile)return!1;try{return ve.writeFileSync(t.connectAckFile,`${JSON.stringify({connectedAt:Date.now(),pid:t.pid??null})}
4
4
  `,{flag:"w"}),!0}catch{return!1}}function Se(t){try{return process.kill(t,0),!0}catch(o){return o?.code==="EPERM"}}async function Ge(t,o=2500){let e=Date.now()+o;for(;Date.now()<e;){if(!Se(t))return!0;await v(100)}return!Se(t)}async function V(t,o){let e=new Set(o),n=new Set;for(let r of t){if(!e.has(r.id))continue;let s=We(r);s&&n.add(s)}for(let r of n){try{process.kill(r,"SIGTERM")}catch{}if(await Ge(r)){console.log(` closed playwright host process ${r}`);continue}try{process.kill(r,"SIGKILL"),console.log(` force-closed playwright host process ${r}`)}catch{}}}function N(t,o){if(o){let r=o.trim(),s=t.find(a=>a.id===r);if(!s)throw new Error(`no sim connected with id ${r}`);return s}let e=t.find(r=>r.isPrimary&&r.readyState==="open");if(e)return e;let n=t.find(r=>r.readyState==="open");if(n)return n;throw new Error("no sim connected")}function B(t,o,e){console.log(` ${e==="current sim"?"loaded":"opened"}: ${t} [${e}]`),console.log(` current sim: ${o.id}`),console.log(JSON.stringify({simId:o.id,url:o.url},null,2))}async function T(t,o,e){if(e.includes("--no-describe"))return;let n=process.env.SOOTSIM_QUIET_TARGET_NOTICE;process.env.SOOTSIM_QUIET_TARGET_NOTICE="1";try{await Ve(t,o,{stableMs:150,maxMs:400});let r=S(t,{commandTimeoutMs:3e3,simId:o,cliLabel:"open --describe",simIdSource:"flag"});try{let s=null;try{s=await r.send({type:"evaluate",code:se})}catch{}if(s&&!(s.flag===!0&&!s.loadingText&&s.nodes>=ie&&ae(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 i=`(async () => {
5
5
  const t = window.__sootsimTest
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{createInterface as i}from"readline";var c=()=>i({input:process.stdin,output:process.stdout});function s(o){return new Promise(n=>{let r=c();r.question(o,t=>{r.close(),n(t.trim())})})}async function u(o,n=!0){let r=n?"[Y/n]":"[y/N]";if(!process.stdin.isTTY)return console.log(` ${o} ${r} ${n?"y":"n"} (non-interactive)`),n;let t=await s(` ${o} ${r} `);return t===""?n:t.toLowerCase().startsWith("y")}async function a(o,n){console.log(`
3
3
  ${o}
4
4
  `);for(let e=0;e<n.length;e++)console.log(` ${e+1}. ${n[e]}`);if(console.log(),!process.stdin.isTTY)return console.log(` choose [1-${n.length}]: 1 (non-interactive)`),0;let r=await s(` choose [1-${n.length}]: `),t=parseInt(r,10);return t>=1&&t<=n.length?t-1:0}export{u as a,a as b};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as d}from"./chunk-FX6YMDSO.js";import{a as p,d as w,h as $,j as y}from"./chunk-QD5DZZRO.js";import{A as g,B as f,i as h,y as m,z as a}from"./chunk-WLIULEKU.js";import b from"fs";import{WebSocket as D}from"ws";async function P(n,e={}){let[o,...t]=n;if(!o||o==="--help"||o==="-h"){R();return}switch(o){case"install":return O(t,e);case"list":case"ls":return S(t);case"use":return T(t);case"remove":case"rm":return N(t);case"which":case"active":return F();default:console.error(` unknown runtime subcommand: ${o}`),R(),process.exit(1)}}function R(){console.log(`
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as d}from"./chunk-YVKR7SWO.js";import{a as p,d as w,h as $,j as y}from"./chunk-XCFP4FKE.js";import{A as g,B as f,i as h,y as m,z as a}from"./chunk-ZGHJUI77.js";import b from"fs";import{WebSocket as D}from"ws";async function P(n,e={}){let[o,...t]=n;if(!o||o==="--help"||o==="-h"){R();return}switch(o){case"install":return O(t,e);case"list":case"ls":return S(t);case"use":return T(t);case"remove":case"rm":return N(t);case"which":case"active":return F();default:console.error(` unknown runtime subcommand: ${o}`),R(),process.exit(1)}}function R(){console.log(`
3
3
  sootsim runtime \u2014 manage engine runtimes under ~/.sootsim/runtimes/
4
4
 
5
5
  usage:
@@ -22,4 +22,4 @@ examples:
22
22
  sootsim runtime install 1.2.3
23
23
  sootsim runtime install --channel beta
24
24
  sootsim runtime use 1.2.3
25
- `)}async function O(n,e){let{version:o,flags:t}=_(n),s=t.channel??e.channel??"stable",l=t.force===!0,c=t.setActive!==!1;m(),console.log("sootsim runtime install"),console.log(` cdn: ${w()}`);try{let i=await y({version:o,channel:s,force:l,setActive:c});console.log(` version: ${i.version} (channel: ${i.channel})`),i.installed?console.log(` installed ${i.version}`):console.log(` already installed at ${i.runtimeDir}`),c&&await k(i.version)}catch(i){console.error(` ${I(i)}`),process.exit(1)}}async function k(n){g(n),console.log(` active: ${n}`),await A(n)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${n})`)}async function A(n){let{isDaemonLockfileFresh:e,readDaemonLockfile:o}=await import("./home-paths-OJPYHDPR.js"),t=o();if(!e(t))return!1;let s=d();return new Promise(l=>{let c=!1,i=!1,u=x=>{c||(c=!0,l(x))},r=new D(`ws://127.0.0.1:${s}`,{handshakeTimeout:800}),v=setTimeout(()=>{try{r.close()}catch{}u(i)},1500);r.on("open",()=>{try{r.send(JSON.stringify({type:"runtime:use",version:n,id:0})),i=!0}catch{}setTimeout(()=>{try{r.close()}catch{}},100)}),r.on("close",()=>{clearTimeout(v),u(i)}),r.on("error",()=>{clearTimeout(v),u(!1)})})}async function S(n){m();let e=f(),o=a();if(console.log("installed:"),e.length===0)console.log(" (none)");else for(let t of e)console.log(` ${t===o?"*":" "} ${t}`);try{let t=await $();console.log("available (latest per channel):");for(let[s,l]of Object.entries(t.channels))console.log(` ${s.padEnd(8)} ${l.latest}`)}catch(t){console.log(`available: (could not fetch manifest: ${I(t)})`)}}async function T(n){let e=n[0];e||(console.error(" usage: sootsim runtime use <version>"),process.exit(1));let o=f();o.includes(e)||(console.error(` version ${e} is not installed`),console.error(` installed: ${o.join(", ")||"(none)"}`),console.error(` run \`sootsim runtime install ${e}\` first`),process.exit(1)),await k(e)}async function N(n){let e=n[0];e||(console.error(" usage: sootsim runtime remove <version>"),process.exit(1)),a()===e&&(console.error(` cannot remove active runtime ${e}`),console.error(" switch with `sootsim runtime use <other>` first, or install another version"),process.exit(1));let t=h(e);if(!b.existsSync(t)){console.error(` ${e} is not installed`);return}b.rmSync(t,{recursive:!0,force:!0}),console.log(` removed ${e}`)}async function F(){let n=a();if(!n){console.log(" no active runtime");return}console.log(n)}function _(n){let e={},o=[];for(let t=0;t<n.length;t++){let s=n[t];if(s==="--channel"&&t+1<n.length){e.channel=n[t+1],t++;continue}if(s.startsWith("--channel=")){e.channel=s.slice(10);continue}if(s==="--force"){e.force=!0;continue}if(s==="--set-active=false"||s==="--no-set-active"){e.setActive=!1;continue}o.push(s)}return{version:o[0]??null,flags:e}}function I(n){return n instanceof Error?n.message:String(n)}export{P as a};
25
+ `)}async function O(n,e){let{version:o,flags:t}=_(n),s=t.channel??e.channel??"stable",l=t.force===!0,c=t.setActive!==!1;m(),console.log("sootsim runtime install"),console.log(` cdn: ${w()}`);try{let i=await y({version:o,channel:s,force:l,setActive:c});console.log(` version: ${i.version} (channel: ${i.channel})`),i.installed?console.log(` installed ${i.version}`):console.log(` already installed at ${i.runtimeDir}`),c&&await k(i.version)}catch(i){console.error(` ${I(i)}`),process.exit(1)}}async function k(n){g(n),console.log(` active: ${n}`),await A(n)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${n})`)}async function A(n){let{isDaemonLockfileFresh:e,readDaemonLockfile:o}=await import("./home-paths-4J2QXP5S.js"),t=o();if(!e(t))return!1;let s=d();return new Promise(l=>{let c=!1,i=!1,u=x=>{c||(c=!0,l(x))},r=new D(`ws://127.0.0.1:${s}`,{handshakeTimeout:800}),v=setTimeout(()=>{try{r.close()}catch{}u(i)},1500);r.on("open",()=>{try{r.send(JSON.stringify({type:"runtime:use",version:n,id:0})),i=!0}catch{}setTimeout(()=>{try{r.close()}catch{}},100)}),r.on("close",()=>{clearTimeout(v),u(i)}),r.on("error",()=>{clearTimeout(v),u(!1)})})}async function S(n){m();let e=f(),o=a();if(console.log("installed:"),e.length===0)console.log(" (none)");else for(let t of e)console.log(` ${t===o?"*":" "} ${t}`);try{let t=await $();console.log("available (latest per channel):");for(let[s,l]of Object.entries(t.channels))console.log(` ${s.padEnd(8)} ${l.latest}`)}catch(t){console.log(`available: (could not fetch manifest: ${I(t)})`)}}async function T(n){let e=n[0];e||(console.error(" usage: sootsim runtime use <version>"),process.exit(1));let o=f();o.includes(e)||(console.error(` version ${e} is not installed`),console.error(` installed: ${o.join(", ")||"(none)"}`),console.error(` run \`sootsim runtime install ${e}\` first`),process.exit(1)),await k(e)}async function N(n){let e=n[0];e||(console.error(" usage: sootsim runtime remove <version>"),process.exit(1)),a()===e&&(console.error(` cannot remove active runtime ${e}`),console.error(" switch with `sootsim runtime use <other>` first, or install another version"),process.exit(1));let t=h(e);if(!b.existsSync(t)){console.error(` ${e} is not installed`);return}b.rmSync(t,{recursive:!0,force:!0}),console.log(` removed ${e}`)}async function F(){let n=a();if(!n){console.log(" no active runtime");return}console.log(n)}function _(n){let e={},o=[];for(let t=0;t<n.length;t++){let s=n[t];if(s==="--channel"&&t+1<n.length){e.channel=n[t+1],t++;continue}if(s.startsWith("--channel=")){e.channel=s.slice(10);continue}if(s==="--force"){e.force=!0;continue}if(s==="--set-active=false"||s==="--no-set-active"){e.setActive=!1;continue}o.push(s)}return{version:o[0]??null,flags:e}}function I(n){return n instanceof Error?n.message:String(n)}export{P as a};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as Ie}from"./chunk-TULLGRT4.js";import{a as Ae}from"./chunk-LESUHJDU.js";import{a as Pe}from"./chunk-W53GXBRM.js";import{a as V,b as he,c as ge,d as Z,e as ee,f as ye,g as te,i as re,j as be,k as Me}from"./chunk-CWX5R725.js";import{f as Te,m as Fe,o as $e,s as ke}from"./chunk-MJKQF66L.js";import{e as Se}from"./chunk-BD27IPME.js";import{l as we}from"./chunk-QPDNOKOQ.js";import{a as ve}from"./chunk-PBJMKMHA.js";import{a as xe}from"./chunk-IECVOMEO.js";import{a as fe,b as G}from"./chunk-27DZP6PJ.js";import{f as me}from"./chunk-VV3I72HQ.js";import{c as X,d as Q,e as pe}from"./chunk-FX6YMDSO.js";import{c as Y}from"./chunk-NSIRZK23.js";import*as A from"fs";import{tmpdir as De}from"os";import*as y from"path";import*as g from"fs";import*as w from"path";var L=1e4,B=393,C=852,Ee="__sootsimCliPerf",Ke="maestroCopiedText",_e=new Map;function f(o){return new Promise(e=>setTimeout(e,o))}function Je(o){return o?w.basename(o)===".maestro"?w.dirname(o):o:process.cwd()}function He(o,e,t){let r=e.endsWith(".png")?e:`${e}.png`;if(w.isAbsolute(r))return r;if(t.mode==="flow"&&/[\\/]/.test(r)){let i=r.startsWith("./")||r.startsWith("../")?t.flowDir??process.cwd():Je(t.flowDir);return w.resolve(i,r)}return w.join(o,r)}function qe(o){if(typeof o=="string")return{path:o,withFrame:!1};let e=o.path?.trim()||o.name?.trim();if(!e)throw new Error("takeScreenshot object form requires path or name");return{path:e,withFrame:o.withFrame===!0,layers:o.layers}}function ie(o){let[e,t]=o.split(",").map(i=>i.trim()),r=(i,n)=>i.endsWith("%")?Number.parseFloat(i)/100*n:Number.parseFloat(i);return{x:r(e,B),y:r(t,C)}}function ze(o){let e=o.split(/^---$/m),t=e.length>1?e[e.length-1]:o,r=ge(he.parse(t),_e);return Array.isArray(r)?r:[]}var W=class{constructor(e,t){this.bridge=e;this.opts=t}stepDelay=0;firstLaunchDone=!1;profilingEnabled=!1;recordingEnabled=!1;recordingAccessChecked=!1;recordingStartedAtMs=null;lastRecordingDurationMs=null;simRouteHint=null;lastFailedStep=null;get simId(){return this.opts.simId}setSimRouteHint(e){this.simRouteHint=this.normalizeSimRoute(e)}normalizeSimRoute(e){if(!e)return null;try{let t=new URL(e);t.searchParams.delete("inspectOpen");let r=t.searchParams.toString();return`${t.origin}${t.pathname}${r?`?${r}`:""}`}catch{return e}}async refreshSimId(){if(this.opts.simId)try{let e=await this.bridge.listSims(),t=e.find(a=>a.id===this.opts.simId);if(t&&(this.simRouteHint=this.normalizeSimRoute(t.url||t.origin)),e.find(a=>a.id===this.opts.simId&&a.readyState==="open")||!this.simRouteHint)return;let i=this.simRouteHint&&e.find(a=>a.readyState==="open"&&this.normalizeSimRoute(a.url||a.origin)===this.simRouteHint);if(!i)return;let n=e.find(a=>a.isPrimary&&a.readyState==="open"),s=e.find(a=>a.readyState==="open"),l=i??n??s;l&&(this.opts.simId=l.id,console.log(` [flow] sim rotated to ${l.id}`))}catch{}}async evaluate(e,t){return this.bridge.send({type:"evaluate",simId:this.opts.simId,code:e},t?{timeoutMs:t}:void 0)}async callTest(e,...t){return this.bridge.send({type:"call",simId:this.opts.simId,path:`__sootsimTest.${e}`,args:t})}async waitForTree(e=L){let t=Date.now()+e,r=Date.now(),i=null,n=0,s=0;for(;Date.now()<t;){try{let a=await this.evaluate(`(async () => {
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as Ie}from"./chunk-2WOD3LBI.js";import{a as Ae}from"./chunk-6K2OMU5N.js";import{a as Pe}from"./chunk-7LR7PVW4.js";import{a as V,b as he,c as ge,d as Z,e as ee,f as ye,g as te,i as re,j as be,k as Me}from"./chunk-JJQQMLVH.js";import{f as Te,m as Fe,o as $e,s as ke}from"./chunk-UJUJJDJH.js";import{e as Se}from"./chunk-QDYFRHQK.js";import{l as we}from"./chunk-G6Y6PFGR.js";import{a as ve}from"./chunk-HKLWUXFK.js";import{a as xe}from"./chunk-34TWXW7Z.js";import{a as fe,b as G}from"./chunk-ODLY2N63.js";import{f as me}from"./chunk-RA3I4BJI.js";import{c as X,d as Q,e as pe}from"./chunk-YVKR7SWO.js";import{c as Y}from"./chunk-YXZHBYID.js";import*as A from"fs";import{tmpdir as De}from"os";import*as y from"path";import*as g from"fs";import*as w from"path";var L=1e4,B=393,C=852,Ee="__sootsimCliPerf",Ke="maestroCopiedText",_e=new Map;function f(o){return new Promise(e=>setTimeout(e,o))}function Je(o){return o?w.basename(o)===".maestro"?w.dirname(o):o:process.cwd()}function He(o,e,t){let r=e.endsWith(".png")?e:`${e}.png`;if(w.isAbsolute(r))return r;if(t.mode==="flow"&&/[\\/]/.test(r)){let i=r.startsWith("./")||r.startsWith("../")?t.flowDir??process.cwd():Je(t.flowDir);return w.resolve(i,r)}return w.join(o,r)}function qe(o){if(typeof o=="string")return{path:o,withFrame:!1};let e=o.path?.trim()||o.name?.trim();if(!e)throw new Error("takeScreenshot object form requires path or name");return{path:e,withFrame:o.withFrame===!0,layers:o.layers}}function ie(o){let[e,t]=o.split(",").map(i=>i.trim()),r=(i,n)=>i.endsWith("%")?Number.parseFloat(i)/100*n:Number.parseFloat(i);return{x:r(e,B),y:r(t,C)}}function ze(o){let e=o.split(/^---$/m),t=e.length>1?e[e.length-1]:o,r=ge(he.parse(t),_e);return Array.isArray(r)?r:[]}var W=class{constructor(e,t){this.bridge=e;this.opts=t}stepDelay=0;firstLaunchDone=!1;profilingEnabled=!1;recordingEnabled=!1;recordingAccessChecked=!1;recordingStartedAtMs=null;lastRecordingDurationMs=null;simRouteHint=null;lastFailedStep=null;get simId(){return this.opts.simId}setSimRouteHint(e){this.simRouteHint=this.normalizeSimRoute(e)}normalizeSimRoute(e){if(!e)return null;try{let t=new URL(e);t.searchParams.delete("inspectOpen");let r=t.searchParams.toString();return`${t.origin}${t.pathname}${r?`?${r}`:""}`}catch{return e}}async refreshSimId(){if(this.opts.simId)try{let e=await this.bridge.listSims(),t=e.find(a=>a.id===this.opts.simId);if(t&&(this.simRouteHint=this.normalizeSimRoute(t.url||t.origin)),e.find(a=>a.id===this.opts.simId&&a.readyState==="open")||!this.simRouteHint)return;let i=this.simRouteHint&&e.find(a=>a.readyState==="open"&&this.normalizeSimRoute(a.url||a.origin)===this.simRouteHint);if(!i)return;let n=e.find(a=>a.isPrimary&&a.readyState==="open"),s=e.find(a=>a.readyState==="open"),l=i??n??s;l&&(this.opts.simId=l.id,console.log(` [flow] sim rotated to ${l.id}`))}catch{}}async evaluate(e,t){return this.bridge.send({type:"evaluate",simId:this.opts.simId,code:e},t?{timeoutMs:t}:void 0)}async callTest(e,...t){return this.bridge.send({type:"call",simId:this.opts.simId,path:`__sootsimTest.${e}`,args:t})}async waitForTree(e=L){let t=Date.now()+e,r=Date.now(),i=null,n=0,s=0;for(;Date.now()<t;){try{let a=await this.evaluate(`(async () => {
3
3
  const test = window.__sootsimTest
4
4
  if (!test) return { count: 0, loading: true }
5
5
  const count = (await test.getNodeCount?.()) || 0
@@ -369,7 +369,7 @@ flow extension:
369
369
  + completed (${M.length} steps)`),c>0&&console.log(` screenshots: ${c} \u2192 ${s}`),I&&Ce(I),S&&console.log(` video: ${S}`),console.log()}catch(u){if(r&&!I)try{I=await d.stopProfile()}catch{}if(T&&!S)try{S=await d.stopRecording(),_=d.getLastRecordingDurationMs()}catch(c){console.warn(` recording stop failed: ${c?.message||String(c)}`)}console.error(`
370
370
  x failed: ${u.message}
371
371
  `),I&&(console.log(" partial profile:"),Ce(I)),S&&console.log(` partial video: ${S}`);try{let c=d.lastFailedStep,h=c?`step-${String(c.index+1).padStart(2,"0")}-${c.kind}`:"unstaged",N=y.join(s,h);await d.captureFailureBundle(N,{error:u,stepIndex:c?.index,stepKind:c?.kind,stepTarget:c?.target}),console.log(` failure bundle: ${N}`),console.log(" (contents: screenshot.png, describe.json, a11y.txt, tree.txt, console.json, error.json)")}catch(c){try{let h=y.join(s,"error.png");await d.captureFailureScreenshot(h),console.log(` error screenshot: ${h}`)}catch{}console.log(` (failure bundle capture failed: ${c instanceof Error?c.message:String(c)})`)}await we($,{errorsCommand:`sootsim get errors 5${d.simId?` --sim ${d.simId}`:""}`,warningsCommand:`sootsim get warnings 5${d.simId?` --sim ${d.simId}`:""}`,requestsCommand:`sootsim get requests 5${d.simId?` --sim ${d.simId}`:""}`}),O=1}finally{$.close()}if(O===0&&v)try{let u=await Qe(z??[]),c=["--origin",U,"--events",u];oe&&c.push("--public-origin",oe),S&&c.push("--video",S),S&&_&&Number.isFinite(_)&&c.push("--video-duration-ms",String(Math.round(_))),d.simId&&c.push("--sim",d.simId),Ne&&c.push("--open"),console.log(`
372
- preparing preview upload\u2026`);let{runUpload:h}=await import("./upload-WAHDSDCI.js");await h(c,{})}catch(u){console.error(` preview upload failed: ${u?.message||u}`),O=1}return J&&(d.simId&&H.add(d.simId),await Xe(b.wsPort,b.commandTimeoutMs,[...H])),await G(),O}async function Xe(o,e,t){let r=[...new Set(t.filter(Boolean))];if(r.length===0)return;let i=Q(o,{commandTimeoutMs:e});try{let n=await i.listSims(),s=r.filter(a=>n.some(m=>m.id===a&&m.readyState==="open"));if(s.length===0)return;let l=await ke(i,o,e,s);await Fe(n,s),l.closed.length>0&&console.log(` closed flow sim(s): ${l.closed.join(", ")}`),l.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${l.remaining.join(", ")}`)}catch(n){console.warn(` warn: failed to close flow sim(s): ${n instanceof Error?n.message:String(n)}`)}finally{i.close()}}async function Qe(o){let{gzipSync:e}=await import("zlib"),t=o.map(n=>JSON.stringify(n)).join(`
372
+ preparing preview upload\u2026`);let{runUpload:h}=await import("./upload-DLFGYLCF.js");await h(c,{})}catch(u){console.error(` preview upload failed: ${u?.message||u}`),O=1}return J&&(d.simId&&H.add(d.simId),await Xe(b.wsPort,b.commandTimeoutMs,[...H])),await G(),O}async function Xe(o,e,t){let r=[...new Set(t.filter(Boolean))];if(r.length===0)return;let i=Q(o,{commandTimeoutMs:e});try{let n=await i.listSims(),s=r.filter(a=>n.some(m=>m.id===a&&m.readyState==="open"));if(s.length===0)return;let l=await ke(i,o,e,s);await Fe(n,s),l.closed.length>0&&console.log(` closed flow sim(s): ${l.closed.join(", ")}`),l.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${l.remaining.join(", ")}`)}catch(n){console.warn(` warn: failed to close flow sim(s): ${n instanceof Error?n.message:String(n)}`)}finally{i.close()}}async function Qe(o){let{gzipSync:e}=await import("zlib"),t=o.map(n=>JSON.stringify(n)).join(`
373
373
  `)+(o.length?`
374
374
  `:""),r=e(Buffer.from(t,"utf8")),i=y.join(De(),`sootsim-events-${Date.now()}.jsonl.gz`);return A.writeFileSync(i,r),console.log(` events: ${o.length} written to ${i} (${r.length} bytes gz)`),i}async function Ze(o){let e=o[0],t=r=>o.find((i,n)=>o[n-1]===r);switch(e){case"start":{let{path:r,state:i}=ye();console.log(" flow draft started"),console.log(` session: ${r}`),console.log(` steps: ${i.steps.length}`);return}case"keep":case"good":{let r=re();if(r.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!r.kept){console.log(" no pending action to keep");return}console.log(` kept: ${r.candidate.summary}`),console.log(` steps: ${r.stepCount}`);return}case"end":{let r=t("--output")||(o[1]&&!o[1].startsWith("-")?o[1]:void 0),i=o.includes("--validate")||o.includes("--video"),n=o.includes("--video"),s=re();s.active&&s.kept&&console.log(` auto-kept trailing action: ${s.candidate.summary}`);let l=be(r||(i?tt():void 0));if(l.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!l.valid){console.error(" flow draft is not valid:");for(let a of l.issues)console.error(` - ${a}`);console.error(" draft preserved \u2014 keep at least one real interaction or run `sootsim flow start` to reset"),process.exit(1)}if(i){let a=rt(o,l.outputPath),m=await Oe(a);if(m!==0){console.error(`
375
375
  validation failed \u2014 draft preserved so you can keep iterating`),process.exitCode=m;return}te(),console.log(` flow draft validated (${l.stepCount} step${l.stepCount===1?"":"s"})`),l.outputPath&&console.log(` saved: ${l.outputPath}`),n&&console.log(" video: recorded during validation run");return}if(te(),console.log(` flow draft ended (${l.stepCount} step${l.stepCount===1?"":"s"})`),l.outputPath){console.log(` saved: ${l.outputPath}`),console.log(` next: sootsim flow ${l.outputPath} --record`);return}console.log(""),process.stdout.write(l.yaml);return}case"validate":{let r=o[1];(!r||r.startsWith("-"))&&(console.error(" usage: sootsim flow validate <path>"),process.exit(1));let i=ee(r);if(i.length>0){console.error(` x ${r} failed validation:`);for(let n of i)console.error(` - ${n}`);process.exit(1)}console.log(` + ${r} looks valid`);return}}}function et(o){return o[0]==="--sim"&&o.length>=2?[...o.slice(2),"--sim",o[1]]:o}async function Ft(o){let e=et(o),t=e[0];if(t==="start"||t==="keep"||t==="good"||t==="end"||t==="validate")return await Ze(e),0;let r=await Oe(e);return r!==0&&(process.exitCode=r),r}function Ce(o){let e=o.avgMs>0?(1e3/o.avgMs).toFixed(1):"?",t=o.sampleCount>0?(o.jankFrames/o.sampleCount*100).toFixed(1):"0";console.log(`
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A as R,C as w,i as p,r as S,t as O,y as v,z as f}from"./chunk-WLIULEKU.js";import{spawn as I}from"child_process";import C from"crypto";import s from"fs";import l from"path";import{Readable as k}from"stream";import{pipeline as M}from"stream/promises";var N="https://sootbean.com",D="SOOTSIM_CDN_ORIGIN",E="SOOTSIM_RUNTIME_CHANNEL";function $(){try{let e=JSON.parse(s.readFileSync(O(),"utf8"));return e&&typeof e=="object"?e:{}}catch{return{}}}function d(e){let t=$();return(e||process.env[D]||t.cdnOrigin||N).replace(/\/+$/,"")}function x(e){let t=$();return e||process.env[E]||t.runtimeChannel||"stable"}function T(e){let t=new URL(`${d(e)}/runtimes/manifest.json`);return t.searchParams.set("t",String(Date.now())),t.toString()}function P(e,t){return`${d(t)}/runtimes/sootsim-runtime-${e}.tar.gz`}async function y(e){let t=T(e),r=await fetch(t,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${t})`);return await r.json()}function U(e,t={}){let r=x(t.channel),n=t.version||e.channels[r]?.latest;if(!n)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let i=e.versions[n];if(!i)throw new Error(`version ${n} not found in manifest; available: ${Object.keys(e.versions).slice(-10).join(", ")||"(none)"}`);return{version:n,channel:r,entry:i}}async function V(e={}){v();let t=d(e.cdnOrigin),r=await y(t),{version:n,channel:i,entry:o}=U(r,e),a=p(n),c=e.setActive!==!1;if(!e.force&&s.existsSync(l.join(a,"index.html")))return c&&R(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!1,activated:c,manifest:r};let g=o.tarball||P(n,t),m=l.join(S(),`sootsim-runtime-${n}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${n}\u2026
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A as R,C as w,i as p,r as S,t as O,y as v,z as f}from"./chunk-ZGHJUI77.js";import{spawn as I}from"child_process";import C from"crypto";import s from"fs";import l from"path";import{Readable as k}from"stream";import{pipeline as M}from"stream/promises";var N="https://sootbean.com",D="SOOTSIM_CDN_ORIGIN",E="SOOTSIM_RUNTIME_CHANNEL";function $(){try{let e=JSON.parse(s.readFileSync(O(),"utf8"));return e&&typeof e=="object"?e:{}}catch{return{}}}function d(e){let t=$();return(e||process.env[D]||t.cdnOrigin||N).replace(/\/+$/,"")}function x(e){let t=$();return e||process.env[E]||t.runtimeChannel||"stable"}function T(e){let t=new URL(`${d(e)}/runtimes/manifest.json`);return t.searchParams.set("t",String(Date.now())),t.toString()}function P(e,t){return`${d(t)}/runtimes/sootsim-runtime-${e}.tar.gz`}async function y(e){let t=T(e),r=await fetch(t,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${t})`);return await r.json()}function U(e,t={}){let r=x(t.channel),n=t.version||e.channels[r]?.latest;if(!n)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let i=e.versions[n];if(!i)throw new Error(`version ${n} not found in manifest; available: ${Object.keys(e.versions).slice(-10).join(", ")||"(none)"}`);return{version:n,channel:r,entry:i}}async function V(e={}){v();let t=d(e.cdnOrigin),r=await y(t),{version:n,channel:i,entry:o}=U(r,e),a=p(n),c=e.setActive!==!1;if(!e.force&&s.existsSync(l.join(a,"index.html")))return c&&R(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!1,activated:c,manifest:r};let g=o.tarball||P(n,t),m=l.join(S(),`sootsim-runtime-${n}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${n}\u2026
3
3
  `),await _(g,m),process.stderr.write(`sootsim: extracting runtime ${n}\u2026
4
4
  `);let h=await j(m);if(h!==o.sha256)throw s.rmSync(m,{force:!0}),new Error(`sha256 mismatch for runtime ${n}: expected ${o.sha256}, actual ${h}`);let u=l.join(l.dirname(a),`.installing-${n}-${process.pid}`);s.rmSync(u,{recursive:!0,force:!0}),s.mkdirSync(u,{recursive:!0});try{if(await A(m,u),!s.existsSync(l.join(u,"index.html")))throw new Error(`extracted tarball for runtime ${n} is missing index.html`);s.rmSync(a,{recursive:!0,force:!0}),s.renameSync(u,a)}catch(b){throw s.rmSync(u,{recursive:!0,force:!0}),b}return c&&R(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!0,activated:c,manifest:r}}async function q(e={}){v();let t=d(e.cdnOrigin),r=x(e.channel),n=await y(t),i=n.channels[r]?.latest;if(!i)return{checked:!0,updated:!1,reason:`channel '${r}' has no latest runtime`,activeVersion:f()};if(!n.versions[i])return{checked:!0,updated:!1,reason:`manifest is missing version ${i}`,activeVersion:f(),latestVersion:i};let a=f(),c=a?p(a):null,g=c?s.existsSync(l.join(c,"index.html")):!1;if(!(!a||!g||w(i,a)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:a,latestVersion:i};let h=await V({version:i,channel:r,cdnOrigin:t,setActive:!1});return{checked:!0,updated:!0,activeVersion:i,latestVersion:i,install:h}}async function B(e={}){let t=f();try{let r=await y(d(e.cdnOrigin)),n=x(e.channel),i=r.channels[n]?.latest??null,o=!!(i&&(!t||w(i,t)>0));return{active:t,latest:i,outdated:o}}catch{return{active:t,latest:null,outdated:!1}}}async function _(e,t){let r=await fetch(e);if(!r.ok||!r.body)throw new Error(`download failed: ${r.status} ${r.statusText} (${e})`);s.mkdirSync(l.dirname(t),{recursive:!0});let n=`${t}.partial`;try{await M(k.fromWeb(r.body),s.createWriteStream(n)),s.renameSync(n,t)}catch(i){try{s.unlinkSync(n)}catch{}throw i}}function j(e){return new Promise((t,r)=>{let n=C.createHash("sha256"),i=s.createReadStream(e);i.on("data",o=>n.update(o)),i.on("error",r),i.on("end",()=>t(n.digest("hex")))})}function A(e,t){return new Promise((r,n)=>{let i=I("tar",["-xzf",e,"-C",t],{stdio:["ignore","inherit","inherit"]});i.on("error",n),i.on("exit",o=>{o===0?r():n(new Error(`tar exited with code ${o}`))})})}export{N as a,D as b,E as c,d,x as e,T as f,P as g,y as h,U as i,V as j,q as k,B as l};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as k,c as T,e as C}from"./chunk-NSIRZK23.js";import{E as v,F as P}from"./chunk-WLIULEKU.js";import{WebSocket as I}from"ws";function $(){let e=v();return e&&P(e)?e.bridgePort:7668}var w=class extends Error{lock;constructor(t,i){super(t),this.name="BridgeSimLockedError",this.lock=i}};function F(e){return e==="flag"?"via --sim":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function R(e,t={}){let i=new Set,d=t.port??$(),a=t.commandTimeoutMs??15e3,r,g="none",p=new Set(t.stripBooleanFlags??[]),y=new Set(t.stripValueFlags??[]);for(let n=0;n<e.length;n++){let l=e[n];if(l==="--port"||l==="-p"){i.add(n),n+1<e.length&&(i.add(n+1),d=Number(e[n+1])),n++;continue}if(l.startsWith("--port=")){i.add(n),d=Number(l.slice(7));continue}if(l==="--timeout"){i.add(n),n+1<e.length&&(i.add(n+1),a=Number(e[n+1])),n++;continue}if(l==="--sim"){i.add(n),n+1<e.length&&(i.add(n+1),r=e[n+1]?.trim()||void 0,g="flag"),n++;continue}if(p.has(l)){i.add(n);continue}y.has(l)&&(i.add(n),n+1<e.length&&i.add(n+1),n++)}if(!r){let n=T();n&&(r=n.trim()||void 0,g="saved")}return{positional:e.filter((n,l)=>!i.has(l)),wsPort:d,simId:r,simIdSource:g,commandTimeoutMs:a}}function W(e,t={}){let i=1,d=t.commandTimeoutMs??15e3,a=new Map,r=new I(`ws://localhost:${e}`),g=t.simId?{key:`sim:${t.simId}`,source:"explicit-sim-id",stable:!0}:k(),p=new Promise((s,o)=>{r.on("open",()=>{try{r.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:g.key,cliIdentitySource:g.source,cliLabel:t.cliLabel}))}catch{}s()}),r.on("error",c=>{let m=c.message?`: ${c.message}`:"";o(new Error(`could not connect to ws://localhost:${e}${m}`))})}),y=!1,n=!1;function l(s,o){if(n||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||s.startsWith("bridge:")||s==="focus"||s==="close")return;n=!0;let c=o??"primary",m=F(o?t.simIdSource:"none");process.stderr.write(` \u2192 ${c} (${m})
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as k,c as T,e as C}from"./chunk-YXZHBYID.js";import{E as v,F as P}from"./chunk-ZGHJUI77.js";import{WebSocket as I}from"ws";function $(){let e=v();return e&&P(e)?e.bridgePort:7668}var w=class extends Error{lock;constructor(t,i){super(t),this.name="BridgeSimLockedError",this.lock=i}};function F(e){return e==="flag"?"via --sim":e==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function R(e,t={}){let i=new Set,d=t.port??$(),a=t.commandTimeoutMs??15e3,r,g="none",p=new Set(t.stripBooleanFlags??[]),y=new Set(t.stripValueFlags??[]);for(let n=0;n<e.length;n++){let l=e[n];if(l==="--port"||l==="-p"){i.add(n),n+1<e.length&&(i.add(n+1),d=Number(e[n+1])),n++;continue}if(l.startsWith("--port=")){i.add(n),d=Number(l.slice(7));continue}if(l==="--timeout"){i.add(n),n+1<e.length&&(i.add(n+1),a=Number(e[n+1])),n++;continue}if(l==="--sim"){i.add(n),n+1<e.length&&(i.add(n+1),r=e[n+1]?.trim()||void 0,g="flag"),n++;continue}if(p.has(l)){i.add(n);continue}y.has(l)&&(i.add(n),n+1<e.length&&i.add(n+1),n++)}if(!r){let n=T();n&&(r=n.trim()||void 0,g="saved")}return{positional:e.filter((n,l)=>!i.has(l)),wsPort:d,simId:r,simIdSource:g,commandTimeoutMs:a}}function W(e,t={}){let i=1,d=t.commandTimeoutMs??15e3,a=new Map,r=new I(`ws://localhost:${e}`),g=t.simId?{key:`sim:${t.simId}`,source:"explicit-sim-id",stable:!0}:k(),p=new Promise((s,o)=>{r.on("open",()=>{try{r.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:g.key,cliIdentitySource:g.source,cliLabel:t.cliLabel}))}catch{}s()}),r.on("error",c=>{let m=c.message?`: ${c.message}`:"";o(new Error(`could not connect to ws://localhost:${e}${m}`))})}),y=!1,n=!1;function l(s,o){if(n||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||s.startsWith("bridge:")||s==="focus"||s==="close")return;n=!0;let c=o??"primary",m=F(o?t.simIdSource:"none");process.stderr.write(` \u2192 ${c} (${m})
3
3
  `)}return r.on("message",s=>{let o;try{o=JSON.parse(s.toString())}catch{return}if(o.id===0)return;let c=a.get(o.id);c&&(a.delete(o.id),o.i>0&&!y&&(y=!0,process.stderr.write(`
4
4
  \u26A0 ${o.i} other CLI identity/identities are driving this sim
5
5
  taps, scrolls, and keyboard input from multiple agents will collide on
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import{existsSync as C,mkdirSync as D,readFileSync as O,rmSync as s,writeFileSync as g}from"fs";import{tmpdir as P}from"os";import{dirname as R,join as A,resolve as x}from"path";import{execFileSync as a}from"child_process";import{readFileSync as I}from"fs";import{createRequire as S}from"module";var o=null;function u(r){o||(o=_());try{return o(r)}catch{return null}}function _(){let r=Number(process.env.PPID);if(Number.isFinite(r)&&r>1&&r!==process.ppid)return()=>r;if(process.platform==="linux")return y();if(process.platform==="darwin"){let n=E();return n||T()}return()=>null}function y(){return r=>{try{let n=I(`/proc/${r}/stat`,"utf8"),t=n.lastIndexOf(")");if(t<0)return null;let i=n.slice(t+1).trim().split(/\s+/),e=Number(i[1]);return Number.isFinite(e)&&e>0?e:null}catch{return null}}}var N=3,d=216,b=16;function E(){if(!process.versions?.bun)return null;try{let r=S(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),i=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),e=Buffer.alloc(d);return m=>{if(Number(i.symbols.proc_pidinfo(m,N,0n,e,d))<=0)return null;let p=e.readUInt32LE(b);return p>0?p:null}}catch{return null}}function T(){return r=>{try{let t=a("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
3
3
  `)[1];if(!t)return null;let i=t.trim().split(/\s+/),e=Number(i[2]);return Number.isFinite(e)&&e>1?e:null}catch{return null}}}var c=1,f="SOOTSIM_CLI_CURRENT_SIM_PATH",v=["SOOTSIM_CLI_IDENTITY","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"];function F(r,n=20){let t=u(r);if(!t||t<=1)return null;for(let i=0;i<n;i++){let e=u(t);if(!e||e<=1)return t;t=e}return t}function k(){for(let n of v){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=F(process.ppid);return r&&r>1?{key:`gppid-${r}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function L(){return k().key}function l(){if(process.env[f])return x(process.env[f]);let r=L();return A(P(),`sootsim-current-sim-${r}.json`)}function h(){let r=l();if(!C(r))return null;try{let n=JSON.parse(O(r,"utf8"));return n.version!==c||typeof n.simId!="string"||!n.simId.trim()||typeof n.updatedAt!="string"?(s(r,{force:!0}),null):{version:c,simId:n.simId.trim(),updatedAt:n.updatedAt}}catch{return s(r,{force:!0}),null}}function J(){return h()?.simId||null}function j(r){let n=r.trim();if(!n)return;let t=l();D(R(t),{recursive:!0}),g(t,JSON.stringify({version:c,simId:n,updatedAt:new Date().toISOString()},null,2)+`
4
4
  `)}function K(){s(l(),{force:!0})}export{k as a,L as b,J as c,j as d,K as e};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import r from"node:fs";import{homedir as O}from"node:os";import n from"node:path";var L="SOOTSIM_HOME",E="active",A="daemon.json",j="config.json",I=3e4;function c(){let e=process.env[L];return e&&e.length>0?n.resolve(e):n.join(O(),".sootsim")}function K(){if(process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1")return!1;let e=process.env.SOOTSIM_DEV;if(e==="1"||e==="true")return!0;if(e==="0"||e==="false")return!1;let t=process.argv[1];if(!t)return!1;try{return r.realpathSync(t).includes(`${n.sep}packages${n.sep}sootsim${n.sep}`)}catch{return!1}}function f(){return n.join(c(),"runtimes")}function _(e){return n.join(f(),e)}function D(){return n.join(f(),E)}function S(){return n.join(c(),"electron")}function U(){return n.join(S(),"userData")}function Y(e){return n.join(S(),e)}function N(){return n.join(c(),"profiles")}function F(){return n.join(c(),"daemon-app")}function T(){return n.join(F(),"SootSim Daemon.app")}function G(){return n.join(T(),"Contents","MacOS","sootsim-daemon")}function C(){return n.join(c(),"cache")}function p(){return n.join(c(),A)}function d(){return n.join(c(),j)}function v(){try{let e=r.readFileSync(d(),"utf8"),t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function M(e){y();let t=v(),s={...t,...e};e.settings&&typeof e.settings=="object"&&(s.settings={...t.settings&&typeof t.settings=="object"?t.settings:{},...e.settings});let u=`${d()}.tmp`;return r.writeFileSync(u,`${JSON.stringify(s,null,2)}
3
3
  `,"utf8"),r.renameSync(u,d()),s}function X(){return v().telemetry!==!1}function q(e){M({telemetry:e})}function y(){r.mkdirSync(c(),{recursive:!0}),r.mkdirSync(f(),{recursive:!0}),r.mkdirSync(S(),{recursive:!0}),r.mkdirSync(N(),{recursive:!0}),r.mkdirSync(C(),{recursive:!0})}function w(){try{let e=r.readFileSync(D(),"utf8").trim();return e.length>0?e:null}catch{return null}}function z(e){r.mkdirSync(f(),{recursive:!0}),r.writeFileSync(D(),`${e}
4
4
  `,"utf8")}function Q(){try{return r.readdirSync(f(),{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name).sort(P)}catch{return[]}}function P(e,t){let s=i=>{let a=i.indexOf("-"),l=a>=0?i.slice(0,a):i,k=a>=0?i.slice(a+1):"",b=l.split(".").map(g=>Number.parseInt(g,10));return b.some(g=>!Number.isFinite(g))?[[Number.POSITIVE_INFINITY],i]:[b,k]},[u,o]=s(e),[x,m]=s(t);for(let i=0;i<Math.max(u.length,x.length);i++){let a=u[i]??0,l=x[i]??0;if(a!==l)return a-l}return o===m?0:o?m?o<m?-1:1:-1:1}function W(){let e=w();if(!e)return null;let t=_(e);try{if(r.statSync(t).isDirectory())return t}catch{}return null}var h=16*1024;function R(){try{let e=r.openSync(p(),"r");try{let t=Buffer.alloc(h),s=r.readSync(e,t,0,h,0),u=t.subarray(0,s).toString("utf8"),o=JSON.parse(u);return o&&o.schema===1&&typeof o.pid=="number"&&typeof o.bridgePort=="number"&&typeof o.runtimePort=="number"&&typeof o.startedAt=="number"&&typeof o.heartbeatAt=="number"?o:null}finally{r.closeSync(e)}}catch{return null}}function $(e,t=Date.now()){if(!e||t-e.heartbeatAt>I)return!1;try{return process.kill(e.pid,0),!0}catch{return!1}}function H(e){y();let t=`${p()}.tmp`;r.writeFileSync(t,`${JSON.stringify(e,null,2)}
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-K2KVNO7W.js";import"./chunk-P3WJGZTF.js";export{a as getCliVersion};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-DKLJW2OR.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.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-P3WJGZTF.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-VDMYU64X.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-VDMYU64X.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-CDNAUTDO.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-CDNAUTDO.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,5 +1,5 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-DKLJW2OR.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-P3WJGZTF.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
3
3
  sootsim config \u2014 manage sootsim configuration
4
4
 
5
5
  usage:
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.71 | (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}from"./chunk-MJKQF66L.js";import"./chunk-BD27IPME.js";import"./chunk-QPDNOKOQ.js";import"./chunk-TWEXRPDX.js";import"./chunk-PBJMKMHA.js";import"./chunk-6ZYPXH2U.js";import"./chunk-IECVOMEO.js";import"./chunk-FOKAHB3A.js";import"./chunk-BO7P4UI5.js";import"./chunk-LKY27UVD.js";import"./chunk-H2TZ2MMV.js";import"./chunk-FX6YMDSO.js";import"./chunk-NSIRZK23.js";import"./chunk-5IYMNFPA.js";import"./chunk-WLIULEKU.js";import"./chunk-DKLJW2OR.js";export{d as buildOpenUrl,c as buildShellUrl,p as closeSimsBulk,q as planBulkCloseTargets,h as playwrightHostPidForSim,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,o as runClaimCommand,r as runCloseCommand,n as runFocusCommand,k as runListCommand,l as runOpenCommand,m as runUseCommand,i as signalDriverLaunchConnected,e as summarizeSimUrl,j as terminatePlaywrightHostsForSims,g as waitForSimMatch};
1
+ /*! sootsim v0.1.73 | (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}from"./chunk-UJUJJDJH.js";import"./chunk-QDYFRHQK.js";import"./chunk-G6Y6PFGR.js";import"./chunk-UASODA4K.js";import"./chunk-HKLWUXFK.js";import"./chunk-SL4MHVAB.js";import"./chunk-34TWXW7Z.js";import"./chunk-OAATHYER.js";import"./chunk-LAZ7FFOW.js";import"./chunk-6EMLKJ4H.js";import"./chunk-H532JOZV.js";import"./chunk-YVKR7SWO.js";import"./chunk-YXZHBYID.js";import"./chunk-FWROUGUO.js";import"./chunk-ZGHJUI77.js";import"./chunk-P3WJGZTF.js";export{d as buildOpenUrl,c as buildShellUrl,p as closeSimsBulk,q as planBulkCloseTargets,h as playwrightHostPidForSim,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,o as runClaimCommand,r as runCloseCommand,n as runFocusCommand,k as runListCommand,l as runOpenCommand,m as runUseCommand,i as signalDriverLaunchConnected,e as summarizeSimUrl,j as terminatePlaywrightHostsForSims,g as waitForSimMatch};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as I,e as N,i as S}from"./chunk-FX6YMDSO.js";import"./chunk-NSIRZK23.js";import"./chunk-5IYMNFPA.js";import"./chunk-WLIULEKU.js";import"./chunk-DKLJW2OR.js";import{createWriteStream as k,mkdirSync as v,writeFileSync as C}from"fs";import{dirname as T,resolve as w}from"path";import{Readable as F}from"stream";import{pipeline as y}from"stream/promises";import{createGzip as x}from"zlib";async function U(o,m){let n=Number(b(o,"--duration")??"5");if(!Number.isFinite(n)||n<=0)return console.error(" --duration must be a positive number (seconds)"),1;let a=Number(b(o,"--sample-interval")??"10");if(!Number.isFinite(a)||a<=0)return console.error(" --sample-interval must be a positive number (milliseconds)"),1;let t=Number(b(o,"--max-buffer")??"100000");if(!Number.isFinite(t)||t<=0)return console.error(" --max-buffer must be a positive number"),1;let p=b(o,"--output")??b(o,"-o"),l=w(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=l.endsWith(".gz"),h=I(o,{port:m.port,stripValueFlags:["--duration","--output","-o","--sample-interval","--max-buffer"]}),c=N({...h,commandTimeoutMs:Math.max(3e4,(n+20)*1e3)});try{let u=await S(c,"SootSim.bridges.workerCpuProfileStart",{sampleInterval:a,maxBufferSize:t});if(!u?.started)return u?.error?.includes("cpu-profile-unsupported")?(console.error(" cpu-profile is currently unsupported."),console.error(" the JS Self-Profiler API cannot profile a dedicated worker, and"),console.error(" sootsim runs the guest app in the tenant worker. a CDP-based"),console.error(" profiler is required \u2014 tracked as the F28 follow-up.")):(console.error(" could not start tenant-worker profiler."),console.error(" is sootsim running? (try `sootsim list`)")),1;m.verbose&&console.error(` started: sampleInterval=${u.sampleInterval}ms buffer=${u.maxBufferSize}`),console.log(` recording for ${n}s\u2026`),await new Promise(r=>setTimeout(r,n*1e3));let s=await S(c,"SootSim.bridges.workerCpuProfileStop");if(!s||s.error||!s.trace)return console.error(` profile capture failed: ${s?.error??"no trace returned"}`),1;let P=B(s.trace),e=JSON.stringify(P);v(T(l),{recursive:!0}),g?await y(F.from([e]),x(),k(l)):C(l,e);let i=(Buffer.byteLength(e)/1024/1024).toFixed(2);return console.log(` samples: ${P.samples.length} (${i} MB uncompressed)`),console.log(` saved: ${l}`),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}catch(u){let s=u?.message??String(u);return console.error(` profile failed: ${s}`),/could not connect|ECONNREFUSED/i.test(s)&&console.error(" is sootsim running? (try `sootsim list`)"),1}finally{c.close()}}function B(o){let m=o.frames??[],n=o.resources??[],a=o.stacks??[],t=o.samples??[],p=1,l=[{id:p,callFrame:{functionName:"(root)",scriptId:"0",url:"",lineNumber:-1,columnNumber:-1},hitCount:0,children:[]}];for(let e=0;e<a.length;e++){let i=a[e],r=m[i.frameId]??{name:"(unknown)"},f=r.resource!==void 0?n[r.resource]??"":"";l.push({id:e+2,callFrame:{functionName:r.name||"(anonymous)",scriptId:r.resource!==void 0?String(r.resource):"0",url:f,lineNumber:typeof r.line=="number"?r.line-1:-1,columnNumber:typeof r.column=="number"?r.column-1:-1},hitCount:0,children:[]})}for(let e=0;e<a.length;e++){let i=a[e],r=e+2,f=i.parentId!==void 0?i.parentId+2:p,d=l[f-1];d&&!d.children.includes(r)&&d.children.push(r)}let g=[],h=[],c=t.length>0?t[0].timestamp:0,u=c;for(let e=0;e<t.length;e++){let i=t[e],r=i.stackId!==void 0?i.stackId+2:p;g.push(r);let f=l[r-1];f&&f.hitCount++;let d=e===0?0:i.timestamp-u;h.push(Math.max(0,Math.round(d*1e3))),u=i.timestamp}let s=Math.round(c*1e3),P=t.length>0?Math.round(t[t.length-1].timestamp*1e3):s;return{nodes:l,startTime:s,endTime:P,samples:g,timeDeltas:h}}function b(o,m){let n=o.indexOf(m);if(!(n<0||n===o.length-1))return o[n+1]}export{U as runCpuProfile};
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as I,e as N,i as S}from"./chunk-YVKR7SWO.js";import"./chunk-YXZHBYID.js";import"./chunk-FWROUGUO.js";import"./chunk-ZGHJUI77.js";import"./chunk-P3WJGZTF.js";import{createWriteStream as k,mkdirSync as v,writeFileSync as C}from"fs";import{dirname as T,resolve as w}from"path";import{Readable as F}from"stream";import{pipeline as y}from"stream/promises";import{createGzip as x}from"zlib";async function U(o,m){let n=Number(b(o,"--duration")??"5");if(!Number.isFinite(n)||n<=0)return console.error(" --duration must be a positive number (seconds)"),1;let a=Number(b(o,"--sample-interval")??"10");if(!Number.isFinite(a)||a<=0)return console.error(" --sample-interval must be a positive number (milliseconds)"),1;let t=Number(b(o,"--max-buffer")??"100000");if(!Number.isFinite(t)||t<=0)return console.error(" --max-buffer must be a positive number"),1;let p=b(o,"--output")??b(o,"-o"),l=w(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=l.endsWith(".gz"),h=I(o,{port:m.port,stripValueFlags:["--duration","--output","-o","--sample-interval","--max-buffer"]}),c=N({...h,commandTimeoutMs:Math.max(3e4,(n+20)*1e3)});try{let u=await S(c,"SootSim.bridges.workerCpuProfileStart",{sampleInterval:a,maxBufferSize:t});if(!u?.started)return u?.error?.includes("cpu-profile-unsupported")?(console.error(" cpu-profile is currently unsupported."),console.error(" the JS Self-Profiler API cannot profile a dedicated worker, and"),console.error(" sootsim runs the guest app in the tenant worker. a CDP-based"),console.error(" profiler is required \u2014 tracked as the F28 follow-up.")):(console.error(" could not start tenant-worker profiler."),console.error(" is sootsim running? (try `sootsim list`)")),1;m.verbose&&console.error(` started: sampleInterval=${u.sampleInterval}ms buffer=${u.maxBufferSize}`),console.log(` recording for ${n}s\u2026`),await new Promise(r=>setTimeout(r,n*1e3));let s=await S(c,"SootSim.bridges.workerCpuProfileStop");if(!s||s.error||!s.trace)return console.error(` profile capture failed: ${s?.error??"no trace returned"}`),1;let P=B(s.trace),e=JSON.stringify(P);v(T(l),{recursive:!0}),g?await y(F.from([e]),x(),k(l)):C(l,e);let i=(Buffer.byteLength(e)/1024/1024).toFixed(2);return console.log(` samples: ${P.samples.length} (${i} MB uncompressed)`),console.log(` saved: ${l}`),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}catch(u){let s=u?.message??String(u);return console.error(` profile failed: ${s}`),/could not connect|ECONNREFUSED/i.test(s)&&console.error(" is sootsim running? (try `sootsim list`)"),1}finally{c.close()}}function B(o){let m=o.frames??[],n=o.resources??[],a=o.stacks??[],t=o.samples??[],p=1,l=[{id:p,callFrame:{functionName:"(root)",scriptId:"0",url:"",lineNumber:-1,columnNumber:-1},hitCount:0,children:[]}];for(let e=0;e<a.length;e++){let i=a[e],r=m[i.frameId]??{name:"(unknown)"},f=r.resource!==void 0?n[r.resource]??"":"";l.push({id:e+2,callFrame:{functionName:r.name||"(anonymous)",scriptId:r.resource!==void 0?String(r.resource):"0",url:f,lineNumber:typeof r.line=="number"?r.line-1:-1,columnNumber:typeof r.column=="number"?r.column-1:-1},hitCount:0,children:[]})}for(let e=0;e<a.length;e++){let i=a[e],r=e+2,f=i.parentId!==void 0?i.parentId+2:p,d=l[f-1];d&&!d.children.includes(r)&&d.children.push(r)}let g=[],h=[],c=t.length>0?t[0].timestamp:0,u=c;for(let e=0;e<t.length;e++){let i=t[e],r=i.stackId!==void 0?i.stackId+2:p;g.push(r);let f=l[r-1];f&&f.hitCount++;let d=e===0?0:i.timestamp-u;h.push(Math.max(0,Math.round(d*1e3))),u=i.timestamp}let s=Math.round(c*1e3),P=t.length>0?Math.round(t[t.length-1].timestamp*1e3):s;return{nodes:l,startTime:s,endTime:P,samples:g,timeDeltas:h}}function b(o,m){let n=o.indexOf(m);if(!(n<0||n===o.length-1))return o[n+1]}export{U as runCpuProfile};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as T}from"./chunk-AQP5ZW4H.js";import"./chunk-6I2WY5TM.js";import"./chunk-B5SVMCRO.js";import"./chunk-H2TZ2MMV.js";import"./chunk-TG4HB6ZV.js";import"./chunk-KIJZX37F.js";import{a as _,b as N}from"./chunk-27DZP6PJ.js";import"./chunk-WJM27KX4.js";import"./chunk-VV3I72HQ.js";import"./chunk-5IYMNFPA.js";import{g as I,o as C,p as w,q as B}from"./chunk-WLIULEKU.js";import{a as W}from"./chunk-DKLJW2OR.js";import{execFileSync as et,spawnSync as s}from"child_process";import{existsSync as a,mkdirSync as v,readFileSync as rt,rmSync as S,writeFileSync as U}from"fs";import{homedir as $}from"os";import{dirname as M,resolve as p}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as K,mkdirSync as D,rmSync as X,writeFileSync as P}from"fs";import{dirname as L}from"path";var Q="dev.sootsim.daemon",O="SootSim Daemon",F="0.1.36";function R(t,e,r){let o=w(),n=B(),i=L(L(n)),f=L(n),u=`${i}/Resources`;X(o,{recursive:!0,force:!0}),D(C(),{recursive:!0}),D(f,{recursive:!0}),D(u,{recursive:!0}),P(`${i}/Info.plist`,z()),P(`${i}/PkgInfo`,"APPL????"),P(n,J(t,e,r)),K(n,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(c){let g=c instanceof Error?c.message:String(c);console.warn(` warning: ad-hoc codesign of ${o} failed: ${g}
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as T}from"./chunk-LVLOAXDS.js";import"./chunk-FVQOPALM.js";import"./chunk-IZ3CWZNF.js";import"./chunk-H532JOZV.js";import"./chunk-SPWIBWDN.js";import"./chunk-K2KVNO7W.js";import{a as _,b as N}from"./chunk-ODLY2N63.js";import"./chunk-GYXN4445.js";import"./chunk-RA3I4BJI.js";import"./chunk-FWROUGUO.js";import{g as I,o as C,p as w,q as B}from"./chunk-ZGHJUI77.js";import{a as W}from"./chunk-P3WJGZTF.js";import{execFileSync as et,spawnSync as s}from"child_process";import{existsSync as a,mkdirSync as v,readFileSync as rt,rmSync as S,writeFileSync as U}from"fs";import{homedir as $}from"os";import{dirname as M,resolve as p}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as K,mkdirSync as D,rmSync as X,writeFileSync as P}from"fs";import{dirname as L}from"path";var Q="dev.sootsim.daemon",O="SootSim Daemon",F="0.1.36";function R(t,e,r){let o=w(),n=B(),i=L(L(n)),f=L(n),u=`${i}/Resources`;X(o,{recursive:!0,force:!0}),D(C(),{recursive:!0}),D(f,{recursive:!0}),D(u,{recursive:!0}),P(`${i}/Info.plist`,z()),P(`${i}/PkgInfo`,"APPL????"),P(n,J(t,e,r)),K(n,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(c){let g=c instanceof Error?c.message:String(c);console.warn(` warning: ad-hoc codesign of ${o} failed: ${g}
3
3
  the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:n}}function z(){return`<?xml version="1.0" encoding="UTF-8"?>
4
4
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
5
5
  <plist version="1.0">
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{e as f,l as T}from"./chunk-QPDNOKOQ.js";import{F as A,G as D,H as O,I as x,J as v}from"./chunk-TWEXRPDX.js";import{c as S,e as $,g as N}from"./chunk-FX6YMDSO.js";import"./chunk-NSIRZK23.js";import"./chunk-5IYMNFPA.js";import"./chunk-WLIULEKU.js";import"./chunk-DKLJW2OR.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{e as f,l as T}from"./chunk-G6Y6PFGR.js";import{F as A,G as D,H as O,I as x,J as v}from"./chunk-UASODA4K.js";import{c as S,e as $,g as N}from"./chunk-YVKR7SWO.js";import"./chunk-YXZHBYID.js";import"./chunk-FWROUGUO.js";import"./chunk-ZGHJUI77.js";import"./chunk-P3WJGZTF.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 N(i,l)}async function Y(i,l){let g=S(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-VWXPNEFA.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(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 N(i,l)}async function Y(i,l){let g=S(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-XVHQ25HJ.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(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 A(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 D(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;
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a}from"./chunk-HKLWUXFK.js";import"./chunk-P3WJGZTF.js";export{a as APPS};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as S}from"./chunk-AY5MYLKY.js";import"./chunk-TULLGRT4.js";import"./chunk-DXEQJFI5.js";import"./chunk-LESUHJDU.js";import"./chunk-W53GXBRM.js";import"./chunk-DB7I5NCL.js";import"./chunk-CWX5R725.js";import"./chunk-MJKQF66L.js";import"./chunk-BD27IPME.js";import"./chunk-QPDNOKOQ.js";import"./chunk-TWEXRPDX.js";import"./chunk-PBJMKMHA.js";import"./chunk-6ZYPXH2U.js";import"./chunk-IECVOMEO.js";import"./chunk-FOKAHB3A.js";import"./chunk-BO7P4UI5.js";import"./chunk-LKY27UVD.js";import"./chunk-6I2WY5TM.js";import"./chunk-H2TZ2MMV.js";import"./chunk-27DZP6PJ.js";import"./chunk-WJM27KX4.js";import"./chunk-ZGMFZOGJ.js";import"./chunk-VV3I72HQ.js";import"./chunk-FX6YMDSO.js";import"./chunk-NSIRZK23.js";import"./chunk-5IYMNFPA.js";import"./chunk-WLIULEKU.js";import"./chunk-DKLJW2OR.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.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as S}from"./chunk-WCM7INZL.js";import"./chunk-2WOD3LBI.js";import"./chunk-OYRL6RAD.js";import"./chunk-6K2OMU5N.js";import"./chunk-7LR7PVW4.js";import"./chunk-5OJK5LYU.js";import"./chunk-JJQQMLVH.js";import"./chunk-UJUJJDJH.js";import"./chunk-QDYFRHQK.js";import"./chunk-G6Y6PFGR.js";import"./chunk-UASODA4K.js";import"./chunk-HKLWUXFK.js";import"./chunk-SL4MHVAB.js";import"./chunk-34TWXW7Z.js";import"./chunk-OAATHYER.js";import"./chunk-LAZ7FFOW.js";import"./chunk-6EMLKJ4H.js";import"./chunk-FVQOPALM.js";import"./chunk-H532JOZV.js";import"./chunk-ODLY2N63.js";import"./chunk-GYXN4445.js";import"./chunk-GOU7IGMA.js";import"./chunk-RA3I4BJI.js";import"./chunk-YVKR7SWO.js";import"./chunk-YXZHBYID.js";import"./chunk-FWROUGUO.js";import"./chunk-ZGHJUI77.js";import"./chunk-P3WJGZTF.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.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-DXEQJFI5.js";import"./chunk-6I2WY5TM.js";import"./chunk-ZGMFZOGJ.js";import{f as c,g as r,h as g}from"./chunk-VV3I72HQ.js";import{c as d,e as l,h as a}from"./chunk-FX6YMDSO.js";import"./chunk-NSIRZK23.js";import"./chunk-5IYMNFPA.js";import"./chunk-WLIULEKU.js";import"./chunk-DKLJW2OR.js";function h(){console.log(`
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-OYRL6RAD.js";import"./chunk-FVQOPALM.js";import"./chunk-GOU7IGMA.js";import{f as c,g as r,h as g}from"./chunk-RA3I4BJI.js";import{c as d,e as l,h as a}from"./chunk-YVKR7SWO.js";import"./chunk-YXZHBYID.js";import"./chunk-FWROUGUO.js";import"./chunk-ZGHJUI77.js";import"./chunk-P3WJGZTF.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.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as E,e as R,h as b}from"./chunk-FX6YMDSO.js";import{b as v}from"./chunk-NSIRZK23.js";import"./chunk-5IYMNFPA.js";import"./chunk-WLIULEKU.js";import"./chunk-DKLJW2OR.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.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as E,e as R,h as b}from"./chunk-YVKR7SWO.js";import{b as v}from"./chunk-YXZHBYID.js";import"./chunk-FWROUGUO.js";import"./chunk-ZGHJUI77.js";import"./chunk-P3WJGZTF.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.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-5CPW2643.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-SL4MHVAB.js";import"./chunk-34TWXW7Z.js";import"./chunk-OAATHYER.js";import"./chunk-LAZ7FFOW.js";import"./chunk-6EMLKJ4H.js";import"./chunk-ZGHJUI77.js";import"./chunk-P3WJGZTF.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.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as g}from"./chunk-LKTFFX2V.js";import"./chunk-EIPHWUB2.js";import{a as v,f as h}from"./chunk-MJKQF66L.js";import"./chunk-BD27IPME.js";import"./chunk-QPDNOKOQ.js";import"./chunk-TWEXRPDX.js";import"./chunk-PBJMKMHA.js";import{b as f,g as u}from"./chunk-6ZYPXH2U.js";import{a as p}from"./chunk-IECVOMEO.js";import"./chunk-FOKAHB3A.js";import{c as m}from"./chunk-BO7P4UI5.js";import"./chunk-LKY27UVD.js";import"./chunk-H2TZ2MMV.js";import"./chunk-FX6YMDSO.js";import"./chunk-NSIRZK23.js";import"./chunk-5IYMNFPA.js";import"./chunk-WLIULEKU.js";import"./chunk-DKLJW2OR.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.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as g}from"./chunk-VB7Z7JWH.js";import"./chunk-5CPW2643.js";import{a as v,f as h}from"./chunk-UJUJJDJH.js";import"./chunk-QDYFRHQK.js";import"./chunk-G6Y6PFGR.js";import"./chunk-UASODA4K.js";import"./chunk-HKLWUXFK.js";import{b as f,g as u}from"./chunk-SL4MHVAB.js";import{a as p}from"./chunk-34TWXW7Z.js";import"./chunk-OAATHYER.js";import{c as m}from"./chunk-LAZ7FFOW.js";import"./chunk-6EMLKJ4H.js";import"./chunk-H532JOZV.js";import"./chunk-YVKR7SWO.js";import"./chunk-YXZHBYID.js";import"./chunk-FWROUGUO.js";import"./chunk-ZGHJUI77.js";import"./chunk-P3WJGZTF.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-F37TK4ZW.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-2LYXUCKU.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.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as c,b as d,c as e,d as f}from"./chunk-WCM7INZL.js";import"./chunk-2WOD3LBI.js";import"./chunk-OYRL6RAD.js";import"./chunk-6K2OMU5N.js";import"./chunk-7LR7PVW4.js";import"./chunk-5OJK5LYU.js";import{d as a,e as b}from"./chunk-JJQQMLVH.js";import"./chunk-UJUJJDJH.js";import"./chunk-QDYFRHQK.js";import"./chunk-G6Y6PFGR.js";import"./chunk-UASODA4K.js";import"./chunk-HKLWUXFK.js";import"./chunk-SL4MHVAB.js";import"./chunk-34TWXW7Z.js";import"./chunk-OAATHYER.js";import"./chunk-LAZ7FFOW.js";import"./chunk-6EMLKJ4H.js";import"./chunk-FVQOPALM.js";import"./chunk-H532JOZV.js";import"./chunk-ODLY2N63.js";import"./chunk-GYXN4445.js";import"./chunk-GOU7IGMA.js";import"./chunk-RA3I4BJI.js";import"./chunk-YVKR7SWO.js";import"./chunk-YXZHBYID.js";import"./chunk-FWROUGUO.js";import"./chunk-ZGHJUI77.js";import"./chunk-P3WJGZTF.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as n,c as r,d as l}from"./chunk-YXGX6RCI.js";import"./chunk-NSIRZK23.js";import"./chunk-DKLJW2OR.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.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as n,c as r,d as l}from"./chunk-RRPKIYG7.js";import"./chunk-YXZHBYID.js";import"./chunk-P3WJGZTF.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.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A,B,C,D,E,F,G,H,I,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-WLIULEKU.js";import"./chunk-DKLJW2OR.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A,B,C,D,E,F,G,H,I,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-ZGHJUI77.js";import"./chunk-P3WJGZTF.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as Q}from"./chunk-YXGX6RCI.js";import{a as pt,b as ft}from"./chunk-UH5QGW67.js";import{a as He,h as ye,k as ee}from"./chunk-CWX5R725.js";import{b as gt,c as yt,i as ht}from"./chunk-MJKQF66L.js";import"./chunk-BD27IPME.js";import{a as Z,b as j,c as J,d as ne,e as V,f as ge,g as de,h as dt,i as ut,j as _e,k as mt}from"./chunk-QPDNOKOQ.js";import{B as at,D as le,E as lt,K as ct,a as fe,b as Ue,c as Ke,d as ze,e as Ye,f as Ge,g as Xe,h as Me,i as Ie,n as Ne,o as Ve,p as Qe,q as Ze,r as et,s as tt,t as ot,u as st,v as nt,w as rt,x as it}from"./chunk-TWEXRPDX.js";import"./chunk-PBJMKMHA.js";import"./chunk-6ZYPXH2U.js";import"./chunk-IECVOMEO.js";import"./chunk-FOKAHB3A.js";import"./chunk-BO7P4UI5.js";import"./chunk-LKY27UVD.js";import{a as Be}from"./chunk-2DZFAJRG.js";import{a as Se,c as ke}from"./chunk-B5SVMCRO.js";import{a as De}from"./chunk-H2TZ2MMV.js";import{c as Je,e as Le,f as qe,g as We,h as Te}from"./chunk-FX6YMDSO.js";import{b as je}from"./chunk-NSIRZK23.js";import"./chunk-5IYMNFPA.js";import"./chunk-WLIULEKU.js";import"./chunk-DKLJW2OR.js";import{existsSync as eo,mkdirSync as to,readFileSync as oo,rmSync as bt,writeFileSync as so}from"fs";import{tmpdir as no}from"os";import{dirname as ro,join as io,resolve as ao}from"path";var ue=1,lo="SOOTSIM_INSPECT_NOTICE_PATH",co=300*1e3,uo=15e3;function wt(){return ao(process.env[lo]||io(no(),"sootsim-inspect-notice-state.json"))}function mo(o,c){return Object.fromEntries(Object.entries(o).filter(([,i])=>typeof i?.signature=="string"&&Number.isFinite(i?.updatedAt)&&c-i.updatedAt<=co))}function po(o){let c=wt();if(!eo(c))return{version:ue,entries:{}};try{let i=JSON.parse(oo(c,"utf8"));return i.version!==ue||!i.entries||typeof i.entries!="object"?(bt(c,{force:!0}),{version:ue,entries:{}}):{version:ue,entries:mo(i.entries,o)}}catch{return bt(c,{force:!0}),{version:ue,entries:{}}}}function fo(o){let c=wt();to(ro(c),{recursive:!0}),so(c,JSON.stringify(o,null,2)+`
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as Q}from"./chunk-RRPKIYG7.js";import{a as pt,b as ft}from"./chunk-HPJIWPPC.js";import{a as He,h as ye,k as ee}from"./chunk-JJQQMLVH.js";import{b as gt,c as yt,i as ht}from"./chunk-UJUJJDJH.js";import"./chunk-QDYFRHQK.js";import{a as Z,b as j,c as J,d as ne,e as V,f as ge,g as de,h as dt,i as ut,j as _e,k as mt}from"./chunk-G6Y6PFGR.js";import{B as at,D as le,E as lt,K as ct,a as fe,b as Ue,c as Ke,d as ze,e as Ye,f as Ge,g as Xe,h as Me,i as Ie,n as Ne,o as Ve,p as Qe,q as Ze,r as et,s as tt,t as ot,u as st,v as nt,w as rt,x as it}from"./chunk-UASODA4K.js";import"./chunk-HKLWUXFK.js";import"./chunk-SL4MHVAB.js";import"./chunk-34TWXW7Z.js";import"./chunk-OAATHYER.js";import"./chunk-LAZ7FFOW.js";import"./chunk-6EMLKJ4H.js";import{a as Be}from"./chunk-6SLYUGPA.js";import{a as Se,c as ke}from"./chunk-IZ3CWZNF.js";import{a as De}from"./chunk-H532JOZV.js";import{c as Je,e as Le,f as qe,g as We,h as Te}from"./chunk-YVKR7SWO.js";import{b as je}from"./chunk-YXZHBYID.js";import"./chunk-FWROUGUO.js";import"./chunk-ZGHJUI77.js";import"./chunk-P3WJGZTF.js";import{existsSync as eo,mkdirSync as to,readFileSync as oo,rmSync as bt,writeFileSync as so}from"fs";import{tmpdir as no}from"os";import{dirname as ro,join as io,resolve as ao}from"path";var ue=1,lo="SOOTSIM_INSPECT_NOTICE_PATH",co=300*1e3,uo=15e3;function wt(){return ao(process.env[lo]||io(no(),"sootsim-inspect-notice-state.json"))}function mo(o,c){return Object.fromEntries(Object.entries(o).filter(([,i])=>typeof i?.signature=="string"&&Number.isFinite(i?.updatedAt)&&c-i.updatedAt<=co))}function po(o){let c=wt();if(!eo(c))return{version:ue,entries:{}};try{let i=JSON.parse(oo(c,"utf8"));return i.version!==ue||!i.entries||typeof i.entries!="object"?(bt(c,{force:!0}),{version:ue,entries:{}}):{version:ue,entries:mo(i.entries,o)}}catch{return bt(c,{force:!0}),{version:ue,entries:{}}}}function fo(o){let c=wt();to(ro(c),{recursive:!0}),so(c,JSON.stringify(o,null,2)+`
3
3
  `)}function go(o,c){let i=c.trim()||"default";return`${o}:${i}`}function Fe(o,c,i,l={}){let f=l.nowMs??Date.now(),a=l.cooldownMs??uo,g=po(f),h=go(o,c),M=g.entries[h];return M&&M.signature===i&&f-M.updatedAt<a?!1:(g.entries[h]={signature:i,updatedAt:f},fo(g),!0)}async function xt(o,c={args:[]}){let i=await Ue(o);if(j(c.args)){J(i);return}console.log(` nodes: ${i.nodes}`)}function Ae(o,c){let i=o.indexOf(c);return i>=0&&i+1<o.length?o[i+1]:null}async function $t(o){let{bridge:c,args:i,positional:l}=o,f=i.includes("--verbose")||i.includes("-v"),a=j(i),g=f&&!a,h=i.includes("--watch")||i.includes("-w"),M=1e3,k=i.includes("--compact"),w=i.includes("--no-xy"),S=i.includes("--no-clipped"),I=Ae(i,"--testid-like"),N=Ae(i,"--only"),O=Ae(i,"--subtree"),D=l[1],u=D?/[*?]/.test(D):!1,H=!u&&!N?D:void 0,B=N??(u?D:void 0),C=async()=>{await ge(c,{verbose:g});let Y=await Ye(c,{describe:!0,verbose:f,filter:H||"",testIdLike:I||void 0,onlyGlob:B||void 0,subtreeRoot:O||void 0,compact:k,hideXy:w}),$=Y?.tree,T=Y?.shell,q=Y?.keyboard;if(a){J({shell:T,tree:$??"",keyboard:q});return}if(T&&typeof T=="object"){let E=[T.state?`state=${T.state}`:null,T.activeApp?`app=${T.activeApp}`:null,T.showSwitcher?"switcher":null,T.switcherPhase&&T.switcherPhase!=="idle"?`phase=${T.switcherPhase}`:null].filter(Boolean);E.length>0&&console.log(` shell: ${E.join(" ")}`)}if(typeof $=="string"&&$.startsWith("__SUBTREE_NOT_FOUND__:")){let E=$.slice(22);console.log(` subtree root not found: ${E}`),Q("subtree-root-not-found",E);return}if(!$){let E=Y?.nodeCount??0;console.log(" no matching nodes found"),!(H||I||B||O)&&E<10&&Q("app-still-loading",E);return}let z=$,G=0;if(S&&typeof z=="string"){let E=z.split(`
4
4
  `),se=[];for(let pe of E){if(pe.includes("(clipped:")){G+=1;continue}se.push(pe)}z=se.join(`
5
5
  `)}console.log(z),G>0&&console.log(` ${G} clipped row(s) hidden (omit --no-clipped to see)`);let re=H||I||B||O;if((H||I||B)&&!h&&Q("describe-filter-context"),!re&&!h&&$.split(`
@@ -8,7 +8,7 @@ import{a as Q}from"./chunk-YXGX6RCI.js";import{a as pt,b as ft}from"./chunk-UH5Q
8
8
  `);;)console.clear(),await C(),await Z(M);else await C()}var yo=["SOOTSIM_AGENT","CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","CURSOR_TRACE_ID","AIDER_MODEL"];function he(){if(process.env.SOOTSIM_AGENT==="0")return!1;for(let o of yo){let c=process.env[o];if(c&&c.trim()&&c!=="0")return!0}return!1}async function vt(o){let{bridge:c,args:i,effectiveArgs:l,positional:f,inspectUsage:a}=o,g=$=>{let T=l.indexOf($);return T>=0&&T+1<l.length?l[T+1]:null},h=$=>l.includes($),M=g("--testid")||g("--test-id"),k=g("--role"),w=g("--type"),S=g("--text"),I=h("--pressable"),N=h("--visible"),O=h("--interactive-targets")||h("--actions"),D=!M&&!k&&!w&&!S&&!I&&!N&&!O?f[1]:null,u=S??D,H=await Xe(c,{testId:M,role:k,type:w,text:u,pressable:I,visible:N,interactive:O});H||(console.error(a("find","<text> | --text <t> | --testid <id> | --role <r> | --type <t> | --pressable | --visible | --interactive-targets")),process.exit(1));let{mode:B,result:C}=H,oe=j(i),Y=i.includes("--verbose")||i.includes("--dump");if(oe)B==="interactive-targets"&&Array.isArray(C)?J(Me(C).map($=>({...$,tap:Ie($)}))):J(C??null);else if(Array.isArray(C))if(C.length===0){console.log(` no ${B} nodes found`);let $=await c.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount?.()) || 0)()"});typeof $=="number"&&$<10&&Q("app-still-loading",$)}else if(B==="interactive-targets"){let $=Me(C);console.log(` found ${$.length} interactive target${$.length===1?"":"s"} (sorted by score):`);for(let T of $.slice(0,20)){let q=T.absolutePosition?`@(${Math.round(T.absolutePosition.x)},${Math.round(T.absolutePosition.y)})`:"",z=T.layout?`${Math.round(T.layout.width)}x${Math.round(T.layout.height)}`:"?x?",G=T.text?` "${T.text.slice(0,30)}"`:"",re=T.testID?` #${T.testID}`:"",ie=T.accessibilityLabel?` \u24D8"${String(T.accessibilityLabel).slice(0,24)}"`:"",E=T.accessibilityRole?`[${T.accessibilityRole}]`:T.type,se=Ie(T);console.log(` ${E}${G}${ie}${re} ${z} ${q}`),console.log(` \u2192 ${se}`),Y&&console.log(Pe(JSON.stringify(T,null,2)," "))}$.length>20&&console.log(` ... and ${$.length-20} more`)}else{console.log(` found ${C.length} node${C.length===1?"":"s"} (${B}):`);for(let $ of C.slice(0,20)){let T=$.absolutePosition?`@(${Math.round($.absolutePosition.x)},${Math.round($.absolutePosition.y)})`:"",q=$.layout?`${Math.round($.layout.width)}x${Math.round($.layout.height)}`:"?x?",z=$.text?` "${$.text.slice(0,30)}"`:"",G=$.testID?` #${$.testID}`:"",re=$.pressable?" (tap)":"",ie=$.accessibilityRole?`[${$.accessibilityRole}]`:$.type;console.log(` ${ie}${z}${G} ${q} ${T}${re}`),Y&&console.log(Pe(JSON.stringify($,null,2)," "))}C.length>20&&console.log(` ... and ${C.length-20} more`)}else if(C==null)console.log(` not found: ${u||M||k||w||""||B}`),M&&Q("wait-selector-for-missing-testid",M);else{let $=C;if($.type&&$.absolutePosition){let T=`@(${Math.round($.absolutePosition.x)},${Math.round($.absolutePosition.y)})`,q=$.layout?`${Math.round($.layout.width)}x${Math.round($.layout.height)}`:"?x?",z=$.text?` "${$.text.slice(0,40)}"`:"",G=$.testID?` #${$.testID}`:"",re=$.pressable?" (tap)":"",ie=$.accessibilityRole?`[${$.accessibilityRole}]`:$.type;console.log(` ${ie}${z}${G} ${q} ${T}${re}`),Y&&console.log(Pe(JSON.stringify($,null,2)," "))}else console.log(JSON.stringify(C,null,2))}}function Pe(o,c){return o.split(`
9
9
  `).map(i=>c+i).join(`
10
10
  `)}async function St(o,c={}){let i=await at(o);if("error"in i&&(console.error(i.error),process.exit(1)),c.json){console.log(JSON.stringify(i,null,2));return}let{visible:l,spec:f,mode:a,shifted:g,capsLock:h,accessoryBarId:M}=i,k=[];k.push(`keyboard: ${l?"visible":"hidden"}`),f?(k.push(` type: ${f.keyboardType}`),k.push(` returnKey: ${f.returnKeyType}`),k.push(` autoCap: ${f.autoCapitalize}`),k.push(` autoCorrect: ${f.autoCorrect?"on":"off"}`),k.push(` appearance: ${f.keyboardAppearance}`),f.secureTextEntry&&k.push(" secureTextEntry: true"),f.enablesReturnKeyAutomatically&&k.push(` return: ${f.currentTextIsEmpty?"disabled (empty)":"enabled"}`)):k.push(" spec: <none> (shown via dev-tools with no TextInput)"),k.push(` mode: ${a}${g?" (shifted)":""}${h?" (caps)":""}`),M&&k.push(` accessoryBar: ${M}`),console.log(k.join(`
11
- `))}async function kt(o){let c=await o.bridge.listSims(),i=o.args.includes("--all"),l=o.args.find((h,M)=>o.args[M-1]==="--bundle"),f=o.args.find((h,M)=>o.args[M-1]==="--port"),a=o.args.includes("--primary"),g=c.filter(h=>!(a&&!h.isPrimary||l&&!(h.url??"").includes(l)||f&&!(h.url??"").includes(`:${f}/`)||!i&&!l&&!f&&!a&&!(h.url&&(h.url.includes("bundle=")||h.url.includes("/index.bundle")))&&h.id!==o.simId));if(j(o.args)){J(g.map(h=>({...h,active:h.id===o.simId})));return}ht(g,o.simId),g.length<c.length&&!j(o.args)&&console.log(` (${c.length-g.length} more hidden \u2014 pass --all to show)`)}function ae(o){return o<1024?`${o}B`:o<1024*1024?`${(o/1024).toFixed(1)}KB`:`${(o/1024/1024).toFixed(1)}MB`}function be(o,c){return c<=0?"?":`${(o/c*100).toFixed(0)}%`}async function Tt(o,c={args:[]}){let i=await ct(o);if(j(c.args)){J(i);return}if(console.log(" memory:"),i.imageLoader){let l=i.imageLoader;console.log(" image-loader cache"),console.log(` entries: ${l.cacheEntries} / ${l.cacheMaxEntries} (${be(l.cacheEntries,l.cacheMaxEntries)})`),console.log(` pixel bytes: ${ae(l.cachePixelBytes)} / ${ae(l.cachePixelBudget)} (${be(l.cachePixelBytes,l.cachePixelBudget)})`),console.log(` pending: ${l.pendingFetches} fetches, ${l.pendingBytes} bytes`),console.log(` failed uris: ${l.failedUris}`),console.log(` snapshots: ${l.snapshots}`),console.log(` camera frames: ${l.cameraFrames}`)}else console.log(" image-loader cache: not available (engine pre-rebuild?)");if(i.workerHeap){let l=i.workerHeap;console.log(" worker heap (chrome only)"),console.log(` used: ${ae(l.usedJSHeapSize)} / ${ae(l.jsHeapSizeLimit)} (${be(l.usedJSHeapSize,l.jsHeapSizeLimit)})`),console.log(` total: ${ae(l.totalJSHeapSize)}`)}if(i.hostHeap){let l=i.hostHeap;console.log(" host heap (chrome only)"),console.log(` used: ${ae(l.usedJSHeapSize)} / ${ae(l.jsHeapSizeLimit)} (${be(l.usedJSHeapSize,l.jsHeapSizeLimit)})`),console.log(` total: ${ae(l.totalJSHeapSize)}`)}}function me(o){let c=o.indexOf("--testid");if(c>=0&&o[c+1])return{mode:"testid",value:o[c+1]};let i=o.indexOf("--test-id");if(i>=0&&o[i+1])return{mode:"testid",value:o[i+1]};let l=o.indexOf("--text");return l>=0&&o[l+1]?{mode:"text",value:o[l+1]}:null}async function we(o,c){let i=JSON.stringify(c.value),l=c.mode==="testid"?`(await t.findByTestId(${i})) || (await t.findById(${i}))`:`await t.findByText(${i})`;return await o.send({type:"evaluate",code:`(async () => {
11
+ `))}async function kt(o){let c=await o.bridge.listSims(),i=o.args.includes("--all"),l=o.args.find((h,M)=>o.args[M-1]==="--bundle"),f=o.args.find((h,M)=>o.args[M-1]==="--app-port"),a=o.args.includes("--primary"),g=c.filter(h=>!(a&&!h.isPrimary||l&&!(h.url??"").includes(l)||f&&!(h.url??"").includes(`/rn/${f}`)||!i&&!l&&!f&&!a&&!(h.url&&(h.url.includes("bundle=")||h.url.includes("/index.bundle")))&&h.id!==o.simId));if(j(o.args)){J(g.map(h=>({...h,active:h.id===o.simId})));return}ht(g,o.simId),g.length<c.length&&!j(o.args)&&console.log(` (${c.length-g.length} more hidden \u2014 pass --all to show)`)}function ae(o){return o<1024?`${o}B`:o<1024*1024?`${(o/1024).toFixed(1)}KB`:`${(o/1024/1024).toFixed(1)}MB`}function be(o,c){return c<=0?"?":`${(o/c*100).toFixed(0)}%`}async function Tt(o,c={args:[]}){let i=await ct(o);if(j(c.args)){J(i);return}if(console.log(" memory:"),i.imageLoader){let l=i.imageLoader;console.log(" image-loader cache"),console.log(` entries: ${l.cacheEntries} / ${l.cacheMaxEntries} (${be(l.cacheEntries,l.cacheMaxEntries)})`),console.log(` pixel bytes: ${ae(l.cachePixelBytes)} / ${ae(l.cachePixelBudget)} (${be(l.cachePixelBytes,l.cachePixelBudget)})`),console.log(` pending: ${l.pendingFetches} fetches, ${l.pendingBytes} bytes`),console.log(` failed uris: ${l.failedUris}`),console.log(` snapshots: ${l.snapshots}`),console.log(` camera frames: ${l.cameraFrames}`)}else console.log(" image-loader cache: not available (engine pre-rebuild?)");if(i.workerHeap){let l=i.workerHeap;console.log(" worker heap (chrome only)"),console.log(` used: ${ae(l.usedJSHeapSize)} / ${ae(l.jsHeapSizeLimit)} (${be(l.usedJSHeapSize,l.jsHeapSizeLimit)})`),console.log(` total: ${ae(l.totalJSHeapSize)}`)}if(i.hostHeap){let l=i.hostHeap;console.log(" host heap (chrome only)"),console.log(` used: ${ae(l.usedJSHeapSize)} / ${ae(l.jsHeapSizeLimit)} (${be(l.usedJSHeapSize,l.jsHeapSizeLimit)})`),console.log(` total: ${ae(l.totalJSHeapSize)}`)}}function me(o){let c=o.indexOf("--testid");if(c>=0&&o[c+1])return{mode:"testid",value:o[c+1]};let i=o.indexOf("--test-id");if(i>=0&&o[i+1])return{mode:"testid",value:o[i+1]};let l=o.indexOf("--text");return l>=0&&o[l+1]?{mode:"text",value:o[l+1]}:null}async function we(o,c){let i=JSON.stringify(c.value),l=c.mode==="testid"?`(await t.findByTestId(${i})) || (await t.findById(${i}))`:`await t.findByText(${i})`;return await o.send({type:"evaluate",code:`(async () => {
12
12
  const t = window.__sootsimTest
13
13
  if (!t) return null
14
14
  const n = ${l}
@@ -114,7 +114,7 @@ import{a as Q}from"./chunk-YXGX6RCI.js";import{a as pt,b as ft}from"./chunk-UH5Q
114
114
  `);console.log(`${t??""}
115
115
 
116
116
  ${n}
117
- `),process.exit(0)}let I=f.wsPort,N=f.simId,O=f.simIdSource,D=f.commandTimeoutMs;if(g==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-NH6AKW3W.js"),t=e();console.log(` available drivers (${t.length}):
117
+ `),process.exit(0)}let I=f.wsPort,N=f.simId,O=f.simIdSource,D=f.commandTimeoutMs;if(g==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-YFPP36NV.js"),t=e();console.log(` available drivers (${t.length}):
118
118
  `);let n=Math.max(...t.map(s=>s.id.length),6),r=Math.max(...t.map(s=>s.kind.length),4);for(let s of t){let d=s.available?"\u2713":"\u2717",m=s.id.padEnd(n),y=s.kind.padEnd(r);console.log(` ${d} ${m} ${y} ${s.description}`),s.available&&s.detail?console.log(` ${s.detail}`):!s.available&&s.reason&&console.log(` unavailable: ${s.reason}`)}return}let u=Le(f),H=N||"default",B=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]),C=200;function oe(e){let t=e.replace(/\s+/g," ").trim();if(!t)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(t)){let r=/<title[^>]*>([^<]+)<\/title>/i.exec(e)?.[1]?.trim(),s=/<body[^>]*>([\s\S]*?)<\//i.exec(e)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),d=r||s||"html error page";return`<html ${e.length}B> "${d}" (body elided \u2014 add --json for the full payload)`}return t.length<=C?t:`${t.slice(0,C)}\u2026 (+${t.length-C} more bytes)`}function Y(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function $(e){let t=he()?5e3:1500;try{let{settled:n,elapsed:r}=await ee({bridge:e,maxMs:t,pollMs:32,stablePolls:2});n||process.stderr.write(` \u26A0 auto-wait timed out after ${r??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
119
119
  `)}catch{}}function T(e){return!(!e||e.hit===!1||e.ok===!1||e.pointerTapHandled===!1&&!e.keyboardOpened&&!e.isTextInput)}function q(e,t){return{id:e.target?.id??e.match?.id??e.node?.id??null,testID:e.target?.testID??e.match?.testID??e.node?.testID??null,text:e.target?.text??e.target?.accessibilityLabel??e.match?.text??e.match?.accessibilityLabel??e.node?.text??t??null,type:e.target?.type??e.match?.type??e.node?.type??null}}async function z(e){let t=0,n=null,r=null;try{await ee({bridge:u,maxMs:he()?3e3:1200,pollMs:32,stablePolls:2})}catch{}let s=Date.now()+(he()?5e3:2500);for(;Date.now()<=s||t===0;){t++;let d=await e.resolve();if(n=d,d?.error==="bridge-not-ready"||d?.ambiguous||d?.nthOutOfRange)return{payload:d,result:null,attempts:t,failure:"special"};if(d&&typeof d.cx=="number"&&typeof d.cy=="number"){let y=await u.send({type:"tap",x:d.cx,y:d.cy,target:q(d,e.textFallback)});if(r=y,T(y))return{payload:d,result:y,attempts:t}}let m=s-Date.now();if(m<=0)break;try{await ee({bridge:u,maxMs:Math.min(m,700),pollMs:32,stablePolls:2})}catch{await Z(Math.min(120,m))}}return{payload:n,result:r,attempts:t,failure:n&&typeof n.cx=="number"?"missed":"not-found"}}function G(e,t){console.error(` tap failed: ${e} stayed visible but did not receive a hittable press after ${t.attempts} attempt${t.attempts===1?"":"s"}`),t.result&&console.error(` last result: ${JSON.stringify(t.result)}`)}async function re(){try{return await u.send({type:"evaluate",code:`(() => ({
120
120
  console: window.__sootsimConsole?.count?.() || null,
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-M4QW7HLC.js";import"./chunk-VB7Z7JWH.js";import"./chunk-3OCOCDGT.js";import"./chunk-ODLY2N63.js";import"./chunk-GYXN4445.js";import"./chunk-YVKR7SWO.js";import"./chunk-YXZHBYID.js";import"./chunk-FWROUGUO.js";import"./chunk-ZGHJUI77.js";import"./chunk-P3WJGZTF.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.71 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as b}from"./chunk-LKTFFX2V.js";import{a as x}from"./chunk-IECVOMEO.js";import"./chunk-DKLJW2OR.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${n} / ${t} MB`}async function _(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let n=o.stdout.trim().split(`
1
+ /*! sootsim v0.1.73 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as b}from"./chunk-VB7Z7JWH.js";import{a as x}from"./chunk-34TWXW7Z.js";import"./chunk-P3WJGZTF.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${n} / ${t} MB`}async function _(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let n=o.stdout.trim().split(`
3
3
  `),t=n[n.length-1].split(" ").pop()?.trim();if(!t||!w(t))throw new Error(`could not determine dmg mount point (output: ${o.stdout})`);let a=f(t,"sootsim.app");if(!w(a))throw u("hdiutil",["detach","-force",t]),new Error(`sootsim.app not found inside ${t}`);let i="/Applications",d=v(process.env.HOME||"","Applications"),c=i;try{let m=f(i,`.sootsim-write-probe-${process.pid}`);u("touch",[m]),w(m)?g(m,{force:!0}):c=d}catch{c=d}c===d&&y(c,{recursive:!0});let l=f(c,"sootsim.app");w(l)&&g(l,{recursive:!0,force:!0});let p=u("cp",["-R",a,l]),e=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return e.status!==0&&console.warn(` warning: failed to unmount ${t} (${e.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function L(r){let o=v(process.env.HOME||"","Applications");y(o,{recursive:!0});let n=f(o,"sootsim.AppImage");return w(n)&&g(n,{force:!0}),T(r,n),S(n,493),n}async function C(r){return await new Promise((o,n)=>{let s=k("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});s.once("error",n),s.once("exit",t=>{t===0?o():n(new Error(`installer exited with code ${t}`))})}),r}async function Y(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
4
4
  sootsim install-desktop \u2014 download and install the optional desktop GUI
5
5
 
@@ -20,4 +20,4 @@ examples:
20
20
  `),process.exit(0));let o=r.includes("--yes")||r.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,n=r.includes("--force"),s=x();if(s&&!n){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=A();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await b("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(D(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
21
21
  `);try{await O({url:t.url,dest:i,onProgress:(e,m)=>{let $=Date.now();$-d<100&&e<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${I(e,m)}`))}})}catch(e){g(a,{recursive:!0,force:!0}),console.error(`
22
22
  download failed: ${e instanceof Error?e.message:String(e)}`),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
23
- `);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-3LAIXYUV.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};
23
+ `);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-FMUIUQIW.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};