sootsim 0.1.66 → 0.1.67
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.
- package/dist-cli/bin.js +3 -3
- package/dist-cli/chunks/{agent-IW7CCSSI.js → agent-Z45KTLTP.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-5DJBERZP.js → agent-wrapper-EEKVEJOC.js} +2 -2
- package/dist-cli/chunks/{assert-RHILK3WR.js → assert-MDYZKXZ6.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-YZ6C6VYO.js +2 -0
- package/dist-cli/chunks/beta-WXH75XUE.js +2 -0
- package/dist-cli/chunks/chunk-2HKCZLY7.js +372 -0
- package/dist-cli/chunks/{chunk-UMXVWFST.js → chunk-2I535GZU.js} +1 -1
- package/dist-cli/chunks/{chunk-TJEP4DBA.js → chunk-3KVVIZ6M.js} +2 -2
- package/dist-cli/chunks/chunk-42NMKOVE.js +3 -0
- package/dist-cli/chunks/{chunk-WAOLC7WV.js → chunk-4H6LBA4A.js} +1 -1
- package/dist-cli/chunks/{chunk-LVFWALS4.js → chunk-4QSGVTBE.js} +2 -2
- package/dist-cli/chunks/{chunk-T4YLDM5C.js → chunk-52RZ6TSZ.js} +3 -3
- package/dist-cli/chunks/{chunk-AYBGSHQK.js → chunk-5WRBVYML.js} +2 -2
- package/dist-cli/chunks/{chunk-BD76YSRN.js → chunk-67566AJS.js} +2 -2
- package/dist-cli/chunks/chunk-6O64VUC6.js +2 -0
- package/dist-cli/chunks/chunk-7PQHQOCI.js +186 -0
- package/dist-cli/chunks/{chunk-V4SZERWD.js → chunk-AQ7YR4MO.js} +14 -14
- package/dist-cli/chunks/{chunk-6AP6LXVV.js → chunk-ATRGAFJD.js} +1 -1
- package/dist-cli/chunks/{chunk-LRBMW2WC.js → chunk-BCVVANS5.js} +2 -2
- package/dist-cli/chunks/chunk-CUNQTNH4.js +35 -0
- package/dist-cli/chunks/{chunk-DEQ7RED3.js → chunk-DOWYG3HG.js} +2 -2
- package/dist-cli/chunks/{chunk-XZ5SQJM2.js → chunk-EJTXYZEF.js} +128 -36
- package/dist-cli/chunks/{chunk-4NT6VRUU.js → chunk-F23Y4HMT.js} +1 -1
- package/dist-cli/chunks/{chunk-M2Q4FXRE.js → chunk-F4RC4AOY.js} +1 -1
- package/dist-cli/chunks/chunk-GFVC6EEB.js +1 -0
- package/dist-cli/chunks/{chunk-BEQD2DSK.js → chunk-HW5YHSIE.js} +1 -1
- package/dist-cli/chunks/{chunk-VRV2X4X2.js → chunk-IB4BRND4.js} +1 -1
- package/dist-cli/chunks/{chunk-22CO2ZE3.js → chunk-IBWN764Q.js} +2 -2
- package/dist-cli/chunks/chunk-JE4JBSNJ.js +119 -0
- package/dist-cli/chunks/{chunk-HWCZYW6M.js → chunk-K4PKR2EO.js} +2 -2
- package/dist-cli/chunks/chunk-KBJ2WHII.js +73 -0
- package/dist-cli/chunks/chunk-KR36VJSN.js +1 -0
- package/dist-cli/chunks/{chunk-EEMGSSWY.js → chunk-LQ5BA5JU.js} +2 -2
- package/dist-cli/chunks/chunk-MIAAZSSE.js +12 -0
- package/dist-cli/chunks/{chunk-BTHB3PMG.js → chunk-N4JRDJMN.js} +3 -3
- package/dist-cli/chunks/{chunk-FXF2FHPI.js → chunk-NYR3Z44O.js} +2 -2
- package/dist-cli/chunks/{chunk-EIQLQDKX.js → chunk-O624O5MO.js} +2 -2
- package/dist-cli/chunks/{chunk-4LYNJPUM.js → chunk-SH6HMUCY.js} +2 -2
- package/dist-cli/chunks/chunk-SVFSMAZN.js +2 -0
- package/dist-cli/chunks/chunk-TEMZK6Q2.js +1 -0
- package/dist-cli/chunks/{chunk-D4VEI6MI.js → chunk-TLTS533S.js} +1 -1
- package/dist-cli/chunks/chunk-U47AHSGE.js +23 -0
- package/dist-cli/chunks/{chunk-LCKLQSZX.js → chunk-XCRUPKWB.js} +2 -2
- package/dist-cli/chunks/{chunk-NCSGLZRV.js → chunk-YGQV3CUV.js} +2 -2
- package/dist-cli/chunks/{chunk-UNSLXX7V.js → chunk-ZJJKYJMH.js} +2 -2
- package/dist-cli/chunks/{chunk-GDCMTHEU.js → chunk-ZO7SGE65.js} +1 -1
- package/dist-cli/chunks/{chunk-HIN5TAAL.js → chunk-ZP2HMCKS.js} +1 -1
- package/dist-cli/chunks/cli-version-5LGQQE5P.js +2 -0
- package/dist-cli/chunks/{compat-I7JXYUJN.js → compat-5MMZ4R3Q.js} +3 -3
- package/dist-cli/chunks/{config-3HR5RKVH.js → config-YWN44WJQ.js} +2 -2
- package/dist-cli/chunks/control-LUCFDAZI.js +2 -0
- package/dist-cli/chunks/{cpu-profile-ZVHMTVAU.js → cpu-profile-VFGUVXU5.js} +2 -2
- package/dist-cli/chunks/{daemon-VYRTYH55.js → daemon-ONX5ZBXF.js} +2 -2
- package/dist-cli/chunks/{debug-CQ6Y7GJ2.js → debug-CPOG32OT.js} +5 -5
- package/dist-cli/chunks/demo-app-registry-LWT6JLU6.js +2 -0
- package/dist-cli/chunks/{detox-7ZKTGLDR.js → detox-J6NGSZR5.js} +2 -2
- package/dist-cli/chunks/{device-4M6Z7E2N.js → device-QYOQXI2P.js} +2 -2
- package/dist-cli/chunks/{diagnose-SMQLYGNX.js → diagnose-MMW4LJLA.js} +2 -2
- package/dist-cli/chunks/drivers-NRWUJJCD.js +2 -0
- package/dist-cli/chunks/{electron-6N2MIN5W.js → electron-IK3HIZY4.js} +3 -3
- package/dist-cli/chunks/flow-2MB7HINM.js +2 -0
- package/dist-cli/chunks/{hints-RJCZS2E3.js → hints-KZOD56U5.js} +2 -2
- package/dist-cli/chunks/{home-paths-DCUNA3CD.js → home-paths-R2YZZTUM.js} +2 -2
- package/dist-cli/chunks/inspect-ZARO3HQ4.js +970 -0
- package/dist-cli/chunks/install-O67RTYCX.js +2 -0
- package/dist-cli/chunks/{install-desktop-C7424OSW.js → install-desktop-4GH5I7SC.js} +3 -3
- package/dist-cli/chunks/{keys-TXUQOAZ3.js → keys-AXEFZUUI.js} +2 -2
- package/dist-cli/chunks/{launch-MVA44QTC.js → launch-QLE56ON7.js} +3 -3
- package/dist-cli/chunks/{login-NHO2WTHC.js → login-J45NQQM6.js} +4 -4
- package/dist-cli/chunks/{logout-SRRWADCE.js → logout-ZE5OUBB7.js} +2 -2
- package/dist-cli/chunks/{maestro-UHNXEZAN.js → maestro-FS6CAKDD.js} +2 -2
- package/dist-cli/chunks/{preview-ETIUP7KC.js → preview-TSU5IXVR.js} +2 -2
- package/dist-cli/chunks/{profile-MY5JFVIF.js → profile-ZBJ4TYWA.js} +2 -2
- package/dist-cli/chunks/{react-KCMC4GL3.js → react-TGZLTTYN.js} +2 -2
- package/dist-cli/chunks/record-JSBFUNOD.js +54 -0
- package/dist-cli/chunks/runtime-DGDQ7NVY.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-LQZIWQU6.js → runtime-delivery-36UMAXOV.js} +2 -2
- package/dist-cli/chunks/screenshot-3CHMALUJ.js +33 -0
- package/dist-cli/chunks/{screenshot-mode-USPWASI3.js → screenshot-mode-C547UT5H.js} +2 -2
- package/dist-cli/chunks/{screenshots-EPEDNA6H.js → screenshots-XCNGSNYG.js} +2 -2
- package/dist-cli/chunks/{server-222QT33M.js → server-W37X3IW7.js} +6 -6
- package/dist-cli/chunks/setup-repo-DETS5ZJT.js +2 -0
- package/dist-cli/chunks/{skills-6XRREE2M.js → skills-OXZLDNDW.js} +2 -2
- package/dist-cli/chunks/{start-YCAZBZEX.js → start-N6ZQYUBP.js} +4 -4
- package/dist-cli/chunks/store-QOXJKJUZ.js +2 -0
- package/dist-cli/chunks/telemetry-74LX7WG4.js +2 -0
- package/dist-cli/chunks/{test-6TNRHSWC.js → test-DWZ7PRSW.js} +3 -3
- package/dist-cli/chunks/{three-mode-MDOLHGXW.js → three-mode-P2R7KA62.js} +2 -2
- package/dist-cli/chunks/{timeline-72MWE44G.js → timeline-VPES3YCN.js} +3 -3
- package/dist-cli/chunks/{upgrade-IHZ4DFAE.js → upgrade-NYQLA4UJ.js} +2 -2
- package/dist-cli/chunks/upload-YOMMYESV.js +2 -0
- package/dist-cli/chunks/{web-JLJSJUS2.js → web-OTALJKK5.js} +2 -2
- package/dist-cli/chunks/what-happened-GZ73H6KF.js +22 -0
- package/dist-cli/chunks/{whoami-2EYGCRDQ.js → whoami-UDLQK7IY.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +9 -2
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +23 -7
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/vite-base.cjs +23 -7
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/auto-bootstrap-PS2UDBP7.js +0 -2
- package/dist-cli/chunks/beta-XLYWSKEA.js +0 -2
- package/dist-cli/chunks/chunk-5MVFADNH.js +0 -3
- package/dist-cli/chunks/chunk-7NYW73Q6.js +0 -2
- package/dist-cli/chunks/chunk-EMMX6RF7.js +0 -73
- package/dist-cli/chunks/chunk-FIIBCY5I.js +0 -3
- package/dist-cli/chunks/chunk-G4VWDOWB.js +0 -17
- package/dist-cli/chunks/chunk-GMKGJHVG.js +0 -1
- package/dist-cli/chunks/chunk-M3ZEZHOB.js +0 -34
- package/dist-cli/chunks/chunk-MWTMLNGM.js +0 -348
- package/dist-cli/chunks/chunk-NQKBIKUZ.js +0 -1
- package/dist-cli/chunks/chunk-QMRXLBPN.js +0 -11
- package/dist-cli/chunks/chunk-X4HQLK4V.js +0 -119
- package/dist-cli/chunks/chunk-XOTJSR4T.js +0 -2
- package/dist-cli/chunks/chunk-YSQV4D7P.js +0 -1
- package/dist-cli/chunks/chunk-Z6HSVZIO.js +0 -100
- package/dist-cli/chunks/cli-version-ESQ2S6N5.js +0 -2
- package/dist-cli/chunks/control-TDZXFNVT.js +0 -2
- package/dist-cli/chunks/demo-app-registry-JAYU7BBM.js +0 -2
- package/dist-cli/chunks/drivers-SIY6JBEM.js +0 -2
- package/dist-cli/chunks/flow-BZEWL7UQ.js +0 -2
- package/dist-cli/chunks/inspect-T5NC7HHB.js +0 -1025
- package/dist-cli/chunks/install-YTJI5RS7.js +0 -2
- package/dist-cli/chunks/record-DHDSXC2Y.js +0 -51
- package/dist-cli/chunks/runtime-AJP6V5LM.js +0 -2
- package/dist-cli/chunks/screenshot-4KPEEI6I.js +0 -28
- package/dist-cli/chunks/setup-repo-D56L3CEB.js +0 -2
- package/dist-cli/chunks/store-Z32KZ34K.js +0 -2
- package/dist-cli/chunks/telemetry-RFTX2BZK.js +0 -2
- package/dist-cli/chunks/upload-G5C7LJWG.js +0 -2
- package/dist-cli/chunks/what-happened-BUXSJ3QS.js +0 -15
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as _,b as z,c as le,d as ce}from"./chunk-K4PKR2EO.js";import{l as O}from"./chunk-CUNQTNH4.js";import{j as se,k as ie,m as ae}from"./chunk-AQ7YR4MO.js";import{g as W}from"./chunk-7PQHQOCI.js";import{a as C,b as j}from"./chunk-ZO7SGE65.js";import{c as de}from"./chunk-5WRBVYML.js";import{d as ne}from"./chunk-ZP2HMCKS.js";import{a as ee}from"./chunk-SVFSMAZN.js";import{b as re,c as I,d as S,e as x}from"./chunk-U47AHSGE.js";import{c as k,d as w,e as P}from"./chunk-IB4BRND4.js";import{E as te,F as oe}from"./chunk-HW5YHSIE.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
|
+
`);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
|
+
`,{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
|
+
const t = window.__sootsimTest
|
|
6
|
+
const ms = window.SootSim?.bridges?.mainShell
|
|
7
|
+
if (!t) return null
|
|
8
|
+
let shell = null
|
|
9
|
+
try { shell = ms?.getState ? await ms.getState() : null } catch {}
|
|
10
|
+
const tree = await t.dumpTree(12, ${JSON.stringify({describe:!0,verbose:!1,filter:""})})
|
|
11
|
+
return { tree, shell }
|
|
12
|
+
})()`,l=await r.send({type:"evaluate",code:i});if(!l?.tree)return;if(console.log(""),l.shell?.state){let c=[`state=${l.shell.state}`,l.shell.activeApp?`app=${l.shell.activeApp}`:null].filter(Boolean);console.log(` shell: ${c.join(" ")}`)}console.log(l.tree)}finally{r.close()}}catch{}finally{n===void 0?delete process.env.SOOTSIM_QUIET_TARGET_NOTICE:process.env.SOOTSIM_QUIET_TARGET_NOTICE=n}}async function Ve(t,o,e){let n=Date.now()+e.maxMs,r="(async () => (await window.__sootsimTest?.getNodeCount?.()) || 0)()",s=S(t,{commandTimeoutMs:2e3,simId:o,simIdSource:"flag"});try{let a=-1,i=0;for(;Date.now()<n;){let l=-1;try{let c=await s.send({type:"evaluate",code:r});typeof c=="number"&&(l=c)}catch{}if(l>=0&&l===a){if(Date.now()-i>=e.stableMs)return}else a=l,i=Date.now();await v(50)}}finally{s.close()}}async function xt(t,o={}){let e=I(t,{port:o.port,commandTimeoutMs:o.timeoutMs}),n=x(e);try{let r=await n.listSims();ze(r,e.simId)}finally{n.close()}}async function kt(t,o={}){let e=I(t,{port:o.port,commandTimeoutMs:o.timeoutMs,stripBooleanFlags:["--new","--headless","--ephemeral"],stripValueFlags:["--base-url","--replace","--driver","--profile"]}),n=t.find((u,p)=>t[p-1]==="--profile"),r=t.includes("--ephemeral");n&&r&&(console.error(" sootsim open: --profile cannot be combined with --ephemeral"),process.exit(1));let s=n?de(n).id:void 0,a=!!s||r,i=t.includes("--new")||a,l=Ne(t);i&&e.simIdSource==="flag"&&(console.error(" sootsim open: --new, --profile, and --ephemeral cannot be combined with --sim"),process.exit(1));let c=e.positional[0]||"",d=t.find((u,p)=>t[p-1]==="--driver")||"",m=t.includes("--headless"),h=t.find((u,p)=>t[p-1]==="--base-url")||Ie(),M=t.includes("--base-url"),Y=k();if(!d&&!i&&(e.simIdSource==="flag"||e.simIdSource==="saved"&&!!Y)){let u=x(e),p=e.simId?` --sim ${e.simId}`:"",f=!1;try{let g=null;try{let y=await u.listSims();if(e.simIdSource==="saved"?(g=y.find($=>$.id===Y&&$.readyState==="open")??null,g||P()):g=N(y,e.simId),!g)if(e.simIdSource==="saved")f=!0;else throw new Error("no sim connected");if(!f&&g){let $=M||J(c)?h:be(g,h),E=await D(c,_($,l));u.send({type:"evaluate",simId:g.id,code:`window.location.href = ${JSON.stringify(E)}`}).catch(()=>{})}}catch(y){console.error(` open failed: ${y instanceof Error?y.message:String(y)}`),await O(u,{errorsCommand:`sootsim get errors 5${p}`,warningsCommand:`sootsim get warnings 5${p}`,requestsCommand:`sootsim get requests 5${p}`}),process.exit(1)}if(!f&&g){await v(1500);let y=await He(e.wsPort,e.commandTimeoutMs,g.id);y||(console.error(" timed out waiting for current sim to load target"),process.exit(1)),y.bridge.close(),w(g.id);let $=M||J(c)?h:be(g,h),E=await D(c,_($,l));B(E,{...g,url:E},"current sim"),await T(e.wsPort,g.id,t);return}}finally{u.close()}}let X=_(h,l),ke=await D(c,X),Z=`cli-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,b=await Fe(c,X,Z),F={newWindow:!0},U=u=>u.url?.includes(`inspectOpen=${Z}`)??!1;if(d){let u=W(d);u||(console.error(` unknown driver "${d}" \u2014 run \`sootsim list --drivers\``),process.exit(1));let p=await u.launch({url:b,headless:m,newWindow:F.newWindow,profileId:s,ephemeralProfile:r});p.launched||(console.error(` ${u.name} driver: ${p.message}`),process.exit(1));let f=await L(e.wsPort,e.commandTimeoutMs,U,{attempts:60,intervalMs:500});if(!f){if(p.pid)try{process.kill(p.pid,"SIGTERM"),console.error(` closed ${u.name} host process ${p.pid}`)}catch{}console.error(" timed out waiting for opened sim to connect"),process.exit(1)}w(f.id),qe(p),B(b,f,`${u.name} driver`),await T(e.wsPort,f.id,t);return}if(a){let u=C();u||(console.error(" profiles require electron or playwright; install the desktop companion or use `--driver playwright`"),process.exit(1));try{(await j(b,u,{profileId:s,ephemeralProfile:r})).launched||(console.error(" desktop companion failed to start"),process.exit(1))}catch(f){console.error(` desktop companion failed: ${f instanceof Error?f.message:String(f)}`),process.exit(1)}let p=await L(e.wsPort,e.commandTimeoutMs,U,{attempts:40,intervalMs:500});p||(console.error(" timed out waiting for profiled sim to connect"),process.exit(1)),w(p.id),B(b,p,"desktop companion"),await T(e.wsPort,p.id,t);return}let H=!1,K=!1;try{let u=S(e.wsPort,{commandTimeoutMs:2e3});try{await u.listSims(),H=!0}finally{u.close()}}catch{}if(H)try{let u=S(e.wsPort,{commandTimeoutMs:3e3});try{await u.openUrl(b,F),K=!0}finally{u.close()}}catch{}if(!K){let u=C();if(u)try{if((await j(b,u)).launched){let f=await L(e.wsPort,e.commandTimeoutMs,U,{attempts:20,intervalMs:500});if(f){w(f.id),B(b,f,"desktop companion"),await T(e.wsPort,f.id,t);return}}}catch{}try{await ne(b,F)}catch(p){console.error(` open failed: ${p instanceof Error?p.message:String(p)}`),W("playwright")?.availability().available?console.error(" no system browser found \u2014 retry with `sootsim open \u2026 --driver playwright` for a headless sim."):console.error(" run `sootsim list --drivers` to see available drivers."),process.exit(1)}if(!H){console.log(` opened: ${ke}`),we(e.wsPort);return}}let R=await L(e.wsPort,e.commandTimeoutMs,U,{attempts:30,intervalMs:500});R||(console.error(" timed out waiting for opened sim to connect"),process.exit(1)),w(R.id),B(b,R,K?"bridge":"direct shell open"),await T(e.wsPort,R.id,t)}async function xe(t,o={}){let e=I(t,{port:o.port,commandTimeoutMs:o.timeoutMs,stripBooleanFlags:["--force"]}),n=t.includes("--force"),r=x(e),s=e.simId?` --sim ${e.simId}`:"";try{try{let a=await r.listSims(),i=N(a,e.positional[0]||e.simId);if(i.lockedBy&&i.lockExpiresAt&&i.lockExpiresAt>Date.now()){let l=Math.max(0,Math.round((i.lockExpiresAt-Date.now())/1e3));i.lockedByKind==="user-active"&&(console.error(` refused: ${i.id} is locked by the active user (${l}s) \u2014 that's a live human tab`),console.error(" run `sootsim open --new` for a fresh investigation sim"),process.exit(1)),n||(console.error(` refused: ${i.id} is leased by ${i.lockedBy} (${l}s)`),console.error(` \`sootsim use ${i.id} --force\` to take it, or \`sootsim open --new\` for a fresh sim`),process.exit(1))}await r.focusSim(i.id),w(i.id),console.log(` using: ${i.id}`)}catch(a){console.error(` use failed: ${a instanceof Error?a.message:String(a)}`),await O(r,{errorsCommand:`sootsim get errors 5${s}`,warningsCommand:`sootsim get warnings 5${s}`,requestsCommand:`sootsim get requests 5${s}`}),process.exit(1)}}finally{r.close()}}async function Pt(t,o={}){await xe(t,o)}async function Ct(t,o={}){await xe(t,o)}async function Bt(t,o={}){let e=I(t,{port:o.port,commandTimeoutMs:o.timeoutMs,stripBooleanFlags:["--force"]}),n=t.includes("--force"),r=x(e);try{try{let s=await r.listSims(),a=N(s,e.positional[0]||e.simId),i=n&&a.lockedBy&&a.lockedByKind!=="user-active"?a.lockedBy:null,l=await r.claim(a.id,{force:n});w(a.id);let c=Math.max(0,Math.round((l.lockExpiresAt-Date.now())/1e3)),d=l.bootedCount>0?` (booted ${l.bootedCount})`:"";console.log(` claimed: ${l.simId} [${c}s]${d}`),i&&console.log(` took over from: ${i}`)}catch(s){if(s instanceof re){let a=Math.max(0,Math.round(s.lock.expiresInMs/1e3));console.error(` claim failed: locked by ${s.lock.by} for ${a}s more`),console.error(" use --force to take it, or `sootsim open --new` for a fresh sim"),process.exit(1)}console.error(` claim failed: ${s instanceof Error?s.message:String(s)}`),process.exit(1)}}finally{r.close()}}async function Je(t,o,e,n){if(n.length===0)return{closed:[],remaining:[]};await Promise.all(n.map(s=>t.closeSim(s).catch(()=>{})));let r=new Set(n);for(let s=0;s<40;s++){let a=[];try{let i=S(o,{commandTimeoutMs:e});try{a=(await i.listSims()).filter(c=>r.has(c.id)&&c.readyState==="open").map(c=>c.id)}finally{i.close()}}catch{a=[]}if(a.length===0)return{closed:[...r],remaining:[]};if(s===39)return{closed:[...r].filter(i=>!a.includes(i)),remaining:a};await v(250)}return{closed:[...r],remaining:[]}}function Qe(t,o){let e=t.filter(m=>m.readyState==="open"),n=e.map(m=>m.id),r=o.explicitKeepId?.trim()||"",s=o.savedKeepId?.trim()||"",a=s?e.some(m=>m.id===s):!1,i=s&&!a?s:null,l=null,c=null,d=null;if(o.closeOthers)if(r){let m=e.find(h=>h.id===r);m?l=m.id:c=r}else if(s&&a)l=s;else{let m=e.find(h=>h.isPrimary)??e[0]??null;m&&(l=m.id,s&&!a&&(d=m.id))}return{openIds:n,keepId:l,targets:c?[]:n.filter(m=>m!==l),staleSavedId:i,missingExplicitKeepId:c,fallbackKeepId:d}}async function Tt(t,o={}){let e=I(t,{port:o.port,commandTimeoutMs:o.timeoutMs,stripBooleanFlags:["--all","--others"]}),n=x(e),r=e.simId?` --sim ${e.simId}`:"",s=t.includes("--all"),a=t.includes("--others");if(s||a){try{let i=await n.listSims(),l=k(),c=e.positional[0]||(e.simIdSource==="flag"?e.simId:void 0),d=Qe(i,{closeOthers:a,explicitKeepId:c,savedKeepId:l});if(d.staleSavedId&&P(),d.fallbackKeepId&&(w(d.fallbackKeepId),console.log(` saved sim ${d.staleSavedId} is gone \u2014 keeping primary ${d.fallbackKeepId}`)),d.missingExplicitKeepId&&(console.error(` close failed: keep sim ${d.missingExplicitKeepId} is not connected; not closing other sims`),process.exit(1)),d.targets.length===0){console.log(d.keepId?` nothing to close \u2014 only the kept sim ${d.keepId} is connected`:d.staleSavedId?` nothing to close \u2014 no sims connected (cleared stale current sim ${d.staleSavedId})`:" nothing to close \u2014 no sims connected");return}let m=await Je(n,e.wsPort,e.commandTimeoutMs,d.targets);await V(i,d.targets);let h=k();h&&m.closed.includes(h)&&(d.keepId?w(d.keepId):P());let M=` closed ${m.closed.length} sim(s)${d.keepId?` (kept ${d.keepId})`:""}`;console.log(M),m.remaining.length>0&&(console.error(` close failed: still connected: ${m.remaining.join(", ")}`),process.exit(1))}catch(i){console.error(` close failed: ${i instanceof Error?i.message:String(i)}`),process.exit(1)}finally{n.close()}return}try{try{let i=await n.listSims(),l=N(i,e.positional[0]||e.simId),c=i.find(m=>m.id!==l.id&&m.readyState==="open");await n.closeSim(l.id),await je(e.wsPort,e.commandTimeoutMs,l.id)||(await V(i,[l.id]),console.error(` close failed: ${l.id} is still connected`),process.exit(1)),await V(i,[l.id]),k()===l.id&&(c?w(c.id):P()),console.log(` closed: ${l.id}`)}catch(i){console.error(` close failed: ${i instanceof Error?i.message:String(i)}`),await O(n,{errorsCommand:`sootsim get errors 5${r}`,warningsCommand:`sootsim get warnings 5${r}`,requestsCommand:`sootsim get requests 5${r}`}),process.exit(1)}}finally{n.close()}}export{nt as a,Ue as b,rt as c,It as d,Ie as e,D as f,Fe as g,Ke as h,ze as i,L as j,We as k,qe as l,V as m,xt as n,kt as o,Pt as p,Ct as q,Bt as r,Je as s,Qe as t,Tt as u};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as l}from"./chunk-U47AHSGE.js";import{E as c,F as m,g as p,i as h,z as w}from"./chunk-HW5YHSIE.js";import{closeSync as v,existsSync as f,openSync as P,readSync as S,statSync as g}from"fs";import{homedir as k}from"os";import{resolve as T}from"path";import{WebSocket as D}from"ws";var E=6e4;async function L(){let t=w();if(t&&f(h(t)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:e}=await import("./runtime-DGDQ7NVY.js");await e(["install"],{})}function I(t,e){return x(t)??e??l()}async function $(t=l(),e=E){if(await u(t,250)||await u(t,1500))return;let n=c();if(n&&m(n)){if(n.bootstrapping===!0&&(await b(e),await u(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(p())throw new Error(`sootsim bridge daemon is not running on port ${t}.
|
|
3
3
|
dev checkouts skip the auto-install of the persistent launchd / systemd
|
|
4
4
|
agent. start the daemon manually in another shell with:
|
|
5
5
|
bun sootsim server
|
|
6
|
-
(set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-
|
|
6
|
+
(set SOOTSIM_FORCE_DAEMON_INSTALL=1 to allow auto-install from this repo.)`);console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-ONX5ZBXF.js");try{await o({port:t,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
|
|
7
7
|
if this keeps failing, run \`sootsim daemon uninstall\` and retry, or run \`sootsim server\` in a persistent shell as a workaround.`)}console.log(" waiting for runtime to come online...");let i=process.platform==="darwin"?B():null;try{await b(e);let r=Date.now()+5e3;for(;Date.now()<r;){if(await u(t,500))return;await new Promise(s=>setTimeout(s,200))}throw new Error(`daemon registered but the bridge never bound on port ${t} \u2014 see ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}finally{i?.stop()}}async function C(t=l()){await L(),await $(t)}function x(t){for(let e=0;e<t.length;e++){let n=t[e];if((n==="--port"||n==="-p")&&t[e+1]){let o=Number(t[e+1]);return Number.isFinite(o)?o:void 0}if(n.startsWith("--port=")){let o=Number(n.slice(7));return Number.isFinite(o)?o:void 0}}}function u(t,e){return new Promise(n=>{let o=new D(`ws://127.0.0.1:${t}`,{handshakeTimeout:e}),i=!1,r=s=>{if(!i){i=!0;try{o.close()}catch{}n(s)}};o.once("open",()=>r(!0)),o.once("error",()=>r(!1)),setTimeout(()=>r(!1),e)})}async function b(t){let e=Date.now()+t,n;for(;Date.now()<e;){let o=c();if(o&&m(o)){if(o.bootstrapping!==!0)return;o.bootstrapping!==n&&(n=o.bootstrapping)}await new Promise(i=>setTimeout(i,250))}throw new Error(`daemon did not finish bootstrapping within ${Math.round(t/1e3)}s \u2014 check ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}function d(){return T(k(),"Library/Logs/sootsim/server.err.log")}function B(){let t=d(),e=0;try{f(t)&&(e=g(t).size)}catch{}let n=!1,o=()=>{if(!n){try{if(f(t)){let i=g(t).size;if(i>e){let r=Buffer.alloc(i-e),s=P(t,"r");try{S(s,r,0,r.length,e)}finally{v(s)}e=i;for(let y of r.toString("utf8").split(/\r?\n/)){let a=y.trim();a&&(a.startsWith("sootsim:")||a.startsWith("sootsim "))&&console.log(` ${a}`)}}else i<e&&(e=i)}}catch{}setTimeout(o,250)}};return o(),{stop:()=>{n=!0}}}export{L as a,I as b,$ as c,C as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
var o={width:3,lock:{top:253,height:103},ringToggle:{top:152,height:32},volumeUp:{top:214,height:61},volumeDown:{top:290,height:61}},m={width:2.5,lock:{top:130,height:78},ringToggle:{top:94,height:22},volumeUp:{top:126,height:48},volumeDown:{top:188,height:48}},d={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},p={width:3,lock:{top:248,height:72},ringToggle:{top:-1e3,height:0},volumeUp:{top:144,height:62},volumeDown:{top:216,height:62}},a=48;function t(e){return{...e,platform:"ios",navigationBarHeight:0,navigationBarMode:e.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:e.dynamicIsland?e.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:e.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:e.name}}var h={"iphone-se":t({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:m}),"iphone-14":t({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:55,dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15":t({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-plus":t({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro":t({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro-max":t({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-16":t({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-plus":t({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro":t({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro-max":t({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17":t({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-air":t({name:"iPhone 17 Air",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro":t({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro-max":t({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"ipad-pro-13":t({name:'iPad Pro 13"',width:1032,height:1376,scale:2,statusBarHeight:24,homeIndicatorHeight:20,cornerRadius:18,dynamicIsland:null,safeAreaInsets:{top:24,bottom:20,left:0,right:0},iosVersion:"18.2",physicalPPI:264,hardwareButtons:o}),"pixel-8":{platform:"android",name:"Pixel 8",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:d},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:48,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:d},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:d},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:p},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:824,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:a,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:a,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:p}},u="iphone-17-pro";function b(e){return h[e]}function g(){return Object.keys(h)}var n={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"ipad-13":{name:"ipad-13",label:'iPad 13"',width:2064,height:2752,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},s={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},S={color:"#25c3ec",blur:120,spread:52,opacity:.34},P="iphone-17-pro";function v(e){return Object.prototype.hasOwnProperty.call(n,e)?n[e]:null}function f(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(r=>({...r}))}}function x(e){return Object.prototype.hasOwnProperty.call(s,e)?f(s[e]):null}var c={deviceModel:{type:"enum",default:u,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:g(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:e=>e>=.5&&e<=2},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showTopBar:{type:"boolean",default:!0,description:"show simulator top bar",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},threeRecordingEditor:{type:"boolean",default:!1,description:"dock the 3d recording editor in the 3d stage (toggled from its rail)",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(n),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(s),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},errorReporting:{type:"boolean",default:!1,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"},onboardingComplete:{type:"boolean",default:!1,description:"first-run onboarding completed",group:"beta"},betaConsentVersion:{type:"number",default:0,description:"last accepted beta telemetry policy version",group:"beta"},detailedTelemetry:{type:"boolean",default:!0,description:"send detailed usage telemetry (sessions, perf samples)",group:"beta"}};function y(){if(typeof window>"u")return{};let e={};try{let r=new URLSearchParams(window.location.search),i=r.get("device");i&&c.deviceModel.options?.includes(i)&&(e.deviceModel=i);let l=r.get("colorScheme")??r.get("theme");l&&c.colorScheme.options?.includes(l)&&(e.colorScheme=l)}catch{}return e}function H(){let e={};for(let[r,i]of Object.entries(c))e[r]=i.default;return Object.assign(e,y()),e}export{S as a,P as b,v as c,f as d,x as e,h as f,b as g,g as h,c as i,y as j,H as k};
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
var o={width:3,lock:{top:253,height:103},ringToggle:{top:152,height:32},volumeUp:{top:214,height:61},volumeDown:{top:290,height:61}},m={width:2.5,lock:{top:130,height:78},ringToggle:{top:94,height:22},volumeUp:{top:126,height:48},volumeDown:{top:188,height:48}},c={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},p={width:3,lock:{top:248,height:72},ringToggle:{top:-1e3,height:0},volumeUp:{top:144,height:62},volumeDown:{top:216,height:62}},r=48;function t(e){return{...e,platform:"ios",navigationBarHeight:0,navigationBarMode:e.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:e.dynamicIsland?e.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:e.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:e.name}}var h={"iphone-se":t({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:m}),"iphone-14":t({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:55,dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15":t({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-plus":t({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro":t({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro-max":t({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-16":t({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-plus":t({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro":t({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro-max":t({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17":t({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-air":t({name:"iPhone 17 Air",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro":t({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro-max":t({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"ipad-pro-13":t({name:'iPad Pro 13"',width:1032,height:1376,scale:2,statusBarHeight:24,homeIndicatorHeight:20,cornerRadius:18,dynamicIsland:null,safeAreaInsets:{top:24,bottom:20,left:0,right:0},iosVersion:"18.2",physicalPPI:264,hardwareButtons:o}),"pixel-8":{platform:"android",name:"Pixel 8",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:c},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:48,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:c},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:c},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:p},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:824,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:p}},u="iphone-17-pro";function S(e){return h[e]}function g(){return Object.keys(h)}var i={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"ipad-13":{name:"ipad-13",label:'iPad 13"',width:2064,height:2752,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},s={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},v={color:"#25c3ec",blur:120,spread:52,opacity:.34},w="iphone-17-pro";var f=[{name:"white",value:"#ffffff"},{name:"gray-light",value:"#d1d5db"},{name:"gray",value:"#6b7280"},{name:"gray-dark",value:"#3b4350"},{name:"slate",value:"#2a3644"},{name:"black",value:"#000000"},{name:"cyan",value:"#25c3ec"},{name:"blue",value:"#3f7cff"},{name:"teal",value:"#1fc7b4"},{name:"green",value:"#42c95d"},{name:"lime",value:"#92d21b"},{name:"gold",value:"#f5c518"},{name:"orange",value:"#ff912e"},{name:"coral",value:"#ff6f5b"},{name:"red",value:"#ff4f6f"},{name:"berry",value:"#d054ff"},{name:"magenta",value:"#ff4eb8"}],B=Object.fromEntries(f.map(e=>[e.name,e.value]));function x(e){return Object.prototype.hasOwnProperty.call(i,e)?i[e]:null}function b(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(n=>({...n}))}}function I(e){return Object.prototype.hasOwnProperty.call(s,e)?b(s[e]):null}var d={deviceModel:{type:"enum",default:u,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:g(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:e=>e>=.5&&e<=2},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showTopBar:{type:"boolean",default:!0,description:"show simulator top bar",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},threeRecordingEditor:{type:"boolean",default:!1,description:"dock the 3d recording editor in the 3d stage (toggled from its rail)",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(i),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(s),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},errorReporting:{type:"boolean",default:!1,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"},onboardingComplete:{type:"boolean",default:!1,description:"first-run onboarding completed",group:"beta"},betaConsentVersion:{type:"number",default:0,description:"last accepted beta telemetry policy version",group:"beta"},detailedTelemetry:{type:"boolean",default:!0,description:"send detailed usage telemetry (sessions, perf samples)",group:"beta"}};function y(){if(typeof window>"u")return{};let e={};try{let n=new URLSearchParams(window.location.search),a=n.get("device");a&&d.deviceModel.options?.includes(a)&&(e.deviceModel=a);let l=n.get("colorScheme")??n.get("theme");l&&d.colorScheme.options?.includes(l)&&(e.colorScheme=l)}catch{}return e}function R(){let e={};for(let[n,a]of Object.entries(d))e[n]=a.default;return Object.assign(e,y()),e}export{v as a,w as b,x as c,b as d,I as e,h as f,S as g,g as h,d as i,y as j,R as k};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{l as c}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{l as c}from"./chunk-HW5YHSIE.js";import{chmodSync as m,existsSync as g,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as l,join as D,resolve as p}from"node:path";var s=1,S="SOOTSIM_SHARED_AUTH_FILE",u="https://sootbean.com";function v(){let t=process.env[S];return t?.trim()?l(p(t)):c()}function a(){let t=process.env[S];return t?.trim()?p(t):D(v(),"desktop-auth.json")}function f(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0}}function w(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:f(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function O(){let t=a();if(!g(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=w(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function I(t){let e=a();k(l(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?f(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
|
|
3
3
|
`);try{m(e,384)}catch{}return r}function d(){i(a(),{force:!0})}async function N(t){let e=O();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return d(),null;if(!n.ok)return e;let o=await n.json();return o.user?.id?I({token:e.token,user:o.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(d(),null)}catch{return e}}export{O as a,I as b,d as c,N as d};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as p}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as p}from"./chunk-KBJ2WHII.js";import{d as c,e as l}from"./chunk-LQ5BA5JU.js";import{a}from"./chunk-O624O5MO.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
|
|
3
3
|
sootsim ${e} needs auth before it can check recording access.
|
|
4
4
|
|
|
5
5
|
pick one:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var d=Object.defineProperty;var e=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var f=(a,b)=>{for(var c in b)d(a,c,{get:b[c],enumerable:!0})};export{e as a,f as b};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as k,c as T,e as C}from"./chunk-IB4BRND4.js";import{E as v,F as P}from"./chunk-HW5YHSIE.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
|
+
`)}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
|
+
\u26A0 ${o.i} other CLI identity/identities are driving this sim
|
|
5
|
+
taps, scrolls, and keyboard input from multiple agents will collide on
|
|
6
|
+
the same screen state (this is not a bridge throughput limit).
|
|
7
|
+
use \`sootsim open --new\` for an isolated sim per agent.
|
|
8
|
+
|
|
9
|
+
`)),o.error?o.o?c.reject(new w(o.error,o.o)):c.reject(new Error(o.error)):c.resolve(o.result))}),r.on("close",(s,o)=>{let c=o?.toString()||"connection closed";for(let[m,u]of a)a.delete(m),u.reject(new Error(`sim disconnected: ${c} (code ${s})`))}),{async send(s,o){let c=o?.timeoutMs??d,m=async u=>{await p;let f=i++;return new Promise((A,S)=>{let B=setTimeout(()=>{a.delete(f),S(new Error(`command timed out after ${Math.round(c/1e3)}s`))},c);a.set(f,{resolve:h=>{clearTimeout(B),A(h)},reject:h=>{clearTimeout(B),S(h)}});let b={...s,id:f};b.simId===void 0&&u&&(b.simId=u),l(s.type??"",b.simId),r.send(JSON.stringify(b))})};try{return await m(t.simId)}catch(u){let f=u instanceof Error?u.message:String(u);throw t.simIdSource==="saved"&&t.simId&&s.simId===void 0&&f===`no sim connected with id ${t.simId}`?(C(),new Error(`saved sim ${t.simId} is gone; run \`sootsim list\` and \`sootsim use <sim>\`, or open a fresh sim`)):u}},async listSims(){let s=await this.send({type:"bridge:list-sims"});return Array.isArray(s)?s:[]},async openUrl(s,o={}){return this.send({type:"bridge:open",url:s,newWindow:o.newWindow===!0})},async focusSim(s){return this.send({type:"focus",simId:s})},async closeSim(s){return this.send({type:"close",simId:s})},async claim(s,o={}){return await this.send({type:"bridge:claim",simId:s,force:o.force===!0})},close(){try{r.readyState===I.OPEN&&r.send(JSON.stringify({type:"bridge:bye",id:0}))}catch{}r.close();let s=setTimeout(()=>{r.readyState!==I.CLOSED&&r.terminate()},250)}}}function V(e){return W(e.wsPort,{commandTimeoutMs:e.commandTimeoutMs,simId:e.simId,simIdSource:e.simIdSource})}function E(e,t){let i=e.filter(r=>r.readyState==="open"&&r.id!==t),d=i.find(r=>r.userFocused)??i.find(r=>r.userVisible===!0&&r.isPrimary)??i.find(r=>r.userVisible===!0)??i.find(r=>r.isPrimary);if(!d)return null;let a=[d.isPrimary?"primary":null,d.userVisible===!1?"hidden":d.userVisible===!0?"visible":null,d.userFocused?"focused":null].filter(Boolean);return`${d.id}${a.length?` [${a.join(", ")}]`:""}`}async function _(e){try{let t=await e.send({type:"evaluate",code:`(() => ({
|
|
10
|
+
hidden: document.hidden,
|
|
11
|
+
visibilityState: document.visibilityState,
|
|
12
|
+
hasFocus: typeof document.hasFocus === 'function' ? document.hasFocus() : null,
|
|
13
|
+
simId: window.__sootsimBridge?.id ?? window.SootSim?.state?.simId ?? null,
|
|
14
|
+
url: location.href
|
|
15
|
+
}))()`}),i=typeof t=="object"&&t!==null?t:{hidden:t===!0};if(i.hidden===!0===!0){let a=null;try{a=E(await e.listSims(),i.simId)}catch{}return process.stderr.write(`
|
|
16
|
+
\u26A0 target sim${i.simId?` ${i.simId}`:""} is hidden (document.hidden = true)
|
|
17
|
+
`+(i.visibilityState?` visibility: ${i.visibilityState}
|
|
18
|
+
`:"")+` animations and rAF callbacks are throttled \u2014 coordinates may be wrong
|
|
19
|
+
and launch/transition animations will not complete.
|
|
20
|
+
`+(a?` another open sim looks usable: ${a}; target it with --sim.
|
|
21
|
+
`:" run `sootsim list` to find the visible sim and target it with --sim.\n")+` page-level window.focus() cannot unhide a browser tab.
|
|
22
|
+
|
|
23
|
+
`),{hidden:!0,warned:!0,simId:i.simId}}return{hidden:!1,warned:!1,simId:i.simId}}catch{return{hidden:!1,warned:!1}}}async function j(e,t,i={}){let d={type:"evaluate",code:t};return i.acquireLock&&(d.acquireLock=!0),e.send(d)}async function D(e,t,...i){return e.send({type:"call",path:t,args:i})}async function q(e,t,...i){return e.send({type:"call",path:t,args:i,acquireLock:!0})}export{$ as a,w as b,R as c,W as d,V as e,_ as f,j as g,D as h,q as i};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as L}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as L}from"./chunk-TLTS533S.js";import{existsSync as o,readFileSync as p,writeFileSync as d}from"node:fs";import{homedir as j}from"node:os";import{dirname as $,join as s,resolve as P}from"node:path";var _=j();function Q(e){let t=e;for(;;){if(o(s(t,"pnpm-workspace.yaml"))||o(s(t,"turbo.json"))||o(s(t,"nx.json"))||o(s(t,"lerna.json")))return t;let r=s(t,"package.json");if(o(r))try{if(JSON.parse(p(r,"utf8")).workspaces)return t}catch{}let n=$(t);if(n===t)return null;t=n}}function S(e,t){let r=Q(process.cwd()),n=[r?P(r,e):null,P(process.cwd(),e),P(process.cwd(),t)].filter(a=>!!a);for(let a of n)if(o(a))return a;return n[0]??P(process.cwd(),e)}var X=()=>S("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),z=()=>S("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),Z=()=>S("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),ee=()=>S("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),v=()=>S("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),D={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},te=s(_,"github/mattermost-mobile"),I=s(_,"github/uniswap-interface"),ne=s(I,"apps/mobile"),T=s(I,".env.defaults.local"),re="stored-in-.env.local",W="# sootsim demo env overrides",se=s(I,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),oe=s(I,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),M="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function B(e){if(!o(e))return{};let t={},r=p(e,"utf8");for(let n of r.split(/\r?\n/)){let a=n.trim();if(!a||a.startsWith("#"))continue;let u=a.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!u)continue;let i=u[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[u[1]]=i}return t}function k(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(re)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function Y(e,t){for(let r of e)for(let n of t){let a=r[n];if(k(a))return a.trim()}}function J(){let e=B(T),t=B(s(I,"apps/web/.env")),r=[process.env,e,t],n={},a=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,l]of a){let R=Y(r,[i,...l]);if(R){n[i]=R;for(let m of l)n[m]=R}}if(!(k(n.TRADING_API_KEY)&&k(n.UNISWAP_API_KEY))){let i=Y(r,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";n.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",n.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",n.GRAPHQL_URL_OVERRIDE=i,n.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",n.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return n}function ae(){let e=o(T)?p(T,"utf8"):"";if(e&&!e.includes(W))return;let t=J(),r=[W];for(let[n,a]of Object.entries(t).sort(([u],[i])=>u.localeCompare(i)))r.push(`${n}=${JSON.stringify(a)}`);r.push(""),d(T,`${r.join(`
|
|
3
3
|
`)}
|
|
4
4
|
`)}function ie(){let e=`export function useForceUpgradeStatus(): ForceUpgradeStatus {
|
|
5
5
|
`,t=` // sootsim demo: bypass the force-upgrade gate during local engine demos.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
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-
|
|
1
|
+
/*! sootsim v0.1.67 | (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-HW5YHSIE.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,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{i as n}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{i as n}from"./chunk-NYR3Z44O.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
|
|
3
3
|
`)}export{g as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{execFileSync as h,spawn as g}from"child_process";import{existsSync as s,readdirSync as k}from"fs";import{dirname as m,join as l,resolve as a}from"path";import{fileURLToPath as v}from"url";var c;function p(){if(c!==void 0)return c;try{c=m(v(import.meta.resolve("sootsim-engine/package.json")))}catch{c=null}return c}var I="dev.sootsim.simulator";function x(){let n=p();if(!n)return null;let e=l(n,"dist-electron/main.cjs");if(!s(e))return null;let i=D(n);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:n}:null}function b(){let n=p();return n?s(l(n,"src-electron/main.ts")):!1}function D(n){let e=n;for(let i=0;i<6;i++){let t=l(e,"node_modules/.bin/electron");if(s(t))return t;let r=m(e);if(r===e)break;e=r}return null}function C(){let n=p(),i=["/Applications/sootsim.app",a(process.env.HOME||"","Applications/sootsim.app"),...n?[a(n,"app/sootsim.app")]:[]].find(t=>s(t));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let t=h("mdfind",[`kMDItemCFBundleIdentifier == "${I}"`],{encoding:"utf8",timeout:3e3}).trim();if(t)return{path:t.split(`
|
|
3
3
|
`)[0],platform:"darwin",kind:"mac-app"}}catch{}return null}function f(n){if(!s(n))return null;let e=k(n).filter(i=>i.startsWith("sootsim")&&i.endsWith(".AppImage")).sort().reverse()[0];return e?l(n,e):null}function w(){let n=p(),i=[a(process.env.HOME||"","Applications/sootsim.AppImage"),a(process.env.HOME||"",".local/bin/sootsim.AppImage"),"/opt/sootsim/sootsim.AppImage","/opt/sootsim/sootsim",...n?[a(n,"app/sootsim.AppImage"),a(n,"release/linux-unpacked/sootsim")]:[]].find(r=>s(r));if(i)return{path:i,platform:"linux",kind:i.endsWith(".AppImage")?"linux-appimage":"linux-binary"};let t=n?f(a(n,"app"))||f(a(n,"release")):null;return t?{path:t,platform:"linux",kind:"linux-appimage"}:null}function A(){let n=x();if(n)return n;if(b()){let e=p(),i=l(e,"dist-electron/main.cjs");return s(i)?console.error(` no node_modules/.bin/electron found near ${e}. run \`bun install\`.`):console.error(` dist-electron/main.cjs missing in ${e}.
|
|
4
4
|
run: bun run --cwd packages/sootsim-engine build:electron-main
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{execFileSync as p,spawn as l}from"child_process";import{existsSync as s}from"fs";import{homedir as u}from"os";import{join as d}from"path";var g=["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","~/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","/Applications/Chromium.app/Contents/MacOS/Chromium","~/Applications/Chromium.app/Contents/MacOS/Chromium","/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","~/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","~/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","/Applications/Arc.app/Contents/MacOS/Arc","~/Applications/Arc.app/Contents/MacOS/Arc"],f=["/usr/bin/google-chrome","/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/microsoft-edge","/usr/bin/brave-browser","/snap/bin/chromium"],h=["C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe","C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"],C=["google-chrome","chromium","chromium-browser","microsoft-edge","brave-browser"],O=["chrome","msedge","brave"];function w(r){return r.startsWith("~/")?d(u(),r.slice(2)):r}function a(r){for(let n of r){let o=w(n);if(s(o))return o}return null}function U(r,n){try{let e=p(n==="win32"?"where":"which",[r],{encoding:"utf8",timeout:1500,stdio:["ignore","pipe","ignore"]}).trim();return e?e.split(/\r?\n/)[0]:null}catch{return null}}function M(r=process.platform){let n=process.env.CHROME_PATH||process.env.CHROMIUM_PATH;if(n&&s(n))return n;let o=a(r==="darwin"?g:r==="win32"?h:f);if(o)return o;let e=r==="win32"?O:C;for(let t of e){let i=U(t,r);if(i)return i}return null}function A(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform;return n.newWindow?c(r,{...n,platform:o,newWindow:!0}):o==="darwin"?{command:"open",args:n.background===!1?[r]:["-g",r],via:"system"}:o==="win32"?{command:"cmd",args:["/c","start","",r],via:"system"}:{command:"xdg-open",args:[r],via:"system"}}function c(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform,e="chromiumBinary"in n?n.chromiumBinary:M(o);if(!e)throw new Error("browser launch requires Chrome, Chromium, Edge, Brave, or Arc");let t=[];return n.newWindow!==!1&&t.push("--new-window"),t.push(r),{command:e,args:t,via:"chromium",target:e}}async function m(r,n,o){return new Promise((e,t)=>{let i=l(r,n,{detached:o,stdio:"ignore"});i.once("error",t),i.once("spawn",()=>{o&&i.unref(),e(i.pid)})})}async function x(r,n={}){let o=A(r,n),e=await m(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function y(r,n={}){let o=c(r,n),e=await m(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function E(r,n={}){await x(r,n)}export{M as a,x as b,y as c,E as d};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-TLTS533S.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-
|
|
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-OTALJKK5.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-OTALJKK5.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.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-TLTS533S.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:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.67 | (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-MIAAZSSE.js";import"./chunk-K4PKR2EO.js";import"./chunk-CUNQTNH4.js";import"./chunk-AQ7YR4MO.js";import"./chunk-XCRUPKWB.js";import"./chunk-7PQHQOCI.js";import"./chunk-ZO7SGE65.js";import"./chunk-GFVC6EEB.js";import"./chunk-5WRBVYML.js";import"./chunk-ZP2HMCKS.js";import"./chunk-SVFSMAZN.js";import"./chunk-U47AHSGE.js";import"./chunk-IB4BRND4.js";import"./chunk-6O64VUC6.js";import"./chunk-HW5YHSIE.js";import"./chunk-TLTS533S.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.
|
|
2
|
-
import{c as I,e as N,i as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as I,e as N,i as S}from"./chunk-U47AHSGE.js";import"./chunk-IB4BRND4.js";import"./chunk-6O64VUC6.js";import"./chunk-HW5YHSIE.js";import"./chunk-TLTS533S.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.
|
|
2
|
-
import{a as T,b as _}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as T,b as _}from"./chunk-DOWYG3HG.js";import"./chunk-O624O5MO.js";import"./chunk-6O64VUC6.js";import{g as I,o as C,p as w,q as B}from"./chunk-HW5YHSIE.js";import{a as W}from"./chunk-TLTS533S.js";import{execFileSync as tt,spawnSync as n}from"child_process";import{existsSync as a,mkdirSync as v,readFileSync as et,rmSync as S,writeFileSync as R}from"fs";import{homedir as $}from"os";import{dirname as U,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as H,mkdirSync as D,rmSync as K,writeFileSync as L}from"fs";import{dirname as P}from"path";var X="dev.sootsim.daemon",N="SootSim Daemon",O="0.1.36";function F(t,e,r){let o=w(),s=B(),i=P(P(s)),f=P(s),u=`${i}/Resources`;K(o,{recursive:!0,force:!0}),D(C(),{recursive:!0}),D(f,{recursive:!0}),D(u,{recursive:!0}),L(`${i}/Info.plist`,Q()),L(`${i}/PkgInfo`,"APPL????"),L(s,z(t,e,r)),H(s,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:s}}function Q(){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.
|
|
2
|
-
import{
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{e as f,l as T}from"./chunk-CUNQTNH4.js";import{F as A,G as D,H as O,I as x,J as v}from"./chunk-AQ7YR4MO.js";import{c as S,e as $,g as N}from"./chunk-U47AHSGE.js";import"./chunk-IB4BRND4.js";import"./chunk-6O64VUC6.js";import"./chunk-HW5YHSIE.js";import"./chunk-TLTS533S.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,8 +167,8 @@ 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-
|
|
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
|
|
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-ZARO3HQ4.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
|
+
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;
|
|
174
174
|
return {
|
|
@@ -179,4 +179,4 @@ examples:
|
|
|
179
179
|
removed: d.removed,
|
|
180
180
|
changed: d.changed,
|
|
181
181
|
};
|
|
182
|
-
})()`,m=await c(t,s);console.log(a(m,n));break}case"clear-snapshots":{let e=r[0],o=e?`window.__sootsimDebug.clearSnapshots(${JSON.stringify(e)})`:"window.__sootsimDebug.clearSnapshots()";await c(t,o),console.log(a({cleared:e||"all"},n));break}case"find":{let e=r[0];if(e==="sheets"||e==="portals"){let o=await
|
|
182
|
+
})()`,m=await c(t,s);console.log(a(m,n));break}case"clear-snapshots":{let e=r[0],o=e?`window.__sootsimDebug.clearSnapshots(${JSON.stringify(e)})`:"window.__sootsimDebug.clearSnapshots()";await c(t,o),console.log(a({cleared:e||"all"},n));break}case"find":{let e=r[0];if(e==="sheets"||e==="portals"){let o=await O(t,e);console.log(a(o,n))}else console.error(" usage: sootsim debug find <sheets|portals>"),process.exit(1);break}case"trace":{let e=r[0],o=r[1];if(e==="anim"){let s=r[1];if((!s||s==="--help"||s==="-h")&&(console.error(" usage: sootsim debug trace anim <on|off|status|clear|<id>> [id|limit]"),process.exit(1)),s==="on"){let d=r[2]??"all",p=r[3]?Number(r[3]):void 0,h=d==="all"?"all":Number(d);h!=="all"&&!Number.isFinite(h)&&(console.error(` invalid target: ${d}`),process.exit(1)),await f(t,"enableAnimationTrace",h,p);let F=await f(t,"listAnimationTraces");console.log(a({enabled:h,traces:F},n));break}if(s==="off"){let d=r[2]??"all",p=d==="all"?"all":Number(d);p!=="all"&&!Number.isFinite(p)&&(console.error(` invalid target: ${d}`),process.exit(1)),await f(t,"disableAnimationTrace",p),console.log(a({disabled:p},n));break}if(s==="status"||s==="clear"){s==="clear"&&await f(t,"disableAnimationTrace","all");let d=await f(t,"listAnimationTraces");console.log(a({traces:d},n));break}let m=Number(s);Number.isFinite(m)||(console.error(` invalid id: ${s}`),process.exit(1));let C=r[2]?Number(r[2]):void 0,E=await f(t,"getAnimationTrace",m,C);console.log(a({id:m,samples:E},n));break}if(e!=="shell"&&(console.error(" usage: sootsim debug trace <shell|anim> [args]"),process.exit(1)),!o||/^[0-9]+$/.test(o)){let s=o?Number(o):50,m=await c(t,J(s));console.log(a(m,n));break}if(o==="on"){let s=r[2]?Number(r[2]):240,m=await c(t,w("on",s));console.log(a(m,n));break}if(o==="off"){let s=await c(t,w("off"));console.log(a(s,n));break}if(o==="clear"){let s=await c(t,w("clear"));console.log(a(s,n));break}if(o==="status"){let s=await c(t,w("status"));console.log(a(s,n));break}console.error(" usage: sootsim debug trace shell [on [limit]|off|status|clear|recentLimit]"),process.exit(1)}case"record":{let e=r[0],s=await c(t,`window.__sootsimDebug.record(${e==="on"?"true":e==="off"?"false":"undefined"})`);console.log(a({recording:s},n));break}case"recent":{let e=r[0],o=r[1]?Number(r[1]):50,s=await x(t,e,o);console.log(a(s,n));break}case"clear-events":{await c(t,"window.__sootsimDebug.clearEvents()"),console.log(a({cleared:!0},n));break}default:console.error(` unknown subcommand: ${k}`),L(),process.exit(1)}}catch(e){console.error(` debug failed: ${e.message}`),await T(t,{errorsCommand:`sootsim get errors 5${y}`,warningsCommand:`sootsim get warnings 5${y}`,requestsCommand:`sootsim get requests 5${y}`}),process.exit(1)}finally{t.close()}}export{Y as runDebug};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as S}from"./chunk-2HKCZLY7.js";import"./chunk-4QSGVTBE.js";import"./chunk-KR36VJSN.js";import"./chunk-SH6HMUCY.js";import"./chunk-KBJ2WHII.js";import"./chunk-LQ5BA5JU.js";import"./chunk-EJTXYZEF.js";import"./chunk-MIAAZSSE.js";import"./chunk-K4PKR2EO.js";import"./chunk-CUNQTNH4.js";import"./chunk-AQ7YR4MO.js";import"./chunk-XCRUPKWB.js";import"./chunk-7PQHQOCI.js";import"./chunk-ZO7SGE65.js";import"./chunk-GFVC6EEB.js";import"./chunk-5WRBVYML.js";import"./chunk-ZP2HMCKS.js";import"./chunk-ZJJKYJMH.js";import"./chunk-SVFSMAZN.js";import"./chunk-DOWYG3HG.js";import"./chunk-O624O5MO.js";import"./chunk-BCVVANS5.js";import"./chunk-NYR3Z44O.js";import"./chunk-U47AHSGE.js";import"./chunk-IB4BRND4.js";import"./chunk-6O64VUC6.js";import"./chunk-HW5YHSIE.js";import"./chunk-TLTS533S.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.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-KR36VJSN.js";import"./chunk-ZJJKYJMH.js";import"./chunk-BCVVANS5.js";import{f as c,g as r,h as g}from"./chunk-NYR3Z44O.js";import{c as d,e as l,h as a}from"./chunk-U47AHSGE.js";import"./chunk-IB4BRND4.js";import"./chunk-6O64VUC6.js";import"./chunk-HW5YHSIE.js";import"./chunk-TLTS533S.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.
|
|
2
|
-
import{c as E,e as R,h as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as E,e as R,h as b}from"./chunk-U47AHSGE.js";import{b as v}from"./chunk-IB4BRND4.js";import"./chunk-6O64VUC6.js";import"./chunk-HW5YHSIE.js";import"./chunk-TLTS533S.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.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-TEMZK6Q2.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-7PQHQOCI.js";import"./chunk-ZO7SGE65.js";import"./chunk-GFVC6EEB.js";import"./chunk-5WRBVYML.js";import"./chunk-ZP2HMCKS.js";import"./chunk-HW5YHSIE.js";import"./chunk-TLTS533S.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.
|
|
2
|
-
import{a as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-ATRGAFJD.js";import"./chunk-TEMZK6Q2.js";import{a as v,f as h}from"./chunk-MIAAZSSE.js";import"./chunk-K4PKR2EO.js";import"./chunk-CUNQTNH4.js";import"./chunk-AQ7YR4MO.js";import"./chunk-XCRUPKWB.js";import{b as f,g as u}from"./chunk-7PQHQOCI.js";import{a as p}from"./chunk-ZO7SGE65.js";import"./chunk-GFVC6EEB.js";import{c as m}from"./chunk-5WRBVYML.js";import"./chunk-ZP2HMCKS.js";import"./chunk-SVFSMAZN.js";import"./chunk-U47AHSGE.js";import"./chunk-IB4BRND4.js";import"./chunk-6O64VUC6.js";import"./chunk-HW5YHSIE.js";import"./chunk-TLTS533S.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-
|
|
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-4GH5I7SC.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.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as c,b as d,c as e,d as f}from"./chunk-2HKCZLY7.js";import"./chunk-4QSGVTBE.js";import"./chunk-KR36VJSN.js";import"./chunk-SH6HMUCY.js";import"./chunk-KBJ2WHII.js";import"./chunk-LQ5BA5JU.js";import{d as a,e as b}from"./chunk-EJTXYZEF.js";import"./chunk-MIAAZSSE.js";import"./chunk-K4PKR2EO.js";import"./chunk-CUNQTNH4.js";import"./chunk-AQ7YR4MO.js";import"./chunk-XCRUPKWB.js";import"./chunk-7PQHQOCI.js";import"./chunk-ZO7SGE65.js";import"./chunk-GFVC6EEB.js";import"./chunk-5WRBVYML.js";import"./chunk-ZP2HMCKS.js";import"./chunk-ZJJKYJMH.js";import"./chunk-SVFSMAZN.js";import"./chunk-DOWYG3HG.js";import"./chunk-O624O5MO.js";import"./chunk-BCVVANS5.js";import"./chunk-NYR3Z44O.js";import"./chunk-U47AHSGE.js";import"./chunk-IB4BRND4.js";import"./chunk-6O64VUC6.js";import"./chunk-HW5YHSIE.js";import"./chunk-TLTS533S.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.
|
|
2
|
-
import{b as n,c as r,d as l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.67 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as n,c as r,d as l}from"./chunk-42NMKOVE.js";import"./chunk-IB4BRND4.js";import"./chunk-TLTS533S.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};
|