sootsim 0.1.220 → 0.1.222
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 +4 -4
- package/dist-cli/chunks/{agent-LCKEPMVH.js → agent-PAMEKRPR.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-ND5JHQSI.js → agent-wrapper-OSAGK6VL.js} +2 -2
- package/dist-cli/chunks/{app-fonts-N2W5BQXE.js → app-fonts-22INL2EQ.js} +2 -2
- package/dist-cli/chunks/{assert-O3QO4ZFV.js → assert-52DZMSFX.js} +2 -2
- package/dist-cli/chunks/{auth-7VXPQOZP.js → auth-7GTFXSYJ.js} +2 -2
- package/dist-cli/chunks/beta-PHTIILYS.js +2 -0
- package/dist-cli/chunks/{camera-OROQGFMH.js → camera-6NU3NTOK.js} +2 -2
- package/dist-cli/chunks/{chunk-J3QE2UZI.js → chunk-22SK3UIK.js} +1 -1
- package/dist-cli/chunks/{chunk-VCLV5GYE.js → chunk-27GCMFBK.js} +2 -2
- package/dist-cli/chunks/chunk-2FWJGMXZ.js +1 -0
- package/dist-cli/chunks/{chunk-S6XSCI45.js → chunk-2J4S6MUC.js} +1 -1
- package/dist-cli/chunks/{chunk-UODAA57Q.js → chunk-3II53A2P.js} +2 -2
- package/dist-cli/chunks/{chunk-GWQWCFMR.js → chunk-74RYDROC.js} +2 -2
- package/dist-cli/chunks/{chunk-ZW5IAKXC.js → chunk-7NWA6IEO.js} +2 -2
- package/dist-cli/chunks/{chunk-XHPOQKUA.js → chunk-AJNNLP2G.js} +1 -1
- package/dist-cli/chunks/{chunk-PJ76I3KZ.js → chunk-ANJLN4OR.js} +1 -1
- package/dist-cli/chunks/{chunk-YRHLQY6J.js → chunk-BMDW2UP2.js} +2 -2
- package/dist-cli/chunks/{chunk-RWJM23VH.js → chunk-CYB4R5KY.js} +1 -1
- package/dist-cli/chunks/{chunk-KZUGDZ3Q.js → chunk-ELE7IY7O.js} +2 -2
- package/dist-cli/chunks/{chunk-RIB5CQ34.js → chunk-ER35PHK2.js} +1 -1
- package/dist-cli/chunks/{chunk-GBALEYV4.js → chunk-EXWBPQTP.js} +1 -1
- package/dist-cli/chunks/{chunk-UXLMOEFU.js → chunk-FXV56NIE.js} +2 -2
- package/dist-cli/chunks/chunk-G3WMTCYE.js +1 -0
- package/dist-cli/chunks/{chunk-UHEKB33X.js → chunk-HGXGAEMQ.js} +2 -2
- package/dist-cli/chunks/{chunk-U3OSSCTT.js → chunk-HZKDCAPT.js} +67 -67
- package/dist-cli/chunks/{chunk-3ZWOQPLC.js → chunk-IH2EGP5O.js} +1 -1
- package/dist-cli/chunks/chunk-J3KNXYXV.js +2 -0
- package/dist-cli/chunks/{chunk-64GMEXIP.js → chunk-JYAYD6GF.js} +2 -2
- package/dist-cli/chunks/{chunk-EFLOJBBN.js → chunk-KSNE3CXF.js} +3 -3
- package/dist-cli/chunks/{chunk-BXNMPK4X.js → chunk-LDIHELGQ.js} +2 -2
- package/dist-cli/chunks/{chunk-TH7ODXC5.js → chunk-LMHE7A45.js} +3 -3
- package/dist-cli/chunks/{chunk-BI3I5X3U.js → chunk-MMEXOEEB.js} +1 -1
- package/dist-cli/chunks/{chunk-3HJXCSYI.js → chunk-MMKHWL3Y.js} +2 -2
- package/dist-cli/chunks/{chunk-7TOHX4IF.js → chunk-NFGGDW7N.js} +1 -1
- package/dist-cli/chunks/{chunk-JMXBQ4RD.js → chunk-NPXZ3TTE.js} +3 -3
- package/dist-cli/chunks/{chunk-XKOYH7ES.js → chunk-OLBLBO7T.js} +1 -1
- package/dist-cli/chunks/{chunk-F5XBOFGK.js → chunk-OOAX7FH3.js} +2 -2
- package/dist-cli/chunks/{chunk-TEFCJZH5.js → chunk-OY3CGL2W.js} +1 -1
- package/dist-cli/chunks/{chunk-4JSQTD75.js → chunk-PKLWGFHZ.js} +1 -1
- package/dist-cli/chunks/{chunk-RTZNRPD4.js → chunk-PMEH3LVK.js} +3 -3
- package/dist-cli/chunks/{chunk-HAXE5SZL.js → chunk-PPNT77TR.js} +1 -1
- package/dist-cli/chunks/{chunk-OBWXIGPP.js → chunk-PT2YFQPS.js} +2 -2
- package/dist-cli/chunks/{chunk-OCEYXYKG.js → chunk-QPMDVJD4.js} +2 -2
- package/dist-cli/chunks/{chunk-ZU6ECPCC.js → chunk-SMSLWF32.js} +1 -1
- package/dist-cli/chunks/{chunk-FRQOTDD6.js → chunk-SSCVCJ44.js} +2 -2
- package/dist-cli/chunks/{chunk-NRHZHQOH.js → chunk-U72XOJWQ.js} +2 -2
- package/dist-cli/chunks/{chunk-6HBN4KIM.js → chunk-UQC3LPA5.js} +2 -2
- package/dist-cli/chunks/{chunk-NPK2TDEV.js → chunk-WDKBZZ66.js} +2 -2
- package/dist-cli/chunks/{chunk-KJVNP5B5.js → chunk-WVM3FQYU.js} +2 -2
- package/dist-cli/chunks/{chunk-PWLK4BGI.js → chunk-ZLIJSNSV.js} +2 -2
- package/dist-cli/chunks/cli-version-MKNW3K2G.js +2 -0
- package/dist-cli/chunks/{compat-NRYECFCC.js → compat-MY735YZN.js} +3 -3
- package/dist-cli/chunks/{config-4KKKEHH2.js → config-2O6FVTRD.js} +2 -2
- package/dist-cli/chunks/{control-ZH7X66II.js → control-USXHNAMY.js} +2 -2
- package/dist-cli/chunks/daemon-7VGXE5TR.js +2 -0
- package/dist-cli/chunks/{debug-Z66GNDYA.js → debug-JTEEZDTL.js} +3 -3
- package/dist-cli/chunks/{desktop-DO2BQKM4.js → desktop-3D3UEHO2.js} +3 -3
- package/dist-cli/chunks/{detox-66YMXFQ5.js → detox-CI2TC5QB.js} +2 -2
- package/dist-cli/chunks/{device-KPQXKN5R.js → device-DXUKJNRG.js} +2 -2
- package/dist-cli/chunks/{diagnose-OMCHVX2X.js → diagnose-J7YIKH7F.js} +2 -2
- package/dist-cli/chunks/drivers-GR5S424K.js +2 -0
- package/dist-cli/chunks/{film-PV6DPBRX.js → film-VI7LK5QA.js} +7 -7
- package/dist-cli/chunks/flow-VVZQZ2BI.js +2 -0
- package/dist-cli/chunks/help-GAD62NIJ.js +2 -0
- package/dist-cli/chunks/{home-paths-LGQZZOPD.js → home-paths-2MGU226G.js} +2 -2
- package/dist-cli/chunks/inspect-QGHM6JDA.js +2 -0
- package/dist-cli/chunks/install-desktop-QCXPIETA.js +2 -0
- package/dist-cli/chunks/{login-QQH2UU2S.js → login-6POY2KI5.js} +4 -4
- package/dist-cli/chunks/{logout-KMGAWWAS.js → logout-XVRICTOO.js} +2 -2
- package/dist-cli/chunks/{maestro-IKINYBBR.js → maestro-NMQPC4Z6.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-NWVVHDBL.js → maestro-generate-RWOTTZWF.js} +3 -3
- package/dist-cli/chunks/{mode-T576L6ZK.js → mode-YJDSWYDP.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-VW3GGNEG.js +2 -0
- package/dist-cli/chunks/{perf-TRPZNIQH.js → perf-5C66OAUT.js} +2 -2
- package/dist-cli/chunks/{record-O5HUQAK4.js → record-SL3GFCYV.js} +3 -3
- package/dist-cli/chunks/runtime-HY2MH4YI.js +2 -0
- package/dist-cli/chunks/{screenshot-command-5FI7RD5L.js → screenshot-command-LDQ7ECBF.js} +3 -3
- package/dist-cli/chunks/{screenshots-capture-RLEAPJ45.js → screenshots-capture-RESSNVW3.js} +2 -2
- package/dist-cli/chunks/{serve-4SIWGY4S.js → serve-HJCCACDY.js} +2 -2
- package/dist-cli/chunks/{setup-LDHVGPS2.js → setup-XW3UMFWG.js} +3 -3
- package/dist-cli/chunks/{skills-CCIOVHHV.js → skills-XEEQG4WI.js} +2 -2
- package/dist-cli/chunks/{storage-HV7PNB7R.js → storage-7QRHSCU5.js} +2 -2
- package/dist-cli/chunks/store-FYM45VYV.js +2 -0
- package/dist-cli/chunks/telemetry-QX4FTNQ2.js +2 -0
- package/dist-cli/chunks/{timeline-NZY4TIYS.js → timeline-M7WJ3UPA.js} +2 -2
- package/dist-cli/chunks/{upgrade-3SRHX5MN.js → upgrade-JKF372UG.js} +2 -2
- package/dist-cli/chunks/upload-LGZORNQI.js +2 -0
- package/dist-cli/chunks/{version-EWVUUOUL.js → version-SU3MXXWF.js} +2 -2
- package/dist-cli/chunks/web-47OUBT5X.js +2 -0
- package/dist-cli/chunks/{what-happened-K2NQG7LZ.js → what-happened-J6IVUDEV.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.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 +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +5 -5
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/beta-ZIOECOJB.js +0 -2
- package/dist-cli/chunks/chunk-AMUOGO6F.js +0 -1
- package/dist-cli/chunks/chunk-H7EGEWCF.js +0 -2
- package/dist-cli/chunks/chunk-VQ4VGI36.js +0 -1
- package/dist-cli/chunks/cli-version-MY4N7YDM.js +0 -2
- package/dist-cli/chunks/daemon-6QQWVRFD.js +0 -2
- package/dist-cli/chunks/drivers-T2AZY5KL.js +0 -2
- package/dist-cli/chunks/flow-BCJH7MUK.js +0 -2
- package/dist-cli/chunks/help-KRIPS56R.js +0 -2
- package/dist-cli/chunks/inspect-3XG2QTVU.js +0 -2
- package/dist-cli/chunks/install-desktop-SH73YM3O.js +0 -2
- package/dist-cli/chunks/optional-demo-registry-2F3PLJXV.js +0 -2
- package/dist-cli/chunks/runtime-RLXYAF2A.js +0 -2
- package/dist-cli/chunks/store-DF56QJJG.js +0 -2
- package/dist-cli/chunks/telemetry-OFJVUJ34.js +0 -2
- package/dist-cli/chunks/upload-ZKKGG3CU.js +0 -2
- package/dist-cli/chunks/web-OT6OKUVX.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as ce}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as ce}from"./chunk-ZLIJSNSV.js";import{b as Et,c as Rt,k as Pt}from"./chunk-BMDW2UP2.js";import{a as oe,b as P,c as D,d as Ie,e as ie,f as V,g as de,h as ge,i as Mt,j as Ft,k as Te,l as Ot}from"./chunk-WVM3FQYU.js";import{A as wt,B as xt,E as $t,G as St,I as ue,J as vt,P as We,a as ve,b as nt,c as rt,d as it,e as at,f as lt,g as ct,h as ut,i as dt,j as pt,k as Be,l as Ce,q as je,r as mt,s as ft,t as fe,u as gt,v as ke,w as Le,x as yt,y as ht,z as bt}from"./chunk-CYB4R5KY.js";import{e as kt,g as _t,i as It,j as Tt,k as Nt,l as _e}from"./chunk-HGXGAEMQ.js";import{a as tt}from"./chunk-OY3CGL2W.js";import{a as Ae,c as De,d as Q}from"./chunk-MMKHWL3Y.js";import{c as ot}from"./chunk-PKLWGFHZ.js";import{b as st}from"./chunk-SMSLWF32.js";function qe(e){return`(async () => {
|
|
3
3
|
const bridge = globalThis.SootSim && globalThis.SootSim.bridges && globalThis.SootSim.bridges.hotRemount
|
|
4
4
|
if (!bridge || typeof bridge.reloadExternalApp !== 'function') return false
|
|
5
5
|
await bridge.reloadExternalApp({ resetStorage: ${e?"true":"false"} })
|
|
@@ -547,7 +547,7 @@ import{a as ce}from"./chunk-PWLK4BGI.js";import{b as Et,c as Rt,k as Pt}from"./c
|
|
|
547
547
|
`);console.log(`${t??""}
|
|
548
548
|
|
|
549
549
|
${n}
|
|
550
|
-
`),process.exit(0)}let F=c.wsPort,N=c.simId,L=c.simIdSource,M=c.commandTimeoutMs;if(y==="get"&&p==="diagnosis"){let x=a.indexOf("diagnosis"),t=x>=0?[...a.slice(0,x),...a.slice(x+1)]:a,{runDiagnose:n}=await import("./diagnose-
|
|
550
|
+
`),process.exit(0)}let F=c.wsPort,N=c.simId,L=c.simIdSource,M=c.commandTimeoutMs;if(y==="get"&&p==="diagnosis"){let x=a.indexOf("diagnosis"),t=x>=0?[...a.slice(0,x),...a.slice(x+1)]:a,{runDiagnose:n}=await import("./diagnose-J7YIKH7F.js"),r=await n(["recent",...t],o);process.exitCode=r;return}if(y==="do"&&p==="scan"){let{runCamera:x}=await import("./camera-6NU3NTOK.js");await x(a,{port:o.port});return}if(p==="list"&&a.some(x=>x==="--drivers"||x==="-D")){let{buildDriverListRows:x}=await import("./drivers-GR5S424K.js"),t=x();console.log(` available drivers (${t.length}):
|
|
551
551
|
`);let n=Math.max(...t.map(i=>i.id.length),6),r=Math.max(...t.map(i=>i.kind.length),4);for(let i of t){let d=i.available?"\u2713":"\u2717",m=i.id.padEnd(n),f=i.kind.padEnd(r);console.log(` ${d} ${m} ${f} ${i.description}`),i.available&&i.detail?console.log(` ${i.detail}`):!i.available&&i.reason&&console.log(` unavailable: ${i.reason}`)}return}let u=It(c),j=N||"default",A=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","storage-clear","list","wait","sleep"]),R=200;function K(x){let t=x.replace(/\s+/g," ").trim();if(!t)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(t)){let r=/<title[^>]*>([^<]+)<\/title>/i.exec(x)?.[1]?.trim(),i=/<body[^>]*>([\s\S]*?)<\//i.exec(x)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),d=r||i||"html error page";return`<html ${x.length}B> "${d}" (body elided \u2014 add --json for the full payload)`}return t.length<=R?t:`${t.slice(0,R)}\u2026 (+${t.length-R} more bytes)`}function U(x){let t=x.displayUrl||x.url;return x.status!=null?`${x.method} ${t} -> ${x.status}${x.statusText?` ${x.statusText}`:""}`:x.error?`${x.method} ${t} -> ${x.error}`:`${x.method} ${t}`}async function v(x){let t=me()?400:200;try{let{settled:n,elapsed:r}=await se({bridge:x,maxMs:t,pollMs:32,stablePolls:2});n||process.stderr.write(` \u26A0 auto-wait timed out after ${r??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
|
|
552
552
|
`)}catch{}}function O(x,t){if(t.result?.reason==="offscreen"){let{x:n,y:r,screen:i}=t.result;console.error(` tap failed: ${x} resolved to (${Math.round(n)},${Math.round(r)}), outside the ${i?.width}x${i?.height} screen`),console.error(" the node exists but is scrolled out of view \u2014 scroll it on-screen first (sootsim do scroll / swipe), then tap.");return}console.error(` tap failed: ${x} stayed visible but did not receive a hittable press after ${t.attempts} attempt${t.attempts===1?"":"s"}`),t.result&&console.error(` last result: ${JSON.stringify(t.result)}`)}async function J(){try{return await u.send({type:"evaluate",code:`(() => ({
|
|
553
553
|
console: ${ke},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var c="sootsim-agent-prompt-v1";function r(n){return typeof n=="string"?n.trim():""}function m(n){let e=r(n.text);if(!e)return"";let t=r(n.displayText),s=r(n.inspectSummary),o=r(n.inspectTrace);return!!s||!!o||/[\r\n]/.test(e)||!!t&&t!==e?JSON.stringify({__sootsimAgentPrompt:c,text:e,displayText:t,inspectSummary:s,inspectTrace:o}):e}function u(n){let e=r(n);if(!e)return null;try{let t=JSON.parse(e);if(t.__sootsimAgentPrompt!==c)return{text:e};let s=r(typeof t.text=="string"?t.text:void 0);if(!s)return null;let o=r(typeof t.displayText=="string"?t.displayText:void 0),i=r(typeof t.inspectSummary=="string"?t.inspectSummary:void 0),p=r(typeof t.inspectTrace=="string"?t.inspectTrace:void 0);return{text:s,...o?{displayText:o}:{},...i?{inspectSummary:i}:{},...p?{inspectTrace:p}:{}}}catch{return{text:e}}}export{m as a,u as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as Ue,b as _e,c as Pe}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as Ue,b as _e,c as Pe}from"./chunk-QPMDVJD4.js";import{c as Be}from"./chunk-PPNT77TR.js";import{d as Ee}from"./chunk-NFGGDW7N.js";import{g as Re,i as Ie,k as B}from"./chunk-HGXGAEMQ.js";import{d as Ae}from"./chunk-ANJLN4OR.js";import{a as ke,b as E}from"./chunk-74RYDROC.js";import{a as xe}from"./chunk-27GCMFBK.js";import{createHash as ht}from"crypto";import{readFileSync as w}from"fs";import Ce from"path";import{gzipSync as ue,gunzipSync as yt}from"zlib";function Le(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}import{brotliCompressSync as ot,constants as it}from"node:zlib";var at=9;function $e(e){return ot(e,{params:{[it.BROTLI_PARAM_QUALITY]:at}})}function ae(e,t){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function lt(e){let t=ae(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${s.slice(0,200)}`)}}async function ut(e,t=8,r){let s=0,i=0,a=e.length;await Promise.all(Array.from({length:Math.min(t,a)},async()=>{for(;s<a;){let u=e[s++];await lt(u),i++,r?.(i,a)}}))}function ct(e,t,r,s){let i=[];i.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let a of e.files){let u=r.get(a.urlhash);u&&i.push({url:a.putUrl,contentType:a.contentType,bytes:u})}e.events&&s?.eventsBytes&&i.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.timeline&&s?.timelineBytes&&i.push({url:e.timeline.putUrl,contentType:e.timeline.contentType,bytes:s.timelineBytes}),e.flowVideo&&s?.videoBytes&&i.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&i.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),e.failureBundle&&s?.failureBundleBytes&&i.push({url:e.failureBundle.putUrl,contentType:e.failureBundle.contentType,bytes:s.failureBundleBytes});for(let a of e.snapshots??[]){let u=s?.snapshotBytes?.get(a.id);u&&i.push({url:a.putUrl,contentType:a.contentType,bytes:u})}return i}function dt(e){return e.replace(/\/+$/,"")}var K=class extends Error{constructor(r,s,i,a=""){super(r);this.status=s;this.phase=i;this.responseText=a;this.name="PresignedUploadError"}};async function Fe(e){let t=dt(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-soot-admin-upload-bypass"]=e.adminBypassToken);let s=ae(3e4,"init"),i;try{i=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!i.ok){let M=await i.text().catch(()=>"");throw new K(`init failed: ${i.status} ${M.slice(0,200)}`,i.status,"init",M)}let a=await i.json(),u=ct(a,e.bundleBytes,e.filesByHash,e.extras);await ut(u,e.concurrency??8,e.onPutProgress);let g=ae(3e4,"finalize"),d;try{d=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:g.signal})}finally{g.cancel()}if(!d.ok){let M=await d.text().catch(()=>"");throw new K(`finalize failed: ${d.status} ${M.slice(0,200)}`,d.status,"finalize",M)}let R=await d.json();return{init:a,finalize:R}}function pt(e){return e!==null&&typeof e=="object"?e:null}function Oe(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function le(e){let t=pt(e);return t?t.schemaVersion===1&&Oe(t.t)!==void 0&&Oe(t.seq)!==void 0&&typeof t.context=="string"&&typeof t.kind=="string"&&"data"in t:!1}function ft(e,t){let r=[];for(let s of e.split(`
|
|
3
3
|
`)){let i=s.trim();if(i)try{let a=JSON.parse(i);t(a)&&r.push(a)}catch{}}return r}function Ne(e){return ft(e,le)}function bt(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.message=="string"&&t.message?t.message:null}catch{return null}}function wt(e){let t=JSON.parse(w(e,"utf8"));if(!Array.isArray(t))throw new Error("snapshot manifest must be an array");let r=new Set;return t.map((s,i)=>{if(s===null||typeof s!="object")throw new Error(`snapshot manifest entry ${i} must be an object`);let a=Reflect.get(s,"id"),u=Reflect.get(s,"label"),g=Reflect.get(s,"path"),d=Reflect.get(s,"t");if(typeof a!="string"||!a||r.has(a))throw new Error(`snapshot manifest entry ${i} has an invalid or duplicate id`);if(typeof g!="string"||!g)throw new Error(`snapshot manifest entry ${i} has no PNG path`);if(typeof d!="number"||!Number.isFinite(d)||d<0)throw new Error(`snapshot manifest entry ${i} has an invalid capture time`);r.add(a);let R=w(g);return{meta:{id:a,label:typeof u=="string"&&u?u:a,kind:"interaction",t:Math.round(d),contentType:"image/png",sizeBytes:R.byteLength},bytes:R}})}var Je=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://sootbean.com",qe=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",de="http://localhost:3000",Mt=2e3;async function Tt(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${de}/api/preview/upload/init`,{method:"OPTIONS",signal:AbortSignal.timeout(Mt)});if(t.ok||t.status===204||t.status===405)return de}catch{}return Je}function F(e){return e.replace(/\/$/,"")}function St(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function vt(e){try{let t=new URL(e).hostname.toLowerCase();return t==="sootbean.com"||t.endsWith(".sootbean.com")}catch{return!1}}function xt(e,t){return t?F(t):process.env.SOOTSIM_PREVIEW_ORIGIN?F(process.env.SOOTSIM_PREVIEW_ORIGIN):St(e)?F(e):vt(e)?F(qe):F(e)}function kt(){console.log(`
|
|
4
4
|
sootsim record upload \u2014 publish the current recorded bundle as a /preview/<id> link
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var m={"--help":{type:"boolean",short:"-h"},"--version":{type:"boolean",short:"-V"},"--verbose":{type:"boolean",short:"-v"},"--port":{type:"number",short:"-p"},"--device":{type:"string",short:"-d"},"--theme":{type:"string",short:"-t"},"--headless":{type:"boolean"},"--driver":{type:"string"},"--sim":{type:"string"},"--session":{type:"string"},"--tab":{type:"string"}},p=new Set(["list","describe","find","get","do","wait","network","logs","shell"]),b=new Set(["do","get","wait","shell","debug"]),d=new Set(["detox","maestro","record","film","storage","perf","screenshot","mode","inspect","debug","timeline","what-happened","shell","assert","device","open","list","use","claim","close","compat","desktop","login","logout","auth","setup","serve","daemon","runtime","upgrade","version","skill","config","app-fonts","agent-wrapper","agent",...p]);function h(c){let r=c.slice(2),e={command:null,commandArgs:[],globalFlags:{},help:!1,version:!1,verbose:!1},s=0;for(;s<r.length;){let o=r[s];if(o==="--"){e.commandArgs.push(...r.slice(s+1));break}let i=Object.entries(m).find(([l,t])=>l===o||t.short===o);if(i){let[l,t]=i,a=l.replace(/^--/,"");if(t.type==="boolean")e.globalFlags[a]=!0,s++;else{let n=r[s+1];if(n===void 0||n.startsWith("-")){console.error(` warning: ${o} requires a value`),s++;continue}if(t.type==="number"){let g=Number(n);if(Number.isNaN(g)){console.error(` warning: ${o} requires a number, got "${n}"`),s+=2;continue}e.globalFlags[a]=g}else e.globalFlags[a]=n;s+=2}continue}if(!e.command&&!o.startsWith("-")){let l=o.indexOf("-");if(l>0){let t=o.slice(0,l),a=o.slice(l+1);if(b.has(t)&&a.length>0){e.command=t;let n=r.slice(s+1);e.commandArgs=[a,...n[0]==="--"?n.slice(1):n];break}}if(d.has(o)){e.command=o;let t=r.slice(s+1);e.commandArgs=t[0]==="--"?t.slice(1):t;break}e.commandArgs=r.slice(s);break}e.commandArgs.push(o),s++}return e.help=!!e.globalFlags.help,e.version=!!e.globalFlags.version,e.verbose=!!e.globalFlags.verbose,e}export{p as a,h as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.222 | (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{a as x}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as x}from"./chunk-EXWBPQTP.js";import{a as k}from"./chunk-AJNNLP2G.js";import{spawn as v,spawnSync as u}from"child_process";import{chmodSync as S,copyFileSync as T,createWriteStream as E,existsSync as w,mkdirSync as y,rmSync as g,statSync as P,unlinkSync as D}from"fs";import{tmpdir as M}from"os";import{dirname as A,join as f,resolve as b}from"path";var h="https://sootbean.com/api/electron-release";function O(){let n=process.arch;if(process.platform==="darwin"){let o=n==="arm64"?"mac-arm64":"mac-x64",e=`sootsim-latest-${o}.dmg`;return{platform:o,filename:e,url:`${h}/${e}`,install:L}}if(process.platform==="linux"){let o=n==="arm64"?"linux-arm64":"linux-x64",e=`sootsim-latest-${o}.AppImage`;return{platform:o,filename:e,url:`${h}/${e}`,install:C}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:B}}return null}async function I({url:n,dest:o,onProgress:e}){let s=await fetch(n,{redirect:"follow"});if(!s.ok)throw new Error(`${s.status} ${s.statusText} (${n})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error(`empty response body (${n})`);y(A(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,e?.(c,a)}}finally{await new Promise((l,p)=>{i.end(r=>r?p(r):l())})}}function _(n,o){let e=(n/1048576).toFixed(1);if(!o)return` ${e} MB`;let s=Math.min(100,Math.round(n/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${e} / ${t} MB`}async function L(n){let o=u("hdiutil",["attach","-nobrowse","-readonly",n],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let e=o.stdout.trim().split(`
|
|
3
3
|
`),t=e[e.length-1].split(" ").pop()?.trim();if(!t||!w(t))throw new Error(`could not determine dmg mount point (output: ${o.stdout})`);let a=f(t,"sootsim.app");if(!w(a))throw u("hdiutil",["detach","-force",t]),new Error(`sootsim.app not found inside ${t}`);let i="/Applications",d=b(process.env.HOME||"","Applications"),c=i;try{let m=f(i,`.sootsim-write-probe-${process.pid}`);u("touch",[m]),w(m)?g(m,{force:!0}):c=d}catch{c=d}c===d&&y(c,{recursive:!0});let l=f(c,"sootsim.app");w(l)&&g(l,{recursive:!0,force:!0});let p=u("cp",["-R",a,l]),r=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return r.status!==0&&console.warn(` warning: failed to unmount ${t} (${r.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function C(n){let o=b(process.env.HOME||"","Applications");y(o,{recursive:!0});let e=f(o,"sootsim.AppImage");return w(e)&&g(e,{force:!0}),T(n,e),D(n),S(e,493),e}async function B(n){return await new Promise((o,e)=>{let s=v("cmd",["/c","start",'""',"/wait",n],{stdio:"inherit"});s.once("error",e),s.once("exit",t=>{t===0?o():e(new Error(`installer exited with code ${t}`))})}),n}async function q(n){(n.includes("--help")||n.includes("-h"))&&(console.log(`
|
|
4
4
|
sootsim desktop install \u2014 download and install the optional desktop GUI
|
|
5
5
|
|
|
@@ -20,4 +20,4 @@ examples:
|
|
|
20
20
|
`),process.exit(0));let o=n.includes("--yes")||n.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,e=n.includes("--force"),s=k();if(s&&!e){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=O();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, linux-arm64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await x("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(M(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
|
|
21
21
|
`);try{await I({url:t.url,dest:i,onProgress:(r,m)=>{let $=Date.now();$-d<100&&r<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${_(r,m)}`))}})}catch(r){g(a,{recursive:!0,force:!0});let m=r instanceof Error?r.message:String(r);console.error(`
|
|
22
22
|
download failed: ${m}`),console.error(` the ${t.platform} desktop build may not be published yet, or your`),console.error(" network blocked the request. check your connection and try again later;"),console.error(" the CLI + daemon work without the desktop app (run: sootsim --help)."),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
|
|
23
|
-
`);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-
|
|
23
|
+
`);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-QX4FTNQ2.js");try{let r=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${r}`)}catch(r){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:r instanceof Error?r.message:String(r)}}),await p(),console.error(` install failed: ${r instanceof Error?r.message:String(r)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim desktop launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{q as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.222 | (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,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{h as w,j as u,k as m,l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{h as w,j as u,k as m,l}from"./chunk-J3KNXYXV.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","alwaysShowLiveWebViews","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function b(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=b()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!b())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function k(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=k();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as r}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as r}from"./chunk-27GCMFBK.js";var c=["ghs_","ghp_","gho_","ghu_","github_pat_"];function d(n){return!!(n&&n.length>=20&&c.some(t=>n.startsWith(t)))}function p(){let n=process.env.SOOT_INSTALLATION_TOKEN?.trim(),t=process.env.GITHUB_TOKEN?.trim(),e=n||t;if(!d(e))return null;let o=(process.env.SOOT_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!o)return null;let[i,s]=o.includes("/")?o.split("/",2):[null,null],u=(process.env.SOOT_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),l=(process.env.SOOT_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:e,repoId:o,repositoryId:u||null,owner:i||null,repo:s||null,installationId:l||null,source:n?"soot-runner":"github-actions"}}function g(){let n=process.env.SOOTSIM_API_KEY?.trim();if(n&&n.startsWith("sk_sootsim_"))return{kind:"api-key",secret:n,source:"env"};let t=p();if(t)return t;let e=r();return e?.token?{kind:"session",token:e.token,origin:e.origin}:null}function a(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function _(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{g as a,a as b,_ as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{existsSync as A,mkdirSync as v,readFileSync as M,rmSync as f,writeFileSync as h}from"fs";import{tmpdir as w}from"os";import{dirname as B,join as U,resolve as V}from"path";import{execFileSync as b}from"child_process";import{readFileSync as _}from"fs";import{createRequire as y}from"module";var c=null,p=null;function m(r){c||(c=O());try{return c(r)}catch{return null}}function C(r){p||(p=T());try{return p(r)}catch{return null}}function T(){if(process.platform==="linux")return r=>{try{return _(`/proc/${r}/comm`,"utf8").trim()||null}catch{return null}};if(process.platform==="darwin"){let r=x();return r||F()}return()=>null}function O(){let r=Number(process.env.PPID);if(Number.isFinite(r)&&r>1&&r!==process.ppid)return()=>r;if(process.platform==="linux")return D();if(process.platform==="darwin"){let n=R();return n||k()}return()=>null}function D(){return r=>{try{let n=_(`/proc/${r}/stat`,"utf8"),t=n.lastIndexOf(")");if(t<0)return null;let e=n.slice(t+1).trim().split(/\s+/),i=Number(e[1]);return Number.isFinite(i)&&i>0?i:null}catch{return null}}}var E=3,l=216,P=16,S=48,L=16;function R(){if(!process.versions?.bun)return null;try{let r=y(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),e=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),i=Buffer.alloc(l);return o=>{if(Number(e.symbols.proc_pidinfo(o,E,0n,i,l))<=0)return null;let u=i.readUInt32LE(P);return u>0?u:null}}catch{return null}}function x(){if(!process.versions?.bun)return null;try{let r=y(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),e=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),i=Buffer.alloc(l);return o=>{if(Number(e.symbols.proc_pidinfo(o,E,0n,i,l))<=0)return null;let u=i.subarray(S,S+L),I=u.indexOf(0);return u.subarray(0,I<0?u.length:I).toString("utf8")||null}}catch{return null}}function F(){return r=>{try{let t=b("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
|
|
3
3
|
`)[1];return t&&t.trim().split(/\s+/)[0]||null}catch{return null}}}function k(){return r=>{try{let t=b("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
|
|
4
4
|
`)[1];if(!t)return null;let e=t.trim().split(/\s+/),i=Number(e[2]);return Number.isFinite(i)&&i>1?i:null}catch{return null}}}var d=1,N="SOOTSIM_CLI_CURRENT_SIM_PATH",W=["SOOTSIM_CLI_IDENTITY","AGENTBUS_SESSION","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"],$=/^(tmux|screen)/i;function g(r,n=20){let t=r,e=m(r);if(!e||e<=1)return null;for(let i=0;i<n;i++){let o=C(e);if(o&&$.test(o))return t;let s=m(e);if(!s||s<=1)return e;t=e,e=s}return e}function Y(){for(let n of W){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=g(process.ppid);return r&&r>1?{key:`gppid-${r}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function H(){return Y().key}function tr(){return g(process.ppid)}function a(){if(process.env[N])return V(process.env[N]);let r=H();return U(w(),`sootsim-current-sim-${r}.json`)}function J(){let r=a();if(!A(r))return null;try{let n=JSON.parse(M(r,"utf8"));return n.version!==d||typeof n.simId!="string"||!n.simId.trim()||typeof n.updatedAt!="string"?(f(r,{force:!0}),null):{version:d,simId:n.simId.trim(),updatedAt:n.updatedAt}}catch{return f(r,{force:!0}),null}}function nr(){return J()?.simId||null}function er(r){let n=r.trim();if(!n)return;let t=a();v(B(t),{recursive:!0}),h(t,JSON.stringify({version:d,simId:n,updatedAt:new Date().toISOString()},null,2)+`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as E,b as D}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as E,b as D}from"./chunk-22SK3UIK.js";import{H as T}from"./chunk-MMEXOEEB.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 C(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]);C(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;C(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=>C(n.port,t))}var x=new Map;async function Q(e){if(e<=0)return null;let t=x.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 x.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,k=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(!k.has(e.port)){k.add(e.port);let o=e.port;te(o,t).finally(()=>k.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 xe(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[...x.keys()])a.has(r)||x.delete(r);return o.filter(r=>!re(r))}import R 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(R.existsSync(f.join(e,"packages/sootsim-engine/package.json"))&&R.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 R.existsSync(f.join(t,"index.html"))&&R.existsSync(f.join(t,"engine/index.html"))&&R.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,xe as f,Te as g};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{H as t,N as n,P as l,j as r}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{H as t,N as n,P as l,j as r}from"./chunk-MMEXOEEB.js";function m(){let e=t(),i=r()?n():null;return i&&l(i)?{primary:`engine dev source (:${i.bridgePort})`,installedRuntime:e?`installed runtime v${e}`:null,isDevBridge:!0}:{primary:e?`runtime v${e}`:"runtime not installed",installedRuntime:null,isDevBridge:!1}}export{m as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as p}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as p}from"./chunk-OOAX7FH3.js";import{a as c,b as l}from"./chunk-QPMDVJD4.js";import{a}from"./chunk-27GCMFBK.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
|
|
3
3
|
sootsim ${e} needs auth before it can check recording access.
|
|
4
4
|
|
|
5
5
|
pick one:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as m,b as I}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as m,b as I}from"./chunk-AJNNLP2G.js";import{a as w,b as _,c as E}from"./chunk-ANJLN4OR.js";import{c as O}from"./chunk-SMSLWF32.js";import{G as k,o as D,q as f}from"./chunk-MMEXOEEB.js";import h from"fs";import v from"path";var c="default",$="profiles.json",a=1;function s(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function g(){return v.join(f(),$)}function F(e){return`sootsim-profile-${s(e)}`}function B(e){return v.join(D(),"Partitions",F(e))}function b(e){return v.join(f(),"playwright",s(e))}function y(){try{let e=JSON.parse(h.readFileSync(g(),"utf8"));if(!e||e.version!==a)return{version:a,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:s(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:a,profiles:r}}catch{return{version:a,profiles:[]}}}function T(e){return[...e].sort((r,t)=>r.id===c?-1:t.id===c?1:r.id.localeCompare(t.id))}function P(e){if(e.profiles.some(t=>t.id===c))return{...e,profiles:T(e.profiles)};let r=new Date().toISOString();return{version:a,profiles:T([{id:c,createdAt:r,updatedAt:r},...e.profiles])}}function S(e){k();let r=P(e),t=`${g()}.tmp`;return h.writeFileSync(t,`${JSON.stringify(r,null,2)}
|
|
3
3
|
`,"utf8"),h.renameSync(t,g()),r}function q(){return S(y()).profiles}function j(e){let r=s(e);return q().find(t=>t.id===r)??null}function C(e=c){let r=s(e),t=j(r);return t||H(r)}function H(e){let r=s(e),t=P(y());if(t.profiles.some(i=>i.id===r))throw new Error(`profile already exists: ${r}`);let n=new Date().toISOString(),o={id:r,createdAt:n,updatedAt:n};return S({version:a,profiles:[...t.profiles,o]}),o}function pe(e){let r=s(e);if(r===c)throw new Error("the default profile cannot be deleted; clear it instead");let t=P(y()),n=t.profiles.find(o=>o.id===r);if(!n)throw new Error(`profile not found: ${r}`);return S({version:a,profiles:t.profiles.filter(o=>o.id!==r)}),z(r),n}function z(e){let r=s(e);for(let t of[B(r),b(r)])try{h.rmSync(t,{recursive:!0,force:!0})}catch{}}function K(){let e=w();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function Y(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=w();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 E(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 A={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:K,launch:Y};function V(){let e=m();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim desktop install`)"}}async function J(e){let r=m();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await I(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 M={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:V,launch:J};import{spawn as X}from"child_process";import{closeSync as Z,mkdtempSync as Q,openSync as ee,readFileSync as re}from"fs";import{createRequire as te}from"module";import{tmpdir as L}from"os";import{join as R}from"path";var ne=`
|
|
4
4
|
const modulePath = process.env.SOOTSIM_PW_MODULE;
|
|
5
5
|
const url = process.env.SOOTSIM_PW_URL;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{H as I,m as B,n as E,o as y,t as v,v as A}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{H as I,m as B,n as E,o as y,t as v,v as A}from"./chunk-CYB4R5KY.js";import{h,l as N,m as P}from"./chunk-HGXGAEMQ.js";var q={timeoutMs:1800,settleMs:48,startWindowMs:64};function w(e){return new Promise(t=>setTimeout(t,e))}function U(e){return e.includes("--json")}function Y(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
|
|
3
3
|
`)}function V(e){process.stderr.write(`${e}
|
|
4
4
|
`)}function b(e,t=Date.now()){let r=new Date(e),n=`${S(r.getHours())}:${S(r.getMinutes())}:${S(r.getSeconds())}`,s=t-e;if(s<0)return n;let o=Math.round(s/1e3);return o<60?`${n} +${o}s`:o<3600?`${n} +${Math.round(o/60)}m`:o<86400?`${n} +${Math.round(o/3600)}h`:`${n} +${Math.round(o/86400)}d`}function S(e){return e<10?`0${e}`:String(e)}async function D(e,t,...r){return N(e,`__sootsimTest.${t}`,...r)}async function k(e,t,...r){return P(e,`SootSim.bridges.mainShell.${t}`,...r)}async function z(e,t={}){try{let r=await D(e,"waitForScreenTransitions",q);if(!t.verbose||!r?.started)return;if(r.timedOut){console.log(` screen transition still active after ${r.waitedMs}ms; continuing`);return}r.waitedMs>0&&console.log(` waited ${r.waitedMs}ms for screen transition settle`)}catch{}}async function K(e,t,r,...n){let s=Date.now()+Math.max(0,r);for(;;)try{return await k(e,t,...n)}catch(o){if(!I(o)||Date.now()>=s)throw o;await w(50)}}async function Q(e,t,r,n={}){let s=n.attempts??30,o=n.intervalMs??500,l=n.minNodeCount??10;for(let a=0;a<s;a++){let u=h(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{let c=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>l)return{bridge:u,count:c}}catch{}u.close(),await w(o)}return null}async function X(e,t,r,n={}){let s=n.timeoutMs??8e3,o=n.intervalMs??250,l=Date.now()+s;for(;Date.now()<l;){let a=h(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{return await a.send({type:"evaluate",code:"1"}),a}catch{a.close()}await w(o)}return null}async function Z(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,s=t.pollIntervalMs??200,o=Date.now(),l=o+r,a=-1,u=o,c=null,d=!1,m={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,flag:void 0,loadingText:"",externalReady:null,externalStatus:"",externalError:"",errors:0};for(;Date.now()<l;){try{let i=await e.send({type:"evaluate",code:B}),g=Date.now()-o,f=Number(i?.nodes)||0,$=Number(i?.targets)||0,x=Number(i?.errors)||0,C=i?.flag===!0,p=i?.externalReady,T=typeof i?.loadingText=="string"?i.loadingText.trim():"",W=typeof i?.externalStatus=="string"?i.externalStatus.trim():"",M=typeof i?.externalError=="string"?i.externalError.trim():"",R=typeof i?.externalError=="string"&&M.length>0;if(c=p,d=R,f!==a&&(a=f,u=g),m={ready:!1,source:"timeout",elapsedMs:g,nodes:f,targets:$,flag:i?.flag,loadingText:T,externalReady:typeof p=="boolean"?p:null,externalStatus:W,externalError:M,errors:x},C&&p!==!1&&!R&&!T&&y({nodes:f,targets:$})&&g-u>=E)return{...m,ready:!0,source:"flag"};if(g>=n&&x>0&&!C)return{...m,ready:!1,source:"error-bail"}}catch{}await w(s)}return c!==!1&&!d&&!m.loadingText&&y(m)?{...m,ready:!0,source:"nodes-fallback"}:{...m,ready:!1,source:"timeout",elapsedMs:Date.now()-o}}function O(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function _(e,t,...r){return e.send({type:"call",path:`__sootsimTest.${t}`,args:r})}async function F(e,t={}){let r=await e.send({type:"evaluate",code:A});if(!r||typeof r!="object")return;let n=Math.max(0,Number(r.errors)||0),s=Math.max(0,Number(r.warnings)||0);if(n===0&&s===0)return;let o=[];if(n>0&&o.push(`${n} console error${n===1?"":"s"}`),s>0&&o.push(`${s} console warning${s===1?"":"s"}`),console.log(`
|
|
5
5
|
console: ${o.join(", ")}`),t.errorsCommand&&console.log(` inspect: ${t.errorsCommand}`),s>0&&t.warningsCommand&&console.log(` inspect: ${t.warningsCommand}`),!t.includeTail||n===0)return;let l=await v(e,5);if(!(!Array.isArray(l)||l.length===0)){console.log(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as ms}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as ms}from"./chunk-2J4S6MUC.js";var hs={};ms(hs,{Alias:()=>ee,CST:()=>cs,Composer:()=>be,Document:()=>se,Lexer:()=>Be,LineCounter:()=>De,Pair:()=>v,Parser:()=>we,Scalar:()=>y,Schema:()=>ve,YAMLError:()=>_e,YAMLMap:()=>$,YAMLParseError:()=>R,YAMLSeq:()=>B,YAMLWarning:()=>Pe,isAlias:()=>F,isCollection:()=>L,isDocument:()=>x,isMap:()=>U,isNode:()=>I,isPair:()=>T,isScalar:()=>E,isSeq:()=>V,parse:()=>un,parseAllDocuments:()=>fn,parseDocument:()=>us,stringify:()=>hn,visit:()=>Q,visitAsync:()=>je});var tt=Symbol.for("yaml.alias"),st=Symbol.for("yaml.document"),Y=Symbol.for("yaml.map"),qt=Symbol.for("yaml.pair"),q=Symbol.for("yaml.scalar"),re=Symbol.for("yaml.seq"),K=Symbol.for("yaml.node.type"),F=s=>!!s&&typeof s=="object"&&s[K]===tt,x=s=>!!s&&typeof s=="object"&&s[K]===st,U=s=>!!s&&typeof s=="object"&&s[K]===Y,T=s=>!!s&&typeof s=="object"&&s[K]===qt,E=s=>!!s&&typeof s=="object"&&s[K]===q,V=s=>!!s&&typeof s=="object"&&s[K]===re;function L(s){if(s&&typeof s=="object")switch(s[K]){case Y:case re:return!0}return!1}function I(s){if(s&&typeof s=="object")switch(s[K]){case tt:case Y:case q:case re:return!0}return!1}var nt=s=>(E(s)||L(s))&&!!s.anchor;var j=Symbol("break visit"),ds=Symbol("skip children"),z=Symbol("remove node");function Q(s,e){let t=gs(e);x(s)?ke(null,s.contents,t,Object.freeze([s]))===z&&(s.contents=null):ke(null,s,t,Object.freeze([]))}Q.BREAK=j;Q.SKIP=ds;Q.REMOVE=z;function ke(s,e,t,n){let i=ys(s,e,t,n);if(I(i)||T(i))return bs(s,n,i),ke(s,i,t,n);if(typeof i!="symbol"){if(L(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=ke(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===j)return j;o===z&&(e.items.splice(r,1),r-=1)}}}else if(T(e)){n=Object.freeze(n.concat(e));let r=ke("key",e.key,t,n);if(r===j)return j;r===z&&(e.key=null);let o=ke("value",e.value,t,n);if(o===j)return j;o===z&&(e.value=null)}}return i}async function je(s,e){let t=gs(e);x(s)?await Ne(null,s.contents,t,Object.freeze([s]))===z&&(s.contents=null):await Ne(null,s,t,Object.freeze([]))}je.BREAK=j;je.SKIP=ds;je.REMOVE=z;async function Ne(s,e,t,n){let i=await ys(s,e,t,n);if(I(i)||T(i))return bs(s,n,i),Ne(s,i,t,n);if(typeof i!="symbol"){if(L(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=await Ne(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===j)return j;o===z&&(e.items.splice(r,1),r-=1)}}}else if(T(e)){n=Object.freeze(n.concat(e));let r=await Ne("key",e.key,t,n);if(r===j)return j;r===z&&(e.key=null);let o=await Ne("value",e.value,t,n);if(o===j)return j;o===z&&(e.value=null)}}return i}function gs(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function ys(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(U(e))return t.Map?.(s,e,n);if(V(e))return t.Seq?.(s,e,n);if(T(e))return t.Pair?.(s,e,n);if(E(e))return t.Scalar?.(s,e,n);if(F(e))return t.Alias?.(s,e,n)}function bs(s,e,t){let n=e[e.length-1];if(L(n))n.items[s]=t;else if(T(n))s==="key"?n.key=t:n.value=t;else if(x(n))n.contents=t;else{let i=F(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}var pn={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},mn=s=>s.replace(/[!,[\]{}]/g,e=>pn[e]),Z=class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+mn(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&I(e.contents)){let r={};Q(e.contents,(o,l)=>{I(l)&&l.tag&&(r[l.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
|
|
3
3
|
`)}};Z.defaultYaml={explicit:!1,version:"1.2"};Z.defaultTags={"!!":"tag:yaml.org,2002:"};function it(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function Rt(s){let e=new Set;return Q(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function Ft(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}function ws(s,e){let t=[],n=new Map,i=null;return{onAnchor:r=>{t.push(r),i??(i=Rt(s));let o=Ft(e,i);return i.add(o),o},setAnchors:()=>{for(let r of t){let o=n.get(r);if(typeof o=="object"&&o.anchor&&(E(o.node)||L(o.node)))o.node.anchor=o.anchor;else{let l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=r,l}}},sourceObjects:n}}function fe(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let o=n[i],l=fe(s,n,String(i),o);l===void 0?delete n[i]:l!==o&&(n[i]=l)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),o=fe(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let r=fe(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(let[i,r]of Object.entries(n)){let o=fe(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}function M(s,e,t){if(Array.isArray(s))return s.map((n,i)=>M(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!nt(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}var ue=class{constructor(e){Object.defineProperty(this,K,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!x(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=M(this,"",o);if(typeof i=="function")for(let{count:a,res:c}of o.anchors.values())i(c,a);return typeof r=="function"?fe(r,{"":l},"",l):l}};var ee=class extends ue{constructor(e){super(tt),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Q(e,{Node:(r,o)=>{(F(o)||nt(o))&&n.push(o)}}),t&&(t.aliasResolveCache=n));let i;for(let r of n){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let l=n.get(o);if(l||(M(o,null,t),l=n.get(o)),l?.res===void 0){let a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(r>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=rt(i,o,n)),l.count*l.aliasCount>r)){let a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return l.res}toString(e,t,n){let i=`*${this.source}`;if(e){if(it(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function rt(s,e,t){if(F(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(L(e)){let n=0;for(let i of e.items){let r=rt(s,i,t);r>n&&(n=r)}return n}else if(T(e)){let n=rt(s,e.key,t),i=rt(s,e.value,t);return Math.max(n,i)}return 1}var ot=s=>!s||typeof s!="function"&&typeof s!="object",y=class extends ue{constructor(e){super(q),this.value=e}toJSON(e,t){return t?.keep?this.value:M(this.value,e,t)}toString(){return String(this.value)}};y.BLOCK_FOLDED="BLOCK_FOLDED";y.BLOCK_LITERAL="BLOCK_LITERAL";y.PLAIN="PLAIN";y.QUOTE_DOUBLE="QUOTE_DOUBLE";y.QUOTE_SINGLE="QUOTE_SINGLE";var dn="tag:yaml.org,2002:";function gn(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}function oe(s,e,t){if(x(s)&&(s=s.contents),I(s))return s;if(T(s)){let f=t.schema[Y].createNode?.(t.schema,null,t);return f.items.push(s),f}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:l}=t,a;if(n&&s&&typeof s=="object"){if(a=l.get(s),a)return a.anchor??(a.anchor=i(s)),new ee(a.anchor);a={anchor:null,node:null},l.set(s,a)}e?.startsWith("!!")&&(e=dn+e.slice(2));let c=gn(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new y(s);return a&&(a.node=f),f}c=s instanceof Map?o[Y]:Symbol.iterator in Object(s)?o[re]:o[Y]}r&&(r(c),delete t.onTagObj);let p=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new y(s);return e?p.tag=e:c.default||(p.tag=c.tag),a&&(a.node=p),p}function qe(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return oe(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var Ae=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,Oe=class extends ue{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>I(n)||T(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ae(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(L(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,qe(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(L(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&E(r)?r.value:r:L(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!T(t))return!1;let n=t.value;return n==null||e&&E(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return L(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(L(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,qe(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};var Ss=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function J(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}var te=(s,e,t)=>s.endsWith(`
|
|
4
4
|
`)?J(t,e):t.includes(`
|
|
5
5
|
`)?`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-2J4S6MUC.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-47OUBT5X.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-47OUBT5X.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
|
|
24
24
|
sootsim compatibility report
|
|
25
25
|
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
26
26
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A as i,C as s,x as t}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A as i,C as s,x as t}from"./chunk-MMEXOEEB.js";import"./chunk-2J4S6MUC.js";function l(){let e=i();console.log(` telemetry is ${e?"ON":"OFF"}`),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function r(e){let o=e.find(n=>!n.startsWith("-"))?.toLowerCase();switch(o){case void 0:case"status":l();return;case"on":case"enable":s(!0),console.log(" telemetry ON"),console.log(` config: ${t()}`);return;case"off":case"disable":s(!1),console.log(" telemetry OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${o}`),console.error(" usage: sootsim config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
|
|
3
3
|
sootsim config \u2014 manage local CLI preferences
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
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-
|
|
1
|
+
/*! sootsim v0.1.222 | (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-BMDW2UP2.js";import"./chunk-SSCVCJ44.js";import"./chunk-2FWJGMXZ.js";import"./chunk-PPNT77TR.js";import"./chunk-NFGGDW7N.js";import"./chunk-22SK3UIK.js";import"./chunk-WVM3FQYU.js";import"./chunk-CYB4R5KY.js";import"./chunk-HGXGAEMQ.js";import"./chunk-WDKBZZ66.js";import"./chunk-AJNNLP2G.js";import"./chunk-ANJLN4OR.js";import"./chunk-PT2YFQPS.js";import"./chunk-LDIHELGQ.js";import"./chunk-PKLWGFHZ.js";import"./chunk-SMSLWF32.js";import"./chunk-MMEXOEEB.js";import"./chunk-J3KNXYXV.js";import"./chunk-2J4S6MUC.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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d,e}from"./chunk-ELE7IY7O.js";import"./chunk-74RYDROC.js";import"./chunk-27GCMFBK.js";import"./chunk-JYAYD6GF.js";import"./chunk-U72XOJWQ.js";import"./chunk-MMKHWL3Y.js";import"./chunk-LDIHELGQ.js";import"./chunk-PKLWGFHZ.js";import"./chunk-SMSLWF32.js";import"./chunk-MMEXOEEB.js";import"./chunk-IH2EGP5O.js";import"./chunk-ER35PHK2.js";import"./chunk-J3KNXYXV.js";import"./chunk-2J4S6MUC.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.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{f,m as T}from"./chunk-WVM3FQYU.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-CYB4R5KY.js";import{g as D,i as O,k as x}from"./chunk-HGXGAEMQ.js";import"./chunk-PKLWGFHZ.js";import"./chunk-SMSLWF32.js";import"./chunk-MMEXOEEB.js";import"./chunk-2J4S6MUC.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:
|
|
@@ -170,7 +170,7 @@ examples:
|
|
|
170
170
|
} : null,
|
|
171
171
|
samples,
|
|
172
172
|
}
|
|
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-
|
|
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-QGHM6JDA.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,...]>
|
|
174
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=`(() => {
|
|
175
175
|
const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
|
|
176
176
|
if (!d) return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-PMEH3LVK.js";import{a as v,h as k}from"./chunk-BMDW2UP2.js";import"./chunk-SSCVCJ44.js";import"./chunk-2FWJGMXZ.js";import"./chunk-PPNT77TR.js";import"./chunk-NFGGDW7N.js";import"./chunk-22SK3UIK.js";import{a as u}from"./chunk-EXWBPQTP.js";import"./chunk-WVM3FQYU.js";import"./chunk-CYB4R5KY.js";import"./chunk-HGXGAEMQ.js";import"./chunk-G3WMTCYE.js";import{b as m,g as f,l as h}from"./chunk-WDKBZZ66.js";import{a as c}from"./chunk-AJNNLP2G.js";import"./chunk-ANJLN4OR.js";import"./chunk-PT2YFQPS.js";import"./chunk-LDIHELGQ.js";import"./chunk-PKLWGFHZ.js";import"./chunk-SMSLWF32.js";import"./chunk-MMEXOEEB.js";import"./chunk-J3KNXYXV.js";import"./chunk-2J4S6MUC.js";function I(e){let i=e.indexOf("--port");if(i<0)return;let o=e[i+1],t=o?Number(o):Number.NaN;return(!Number.isInteger(t)||t<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),t}async function O(e,i){let o=I(e)??i.port;return o?k(String(o)):void 0}async function w(e,i){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim desktop \u2014 launch the desktop companion
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -16,7 +16,7 @@ examples:
|
|
|
16
16
|
sootsim desktop --port 5173
|
|
17
17
|
sootsim desktop --profile qa
|
|
18
18
|
sootsim desktop --driver system
|
|
19
|
-
`),process.exit(0));let o=e.indexOf("--driver"),t=o>=0?e[o+1]:void 0,n=e.find((r,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");n&&d&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let x=n?m(n).id:void 0,s=t||i.driver,l=f;if(s){let r=h(s);r||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=r}if(l.id==="electron"){let r=c();if(!r){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await u("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:D}=await import("./install-desktop-
|
|
19
|
+
`),process.exit(0));let o=e.indexOf("--driver"),t=o>=0?e[o+1]:void 0,n=e.find((r,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");n&&d&&(console.error(" sootsim desktop: --profile cannot be combined with --ephemeral"),process.exit(1));let x=n?m(n).id:void 0,s=t||i.driver,l=f;if(s){let r=h(s);r||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=r}if(l.id==="electron"){let r=c();if(!r){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await u("run sootsim desktop install now?",!0)){console.log();let{runInstallDesktop:D}=await import("./install-desktop-QCXPIETA.js");await D(["--yes"]),r=c()}r||process.exit(1)}console.log(` launching ${r.path}`)}let b=await O(e,i),p=await l.launch({url:b,device:i.device,profileId:x,ephemeralProfile:d});p.launched||(console.error(` ${p.message}`),process.exit(1)),console.log(` ${p.message}`)}function y(){console.log(`
|
|
20
20
|
sootsim desktop \u2014 launch or install the desktop companion
|
|
21
21
|
|
|
22
22
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{e as P}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{e as P}from"./chunk-HZKDCAPT.js";import"./chunk-NPXZ3TTE.js";import{b as _,c as I}from"./chunk-FXV56NIE.js";import"./chunk-ZLIJSNSV.js";import"./chunk-UQC3LPA5.js";import{a as D}from"./chunk-OOAX7FH3.js";import{a as b}from"./chunk-QPMDVJD4.js";import"./chunk-BMDW2UP2.js";import"./chunk-SSCVCJ44.js";import"./chunk-2FWJGMXZ.js";import"./chunk-PPNT77TR.js";import"./chunk-NFGGDW7N.js";import"./chunk-22SK3UIK.js";import"./chunk-WVM3FQYU.js";import"./chunk-CYB4R5KY.js";import"./chunk-HGXGAEMQ.js";import"./chunk-WDKBZZ66.js";import"./chunk-AJNNLP2G.js";import"./chunk-ANJLN4OR.js";import"./chunk-OY3CGL2W.js";import"./chunk-PT2YFQPS.js";import"./chunk-74RYDROC.js";import"./chunk-27GCMFBK.js";import"./chunk-MMKHWL3Y.js";import"./chunk-LDIHELGQ.js";import"./chunk-PKLWGFHZ.js";import"./chunk-SMSLWF32.js";import"./chunk-MMEXOEEB.js";import"./chunk-J3KNXYXV.js";import"./chunk-2J4S6MUC.js";import{spawn as N}from"child_process";import{existsSync as x,mkdirSync as k,readFileSync as A,writeFileSync as w,unlinkSync as M}from"fs";import{tmpdir as F}from"os";import{dirname as L,resolve as l,join as R,relative as C}from"path";function W(){try{let e=import.meta.resolve("sootsim/detox");return L(e.startsWith("file://")?e.slice(7):e)}catch{return l(import.meta.dirname,"..","..","detox")}}var B=`
|
|
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.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-2FWJGMXZ.js";import{g as d,i as l,l as a}from"./chunk-HGXGAEMQ.js";import"./chunk-PT2YFQPS.js";import"./chunk-LDIHELGQ.js";import"./chunk-PKLWGFHZ.js";import"./chunk-SMSLWF32.js";import"./chunk-MMEXOEEB.js";import{g as c,h as r,i as g}from"./chunk-J3KNXYXV.js";import"./chunk-2J4S6MUC.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.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as E,i as R,l as b}from"./chunk-HGXGAEMQ.js";import"./chunk-PKLWGFHZ.js";import{b as v}from"./chunk-SMSLWF32.js";import"./chunk-MMEXOEEB.js";import"./chunk-2J4S6MUC.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 get diagnosis \u2014 compact "what just went wrong?" report
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-G3WMTCYE.js";import{f as a,g as b,h as c,i as d,j as e,k as f,l as g,m as h,n as i}from"./chunk-WDKBZZ66.js";import"./chunk-AJNNLP2G.js";import"./chunk-ANJLN4OR.js";import"./chunk-SMSLWF32.js";import"./chunk-MMEXOEEB.js";import"./chunk-2J4S6MUC.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{c as L,d as T}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as L,d as T}from"./chunk-LMHE7A45.js";import{g as $,i as R,m as b}from"./chunk-HGXGAEMQ.js";import"./chunk-PKLWGFHZ.js";import"./chunk-SMSLWF32.js";import"./chunk-MMEXOEEB.js";import"./chunk-2J4S6MUC.js";import{spawnSync as x}from"node:child_process";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as E}from"node:fs";import{homedir as q}from"node:os";import{dirname as j,extname as H,join as K,resolve as C}from"node:path";var s=t=>new Promise(a=>setTimeout(a,t)),X=["--out","--fps","--script","--slow"],J=["--keep-three"],Q=["--background","--gradient","--gradient-angle","--colorway","--environment","--env-shape","--env-spread","--env-size","--env-color","--env-glow","--env-plastic","--room","--focus","--focus-amount","--focus-range"],Y=12e4,Z=16e6;function c(t,a){let n=t.indexOf(a);return n>=0?t[n+1]:void 0}async function r(t,a,n=3e4){return await t.send({type:"evaluate",code:a},{timeoutMs:n})}async function le(t,a){if(t.length===0||t.includes("--help")||t.includes("-h"))return console.log(`
|
|
3
3
|
sootsim film \u2014 record a flow flat, replay it on the 3d stage, save a clip
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -30,10 +30,10 @@ stage decor (same flags as \`sootsim mode three configure\`):
|
|
|
30
30
|
|
|
31
31
|
examples:
|
|
32
32
|
sootsim film flows/feed-scroll.yaml
|
|
33
|
-
sootsim film flows/swap.yaml --script hero-arc --background gradient-
|
|
33
|
+
sootsim film flows/swap.yaml --script hero-arc --background gradient-tide --out ~/Desktop/swap-3d.mp4
|
|
34
34
|
sootsim film flows/login.yaml --colorway deep-blue --environment on --env-shape pane --room on
|
|
35
|
-
`),0;let n=t.find(d=>!d.startsWith("--")&&/\.ya?ml$/.test(d));if(!n||!V(
|
|
36
|
-
return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(e,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let O=Date.now();await s(500);let{runFlowPlayback:G}=await import("./flow-
|
|
35
|
+
`),0;let n=t.find(d=>!d.startsWith("--")&&/\.ya?ml$/.test(d));if(!n||!V(C(n)))return console.error(` film: flow file not found: ${n??"(none given)"}`),1;let P=Number.parseInt(c(t,"--fps")??"30",10),h=c(t,"--script")??"hero-arc",D=t.includes("--keep-three"),v=n.replace(/^.*\//,"").replace(/\.ya?ml$/,""),I=c(t,"--out"),l=C(I??K(q(),"Desktop","sootsim-films",`${v}.webm`)),y=H(l).toLowerCase()===".mp4";if(y&&x("ffmpeg",["-version"]).status!==0)return console.error(" film: --out ends in .mp4 but ffmpeg is not installed"),console.error(" install ffmpeg or use a .webm output path"),1;let z=$(t,{port:a.port,stripValueFlags:[...X,...Q],stripBooleanFlags:J}),e=R({...z,commandTimeoutMs:6e4});try{let d=await r(e,`(() => { const s = window.SootSim?.bridges?.settings?.get?.() || {}
|
|
36
|
+
return { threeMode: s.threeMode === true, editor: s.threeRecordingEditor === true } })()`);if(console.log(` film: recording flow ${v} on the flat canvas`),!await r(e,"(async () => !!(await window.SootSim?.bridges?.startRecording?.('video', undefined, { skipEntitlement: true })))()"))return console.error(" film: engine recording store did not start (is @sootsim/plugin-recording installed?)"),1;let O=Date.now();await s(500);let{runFlowPlayback:G}=await import("./flow-VVZQZ2BI.js"),m=[n],S=c(t,"--sim");S&&m.push("--sim",S);let k=c(t,"--slow");k&&m.push("--slow",k);let f=await G(m);await s(400);let u=Math.min(Date.now()-O,Y);if(await r(e,"window.SootSim?.bridges?.stopRecording?.()"),f!==0)return console.error(` film: flow failed (exit ${f}) \u2014 not filming a broken take`),f;let _=!1;for(let o=0;o<50;o++){await s(400);let i=await r(e,`(() => { const s = window.SootSim?.bridges?.getRecordingState?.()
|
|
37
37
|
return { state: s?.state, hasBlob: !!s?.lastVideoBlob } })()`);if(i?.state==="idle"&&i.hasBlob){_=!0;break}}if(!_)return console.error(" film: flow recording never produced a video blob"),1;console.log(` film: flow captured (${(u/1e3).toFixed(1)}s)`),await r(e,"window.SootSim?.bridges?.settings?.set?.('threeMode', true)"),await L(e),await s(1400),await r(e,"window.SootSim?.bridges?.settings?.set?.('threeRecordingEditor', true)");let F=!1;for(let o=0;o<60;o++)if(await s(250),await r(e,`(() => { const rs = window.SootSim?.replayStore
|
|
38
38
|
return rs?.value?.preview?.surface === 'video' && !!rs?.value?.preview?.flowVideoUrl })()`)){F=!0;break}if(!F)return console.error(" film: recording editor did not seed the replay store"),1;await r(e,`(async () => {
|
|
39
39
|
const entitled = () =>
|
|
@@ -81,7 +81,7 @@ examples:
|
|
|
81
81
|
}
|
|
82
82
|
requestAnimationFrame(tick)
|
|
83
83
|
return true
|
|
84
|
-
})(${u})`),await b(e,"SootSim.bridges.threeMode.configure",{script:{id:h,progress:1,animate:!0,slow:!0}}),await s(u+700),await r(e,"(() => { const s = window.__sootsimFilm; if (s?.mr?.state === 'recording') s.mr.stop(); return true })()");let w=0;for(let o=0;o<60;o++){await s(500);let i=await r(e,"(() => { const s = window.__sootsimFilm; return { ready: !!(s && s.b64), size: s && s.b64 ? s.b64.length : 0 } })()");if(i?.ready&&i.size>0){w=i.size;break}}if(!w)return console.error(" film: stage recording never finished encoding"),1;let B=24e5,A="";for(let o=0;o<w;o+=B){let i=await r(e,`(() => ({ data: window.__sootsimFilm.b64.substr(${o}, ${B}) }))()`);A+=i.data}await r(e,"(() => { try { delete window.__sootsimFilm } catch {} return true })()");let g=Buffer.from(A,"base64");if(W(j(l),{recursive:!0}),y){let o=`${l}.tmp.webm`;
|
|
84
|
+
})(${u})`),await b(e,"SootSim.bridges.threeMode.configure",{script:{id:h,progress:1,animate:!0,slow:!0}}),await s(u+700),await r(e,"(() => { const s = window.__sootsimFilm; if (s?.mr?.state === 'recording') s.mr.stop(); return true })()");let w=0;for(let o=0;o<60;o++){await s(500);let i=await r(e,"(() => { const s = window.__sootsimFilm; return { ready: !!(s && s.b64), size: s && s.b64 ? s.b64.length : 0 } })()");if(i?.ready&&i.size>0){w=i.size;break}}if(!w)return console.error(" film: stage recording never finished encoding"),1;let B=24e5,A="";for(let o=0;o<w;o+=B){let i=await r(e,`(() => ({ data: window.__sootsimFilm.b64.substr(${o}, ${B}) }))()`);A+=i.data}await r(e,"(() => { try { delete window.__sootsimFilm } catch {} return true })()");let g=Buffer.from(A,"base64");if(W(j(l),{recursive:!0}),y){let o=`${l}.tmp.webm`;E(o,g);let i=x("ffmpeg",["-y","-i",o,"-c:v","libx264","-vf","scale=trunc(iw/2)*2:trunc(ih/2)*2","-pix_fmt","yuv420p","-movflags","+faststart",l],{stdio:["ignore","ignore","pipe"]});if(i.status!==0){let U=String(i.stderr??"").split(`
|
|
85
85
|
`).filter(Boolean).slice(-4).join(`
|
|
86
86
|
`);return console.error(` film: ffmpeg transcode failed:
|
|
87
|
-
${U}`),console.error(` film: source kept at ${o}`),1}N(o)}else
|
|
87
|
+
${U}`),console.error(` film: source kept at ${o}`),1}N(o)}else E(l,g);return D||(d?.editor||await r(e,"window.SootSim?.bridges?.settings?.set?.('threeRecordingEditor', false)"),d?.threeMode||await r(e,"window.SootSim?.bridges?.settings?.set?.('threeMode', false)")),console.log(` film: saved ${l} (${(g.length/1e6).toFixed(1)}MB source)`),0}finally{e.close()}}export{le as runFilm};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.222 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c,d,e,f,g,h}from"./chunk-HZKDCAPT.js";import{c as a,d as b}from"./chunk-NPXZ3TTE.js";import"./chunk-ZLIJSNSV.js";import"./chunk-UQC3LPA5.js";import"./chunk-OOAX7FH3.js";import"./chunk-QPMDVJD4.js";import"./chunk-BMDW2UP2.js";import"./chunk-SSCVCJ44.js";import"./chunk-2FWJGMXZ.js";import"./chunk-PPNT77TR.js";import"./chunk-NFGGDW7N.js";import"./chunk-22SK3UIK.js";import"./chunk-WVM3FQYU.js";import"./chunk-CYB4R5KY.js";import"./chunk-HGXGAEMQ.js";import"./chunk-WDKBZZ66.js";import"./chunk-AJNNLP2G.js";import"./chunk-ANJLN4OR.js";import"./chunk-OY3CGL2W.js";import"./chunk-PT2YFQPS.js";import"./chunk-74RYDROC.js";import"./chunk-27GCMFBK.js";import"./chunk-MMKHWL3Y.js";import"./chunk-LDIHELGQ.js";import"./chunk-PKLWGFHZ.js";import"./chunk-SMSLWF32.js";import"./chunk-MMEXOEEB.js";import"./chunk-J3KNXYXV.js";import"./chunk-2J4S6MUC.js";export{e as discoverSootsimUrl,c as getLastFlowPreviewUploadResult,d as getLastFlowTraceSteps,g as hoistLeadingSimFlag,a as parseFlowFile,f as runFlowPlayback,h as runMaestroAuthoring,b as validateFlowFile};
|