sootsim 0.1.186 → 0.1.188
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-HOCS7BA7.js → agent-BRLC23GZ.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-OFIKO65K.js → agent-wrapper-HDWSAABN.js} +2 -2
- package/dist-cli/chunks/{app-fonts-PXVMBZZ7.js → app-fonts-KQHDDWAH.js} +2 -2
- package/dist-cli/chunks/{assert-OZS6AXZE.js → assert-BA3G3DLH.js} +2 -2
- package/dist-cli/chunks/beta-O43XI622.js +2 -0
- package/dist-cli/chunks/{camera-QJ2PKIJB.js → camera-22Q4QVTC.js} +2 -2
- package/dist-cli/chunks/{chunk-RAY2ZSNI.js → chunk-2MRFRROI.js} +2 -2
- package/dist-cli/chunks/{chunk-FUHNIWFL.js → chunk-2T6Z4WCN.js} +1 -1
- package/dist-cli/chunks/{chunk-RP5CVR6O.js → chunk-3ECPODR2.js} +3 -3
- package/dist-cli/chunks/{chunk-XFQOFRYY.js → chunk-4JG6GDLB.js} +1 -1
- package/dist-cli/chunks/{chunk-FN64EREO.js → chunk-5D6TXWZQ.js} +2 -2
- package/dist-cli/chunks/{chunk-LV7DFIBL.js → chunk-5U22ZNDP.js} +1 -1
- package/dist-cli/chunks/{chunk-BU5CRHHR.js → chunk-5XZN2C22.js} +2 -2
- package/dist-cli/chunks/{chunk-TYV3FMBE.js → chunk-6LAPS7RP.js} +2 -2
- package/dist-cli/chunks/{chunk-6OQVIQY7.js → chunk-AUQ7FZIX.js} +2 -2
- package/dist-cli/chunks/{chunk-INIASYOZ.js → chunk-B272R3FA.js} +1 -1
- package/dist-cli/chunks/{chunk-4HVMPXJZ.js → chunk-BJMQRL7V.js} +1 -1
- package/dist-cli/chunks/{chunk-PTUTIFWJ.js → chunk-BZNPGYJQ.js} +1 -1
- package/dist-cli/chunks/{chunk-KNICGV7H.js → chunk-D6GYUATH.js} +1 -1
- package/dist-cli/chunks/{chunk-WFSLSEGX.js → chunk-DBOVJCG5.js} +2 -2
- package/dist-cli/chunks/{chunk-UATE6GSA.js → chunk-DKOKNFWR.js} +2 -2
- package/dist-cli/chunks/{chunk-DPXVA7ZF.js → chunk-ERHMPVNZ.js} +2 -2
- package/dist-cli/chunks/{chunk-ZE2O7AA5.js → chunk-FHHOZTPI.js} +2 -2
- package/dist-cli/chunks/{chunk-GNGEYMS3.js → chunk-FUZNRCAR.js} +2 -2
- package/dist-cli/chunks/{chunk-353E6UCU.js → chunk-FXHED7P5.js} +2 -2
- package/dist-cli/chunks/{chunk-VPUJQTEO.js → chunk-GAP76GG5.js} +1 -1
- package/dist-cli/chunks/{chunk-MPUCQL3Q.js → chunk-HGER3AOP.js} +1 -1
- package/dist-cli/chunks/{chunk-RDM3LVH2.js → chunk-HIS4TFND.js} +2 -2
- package/dist-cli/chunks/{chunk-6MJVRIUP.js → chunk-HXEGZCLS.js} +1 -1
- package/dist-cli/chunks/{chunk-MAGDSBXT.js → chunk-I52NHG4X.js} +1 -1
- package/dist-cli/chunks/{chunk-VGAD3CMW.js → chunk-IULK4TUU.js} +1 -1
- package/dist-cli/chunks/chunk-JOE4R2PO.js +1 -0
- package/dist-cli/chunks/{chunk-YYZGAZQI.js → chunk-KOEBHC3D.js} +2 -2
- package/dist-cli/chunks/{chunk-ZJ64K2PL.js → chunk-MXYAGDBC.js} +2 -2
- package/dist-cli/chunks/{chunk-POOE26UD.js → chunk-NCENLBIL.js} +2 -2
- package/dist-cli/chunks/{chunk-QBLTH2F6.js → chunk-NDAGMI4C.js} +1 -1
- package/dist-cli/chunks/{chunk-P5UT637B.js → chunk-OXB6RPMX.js} +2 -2
- package/dist-cli/chunks/{chunk-5XIRXMOS.js → chunk-PCKWE63K.js} +113 -97
- package/dist-cli/chunks/chunk-QCDWRDUC.js +1 -0
- package/dist-cli/chunks/{chunk-MP4CRGWM.js → chunk-QDUHROO5.js} +1 -1
- package/dist-cli/chunks/{chunk-NYYP5QQK.js → chunk-SGZP6JCZ.js} +2 -2
- package/dist-cli/chunks/{chunk-N3PLEUYD.js → chunk-SVSZFGNA.js} +2 -2
- package/dist-cli/chunks/{chunk-I65LTDPY.js → chunk-TAXDBR5N.js} +3 -3
- package/dist-cli/chunks/{chunk-WBPTJ3WC.js → chunk-TPHYWQB2.js} +2 -2
- package/dist-cli/chunks/{chunk-V434ATFM.js → chunk-V7V6WDIM.js} +2 -2
- package/dist-cli/chunks/{chunk-2B2D2EBR.js → chunk-WST3QKHD.js} +2 -2
- package/dist-cli/chunks/{chunk-OMFESSKA.js → chunk-Y3I43AUV.js} +1 -1
- package/dist-cli/chunks/{chunk-XQ6PPMM6.js → chunk-YNY3WSH4.js} +1 -1
- package/dist-cli/chunks/{chunk-U3BTJLRM.js → chunk-ZZ7FODQE.js} +2 -2
- package/dist-cli/chunks/{chunk-O2SQQXUO.js → chunk-ZZTGVTE3.js} +1 -1
- package/dist-cli/chunks/cli-version-74E3VGPF.js +2 -0
- package/dist-cli/chunks/{compat-BNXJOVMU.js → compat-6QHB5UPF.js} +3 -3
- package/dist-cli/chunks/control-A2KALMZE.js +2 -0
- package/dist-cli/chunks/{cpu-profile-3KXOGOJP.js → cpu-profile-A3ST63G2.js} +2 -2
- package/dist-cli/chunks/daemon-KBQK2QRU.js +2 -0
- package/dist-cli/chunks/{debug-B3MN6772.js → debug-OTEVKM5L.js} +11 -9
- package/dist-cli/chunks/{detox-YKSX4DUO.js → detox-MISIYJRV.js} +2 -2
- package/dist-cli/chunks/{device-NZX6AKQI.js → device-R3BORN7B.js} +2 -2
- package/dist-cli/chunks/{diagnose-26HE6KS5.js → diagnose-G7UE2PUJ.js} +2 -2
- package/dist-cli/chunks/drivers-4URQ5PMT.js +2 -0
- package/dist-cli/chunks/{electron-XEUWIM47.js → electron-DXMMDHR3.js} +3 -3
- package/dist-cli/chunks/flow-OETRQOLM.js +2 -0
- package/dist-cli/chunks/help-FSZ5FRHV.js +2 -0
- package/dist-cli/chunks/{hints-C56M4PMW.js → hints-QJSWKWC5.js} +2 -2
- package/dist-cli/chunks/{home-paths-EYH3RBPS.js → home-paths-EJFFLJZR.js} +2 -2
- package/dist-cli/chunks/inspect-EFTHNTN2.js +2 -0
- package/dist-cli/chunks/{install-desktop-UWHLWFKB.js → install-desktop-F43JZSJO.js} +3 -3
- package/dist-cli/chunks/{keys-Q37NM52E.js → keys-P2HBCVAX.js} +2 -2
- package/dist-cli/chunks/{login-6E6ZEJRF.js → login-3ZNZJ7P4.js} +4 -4
- package/dist-cli/chunks/{logout-A7QHH6DQ.js → logout-34JBFFT4.js} +2 -2
- package/dist-cli/chunks/{maestro-YJRGFGDQ.js → maestro-JYCD7OQT.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-MM6GWJNB.js +2 -0
- package/dist-cli/chunks/{preview-3OYFVL4A.js → preview-PIEAC5MZ.js} +2 -2
- package/dist-cli/chunks/{profile-5Z2YGBCJ.js → profile-BTCKOPAU.js} +2 -2
- package/dist-cli/chunks/{react-ZNFFE3VQ.js → react-UYKTFQZW.js} +2 -2
- package/dist-cli/chunks/{record-V4CBW3GG.js → record-L54OVMQQ.js} +2 -2
- package/dist-cli/chunks/runtime-ZB7S4Z3H.js +2 -0
- package/dist-cli/chunks/{screenshot-QWMRWTIQ.js → screenshot-A5WQUFIQ.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-36EUFBF5.js → screenshot-mode-GBZSTZTV.js} +2 -2
- package/dist-cli/chunks/{screenshots-LOS6WHZN.js → screenshots-EHE2FKTA.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-6D6TBI6A.js → screenshots-capture-MOZJ2RQV.js} +2 -2
- package/dist-cli/chunks/{serve-YWGZ2JSI.js → serve-D6HGTNWI.js} +2 -2
- package/dist-cli/chunks/{setup-JS35KZ6P.js → setup-MR7SX23V.js} +3 -3
- package/dist-cli/chunks/{skills-2TRDAXNC.js → skills-NHV2ZFOU.js} +2 -2
- package/dist-cli/chunks/{slides-AO5MBP5Q.js → slides-WDFLQWCZ.js} +2 -2
- package/dist-cli/chunks/store-7EYKU7RK.js +2 -0
- package/dist-cli/chunks/telemetry-MU23XMBJ.js +2 -0
- package/dist-cli/chunks/{telemetry-MBWJUKBU.js → telemetry-NF6KAWA4.js} +2 -2
- package/dist-cli/chunks/{test-TRP2O6AP.js → test-CVQHZHMJ.js} +3 -3
- package/dist-cli/chunks/{three-mode-VVNOGAZT.js → three-mode-UCOVUXVY.js} +2 -2
- package/dist-cli/chunks/{timeline-4WDFXUXB.js → timeline-SBCWQHQT.js} +2 -2
- package/dist-cli/chunks/{upgrade-NHQRFD4J.js → upgrade-RGJVNFZO.js} +2 -2
- package/dist-cli/chunks/upload-GHIMBL2Y.js +2 -0
- package/dist-cli/chunks/{version-T7O46MZL.js → version-23HGJOE3.js} +2 -2
- package/dist-cli/chunks/{web-7YW2ISLF.js → web-YMQPB45M.js} +2 -2
- package/dist-cli/chunks/{what-happened-IDOUXSFI.js → what-happened-3AJBD35R.js} +2 -2
- package/dist-cli/chunks/{whoami-DQBR3UTO.js → whoami-ZM3TCPNU.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/beta.cjs +1 -1
- package/dist-lib/beta.mjs +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/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +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/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +2 -3
- package/dist-lib/sdk.mjs +2 -3
- package/dist-lib/skills.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/beta-LUMNYREE.js +0 -2
- package/dist-cli/chunks/chunk-3ISH4ZRW.js +0 -1
- package/dist-cli/chunks/chunk-5TTEOJ4A.js +0 -1
- package/dist-cli/chunks/cli-version-474OBNTF.js +0 -2
- package/dist-cli/chunks/control-6LPRGKTF.js +0 -2
- package/dist-cli/chunks/daemon-OMT3RVU4.js +0 -2
- package/dist-cli/chunks/drivers-2PZC4QA3.js +0 -2
- package/dist-cli/chunks/flow-P22NDT6V.js +0 -2
- package/dist-cli/chunks/help-ECGL4JSP.js +0 -2
- package/dist-cli/chunks/inspect-LJYG4WC6.js +0 -2
- package/dist-cli/chunks/optional-demo-registry-OVWOHGTW.js +0 -2
- package/dist-cli/chunks/runtime-OC6S2C22.js +0 -2
- package/dist-cli/chunks/store-HQKPCA6W.js +0 -2
- package/dist-cli/chunks/telemetry-I2H25VVF.js +0 -2
- package/dist-cli/chunks/upload-6C2EC56N.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var t=4001,r="sootsim close";var o="http://localhost:5173/";export{t as a,r as b,o as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{g as i,i as d,l as c}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as i,i as d,l as c}from"./chunk-5XZN2C22.js";function g(r){let e=r[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
|
|
3
3
|
const modeKey = ${JSON.stringify(t.modeKey)}
|
|
4
4
|
const target = ${JSON.stringify(o)}
|
|
5
5
|
window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
function C(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r){let s=t.indexOf(n);if(s>=0&&t[s+1]){let o=Number(t[s+1]);if(Number.isFinite(o))return Math.max(100,o)}}return e}var w=new Set(["tap","double-tap","tap-text","tap-id","long-press","touch"]);function S(t){return typeof t=="string"&&w.has(t)}async function v(t){return await t.send({type:"evaluate",code:"window.__sootsimEngineState?.inspectActive === true"})===!0}async function H(t,e){if(!S(e))return!1;try{return await v(t)}catch{return!1}}async function W(t){let e=await t.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof e=="number"?e:0}}async function B(t,e=5){let r=await t.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${e}))()`});return{depth:e,tree:r}}async function F(t){let e=await t.send({type:"evaluate",code:"window.location.href"});return{url:typeof e=="string"?e:""}}async function j(t,e){let r=`(async () => {
|
|
3
3
|
const t = window.__sootsimTest
|
|
4
4
|
const mainShell = window.SootSim?.bridges?.mainShell
|
|
@@ -612,7 +612,7 @@ ${p}
|
|
|
612
612
|
})()
|
|
613
613
|
: null
|
|
614
614
|
return { nav: navSnap, keyboard }
|
|
615
|
-
})()`});return{shell:await D(t,500).catch(()=>null),nav:e?.nav??null,keyboard:e?.keyboard??null}}async function ye(t){return t.send({type:"evaluate",code:"window.__sootsimDebug.status()"})}async function ge(t){return t.send({type:"evaluate",code:"window.__sootsimDebug.flags()"})}async function be(t,e){
|
|
615
|
+
})()`});return{shell:await D(t,500).catch(()=>null),nav:e?.nav??null,keyboard:e?.keyboard??null}}async function ye(t){return t.send({type:"evaluate",code:"window.__sootsimDebug.status()"})}async function ge(t){return t.send({type:"evaluate",code:"window.__sootsimDebug.flags()"})}async function be(t,e){return t.send({type:"evaluate",code:`window.__sootsimTest.debugFind(${JSON.stringify(e)})`})}async function me(t,e,r=50){let n=e&&e!=="all"?`window.__sootsimDebug.recent(${JSON.stringify(e)}, ${r})`:`window.__sootsimDebug.recent(undefined, ${r})`;return t.send({type:"evaluate",code:n})}async function fe(t,e,r){let n=r.length>0?r.map(s=>JSON.stringify(s)).join(", "):e==="disable"?"'all'":"";return t.send({type:"evaluate",code:`window.__sootsimDebug.${e}(${n})`})}async function he(t){return await t.send({type:"evaluate",code:`(async () => {
|
|
616
616
|
const host = window.__sootsimRenderHost
|
|
617
617
|
const stats = host?.queryStats ? await host.queryStats() : null
|
|
618
618
|
const shellRaw = window.__sootsimShellMemory
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as p,b as $,c as w,e as y,f as R}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as p,b as $,c as w,e as y,f as R}from"./chunk-OXB6RPMX.js";import{d}from"./chunk-5XZN2C22.js";import{C as m,D as a,E as h,F as f,l as v}from"./chunk-2T6Z4WCN.js";import b from"fs";import{WebSocket as A}from"ws";async function P(n,e={}){let[o,...t]=n;if(!o||o==="--help"||o==="-h"){O();return}switch(o){case"install":return D(t,e);case"list":case"ls":return N(t);case"use":return T(t);case"remove":case"rm":return L(t);case"which":case"active":return _();case"notes":case"changelog":return C(t);default:console.error(` unknown runtime subcommand: ${o}`),O(),process.exit(1)}}function O(){console.log(`
|
|
3
3
|
sootsim runtime \u2014 manage engine runtimes under ~/.sootsim/runtimes/
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -24,4 +24,4 @@ examples:
|
|
|
24
24
|
sootsim runtime install --channel beta
|
|
25
25
|
sootsim runtime use 1.2.3
|
|
26
26
|
sootsim runtime notes
|
|
27
|
-
`)}async function D(n,e){let{version:o,flags:t}=E(n),s=t.channel??e.channel??"stable",l=t.force===!0,c=t.setActive!==!1;m(),console.log("sootsim runtime install"),console.log(` cdn: ${w()}`);try{let i=await R({version:o,channel:s,force:l,setActive:c});console.log(` version: ${i.version} (channel: ${i.channel})`),i.installed?console.log(` installed ${i.version}`):console.log(` already installed at ${i.runtimeDir}`),c&&await I(i.version)}catch(i){console.error(` ${k(i)}`),process.exit(1)}}async function I(n){h(n),console.log(` active: ${n}`),await S(n)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${n})`)}async function S(n){let{isDaemonLockfileFresh:e,readDaemonLockfile:o}=await import("./home-paths-
|
|
27
|
+
`)}async function D(n,e){let{version:o,flags:t}=E(n),s=t.channel??e.channel??"stable",l=t.force===!0,c=t.setActive!==!1;m(),console.log("sootsim runtime install"),console.log(` cdn: ${w()}`);try{let i=await R({version:o,channel:s,force:l,setActive:c});console.log(` version: ${i.version} (channel: ${i.channel})`),i.installed?console.log(` installed ${i.version}`):console.log(` already installed at ${i.runtimeDir}`),c&&await I(i.version)}catch(i){console.error(` ${k(i)}`),process.exit(1)}}async function I(n){h(n),console.log(` active: ${n}`),await S(n)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${n})`)}async function S(n){let{isDaemonLockfileFresh:e,readDaemonLockfile:o}=await import("./home-paths-EJFFLJZR.js"),t=o();if(!e(t))return!1;let s=d();return new Promise(l=>{let c=!1,i=!1,u=x=>{c||(c=!0,l(x))},r=new A(`ws://127.0.0.1:${s}`,{handshakeTimeout:800}),g=setTimeout(()=>{try{r.close()}catch{}u(i)},1500);r.on("open",()=>{try{r.send(JSON.stringify({type:"runtime:use",version:n,id:0})),i=!0}catch{}setTimeout(()=>{try{r.close()}catch{}},100)}),r.on("close",()=>{clearTimeout(g),u(i)}),r.on("error",()=>{clearTimeout(g),u(!1)})})}async function N(n){m();let e=f(),o=a();if(console.log("installed:"),e.length===0)console.log(" (none)");else for(let t of e)console.log(` ${t===o?"*":" "} ${t}`);try{let t=await y();console.log("available (latest per channel):");for(let[s,l]of Object.entries(t.channels))console.log(` ${s.padEnd(8)} ${l.latest}`)}catch(t){console.log(`available: (could not fetch manifest: ${k(t)})`)}}async function T(n){let e=n[0];e||(console.error(" usage: sootsim runtime use <version>"),process.exit(1));let o=f();o.includes(e)||(console.error(` version ${e} is not installed`),console.error(` installed: ${o.join(", ")||"(none)"}`),console.error(` run \`sootsim runtime install ${e}\` first`),process.exit(1)),await I(e)}async function L(n){let e=n[0];e||(console.error(" usage: sootsim runtime remove <version>"),process.exit(1)),a()===e&&(console.error(` cannot remove active runtime ${e}`),console.error(" switch with `sootsim runtime use <other>` first, or install another version"),process.exit(1));let t=v(e);if(!b.existsSync(t)){console.error(` ${e} is not installed`);return}b.rmSync(t,{recursive:!0,force:!0}),console.log(` removed ${e}`)}async function _(){let n=a();if(!n){console.log(" no active runtime");return}console.log(n)}async function C(n){n.length>0&&(console.error(" usage: sootsim runtime notes"),process.exit(1));let e=a();e&&console.log(` active runtime: v${e}`),console.log(` release notes: ${$}`)}function E(n){let e={},o=[];for(let t=0;t<n.length;t++){let s=n[t];if(s==="--channel"&&t+1<n.length){e.channel=n[t+1],t++;continue}if(s.startsWith("--channel=")){e.channel=s.slice(10);continue}if(s==="--force"){e.force=!0;continue}if(s==="--set-active=false"||s==="--no-set-active"){e.setActive=!1;continue}o.push(s)}return{version:o[0]??null,flags:e}}function k(n){return n instanceof Error?n.message:String(n)}export{P as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as E,b as D}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as E,b as D}from"./chunk-Y3I43AUV.js";import{D as T}from"./chunk-2T6Z4WCN.js";var N="sootsimConfig";function p(e){return!!e&&Object.keys(e).length>0}function $(e){return e?p(e.modules)||p(e.turboModules)||p(e.nativeModules)||p(e.env)||p(e.network?.remap)||p(e.settings)||p(e.initialState):!1}function j(e,t){let n=new URL(e);return $(t)?n.searchParams.set(N,JSON.stringify(t)):n.searchParams.delete(N),n.toString()}var me="/index.bundle?platform=ios&dev=true&hot=true&minify=false";function A(e){return/^https?:\/\//i.test(e)}function O(e){return e.endsWith(".bundle")}function H(e){process.env.SOOTSIM_PREVIEW_PROD_BUNDLE&&(e.searchParams.set("dev","false"),e.searchParams.set("minify","true"),e.searchParams.has("hot")&&e.searchParams.set("hot","false"))}function I(e){try{let t=A(e),n=new URL(e,"http://soot.local");return n.pathname=n.pathname.replace(/\.\.bundle$/,".bundle"),O(n.pathname)?(n.searchParams.delete("transform.bytecode"),n.searchParams.get("lazy")==="true"&&n.searchParams.set("lazy","false"),H(n),t?n.toString():`${n.pathname}${n.search}${n.hash}`):e}catch{return e}}function pe(e,t){try{let n=A(e),o=new URL(e,"http://soot.local");return O(o.pathname)?(o.searchParams.set("hot",t?"true":"false"),n?o.toString():`${o.pathname}${o.search}${o.hash}`):e}catch{return e}}import{exec as W}from"child_process";import B from"http";import F from"net";import{promisify as G}from"util";var _=G(W);E();var z=250,J=1500,K=120;function V(e,t=K){return new Promise(n=>{let o=new F.Socket,s=!1,i=a=>{s||(s=!0,o.destroy(),n(a))};o.setTimeout(t),o.once("connect",()=>i(!0)),o.once("timeout",()=>i(!1)),o.once("error",()=>i(!1)),o.connect(e,"localhost")})}function h(e,t,n="GET",o=z,s={}){return new Promise(i=>{let a=B.request({hostname:"localhost",port:e,path:t,method:n,timeout:o,headers:s},r=>{let c="";r.on("data",l=>c+=l.toString());let u=(()=>{let l=r.headers["content-type"];if(typeof l=="string")return l;if(Array.isArray(l))return l[0]})();r.on("end",()=>i({statusCode:r.statusCode||0,body:c,contentType:u}))});a.on("error",()=>i(null)),a.setTimeout(o,()=>{a.destroy(),i(null)}),a.end()})}var q=[8081,8082,8083,8084,8085,8086,3e3,3001,19e3].map(e=>({port:e,pid:0}));function k(e,t){return!(e<=0||e>=2e4||t.has(e)||e>=5170&&e<=5200)}async function Y(e=[]){let t=new Set(e);try{let{stdout:n}=await _("lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep -E '^(node|bun)'",{encoding:"utf8",timeout:2e3});if(n.trim()){let o=new Map;for(let s of n.trim().split(`
|
|
3
3
|
`)){let i=s.trim().split(/\s+/);if(i.length<9)continue;let a=Number(i[1]),c=i[8].match(/:(\d+)$/);if(!c)continue;let u=Number(c[1]);k(u,t)&&(o.has(u)||o.set(u,a))}if(o.size>0)return[...o.entries()].map(([s,i])=>({port:s,pid:i}))}}catch{}try{let{stdout:n}=await _(`ss -tlnp 2>/dev/null | grep -E '"(node|bun)"'`,{encoding:"utf8",timeout:2e3});if(n.trim()){let o=new Map;for(let s of n.trim().split(`
|
|
4
4
|
`)){let i=s.match(/:(\d+)\s/),a=s.match(/pid=(\d+)/);if(!i)continue;let r=Number(i[1]),c=a?Number(a[1]):0;k(r,t)&&(o.has(r)||o.set(r,c))}if(o.size>0)return[...o.entries()].map(([s,i])=>({port:s,pid:i}))}}catch{}return q.filter(n=>k(n.port,t))}var R=new Map;async function Q(e){if(e<=0)return null;let t=R.get(e);if(t)return t;try{let{stdout:n}=await _(`lsof -p ${e} -a -d cwd -Fn 2>/dev/null`,{encoding:"utf8",timeout:1500});for(let o of n.split(`
|
|
5
5
|
`))if(o.startsWith("n")&&o.length>1){let s=o.slice(1).trim();if(s)return R.set(e,s),s}}catch{}return null}function X(e,t){return{port:e,framework:t,bundleUrl:S(e,`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()}}function S(e,t){let n=D().find(s=>s.preferredPort===e),o=n?.runtimeConfig?j(t,n.runtimeConfig):t;return I(o)}function Z(e){return e.includes("/node_modules/one/metro-entry.bundle")}function ee(e){try{let t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}function w(e,t,n){if(!t)return e;try{let o=JSON.parse(t.body),s=o?.extra?.expoClient||o?.extra||{};s.name&&(e.projectName=s.name),s.ios?.bundleIdentifier&&(e.bundleId=s.ios.bundleIdentifier),e.framework==="metro"&&s.sdkVersion&&(e.framework="expo");let i=o?.launchAsset?.url;i&&!e.patched&&!Z(e.bundleUrl)&&(e.bundleUrl=S(e.port,i));let a=s.iconUrl||s.ios?.iconUrl||s.icon||s.ios?.icon;if(a)if(e.iconPath=a,n)if(a.startsWith("http"))e.iconUrl=n(a);else{let r=a.replace(/^\.\//,"");e.iconUrl=n(`http://localhost:${e.port}/assets/${r}`)}else e.iconUrl=a.startsWith("http")?a:`http://localhost:${e.port}/assets/${a.replace(/^\.\//,"")}`}catch{}return e}var ne=2e4,v=new Map,C=new Set;function M(e,t){if(e.projectName)return e;let n=v.get(e.port);if(n)return n.projectName&&(e.projectName=n.projectName),n.iconUrl&&!e.iconUrl&&(e.iconUrl=n.iconUrl,e.iconPath=n.iconPath),n.bundleId&&!e.bundleId&&(e.bundleId=n.bundleId),e;if(!C.has(e.port)){C.add(e.port);let o=e.port;te(o,t).finally(()=>C.delete(o))}return e}async function te(e,t){let n=await h(e,"/","GET",ne,{"expo-platform":"ios"});if(!n||n.statusCode!==200)return;let o=w({port:e,framework:"one",bundleUrl:"",lastSeen:0},n,t);!o.projectName&&!o.iconUrl||(v.set(e,{projectName:o.projectName,iconUrl:o.iconUrl,iconPath:o.iconPath,bundleId:o.bundleId}),b.delete(e))}var d=new Set,g=new Set,y=new Set;async function oe(e,t){if(!await V(e))return null;let n="/node_modules/one/metro-entry.bundle?platform=ios&dev=true",[o,s,i,a]=await Promise.all([d.has(e)?Promise.resolve(null):h(e,"/__soot/"),h(e,"/status"),y.has(e)?Promise.resolve(null):h(e,"/","GET",J,{"expo-platform":"ios"}),g.has(e)?Promise.resolve(null):h(e,"/_expo/status")]);a&&a.statusCode===200?g.delete(e):g.has(e)||g.add(e);let r=i?ee(i.body):null,c=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:null,u=r?.extra?.expoClient||r?.extra||{};if(r&&(c||typeof u.name=="string")){d.add(e);let U=c||`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`,L=U.includes("/one/metro-entry.bundle")?"one":"expo";return w({port:e,framework:L,bundleUrl:S(e,U),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},i,t)}if(s&&s.body.includes("packager-status:running"))return d.add(e),M(w(X(e,a&&a.statusCode===200?"expo":"metro"),i,t),t);if(o&&o.statusCode===200&&o.body.includes("sootsim-patched"))return d.delete(e),M(w({port:e,framework:"one",bundleUrl:S(e,`http://localhost:${e}/__soot/bundle.js`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now(),patched:!0},i,t),t);if(s&&s.statusCode===200||a&&a.statusCode===200||i&&i.statusCode===200&&r!=null)return null;let m=await h(e,n,"HEAD");return m&&m.statusCode>0&&m.statusCode<400&&/application\/javascript/i.test(m.contentType||"")?(d.add(e),y.add(e),M(w({port:e,framework:"one",bundleUrl:S(e,`http://localhost:${e}${n}&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},i,t),t)):(d.add(e),null)}function re(e){return!!e.bundleId?.trim().toLowerCase()?.startsWith("dev.sootsim.")}var b=new Map,se=3e4,ie=1500;function ae(e){return!e||e.framework==="metro"||e.framework==="unknown"}function ce(e){return e?S(e.port,e.bundleUrl)===e.bundleUrl:!0}function ue(e,t,n=Date.now()){if(t===0||e.pid!==t||!ce(e.result))return!1;let o=n-e.cachedAt;return!(e.result===null&&o>=se||ae(e.result)&&o>=ie)}async function Re(e={}){let t=await Y(e.excludePorts),n=new Set(t.map(r=>r.port));for(let r of[...b.keys()])n.has(r)||b.delete(r);for(let r of[...d])n.has(r)||d.delete(r);for(let r of[...g])n.has(r)||g.delete(r);for(let r of[...y])n.has(r)||y.delete(r);for(let r of[...v.keys()])n.has(r)||v.delete(r);let o=[],s=[];for(let{port:r,pid:c}of t){let u=b.get(r);if(u&&ue(u,c)){u.result&&o.push(u.result);continue}u&&u.pid!==c&&(d.delete(r),g.delete(r),y.delete(r),v.delete(r)),s.push({port:r,pid:c})}s.length>0&&(await Promise.all(s.map(c=>oe(c.port,e.buildIconProxyUrl)))).forEach((c,u)=>{let{port:l,pid:m}=s[u];m!==0&&b.set(l,{pid:m,result:c,cachedAt:Date.now()}),c&&o.push(c)});let i=new Map;for(let{port:r,pid:c}of t)c>0&&i.set(r,c);await Promise.all(o.map(async r=>{let c=i.get(r.port);if(!c)return;r.pid=c;let u=await Q(c);u&&(r.cwd=u)}));let a=new Set(i.values());for(let r of[...R.keys()])a.has(r)||R.delete(r);return o.filter(r=>!re(r))}import x from"fs";import f from"path";import{fileURLToPath as le}from"url";var P;function de(){if(P!==void 0)return P;let e=f.dirname(le(import.meta.url));for(let t=0;t<12&&e!==f.dirname(e);t++){if(x.existsSync(f.join(e,"packages/sootsim-engine/package.json"))&&x.existsSync(f.join(e,"public/sootsim")))return P=e,e;e=f.dirname(e)}return P=null,null}function Te(){if(process.env.SOOTSIM_HOME&&T())return null;let e=de();if(!e)return null;let t=f.join(e,"public/sootsim");return x.existsSync(f.join(t,"index.html"))&&x.existsSync(f.join(t,"engine/index.html"))&&x.existsSync(f.join(t,"engine-tenant/worker.js"))?t:null}export{j as a,me as b,I as c,pe as d,oe as e,Re as f,Te as g};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as K,b as oe,c as ne,d as Se,e as $e,g as ke}from"./chunk-WBPTJ3WC.js";import{m as R}from"./chunk-YYZGAZQI.js";import{m as Me,o as Te}from"./chunk-N3PLEUYD.js";import{a as Ce,b as Ee}from"./chunk-XQ6PPMM6.js";import{a as Ie,b as re,c as Pe}from"./chunk-QBLTH2F6.js";import{a as Ue,b as Re,c as Oe,e as _e,f as Be,g as C,h as v,i as E}from"./chunk-BU5CRHHR.js";import{g as ae}from"./chunk-U3BTJLRM.js";import{a as O,b as se}from"./chunk-INIASYOZ.js";import{d as ie}from"./chunk-PTUTIFWJ.js";import{c as xe}from"./chunk-ZE2O7AA5.js";import{d as T,e as b,f as U}from"./chunk-LV7DFIBL.js";import{D as ve,I as te,K as W,l as ye}from"./chunk-FUHNIWFL.js";import{g as j}from"./chunk-KNICGV7H.js";import{spawn as We}from"node:child_process";import D from"node:fs";import dt from"node:os";import M from"node:path";import{WebSocket as mt}from"ws";function ot(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function z(e){let t=ot(e);return t==="localhost"||t.endsWith(".localhost")||t==="0.0.0.0"||t==="::1"||/^127(?:\.\d{1,3}){3}$/.test(t)}function De(e){return new Error(`could not resolve a native bundle for ${e}. pass an explicit bundle URL or open Connect and choose the app there.`)}function nt(e,t){return e?.includes("/one/metro-entry.bundle")?"one":typeof t=="string"&&t?"expo":"unknown"}function Le(e,t,o){return`${e}//${t}:${o}`}function rt(e){if(typeof window>"u")return!1;try{let t=new URL(e);return z(t.hostname)&&z(window.location.hostname)&&t.origin!==window.location.origin}catch{return!1}}async function Ae(e,t){let o={...t,cache:t?.cache??"no-store"};return rt(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,o):fetch(e,o)}function st(e){return e==="https:"?443:80}function it(e){let t=e.pathname||"/";return(t==="/"||t==="")&&!e.search&&!e.hash}async function at(e){try{let t=await fetch("/__server-scan",{cache:"no-store"});if(!t.ok||!(t.headers.get("content-type")||"").toLowerCase().includes("json"))return null;let o=await t.json();if(!Array.isArray(o))return null;let n=o.find(r=>!!r&&typeof r=="object"&&r.port===e&&typeof r.bundleUrl=="string");return n?{bundleUrl:ne(n.bundleUrl),port:e,framework:typeof n.framework=="string"?n.framework:"unknown",projectName:typeof n.projectName=="string"?n.projectName:void 0}:null}catch{return null}}async function Ne(e,t){let o=e.replace(/\/+$/,"");try{if(z(new URL(o).hostname)){let n=await at(t);if(n)return n}}catch{}try{let n=await Ae(`${o}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},i=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(i||s.name)return{bundleUrl:ne(i||`${o}${oe}`),port:t,framework:nt(i,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await Ae(`${o}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${o}${oe}`,port:t,framework:"metro"}}catch{}return null}async function lt(e){return Ne(Le("http:","localhost",e),e)}async function Fe(e){let t=e.trim();if(/^\d+$/.test(t)){let a=parseInt(t,10),l=await lt(a);if(l)return l;throw De(`localhost:${a}`)}let o=t.startsWith("http")?t:`http://${t}`,n;try{n=new URL(o)}catch{throw new Error(`could not parse "${e}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):st(r),i=Le(r,n.hostname,s);if(it(n)){let a=await Ne(i,s);if(a)return a;throw De(i)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function to(){console.error(" no sootsim desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" sootsim install-desktop"),console.error(""),console.error(" or run setup to install the background daemon:"),console.error(" sootsim setup"),console.error("")}function He(e){let t=O();if(console.log(` note: no sootsim bridge detected on port ${e}`),t){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" run `sootsim setup` to install the background daemon,"),console.log(" or run `sootsim serve` in another shell for a foreground bridge.")}function ct(e){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${e}.`),console.error(""),console.error(" start your app dev server, then open it in sootsim:"),console.error(" npx expo start --localhost --port 8081"),console.error(" sootsim open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" sootsim describe")}async function oo(e,t,o){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){ct(t);return}console.error(` no sim with id "${o}" is connected to the bridge on port ${t}.`),console.error(""),console.error(" connected sims:");for(let r of n){let s=[r.isPrimary?"primary":null,r.readyState,r.userVisible===!1?"hidden":r.userVisible===!0?"visible":null,r.userFocused?"focused":null].filter(Boolean).join(", ");console.error(` ${r.id} (${s})`)}console.error(""),console.error(" pass a valid --sim id, or run `sootsim list` to see all sessions.")}var ut=12e4,je=100,pt=5e3,Ke=1e4,ft={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 $(e){return new Promise(t=>setTimeout(t,e))}function ze(e){let t=process.env[e]?.trim();if(!t)return null;let o=Number(t);return Number.isInteger(o)&&o>0?o:null}function ht(){let e=ze("SOOTSIM_DRIVER_CONNECT_TIMEOUT_MS")??ze("SOOTSIM_PW_CONNECT_TIMEOUT_MS")??ut;return{timeoutMs:e,hostTimeoutMs:e+pt,intervalMs:je,attempts:Math.max(1,Math.ceil(e/je))}}function gt(e){return e==="chromium"||e==="electron"||e==="playwright"||e==="system"}function wt(e,t){return e.includes("--headless")?!0:e.includes("--headed")?!1:t==="playwright"&&process.platform==="linux"&&!process.env.DISPLAY&&!process.env.WAYLAND_DISPLAY?(console.error(" no display detected \u2192 running playwright headless (override with --headed)"),!0):!1}function V(e){return e.trim()}var bt=/^[A-Za-z][A-Za-z0-9+.-]*:/;function yt(e){let t=e.trim();if(!t)throw new Error("expected <url-or-route>");return bt.test(t)||t.startsWith("/")?t:`/${t}`}function vt(e){return e!==null&&typeof e=="object"}async function St(e){if(await q(e,250))return e;let t=te();if(t&&W(t)&&await q(t.bridgePort,500))return t.bridgePort;if(t&&W(t))throw new Error(`sootsim bridge lockfile is fresh (port ${t.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`);await $t();let o=xt(["serve","--quiet","--port",String(e)]),n=null;o.once("exit",(s,i)=>{n=String(s??i??"unknown")}),o.unref();let r=Date.now()+Ke;for(;Date.now()<r;){let s=te();if(s&&W(s)&&await q(s.bridgePort,250))return console.error(` started local bridge on port ${s.bridgePort}; run \`sootsim setup\` to install the background daemon`),s.bridgePort;if(await q(e,250))return console.error(` started local bridge on port ${e}; run \`sootsim setup\` to install the background daemon`),e;if(n)throw new Error(`sootsim bridge exited before becoming ready (exit ${n})`);await $(150)}throw new Error(`sootsim bridge did not start within ${Math.round(Ke/1e3)}s`)}async function $t(){let e=ve();if(e&&D.existsSync(ye(e)))return;console.error(" installing sootsim engine runtime...");let{runRuntime:t}=await import("./runtime-OC6S2C22.js");await t(["install"],{})}function xt(e){let t=process.argv[1];return t&&D.existsSync(t)?We(process.execPath,[t,...e],{detached:!0,stdio:"ignore",env:process.env}):We("sootsim",e,{detached:!0,stdio:"ignore",env:process.env})}function q(e,t){return new Promise(o=>{let n=new mt(`ws://127.0.0.1:${e}`,{handshakeTimeout:t}),r=!1,s=i=>{if(!r){r=!0;try{n.close()}catch{}o(i)}};n.once("open",()=>s(!0)),n.once("error",()=>s(!1)),setTimeout(()=>s(!1),t)})}function de(e){try{let t=new URL(e),o=t.pathname.replace(/\/+$/,"")||"/";return t.searchParams.has("open")||t.searchParams.has("port")||t.searchParams.has("bundle")||t.searchParams.has("demo")||t.pathname.includes("/sootsim/index.html")||o==="/sootsim"||t.pathname==="/__soot"||t.pathname==="/__soot/"||o==="/rn"||/^\/rn\/[^/]+$/i.test(o)||/^\/app\/[^/]+$/i.test(o)||o==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(o)||/^\/__soot\/app\/[^/]+$/i.test(o)}catch{return!1}}function kt(e){try{let t=new URL(e).pathname.replace(/\/+$/,"")||"/";return/^\/preview\/[^/]+$/.test(t)||/^\/build\/.+/.test(t)}catch{return!1}}async function Eo(e){let t=V(e);return(await Je(t)).bundleUrl}function It(e){try{let t=new URL(e.startsWith("http")?e:`http://${e}`),o=t.pathname||"/";if(o!=="/"&&o!==""||t.search||t.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(t.hostname))return null;let n=t.port?Number(t.port):t.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function Je(e){let t=V(e),o=/^\d+$/.test(t)?Number(t):It(t);if(o&&o>0){let n=await $e(o);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return Fe(t)}function ue(e){let t=e.replace(/\/+$/,"")||"/";return t==="/__soot"||t.startsWith("/__soot/")?"/__soot":""}function Pt(e,t){let o=V(e),n=new URL(t),r=ue(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(o)?n.pathname=`${r}/rn/${o}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",o)),n.toString()}function Ct(e){let t=V(e);return/^\d+$/.test(t)||/^https?:\/\//i.test(t)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(t)}async function Et(e,t,o={}){let n=await Je(e),r=new URL(t),s=ue(r.pathname);r.pathname=`${s}/rn`,r.searchParams.delete("open"),r.searchParams.delete("port"),r.searchParams.delete("demo"),r.searchParams.delete("app");let i=o.hot===void 0?n.bundleUrl:Se(n.bundleUrl,o.hot);return r.searchParams.set("bundle",i),r.toString()}function Mt(e){return e.startsWith("~/")?M.join(dt.homedir(),e.slice(2)):M.isAbsolute(e)?e:M.resolve(process.cwd(),e)}function Tt(e){let t={},o={};for(let r=0;r<e.length;r++){if(e[r]==="--replace"){let s=e[r+1];s||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let i=s.indexOf("=");(i<=0||i===s.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let a=s.slice(0,i).trim(),l=Mt(s.slice(i+1).trim());D.existsSync(l)||(console.error(` sootsim open: replacement file not found: ${l}`),process.exit(1)),t[a]={file:l},r++;continue}if(e[r]==="--remap"){let s=e[r+1],i=s?s.indexOf("="):-1;(!s||i<=0||i===s.length-1)&&(console.error(" sootsim open: --remap expects <host:port>=<host:port>"),process.exit(1)),o[s.slice(0,i).trim()]=s.slice(i+1).trim(),r++;continue}}let n={};return Object.keys(t).length>0&&(n.modules=t),Object.keys(o).length>0&&(n.network={remap:o}),n.modules||n.network?n:void 0}function Qe(){return Ue().shellBaseUrl}async function Ut(e){try{let t=new URL(e),o=t.searchParams.get("bundle")||"";if(!o)return e;let n=process.env.SOOT_REPO_DIR||await re(o)||void 0,r=Ie({bundleUrl:o,repoDir:n});if(r.length===0)return e;let s=await Rt(r);return s.length===0?e:(t.searchParams.set("appFonts",Pe(s)),t.toString())}catch{return e}}async function Rt(e){let t=await Promise.all(e.map(async n=>{let r=new AbortController,s=setTimeout(()=>r.abort(),1500);try{let i=await fetch(n.url,{method:"HEAD",signal:r.signal});return i.status>=200&&i.status<400?n:null}catch{return null}finally{clearTimeout(s)}})),o=[];for(let n of t)n!==null&&o.push(n);return o}async function Ot(e,t,o={}){if(!e)return new URL(t).toString();if(de(e))return new URL(e).toString();let n=ft[e.toLowerCase()];if(n){let r=new URL(t),s=ue(r.pathname);return r.pathname=`${s}${n}`,r.toString()}return Ct(e)?Et(e,t,o):Pt(e,t)}async function _t(e){try{let t=new URL(e),o=t.searchParams.get("bundle")||"";if(!o)return e;let n=process.env.SOOT_REPO_DIR||await re(o)||void 0,r=Ce({bundleUrl:o,repoDir:n});return!r||r.imageUrl&&!await Bt(r.imageUrl)?e:(t.searchParams.set("appSplash",Ee(r)),t.toString())}catch{return e}}async function Bt(e){let t=new AbortController,o=setTimeout(()=>t.abort(),1500);try{let n=await fetch(e,{method:"HEAD",signal:t.signal});return n.status>=200&&n.status<400}catch{return!1}finally{clearTimeout(o)}}async function G(e,t=Qe(),o={}){let n=await Ot(e,t,o),r=await _t(await Ut(n));if(!o.device)return r;let s=new URL(r);return s.searchParams.set("device",o.device),s.toString()}function qe(e,t){let o=e?.url||e?.origin||t;try{let n=new URL(o);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.searchParams.delete("appFonts"),n.searchParams.delete("appSplash"),n.toString()}catch{return t}}async function Dt(e,t,o,n={}){let r=new URL(await G(e,t,n));return r.searchParams.set("inspectOpen",o),r.toString()}async function At(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500,i=n.minNodeCount??10;for(let a=0;a<r;a++){let l=v(e,{commandTimeoutMs:t,simId:o,simIdSource:"flag"});try{let d=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof d=="number"&&d>i)return{bridge:l,count:d}}catch{}l.close(),await $(s)}return null}function Lt(e){if(!e)return null;try{let t=new URL(e);if(t.searchParams.has("bundle")){let o=t.searchParams.get("bundle")||"";try{let n=new URL(o),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return t.searchParams.has("port")?`connect :${t.searchParams.get("port")||""}`:t.searchParams.has("open")?`connect ${t.searchParams.get("open")||""}`:t.searchParams.has("demo")?`demo ${t.searchParams.get("demo")||"default"}`:t.pathname.includes("/sootsim/index.html")||t.pathname==="/sootsim/"||t.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function Nt(e){let t=e.indexOf(":");if(t<=0)return e.length>24?`${e.slice(0,21)}\u2026`:e;let o=e.slice(0,t),n=e.slice(t+1),r=n.length>12?`${n.slice(0,8)}\u2026`:n;return o==="AGENTBUS_SESSION"||o==="CLAUDE_CODE_SESSION_ID"||o==="CODEX_THREAD_ID"?`agent ${r}`:`${o} ${r}`}function Mo(e,t){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as K,b as oe,c as ne,d as Se,e as $e,g as ke}from"./chunk-TPHYWQB2.js";import{m as R}from"./chunk-KOEBHC3D.js";import{m as Me,o as Te}from"./chunk-SVSZFGNA.js";import{a as Ce,b as Ee}from"./chunk-YNY3WSH4.js";import{a as Ie,b as re,c as Pe}from"./chunk-NDAGMI4C.js";import{a as Ue,b as Re,c as Oe,e as _e,f as Be,g as C,h as v,i as E}from"./chunk-5XZN2C22.js";import{g as ae}from"./chunk-ZZ7FODQE.js";import{a as O,b as se}from"./chunk-B272R3FA.js";import{d as ie}from"./chunk-BZNPGYJQ.js";import{c as xe}from"./chunk-FHHOZTPI.js";import{d as T,e as b,f as U}from"./chunk-5U22ZNDP.js";import{D as ve,I as te,K as W,l as ye}from"./chunk-2T6Z4WCN.js";import{g as j}from"./chunk-D6GYUATH.js";import{spawn as We}from"node:child_process";import D from"node:fs";import dt from"node:os";import M from"node:path";import{WebSocket as mt}from"ws";function ot(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function z(e){let t=ot(e);return t==="localhost"||t.endsWith(".localhost")||t==="0.0.0.0"||t==="::1"||/^127(?:\.\d{1,3}){3}$/.test(t)}function De(e){return new Error(`could not resolve a native bundle for ${e}. pass an explicit bundle URL or open Connect and choose the app there.`)}function nt(e,t){return e?.includes("/one/metro-entry.bundle")?"one":typeof t=="string"&&t?"expo":"unknown"}function Le(e,t,o){return`${e}//${t}:${o}`}function rt(e){if(typeof window>"u")return!1;try{let t=new URL(e);return z(t.hostname)&&z(window.location.hostname)&&t.origin!==window.location.origin}catch{return!1}}async function Ae(e,t){let o={...t,cache:t?.cache??"no-store"};return rt(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,o):fetch(e,o)}function st(e){return e==="https:"?443:80}function it(e){let t=e.pathname||"/";return(t==="/"||t==="")&&!e.search&&!e.hash}async function at(e){try{let t=await fetch("/__server-scan",{cache:"no-store"});if(!t.ok||!(t.headers.get("content-type")||"").toLowerCase().includes("json"))return null;let o=await t.json();if(!Array.isArray(o))return null;let n=o.find(r=>!!r&&typeof r=="object"&&r.port===e&&typeof r.bundleUrl=="string");return n?{bundleUrl:ne(n.bundleUrl),port:e,framework:typeof n.framework=="string"?n.framework:"unknown",projectName:typeof n.projectName=="string"?n.projectName:void 0}:null}catch{return null}}async function Ne(e,t){let o=e.replace(/\/+$/,"");try{if(z(new URL(o).hostname)){let n=await at(t);if(n)return n}}catch{}try{let n=await Ae(`${o}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},i=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(i||s.name)return{bundleUrl:ne(i||`${o}${oe}`),port:t,framework:nt(i,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await Ae(`${o}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${o}${oe}`,port:t,framework:"metro"}}catch{}return null}async function lt(e){return Ne(Le("http:","localhost",e),e)}async function Fe(e){let t=e.trim();if(/^\d+$/.test(t)){let a=parseInt(t,10),l=await lt(a);if(l)return l;throw De(`localhost:${a}`)}let o=t.startsWith("http")?t:`http://${t}`,n;try{n=new URL(o)}catch{throw new Error(`could not parse "${e}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):st(r),i=Le(r,n.hostname,s);if(it(n)){let a=await Ne(i,s);if(a)return a;throw De(i)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function to(){console.error(" no sootsim desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" sootsim install-desktop"),console.error(""),console.error(" or run setup to install the background daemon:"),console.error(" sootsim setup"),console.error("")}function He(e){let t=O();if(console.log(` note: no sootsim bridge detected on port ${e}`),t){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" run `sootsim setup` to install the background daemon,"),console.log(" or run `sootsim serve` in another shell for a foreground bridge.")}function ct(e){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${e}.`),console.error(""),console.error(" start your app dev server, then open it in sootsim:"),console.error(" npx expo start --localhost --port 8081"),console.error(" sootsim open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" sootsim describe")}async function oo(e,t,o){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){ct(t);return}console.error(` no sim with id "${o}" is connected to the bridge on port ${t}.`),console.error(""),console.error(" connected sims:");for(let r of n){let s=[r.isPrimary?"primary":null,r.readyState,r.userVisible===!1?"hidden":r.userVisible===!0?"visible":null,r.userFocused?"focused":null].filter(Boolean).join(", ");console.error(` ${r.id} (${s})`)}console.error(""),console.error(" pass a valid --sim id, or run `sootsim list` to see all sessions.")}var ut=12e4,je=100,pt=5e3,Ke=1e4,ft={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 $(e){return new Promise(t=>setTimeout(t,e))}function ze(e){let t=process.env[e]?.trim();if(!t)return null;let o=Number(t);return Number.isInteger(o)&&o>0?o:null}function ht(){let e=ze("SOOTSIM_DRIVER_CONNECT_TIMEOUT_MS")??ze("SOOTSIM_PW_CONNECT_TIMEOUT_MS")??ut;return{timeoutMs:e,hostTimeoutMs:e+pt,intervalMs:je,attempts:Math.max(1,Math.ceil(e/je))}}function gt(e){return e==="chromium"||e==="electron"||e==="playwright"||e==="system"}function wt(e,t){return e.includes("--headless")?!0:e.includes("--headed")?!1:t==="playwright"&&process.platform==="linux"&&!process.env.DISPLAY&&!process.env.WAYLAND_DISPLAY?(console.error(" no display detected \u2192 running playwright headless (override with --headed)"),!0):!1}function V(e){return e.trim()}var bt=/^[A-Za-z][A-Za-z0-9+.-]*:/;function yt(e){let t=e.trim();if(!t)throw new Error("expected <url-or-route>");return bt.test(t)||t.startsWith("/")?t:`/${t}`}function vt(e){return e!==null&&typeof e=="object"}async function St(e){if(await q(e,250))return e;let t=te();if(t&&W(t)&&await q(t.bridgePort,500))return t.bridgePort;if(t&&W(t))throw new Error(`sootsim bridge lockfile is fresh (port ${t.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`);await $t();let o=xt(["serve","--quiet","--port",String(e)]),n=null;o.once("exit",(s,i)=>{n=String(s??i??"unknown")}),o.unref();let r=Date.now()+Ke;for(;Date.now()<r;){let s=te();if(s&&W(s)&&await q(s.bridgePort,250))return console.error(` started local bridge on port ${s.bridgePort}; run \`sootsim setup\` to install the background daemon`),s.bridgePort;if(await q(e,250))return console.error(` started local bridge on port ${e}; run \`sootsim setup\` to install the background daemon`),e;if(n)throw new Error(`sootsim bridge exited before becoming ready (exit ${n})`);await $(150)}throw new Error(`sootsim bridge did not start within ${Math.round(Ke/1e3)}s`)}async function $t(){let e=ve();if(e&&D.existsSync(ye(e)))return;console.error(" installing sootsim engine runtime...");let{runRuntime:t}=await import("./runtime-ZB7S4Z3H.js");await t(["install"],{})}function xt(e){let t=process.argv[1];return t&&D.existsSync(t)?We(process.execPath,[t,...e],{detached:!0,stdio:"ignore",env:process.env}):We("sootsim",e,{detached:!0,stdio:"ignore",env:process.env})}function q(e,t){return new Promise(o=>{let n=new mt(`ws://127.0.0.1:${e}`,{handshakeTimeout:t}),r=!1,s=i=>{if(!r){r=!0;try{n.close()}catch{}o(i)}};n.once("open",()=>s(!0)),n.once("error",()=>s(!1)),setTimeout(()=>s(!1),t)})}function de(e){try{let t=new URL(e),o=t.pathname.replace(/\/+$/,"")||"/";return t.searchParams.has("open")||t.searchParams.has("port")||t.searchParams.has("bundle")||t.searchParams.has("demo")||t.pathname.includes("/sootsim/index.html")||o==="/sootsim"||t.pathname==="/__soot"||t.pathname==="/__soot/"||o==="/rn"||/^\/rn\/[^/]+$/i.test(o)||/^\/app\/[^/]+$/i.test(o)||o==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(o)||/^\/__soot\/app\/[^/]+$/i.test(o)}catch{return!1}}function kt(e){try{let t=new URL(e).pathname.replace(/\/+$/,"")||"/";return/^\/preview\/[^/]+$/.test(t)||/^\/build\/.+/.test(t)}catch{return!1}}async function Eo(e){let t=V(e);return(await Je(t)).bundleUrl}function It(e){try{let t=new URL(e.startsWith("http")?e:`http://${e}`),o=t.pathname||"/";if(o!=="/"&&o!==""||t.search||t.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(t.hostname))return null;let n=t.port?Number(t.port):t.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function Je(e){let t=V(e),o=/^\d+$/.test(t)?Number(t):It(t);if(o&&o>0){let n=await $e(o);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return Fe(t)}function ue(e){let t=e.replace(/\/+$/,"")||"/";return t==="/__soot"||t.startsWith("/__soot/")?"/__soot":""}function Pt(e,t){let o=V(e),n=new URL(t),r=ue(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(o)?n.pathname=`${r}/rn/${o}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",o)),n.toString()}function Ct(e){let t=V(e);return/^\d+$/.test(t)||/^https?:\/\//i.test(t)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(t)}async function Et(e,t,o={}){let n=await Je(e),r=new URL(t),s=ue(r.pathname);r.pathname=`${s}/rn`,r.searchParams.delete("open"),r.searchParams.delete("port"),r.searchParams.delete("demo"),r.searchParams.delete("app");let i=o.hot===void 0?n.bundleUrl:Se(n.bundleUrl,o.hot);return r.searchParams.set("bundle",i),r.toString()}function Mt(e){return e.startsWith("~/")?M.join(dt.homedir(),e.slice(2)):M.isAbsolute(e)?e:M.resolve(process.cwd(),e)}function Tt(e){let t={},o={};for(let r=0;r<e.length;r++){if(e[r]==="--replace"){let s=e[r+1];s||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let i=s.indexOf("=");(i<=0||i===s.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let a=s.slice(0,i).trim(),l=Mt(s.slice(i+1).trim());D.existsSync(l)||(console.error(` sootsim open: replacement file not found: ${l}`),process.exit(1)),t[a]={file:l},r++;continue}if(e[r]==="--remap"){let s=e[r+1],i=s?s.indexOf("="):-1;(!s||i<=0||i===s.length-1)&&(console.error(" sootsim open: --remap expects <host:port>=<host:port>"),process.exit(1)),o[s.slice(0,i).trim()]=s.slice(i+1).trim(),r++;continue}}let n={};return Object.keys(t).length>0&&(n.modules=t),Object.keys(o).length>0&&(n.network={remap:o}),n.modules||n.network?n:void 0}function Qe(){return Ue().shellBaseUrl}async function Ut(e){try{let t=new URL(e),o=t.searchParams.get("bundle")||"";if(!o)return e;let n=process.env.SOOT_REPO_DIR||await re(o)||void 0,r=Ie({bundleUrl:o,repoDir:n});if(r.length===0)return e;let s=await Rt(r);return s.length===0?e:(t.searchParams.set("appFonts",Pe(s)),t.toString())}catch{return e}}async function Rt(e){let t=await Promise.all(e.map(async n=>{let r=new AbortController,s=setTimeout(()=>r.abort(),1500);try{let i=await fetch(n.url,{method:"HEAD",signal:r.signal});return i.status>=200&&i.status<400?n:null}catch{return null}finally{clearTimeout(s)}})),o=[];for(let n of t)n!==null&&o.push(n);return o}async function Ot(e,t,o={}){if(!e)return new URL(t).toString();if(de(e))return new URL(e).toString();let n=ft[e.toLowerCase()];if(n){let r=new URL(t),s=ue(r.pathname);return r.pathname=`${s}${n}`,r.toString()}return Ct(e)?Et(e,t,o):Pt(e,t)}async function _t(e){try{let t=new URL(e),o=t.searchParams.get("bundle")||"";if(!o)return e;let n=process.env.SOOT_REPO_DIR||await re(o)||void 0,r=Ce({bundleUrl:o,repoDir:n});return!r||r.imageUrl&&!await Bt(r.imageUrl)?e:(t.searchParams.set("appSplash",Ee(r)),t.toString())}catch{return e}}async function Bt(e){let t=new AbortController,o=setTimeout(()=>t.abort(),1500);try{let n=await fetch(e,{method:"HEAD",signal:t.signal});return n.status>=200&&n.status<400}catch{return!1}finally{clearTimeout(o)}}async function G(e,t=Qe(),o={}){let n=await Ot(e,t,o),r=await _t(await Ut(n));if(!o.device)return r;let s=new URL(r);return s.searchParams.set("device",o.device),s.toString()}function qe(e,t){let o=e?.url||e?.origin||t;try{let n=new URL(o);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.searchParams.delete("appFonts"),n.searchParams.delete("appSplash"),n.toString()}catch{return t}}async function Dt(e,t,o,n={}){let r=new URL(await G(e,t,n));return r.searchParams.set("inspectOpen",o),r.toString()}async function At(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500,i=n.minNodeCount??10;for(let a=0;a<r;a++){let l=v(e,{commandTimeoutMs:t,simId:o,simIdSource:"flag"});try{let d=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof d=="number"&&d>i)return{bridge:l,count:d}}catch{}l.close(),await $(s)}return null}function Lt(e){if(!e)return null;try{let t=new URL(e);if(t.searchParams.has("bundle")){let o=t.searchParams.get("bundle")||"";try{let n=new URL(o),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return t.searchParams.has("port")?`connect :${t.searchParams.get("port")||""}`:t.searchParams.has("open")?`connect ${t.searchParams.get("open")||""}`:t.searchParams.has("demo")?`demo ${t.searchParams.get("demo")||"default"}`:t.pathname.includes("/sootsim/index.html")||t.pathname==="/sootsim/"||t.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function Nt(e){let t=e.indexOf(":");if(t<=0)return e.length>24?`${e.slice(0,21)}\u2026`:e;let o=e.slice(0,t),n=e.slice(t+1),r=n.length>12?`${n.slice(0,8)}\u2026`:n;return o==="AGENTBUS_SESSION"||o==="CLAUDE_CODE_SESSION_ID"||o==="CODEX_THREAD_ID"?`agent ${r}`:`${o} ${r}`}function Mo(e,t){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
|
|
3
3
|
`);for(let o of e){let n=o.lockedBy&&o.lockExpiresAt?`locked by ${Nt(o.lockedBy)} (${Math.max(0,Math.round((o.lockExpiresAt-Date.now())/1e3))}s)`:"",r=[o.isPrimary?"primary":"",o.id===t?"selected":"",o.readyState,o.userVisible===!1?"hidden":o.userVisible===!0?"visible":"",o.attachedCliCount&&o.attachedCliCount>0?"in use":"",o.userFocused?"focused":"",n].filter(Boolean);console.log(` ${o.id}${r.length?` [${r.join(", ")}]`:""}`);let s=Lt(o.url);if(s)console.log(` loaded: ${s}`);else if(o.url){let a=o.url.length>96?`${o.url.slice(0,93)}\u2026`:o.url;console.log(` url: ${a}`)}else o.origin&&console.log(` origin: ${o.origin}`);let i=Ft(o);i&&console.log(` engine: ${i}`),o.title&&console.log(` title: ${o.title}`),o.visibilityState&&o.visibilityState!=="visible"&&console.log(` visibility: ${o.visibilityState}`),console.log(` connected: ${Ge(Date.now()-o.connectedAt)}`),o.lastActiveAt&&o.lastActiveAt>0&&console.log(` last active: ${Ge(Date.now()-o.lastActiveAt)}`)}}function Ft(e){let t=e.url||e.origin||"";if(!t)return null;try{let o=new URL(t).port;return o==="5173"?"dev \u2014 local source (:5173)":o==="3000"?"soot app embedded (:3000)":ke()?`dev \u2014 local build (:${o||"?"})`:`runtime \u2014 published engine (:${o||"?"})`}catch{return null}}function Ge(e){let t=Math.max(0,Math.round(e/1e3));return t<60?`${t}s ago`:t<3600?`${Math.round(t/60)}m ago`:t<86400?`${Math.round(t/3600)}h ago`:`${Math.round(t/86400)}d ago`}async function le(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500;for(let i=0;i<r;i++){let a=v(e,{commandTimeoutMs:t});try{let d=(await a.listSims()).find(o);if(d)return d}catch{}finally{a.close()}await $(s)}return null}async function Ht(e,t,o,n,r={}){let s=r.attempts??30,i=r.intervalMs??500,a=!!n&&Number.isInteger(n)&&n>1,l=()=>a&&n!==void 0&&!me(n);for(let d=0;d<s;d++){if(l())return{kind:"host-exit"};let m=v(e,{commandTimeoutMs:t});try{let g=(await m.listSims()).find(o);if(g)return l()?{kind:"host-exit"}:{kind:"match",sim:g}}catch{}finally{m.close()}if(l())return{kind:"host-exit"};await $(i)}return{kind:"timeout"}}async function Wt(e,t,o,n={}){let r=n.attempts??20,s=n.intervalMs??250;for(let i=0;i<r;i++){let a=v(e,{commandTimeoutMs:t});try{let d=(await a.listSims()).find(m=>m.id===o);if(!d||d.readyState!=="open")return!0}catch{return!0}finally{a.close()}await $(s)}return!1}function jt(e){let t=e.meta;if(!t||t.sootsimHostDriver!=="playwright")return null;let o=Number(t.sootsimHostPid);return!Number.isInteger(o)||o<=1||o===process.pid?null:o}function Kt(e){if(!e.connectAckFile)return!1;try{return D.writeFileSync(e.connectAckFile,`${JSON.stringify({connectedAt:Date.now(),pid:e.pid??null})}
|
|
4
4
|
`,{flag:"w"}),!0}catch{return!1}}function Ve(e){if(e.diagnosticLogPath)try{let t=D.readFileSync(e.diagnosticLogPath,"utf8").trim();if(!t){console.error(` ${M.basename(e.diagnosticLogPath)} was empty`);return}let o=t.length>4e3?`\u2026
|
|
5
5
|
${t.slice(-4e3)}`:t;console.error(` ${M.basename(e.diagnosticLogPath)}:`),console.error(o)}catch(t){let o=t instanceof Error?t.message:String(t);console.error(` failed to read ${M.basename(e.diagnosticLogPath)}: ${o}`)}}function me(e){try{return process.kill(e,0),!0}catch(t){return t?.code==="EPERM"}}async function zt(e,t=2500){let o=Date.now()+t;for(;Date.now()<o;){if(!me(e))return!0;await $(100)}return!me(e)}async function ce(e,t){let o=new Set(t),n=new Set;for(let r of e){if(!o.has(r.id))continue;let s=jt(r);s&&n.add(s)}for(let r of n){try{process.kill(r,"SIGTERM")}catch{}if(await zt(r)){console.log(` closed playwright host process ${r}`);continue}try{process.kill(r,"SIGKILL"),console.log(` force-closed playwright host process ${r}`)}catch{}}}function J(e,t){if(t){let r=t.trim(),s=e.find(i=>i.id===r);if(!s)throw new Error(`no sim connected with id ${r}`);return s}let o=e.find(r=>r.isPrimary&&r.readyState==="open");if(o)return o;let n=e.find(r=>r.readyState==="open");if(n)return n;throw new Error("no sim connected")}function _(e,t,o){console.log(` ${o==="current sim"?"loaded":"opened"}: ${e} [${o}]`),console.log(` current sim: ${t.id}`),console.log(JSON.stringify({simId:t.id,url:t.url},null,2))}async function B(e,t,o){if(o.includes("--no-describe"))return;let n=process.env.SOOTSIM_QUIET_TARGET_NOTICE;process.env.SOOTSIM_QUIET_TARGET_NOTICE="1";try{await qt(e,t,{stableMs:150,maxMs:400});let r=v(e,{commandTimeoutMs:3e3,simId:t,cliLabel:"open --describe",simIdSource:"flag"});try{let s=null;try{s=await r.send({type:"evaluate",code:Me})}catch{}if(s&&!(s.flag===!0&&!s.loadingText&&Te(s))){let m=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: ${m} (nodes: ${s.nodes}, targets: ${s.targets})`),console.log(" before interacting, run: sootsim wait ready --max-ms 120000")}let a=`(async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{h as u}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{h as u}from"./chunk-D6GYUATH.js";var S=52,l=18,h=42,x=96,g=54,E=1.5,$="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",w=1;function y(e){let t=u(e),r=t.scale,o=!t.dynamicIsland&&t.homeIndicatorHeight===0&&t.cornerRadius===0,n=t.width,i=t.height,a=o?t.width+l*2:t.width+32,d=o?t.height+h+x:t.height+32,c=9.5,b=w,p=a+c*2,m=d+w*2,f=c+(o?l:16),B=o?h:16,H=o?S:t.cornerRadius+16,v=[{side:"right",top:t.hardwareButtons.lock.top,height:t.hardwareButtons.lock.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.ringToggle.top,height:t.hardwareButtons.ringToggle.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeUp.top,height:t.hardwareButtons.volumeUp.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeDown.top,height:t.hardwareButtons.volumeDown.height,width:t.hardwareButtons.width}];return{model:e,renderScale:r,outerWidth:Math.round(p*r),outerHeight:Math.round(m*r),logicalOuterWidth:p,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:d,logicalFrameLeft:c,logicalFrameTop:b,logicalScreenWidth:n,logicalScreenHeight:i,logicalScreenLeft:f,logicalScreenTop:B,logicalScreenRadius:o?0:t.cornerRadius,logicalFrameRadius:H,frameBackground:o?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:o?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:o?null:$,buttons:v,legacyHomeButton:o?{top:h+t.height+(x-g)/2,left:t.width/2-g/2+l,size:g,ring:E}:null,showHomeIndicator:t.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:t.homeIndicatorHeight}}function L(e){let t=e.side==="right",r=t?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
|
|
3
3
|
<div
|
|
4
4
|
aria-hidden="true"
|
|
5
5
|
style="
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var t="./demo-app-registry.ts",o=null;async function n(){if(o)return o;try{let r=await import(t);o=Array.isArray(r.APPS)?r.APPS:[]}catch{o=[]}return o}function e(){return o??[]}export{n as a,e as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{createHash as D}from"node:crypto";import y from"node:fs";import{createRequire as I}from"node:module";import h from"node:path";var w=/(^|\/)expo-splash-screen$/,R=/(^|\/)react-native-bootsplash$/;function U(n,e){let r=e.replace(/\/+$/,""),o=n.replace(/^\.\//,"").replace(/^\/+/,"");if(o)return`${r}/assets/${o}`}function d(n,e,r){return r?r(n):U(n,e)}function b(n){if(n==="cover")return"cover";if(n==="contain"||n==="native")return"contain"}function p(n){return typeof n=="string"&&n.length>0?n:void 0}function k(n){return typeof n=="number"&&Number.isFinite(n)?n:void 0}function v(n,e,r){if(!n||typeof n!="object")return null;let o=n,s={source:"expo-splash-screen",backgroundColor:p(o.backgroundColor)??"#ffffff"},l=p(o.image);l&&(s.imageUrl=d(l,e,r));let t=k(o.imageWidth);t!=null&&(s.imageWidthPx=t);let c=b(o.resizeMode);c&&(s.resizeMode=c);let i=o.dark;if(i&&typeof i=="object"){let g=i,u=p(g.backgroundColor),f=p(g.image);(u||f)&&(s.dark={},u&&(s.dark.backgroundColor=u),f&&(s.dark.imageUrl=d(f,e,r)))}return s}function j(n,e,r,o){let a=n[e],s=a&&typeof a=="object"?a.splash:void 0,l=n.splash,t=s&&typeof s=="object"?s:l;if(!t||typeof t!="object")return null;let i={source:"expo-legacy",backgroundColor:p(t.backgroundColor)??"#ffffff",imageWidthPx:k(t.imageWidth)??200,resizeMode:b(t.resizeMode)??"contain"},g=p(t.image);g&&(i.imageUrl=d(g,r,o));let u=t.dark;if(u&&typeof u=="object"){let f=u,S=p(f.backgroundColor),m=p(f.image);(S||m)&&(i.dark={},S&&(i.dark.backgroundColor=S),m&&(i.dark.imageUrl=d(m,r,o)))}return i}function _(n,e,r){if(!n||typeof n!="object")return null;let o=n,a=p(o.logo);if(!a)return null;let s={source:"react-native-bootsplash",backgroundColor:p(o.background)??"#fff",imageUrl:d(a,e,r),imageWidthPx:k(o.logoWidth)??100,resizeMode:"contain"},l=p(o.darkBackground),t=p(o.darkLogo);return(l||t)&&(s.dark={},l&&(s.dark.backgroundColor=l),t&&(s.dark.imageUrl=d(t,e,r))),s}function C(n,e,r,o={}){if(!n||typeof n!="object")return null;let a=n,s=a.plugins,l=null,t=null;if(Array.isArray(s))for(let i of s){let g=Array.isArray(i)?i[0]:i;if(typeof g!="string")continue;let u=Array.isArray(i)?i[1]??{}:{};!l&&w.test(g)?l=v(u,r,o.resolveAssetUrl):!t&&R.test(g)&&(t=_(u,r,o.resolveAssetUrl))}if(l)return l;let c=j(a,e,r,o.resolveAssetUrl);return c||t}var x=I(import.meta.url);function E(n){try{let e=new URL(n),r=e.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return e.origin}catch{}return null}var L=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"];function P(n){for(let e of L)try{if(y.statSync(h.join(n,e)).isFile())return!0}catch{}return!1}var F=new Set(["node_modules","artifacts","dist","build","out","coverage","tmp","public","ios","android","macos","windows","__fixtures__","__tests__","examples","example"]);function A(n,e){P(n)&&e.push(n);let r;try{r=y.readdirSync(n,{withFileTypes:!0})}catch{return}for(let o of r)o.isDirectory()&&(o.name.startsWith(".")||F.has(o.name)||A(h.join(n,o.name),e))}function M(n){try{return y.statSync(h.join(n,"package.json")).isFile()}catch{return!1}}function H(n){let e=E(n.bundleUrl);if(!e)return null;let r=n.repoDir||process.env.SOOT_REPO_DIR,o=r?h.resolve(r):process.cwd();if(!r&&!M(o))return null;let a=[];if(r)A(o,a),a.includes(o)||a.push(o);else{if(!P(o))return null;a.push(o)}if(a.length===0)return null;let s=(n.platform||process.env.SOOT_PLATFORM||"ios").toLowerCase(),l=null;try{let c=x.resolve("@expo/config",{paths:[...a,o]}),i=x(c);typeof i.getConfig=="function"&&(l=i.getConfig)}catch{}if(!l)return null;let t;for(let c of a)try{let i=l(c,{skipSDKVersionRequirement:!0});if(i?.exp&&typeof i.exp=="object"){t=i.exp;break}}catch{}return!t||typeof t!="object"?null:C(t,s==="android"?"android":"ios",e)}function J(n){return encodeURIComponent(JSON.stringify(n))}function z(n){if(!n)return null;try{let e=JSON.parse(decodeURIComponent(n));if(!e||typeof e!="object")return null;let r=e;return r.source!=="expo-splash-screen"&&r.source!=="expo-legacy"&&r.source!=="react-native-bootsplash"||typeof r.backgroundColor!="string"?null:e}catch{return null}}function W(n){let e=new Set;return n.imageUrl&&e.add(n.imageUrl),n.dark?.imageUrl&&e.add(n.dark.imageUrl),[...e]}function O(n){let e=(n.split("?")[0].split(".").pop()||"").toLowerCase();return e==="png"?"image/png":e==="jpg"||e==="jpeg"?"image/jpeg":e==="webp"?"image/webp":e==="gif"?"image/gif":e==="svg"?"image/svg+xml":"application/octet-stream"}async function K(n,e){let r=z(n);if(!r)return[];let o=[],a=new Set;for(let s of W(r)){let l=D("sha256").update(s).digest("hex");if(!a.has(l)){a.add(l);try{let t=await fetch(s);if(!t.ok){e?.onError?.(s,new Error(`${t.status} ${t.statusText}`));continue}let c=new Uint8Array(await t.arrayBuffer());o.push({url:s,urlhash:l,contentType:O(s),bytes:c}),e?.onStaged?.({url:s,byteLength:c.byteLength})}catch(t){e?.onError?.(s,t)}}}return o}export{H as a,J as b,K as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as u,b as w}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as u,b as w}from"./chunk-B272R3FA.js";import{a as h,b as g,c as v}from"./chunk-BZNPGYJQ.js";import{a as m,c as f}from"./chunk-FHHOZTPI.js";import{c as p}from"./chunk-5U22ZNDP.js";function T(){let e=h();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function I(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=h();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await v(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var y={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:T,launch:I};function _(){let e=u();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim install-desktop`)"}}async function M(e){let r=u();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await w(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var b={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:_,launch:M};import{spawn as C}from"child_process";import{closeSync as E,mkdtempSync as A,openSync as L,readFileSync as W}from"fs";import{createRequire as R}from"module";import{tmpdir as S}from"os";import{join as P}from"path";var N=`
|
|
3
3
|
const modulePath = process.env.SOOTSIM_PW_MODULE;
|
|
4
4
|
const url = process.env.SOOTSIM_PW_URL;
|
|
5
5
|
const headless = process.env.SOOTSIM_PW_HEADLESS === '1';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{createInterface as i}from"readline";var c=()=>i({input:process.stdin,output:process.stdout});function s(o){return new Promise(n=>{let r=c();r.question(o,t=>{r.close(),n(t.trim())})})}async function u(o,n=!0){let r=n?"[Y/n]":"[y/N]";if(!process.stdin.isTTY)return console.log(` ${o} ${r} ${n?"y":"n"} (non-interactive)`),n;let t=await s(` ${o} ${r} `);return t===""?n:t.toLowerCase().startsWith("y")}async function a(o,n){console.log(`
|
|
3
3
|
${o}
|
|
4
4
|
`);for(let e=0;e<n.length;e++)console.log(` ${e+1}. ${n[e]}`);if(console.log(),!process.stdin.isTTY)return console.log(` choose [1-${n.length}]: 1 (non-interactive)`),0;let r=await s(` choose [1-${n.length}]: `),t=parseInt(r,10);return t>=1&&t<=n.length?t-1:0}export{u as a,a as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-IULK4TUU.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-YMQPB45M.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-YMQPB45M.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
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u}from"./chunk-V7V6WDIM.js";import"./chunk-TPHYWQB2.js";import"./chunk-KOEBHC3D.js";import"./chunk-SVSZFGNA.js";import"./chunk-QCDWRDUC.js";import"./chunk-YNY3WSH4.js";import"./chunk-NDAGMI4C.js";import"./chunk-Y3I43AUV.js";import"./chunk-5XZN2C22.js";import"./chunk-ZZ7FODQE.js";import"./chunk-B272R3FA.js";import"./chunk-BZNPGYJQ.js";import"./chunk-FHHOZTPI.js";import"./chunk-DBOVJCG5.js";import"./chunk-ERHMPVNZ.js";import"./chunk-QDUHROO5.js";import"./chunk-5U22ZNDP.js";import"./chunk-2T6Z4WCN.js";import"./chunk-D6GYUATH.js";import"./chunk-IULK4TUU.js";export{f as buildOpenUrl,e as buildShellUrl,s as closeSimsBulk,b as normalizeDeepLinkTarget,t as planBulkCloseTargets,k as playwrightHostPidForSim,h as printConnectedSims,c as resolveBundleTarget,d as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,r as runClaimCommand,u as runCloseCommand,q as runFocusCommand,n as runLinkCommand,o as runOpenCommand,p as runUseCommand,l as signalDriverLaunchConnected,g as summarizeSimUrl,m as terminatePlaywrightHostsForSims,i as waitForSimMatch,j as waitForSimMatchOrHostExit};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-IULK4TUU.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import{WebSocket as C}from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${o}/json/list`)).json()}catch{return T(o),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${o}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of k(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function T(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d,e}from"./chunk-HIS4TFND.js";import"./chunk-NCENLBIL.js";import"./chunk-2MRFRROI.js";import"./chunk-MXYAGDBC.js";import"./chunk-AUQ7FZIX.js";import"./chunk-HXEGZCLS.js";import"./chunk-5D6TXWZQ.js";import"./chunk-ERHMPVNZ.js";import"./chunk-QDUHROO5.js";import"./chunk-5U22ZNDP.js";import"./chunk-2T6Z4WCN.js";import"./chunk-BJMQRL7V.js";import"./chunk-I52NHG4X.js";import"./chunk-D6GYUATH.js";import"./chunk-IULK4TUU.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,d as teardownDaemonService,e as teardownSootsimHome};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{f,m as T}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{f,m as T}from"./chunk-KOEBHC3D.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-SVSZFGNA.js";import{g as D,i as O,k as x}from"./chunk-5XZN2C22.js";import"./chunk-QDUHROO5.js";import"./chunk-5U22ZNDP.js";import"./chunk-2T6Z4WCN.js";import"./chunk-IULK4TUU.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:
|
|
@@ -38,6 +38,8 @@ subcommands:
|
|
|
38
38
|
|
|
39
39
|
find sheets dump Sheet.Frame-shaped nodes currently in the tree
|
|
40
40
|
find portals dump portal-host / portal-view nodes
|
|
41
|
+
find boundaries dump live paint boundaries (+ why scroll rows were
|
|
42
|
+
rejected from the auto-retained raster tier)
|
|
41
43
|
|
|
42
44
|
trace shell [cmd] opt-in shell animation trace
|
|
43
45
|
cmds: on [limit], off, status, clear, [recentLimit]
|
|
@@ -64,7 +66,7 @@ examples:
|
|
|
64
66
|
sootsim debug trace shell 120
|
|
65
67
|
sootsim debug trace anim on 3 240
|
|
66
68
|
sootsim debug trace anim 3 60
|
|
67
|
-
`)}function B(
|
|
69
|
+
`)}function B(i){return i?i.split(",").map(l=>l.trim()).filter(Boolean):[]}function a(i,l){return i===void 0?"":JSON.stringify(i,null,l?2:0)}function w(i,l=240){let g=Number.isFinite(l)&&l>0?Math.max(1,Math.round(l)):240,u=JSON.stringify(R),b=JSON.stringify(q);return i==="on"?`(() => {
|
|
68
70
|
const root = window
|
|
69
71
|
const store = root[${u}] || (root[${u}] = {
|
|
70
72
|
enabled: false,
|
|
@@ -103,7 +105,7 @@ examples:
|
|
|
103
105
|
limit: store.limit,
|
|
104
106
|
count: Array.isArray(store.samples) ? store.samples.length : 0,
|
|
105
107
|
}
|
|
106
|
-
})()`:
|
|
108
|
+
})()`:i==="off"?`(() => {
|
|
107
109
|
const root = window
|
|
108
110
|
const store = root[${u}]
|
|
109
111
|
if (!store) return { enabled: false, limit: 0, count: 0 }
|
|
@@ -116,7 +118,7 @@ examples:
|
|
|
116
118
|
limit: typeof store.limit === 'number' ? store.limit : 0,
|
|
117
119
|
count: Array.isArray(store.samples) ? store.samples.length : 0,
|
|
118
120
|
}
|
|
119
|
-
})()`:
|
|
121
|
+
})()`:i==="clear"?`(() => {
|
|
120
122
|
const store = window[${u}]
|
|
121
123
|
if (!store) return { cleared: true, count: 0 }
|
|
122
124
|
store.samples = []
|
|
@@ -134,10 +136,10 @@ examples:
|
|
|
134
136
|
limit: typeof store?.limit === 'number' ? store.limit : 0,
|
|
135
137
|
count: Array.isArray(store?.samples) ? store.samples.length : 0,
|
|
136
138
|
}
|
|
137
|
-
})()`}function J(
|
|
139
|
+
})()`}function J(i=50){let l=Number.isFinite(i)&&i>0?Math.max(1,Math.round(i)):50;return`(() => {
|
|
138
140
|
const store = window[${JSON.stringify(R)}]
|
|
139
141
|
const all = Array.isArray(store?.samples) ? store.samples : []
|
|
140
|
-
const samples = all.slice(-${
|
|
142
|
+
const samples = all.slice(-${l})
|
|
141
143
|
const first = samples[0] ?? null
|
|
142
144
|
const last = samples[samples.length - 1] ?? null
|
|
143
145
|
const uniquePhases = [...new Set(samples.map((sample) => sample?.phase).filter(Boolean))]
|
|
@@ -168,7 +170,7 @@ examples:
|
|
|
168
170
|
} : null,
|
|
169
171
|
samples,
|
|
170
172
|
}
|
|
171
|
-
})()`}async function c(l
|
|
173
|
+
})()`}async function c(i,l){return x(i,l)}async function Y(i,l){let g=D(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","memory","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-EFTHNTN2.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=O(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
|
|
172
174
|
known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await S(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await $(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
|
|
173
175
|
const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
|
|
174
176
|
if (!d) return null;
|
|
@@ -180,4 +182,4 @@ examples:
|
|
|
180
182
|
removed: d.removed,
|
|
181
183
|
changed: d.changed,
|
|
182
184
|
};
|
|
183
|
-
})()`,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 N(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
|
|
185
|
+
})()`,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"||e==="boundaries"){let o=await N(t,e);console.log(a(o,n))}else console.error(" usage: sootsim debug find <sheets|portals|boundaries>"),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 E=await f(t,"listAnimationTraces");console.log(a({enabled:h,traces:E},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,j=await f(t,"getAnimationTrace",m,C);console.log(a({id:m,samples:j},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 A(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.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as S}from"./chunk-3ECPODR2.js";import"./chunk-WST3QKHD.js";import"./chunk-DKOKNFWR.js";import"./chunk-FXHED7P5.js";import"./chunk-6LAPS7RP.js";import"./chunk-PCKWE63K.js";import"./chunk-HGER3AOP.js";import"./chunk-V7V6WDIM.js";import"./chunk-TPHYWQB2.js";import"./chunk-KOEBHC3D.js";import"./chunk-SVSZFGNA.js";import"./chunk-QCDWRDUC.js";import"./chunk-YNY3WSH4.js";import"./chunk-NDAGMI4C.js";import"./chunk-Y3I43AUV.js";import"./chunk-5XZN2C22.js";import"./chunk-ZZ7FODQE.js";import"./chunk-B272R3FA.js";import"./chunk-BZNPGYJQ.js";import"./chunk-FHHOZTPI.js";import"./chunk-4JG6GDLB.js";import"./chunk-DBOVJCG5.js";import"./chunk-NCENLBIL.js";import"./chunk-2MRFRROI.js";import"./chunk-HXEGZCLS.js";import"./chunk-5D6TXWZQ.js";import"./chunk-ERHMPVNZ.js";import"./chunk-QDUHROO5.js";import"./chunk-5U22ZNDP.js";import"./chunk-2T6Z4WCN.js";import"./chunk-D6GYUATH.js";import"./chunk-IULK4TUU.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.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-QCDWRDUC.js";import{g as d,i as l,l as a}from"./chunk-5XZN2C22.js";import"./chunk-DBOVJCG5.js";import"./chunk-ERHMPVNZ.js";import"./chunk-QDUHROO5.js";import"./chunk-5U22ZNDP.js";import"./chunk-2T6Z4WCN.js";import{g as c,h as r,i as g}from"./chunk-D6GYUATH.js";import"./chunk-IULK4TUU.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{g as E,i as R,l as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as E,i as R,l as b}from"./chunk-5XZN2C22.js";import"./chunk-QDUHROO5.js";import{b as v}from"./chunk-5U22ZNDP.js";import"./chunk-2T6Z4WCN.js";import"./chunk-IULK4TUU.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.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-JOE4R2PO.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-ZZ7FODQE.js";import"./chunk-B272R3FA.js";import"./chunk-BZNPGYJQ.js";import"./chunk-FHHOZTPI.js";import"./chunk-5U22ZNDP.js";import"./chunk-2T6Z4WCN.js";import"./chunk-IULK4TUU.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 m}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as m}from"./chunk-ZZTGVTE3.js";import"./chunk-JOE4R2PO.js";import{a as h,h as g}from"./chunk-V7V6WDIM.js";import"./chunk-TPHYWQB2.js";import"./chunk-KOEBHC3D.js";import"./chunk-SVSZFGNA.js";import"./chunk-QCDWRDUC.js";import"./chunk-YNY3WSH4.js";import"./chunk-NDAGMI4C.js";import"./chunk-Y3I43AUV.js";import"./chunk-5XZN2C22.js";import{b as u,g as v}from"./chunk-ZZ7FODQE.js";import{a as p}from"./chunk-B272R3FA.js";import"./chunk-BZNPGYJQ.js";import{c as f}from"./chunk-FHHOZTPI.js";import"./chunk-DBOVJCG5.js";import"./chunk-ERHMPVNZ.js";import"./chunk-QDUHROO5.js";import"./chunk-5U22ZNDP.js";import"./chunk-2T6Z4WCN.js";import"./chunk-D6GYUATH.js";import"./chunk-IULK4TUU.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?g(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:
|
|
@@ -16,4 +16,4 @@ examples:
|
|
|
16
16
|
sootsim electron --port 5173
|
|
17
17
|
sootsim electron --profile qa
|
|
18
18
|
sootsim electron --driver system
|
|
19
|
-
`),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?f(t).id:void 0,s=i||r.driver,l=u;if(s){let n=v(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(h(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await m("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-
|
|
19
|
+
`),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?f(t).id:void 0,s=i||r.driver,l=u;if(s){let n=v(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(h(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await m("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-F43JZSJO.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.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as c,b as d,c as e,d as f}from"./chunk-3ECPODR2.js";import"./chunk-WST3QKHD.js";import"./chunk-DKOKNFWR.js";import"./chunk-FXHED7P5.js";import"./chunk-6LAPS7RP.js";import{c as a,d as b}from"./chunk-PCKWE63K.js";import"./chunk-HGER3AOP.js";import"./chunk-V7V6WDIM.js";import"./chunk-TPHYWQB2.js";import"./chunk-KOEBHC3D.js";import"./chunk-SVSZFGNA.js";import"./chunk-QCDWRDUC.js";import"./chunk-YNY3WSH4.js";import"./chunk-NDAGMI4C.js";import"./chunk-Y3I43AUV.js";import"./chunk-5XZN2C22.js";import"./chunk-ZZ7FODQE.js";import"./chunk-B272R3FA.js";import"./chunk-BZNPGYJQ.js";import"./chunk-FHHOZTPI.js";import"./chunk-4JG6GDLB.js";import"./chunk-DBOVJCG5.js";import"./chunk-NCENLBIL.js";import"./chunk-2MRFRROI.js";import"./chunk-HXEGZCLS.js";import"./chunk-5D6TXWZQ.js";import"./chunk-ERHMPVNZ.js";import"./chunk-QDUHROO5.js";import"./chunk-5U22ZNDP.js";import"./chunk-2T6Z4WCN.js";import"./chunk-D6GYUATH.js";import"./chunk-IULK4TUU.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c}from"./chunk-MXYAGDBC.js";import"./chunk-AUQ7FZIX.js";import"./chunk-HXEGZCLS.js";import"./chunk-5D6TXWZQ.js";import"./chunk-ERHMPVNZ.js";import"./chunk-QDUHROO5.js";import"./chunk-5U22ZNDP.js";import"./chunk-2T6Z4WCN.js";import"./chunk-BJMQRL7V.js";import"./chunk-I52NHG4X.js";import"./chunk-D6GYUATH.js";import"./chunk-IULK4TUU.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
|
|
@@ -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.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as n,c as r,d as l}from"./chunk-5D6TXWZQ.js";import"./chunk-5U22ZNDP.js";import"./chunk-IULK4TUU.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-2T6Z4WCN.js";import"./chunk-IULK4TUU.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,H as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,O as claimDaemonLockfile,G as compareSemver,x as configFilePath,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,C as ensureSootsimHome,K as isDaemonLockfileFresh,L as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,F as listInstalledRuntimes,q as profilesDir,D as readActiveRuntime,I as readDaemonLockfile,J as readDevBridgeLockfile,y as readSharedConfig,A as readTelemetryEnabled,P as removeDaemonLockfile,Q as removeDevBridgeLockfile,l as runtimeDir,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,E as writeActiveRuntime,M as writeDaemonLockfile,N as writeDevBridgeLockfile,z as writeSharedConfig,B as writeTelemetryEnabled};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.188 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{j as a,k as b}from"./chunk-PCKWE63K.js";import"./chunk-HGER3AOP.js";import"./chunk-V7V6WDIM.js";import"./chunk-TPHYWQB2.js";import"./chunk-KOEBHC3D.js";import"./chunk-SVSZFGNA.js";import"./chunk-QCDWRDUC.js";import"./chunk-YNY3WSH4.js";import"./chunk-NDAGMI4C.js";import"./chunk-Y3I43AUV.js";import"./chunk-5XZN2C22.js";import"./chunk-ZZ7FODQE.js";import"./chunk-B272R3FA.js";import"./chunk-BZNPGYJQ.js";import"./chunk-FHHOZTPI.js";import"./chunk-4JG6GDLB.js";import"./chunk-DBOVJCG5.js";import"./chunk-HXEGZCLS.js";import"./chunk-5D6TXWZQ.js";import"./chunk-ERHMPVNZ.js";import"./chunk-QDUHROO5.js";import"./chunk-5U22ZNDP.js";import"./chunk-2T6Z4WCN.js";import"./chunk-D6GYUATH.js";import"./chunk-IULK4TUU.js";export{a as printShellPerfReport,b as runInspect};
|