sootsim 0.1.215 → 0.1.217
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/detox/index.ts +30 -16
- package/dist-cli/bin.js +4 -4
- package/dist-cli/chunks/{agent-63EE3N4N.js → agent-4FX2PQLB.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-GIXQ4UC3.js → agent-wrapper-KIQTUCYG.js} +2 -2
- package/dist-cli/chunks/{app-fonts-T24PVENP.js → app-fonts-7XJS63Y2.js} +2 -2
- package/dist-cli/chunks/{assert-C2EJWQW3.js → assert-VQMDKAVI.js} +2 -2
- package/dist-cli/chunks/{auth-HYWSF7FV.js → auth-6JIMQLVG.js} +2 -2
- package/dist-cli/chunks/beta-N2ZUIDGA.js +2 -0
- package/dist-cli/chunks/{camera-TUULMDLJ.js → camera-BCXQMAB3.js} +2 -2
- package/dist-cli/chunks/{chunk-AKNZ6QBL.js → chunk-2MCDMCYQ.js} +1 -1
- package/dist-cli/chunks/{chunk-7COBEK2I.js → chunk-2QZEYMIG.js} +2 -2
- package/dist-cli/chunks/{chunk-FEFLFVIU.js → chunk-43HOXICB.js} +1 -1
- package/dist-cli/chunks/{chunk-LIFR6X36.js → chunk-5HXI2BXE.js} +2 -2
- package/dist-cli/chunks/chunk-5LY3QGYK.js +2 -0
- package/dist-cli/chunks/{chunk-2FEGONIZ.js → chunk-5MRHVSLH.js} +1 -1
- package/dist-cli/chunks/{chunk-ZT7M27FX.js → chunk-5PMHRL26.js} +2 -2
- package/dist-cli/chunks/{chunk-RIAS4TMS.js → chunk-5WGUBDNY.js} +3 -3
- package/dist-cli/chunks/{chunk-6NQYBCWC.js → chunk-72ACLZTK.js} +1 -1
- package/dist-cli/chunks/{chunk-HKEH2UOD.js → chunk-7GGP6CHB.js} +1 -1
- package/dist-cli/chunks/{chunk-EWYTZ7FV.js → chunk-C3L2JWQF.js} +31 -31
- package/dist-cli/chunks/{chunk-QGFTJYVC.js → chunk-CGQGD4YT.js} +1 -1
- package/dist-cli/chunks/{chunk-SADP73NH.js → chunk-DLGYFFRD.js} +2 -2
- package/dist-cli/chunks/{chunk-YTQ5RCVB.js → chunk-DPR6E3DA.js} +1 -1
- package/dist-cli/chunks/{chunk-VD2SYCCY.js → chunk-EDF3RMTS.js} +2 -2
- package/dist-cli/chunks/chunk-F3OVNA6L.js +2 -0
- package/dist-cli/chunks/{chunk-EB4FLAAE.js → chunk-FHZ72TK4.js} +2 -2
- package/dist-cli/chunks/{chunk-T4EGFOSE.js → chunk-FS73CB2S.js} +1 -1
- package/dist-cli/chunks/chunk-GLAMORG7.js +1 -0
- package/dist-cli/chunks/{chunk-QXJPLKP7.js → chunk-HKQG2TQP.js} +1 -1
- package/dist-cli/chunks/{chunk-KG6V4NCI.js → chunk-II5GPTCI.js} +2 -2
- package/dist-cli/chunks/chunk-IQUBZ6UH.js +119 -0
- package/dist-cli/chunks/{chunk-BU7V5UGD.js → chunk-IRCQILE3.js} +2 -2
- package/dist-cli/chunks/{chunk-CKCDJCPZ.js → chunk-JVV5UWFI.js} +1 -1
- package/dist-cli/chunks/chunk-KDMMOZWO.js +89 -0
- package/dist-cli/chunks/{chunk-OHQOMV2J.js → chunk-KPQIXJ6P.js} +2 -2
- package/dist-cli/chunks/{chunk-RFJMDMLK.js → chunk-OKKXVF4E.js} +2 -2
- package/dist-cli/chunks/chunk-P2FPQYLI.js +99 -0
- package/dist-cli/chunks/{chunk-CSJUJIRP.js → chunk-PH6F62XI.js} +2 -2
- package/dist-cli/chunks/{chunk-OUB7WT7Q.js → chunk-PNEWTGQD.js} +1 -1
- package/dist-cli/chunks/{chunk-XVYCMZMB.js → chunk-PNN5RIHU.js} +2 -2
- package/dist-cli/chunks/chunk-S3NTQ523.js +1 -0
- package/dist-cli/chunks/{chunk-5MUXEXEW.js → chunk-SBLVM6KT.js} +2 -2
- package/dist-cli/chunks/{chunk-UJZFS2JM.js → chunk-V33VVORZ.js} +2 -2
- package/dist-cli/chunks/{chunk-E6YKEDDM.js → chunk-VFM2GCJK.js} +1 -1
- package/dist-cli/chunks/{chunk-6USQVYW2.js → chunk-WOVVMHGW.js} +2 -2
- package/dist-cli/chunks/{chunk-AHG7WAP6.js → chunk-WSHEWWAP.js} +2 -2
- package/dist-cli/chunks/{chunk-VMYBUPRT.js → chunk-XGOENFDF.js} +93 -65
- package/dist-cli/chunks/{chunk-DVJZUBQB.js → chunk-XNLHQI4J.js} +1 -1
- package/dist-cli/chunks/{chunk-X7VZ7D6Y.js → chunk-YIEZXEFD.js} +3 -3
- package/dist-cli/chunks/{chunk-FWUGH36K.js → chunk-Z5DRCU5R.js} +2 -2
- package/dist-cli/chunks/{chunk-5GU7LW64.js → chunk-Z6H5YGVP.js} +1 -1
- package/dist-cli/chunks/{chunk-EGCQXWLS.js → chunk-ZP7IKLL5.js} +2 -2
- package/dist-cli/chunks/cli-version-57GES5K7.js +2 -0
- package/dist-cli/chunks/{compat-EL7PRWER.js → compat-VMLCACM3.js} +3 -3
- package/dist-cli/chunks/{config-IZZQIOI5.js → config-PTMQDYOZ.js} +2 -2
- package/dist-cli/chunks/{control-FHQBCUP6.js → control-SHITPCIX.js} +2 -2
- package/dist-cli/chunks/daemon-KHJZASBC.js +2 -0
- package/dist-cli/chunks/{debug-6CB5QEGF.js → debug-MJEQ2R54.js} +3 -3
- package/dist-cli/chunks/{desktop-DLU2VTNC.js → desktop-Z4LOP37S.js} +3 -3
- package/dist-cli/chunks/{detox-N2D2AY7S.js → detox-VGPLTJYZ.js} +2 -2
- package/dist-cli/chunks/{device-FGZWPD26.js → device-H5CH3XAB.js} +2 -2
- package/dist-cli/chunks/{diagnose-ICQE2EWG.js → diagnose-AIQGCXUP.js} +2 -2
- package/dist-cli/chunks/drivers-LRTSTFSZ.js +2 -0
- package/dist-cli/chunks/film-P66JPUHW.js +87 -0
- package/dist-cli/chunks/flow-JETK5JHP.js +2 -0
- package/dist-cli/chunks/help-XX557QGO.js +2 -0
- package/dist-cli/chunks/{home-paths-VWN4PHJ3.js → home-paths-WMQMWUNA.js} +2 -2
- package/dist-cli/chunks/inspect-JTBKTX2E.js +2 -0
- package/dist-cli/chunks/install-desktop-OFWYZIJ2.js +2 -0
- package/dist-cli/chunks/{login-FO2R5CSL.js → login-IAHY7E6Y.js} +4 -4
- package/dist-cli/chunks/{logout-L5R3GRIG.js → logout-2YEUFJAD.js} +2 -2
- package/dist-cli/chunks/{maestro-K57OH6RI.js → maestro-BSD43NA3.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-7VVSWXKH.js → maestro-generate-QU74GL7P.js} +3 -3
- package/dist-cli/chunks/mode-UMJMUA3Y.js +24 -0
- package/dist-cli/chunks/optional-demo-registry-MS2YBMHN.js +2 -0
- package/dist-cli/chunks/{perf-AA66N7ML.js → perf-XMNXZFDY.js} +2 -2
- package/dist-cli/chunks/{record-HVK5TWAF.js → record-UCDYKK5M.js} +3 -3
- package/dist-cli/chunks/runtime-VNQTSGVX.js +2 -0
- package/dist-cli/chunks/{screenshot-command-TPVAQ6FC.js → screenshot-command-UZOLNSJN.js} +3 -3
- package/dist-cli/chunks/{screenshots-capture-OT5KMPQQ.js → screenshots-capture-NOWHE4AB.js} +2 -2
- package/dist-cli/chunks/{serve-3CTBVM5S.js → serve-L4XOZE3V.js} +2 -2
- package/dist-cli/chunks/{setup-JCJJQJKU.js → setup-O3TUZ5JW.js} +3 -3
- package/dist-cli/chunks/{skills-HTH527W2.js → skills-P4KO6RFE.js} +2 -2
- package/dist-cli/chunks/{storage-O6RNOFWM.js → storage-RTPEVRAI.js} +2 -2
- package/dist-cli/chunks/store-P23ZWVHH.js +2 -0
- package/dist-cli/chunks/telemetry-UFGF53JT.js +2 -0
- package/dist-cli/chunks/{timeline-RQHPAEK6.js → timeline-64CDTB5K.js} +2 -2
- package/dist-cli/chunks/{upgrade-OKNBSSBF.js → upgrade-OLGZ7K6Y.js} +2 -2
- package/dist-cli/chunks/upload-GQYWQIIG.js +2 -0
- package/dist-cli/chunks/{version-EY4PANXP.js → version-A5YSPPCX.js} +2 -2
- package/dist-cli/chunks/web-U6OTYNPM.js +2 -0
- package/dist-cli/chunks/{what-happened-MC5PTHCG.js → what-happened-Y3MVLKPF.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 +108 -12
- 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 +57 -9
- package/dist-lib/sdk.mjs +57 -9
- package/dist-lib/skills.cjs +22 -14
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/skills/soot/SKILL.md +1 -0
- package/skills/sootsim-debug/SKILL.md +6 -8
- package/skills/sootsim-perf/SKILL.md +4 -4
- package/dist-cli/chunks/beta-YMHG327W.js +0 -2
- package/dist-cli/chunks/chunk-A3LHGXZW.js +0 -1
- package/dist-cli/chunks/chunk-AHWQZXFB.js +0 -119
- package/dist-cli/chunks/chunk-K7OZYJKD.js +0 -2
- package/dist-cli/chunks/chunk-KGSLGXWW.js +0 -2
- package/dist-cli/chunks/chunk-NJPDAYWO.js +0 -1
- package/dist-cli/chunks/chunk-VIXY7DGW.js +0 -97
- package/dist-cli/chunks/cli-version-DPI32W6E.js +0 -2
- package/dist-cli/chunks/daemon-GF5QBYWN.js +0 -2
- package/dist-cli/chunks/drivers-J4BHBZXD.js +0 -2
- package/dist-cli/chunks/flow-LTUM776G.js +0 -2
- package/dist-cli/chunks/help-LBG75ITV.js +0 -2
- package/dist-cli/chunks/inspect-XAEZTCMI.js +0 -2
- package/dist-cli/chunks/install-desktop-2CSEI2MD.js +0 -2
- package/dist-cli/chunks/mode-VPVEZ652.js +0 -111
- package/dist-cli/chunks/optional-demo-registry-D47EWM4J.js +0 -2
- package/dist-cli/chunks/runtime-EV7TFPWL.js +0 -2
- package/dist-cli/chunks/store-ANJJMDLX.js +0 -2
- package/dist-cli/chunks/telemetry-GZK77NUU.js +0 -2
- package/dist-cli/chunks/upload-KAY6K5ML.js +0 -2
- package/dist-cli/chunks/web-PI2BL42A.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{execFileSync as h,spawn as g}from"child_process";import{existsSync as s,readdirSync as k}from"fs";import{dirname as m,join as l,resolve as a}from"path";import{fileURLToPath as v}from"url";var c;function p(){if(c!==void 0)return c;try{c=m(v(import.meta.resolve("sootsim-engine/package.json")))}catch{c=null}return c}var I="dev.sootsim.simulator";function x(){let n=p();if(!n)return null;let e=l(n,"dist-electron/main.cjs");if(!s(e))return null;let i=D(n);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:n}:null}function b(){let n=p();return n?s(l(n,"src-electron/main.ts")):!1}function D(n){let e=n;for(let i=0;i<6;i++){let t=l(e,"node_modules/.bin/electron");if(s(t))return t;let r=m(e);if(r===e)break;e=r}return null}function C(){let n=p(),i=["/Applications/sootsim.app",a(process.env.HOME||"","Applications/sootsim.app"),...n?[a(n,"app/sootsim.app")]:[]].find(t=>s(t));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let t=h("mdfind",[`kMDItemCFBundleIdentifier == "${I}"`],{encoding:"utf8",timeout:3e3}).trim();if(t)return{path:t.split(`
|
|
3
3
|
`)[0],platform:"darwin",kind:"mac-app"}}catch{}return null}function f(n){if(!s(n))return null;let e=k(n).filter(i=>i.startsWith("sootsim")&&i.endsWith(".AppImage")).sort().reverse()[0];return e?l(n,e):null}function w(){let n=p(),i=[a(process.env.HOME||"","Applications/sootsim.AppImage"),a(process.env.HOME||"",".local/bin/sootsim.AppImage"),"/opt/sootsim/sootsim.AppImage","/opt/sootsim/sootsim",...n?[a(n,"app/sootsim.AppImage"),a(n,"release/linux-unpacked/sootsim")]:[]].find(r=>s(r));if(i)return{path:i,platform:"linux",kind:i.endsWith(".AppImage")?"linux-appimage":"linux-binary"};let t=n?f(a(n,"app"))||f(a(n,"release")):null;return t?{path:t,platform:"linux",kind:"linux-appimage"}:null}function A(){let n=x();if(n)return n;if(b()){let e=p(),i=l(e,"dist-electron/main.cjs");return s(i)?console.error(` no node_modules/.bin/electron found near ${e}. run \`bun install\`.`):console.error(` dist-electron/main.cjs missing in ${e}.
|
|
4
4
|
run: bun run --cwd packages/sootsim-engine build:electron-main
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as x}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as x}from"./chunk-VFM2GCJK.js";import{a as k}from"./chunk-XNLHQI4J.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-UFGF53JT.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,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.217 | (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-FS73CB2S.js";import{h,l as N,m as P}from"./chunk-SBLVM6KT.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,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.217 | (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.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{h as w,j as u,k as m,l}from"./chunk-F3OVNA6L.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,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-2MCDMCYQ.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-U6OTYNPM.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-U6OTYNPM.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.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A as i,C as s,x as t}from"./chunk-43HOXICB.js";import"./chunk-2MCDMCYQ.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.217 | (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-WSHEWWAP.js";import"./chunk-WOVVMHGW.js";import"./chunk-GLAMORG7.js";import"./chunk-Z6H5YGVP.js";import"./chunk-7GGP6CHB.js";import"./chunk-HKQG2TQP.js";import"./chunk-Z5DRCU5R.js";import"./chunk-FS73CB2S.js";import"./chunk-SBLVM6KT.js";import"./chunk-FHZ72TK4.js";import"./chunk-XNLHQI4J.js";import"./chunk-5MRHVSLH.js";import"./chunk-ZP7IKLL5.js";import"./chunk-PNN5RIHU.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-F3OVNA6L.js";import"./chunk-2MCDMCYQ.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.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d,e}from"./chunk-OKKXVF4E.js";import"./chunk-5HXI2BXE.js";import"./chunk-IRCQILE3.js";import"./chunk-EDF3RMTS.js";import"./chunk-PH6F62XI.js";import"./chunk-IQUBZ6UH.js";import"./chunk-PNN5RIHU.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-CGQGD4YT.js";import"./chunk-72ACLZTK.js";import"./chunk-F3OVNA6L.js";import"./chunk-2MCDMCYQ.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.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{f,m as T}from"./chunk-Z5DRCU5R.js";import{K as S,L as $,M as N,N as A,O as v}from"./chunk-FS73CB2S.js";import{g as D,i as O,k as x}from"./chunk-SBLVM6KT.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-2MCDMCYQ.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-JTBKTX2E.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.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-YIEZXEFD.js";import{a as v,h as k}from"./chunk-WSHEWWAP.js";import"./chunk-WOVVMHGW.js";import"./chunk-GLAMORG7.js";import"./chunk-Z6H5YGVP.js";import"./chunk-7GGP6CHB.js";import"./chunk-HKQG2TQP.js";import{a as u}from"./chunk-VFM2GCJK.js";import"./chunk-Z5DRCU5R.js";import"./chunk-FS73CB2S.js";import"./chunk-SBLVM6KT.js";import"./chunk-S3NTQ523.js";import{b as m,g as f,l as h}from"./chunk-FHZ72TK4.js";import{a as c}from"./chunk-XNLHQI4J.js";import"./chunk-5MRHVSLH.js";import"./chunk-ZP7IKLL5.js";import"./chunk-PNN5RIHU.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-F3OVNA6L.js";import"./chunk-2MCDMCYQ.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-OFWYZIJ2.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.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{e as P}from"./chunk-C3L2JWQF.js";import"./chunk-XGOENFDF.js";import{b as _,c as I}from"./chunk-DLGYFFRD.js";import"./chunk-II5GPTCI.js";import"./chunk-KPQIXJ6P.js";import{a as D}from"./chunk-P2FPQYLI.js";import{a as b}from"./chunk-2QZEYMIG.js";import"./chunk-WSHEWWAP.js";import"./chunk-WOVVMHGW.js";import"./chunk-GLAMORG7.js";import"./chunk-Z6H5YGVP.js";import"./chunk-7GGP6CHB.js";import"./chunk-HKQG2TQP.js";import"./chunk-Z5DRCU5R.js";import"./chunk-FS73CB2S.js";import"./chunk-SBLVM6KT.js";import"./chunk-FHZ72TK4.js";import"./chunk-XNLHQI4J.js";import"./chunk-5MRHVSLH.js";import"./chunk-5LY3QGYK.js";import"./chunk-ZP7IKLL5.js";import"./chunk-5HXI2BXE.js";import"./chunk-IRCQILE3.js";import"./chunk-IQUBZ6UH.js";import"./chunk-PNN5RIHU.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-F3OVNA6L.js";import"./chunk-2MCDMCYQ.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.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-GLAMORG7.js";import{g as d,i as l,l as a}from"./chunk-SBLVM6KT.js";import"./chunk-ZP7IKLL5.js";import"./chunk-PNN5RIHU.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import{g as c,h as r,i as g}from"./chunk-F3OVNA6L.js";import"./chunk-2MCDMCYQ.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.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as E,i as R,l as b}from"./chunk-SBLVM6KT.js";import"./chunk-PNEWTGQD.js";import{b as v}from"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-2MCDMCYQ.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.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-S3NTQ523.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-FHZ72TK4.js";import"./chunk-XNLHQI4J.js";import"./chunk-5MRHVSLH.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-2MCDMCYQ.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};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*! sootsim v0.1.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as L,d as T}from"./chunk-KDMMOZWO.js";import{g as $,i as R,m as b}from"./chunk-SBLVM6KT.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-2MCDMCYQ.js";import{existsSync as V,mkdirSync as W,unlinkSync as N,writeFileSync as x}from"node:fs";import{homedir as q}from"node:os";import{dirname as j,extname as H,join as K,resolve as E}from"node:path";import{spawnSync as C}from"node:child_process";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
|
+
sootsim film \u2014 record a flow flat, replay it on the 3d stage, save a clip
|
|
4
|
+
|
|
5
|
+
usage:
|
|
6
|
+
sootsim film <flow.yaml> [options]
|
|
7
|
+
|
|
8
|
+
how it works:
|
|
9
|
+
1. the flow runs at full speed on the flat canvas while the engine
|
|
10
|
+
recording store captures the device screen
|
|
11
|
+
2. 3d mode + the recording editor come up and play that capture back on
|
|
12
|
+
the phone screen while a camera script animates
|
|
13
|
+
3. the WebGL stage canvas is recorded and saved
|
|
14
|
+
|
|
15
|
+
options:
|
|
16
|
+
--out <path> output file (.webm, or .mp4 when ffmpeg is
|
|
17
|
+
installed). default: ~/Desktop/sootsim-films/<flow>.webm
|
|
18
|
+
--script <id> camera script to animate during playback
|
|
19
|
+
(default: hero-arc)
|
|
20
|
+
--fps <n> stage capture framerate (default: 30)
|
|
21
|
+
--slow <ms> per-step delay forwarded to the flow runner
|
|
22
|
+
--keep-three leave 3d mode + the recording editor on afterwards
|
|
23
|
+
--sim <id> target a specific connected sim
|
|
24
|
+
|
|
25
|
+
stage decor (same flags as \`sootsim mode three configure\`):
|
|
26
|
+
--background <id> \xB7 --gradient <stops> \xB7 --gradient-angle <deg>
|
|
27
|
+
--colorway <id> \xB7 --room on|off \xB7 --focus on|off \xB7 --focus-amount <id>
|
|
28
|
+
--focus-range <id> \xB7 --environment on|off \xB7 --env-shape/spread/size/color
|
|
29
|
+
--env-glow on|off \xB7 --env-plastic on|off
|
|
30
|
+
|
|
31
|
+
examples:
|
|
32
|
+
sootsim film flows/feed-scroll.yaml
|
|
33
|
+
sootsim film flows/swap.yaml --script hero-arc --background gradient-neon --out ~/Desktop/swap-3d.mp4
|
|
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(E(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=E(I??K(q(),"Desktop","sootsim-films",`${v}.webm`)),y=H(l).toLowerCase()===".mp4";if(y&&C("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-JETK5JHP.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
|
+
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
|
+
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
|
+
const entitled = () =>
|
|
40
|
+
window.__sootsimSharedAuth?.current?.entitlements?.threeModeAdvancedControls === true
|
|
41
|
+
if (entitled()) return true
|
|
42
|
+
const chip = Array.from(document.querySelectorAll('*')).find(
|
|
43
|
+
(e) => e.childElementCount === 0 && e.textContent?.trim() === 'DevLogin',
|
|
44
|
+
)
|
|
45
|
+
if (!chip) return entitled()
|
|
46
|
+
chip.click()
|
|
47
|
+
const deadline = Date.now() + 20000
|
|
48
|
+
while (Date.now() < deadline) {
|
|
49
|
+
if (entitled()) return true
|
|
50
|
+
await new Promise((r) => setTimeout(r, 300))
|
|
51
|
+
}
|
|
52
|
+
return entitled()
|
|
53
|
+
})()`,3e4)||console.log(" film: decor entitlement not unlocked \u2014 stage uses the default look");let p=T(t);delete p.script,p.resetPose=!0,await b(e,"SootSim.bridges.threeMode.configure",p),await s(2400),console.log(` film: filming the 3d stage (script: ${h})`);let M=await r(e,`(() => {
|
|
54
|
+
const c = window.SootSim?.bridges?.threeMode?.getCanvas?.()
|
|
55
|
+
if (!c || !c.captureStream) return { ok: false, error: 'no stage canvas' }
|
|
56
|
+
let mime = 'video/webm;codecs=vp9'
|
|
57
|
+
if (!('MediaRecorder' in window) || !MediaRecorder.isTypeSupported(mime)) mime = 'video/webm'
|
|
58
|
+
const stream = c.captureStream(${P})
|
|
59
|
+
const mr = new MediaRecorder(stream, { mimeType: mime, videoBitsPerSecond: ${Z} })
|
|
60
|
+
const st = { mr, chunks: [], b64: null }
|
|
61
|
+
mr.ondataavailable = (e) => { if (e.data && e.data.size) st.chunks.push(e.data) }
|
|
62
|
+
mr.onstop = () => {
|
|
63
|
+
const blob = new Blob(st.chunks, { type: 'video/webm' })
|
|
64
|
+
const fr = new FileReader()
|
|
65
|
+
fr.onload = () => { st.b64 = String(fr.result).split(',')[1] || '' }
|
|
66
|
+
fr.readAsDataURL(blob)
|
|
67
|
+
}
|
|
68
|
+
window.__sootsimFilm = st
|
|
69
|
+
mr.start(200)
|
|
70
|
+
return { ok: true }
|
|
71
|
+
})()`);if(!M?.ok)return console.error(` film: stage capture failed: ${M?.error??"unknown"}`),1;await r(e,`((dur) => {
|
|
72
|
+
const rs = window.SootSim?.replayStore
|
|
73
|
+
if (!rs) return false
|
|
74
|
+
const probed = rs.value?.playback?.durationMs
|
|
75
|
+
const total = probed && probed > 500 ? probed : dur
|
|
76
|
+
const start = performance.now()
|
|
77
|
+
const tick = () => {
|
|
78
|
+
const t = performance.now() - start
|
|
79
|
+
rs.emit({ ...rs.value, playback: { ...rs.value.playback, playing: true, scrubbing: false, currentTimeMs: Math.min(t, total) } })
|
|
80
|
+
if (t < total) requestAnimationFrame(tick)
|
|
81
|
+
}
|
|
82
|
+
requestAnimationFrame(tick)
|
|
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`;x(o,g);let i=C("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
|
+
`).filter(Boolean).slice(-4).join(`
|
|
86
|
+
`);return console.error(` film: ffmpeg transcode failed:
|
|
87
|
+
${U}`),console.error(` film: source kept at ${o}`),1}N(o)}else x(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.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c,d,e,f,g,h}from"./chunk-C3L2JWQF.js";import{c as a,d as b}from"./chunk-XGOENFDF.js";import"./chunk-II5GPTCI.js";import"./chunk-KPQIXJ6P.js";import"./chunk-P2FPQYLI.js";import"./chunk-2QZEYMIG.js";import"./chunk-WSHEWWAP.js";import"./chunk-WOVVMHGW.js";import"./chunk-GLAMORG7.js";import"./chunk-Z6H5YGVP.js";import"./chunk-7GGP6CHB.js";import"./chunk-HKQG2TQP.js";import"./chunk-Z5DRCU5R.js";import"./chunk-FS73CB2S.js";import"./chunk-SBLVM6KT.js";import"./chunk-FHZ72TK4.js";import"./chunk-XNLHQI4J.js";import"./chunk-5MRHVSLH.js";import"./chunk-5LY3QGYK.js";import"./chunk-ZP7IKLL5.js";import"./chunk-5HXI2BXE.js";import"./chunk-IRCQILE3.js";import"./chunk-IQUBZ6UH.js";import"./chunk-PNN5RIHU.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-F3OVNA6L.js";import"./chunk-2MCDMCYQ.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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c}from"./chunk-EDF3RMTS.js";import"./chunk-PH6F62XI.js";import"./chunk-IQUBZ6UH.js";import"./chunk-PNN5RIHU.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-CGQGD4YT.js";import"./chunk-72ACLZTK.js";import"./chunk-F3OVNA6L.js";import"./chunk-2MCDMCYQ.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-43HOXICB.js";import"./chunk-2MCDMCYQ.js";export{b as ACTIVE_RUNTIME_FILE,e as CONFIG_FILE,f as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,d as DEV_BRIDGE_LOCKFILE,a as SOOTSIM_HOME_ENV,L as activeRuntimeDir,m as activeRuntimeFile,u as cacheDir,S as claimDaemonLockfile,K as compareSemver,x as configFilePath,F as consumeRuntimeUpgradeNotice,s as daemonAppBundlePath,r as daemonAppDir,t as daemonAppLauncherPath,v as daemonLockfilePath,w as devBridgeLockfilePath,n as electronDir,o as electronUserDataDir,p as electronVersionDir,G as ensureSootsimHome,O as isDaemonLockfileFresh,P as isDevBridgeLockfileFresh,i as isDevWorkstation,h as isSootsimDevCheckout,J as listInstalledRuntimes,q as profilesDir,H as readActiveRuntime,M as readDaemonLockfile,N as readDevBridgeLockfile,B as readOrCreateAnonymousId,y as readSharedConfig,A as readTelemetryEnabled,T as removeDaemonLockfile,U as removeDevBridgeLockfile,l as runtimeDir,D as runtimeUpgradeNoticePath,k as runtimesDir,j as shouldSkipPersistentDaemon,g as sootsimHomeDir,I as writeActiveRuntime,Q as writeDaemonLockfile,R as writeDevBridgeLockfile,E as writeRuntimeUpgradeNotice,z as writeSharedConfig,C as writeTelemetryEnabled};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{j as a,k as b}from"./chunk-XGOENFDF.js";import"./chunk-II5GPTCI.js";import"./chunk-WSHEWWAP.js";import"./chunk-WOVVMHGW.js";import"./chunk-GLAMORG7.js";import"./chunk-Z6H5YGVP.js";import"./chunk-7GGP6CHB.js";import"./chunk-HKQG2TQP.js";import"./chunk-Z5DRCU5R.js";import"./chunk-FS73CB2S.js";import"./chunk-SBLVM6KT.js";import"./chunk-FHZ72TK4.js";import"./chunk-XNLHQI4J.js";import"./chunk-5MRHVSLH.js";import"./chunk-5LY3QGYK.js";import"./chunk-ZP7IKLL5.js";import"./chunk-IQUBZ6UH.js";import"./chunk-PNN5RIHU.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-F3OVNA6L.js";import"./chunk-2MCDMCYQ.js";export{a as printShellPerfReport,b as runInspect};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as k,d as v}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as k,d as v}from"./chunk-IRCQILE3.js";import"./chunk-43HOXICB.js";import"./chunk-2MCDMCYQ.js";import{exec as L}from"node:child_process";import{randomBytes as R}from"node:crypto";import x from"node:http";var b=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",w="http://localhost:3000";async function P(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${w}/api/auth/me`)).ok)return w}catch{}return b}function A(){console.log(`
|
|
3
3
|
sootsim login \u2014 sign in so uploads can attach to your account
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -21,6 +21,6 @@ options:
|
|
|
21
21
|
<p style="color:#ccc">${r}</p>
|
|
22
22
|
</div>
|
|
23
23
|
</body>
|
|
24
|
-
</html>`}async function E(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let u=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${u}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function G(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function z(r){(r.includes("--help")||r.includes("-h"))&&(A(),process.exit(0));let e=[...r],t=await P(C(e,"--origin"));if(G(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await E(t);if(o.ok){k({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let i=await v(t),d=i?.user?.email||o.email||i?.user?.id||o.userId,{trackCliEvent:a,flushCliTelemetry:f}=await import("./telemetry-
|
|
24
|
+
</html>`}async function E(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let u=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${u}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function G(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe"||e==="192.168.5.2"||/^192\.168\.(?:64|139)\.1$/.test(e))}catch{return!1}}async function z(r){(r.includes("--help")||r.includes("-h"))&&(A(),process.exit(0));let e=[...r],t=await P(C(e,"--origin"));if(G(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await E(t);if(o.ok){k({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let i=await v(t),d=i?.user?.email||o.email||i?.user?.id||o.userId,{trackCliEvent:a,flushCliTelemetry:f}=await import("./telemetry-UFGF53JT.js");a({event:"cli_login_succeeded",identity:{userId:o.userId??i?.user?.id??null},properties:{origin:t,mode:"dev"}}),await f(),console.log(` signed in${d?` as ${d}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let u=R(16).toString("hex");{let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-UFGF53JT.js");o({event:"cli_login_started",properties:{origin:t}}),await i()}let m=300*1e3,s=await new Promise(o=>{let i,d=!1,a=c=>{d||(d=!0,clearTimeout(i),o(c),f.close())},f=x.createServer((c,n)=>{try{let l=new URL(c.url||"/","http://127.0.0.1"),_=l.searchParams.get("state"),y=l.searchParams.get("token"),$=l.searchParams.get("email")||void 0,T=l.searchParams.get("userId")||void 0,p=l.searchParams.get("error");if(_!==u){n.statusCode=404,n.end("not found");return}if(n.setHeader("content-type","text/html; charset=utf-8"),p){n.end(g(`sign-in failed: ${p}`)),a({ok:!1,error:p});return}if(!y){n.end(g("missing token. close this tab and retry `sootsim login`.")),a({ok:!1,error:"missing token"});return}n.end(g("sign-in complete. you can return to the terminal.")),a({ok:!0,token:y,email:$,userId:T})}catch(l){n.statusCode=500,n.end(g("sign-in callback failed. retry `sootsim login`.")),a({ok:!1,error:l instanceof Error?l.message:"callback failed"})}});i=setTimeout(()=>{a({ok:!1,error:"timed out waiting for the browser sign-in (5 minutes). rerun `sootsim login` and complete the github authorize screen if it appears."})},m),f.listen(0,"127.0.0.1",()=>{let c=f.address();if(!c||typeof c=="string"){a({ok:!1,error:"failed to bind callback server"});return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",u),n.searchParams.set("port",String(c.port)),n.searchParams.set("sootbean",t),console.log(" opening browser for sootsim login..."),console.log(" first time here? github will show an authorize screen. approve it to continue."),console.log(" waiting up to 5 minutes for the browser (ctrl+c to cancel)"),console.log(` if nothing opens, visit:
|
|
25
25
|
${n.toString()}
|
|
26
|
-
`),U(n.toString())})});if(!s.ok){let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-
|
|
26
|
+
`),U(n.toString())})});if(!s.ok){let{trackCliEvent:o,flushCliTelemetry:i}=await import("./telemetry-UFGF53JT.js");o({event:"cli_login_failed",properties:{origin:t,error:s.error}}),await i(),console.error(` login failed: ${s.error}`),process.exit(1)}k({token:s.token,user:s.userId?{id:s.userId,email:s.email}:null,origin:t,source:"cli"});let h=await v(t),I=h?.user?.email||s.email||h?.user?.id||s.userId,{trackCliEvent:O,flushCliTelemetry:S}=await import("./telemetry-UFGF53JT.js");O({event:"cli_login_succeeded",identity:{userId:s.userId??h?.user?.id??null},properties:{origin:t}}),await S(),console.log(` signed in${I?` as ${I}`:""}`)}export{z as runLogin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as r,b as i}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as r,b as i}from"./chunk-5HXI2BXE.js";import{a as t,c as o}from"./chunk-IRCQILE3.js";import"./chunk-43HOXICB.js";import"./chunk-2MCDMCYQ.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as M,d as E,f as O,g as L,h as R}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as M,d as E,f as O,g as L,h as R}from"./chunk-C3L2JWQF.js";import{c as S}from"./chunk-XGOENFDF.js";import{a as A,b as $,c as F}from"./chunk-DLGYFFRD.js";import{a as x}from"./chunk-II5GPTCI.js";import"./chunk-KPQIXJ6P.js";import{a as T}from"./chunk-P2FPQYLI.js";import{a as k}from"./chunk-2QZEYMIG.js";import"./chunk-WSHEWWAP.js";import"./chunk-WOVVMHGW.js";import"./chunk-GLAMORG7.js";import"./chunk-Z6H5YGVP.js";import"./chunk-7GGP6CHB.js";import"./chunk-HKQG2TQP.js";import"./chunk-Z5DRCU5R.js";import"./chunk-FS73CB2S.js";import"./chunk-SBLVM6KT.js";import"./chunk-FHZ72TK4.js";import"./chunk-XNLHQI4J.js";import"./chunk-5MRHVSLH.js";import"./chunk-5LY3QGYK.js";import"./chunk-ZP7IKLL5.js";import"./chunk-5HXI2BXE.js";import"./chunk-IRCQILE3.js";import"./chunk-IQUBZ6UH.js";import"./chunk-PNN5RIHU.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-F3OVNA6L.js";import"./chunk-2MCDMCYQ.js";import*as s from"fs";import*as a from"path";var I=[".maestro","maestro"];function P(){console.log(`
|
|
3
3
|
sootsim maestro \u2014 author and run Maestro YAML flows against sootsim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -89,7 +89,7 @@ appId: com.example.app
|
|
|
89
89
|
- inputText: "secret123"
|
|
90
90
|
- tapOn: "Sign in"
|
|
91
91
|
- assertVisible: "Welcome"
|
|
92
|
-
`,"utf8"),console.log(` + wrote ${e}`),console.log(" next: sootsim maestro test .maestro/login.yaml"),0)}async function z(o,n={}){if(o.includes("--help")||o.includes("-h"))return P(),0;if(o.includes("--list-compat"))return W(),0;let e;try{e=D(o)}catch(r){return console.error(` error: ${r.message}`),1}e=L(e);let t=process.cwd(),i=e[0];if(i==="init")return N(t);if(i==="generate"){let{runMaestroGenerate:r}=await import("./maestro-generate-
|
|
92
|
+
`,"utf8"),console.log(` + wrote ${e}`),console.log(" next: sootsim maestro test .maestro/login.yaml"),0)}async function z(o,n={}){if(o.includes("--help")||o.includes("-h"))return P(),0;if(o.includes("--list-compat"))return W(),0;let e;try{e=D(o)}catch(r){return console.error(` error: ${r.message}`),1}e=L(e);let t=process.cwd(),i=e[0];if(i==="init")return N(t);if(i==="generate"){let{runMaestroGenerate:r}=await import("./maestro-generate-QU74GL7P.js");return r(e.slice(1))}if(i==="start"||i==="keep"||i==="good"||i==="end"||i==="validate")return R(e);e=Y(e);let u=null,p;if(i==="test"){let r=e.slice(1).find(f=>!U(f));r?(u=a.resolve(t,r),p=e.slice(1).filter(f=>f!==r)):(u=j(t),p=e.slice(1))}else i&&!U(i)?(u=a.resolve(t,i),p=e.slice(1)):(u=j(t),p=e);if(!u)return console.error(`
|
|
93
93
|
error: no maestro flows found.
|
|
94
94
|
expected one of: ${I.map(r=>`./${r}/`).join(", ")}
|
|
95
95
|
or pass a flow explicitly: sootsim maestro test path/to/flow.yaml
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as O,c as k}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as O,c as k}from"./chunk-DLGYFFRD.js";import{a as x}from"./chunk-II5GPTCI.js";import{a as A}from"./chunk-P2FPQYLI.js";import{a as v,b as T}from"./chunk-2QZEYMIG.js";import"./chunk-Z6H5YGVP.js";import"./chunk-7GGP6CHB.js";import{f as y}from"./chunk-FS73CB2S.js";import{g as b,i as S}from"./chunk-SBLVM6KT.js";import"./chunk-5MRHVSLH.js";import"./chunk-5HXI2BXE.js";import"./chunk-IRCQILE3.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-2MCDMCYQ.js";import{mkdtempSync as j,writeFileSync as N}from"fs";import{tmpdir as C}from"os";import{join as E}from"path";var J=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",_=18e3,V=18e4;function f(e,t){let r=e.indexOf(t);return r>=0?e[r+1]:void 0}function G(e,t){for(let r of t){let o=f(e,r);if(o)return o}}var F=new Set(["--origin","--preview-origin","--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]);function H(e){for(let t=0;t<e.length;t++){let r=e[t];if(r){if(F.has(r)){t+=1;continue}if(!r.startsWith("-"))return{prompt:r,index:t}}}return null}function Y(e,t){return e.filter((r,o)=>o!==t)}async function K(e,t){let r=Y(e,t),o=b(r,{stripBooleanFlags:["--new","--headless","--headed","--electron","--preview-open"],stripValueFlags:[...F]}),i=S(o);try{let s=await y(i,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),a=[s.shell?`shell: ${JSON.stringify(s.shell)}`:"",s.keyboard?`keyboard: ${JSON.stringify(s.keyboard)}`:"",typeof s.nodeCount=="number"?`nodes: ${s.nodeCount}`:"",s.tree||""].filter(Boolean).join(`
|
|
3
3
|
`);return a.length>_?a.slice(0,_)+`
|
|
4
4
|
[tree truncated]`:a}finally{i.close()}}var z=`
|
|
5
5
|
You write Maestro-compatible SootSim YAML flows from a user's plain-language test goal.
|
|
@@ -30,5 +30,5 @@ ${t||"[no tree available]"}
|
|
|
30
30
|
|
|
31
31
|
Generate the shortest replayable flow that verifies the goal from this current state.
|
|
32
32
|
`.trim()}function M(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>t&&typeof t=="object"&&t.type==="text"?String(t.text??""):"").join(""):""}async function X(e){let t=await fetch(`${e.origin.replace(/\/$/,"")}/api/llm`,{method:"POST",headers:{"content-type":"application/json",authorization:e.authHeader},body:JSON.stringify({modelId:J,context:{systemPrompt:z,messages:[{role:"user",content:W(e.prompt,e.describe),timestamp:Date.now()}]},options:{maxTokens:1800,temperature:.2},threadId:null}),signal:AbortSignal.timeout(V)});if(!t.ok||!t.body){let c=await t.text().catch(()=>"");throw new Error(`/api/llm ${t.status}${c?`: ${c}`:""}`)}let r=t.body.getReader(),o=new TextDecoder,i=[],s="",l="",a=c=>{let d=c.trim();if(!d)return;let n=JSON.parse(d);if(n.type==="text_delta"&&n.delta)i.push(n.delta);else if(n.type==="text_end"&&n.content)s=n.content;else if(n.type==="done")s=M(n.message?.content);else if(n.type==="error")throw new Error(n.error?.errorMessage||M(n.error?.content)||"llm error")};for(;;){let{value:c,done:d}=await r.read();if(d)break;l+=o.decode(c,{stream:!0});let n;for(;(n=l.indexOf(`
|
|
33
|
-
`))>=0;)a(l.slice(0,n)),l=l.slice(n+1)}l+=o.decode(),l.trim()&&a(l);let u=(s||i.join("")).trim();if(!u)throw new Error("llm returned an empty test flow");return u}function q(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),r=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(r)}function P(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function Q(e){let t=q(e);if(!P(t))throw new Error("llm did not return a JSON object");let r=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"SootSim generated test",o=t.steps;if(!Array.isArray(o)||o.length===0)throw new Error("llm returned no flow steps");let i=o.map((s,l)=>{if(!P(s))throw new Error(`flow step ${l+1} is not an object`);return s});return{summary:r,steps:i,yamlText:x.stringify(i)}}function Z(e,t,r,o){let i=[r,"--preview","--preview-origin",o,"--billing-kind","test_run"],s=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),l=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let a=0;a<e.length;a++){if(a===t)continue;let u=e[a];if(u==="--origin"||u==="--preview-origin"){a+=1;continue}if(u==="--public-origin"){let c=e[a+1];c&&i.push("--preview-public-origin",c),a+=1;continue}if(s.has(u)){let c=e[a+1];c&&i.push(u,c),a+=1;continue}l.has(u)&&i.push(u)}return i}async function ce(e){let t=H(e);if(!t)return console.error(' usage: sootsim maestro generate "test goal"'),1;let{prompt:r,index:o}=t,i=v();if(!i||i.kind==="github")return console.error(' sootsim maestro generate "<goal>" needs a login or SOOTSIM_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),1;let s=T(i),l=await A(G(e,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let a=await K(e,o);console.log(" generating Maestro flow\u2026");let u=await X({prompt:r,describe:a,origin:l,authHeader:s}),c=Q(u),d=j(E(C(),"sootsim-maestro-generate-")),n=E(d,"flow.yaml");N(n,c.yamlText),console.log(` flow: ${n}`);let I=Date.now(),{runFlowPlayback:$,getLastFlowPreviewUploadResult:D,getLastFlowTraceSteps:L}=await import("./flow-
|
|
33
|
+
`))>=0;)a(l.slice(0,n)),l=l.slice(n+1)}l+=o.decode(),l.trim()&&a(l);let u=(s||i.join("")).trim();if(!u)throw new Error("llm returned an empty test flow");return u}function q(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),r=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(r)}function P(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function Q(e){let t=q(e);if(!P(t))throw new Error("llm did not return a JSON object");let r=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"SootSim generated test",o=t.steps;if(!Array.isArray(o)||o.length===0)throw new Error("llm returned no flow steps");let i=o.map((s,l)=>{if(!P(s))throw new Error(`flow step ${l+1} is not an object`);return s});return{summary:r,steps:i,yamlText:x.stringify(i)}}function Z(e,t,r,o){let i=[r,"--preview","--preview-origin",o,"--billing-kind","test_run"],s=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),l=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let a=0;a<e.length;a++){if(a===t)continue;let u=e[a];if(u==="--origin"||u==="--preview-origin"){a+=1;continue}if(u==="--public-origin"){let c=e[a+1];c&&i.push("--preview-public-origin",c),a+=1;continue}if(s.has(u)){let c=e[a+1];c&&i.push(u,c),a+=1;continue}l.has(u)&&i.push(u)}return i}async function ce(e){let t=H(e);if(!t)return console.error(' usage: sootsim maestro generate "test goal"'),1;let{prompt:r,index:o}=t,i=v();if(!i||i.kind==="github")return console.error(' sootsim maestro generate "<goal>" needs a login or SOOTSIM_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),1;let s=T(i),l=await A(G(e,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let a=await K(e,o);console.log(" generating Maestro flow\u2026");let u=await X({prompt:r,describe:a,origin:l,authHeader:s}),c=Q(u),d=j(E(C(),"sootsim-maestro-generate-")),n=E(d,"flow.yaml");N(n,c.yamlText),console.log(` flow: ${n}`);let I=Date.now(),{runFlowPlayback:$,getLastFlowPreviewUploadResult:D,getLastFlowTraceSteps:L}=await import("./flow-JETK5JHP.js"),U=Z(e,o,n,l),w=await $(U),p=D(),h=L(),B=h.find(R=>R.status==="failure"),g=w===0?"passed":"failed",m=await k({origin:l,kind:"maestro",prompt:r,summary:c.summary,status:g,failureMessage:g==="failed"?B?.error??"flow playback failed":null,previewShareId:p?.shareId??null,owner:f(e,"--owner")??null,repo:f(e,"--repo")??null,durationMs:Date.now()-I,flowYamlSizeBytes:Buffer.byteLength(c.yamlText,"utf8"),...O(h),auth:i});return console.log(`
|
|
34
34
|
result: ${g}`),m&&console.log(` run: ${m.id}`),p?.previewUrl&&console.log(` preview: ${p.previewUrl}`),m?.traceUrl&&console.log(` replay: ${m.traceUrl}`),w}export{ce as runMaestroGenerate};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*! sootsim v0.1.217 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as s,b as i}from"./chunk-KDMMOZWO.js";import"./chunk-SBLVM6KT.js";import"./chunk-PNEWTGQD.js";import"./chunk-DPR6E3DA.js";import"./chunk-43HOXICB.js";import"./chunk-2MCDMCYQ.js";async function r(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
|
+
sootsim mode screenshot \u2014 toggle the screenshot-mode chrome overlay
|
|
4
|
+
|
|
5
|
+
usage:
|
|
6
|
+
sootsim mode screenshot [on|off|toggle]
|
|
7
|
+
|
|
8
|
+
arguments:
|
|
9
|
+
on enable screenshot mode (enables showFrame if needed)
|
|
10
|
+
off disable screenshot mode
|
|
11
|
+
toggle flip the current state (default)
|
|
12
|
+
|
|
13
|
+
examples:
|
|
14
|
+
sootsim mode screenshot
|
|
15
|
+
sootsim mode screenshot on
|
|
16
|
+
sootsim mode screenshot off
|
|
17
|
+
`),process.exit(0)),await s(e,o,{modeKey:"screenshotMode",displayName:"screenshot-mode",actionId:"toggle-screenshot-mode"})}var m=new Set(["--sim","--port","-p"]),c=new Set(["screenshot","three"]);function d(e){for(let o=0;o<e.length;o++){let n=e[o];if(n.startsWith("-")){m.has(n)&&o++;continue}return c.has(n)?{name:n,index:o}:null}return null}function h(e,o){return[...e.slice(0,o),...e.slice(o+1)]}function l(){console.log(`
|
|
18
|
+
sootsim mode \u2014 toggle live display modes
|
|
19
|
+
|
|
20
|
+
usage:
|
|
21
|
+
sootsim mode screenshot [on|off|toggle]
|
|
22
|
+
sootsim mode three [on|off|toggle]
|
|
23
|
+
sootsim mode three configure [options]
|
|
24
|
+
`)}async function g(e,o){if(e.includes("--help")||e.includes("-h")){l();return}let n=d(e);n||(l(),process.exit(1));let t=h(e,n.index);if(n.name==="screenshot"){await r(t,o);return}await i(t,o)}export{g as runMode};
|