sootsim 0.1.66 → 0.1.68
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 +7 -28
- package/dist-cli/chunks/agent-RWWC5VLR.js +46 -0
- package/dist-cli/chunks/{agent-wrapper-5DJBERZP.js → agent-wrapper-AZ2TWUZV.js} +2 -2
- package/dist-cli/chunks/{assert-RHILK3WR.js → assert-YVADDYYY.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-E62IXD2G.js +2 -0
- package/dist-cli/chunks/beta-7MI67AHK.js +2 -0
- package/dist-cli/chunks/{chunk-XZ5SQJM2.js → chunk-2HVRBEOU.js} +128 -36
- package/dist-cli/chunks/chunk-2NFRZQ3K.js +73 -0
- package/dist-cli/chunks/{chunk-22CO2ZE3.js → chunk-3HF6BNSA.js} +2 -2
- package/dist-cli/chunks/{chunk-GDCMTHEU.js → chunk-3NNUNABL.js} +1 -1
- package/dist-cli/chunks/{chunk-BD76YSRN.js → chunk-3QA6YYSG.js} +2 -2
- package/dist-cli/chunks/{chunk-T4YLDM5C.js → chunk-52QFCYGQ.js} +3 -3
- package/dist-cli/chunks/chunk-5LDGAVAV.js +23 -0
- package/dist-cli/chunks/{chunk-LRBMW2WC.js → chunk-5QUYJKLU.js} +2 -2
- package/dist-cli/chunks/chunk-5SGAFI2M.js +23 -0
- package/dist-cli/chunks/{chunk-VRV2X4X2.js → chunk-6453CCSA.js} +1 -1
- package/dist-cli/chunks/{chunk-FXF2FHPI.js → chunk-6JGI2JVM.js} +2 -2
- package/dist-cli/chunks/chunk-6TQ2IBH6.js +2 -0
- package/dist-cli/chunks/chunk-72Y42WVX.js +186 -0
- package/dist-cli/chunks/{chunk-4LYNJPUM.js → chunk-BQLKO6NP.js} +2 -2
- package/dist-cli/chunks/{chunk-AYBGSHQK.js → chunk-C3R25CWY.js} +2 -2
- package/dist-cli/chunks/{chunk-TJEP4DBA.js → chunk-CFR6W2AH.js} +2 -2
- package/dist-cli/chunks/chunk-CMEWLMED.js +1 -0
- package/dist-cli/chunks/chunk-CZWZG7GL.js +2 -0
- package/dist-cli/chunks/chunk-D5LXWWGN.js +12 -0
- package/dist-cli/chunks/{chunk-EIQLQDKX.js → chunk-E7FCGYB5.js} +2 -2
- package/dist-cli/chunks/{chunk-DEQ7RED3.js → chunk-FBO7YRJM.js} +2 -2
- package/dist-cli/chunks/chunk-FITG7BVA.js +1 -0
- package/dist-cli/chunks/{chunk-BEQD2DSK.js → chunk-G3WXMB3Z.js} +1 -1
- package/dist-cli/chunks/chunk-GFXFPPNR.js +35 -0
- package/dist-cli/chunks/chunk-H6YUT7HX.js +372 -0
- package/dist-cli/chunks/{chunk-D4VEI6MI.js → chunk-HC43PTFD.js} +1 -1
- package/dist-cli/chunks/chunk-HPFXTPOD.js +1 -0
- package/dist-cli/chunks/{chunk-V4SZERWD.js → chunk-J7XCQWQI.js} +14 -14
- package/dist-cli/chunks/{chunk-HIN5TAAL.js → chunk-K6N6DEL5.js} +1 -1
- package/dist-cli/chunks/{chunk-6AP6LXVV.js → chunk-KKK4RTBP.js} +1 -1
- package/dist-cli/chunks/{chunk-NCSGLZRV.js → chunk-OFTI3N27.js} +2 -2
- package/dist-cli/chunks/{chunk-BTHB3PMG.js → chunk-QHAZOOK2.js} +3 -3
- package/dist-cli/chunks/{chunk-4NT6VRUU.js → chunk-QYFPV5YO.js} +1 -1
- package/dist-cli/chunks/chunk-TBVBPZRF.js +3 -0
- package/dist-cli/chunks/{chunk-LVFWALS4.js → chunk-TKDMCYGS.js} +2 -2
- package/dist-cli/chunks/{chunk-LCKLQSZX.js → chunk-TY5CBM3C.js} +2 -2
- package/dist-cli/chunks/{chunk-WAOLC7WV.js → chunk-TZYXNQHA.js} +1 -1
- package/dist-cli/chunks/chunk-U7KUAZJB.js +119 -0
- package/dist-cli/chunks/{chunk-M2Q4FXRE.js → chunk-WHJFB6AK.js} +1 -1
- package/dist-cli/chunks/{chunk-HWCZYW6M.js → chunk-WIW3G6HS.js} +2 -2
- package/dist-cli/chunks/chunk-WXISHMXL.js +2 -0
- package/dist-cli/chunks/{chunk-UMXVWFST.js → chunk-YSDIOWNN.js} +1 -1
- package/dist-cli/chunks/{chunk-EEMGSSWY.js → chunk-Z6BCORBY.js} +2 -2
- package/dist-cli/chunks/{chunk-UNSLXX7V.js → chunk-ZP7YYRHI.js} +2 -2
- package/dist-cli/chunks/cli-version-LM6OBGUK.js +2 -0
- package/dist-cli/chunks/{compat-I7JXYUJN.js → compat-Z3IFUQ73.js} +3 -3
- package/dist-cli/chunks/{config-3HR5RKVH.js → config-XBERIMLW.js} +2 -2
- package/dist-cli/chunks/control-SWOP3KB7.js +2 -0
- package/dist-cli/chunks/{cpu-profile-ZVHMTVAU.js → cpu-profile-SNX23Q5V.js} +2 -2
- package/dist-cli/chunks/daemon-QQPC4GOV.js +65 -0
- package/dist-cli/chunks/{debug-CQ6Y7GJ2.js → debug-WENYS45R.js} +5 -5
- package/dist-cli/chunks/demo-app-registry-QWOGX5C2.js +2 -0
- package/dist-cli/chunks/{detox-7ZKTGLDR.js → detox-P4N47V6P.js} +2 -2
- package/dist-cli/chunks/{device-4M6Z7E2N.js → device-5WWFV22H.js} +2 -2
- package/dist-cli/chunks/{diagnose-SMQLYGNX.js → diagnose-HJ4F3ER7.js} +2 -2
- package/dist-cli/chunks/drivers-GAEMIY75.js +2 -0
- package/dist-cli/chunks/{electron-6N2MIN5W.js → electron-JHFA2OGV.js} +3 -3
- package/dist-cli/chunks/flow-J67STV2Q.js +2 -0
- package/dist-cli/chunks/{hints-RJCZS2E3.js → hints-UHQ2T2RX.js} +2 -2
- package/dist-cli/chunks/{home-paths-DCUNA3CD.js → home-paths-NWDFFIX4.js} +2 -2
- package/dist-cli/chunks/inspect-O34RH4AE.js +970 -0
- package/dist-cli/chunks/install-ZB2AGO44.js +2 -0
- package/dist-cli/chunks/{install-desktop-C7424OSW.js → install-desktop-RYP35PHA.js} +3 -3
- package/dist-cli/chunks/{keys-TXUQOAZ3.js → keys-U5YI77TK.js} +2 -2
- package/dist-cli/chunks/{launch-MVA44QTC.js → launch-UFOGCQWO.js} +3 -3
- package/dist-cli/chunks/{login-NHO2WTHC.js → login-SPX6IK6Q.js} +4 -4
- package/dist-cli/chunks/{logout-SRRWADCE.js → logout-I6UE3XYL.js} +2 -2
- package/dist-cli/chunks/{maestro-UHNXEZAN.js → maestro-IPEULAUZ.js} +2 -2
- package/dist-cli/chunks/{preview-ETIUP7KC.js → preview-CE27FPGG.js} +2 -2
- package/dist-cli/chunks/{profile-MY5JFVIF.js → profile-JZSFMO2Y.js} +2 -2
- package/dist-cli/chunks/{react-KCMC4GL3.js → react-6IJQG4V3.js} +2 -2
- package/dist-cli/chunks/record-6WDKEBXL.js +70 -0
- package/dist-cli/chunks/runtime-P54OGI57.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-LQZIWQU6.js → runtime-delivery-C4KG6ISS.js} +2 -2
- package/dist-cli/chunks/screenshot-VQTI6G32.js +33 -0
- package/dist-cli/chunks/{screenshot-mode-USPWASI3.js → screenshot-mode-JBDCHRSS.js} +2 -2
- package/dist-cli/chunks/{screenshots-EPEDNA6H.js → screenshots-HLMGN2OX.js} +2 -2
- package/dist-cli/chunks/{server-222QT33M.js → server-U3QLKQDX.js} +6 -6
- package/dist-cli/chunks/setup-repo-TZULA5RK.js +2 -0
- package/dist-cli/chunks/{skills-6XRREE2M.js → skills-SMML5DJP.js} +2 -2
- package/dist-cli/chunks/{start-YCAZBZEX.js → start-7SCU4I64.js} +4 -4
- package/dist-cli/chunks/store-WEIVIM3L.js +2 -0
- package/dist-cli/chunks/telemetry-U3BBVPLJ.js +2 -0
- package/dist-cli/chunks/{test-6TNRHSWC.js → test-UWFHFDN7.js} +3 -3
- package/dist-cli/chunks/{three-mode-MDOLHGXW.js → three-mode-CJUNGCIF.js} +2 -2
- package/dist-cli/chunks/{timeline-72MWE44G.js → timeline-DIRXVM6R.js} +3 -3
- package/dist-cli/chunks/{upgrade-IHZ4DFAE.js → upgrade-LQQU4GSZ.js} +2 -2
- package/dist-cli/chunks/upload-SSAFKJGF.js +2 -0
- package/dist-cli/chunks/web-AJU6QA43.js +2 -0
- package/dist-cli/chunks/what-happened-QFXDQ6VU.js +22 -0
- package/dist-cli/chunks/{whoami-2EYGCRDQ.js → whoami-HWXPDZEF.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +9 -2
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +23 -7
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/vite-base.cjs +23 -7
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/agent-IW7CCSSI.js +0 -61
- package/dist-cli/chunks/auto-bootstrap-PS2UDBP7.js +0 -2
- package/dist-cli/chunks/beta-XLYWSKEA.js +0 -2
- package/dist-cli/chunks/chunk-5MVFADNH.js +0 -3
- package/dist-cli/chunks/chunk-7NYW73Q6.js +0 -2
- package/dist-cli/chunks/chunk-EMMX6RF7.js +0 -73
- package/dist-cli/chunks/chunk-FIIBCY5I.js +0 -3
- package/dist-cli/chunks/chunk-G4VWDOWB.js +0 -17
- package/dist-cli/chunks/chunk-GMKGJHVG.js +0 -1
- package/dist-cli/chunks/chunk-M3ZEZHOB.js +0 -34
- package/dist-cli/chunks/chunk-MWTMLNGM.js +0 -348
- package/dist-cli/chunks/chunk-NQKBIKUZ.js +0 -1
- package/dist-cli/chunks/chunk-QMRXLBPN.js +0 -11
- package/dist-cli/chunks/chunk-X4HQLK4V.js +0 -119
- package/dist-cli/chunks/chunk-XOTJSR4T.js +0 -2
- package/dist-cli/chunks/chunk-YSQV4D7P.js +0 -1
- package/dist-cli/chunks/chunk-Z6HSVZIO.js +0 -100
- package/dist-cli/chunks/cli-version-ESQ2S6N5.js +0 -2
- package/dist-cli/chunks/control-TDZXFNVT.js +0 -2
- package/dist-cli/chunks/daemon-VYRTYH55.js +0 -83
- package/dist-cli/chunks/demo-app-registry-JAYU7BBM.js +0 -2
- package/dist-cli/chunks/drivers-SIY6JBEM.js +0 -2
- package/dist-cli/chunks/flow-BZEWL7UQ.js +0 -2
- package/dist-cli/chunks/inspect-T5NC7HHB.js +0 -1025
- package/dist-cli/chunks/install-YTJI5RS7.js +0 -2
- package/dist-cli/chunks/record-DHDSXC2Y.js +0 -51
- package/dist-cli/chunks/runtime-AJP6V5LM.js +0 -2
- package/dist-cli/chunks/screenshot-4KPEEI6I.js +0 -28
- package/dist-cli/chunks/setup-repo-D56L3CEB.js +0 -2
- package/dist-cli/chunks/store-Z32KZ34K.js +0 -2
- package/dist-cli/chunks/telemetry-RFTX2BZK.js +0 -2
- package/dist-cli/chunks/upload-G5C7LJWG.js +0 -2
- package/dist-cli/chunks/web-JLJSJUS2.js +0 -2
- package/dist-cli/chunks/what-happened-BUXSJ3QS.js +0 -15
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as o}from"./chunk-CFR6W2AH.js";import"./chunk-KKK4RTBP.js";import"./chunk-QHAZOOK2.js";import"./chunk-FBO7YRJM.js";import"./chunk-E7FCGYB5.js";import"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as b}from"./chunk-KKK4RTBP.js";import{a as x}from"./chunk-3NNUNABL.js";import"./chunk-HC43PTFD.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${n} / ${t} MB`}async function _(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let n=o.stdout.trim().split(`
|
|
3
3
|
`),t=n[n.length-1].split(" ").pop()?.trim();if(!t||!w(t))throw new Error(`could not determine dmg mount point (output: ${o.stdout})`);let a=f(t,"sootsim.app");if(!w(a))throw u("hdiutil",["detach","-force",t]),new Error(`sootsim.app not found inside ${t}`);let i="/Applications",d=v(process.env.HOME||"","Applications"),c=i;try{let m=f(i,`.sootsim-write-probe-${process.pid}`);u("touch",[m]),w(m)?g(m,{force:!0}):c=d}catch{c=d}c===d&&y(c,{recursive:!0});let l=f(c,"sootsim.app");w(l)&&g(l,{recursive:!0,force:!0});let p=u("cp",["-R",a,l]),e=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return e.status!==0&&console.warn(` warning: failed to unmount ${t} (${e.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function L(r){let o=v(process.env.HOME||"","Applications");y(o,{recursive:!0});let n=f(o,"sootsim.AppImage");return w(n)&&g(n,{force:!0}),T(r,n),S(n,493),n}async function C(r){return await new Promise((o,n)=>{let s=k("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});s.once("error",n),s.once("exit",t=>{t===0?o():n(new Error(`installer exited with code ${t}`))})}),r}async function Y(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
|
|
4
4
|
sootsim install-desktop \u2014 download and install the optional desktop GUI
|
|
5
5
|
|
|
@@ -20,4 +20,4 @@ examples:
|
|
|
20
20
|
`),process.exit(0));let o=r.includes("--yes")||r.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,n=r.includes("--force"),s=x();if(s&&!n){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=A();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await b("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(D(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
|
|
21
21
|
`);try{await O({url:t.url,dest:i,onProgress:(e,m)=>{let $=Date.now();$-d<100&&e<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${I(e,m)}`))}})}catch(e){g(a,{recursive:!0,force:!0}),console.error(`
|
|
22
22
|
download failed: ${e instanceof Error?e.message:String(e)}`),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
|
|
23
|
-
`);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-
|
|
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-U3BBVPLJ.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as l,b as d,c as k,d as y,e as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as l,b as d,c as k,d as y,e as g}from"./chunk-Z6BCORBY.js";import{d as c}from"./chunk-E7FCGYB5.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
|
|
3
3
|
created: ${t.record.label} (${t.record.keyPrefix}\u2026)`),console.log(` scopes: ${t.record.scopes.join(",")}`),console.log(`
|
|
4
4
|
secret: ${t.secret}
|
|
5
5
|
`),console.log(` copy this now \u2014 we can't show it again.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-CMEWLMED.js";import{b as m}from"./chunk-72Y42WVX.js";import{a as u}from"./chunk-3NNUNABL.js";import"./chunk-FITG7BVA.js";import"./chunk-C3R25CWY.js";import"./chunk-K6N6DEL5.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
|
|
3
3
|
sootsim launch \u2014 one-shot: install runtime if needed, start daemon, open app
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -13,4 +13,4 @@ options:
|
|
|
13
13
|
examples:
|
|
14
14
|
sootsim launch
|
|
15
15
|
sootsim launch --version 1.2.3
|
|
16
|
-
`);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-
|
|
16
|
+
`);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-P54OGI57.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as f,d as m}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as f,d as m}from"./chunk-E7FCGYB5.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";import{exec as S}from"node:child_process";import{randomBytes as $}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(t){if(t)return t;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(`${h}/api/auth/me`)).ok)return h}catch{}return I}function R(){console.log(`
|
|
3
3
|
sootsim login \u2014 sign in so desktop uploads can attach to your account
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -21,6 +21,6 @@ options:
|
|
|
21
21
|
<p style="color:#ccc">${t}</p>
|
|
22
22
|
</div>
|
|
23
23
|
</body>
|
|
24
|
-
</html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-
|
|
24
|
+
</html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-U3BBVPLJ.js");n({event:"cli_login_succeeded",identity:{userId:r.userId??s?.user?.id??null},properties:{origin:e,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${r.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(r=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,O=a.searchParams.get("userId")||void 0,g=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),g){n.end(u(`sign-in failed: ${g}`)),r({ok:!1,error:g}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),r({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),r({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),r({ok:!0,token:k,email:b,userId:O}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),r({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){r({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${e.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",e),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
|
|
25
25
|
${n.toString()}
|
|
26
|
-
`),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-
|
|
26
|
+
`),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-U3BBVPLJ.js");r({event:"cli_login_failed",properties:{origin:e,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}f({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:e,source:"cli"});let d=await m(e),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-U3BBVPLJ.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:e}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as r,b as i}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as r,b as i}from"./chunk-FBO7YRJM.js";import{a as t,c as o}from"./chunk-E7FCGYB5.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.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{b as h,c as w}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as h,c as w}from"./chunk-H6YUT7HX.js";import"./chunk-TKDMCYGS.js";import"./chunk-HPFXTPOD.js";import"./chunk-BQLKO6NP.js";import"./chunk-2NFRZQ3K.js";import"./chunk-Z6BCORBY.js";import"./chunk-2HVRBEOU.js";import"./chunk-D5LXWWGN.js";import"./chunk-WIW3G6HS.js";import"./chunk-GFXFPPNR.js";import"./chunk-J7XCQWQI.js";import"./chunk-TY5CBM3C.js";import"./chunk-72Y42WVX.js";import"./chunk-3NNUNABL.js";import"./chunk-FITG7BVA.js";import"./chunk-C3R25CWY.js";import"./chunk-K6N6DEL5.js";import"./chunk-ZP7YYRHI.js";import"./chunk-6TQ2IBH6.js";import"./chunk-FBO7YRJM.js";import"./chunk-E7FCGYB5.js";import"./chunk-5QUYJKLU.js";import"./chunk-6JGI2JVM.js";import"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";import*as i from"fs";import*as l from"path";var v=[".maestro","maestro"];function x(){console.log(`
|
|
3
3
|
sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-HC43PTFD.js";import{resolve as c,dirname as m}from"path";import{fileURLToPath as a}from"url";var t=m(a(import.meta.resolve("sootsim-engine/package.json")));async function g(o,r){(o.includes("--help")||o.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim preview \u2014 production-like preview
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as s,c as i,d as t,e as n,f as c}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as s,c as i,d as t,e as n,f as c}from"./chunk-C3R25CWY.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";function f(){console.log(`
|
|
3
3
|
sootsim profile \u2014 manage isolated storage profiles
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as w,e as b,h as m,i as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as w,e as b,h as m,i as f}from"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";function h(){console.log(`
|
|
3
3
|
sootsim react \u2014 inspect React component render cost in the tenant worker
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as P}from"./chunk-BQLKO6NP.js";import"./chunk-2NFRZQ3K.js";import{d as Y}from"./chunk-Z6BCORBY.js";import"./chunk-FITG7BVA.js";import{d as K}from"./chunk-K6N6DEL5.js";import"./chunk-FBO7YRJM.js";import"./chunk-E7FCGYB5.js";import{c as h,e as b,f as Q}from"./chunk-5LDGAVAV.js";import{b as X}from"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";import{existsSync as fe,mkdirSync as O,readdirSync as pe,readFileSync as ge,rmSync as z,writeFileSync as U}from"fs";import{homedir as we,tmpdir as he}from"os";import{dirname as W,extname as ee,join as C,resolve as be}from"path";var Z=24e4,ve=3e4;async function N(e,r,o,i){let t=Math.max(2e4,i+ve);try{return await e.send({type:"evaluate",code:r},{timeoutMs:t})}catch(n){let s=n instanceof Error?n.message:String(n);/^command timed out after \d+s$/.test(s)&&(console.error(` ${o} stalled \u2014 the render host did not finish within ${Math.round(t/1e3)}s; it is likely contended or wedged.
|
|
3
|
+
the capture lock auto-releases, so simply retry the recording.
|
|
4
|
+
if it persists, recover the sim with \`sootsim close --sim <id>\`.`),process.exit(1)),/render host not available|already streaming|already recording/i.test(s)&&(console.error(` ${o} failed: ${s}
|
|
5
|
+
a prior recording was abandoned and its capture is still
|
|
6
|
+
releasing. the lock self-heals in ~${Math.round((i+2e4)/1e3)}s \u2014 retry then, or recover now with
|
|
7
|
+
\`sootsim close --sim <id>\` and reopen the sim.`),process.exit(1)),console.error(` ${o} failed: ${s}`),process.exit(1)}}var ye=new Set(["--sim","--port","-p","--mode","--duration","--fps","--format","--output","-o","--frames","--max-width","--origin"]),Se=new Set(["start","stop","cancel","status","prelude-start"]);function $e(e){for(let r=0;r<e.length;r++){let o=e[r];if(o.startsWith("-")){ye.has(o)&&r++;continue}return Se.has(o)?{name:o,index:r}:null}return null}async function Je(e,r){let o=$e(e);if(o){let d=[...e.slice(0,o.index),...e.slice(o.index+1)];if(o.name==="start"){await Be(d,r);return}if(o.name==="prelude-start"){await Ee(d,r);return}if(o.name==="stop"){await Ce(d,r);return}if(o.name==="cancel"){await Ue(d,r);return}await Ie(d,r);return}let i=h(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only","--open"],stripValueFlags:["--mode","--duration","--fps","--format","--output","--frames","--max-width","--origin"]}),t=te(u(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=u(e,"--format");s&&!["webm","mp4","gif","png"].includes(s)&&(console.error(` invalid --format "${s}" \u2014 expected webm | mp4 | gif | png`),process.exit(1));let l=u(e,"--output"),a=Number(u(e,"--duration")??"10");(!Number.isFinite(a)||a<=0)&&(console.error(` invalid --duration "${u(e,"--duration")}" \u2014 expected a positive number of seconds`),process.exit(1));let c=1800;a>c&&(console.error(` invalid --duration "${u(e,"--duration")}" \u2014 exceeds the ${c}s (30m) maximum`),process.exit(1));let f=Number(u(e,"--fps")??"30"),v=u(e,"--frames");if(v!==void 0){let d=Number(v);(!Number.isInteger(d)||d<=0)&&(console.error(` invalid --frames "${v}" \u2014 expected a positive integer count`),process.exit(1))}let j=e.includes("--open"),H=u(e,"--max-width")?Number(u(e,"--max-width")):void 0,p=Math.max(100,Math.round(a*1e3)),q=u(e,"--origin");if(t==="live"||t==="combined"){l&&console.log(` note: --output is ignored for --mode ${t} \u2014 the recording uploads to /preview/<id>`),n&&t==="live"&&console.log(` note: --${n==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await P("record",{originOverride:q,allowGitHubAuth:!0});let d=b({...i,commandTimeoutMs:6e4});try{await G(d),await ie(d,t),t==="combined"&&await B(d),await se(d,q);let R=await ae(d,t,t==="combined"?n:void 0);R.ok||(console.error(` start failed: recording store refused to start (${t})`+(R.error?`: ${R.error}`:"")),process.exit(1)),console.log(` recording ${t} for ${a}s`),await new Promise(x=>setTimeout(x,p)),await de(d);let _=await ce(d);le(_,j,t)}finally{d.close()}return}let A=v?Number(v):null,S=_e(s,l,A);j&&console.log(" note: --open is ignored for local-file capture \u2014 it applies to --mode live/combined");let w=b({...i,commandTimeoutMs:6e4});try{if(await oe(w),await B(w),S==="png"){let $=A??10,g=I(l,`sootsim-frames-${M()}`);l&&ee(l)&&console.log(` note: --frames writes multiple pngs, so --output "${l}" is a directory \u2014 frame-NNN.png files land inside it`),O(g,{recursive:!0});for(let m of pe(g))/^frame-\d+\.png$/.test(m)&&z(C(g,m),{force:!0});console.log(` sampling ${$} frames over ${a}s \u2192 ${g}`);let y=await w.send({type:"evaluate",code:`window.__sootsimRecorder.startFrameCapture({ count: ${$}, durationMs: ${p}${n?`, layers: ${JSON.stringify(n)}`:""} })`});(!y.ok||!y.requestId)&&(console.error(` frame capture start failed: ${y.error??"unknown error"}`),process.exit(1)),await new Promise(m=>setTimeout(m,p));let ue=Date.now()+Math.max(5e3,p),F=null;for(;;){let m=await w.send({type:"evaluate",code:`window.__sootsimRecorder.getFrameCaptureResult(${y.requestId})`});if(m||(console.error(" frame capture result missing"),process.exit(1)),m.done){m.ok||(console.error(` frame capture failed: ${m.error??"unknown error"}`),process.exit(1)),F=m.frames??[];break}Date.now()>=ue&&(console.error(" frame capture timed out"),process.exit(1)),await new Promise(T=>setTimeout(T,100))}F.forEach((m,T)=>{let me=`${g}/frame-${String(T+1).padStart(3,"0")}.png`;U(me,Buffer.from(m.data,"base64"))}),console.log(` saved ${F.length} frames`);return}if(S==="gif"){let $=A??Math.max(10,Math.round(a*f/3)),g=I(l,`sootsim-${M()}.gif`);O(W(g),{recursive:!0}),console.log(` encoding gif: ${$} frames over ${a}s \u2192 ${g}`);let y=await N(w,`window.__sootsimRecorder.captureGif({ frames: ${$}, durationMs: ${p}${H?`, maxWidth: ${H}`:""}${n?`, layers: ${JSON.stringify(n)}`:""} })`,"gif encode",p);y||(console.error(" gif capture returned no frames"),process.exit(1)),U(g,Buffer.from(y.data,"base64")),console.log(` saved: ${g} (${D(y.size)})`);return}let d=I(l,`sootsim-${M()}.${S}`);O(W(d),{recursive:!0});let R={format:S,fps:f,durationMs:p};n&&(R.layers=n);let _=await N(w,`window.__sootsimRecorder.start(${JSON.stringify(R)})`,`${S} start`,p);_.ok||(console.error(` start failed: ${_.error??"unknown error"}`),/render host not available|already streaming|already recording/i.test(_.error??"")&&console.error(" a prior recording was abandoned and its capture is still\n releasing. retry in ~20s, or recover now with\n `sootsim close --sim <id>` then reopen the sim."),process.exit(1)),console.log(` recording ${S} for ${a}s \u2192 ${d}`),await new Promise($=>setTimeout($,p));let x=await N(w,"window.__sootsimRecorder.stop()",`${S} encode/flush`,p);x.ok||(console.error(` stop failed: ${x.error??"unknown error"}`),process.exit(1)),x.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),process.exit(1)),await re(w,d),console.log(` saved: ${d} (${D(x.size)})`)}finally{w.close()}}var Re=6e3;async function J(e,r){try{return await e.send({type:"evaluate",code:r},{timeoutMs:Re})}catch(o){let i=o instanceof Error?o.message:String(o);throw/^command timed out after \d+s$/.test(i)&&(console.error(" sim did not respond \u2014 it is connected to the bridge but has not\n loaded an app (or its page is unresponsive). run `sootsim list`\n and target a sim with a loaded app via --sim <id>."),process.exit(1)),o}}async function oe(e){await J(e,'typeof window.__sootsimRecorder !== "undefined"')||(console.error(" window.__sootsimRecorder missing \u2014 is sootsim engine running in this sim?"),process.exit(1))}async function B(e){let{hidden:r}=await Q(e);r&&(console.error(` refusing to record: the sootsim tab is hidden, so frame capture
|
|
8
|
+
would be throttled to ~1fps and produce a frozen-looking file.
|
|
9
|
+
bring the chrome window to the foreground (un-minimize / switch to
|
|
10
|
+
its tab) or run the recording in headless playwright, then retry.`),process.exit(1))}async function re(e,r){let o=[],i=0;for(;;){let t=await e.send({type:"evaluate",code:`window.__sootsimRecorder.getBlobBase64({ offset: ${i}, chunk: 2097152 })`});if(!t)throw new Error("no blob available on recorder");if(o.push(Buffer.from(t.data,"base64")),i=t.offset,t.done)break}U(r,Buffer.concat(o))}function u(e,r){let o=e.indexOf(r);if(!(o<0||o===e.length-1))return e[o+1]}function xe(e){if(!e)return;let r=ee(e).toLowerCase().replace(/^\./,"");if(r==="webm"||r==="mp4"||r==="gif")return r;if(r==="png")return"png"}function _e(e,r,o){return e||(o!=null?"png":xe(r)??"webm")}function M(){return new Date().toISOString().replace(/[:T]/g,"-").replace(/\..+/,"")}function ke(){let e=C(we(),".sootsim","recordings");return O(e,{recursive:!0}),e}function I(e,r){return e?be(process.cwd(),e):C(ke(),r)}function D(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(2)}MB`}function te(e){if(!e)return"video";if(e==="video"||e==="live"||e==="combined")return e;console.error(` invalid --mode "${e}" \u2014 expected video | live | combined`),process.exit(1)}function L(){return C(he(),`sootsim-recording-${X()}.json`)}function E(){let e=L();if(!fe(e))return null;try{return{mode:"video",...JSON.parse(ge(e,"utf8"))}}catch{return z(e,{force:!0}),null}}function Oe(e){U(L(),JSON.stringify(e,null,2))}function k(){z(L(),{force:!0})}function V(e,r){e&&r.simId&&e!==r.simId&&console.log(` note: the tracked recording session is on sim ${r.simId}, not the
|
|
11
|
+
requested sim ${e}. record state is global (not per-sim);
|
|
12
|
+
this command acts on that session regardless of --sim.`)}async function Be(e,r){let o=E();o&&(console.error(` recording already in progress (started ${o.startedAt}, sim ${o.simId??"?"}). run \`sootsim record stop\` first, or \`sootsim record cancel\` to discard.`),process.exit(1));let i=h(e,{port:r.port,stripBooleanFlags:["--no-shell","--shell-only"],stripValueFlags:["--mode","--fps","--format","--max-width","--origin"]}),t=te(u(e,"--mode")),n=e.includes("--shell-only")?"shell":e.includes("--no-shell")?"tenant":void 0,s=u(e,"--format"),l=s==="mp4"?"mp4":"webm";s&&l!==s&&(console.error(` record start only supports webm or mp4 (got: ${s}). for gif/png use atomic mode: sootsim record --format ${s} --duration <s>`),process.exit(1));let a=Number(u(e,"--fps")??"30"),c=b({...i,commandTimeoutMs:15e3});try{if(t==="live"||t==="combined"){n&&t==="live"&&console.log(` note: --${n==="shell"?"shell-only":"no-shell"} is ignored for --mode live \u2014 live recordings capture events only, no video`),await P("record",{originOverride:u(e,"--origin"),allowGitHubAuth:!0}),await G(c),await ie(c,t),t==="combined"&&await B(c),await se(c,u(e,"--origin"));let f=await ae(c,t,t==="combined"?n:void 0);f.ok||(console.error(` start failed: recording store refused to start (${t})`+(f.error?`: ${f.error}`:"")),process.exit(1))}else{await oe(c),await B(c);let f={format:l,fps:a};n&&(f.layers=n);let v=await c.send({type:"evaluate",code:`window.__sootsimRecorder.start(${JSON.stringify(f)})`});v.ok||(console.error(` start failed: ${v.error??"unknown error"}`),process.exit(1))}Oe({simId:i.simId??null,mode:t,format:l,fps:a,layers:n,startedAt:new Date().toISOString()}),console.log(t==="video"?` recording ${l} @ ${a}fps${n?` (${n})`:""} \u2014 run \`sootsim record stop --output <path>\` when done`:` recording ${t} \u2014 run \`sootsim record stop\` when done (add --open to launch the preview URL)`)}finally{c.close()}}async function Ee(e,r){let o=E();o&&(console.error(` recording already in progress (started ${o.startedAt}, sim ${o.simId??"?"}). run \`sootsim record stop\` first, or \`sootsim record cancel\` to discard.`),process.exit(1));let i=h(e,{port:r.port,stripBooleanFlags:[],stripValueFlags:["--origin"]}),t=b({...i,commandTimeoutMs:15e3});try{if(await G(t),await B(t),!await t.send({type:"evaluate",code:`(() => {
|
|
13
|
+
const start = window.SootSim?.bridges?.startRecordingPrelude
|
|
14
|
+
if (typeof start !== 'function') return false
|
|
15
|
+
return Promise.resolve(start()).then((value) => value === true)
|
|
16
|
+
})()`})){let s=await t.send({type:"evaluate",code:`(() => {
|
|
17
|
+
const getError = window.SootSim?.bridges?.getRecordingStartError
|
|
18
|
+
return typeof getError === 'function' ? getError() : null
|
|
19
|
+
})()`}).catch(()=>null);console.error(` prelude start failed: recording store refused to start${typeof s=="string"&&s?` (${s})`:""}`),process.exit(1)}console.log(" recording preview prelude \u2014 run `sootsim record start --mode combined` when the visible proof segment is ready")}finally{t.close()}}async function ne(e){try{let r=await e.send({type:"evaluate",code:`(() => {
|
|
20
|
+
const store = window.SootSim?.bridges?.getRecordingState?.();
|
|
21
|
+
const headless = window.__sootsimRecorder?.state?.();
|
|
22
|
+
const eventRecorder = window.SootSim?.bridges?.eventRecorder ?? window.__sootsimEventRecorder;
|
|
23
|
+
const eventRecording =
|
|
24
|
+
typeof eventRecorder?.isRecording === 'function'
|
|
25
|
+
? eventRecorder.isRecording() === true
|
|
26
|
+
: false;
|
|
27
|
+
return { store: store ? store.state : undefined, headless, eventRecording };
|
|
28
|
+
})()`});return r?r.store==="recording"||r.headless==="recording"?"recording":r.store==="processing"?"processing":r.eventRecording?"prelude":r.store==="idle"||r.headless==="idle"?"idle":null:null}catch{return null}}async function Me(e){let r=await e.send({type:"evaluate",code:`(() => {
|
|
29
|
+
const store = window.SootSim?.bridges?.getRecordingState?.();
|
|
30
|
+
const eventRecorder = window.SootSim?.bridges?.eventRecorder ?? window.__sootsimEventRecorder;
|
|
31
|
+
const hadStoreRecording = store && store.state !== 'idle';
|
|
32
|
+
const hadEventRecording =
|
|
33
|
+
typeof eventRecorder?.isRecording === 'function'
|
|
34
|
+
? eventRecorder.isRecording() === true
|
|
35
|
+
: false;
|
|
36
|
+
const cancel = window.SootSim?.bridges?.cancelRecording;
|
|
37
|
+
if (typeof cancel === 'function') cancel();
|
|
38
|
+
return Boolean(hadStoreRecording || hadEventRecording);
|
|
39
|
+
})()`}).catch(()=>!1),o=await e.send({type:"evaluate",code:`(async () => {
|
|
40
|
+
const r = window.__sootsimRecorder;
|
|
41
|
+
if (r && typeof r.forceRelease === 'function') return await r.forceRelease();
|
|
42
|
+
return false;
|
|
43
|
+
})()`}).catch(()=>!1);return{store:r,headless:o}}async function Ie(e,r){let o=E();if(o){V(h(e,{port:r.port}).simId,o),o.mode==="video"?console.log(` recording ${o.mode} (${o.format} @ ${o.fps}fps) on sim ${o.simId??"?"} since ${o.startedAt}`):console.log(` recording ${o.mode} on sim ${o.simId??"?"} since ${o.startedAt}`);return}let i=h(e,{port:r.port}),t=b({...i,commandTimeoutMs:8e3});try{let n=await ne(t);if(n==="recording"||n==="processing"||n==="prelude"){if(n==="prelude"){console.log(" a recording preview prelude is active. hidden setup is being\n captured for the next live/combined preview recording. finish\n it with `sootsim record start --mode combined`, or discard it\n with `sootsim record cancel`.");return}console.log(` a recording is in progress (engine state: ${n}), but not via
|
|
44
|
+
\`record start\` \u2014 it was started by an atomic \`record --duration\`
|
|
45
|
+
run or the in-browser record button, which own their own lifecycle.
|
|
46
|
+
if that controlling run is still alive it will finish on its own
|
|
47
|
+
(atomic \`--mode video/gif/png\` writes a local file from that
|
|
48
|
+
process; live/combined upload to /preview/<id>). if the run was
|
|
49
|
+
killed, the recording is abandoned and will NOT finish \u2014 reclaim
|
|
50
|
+
it now with \`sootsim record cancel\`, or it auto-reclaims when the
|
|
51
|
+
abandoned capture's deadline lapses.`)}else console.log(" no recording in progress")}finally{t.close()}}async function Ue(e,r){let o=E();if(!o){let s=h(e,{port:r.port}),l=b({...s,commandTimeoutMs:8e3});try{let a=await ne(l);if(a==="recording"||a==="processing"||a==="prelude"){let c=await Me(l);c.store&&a==="prelude"?console.log(" recording preview prelude cancelled"):c.store||c.headless?console.log(" reclaimed an abandoned recording (started by an atomic\n `record --duration` run or the record button whose owner is\n gone). the recorder is idle again \u2014 live/combined can start."):console.log(" a recording is in progress and still owned by a live atomic\n `record --duration` run or the in-browser record button \u2014 it\n will finish on its own and nothing was reclaimed.")}else console.log(" no recording in progress")}finally{l.close()}return}let i=h(e,{port:r.port});V(i.simId,o);let t=o.simId??i.simId??void 0,n=b({...i,simId:t,commandTimeoutMs:15e3});try{o.mode==="live"||o.mode==="combined"?await n.send({type:"evaluate",code:"void window.SootSim?.bridges?.cancelRecording?.()"}):await n.send({type:"evaluate",code:"window.__sootsimRecorder.stop()"})}catch{}finally{k(),n.close()}console.log(" recording cancelled")}async function Ce(e,r){let o=E();o||(console.error(" no recording in progress. start one with `sootsim record start`."),process.exit(1));let i=h(e,{port:r.port,stripBooleanFlags:["--open"],stripValueFlags:["--output"]});V(i.simId,o);let t=o.simId??i.simId??void 0,n=e.includes("--open"),s=b({...i,simId:t,commandTimeoutMs:6e4});try{if(o.mode==="live"||o.mode==="combined"){await de(s);let f=await ce(s);k(),le(f,n,o.mode);return}let l=u(e,"--output"),a=I(l,`sootsim-${M()}.${o.format}`);O(W(a),{recursive:!0});let c=await s.send({type:"evaluate",code:"window.__sootsimRecorder.stop()"});c.ok||(console.error(` stop failed: ${c.error??"unknown error"}`),k(),process.exit(1)),c.size||(console.error(" recorder returned an empty blob \u2014 nothing written"),k(),process.exit(1)),await re(s,a),k(),console.log(` saved: ${a} (${D(c.size)})`)}finally{s.close()}}async function G(e){await J(e,'typeof window.SootSim?.bridges?.startRecording === "function" && typeof window.SootSim?.bridges?.stopRecording === "function"')||(console.error(" SootSim.bridges.startRecording missing \u2014 is sootsim engine running in this sim?"),process.exit(1))}async function ie(e,r){await J(e,`(() => {
|
|
52
|
+
const fn = window.__sootsimCaptureBundle
|
|
53
|
+
if (typeof fn !== 'function') return false
|
|
54
|
+
const snap = fn()
|
|
55
|
+
return !!(snap && snap.bundleUrl)
|
|
56
|
+
})()`)||(console.error(` --mode ${r} needs a guest app bundle to upload to /preview/<id>,
|
|
57
|
+
but this sim has no bundle loaded (a built-in shell screen like
|
|
58
|
+
photos/settings/home has none). open a metro/guest app first, or
|
|
59
|
+
use \`--mode video\` for a local screen recording with no upload.`),process.exit(1))}async function se(e,r){let o=Y();if(!o)return;let i=o.kind==="api-key"?o.secret:o.token,t=o.kind==="github"?{repoId:o.repoId,installationId:o.installationId}:null,n=r?r.replace(/\/$/,""):null;await e.send({type:"evaluate",code:`(() => {
|
|
60
|
+
const set = window.SootSim && window.SootSim.bridges && window.SootSim.bridges.setSession
|
|
61
|
+
if (typeof set !== 'function') return false
|
|
62
|
+
set({ token: ${JSON.stringify(i)}, user: null })
|
|
63
|
+
window.__sootsimPreviewUploadIdentity = ${JSON.stringify(t)}
|
|
64
|
+
window.__sootsimPreviewUseInjectedBearer = true
|
|
65
|
+
${n?`window.__sootsimUploadOrigin = ${JSON.stringify(n)}`:"delete window.__sootsimUploadOrigin"}
|
|
66
|
+
return true
|
|
67
|
+
})()`})||(console.error(" SootSim.bridges.setSession missing \u2014 this sim is running an engine\n build without CLI-injected preview auth. reload the sim or open a\n fresh one (`sootsim open --new`); if it persists, update sootsim."),process.exit(1))}async function ae(e,r,o){let i=o?JSON.stringify(o):"undefined";return await e.send({type:"evaluate",code:`window.SootSim.bridges.startRecording(${JSON.stringify(r)}, ${i}, { skipEntitlement: true })`})===!0?{ok:!0,error:null}:{ok:!1,error:await e.send({type:"evaluate",code:"(window.SootSim?.bridges?.getRecordingStartError?.() ?? null)"}).catch(()=>null)??null}}async function de(e){await e.send({type:"evaluate",code:"void window.SootSim.bridges.stopRecording()"})}async function ce(e){let r=Date.now()+Z;for(;Date.now()<r;){let o=await e.send({type:"evaluate",code:"(() => { const s = window.SootSim?.bridges?.getRecordingState?.(); return s ? { state: s.state, lastUpload: s.lastUpload, uploadError: s.uploadError } : null })()"});if(o&&o.state==="idle"){if(o.uploadError)return{uploadError:o.uploadError};if(o.lastUpload?.previewUrl)return{previewUrl:o.lastUpload.previewUrl,eventCount:o.lastUpload.eventCount}}await new Promise(i=>setTimeout(i,300))}return{uploadError:`upload did not settle within ${Z/1e3}s`}}function le(e,r,o){e.uploadError&&(console.error(` upload failed: ${e.uploadError}`),process.exit(1)),e.previewUrl||(console.error(" upload returned no preview URL"),process.exit(1)),console.log(` preview: ${e.previewUrl}`),console.log(` note: this URL is content-addressed \u2014 re-recording the same bundle
|
|
68
|
+
replaces this capture at the same /preview/<id>.`),(o==="live"||o==="combined")&&typeof e.eventCount=="number"&&console.log(` captured ${e.eventCount} event${e.eventCount===1?"":"s"}`),(o==="live"||o==="combined")&&e.eventCount===0&&console.log(o==="combined"?` note: this combined recording captured no events \u2014 the Live tab has
|
|
69
|
+
nothing to replay, and the Video tab may stall with no events to drive it.`:` note: this live recording captured no events \u2014 the preview has nothing
|
|
70
|
+
to replay and will boot a fresh interactive session instead.`),r&&K(e.previewUrl)}export{xe as extToFormat,_e as resolveFormat,Je as runRecord,u as valueOf};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a}from"./chunk-52QFCYGQ.js";import"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-OFTI3N27.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";export{a as runRuntime};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-OFTI3N27.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";export{a as DEFAULT_RUNTIME_CDN_ORIGIN,b as RUNTIME_CDN_ORIGIN_ENV,c as RUNTIME_CHANNEL_ENV,l as checkRuntimeUpToDate,h as fetchRuntimeManifest,j as installRuntime,d as resolveRuntimeCdnOrigin,e as resolveRuntimeChannel,i as resolveRuntimeVersion,f as runtimeManifestUrl,g as runtimeTarballUrl,k as updateRuntimeToLatest};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as R}from"./chunk-TKDMCYGS.js";import"./chunk-HPFXTPOD.js";import{a as b}from"./chunk-TZYXNQHA.js";import"./chunk-ZP7YYRHI.js";import"./chunk-5QUYJKLU.js";import{f as g}from"./chunk-6JGI2JVM.js";import{c as w,d as y,e as x,f as v,h as S}from"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";import{mkdirSync as $,writeFileSync as _}from"fs";import{dirname as A,resolve as B}from"path";async function z(e,o){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
|
+
sootsim screenshot \u2014 capture the canvas as a PNG
|
|
4
|
+
|
|
5
|
+
usage:
|
|
6
|
+
sootsim screenshot [output] [options]
|
|
7
|
+
sootsim screenshot [options] --output <path>
|
|
8
|
+
|
|
9
|
+
options:
|
|
10
|
+
--output <path> output file path (default: /tmp/sootsim-inspect.png)
|
|
11
|
+
first positional arg works too: \`screenshot /tmp/x.png\`
|
|
12
|
+
--with-frame wrap the captured screen in a tight device frame
|
|
13
|
+
--no-frame capture the raw screen bitmap (default)
|
|
14
|
+
--no-shell exclude the simulated iOS chrome (status bar, keyboard,
|
|
15
|
+
toasts) \u2014 captures the tenant surfaces only
|
|
16
|
+
--shell-only capture only the shell chrome, no tenant content
|
|
17
|
+
--area x,y,w,h crop to a logical sootsim rect
|
|
18
|
+
--id <testID> crop to a node's bounding box
|
|
19
|
+
--text <text> crop to a node found by text content
|
|
20
|
+
--gallery crawl and capture multiple screens as HTML gallery
|
|
21
|
+
--themes capture light and dark variants
|
|
22
|
+
|
|
23
|
+
examples:
|
|
24
|
+
sootsim screenshot
|
|
25
|
+
sootsim screenshot --with-frame --output framed.png
|
|
26
|
+
sootsim screenshot --area 0,200,393,400 --output hero.png
|
|
27
|
+
sootsim screenshot --id loginButton --output button.png
|
|
28
|
+
`),process.exit(0));let t=U(e);if(t.length>0){for(let{flag:l,suggestion:h}of t)console.error(h?` unknown flag: ${l} (did you mean ${h}?)`:` unknown flag: ${l}`);console.error(" run `sootsim screenshot --help` for the list of supported flags"),process.exit(1)}let r=e.includes("--gallery"),i=e.includes("--themes"),n=N(e),u=D(e);if(r||i)return n&&(console.error(" --with-frame is not supported with --gallery / --themes"),process.exit(1)),E(e,o);n&&e.some(l=>l==="--area"||l==="--id"||l==="--text")&&(console.error(" --with-frame only supports full-screen capture for now"),console.error(" remove --area / --id / --text, or capture raw and compose later"),process.exit(1));let s=w(e,{port:o.port,stripBooleanFlags:["--with-frame","--no-frame","--no-shell","--shell-only"],stripValueFlags:["--output","--area","--id","--text"]}),a=T(e),c=await P(e);if(await O(s.wsPort)){try{await M(s,a,c,n,u)}catch(l){console.error(` screenshot failed: ${l instanceof Error?l.message:String(l)}`),process.exit(1)}return}n&&(console.error(" --with-frame requires a running sootsim bridge"),console.error(" open the app in a live sim first, then rerun the command"),process.exit(1)),c&&(console.error(" --area / --id / --text require a running sootsim bridge"),console.error(" start one with `sootsim server`, `sootsim electron`, or your project dev server"),process.exit(1)),await E(e,o)}async function O(e){let o=y(e,{commandTimeoutMs:1e3});try{return await o.listSims(),!0}catch{return!1}finally{o.close()}}async function P(e){let o=e.find((i,n)=>e[n-1]==="--area");if(o){let i=o.split(",").map(c=>Number(c.trim()));if(i.length!==4||i.some(c=>!Number.isFinite(c)))throw new Error(`--area expects x,y,w,h (got "${o}")`);let[n,u,s,a]=i;return{x:n,y:u,w:s,h:a}}let t=e.find((i,n)=>e[n-1]==="--id"),r=e.find((i,n)=>e[n-1]==="--text");return t||r?{__matcher:{id:t,text:r}}:null}async function M(e,o,t,r,i){let n=x({...e,commandTimeoutMs:1e4});try{(await v(n)).hidden&&process.stderr.write(` \u26A0 screenshot will capture the LAST PAINTED canvas \u2014 likely stale.
|
|
29
|
+
navigation/\`shell\` commands sent before this screenshot may not
|
|
30
|
+
have repainted yet. focus the tab manually or \`sootsim --sim <id>\`
|
|
31
|
+
to target a visible sim before capturing.
|
|
32
|
+
|
|
33
|
+
`);let s=t,a=t?.__matcher;if(a){let d=await n.send({type:"evaluate",code:b(a)});if(!d)throw new Error(a.id?`no node with id "${a.id}"`:`no node matching text "${a.text}"`);s=d}let c=s?{x:s.x,y:s.y,w:s.w,h:s.h}:void 0,p={type:"screenshot"};i&&(p.layers=i),c&&(p.crop=c);let h=(await n.send(p)).replace(/^data:image\/png;base64,/,"");c&&console.log(` area: x=${c.x} y=${c.y} w=${c.w} h=${c.h}`),i&&console.log(` layers: ${i}`);let m=B(process.cwd(),o||"/tmp/sootsim-inspect.png");$(A(m),{recursive:!0});let f=Buffer.from(h,"base64");if(r){let d=await L(n);if(!d)throw new Error("could not read current device model from the target sim");let k=await R(f,d);_(m,k),console.log(` frame: ${d}`)}else _(m,f);console.log(` saved: ${m}`)}finally{n.close()}}async function L(e){let o=await S(e,"SootSim.bridges.settings.get")??{deviceModel:null},t=typeof o.deviceModel=="string"?o.deviceModel:null;return!t||!(t in g)?null:t}function N(e){let o=!1;for(let t of e)t==="--with-frame"&&(o=!0),t==="--no-frame"&&(o=!1);return o}function D(e){if(e.includes("--shell-only"))return"shell";if(e.includes("--no-shell"))return"tenant"}var C=new Set(["--help","-h","--verbose","-v","--with-frame","--no-frame","--no-shell","--shell-only","--gallery","--themes"]),F=new Set(["--output","--area","--id","--text","--url","--port","--timeout","--sim"]),G={"--rect":"--area","--crop":"--area","--region":"--area","--bounds":"--area","--box":"--area","--xywh":"--area","--out":"--output","-o":"--output","--file":"--output","--path":"--output","--testid":"--id","--test-id":"--id","--test_id":"--id"};function U(e){let o=[];for(let t=0;t<e.length;t++){let r=e[t];if(r.startsWith("-")){if(F.has(r)){t++;continue}C.has(r)||o.push({flag:r,suggestion:G[r]})}}return o}function T(e){let o=e.find((t,r)=>e[r-1]==="--output");if(o)return o;for(let t=0;t<e.length;t++){let r=e[t];if(r.startsWith("-")){F.has(r)&&t++;continue}return r}}async function E(e,o){let t=T(e)||"sootsim-screenshot.png",r=e.includes("--gallery"),i=e.find((s,a)=>e[a-1]==="--url")||`http://localhost:${o.port||5173}`,{chromium:n}=await import("playwright"),u=await n.launch({channel:"chrome",headless:!0});try{if(r)console.log(" capturing gallery..."),console.log(" (gallery mode not yet implemented)");else{let s=await u.newPage({viewport:{width:500,height:900}});await s.goto(i,{waitUntil:"networkidle"}),await s.waitForTimeout(2e3);let a=B(process.cwd(),t);$(A(a),{recursive:!0}),await s.screenshot({path:a}),console.log(` saved: ${a}`),await s.close()}}catch(s){console.error(` screenshot failed: ${s.message}`),process.exitCode=1}finally{await u.close()}}export{z as runScreenshot};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as o}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as o}from"./chunk-3HF6BNSA.js";import"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";async function n(e,s){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim screenshot-mode \u2014 toggle the screenshot-mode chrome overlay
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as Y}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.68 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as Y}from"./chunk-H6YUT7HX.js";import{b as j}from"./chunk-TKDMCYGS.js";import"./chunk-HPFXTPOD.js";import"./chunk-BQLKO6NP.js";import"./chunk-2NFRZQ3K.js";import"./chunk-Z6BCORBY.js";import{b as O}from"./chunk-2HVRBEOU.js";import"./chunk-D5LXWWGN.js";import"./chunk-WIW3G6HS.js";import"./chunk-GFXFPPNR.js";import"./chunk-J7XCQWQI.js";import"./chunk-TY5CBM3C.js";import"./chunk-72Y42WVX.js";import"./chunk-3NNUNABL.js";import"./chunk-FITG7BVA.js";import"./chunk-C3R25CWY.js";import"./chunk-K6N6DEL5.js";import"./chunk-ZP7YYRHI.js";import"./chunk-6TQ2IBH6.js";import"./chunk-FBO7YRJM.js";import"./chunk-E7FCGYB5.js";import"./chunk-5QUYJKLU.js";import{a as w,b as D,c as k,d as z,e as x,f as T}from"./chunk-6JGI2JVM.js";import"./chunk-5LDGAVAV.js";import"./chunk-6453CCSA.js";import"./chunk-CZWZG7GL.js";import"./chunk-G3WXMB3Z.js";import"./chunk-HC43PTFD.js";import{mkdirSync as B,readFileSync as pe,writeFileSync as G}from"fs";import{tmpdir as je}from"os";import C from"path";import{mkdirSync as I,readFileSync as Q,writeFileSync as H}from"fs";import F from"path";function _(e){return e.replace(/\\/g,"/").replace(/\.png$/i,"").trim().split("/").filter(Boolean).join("--").replace(/[^A-Za-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"slide"}function v(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function ee(e){let t=e.trim();return/^#[0-9a-f]{3}$/i.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function M(e,t){let o=ee(e),i=Math.max(0,Math.min(1,t)),n=o.match(/^#([0-9a-f]{6})$/i);if(n){let s=n[1],r=Number.parseInt(s.slice(0,2),16),a=Number.parseInt(s.slice(2,4),16),u=Number.parseInt(s.slice(4,6),16);return`rgba(${r}, ${a}, ${u}, ${i})`}return o.startsWith("rgb(")?o.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):o}function te(e){if(e.type==="solid")return e.color||"#000000";let t=e.direction??180,o=e.stops?.map(i=>`${i.color} ${i.offset}%`).join(", ")||"#000000 0%, #111111 100%";return`linear-gradient(${t}deg, ${o})`}function re(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${M(t,.46)} 0%, ${M(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function A(e){switch(e){case"tilted-left":return"perspective(2400px) rotateY(10deg) rotateZ(-2deg)";case"tilted-right":return"perspective(2400px) rotateY(-10deg) rotateZ(2deg)";case"cut-bottom":return"translateY(10%) scale(1.08)";case"cut-top":return"translateY(-16%) scale(1.08)";default:return"none"}}function L(...e){let t=e.map(o=>o.trim()).filter(o=>o.length>0&&o!=="none");return t.length>0?t.join(" "):"none"}function E(e){let t=M(e.color,e.opacity),o=M(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${o}) drop-shadow(0 0 ${e.blur}px ${t})`}function R(e,t){return!t.glow||e.color&&e.color!==w.color?e:{...e,color:t.glow}}function oe(e,t){if(e==="editorial-left"){let n=Math.round(t.height*.056),s=Math.round(t.height*.022);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.12)}px`,`left:${Math.round(t.width*.085)}px`,`width:${Math.round(t.width*.42)}px`,"text-align:left","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.92;`,subStyle:`font-size:${s}px;line-height:1.36;max-width:${Math.round(t.width*.36)}px;`,eyebrowStyle:"align-items:flex-start;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.68*(a.scale??r.scale)),l=Math.round(t.height*(.03+r.offsetY+(a.offsetY??0))),c=a.pose||r.pose||"tilted-right",m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.18)+l}px`,`left:${Math.round(t.width*.56)}px`,`width:${p}px`,"transform-origin:center center",`transform:${A(c)}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}if(e==="minimal-bottom"){let n=Math.round(t.height*.041),s=Math.round(t.height*.019);return{copyStyle:["position:absolute",`left:${Math.round(t.width*.12)}px`,`right:${Math.round(t.width*.12)}px`,`bottom:${Math.round(t.height*.085)}px`,"text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.96;`,subStyle:`font-size:${s}px;line-height:1.34;max-width:${Math.round(t.width*.56)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.84*(a.scale??r.scale)),l=Math.round(t.height*(r.offsetY+(a.offsetY??0))),c=a.pose||r.pose,m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${L("translateX(-50%)",A(c))}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}let o=Math.round(t.height*.04),i=Math.round(t.height*.019);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.084)}px`,"left:50%",`width:${Math.round(t.width*.88)}px`,"transform:translateX(-50%)","text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${o}px;line-height:0.92;`,subStyle:`font-size:${i}px;line-height:1.34;max-width:${Math.round(t.width*.6)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(n,s,r)=>{let a=t.name==="ipad-13"?.54:.64,u=Math.round(t.width*a*(s.scale??n.scale)),p=Math.round(t.height*(n.offsetY+(s.offsetY??0))),l=s.pose||n.pose,c=R(n.shadow,r);return["position:absolute",`top:${Math.round(t.height*(t.name==="ipad-13"?.25:.28))+p}px`,"left:50%",`width:${u}px`,"transform-origin:center top",`transform:${L("translateX(-50%)",A(l))}`,`filter:${E(c)}`,"z-index:2"].join(";")}}}function ne({canvas:e,compose:t,slide:o,imageDataUrl:i}){let n=o.background??t.background,s=oe(t.text.preset,e),r=t.text.preset!=="none"&&!!(o.eyebrow||o.headline||o.subheadline),a=s.deviceStyle(t.frame,o,n),u=o.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${v(o.headline)}</div>`:"",p=o.subheadline?`<div style="margin-top:${Math.round(e.height*.018)}px;color:${t.text.subColor};white-space:pre-line;text-wrap:balance;${s.subStyle}">${v(o.subheadline)}</div>`:"",l=o.eyebrow?`<div style="display:flex;${s.eyebrowStyle}margin-bottom:${Math.round(e.height*.016)}px;"><div style="font-size:${Math.round(e.height*.014)}px;font-weight:700;letter-spacing:0.18em;text-transform:uppercase;color:${t.text.eyebrowColor};">${v(o.eyebrow)}</div></div>`:"";return`<!doctype html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8" />
|